This notebook performs analysis on scraped webpages from beersmith.com. Beersmith is a website for hobby home brewers to share recipes, and for other brewers to rate the shared recipes. If we organize the results into a User x Recipe matrix, we can create an SVD Recommendation Engine in line with the winning solution of the Netflix Prize. In this analysis, we ignore the cold start problem as we have insufficient data to handle it.
To perform the majority of analysis, I have decided to use the Surprise library by Nicolas Hug. The library is built in a style similar to sci-kit learn, but is designed specifically for recommendation engines. The main difference is the handling of missing data. Sci-kit assumes no missing data in the predictive algorithms, which is not possible for recommmendation engines. Surprise assumes the majority of entries are missing.
I created a custom parser to deal with the webpages. Beautiful Soup struggled to deal with the BeerXML format in which the recipes are stored online, and the BeerXML library struggled to deal with webpages. It was easier to create a custome parser rather than trying to get the two libraries to work together.
import pandas as pd
import numpy as np
import os
import random
from collections import defaultdict
import matplotlib.pyplot as plt
import seaborn as sns
from surprise import Reader
from surprise.dataset import Dataset
from surprise.prediction_algorithms.baseline_only import BaselineOnly
from surprise.prediction_algorithms.knns import KNNBasic
from surprise.prediction_algorithms.knns import KNNWithMeans
from surprise.prediction_algorithms.matrix_factorization import SVD
from surprise.prediction_algorithms.matrix_factorization import SVDpp
from surprise.model_selection import train_test_split
from surprise.model_selection import RepeatedKFold
from surprise.model_selection import KFold
from surprise.model_selection.search import GridSearchCV
from surprise.evaluate import GridSearch
from surprise import accuracy
from src.Parser import Parser
%matplotlib inline
fls = os.listdir('recipes/')
receps = []
for fl in fls:
beer = Parser('recipes/' + fl)
if beer.ratings is not None:
receps.append(beer)
ratings = [beer.ratings for beer in receps]
ratings = pd.concat(ratings)
ratings.to_csv('ratings.csv')
ratings = ratings[[x in ['10', '20', '30', '40', '50'] for x in ratings.Rating]]
ratings['Rating'] = pd.to_numeric(ratings['Rating']) / 10
ratings = ratings[['User', 'Recipe', 'Rating']]
Before creating the train-test splits, perform a cursory EDA to make sure that there are no glaring errors. This dataset is fairly simple as we only care about the fields | User | Item | Rating |. We are interested to see that ratings are integers, and that we have a wide coverage of users and items. Additionally, we would like users to rate multiple recipes so that we can infer preferences.
ratings.head()
print('Observations Collected:\t' + str(len(fls)))
print('\nUnique Useable Recipes:\t' + str(len(set(ratings.Recipe))))
print('\nUnique Users:\t' + str(len(set(ratings.User))))
print('\nTotal Shape:\t' + str(ratings.shape[0]) + '\n\n')
print(ratings.head())
print('\n')
print(ratings.Rating.plot(kind = 'hist', title = 'Distribution of Ratings'))
It looks like we collected data on 1,678 recipes. Of those, 915 had at least 1 rating. There were 402 unique recipes, and 708 users provided the ratings. The ratings are integers from 1 - 5, with the majority of ratings being 4 - 5. With some knowledge of homebrewing, the high ratings are somewhat intuitive. If a user puts in 5 weeks of time creating a new batch, they may have some biases that cause them to rate the product highly.
I suspect that the most active users make up a large portion of the total comments in line with Power Laws. Similarly, the most rated recipes likely dominate the total count of ratings. Examine how extreme this effect is.
ratings.\
groupby('Recipe')['User'].\
count().\
sort_values(ascending=False).\
head(10)
ratings.\
groupby('User')['Recipe'].\
count().\
sort_values(ascending=False).\
head(10)
It appears that brewdog is extremely active compared to the top 10 active users, and that recipe 1,645 was the most rated by a large margin. The converse of this is that there are likely a large number of thinly rated recipes, or inactive users. Out of conservatism, look to increase regularization.
print(ratings.Rating.describe())
print(set(ratings.Rating))
pd.DataFrame({'Recipe' : pd.to_numeric(ratings['Recipe']), 'Rating' : ratings.Rating}).corr()
We now have an idea of the distribution of the data. The next step is to set aside data for a test set, to create a benchmark for the cross validation set. The recipe number corresponds to the number used by Beersmith to store the recipe. After some spot checks, it appears that the number roughly corresponds to time the recipe was uploaded. After a quick correlation analysis, this number is uncorrelated with the rating. We should assume IID data, and used K Fold cross validation to make the best use of the data. To avoid bad samples, and because the dataset is small, use Repeated K-Fold cross validation.
Additionally, we should establish a test set, and only use the test set to approximate the model error on new data. Due to the small data, 75% and 25% test seems reasonable. We will optimize the model on RMSE in line with the Netflix solution.
reader = Reader(rating_scale=(1, 5))
data = Dataset.load_from_df(ratings, reader)
random.seed(42)
random.shuffle(data.raw_ratings)
cut_off = int(len(data.raw_ratings) * 0.75)
train_ratings = data.raw_ratings[:cut_off]
test_ratings = data.raw_ratings[cut_off:]
data.raw_ratings = train_ratings
def evaluator(algo, df, cv_method, verbose = False):
"""
wrapper to streamline evaluation
"""
results = []
cntr = 0
for train_set, test_set in cv_method.split(df):
algo.fit(train_set)
predictions = algo.test(test_set)
accrcy = accuracy.rmse(predictions)
results.append(pd.DataFrame({'Fold' : [cntr],
'RMSE' : [accrcy]}))
cntr += 1
results = pd.concat(results)
if verbose:
return results
else:
return [results['RMSE'].mean(), results['RMSE'].std()]
#Algos
cv_method = RepeatedKFold(
n_splits = 5,
n_repeats = 3,
random_state = 42)
algo = BaselineOnly(verbose = False)
#CV
cv_score = evaluator(algo,
data,
cv_method)
#Bias
train_set = data.build_full_trainset()
algo.fit(train_set)
preds = algo.test(train_set.build_testset())
bias = accuracy.rmse(preds)
#Error
test_set = data.construct_testset(test_ratings)
preds = algo.test(test_set)
err = accuracy.rmse(preds)
#Baseline CV
print('\nBaseline CV avg:\t' + str(cv_score[0]))
print('\nBaseline CV std:\t' + str(cv_score[1]))
print('\nBaseline bias:\t' + str(bias))
print('\nBaseline OOS error:\t' + str(err))
Our baseline model uses the average gloval rating, the average recipe rating, and the average user rating in the train set, to make a prediction on the validation and test sets. Using this simple approach, we can get a cross validation score of 0.725, and the baseline OOS error is 0.812, which is just outside of a standard error in the CV. This is reasonable=, proceed with more in depth analysis.
Now that we have set benchmarks, and set aside the test set, we can perform some more in depth EDA without substantially risking overfitting to the dataset. This mainly involves examining volatile ratings.
ratings_eda = pd.DataFrame(train_ratings)
ratings_eda = ratings_eda[[0, 1, 2]]
ratings_eda.columns = ['User',
'Recipe',
'Rating']
ratings_sd = ratings_eda.groupby('Recipe').agg(['mean', 'std', 'count'])
ratings_sd.columns = ratings_sd.columns.levels[1]
print('\n')
print('Description of Ratings\n')
print(ratings_sd['count'].describe())
print('\n')
print('Count Frequencies of Number of Recipe Ratings\n')
print(ratings_sd.groupby('count')['mean'].count())
print('\n')
print('Most Volatile Ratings\n')
print(ratings_sd[ratings_sd['count'] > 2].sort_values('std', ascending=False).head(10))
print(ratings_sd['count'].plot(kind = 'hist', title = 'Histogram of Ratings'))
From our more in depth EDA, most recipes have 1 ratings, while a select few have more than 5. This data is very sparse, and we may be required to get more ratings before progressing further. In later stages of analysis, examine the impact of adding more data.
In addition, it looks like a few recipes have very different ratings. Recipe 211 for example has 3 ratings, which are 1, 3, 5. In the movie literature, this has become known as the Napolean Dynamite effect, which the item is controversial, so ratings are divided. This is hard to correct for, but may be useful for evaluating the model, and seeing how it responds to these situations.
My general model fitting procedure on small datasets is to use repeated K Fold CV, and a grid search over the hyperparameters. On the repeated K Fold, I change the seed so that is is somewhate different than the sets used to select between models. Upon completion of the CV results, explore the distribution across cross sections of hyperparameters to ensure that the final set is around the global minimum.
cv_method = RepeatedKFold(n_splits = 5,
n_repeats = 5,
random_state = 1)
The KNN model identifies users with the most similar ratings to the candiate user, and makes a prediciton using the ratings of those users. With a very sparse dataset, it may be difficult to get a good estimate of the ratings.
param_grid = {'k' : [4, 8, 16, 32, 64],
'min_k' : [1, 2, 3, 4],
'verbose' : [False]}
clf_knn = GridSearchCV(KNNBasic,
param_grid,
cv = cv_method)
clf_knn.fit(data)
results_df = pd.DataFrame.from_dict(clf_knn.cv_results)
results_df.sort_values('mean_test_rmse', inplace = True)
results_df.head(10)
The SVD model decomposes the error term of the baseline model into user matrices, and item matrices using the SVD. Regularization is used to limit the size of individual parameters, and the amount of regularization is chosen to minimize RMSE.
param_grid = {'n_factors' : np.arange(25, 225, 25),
'n_epochs' : np.arange(5, 25, 5),
'lr_all' : np.arange(0.02, 0.14, 0.02),
'reg_all' : np.arange(0, 0.14, 0.02)}
clf_svd = GridSearchCV(SVD,
param_grid,
cv = cv_method)
clf_svd.fit(data)
results_df = pd.DataFrame.from_dict(clf_svd.cv_results)
results_df.sort_values('mean_test_rmse', inplace = True)
results_df.head(10)
for par in ['n_factors', 'n_epochs', 'lr_all', 'reg_all']:
fig, (ax1, ax2) = plt.subplots(1, 2)
sns.boxplot(x= 'param_' + par, y="mean_test_rmse", data = results_df, ax=ax1)
ax1.set_title('Validation Error')
sns.boxplot(x='param_' + par, y="std_test_rmse", data = results_df, ax=ax2)
ax2.set_title('Validation Standard Deviation')
plt.show()
This modification makes an additional adjustment where an additional term is used to capture implicit ratings. This term assumes that the a user rating an item implies they initially had some interest in the model.
param_grid = {'n_factors' : np.arange(25, 100, 25),
'n_epochs' : np.arange(10, 25, 5),
'lr_all' : np.arange(0.02, 0.1, 0.02),
'reg_all' : np.arange(0.02, 0.1, 0.02)}
clf_svdpp = GridSearchCV(SVDpp,
param_grid)
clf_svdpp.fit(data)
results_df = pd.DataFrame.from_dict(clf_svdpp.cv_results)
results_df.sort_values('mean_test_rmse', inplace = True)
results_df.head(10)
The SVD algorithm gets us a combination of user X constant X item matrices. If we look at the first directions of the user and item matrices, we may be able to infer certain trends in the items most influencing the direction. Fit a simple model, and let's see if we can identify patterns.
new_clf = clf_svd.best_estimator['rmse']
train = data.build_full_trainset()
new_clf.fit(train)
train_frame = pd.DataFrame(new_clf.qi[:,:5])
train_frame['Recipe'] = np.nan
for key, value in zip(train._raw2inner_id_items.keys(),
train._raw2inner_id_items.values()):
train_frame['Recipe'].iloc[value] = key
def to_rating(x):
try:
x = pd.to_numeric(x) / 10
x = x.mean()
except:
x = None
return x
df_desc = [{'Recipe' : beer.ratings.Recipe.iloc[0],
'Style' : beer.style,
'ABV' : beer.abv,
'Taste' : beer.taste_rat,
'Bitter' : beer.bitter,
'Rating' : to_rating(beer.ratings.Rating),
'Name' : beer.name} for beer in receps]
df_desc = pd.DataFrame.from_dict(df_desc)
df_desc = pd.merge(train_frame,
df_desc,
how = 'left',
on = 'Recipe')
df_desc['Name'] = [x.split(' - ')[0] for x in df_desc['Name']]
df_desc['Diff'] = df_desc[0] + df_desc[1]
df_desc['Recipe']= [x.replace('recipes/', '') for x in df_desc['Recipe']]
print(df_desc.\
sort_values(0)[['Recipe', 'Bitter', 'ABV', 'Style', 'Name', 'Rating']].\
head(10))
print('\n****************************************************************************\n')
print(df_desc.\
sort_values(0)[['Recipe', 'Bitter', 'ABV', 'Style', 'Name', 'Rating']].\
tail(10))
So there is no direct interpretaion of the primary principal direction, only patterns that can be inferred. By taking recipes at the top and bottom of the direction, we try to create patterns and put a name on what is going on in the background. Looking through the names at the top, descriptions using the words 'vanilla', 'citra', and 'ladyface' imply that the recipes are more sweet. This appears to be supported by the generally lower bitterness of the recipes at the top compared to recipes at the bottom.
print(df_desc.\
sort_values(1)[['Recipe', 'Bitter', 'ABV', 'Style', 'Name', 'Rating']].\
head(10))
print('\n****************************************************************************\n')
print(df_desc.\
sort_values(1)[['Recipe', 'Bitter', 'ABV', 'Style', 'Name', 'Rating']].\
tail(10))
Moving to the second direction, we see wheatbeers near the bottom, and a lot of american themed beers at the top. Again, there also appears to be less bitterness at the top as a whole than the bottom. Perhaps this is a more savory direction.
This is incredibly difficult to determine at the user level, so I will include this for brevity, but skip the major part of the analysis. Users on opposite end of the spectrum should enjoy opposite palletes of beer.
train_frame = pd.DataFrame(new_clf.pu[:,:5])
train_frame['User'] = np.nan
for key, value in zip(train._raw2inner_id_users.keys(),
train._raw2inner_id_users.values()):
train_frame['User'].iloc[value] = key
print(train_frame.\
sort_values(0)[[0, 1, 'User']].\
head(10))
print('\n\n')
print(train_frame.\
sort_values(0)[[0, 1, 'User']].\
tail(10))
The Napolean Dynamite Effect comes from the Netflix Prize, where the participants noticed certain movies had polarizing ratings. We can infer the same pattern here, where we use 5 fold cv to generate pseudo OOS predictions, and identify the cases where those predictions perform the worst.
new_clf = clf_svd.best_estimator['rmse']
cv = KFold(n_splits = 5, random_state = 1234)
store = []
for train_set, test_set in cv.split(data):
new_clf.fit(train_set)
predictions = new_clf.test(test_set)
for pred, known in zip(predictions, test_set):
known = list(known)
known.append(pred.est)
store.append(known)
store = [{'User' : x[0],
'Recipe' : x[1],
'True' : x[2],
'Pred' : x[3]} for x in store]
store = pd.DataFrame.from_dict(store)
store['error'] = (store['Pred'] - store['True'])**2
store['cnt'] = 1
store = store.\
groupby('Recipe')[['error', 'cnt']].\
sum().\
sort_values('error', ascending = False)
print(store[store['cnt'] > 2])
Recipe 211 showed up when we looked at the standard deviation of ratings. Interestingly, it looks like the algorithm is getting the most rated recipes wrong. This is a sign of overfitting which may be present in the current setup. Perhaps we should lean to algorithms with more bias and lower CV scores.
In the previous sections, we fit 3 models and established a benchmark. In this section, we pick from thosd models as a final solution. We use the same CV set we used on the benchmark, and set our final model. Then we evaluate the model on the test set to get an estimate of model error. Out of the principal of Ocam's Razor, if we do not exceed benchmark performance, we should prefer the simpler solution.
cv_method = RepeatedKFold(
n_splits = 5,
n_repeats = 10,
random_state = 42)
err = []
for algo in [clf_knn.best_estimator['rmse'],
clf_svd.best_estimator['rmse'],
clf_svdpp.best_estimator['rmse']]:
#CV
cv_score = evaluator(algo,
data,
cv_method)
#Bias
train_set = data.build_full_trainset()
algo.fit(train_set)
preds = algo.test(train_set.build_testset())
bias = accuracy.rmse(preds)
#Error
test_set = data.construct_testset(test_ratings)
preds = algo.test(test_set)
err.append(accuracy.rmse(preds))
#Baseline CV
print('\nModel CV avg:\t' + str(cv_score[0]))
print('\nModel CV std:\t' + str(cv_score[1]))
print('\nModel bias:\t' + str(bias) + '\n')
The SVD models perform best, with the SVDpp model showing both the lowest CV score, and lowest standard deviation of the score. In addition, the microscopic bias of the SVD model implies that all of the performance is coming from variance. With a known overfitting issue, I prefer the SVDpp model.
Having established the model, we now look to the OOS error, to see if we have improved on the benchmark error of 0.81229.
print(err)
algo = clf_svdpp.best_estimator['rmse']
That was a lot of work for a small incremental improvement. Oh well, it looks like the model is an improvment, and that the process is more sound.
Having set a model, we look to set the number of items to serve to the client. This is more tied to the business problem than the individual user. For this problem, we are trying to come up with new ideas, so we do not want to serve something that the user has already rated.
The measure of a good number is the recall. Recall is a measure of the percentage of items served to the user, that the user will rate positively. With a continuous rating system, we have to set a threshold to establish what a positive rating is, and vary the number of items and look at how recall evolves with the number of items. We can do this at varying thresholds.
def precision_recall_at_k(predictions, k=10, threshold=4):
'''Return precision and recall at k metrics for each user.'''
# First map the predictions to each user.
user_est_true = defaultdict(list)
for uid, _, true_r, est, _ in predictions:
user_est_true[uid].append((est, true_r))
precisions = dict()
recalls = dict()
for uid, user_ratings in user_est_true.items():
# Sort user ratings by estimated value
user_ratings.sort(key=lambda x: x[0], reverse=True)
# Number of relevant items
n_rel = sum((true_r >= threshold) for (_, true_r) in user_ratings)
# Number of recommended items in top k
n_rec_k = sum((est >= threshold) for (est, _) in user_ratings[:k])
# Number of relevant and recommended items in top k
n_rel_and_rec_k = sum(((true_r >= threshold) and (est >= threshold))
for (est, true_r) in user_ratings[:k])
# Precision@K: Proportion of recommended items that are relevant
precisions[uid] = n_rel_and_rec_k / n_rec_k if n_rec_k != 0 else 1
# Recall@K: Proportion of relevant items that are recommended
recalls[uid] = n_rel_and_rec_k / n_rel if n_rel != 0 else 1
return precisions, recalls
store_outer = []
store_inner = []
data.raw_ratings = train_ratings + test_ratings
cv = KFold()
for num in range(1, 21):
for cut_off in np.arange(2.5, 5, 0.25):
store_inner = []
for trainset, testset in cv.split(data):
algo.fit(trainset)
predictions = algo.test(testset)
precisions, recalls = precision_recall_at_k(predictions,
k = num,
threshold = cut_off)
#Fix here to add threshold
store_inner.append(pd.DataFrame({'Precision' : [sum(prec for prec in precisions.values()) / len(precisions)],
'recalls' : [sum(rec for rec in recalls.values()) / len(recalls)],
'Count' : [len(predictions)]}))
store_inner = pd.concat(store_inner)
store_inner['Precision'] = store_inner['Precision'] * store_inner['Count']
store_inner['recalls'] = store_inner['recalls'] * store_inner['Count']
store_inner = store_inner.sum()
store_inner['Precision'] = store_inner['Precision'] / store_inner['Count']
store_inner['recalls'] = store_inner['recalls'] / store_inner['Count']
store_inner['k'] = num
store_inner['threshold'] = cut_off
store_outer.append(store_inner)
df_result = pd.concat(store_outer, axis = 1)
df_result = df_result.transpose()
df_result.index = df_result.k
df_result.rename(columns = {'recalls' : 'Recall'}, inplace = True)
df_result[df_result['threshold']==4.5][['Precision', 'Recall']].\
plot(title = 'Precision and Recall at 4.5 Threshold\nVarying the Number of Items Shown')
It looks liek 9 is a good trade-off between preserving recall and not underwhelming or overwhelming the user. In production systemss, we can perterb this and measure the effect on KPIs. For this project, we can just hold it as is.
After going through the process of model development, the easiest way to improve a model is by increasing the data size. In webscraping, I was told to hold off for a few weeks by the website, so adding more data at the moment is not possible. Examine the impact on the model of increasing the size of the data when we can.
hold_data = data.raw_ratings
results_l = []
n_samples = 500
for ii in [10, 100, 250, 500, 750, 800]:
results_m = []
results_s = []
for jj in range(n_samples):
random.shuffle(hold_data)
train_ratings = hold_data[:ii]
test_ratings = hold_data[ii:]
data.raw_ratings = train_ratings
algo.fit(data.build_full_trainset())
preds = algo.test(data.construct_testset(test_ratings))
err = accuracy.rmse(preds)
results_m.append(err)
results_s.append(err**2)
results_l.append({'Count' : ii,
'Mean' : sum(results_m) / n_samples,
'Second': sum(results_s) / n_samples})
print(ii)
data.raw_ratings = hold_data
df = pd.DataFrame.from_dict(results_l)
df['Training Set Size'] = df['Count']
df.index = df['Training Set Size']
df.Mean.plot()
It looks like we are still in a phase where we can substantially improve by adding more data. I think when the strongly suggested cooling off period is over, I will continue to scrape the website.
As a the obvious final step, we take a new user and make a suggested list for them. I picked out tx-brewer because he had rated some recipes that looked good to me at a glance. Let's see what else he would like.
res = []
for key, value in zip(train_set._raw2inner_id_items.keys(),
train_set._raw2inner_id_items.values()):
pred = algo.predict(train_set._raw2inner_id_users['2891/tx-brewer'],
value)
res.append({'User' : '2891/tx-brewer',
'Item' : key,
'Value' :pred.est})
res = pd.DataFrame.from_dict(res)
prev_serv = ratings[ratings['User'] == '2891/tx-brewer']['Recipe'].values
res = res[[x not in prev_serv for x in res['Item']]]
res.sort_values('Value', inplace = True, ascending = False)
res = res.head(30)
res['Item'] = [x.replace('recipes/', '') for x in res['Item']]
res = pd.merge(res,
df_desc[['Recipe', 'ABV', 'Bitter', 'Name', 'Rating', 'Style', 'Taste']],
left_on = 'Item',
right_on = 'Recipe')
res = res.head(9)
res = res[['Item', 'Recipe', 'User', 'Value', 'ABV', 'Bitter', 'Name', 'Rating', 'Style', 'Taste']]
print('Results for tx-brewer:\n\n')
print(res)
Interestingly, one of the recipes had an extremely low rating. Upon closer inspection, it looks like the two raters had an opposite pallate to tx-brewer. In addition, there are quite a few wheat beers and American Pale Ales that made it onto the list. This is in line with what the user has historically rated.


Childcare
We offer free childcare throughout the SRCCON:POWER program (including Thursday evening) and welcome families of all sizes. Our providers are the wonderful KiddieCorp team, whom we’ve worked with for five SRCCON events! Here’s why we think providing childcare at our events is so important.
Our care providers
Staff-to-child ratios range from 1:2 for children 6-11 months to 1:7 for children aged 6-12 years, and KiddieCorp will work with SRCCON organizers to handle registration and logistics so your kid(s) can have a great time while you’re conferencing. All caregivers act as employees of KiddieCorp (not contractors) and are recruited from local licensed daycare centers, elementary schools, preschools, and collegiate departments of early childhood education.
Two of our own staff members have had their young children happily in KiddieCorp’s care and we were all impressed by the thoughtfulness they brought to every aspect of their services.
About this year’s program
- Our childcare manager will be Juanita from Baltimore, a senior program director for youth wellbeing programs at the Y in central Maryland.
- This year’s theme is “Superheroes Unite”, giving some fun structure to group games, arts & crafts, and play times throughout the day.
Logistics
Childcare will take place at the conference hotel, which is a few blocks away from the conference venue. Registration will open soon. There’s an option on the call for participation form to tell us you’d like more information when registration opens, or you can email us anytime. You can register now and learn more about KiddieCorp’s staffing and security procedures.


{{>header}} Home Blog Nuestro Blog {{#blogs}} {{title}} July. 24, 2019 Diana {{text}} {{/blogs}}
Home Blog
{{text}}


Spatial downscaling of coarse grid mapping to fine grid mapping using predictive covariates and a model fitted using the 'caret' package. The original dissever algorithm was published by Malone et al. (2012) <doi:10.1016/j.cageo.2011.08.021>, and extended by Roudier et al. (2017) <doi:10.1016/j.compag.2017.08.021>.
| Version: | 0.2-3 |
| Imports: | methods, caret, sp, raster, plyr, dplyr, foreach, boot, magrittr, viridis |
| Suggests: | knitr, rmarkdown, randomForest, Cubist, gam, stats |
| Published: | 2018-04-20 |
| Author: | Pierre Roudier [cre, aut], Brendan Malone [ctb] |
| Maintainer: | Pierre Roudier <roudierp at landcareresearch.co.nz> |
| BugReports: | https://github.com/pierreroudier/dissever/issues |
| License: | GPL-2 |
| URL: | https://github.com/pierreroudier/dissever |
| NeedsCompilation: | no |
| Materials: | README |
| CRAN checks: | dissever results |
| Reference manual: | dissever.pdf |
| Vignettes: |
Dissever Tutorial |
| Package source: | dissever_0.2-3.tar.gz |
| Windows binaries: | r-devel: dissever_0.2-3.zip, r-release: dissever_0.2-3.zip, r-oldrel: dissever_0.2-3.zip |
| OS X binaries: | r-release: dissever_0.2-3.tgz, r-oldrel: dissever_0.2-3.tgz |
| Old sources: | dissever archive |
Please use the canonical form https://CRAN.R-project.org/package=dissever to link to this page.


My Team
Max
Manager
ID: 1
Email:
<EMAIL_ADDRESS>Office: 121
Matt
Engineer
ID: 2
Email:
<EMAIL_ADDRESS>Github:
matt
Michael
Engineer
ID: 3
Email:
<EMAIL_ADDRESS>Github:
michael
Mark
Intern
ID: 4
Email:
<EMAIL_ADDRESS>School: Utsa


Gabriel Brammer
Associate Professor
Cosmic Dawn Center, Niels Bohr Institute, Københavns Universitet
I am an Associate Professor at the Cosmic Dawn Center in the Niels Bohr Institute at the University of Copenhagen.
I received my PhD degree from Yale University in 2010, and prior to coming to DAWN I was a postdoctoral Fellow at the European Southern Observatory (Chile) and an ESA/AURA Astronomer at the Space Telescope Science Institute in Baltimore, Maryland (USA).
My research involves studying the formation and evolution of galaxies across much of cosmic time, from relatively nearby massive, evolved objects to infant galaxies at the current limit of the observable Universe. I discover and characterize these objects by and exploiting large imaging and spectroscopic surveys with the Hubble Space Telescope, and I am helping to develop next-generation projects with the Guranteed Time Observer, Early Release Science, and General Observer programs on the James Webb Space Telescope, launched 25 December 2022.


The Consumer Financial Protection Bureau (CFPB) was created in the wake of the financial crisis to to provide a single point of accountability for enforcing federal consumer financial laws and protecting consumers in the financial marketplace. In 2014, I was part of a new multidisciplinary design and development team redesigning the agency’s website, consumerfinance.gov.
We had done quite a bit of foundational research work. This let us develop early stage guardrails for iterative development. We had a rough idea of the sitemap and both the visual and content style. But as a financial regulator, the CFPB approached every type of publishing with an abundance of caution over how it might affect markets. So developing something production-ready, even in beta, was slow. We needed to show that our directions could be helpful somewhere that didn’t have this risk. As the team moved into redsigning the careers section of the site in 2015, we found an opportunity.
For a number of reasons, hiring at the new agency was a constant need. The agency couldn’t afford to see applications from good people rejected because they didn’t understand government hiring rules. From a regulatory perspective, however, talent acquisition was a far less fraught area to experiment with.
Federal hiring is complicated. Even for a single job in a single agency, there maybe different sets of standards for how to qualify. This makes it hard to provide clear and accurate information to the public, who generally aren’t familiar with the basics let alone the specifics. It’s not uncommon to be rejected as unqualified for a job that anyone can see you are, in fact, qualified for.
The CFPB’s work is all about making fine print understandable to ordinary consumers. As a matter of ethos, it was unacceptable to us to let the complexity of rules meant we couldn’t offer direct, useful advice. And as a practical matter, if we couldn’t offer good information about applying, hiring would always be a drag on the agency. How could we provide job applicants the clarity they needed?
Initially, we wanted to describe the entire application process with all its caveats. As I worked through the issues with the Director of Talent Acquisition, it was clear this would be too much for something that wasn’t core to the agency’s mission. Instead, we tried to explain the parts of the process that confused applicants most often: the concept of “minimally qualified,” how terminology mismatches with the job announcement could sink an application, and the right way to ask questions about your own application.
To explain even these things longhand risked exploding other parts of the careers section: new job listings, special hiring programs, etc. People needed lightbulb moments about their own experience, not every detail. We also thought that this content could be useful to people in offices around the agency and across the government so we wanted something sharable. The most interesting solution seemed like a video. It could support the content around it, explore the more progressive (cartoony) parts of our visual style, and tell the necessary story, even if someone was applying at a federal agency other than the CFPB.
I wrote a script and worked with our visual designers to storyboard the video. We focused on demystification and approachability above all. We knew the process felt weird; we’d gone through it ourselves. We wanted applicants to understand why it felt weird.
The fist thing the video accomplished was to set down a marker for our new designs. It was released more than a year before the changeover from beta.consumerfinance.gov to consumerfinance.gov. It established that both the voice and visual direction we were trying could break through the complication of some material to help people connect with government information.
The impact on the CFPB’s hiring efforts was never well ascertained. The growing number of modern digital programs in the federal government, however, have used this video to encourage assertive recruitment by their own agencies. Agencies often give into their own worries that innovative people don’t apply, and the most effective thing to do sometimes is to arm people who are trying to change their minds with tools like this.
The video in this case study supports the CFPB’s introduction to the job application process.


blockcluster: Co-clustering Package for Binary, Categorical, Contingency and
Continuous Data-Sets
Simultaneous clustering of rows and columns, usually designated by
biclustering, co-clustering or block clustering, is an important technique
in two way data analysis. It consists of estimating a mixture model which
takes into account the block clustering problem on both the individual and
variables sets. The 'blockcluster' package provides a bridge between the C++
core library build on top of the 'STK++' library, and the R statistical
computing environment. This package allows to co-cluster binary
<doi:10.1016/j.csda.2007.09.007>, contingency <doi:10.1080/03610920903140197>,
continuous <doi:10.1007/s11634-013-0161-3> and categorical data-sets
<doi:10.1007/s11222-014-9472-2>. It also provides utility functions to
visualize the results. This package may be useful for various applications
in fields of Data mining, Information retrieval, Biology, computer vision
and many more. More information about the project and comprehensive tutorial
can be found on the link mentioned in URL.
Downloads:
Reverse dependencies:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=blockcluster
to link to this page.


A place for general developer talk – for everyone! | Documentation https://developers.komodoplatform.com | MoreDev Docs - https://docs.komodoplatform.com | Mastering CryptoConditions - https://github.com/KomodoPlatform/Mastering_CryptoConditions
Recently $KMD importprivkey RPC learned how to import keys from any coin! Now $HUSH can trivially import privkeys from our old chain! The next release of SilentDragon will make claiming funds on our new mainnet super easy
Example:
hush-cli importprivkey WIF "hush" tr...
CHMEX22-Jul-19 11:47 AM
I really like the rescan from height feature as we know it from z_importkey
dukeleto22-Jul-19 12:25 PM
very very useful
Paro22-Jul-19 01:09 PM
version. komodo.exe "How do I create a windows client?"
I don't want to compile ubuntu all the time.(edited)
Has anybody tried to port komodo to any of the BSDs?
Alright22-Jul-19 10:31 PM
@Blue M'aiq doubt it, radix42#3743 would likely be a good person to talk about it. I see she has BSD binaries for zcash on her site. She did the ARM port of komodod
dukeleto22-Jul-19 10:39 PM
@Blue M'aiq yes, FreeBSD mostly works. OpenBSD is missing some important dependencies like Rust. If you are a BSD lover, we would love some help. I would love to run Hush+KMD on openbsd.
radix42 is the BSD whisperer
Mylo23-Jul-19 01:21 AM
running on bsd would be cool. i can fire up a bsd server. i know some service providers prefer bsd.
the helpful please help human statement was not accurately reporting when the fork point was however.
dukeleto23-Jul-19 10:38 AM
@Mylo how was it wrong?
Mylo23-Jul-19 11:00 AM
current tip: 128602
fork point: 122908 <--- wrong 5694 blocks to here.
reconsider block: 122212 <---- actual fork point
the fork point detection. maybe it found more forks points on the network?
@dukeleto yeah sorry, i should have given a bit more razor sharp focus than leaving the clues dangling in the wind
dukeleto23-Jul-19 11:05 AM
@Mylo yeah, maybe there were multiple forks. The code that prints the info in "help me human" could maybe be improved, too.
Mylo23-Jul-19 11:07 AM
yep. no need to guess, just tell how to fix. look up explorer. i just guessed in 1k block intervals. took about 15 guesses halving each time
ComputerGenie 👴👴👴23-Jul-19 11:18 AM
The code that prints the info in "help me human" could maybe be improved, too.
I've always thought it was the single best print ever put in there
Blue M'aiq23-Jul-19 02:31 PM
@Alrightthanks, I'll look into it.
@dukeleto i just started with messing around with FreeBSD about a month ago. I'm putting together a small SSH server to tinker with. I'll let ya know if I come up with something.
@Alright off hand do you have a link to radix42 site?
Blue M'aiq23-Jul-19 02:55 PM
nevermind, I found it
dukeleto23-Jul-19 03:55 PM
How much RAM is too much RAM for a dev machine?
I am trying to imagine using 32 or 64GB of RAM
ComputerGenie 👴👴👴23-Jul-19 03:58 PM
How much RAM is too much RAM
the amount that you never use
jl777c23-Jul-19 04:04 PM
42 TB
dukeleto23-Jul-19 04:25 PM
32GB of DDR4 for $140! I remember paying $200 for 4MB of RAM, so I could play games in DOS
64GB seems to be the current max for DDR4 normal mobo's
was looking forward to 77GB, darn
I am building a new 3rd gen Ryzen desktop dev machine, for fun and to have a damn fast place to compile stuff
it will also allow me to performance test shielded transactions on this new CPU, nobody has any stats
3rd gen stuff are making Threadripper prices come down, but they are still expensive
Details about an ongoing FPGA acceleration project by the Zcash Foundation.
jl777c23-Jul-19 08:30 PM
interesting that secp256k1 verification isnt sped up very much. makes a signature based mining an intriguing possibility
qqil25-Jul-19 09:27 AM
testnet exists for komodo? or maybe somewhere i can get small amount of kmd for testing ?
jl777c25-Jul-19 09:28 AM
what do you want to test
qqil25-Jul-19 09:29 AM
my integration, i need to make few minimal transactions
jl777c25-Jul-19 09:30 AM
you can test nspv, very easy to use, 300kb executable and 3MB RAM footprint
qqil25-Jul-19 09:33 AM
nspv - it is somekind of mode for node ?
looks like it will not work for me
so, there is no testnet and no faucets to get small amount of coins?
jl777c25-Jul-19 09:38 AM
nspv allows to make transactions, of course you can use the normal komodod
if you need some coins to test with, just post your address
qqil25-Jul-19 09:44 AM
RFHkDMYWk4PWTWxfByWoAGzsxcZwCyZVuT
jl777c25-Jul-19 09:46 AM
sent
qqil25-Jul-19 09:46 AM
thank you! you saved me some time
dukeleto25-Jul-19 12:18 PM
@qqil we make test chains in KMD world, not testnets. We have tools that make creating new chains trivial, so when you ask for a "testnet", we call that a "testchain" here. A testchain is better and more general than a testnet
we also do have regtests and tests that can talk to a testnet/testchain
qqil25-Jul-19 12:26 PM
idk how you name it, but in general, working with other coins, it is testnet. also in electrumx i can't see anything except Komodo network (no private chain network, etc.)
@dukeleto
do you have any docs how to create testchain?(edited)
Tiny Bitcoin Library written in C, with nSPV added - jl777/libnspv
very lightweight client that can monitor any address
and also do spend
dukeleto25-Jul-19 12:36 PM
@qqil a testnet is a way to make "test coins". A test chain does the same thing. What exactly are you trying to do? It's just one short CLI command to make a test chain
qqil25-Jul-19 12:37 PM
i have setup with electrumx and node. electrumx monitor any amount of my addresses..
the thing that i test is creating multisig address
@qqil all KMD chains share the same address prefixes and WIF private key format
qqil25-Jul-19 01:34 PM
node in offline mode is able to sign transaction or not?
the transaction was rejected by network rules.\n\n16: mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack element)


1. Setting up IVT
1.1. Downloading the IVT
Download the newest version of the IVT, e.g. ivt-1.3.7.zip
, at http://sourceforge.net/projects/ivt/ in the download area.
1.2. Unpacking
In a console window, change to the directory of the downloaded archive and then run the command unzip ivt-1.3.5.zip
. After unpacking, the directory IVT
should exist in the current directory.
1.3. Configuration
The IVT offers the possibility of configuring the library before building it. This configuration takes place in the file IVT/src/Makefile.base
. In order to change the default settings, the file Makefile.base
must be opened and edited with a text editor (e.g. vim). In the following, the most important configuration options available under Linux are listed. These options are configuration variables, which can be set either to 1 or 0. In order to integrate or exclude certain parts of the IVT library, the appropriate configuration variable must be set to 1 for integration and to 0 for exclusion.
Note: Only one GUI implementation can be activated at a time, i.e. USE_QTGUI and USE_GTK_GUI must not both be set to 1 at the same time.
-
USE_QT
The IVT library is extended by classes that allow the easy creation of graphical user interfaces with Qt. The associated source files with the file namesQT*
are located inIVT/src/gui
. The default settings for the include paths and library paths assume Qt4 to be installed. -
USE_QTGUI
The IVT library implements an own multi-platform GUI toolkit, which is used by the example applications. Under Linux, a Qt as well as a GTK implementation are available. The Qt implementation can be activated with this flag. When setting QT_GUI = 1, then USE_QT = 1 must also be set. -
USE_GTKGUI
The IVT library implements an own multi-platform GUI toolkit, which is used by the example applications. Under Linux, a Qt as well as a GTK implementation are available. The GTK implementation can be activated with this flag. -
USE_OPENGL
The IVT library allows easy access to OpenGL and GLU. The GUI toolkit of the IVT allows the creation of GL widgets. Furthermore, the classCOpenGLVisualizer
sets up the projection model for a given instance of the classCCalibration
. -
USE_V4L
An interface to Video for Linux (V4L) enables the control of most USB cameras (e.g. webcams). The classCV4LCapture
implements the capture module. -
USE_LIBDC1394 or USE_LIBDC1394_V2
An interface to the library libdc1394 enables the control of IEEE1394 cameras (firewire cameras). For using version 1.x of libdc1394 USE_LIBDC1394 = 1 must be set and the classCLinux1394Capture
must be used. For using version 2.x of libdc1394 USE_LIBDC1394_V2 = 1 must be set and the classCLinux1394Capture2
must be used. It is recommended to use the more current version 2.x. -
USE_OPENCV
The IVT library optionally integrates calls to the OpenCV library. The file names of the source files implementing encapsulated calls to the OpenCV have the endingCV.h
andCV.cpp
, respectively. -
USE_OPENCV_HIGHGUI
HighGUI is part of the OpenCV library. It is needed for the optional IVT classesCCVCamCapture
,COpenCVCapture
,CVideoWriterCV
,CHaarClassifierCV
,COpenCVApplicationHandler
,COpenCVWindow
and the namespaceImageAcessCV
.
Apart from these variables, the directory paths to include and library files as well as the file names of the libraries can be changed in the lower part of the file. Most of the paths are set automatically by using pkg-config. If pkg-config is not available, hardcode paths are set, which usually correspond to the default installation paths. However, these paths can differ, depending on the Linux distribution. Modifying the paths is only recommended, if problems arise with the default paths. For manual adjustment of the paths, a short explanation of the appropriate variables is given in the following:
-
INCPATHS_BASE
Contains all directory paths to included files. Adding a path takes place by using the operator += and adding the path with the leading parameter -I. For example INCPATHS_BASE += -I/usr/include/QtCore -
LIBPATHS_BASE
Contains all directory paths to library files. Adding a path takes place by using the operator += and adding the path with the leading parameter -L. For example LIBPATHS_BASE += -L/usr/share/qt4/lib -
LIBS_BASE
Contains all file names of the libraries. Adding a file name takes place by using the operator += and adding the file name with the leading parameter -l. For example LIBS_BASE += -lQtCore
1.4. Building the IVT libraries
The libraries are built by running the command make
in the directory IVT/src
. If after having built the IVT library once, modifications are made to the IVT files located in IVT/src
, it is recommended to run the command make clean
before running the command make
, in order to enforce a complete new build process.
1.5. Example application
For checking the installation, and as an introduction to programming with the IVT, the most simple example application is SimpleApp. SimpleApp doesn't use a GUI and thus doesn't require Qt or any other libraries to be installed. It is found in IVT/examples/SimpleApp
. After changing to the directory SimpleApp
, an executable file with the name simpleapp
is created by running the command make
. If the application is started with
./simpleapp ../../files/scene_left.bmp
,
then a file called output.bmp
is produced in the same directory. There are numerous further example applications in the directory IVT/examples
, with which the features of the IVT can be tested and learned. For checking Qt support, e.g. the example application in IVT/examples/FilterDemo
can be used.
2. Setting up Qt
For the installation of Qt, a so-called package tool is recommended. It is important to make sure that a developer package of Qt version 4 (Qt4) is installed. Qt3 is also supported, but the default settings in the file Makefile.base
assume Qt4. For instance, under Debian Linux, Qt4 is installed with:
apt-get install qt4-dev-tools
.
3. Optional: Setting up Firewire and libdc1394/libraw1394
3.1. Installation of libdc1394/libraw1394
The two libraries libdc1394 and libraw1394 can also be installed with a package tool. For instance, under Debian Linux, the libraries are installed with:
apt-get install libraw1394
and apt-get install libdc1394
.
3.2. Installing a firewire camera
In order to use a firewire camera under Linux, the four kernel modules named raw1394, video1394, ohci1394 and ieee1394 must be loaded. This is accomplished under Debian Linux using the command modprobe
. modprobe raw1394
and modprobe video1394
are sufficient to activate all four modules. With the command lsmod | grep 1394
, it can be checked whether the four modules have been successfully loaded. This command should list the above mentioned four modules. If this should not be the case, try to add each module individually with the command modprobe
.
In order to allow a user or an application to access the interface to the camera, the user has to be registered in the appropriate groups (usually video
) of the devices /dev/raw1394
and /dev/video1394
, or the user privileges of the devices must be set appropriately. For this, root privileges are necessary.


{% extends "base.html" %} {% import 'bootstrap/wtf.html' as wtf %} {% block app_content %}
You are now using {{ session['datasetinuse'] }} as a dataset to make a subset from. Please also select the target variable in the variables to include. You can select multiple columns by using the ctrl button while clicking.


@(notCompleted : Html , completed : Html, isLoggedIn : Boolean, loggedInUser : Integer) @doctype.render
USE OUR INTERACTIVE MAP TO LEARN ABOUT THE WATERFALLS YOU CAN EXPLORE


Database storage and access using annotations.
Documentation: https://hfw.github.io/db
Class Annotations
/**
* @record my_table
*/
class MyClass implements Helix\DB\EntityInterface, ArrayAccess {
use Helix\DB\AttributesTrait;
/**
* "id" is a required column.
* @column
* @var int
*/
protected $id = 0;
/**
* @column
* @var string
*/
protected $myColumn;
/**
* @eav foo_eav
* @var array
*/
protected $attributes;
/**
* @return int
*/
final public function getId() {
return $this->id;
}
}
- Columns must be named the same as their respective properties.
- EAV tables must have 3 columns:
entity
, attribute
, and value
.
entity
must be a foreign key.
entity
and attribute
must form the primary key.
Interface Annotations
Interfaces can be annotated to act as junctions.
/**
* @junction foo_bar
* @foreign foo_id Foo
* @foreign bar_id Bar
*/
interface FooBar { }
- The interfaces don't have to be implemented.
- The referenced classes may be identical.
Supported Drivers
Class Diagram


Hello, I AM VINCENT, THIS IS MY WEBSITE
CLICK FOR MENU
mainpage
Please enable JavaScript to view the
comments powered by Disqus.


|
c++ library collection
|
Go to the source code of this file.
Macros | |
| #define | PLATFORM_LINUX 0 |
| #define | PLATFORM_WINDOWS 0 |
| #define | ERROR_PLATFORM_UNSUPPORTED static_assert ( false, "Platform not supported" ) |
| #define | __FILENAME__ &__FILE__[0] |
| #define | SOURCE_LINE std::string(__FILENAME__) + ":" + std::to_string(__LINE__) + ": in \"" + std::string(&__FUNCTION__[0]) + "\"" |
| #define | NOT_USED(x) static_cast<void>(x) |
| #define __FILENAME__ &__FILE__[0] |
| #define ERROR_PLATFORM_UNSUPPORTED static_assert ( false, "Platform not supported" ) |
| #define NOT_USED | ( | x | ) | static_cast<void>(x) |
| #define PLATFORM_LINUX 0 |
| #define PLATFORM_WINDOWS 0 |
| #define SOURCE_LINE std::string(__FILENAME__) + ":" + std::to_string(__LINE__) + ": in \"" + std::string(&__FUNCTION__[0]) + "\"" |


Add "?q=[path to a result directory]" at the end of url.
The result directory must have "result.txt", "events.txt", and incremental t-sne results that are captured during training.
example: /visualizer.html?q=./bhtsne
example: /visualizer.html?q=./bhtsne&labels=./labels.txt


{%- comment -%} Based on jekyll-octopod/jekyll-bulma - excluding footer {%- endcomment -%} {% include head.html %}


|
PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <stdint.h>
Go to the source code of this file.
Macros | |
| #define | FRSKY_ID_GPS_ALT_BP 0x01 |
| #define | FRSKY_ID_TEMP1 0x02 |
| #define | FRSKY_ID_RPM 0x03 |
| #define | FRSKY_ID_FUEL 0x04 |
| #define | FRSKY_ID_TEMP2 0x05 |
| #define | FRSKY_ID_VOLTS 0x06 |
| #define | FRSKY_ID_GPS_ALT_AP 0x09 |
| #define | FRSKY_ID_BARO_ALT_BP 0x10 |
| #define | FRSKY_ID_GPS_SPEED_BP 0x11 |
| #define | FRSKY_ID_GPS_LONG_BP 0x12 |
| #define | FRSKY_ID_GPS_LAT_BP 0x13 |
| #define | FRSKY_ID_GPS_COURS_BP 0x14 |
| #define | FRSKY_ID_GPS_DAY_MONTH 0x15 |
| #define | FRSKY_ID_GPS_YEAR 0x16 |
| #define | FRSKY_ID_GPS_HOUR_MIN 0x17 |
| #define | FRSKY_ID_GPS_SEC 0x18 |
| #define | FRSKY_ID_GPS_SPEED_AP 0x19 |
| #define | FRSKY_ID_GPS_LONG_AP 0x1A |
| #define | FRSKY_ID_GPS_LAT_AP 0x1B |
| #define | FRSKY_ID_GPS_COURS_AP 0x1C |
| #define | FRSKY_ID_BARO_ALT_AP 0x21 |
| #define | FRSKY_ID_GPS_LONG_EW 0x22 |
| #define | FRSKY_ID_GPS_LAT_NS 0x23 |
| #define | FRSKY_ID_ACCEL_X 0x24 |
| #define | FRSKY_ID_ACCEL_Y 0x25 |
| #define | FRSKY_ID_ACCEL_Z 0x26 |
| #define | FRSKY_ID_CURRENT 0x28 |
| #define | FRSKY_ID_VARIO 0x30 |
| #define | FRSKY_ID_VFAS 0x39 |
| #define | FRSKY_ID_VOLTS_BP 0x3A |
| #define | FRSKY_ID_VOLTS_AP 0x3B |
Functions | |
| uint16_t | get_telemetry_flight_mode (int px4_flight_mode) |
| Map the PX4 flight mode (vehicle_status_s::nav_state) to the telemetry flight mode. More... | |
| #define FRSKY_ID_ACCEL_X 0x24 |
Definition at line 68 of file common.h.
Referenced by frsky_send_frame1().
| #define FRSKY_ID_ACCEL_Y 0x25 |
Definition at line 69 of file common.h.
Referenced by frsky_send_frame1().
| #define FRSKY_ID_ACCEL_Z 0x26 |
Definition at line 70 of file common.h.
Referenced by frsky_send_frame1().
| #define FRSKY_ID_BARO_ALT_AP 0x21 |
Definition at line 65 of file common.h.
Referenced by frsky_send_frame1().
| #define FRSKY_ID_BARO_ALT_BP 0x10 |
Definition at line 52 of file common.h.
Referenced by frsky_send_frame1().
| #define FRSKY_ID_CURRENT 0x28 |
Definition at line 71 of file common.h.
Referenced by frsky_send_frame1().
| #define FRSKY_ID_FUEL 0x04 |
Definition at line 48 of file common.h.
Referenced by frsky_send_frame2().
| #define FRSKY_ID_GPS_ALT_AP 0x09 |
Definition at line 51 of file common.h.
Referenced by frsky_send_frame2().
| #define FRSKY_ID_GPS_ALT_BP 0x01 |
Definition at line 45 of file common.h.
Referenced by frsky_send_frame2().
| #define FRSKY_ID_GPS_COURS_AP 0x1C |
Definition at line 64 of file common.h.
Referenced by frsky_send_frame2().
| #define FRSKY_ID_GPS_COURS_BP 0x14 |
Definition at line 56 of file common.h.
Referenced by frsky_send_frame2().
| #define FRSKY_ID_GPS_DAY_MONTH 0x15 |
Definition at line 57 of file common.h.
Referenced by frsky_send_frame3().
| #define FRSKY_ID_GPS_HOUR_MIN 0x17 |
Definition at line 59 of file common.h.
Referenced by frsky_send_frame3().
| #define FRSKY_ID_GPS_LAT_AP 0x1B |
Definition at line 63 of file common.h.
Referenced by frsky_send_frame2().
| #define FRSKY_ID_GPS_LAT_BP 0x13 |
Definition at line 55 of file common.h.
Referenced by frsky_send_frame2().
| #define FRSKY_ID_GPS_LAT_NS 0x23 |
Definition at line 67 of file common.h.
Referenced by frsky_send_frame2().
| #define FRSKY_ID_GPS_LONG_AP 0x1A |
Definition at line 62 of file common.h.
Referenced by frsky_send_frame2().
| #define FRSKY_ID_GPS_LONG_BP 0x12 |
Definition at line 54 of file common.h.
Referenced by frsky_send_frame2().
| #define FRSKY_ID_GPS_LONG_EW 0x22 |
Definition at line 66 of file common.h.
Referenced by frsky_send_frame2().
| #define FRSKY_ID_GPS_SEC 0x18 |
Definition at line 60 of file common.h.
Referenced by frsky_send_frame2(), and frsky_send_frame3().
| #define FRSKY_ID_GPS_SPEED_AP 0x19 |
Definition at line 61 of file common.h.
Referenced by frsky_send_frame2().
| #define FRSKY_ID_GPS_SPEED_BP 0x11 |
Definition at line 53 of file common.h.
Referenced by frsky_send_frame2().
| #define FRSKY_ID_GPS_YEAR 0x16 |
Definition at line 58 of file common.h.
Referenced by frsky_send_frame3().
| #define FRSKY_ID_TEMP1 0x02 |
Definition at line 46 of file common.h.
Referenced by frsky_send_frame1(), and sPort_send_flight_mode().
| #define FRSKY_ID_TEMP2 0x05 |
Definition at line 49 of file common.h.
Referenced by frsky_send_frame1(), and sPort_send_GPS_info().
| #define FRSKY_ID_VFAS 0x39 |
Definition at line 73 of file common.h.
Referenced by frsky_send_frame1().
| uint16_t get_telemetry_flight_mode | ( | int | px4_flight_mode | ) |
Map the PX4 flight mode (vehicle_status_s::nav_state) to the telemetry flight mode.
Definition at line 94 of file frsky_telemetry.cpp.
Referenced by frsky_send_frame1(), and sPort_send_flight_mode().


Swipeable Bottom Sheet
View project on GitHub
This example shows a basic, uncontrolled Swipeable Bottom Sheet.
Here, the bottom sheet height scales automatically with its content.
Show me the code
See controlled example
See fullscreen example
See scrollable example


How to add health checks to Swagger in .NET Core
The code for this example can be found on Github
Health checks are a nice feature in ASP.NET Core that lets you create an endpoint that your load balancer or health checking systems can ping to check your service. If there is an unhealthy response then the response will have a 503 response code. Otherwise it will be 200. You can chain multiple health checks together to check the various resources your service depends on.
You may want to create different health checks for performance reasons. You may want a lightweight check that is used to determine if your service is alive at all and a more heavyweight check that checks everything.
Adding a health check is straight forward. Instead of checking SQL you could just as easily performed a HTTP request or called another service.
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
services.AddOpenApiDocument();
string connectionString = this.Configuration.GetConnectionString("Default");
services.AddHealthChecks().AddCheck("sql", () =>
{
string sqlHealthCheckDescription = "Tests that we can connect and select from the database.";
using (SqlConnection connection = new SqlConnection(connectionString))
{
try
{
connection.Open();
SqlCommand command = new SqlCommand("SELECT TOP(1) id from dbo.Pets", connection);
command.ExecuteNonQuery();
}
catch (Exception ex)
{
Log.Error(ex, "Exception in sql health check");
return HealthCheckResult.Unhealthy(sqlHealthCheckDescription);
}
}
return HealthCheckResult.Healthy(sqlHealthCheckDescription);
});
}
Normally you would also use endpoints.MapHealthChecks like this to enable your health checks. This does work but your health check won’t show up in swagger.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseHttpsRedirection();
app.UseRouting();
app.UseAuthorization();
app.UseOpenApi();
app.UseSwaggerUi3();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapHealthChecks("/health")
});
}
I prefer for my health checjs to show up in swagger. You can accomplish this by adding a health controller.
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Diagnostics.HealthChecks;
namespace APIHealthChecks.Controllers
{
[Route("[controller]")]
[ApiController]
[AllowAnonymous]
public class HealthController : ControllerBase
{
private readonly HealthCheckService healthCheckService;
public HealthController(HealthCheckService healthCheckService)
{
this.healthCheckService = healthCheckService;
}
/// <summary>
/// This health endpoint checks that services and resources this API depends on are functional.
/// </summary>
/// <returns></returns>
[HttpGet]
public async Task<ActionResult> Get()
{
HealthReport report = await this.healthCheckService.CheckHealthAsync();
var result = new
{
status = report.Status.ToString(),
errors = report.Entries.Select(e => new { name = e.Key, status = e.Value.Status.ToString(), description = e.Value.Description.ToString() })
};
return report.Status == HealthStatus.Healthy ? this.Ok(result) : this.StatusCode((int)HttpStatusCode.ServiceUnavailable, result);
}
}
}


--- type: "standard" title: "10 People Who Are Really Not Into Camping" description: "camping fails." social_media_msg: "ddddd" featimg: "http://images.dabannit.com/f5a63f/2016-03-31-10-people-who-should-really-forget-about-camping.html-29d.jpg" article_videos: "" origin_url: "http://onnattendpaspatrick.minutebuzz.com/marketing--10-personnes-vraiment-pas-douees-pour-le-camping/" ---
Camping is an outdoor activity but first and foremost camping is an art. Looking at the 10 people below it seems that not everybody is born to be a camper.


--- layout: post title: Book Report on Software Estimation - Demystifying the Dark Arts ---
Estimation is something that I've done for a long time, but I've never really felt like I've done it well. I started rectifying that by reading Steve McConnell's Software Estimation: Demystifying the Black Art. The book is chock full of great ideas, and I've summarized them here for anyone looking to quickly improve their estimation skills.
The book starts off by talking about three things that often get confused:
We often confuse these things, and it results in missed opportunities for collaboration. Consider the case where a PM wants to give a live demo of a new feature at a conference next month. Engineering estimates the feature, and finds that it will take two months to deliver.
At this point, we should realize that we have two things: a target to deliver by the conference, and an estimate about how long the scoped work will take. The estimate suggests that the target will be difficult, so the team can take a few actions. The team can set a similar target with guardrails, they set a less ambitious target, or they could even keep the same target, but accept the risk that they may fail and have no demo. The one thing they shouldn't do is quibble over the underlying estimate unless there is a problem with the analysis.
Once that difference is established, the book moves on to discuss how to produce accurate estimates. McConnell a three step process called count, compute, judge to do this.
The first step in count, compute, judge is to get an unbiased estimate of the size of your software by counting things related to its size. The things that you count will be dependent on your application, for UI applications it may be new screens, but backend applications may count new ETL jobs and new API endpoints, but it's important that you count something to get an unbiased read on the size of your project.
Once you've counted, the next step is to compute an estimate. For example, let's assume you're estimating a new feature. First you look at the mocks and you see that it will require 6 new screens, 3 new API endpoints, and updates to 2 API endpoints. You then look at historical data and see that it takes your team an average of 3 weeks to build a new UI screen, 2 weeks to create a new API endpoint, and 1 week to update an existing endpoint. This would mean that you estimate
6 * 3 + 3 * 2 + 2 * 1 = 25 total staff weeks.
This estimate is delightfully free of bias, but it can't account for the fact that each feature is unique. That's where the last step, judge, comes into play. You use judgement to tweak your initial counting and computations. In our case, you may notice the that API endpoints are in hairy parts of your code, so they will take longer than average. This may mean that we bump up our estimate of staff-weeks per API update to 2.5, giving us a new estimate of
6 * 3 + 3 * 2 + 2 * 2 = 27 total staff weeks.This estimate is still grounded in data, but now it's informed by judgement.
It can be easy to see this single value as The Estimate, but that would be flawed. Sometimes stuff goes way faster than we expect, more often it takes longer. Your estimates need to account for this variability by incorporating ranges.
The simplest way to do this is create a best case, a worst case, and expected case estimate complete with the underlying assumptions that created the estimate. Combining estimates and assumptions will give more accurate estimate and more tools to ensure a successful project.
Compare these two estimates
"The project will take 27 staff weeks"
vs.
"The project will take between 15 and 48 staff weeks, with an expected effort of 27 staff weeks. If we can find a lot of code re-use and the project gets fully-staffed we can save 2 and 3 weeks respectively. If the design mocks turn out to be really novel it could cost us up to 6 additional staff weeks."
The second estimate is more useful: it allows us to make informed engineering staffing decisions and shows us where we should can best focus our effort to derisk the project.
It's also worth noting that outcomes on projects aren't normally distributed, so they don't need to be symmetric around the expected value. In our example above, our best case was 12 staff-weeks lower than the expected case, but the worst case was 21 staff-weeks higher. That's okay. What matters is that you used the correct inputs into the estimation process.
Estimating in ranges is tightly tied to another key idea in the book: The Cone of Uncertainty.
The cone is a visual representation of the fact that at the beginning of a project you have very little information, so you're very uncertain about how long it will take. As the project progresses you gain information and increased certainty until it is finally delivered. This has a couple of implications for estimates.
First, it means that at the beginning of a project you can probably only count very coarse grained things, so your best + worst cases may be quite different. These estimates will progressively narrow as you move down the cone.
This increasing clarity also means you'll want to use different estimation strategies depending on where you are in the project. In the beginning of the project you can really only count proxies for project size, so a quick and rough estimation technique like t-shirt sizing will do. As you get further on you can start to estimate individual tasks with more accurate estimates.
The last point that comes up frequently is how to communicate the accuracy of estimates. Frequently your process of counting + computating will give numbers that seem very accurate but your estimation method couldn't have given you that degree of accuracy. For example, let's say that you're early in a project, you count the find that you have 23 components left to build and expect each one to take 7.25 staff days. That gives you 166.75 staff days of work.
That number seems very accurate, but much of the accuracy is a mirage. There is no way you can tell down to the quarter-of-a-day how long a 7+ month long project will take. If you present this estimate in its current form, they'll say "gee, it sounds like Maltz has really done his homework. He's working with 2 other engineers, so I should expect that in exactly 8 weeks."
This is not good. Slipping by 4-5 days on that estimate will seem like a miss, even though that's totally reasonable when you're at this stage. There are two easy techniques to avoid this.
These ideas are the most common threads that run through Software Estimation: Demystifying the Dark Art, but there are many more. I found it to be brimming with strategies and tactics that immediately helped me become a better estimator. If you're trying to level up your own estimation skills I'd highly recommend picking it up.
A big thanks to Michael Stephens for reading an early draft of this post.


matid package¶
Subpackages¶
Submodules¶
matid.classifications module¶
-
class
matid.classifications.
Atom
(atoms)¶
-
class
matid.classifications.
Class0D
(atoms)¶ Bases:
matid.classifications.Classification
Structures that have a structure that is isolated in all directions by a vacuum gap.
-
class
matid.classifications.
Class1D
(atoms)¶ Bases:
matid.classifications.Classification
All structures that are roughly 1-dimensional, meaning that one dimension is much larger than the two others.
-
class
matid.classifications.
Class2D
(atoms)¶ Bases:
matid.classifications.Classification
Base class for all structures that are roughly 2-dimensional, meaning that two of the dimensions are much larger than the remaining one.
-
class
matid.classifications.
Class2DWithCell
(atoms, region)¶ Bases:
matid.classifications.Class2D
Two dimensional structures from which a periodic unit cell has been identified.
-
adsorbates
¶
-
basis_indices
¶
-
interstitials
¶
-
outliers
¶
-
prototype_cell
¶
-
substitutions
¶
-
unknowns
¶
-
vacancies
¶
-
-
class
matid.classifications.
Class3D
(atoms)¶ Bases:
matid.classifications.Classification
All structures that periodically extend infinitely without vacuum gaps.
-
class
matid.classifications.
Material2D
(atoms, region)¶
-
class
matid.classifications.
Surface
(atoms, region)¶
-
class
matid.classifications.
Unknown
(atoms)¶
matid.exceptions module¶
-
exception
matid.exceptions.
CellNormalizationError
(message, value=None)¶ Bases:
matid.exceptions.SystaxError
For errors in finding the normalized cell.
-
exception
matid.exceptions.
ClassificationError
(message, value=None)¶ Bases:
matid.exceptions.SystaxError
Indicates that there was an error in finding a surface.
matid.geometry module¶
This module defines functions for deriving geometry related quantities from a atomic system.
-
class
matid.geometry.
Intervals
(intervals=None)¶ Bases:
object
Handles list of intervals.
This class allows sorting and adding up of intervals and taking into account if they overlap.
-
add_interval
(a, b)¶ Add one interval.
Parameters: b (a,) – Start and end of interval. The order does not matter.
-
add_intervals
(intervals)¶ Add list of intervals.
Parameters: intervals – List of intervals that are added.
-
add_up_intervals
()¶ Returns the added up lengths of intervals without accounting for overlap.
-
add_up_merged_intervals
()¶ Returns the added up lengths of merged intervals in order to account for overlap.
-
get_intervals
()¶ Returns the intervals.
-
get_intervals_sorted_by_end
()¶ Returns list with intervals ordered by their end.
-
get_intervals_sorted_by_start
()¶ Returns list with intervals ordered by their start.
-
get_max_distance_between_intervals
()¶ Returns the maximum distance between the intervals while accounting for overlap.
-
get_merged_intervals
()¶ Returns list of merged intervals so that they do not overlap anymore.
-
remove_interval
(i)¶ Remove one interval.
Parameters: i – Index of interval that is removed.
-
set_intervals
(intervals)¶ Set list of intervals.
Parameters: intervals – List of intervals that are set.
-
-
matid.geometry.
cartesian
(arrays, out=None)¶ Generate a cartesian product of input arrays.
Parameters: - arrays (sequence of arrays) – The arrays from which the product is created.
- out (ndarray) – Array to place the cartesian product in.
Returns: 2-D array of shape (M, len(arrays)) containing cartesian products formed of input arrays.
Return type: ndarray
>>> cartesian(([1, 2, 3], [4, 5], [6, 7])) array([[1, 4, 6], [1, 4, 7], [1, 5, 6], [1, 5, 7], [2, 4, 6], [2, 4, 7], [2, 5, 6], [2, 5, 7], [3, 4, 6], [3, 4, 7], [3, 5, 6], [3, 5, 7]])
-
matid.geometry.
change_basis
(positions, basis, offset=None)¶ Transform the given cartesian coordinates to a basis that is defined by the given basis and origin offset.
Parameters: - positions (np.ndarray) – Positions in cartesian coordinates.
- basis (np.ndarray) – Basis to which to transform.
- offset (np.ndarray) – Offset of the origins. A vector from the old basis origin to the new basis origin.
Returns: Relative positions in the new basis
Return type: np.ndarray
-
matid.geometry.
expand_pbc
(pbc)¶ Used to expand a pbc definition into an array of three booleans.
Parameters: pbc (boolean or a list of booleans) – The periodicity of the cell. This can be any of the values that is also supprted by ASE, namely: a boolean or a list of three booleans. Returns: The periodicity expanded as an explicit list of three boolean values. Return type: np.ndarray of booleans
-
matid.geometry.
find_mic
(D, cell, pbc, max_distance=None)¶ Finds the minimum-image representation of vector(s) D.
Parameters: - D (np.ndarray) – A nx3 array of vectors.
- cell (np.ndarray) – A valid ase Atoms cell definition.
- pbc (np.ndarray) – A 3x1 boolean array for the periodic boundary conditions.
- mic_copies (np.ndarray) – The maximum number of periodic copies to consider in each direction. If not specified, the maximum possible number of copies is determined and used.
Returns: The minimum image versions of the given vectors. np.ndarray: The shifts corresponding to the indices of the neighbouring
cells in which the vectors were found.
Return type: np.ndarray
-
matid.geometry.
get_biggest_gap_indices
(coordinates)¶ Given the list of coordinates for one axis, this function will find the maximum gap between them and return the index of the bottom and top coordinates. The bottom and top are defined as:
- === =============== —>
- ^top ^bot ^axis direction
-
matid.geometry.
get_center_of_mass
(system)¶ Calculates the center of mass and also takes the periodicity of the system into account.
The algorithm is replicated from: https://en.wikipedia.org/wiki/Center_of_mass#Systems_with_periodic_boundary_conditions
Parameters: system (ase.Atoms) – The system for which the center of mass is calculated. Returns: The cartesian positions of the center of mass in the given system. Return type: np.ndarray
-
matid.geometry.
get_closest_direction
(vec, directions, normalized=False)¶ Used to return the direction that is most parallel to a given one.
Args:
Returns:
-
matid.geometry.
get_clusters
(dist_matrix, threshold, min_samples=1)¶ Used to detect clusters with the DBSCAN algorithm.
Parameters: Returns: A list of clusters, where each cluster is a list of indices for the elements belonging to the cluster.
Return type:
-
matid.geometry.
get_covalent_distances
(system, mic=True)¶ Returns a distance matrix where the covalent radii have been taken into account. Clips negative values to be zero.
-
matid.geometry.
get_crystallinity
(symmetry_analyser)¶ Quantifies the crystallinity of the structure as a ratio of symmetries per number of unique atoms in primitive cell. This metric can be used to distinguish between amorphous and ‘regular’ crystals.
The number of symmetry operations corresponds to the symmetry operations corresponding to the hall number of the structure. The symmetry operations as given by spglib.get_symmetry() are specific to the original structure, and they have not been reduced to the symmetries of the space group.
Parameters: () (symmetry_analyser) – A SymmetryAnalyzer object that has been initialized with an atomic structure. Returns: (float) A ratio of symmetries per unique atoms in the primitive cell.
-
matid.geometry.
get_dimensionality
(system, cluster_threshold, dist_matrix_radii_mic_1x=None, return_clusters=False)¶ Used to calculate the dimensionality of a system with a modified Topology Scaling Algorithm (TSA) (Michael Ashton, Joshua Paul, Susan B. Sinnott, and Richard G. Hennig Phys. Rev. Lett. 118, 106101).
Parameters: - system (ASE.Atoms) – The system for which the dimensionality is evaluated.
- cluster_threshold (float) – The epsilon value for the DBSCAN algorithm that is used to identify clusters within the unit cell.
- dist_matrix_radii_pbc (np.ndarray) – A precalculated distance matrix that takes in to account the periodicity and has the covalent radii of the atoms already subtracted.
- return_clusters (boolean) – Whether the clusters are returned
Returns: - The dimensionality of the system. If the dimensionality can’t be
evaluated because the system has multiple disconnected components in the original cell, None is returned.
- list: A list of clusters. Each entry in the list contains the indices
of atoms in a cluster.
Return type: int|none
-
matid.geometry.
get_dimensions
(system, vacuum_gaps)¶ Given a system with vacuum gaps, calculate its dimensions in the directions with vacuum gaps by also taking into account the atomic radii.
-
matid.geometry.
get_displacement_tensor
(pos1, pos2, cell=None, pbc=None, mic=False, max_distance=None, return_factors=False, return_distances=False, use_self_distance=True)¶ Given an array of positions, calculates the 3D displacement tensor between the positions.
The displacement tensor is a matrix where the entry A[i, j, :] is the vector pos1[i] - pos2[j], i.e. the vector from pos2 to pos1
Parameters: - pos1 (np.ndarray) – 2D array of positions
- pos2 (np.ndarray) – 2D array of positions
- cell (np.ndarray) – Cell for taking into account the periodicity
- pbc (boolean or a list of booleans) – Periodicity of the axes
- mic (boolean) – Whether to return the displacement to the nearest periodic copy
- mic_copies (np.ndarray) – The maximum number of periodic copies to consider in each direction. If not specified, the maximum possible number of copies is determined and used.
- use_self_distance (boolean) – Determines how the distance from atom to itself is determined. If True, zero is returned, if false, the distance to the closest copy is returned.
Returns: 3D displacement tensor (optional) np.ndarray: The indices of the periodic copies in which the
minimum image was found
(optional) np.ndarray: The lengths of the displacement vectors
Return type: np.ndarray
-
matid.geometry.
get_distance_matrix
(pos1, pos2, cell=None, pbc=None, mic=False, use_self_distance=True)¶ Calculates the distance matrix. If wrap_distances=True, calculates the matrix using periodic distances
Parameters: - pos1 (np.ndarray) – Array of cartesian positions
- pos2 (np.ndarray) – Array of cartesian positions
- cell() – The 3x3 cell of the system. Needed if minimum image convention enabled.
- pbc() – The periodic boundary conditions of the system. Needed if minimum image convention enabled.
- mic (bool) – Whether to apply minimum image convention fo the distances, i.e. the distance to the closest periodic image is returned.
- use_self_distance (boolean) – Determines how the distance from atom to itself is determined. If True, zero is returned, if false, the distance to the closest copy is returned.
Returns: A \(N_{atoms} imes N_{atoms}\) matrix of distances.
Return type: np.ndarray
-
matid.geometry.
get_extended_system
(system, target_size)¶ Replicate the system in different directions to reach the given target size.
Parameters: - system (ase.Atoms) – The original system.
- target_size (float) – The target size for the extended system in angstroms.
Returns: The extended system.
Return type: ase.Atoms
-
matid.geometry.
get_matches
(system, positions, numbers, tolerances, mic=True)¶ Given a system and a list of cartesian positions and atomic numbers, returns a list of indices for the atoms corresponding to the given positions with some tolerance.
Parameters: - system (ASE.Atoms) – System where to search the positions
- positions (np.ndarray) – Positions to match in the system.
- tolerances (np.ndarray) – Maximum allowed distance for each vector that is allowed for a match in position.
- mic (boolean) – Whether to find the minimum image copy.
Returns: indices of matched atoms list: list of substitutions list: list of vacancies np.ndarray: for each searched position, an integer array representing
the number of the periodic copy where the match was found.
Return type: np.ndarray
-
matid.geometry.
get_mic_vector
(w, v, cell)¶ Used to calculate the minimum image version of a vector in the given cell.
Parameters: rel_vector (np.ndarray) – Relative vector in the cell basis: Returns: The MIC version of the given vector np.ndarray: The shift that corresponds to the neighbouring cell in which the copy was found.Return type: np.ndarray
-
matid.geometry.
get_minimized_cell
(system, axis, min_size)¶ Used to resize the cell in the given cell direction so that all atoms are within the cell.
Parameters: - system (ase.Atoms) – The system to minimize. Must have a cell with non-zero volume.
- axis (min_size) – Index of the axis to minimize.
- axis – The minimum size for the cell in the given direction.
Returns: The new minimized system.
Return type: ase.Atoms
-
matid.geometry.
get_moments_of_inertia
(system, weight=True)¶ Calculates geometric inertia tensor, i.e., inertia tensor but with all masses are set to 1.
I_ij = sum_k m_k (delta_ij * r_k^2 - x_ki * x_kj) with r_k^2 = x_k1^2 + x_k2^2 x_k3^2
Parameters: system (ASE Atoms) – Atomic system. Returns: The eigenvalues and eigenvectors of the geometric inertia tensor. Return type: (np.ndarray, np.ndarray)
-
matid.geometry.
get_nearest_atom
(system, position, mic=True)¶ Finds the index of the atom nearest to the given position in the given system.
Parameters: - system (ase.Atoms) – The system from which the atom is searched from.
- position (np.ndarray) – The position to search.
- mic (boolean) – Whether to use the minimum image convention on periodic systems.
Returns: Index of the nearest atom in the given system.
Return type:
-
matid.geometry.
get_neighbour_cells
(cell, cutoff, pbc)¶ Given a cell and a cutoff, returns the indices of the copies of the cell which have to be searched in order to reach atom within the cutoff distance.
The number of neighboring images to search in each direction is equal to the ceiling of the cutoff distance (defined above) divided by the length of the projection of the lattice vector onto its corresponding surface normal. a’s surface normal vector is e.g. b x c / (|b| |c|), so this projection is (a . (b x c)) / (|b| |c|). The numerator is just the lattice volume, so this can be simplified to V / (|b| |c|). This is rewritten as V |a| / (|a| |b| |c|) for vectorization purposes.
Args:
Returns:
-
matid.geometry.
get_positions_within_basis
(system, basis, origin, tolerance_low, tolerance_high, mask=[True, True, True], pbc=True)¶ Used to return the indices of positions that are inside a certain basis. Also takes periodic boundaries into account.
Parameters: - system (ASE.Atoms) – System from which the positions are searched.
- basis (np.ndarray) – New basis vectors.
- origin (np.ndarray) – New origin of the basis in cartesian coordinates.
- tolerance (float) – The tolerance for the end points of the cell.
- mask (sequence of bool) – Mask for selecting the basis’s to consider.
- pbc (sequence of bool) – The periodicity of the system.
Returns: - Indices of the atoms within this cell in the given
system.
np.ndarray: Relative positions of the found atoms. np.ndarray: The index of the periodic copy in which the position was
found.
Return type: sequence of int
-
matid.geometry.
get_space_filling
(system)¶ Calculates the ratio of vacuum to filled space by assuming covalent radii for the atoms.
Parameters: system (ASE.Atoms) – Atomic system. Returns: The ratio of occupied volume to the cell volume. Return type: float
-
matid.geometry.
get_tetrahedra_decomposition
(system, max_distance)¶ Used to decompose a series of 3D atomic coordinates into non-overlapping tetrahedron that together represent the atomic structure.
-
matid.geometry.
get_thickness
(system, axis)¶ Get the thickness of an atomic system along a basis vector direction.
Parameters: - system (ase.Atoms) – The system from which the thickness is evaluated.
- axis (int) – The index of the unit cell basis in which direction the thickness is evaluated.
Returns: The thickness of the system as measured from the center of the topmost atom to the center of lowermost atom.
Return type:
-
matid.geometry.
get_wrapped_positions
(scaled_pos, precision=1e-05)¶ Wrap the given relative positions so that each element in the array is within the half-closed interval [0, 1)
By wrapping values near 1 to 0 we will have a consistent way of presenting systems.
-
matid.geometry.
make_random_displacement
(system, delta, rng=None)¶ Dislocate every atom in the given system in a random direction but by the same amount. Uses an internal random number generator to avoid touching the global numpy.random.seed()-function.
Parameters: - system (ASE.Atoms) – The system for which the displacement are performed.
- delta (float) – The magnitude of the displacements.
- rng (np.random.RandomState) – Random number generator.
-
matid.geometry.
to_cartesian
(cell, scaled_positions, wrap=False, pbc=False)¶ Used to transofrm a set of relative positions to the cartesian basis defined by the cell of this system.
Parameters: - system (ASE.Atoms) – Reference system.
- positions (numpy.ndarray) – The positions to scale
- wrap (numpy.ndarray) – Whether the positions should be wrapped inside the cell.
Returns: The cartesian positions
Return type: numpy.ndarray
-
matid.geometry.
to_scaled
(cell, positions, wrap=False, pbc=False)¶ Used to transform a set of positions to the basis defined by the cell of this system.
Parameters: - system (ASE.Atoms) – Reference system.
- positions (numpy.ndarray) – The positions to scale
- wrap (numpy.ndarray) – Whether the positions should be wrapped inside the cell.
Returns: The scaled positions
Return type: numpy.ndarray


Devious_Maids
Devious Maids is set in a world where murder and mayhem collide in the mansions of Beverly Hills' wealthiest and most powerful families. Class warfare has never been as fun and dirty as it is in the tiny enclave where the staff is as clever, witty and downright devilish as their employers. The series centers on a close-knit group of maids, Marisol, Rosie, Carmen Valentina and Zoila, who are bonded together by their jobs, life struggles and the melodramatic universe that engulfs their employers.


--- layout: default title: Syllabus ---
Each project set will require the students to either use an existing data set, or acquire his or her own, in order to produce a table, graph, chart, illustration, web page, presentation or some combination thereof. Basic algebraic, geometric and/or statistical calculations will be needed in preparing the data for display. It is assumed that all students have access to spreadsheet software (e.g. Excel, Numbers, Google Docs), but software beyond spreadsheets (e.g. Igor, plotly) will also be provided and explained for the Project Sets. Students are encouraged to discuss the Project Sets in groups, but each student must turn in only his or her own work — not collaborative solutions. Exemplary student Project Sets will be selected and posted by the Teaching Fellows on the course web site. All Project Sets will be due, online or in-person, at the start of the lecture on the day they are due. Late project sets will not be accepted without prior authorization from a TF.
The course will meet twice per week in a lecture setting, and once per week in a small group setting, typically known as “section.” The purpose of the sectionkmeetings will not be primarily for review, but instead to give students and TFs the opportunity to delve into more real-life examples of the graphical principles discussed in lecture. Students will be asked to contribute (via an online tool) sample graphics (from any source) to be discussed in section each week. Several sections will be subject-matter- or technique-themed, as shown on the schedule, below.
Each student, in consultation with a TF and/or Prof. Goodman, will formally propose a research topic on or before February 27. A draft topic idea will be submitted on 2/20, and sections the following week will be focused on students collaboratively improving each other's proposals. As long as the topic lends itself well to graphical quantitative examination and display, it does not matter what the subject matter is. In the past, topics have ranged from Shakespeare concordances to poker odds to war deaths to sailing and navigation practices. Example topics will be discussed in section, and 1-page progress reports will be due on March 13 and April 1 (no fooling!).
The projects will first be presented in a live 8-minute presentation by each student in section, and the best presentation(s) from each section will be repeated in a "Fair" format on 4/24. Then, one week after the last meeting of EMR19, each student will submit documentation of their project. Details on allowable formats (which include a standard “paper,” movies, interactives or web sites) will be discussed in class and in section during April.
View the schedule of topics and events or 2012 sample assignments


Nanny admits taking indecent photo of child in Devon
Maria Alfonzo pleaded guilty to taking and distributing an indecent image of a child at Paignton on June 12
by Ted DavenportA nanny has admitted taking an indecent picture of a child and sending it to a man over the internet.
Venezuelan-born Maria Alfonzo pleaded guilty to taking and distributing an indecent image of a child at Paignton on June 12 this year and sent it electronically to a man in the Newcastle area.
Alfonzo, aged 31, of Southey Lane, Newton Abbot, was remanded in custody by Judge Peter Johnson at Exeter Crown Court.
Alfonzo appeared by video link from Eastwood Park prison near Bristol and her case was transferred to Newcastle Crown Court for sentence.
The case was transferred to Newcastle to tie up with a linked case of a man who is facing trial on connected charges in the New Year.
The judge told her:"I am transferring the case to Newcastle Crown Court, for obvious reasons.
"You will be given appropriate credit for your pleas."


---
layout: null
section-type: default
title: About
---
## About
I am a first year PhD student in the Electrical and Systems Engineering Department at the University of Pennsylvania. I am advised by Professors Vijay Kumar and Alejandro Ribeiro at the GRASP Lab. My research interests lie at the intersection of learning and decision making for robotics. These include improving upon existing policy optimization methodologies, neural network architectures and exploring new models for robust learning. I am currently spending the summer of 2018 at NVIDIA, Redmond.
Before my PhD, I was pursuing a masters in Robotics also at the University of Pennsylvania where I was advised by Professors Daniel D. Lee and Vijay Kumar. During my masters, my research was focused on learning meaningful representations for robot navigation. I also spent some time working at the LAIR Lab at Carnegie Mellon University's Robotics Institute. At CMU, my research was focused on autonomous UAV flight through GPS denied cluttered outdoor environments such as forests. Before CMU, I completed my Bachelors in Electronics and Communications Engineering at Manipal Institute of Technology, India.


 I had just come home from a drug deal. Actually a drug give. ha. yeah, I had given 4 ecstasy pills to two friends of mine. I had bought 5 of them for 100$, and I was deathly afraid of them, so I just gave four away and kept one. I went home and went up stairs and took a shower. I decided to just take half. so I bit it and took half, it was bitter tasting. I figured, after about 3 minutes later, might as well just take the whole thing. I have a radio in my shower and I had turned it on. In about 15 minutes, I found myself dancing non-stop for a good 45 minutes. I was getting really hot and dizzy and decided to go downstairs.
I went downstairs and went to go get a drink. I found that my hands were moving incredibly slow. I was waving them in front of me, trying to act like I was fine at the same time. I was thinking, crap, what the hell's going on? I tried to lie down, but then I got these terrible hot flashes and got really dizzy and I was all disoriented. So, I just decided to tell my mom, I was convinced these were my last moments with her anyway. So, there were my parents, watching t.v. Their fifteen year old daughter blurts out, 'mom, dad, I’m on drugs again.' My dad just got pissed. My mom got scared. They asked me what drug and I told them. I started crying. It was one of those body-wrenching sobs.  A sob for my soul.
I began to realize the turmoil I was in, within myself. I began to talk about things that I would have never normally shared.  I began to wonder where I went wrong.  I began this chanting-type thing, where I would repeat things over and over, 'no, no, no, no' while rocking back and forth, rather violently. My dad was really pissed and told me to stop. I couldn’t. My mom came and sat with me and called like 50 people on the phone, asking them for advice. Then, she began to sing to me. This totally caught me off guard. I got so emotionally hurt, it hurt me to hear my mom singing to me, even seeing me, while I was on drugs.
It still hurts to this day to recall it.  My jaw was clenched, chewing my lower and upper front teeth. I remember looking in the mirror and being scared out of my mind. This whole experience was a horror, but I realized many things in my life that needed to change. I realized how messed up my life was. and I wouldn’t take back this experience if I could. I would, however, leave my parents out of it.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


| Name | Owner | Description | Copied From | Copies |
|---|---|---|---|---|
| Bugs reported mid-sprint | Davidson | Number of bugs reported inside the Sprint. | Laurence | 1238 |
| Velocity | Davidson | Sprint Velocity. | Laurence | 28 |
| Velocity | Davidson | Sprint Velocity. | Laurence | 28 |
| Velocity | Davidson | Sprint Velocity. | Laurence | 28 |
| Velocity | Davidson | Sprint Velocity. | Laurence | 28 |
| Velocity | Davidson | Sprint Velocity. | Laurence | 28 |
| Velocity | Davidson | Sprint Velocity. | Laurence | 28 |
| Velocity | Davidson | Sprint Velocity. | Laurence | 28 |
|
|


Home
Back
Search
Find A Hair Professional
Location:
Use Browser GPS
Range in Miles:
Minimum Rating:
options
Barbers
Hairdressers
Search
List of Barbers


Preparation time
overnight
Cooking time
10 to 30 mins
Serves
Makes 20 truffles
Dietary
Chocolate truffles are deliciously luxurious, easy to make and made even more tempting by a dash of gin and lime.
Put a heatproof bowl on top of a pan of simmering water, making sure the bottom of the bowl is not touching the water. Put the chocolate in the bowl with the cream and heat gently to allow the chocolate to melt.
Add the butter (cut the butter up in quite small pieces because you want it to melt quite quickly). Give it a stir just to make sure all the butter is melted into the chocolate mixture. Keep stirring until all the butter has melted and the mixture is smooth and glossy.
Add the gin, lime zest and juice. Whisk the ingredients together until smooth and slightly thickened. Spoon into a sealable container, put on the lid and chill overnight in the fridge.
Take teaspoonfuls of the mixture and roll them into balls. Put on a plate lined with baking parchment and chill for an hour or so.
Sieve the cocoa into a bowl and roll the truffles in it to cover. These make a brilliant present.


|
Country:
Italy
Region:
Aosta
Texture:
Semi-Soft
Type of Milk:
Cow
Aging Time:
At least
90 Days
Pasteurized:
No
|
Fontina Val d'Aosta is an Italian DOP cheese from
the bilingual valley region of Aosta in Northern Italy, on the French Border. It is an unpasteurized cows milk cheese that
is aged for approximately 90 days and uses the alpine milk of the Valdaostan cows. It is semi soft in texture with a few small
holes running through it and is a great cooking cheese since is melts evenly without any loss of flavor. It is an Alpine cheese
that fairly aromatic with rustic flavors that are earthy, herbaceous, and nutty. There are many generic cheeses that are produced
in a similar way (Fontinella, Fontella, or Fontal) but do not have the same rich flavor components of the DOP designated cheese.
|
|


Mercury Transit 2019: How to see the planet cross the Sun today for the last time until 2032
Mercury Transits take place just 13 times a century, when Mercury passes directly between Earth and the Sun. The next Mercury Transit won’t happen until 2032, so it’s an event you don’t want to miss
by Shivali Best, https://www.facebook.com/shivalibestjournalist/If you glance at the Sun today and notice a small black ‘dot’ moving across it, you may be interested to hear that that ‘dot’ is actually Mercury.
Mercury is crossing the sun today, in a rare event known as a Mercury Transit.
Mercury Transits take place just 13 times a century, when Mercury passes directly between Earth and the Sun. The next Mercury Transit won’t happen until 2032, so it’s an event you don’t want to miss!
Mitzi Adams, a solar scientist at NASA, said: “Viewing transits and eclipses provide opportunities to engage the public, to encourage one and all to experience the wonders of the universe and to appreciate how precisely science and mathematics can predict celestial events.
“Of course, safely viewing the Sun is one of my favourite things to do.”
How to see the Mercury Transit
For those of us based in the UK, the Mercury Transit will begin at around 12:35 GMT. However, Mercury will pass over the sun from 12:37-18:02, so look to the Sun any time between then.
Mercury’s tiny black disk will only cover a tiny fraction of the sun during the transit - only 1,283 of the Sun’s diameter!
Unfortunately, this means it’s pretty unlikely to be visible with the naked eyes. Instead, NASA recommends you use a telescope with at least 50x magnification.
It’s also very important that you use a solar filter when viewing the transit.
NASA explained: “Never look at the Sun directly or through a telescope without proper protection. It can lead to serious and permanent vision damage. Always use a safe Sun filter to protect your eyes!”
Is the Mercury Transit useful to scientists?
Scientists have been using transits for hundreds of years to study the way planets and stars move in space.
For example, back in 1761 and 1769, Edmund Halley used a Venus Transit to work out the absolute distance to the Sun!
NASA added: “Another use of transits is the dimming of Sun or star light as a planet crosses in front of it.
“This technique is one way planets circling other stars can be found. Scientists can measure brightness dips from these other stars (or from the Sun) to calculate sizes of planets, how far away the planets are from their stars, and even get hints of what they’re made of.”


1. Master Experience
Mastery experiences refer to the idea that successful experiences help people to build up
confidences and strength to overcome challenges.
Sample: Sam, once participated in a Hackathon, and wins the final challenge. This mastery
experience boosts Sam’s self-efficacy. As a result, Sam is actively looking for new Hackathon
to challenge himself and is assured in his skill as a Computer Scientist.
2. Social Modeling
Social Modeling refers to the idea that through observing people similar to oneself succeed,
it raises the observer’s belief that they too have the capabilities to succeed.
Sample: Linda is an international student from China and she is not comfortable with her
English skills. However, Linda’s classmate Jack who is also from China and is fluent in
English shares his experience with Linda and the challenges he overcame throughout the years.
Seeing Jack’s success today, Linda is willing to challenge herself and believes that she can
also overcome the language barrier one day.
3. Verbal Persuation
Verbal persuasion refers to the idea that people could be persuaded to believe that they
have the skills and capabilities to succeed by families, friends, instructors and so on.
Sample: John is struggling in his technical writing class, but his professor keeps on
encouraging him through one on one conversations, writing assignments and always telling
John that he can be a great writer if he put his minds into it. As a result, John never gave
up on trying and ended up improving his writing skills and is now confident in his technical
writing skills.
4. Psychological Response
Psychological responses refers to the idea that moods, emotional states, physical reactions,
and stress levels can all impact how a person feels about their personal abilities in a particular
situation.
Sample: Amy always wants to learn a new programming language and attempts to teach herself during
the school year. Due to heavy workloads from school and social events, Amy becomes highly stressed
and isn’t able to focus, becoming frequently frustrated when she encounters challenges during her
learning process. When Amy tries again during her summer break, she finds her learning more enjoyable
and has more patience to troubleshoot when she encounters challenges.


+{{enhance.selectedItem}}
+{{enhance.selectedItem+1}}
Fergus > Enhancement Simulator
“My shoulder hurts from all that hammering.”
+{{i}}
SYSTEM


Some content for panel 1
Some content for panel 2
Some content for panel 3
Some content for panel 4
Some content for panel 5
Some content for panel 6


{% extends "layout_bsa.html" %} {% block page_title %} Prepay for NHS prescriptions {% endblock %} {% block content %} {% include "includes/phase_banner_beta.html" %} Prepay for NHS prescriptions What is your date of birth? We collect this information to check if you qualify for free prescriptions. Date of birth For example, 31 03 1980 Day Month Year Cancel {% endblock %}
Prepay for NHS prescriptions
We collect this information to check if you qualify for free prescriptions.
For example, 31 03 1980
Cancel


Click Any Link Below To Experience SuperHero Application
http://localhost:8080/custom/step1
http://localhost:8080/custom/step2
http://localhost:8080/custom/step3
http://localhost:8080/custom/step4


Spentless
Hi, {{username}}.
A password reset for your account was requested. Please click the button below to change your password. Note that this link is valid for 24 hours. After the time limit has expired, you will have to resubmit the request for a password reset.
Change Your Password