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 = [201,47,399]
# 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)
print "Chosen samples offset from mean:"
display(samples - np.around(data.mean().values))
print "Chosen samples offset from median:"
display(samples - np.around(data.median().values))
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:
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
categories = ['Fresh', 'Milk', 'Grocery', 'Frozen', 'Detergents_Paper', 'Delicatessen']
for cat in categories:
# TODO: Make a copy of the DataFrame, using the 'drop' function to drop the given feature
y = data[cat]
new_data = data.drop([cat], 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, y, test_size = 0.25, random_state = 1)
# TODO: Create a decision tree regressor and fit it to the training set
from sklearn.tree import DecisionTreeRegressor
regressor = DecisionTreeRegressor(random_state = 1)
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 of {} is {:.3f}'.format(cat, 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:
Well, since I am curiuous I predicted all of them with the following results in descendent order. A high R^2 implies that a feature is contained at a certain degree in the other features, making it irrelevant.
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:
We can see a correlation between all of the three categories previously stated: Milk, Grocery and Detergents. Confirming the assumptions stated above.
The data is all clearly skewed to the right, so the data 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');
display(log_data.describe())
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
repeated_index = {}
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)
# TODO: Calculate Q3 (75th percentile of the data) for the given feature
Q3 = np.percentile(log_data[feature], 75)
# TODO: Use the interquartile range to calculate an outlier step (1.5 times the interquartile range)
step = (Q3 - Q1) * 1.5
# 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))])
# Check the index that are repeated more than once
for i in log_data[~((log_data[feature] >= Q1 - step) & (log_data[feature] <= Q3 + step))].index:
if i not in repeated_index:
repeated_index[i] = 1
else:
repeated_index[i] += 1
# OPTIONAL: Select the indices for data points you wish to remove
outliers = []
for key in repeated_index.keys():
if repeated_index[key] > 1:
outliers.append(key)
print 'Outliners represented in 2 or more features: {}'.format(outliers)
outliers += [154, 95, 328, 75, 420, 142, 187, 86, 183, 325]
# Min 1.098612 4.007333 1.098612 3.218876 1.098612 1.098612
# Max 11.627601 11.205013 11.437986 11.016479 10.617099 10.777768
# Remove the outliers, if any were specified
print 'All Outliers: {}'.format(outliers)
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:
The data points _65, 66, 75, 128, 154_ are repeated more than once in the dataset, hence they should be removed from the dataset due to them affecting more than one entry point. It has a greater damage than those that only affect one.
Points being removed for being the min in their category:
- _Data Point 161_.- Value of 1.098612. Feature Detergents_Paper.
- _Data Point 95, 338.- Min element for Fresh (1.098612).
- _Data Point 154_.- Min element for Milk (4.007333)
- _Data Point 75_.- Grocery (1.098612)
- _Data Point 420_.- Frozen (3.218876)
- _Data Point 142, 187_.- Delicatessen (3.218876)
Points being removed for being the max in their category:
- _Data Point 86_.- Min element for Milk (11.205013)
- _Data Point 325_.- Frozen (11.016479)
- _Data Point 183_.- Delicatessen (10.777768)
A simple procedure for deleting outliers was placed, deleted the min and max elements in the dataset __that are considered outliers__ and delete those who are present in more than one category.
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).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.
print pca_results['Explained Variance'].cumsum()
Answer:
The variance for the first two columns equals 71.80%. The first four components equate for 93.35% of the variance.
In terms of each specific dimension:
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).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'])
print 'done'
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?
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:
I will use the Gaussian Mixture model, due to the uncovered relationships between certain features. Also, after applying a log function to normalize the data points might end up in clusters they do not belong due to the underlying proximity.
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.from sklearn import mixture
from sklearn.metrics import silhouette_score
def get_gmm(n_comp):
# TODO: Apply your clustering algorithm of choice to the reduced data
clusterer = mixture.GMM(n_components = n_comp).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
score = silhouette_score(reduced_data, preds)
print 'Silhouette score for {} components is {}'.format(n_comp, score)
return preds, centers, sample_preds
Report the silhouette score for several cluster numbers you tried. Of these, which number of clusters has the best silhouette score?
for x in range(2, 10):
get_gmm(x)
Answer:
The scores an be seen above. The best obtained score was 2 components with a score of 0.419983017307
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
preds, centers, sample_preds = get_gmm(2)
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
print 'Centers information:'
display(true_centers)
print 'Orginal data description (without outliers):'
data_no_outliers = data.drop(data.index[outliers]).reset_index(drop = True)
display(data_no_outliers.describe())
print "Centers offset from mean"
display(true_centers - np.around(data_no_outliers.mean().values))
print "Centers offset from median"
display(true_centers - np.around(data_no_outliers.median().values))
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 other words, we can divide the groups into providers of goods (which buy fresh and frozen items that are placed in shelves) and those who use the supplies to create food.
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:
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:
We can not assume the change will affect all customers equally. Based on the two segments we can make assumptions to be tested. Our assumption would be that the customers on segment 0, retail, will be benefited by a 3 days a week delivery based on the lack of need of daily fresh food and storage capacity to hold more product volume if needed. This will also improve their efficiency by having less product to manage and overall less work. However, segment 1 should remain with a 5 days a week model.
However, we could not assume all the customers inside each cluster have the same needs. In order to test the selected assumptions, we will select a specific numbers of customers in each cluster and put all those customers in a 3-day delivery service and evaluate their reactions. Two different non-parallel A/B tests should be created under the following principles.
This will give us a better representation of the customer reaction to the new delivery service by obtaining data points from all areas of the clusters. Based on the data, the above hypothesis can be tested.
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 already defined two different clusters with their separate characteristics, we can convert this problem into a supervised classification problem, in which the segment number would be the feature. The new information would be used to predict the appropriate cluster.
Since we have only two posible clusters this could be solve with a binary classifier.
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 number of clusters used on my algorithm is consistent with the above distribution. The algorithm also generalises well the overall distinction between the two clusters close to the 0.5 mark of the first dimension. We can also observe more overlapping HRC in the retailer side, possible due to the wide range this areas cover.
From the [-2] mark to the left we could consider all the data points as purely HRC and from the other side we can consider the right side of the 3 mark on the first dimension as purely retail.
I would consider this distributions as consistent with the ones obtained before due to the clear pattern that can be observed on both the previous definition and the new one. There are some overlaps, but overall we obtained a consistent pattern.
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.


Every DOI resolves to a URL. Knowing where DOIs point can help identifying scholarly content where the DOI isn't known.
We take a representative sample of DOIs from each Crossref member and resolve them to see where they lead. Sometimes a publisher website can redirect several times. We store the first and last redirect.
As the data is taken from a sample of DOIs, we can't guarantee that the coverage is perfect. There may be publisher domains that we haven't covered. The data is continually updated.
{{num-dois}} DOIs, an average of {{average-dois-per-member}} per member
{{num-domains}} Domain names
Download{{num-members}} members
Download
This is a Crossef Labs project. The code is open source. You can contact us a labs@crossref.org


This is exactly what it means. Anything? Commentary about particular trails you like? Any new cool or amazing tires you swear by? Opinions/additions about new technology or gear that's out there? Please feel free to give your thoughts! They are welcome here. Just keep it ..... bike related, ya know?


New Tab Tweaker
New Tab
Notification
Advanced
When opening a new tab
Display a custom page
Redirect to a specified URL
Redirection
Go to
Background
Use
as background color
Fade the background color in over
seconds
(max 5)
Wallpaper
Display a wallpaper image
(one image URL per line, a new tab will display one chosen at random)
Import from Imgur...
Download as a text file...
Wallpaper scaling:
Automatic
Fill
Fit
None
Stretch
Fade the wallpaper image in over
seconds
(max 5)
Top sites
Show always
Show on request
(click anywhere inside a new tab to reveal)
Hide
Updates
Do notify me about new features proceeding an update
Select a theme
Light
Dark
Back to basics
Reset all options back to their default values
Something's not working? Got a question and/or suggestion?
Post it here
[error messages are displayed here]
Import URLs from Imgur
Album/gallery:
Import?


This package contains both a Lepcha keyboard and the Mingzat font.
There are a number of Lepcha fonts available, including:
More information at: http://software.sil.org/Mingzat


|
|
EatFit links www.MyPyramid.gov Want to know what the government has to offer? This site can help. Agencies, topics, and resources are listed. Kids Gardening Want to get growing? The national gardening association web site has what you need. Fight BAC! Have you ever eaten bacteria? You betcha! This site can tell you how to prevent yourself from eating too many. USDA Food Pyramids What am I supposed to be eating? If you don't know the answer check out these downloadable food guide pyramids. USDA ag for kids Where does your food come from? Duh! Farmers! Find out how they do it here. University of Connecticut Rate your plate game. Can you create a balanced meal. Give it a try. Games Kids Play Bored no more! This site has tons of fun games to play with your friends. Chiquita You'll go bananas for this site! Check out the puzzle and the archive of stickers. Dole 5-a-day Test your skills at the 5 a day puzzle chest. Carl's Jr Want to see just how many calories your double western bacon cheeseburger had?  Teen Matters Want to know what happens if you take steroids? Or what happens if you dont eat? Learn how to respect your body. Teens matter at teen matters.com |
|
| Home | Eating Analysis | Games | Links | Recipes | Challenge Tips | Success Stories | © 2007 - Regents of the University of California If any of these links no longer work, please let us know at<EMAIL_ADDRESS>|


There are several requirements for generating the metrics used by KaTeX.
You need to have an installation of TeX which supports kpathsea. You can check
this by running tex --version
, and seeing if it has a line that looks like
kpathsea version 6.2.0
You need the Perl module JSON
. You can install this either from CPAN
(e.g. using the cpan
command line tool: cpan install JSON
)
or with your package manager.
You need the Python module fonttools
. You can install this either from PyPI
(using easy_install
or pip
: pip install fonttools
)
or with your package manager.
Once you have these things, run the following command from the root directory:
sh ./docker/fonts/buildMetrics.sh
which should generate new metrics and place them into fontMetricsData.json
.
You’re done!


Surname
Firstname
Middlename
You are
male
female
Age
Country of Residence
Россия
США
City
Ryazan
Moscow
Photography
Title
Web Master
Database Administrator
Computer-aided design
Economic Planning
Management accounting
Budgeting and planning
Salary
Tell us about yourself...
Site
Email
Phone
Password


Cranky Critic® movie reviews: The Bone Collector Rated [R], 118 minutes Starring Denzel Washington, Angelina Jolie, Queen Latifah, Luis Guzman, Michael Rooker and Ed O'Neill Screenplay by Jeremy Iacone Based on the book by Jeffery Deaver Directed by Philip Noyce website: www.thebonecollector.com
The Bone Collector falls into the realm of Thriller, rather than the slice ‘n' dice generic horrorflick we've gotten used to over the last bunch of years. In it, Denzel Washington stars as Lincoln Rhyme, a quadriplegic police detective who has lost the will to live and Angelina Jolie as Amelia Donaghy, the able bodied cop who finds herself unwillingly doing all the leg work that he cannot.
Does that sound like a movie pitch line, or what? Of course it does. But with an A-list name above the credits, you expect more than special effects, and Denzel Washington is too smart an actor, and too intelligent a human being -- we've met him. The dude's cool -- to cheaply exploit a disabled character. Washington told us in his StarTalk that, as an actor "I realized what a challenge it could be; we didn't even know, going in, if it would work, playing a guy that doesn't move, could only move one finger, and was essentially a talking head. The question is: How do you make that interesting?"
You leave it to the writer, in this case Jeremy Iacone adapting the novel by Jeffery Deaver, to come up with something interesting and compelling. If the supporting cast is too small, you make the murders especially gruesome and the mystery they present especially twisted. In this case that means someone is roaming the New York City streets, kidnapping the innocent and carving ‘em up right down to the bone. It isn't the cutting that kills the victims, it's what happens to them afterwards 'cuz the killer is far too creative a sadistic sumbitch for that. Small clues left at the scene, things that only an expert forensic cop like Washington's Rhyme would understand, are deliberately left behind.  Jolie's character, who has an instinctive feel for forensics work, is essentially ordered into the story. Rhyme still commands a full range of police support -- Ed O'Neill as his former partner; Luis Guzman as a high tech criminologist; Michael Rooker as the police commander adversary who has problems with a cripple running `his officers' all around the City -- and has enough insurance to cover a full time medical aide (Queen Latifah, who is especially good). As the murders get increasingly, um, disgusting, Donaghy finds that her cop instincts are exactly what the guy in the bed told here they were. Real good.
The Bone Collector gets gory but thankfully director Philip Noyce allows most of the truly gruesome stuff to happen offscreen. That doesn't make seeing the results any easier, but the flick never degenerates into a standard slice ‘n' dice. If that's what turns you were hoping for, you are in need of serious mental help.
Those of you that have read the history page have probably figured out that Cranky was paralyzed for a while -- I was wide awake for the very brief time when my status went from para to quadriplegic and there's nothing more terrifying than that. Long time readers also know that I'll nail any flick that screws with the medical aspects of spinal injuries. There's nothing to nail in this flick. The details are all there, if you're looking for them but they're all subjugated to the murder-mystery story, which is pretty damn good. Unlike most adaptations, what made it from the print page to the screen holds together pretty well.
On average, a first run movie ticket will run you Eight Bucks. Were Cranky able to set his own price to The Bone Collector, he would have paid...
$5.00
Hmm... dateflick level for a gory murder mystery. Must be something about the chemistry between Washington and Jolie that makes it a couples flick.
The Cranky Critic® is a Registered Trademark of, and Copyright © 1999 by, Chuck Schwartz. All Rights Reserved. Cranky on the web at www.crankycritic.com
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


AdobeUXImageEditorViewController Class Reference
| Inherits from | UIViewController |
| Declared in | AdobeUXImageEditorViewController.h |
Overview
This class encapsulates the Adobe Image SDK photo editor. Present this view controller to provide the user with a fast and powerful image editor. Be sure that you don’t forget to set the delegate property to an object that conforms to the AdobeUXImageEditorViewControllerDelegate protocol.
Tasks
Other Methods
-
– initWithImage:
-
delegate
property -
isImageModified
property
Deprecated Methods
-
+ setPremiumAddOns:
-
)
property
InAppPurchase Methods
HighResolutionOutput Methods
Properties
)
An AdobeImageEditorSession instance that tracks user actions within the photo editor. This can
be used for high-resolution processing. Usage of this property for generating high resolution output
has been deprecated in favor of the enqueueHighResolutionRenderWithImage:maximumSize:completion:
and enqueueHighResolutionRenderWithImage:completion:
methods.
@property (nonatomic, strong, readonly) AdobeImageEditorSession *DEPRECATED_MSG_ATTRIBUTE ( "This property has been deprecated for high resolution output " "in favor of -enqueueHighResolutionRenderWithImage:completion." )
Discussion
An AdobeImageEditorSession instance that tracks user actions within the photo editor. This can
be used for high-resolution processing. Usage of this property for generating high resolution output
has been deprecated in favor of the enqueueHighResolutionRenderWithImage:maximumSize:completion:
and enqueueHighResolutionRenderWithImage:completion:
methods.
Declared In
AdobeUXImageEditorViewController+Compatibility.h
Class Methods
inAppPurchaseManager
The handler object for purchasing consumable content. In order for in-app purchase to function correctly, you must add the object returned by this method as an observer of the default SKPaymentQueue. In your app delegate’s -finishedLaunchingWithOptions: method, you should call startObservingTransactions on the in app purchase manager.
+ (id<AdobeImageEditorInAppPurchaseManager>)inAppPurchaseManager
Return Value
The manager.
Discussion
The handler object for purchasing consumable content. In order for in-app purchase to function correctly, you must add the object returned by this method as an observer of the default SKPaymentQueue. In your app delegate’s -finishedLaunchingWithOptions: method, you should call startObservingTransactions on the in app purchase manager.
Please see the iOS SDK In-App Purchase Guide for more information about in-app purchases.
See Also
Declared In
AdobeUXImageEditorViewController+InAppPurchase.h
setPremiumAddOns:
This method is provided purely for compatibility with the legacy Aviary SDK. Calls to this API have no effect. High resolution output is now free for all SDK integrations. White labelling is no longer offered in the Creative SDK.
+ (void)setPremiumAddOns:(AdobeImageEditorPremiumAddOn)premiumAddOns
Parameters
- premiumAddOns
bitmask of the add-ons to enable
Discussion
This method is provided purely for compatibility with the legacy Aviary SDK. Calls to this API have no effect. High resolution output is now free for all SDK integrations. White labelling is no longer offered in the Creative SDK.
Declared In
AdobeUXImageEditorViewController+Compatibility.h
Instance Methods
enqueueHighResolutionRenderWithImage:completion:
Replays all actions made in the generating AdobeUXImageEditorViewController on the provided image.
- (id<AdobeImageEditorRender>)enqueueHighResolutionRenderWithImage:(UIImage *)image completion:(AdobeImageEditorRenderCompletion)completion
Parameters
- image
The image to replay the edits on.
- completion
The block to be called when the image’s render is complete.
Discussion
Replays all actions made in the generating AdobeUXImageEditorViewController on the provided image.
The completion block will be called when the render has finished and the result
parameter will
contain the edited image. If the user pressed “Cancel” or took no actions before pressing “Done”,
the result
UIImage in the completion block will be nil and the appropriate error
parameter
will be provided. If the render is cancelled by developer action, then the completion block will
be called with a nil result
parameter and the appropriate error
parameter.
Warning: Calling this method from any thread other in the main thread may result in undefined behavior.
Declared In
AdobeUXImageEditorViewController.h
enqueueHighResolutionRenderWithImage:maximumSize:completion:
Replays all actions made in the generating AdobeUXImageEditorViewController on the provided image.
- (id<AdobeImageEditorRender>)enqueueHighResolutionRenderWithImage:(UIImage *)image maximumSize:(CGSize)maxSize completion:(AdobeImageEditorRenderCompletion)completion
Parameters
- image
The image to replay the edits on.
- maxSize
The size to resize the input image to before replaying edits on it.
- completion
The block to be called when the image’s render is complete.
Discussion
Replays all actions made in the generating AdobeUXImageEditorViewController on the provided image.
The provided image will be resized to fit within the maxSize
parameter provided before any edits
are performed.
The completion block will be called when the render has finished and the result
parameter will
contain the edited image. If the user pressed “Cancel” or took no actions before pressing “Done”,
the result
UIImage in the completion block will be nil and the appropriate error
parameter
will be provided. If the render is cancelled by developer action, then the completion block will
be called with a nil result
parameter and the appropriate error
parameter.
Warning: Calling this method from any thread other in the main thread may result in undefined behavior.
Declared In
AdobeUXImageEditorViewController.h


As the first installation, please create a SITE. (A site is a cluster/service which you want to monitor, as a quick start, you could use sandbox by default)
SITE
sandbox


Home
My Password
Welcome:
litc
Logout
Add Password
Set Secret
site
username
password
Operation
{{d.Site}}
{{d.Username}}
{{ d.decoded ? d.Secret: 'show password' }}
Delete
Update
Please Set Your Secret
Set
Secret too short may not safe!
Add Password
Add A Password
Site
Username
Password
generate pasword
OK
Cancel
Update Password
Site
Username
Password
OK
Cancel
You Need Set Secret
Go To Set Secret


While doing a server update and upgrade today at 18:40 (uk) to emoncms.org, I needed to reboot the server, unfortunately the server hasnt come back online. I've contact the technical support at the server hosting and they are looking into it. I will update with progress as soon as I can.
»
Re: Emoncms.org server outage [SOLVED]
The server company are running hardware diagnostic tests. Im waiting for the conclusion
Re: Emoncms.org server outage [SOLVED]
Ok, the machine has been upgraded with a DRAC enterprise card which gives me virtual KVM access to the server, its getting to the boot os selection screen where you can either boot normally into ubuntu which fails or boot into recovery mode which gets a bit further before stopping at a warning that the RAID is degraded, I've sent another ticket to the server company and will update as this progresses.
Re: Emoncms.org server outage [SOLVED]
Progress, after booting in degraded mode, I now have normal ssh access to the server and it all looks fine. Now I need to work out why one of the disks was degraded either fix it or move the whole server to a new one.
Re: Emoncms.org server outage [SOLVED]
Hi Tristan,
I am running emoncms on a Raspberry Pi, and forwarding to emoncms.org
Last night, I noticed that emoncms on the Raspberry Pi was sometimes reporting that the RFM12 to Pi interface was not running, and the inputs were not updating - sometimes for several tens of minutes.
I eventually tracked down the rfm12piphp.log and realised that it was full of errors trying to open the socket to emoncms.org (and I then found this thread on the forum!).
Is there anyway in which emoncms could be made more responsive in this scenario, as I lost a lot of data during the downtime?
Re: Emoncms.org server outage [SOLVED]
Same here emgeeaitch, it's not very often that emoncms.org goes down, but whenever it does, my system also grinds to a halt too.
I lost about 3hrs of local data, before I returned home and removed the API key.
Re: Emoncms.org server outage [SOLVED]
Trysyan,
Sorry to hear that you are having server problems. Emoncms is great!
One thought, it appears if you are using the RaspberryPI with emoncms it stops polling for data from the Arduinos if the *main* Emoncms server is down.
Would it be possible in a later RaspberryPI software revision to get the RaspberryPI (running emoncms) to continue to poll and log locally if the main emon server is down?
Best
Andy
Re: Emoncms.org server outage [SOLVED]
Yes I think we need to add a timeout to the rfm12piphp script, so that it doesnt keep waiting on the connection, Im not sure if this is an issue with the python gateway however?
To be safe, I've ordered and am now configuring a new server that has hardware rather than software raid and a few other improvements, double the disk capacity. I hope to get this up in the next few hours.
Re: Emoncms.org server outage [SOLVED]
The problem is the timeout connection in oemgatewaybuffer.py :
result = urllib2.urlopen(url_string, timeout=60);
either you change it with shorter value i.e 10 seconds or it should be done in a separated thread but it involves different management of the buffer.
Ciao.
Re: Emoncms.org server outage [SOLVED]
Yes a separate thread would be a good way to do it, Il add an issue to the new emonhub development repo to discuss it.
Server migration is going well, 45GB o 63GB has been copied, there's a lot of small files which makes it relatively slow.
Re: Emoncms.org server outage [SOLVED]
Getting very close now, just doing final testing to ensure everything is working as it should before I reconfigure the dns records to point to the new server
Re: Emoncms.org server outage [SOLVED]
Im happy to say emoncms.org is back online! sorry for the interruption
Re: Emoncms.org server outage [SOLVED]
and thankyou everyone for your patience
Re: Emoncms.org server outage [SOLVED]
Thanks for your efforts Trystan you could probably do with a kip now :)
Re: Emoncms.org server outage [SOLVED]
Thanks for all the time and effort you have put into restoring what is after all a free service. I'm sure you've probably got better things to be doing on a Bank Holiday weekend.
Andy.
Re: Emoncms.org server outage [SOLVED]
Servers are like children: they always feel sick during the night or in the week ,
;-)
Re: Emoncms.org server outage [SOLVED]
.....or when Glyn goes climbing mountains!
Paul


I am Pakistani-American and reside in Long Island, NY. I am a senior at Stony Brook University and expect to graduate in May 2021 with my Bachelors in Computer Science. I love watching and playing sports! Basketball is my favorite sport to watch, but being a Knicks fan makes that very difficult at times. I love playing sports and the feeling of competition invigorates me. Another hobby of mine is playing the piano. I've always been a fan of technology and curious about the behind- the-scenes since I was young, and that fuels my passion for programming today.
My Programming SkillsAlways willing to learn as needed!


{{extend 'layout.html'}}
{{=T("Stay motivated by seeing your friends competitive programming progress. Add friends to see their submissions on various Competitive Programming websites (currently Codeforces, Codechef, Spoj, HackerEarth, HackerRank, UVa).")}}
{{=T("Get notifications of your friends' Day Streak everyday not just from a single Competitive Programming website but from all the sites.")}}
{{=T("What if your friend is not on StopStalk? - You should invite him / her or just add a Custom Friend to track their progress ")}} {{=T("if you know there handles across various Competitive Programming websites.")}}
{{=T("List of contests on various Competitive programming websites and an option to add a reminder half-an-hour before the contest starts.")}}
{{=T("Filter out the submission that you need and directly View / Download / Copy submission directly from StopStalk.")}}
{{=T("A carefully crafted formula is used to compute")}} StopStalk Rating {{=T("and rank users on the basis of this rating. One rating cumulative of all the 6 Competitive Programming websites. This rating incorporates submissions per day and your rating changes everyday, which keeps you motivated to stay connected to Competitive Programming")}} :)
{{=T("What are the problems your friends are solving across these sites ? What are globally trending problems that other coders are solving ? We just got a list of such problems.")}}
{{=T("Why go only to a specific site and search problems with specific tags ? Search across such sites and see the number of submissions, accuracy, who solved them, tags, etc. Search any tag and get all the problems with that tag.")}}
{{=T("Accurately filter out submissions you are looking for across your friends or globally. The filters include user name, problem name, submission status, language of submission, submission site, start and end date.")}}
{{=T("A unique and cumulative profile page across Competitive programming websites with overall accuracy, sitewise accuracy, streaks, contest rating graphs and calendar of submissions.")}}


Blot is constantly improved and there are plenty of features planned. Do contact me if you have any ideas!
An app to turn raw links to Soundcloud into the play widget
Image optimizer & resizer to prevent massive images
Custom metadata for each entry
Enable markdown footnotes.
Date parser localized for your timezone
Store number of reads for each entry
Generate list of most-read entries & related entries.
Use Blot's CDN for each blog's CSS and JS.
Open source Blot's templates & apps.
Write your own plugins
Blot API
Native comments
Preview an entry before publishing – More
Generate a list of tags used across your blog – More
Schedule a future publish date
Simple layout tags – More
Image posts
Emoji support!


Gobbler Grind Marathon
Overland Park KS/USA
Website: gobblergrindmarathon.com
Race Winners
(21 runnings)
18
Nov
2007
19
Nov
2006
20
Nov
2005
21
Nov
2004
23 Nov
2003
24
Nov
2002
2001
19
Nov
2000
21 Nov
1999
1998
1997
Notes: 1997 was the inaugural year. The course was moved to Corporate
Woods in Overland Park in 2006. For 2005 and earlier, the course was
point-to-point.
12
Nov 2017
2:46:38
Daniel Ray (NJ/USA)
3:19:12
Emily Schoenfeld (KS/USA)
13
Nov 2016
2:52:09
Tyler Polshak (KS/USA)
3:05:11
Jennifer VandeVegte (IA/USA)
08 Nov
2015
2:43:47
Raul Manzanares (NM/USA)
3:19:13
Amanda Salzman (KS/USA)
09 Nov
2014
2:42:02
Stephen Saylor (MO/USA)
3:27:47
Sarah Graves (MO/USA)
24
Nov 2013
2:42:24
Justin Gillette (MI/USA)
3:14:41
Ashley Degen (KS/USA)
18
Nov 2012
3:00:24
Omondi Owallah (USA)
3:22:21
Jill Burch (USA)
20
Nov 2011
2:39:25
Chuck Engle (OR/USA)
3:10:19
Allison Marquis (USA)
21
Nov 2010
2:44:14
Thomas Zunie (USA)
3:32:26
Emily Kazmaier (USA)
22 Nov
2009
2:37:20
Aaron Davidson (USA)
3:14:49
Allyson Weimer (OK/USA)
23 Nov
2008
2:49:08
Joe O'Neill (USA)
3:13:22
Kyla Berendzen (ID/USA)
2:47:11
Robert Lowers (USA)
3:25:38
Elizabeth Fox (USA)
2:48:09
Derek Ganzenmuller (36,NY/USA)
3:12:06
Maureen Larsen (NE/USA)
3:01:45
Alex Luedtke (USA)
3:24:41
Lenna Kirby (OH/USA)
2:53:21
James Cera (MO/USA)
3:24:20
Jennifer Mullen (KS/USA)
3:06:00
Terry Anderson (MO/USA)
3:06:52
Tracy Thelan (CO/USA)
2:55:13
Tony Krupicka (CO/USA)
3:40:35
Mary O'Brien (IA/USA)
2:34:35
Gregory Bomhoff (KS/USA)
---
n/a
2:39:21
Dave Dixon (IA/USA))
3:14:06
Mikki Massey (MO/USA)
---
Steve Uhl (USA)
---
n/a
---
n/a
---
n/a
---
Eric Peters (USA)
---
n/a
Most Wins
(1997/date)
Men
No man has won more than once, according to
available information.
Women
No woman has won more than once, according to
available information.
Prize Money
(ADR qualified runners)
No information on prize money has been received for this race.
Race Time Bias
(sec/km)
Insufficient data to calculate the race time bias.
Competitive Level
(1990-date)
Insufficient data to calculate the competitive level.
Quality Performances
Men
No men under 2:20
Women
No women under 2:50
Finishers
Year Men Women M+F 2017 128<PHONE_NUMBER> 134 86 220 2015 120 72 192 2014 93 58 151 2013 102 61 163 2012 98 67 165 2011 157 82 239 2010 161 81 242 2009 156 78 134 2008 121 62 183 2007 170 74 244 2006 119 66 185 2005 109 46 155 2004 100 51 151 2003 64 46 110 2002 46 22 68 2001 2000 81 32 113 1999 1998 1997 Sums 1958 1087 3045 M/F 1.80
Last Updated on
16 Nov 2017
Contributor: Klaas Loonstra (3)


It’s been a while since I had to work with Jenkins directly (since I started on OpenStack, really). However, I had a few tricks picked up around plugins for Chrome that make working with pre-3.0 Jenkins a little more pleasant.
BuildReactor
This provides a current statuses of a user-defined number of Jenkins jobs. It also gives notifications when projects pass/fail.
Installation
Install from the Chrome store. Once installed, “Add” a new view, give it a name (i.e. “Open vSwitch”) and configure the following settings:
Server: jenkins.example.com:8080
User: [leave empty]
Pass: [leave empty]
Substitute the appropriate URL for your local server. Once done, select the “Show” button, and select which of the projects you want to display. Then “Save”. You should now be able to get an overview of your builds by clicking on the toolbar icon. You should also get notifications. This is easier to parse than the emails, IMO.
Doony
This provides a new, ultra-usable stylesheet for Jenkins. IMO it makes Jenkins easier to work with.
Installation
Follow the guide on the README. When modifying the manifest.json
file, add
the following URLs:
"matches": [
"https://jenkins.ci.cloudbees.com/*",
"http://localhost:8080/*",
"https://jenkins.example.com:8080/*",
"http://jenkins.example.com:8080/*",
"https://jenkins.example.com/*",
"http://jenkins.example.com/*",
],
Substitute the appropriate URL for you local server. Don’t forget to “reload” the plugin once installed.


Nikki Webster Knows ‘Strawberry Kisses’ Is Your Drunk Anthem, & She’s Cool With It
by By Louis HansonIt may be another dreaded Monday, but never fear – Mondays now also signal another episode of 15 Minutes, the Facebook Watch series in which we travel around Oz each week reliving the most iconic viral moments in history, and those responsible for them.
This week, comedian and co-host Lucinda Price caught up with none other Nikki Webster at her dance studio, Dance @ Nikki Webster, to discuss pre-social media fame, “Strawberry Kisses” and all that nostalgic Olympics glory. Oh, and to learn a couple new moves, of course (Lucinda will now be a fiend on the dance-floor at work’s upcoming Christmas party).
During the visit, Nikki identified the three main types of “Strawberry Kisses” listeners.
“I get the young kids whose parents have shown them the song and they fall in love with it, which is awesome,” she said.
“Then I get the mums who loved it as they were growing up, which is pretty cool.”
“And then I get the drunks… when you’re out, trying to be funny with it… but to me it’s all pretty cool – they all know the words. So hey, I won!” Win, you absolutely did.
I’m just thankful that us faithful drunk listeners are getting the recognition we deserve. I mean, “Strawberry Kisses” is, without fail, an instant crowd pleaser at any Prosecco-fuelled house party – you simply cannot help but stan a timeless drunk bop.
Check out the full chin-wag below.
In the mood to catch up on all of that 15 Minutes meme goodness? Feast your deserving eyes…
- Episode 1 featuring Mick Merhi AKA “Not Bhed, Good Soyze”
- Episode 2 with ol’ mate Will “Egg Boy” Connolly
- Episode 3 with human reaction GIF Josh Saunders
- Episode 4 with rapper-turned-app-maker Ur Boy Bangz
- Episode 5 with everyone’s favourite runner-up Shannon Noll
- Episode 6 with Olympic gold medallist Steve Bradbury
- Episode 7 with Zyzz‘s brother Chestbrah
- Episode 8 with ‘Aussiest interview ever’ guy Daniel McConnell
- Episode 9 with ‘Porque No Los Dos Girl’ Mia Agraviador
- Last week’s episode with the adorable Yiayia Next Door
Catch a new episode of 15 Minutes every Monday at 7pm – only on Facebook Watch.
Image: 15 Minutes / Facebook Watch


| Predefined variables take the following values: |
| ${PACKAGE_NAME} |
|
Name of the package in which the new file is created |
| ${USER} |
|
Current user system login name |
| ${DATE} |
|
Current system date |
| ${TIME} |
|
Current system time |
| ${YEAR} |
|
Current year |
| ${MONTH} |
|
Current month |
| ${MONTH_NAME_SHORT} |
|
First 3 letters of the current month name. Example: Jan, Feb, etc. |
| ${MONTH_NAME_FULL} |
|
Full name of the current month. Example: January, February, etc. |
| ${DAY} |
|
Current day of the month |
| ${DAY_NAME_SHORT} |
|
First 3 letters of the current day name. Example: Mon, Tue, etc. |
| ${DAY_NAME_FULL} |
|
Full name of the current day. Example: Monday, Tuesday, etc. |
| ${HOUR} |
|
Current hour |
| ${MINUTE} |
|
Current minute |
| ${PROJECT_NAME} |
|
Name of the current project |


BusMall Survey
Hello and welcome to the BusMall Survey! In order to provide you the best experience, we are asking for your help. We want to know out of these select items what would you prefer? This is to ensure that we can provide the best of the best as quickly and effeciently as possible and we value your input! Click on the above images as they are shown and at the end you will see where all of your results in a nifty chart!


Jenn and Anand met in graduate school in 2006. At that point, becoming romantically involved was nowhere on our emotional radar. But, throughout our year in Cambridge, we caffeinated together early and often, watched movies when we should have been studying, pulled compensatory all-nighters, became enamored of the same professors, ate eggs at strange hours, debated trivial matters passionately, and browsed bookstores (as all annoying grad students do). Anand convinced Jenn to abandon previous plans so she could attend “Ugly Sweater Night” at a pub near his apartment. Jenn wrote one of Anand’s letters of recommendation for his first teaching job. Anand habitually stood in the frigid New England twilight, advising Jenn on seemingly pressing love conundrums. Jenn scolded Anand about the love conundrums that he didn’t even know he had.
In the years after grad school, we kept in touch, proffering late-night advice on dating and teaching, and taking weekend trips to Montreal, Washington, D.C., and San Diego. During that time, Anand worked at The Park School of Baltimore, where students are encouraged to call teachers by their first names and to speak their free minds to any passing stranger, while Jenn taught at a boarding school near Boston, providing grammatical instruction to well-coiffed young aspirers to the ruling class. Three years ago, in a fit of fury over something too boring to elucidate, Jenn left Milton Academy to work at Anand’s more progressive school, where we both currently teach. We’ve been roommates since June 2011, involved in top-secret “workplace fraternization” since December 2012, and engaged since December 2013.
Although we’ve been arguing with each other for over seven years, we still enjoy bickering over the best way to load the dishwasher, the ethics of the organic movement, how much cheese (both actual and aesthetic) one can reasonably consume without intervention, and whether certain movie characters should be abhorred for their shallowness or tolerated for their realism. Ever since we met, we’ve been accused of behaving like “an old married couple,” and we are excited to start fully inhabiting that old cliché, in all of its unpredictable vexations and delights.
Before embarking upon new career paths, putting down new roots, and settling into new routines, we will be traveling for four to six months. Anand will be doing some freelance work, Jenn will be doing some shameless mooching, and we’ll both be glimpsing things beyond the industrial skyline of Baltimore: the insides of foreign supermarkets, the embarrassingly superior public transit systems of European cities, the confounded expressions strangers wear when we butcher their native language, and – most importantly – how the same stars twinkle over other fields than these. Although not all trip details have been solidified, possible destinations include France, Spain, Kenya, India, Thailand, New Zealand, and Hawaii. In addition to seeing the usual sights and visiting every church known to humankind, we also hope to engross ourselves in books and music. Please let us know who your favorite artists and authors are, whether they’re little-known gems or guilty pleasures.
The Thakker family would be delighted to have you stay as their guests in a Raleigh area hotel. Unless you indicate differently, you'll have a room for Saturday and Sunday night.
Also, when making travel plans, note that shuttles will be available to and from the airport and the reception venue.
It’s become a threadbare platitude to say that your presence at our receptions will be better than any present you can give. But, really. We mean it! Feel free to make us a mix tape, divulge your famous chili recipe, enfold us in a full-body hug, or tip us off about which restaurants we should duck into while in Paris. Truly, we are not covetous of more “stuff” in our lives, especially since we’ll be packing all of our worldly possessions into storage for about a year.
We plan to make our travels somewhat economical by subletting apartments rather than staying in hotels and eating in rather than dining out. That being said, we are planning a few indulgences along the way. We’re told that it would be crazy to go to Kenya without touring a wildlife park, and we can’t imagine leaving the European continent without trekking to Florence to visit the statue of David. If you’d like to contribute to our honeymoon adventures, please use the button below.
We’ll think of you as we’re admiring zebras, petting sheep, eating buttery croissants at every available opportunity, frolicking in the Shire, and wandering the streets of Salzburg, where Julie Andrews yodeled and line-danced her way into the heart of a handsome sea captain. We’d love to feel as though you are part of our travels.


A "no-code" (yet extensible) Azure API Performance benchmarking tool (for Developers) based on App-Insights (request-duration) - with multiple output-formats and customizations
💡 If App-Insights is configured, the durations are taken from Request-logs; else, from local timestamps
installation
# Install from nuget.org
dotnet tool install -g perfx --no-cache
# Upgrade to latest version from nuget.org
dotnet tool update -g perfx --no-cache
# Install a specific version from nuget.org
dotnet tool install -g perfx --version 1.0.x
# Uninstall
dotnet tool uninstall -g perfx
🔰 If you don't have .NET Core 3.1 installed, download and install it.
🔰 If the Tool is not accessible post installation, add
%USERPROFILE%\.dotnet\tools
to the PATH env-var.
configuration
Populate the following JSON and save it to your Documents/Perfx
folder with the
name: Perfx.Settings.json
(or something like MyApp1.Settings.json
)
{
"Tenant": "YOUR_COMPANY_NAME",
"UserId": "",
"Password": "",
"ClientId": "",
"ClientSecret": "",
"ResourceUrl": "",
"ReplyUrl": "",
"ApiScopes": [
"api://YOUR-API-SCOPES"
],
"FormatArgs": {
"api": "https://YOUR-{env}-API.COM"
},
"Endpoints": [
"{api}/route1",
"{api}/route2"
],
"ResponseTimeSla": 5,
"ResponseSizeSla": 200,
"Iterations": 5,
"OutputFormats": [
"Excel",
"Sql::Conn-string..."
],
"AppInsightsAppId": "",
"AppInsightsApiKey": "",
"ReadResponseHeadersOnly": false,
"InputsFile": "Perfx_Inputs.xlsx",
"PluginClassName": null
}
details
| KEY | TYPE | VALUE | DEFAULT |
|---|---|---|---|
| QuiteMode | bool |
Just run (based on the information specified in the Settings file) and exit! Used in case of DevOps/CI pipelines |
false |
| Tenant | string |
Azure Tenant Name/ID Used in case of User-Creds / Client-Creds authentication |
|
| UserId | string |
Azure AD User-ID Used in case of User-Creds silent-authentication only |
|
| Password | string |
Azure AD Password Used in case of User-Creds silent-authentication only |
|
| ClientId | string |
Azure AD Application/Client ID Used in case of User-Creds / Client-Creds authentication |
|
| ClientSecret | string |
Azure AD Application/Client Secret Used in case of Client-Creds authentication only |
|
| ResourceUrl | string |
Azure AD Application Resource Url Used in case of User-Creds / Client-Creds authentication |
ClientId |
| ReplyUrl | string |
Azure AD Application Reply/Redirect Url Used in case of User-Creds interactive-authentication only |
|
| ApiScopes | string[] |
Azure AD API Scopes Used in case of User-Creds / Client-Creds authentication |
api://ClientId /.default |
| FormatArgs | string-object pairs |
Macros to be replaced in the Endpoints | |
| Endpoints | string[] |
URLs to test To override the default ResponseTimeSla/ResponseSizeSla prefix the endpoint with expected-duration-sla-in-seconds|expected-size-sla-in-kilo-bytes:: e.g. 2.5::https://my-api/... (where 2.5 seconds is the expected SLA for the specific endpoint) e.g. 2.5|200::https://my-api/... (where 2.5 seconds is the expected duration SLA and 200 Kb is the expected size SLA for the specific endpoint) |
|
| AppInsightsAppId | string |
Azure Application Insights App-ID to fetch the request-duration-logs from | |
| AppInsightsApiKey | string |
Azure Application Insights API-Key to fetch the request-duration-logs from | |
| Iterations | int |
# of iterations to run for each Endpoint | 5 |
| OutputFormats | string[] |
The output formats in which the results would be saved Values: Excel / Csv / Json / Sql To provide the conn-strings or custom output-file-names, suffix it with ::conn-string e.g. Sql::Data Source=(localdb)... or Excel::My_Run_Results.xlsx
|
|
| ResponseTimeSla | float |
The expected response-time SLA in seconds (generic for all Endpoints) | 5 |
| ResponseSizeSla | float |
The expected response-size SLA in Kb (generic for all Endpoints) | 200 |
| ReadResponseHeadersOnly | bool |
Specifies if the HttpClient should assume completion as soon as a response is available and headers are read (content is not read yet) | false |
| InputsFile | string |
File (under 'Documents/Perfx' folder) containing additional information for each of the Endpoints | Perfx_Inputs.xlsx |
| PluginClassName | string |
One of the classes that implements IPlugin interface (only used when there are multiple
implementations in the dlls placed under 'Documents/Perfx/Plugins' folder)
|
Order of Authentication:
- If
Tenant
is null or empty>
No Authentication- If
Password
is provided>
Silent User-credentials authentication flowAcquireTokenByUsernamePassword(scopes, username, password
)- If
ClientSecret
is provided>
Client-credentials authentication flowAcquireTokenAsync(resource, clientCredential)
- If
ReplyUrl
is provided>
Interactive User-credentials authentication flowAcquireTokenAsync(resource, clientId, redirectUri, parameters)
logging
You can (optionally) populate the following JSON and save it to your 'Documents/Perfx' folder with the
name: Perfx.Logging.json
{
"Logging": {
"LogLevel": {
"Default": "Warning"
},
"Console": {
"IncludeScopes": true,
"LogLevel": {
"Default": "Warning"
}
},
"Debug": {
"LogLevel": {
"Default": "Information"
}
}
}
}
"System.Net.Http.HttpClient": "Information"
inputs
Additional details (e.g. http-method
(defaults to GET
) / headers
/ body
/ query-params
) for the Endpoints
defined the Perfx.Settings.json
(default) under Documents/Perfx
can be provided in Perfx_Inputs.xlsx
under the same folder (or using the Plugin model outlined below)
By default, if an entry/row for an Endpoint exists in Perfx_Inputs.xlsx
, the corresponding row-index of that
entry is considered for the specific iteration. If the number of entries/rows for an Endpoint do not match up
with the number of iterations, the first entry is taken into consideration for the subsequent iterations
outputs
Results are saved to your Documents/Perfx
with the name of the input settings JSON file (default is Perfx.Settings.json
).
e.g. Perfx_Results.xlsx
/ Perfx_Results.csv & Perfx_Stats.csv
/ Perfx_Results.json & Perfx_Stats.json
/ [dbo.][Perfx_Results] & [dbo].[Perfx_Stats]
Sql tables (depending on the specified OutputFormat
in
the settings file
usage
perfx [MyApp1.Settings.json]
- If the specified path or the current-dir contains a valid Settings file, the tool uses/creates the
Perfx
folder under that path (for processing inputs/outputs); else, it falls back to thePerfx
folder under My Documents- If no argument is supplied,
Perfx.Settings.json
is used as input by default- Set QuiteMode to
true
in the Settings file to run once and exit (e.g. DevOps Pipelines)
- Enter
r:10
to run the benchmarks (10 times
) - Enter
s
to print the stats/details for the previous run - Enter
l:1h:10
to fetch app-insights request-duration logs for the previous run (in the last1 hour
with10 retries
) - Enter
c
to clear the console - Enter
q
to quit - Enter
?
to print this help
dotnet tool install -g perfx
Theexit-code / %errorlevel%
of the app will be equal to the count of results that match the following criteria:
90th-percentile of requests>
response-time-sla(OR)
max-response-size>
response-size-sla(OR)
status-codes other than 200>
1%
plugins
- Create a .NET Standard project and add reference to
Prefx.Core
project - Add a class that implements
IPlugin
interface (which in turn implementsIOutput
interface)
public Task IPlugin.GetAuthToken(Settings settings)
{
// NOTE: By default Perfx uses IPublicClientApplication's AcquireTokenSilent/AcquireTokenByUsernamePassword/AcquireTokenAsync (see 'Order of Authentication' note in the docs)
// If you want to override that behavior and provide a custom implementation, go ahead...
// If not, throw NotImplementedException or NotSupportedException, to trigger the default implementation
var userId = settings.UserId;
var pwd = settings.Password;
// Get more settings as required...
return Task.FromResult("someToken1");
}
public Task> IPlugin.GetEndpointDetails(Settings settings)
{
// NOTE: By default Perfx uses Documents/Perfx/Perfx_Inputs.xlsx
// If you want to override that behavior and provide a custom implementation, go ahead...
// If not, throw NotImplementedException or NotSupportedException, to trigger the default implementation
var endpointDetails = new List();
foreach (var endpoint in settings.Endpoints.Select((e, i) => (url: e, index: i)))
{
if (endpoint.url.Contains("odata"))
{
// Do whatever - based on the endpoint
endpointDetails.Add(new Endpoint { Method = HttpMethod.Get.ToString(), Query = "?$top=10" });
}
else if (endpoint.url.EndsWith("route1"))
{
// Do whatever - based on the endpoint
endpointDetails.Add(new Endpoint { Method = HttpMethod.Get.ToString(), Query = "/1" });
}
}
return Task.FromResult(endpointDetails);
}
public Task IOutput.Save(IEnumerable results, Settings settings)
{
// If you want to override that behavior and provide a custom implementation, go ahead...
// If not, throw NotImplementedException or NotSupportedException, to trigger the default implementation
// Do something and return true
return Task.FromResult(false);
}
public Task> IOutput.Read(Settings settings)
{
// If you want to override that behavior and provide a custom implementation, go ahead...
// If not, throw NotImplementedException or NotSupportedException, to trigger the default implementation
// Do and return something
return Task.FromResult(default(IList));
}
csproj
file as follows:
...
<TargetFramework>netcoreapp3.1</TargetFramework>
<Platforms>x64</Platforms>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
...
<ProjectReference Include="Perfx.Core.csproj">
<Private>false</Private>
<ExcludeAssets>runtime</ExcludeAssets>
</ProjectReference>
...
Documents/Perfx/Plugins
folder (Documents can be some other base-folder depending on your usage)IPlugin
implementations, you can also update the value of PluginClassName
with the specific implementation-class-full-name (e.g. MyPluginAssembly.MyPlugin1
)Sample: Perfx.SamplePlugin


{# Template to display when the user tries to navigate to a shortened URL but it doesn't exist. Args: tried_url the URL that the user tried. #} {% extends "layout.html" %} {% block title_content %}
You've tried to access {{ tried_url }} but it doesn't correspond to a page. This could be a typo, or the page could have been removed.
In any case, while you're here, why don't you try shortening some URLs yourself here?


---
layout: default
---
{% include author.html %}
About me
- Name : ElementalX
- Age : 19
- Education : Undergraduate Computer Applications Student, currently lives in India
Achievement
- Top 500 NeverLAN CTF 2019 with SECARMY
- Top 5 in ShellCTF with SECARMY
- Top 24 Affinity CTF 2019 - Quals
- Top 70 Byte Bandits CTF 2019
- Top 100 NeverLAN CTF 2020
- Judge , Team Sherlock (Top 8th team at Australia's National Missing Person Hackathon 2020, TraceLabs)
- Guest Speaker , CyberHack , Lovely Professional University (Delivered a talk on x86 assembly & shellcoding on *NIX systems)
Community Contribution
- Judge - SANS OSINT Search Party , TraceLabs
- Judge - Global OSINT Search Party CTF
- Judge - conINT OSINT Search Party
Judge - National Missing Person
- Community Volunteer , Blue Team Village, DEF CON 2020
- Volunteer , Sharda University
Projects
- R3V_CH4LLS
- R4PT0R(a malware database) , made with team AX1AL
- HAWK BASE(A threat actor database) , made with team AX1AL
CTF Organizer/Contribution
- SECARMY JUNIOR CTF , 2019
- CHRIST CTF BY SECARMY , 2020
- SARCON CTF , 2020
- DEF CON DELHI 9111 CTF , 2020
- SECARMY VILLAGE CTF
- DARK ARMY CTF CHALLENGE CONTRIBUTOR
- VULNCON CTF CHALLENGE CONTRIBUTOR
- 0x41414141 CTF ORGANIZER
Featured
- HuffingtonPost India
- ic0de.ws Podcast
Working experience
- 2019 January - 2019 October ( Founding member & CTF Organizer , SECARMY)
- 2019 November - 2020 October ( Team Manager , SECARMY)
- 2020 July - Present ( Malware Researcher & Community Member , PolyX)
- 2020 Nov - present ( Founder & Lead , AX1AL)
Contact me
- Email<EMAIL_ADDRESS>- Discord : ElementalX#3463


Qt Linguist Manual: Release Manager
Two tools are provided for the release manager, lupdate and lrelease. These tools can process qmake project files, or operate directly on the file system.
Creating Translation Files
Translation files consist of all the user-visible text and Ctrl key accelerators in an application and translations of that text.
To create translation files:
- Run lupdate to generate the first set of translation source (TS) files with all the user-visible text but no translations.
- Give the TS files to the translator who adds translations using Qt Linguist. Qt Linguist takes care of any changed or deleted source text.
- Run lupdate to incorporate any new text added to the application. lupdate synchronizes the user-visible text from the application with the translations. It does not destroy any data.
- To release the application, run lrelease to read the TS files and produce the QM files used by the application at runtime.
For lupdate to work successfully, it must know which translation files to produce. The files are listed in the application's .pro
Qt project file.
Using lupdate
Usage: lupdate myproject.pro
The lupdate command line tool finds the translatable strings in the specified source, header and Qt Designer interface files, and produces or updates .ts
translation files. The files to process and the files to update can be set at the command line, or provided in a .pro
file specified as an command line argument. The developer creates the .pro file, as described in Qt Linguist Manual: Developers.
The produced translation files are given to the translator who uses Qt Linguist to read the files and insert the translations.
Companies that have their own translators in-house may find it useful to run lupdate regularly, perhaps monthly, as the application develops. This will lead to a fairly low volume of translation work spread evenly over the life of the project and will allow the translators to support a number of projects simultaneously.
Companies that hire in translators as required may prefer to run lupdate only a few times during the application life cycle. The first time might be just before the first test phase. This will provide the translator with a substantial single block of work and any bugs that the translator detects may easily be included with those found during the initial test phase. The second and any subsequent lupdate runs would probably take place during the final beta phase.
The TS file format is a simple human-readable XML format that can be used with version control systems if required. lupdate
can also process Localization Interchange File Format (XLIFF) format files; files in this format typically have file names that end with the .xlf
suffix.
Note: The minimum supported version for XLIFF format files is 1.1. XLIFF 1.0 version files are not supported.
Pass the -help
option to lupdate
to view supported options.
Qt Linguist is also able to import and export XLIFF files. See the Translators section for more information.
Using lrelease
Usage: lrelease myproject.pro
The lrelease command line tool produces QM files out of TS files. The QM file format is a compact binary format that is used by the localized application. It provides extremely fast lookups for translations. The TS files lrelease processes can be specified at the command line, or given indirectly by a Qt .pro
project file.
This tool is run whenever a release of the application is to be made, from initial test version through to final release version. If the QM files are not created, for example because an alpha release is required before any translation has been undertaken, the application will run perfectly well using the text the developers placed in the source files. Once the QM files are available the application will detect them and use them automatically.
Note: The lrelease tool only incorporates translations that are marked as "finished". Otherwise the original text is used instead.
Pass the -help
option to lrelease
to view supported options.
Missing Translations
Both lupdate and lrelease may be used with TS translation source files which are incomplete. Missing translations will be replaced with the native language phrases at runtime.


Professional career
I've been coding a different
kind of stuff in these years. From Back-end API to some plugins for Wordpress.
I managed to make a very cool browser game few years ago. Sadly I've lost everything about it.
I've also tried to do something in Unity, but it bored me at the start. Right now I'm coding using
Angular.


This demo shows the basic functionality of the tus protocol. You can select a file using the controls below and start/pause the upload as you wish.
For a prettier demo please go to the tus.io website. This demo is just here to aid developers.
A demo where a video is recorded from your webcam while being simultaneously uploaded, can be found here.
Succesful uploads will be listed here. Try one!


Last Summer I went to New York for 5 nights. This was my first time in the US, but it definitely won't be my last!
We stayed in the Royalton Hotel in Manhattan. This hotel was in the ideal location as Time Squares was
just a five minute walk.
The city was so different to anywhere I've ever been. There is something going on at every turn!
I went to Paris two years for a school trip. I absolutely adore this city. There's so much to see.
The city is rich with history, covered in beautiful building and a rich exterior. The atmosphere is relaxed,
there are people sitting outside cafes everywhere. This city is easily one of my favourite places I've ever been.


Please offer a distribution of the gil. How much gil out of {{ Constants.endowment }} you will keep for yourself?


Link and Chain¶
-
class
chainer.
Link
(**params)[source]¶ Building block of model definitions.
Link is a building block of neural network models that support various features like handling parameters, defining network fragments, serialization, etc.
Link is the primitive structure for the model definitions. It supports management of parameter variables and persistent values that should be incorporated to serialization. Parameters are variables registered via the
add_param()
method, or given to the initializer method. Persistent values are arrays, scalars, or any other serializable values registered via theadd_persistent()
method.Note
Whereas arbitrary serializable objects can be registered as persistent values, it is strongly recommended to just register values that should be treated as results of learning. A typical example of persistent values is ones computed during training and required for testing, e.g. running statistics for batch normalization.
Parameters and persistent values are referred by their names. They can be accessed as attributes of the names. Link class itself manages the lists of names of parameters and persistent values to distinguish parameters and persistent values from other attributes.
Link can be composed into more complex models. This composition feature is supported by child classes like
Chain
andChainList
. One can create a chain by combining one or more links. See the documents for these classes for details.As noted above, Link supports the serialization protocol of the
Serializer
class. Note that only parameters and persistent values are saved and loaded. Other attributes are considered as a part of user program (i.e. a part of network definition). In order to construct a link from saved file, other attributes must be identically reconstructed by user codes.Example
This is a simple example of custom link definition. Chainer itself also provides many links defined under the
links
module. They might serve as examples, too.Consider we want to define a simple primitive link that implements a fully-connected layer based on the
linear()
function. Note that this function takes input units, a weight variable, and a bias variable as arguments. Then, the fully-connected layer can be defined as follows:import chainer import chainer.functions as F import numpy as np class LinearLayer(chainer.Link): def __init__(self, n_in, n_out): # Parameters are initialized as a numpy array of given shape. super(LinearLayer, self).__init__( W=(n_out, n_in), b=(n_out,), ) self.W.data[...] = np.random.randn(n_out, n_in) self.b.data.fill(0) def __call__(self, x): return F.linear(x, self.W, self.b)
This example shows that a user can define arbitrary parameters and use them in any methods. Links typically implement the
__call__
operator.Parameters: params – Shapes of initial parameters. The keywords are used as their names. The names are also set to the parameter variables. Variables: name (str) – Name of this link, given by the parent chain (if exists). -
add_param
(name, shape, dtype=<type 'numpy.float32'>)[source]¶ Registers a parameter to the link.
The registered parameter is saved and loaded on serialization and deserialization, and involved in the optimization. The data and gradient of the variable are initialized by NaN arrays.
The parameter is set to an attribute of the link with the given name.
Parameters: - name (str) – Name of the parameter. This name is also used as the attribute name.
- shape (int or tuple of ints) – Shape of the parameter array.
- dtype – Data type of the parameter array.
-
add_persistent
(name, value)[source]¶ Registers a persistent value to the link.
The registered value is saved and loaded on serialization and deserialization. The value is set to an attribute of the link.
Parameters: - name (str) – Name of the persistent value. This name is also used for the attribute name.
- value – Value to be registered.
-
addgrads
(link)[source]¶ Accumulates gradient values from given link.
This method adds each gradient array of the given link to corresponding gradient array of this link. The accumulation is even done across host and different devices.
Parameters: link (Link) – Source link object.
-
children
()[source]¶ Returns a generator of all child links.
Returns: A generator object that generates all child links.
-
copy
()[source]¶ Copies the link hierarchy to new one.
The whole hierarchy rooted by this link is copied. The copy is basically shallow, except that the parameter variables are also shallowly copied. It means that the parameter variables of copied one are different from ones of original link, while they share the data and gradient arrays.
The name of the link is reset on the copy, since the copied instance does not belong to the original parent chain (even if exists).
Returns: Copied link object. Return type: Link
-
copyparams
(link)[source]¶ Copies all parameters from given link.
This method copies data arrays of all parameters in the hierarchy. The copy is even done across the host and devices. Note that this method does not copy the gradient arrays.
Parameters: link (Link) – Source link object.
-
links
(skipself=False)[source]¶ Returns a generator of all links under the hierarchy.
Parameters: skipself (bool) – If True
, then the generator skips this link and starts with the first child link.Returns: A generator object that generates all links.
-
namedlinks
(skipself=False)[source]¶ Returns a generator of all (path, link) pairs under the hierarchy.
Parameters: skipself (bool) – If True
, then the generator skips this link and starts with the first child link.Returns: A generator object that generates all (path, link) pairs.
-
namedparams
()[source]¶ Returns a generator of all (path, param) pairs under the hierarchy.
Returns: A generator object that generates all (path, parameter) pairs. The paths are relative from this link.
-
params
()[source]¶ Returns a generator of all parameters under the link hierarchy.
Returns: A generator object that generates all parameters.
-
serialize
(serializer)[source]¶ Serializes the link object.
Parameters: serializer (AbstractSerializer) – Serializer object.
-
to_cpu
()[source]¶ Copies parameter variables and persistent values to CPU.
This method does not handle non-registered attributes. If some of such attributes must be copied to CPU, the link implementation must override this method to do so.
Returns: self
-
to_gpu
(device=None)[source]¶ Copies parameter variables and persistent values to GPU.
This method does not handle non-registered attributes. If some of such attributes must be copied to GPU, the link implementation must override this method to do so.
Parameters: device – Target device specifier. If omitted, the current device is used. Returns: self
-
-
class
chainer.
Chain
(**links)[source]¶ Composable link with object-like interface.
Composability is one of the most important features of neural nets. Neural net models consist of many reusable fragments, and each model itself might be embedded into a larger learnable system. Chain enables us to write a neural net based on composition, without bothering about routine works like collecting parameters, serialization, copying the structure with parameters shared, etc.
This class actually provides a way to compose one or more links into one structure. A chain can contain one or more child links. Child link is a link registered to the chain with its own name. The child link is stored to an attribute of the chain with the name. User can write a whole model or a fragment of neural nets as a child class of Chain.
Each chain itself is also a link. Therefore, one can combine chains into higher-level chains. In this way, links and chains construct a link hierarchy. Link hierarchy forms a tree structure, where each node is identified by the path from the root. The path is represented by a string like a file path in UNIX, consisting of names of nodes on the path, joined by slashes
/
.Example
This is a simple example of custom chain definition. Chainer itself also provides some chains defined under the
links
module. They might serve as examples, too.Consider we want to define a multi-layer perceptron consisting of two hidden layers with rectifiers as activation functions. We can use the
Linear
link as a building block:import chainer import chainer.functions as F import chainer.links as L class MultiLayerPerceptron(chainer.Chain): def __init__(self, n_in, n_hidden, n_out): # Create and register three layers for this MLP super(MultiLayerPerceptron, self).__init__( layer1=L.Linear(n_in, n_hidden), layer2=L.Linear(n_hidden, n_hidden), layer3=L.Linear(n_hidden, n_out), ) def __call__(self, x): # Forward propagation h1 = F.relu(self.layer1(x)) h2 = F.relu(self.layer2(h1)) return self.layer3(h2)
Child links are registered via the initializer method. They also can be registered by the
add_link()
method. The forward propagation is often implemented as The__call__
operator as the above example, though it is not mandatory.Parameters: links – Child links. The keywords are used as their names. The names are also set to the links. -
add_link
(name, link)[source]¶ Registers a child link to this chain.
The registered link is saved and loaded on serialization and deserialization, and involved in the optimization. The registered link is called a child. The child link is set to an attribute of the chain with the given name.
This method also sets the
name
attribute of the registered link. If the given link already has the name attribute set, then it raises an error.Parameters:
-
-
class
chainer.
ChainList
(*links)[source]¶ Composable link with list-like interface.
This is another example of compositional link. Unlike
Chain
, this class can be used like a list of child links. Each child link is indexed by a non-negative integer, and it maintains the current number of registered child links. Theadd_link()
method inserts a new link at the end of the list. It is useful to write a chain with arbitrary number of child links, e.g. an arbitrarily deep multi-layer perceptron.Note that this class does not implement all methods of
list
.Parameters: links – Initial child links. -
__getitem__
(index)[source]¶ Returns the child at given index.
Parameters: index (int) – Index of the child in the list. Returns: The index
-th child link.Return type: Link
-
add_link
(link)[source]¶ Registers a child link to this chain.
The registered link is saved and loaded on serialization and deserialization, and involved in the optimization. The registered link is called a child. The child link is accessible via
children()
generator, which returns a generator running through the children in registered order.This method also sets the
name
attribute of the registered link. If the given link already has the name attribute set, then it raises an error.Parameters: link (Link) – The link object to be registered.
-


lens - minimal jQuery gallery for retina images
CC Ben Sutherland on flickr [1]
CC Cássio Abreu on flickr [2]
CC Tom Marcello on flickr [3]
CC star5112 on flickr [4]
Image attribution
[1]:
http://www.flickr.com/photos/bensutherland/4003824405/
[2]:
http://www.flickr.com/photos/psicodrops/7873832926/
[3]:
http://www.flickr.com/photos/tommarcello/461001366/in/pool-jazzphotography/
[4]:
http://www.flickr.com/photos/johnjoh/633991304/


2
1 Since Christ encourages us, since he loves us and comforts us, since God's Spirit fellowships with us, and since Christ is very merciful to us,
2 make me completely happy by doing the following things: Agree with one another, love one another, act together as one person, and try to accomplish the same things.
3 Never try to make yourselves more important than others nor boast about what you are doing. Instead, be humble, and in particular, honor one another more than you honor yourselves.
4 Each one of you should not only be concerned about what you yourself need. Instead, each of you should also be concerned that you help do what each other needs.
5 Think the same way as Christ Jesus thinks:
6 Although he is the same as God,
he did not insist on keeping himself
equal to God.
7 Instead, he stopped acting as God.
He appeared to us as a servant.
He became a human being.
He appeared in human form, though he was still God,
8 And he humbled himself
and obeyed God, even though he had to die,
even dying on the cross like a criminal.
9 So God honored him very much,
honored him more than anyone else who has ever lived,
10 so that when everyone hears the name "Jesus"
they will bow down to honor him,
everyone in heaven, on earth, and under the earth;
11 so that everyone will acknowledge
that Jesus Christ is Lord,
and they will praise God the Father because of him.
12 My dear friends, as you always obeyed God when I was with you, now that I am apart from you, obey him even more. Honor God together, be humble, and work until the time comes when he will save all of you completely.
13 For God is working in your hearts so that you will want to do and then actually do the good things that please him.
14 Do everything without complaining or arguing,
15 so that you neither do nor think of anything wrong as you live among unbelievers since many of these are wicked people who call evil good. Among these wicked people you should be like the stars at night that shine in the midst of darkness.
16 Keep trusting in the message that can make you live forever. If you do this, I will rejoice at the time when Christ returns, because then I will know that did not work among you uselessly.
17 And I will greatly rejoice with you all, even if they kill me, and my blood pours out like something I offer to God. It will be in addition to what you sacrifice to God because you trust in him.
18 In the same way you, too, should rejoice together with me!
19 I am trusting in the Lord Jesus to be able to send Timothy to you soon. I hope that when he returns, he will encourage me by telling me about what God is doing in your lives.
20 I have no one else like Timothy who genuinely cares for you.
21 All the others whom I might send to you are concerned only about their own matters. They are not concerned enough about what Jesus Christ considers important.
22 But you know that Timothy has proven that he loves the Lord, because he worked with me to teach the good news, just as a child works with his father.
23 I confidently expect to send Timothy to you as soon as I know what will happen to me.
24 And because I believe that the Lord wants this to happen, I am confident that they will soon release me, and that I will come to you myself.
25 I believe that I must send Epaphroditus back to you.  Instead, God was very kind to him and also to me, so that I would not have a reason to grieve much.
28 So I am sending him back to you as quickly as possible. I will do this in order that you may rejoice when you see him again, and that I might grieve less.
29 Welcome Epaphroditus with the great joy we have because the Lord Jesus loves us. Honor him and other believers like him.
30 As he was working for Christ, he almost died. He ran the risk of dying in order to supply the things that I needed, something you could not do because you are far away from me. "