Welcome to the third project of the Machine Learning Engineer Nanodegree! In this notebook, some template code has already been provided for you, and it will be your job to implement the additional functionality necessary to successfully complete this project. Sections that begin with 'Implementation' in the header indicate that the following block of code will require additional functionality which you must provide. Instructions will be provided for each section and the specifics of the implementation are marked in the code block with a 'TODO'
statement. Please be sure to read the instructions carefully!
In addition to implementing code, there will be questions that you must answer which relate to the project and your implementation. Each section where you will answer a question is preceded by a 'Question X' header. Carefully read each question and provide thorough answers in the following text boxes that begin with 'Answer:'. Your project submission will be evaluated based on your answers to each of the questions and the implementation you provide.
Note: Code and Markdown cells can be executed using the Shift + Enter keyboard shortcut. In addition, Markdown cells can be edited by typically double-clicking the cell to enter edit mode.
In this project, you will analyze a dataset containing data on various customers' annual spending amounts (reported in monetary units) of diverse product categories for internal structure. One goal of this project is to best describe the variation in the different types of customers that a wholesale distributor interacts with. Doing so would equip the distributor with insight into how to best structure their delivery service to meet the needs of each customer.
The dataset for this project can be found on the UCI Machine Learning Repository. For the purposes of this project, the features 'Channel'
and 'Region'
will be excluded in the analysis — with focus instead on the six product categories recorded for customers.
Run the code block below to load the wholesale customers dataset, along with a few of the necessary Python libraries required for this project. You will know the dataset loaded successfully if the size of the dataset is reported.
# Import libraries necessary for this project
import numpy as np
import pandas as pd
from IPython.display import display # Allows the use of display() for DataFrames
# Import supplementary visualizations code visuals.py
import visuals as vs
# Pretty display for notebooks
%matplotlib inline
# Load the wholesale customers dataset
try:
data = pd.read_csv("customers.csv")
data.drop(['Region', 'Channel'], axis = 1, inplace = True)
print "Wholesale customers dataset has {} samples with {} features each.".format(*data.shape)
except:
print "Dataset could not be loaded. Is the dataset missing?"
In this section, you will begin exploring the data through visualizations and code to understand how each feature is related to the others. You will observe a statistical description of the dataset, consider the relevance of each feature, and select a few sample data points from the dataset which you will track through the course of this project.
Run the code block below to observe a statistical description of the dataset. Note that the dataset is composed of six important product categories: 'Fresh', 'Milk', 'Grocery', 'Frozen', 'Detergents_Paper', and 'Delicatessen'. Consider what each category represents in terms of products you could purchase.
# Display a description of the dataset
display(data.describe())
To get a better understanding of the customers and how their data will transform through the analysis, it would be best to select a few sample data points and explore them in more detail. In the code block below, add three indices of your choice to the indices
list which will represent the customers to track. It is suggested to try different sets of samples until you obtain customers that vary significantly from one another.
# TODO: Select three indices of your choice you wish to sample from the dataset
indices = [10, 20, 220]
# Create a DataFrame of the chosen samples
samples = pd.DataFrame(data.loc[indices], columns = data.keys()).reset_index(drop = True)
print "Chosen samples of wholesale customers dataset:"
display(samples)
Consider the total purchase cost of each product category and the statistical description of the dataset above for your sample customers.
What kind of establishment (customer) could each of the three samples you've chosen represent?
Hint: Examples of establishments include places like markets, cafes, and retailers, among many others. Avoid using names for establishments, such as saying "McDonalds" when describing a sample customer as a restaurant.
Answer: In order to make a guess for what type of establishments do our sample customers represent, let us first take a look on how much each of our sample customer does spend on different categories. This is shown below :
df = samples.sum(axis=1)
i=0
for val in samples.itertuples(index=False):
fresh = float(val.Fresh)/df[i]*100
milk = float(val.Milk)/df[i]*100
grocery = float(val.Frozen)/df[i]*100
frozen = float(val.Frozen)/df[i]*100
deter_paper = float(val.Detergents_Paper)/df[i]*100
delicatessen = float(val.Delicatessen)/df[i]*100
print 'Customer {}'.format(i+1)
print "Fresh : {0:.2f}".format(fresh)
print "Milk : {0:.2f}".format(milk)
print "Grocery : {0:.2f}".format(grocery)
print "Frozen : {0:.2f}".format(frozen)
print "Detergents_Paper : {0:.2f}".format(deter_paper)
print "Delicatessen : {0:.2f}".format(delicatessen)
print "-------------------------------------------------------"
i=i+1
In order to get an idea more clearly, let's visualize the details.
import matplotlib.pyplot as plt
x = [0,1,2,3,4,5]
my_xticks = ['Fresh', 'Milk', 'Grocery', 'Frozen', 'Detergents_Paper', 'Delicatessen']
y1 = [9.94, 15.95, 12.99, 12.99, 17.65, 5.15]
y2 = [54.63, 14.07, 3.32, 3.32, 7.03, 6.61]
y3 = [75.26, 4.59, 9.00, 9.00, 0.29, 3.82]
plt.plot(x,y1)
plt.xlabel('Category')
plt.ylabel('Amount spent(in %age)')
plt.title('Customers stats')
plt.xticks(x,my_xticks, rotation=30)
plt.tick_params(labelright=True)
plt.tight_layout()
plt.plot(x,y2)
plt.xlabel('Category')
plt.ylabel('Amount spent(in %age)')
plt.xticks(x,my_xticks)
plt.tick_params(labelright=True)
plt.plot(x,y3)
plt.xlabel('Category')
plt.ylabel('Amount spent(in %age)')
plt.xticks(x,my_xticks)
plt.tick_params(labelright=True)
plt.legend(['Customer1', 'Customer2', 'Customer3'], loc =1, frameon=False, fontsize = 'small')
display(samples - data.mean().round())
display(samples - data.median().round())
As we can see from the above graph and stats that Customer 1 has high spending in relation to the category median for all categories except Fresh. He/She could be a big chain retailer.
Also in relation to the category median for all categories, we see that Customer 2 spends a huge amount on Fresh, Milk, Detergents_Paper and Delicatessen hence he/she is very likely that it represents a restaurant or a hotel.
In case of customer3, huge spendings are done only in case of Fresh and Frozen suggesting that Customer 3 represents a small cafe.
One interesting thought to consider is if one (or more) of the six product categories is actually relevant for understanding customer purchasing. That is to say, is it possible to determine whether customers purchasing some amount of one category of products will necessarily purchase some proportional amount of another category of products? We can make this determination quite easily by training a supervised regression learner on a subset of the data with one feature removed, and then score how well that model can predict the removed feature.
In the code block below, you will need to implement the following:
new_data
a copy of the data by removing a feature of your choice using the DataFrame.drop
function.sklearn.cross_validation.train_test_split
to split the dataset into training and testing sets.test_size
of 0.25
and set a random_state
.random_state
, and fit the learner to the training data.score
function.# TODO: Make a copy of the DataFrame, using the 'drop' function to drop the given feature
new_data = data.drop('Grocery',axis=1)
# TODO: Split the data into training and testing sets using the given feature as the target
from sklearn.cross_validation import train_test_split
X_train, X_test, y_train, y_test = train_test_split(new_data, data['Grocery'], test_size=0.25, random_state=33)
# TODO: Create a decision tree regressor and fit it to the training set
from sklearn.tree import DecisionTreeRegressor
regressor = DecisionTreeRegressor(random_state=33)
regressor.fit(X_train, y_train)
# TODO: Report the score of the prediction using the testing set
score = regressor.score(X_test, y_test)
print score
Which feature did you attempt to predict? What was the reported prediction score? Is this feature is necessary for identifying customers' spending habits?
Hint: The coefficient of determination, R^2
, is scored between 0 and 1, with 1 being a perfect fit. A negative R^2
implies the model fails to fit the data.
Answer: I attempted to predict the 'Grocery' feature. The prediction score was 0.4147 which is a good prediction score(although not so high).
No, this feature is not necessary for identifying customers' spending habits. This is because that our model predicted a positive and good R^2 score suggesting that it is not relevant at all as its value can still be predicted based on the values of other features, even if it wasn't there in the dataset.
To get a better understanding of the dataset, we can construct a scatter matrix of each of the six product features present in the data. If you found that the feature you attempted to predict above is relevant for identifying a specific customer, then the scatter matrix below may not show any correlation between that feature and the others. Conversely, if you believe that feature is not relevant for identifying a specific customer, the scatter matrix might show a correlation between that feature and another feature in the data. Run the code block below to produce a scatter matrix.
# Produce a scatter matrix for each pair of features in the data
pd.scatter_matrix(data, alpha = 0.3, figsize = (14,8), diagonal = 'kde');
Are there any pairs of features which exhibit some degree of correlation? Does this confirm or deny your suspicions about the relevance of the feature you attempted to predict? How is the data for those features distributed?
Hint: Is the data normally distributed? Where do most of the data points lie?
Answer: From the above plot, we can say that few features are higly correlated. The features corresponding to a features as shown below on the right hand side represents some degree of correlation with the feature on the left hand side.
The data for the given features is not normally distributed. If the data were normally distributed, we would have obtained a fair elliptical shape in the scatter matrix as shown below. But as most of the data points in our scatter matrix fan out of the origin, hence our data set is not normally distributed.
In this section, you will preprocess the data to create a better representation of customers by performing a scaling on the data and detecting (and optionally removing) outliers. Preprocessing data is often times a critical step in assuring that results you obtain from your analysis are significant and meaningful.
If data is not normally distributed, especially if the mean and median vary significantly (indicating a large skew), it is most often appropriate to apply a non-linear scaling — particularly for financial data. One way to achieve this scaling is by using a Box-Cox test, which calculates the best power transformation of the data that reduces skewness. A simpler approach which can work in most cases would be applying the natural logarithm.
In the code block below, you will need to implement the following:
log_data
after applying logarithmic scaling. Use the np.log
function for this.log_samples
after applying logarithmic scaling. Again, use np.log
.# TODO: Scale the data using the natural logarithm
log_data = np.log(data)
# TODO: Scale the sample data using the natural logarithm
log_samples = np.log(samples)
# Produce a scatter matrix for each pair of newly-transformed features
pd.scatter_matrix(log_data, alpha = 0.3, figsize = (14,8), diagonal = 'kde');
After applying a natural logarithm scaling to the data, the distribution of each feature should appear much more normal. For any pairs of features you may have identified earlier as being correlated, observe here whether that correlation is still present (and whether it is now stronger or weaker than before).
Run the code below to see how the sample data has changed after having the natural logarithm applied to it.
# Display the log-transformed sample data
display(log_samples)
Detecting outliers in the data is extremely important in the data preprocessing step of any analysis. The presence of outliers can often skew results which take into consideration these data points. There are many "rules of thumb" for what constitutes an outlier in a dataset. Here, we will use Tukey's Method for identfying outliers: An outlier step is calculated as 1.5 times the interquartile range (IQR). A data point with a feature that is beyond an outlier step outside of the IQR for that feature is considered abnormal.
In the code block below, you will need to implement the following:
Q1
. Use np.percentile
for this.Q3
. Again, use np.percentile
.step
.outliers
list.NOTE: If you choose to remove any outliers, ensure that the sample data does not contain any of these points!
Once you have performed this implementation, the dataset will be stored in the variable good_data
.
# For each feature find the data points with extreme high or low values
for feature in log_data.keys():
# TODO: Calculate Q1 (25th percentile of the data) for the given feature
Q1 = np.percentile(log_data[feature],25.0)
# TODO: Calculate Q3 (75th percentile of the data) for the given feature
Q3 = np.percentile(log_data[feature],75.0)
# TODO: Use the interquartile range to calculate an outlier step (1.5 times the interquartile range)
step = 1.5*(Q3 - Q1)
# Display the outliers
print "Data points considered outliers for the feature '{}':".format(feature)
display(log_data[~((log_data[feature] >= Q1 - step) & (log_data[feature] <= Q3 + step))])
# OPTIONAL: Select the indices for data points you wish to remove
outliers = [86, 183, 325, 75, 66, 65, 154, 128]
# Remove the outliers, if any were specified
good_data = log_data.drop(log_data.index[outliers]).reset_index(drop = True)
Are there any data points considered outliers for more than one feature based on the definition above? Should these data points be removed from the dataset? If any data points were added to the outliers
list to be removed, explain why.
Answer: In order to see if any data point is considered outliers for more than one feature based on the above definition, let us count it using a simple loop as shown below:
from collections import defaultdict
outliers_count = defaultdict(lambda: 0)
for feature in log_data.keys():
# TODO: Calculate Q1 (25th percentile of the data) for the given feature
Q1 = np.percentile(log_data[feature],25.0)
# TODO: Calculate Q3 (75th percentile of the data) for the given feature
Q3 = np.percentile(log_data[feature],75.0)
# TODO: Use the interquartile range to calculate an outlier step (1.5 times the interquartile range)
step = 1.5*(Q3 - Q1)
outliers_df = log_data[~((log_data[feature] >= Q1 - step) & (log_data[feature] <= Q3 + step))]
#Make a dictionary for counting outliers
for index in outliers_df.index.values:
outliers_count[index] += 1
max_outlier_count = []
for key in outliers_count.keys():
if outliers_count[key] > 1:
max_outlier_count.append((key, outliers_count[key]))
print max_outlier_count
print "No. of data points that are outliers for more than one features : {}".format(len(max_outlier_count))
As calcualted above, there are five data points in total which are outliers for more than one feature. Yes, these data points should be removed from the dataset because in most of the cases outliers cause a significant difference in mean and median making the data skewed in nature.
Some of the data points were added to the outliers list because some of them were extreme ouliers and some of them were outliers for more than one feature. This might lead to a problem during clustering process as we may not obtain the same number of optimal clusters using various custering algorithms.
In this section you will use principal component analysis (PCA) to draw conclusions about the underlying structure of the wholesale customer data. Since using PCA on a dataset calculates the dimensions which best maximize variance, we will find which compound combinations of features best describe customers.
Now that the data has been scaled to a more normal distribution and has had any necessary outliers removed, we can now apply PCA to the good_data
to discover which dimensions about the data best maximize the variance of features involved. In addition to finding these dimensions, PCA will also report the explained variance ratio of each dimension — how much variance within the data is explained by that dimension alone. Note that a component (dimension) from PCA can be considered a new "feature" of the space, however it is a composition of the original features present in the data.
In the code block below, you will need to implement the following:
sklearn.decomposition.PCA
and assign the results of fitting PCA in six dimensions with good_data
to pca
.log_samples
using pca.transform
, and assign the results to pca_samples
.# TODO: Apply PCA by fitting the good data with the same number of dimensions as features
from sklearn.decomposition import PCA
pca = PCA(n_components=6)
pca.fit(good_data)
# TODO: Transform log_samples using the PCA fit above
pca_samples = pca.transform(log_samples)
# Generate PCA results plot
pca_results = vs.pca_results(good_data, pca)
How much variance in the data is explained in total by the first and second principal component? What about the first four principal components? Using the visualization provided above, discuss what the first four dimensions best represent in terms of customer spending.
Hint: A positive increase in a specific dimension corresponds with an increase of the positive-weighted features and a decrease of the negative-weighted features. The rate of increase or decrease is based on the indivdual feature weights.
Answer: Almost 70% of the variance is explained in total by the first and second pricipal component. The first four principal components explains about 93% of the variance in the data as seen from the above visualization.
The first four dimensions gives us a visualiztion of the correlation between the features. Detailed explanation for each dimesion is given below:
Run the code below to see how the log-transformed sample data has changed after having a PCA transformation applied to it in six dimensions. Observe the numerical value for the first four dimensions of the sample points. Consider if this is consistent with your initial interpretation of the sample points.
# Display sample log-data after having a PCA transformation applied
display(pd.DataFrame(np.round(pca_samples, 4), columns = pca_results.index.values))
When using principal component analysis, one of the main goals is to reduce the dimensionality of the data — in effect, reducing the complexity of the problem. Dimensionality reduction comes at a cost: Fewer dimensions used implies less of the total variance in the data is being explained. Because of this, the cumulative explained variance ratio is extremely important for knowing how many dimensions are necessary for the problem. Additionally, if a signifiant amount of variance is explained by only two or three dimensions, the reduced data can be visualized afterwards.
In the code block below, you will need to implement the following:
good_data
to pca
.good_data
using pca.transform
, and assign the results to reduced_data
.log_samples
using pca.transform
, and assign the results to pca_samples
.# TODO: Apply PCA by fitting the good data with only two dimensions
pca = PCA(n_components = 2)
pca.fit(good_data)
# TODO: Transform the good data using the PCA fit above
reduced_data = pca.transform(good_data)
# TODO: Transform log_samples using the PCA fit above
pca_samples = pca.transform(log_samples)
# Create a DataFrame for the reduced data
reduced_data = pd.DataFrame(reduced_data, columns = ['Dimension 1', 'Dimension 2'])
Run the code below to see how the log-transformed sample data has changed after having a PCA transformation applied to it using only two dimensions. Observe how the values for the first two dimensions remains unchanged when compared to a PCA transformation in six dimensions.
# Display sample log-data after applying PCA transformation in two dimensions
display(pd.DataFrame(np.round(pca_samples, 4), columns = ['Dimension 1', 'Dimension 2']))
A biplot is a scatterplot where each data point is represented by its scores along the principal components. The axes are the principal components (in this case Dimension 1
and Dimension 2
). In addition, the biplot shows the projection of the original features along the components. A biplot can help us interpret the reduced dimensions of the data, and discover relationships between the principal components and original features.
Run the code cell below to produce a biplot of the reduced-dimension data.
# Create a biplot
vs.biplot(good_data, reduced_data, pca)
Once we have the original feature projections (in red), it is easier to interpret the relative position of each data point in the scatterplot. For instance, a point the lower right corner of the figure will likely correspond to a customer that spends a lot on 'Milk'
, 'Grocery'
and 'Detergents_Paper'
, but not so much on the other product categories.
From the biplot, which of the original features are most strongly correlated with the first component? What about those that are associated with the second component? Do these observations agree with the pca_results plot you obtained earlier?
Milk, Grocery, Detergents_Paper are most strongly correlated with the first component. Frozen, Fresh, Delicatessen are associated with second component. Yes these observations agree with pca_results plot, shown below:
In this section, you will choose to use either a K-Means clustering algorithm or a Gaussian Mixture Model clustering algorithm to identify the various customer segments hidden in the data. You will then recover specific data points from the clusters to understand their significance by transforming them back into their original dimension and scale.
What are the advantages to using a K-Means clustering algorithm? What are the advantages to using a Gaussian Mixture Model clustering algorithm? Given your observations about the wholesale customer data so far, which of the two algorithms will you use and why?
Answer: Advantages of using K-Means clustering algorithm :
Advantages of using Gaussian Mixture Model clustering algorithm :
Depending on the problem, the number of clusters that you expect to be in the data may already be known. When the number of clusters is not known a priori, there is no guarantee that a given number of clusters best segments the data, since it is unclear what structure exists in the data — if any. However, we can quantify the "goodness" of a clustering by calculating each data point's silhouette coefficient. The silhouette coefficient for a data point measures how similar it is to its assigned cluster from -1 (dissimilar) to 1 (similar). Calculating the mean silhouette coefficient provides for a simple scoring method of a given clustering.
In the code block below, you will need to implement the following:
reduced_data
and assign it to clusterer
.reduced_data
using clusterer.predict
and assign them to preds
.centers
.pca_samples
and assign them sample_preds
.sklearn.metrics.silhouette_score
and calculate the silhouette score of reduced_data
against preds
.score
and print the result.# TODO: Apply your clustering algorithm of choice to the reduced data
from sklearn.mixture import GMM
clusterer = GMM(n_components =2, random_state=33)
clusterer.fit(reduced_data)
# TODO: Predict the cluster for each data point
preds = clusterer.predict(reduced_data)
# TODO: Find the cluster centers
centers = clusterer.means_
# TODO: Predict the cluster for each transformed sample data point
sample_preds = clusterer.predict(pca_samples)
# TODO: Calculate the mean silhouette coefficient for the number of clusters chosen
from sklearn.metrics import silhouette_score as s_score
score = s_score(reduced_data, preds, random_state=33)
print score
Report the silhouette score for several cluster numbers you tried. Of these, which number of clusters has the best silhouette score?
Answer: After running the previous code cell for different number of clusters(2,3,4,5), the best score is obtained when the number of clusters is equal to three in the Gaussian Mixture Model.
For better understanding, please see the visualization below to get an idea of how the score is varying with the number of clusters.
x = [2,3,4,5]
y = [0.418560168656, 0.394057262031, 0.341534869599, 0.301155702667]
plt.plot(x,y)
plt.xlabel("No of clusters")
plt.ylabel("Silhouette Score")
plt.tick_params(labelright=True)
plt.title("GMM clustering")
Once you've chosen the optimal number of clusters for your clustering algorithm using the scoring metric above, you can now visualize the results by executing the code block below. Note that, for experimentation purposes, you are welcome to adjust the number of clusters for your clustering algorithm to see various visualizations. The final visualization provided should, however, correspond with the optimal number of clusters.
# Display the results of the clustering from implementation
vs.cluster_results(reduced_data, preds, centers, pca_samples)
Each cluster present in the visualization above has a central point. These centers (or means) are not specifically data points from the data, but rather the averages of all the data points predicted in the respective clusters. For the problem of creating customer segments, a cluster's center point corresponds to the average customer of that segment. Since the data is currently reduced in dimension and scaled by a logarithm, we can recover the representative customer spending from these data points by applying the inverse transformations.
In the code block below, you will need to implement the following:
centers
using pca.inverse_transform
and assign the new centers to log_centers
.np.log
to log_centers
using np.exp
and assign the true centers to true_centers
.# TODO: Inverse transform the centers
log_centers = pca.inverse_transform(centers)
# TODO: Exponentiate the centers
true_centers = np.exp(log_centers)
# Display the true centers
segments = ['Segment {}'.format(i) for i in range(0,len(centers))]
true_centers = pd.DataFrame(np.round(true_centers), columns = data.keys())
true_centers.index = segments
display(true_centers)
Consider the total purchase cost of each product category for the representative data points above, and reference the statistical description of the dataset at the beginning of this project. What set of establishments could each of the customer segments represent?
Hint: A customer who is assigned to 'Cluster X'
should best identify with the establishments represented by the feature set of 'Segment X'
.
Answer: In order to guess the set of establishments that each customer segment could represnt, let us first take a look at the mean of each feature as described in the statistical description of the dataset at the beginning.
Segment 0 Comparing the total purchase cost of each category product with the above mean figures, we can observe the following things :
Segment 1 Similarly comparing the total purchase cost of each category product with the above mean figures, we can observe that:
For each sample point, which customer segment from Question 8 best represents it? Are the predictions for each sample point consistent with this?
Run the code block below to find which cluster each sample point is predicted to be.
# Display the predictions
for i, pred in enumerate(sample_preds):
print "Sample point", i, "predicted to be in Cluster", pred
Answer: Sample point 0 and Sample point 1 are predicted as Retailers while Sample 2 is predicted as Hotel/Restaurant/Cafe.
Yes, the predictions for each sample point are consistent with this. This can be proved by comparing the values of 'samples' data ,which is transformed to 'pca_samples' later, to the assumptions that we made in Question 8 based on the data points and values in statistical description. Let us look at the original 'samples' data for making a conclusion.
samples
And here is the mean values for each feature(taken from statistical description of the original dataset).
Again, comparing the values of each feature with the mean values of the 'samples' dataset we can observe the following:
In this final section, you will investigate ways that you can make use of the clustered data. First, you will consider how the different groups of customers, the customer segments, may be affected differently by a specific delivery scheme. Next, you will consider how giving a label to each customer (which segment that customer belongs to) can provide for additional features about the customer data. Finally, you will compare the customer segments to a hidden variable present in the data, to see whether the clustering identified certain relationships.
Companies will often run A/B tests when making small changes to their products or services to determine whether making that change will affect its customers positively or negatively. The wholesale distributor is considering changing its delivery service from currently 5 days a week to 3 days a week. However, the distributor will only make this change in delivery service for customers that react positively. How can the wholesale distributor use the customer segments to determine which customers, if any, would react positively to the change in delivery service?
Hint: Can we assume the change affects all customers equally? How can we determine which group of customers it affects the most?
Answer: As we saw above that we are mainly having two clusters of customers. In order to determine which customers would reach positively to the change in delivery service , we can implement A/B testing as follows: Divide each cluster of segments into two sub segemnts like this:
Now take two sub-segments randomly one from each segment randomly, say Segment 0_1 and Segment 1_2. For these two sub- segments, change the delivery service from 5 days a week to 3 days a week. For the leftout sub-segments (Segment0_2 and Segment 1_1), keep the deliverly same as it was before. If any of the two selected sub-segments react positively to the change in delivery service, apply the new delivery scheme for that sub-segment. After this, apply the change delivery service for the leftout sub-segments (Segment0_2 and Segment 1_1) and check whether any of them react positively to rthe change in delivery service or not. If yes, then apply the change for that segment.
Additional structure is derived from originally unlabeled data when using clustering techniques. Since each customer has a customer segment it best identifies with (depending on the clustering algorithm applied), we can consider 'customer segment' as an engineered feature for the data. Assume the wholesale distributor recently acquired ten new customers and each provided estimates for anticipated annual spending of each product category. Knowing these estimates, the wholesale distributor wants to classify each new customer to a customer segment to determine the most appropriate delivery service.
How can the wholesale distributor label the new customers using only their estimated product spending and the customer segment data?
Hint: A supervised learner could be used to train on the original customers. What would be the target variable?
Answer: Since we now have cluster segmentation for each of our previous customers, we have an added advantage here. The customer segmentation number i.e. 'Segment 0' and 'Segment 1' can now be included as new feature in our data set along with the old features. We can transform our dataset the as shown below :
features_data = {'Fresh' : [3366, 17546, 14755, 2000],
'Milk' : [5403, 4519, 899, 5300],
'Grocery': [12974, 4602, 1382, 10500],
'Frozen' : [4400, 1066, 1765, 4500],
'Detergents_Paper': [5977, 2259, 56,5700],
'Delicatessen': [1744,2124,749,1900],
'Customer_segment': ['Segment 0', 'Segment 0', 'Segment 1', 'Segment 0']}
df = pd.DataFrame(features_data)
df
Now here the 'Customer_segment' will be treated as the "target" variable. This data can now be used to train a supervised learning algorithm like RandomForest or SVM which then can be used to predict what type of new customer is depending on the values of all other features in the dataset.
At the beginning of this project, it was discussed that the 'Channel'
and 'Region'
features would be excluded from the dataset so that the customer product categories were emphasized in the analysis. By reintroducing the 'Channel'
feature to the dataset, an interesting structure emerges when considering the same PCA dimensionality reduction applied earlier to the original dataset.
Run the code block below to see how each data point is labeled either 'HoReCa'
(Hotel/Restaurant/Cafe) or 'Retail'
the reduced space. In addition, you will find the sample points are circled in the plot, which will identify their labeling.
# Display the clustering results based on 'Channel' data
vs.channel_results(reduced_data, outliers, pca_samples)
How well does the clustering algorithm and number of clusters you've chosen compare to this underlying distribution of Hotel/Restaurant/Cafe customers to Retailer customers? Are there customer segments that would be classified as purely 'Retailers' or 'Hotels/Restaurants/Cafes' by this distribution? Would you consider these classifications as consistent with your previous definition of the customer segments?
Answer: The clustering algorithm with the number of clusters chosen performs well to this underlying distribution of Hotel/Restaurant/Cafe customers to Retail customers.
From the above graph, we can observe two clusters but there is some overlap in the two cluster sets, and hence, clusters are not classified as purely 'Retailers' or 'Hotels/Restaurants/Cafes'.
Yes, these classifications are consistent with our previous definition of customer segments as all sample points(sample point 0, sample point 1, sample point 2) are still predicted in the same clusters a they were before. Also, they lie almost at the same distance from the centroid even after the 'Channel' feature is reintroduced. This shows that our clustering algorithm is doing quite well.
Refernces : www.google.com, stackoverflow.com, Udacity formus, Quora
Note: Once you have completed all of the code implementations and successfully answered each question above, you may finalize your work by exporting the iPython Notebook as an HTML document. You can do this by using the menu above and navigating to
File -> Download as -> HTML (.html). Include the finished document along with this notebook as your submission.


{% extends "base.html" %} {% block content %} Product Management Product Management Product Details Confirmation required! {% csrf_token %} Are you sure you want to permanantly delete {{ product.name }} product? {% endblock content %}
Are you sure you want to permanantly delete {{ product.name }} product?


You will begin to realise why this exercise is called the Dickens Pattern with reference to the ghost showing Scrooge some different futures.
Discover NowHere, I focus on a range of items and features that we use in life without giving them a second thought. such as Coca Cola. Dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.
View Full DetailsAt about this time of year, some months after New Year’s resolutions have been made and kept, or made and neglected.
“It is not because things are difficult that we do not dare; it is because we do not dare that they are difficult.”
If you are an entrepreneur, you know that your success cannot depend on the opinions of others. Like the wind, opinions.
Do you want to be even more successful? Learn to love learning and growth. The more effort you put into improving your skills.
Hypnosis quit smoking methods maintain caused quite a stir in the medical world over the last two decades. There is a lot of argument
Do you sometimes have the feeling that you’re running into the same obstacles over and over again? Many of my conflicts.
You’ve heard the expression, “Just believe it and it will come.” Well, technically, that is true, however, ‘believing’ is not just thinking that.
A visual display of our projects.
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Adipisci, ex. Commodi deleniti illum quisquam nobis doloremque assumenda porro vel beatae quasi.
Obcaecati tempora optio asperiores, quod nihil labore vel? Sit repellendus, repudiandae hic rerum adipisci consequatur ducimus debitis.
Developer
Obcaecati tempora optio asperiores, quod nihil labore vel? Sit repellendus, repudiandae hic rerum adipisci consequatur ducimus debitis.
Developer
Choose a payment option that best suits your needs.
 Expedita nemo sed perspiciatis ducimus qui veritatis aperiam ullam labore suscipit iusto veniam quas, sequi fugiat! Laudantium ipsum illum repellendus nulla natus.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos veniam voluptatem architecto tenetur ad saepe sed dolorum. Laudantium itaque nam, animi dignissimos et neque architecto voluptate aliquam dolor quibusdam sed.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos veniam voluptatem architecto tenetur ad saepe sed dolorum. Laudantium itaque nam, animi dignissimos et neque architecto voluptate aliquam dolor quibusdam sed.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos veniam voluptatem architecto tenetur ad saepe sed dolorum. Laudantium itaque nam, animi dignissimos et neque architecto voluptate aliquam dolor quibusdam sed.


Lambert hits out at his squad rotation critics after Ipswich Town's dramatic late win at Lincoln in FA Cup replay
by Stuart WatsonIpswich Town manager Paul Lambert hit out at his squad rotation critics following tonight's 1-0 win at Lincoln City in an FA Cup first round replay.
Alan Judge scored a dramatic winner deep into stoppage-time to prevent the Blues going a decade without a win in the world famous competition and set up a second round trip to Coventry on Sunday, December 1 (2pm ko).
Eight senior players were left behind in Suffolk in preparation for Saturday's League One visit of Blackpool, with many of them set to go 17 days without a game.
"I'm really, really happy," said Lambert. "I thought we deserved the clean sheet and we deserved to go through.
"I changed the whole team. As I've said before I don't have a strong team. I don't have a strong 11. I believe in everybody to perform.
"I talk with the medical team who are experts on fitness and muscle injuries and I pick a team of lads who I think can get around the pitch.
"Football has changed. It's not just about 18 guys. It's everybody.  It's a load of s***e, that's what it is. S***e.
"Last year this football club had some guys playing 3,000 minutes and some guys playing 300 minutes. That's unfair. People who don't know the game and don't have a clue about keeping people fit… That's what annoys me.
"Everybody's game time is really getting there. I trust everybody to perform. I don't have any favourites or guys who are think are more important than others. We're a team."
With this Ipswich's first FA Cup win in 16 attempts, Lambert said: "It's a good competition. We'll go (to Coventry) and try and win, but the league's the most important thing. Let's see what happens."
Judge's winner was his first goal in 46 games for club and country, the Irishman ramming the ball home in front of 607 jubilant away fans at Sincil Bank.
"It's long over-due and I think he knows that himself," said Lambert. "He's just come back from international duty and that's really, really tough. I'm delighted for him.
"First half I thought Lincoln were better, second half I thought we were better. I thought the whole team grew into it.
"The pleasing thing is that young Brett McGavin played again, Idris (El Mizouni) came on, Tommy Hughes came on, there were lads coming back from injuries and coming back from international teams.
"Doz (Andre Dozzell) never got back until two in the morning (having been in Wycombe with England U20s) and played brilliantly second half when he dropped deeper.
"There are so many good things there. It was another 90 minutes for Will (Keane), Toto (Nsiala) as well. I thought the back two lads were excellent, Janoi (Donacien) was excellent."
On McGavin, who followed up his impressive debut at Colchester with another assured display in midfield, Lambert added: "It's just a knock that forced him off. I thought he was excellent and got better and better second half. We pushed Emyr (Huws) and Dozzell a bit further forward second half.
"There are good kids here. They need a bit of time to progress, but if I don't try them then I'll never know. Players like Brett, Idris, Tommy Hughes, (Armando) Dobra… they might just save the club a few million pounds."


Use the button below to display the help texts, or just focus or mouseover the indivdual inputs.
A fixed width is defined in CSS to make the tooltips look consistent when displayed all at once.


Angular
This div will always be seen since it is outside of the ng-view. Perfect place to include a navbar!
This div will always be seen since it is outside of the ng-view. Perfect place for a footer.


Welcome to the Home Page!
Person ID
Affiliation ID
Member Name
Party
Party Organisation ID
Image
cerealId
Kellogg's
Cornflakes
Cornflakes
Cornflakes


SHAKESPEARE IN LOVE Review by Victory A. Marasigan http://www.gl.umbc.edu/~vmaras1/reviewsidx.html
There's an old teaching that says that everything a writer writes, no matter what his outward intentions, is ultmately the story of that writer's own personal struggles. That reasoning seems to have been the foundation of Shakespeare in Love, an infectious romantic comedy whose charm sneaks up on you, and which easily ranks as my favorite film of 1998.
All is not well for Will Shakespeare (Joseph Fiennes), whom we see here as a young, struggling London playwright. Though he still owes one theater-owner a play, he promises his services to another (Geoffrey Rush), a man whose creditors aren't above using torture as payment. Adding a kink to Will's situation is the fact that he's been unable to write a satisfactory line of prose in who-knows-how-long (His pseudo-psychiatric apothecary's explanation? Lack of a love life).
With moneymen breathing down his neck, Shakespeare begins writing and casting his new production, Romeo and Ethel, the Pirate's Daughter, without any idea of what the play will really be about. A troupe of actors -- all men, since women were not considered fit for the stage -- is hastily assembled to fill roles as Shakespeare comes up with them. The exhilarating trials and tribulations of putting together the play (eventually to become Romeo and Juliet) are the focus of director John Madden's cinematic treat.
To reveal the details of the plot here would be to ruin the film, because part of the fun of Shakespeare in Love is in discovering familiar story points and picking up on Bard-related inside jokes. I won't even say how young Will falls in love with the beautiful Lady Viola (played with a perfect British accent by Gwyneth Paltrow), or how their forbidden union leads to Shakespeare's triumph with Romeo and Juliet. Nor will I divulge how the fate of Will's rival Christopher Marlowe (Rupert Everett) predicts moments from not one but several of the Bard's later plays, including Hamlet, Julius Caesar, and MacBeth.
There is an inexplicable joy to be had in watching Will toiling away at his desk with a feather pen, while the ink blackens his fingertips. Though your typical teenager would quickly say otherwise, Shakespeare did not write his plays so he could torture countless generations of high schoolers. His initial reasons for becoming a writer were probably no different than those of your average modern-day wordsmith. Shakepeare in Love boldly suggests that something more than an itch to tell stories and a basic need for survival began his creative streak, something much simpler and more human.
At the same time that the film asserts that Shakespeare's writings were inspired by events from his own life, it presents his story as the Bard himself may have written it. Writer Tom Stoppard and Marc Norman have meticulously combined moments of high comedy, deep tragedy, and action for action's sake into a layered spectacle not unlike many a Shakepearean play.
All-around great performances will have you clapping for an encore. Fiennes and Paltrow have put just the right amount of oopmh into their portrayals, something which I hope the Oscar nominations do not overlook. Judi Dench's deliciously ascerbic portrayal of the Queen Elizabeth I is good for some of the film's big laughs. And as out- of-place in this production as he initially seems, Ben Affleck leaves a surprisingly positive impression in his minor role as the famous thespian Ned Alleyn.
Historians and scholars be advised: Shakespeare in Love is as much the true story of the Bard as IQ is the story of Albert Einstein. But for the film's two hours, the illusion which has been so carefully crafted is so appealing you wish that it really had happened. To the average high school grad, the film is a breath of fresh air, like a past due reward for paying attention during English class.
GRADE: A+
Reviewed December 17, 1998 at Loews White Marsh Theater, White Marsh, MD.
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


{% extends "course_base.html" %} {% load url from future %} {% block title %}Reports | {{ common_page_data.course.title }}{% endblock title %} {% block m_column_content %}
Note: After clicking the button below, you will return to this page. Please refresh it periodically if you want to see the new report. Report may take a few minutes to generate. It will be emailed to the course staff email once available.
| {{ rep.name }} |
| No reports available at the moment. |
Note: After clicking the button below, you will return to this page. Please refresh it periodically if you want to see the new report. Report may take a few minutes to generate. It will be emailed to the course staff email once available.
Performance of the class for each question, for all assessments, giving mean score, max score, total attempts, distinct students who have attempted, # correct attempts and # correct first, second and third attempts.
| Field | Total attempts | Students who have attempted | Correct attempts | Correct 1st attempts | Correct 2nd attempts | Correct 3rd attempts |
| q3b | 11750 | 9868 | 10470 | 8591 | 1458 | 288 |
| q2b | 12277 | 10174 | 11194 | 9150 | 1580 | 321 |
| q1b | 12727 | 10355 | 11693 | 9558 | 1643 | 327 |
| {{ rep.name }} |
| No reports available at the moment. |
Note: After clicking the button below, you will return to this page. Please refresh it periodically if you want to see the new report. Report may take a few minutes to generate. It will be emailed to the course staff email once available.
How each student performed for each question giving correct or incorrect, # attempts, score and total score for the assessment.
| Field | Correct # | Attempts | Sub score | Total score | Max possible score |
| 3 | 3 | ||||
| q3b | 1 | 2 | 1 | ||
| q2b | 1 | 1 | 1 | ||
| q1b | 1 | 3 | 1 |
| {{ rep.name }} |
Note: After clicking the button below, you will return to this page. Please refresh it periodically if you want to see the new report. Report may take a few minutes to generate. It will be emailed to the course staff email once available.
Performance of the class for each question giving total attempts, distinct students who have attempted, # correct attempts and # correct first, second and third attempts.
| Field | Total attempts | Students who have attempted | Correct attempts | Correct 1st attempts | Correct 2nd attempts | Correct 3rd attempts |
| q3b | 11750 | 9868 | 10470 | 8591 | 1458 | 288 |
| q2b | 12277 | 10174 | 11194 | 9150 | 1580 | 321 |
| q1b | 12727 | 10355 | 11693 | 9558 | 1643 | 327 |
| {{ rep.name }} |
Note: After clicking the button below, you will return to this page. Please refresh it periodically if you want to see the new report. Report may take a few minutes to generate. It will be emailed to the course staff email once available.
Student video page visits.
| {{ rep.name }} |
Note: After clicking the button below, you will return to this page. Please refresh it periodically if you want to see the new report. Report may take a few minutes to generate. It will be emailed to the course staff email once available.
| {{ rep.name }} |
Note: After clicking the button below, you will return to this page. Please refresh it periodically if you want to see the new report. Report may take a few minutes to generate. It will be emailed to the course staff email once available.
| {{ rep.name }} |
Note: After clicking the button below, you will return to this page. Please refresh it periodically if you want to see the new report. Report may take a few minutes to generate. It will be emailed to the course staff email once available.
Survey question responses.
| {{ rep.name }} |
Note: After clicking the button below, you will return to this page. Please refresh it periodically if you want to see the new report. Report may take a few minutes to generate. It will be emailed to the course staff email once available.
How each student scored for each assessment with penalties included.
| Authorization In-Video Quiz | Authorization Quiz | |
| Max Score | 30 | 4 |
| Jane Doe | 30 | 2 |
| John Doe | 29 | 3 |
| {{ rep.name }} |
| No reports available at the moment. |


| red, green and blue = number between 0 and 255 |
| This changes the color for subsequent CLS calls. Use this command when you need CLS to 'clear' the screen with some other color than black. |
|
;set ClsColor to red
ClsColor 255,0,0 ;set current drawing buffer to the color set by the ClsColor command Cls |


A desktop app for keeping diary, my second GUI program. The project is still active, because I'm using it.
A proxy (similar to shadowsocks-dotcloud). My initial motivation is to use free PaaS to host it, and fix some weakness of shadowsocks (which *may* help GFW to discover server). But actually it's just a reinvented wheel.
Toy Scheme Interpreter.
My first Android app, a live wallpaper. It's an abandoned prototype, because I'm short of original color scheme and filters.  It's sad to find out that I forgot some basic syntax of Scala after few months of not using it.


Senior digital strategist, creative director and user experience expert with broad-based online experience including digital strategy, responsive design and development, social media outreach, email marketing, content strategy and user experience. Frequent speaker on developing a meaningful digital presence for organizations and non-profits.
Digital strategy
Content Strategy
Online branding
Social media integration
Email marketing
Google Analytics
Responsive web design and development
User experience and user centered design
Web typography
HTML email design
HTML, CSS, JavaScript
PHP, Cold Fusion, Ruby
Word Press, Drupal, Jekyll
Git version control
Adobe Creative Cloud
Mac operating system
Manage the digital presence for global humanitarian aid organization. Creative and technical director for all public facing web properties. Primary digital strategist.
Instructor in introductory and advanced web and user experience design for undergraduate corporate communication and graduate publications design students.
Digital strategy, web design and development and email marketing for clients ranging from state university to small to medium size businesses and non-profits.
BA, Visual Art and Design | Bennington College


Stereotype Threat
Stereotype threat denotes the risk of conforming to a negative stereotype about that persons group. If a group has a negative stereotype, a person who identifies themselves as part of that group may actually subconsciously perform in line with that negative stereotype.
For example if a woman is told she will be tested on her driving ability compared to a man, she may encounter the stereotype threat that she will be viewed through the negative stereotype of women being bad drivers and thus under perform due to “subconscious self-handicapping”.
Of course most women per the above example have experienced some sort of ‘woman driver syndrome’ where a male counterpart may joke that you can’t park your car in the small space or of course you won’t pass your driving test first time.
Although I have experienced those stereotypes I wouldn’t say it affected my achievement; I did pass my test first time and yes I can park in that ridiculously small parking space!
On this note you really should check out this page I just found when persusing suitable car parking images!
Part of this might be due to going to a girls school, in this environment the male counterparts are removed, on the other hand they are also replaced with different stereotypes within the female population: “popular girls” only caring about their looks, who they are friends with, “geeky girls” being uncool/having no friends, “pretty girls” being stupid, having no intelligence.
Other stereotypes I have come across personally have been linked to race, being “English”/“British”/“Pommy” etc must mean that I am stuck up, love queueing, LOVE the weather(!), career, being a “hospo worker” must mean I have no goals, no academic abilities etc. (On the latter, well I’m here, right now, part of this crazy roller coaster course, so yes, I DO have goals!)
Also when looking for this image I came accross this for some other light reading if you get bored of this blog!
In fact looking at these stereotype which at times I may have fallen into or identified myself with I don’t feel that I have under achieved because of these, almost the opposite. If I felt someone deemed me to fall under the “geeky” category I would just show that I actually had friends and we were cool, we could “hang” out just as well as the rest of them!
And even if I had subconsciously performed to those preconceptions (e.g being geeky, achieving academically and being uncool) surely I would have achieved something more academically and possibly less socially, which is surely better?!
Firstly we can place less emphasis on any stereotype, whether that be in a social, study or work setting. Removing any task descriptions towards a stereotype so that any stereotype is overlooked, disarmed, not invoked or eliminated.
Such removals have been shown in studies, where placing any demographic enquiries related to the student at the end of the exam so that any feeling of stereotyping ideally won’t arise until after the body of the exam has been completed.
Also putting emphasis that the particular stereotyped group is also part of a wider un-stereotyped group may reduce the affects. Lets put this in the EDA context; to avoid any females in the cohort suffering from stereotype threat (lets face it, IT is a male dominated industry, although thankfully this is changing) you could address them in terms of their achievement of being part of EDA as whole, part of Kereru cohort, rather than of a group of women who are in the cohort. This puts emphasis on the group identity of our cohort, which doesn’t suffer from negative stereotypes and so places the focus on the whole group being expected to do well.
Feedback can be an incredibly useful tool but must be used carefully; in terms of stereotype threat studies have shown that the way feedback is provided can affect the perceived bias of the feedback giver, the students motivation and their identification with groups.
Constructive feedback that states performance standards have been high but that the student is capable of meeting these high standards/expectations; this means the student is less likely to feel that the mentor/person giving feedback is being bias towards any group the student may identify with, and has been shown to increase motivation.
Also keeping in mind the idea of “growth mindset” (as mentioned in my Week Three Blog on thinking styles) when writing/giving/receiving feedback may help lessen the level of stereotype threat. If we believe that our intelligence is extendable and can grow with learning then surely any personally perceived negative attribute of a social stereotype can also change and grow with more learning and challenging.
Well yes, I was born in the United Kingdom, I am not stuck up but yes like the best of us I do love meteorology, so if you engage me in any small talk you must be prepared! Bring an umbrella-when it rains it pours.
Finally, writing this blog post reminds me of a video I watched the other day, ties in quite nicely:


{% extends "base.html" %} {% load i18n %} {% block meta_title %}{% trans "Home" %}{% endblock %} {% block title %}{% trans "Home" %}{% endblock %} {% block breadcrumb_menu %}
Imagine a constant stream of diverse hackers from everywhere, traveling the world, gaining invaluable experience, sharing what they know and love, helping others everywhere they go.
Imagine diverse Organizations all over the world offering Residency opportunities for hackers, where communities will greatly benefit from the wealth of knowledge and skills, enthusiasm and creativity hackers have to offer.
This International Hackers in Residence site links cool people with cool organizations!
Schools, universities, hackerspaces, libraries, arts communities, and other Organizations around the world, can create a free web page to describe their Hackers In Residence Program which will attract potential Residents.
Anyone can browse Residency opportunities, and apply to Organizations where they would like to share of themselves, learn from others while there, and bring what they learn back home, and spread the joy.
Everybody wins!
This site is totally free for everyone to use.
If you would like to be a Resident it is free to browse the list of Organizations to find Residency Opportunities to apply for.
If you are an Organization it is free to register, enter info about your Organization, what you offer Residents, and what you require from Residents. {% endblocktrans %} {% endblock %}


Gecode::MiniModel Namespace Reference
Detailed Description
Minimal modelling support.
Classes | |
| class | TooFewArguments |
| Exception: Too few arguments available in argument array More... | |
| class | ArgumentSizeMismatch |
| Exception: Sizes of arguments does not match More... | |
| class | ArgumentOutOfRange |
| Exception: Argument out of range More... | |
| class | PosSet |
| Sets of positions. More... | |
| class | NodeInfo |
| Node information computed during traversal of the expressions. More... | |
| class | PosInfo |
| Information on positions collected during traversal. More... | |
| class | StateNode |
| Node together with state information More... | |
| class | StatePool |
| State pool combines a tree of states together with yet unprocessed states More... | |
| class | SymbolsInc |
| Sort symbols. More... | |
| class | TransitionBag |
| For collecting transitions while constructing a DFA. More... | |
| class | FinalBag |
| For collecting final states while constructing a DFA. More... | |
| class | LinExpr |
| Linear expressions. More... | |
| class | LinRel |
| Linear relations. More... | |
| class | BoolExpr |
| Boolean expressions. More... | |
| class | BoolRel |
| Boolean relations. More... | |
| class | Matrix |
| Matrix-interface for arrays. More... | |
Typedefs | |
| typedef Support::BlockAllocator < PosSet > | PosSetAllocator |
| Allocator for position sets. | |
| typedef Support::BlockAllocator < StateNode > | StatePoolAllocator |
| Allocator for state nodes. | |
Enumerations | |
| enum | PosSetCmp { PSC_LE, PSC_EQ, PSC_GR } |
| Order on position sets. More... |
Typedef Documentation
Enumeration Type Documentation


For the open help schedule, see Open Student Hours.
For the detailed weekly schedule for each cohort, see one of the week postings (e.g., Week 1).
| Introduction | |
| Wed 25 August | Materials Posted, TCS Chapter 0, TCS Chapter 1 |
| Wed 25 August (3:30-4:45pm) |
Full class meeting: open question time (come by Maury Hall 209 to meet with the instructors and ask any questions you have about the course) |
| Mon 30 Aug, Wed 1 Sept | Class meetings: Questions on Week 1 content and assignment |
| Tue 31 Aug – Fri 3 Sept | Assessed Cohort Meetings |
| Wed 1 September | Materials Posted, TCS Chapter 2 |
| Mon 6 Sept, Wed 8 Sept | Class meetings: Questions on Week 2 content and assignment |
| Tue 7 Sept – Fri 10 Sept | Assessed Cohort Meetings |
| Finite Computation | |
| Wed 8 September | Materials Posted, TCS Chapter 3 |
| Mon 13 Sept, Wed 15 Sept | Class meetings: Questions on Week 3 content and assignment |
| Tue 14 Sept – Fri 17 Sept | Assessed Cohort Meetings |
| Wed 15 September | Materials Posted, TCS Chapter 4 |
| Mon 20 Sept, Wed 22 Sept | Class meetings: Questions on Week 4 content and assignment |
| Tue 21 Sept – Fri 24 Sept | Assessed Cohort Meetings |
| Wed 22 September | Materials Posted, TCS Chapter 5 |
| Mon 27 Sept, Wed 29 Sept | Class meetings: Questions on Week 5 content and assignment |
| Tue 28 Sept – Fri 1 Oct | Assessed Cohort Meetings |
| Uniform Computation | |
| Wed 30 September | Materials Posted, TCS Chapter 6 |
| Mon 4 Oct, Wed 6 Oct | Class meetings: Questions on Week 6 content and assignment |
| Tue 5 Oct – Fri 8 Oct | Assessed Cohort Meetings |
| Wed 6 October | Materials Posted (including self-assessment ``midterm'') |
| Wed 13 Oct | Review and Special Topics (No class on 11 Oct, Reading Days break) |
| Week of 11-15 October | No Assessed Cohort Meetings (Reading Days are 11-12 October) |
| Wed 13 October | Materials Posted |
| Mon 18 Oct, Web 20 Oct | Class meetings: Questions on midterm self-assessment and Week 8 content and assignment |
| Tue 19 Oct – Fri 22 Oct | Assessed Cohort Meetings |
| Wed 20 October | Materials Posted, TCS Chapter 7 |
| Mon 25 Oct, Wed 27 Oct | Class meetings: Questions on Week 9 content and assignment |
| Tue 26 Oct – Fri 29 Oct | Assessed Cohort Meetings |
| Wed 27 October | Materials Posted, TCS Chapter 9 |
| Mon 1 Nov, Wed 3 Nov | Class meetings: Questions on Week 10 content and assignment |
| Tue 2 Nov – Fri 5 Nov | Assessed Cohort Meetings |
| Wed 3 November | Materials Posted, TCS Chapter 12, 13 |
| Mon 8 Nov, Wed 10 Nov | Class meetings: Questions on Week 11 content and assignment |
| Tue 9 Nov – Fri 12 Nov | Assessed Cohort Meetings |
| Tractable and Intractable Computation | |
| Wed 10 November | Materials Posted, TCS Chapter 14, 15 |
| Mon 15 Nov, Wed 17 Nov | Class meetings: Questions on Week 12 content and assignment |
| Tue 16 Nov – Fri 19 Nov | Assessed Cohort Meetings |
| Wed 9 November | Materials Posted |
| Mon 22 Nov | Class meeting on Monday, Review and Synthesis |
| Tue 23 Nov – Fri 26 Nov | No Assessed Cohort Meetings, Thanksgiving Week |
| Mon 29 Nov, Wed 1 Dec | Class meetings: Week 14 topics |
| Wed 1 Dec – Tue 7 Dec | Assessed Cohort Meetings (note schedule change - Monday and Tuesday cohorts will meet following week) |
| Mon 6 December | Class meeting: Wrapping up the Course, Review for Final |
| No Assessed Cohort Meetings (UVA courses end 7 December) | |
| Friday 10 December (2-5pm) | Final Exam (scheduled by the registrar) |


Success
See
event
Fatal: an error ocorrued
Registred with success
Warning: your missing some fields
See
GREAT event


See sample pages of The Only Child at Wink.
This is the second entry, it contains unicode Tĕstá ĀũʈĥőŘ
“The Only Child” portrays a lonely tot who becomes lost in a winter landscape. While her parents scour the city and surrounding countryside, the child scampers in snow, clouds, and seas with a mystical buck. This only child left the safety of home to visit Grandma; thankfully, the deer protects the child while guiding their journey. The discoveries made by the pair show how important companions are in life.
The book is illustrated in soft charcoal and chalk pastels, some images filling small boxes, others covering a full page. By using charcoal and pastel, images feel gentle and dreamlike, especially in the fantasy scenes. In contrast, artist Guojing’s urban settings have sharper lines and a gritty texture. In each image, the reader feels the child’s loneliness through the absence of color, the blank snow surrounding the child’s adventure, and the utterly silent text. I felt truly lonely reading the book, scanning the tot’s face and accompanying landscape. I saw that the new companions – the buck, a polar bear cub, and a blue whale – must be temporary, for they do not exist in the ordinary world of adults. I heard the longings for friends and family, as each page tugged me toward the next in hopes of being embraced by Grandma and Mom and Dad.
The Only Child whispers of loneliness, dreams, friendship, family, and adventure. The book reverberates with the timeless yearnings we all have, drawing the reader into the story with its familiar emotions and contrasting world of fantasy. Both young and old alike will enjoy the tale, especially when shared with a much-loved companion. – Lora Poser-Brown
The Only Child
by Guojing
Schwartz & Wade
2015, 112 pages, 8.4 x 11.5 x 0.6 inches
$11 Buy a copy on Amazon


Grandma's Lemon Meringue Pie
- One 9-inch pie
- 30 min-prep times
- 10 min-cook times
- 40 min-total
- 8 servings
INGRDENTS
- 1 cup white sugar
- 2 tbsp all purpose flours
- 3 tbsp cornstarch
- 1/4 tsp salt
- 1 1/2 cups of water
- 2 lemon, juice and tested
- 2 tbsp butter
- 4 eggs yolks, beaten
- 1(9 9-inch)pie crust,backed
- 4 eggs white
- 6 tbsp white sugar
DIRECTION
- Perheat Over:Perheat over to 35o degrees F(175 degrees C).
- Make Lemon Filling:in the medium saucepan...
- Whisk together 1 cup sugar,flour,cornstarch, and salt
- Stir in water,Lemon,Juice and lemon zest
- cook over medium-height heat stiving frequently,until mixture come to boil
- stir in butter
- place eggs yolks in small bowel and gradually whisk in 1/2 cups of hot water
- Bring to a boil and continue to cook while stirring constatly until thick
- Remove from heat
- pour filling baked pastry shell
- Make Meringue :in the large glass or metal bowl
- whip eggs whits util foamy
- Add sugar gradually and continue to whip until stiff peaks form
- Spead mergigue over pie ,sealing the egges the edges at the crust.
- Bake:Bake in the spread oven for 10 minutes or until the mergigue golden brown
this is our favorite recipe here at Granny Pies. it
has been enjoy by pie for many years.
this is a very fun recipe follow becaues grandman makes it sweet and simple
this is thick to eggs yolks, and contains no milk
.Emilis S.
Q:what do you call an ape who loves pie?
A:A merigue-utan
-Vickie K.
ThisHomePage strive can really engage my intest .Follow the recipe above and make it
-Jean-Luc Piecard
LINKS
search for other lemon grandma's meringue pie Home


KUKA Roboter GmbH |
KUKA Fast Robot Interface C++ SDK (version 1.15) |
Public Member Functions | |
| TransformationClient () | |
| Constructor. | |
| virtual | ~TransformationClient () |
| Virtual destructor. | |
| virtual void | provide ()=0 |
| Callback which is called whenever a new FRI message arrives. | |
| double | getSampleTime () const |
| Get the sample time in seconds. | |
| EConnectionQuality | getConnectionQuality () const |
| Get the current FRI connection quality. | |
| const std::vector< const char * > & | getRequestedTransformationIDs () const |
| Returns a vector of identifiers of all requested transformation matrices. | |
| const unsigned int | getTimestampSec () const |
| Get the timestamp of the current received FRI monitor message in Unix time. | |
| const unsigned int | getTimestampNanoSec () const |
| Get the nanoseconds elapsed since the last second (in Unix time). | |
| void | setTransformation (const char *transformationID, const double transformationMatrix[3][4], unsigned int timeSec, unsigned int timeNanoSec) |
| Provides a requested transformation matrix. | |
| void | setBooleanIOValue (const char *name, const bool value) |
| Set boolean output value. | |
| void | setDigitalIOValue (const char *name, const unsigned long long value) |
| Set digital output value. | |
| void | setAnalogIOValue (const char *name, const double value) |
| Set analog output value. | |
| bool | getBooleanIOValue (const char *name) const |
| Get boolean IO value. | |
| unsigned long long | getDigitalIOValue (const char *name) const |
| Get digital IO value. | |
| double | getAnalogIOValue (const char *name) const |
| Get analog IO value. | |
Friends | |
| class | ClientApplication |
A transformation client enables the user to send transformation matrices cyclically to the KUKA Sunrise controller for manipulating the transformations of dynamic frames in the Sunrise scenegraph. Usually, these matrices will be provided by external sensors.
Custom transformation clients have to be derived from this class and need to implement the provide() callback. This callback is called once by the client application whenever a new FRI message arrives.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.
| KUKA::FRI::TransformationClient::TransformationClient | ( | ) |
Constructor.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.
| virtual KUKA::FRI::TransformationClient::~TransformationClient | ( | ) | [virtual] |
Virtual destructor.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.
| virtual void KUKA::FRI::TransformationClient::provide | ( | ) | [pure virtual] |
Callback which is called whenever a new FRI message arrives.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.
In this callback all requested transformations have to be set.
| double KUKA::FRI::TransformationClient::getSampleTime | ( | ) | const |
| EConnectionQuality KUKA::FRI::TransformationClient::getConnectionQuality | ( | ) | const |
| const std::vector<const char*>& KUKA::FRI::TransformationClient::getRequestedTransformationIDs | ( | ) | const |
Returns a vector of identifiers of all requested transformation matrices.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.
The custom TransformationClient has to provide data for transformation matrices with these identifiers.
| const unsigned int KUKA::FRI::TransformationClient::getTimestampSec | ( | ) | const |
Get the timestamp of the current received FRI monitor message in Unix time.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.
This method returns the seconds since 0:00, January 1st, 1970 (UTC). Use getTimestampNanoSec() to increase your timestamp resolution when seconds are insufficient.
| const unsigned int KUKA::FRI::TransformationClient::getTimestampNanoSec | ( | ) | const |
Get the nanoseconds elapsed since the last second (in Unix time).
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.
This method complements getTimestampSec() to get a high resolution timestamp.
| void KUKA::FRI::TransformationClient::setTransformation | ( | const char * | transformationID, | |
| const double | transformationMatrix[3][4], | |||
| unsigned int | timeSec, | |||
| unsigned int | timeNanoSec | |||
| ) |
Provides a requested transformation matrix.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.
A transformation matrix has 3x4 elements. It consists of a rotational matrix (3x3 elements) and a translational vector (3x1 elements). The complete transformation matrix has the following structure:
[Transformation(3x4)] = [Rotation(3x3) | Translation(3x1) ]
All provided transformation matrices need a timestamp that corresponds to their time of acquisiton. This timestamp must be synchronized to the timestamp provided by the KUKA Sunrise controller (see getTimestampSec(), getTimestampNanoSec()).
If an update to the last transformation is not yet available when the provide() callback is executed, the last transformation (including its timestamp) should be repeated until a new transformation is available.
| FRIException | Throws a FRIException if the maximum number of transformations is exceeded. |
| transformationID | Identifier string of the transformation matrix | |
| transformationMatrix | Provided transformation matrix | |
| timeSec | Timestamp encoded as Unix time (seconds) | |
| timeNanoSec | Timestamp encoded as Unix time (nanoseconds part) |
| void KUKA::FRI::TransformationClient::setBooleanIOValue | ( | const char * | name, | |
| const bool | value | |||
| ) |
Set boolean output value.
| FRIException | Throws a FRIException if more outputs are set than can be registered. | |
| FRIException | May throw an FRIException if the IO is of wrong type, unknown or not an output. |
| name | Full name of the IO (Syntax "IOGroupName.IOName"). | |
| value | Boolean value to set. |
| void KUKA::FRI::TransformationClient::setDigitalIOValue | ( | const char * | name, | |
| const unsigned long long | value | |||
| ) |
Set digital output value.
| FRIException | Throws a FRIException if more outputs are set than can be registered. | |
| FRIException | May throw an FRIException if the IO is of wrong type, unknown or not an output. |
| name | Full name of the IO (Syntax "IOGroupName.IOName"). | |
| value | Digital value to set. |
| void KUKA::FRI::TransformationClient::setAnalogIOValue | ( | const char * | name, | |
| const double | value | |||
| ) |
Set analog output value.
| FRIException | Throws a FRIException if more outputs are set than can be registered. | |
| FRIException | May throw an FRIException if the IO is of wrong type, unknown or not an output. |
| name | Full name of the IO (Syntax "IOGroupName.IOName"). | |
| value | Analog value to set. |
| bool KUKA::FRI::TransformationClient::getBooleanIOValue | ( | const char * | name | ) | const |
Get boolean IO value.
| FRIException | May throw an FRIException if the IO is of wrong type or unknown. |
| name | Full name of the IO (Syntax "IOGroupName.IOName"). |
| unsigned long long KUKA::FRI::TransformationClient::getDigitalIOValue | ( | const char * | name | ) | const |
Get digital IO value.
| FRIException | May throw an FRIException if the IO is of wrong type or unknown. |
| name | Full name of the IO (Syntax "IOGroupName.IOName"). |
| double KUKA::FRI::TransformationClient::getAnalogIOValue | ( | const char * | name | ) | const |
Get analog IO value.
| FRIException | May throw an FRIException if the IO is of wrong type or unknown. |
| name | Full name of the IO (Syntax "IOGroupName.IOName"). |
friend class ClientApplication [friend] |
| All Rights Reserved © 2014-2019 KUKA Roboter GmbH, Germany |
created 27 Feb 2019 |


{% extends 'layouts/base.html' %} {% block title %} Error: Page Not Found {% endblock %} {% block content %}
The server made a mistake. Please contact an administrator.


What I want to see at WWDC
WWDC is Apple's "World Wide Developer Conference." It's where developers come to learn about what will be new in Apple's operating systems (iOS, iPad OS, MacOS, ETC.), and learn how to make the best of Apple's walled garden of tools to program apps. Tech reporters also come to the event, to gather all the news and distill it into the expected bite-sized, simple pieces. Be assured, my readers, that I will not hold anything back from you in my analysis of the event.
WWDC is not here just yet. I know, many news sites are predicting and yammering and getting all giddy with "what if" excitement. I won't bore you with such useless speculation just to fill the headlines and homepages. I fear that I lack the imagination and incentive to create such pieces. Besides, I'm more interested in what a device can do, and less about how it looks or feels.
However, I am Invested in Apple's operating systems. I do want to see Apple succeed in accessibility and think that, if they put enough work into it, and gave the accessibility team more freedom and staff, that accessibility would greatly improve. It is in that spirit that I give you my hopes, not predictions, for WWDC 2020. This "wishlist" will be separated into headings based on the operating system, and further divided into subsections of that operating system. After WWDC, I will revisit this post, and updated it with notes on WWDC if things change on the wishlist, and then do a post containing more notes and findings from the event.
MacOS
MacOS is Apple's general computer (desktop/laptop) operating system. With much tried and true frameworks and programs, it is a reliable system for most people. It even has functions that Windows doesn't, like the ability to select text anywhere and have that text spoken immediately, not screen reader needed, and remap keyboard modifier keys, and system wide spell checking. These help me greatly in all of my work.
Its screen reader is VoiceOver. It's like VoiceOver on the iPhone, but made for a complex operating system, and has some complex keyboard commands. Accessibility, like anywhere else, is not perfect on the Mac. There are bugs that have stood for a long time, and new bugs that I fear will hang around. There are also features that I'd love to see added, to make the Mac even better.
In short, MacOS accessibility isn't a toy. I want the Mac to be treated like it's worth something . From the many bugs, to missing features, the Mac really needs some love accessibility-wise. Many tech "reporters" say that the Mac is a grown and stable operating system. For blind people, though, the Mac is shriveled and stale.
Catalyst needs an accessibility boost
"Catalyst" is Apple's bridge between iPad apps and Mac apps. It allows developers, Apple included, to bring iPad apps to the Mac. Started in MacOS Mojave with Apple's own apps, Catalyst accessibility was... serviceable. It wasn't great, but there wasn't anything we couldn't do with the apps. It just wasn't the best experience. The apps were very flat, and one needed to use the VoiceOver custom actions menu, without the ability to use letter navigation, to select actions like one would using the "actions" rotor on the iPad.
Now, in Catalina, the Catalyst technology is available for third-party developers, but accessibility issues still remain. The apps don't feel like Mac apps at all, not even Apple's own apps. So, in MacOS 10.16, I hope to see at least Apple's own apps be much more accessible, especially if the Messages app will be an iPad catalyst app.
VoiceOver needs a queue
Screen readers convey information through speech, usually. This isn't new for people who are blind, but what may be new is that they manage what is spoken using a queue. This means that when you're playing a game and new text appears, the screen reader doesn't interrupt itself from speaking the important description of the environment just to speak that an unimportant NPC just came into the area.
VoiceOver, sadly, does not have this feature, or if it does, it hardly ever uses it. Now, it looks like the speech synthesis architecture has a queue built in, so VoiceOver should be using this to great effect. But it isn't. This means that doing anything complex in the Terminal app is unproductive. Even using web apps, which have VoiceOver speak events, can be frustrating when VoiceOver interrupts itself to say \"loading new tweets\" and such. It was so bad that the VoiceOver team had to give the option for a sound to play instead of the \"one row added\" notification for the mail app.
This is a large oversight, and it has gone on long enough. So, in MacOS 10.16, I desperately hope that VoiceOver can finally manage speech like a true screen reader, with a speech queue.
Insertion point at... null
Long time Apple fans may know what the insertion point is. For Windows, Android, and Linux users, it is the cursor, or Point. It is where you insert text. On Mac and iOS, VoiceOver calls this the insertion point, and it appears in text fields. The only problem is, VoiceOver says it appears on read‐only places, like websites in earlier versions of MacOS 10.15, and emails to this day.
VoiceOver believes that there is an insertion point in the email somewhere, but says that it is at "null", meaning that it is at 0, or doesn't exist. That's because there isn't one. This only appears when you are reading by element, VO + Right or Left arrow, and not when you are reading by line with just the up and down arrows, where there is a sort of cursor to keep track of where you are. But this cursor is, most likely, a VoiceOver construct, so it should know that when moving by element, there practically isn't one besides VoiceOver's own "cursor" that is focusing on things.
This bug is embarrassing. I wouldn't want my supervisor seeing this kind of bug in the technology that I use to do professional work. I stress again that the Mac is not a toy. Yes, it has "novelty" voices, and yes, some blind people talk like them for fun, or use them in daily work to be silly. I don't, though, because the Mac is my work machine. What's a computer, Apple asks? A Mac, that's what! I rely on this computer for my job, and if things don't improve, I'll probably move to Linux, which is the next best option for my workflow. Of course, things there don't improve much either, but at least the screen reader is actually used by its creator and testers, so silly bugs like that don't appear in a pro device. So, in MacOS 10.16, I hope that the accessibility team took a long vacation from adding stuff and spent a lot of time on fixing MacOS' VoiceOver so that I can be proud to own a Mac again.
I need more fingers
The Mac has so many keyboard commands, and letter navigation in all menus and lists make navigating the Mac a breeze. But some of the keyboard commands were clearly made for a desktop machine. I have a MacBook Pro, late 2019 with four Thunderbolt ports, but still the same Function, Control (remapped to escape), Option, Command, Space, Command, Option, Capslock (remapped to control because Emacs), keyboard layout. In order to lock the screen, then, with the normal keyboard layout (without remapping due to the touch bar and Emacs), I'd have to lock the screen by holding the command key with my right thumb, hold control with my left pinkie, and... and... how do I reach the Q? Ah, found it! I think. That may be A, or 1, though.
My point is, we blind people pretty much always use the keyboard. sure, we can use the track pad, but that's an option, not a requirement like the touch screen of an iPhone. Keyboard commands should be ergonomic, for every Mac model, not just the iMac. So, in Mac OS 10.16, I hope to see more ergonomic keyboard commands for MacBooks. I hope VoiceOver commands become more ergonomic as well, as pressing Control + Option + Command + 2 or even Capslock + Command + 2 gets pretty cramped. I know, the Touchbar means less keys, but my goodness I hate using those commands when I need to. And no, having us use the VoiceOver menu isn't a fix. It's a workaround. And no, having us use letter navigation to lock the screen or do any number of hard keyboard commands is not a fix, it's a workaround.
Find and replace Touchbar with Function keys
I've talked about the Touchbar in earlier articles, so I'll just give an overview here. The Mac does not have a Touchscreen. The Touchscreen is slower for blind people to use, and so is the Touchbar. We can't even customize it, as that part of system preferences is seemingly inaccessible to us. One Mac user said he has answers on how to use it well, but I asked him about it, and haven't seen a reply to my query. For now, then, the Touchbar is useless to me, and blind people who, like me, use their Macs to get work done.
Now, one place it could be good at is in Pages. While in Pages, the Touchbar acts like a row of formatting buttons. But there are keyboard commands for almost all of them, except for adding a heading. If the Touchbar were that useful everywhere else, it may have a place in my workflow. But I write all of my documents, when I can help it, in Markdown or Org-mode, inside Emacs or another text editor. So the Touchbar would be better gone from my MacBook, and replaced by the much more useful function keys, with tactile buttons that do one thing when pressed in each context, and I know what they'll do when pressed.
So, in a new model of the MacBook, I want the option to use regular function keys, even if it costs \$20 more. Either that, or give me a reason to use this useless touch strip that only acts to eliminate keys that VoiceOver can use and make keyboarding that much more limited. And no, an external keyboard is not a fix. It's a workaround.
Text formatting with VoiceOver
This applies to both MacOS and iOS, but it'd be more useful on the Mac, so I'm putting it here. As I wrote in my Writing Richly post, formatting is important for both reading and writing. I did send Apple feedback based on this, so I hope that in 10.16, I, and all other blind people, are able to read and write with as much access to formatting as sighted people.
What's that window say?
In MacOS Catalina, Apple added a little‐known feature to VoiceOver: the ability to get a "caption" from any element, or "control", on the screen.
iOS
There's nothing on the screen
There are many iOS apps that are very accessible. They work well with VoiceOver, and can be used fine by blind people. However, there are also many which appear blank to VoiceOver, so cannot easily be used. VoiceOver could use its already‐good text recognition technology to scan the entire screen if an element cannot be found with an accessible label, other than the app title. Then, it could get the location of the scanned text and items, and allow a user to feel around the screen to find them.
This could dramatically improve access to everything from games, to utility apps written in an inaccessible framework, like QT. May QT be forgotten, forever. So, in iOS 14, I hope that Apple majorly ramps up its use of AI in VoiceOver. Besides, that would put Google, the AI company, even further to shame, since they don't use AI at all in TalkBack to recognize inaccessible items or images.
Services
Apple Arcade for everyone
Apple Arcade came out some time last year. 100 games were promised around launch time, and at \$5 per month, it is an amazing deal, as you can play these games forever; there is no rotation like in XBox Game Pass. For now, though, there have been no games that blind people can play, so I just canceled my subscription, my hope in Apple dwindling further. So, in this year's WWDC, I hope that Apple not only adds accessible games to Apple Arcade, or even makes a few of their own, but shows them off. People should know that Apple truly cares, as much as a 1.5 trillion dollar corporation can, about accessibility and people who are blind, who cannot play regular, inaccessible games.
Conclusion
I hope this article has enlivened your imagination a bit regarding the soon‐to‐be WWDC 2020. I've detailed what I want to see in MacOS, my most often used Apple system, iOS, and Apple's services. Now, what do you want to see? Please, let me know by commenting wherever this article is shared.
Thanks so much for reading my articles. If you have any suggestions, corrections, or other comments, please don't hesitate to reach out to me. I eagerly await your comments.
Comments


{% extends 'base.html' %} {% load static %} {% block content %}
This is an application where you upload your applications and get them reviewed. The reviewing is conducted in terms of the design of your site,usability and the content.
Upload Site


Translation¶
The TranslationServiceProvider provides a service for translating your application into different languages.
Parameters¶
translator.domains (optional): A mapping of domains/locales/messages. This parameter contains the translation data for all languages and domains.
locale (optional): The locale for the translator. You will most likely want to set this based on some request parameter. Defaults to
en
.locale_fallbacks (optional): Fallback locales for the translator. It will be used when the current locale has no messages set. Defaults to
en
.translator.cache_dir (optional): Defines the cache directory if you want translations to be cached.
Services¶
translator: An instance of Translator, that is used for translation.
translator.loader: An instance of an implementation of the translation LoaderInterface, defaults to an ArrayLoader.
translator.message_selector: An instance of MessageSelector.
Registering¶
$app->register(new PrestoPHP\Provider\LocaleServiceProvider());
$app->register(new PrestoPHP\Provider\TranslationServiceProvider(), array(
'locale_fallbacks' => array('en'),
));
Note
Add the Symfony Translation Component as a dependency:
composer require symfony/translation
Usage¶
The Translation provider provides a translator
service and makes use of
the translator.domains
parameter:
$app['translator.domains'] = array(
'messages' => array(
'en' => array(
'hello' => 'Hello %name%',
'goodbye' => 'Goodbye %name%',
),
'de' => array(
'hello' => 'Hallo %name%',
'goodbye' => 'Tschüss %name%',
),
'fr' => array(
'hello' => 'Bonjour %name%',
'goodbye' => 'Au revoir %name%',
),
),
'validators' => array(
'fr' => array(
'This value should be a valid number.' => 'Cette valeur doit être un nombre.',
),
),
);
$app->get('/{_locale}/{message}/{name}', function ($message, $name) use ($app) {
return $app['translator']->trans($message, array('%name%' => $name));
});
The above example will result in following routes:
/en/hello/igor
will returnHello igor
./de/hello/igor
will returnHallo igor
./fr/hello/igor
will returnBonjour igor
./it/hello/igor
will returnHello igor
(because of the fallback).
Using Resources¶
When translations are stored in a file, you can load them as follows:
$app = new Application();
$app->register(new TranslationServiceProvider());
$app->extend('translator.resources', function ($resources, $app) {
$resources = array_merge($resources, array(
array('array', array('This value should be a valid number.' => 'Cette valeur doit être un nombre.'), 'fr', 'validators'),
));
return $resources;
});
Traits¶
PrestoPHP\Application\TranslationTrait
adds the following shortcuts:
trans: Translates the given message.
transChoice: Translates the given choice message by choosing a translation according to a number.
$app->trans('Hello World');
$app->transChoice('Hello World');
Recipes¶
YAML-based language files¶
Having your translations in PHP files can be inconvenient. This recipe will show you how to load translations from external YAML files.
First, add the Symfony Config
and Yaml
components as dependencies:
composer require symfony/config symfony/yaml
Next, you have to create the language mappings in YAML files. A naming you can
use is locales/en.yml
. Just do the mapping in this file as follows:
hello: Hello %name%
goodbye: Goodbye %name%
Then, register the YamlFileLoader
on the translator
and add all your
translation files:
use Symfony\Component\Translation\Loader\YamlFileLoader;
$app->extend('translator', function($translator, $app) {
$translator->addLoader('yaml', new YamlFileLoader());
$translator->addResource('yaml', __DIR__.'/locales/en.yml', 'en');
$translator->addResource('yaml', __DIR__.'/locales/de.yml', 'de');
$translator->addResource('yaml', __DIR__.'/locales/fr.yml', 'fr');
return $translator;
});
XLIFF-based language files¶
Just as you would do with YAML translation files, you first need to add the
Symfony Config
component as a dependency (see above for details).
Then, similarly, create XLIFF files in your locales directory and add them to the translator:
$translator->addResource('xliff', __DIR__.'/locales/en.xlf', 'en');
$translator->addResource('xliff', __DIR__.'/locales/de.xlf', 'de');
$translator->addResource('xliff', __DIR__.'/locales/fr.xlf', 'fr');
Note
The XLIFF loader is already pre-configured by the extension.
Accessing translations in Twig templates¶
Once loaded, the translation service provider is available from within Twig templates when using the Twig bridge provided by Symfony (see TwigServiceProvider):
{{ 'translation_key'|trans }}
{{ 'translation_key'|transchoice }}
{% trans %}translation_key{% endtrans %}


code.me
Daily Challenges
WELCOME
code.me
is a daily coding challenge. Here you will be able easily access tons of coding challenges to enhance your skills. Please enter your name below to get started.
Save


"Wildcard" evaluation:
Another super fun way to bypass direct blacklist filtering is to use question marks. Most linux distributions will evaluate
/root
and
/r??t
both as valid forms of /root. In this case, /r??t/roo?.txt can get the fllag, but the idea of bypassing using question marks remains the same
Symlinks
Symlinks are fun as well, whether on directories or files :)
Newline Command Injection
Good to read: nrpe cve command injection
CMD injection using newline characters
example: backup requires 3 parameters, the 3rd param of backup is being passed into this command: zip -r -p magicword %s %s > /dev/null. With bash newline breaks, we can pass
"junk
> /bin/bash
> junk"
and it will drop us into a shell (The third junk param is required to send junk > /dev/null instead of the output of /bin/bash.)
another way is to use printf to insert your newlines
Variable and Substring Substitution
If you have a badchar, try using something that evaluates to it instead. ie: can't use '/' in command injection, but HOME env variable is HOME=/. So you can use $(HOME) in place of /
find $(HOME) 2>$(HOME)dev$(HOME)null
Same trick, bash can use ${variable:<len>:<how many}
so if LANG=en_US.ISO8859-1
${LANG:13:1} will give us '1'
${LANG:13:2} will give us '-1'
etc
an alternate way is just to hex encode and print with printf
printf"\x41" Will print 'A'


JOSH, the alumni organisation of St.James Matric. Hr. Sec. School, is a steadily growing community of St.James Schools' alumni from the first batch of 1993 to the current batch of 2015.
| 1. |
Alumnus established in various fields can volunteer yourself |
| 2. |
Alumnus who can aid in collection and collation can also volunteer |
| 1. |
2015 batch passouts are required to enroll with Josh to avail the ID cards |
| 2. |
Fund raiser cycle for the academic year 2015-2016 : |
| 3. |
Alumnus will not be permitted in JOSH events without Alumni ID cards |


Product Details
-
Identify suspicious transactions with built-in fraud tools
-
Accept Visa, MasterCard, Discover and American Express
-
If you already have a payment processor, we will meet or beat your current rates
-
Live 24/7 customer support
-
Pay just 2.18% qualified + $.15 per transaction for most cards
-
Low rates for American Express – Pay as low as 2.3% and $.15 for retail transactions


public class AirlineHubManager
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
MultiPurposeList<FlightLeg> |
flights
List of flight between airports
|
MultiPurposeList<AirportHub> |
hubs
List of potential hubs
|
MultiPurposeList<FlightLeg> |
mst
List of edges for the minimum spanning tree
|
MinimumSpanningTreeFinder |
mstFinder
Minimum spanning tree finder
|
MultiPurposeList<Airport> |
ports
List of airports in the file
|
| Constructor and Description |
|---|
AirlineHubManager(java.lang.String fileName)
Starts the manager by attempting to open the specified file and
initializing the state fields
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getMinimumFlights()
Returns a string representation of the minimum flight connections
within a file
|
java.lang.String |
getPossibleHubs()
Returns a string representation of the possible airport hubs
within a file
|
boolean |
validRead()
Checks if the file was read correctly
|
public MultiPurposeList<Airport> ports
public MultiPurposeList<FlightLeg> flights
public MinimumSpanningTreeFinder mstFinder
public MultiPurposeList<FlightLeg> mst
public MultiPurposeList<AirportHub> hubs
public AirlineHubManager(java.lang.String fileName)
fileName
- the file to be openedpublic java.lang.String getMinimumFlights()
public java.lang.String getPossibleHubs()
public boolean validRead()