In our survey, we’ve collected information around the kind of health and sanitation practices in place at different tourism businesses in and around Kathmandu. In this report, we use statistical clustering techniques to segment businesses based on their health and sanitation preparedness, and use maps to spatially represent this information. Since our respondents are only a small subset of tourism businesses in Kathmandu, we also want to overlay OSM data and see if any patterns emerge.
DATA
Data used in this report comes from our ongoing C2M2 Tourism Businesses’ Survey, which contains responses from 112 tourism business owners from different parts of Nepal. While the survey was first targeted for business owners in Kathmandu, we have also received information from businesses in the cities of Pokhara and Chitwan respectively.
Data pre-processing
After directly downloading the raw dataset from our Kobo servers, the only data preprocessing step that has been carried out is the appending of latitude and longitude information for businesses who responded to our our survey. While we did ask tourism business owners to provide geographical coordinates, the question was optional. As a result, only around 50% of businesses provided this information. For the remaining businesses, this information was filled in by KLL’s geospatial team, after thoroughly cross-referencing metadata (name, location, email, etc.) provided by businesses with existing OSM data. Presently, only three businesses don’t have geospatial coordinates associated with them because the provided metadata wasn’t clear or sufficient enough to pinpoint these businesses locations.
VARIABLES
For the purposes of our analysis, we will be segmenting businesses based on their response to the question: “Which of the following health and sanitation measures did your business employ during the pandemic?”. Respondents could choose one of many options, which have been stored in the following columns as binary (flag) variables:
- sntzrs: Placed sanitizers at prominent locations
- empl_trained: Trained our employees on HHS (health, hygiene, and sanitation)
- thrml_scrn: Placed thermal screening and disinfection
- soc_dist: Maintained social distancing at our business premises
- cshless: Introduced/implemented cashless payments
- nobufft: Discontinued buffet services (applicable for hotels and restaurants only)
- c19mrktg: Added COVID-19 friendly marketing messages
- outsrc: Outsourced certain services like order management, delivery, etc.
- other Other
- none: None
In addition, the following additional attributes will all be used outside the clustering exercise to learn more about the nature of these clusters:
- id: A unique identifier for each of our responses
- perm_closed: A flag variable that indicates whether a business has had to permanently shut down because of the pandemic.
- type: The type of business (can be one of Hotel, Restaurant and Bar, Travel and Tour Operator, Handicraft, Rafting, Trekking, Mountaineering, Shop/Merchandise, Other)
- X_m_coodinates_latitude: Latitude information for the business. This was added during the data pre-processing step.
- X_m_coodinates_longitude: Longitude information for the business. This was added during the data pre-processing step.
Note: The raw data used for this analysis can be downloaded here.
Methodology
The following flow chart outlines the spes taken in our analysis.
1. Data preparation and cleaning
Here, we will subset the raw data to only include the variables of interest for our analysis, we will also rename variables.
2. Exploratory data analysis
Here we look how the data is distributed. It will provide insight into things like commonly employed health and sanitation measures, and popular combinations of HHS practices, etc.
3. Agglomerative hierarchical clustering
We’ve chosen agglomerative hierarchical clustering, which, in its bottom-up approach, begins with assigning every data point into their respective clusters, and then grouping similar clusters together with every next iteration.
Rationale
Since the data is relatively small in size the hierarchical clustering based approach’s algorithmic complexity of O(N^2) will not be of huge consequence for the purposes of our analysis. The method also does not require us to pre-specify the number of clusters we need, and provides a way to visually represent clustering results (through what is called a dendogram), both of which will be helpful in making decisions around the number of clusters we should allocate. The number of clusters will be decided after looking at the dendogram generated through the clustering exercise.
4. Cluster assignment and profiling
After the clustering is complete, and we’ve chosen “k”, we now proceed to assign individual businesses their respective clusters. We then use a simple EDA exercise to understand the nature of businesses falling in each of these clusters. We do this by looking and within-cluster proportions of businesses that use a specific health and sanitation measure. For each cluster, we also look at the distribution of businesses by the type of business (hotel, restaurant, etc.)
5. Spatially visualizing businesses by cluster type
Finally, we then spatially visualize businesses based ion the cluster they belong to, to see if there are any spatial patterns that can emerge from the dataset.
Key decision points and callouts
Excluding permanently closed businesses
For the purposes of our analysis, we have only included businesses that haven’t permanently shut down. Given the analysis’ goals of categorizing hotels into red, yellow, and green based on the health, hygiene, and sanitation practices they follow
Jaccard distance for measuring similarity
The classification of observations into groups requires some methods for computing the distance or the (dis)similarity between each pair of observations. The result of this computation is known as a dissimilarity or distance matrix. Since we’re dealing with binary variables, we cannot use traditionally used measures of distance such as Euclidean distance, as they also consider joint absences (i.e. businesses that do not use sanitizers, or businesses that do not use thermal screening, are also considered as similar). We do not want businesses to be considered similar based on choices they haven’t made. To deal with this, we’ve used Jaccard distance. More here.
Number of clusters
These have been selected by first visually observing and cutting horizontal lines through the dendogram at different positions, and then looking at profiles for different numbers of clusters, and how data is distributed among them.
Cluster linkage methods
To identify the appropriate cluster linkage method (our goal is to use a method that provides a stronger cluster structure), we’ve have used the method that produces the highest agglomerative coefficient.
Analysis with code
For the purposes of brevity and legibility, only important sections of the code has been shown in this document. The remaining ciode is hidden. To view the full code used for the analysis, you can review the raw RMarkdown file here.
Before we begin, let us look at the data we will be working with.
Exploratory data analysis
The package UpsetR
, which provides intersection totals for a combination of binary variables can be used to quickly scan through data.
# Subset only HHS columns
subs <- data %>% select(c(colnames(data)[3:12]))
# Function to convert all factors to numeric
asNumeric <- function(x) as.numeric(as.character(x))
factorsNumeric <- function(d) modifyList(
d,
lapply(d[, sapply(d, is.factor)],asNumeric)
)
# Visualize using UpsetR
upset(factorsNumeric(subs),
order.by="freq",
main.bar.color = "#c3092b",
sets.bar.color = "#c3092b",
group.by = "degree"
)
As we can see, a good chunk of businesses were quick to adapt and introduce all forms of health, hygiene, and safety best practices. However, there appears to be a significant proportion of businesses who did the bare mininum (introduce sanitiziers, or train employees). Will these patterns be reflected in our segmentation exercise? Let’s find out.
Agglomerative hierarchical clustering
Let’s begin by computing the distance matrix based on the “jaccard” (dis)similarity metric.
# Subset only relevant columns
measures_var <- renamed_cols[3:12]
df <- data %>%
select(all_of(measures_var))
# Convert columns to numeric values
indx <- sapply(df, is.factor)
df[indx] <- lapply(
df[indx],
function(x) as.numeric(as.character(x))
)
# Compute distance matrix based on "jaccard" distance
dist.mat<-vegdist(
df,
method="jaccard",
binary = T
)
Before we perform the clustering exercise, we will start first by looking for the appropriate cluster linkage method we should use for our analysis. For this, we use the agnes
method available in the cluster
package to calculate the agglomerative coefficients(ac) for different methods.
# Calculate agglomerative coefficients
# for different cluster linkage methods
m <- c( "average", "single", "complete", "ward")
names(m) <- c( "average", "single", "complete", "ward")
ac <- function(x) {
agnes(subs, method = x)$ac
}
map_dbl(m, ac)
Based on the results above, let’s choose the “ward” method as the agglomerative coefficient is the highest. Now then, let’s go ahead and perform the actual clustering exercise.
# Perform and plot clustering results
clust.res<-hclust(dist.mat, method = "ward.D")
plot(clust.res, hang=-1, cex=0.8)
After looking at results for different values of k (outside this document), we found that using k=5 yields clusters that have reasonable within group similarity, and between-group dissimilarity.
Cluster assignment and profiling
Before we begin the profiling exercise, let’s look at the prevalance of different health and sanitation measures across oursurvey respondents. Table below shows the proportion of businesses that employ different health and sanitation measures:
totals <- df %>% summarise(
sntzrs=round(sum(as.numeric(as.character(sntzrs)))/n()*100, 2),
empl_trained=round(sum(as.numeric(as.character(empl_trained)))/n()*100, 2),
thrml_scrn=round(sum(as.numeric(as.character(thrml_scrn)))/n()*100, 2),
soc_dist=round(sum(as.numeric(as.character(soc_dist)))/n()*100, 2),
cshless=round(sum(as.numeric(as.character(cshless)))/n()*100, 2),
nobufft=round(sum(as.numeric(as.character(nobufft)))/n()*100, 2),
c19mrktg=round(sum(as.numeric(as.character(c19mrktg)))/n()*100, 2),
outsrc=round(sum(as.numeric(as.character(outsrc)))/n()*100, 2),
othr=round(sum(as.numeric(as.character(othr)))/n()*100, 2),
none=round(sum(as.numeric(as.character(none)))/n()*100, 2)
)
knitr::kable(gather(totals, hhs_measure, perc_of_total, sntzrs:none, factor_key=TRUE))
Now then , let’s go ahead and assign clusters back to our observations using k=5. We will also go ahead and look at how our data is distributed amongst these clusters using a simple bar chart.
sub_grp <- cutree(clust.res, k = 5)
data <- cbind(data, sub_grp)
# Visualize
ggplot(
data,
aes(x=factor(sub_grp))
) +
geom_bar(
stat="count",
width=0.7,
fill="#c3092b") +
theme_linedraw() +
geom_text(
stat='count',
aes(label=..count..),
vjust=-1
)
Understanding cluster characteristics
Looking at within cluster proportions of different health, hygiene, and sanitation measures adopted by businesses falling in these cluster can reveal interesting insights around how the data is currently being grouped by our clustering exercise.
cluster_profiles <- data %>%
group_by(sub_grp) %>%
summarise(
count = n(),
sntzrs=round(sum(as.numeric(as.character(sntzrs)))/n()*100, 2),
empl_trained=round(sum(as.numeric(as.character(empl_trained)))/n()*100, 2),
thrml_scrn=round(sum(as.numeric(as.character(thrml_scrn)))/n()*100, 2),
soc_dist=round(sum(as.numeric(as.character(soc_dist)))/n()*100, 2),
cshless=round(sum(as.numeric(as.character(cshless)))/n()*100, 2),
nobufft=round(sum(as.numeric(as.character(nobufft)))/n()*100, 2),
c19mrktg=round(sum(as.numeric(as.character(c19mrktg)))/n()*100, 2),
outsrc=round(sum(as.numeric(as.character(outsrc)))/n()*100, 2),
othr=round(sum(as.numeric(as.character(othr)))/n()*100, 2),
none=round(sum(as.numeric(as.character(none)))/n()*100, 2)
)
knitr::kable(cluster_profiles)
A few observations:
- Businesses falling in Cluster 1 seem to be the most responsible when it comes to HHS measure adoption, with a majority of these businesses adopting more than one method in ensuring health, hygiene and safety measures. Highlighting these businesses work could definitely help nudge other businesses towards adopting HHS measures.
- Businesses falling to Cluster 5 had not adopted any health, hygiene, and sanitation measures at the time of taking this survey. Reaching out to these businesses could reveal more insight into why this is happening, and help generate insights around hurdles for businesses to adopt HHS measures.
- Businesses falling to Cluster 3 and Cluster 4 don’t seem to be far away from their Cluster 5 counterparts, having done only the bare minimum needed for ensuring HHS safety, either through the use of hand sanitizers in business premises, or through employee traininbg on HHS best practices.
- The behaviour of businesses in Cluster 2 is a bit unclear, while these businesses have sought to adopt more than one measure, it appears there is room to do more. Once again, reaching out to these businesses could provide an oppportunity for government and non-government stakeholders to learn about the different challenges and hurdles surrounding HHS measures adoption in tourism businesses.
Given these observations, we can observe three distinctive patterns for health, hygiene and sanitation practices emerging from our data. There is a group of businesses that have made little to no effort in adopting HHS measures follwoing the pandemic (clusters 3, 4,5). Then there is a group of responsible bunisesses, where many have adopted more than one HHS measures in response to the pandemic. Finally there is the in-between group (cluster 2). Let’s go ahead and regroup our clusters based on this pattern.
data$sub_grp <- ifelse(data$sub_grp == 4, 3, ifelse(data$sub_grp==5, 3, data$sub_grp))
cluster_profiles <- data %>%
group_by(sub_grp) %>%
summarise(
count = n(),
sntzrs=round(sum(as.numeric(as.character(sntzrs)))/n()*100, 2),
empl_trained=round(sum(as.numeric(as.character(empl_trained)))/n()*100, 2),
thrml_scrn=round(sum(as.numeric(as.character(thrml_scrn)))/n()*100, 2),
soc_dist=round(sum(as.numeric(as.character(soc_dist)))/n()*100, 2),
cshless=round(sum(as.numeric(as.character(cshless)))/n()*100, 2),
nobufft=round(sum(as.numeric(as.character(nobufft)))/n()*100, 2),
c19mrktg=round(sum(as.numeric(as.character(c19mrktg)))/n()*100, 2),
outsrc=round(sum(as.numeric(as.character(outsrc)))/n()*100, 2),
othr=round(sum(as.numeric(as.character(othr)))/n()*100, 2),
none=round(sum(as.numeric(as.character(none)))/n()*100, 2)
)
knitr::kable(cluster_profiles)
At the same time, we also want to look at the distribution of businesses by type at the cluster level, as this could help reveal potential red flags. For example, a hotel business – where there is a relatively higer probability of person-to-person contact - falling into clusters 3, 4 or 5 would be a more serious issue than a travel and tour operator falling into these clusters. So let’s go ahead a visualize this information as well.
ggplot(
data,
aes(x=factor(type))
) +
geom_bar(
stat="count",
width=0.7,
fill="#c3092b") +
geom_text(
stat='count',
aes(label=..count..),
vjust=-1
) +
facet_grid(sub_grp ~ .) +
scale_x_discrete(
breaks=1:9,
labels=c(
"Hotel",
"Rest & B",
"Trav. Tour",
"Handicraft",
"Rafting",
"Trekking",
"Mountnring",
"Shop",
"Other"
)
) +
theme_linedraw()
And indeed, 7 out of 25 businesses that fall in Clusers 3, 4 or 5 are hotels and restaurants. These businesses should be contacted immediately and provided with necessary assistance so that they can ensure better HHS measures for their customers.
Similarly, let’s also look at the distribution of businesses by number of employees at the cluster level.
ggplot(
data,
aes(x=factor(n_employees))
) +
geom_bar(
stat="count",
width=0.7,
fill="#c3092b") +
geom_text(
stat='count',
aes(label=..count..),
vjust=-1
) +
facet_grid(sub_grp ~ .) +
scale_x_discrete(
breaks=1:5,
labels=c(
"Less than 10",
"11 to 30",
"31 to 50",
"51 to 100",
"More than 100"
)
) +
theme_linedraw()
Spatially visualizing businesses by cluster type
Could HHS measure adoption be linked with where businesses are located? A map based visualization can help answer this question.
data$lat <-as.numeric(
as.character(data$X_m_coodinates_latitude)
)
data$lng <- as.numeric(
as.character(data$X_m_coodinates_longitude)
)
# Some 3 businesses don't have
# coordinates, so lets exclude them
onlyLatLng <- data[!is.na(data$lat), ]
onlyLatLng <- data[!is.na(data$lng), ]
colors <- c("#1b9e77ff", "#d95f02ff", "#7570b3ff")
factpal <- colorFactor(colors, onlyLatLng$sub_grp)
leaflet(data = onlyLatLng, width = "75%") %>%
addProviderTiles(providers$CartoDB.Positron) %>%
addCircleMarkers(
lng = ~lng,
lat = ~lat,
color = ~factpal(sub_grp),
stroke = FALSE,
fillOpacity = 0.5,
label = ~name) %>%
addLegend(
"bottomright",
pal = factpal,
values = ~sub_grp,
title = "Cluster Assignment",
opacity = 1
)
Businesses outside the valley appear to be doing better w.r.t HHS measures adoption. Most of the businesses who responded from the cities of Pokhara and Chitwan fall under Clusters 1 or 2. At this point, we can’t say if this is because buinesses these cities adopted HHS practices later (after learning from Kathmandu), because the domain they operate in require stricter HHS practices (most are hotels and restaurants), or because adopting HHS practices was more feasible. Further analysis can help us understand this phenomenon better.
Businesses in Thamel can learn from each other. There is a good mix of safe (cluster 1) and bare-minimum (cluster 3, 4) hotels in Thamel (zoom the map to the most densely populated region). This represent an opportunity for tourism stakeholders in Thamel to collaborate with safe businesses in training hotels with HHS measure adoption.
REFERENCES
- Hierarchical Clustering Analysis, https://uc-r.github.io/hc_clustering
- User Similarity with Binary Data in Python, https://towardsdatascience.com/user-similarity-with-binary-data-in-python-d15940a702fc
- Lex et. al, UpSet: Visualization of Intersecting Sets, IEEE Transactions on Visualization and Computer Graphics, 2014 https://sci.utah.edu/~vdl/papers/2014_infovis_upset.pdf


Here you can find the teamwork projects of our students. Like, comment or share them all around the social web.


Privacy Statement for Fantastic Fiction
Fantastic Fiction has created this privacy statement in order to demonstrate our firm commitment to privacy.
The following discloses the information gathering and dissemination practices for this Web site:
Fantastic Fiction
Information Automatically Logged
This web site does not set any cookies.
Advertisers
We use third-party advertising companies to serve ads when you visit our Web site. These companies may use aggregated information (not including your name, address, email address or telephone number) about your visits to this and other Web sites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, please see: http://www.networkadvertising.org/managing/opt_out.asp
Personal Information
This web site does not request any personal information or collect any information that personally identifies you or allows you to be personally contacted.
Since we do not collect any personal information on this Web site, we do not share any personal information with any third parties nor do we use any personal information for any purposes.
External Links
This site contains links to other sites. Fantastic Fiction is not responsible for the privacy practices or the content of such Web sites.
Special Relationships
Fantastic Fiction is an associate of the following on-line bookshops:
Amazon
Abebooks
Contacting the Web Site
If you have any questions about this privacy statement, the practices of this site, or your dealings with this Web site, you can contact<EMAIL_ADDRESS>Information Automatically Logged
This web site does not set any cookies.
Advertisers
We use third-party advertising companies to serve ads when you visit our Web site. These companies may use aggregated information (not including your name, address, email address or telephone number) about your visits to this and other Web sites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, please see: http://www.networkadvertising.org/managing/opt_out.asp
Personal Information
This web site does not request any personal information or collect any information that personally identifies you or allows you to be personally contacted.
Since we do not collect any personal information on this Web site, we do not share any personal information with any third parties nor do we use any personal information for any purposes.
External Links
This site contains links to other sites. Fantastic Fiction is not responsible for the privacy practices or the content of such Web sites.
Special Relationships
Fantastic Fiction is an associate of the following on-line bookshops:
Amazon
Abebooks
Contacting the Web Site
If you have any questions about this privacy statement, the practices of this site, or your dealings with this Web site, you can contact: webmaster@fantasticfiction.com


ATC_approx.Rd
Ability to correlate to other rows - an approximated method
ATC_approx(mat, cor_fun = stats::cor, min_cor = 0, power = 1, k_neighbours = -1, mc.cores = 1, cores = mc.cores, n_sampling = c(1000, 500), group = NULL, ...)
| mat | A numeric matrix. ATC score is calculated by rows. |
|---|---|
| cor_fun | A function which calculates correlations on matrix rows. |
| min_cor | Cutoff for the minimal absolute correlation. |
| power | Power on the correlation values. |
| k_neighbours | Nearest k neighbours. Note when this argument is set, there won't be subset sampling for calculating correlations, whihc means, it will calculate correlation to all other rows. |
| mc.cores | Number of cores. This argument will be removed in future versions. |
| cores | Number of cores. |
| n_sampling | When there are too many rows in the matrix, to get the curmulative distribution of how one row correlates other rows, actually we don't need to use all the rows in the matrix, e.g. 1000 rows can already give a very nice estimation. |
| group | A categorical variable. If it is specified, the correlation is only calculated for the rows in the same group as current row. |
| ... | Pass to |
For a matrix with huge number of rows. It is not possible to calculate correlation to all other rows, thus the correlation is only calculated for a randomly sampled subset of othe rows.
With small numbers of rows of the matrix, ATC
should be used which calculates the "exact" ATC value, but the value of ATC
and ATC_approx
should be very similar.
# There is no example NULL#> NULL


Oracle provides four Berkeley DB products, each differing by the level of database support that they offer.
Each product provides additional functionality to the product that precedes it in the list. As a result, you can download Berkeley DB and build an application that provides read-only database access for a single-user, and later add support for more complex database access patterns for multiple users.
The single Open Source distribution of Berkeley DB from Oracle includes the four products and building the distribution automatically builds all four products. However, you must use the same Berkeley DB product throughout an application or group of applications.
To redistribute Berkeley DB software, you must have a license for the Berkeley DB product you use. For further details, refer to the licensing informaion at: http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html
A comparison of the four Berkeley DB product features is provided in the following table.
| Berkeley DB Data Store | Berkeley DB Concurrent Data Store | Berkeley DB Transactional Data Store | Berkeley DB High Availability | |
|---|---|---|---|---|
|
What is this product? |
Provides indexed, single-reader/single-writer embedded data storage |
Adds simple locking with multiple-reader/single-writer capabilities |
Adds complete ACID transaction support, as well as recovery |
Adds single-master data replication across multiple physical machines |
|
Ensures recovery operation |
No |
No |
Yes |
Yes |
|
Provides Locking feature |
No |
Yes |
Yes |
Yes |
|
Provides concurrent read-write access |
No |
Yes |
Yes |
Yes |
|
Provides transactional support |
No |
No |
Yes |
Yes |
|
Supports the SQL API |
No |
No |
Yes |
No |
|
Provides replication support |
No |
No |
No |
Yes |
The Berkeley DB Data Store product is an embeddable, high-performance data store. This product supports multiple concurrent threads of control, including multiple processes and multiple threads of control within a process. However, Berkeley DB Data Store does not support locking, and hence does not guarantee correct behavior if more than one thread of control is updating the database at a time. The Berkeley DB Data Store is intended for use in read-only applications or applications which can guarantee no more than one thread of control updates the database at a time.
The Berkeley DB Concurrent Data Store product adds multiple-reader, single writer capabilities to the Berkeley DB Data Store product. This product provides built-in concurrency and locking feature. Berkeley DB Concurrent Data Store is intended for applications that need support for concurrent updates to a database that is largely used for reading.
The Berkeley DB Transactional Data Store product adds support for transactions and database recovery. Berkeley DB Transactional Data Store is intended for applications that require industrial-strength database services, including excellent performance under high-concurrency workloads of read and write operations, the ability to commit or roll back multiple changes to the database at a single instant, and the guarantee that in the event of a catastrophic system or hardware failure, all committed database changes are preserved.
The Berkeley DB High Availability product adds support for data replication. A single master system handles all updates, and distributes these updates to multiple replicas. The number of replicas depends on the application requirements. All replicas can handle read requests during normal processing. If the master system fails for any reason, one of the replicas takes over as the new master system, and distributes updates to the remaining replicas.


Output of selectValue() is {{ selectedValue }}
Output of onFocus() is Yes
Output of onBlur() is Yes
Output of onKeyUp() is Yes
Output of onKeyDown() is Yes
This is the very basic AutoComplete of angular.
selectValue() - cities event
onFocus() - input focus event
onBlur() - input blur event
onKeyUp() - input Keyup event
onKeyDown() - input Keydown event


Click
here
to access the api for
UNBINNED
QQ data.


About Me
My name is Saif Momani i'm a Software Engineering Graduate for the University of Petra, i've worked outside my field of study for three years now but i want to get into the software development industry again as backend developer because i dont like front end, my goal is to learn Artificial Inteligence Design, video game programming and 3D modeling.
Top 5 Bands
- Gojira
- Korn
- Pantera
- Alice in Chains
- Metallica
Top 5 Anime's
- Steins;Gate
- Attack on Titan
- Death Note
- Full Metal Alchemist
- Dragon Ball Z
Experience
- HBM Consultancy, Dubai — Data Entry — NOV 2019 - NOV 2020
- Business Factory, Dubai — Digital Marketing Intern — AUG 2019 - NOV 2019
- TADBEER, Dubai — Customer Service/Data Entry — JUL 2018 - JUN 2019
Education
- Abdul Aziz Al Ghurair School of Advanced Computing/Code Fellows — Amman Advanced Software Engineering — OCT 2021
- University of Petra — Amman — Software Engineering — JUL 2017
Certificates
- Pioneers Academy — Amman — Android Development — MAR 2021
- AstroLabs Academy — Dubai — Web Development Boot Camp — OCT 2019


org.nd4j.linalg.api.ops.impl.transforms.gradient
Classes
CubeDerivative
ELUDerivative
GradientBackwardsMarker
HardSigmoidDerivative
HardTanhDerivative
LeakyReLUDerivative
LogSoftMaxDerivative
RationalTanhDerivative
RectifiedTanhDerivative
Relu6Derivative
SELUDerivative
SigmoidDerivative
SoftmaxBp
SoftMaxDerivative
SoftSignDerivative
TanhDerivative


| Top |
| cairo_device_t * | cairo_device_reference () |
| void | cairo_device_destroy () |
| cairo_status_t | cairo_device_status () |
| void | cairo_device_finish () |
| void | cairo_device_flush () |
| cairo_device_type_t | cairo_device_get_type () |
| unsigned int | cairo_device_get_reference_count () |
| cairo_status_t | cairo_device_set_user_data () |
| void * | cairo_device_get_user_data () |
| cairo_status_t | cairo_device_acquire () |
| void | cairo_device_release () |
| double | cairo_device_observer_elapsed () |
| double | cairo_device_observer_fill_elapsed () |
| double | cairo_device_observer_glyphs_elapsed () |
| double | cairo_device_observer_mask_elapsed () |
| double | cairo_device_observer_paint_elapsed () |
| cairo_status_t | cairo_device_observer_print () |
| double | cairo_device_observer_stroke_elapsed () |
Devices are the abstraction Cairo employs for the rendering system
used by a cairo_surface_t. You can get the device of a surface using
cairo_surface_get_device()
.
Devices are created using custom functions specific to the rendering system you want to use. See the documentation for the surface types for those functions.
An important function that devices fulfill is sharing access to the
rendering system between Cairo and your application. If you want to
access a device directly that you used to draw to with Cairo, you must
first call cairo_device_flush()
to ensure that Cairo finishes all
operations on the device and resets it to a clean state.
Cairo also provides the functions cairo_device_acquire()
and
cairo_device_release()
to synchronize access to the rendering system
in a multithreaded environment. This is done internally, but can also
be used by applications.
Putting this all together, a function that works with devices should look something like this:
void my_device_modifying_function (cairo_device_t *device) { cairo_status_t status; // Ensure the device is properly reset cairo_device_flush (device); // Try to acquire the device status = cairo_device_acquire (device); if (status != CAIRO_STATUS_SUCCESS) { printf ("Failed to acquire the device: %s\n", cairo_status_to_string (status)); return; } // Do the custom operations on the device here. // But do not call any Cairo functions that might acquire devices. // Release the device when done. cairo_device_release (device); }
Please refer to the documentation of each backend for additional usage requirements, guarantees provided, and interactions with existing surface API of the device functions for surfaces of that type.
cairo_device_t *
cairo_device_reference (cairo_device_t *device
);
Increases the reference count on device
by one. This prevents
device
from being destroyed until a matching call to
cairo_device_destroy()
is made.
The number of references to a cairo_device_t can be get using
cairo_device_get_reference_count()
.
Since 1.10
void
cairo_device_destroy (cairo_device_t *device
);
Decreases the reference count on device
by one. If the result is
zero, then device
and all associated resources are freed. See
cairo_device_reference()
.
This function may acquire devices if the last reference was dropped.
Since 1.10
cairo_status_t
cairo_device_status (cairo_device_t *device
);
Checks whether an error has previously occurred for this device.
Since 1.10
void
cairo_device_finish (cairo_device_t *device
);
This function finishes the device and drops all references to
external resources. All surfaces, fonts and other objects created
for this device
will be finished, too.
Further operations on the device
will not affect the device
but
will instead trigger a CAIRO_STATUS_DEVICE_FINISHED
error.
When the last call to cairo_device_destroy()
decreases the
reference count to zero, cairo will call cairo_device_finish()
if
it hasn't been called already, before freeing the resources
associated with the device.
This function may acquire devices.
Since 1.10
void
cairo_device_flush (cairo_device_t *device
);
Finish any pending operations for the device and also restore any temporary modifications cairo has made to the device's state. This function must be called before switching from using the device with Cairo to operating on it directly with native APIs. If the device doesn't support direct access, then this function does nothing.
This function may acquire devices.
Since 1.10
cairo_device_type_t
cairo_device_get_type (cairo_device_t *device
);
This function returns the type of the device. See cairo_device_type_t for available types.
Since 1.10
unsigned int
cairo_device_get_reference_count (cairo_device_t *device
);
Returns the current reference count of device
.
Since 1.10
cairo_status_t cairo_device_set_user_data (cairo_device_t *device
,const cairo_user_data_key_t *key
,void *user_data
,cairo_destroy_func_t destroy
);
Attach user data to device
. To remove user data from a surface,
call this function with the key that was used to set it and NULL
for data
.
device |
||
key |
the address of a cairo_user_data_key_t to attach the user data to |
|
user_data |
the user data to attach to the cairo_device_t |
|
destroy |
a cairo_destroy_func_t which will be called when the cairo_t is destroyed or when new user data is attached using the same key. |
CAIRO_STATUS_SUCCESS
or CAIRO_STATUS_NO_MEMORY
if a
slot could not be allocated for the user data.
Since 1.10
void * cairo_device_get_user_data (cairo_device_t *device
,const cairo_user_data_key_t *key
);
Return user data previously attached to device
using the
specified key. If no user data has been attached with the given
key this function returns NULL
.
Since 1.10
cairo_status_t
cairo_device_acquire (cairo_device_t *device
);
Acquires the device
for the current thread. This function will block
until no other thread has acquired the device.
If the return value is CAIRO_STATUS_SUCCESS
, you successfully acquired the
device. From now on your thread owns the device and no other thread will be
able to acquire it until a matching call to cairo_device_release()
. It is
allowed to recursively acquire the device multiple times from the same
thread.
You must never acquire two different devices at the same time unless this is explicitly allowed. Otherwise the possibility of deadlocks exist. As various Cairo functions can acquire devices when called, these functions may also cause deadlocks when you call them with an acquired device. So you must not have a device acquired when calling them. These functions are marked in the documentation.
CAIRO_STATUS_SUCCESS
on success or an error code if
the device is in an error state and could not be
acquired. After a successful call to cairo_device_acquire()
,
a matching call to cairo_device_release()
is required.
Since 1.10
void
cairo_device_release (cairo_device_t *device
);
Releases a device
previously acquired using cairo_device_acquire()
. See
that function for details.
 There are different subtypes of
cairo_device_t for different drawing backends; for example,
cairo_egl_device_create()
creates a device that wraps an EGL display and
context.
The type of a device can be queried with cairo_device_get_type()
.
Memory management of cairo_device_t is done with
cairo_device_reference()
and cairo_device_destroy()
.
Since 1.10
cairo_device_type_t is used to describe the type of a given device. The devices types are also known as "backends" within cairo.
The device type can be queried with cairo_device_get_type()
The various cairo_device_t functions can be used with devices of
any type, but some backends also provide type-specific functions
that must only be called with a device of the appropriate
type. These functions have names that begin with
cairo_type_device
such as
cairo_xcb_device_debug_cap_xrender_version()
.
The behavior of calling a type-specific function with a device of the wrong type is undefined.
New entries may be added in future versions.
|
The device is of type Direct Render Manager, since 1.10 |
||
|
The device is of type OpenGL, since 1.10 |
||
|
The device is of type script, since 1.10 |
||
|
The device is of type xcb, since 1.10 |
||
|
The device is of type xlib, since 1.10 |
||
|
The device is of type XML, since 1.10 |
||
|
The device is of type cogl, since 1.12 |
||
|
The device is of type win32, since 1.12 |
||
|
The device is invalid, since 1.10 |
Since 1.10


"My challenge is to triumph at Madrid"
by BeSoccerMartin Odeegard, on loan at Real Sociedad from Real Madrid, spoke to 'El Larguero' and the Norweigan stated that his main objective is none other than to triumph at Real Madrid.
Despite only being 20-years-old, Odegaard is one of the names to look out for in the next few years. The attacker, who currently plays at Real, hopes to contnue evolving.
After not having a place in the Madrid squad, the team decided to loan him to Real Sociedad, where the footballer feels very happy and loved by all.
"I feel very comfortable here, like I am at home. It's very nice and friendly and it has been easy to come here with the team. I am very happy here. It is a very beautiful city," he started saying to 'El Larguero'.
Curiously, the Norweigan will against the team who actually own him this Saturday, Madrid. The attacker, having recovered from an ankle injury, showed his future ambition at Real Madrid.
Featured links
- BREAKING NEWS: Mourinho replaces Pochettino at Tottenham
- The latest football transfers news and rumours
- Wales, golf, Madrid... in that order
- Luis Enrique returns to Spain national team
"My challenge is to go back and triumph at Madrid. That's why I signed with them, to play there. But now I am happy here. I am not in a hurry. If I play in two or five years at Madrid, it's all the same. The time doesn't matter. But one day I want to play in Madrid," he said.
On the current situation of Madrid, this is what Odegaard said: "They are looking good. They are better now. It will be a difficult match."
In relation to if he will celebrate a goal against Madrid, he made it quite clear: "I would not do so because it is against the team that I belong to".
Finally, Odegaard did not rule out being on loan at Real for two years. "Yes, that is the plan. I'm clear. Then in football you never know what will happen, but the idea is to stay here for two years," he concluded.


£ key in Windows on a US laptop keyboard, done right.
The usual solution to typing non-US characters on a US keyboard in Windows is to hold left-alt, then type on the numeric keypad:
£ Left-alt + 0163
€ Left-alt + 0128
This is a pain on my (otherwise fabulous) Thinkpad laptop, because the numeric keypad is accessed by holding the blue 'Fn' key while you tap ScrLk, to toggle numeric keypad mode, and then doing the same again afterwards to turn it off.
One inadequate alternative (on WindowsXP, YMMV) is to go into control panel; Regional and Language Options; Languages; Details; Settings. Add a new keyboard configuration, "United States-International", which should be grouped under your existing language ("English (United Kingdom)" for me.) OK all the dialogs, restart your applications.
Now you can simply type:
£ Right-alt + Shift + 4
€ Right-alt + 5
The downside of this solution is that the "UnitedStates-International" keyboard setting adds a bunch of other features, including 'dead-keys', whereby quotes and other punctuation are used to add accents to letters, which is overly intrusive if, like me, you hardly ever use accents.
Ultimate solution then, define your own personal keyboard layout. Download the Microsoft Keyboard Layout Creator from here: http://msdn.microsoft.com/en-us/goglobal/bb964665.
My end result is an MSI with which I can install a new keyboard layout, which is exactly like 'US', but with the addition of £ on the key right-alt + 3:
windows-US-keyboard-layout-with-pound-on-right-alt-3
The source .klc file is in there, so you could add your own tweaks on top of that.


OpenCV – Multiple Inheritance and Polymorphism
Done by : Mohammad Moazam
Exercise 1 : Multiple inheritance and image processing
In this exercise we had to create two classes BlurFiltering and EdgeDetector that inherit from Base and Mat classes.
Base class
This class has some common functions for classes BlurFiltering and EdgeDetector.
-
parameters
-
int process
- this is used to store the process
-
baseTypes type
- baseTypes is enum that has two options EdgeDetect, BlurFilter. This parameter will store type of process (to distinguish between edge detection and bur filtering).
-
constructors
-
member functions
-
void setOpenCVProcessName(EdgeDetectors _process)
- this function will be used to set process for edge detection
-
void setOpenCVProcessName(BlurFilters _process)
- this function will be used to set process for blur filtering
-
const char* getOpenCVProcessName()
- this function will return the current set process
BlurFiltering class
This class inherits from Base class and cv::Mat class. This class is used to perform blurfiltering.
-
parameters
-
constructors
-
BlurFiltering() : Base(BlurFilter) {}
- this default constructor sets the type of the process automatically by calling the base constructor
-
BlurFiltering(const Mat& src, BlurFilters process = MEAN) : Mat(src), Base(process, BlurFilter) {}
- constructor initialises the Mat class and the Base class by providing the source Mat and automatically setting the type in Base class.
-
member functions
-
void compute(Mat& input)
- this function is used to run the process (a blur filtering algorithm) on input. I used reference to make it more efficient (space and time both).
-
void compute()
- this function will be used on the Mat data (that we init in constructor) and run the compute on that.
EdgeDetector class
This class inherits from Base class and cv::Mat class. This class is used to perform edge detection.
-
parameters
-
const int lowThreshold = 50
- const value used in edge detection algorithms
-
const int ratio = 3
- const value used in edge detection algorithms
-
const int kernel_size = 3
- const value used in edge detection algorithms
-
const int scale = 1, delta = 0
- const value used in edge detection algorithms
-
constructors
-
EdgeDetector() : Base(EdgeDetect) {}
- this default constructor sets the type of the process automatically by calling the base constructor
-
EdgeDetector(const Mat& src, EdgeDetectors process = CANNY) : Mat(src), Base(process, EdgeDetect) {}
- constructor initialises the Mat class and the Base class by providing the source Mat and automatically setting the type in Base class.
-
member functions
-
void compute(Mat& input)
- this function is used to run the process (a edge detection algorithm) on input. I used reference to make it more efficient (space and time both).
-
void compute()
- this function will be used on the Mat data (that we init in constructor) and run the compute on that.
Comments
I have seperated the code in a new folder name "psrs" and all the header files can be used by using the namespace psrs.
There is main.cpp that runs the main()
function as per asked in the exercise 1.


--- layout: post title: Aperture 3 Free HDR Preset tags: - Aperture 3 - Apple Aperture - Articles - HDR - preset status: publish type: post published: true meta: _edit_last: "2" aktt_notify_twitter: "yes" _edit_lock: "1282751280" _thumbnail_id: "2206" ghostpool_post_template: Default ghostpool_link: Post/Page ghostpool_post_image: http://photo.rwboyer.com/wp-content/uploads/2010/08/DSC_9534-880.jpg ghostpool_post_faded_image: http://photo.rwboyer.com/wp-content/uploads/2010/08/DSC_9534-880.jpg ghostpool_circle_image: http://photo.rwboyer.com/wp-content/uploads/2010/08/DSC_9534-880.jpg ghostpool_port_image_small: http://photo.rwboyer.com/wp-content/uploads/2010/08/DSC_9534-880.jpg ghostpool_slider_image: http://photo.rwboyer.com/wp-content/uploads/2010/08/DSC_9534-880.jpg aktt_tweeted: "1" _wp_old_slug: "" dsq_thread_id: "370268114" --- I thought I would follow up the Nik HDR Efex Pro announcement with a free preset for all of you Aperture 3 people. If you haven't been reading for a while you probably don't know that I am not a big fan of HDR but I thought that this preset might be a fun way to introduce you to the power and the glory of Aperture's Highlights and Shadows adjustment. Here is an old tutorial on Highlights and Shadows. Let's not get into the "bad HDR" vs "good HDR" because if you have that conversation with someone it will amaze you how all your words agree with each other's but when you look at images together there is a 99.9% chance your definition of good and bad HDR will diverge wildly. So... Here is my over the top impression of what all things labeled as HDR look like - I did say over the top, you can tune it to your own definition of "good HDR". Here is the HDR recipe from my standpoint.


The Planbook is Years old. It's time for an update for the 21st Century.
The online Planbook is designed to do what you already use your planbook for every day, but better. Write down your assignments on your laptop, and they are instantly synced to your phone, iPad, or any other device, so there's no fear of losing your planbook. Color codes help you keep track of what is important.
With the online Planbook, you can set reminders for important assignments. Want to remember to study before a test? You set the interval, and the frequency of the reminder. The Online Planbook also emails you your reminders at set intervals, to make sure that you remember to finish your assignments on time.
(Coming Soon) Make sure you know when your teachers are free, and schedule labs with them without the ambiguity of email or paper sign-up sheets.


Pendulum motion of load hanging from an A-frame.
Ship Heave and Roll (m and rad)
Frame Tip - Displacement From Original Position (m)
Load Phi


Insatiable curiosity meets neuroplasticity!
Oregon has always been my home although I moved to Portland only 5 years ago. Logic and creativity are always in an intense arm wrestling match in my head to see which on will go over the top at the last second. I believe love superceeds all and try to act accordingly. Adventure is good for my soul.
After a few different 9 to 5 jobs I ended up with an opportunity to go back to school. I started out with early childhood development and education and while I loved the psychology part of it I wanted something that would offer the opportunity to work remotely from time to time. I moved into a graphic design degree and graduated in the top of my class.
I took an “entry level” job with a startup doing conversion optimization, persona development, and split testing. The diversity of managing the copywriting , creating the wireframes for the interns to make, and getting to gorge myself on as much data about a site as I could get my hands on was all right in my wheelhouse. After a while I wanted to move up in salary, and wanted to have a bigger challenge. My partner had a job offer in Portland and so we moved.
Getting into User Research and UX/UI with absolutely no programming seemed to be impossible so I accepted a position in a trucking company. In a very short period of time I worked my way into management about the time they bought out 4 other companies and decided to change the software we were using. It was left up to me to work with the SQL programmers to make automation happen between the CRM and the routing software. With no formal knowledge of SQL I was the primary point of contact for all troubleshooting and “is this possible “conversations. It was obvious that programming concepts came natural to me even if the syntax was unknown, and so, after some time, I decided to get into programming.
My hobbies and interests are as varied as everything else in my life. I love to travel and when I do I try to take advantage of being an advanced open water Scuba diver since the water on the Pacific coast is too cold for my tastes. I occasionally do archery which is noted by the bruises on my forearm; just because I like it doesn’t mean I am good at it yet. Theater is a passion of mine that I have not had time for in recent years. Doing improvisational comedy (“Whose Line Is it Anyway” style) was some of the happiest times in my life. Finally, I am fascinated by psychology and the way humans think and act. I am usually studying some form of psychology and I am looking to push more into ways to educate people on human sexuality and the way our psyche plays a part in that.
“Around here, however, we don't look backwards for very long. We keep moving forward, opening up new doors and doing new things, because we're curious...and curiosity keeps leading us down new paths.”
- Walt Disney
Being a curious creature I have a degreen in Graphic Design from Westwood Univerity (2011), a certification in Advanced Hypnosis and Neuro-Linguistic Programming, and soon a certification in Ruby and React. I find learning new things to be one of the real pleasures in life. If I am not challenged I am bored. Reading books on human behavior, psychology, and business tends to carry me between these bigger learning pushes I put myself through.
Some of the projects I worked on in class are:
A small site built with HTML and CSS
A page about my pets and their favorite things in HTML and CSS.
A 6 page site for a travel resort in HTML and CSS with two branches.
A very basic HTML and CSS site published on GH Pages.
Much like my learning my experience has been extremely varied. Most employers move me up and through various positions when they realize that I am an extremely fast learner, not afraid of change, a unique problem solver, and self-motivated. I have started with 6 months in the basement followed by a view from the penthouse and within a year I am some form of a strategist. I like the challenge and I love growing and seeing things improve. Efficiency is like a drug to me and I am often looking for ways to automate or shortcut unnecessary steps.
Strategically plan routes based on demand for 110 drivers. Reduced failure rate from 19% to below 1% in less than a year. Directly worked with SQL programmers to create system automation.
Conversion StrategistMorbi in sem quis dui placerat ornare. Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu. Cras consequat.
Morbi in sem quis dui placerat ornare. Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu. Cras consequat.
Job TitleMorbi in sem quis dui placerat ornare. Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu. Cras consequat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.


Bolivia's Morales says leaving for Mexico, vows to return 'with more strength and energy'
LA PAZ (Reuters) - Bolivia’s outgoing president Evo Morales announced his departure for asylum in Mexico on Twitter just after 9:30 p.m. (0130 GMT) on Monday night, vowing to return “with more strength and energy.”
“It hurts to leave the country for political reasons, but I will stay in touch,” he said. “Soon I will return with more strength and energy.”


Displays Customer's Order History (must be logged in to secure zone).
{module_order,filter,SystemID,SortType,flat}
{module_order,c,10044,Default}
- will display all orders that belong to workflow with ID of 10044, sorting them by date{module_order,a,Alphabetically,flat}
- will display all orders, alphabetically, also displaying every product within each order


--- layout: archive permalink: /portfolio/ title: "Portfolio" author_profile: true collection: portfolio entries_layout: grid ---


{% extends 'pgo/move_list.html' %} {% block title %} {{ block.super }} - Farewell {% endblock title %} {% block content %}
September 2020
As many of you already know, I completely stopped playing PGo almost two years ago. Had a little comeback when PvP was released, but that didn't last and I've since moved on to other games, projects, and activities.
Despite this I tried to keep the calculator updated for as long as possible, but recently other commercial and hobby projects have taken priority. The only time I had left to work on the breakpoint calc was time I'd rather spend with friends and family or sleeping.
I never expected the breakpoint calc would live this long and for that I must thank all of you for using it and messaging me about game updates, but this is farewell. Maybe we'll meet again in some other game and then I might even be using your calculator :)
{% endblock content %}


Do you know what your 'dieting personality' is?
Find out here to help manage your weight loss goals.
by Penny McCoyThe 5 diet types
The CSIRO Diet Types research of over 90,000 Australians reveals why our personal diet type plays an important role. There are five distinct types, and each has different challenges to overcome when it comes to the festive season.
Understanding your diet type will help you be better equipped to recognise your personal challenges and know how to stay on track during social events.
The 5 types are:
- The Thinker
- The Craver
- The Socialiser
- The Foodie
- The Freewheeler
The thinker
Who are they?
The Thinker is a great planner but tends to overthink and is anxious about failure, which often derails their diet. They may set unrealistic expectations and give themselves little margin for error.
Strengths
Thinkers put a lot of effort into achieving goals and are disciplined to reach their goals.
Weaknesses
They don’t like to make mistakes and might dwell on situations where they’ve “messed up” or haven’t followed a diet “exactly as specified”, which may lead them to procrastinate or abandon their goals if they’ve had a bad day.
Tips for the Thinker
- Use your great planning skills, and prepare or choose your meals ahead of time by selecting healthy options. If you’re going to a party, you could offer to bring a platter of fresh fruit or veggie sticks with vegetable-based dips
- Be kind to yourself and avoid the negative self-talk. Eating is for life and it’s okay to have a ‘bad day’. The trick is not giving up altogether.
The Craver
Who are they?
The Craver finds resisting temptation to be the hardest, especially chocolate and sweets. They don’t need to be hungry to eat. Their heightened experience of cravings can lead to overeating in a variety of tricky situations.
Strengths
Cravers have a willingness to be healthy and have a desire to stick to a strict diet.
Negatives
While they have a desire to be healthy, their tendency to be overly strict when dieting could make their healthy eating attempts short-lived. They easily overindulge when tempting food is about. Those party buffets and sweet festive treats can be impossible to resist.
Tips for the Craver
- When cravings hit, go for the healthier alternatives. Swap the chocolate and cake for delicious fresh fruits or a healthy delicious treat alternative.
- Treat yourself with a small indulgence as a reward for sticking to a healthy diet plan.
The Socialiser
Who are they?
The Socialiser loves eating out with family, friends or colleagues, so finds it hard to manage what they eat and drink in social situations. More than any other type, the Socialiser needs a flexible eating plan that allows them the freedom to enjoy their social life, or they just won’t stick to the diet.
Strengths
Socialisers are great at motivating and involving others, so can solve the dilemma by encouraging others to have a healthy meal with them. This way they can enjoy their social life and stick to the diet.
Negatives
While friends bring joy to their life, they can also be a bad influence for the Socialiser, weakening their self-control and leading to consuming extra foods and alcohol.
Tips for the Socialiser
- They can still have fun with friends without overindulging. Swap a glass of alcohol for sparkling water and lime, drink water between drinks and refuse refills.
- When eating out, go for one to two courses instead of three, and order healthy alternatives that are high in protein and low GI to keep you fuller for longer. It’s also generally safer to choose your own meal that you are confident fits in with your diet rather than sharing plates.
The Foodie
Who are they?
The Foodie loves all types of food and the whole food experience. They enjoy making, eating and buying it. This passion of trying and exploring new foods can cause them to overeat or consume too many kilojoules.
Strengths
Because the Foodie typically loves to try new things, they have a better variety of foods in their diet.
Weaknesses
Their love of trying and exploring new foods can cause them to overeat or consume too many kilojoules. Eating large portion sizes or having three or more courses at a meal could be a problem, as well as the alcohol that accompanies a meal. Diets that are boring and repetitive can be a turn-off.
Tips for the Foodie
- Portion control is important. You can still have the delicious foods you love but in smaller portion sizes.
- The Foodie typically enjoys eating out or trying new restaurants, so allow a small indulgence a day or ‘bank’ your indulgences to go towards restaurant meals or your favourite dessert.
The Freewheeler
Who are they?
The Freewheeler rarely plans and tends to make food choices in the here-and-now, which can be a problem when they are around delicious food and drinks. When trying to lose weight, it’s common for the Freewheeler to get bored quickly or find it hard to stay focused on long term goals.
Strengths
Freewheelers tend to be spontaneous, which means they can easily be distracted from eating. They are also less likely to get hung up on the past, moving onto the next meal without worrying too much about any mistakes.
Weaknesses
Their freewheeling nature might lead to situations where it’s hard to say no, or where there are just too many temptations to stay true to a diet.
Tips for the Freewheeler
- Following a 7-day menu plan may be too onerous for the Freewheeler; instead, try planning 1-2 days ahead.
- Try eating a healthy meal before going to a party or event so you don’t feel overly hungry and can avoid eating high kilojoule party foods. Preparing some ready freeze portion-controlled meals at home is a great way to plan for these situations.
Takeaway message
No matter what your diet type, it’s important to remember:
- Don’t give up on your weight loss goals if you haven’t made the best choices.
- Enjoy your festive events and remember it’s just one day.
Pennie McCoy, is an Accredited Practising Dietitian at the CSIRO Total Wellbeing Diet. For more information on the 5 diet types, head here.


QA Engineer - 17hats | Sofia, Bulgaria
Let's say you're a freelance photographer/yoga teacher/designer/etc. How do you keep your business running in an organized way? That's what we do.
Responsibilities:
* Automated Testing: Write code to automate our test suite. - Capybara would be nice (we're a Ruby shop). Selenium/Cucumber is also fine.
* Manual Testing: Find bugs, sometimes help kill them with fire, and then drink beers with your team about how bug-free 17hats is.
* Lead by example
Requirements: - Solid written and spoken English, mostly the curse words
- You want to work in a startup (a.k.a. a place that works hard and plays hard)
- Experience with automated test tools (Selenium/Capybara)
- Knowledge of web technologies like HTML, CSS, Javascript and HTTP
- You can query things and update them if necessary (MySQL/Postgres)
- Knowledge of cross-browser compatibility issues
- Ability to create clear and concise bug reports with actionable steps to reproduce
Perks: - We'll pay you more than what you're making now. Sometimes a lot more.
- Work from home occasionally
- Unlimited holiday
- Lunch stipend/ Free beer fridays
- Equity in 17hats
- Occasional travel to America
email<EMAIL_ADDRESS>https://www.17hats.com/version2/public/jobs/index.html


Anna and the King (1999) Reviewed by Eugene Novikov http://www.ultimate-movie.com/ Member: Online Film Critics Society
Starring Jodie Foster, Chow Yun-Fat. Directed by Andy Tennant. Rated PG- 13.
Anna and the King is at least the fourth film adaptation of Margaret Landon's fact based novel The King and I, and it's big, expensive and soulless. Though good-looking, its lavish sets, fancy costumes and luscious cinematography can do little to compensate for the emotional wasteland that is Peter Krikes and Steve Meerson's script. So much money was spent on pretty pictures that they forgot to actually make the movie interesting.
This is Jodie Foster's first movie since the jaw-droppingly brilliant Contact came out more than two years ago and it isn't the best choice to show off her acting chops. She's trapped in the stoic role of Anna Leonowens, the uptight, widowed British schoolteacher who comes to Siam (now Thailand) with her son to instruct the king's (Chow Yun-Fat) son in the ways of the West (because "the ways of England are the ways of the world). The king likes her so much he puts her in charge of educating the whole royal family (58 kids with 10 more in the way; impressive, no?). The eldest prince is none too happy about this ("Father, have I offended you in some way? Why do you punish me with imperialist schoolteacher?), but soon gets to know Anna and her stern- mother-who-loves-you personality better and comes to like her.
Meanwhile, Siam comes under attack from the neighboring British colony of Burma. The king and his close advisors suspect that this is Britain's doing which arouses suspicion in Siam, putting Anna in an uncomfortable position. She is not sure what to make of this and seems to herself suspect British involvement in the crisis but works to diffuse the king's prejudices. He, though self-righteous as ever, can't help but be influenced by the eloquent Anna and they slowly, quietly, develop affections for each other.
There is a scene in the middle of Anna and the King where one of the king's younger daughters dies. It's your classic deathbed scene, with the girl's mournful eyes staring at her father, who tries only semi- successfully to maintain his composure. Anna then comes in and cries a bit. The sequence was there for a purpose: to evoke a strong emotional response from the viewer. I'm usually a sucker for such scenes and yet this time, I was just sitting there, my emotions untouched. This remains true through all of the movie which remains emotionally barren. We never develop connections to the characters; never given a reason to care.
This ludicrously long epic was directed by Andy Tennant, whose last film was Ever After, one of my favorites of 1998. I do not doubt Tennant's ability to put together a decent movie, but Anna and the King, aside from being psychologically inept is also technologically deficient. The sets and scenery are gorgeous, but the camerawork does nothing to convey its grandeur. Even Terrence Malick managed to do more with flora and fauna in his otherwise abysmal The Thin Red Line than Tennant can muster from $75 million worth of props and a shoot in Malaysia. We feel like the camera is restricted to its immediate point of view; there are no wide tracking shots or sweeping zooms to fill us with larger-than-life awe.
I liked both Foster and Yun-Fat, who give entertaining if not terribly involving performances in the two lead roles. Foster's generally stoic persona serves her well here, as she is playing a reserved, formal and rather underdeveloped character. Yun-Fat is especially effective, perfectly conveying the King of Siam's sangfroid permeated with violent outbursts.
What does Anna and the King in is its inability to involve the viewer in its characters and situations. The cast is great, the director is talented, and the budget is lavish, but this ill-advised remake of the classic Rogers and Hammerstein movie is unable to utilize any of those things to form a compelling whole. This is an emotionless costume epic.
Grade: C-
©1999 Eugene Novikov
Sent via Deja.com http://www.deja.com/ Before you buy.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


| Mixin | Description |
|---|---|
mdc-elevation($z-value, $color, $opacity-boost) |
Sets the elevation to the z-space for that given elevation, and optionally sets the color and/or boosts the opacity of the shadow |
overlay-common |
Called once per application to setup the universal elevation overlay styles |
shadow($box-shadow) |
Sets the box-shadow of the closest parent selector |
overlay-surface-position |
Sets the positioning of the overlay's surface element so that the overlay can be appropriately centered |
overlay-dimensions($width, $height: $width, $has-content-sizing: true)
|
Sets the dimensions of the elevation overlay |
overlay-fill-color($color) |
Sets the color of the elevation overlay |
overlay-opacity($opacity) |
Sets the opacity of the elevation overlay |
| Function | Description |
|---|---|
transition-value($duration, $easing) |
Returns a value for the transition property to
transition an element between elevations |
overlay-transition-value($duration, $easing)
|
Returns a value for the transition property to
transition the elevation overlay between elevations |
| Variable | Description |
|---|---|
$property |
Default property for elevation transitions |
$transition-duration |
Default duration value for elevation transitions |
$transition-timing-function |
Default easing value for elevation transitions |
$overlay-color |
Default color for the elevation overlay |
$overlay-property |
Default property for the elevation overlay transitions |


James Corden looks amazing as he shows off his one stone weight loss while filming
The funnyman slimmed down to a trim 16st 7lbs from more than 17st earlier this year as he showed off his handsome looks
by Lily Waddell, https://www.mirror.co.uk/authors/lily-waddell/James Corden looks incredible as he showed off his slimmed-down figure.
The TV host, 41, looked his best when he filmed new scenes for a laugh-out-loud parody of Frozen 2 for The Late Late Show in recent weeks.
Gavin & Stacey's James divulged he had lost more than one stone since the start of this year.
And the results were amazing as he looked handsome while dressed as the Disney character Elsa for the epic TV scenes set to air.
It comes after James previously touched on his weight struggles while he shared his determination to get into shape.
In June, the funnyman slimmed down to a trim 16st 7lbs from more than 17st earlier this year.
He told The Daily Star : “I think the lightest I have been is 212 pounds (just over 15st), something like that. Right now I’m like 234lb (16st 7lb).
“I am not tall enough to be 234lb. And then my biggest I think I was like 280 and I have been also, even this year, I’ve been 250 (more than 17st)."
James admitted bread was his downfall when it come to his weight struggles because he complained it is "everywhere".
He added: "Bread is the absolute destroyer of me and it’s everywhere. You can’t move for it. It’s everywhere. I’d do anything to [stop].”
More recently in September, James hit out at Bill Maher for wanting to bring back "fat-shaming" as he said the TV host was encouraging bullying.
Maher, 63, caused a stir with his controversial view fat-shaming needed to make a "comeback" which riled up the comedian.
He said: "Fat-shaming doesn't need to end, it needs to make a comeback."
James had a witty response for Maher as he reminded him fat-shaming hadn't gone away.
He explained: "We're not all as lucky as Bill Maher, we don't all have a sense of superiority that burns 35,000 calories a day.
"It's proven that fat-shaming only does one thing - it makes people feel ashamed. And shame leads to depression, anxiety and self-destructive behaviour. Self-destructive behaviour like over-eating.
"Fat-shaming is just bullying and bullying only makes the problem worse."


This article was written by referring to the Fall 2020 Numerical Analysis: Linear Algebra Course and the following links.
Gram–Schmidt Process
Given a set of linearly independent vectors $Span({ a_0, … , a_{n-1} } ) \subset \mathbb{C}^m$, the Gram-Schimdt process computes a new basis {$q_0, … , q_{n-1}$} that spans the same subspace as the original vectors, i.e. $Span({ a_0, … , a_{n-1} } ) = Span({ q_0, … , q_{n-1} } )$ [1].
It should be noted that we would like to have the new basis, ${ q_0, … , q_{n-1} }$, having the following characteristics.
- All vectors are unit vectors of length 1, i.e. $|q_i| = 1$.
- All vectors are mutually perpendicular, i.e. $q_i \perp q_j$ where $i \neq j$.
These characteristics can be obtained through the following routine which is composed by three steps [1]:
<Gram-Schmidt Process> Step 1. Compute the direction of the vectors. Step 2. Compute the magnitude of the normalizer. Step 3. Compute a unit vector.
- Compute the vector $q_0$ ($i=0$)
- Step 1. Compute the direction of the vectors.
- Stpe 2. Compute the magnitude of the normalizer.
- Step 3. Compute a unit vector.
- Result
- Compute the vector $q_1$ ($i=1$)
- Step 1. Compute the direction of the vectors.
- Step 2. Compute the magnitude of the normalizer.
- Step 3. Compute a unit vector.
- Result
- Compute the vector $q_2$ ($i=2$)
- Step 1. Compute the direction of the vectors.
- Step 2. Compute the magnitude of the normalizer.
- Step 3. Compute a unit vector.
- Result
- keep do the routine till $i=n-1$
- Step 1. Compute the direction of the vectors.
- Step 2. Compute the magnitude of the normalizer.
- Step 3. Compute a unit vector.
- Final Result
What we should pay attention to in the final result ($A = QR$) are …
- All column vectors of $Q$, the new basis {$q_0, … , q_{n-1}$}, are unit vector and mutually orthogonal, which means $Q$ is an unitary matrix.
- The matrix $R$ is upper triangular matrix and $rank(R)=m$.
- The dot product of $Q$ and $R$, which is equal to $A$, can be regarded as a linear combination of $Q$’s column vectors.
- The result of Gram-Shmidt Process can be regarded as a result of QR factorization (decomposotion).
Classical Gram-Schmidt (CGS)
The content discussed in the previous section can be summarized into an algorithm as follows, which is the CGS-QR algorithm [2].
Consider $A=QR$.
Partition the given matrices as follows.
\[\left[\begin{array}{c|cc}A_{0} & a_{1} & A_{2}\end{array} \right]= \left[\begin{array}{c|cc}Q_{0} & q_{1} & Q_{2}\end{array} \right] \left[\begin{array}{c|cc} R_{0, 0} & r_{0, 1} & R_{0, 2} \\ \hline 0 & \rho_{1, 1} & r_{1, 2}^T\\ 0 & 0 & R_{2, 2} \end{array} \right]\]Assume that $Q_0$ and $R_{0,0}$ have already been computed.
Since $Q$ is unitary matric ($Q_0^HQ_0=I$ and $Q_0^Hq_1=0$),
- $Q_0^Ha_1=Q_0^HQ_0r_{0,1}+q_1\rho_{1,1}=r_{01}$
Compute $r_{0,1}$, which is already known.
- $r_{0,1}:=Q_0^Ha_1$
Compute $a_1^\perp$ and $\rho_{1,1}$ (Step 1. & 2.).
- $a_1^\perp:=a_1-Q_0r_{0,1}$
- $\rho_{1,1}:=|a_1^\perp|$
Compute $q_1$ (Step 3.).
- $q_1 := a_1^\perp / \rho_{1,1}$
Figure 1. shows Classical Gram-Schmidt algorithm for computing the QR factorization of a matrix A. The algorithm used FLAME notation.
Code 1. shows the algorithms in python language.
Code. 1: CGS QR in python
Modified Gram-Schmidt (MGS)
Gram-Schmidt process can be performed differently from CGS, and the corresponding algorithm is as follows, which is called Modified Gram-Schmidt (MGS) [3].
Consider $A=QR$.
Partition the given matrices as follows.
\[\left[\begin{array}{c|cc}A_{0} & a_{1} & A_{2}\end{array} \right]= \left[\begin{array}{c|cc}Q_{0} & q_{1} & Q_{2}\end{array} \right] \left[\begin{array}{c|cc} R_{0, 0} & r_{0, 1} & R_{0, 2} \\ \hline 0 & \rho_{1, 1} & r_{1, 2}^T\\ 0 & 0 & R_{2, 2} \end{array} \right]\]Assume that $a_1$ and $A_2$ are known.
Compute $\rho_{1,1}$ (compute the magnitude ↔ Step 2.).
- $\rho_{1,1}:=|a_1|$
Compute $q_1$ (compute the unit vector ↔ Step 3.).
- $q_1:=a_1/\rho_{1,1}$
Compute $r_{0,1}^T$, which is already known.
- $r_{0,1}^T:=q_1^H(A_2 - Q_2R_{22}) = q_1^HA_2$
Compute $A_2$ (update $A_2$ for the orthogonality ↔ Step 1.).
- $A_2:=A_2-q_1r_{0,1}^T$
Figure 2. shows Modified Gram-Schmidt algorithm for computing the QR factorization of a matrix A. The algorithm used FLAME notation.
Code 2. shows the algorithms in python language.
Code. 2: MGS QR in python
Why do we need this?
Through Gram-Schmidt process, we can obtain an orthonormal basis of the matrix $A$’s subspace, which has a set of lineary independent vectors {$a_0, …, a_{n-1}$}.
The advantages of being able to have an orthonormal basis are following [4].
- We can express any $v \in \mathbb{C}^n$ as a linear combination of coefficients, which will allows us to have an explicit formula expressing $v$ with the orthonormal basis.
- The explicit formula is very useful when dealing with projection onto subspace.
References
[1] M. M. Robert van de Geijn, “Advanced Linear Algebra: Foundations to Frontiers,” ALAFF Classical Gram-Schmidt (CGS). [Online]. Available: https://www.cs.utexas.edu/users/flame/laff/alaff/chapter03-classical-gram-schmidt.html. [Accessed: 03-Jan-2021].
[2] M. M. Robert van de Geijn, “Advanced Linear Algebra: Foundations to Frontiers,” ALAFF Classical Gram-Schmidt algorithm. [Online]. Available: https://www.cs.utexas.edu/users/flame/laff/alaff/chapter03-cgs-algorithm.html. [Accessed: 03-Jan-2021].
[3] M. M. Robert van de Geijn, “Advanced Linear Algebra: Foundations to Frontiers,” ALAFF Modified Gram-Schmidt (MGS). [Online]. Available: https://www.cs.utexas.edu/users/flame/laff/alaff/Modified-Classical-Gram-Schmidt.html. [Accessed: 03-Jan-2021].
[4] Michael Albanese, “Why is orthogonal basis important?,” Mathematics Stack Exchange. [Online]. Available: https://math.stackexchange.com/questions/518600/why-is-orthogonal-basis-important. [Accessed: 03-Jan-2021].


--- layout: post status: publish published: true title: Apple, Going On! author: Leask author_login: leask author_email<EMAIL_ADDRESS>author_url: https://leaskh.com wordpress_id: 329 wordpress_url: http://leaskh.wordpress.com/2007/09/05/apple-going-on date: '2007-09-05 22:07:50 +0800' date_gmt: '2007-09-05 22:07:50 +0800' categories: - iPod + iTunes tags: [] comments: [] ---


Python Imports in Templates¶
It’s easy to import Python and PyPI (pip) modules in your Mako templates.
- Use a template-level block:
<% from datetime import datetime %>
- or a module-level block:
<%! from decimal import Decimal %>
The Gory Details¶
When Mako compiles templates, it actually writes a Python code file: all of your HTML code goes into a function named def render_body()
. It’s actually this function that gets run each time the template is “rendered”. This template:
- app/templates/template.html
<%! from decimal import Decimal %> <% from datetime import datetime %>
My Page
 The even numbers: %for i in range(10): %if i % 2 == 0:
${ i }: Mako is the bomb, amirite?!?
 %endif %endfor
Turns into the following function. Note where the two import statements are placed. That’s the full power of the exclamation point!
- app/templates/__dmpcache__/template.html.py:
from decimal import Decimal def render_body(context,**pageargs): __M_caller = context.caller_stack._push_frame() try: __M_locals = __M_dict_builtin(pageargs=pageargs) self = context.get('self', UNDEFINED) range = context.get('range', UNDEFINED) __M_writer = context.writer() __M_writer('\n') from datetime import datetime __M_locals_builtin_stored = __M_locals_builtin() __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin_stored[__M_key]) for __M_key in ['datetime'] if __M_key in __M_locals_builtin_stored])) __M_writer('\n
My Page
\nThe even numbers:\n') for i in range(10): if i % 2 == 0: __M_writer('
') __M_writer(django_mako_plus.ExpressionPostProcessor(self)( i )) __M_writer(': Mako is the bomb, amirite?!?
\n') return '' finally: context.caller_stack._pop_frame()
Template-level blocks are placed within the body of the render_body
method, while module-level blocks are placed at the top of the file. In effect, it’s the same as writing an import statement within a function vs. an import statement at the top of a module.
Although it probably doesn’t matter too much, the module-level block <%! import ... %>
is usually best for import statements.
Global Template Imports¶
There may be some modules, such as re
or decimal
that are so useful you want them available in every template of your site. In settings.py, add these to the DEFAULT_TEMPLATE_IMPORTS
variable:
TEMPLATES = [
{
'NAME': 'django_mako_plus',
'BACKEND': 'django_mako_plus.MakoTemplates',
'OPTIONS': {
DEFAULT_TEMPLATE_IMPORTS = [
'import os, os.path, re',
'from decimal import Decimal',
],
...
}
}
]
Any entries in this list will be automatically included in templates throughout all apps of your site. With the above imports, you’ll be able to use re
and Decimal
and os
and os.path
anywhere in any .html, .cssm, and .jsm file.
Whenever you modify DMP settings, and especially in this case, be sure to clean out your cached templates. Mako needs to regenerate all of your templates with the new import statements at the top. See the next section on cleaning up for the command.
Cleaning Up¶
DMP caches its compiled mako+templates in subdirectories of each app. The default locations for each app are app/templates/__dmpcache__
, app/scripts/__dmpcache__
, and app/styles/__dmpcache__
, although the exact name depends on your settings.py. Normally, these cache directories are hidden and warrant your utmost apathy. However, there are times when DMP fails to update a cached template as it should. Or you might just need a pristine project without these generated files. This can be done with a Unix find command or through DMP’s dmp_cleanup
management command:
# see what would be be done without actually deleting any cache folders
python3 manage.py dmp_cleanup --trial-run
# really delete the folders
python3 manage.py dmp_cleanup
With this management command, add --verbose
to the command to include messages about skipped files, and add --quiet
to silence all messages (except errors).


(a) This part prescribes policies and procedures for providing Government property to contractors; contractors’ management and use of Government property; and reporting, redistributing, and disposing of contractor inventory.
(b) It does not apply to—
(1) Government property provided under any statutory leasing authority, except as to non-Government use of property under 45.301(f);
(2) Property to which the Government has acquired a lien or title solely because of partial, advance, progress, or performance based payments;
(3) Disposal of real property;
(4) Software and intellectual property; or
(5) Government property that is incidental to the place of performance, when the contract requires contractor personnel to be located on a Government site or installation, and when the property used by the contractor within the location remains accountable to the Government. Items considered to be incidental to the place of performance include, for example, office space, desks, chairs, telephones, computers, and fax machines.
As used in this part—
“Cannibalize” means to remove parts from Government property for use or for installation on other Government property.
“Contractor-acquired property” means property acquired, fabricated, or otherwise provided by the contractor for performing a contract and to which the Government has title.
“Contractor inventory” means—
(1) Any property acquired by and in the possession of a contractor or subcontractor under a contract for which title is vested in the Government and which exceeds the amounts needed to complete full performance under the entire contract;
(2) Any property that the Government is obligated or has the option to take over under any type of contract, e.g., as a result either of any changes in the specifications or plans thereunder or of the termination of the contract (or subcontract thereunder), before completion of the work, for the convenience or at the option of the Government; and
(3) Government-furnished property that exceeds the amounts needed to complete full performance under the entire contract.
Contractor’s managerial personnel means the contractor’s directors, officers, managers, superintendents, or equivalent representatives who have supervision or direction of—
(1) All or substantially all of the contractor’s business;
(2) All or substantially all of the contractor’s operation at any one plant or separate location; or
(3) A separate and complete major industrial operation.
“Demilitarization” means rendering a product unusable for, and not restorable to, the purpose for which it was designed or is customarily used.
“Discrepancies incident to shipment” means any differences (e.g., count or condition) between the items documented to have been shipped and items actually received.
“Equipment” means a tangible item that is functionally complete for its intended purpose, durable, nonexpendable, and needed for the performance of a contract. Equipment is not intended for sale, and does not ordinarily lose its identity or become a component part of another article when put into use. Equipment does not include material, real property, special test equipment or special tooling.
“Government-furnished property” means property in the possession of, or directly acquired by, the Government and subsequently furnished to the contractor for performance of a contract. Government-furnished property includes, but is not limited to, spares and property furnished for repair, maintenance, overhaul, or modification. Government-furnished property also includes contractor-acquired property if the contractor-acquired property is a deliverable under a cost contract when accepted by the Government for continued use under the contract.
“Government property” means all property owned or leased by the Government. Government property includes both Government-furnished property and contractor-acquired property. Government property includes material, equipment, special tooling, special test equipment, and real property. Government property does not include intellectual property and software.
“Loss of Government property” means unintended, unforeseen or accidental loss, damage, or destruction of Government property that reduces the Government’s expected economic benefits of the property. Loss of Government property does not include occurrences such as purposeful destructive testing, obsolescence, normal wear and tear, or manufacturing defects. Loss of Government property includes, but is not limited to—
(1) Items that cannot be found after a reasonable search;
(2) Theft;
(3) Damage resulting in unexpected harm to property requiring repair to restore the item to usable condition; or
(4) Destruction resulting from incidents that render the item useless for its intended purpose or beyond economical repair.
“Material” means property that may be consumed or expended during the performance of a contract, component parts of a higher assembly, or items that lose their individual identity through incorporation into an end-item. Material does not include equipment, special tooling, special test equipment or real property.
“Nonseverable” means property that cannot be removed after construction or installation without substantial loss of value or damage to the installed property or to the premises where installed.
“Precious metals” means silver, gold, platinum, palladium, iridium, osmium, rhodium, and ruthenium.
“Production scrap” means unusable material resulting from production, engineering, operations and maintenance, repair, and research and development contract activities. Production scrap may have value when re-melted or reprocessed, e.g., textile and metal clippings, borings, and faulty castings and forgings.
“Property” means all tangible property, both real and personal.
“Property Administrator” means an authorized representative of the contracting officer appointed in accordance with agency procedures, responsible for administering the contract requirements and obligations relating to Government property in the possession of a contractor.
“Property records” means the records created and maintained by the contractor in support of its stewardship responsibilities for the management of Government property.
“Provide” means to furnish, as in Government-furnished property, or to acquire, as in contractor-acquired property.
“Real property” See Federal Management Regulation 102-71.20 (41 CFR 102-71.20).
“Sensitive property” means property potentially dangerous to the public safety or security if stolen, lost, or misplaced, or that shall be subject to exceptional physical security, protection, control, and accountability. Examples include weapons, ammunition, explosives, controlled substances, radioactive materials, hazardous materials or wastes, or precious metals.
“Unit acquisition cost” means—
(1) For Government-furnished property, the dollar value assigned by the Government and identified in the contract; and
(2) For contractor-acquired property, the cost derived from the contractor’s records that reflect consistently applied generally accepted accounting principles.
(a) Contractors are ordinarily required to furnish all property necessary to perform Government contracts.
(b) Contracting officers shall provide property to contractors only when it is clearly demonstrated—
(1) To be in the Government’s best interest;
(2) That the overall benefit to the acquisition significantly outweighs the increased cost of administration, including ultimate property disposal;
(3) That providing the property does not substantially increase the Government’s assumption of risk; and
(4) That Government requirements cannot otherwise be met.
(c) The contractor’s inability or unwillingness to supply its own resources is not sufficient reason for the furnishing or acquisition of property.
(d) “Exception”. Property provided under contracts for repair, maintenance, overhaul, or modification is not subject to the requirements of paragraph (b) of this section.
(e) Government property, other than foundations and similar improvements necessary for installing special tooling, special test equipment, or equipment, shall not be installed or constructed on contractor-owned real property in such fashion as to become nonseverable, unless the head of the contracting activity determines that such installation or construction is necessary and in the Government’s interest.
(a) Agencies shall—
(1) Allow and encourage contractors to use voluntary consensus standards (see FAR 11.101(b)) and industry-leading practices and standards to manage Government property in their possession;
(2) Eliminate to the maximum practical extent any competitive advantage a prospective contractor may have by using Government property;
(3) Ensure maximum practical reutilization of contractor inventory for government purposes;
(4) Require contractors to use Government property already in their possession to the maximum extent practical in performing Government contracts;
(5) Charge appropriate rentals when the property is authorized for use on other than a rent-free basis; and
(6) Require contractors to justify retaining Government property not needed for contract performance and to declare property as excess when no longer needed for contract performance.
(b) Agencies will not generally require contractors to establish property management systems that are separate from a contractor’s established procedures, practices, and systems used to account for and manage contractor-owned property.
(a) Generally, contractors are not held liable for loss of Government property under the following types of contracts:
(1) Cost-reimbursement contracts.
(2) Time-and-material contracts.
(3) Labor-hour contracts.
(4) Fixed-price contracts awarded on the basis of submission of certified cost or pricing data.
(b) The contracting officer may revoke the Government’s assumption of risk when the property administrator determines that the contractor’s property management practices are noncompliant with contract requirements.
(c) A prime contractor that provides Government property to a subcontractor shall not be relieved of any responsibility to the Government that the prime contractor may have under the terms of the prime contract.
(d) With respect to loss of Government property, the contracting officer, in consultation with the property administrator, shall determine—
(1) The extent, if any, of contractor liability based upon the amount of damages corresponding to the associated property loss; and
(2) The appropriate form and method of Government recovery (may include repair, replacement, or other restitution).
(e) Any monies received as financial restitution shall be credited to the Treasury of the United States as miscellaneous receipts, unless otherwise authorized by statute (31 U.S.C. 3302(b)).
(a) The agency responsible for contract administration shall conduct an analysis of the contractor’s property management policies, procedures, practices, and systems. This analysis shall be accomplished as frequently as conditions warrant, in accordance with agency procedures.
(b) The property administrator shall notify the contractor in writing when the contractor's property management system does not comply with contractual requirements, shall request prompt correction of deficiencies, and shall request from the contractor a corrective action plan, including a schedule for correction of the deficiencies. If the contractor does not correct the deficiencies in accordance with the schedule, the contracting officer shall notify the contractor, in writing, that failure to take the required corrective action(s) may result in—
(1) Revocation of the Government’s assumption of risk for loss of Government property; and/or
(2) The exercise of other rights or remedies available to the contracting officer.
(c) If the contractor fails to take the required corrective action(s) in response to the notification provided by the contracting officer in accordance with paragraph (b) of this section, the contracting officer shall notify the contractor in writing of any Government decision to apply the remedies described in paragraphs (b)(1) and (b)(2) of this section.
(d) When the property administrator determines that a reported case of loss of Government property is a risk assumed by the Government, the property administrator shall notify the contractor in writing that it is granted relief of stewardship responsibility and liability in accordance with 52.245-1(f)(1)(vii). Where the property administrator determines that the risk of loss of Government property is not assumed by the Government, the property administrator shall request that the contracting officer hold the contractor responsible and liable.
Government property shall be transferred from one contract to another only when firm requirements exist under the gaining contract (see 45.102). Such transfers shall be documented by modifications to both gaining and losing contracts. Once transferred, all property shall be considered Government-furnished property to the gaining contract. The warranties of suitability of use and timely delivery of Government-furnished property do not apply to property acquired or fabricated by the contractor as contractor-acquired property that is subsequently transferred to another contract with the same contractor.
(a)(1) Except as provided in paragraph (d) of this section, the contracting officer shall insert the clause at 52.245-1, Government Property, in—
(i) All cost-reimbursement and time-and-material type solicitations and contracts, and labor-hour solicitations when property is expected to be furnished for the labor-hour contracts.
(ii) Fixed-price solicitations and contracts when the Government will provide Government property.
(iii) Contracts or modifications awarded under FAR Part 12 procedures where Government property that exceeds the simplified acquisition threshold, as defined in FAR 2.101, is furnished or where the contractor is directed to acquire property for use under the contract that is titled in the Government.
(2) The contracting officer shall use the clause with its Alternate I in contracts other than those identified in FAR 45.104(a), Responsibility and Liability for Government Property.
(3) The contracting officer shall use the clause with its Alternate II when a contract for the conduct of basic or applied research at nonprofit institutions of higher education or at nonprofit organizations whose primary purpose is the conduct of scientific research (see 35.014) is contemplated.
(b) The contracting officer shall also insert the clause at 52.245-2, Government Property (Installation Operation Services), in fixed-price service contracts to be performed on a Government installation when Government-furnished property will be provided for initial provisioning only and the Government is not responsible for repair or replacement.
(c) The contracting officer shall insert the clause at 52.245-9, Use and Charges, in solicitations and contracts when the clause at 52.245-1 is included.
(d) Purchase orders for property repair need not include a Government property clause when the unit acquisition cost of Government property to be repaired does not exceed the simplified acquisition threshold, unless other Government property (not for repair) is provided.


A power calculator for Genome-wide association studies (GWAs) with combined gold (error-free) and silver (erroneous) phenotyping per McDavid A, Crane PK, Newton KM, Crosslin DR, et al. (2011)
| Version: | 1.0 |
| Published: | 2012-10-29 |
| Author: | Andrew McDavid |
| Maintainer: | Andrew McDavid <amcdavid at fhcrc.org> |
| License: | GPL-2 |
| NeedsCompilation: | no |
| CRAN checks: | bimetallic results |
| Reference manual: | bimetallic.pdf |
| Package source: | bimetallic_1.0.tar.gz |
| Windows binaries: | r-devel: bimetallic_1.0.zip, r-release: bimetallic_1.0.zip, r-oldrel: bimetallic_1.0.zip |
| OS X binaries: | r-release: bimetallic_1.0.tgz, r-oldrel: bimetallic_1.0.tgz |
Please use the canonical form https://CRAN.R-project.org/package=bimetallic to link to this page.


Charan Kumar was born in 1976 in Bangalore. After completing his E&C Diploma at Nettur Technical Training Foundation Bangalore he joined the company in 1997 and has been the Managing Director of Concord since 2008. With over 2 decades of dedicated experience in the industry, he has been instrumental in accomplishing several projects in the Automotive R&D, DRDO and Scientific research centres in India


A scroll support class. Currently this class will automatically scroll
a scrollable container node and scroll it by a fixed amount at a timed
interval when the mouse is moved above or below the container or in vertical
margin areas. Intended for use in drag and drop. This could potentially be
made more general and could support horizontal scrolling.


--- title: {{ page._name }} --- {%- include header.html -%} {%- include nav.html -%} {%- include side_nav.html -%} {%- include breadcrumb.html -%}
{%- if page.description -%}
{{ page.description }}
{%- endif -%}
{%- if page.long_description -%}
{{ page.long_description }}
{%- endif -%}
Disclaimer: We present this mapping to stimulate thinking about active defense options to combat this adversary, not to present all possibilities. We invite you to use this as a guide and add your own use cases for applying Shield techniques to counter each adversary action.
Note: All ATT&CK Group sub-technique mappings have been remapped to their parent technique and were derived from Group Technique mappings in ATT&CK v8.
| ATT&CK Technique | Opportunity Space | AD Technique | Use Case | {%- for groups in site.data.attack_groups -%} {%- if groups.id == page._id -%} {%- assign group = groups -%} {%- break -%} {%- endif -%} {%- endfor -%} {%- assign has_rows = 0 -%} {%- for row in site.data.attack_mapping -%} {%- for tech in group.techniques -%} {%- if row.attack_technique.name == tech.technique_name -%} {%- assign has_rows = 1 -%}
|---|---|---|---|
| {{ row.attack_technique.id }} - {{ row.attack_technique.name }} | {{ row.opportunity.description }} | {{row.technique.id}} - {{ row.technique.name }} | {{ row.use_case.description }} |
Stay tuned for more mappings with this adversary. As Techniques are added to the MITRE ATT&CK group page for this adversary we will look to add content here as well.
{%- endif -%} {%- include footer.html -%}


{% for cssFile in page.cssFiles %} {% endfor %}
Open-source projects from Stuyvesant High School's alumni community.
© Stuyvesant High School under MIT License. See the GitHub.


Coconut-enabled Improvements: Automatic Tail Call Optimization
Here's where we left off:
def factorial(n):
"""Compute n! where n is an integer >= 0."""
case n:
match 0:
return 1
match _ is int if n > 0:
return n * factorial(n-1)
else:
raise TypeError("the argument to factorial must be an integer >= 0")
# Test cases:
-1 |> factorial |> print # TypeError
0.5 |> factorial |> print # TypeError
0 |> factorial |> print # 1
3 |> factorial |> print # 6
Coconut can perform automatic tail call optimization, which means that whenever a function directly returns a call to another function, Coconut will optimize away the additional call. Thus, we can improve our factorial function by rewriting it to use a tail call.
In the function definition, factorial will now have two arguments: n and acc=1. Change the definition of factorial to include both.
If n matches the 0 pattern, we should return acc. When n=0, acc is the desired result of n factorial. That’s why we initialized it to equal 1. Make the function return acc instead of 1 if n matches 0.
If n matches the wildcard pattern, we should return n times the call to factorial again, but with the appropriate number of arguments. The first argument should stay the same: n-1. Make the second argument acc*n. The expression acc*n calculates n factorial.
The benefit of this is that the function will never raise a RuntimeError because it will never reach Python’s maximum recursion depth.
Run the code to make sure the test cases pass!