In this post, I will explore and configure a few classification algorithms (supervised machine learniIn this post, I will explore and configure a few classification algorithms (supervised machine learning). I originally wanted to apply ML and fit some models on diabetes data. The diabetes dataset is one of the most well known data available to ML enthusiasts for their learning purposes.
After I had started writing my script for the post, I found an article written by Lahiru Liyanapathirana more than an year ago. It turned out that Lahiru wrote his article with the same intention; i.e. to fit the best suitable model. He did a great job and exhausted a wide range of suitable algorithms from Scikit-learn. However, this did not discourage me! Unlike Lahiru, I will focus only on four classifiers consecutively. Specifically, i.) k-nearest neighbor (k-NN), ii.) logistic regression, iii.) decision tree and iv.) random forest.
However, and in addition to Lahiru’s article, I will show and introduce a few “new” techniques. First, I will share how and why I handled the missing data differently (this turned out to have a negative impact on performance). Secondly, I will be fitting the model using Pipeline
and SimpleImputer
as the arguments of GridSearchCV
. To achieve the best performance and generality, I will be also tuning the hyperparameters for every model individually. Last but not least, I maintain that accuracy is not and should not be the only criteria when evaluating the model’s performance!
git clone https://github.com/jiristo/MLdiabetes_inpectplot.git
Loading the necessary packages
I loaded the following packages according to their consecutive roles in the process.
# data handeling
import pandas as pd
import numpy as np
# Data preprocessing for ML
from sklearn.model_selection import train_test_split
from sklearn.model_selection import cross_val_score
# model traning and testing faciliators
from sklearn.pipeline import Pipeline
from sklearn.impute import SimpleImputer
from sklearn.preprocessing import StandardScaler
# Overfiitting/underfitting guide
from sklearn.model_selection import GridSearchCV
# ML models to be explored
from sklearn.neighbors import KNeighborsClassifier
from sklearn.linear_model import LogisticRegression
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import RandomForestClassifier
# Performace measurements
from sklearn.metrics import classification_report
# Visualization
import scikitplot as skplt
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
from warnings import simplefilter
# ignore all future warnings
simplefilter(action='ignore', category= FutureWarning)
Exploratory Data Analysis (EDA)
df = pd.read_csv("diabetes_data.csv")
df.head()
| pregnancies | glucose | diastolic | triceps | insulin | bmi | dpf | age | diabetes | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 6 | 148 | 72 | 35 | 0 | 33.6 | 0.627 | 50 | 1 |
| 1 | 1 | 85 | 66 | 29 | 0 | 26.6 | 0.351 | 31 | 0 |
| 2 | 8 | 183 | 64 | 0 | 0 | 23.3 | 0.672 | 32 | 1 |
| 3 | 1 | 89 | 66 | 23 | 94 | 28.1 | 0.167 | 21 | 0 |
| 4 | 0 | 137 | 40 | 35 | 168 | 43.1 | 2.288 | 33 | 1 |
Looking at the head of the data frame, there are several 0 values. Aside from the label (binominal diabetes), the observation suggests some missing data! I bet if your insulin level was 0 and you would be still reading these lines, on a funny note you probably would be the first undead person interested in ML.
df.describe()
| pregnancies | glucose | diastolic | triceps | insulin | bmi | dpf | age | diabetes | |
|---|---|---|---|---|---|---|---|---|---|
| count | 768.000000 | 768.000000 | 768.000000 | 768.000000 | 768.000000 | 768.000000 | 768.000000 | 768.000000 | 768.000000 |
| mean | 3.845052 | 120.894531 | 69.105469 | 20.536458 | 79.799479 | 31.992578 | 0.471876 | 33.240885 | 0.348958 |
| std | 3.369578 | 31.972618 | 19.355807 | 15.952218 | 115.244002 | 7.884160 | 0.331329 | 11.760232 | 0.476951 |
| min | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.078000 | 21.000000 | 0.000000 |
| 25% | 1.000000 | 99.000000 | 62.000000 | 0.000000 | 0.000000 | 27.300000 | 0.243750 | 24.000000 | 0.000000 |
| 50% | 3.000000 | 117.000000 | 72.000000 | 23.000000 | 30.500000 | 32.000000 | 0.372500 | 29.000000 | 0.000000 |
| 75% | 6.000000 | 140.250000 | 80.000000 | 32.000000 | 127.250000 | 36.600000 | 0.626250 | 41.000000 | 1.000000 |
| max | 17.000000 | 199.000000 | 122.000000 | 99.000000 | 846.000000 | 67.100000 | 2.420000 | 81.000000 | 1.000000 |
Based on the summary statistics, min
indicates other features with missing values: i.) glucose
ii.) diastolic
(blood pressure), iii.) triceps
, iv.) bmi
, i.e. $bmi = \frac{body weight}{height}$. Frankly, anyone with 0 blood pressure or bmi (body-mass-index) must be dead. Therefore, it is necessary to clean the data.
df.info()
df.isnull().sum()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 768 entries, 0 to 767
Data columns (total 9 columns):
pregnancies 768 non-null int64
glucose 768 non-null int64
diastolic 768 non-null int64
triceps 768 non-null int64
insulin 768 non-null int64
bmi 768 non-null float64
dpf 768 non-null float64
age 768 non-null int64
diabetes 768 non-null int64
dtypes: float64(2), int64(7)
memory usage: 54.1 KB
pregnancies 0
glucose 0
diastolic 0
triceps 0
insulin 0
bmi 0
dpf 0
age 0
diabetes 0
dtype: int64
There are 768 all numeric records with no NaN
. Therefore, 0
values in the data represent missing records. How many “zeros” are in each column of the data frame (df
)? I answered the question with a for loop and count_nonzero()
method of NumPy array.
for colname in df.columns[:8]:
print('0s in "{variable}": {count}'.format(
variable=colname,
count=np.count_nonzero(df[colname] == 0)))
0s in "pregnancies": 111
0s in "glucose": 5
0s in "diastolic": 35
0s in "triceps": 227
0s in "insulin": 374
0s in "bmi": 11
0s in "dpf": 0
0s in "age": 0
In general, there are three approaches in which a data scientist could handle so many missing values and they are as below: 1. Delete any observation with missing values, which would result in substantial loss of data. 2. Substitute missing values with either mean, median, or mode; which can be a great trade between regression to the mean but keeping the data. However, it is not the best solution when it comes to the substitution of more than half of values in a variable. 3.
Before dealing with the missing values, let’s examine the data visually. Since Lahiru already presented the histograms of the variables, I have decided to expand the insight by examining the box plots. Unlike the histogram, a box plot is a great tool to identify outliers in the data.
df.drop("diabetes",axis=1).boxplot(figsize = [10, 7])
plt.show()
Obviously, the variables exhibit various distribution patterns. For example, insulin
reaches both the greatest maxima and exhibits many overlapping outliers. Its distribution is right-skewed, and I expect the variable is a very strong predictor for the diagnosis of diabetes. You do not have to be an expert in ML but I do not think the data is the best sample for ML. Firstly, there are a lot of missing values. Secondly, ML is not very effective when it comes to handling outliers.
Since, I will be using RandomForestClassifier
, there is a way to quickly and visually investigate the importance of these features. This is the tool: skplt.estimators.plot_feature_importances
. It plots the classifier’s feature importance. You can visually inspect how much the variable, relative to other features, correlates to the occurrence of diabetes.
df2 = df[(df.insulin !=0) & (df.bmi !=0) & (df.pregnancies !=0) & (df.glucose !=0)]
feature_names = df2.columns[:-1]
randfor = RandomForestClassifier()
randfor.fit(df2.drop(columns = "diabetes", axis=1),df2["diabetes"])
skplt.estimators.plot_feature_importances(randfor, feature_names=feature_names, figsize=(9, 5))
plt.show()
The result supports my assumption that glucose
is a very strong predictor for the presence of diabetes.
Data Wrangling
I see nothing wrong in deleting a few observations with missing values, however, in my case the approach would result in a loss of too many observations. Lahirru has probably realized the same and therefore deleted only the rows with missing data in glucose
, diastolic
, and bmi
. Therefore, he deleted only a small fraction of all observations.
To deal with the issue in my own way, I have decided to combine 1.) and 2.) approaches discussed above. I was curious whether I would achieve higher accuracy and precision and what recall would be. For the sake of learning, I even decided to share my experience regardless of the result.
I designed my approach as follows:
* Firstly, I decided to delete every row where the number of 0s
was greater than 1. On the other hand, I made the assumption which probably does not hold, i.e., pregnancies do not exhibit any missing values and observed 0s
are valid records indicating that the person is not pregnant.
* Secondly, I replaced the remaining missing values with a `mode.
* I will handle the operation using SimpleImputer in the Pipeline while fitting the model to the training data set and predicting.
The following chunk of code summarizes the first step of my approach:
for index,row in df.iterrows():
zero_count = row[1:6]
if np.count_nonzero(zero_count==0) > 1:
df.drop(index, inplace=True)
df.shape
(534, 9)
As a result, I deleted only 234 rows. Deleting every observation with a missing value would result in loss of at least 374 rows.
for colname in df.columns[:8]:
print('Ex-post0s in "{variable}": {count}'.format(
variable=colname,
count=np.count_nonzero(df[colname] == 0)))
Ex-post0s in "pregnancies": 78
Ex-post0s in "glucose": 1
Ex-post0s in "diastolic": 0
Ex-post0s in "triceps": 0
Ex-post0s in "insulin": 140
Ex-post0s in "bmi": 1
Ex-post0s in "dpf": 0
Ex-post0s in "age": 0
Lastly, one should examine correlations between the variables and label. There are many ways to do so, but I particularly prefer the heat map.
plt.figure(figsize = [8, 5.5])
sns.heatmap(df2.corr(), square=False, cmap='RdYlGn')
plt.show()
I evaluated the correlations from three perspectives; i.e.,1.) General pattern, 2.) Correlation between diabetes
and other variables, 3.) Correlation amongst all variables.
1. The data set contains only variables positively correlated with presence of diabetes
.
Most of the times, the variables exhibit low correlations between themselves and
diabetes
. However,glucose
andage
seem to be much more correlated with the target than other variables.All the features are mostly uncorrelated. However, you can notice correlations above 0.6 between:
age
andpregnancies
glucose
andinsulin
triceps
andbmi
I consulted a relative of mine who studies medicine to take a look at the observations. She confirmed the correlations are in line with her expectancy.
Finally, I substituted every 0
in the data frame (except in the label) with NaN
:
Finally, I substitued every 0
in the data frame (except in the label) with NaN
:
df.glucose.replace(0, np.nan, inplace = True)
df.insulin.replace(0, np.nan, inplace = True)
df.bmi.replace(0, np.nan, inplace = True)
Pre-setting and Modeling Strategy
Last but not least, I split the data into labels and 2D arrays for training and testing as is the standard (and not rocket science) approach in ML.
X = df.drop(columns = "diabetes", axis=1)
y = df["diabetes"]
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.3, random_state = 42)
Imputer
Referring back to the second step in my proposed approach, I utilized SimpleImputer
and I passed it into Pipeline
. The function substitutes NaN
with a chosen value relative to the variable, e.g. mean
, mode
, etc.
imp = SimpleImputer(strategy = "most_frequent", missing_values = np.nan)
The following steps summarize my approach to fit a particular model. Moreover, I designed the logic to be perfectly replicable:
create the list
steps_model
containing functions:imp
StandardScaler
model
create
pipeline_model
by callingPipeline
- pass
steps_model
as the argument
- pass
Create a list
parameters_model
- the object contains the parameters of a particular model with ranges of values
- the object contains the parameters of a particular model with ranges of values
Create
cv_model
by callingGridSearchCV
(cross validation)- Specify the arguments as follows:
pipeline _model , param_grid = parameters_model, scoring = "roc_auc", cv = 5
- Specify the arguments as follows:
Call
cv_model.fit(X_train, y_train)
to train a modelPredict the label
pred_model
by callingcv_model.predict(X_test)
Evaluate performance by:
cv_model.best_params_(y_test, pred_model)
accuracy_score(y_test, pred_model)
classification_report(y_test, pred_model)
The strategy is identical to all the models that I will attempt to fit, i.e.: i.) k-nearest neighbor (k-NN), ii.) logistic regression, iii.) decision tree and iv.) random forest.
Therefore, , I will discuss the key issues only in I.)k - Nearest Neighbour
. I am intentionally avoiding commenting on other models because the logic remains the same. However, the list** parameters_model
should be unique to each classifier because the parameters differ from model to model.
I will comment on the performance and draw a conclusion in the last part of the article.
I.) K - Nearest Neighbour
# Step 1.
steps_knn = [("imputation", imp),
("scaler", StandardScaler()),
("knn", KNeighborsClassifier())]
# Step 2.
pipeline_knn = Pipeline(steps_knn)
# Step 3. For KNN, I only specified the range of paramters from 1 to 51.
parameters_knn = {"knn__n_neighbors":np.arange(1,51)}
# Step 4.
cv_knn = GridSearchCV(pipeline_knn, param_grid = parameters_knn, scoring = "roc_auc", cv = 5 )
Training the Model (Step 5.)
By calling cv_model
on the label and 2D data frame, the function utilizes all the steps from steps_model
at first. Specifically, only and only the data is: i.) cleaned (NaNs substituted with the mode), ii.) standardized, iii.) it can be classified by the classifier. Additionally, the process goes hand in hand with GridSearchCV
what splits X_train
and y_train
into 5 identical data sets and performs cross-validation on each of them. However, each data set is split into different test and train sections. While cross-validating, GridSearchCV
searches for the best parameters specified in parameters_model
.
# Step 5.
cv_knn.fit(X_train, y_train)
GridSearchCV(cv=5, error_score='raise-deprecating',
estimator=Pipeline(memory=None,
steps=[('imputation', SimpleImputer(copy=True, fill_value=None, missing_values=nan,
strategy='most_frequent', verbose=0)), ('scaler', StandardScaler(copy=True, with_mean=True, with_std=True)), ('knn', KNeighborsClassifier(algorithm='auto', leaf_size=30, metric='minkowski',
metric_params=None, n_jobs=None, n_neighbors=5, p=2,
weights='uniform'))]),
fit_params=None, iid='warn', n_jobs=None,
param_grid={'knn__n_neighbors': array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50])},
pre_dispatch='2*n_jobs', refit=True, return_train_score='warn',
scoring='roc_auc', verbose=0)
# Step 6.
pred_knn = cv_knn.predict(X_test)
Measuring Performance (Step 7.)
classification_report
is one of the methods to see a bigger picture of the model’s performance. Since I classified the binary variable relevant to human health, I want to focus on the precision
and recall
.
precision
is also called positive predictive value (PPV). Mathematically: $PPV = \frac{TP}{TP+FP}$ It is similar to accuracy, but focuses only on data the model has predicted to be positive, i.e.diabetes = 1
. Referring to a confusion matrix,precision
of 1 means that there were no false positives.recall
, also called sensitivity OR True Positive Rate (TPR), answers the question on how complete the results are, i.e. did the model miss any positive classes and to what extent? Mathematically expressed:$TPR = \frac{TP}{TP+FN}$ In our case, lowrecall
would mean that the model has incorrectly classified a lot of individuals with diabetes as healthy ones.
One should ask, what is the superior metric from the two? A friend of mine, a data scientist, told me he was asked the same at his interview. In fact, it really depends! For example, imagine cancer diagnostics, would you rather classify few more patients as false positive and after more precise examination conclude they had no cancer or would you rather let escape the ones with cancer as healthy individuals? In this particular case, the model should minimize $FN$ in the confusion matrix. Consequently, recall,i.e. TPR, which should be closer to 1. Lastly, there is always a trade-off between the two negatively correlated metrics.
# Step 7.
print("KNN Parameters are: {}".format(cv_knn.best_params_))
print("KNN Accuracy is: {}".format(accuracy_score(y_test, pred_knn)))
print(classification_report(y_test, pred_knn))
KNN Parameters are: {'knn__n_neighbors': 47}
KNN Accuracy is: 0.7142857142857143
precision recall f1-score support
0 0.70 0.96 0.81 100
1 0.83 0.31 0.45 61
micro avg 0.71 0.71 0.71 161
macro avg 0.76 0.64 0.63 161
weighted avg 0.75 0.71 0.67 161
II.) Logistic Reg
# Steps 1. & 2.
pipeline_logreg = Pipeline([("imputation", imp),
("scaler", StandardScaler()),
("logreg", LogisticRegression())])
# Step 3.
parameters_logreg = {"logreg__C":np.arange(0.1, 1.1, 0.1),
"logreg__penalty":("l1", "l2")}
# Step 4.
cv_logreg = GridSearchCV(pipeline_logreg, param_grid = parameters_logreg, cv = 5 )
# Step 5.
cv_logreg.fit(X_train,y_train)
GridSearchCV(cv=5, error_score='raise-deprecating',
estimator=Pipeline(memory=None,
steps=[('imputation', SimpleImputer(copy=True, fill_value=None, missing_values=nan,
strategy='most_frequent', verbose=0)), ('scaler', StandardScaler(copy=True, with_mean=True, with_std=True)), ('logreg', LogisticRegression(C=1.0, class_weight=None, dual=Fa...enalty='l2', random_state=None, solver='warn',
tol=0.0001, verbose=0, warm_start=False))]),
fit_params=None, iid='warn', n_jobs=None,
param_grid={'logreg__C': array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1. ]), 'logreg__penalty': ('l1', 'l2')},
pre_dispatch='2*n_jobs', refit=True, return_train_score='warn',
scoring=None, verbose=0)
# Step 6.
pred_logreg = cv_logreg.predict(X_test)
III.) Decision Tree
# Steps 1. & 2.
pipeline_dectree = Pipeline([("imputation", imp),
("scaler", StandardScaler()),
("dectree", DecisionTreeClassifier())])
# Step 3.
parameters_dectree = {'dectree__max_features': ['auto', 'sqrt', 'log2', None],
#'dectree__min_samples_split': np.arange(2, 15),
#'dectree__min_samples_leaf':np.arange(2, 15),
'dectree__random_state':[42]}
# Step 4.
cv_dectree = GridSearchCV(pipeline_dectree, param_grid = parameters_dectree, cv = 5 )
# Step 5.
cv_dectree.fit(X_train,y_train)
GridSearchCV(cv=5, error_score='raise-deprecating',
estimator=Pipeline(memory=None,
steps=[('imputation', SimpleImputer(copy=True, fill_value=None, missing_values=nan,
strategy='most_frequent', verbose=0)), ('scaler', StandardScaler(copy=True, with_mean=True, with_std=True)), ('dectree', DecisionTreeClassifier(class_weight=None, criterion='gini', max_depth=None,
... min_weight_fraction_leaf=0.0, presort=False, random_state=None,
splitter='best'))]),
fit_params=None, iid='warn', n_jobs=None,
param_grid={'dectree__max_features': ['auto', 'sqrt', 'log2', None], 'dectree__random_state': [42]},
pre_dispatch='2*n_jobs', refit=True, return_train_score='warn',
scoring=None, verbose=0)
# Step 6.
pred_dectree = cv_dectree.predict(X_test)
IV.) Random Forest
pipeline_randfst = Pipeline([("imputation", imp),
("scaler", StandardScaler()),
("randfst", RandomForestClassifier())])
paraparameters_randfst = {"randfst__n_estimators": np.arange(5,200,5),
"randfst__criterion":['gini','entropy'],
#"randfst__n_jobs":[-1],
"randfst__random_state":[42]}
cv_randfst = GridSearchCV(pipeline_randfst, param_grid = paraparameters_randfst, cv = 5)
cv_randfst.fit(X_train, y_train)
GridSearchCV(cv=5, error_score='raise-deprecating',
estimator=Pipeline(memory=None,
steps=[('imputation', SimpleImputer(copy=True, fill_value=None, missing_values=nan,
strategy='most_frequent', verbose=0)), ('scaler', StandardScaler(copy=True, with_mean=True, with_std=True)), ('randfst', RandomForestClassifier(bootstrap=True, class_weight=None, criterion='gini',
...obs=None,
oob_score=False, random_state=None, verbose=0,
warm_start=False))]),
fit_params=None, iid='warn', n_jobs=None,
param_grid={'randfst__n_estimators': array([ 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65,
70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130,
135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195]), 'randfst__criterion': ['gini', 'entropy'], 'randfst__random_state': [42]},
pre_dispatch='2*n_jobs', refit=True, return_train_score='warn',
scoring=None, verbose=0)
pred_randfst = cv_randfst.predict(X_test)
Step 7. & Best Model Selection
I already mentioned precision
and recall
but did explain accuracy
. In fact, accuracy
may not be the best parameter for choosing the right model. Consider test data with 100 individuals from which 99 subjects are healthy ones and only 1 individual has diabetes. Also, assume the model successfully classified 99 healthy people but completely failed to classify the one individual with diabetes.
Gived that $accuracy = \frac{TP + TN} {TP + TN + FP + FN}$, than the accuracy would be 99%. However, the algorithm missed 100% individuals in the positive class.
The following code displays the best parameters and accuracy of every classifier I fit. Moreover, classification_report
displays the table with recall
and precision
, so you can effectively evaluate each model.
print("KNN Parameters are: {}".format(cv_knn.best_params_))
print("KNN Accuracy is: {}".format(accuracy_score(y_test, pred_knn)))
print(classification_report(y_test, pred_knn))
print("Log. reg Parameters are: {}".format(cv_logreg.best_params_))
print("Log. reg accuracy is: {}".format(accuracy_score(y_test, pred_logreg)))
print(classification_report(y_test, pred_logreg))
print("Dec. tree Parameters are: {}".format(cv_dectree.best_params_))
print("Dec. tree accuracy is: {}".format(accuracy_score(y_test, pred_dectree)))
print(classification_report(y_test, pred_dectree))
print("Rand. forest Parameters are: {}".format(cv_randfst.best_params_))
print("Rand. forest accuracy is: {}".format(accuracy_score(y_test, pred_randfst)))
print(classification_report(y_test, pred_randfst))
KNN Parameters are: {'knn__n_neighbors': 47}
KNN Accuracy is: 0.7142857142857143
precision recall f1-score support
0 0.70 0.96 0.81 100
1 0.83 0.31 0.45 61
micro avg 0.71 0.71 0.71 161
macro avg 0.76 0.64 0.63 161
weighted avg 0.75 0.71 0.67 161
Log. reg Parameters are: {'logreg__C': 0.1, 'logreg__penalty': 'l2'}
Log. reg accuracy is: 0.7639751552795031
precision recall f1-score support
0 0.76 0.91 0.83 100
1 0.78 0.52 0.63 61
micro avg 0.76 0.76 0.76 161
macro avg 0.77 0.72 0.73 161
weighted avg 0.77 0.76 0.75 161
Dec. tree Parameters are: {'dectree__max_features': None, 'dectree__random_state': 42}
Dec. tree accuracy is: 0.6708074534161491
precision recall f1-score support
0 0.74 0.73 0.73 100
1 0.56 0.57 0.57 61
micro avg 0.67 0.67 0.67 161
macro avg 0.65 0.65 0.65 161
weighted avg 0.67 0.67 0.67 161
Rand. forest Parameters are: {'randfst__criterion': 'entropy', 'randfst__n_estimators': 70, 'randfst__random_state': 42}
Rand. forest accuracy is: 0.7453416149068323
precision recall f1-score support
0 0.74 0.91 0.82 100
1 0.76 0.48 0.59 61
micro avg 0.75 0.75 0.75 161
macro avg 0.75 0.69 0.70 161
weighted avg 0.75 0.75 0.73 161
As you can see, the logistic model performs with the highest accuracy of 0.77 meaning the model predicted 77% of cases correctly. However, you do not want to send any patient home with diabetes as if she was healthy. From this perspective, you should choose the model with recall
close to 1. Since, the logistic model has recall = 0.57
, you may consider to decide for the decision tree classifier. Considering overall accuracy, the model performs by 10 p.p. worse. However, it has the largest recall
from all the considered classifiers. Administering this model, you would have sent home the lowest possible number of patients with diabetes at the cost of reexamining greater number of healthy individuals.
I am not arguing decision tree is the best possible model for such type of data. Actually, I do not assume someone uses this particular branch of machine learning when it comes to health. I am aware of cases where deep learning and neural network models are used instead. For example, a visual algorithm can detect cancer when it is trained on pictures of human cells.
The point I am trying to make is that accuracy is not the best and only one parameter for model selection. There are many factors one must consider when a model needs to be selected.
Conclusion
I exI explained and demonstrated how important is it to explore your data before modeling. Specifically, there are more possibilities of how missing values can be recorded. To see a bigger picture of your data, it is important to ask yourself some basic questions, e.g. “can someone have 0 blood pressure?”. Once you identify missing values in your data, you should decide on how to deal with them. Would you delete every record with a missing value or would you substitute it with a mean, or would you try to be efficient and keep as much data as possible? I also put forth my point of view on how to find the feature’s importance on the final outcome. Finally, I evaluated the models based on recall
rather than on accuracy because recall
close to 1 minimizes the number of cases when a patient with either diabetes or cancer would be classified and treated incorrectly.


IaC & Tests
Overview
I was looking for the easiest way to test Azure infrastructure.
I take a look into great project like Molecule, Terratest and so on.
Even if they are very cool and powerful, I wanted to find something easier (or lazier).
I already use pester for testing purpose, so I manage to use pester for testing Azure infrastructure,
using the Gherkin syntax and I'll show you, how you can do that.
Workstation preparation
I work on 3 kind of platform : macOs, Ubuntu and Windows 10, and my tests are working on all of them.
You will need to install :
- PowerShell (6.2.3 at least)
- Powershell Az module
- Pester (at least 4.9)
- VS Code
Install Powershell and modules
Powershell 6
Manual installation
First, download the suitable version of powershell for your system on GitHub. Yes, if you miss it, that is now fully open source.
https://github.com/PowerShell/PowerShell/releases
Package Manager
macOS
If you use macOs, brew can manage it for you:
brew install powershell
Ubuntu
On Ubuntu, snap can do the job also :
sudo snap install powershell --classic
Windows
On Windows, Chocolatey is working well:
choco install pwsh
Modules
Installing module in PowerShell is quite easy. You only need to type the following :
Install-PackageProvider Nuget -ForceBootstrap -Force
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Update-Module
Install-Module -Name Pester -Force -SkipPublisherCheck
Install-Module -Name Az -force
Some command may not be useful on your setup, but this way ensure that you have the latest version of each module
Visual Studio Code
You can install Vs Code manually or by using a Package Manager using choco, snap or brew. I'll not detail this part.
Extensions installation
To install the extension, you can use the GUI of Vs Code or the cmdline. For Gui, take a look at the doc here.
For the cmdline :
code --install-extension alexkrechik.cucumberautocomplete
code --install-extension ms-vscode.powershell
on Linux and macOs, you'll need to add the following in your profile, adapt the path to Vs Code to yours :
bash:
cat << EOF >> ~/.bash_profile # Add Visual Studio Code (code) export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" EOF
zsh:
cat << EOF >> ~/.zsh_profile # Add Visual Studio Code (code) export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" EOF
Create the first tests
Pester, Gherkin and testing
First of all, you will need some detail on Pester, Gherkin and testing like I think they can be useful and easy as possible.
Pester, is a world community framework for testing in Powershell. So, if you know a bit in PowerShell, you won't be lost at all. This module add some new function to do the magic of testing.
Gherkin, is a syntax for BDD (Behavior-Driven Development) testing. To explain a bit, for me, in our infrastructure testing purpose, is to have some human readable scenario to show to management/customers.
Fortunately, Pester support the Gherkin syntax using the Invoke-Gherkin
cmdlet and do a bit of magic for us.
Let's play
We need to create our workspace, so do it like that (Using PowerShell's Shell):
Set-Location ~
New-Item ./Documents/GherkinTests -type Directory
code ./Documents/GherkinTests
Create few file :
- etienne_exo.feature <-- This is the Gherkin File
- etienne_exo.steps.ps1 <-- This is our magic
In the Feature File write the following :
# GherkinTests/etienne_exo.feature
Feature: Validate Azure Deployment
Scenario: We should have some subscriptions to work
Given we list the subscriptions using powershell
Then we should be able to have at least one
# GherkinTests/etienne_exo.steps.ps1
Given "we list the subscriptions using powershell"{
Get-AzSubscription | Should -not -throw
}
Then "we should be able to have at least one" {
(Get-AzSubscription).Count | Should -Not -BeNullOrEmpty
}
Now, let's run that to check if the test are working or not :
❯ Invoke-Gherkin
Pester v4.10.0
Executing all tests in '/home/etienne/Documents/GherkinTests'
Feature: Validate Azure Deployment
Scenario: We should have some subscriptions to work
[+] Given we list the subscriptions using powershell 6.17s
[+] Then we should be able to have at least one 5.01s
Tests completed in 11.39s
Tests Passed: 2, Failed: 0, Skipped: 0, Pending: 0, Inconclusive: 0
Ok, tests are working, and we have something to show to customers/managment.
Wait, can't we do nothing better ? Are we lazy enough ?
Of course, not, let's wait for the next blog part.
Azure Devops
Azure Devops CLI
Get a Personal Access Token here : https://dev.azure.com/<YourOrganisation>/_usersSettings/tokens
az extension add --name azure-devops
az devops login
# paste your PAT
az login
# with the sam
az account set -s <YOUR SUB>
az devops configure --defaults 'organization=https://dev.azure.com/etiennedeneuve'
az devops project create --name GherkinTest
# Store the repo git url to configure the repo locally, you will need a SSH Key for that.
$repo=$(az repos list --project GherkinTest --query [].sshUrl -o tsv)
Configure the repo locally
cd ~/GherkinTest
git init
git remote add origin $repo
git add .
git commit -m 'inital commit'
git push origin master
Create the pipeline
az pipelines create --name "GherkinTest"
Answer the questions like :
This command is in preview. It may be changed/removed in a future release.
Which template do you want to use for this pipeline?
[1] Starter pipeline
[2] Android
[3] Ant
[4] ASP.NET
[5] ASP.NET Core
[6] .NET Core Function App to Windows on Azure
[7] ASP.NET Core (.NET Framework)
Please enter a choice [Default choice(1)]: Starter pipeline
Do you want to view/edit the template yaml before proceeding?
Please enter a choice [Default choice(1)]: Continue with generated yaml
Files to be added to your repository (1)
1) azure-pipelines.yml
How do you want to commit the files to the repository?
Please enter a choice [Default choice(1)]: Create a new branch for this commit and start a pull request.
Enter new branch name to create: features/cicd
Checking in file azure-pipelines.yml in the Azure repo c279436a-e2f4-4e01-8f41-a30f660f7515
Created a Pull Request - https://dev.azure.com/etiennedeneuve/6874897d-6d09-412e-b73b-4b2966c04b64/_apis/git/repositories/c279436a-e2f4-4e01-8f41-a30f660f7515/pullRequests/1
Successfully created a pipeline with Name: GherkinTest, Id: 25.
{
"agentSpecification": null,
"buildNumber": "20200214.1",
"buildNumberRevision": 1,
"controller": null
}
Create the Service Endpoint for Azure RM Subscription
First we need to create a SPN in Azure AD :
az ad sp create-for-rbac --name AzureDevops
Changing "AzureDevops" to a valid URI of "http://AzureDevops", which is the required format used for service principal names
Creating a role assignment under the scope of "/subscriptions/1417c648-XXXX"
{
"appId": "41176fe8-XXXXX",
"displayName": "AzureDevops",
"name": "http://AzureDevops",
"password": "7eaeb380-XXXXX",
"tenant": "06329ce4-XXXX"
}
Take note of the appId, Name, Password and Tenant.
Now, list your subscriptions :
az account show
{
"environmentName": "AzureCloud",
"id": "1417c648-XXXXX",
"isDefault": true,
"name": "Microsoft XXXX",
"state": "Enabled",
"tenantId": "06329ce4-XXXX",
"user": {
"name"<EMAIL_ADDRESS>"type": "user"
}
}
Take note of the Id, Name, and Tenant.
And then create the service endpoint in Azure DevOps :
az devops service-endpoint azurerm create --name 'Azure MVP' `
>> --azure-rm-tenant-id "YourTenantId" `
>> --azure-rm-service-principal-id "AppID" `
>> --azure-rm-subscription-id "SubID" `
>> --azure-rm-subscription-name "Name of the Sub"
Azure RM service principal key: "Password"
Confirm Azure RM service principal key: "Password"
{
"administratorsGroup": null,
< shortened >
"type": "azurerm",
"url": "https://management.azure.com/"
}
Configure the pipeline
Now, checkout to the newly created branch :
# change branch
git checkout features/cicd
# get latests info from remote
git pull
# open code in the current folder
code .
Add the following snippet into azure-pipelines.yml
:
# ./azure-pipelines.yml
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pool:
vmImage: 'windows-latest'
steps:
- task: AzurePowerShell@5
inputs:
azurePowerShellVersion: LatestVersion
azureSubscription: 'Azure MVP'
Inline: |
Install-Module -Name Pester -Force
ScriptType: InlineScript
pwsh: true
workingDirectory: $(Build.Repository.LocalPath)
displayName: 'Install Pester'
- task: AzurePowerShell@5
inputs:
azurePowerShellVersion: LatestVersion
azureSubscription: 'Azure MVP'
Inline: |
Invoke-Gherkin -OutputFile result.xml -OutputFormat NUnitXml
ScriptType: InlineScript
pwsh: true
workingDirectory: $(Build.Repository.LocalPath)
displayName: 'Launch Test'
- task: PublishTestResults@2
inputs:
buildConfiguration: Azure
buildPlatform: Azure
publishRunAttachments: true
testResultsFiles: result.xml
testResultsFormat: NUnit
testRunTitle: ValidateAzure
Commit the file :
git add azure-pipelines.yaml
git commit -m 'feat: add cicd for tests'
git push origin features/cicd
Go in your Azure Devops project, select your new pipeline, and go in Tests, you should have something like my public repo :
Et Voila!
Working with the tests
Now, if we want to deploy something in our new infra, we will need to write the tests before deploying the resources themselves.
Adding some tests
In this scenario, we want to deploy a VM, in our subscription. Let's do a quick list of what we should have after a successful deployment :
- 1 Subscription
- 1 Resource Group
- 1 Virtual Network
- 1 Subnet
- 1 Network Interface
- 1 Disk
- 1 VM
- Optionally: 1 Public IP
With our list, we can now write the test we want, in the feature file:
# GherkinTests/etienne_exo.feature
Feature: Validate Azure Deployment
Scenario: Someone start a new vm deployment
Given someone start a new vm deployment in the subscription
When the deployment is completed we should have 1 resource group
Then we should have 1 Virtual Network
And 1 Subnet
And 1 Network interface
And 1 Disk
And 1 VM
And 1 Public IP
Now, in our steps.ps1 file we will update it:
# GherkinTests/etienne_exo.steps.ps1
Given "someone start a new vm deployment in the subscription"{
Get-AzSubscription | Should -not -throw
}
When "the deployment is completed we should have 1 resource group" {
Get-AzResourceGroup -name RG-GherkinTests | Should -exists
}
Then "We should have 1 Virtual Network"{
}
And "1 Subnet"{
}
And "1 Network interface"{
}
And "1 Disk"{
}
And "1 VM"{
}
And "1 Public IP"{
}


Biking helps you become the best version of yourself. A person can reduce their risk of heart disease by almost 50% bicycling for only three hours a week (League of American Bicyclists). Biking is an easy and convenient way to stay in good shape and healthy.
Make an impact on the environment by reducing your carbon footprint. By biking instead of driving, you are able to substantially reduce your personal negative emissions onto the earth.
Biking helps you meet more people in the Greater Rochester community. By attending biking seminars and classes, you are able to make friends while being educated on the positive effects that biking can have. We push for more bike lanes around the city area to provide a safe and convenient way to use your bike to get from Point A to Point B!


[TOC]
Constructing linear representation of pan genome from inputs of:
- A reference genome
- population level NGS deep sequencing short reads (> 20X depth of coverage)
- Other reference-level genome assemblies (Optional)
by:
- de novo assemble each individual from NGS reads
- identifying non-reference sequences(NR-SEQs) from whole genome alignment (WGA) to reference genome
- attempting to anchor them to reference genome from evidences of WGA and WGS pair-end read mapping
- clustering the anchored NR-SEQs and remove redundancies based on population level data to get the representative pan-genome sequences.
you will get outputs of:
- each individual's draft contigs
- WGA between each individual and reference
- NR-SEQs for each individual, with relative positions to the reference genome if there are supportive anchoring evidences
- Non-redundant non-reference sequence (NRNR-SEQ) representations of all the individuals
- the linear representation of the pan-genome would be
Reference
+NRNR-SEQ
This pipeline was originally developed to construct the pan-Zea genome. However, all the requirements are assigned from input options, which makes it possible to be extended to any NGS based pan-genome construction with slightly modification to the parameters.
The pipeline was written with bash
and was only tested on Linux platform, we do not guarantee trouble-free running on other platforms.
Runtime environment:
- Linux, tested with version 3.10.0-862.el7.x86_64 (Red Hat 4.8.5-28)
- bash, tested with version 4.2.46(2)-release (x86_64-redhat-linux-gnu)
- perl 5, tested with v5.30.1
These softwares should be installed and available from $PATH
environment variable to make sure the pipelines run successfully:
Once the prerequisites were corrected installed and assigned to $PATH
, the pipelines could be executed by:
# get the usage of the pipelines:
bash /PATH/to/pan-Zea_genome_pipe/PANZ_individual_pipe.sh -h
bash /PATH/to/pan-Zea_genome_pipe/PANZ_cluster_pipe.sh -h
Figure illustration of the pipeline:
The pipeline consists mainly of:
- run assembly using idba_ud to get genome assembly for each individual
- align each assembly to the reference genome using minimap2 (embedded in quast) and get primary NR-SEQs
- algin the primary NR-SEQs using blast against
NCBI nt database
for decontamination- align the outputs to reference genome again with
bwa MEM
and filter according tocoverage%
andidentity%
- get the split-reads (SR) and read-pairs (RP) by aligning the WGS paired-end reads of each individual to the reference genome using
popins
as the anchoring evidences- combine WGA information with evidences from SR and RP to anchor the NR-SEQs to reference genome
- clustering the anchored NR-SEQs, and get non-redundant representations according to population level evidences
- get non-redundant unanchored NR-SEQs, merge with reference sequence and anchored NR-SEQs as the linear pan-genome.
Let's say we have 150 bp WGS PE reads from one maize sample called TEST001:
# TEST001 PE read of 150 bp
TEST001_rd1.fq.gz
TEST001_rd2.fq.gz
And a reference genome assembly: REF.fa
Firstly, we need to align the short reads of TEST001 to the reference genome using BWA MEM:
# build reference index for bwa
bwa index /path/to/REF.fa
# this would generate index files of REF.fa.{amb,ann,bwt,pac,sa}
# NOTE: make sure the indexes are in the same PATH with REF.fa
# Now run sequence alignment, and get sorted bam format alignment:
bwa mem /path/to/REF.fa /path/to/TEST001_rd1.fq.gz /path/to/TEST001_rd2.fq.gz |\
samtools view -@ -Shu - |\
samtools sort -O bam -o TEST001_bwa_sort.bam -
note: this bam file was used for extracting "poorly-aligned reads" in popins only, using bam flies from other aligner such as Bowie2 would also work. But the BWA index of REF is mandatory.
Considering that TEST001 is a plant sample, we would like to search the result contigs against the NCBI nt database to remove "best-hit-not-plant" records. To achieve this, we need a local nt database, and a list of plant accessions within the database.
# download nt database from NCBI
# NOT run:
# wget https://ftp.ncbi.nih.gov/blast/db/FASTA/nt.gz
# gunzip nt.gz
# 1. parse nt db to get [Gi_access] -> [Taxonomy_id] relationship:
blastdbcmd -db nt -entry all -outfmt "%g,%l,%T" > nt_all_accession_length_taxid.csv
# 2. get all Taxonomy IDs belonging to Viridiplantae (33090)
# using TaxonKit: https://github.com/shenwei356/taxonkit
taxonkit list --ids 33090 --indent "" > plant.taxid.txt
# 3. get all plant accessions:
cat nt_all_accession_length_taxid.csv |\
perl -F"," -lane '
BEGIN{
open(IN,"plant.taxid.txt");
while(<IN>){
chomp;
$h{$_}=1;
}
$,="\t";
}
$a=join(",",@F[0..$#F-2]);
print $a if $h{$F[-1]};
' > plant_nt_accession.txt
Now we have everything needed as inputs:
# >> In bash:
# inputs
export rd1 = "/path/to/TEST001_rd1.fq.gz"
export rd2 = "/path/to/TEST001_rd2.fq.gz"
export ref = "/path/to/REF.fa" # bwa indexed
export sr_bam="/path/to/TEST001_bwa_sort.bam"
# dbs
export nt_db= "/path/to/nt_db/nt"
export pl_acc= "/path/to/plant_nt_accession.txt"
And we could simply run the pipeline as:
# run pipeline for TEST001:
bash /path/to/PANZ_individual_pipe.sh -1 ${rd1} -2 ${rd2} -g 500 -t 8 -X TEST001 -R ${ref} -l 100 -D ${nt_db} -P ${pl_acc} -N 0.4 -c 0.8 -i 0.9 -B ${sr_bam} -l 150 -q 10 -A 3 -S 3
This command would automatically do:
- assembly TEST001 draft contigs from WGS reads
- filter out too short contigs (< 500 bp), then align the remaining contigs to reference genome to get the raw NR-SEQs (kept sequences with unaligned length > 100 bp)
- decontaminating raw NR-SEQs with proportion of not-plant-sequences >= 40%
- align NR-SEQs to reference again with BWA, filter out record with identify >= 90% and coverage >= 80%
- parse the poorly-mapped-to-reference PE reads of TEST001
- map these reads to reference to get RP and SR evidences (supported by at least 3 RP and SR hits) for anchoring
- get the final anchored information for TEST001
The outputs are located in a dir named TEST001
, with plenty of result files. Here we will introduce the key outputs that used in the downstream pipelines, while the detailed Introduction of the outputs of PANZ_individual_pipe.sh
are illustrated in Output_format.md.
TEST001.unaligned.pmrcfiltered.fa.gz: records the final NR-SEQs that passed all the filters. The ID of each sequence is in a format of [PREFIX]_[contigIDs]_[start]-[end]
, e.g.: TEST001_scaftig0000000113_scaffold_112_32176-33759
TEST001_00_FINAL_ALL.vcf: records all the anchored NR-SEQs as INS in vcf format. The quality tag LowQual
means "supported with Read-pair evidence, but no precise position evidences (SR or WGA)", while PASS
means with evidences indicate the precise anchor positions and passed the filters.
TEST001_05_FINAL_UNANCHORED.tsv: records all the un-anchored NR-SEQs either due to no anchoring evidences or evidences not strong enough to pass the cutoffs.
Now, let's say we have already finished PANZ_individual_pipe.sh
for WGS reads of another 99 samples TEST002 - TEST100. So we now have 100 result dirs:
# > ls -1
TEST001/
TEST002/
...
...
TEST099/
TEST100/
We will need to list all the required NR-SEQ outputs of the 100 samples as the downstream inputs:
# list all NR-SEQs
ls /path/to/100SampleOuts/TEST{001..100}/*.unaligned.pmrcfiltered.fa.gz > pop_nrseq_list.txt
# list all anchored info
ls /path/to/100SampleOuts/TEST{001..100}/*_00_FINAL_ALL.vcf > pop_anchor_list.txt
# list all un-anchored info
ls /path/to/100SampleOuts/TEST{001..100}/*_05_FINAL_UNANCHORED.tsv > pop_unanchor_list.txt
STEP1-6 are embedded in PANZ_individual_pipe.sh
, with options:
----------------------------------------------------------------------------------------
PANZ_individual_pipe.sh -- identify and anchor non-ref-sequences
----------------------------------------------------------------------------------------
# parameters ([R]: Required; [O]: Optional)
-h show help and exit.
-1 <file> [O] File path of PE_reads_1.fq.gz, coupled with '-2'
-2 <file> [O] File path of PE_reads_2.fq.gz, coupled with '-1'
-g <int> [O] cutoff length for final assembly scaftigs (Default:500).
-t <int> [O] number of threads (Default: 4)
-x <string> [R] PREFIX for the sample, used to generate outputs.
-f <file> [O] File path of scaftig.fa.gz, will ignore -1 -2 and skip
idba_ud assembly step. If there is properate scaftig
file (Named as: Prefix_scaftig\$scftig_len.fa.gz, eg:
Sample1_scaftig500.fa.gz), the program will use that
file instead of -f scaftig file for downstream analysis.
(NOTE: sequence name of the scaftig file should start
with 'PREFIX_', same as -x PREFIX )
-R <file> [R] File path of reference.fa, should have bwa indexed.
-l <int> [O] min length for extract unaligned sequences (Default: 100)
-D <file> [R] Path of blastDB for cleaning. Use NCBI NT databse.
-P <file> [R] Path of list of 'within ids' in the blastDB, one record
per line.(eg.: if your species is plant, list all plant
ids in the blastDB. )
-N <0-1> [O] Cleaning scaftig cutoff. Filter out scaftigs with Non-
withinSP-seq-length-rate > this value. (Default: 0.4)
-c <0-1> [O] coverage cutoff for filtering unaln sequence (Default: 0.8)
-i <0-1> [O] identity cutoff for filtering unaln sequence (Default: 0.9)
-B <file> [R] File path of all-reads-align-to-ref-raw.bam, used to get
poorly mapped reads in PopIns.
-L <int> [O] Input WGS reads length (Default: 150)
-q <int> [O] map Quality cutoff for bam based filtering (Default: 10)
-A <int> [O] read-pairs support cutoff (Default: 3)
-S <int> [O] split-reads support cutoff (Default: 3)
-z <path> [O] Path of the sub-scripts dir. (Default: $(dirname $0)/src)
----------------------------------------------------------------------------------------
NOTEs:
-f
option, the -1 / -2
options would be ignored and the de novo assembling step would be skipped/src/pan00_IDBA_assembly.sh
as --mink 20 --maxk 100 --step 20
. So if you want to change the assembly parameters, you would have to modify the code line manually. We were sorry for that inconvenience, and would consider to make them optional in the future.If you use this pipeline in your work, or you would like to know more details, please refer to:
Gui, S. (2021). TITLE HERE. Journal HERE, 34:3094-3100.- [doi:DOIhere][doi]


Username is required.
Email is required.
Password is required.
Password confirmation is required.
Role is required.


{/output/properties.html}
|{title}|
|{title}|
|{title}|
|{title}|
{/output/properties.html}
{/output/properties.html}
{/output/properties.html}
{/output/properties.html}
{/output/properties.html}
{/output/properties.html}
{/output/properties.html}


Hurray! time to add some cash.
In order to fully utilize your swift wallet on campus to purchase various goods and services across various
media and outlets (and even loan money), you need to have some cash in your account. Don't worry, we
don't charge any fees for most transactions; so you literally almost get what you deposit.


Farnborough announces major change to senior leadership team 18 Nov 2019, 08:18 by Mike Richardson Share This Article Tweet ShareShareShare Subscribe to our FREE Newsletter Tags


inputs/nalu-wind/nonIsoEdgeOpenJet/nonIsoEdgeOpenJet.yaml
. The following
variables control the number of timesteps and the frequency of output.
Changing them will alter the dataset that is created:
termination_time
controls the end timestep for the simulation.time_step
controls the time interval for the timesteps.|   | ||
| << Prev | Home | Next >> |


Leyland prisoner who was on the run for 10 weeks is back behind bars
by Stef HallA thug who fractured a paramedic’s skull with a baseball bat absconded from prison because he felt his family were under threat, Preston Crown Court heard.
Lewis Westwood, previously of Hillbrook Road, Leyland, was jailed at Preston Crown Court for eight years in 2014 for grievous bodily harm with intent.
David Clarke, prosecuting, said Westwood had been recalled to prison on March 8 last year for breaching his licence conditions following his release from that term.
READ MORE: Smirking thug showed no mercy in vicious attack on paramedic
He said he absconded from open conditions at HMP Kirkham on August 4.
Westwood was on the run for 10 weeks before his arrest in Leyland on October 19.
Preston Crown Court was told at the time, his mother was also serving a jail term, and he said he had received threats due to what she had been doing and feared his sister would be subjected to violence.
Judge Robert Altham said: “It’s right to say he was at large for a long period of time which I take to be significant aggravating feature of this case.
He imposed eight months in prison, which will be served alongside Westwood’s existing term.
He is due to be released in January 2022 from the jail term for the paramedic attack.


This page contains instructions on how to enter the information found on each of the four groups of cards:
A box containing a set of Latin characters with accents will appear whenever you focus on a title or author field. Please click on the relevant characters to input text with the required accents. Alternatively, you can use the Character Map tool built into Windows and Mac OSX.
Title/s: Please write the article at the front in natural language, for example, 'The Dressmaker' rather than 'Dressmaker, The'. If there are two titles, please include both, separated by a semi-colon.
Some cards only feature two titles and no other information. In such cases just write the two titles in the title field, separated by a semi-colon.
Author/s: If the author is noted, please include it here. If two authors are noted, please include both, separated by a semi-colon.
Date: Please include the date, in the format shown on the card.
Reference Number: The reference number should be 5 digits and a folio reference (e.g. '45895 ff.941-983').
License Number and/or Year and Volume: There are no license numbers on these cards.
Other Information: Please transcribe any other information here.
Title/s: Please write the article at the front in natural language, for example, 'The Dressmaker' rather than 'Dressmaker, The'. If there are two titles, please include both, separated by a semi-colon.
Some cards only feature two titles and no other information. In such cases just write the two titles in the title field, separated by a semi-colon.
Author/s: If the author is noted, please include it here. If two authors are noted, please include both, separated by a semi-colon.
Date: Please include the date, in the format shown on the card.
Reference Number: The reference number should be 5 digits and a capital letter (e.g. '45895 B').
License Number and/or Year and Volume: If the license number is present, please include it here (e.g. 'License 56').
Other Information: Please transcribe any other information here.
Title/s: Please write the article at the front in natural language, for example, 'The Dressmaker' rather than 'Dressmaker, The'. If there are two titles, please include both, separated by a semi-colon.
Author/s: If the author is noted, please include it here. If two authors are noted, please include both, separated by a semi-colon.
Date: Please type the date in the following format: '6 Mar 1953'.
Reference Number: The reference number is 5 digits and a capital letter, (e.g '45895 B'). If no number is present, please leave this field blank.
License Number and/or Year and Volume: Transcribe the year and volume in this field, separated by a slash (e.g. '1942/17').
Other Information: Please transcribe any other information here.
Title/s: Please write the article at the front in natural language, for example, 'The Dressmaker' rather than 'Dressmaker, The'. If there are two titles, please include both, separated by a semi-colon.
Author/s: If the author is noted, please include it here. If two authors are noted, please include both, separated by a semi-colon.
Date: Please type the date in the following format: '6 Mar 1953'.
Reference Number: The reference numbers are not included on these cards, please leave this field blank.
License Number and/or Year and Volume: Transcribe the year and/or license number here, separated by a slash (e.g. '1942/117') or if there is only a license number 'License number 2209'
Other Information: Please transcribe all other information here, including the notes about the play and any additional notes on the back of the card.


JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A
B
C
D
E
F
G
I
J
L
M
N
O
P
R
S
T
U
V
W
O
onChat(AsyncPlayerChatEvent)
- Method in class me.ryandw11.ultrachat.formatting.
ChannelJSON
onChat(AsyncPlayerChatEvent)
- Method in class me.ryandw11.ultrachat.formatting.
NormalJSON
onChat(AsyncPlayerChatEvent)
- Method in class me.ryandw11.ultrachat.formatting.
RangeJSON
onChat(UltraChatEvent)
- Method in class me.ryandw11.ultrachat.listner.
StopChat
onCommand(CommandSender, Command, String, String[])
- Method in class me.ryandw11.ultrachat.commands.
ChannelCmd
onCommand(CommandSender, Command, String, String[])
- Method in class me.ryandw11.ultrachat.commands.
Global
onCommand(CommandSender, Command, String, String[])
- Method in class me.ryandw11.ultrachat.commands.
NewChatCommand
onCommand(CommandSender, Command, String, String[])
- Method in class me.ryandw11.ultrachat.commands.
SpyCommand
onCommand(CommandSender, Command, String, String[])
- Method in class me.ryandw11.ultrachat.commands.
StaffChat
onCommand(CommandSender, Command, String, String[])
- Method in class me.ryandw11.ultrachat.commands.
StaffChatToggle
onCommand(CommandSender, Command, String, String[])
- Method in class me.ryandw11.ultrachat.commands.
World
onCommand(CommandSender, Command, String, String[])
- Method in class me.ryandw11.ultrachat.gui.
ColorGUI_1_15_R1
onCommand(CommandSender, Command, String, String[])
- Method in class me.ryandw11.ultrachat.gui.
ColorGUI_Latest
onDisable()
- Method in class me.ryandw11.ultrachat.
UltraChat
onEnable()
- Method in class me.ryandw11.ultrachat.
UltraChat
onInventoryClickEvent(InventoryClickEvent)
- Method in class me.ryandw11.ultrachat.gui.
ColorGUI_1_15_R1
onInventoryClickEvent(InventoryClickEvent)
- Method in class me.ryandw11.ultrachat.gui.
ColorGUI_Latest
onJoin(PlayerJoinEvent)
- Method in class me.ryandw11.ultrachat.listner.
JoinListner
onJsonChat(UltraChatEvent)
- Method in class me.ryandw11.ultrachat.listner.
NoSwear
onJsonChat(UltraChatEvent)
- Method in class me.ryandw11.ultrachat.listner.
Notify
onLeave(PlayerQuitEvent)
- Method in class me.ryandw11.ultrachat.listner.
JoinListner
onPlayerCommand(PlayerCommandPreprocessEvent)
- Method in class me.ryandw11.ultrachat.listner.
Spy
onTabComplete(CommandSender, Command, String, String[])
- Method in class me.ryandw11.ultrachat.commands.
CommandTabCompleter
openGUI(Player, int)
- Method in interface me.ryandw11.ultrachat.gui.
ColorGUI
openGUI(Player, int)
- Method in class me.ryandw11.ultrachat.gui.
ColorGUI_1_15_R1
openGUI(Player, int)
- Method in class me.ryandw11.ultrachat.gui.
ColorGUI_Latest
A
B
C
D
E
F
G
I
J
L
M
N
O
P
R
S
T
U
V
W
Skip navigation links
Overview
Package
Class
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes


About
This website is part of the course websoft DA377B.
This course is about teaching us as many web technologies as humanly possible in a short amount of time. We learned Javascript, HTML, CSS, NodeJS, Express, PHP, C# in the amount of time that is 2 months. Compare that to the fact we've been only studying Java for the past 2.5 years in this establishment. This website is about completing the assignments given to us in this course.
Thisis my repository
Thisis the original repository


The phase-space Lagrangian for guiding-center motion was first given in
Littlejohn's paper[1], which takes the following form
|
(1) |
where
is the location of the guiding-center,
is
the parallel (to magnetic field) velocity of the particle (will be proved
later that
is also the parallel velocity of the guiding
center)
with the perpendicular (to
magnetic field) velocity of the particle, is the gyrophase,
with being the charge number and being the elementary
charge,
. Note that here the (phase-space)
Lagrangian of guiding center is considered to be a function of variables
, and . Also note that three
variables, ,
and happens not to appear
in Eq. (1). Further note that the explicit dependence of
on
and is through the electromagnetic field
, , and the frequency . The Euler-Lagrange
equation corresponding to variable is written as
|
(2) |
which, after evaluating the partial derivatives, is reduced to
|
(3) |
which indicates as expected that the time change rate of the gyrophase
equals the cylcotron frequency . The Euler-Lagrange equation
corresponding to the variable is written as
|
(4) |
which can be written as
|
(5) |
which indicats that the magnetic moment
is a constant of
the motion. The Euler-Lagrange equation for the variable
is
|
(6) |
which can be simplified to
|
(7) |
which indicates that
is also the parallel velocity of the
guiding center. Next, consider the Euler-Lagrange equation corresponding to
the coordinate
, which is given by
|
(8) |
which should be understood as a shorthand of the three Euler-Lagrange
equations coorresponding to three coordinates. Is the above equation still
valid in arbitrary coordinates system if we consider
and
as gradient
operators? The answer is yes. However it is not trivial for me to find the
proof (the proof is provided in Sec. (4)). Using Eq.
(1) and vector identies, we obtain
|
(9) |
and
|
(10) |
where
. Using Eqs.
(9) and (10), Eq. (8) is written as
|
(11) |
Using
and
, the second last
term can be reduced to
. Then Eq. (11) is written
as
|
(12) |
Noting that
(this is because
, i.e., holding
constant), so
that the second term on the right-hand side of the above equation is canceled
by terms on the right-hand, yielding
|
(13) |
Equation (13) can be further written in compact form by defining
new magnetic-like and electric-like quantities. Define
|
(14) |
and
|
(15) |
then
|
(16) |
|
(17) |
(Note that the time partial differential does not operate on
because it is an independent variables.) Using these, Eq. (13) is
written as
|
(18) |
|
(19) |
Define
|
(20) |
then Eq. (19) is written as
|
(21) |
which agrees with Eq. (23) of Porcelli's paper[1].
Subsections
YouJun Hu
2014-05-19


???: ??
| ?? | ?? |
|---|---|
| ContextResource |
Extended interface for a resource that is loaded from an enclosing
'context', e.g. from a
ServletContext but also
from plain classpath paths or relative file system paths (specified
without an explicit prefix, hence applying relative to the local
ResourceLoader 's context). |
| InputStreamSource |
Simple interface for objects that are sources for an
InputStream . |
| ProtocolResolver |
A resolution strategy for protocol-specific resource handles.
|
| Resource |
Interface for a resource descriptor that abstracts from the actual
type of underlying resource, such as a file or class path resource.
|
| ResourceLoader |
Strategy interface for loading resources (e.. class path or file system
resources).
|
| WritableResource |
Extended interface for a resource that supports writing to it.
|
| ? | ?? |
|---|---|
| AbstractFileResolvingResource |
Abstract base class for resources which resolve URLs into File references,
such as
UrlResource or ClassPathResource . |
| AbstractResource |
Convenience base class for
Resource implementations,
pre-implementing typical behavior. |
| ByteArrayResource |
Resource implementation for a given byte array. |
| ClassPathResource |
Resource implementation for class path resources. |
| ClassRelativeResourceLoader |
ResourceLoader implementation that interprets plain resource paths
as relative to a given java.lang.Class . |
| DefaultResourceLoader |
Default implementation of the
ResourceLoader interface. |
| DefaultResourceLoader.ClassPathContextResource |
ClassPathResource that explicitly expresses a context-relative path
through implementing the ContextResource interface.
|
| DescriptiveResource |
Simple
Resource implementation that holds a resource description
but does not point to an actually readable resource. |
| FileSystemResource |
Resource implementation for java.io.File handles. |
| FileSystemResourceLoader |
ResourceLoader implementation that resolves plain paths as
file system resources rather than as class path resources
(the latter is DefaultResourceLoader 's default strategy). |
| FileUrlResource |
Subclass of
UrlResource which assumes file resolution, to the degree
of implementing the WritableResource interface for it. |
| InputStreamResource |
Resource implementation for a given InputStream . |
| PathResource |
Resource implementation for java.nio.file.Path handles. |
| ResourceEditor | |
| UrlResource |
Resource implementation for java.net.URL locators. |
| VfsResource |
JBoss VFS based
Resource implementation. |
| VfsUtils |
Utility for detecting and accessing JBoss VFS in the classpath.
|


Implements the equation
y' = u * A
where A is an m x n matrix, u a vector of size m, and y a vector of size n.
A
m x n
u
m
y
n
The plot shows the reference result computed with simulatefmi3me.c.


Object | +--helma.Search.Searcher
This class provides basic functionality for
searching an index.
Defined in Search.js
| SUMMARY: Constructor | Properties | Methods | DETAIL: Constructor | Properties | Methods |
| Constructor Summary | |
helma.Search.Searcher(<helma.Search.Index> index)
Creates a new instance of helma.Search.Seacher |
| Properties Summary | |
helma.Search.HitCollection |
hits
The search results. |
java.util.Vector |
sortFields
A vector with SortField instances, if any have been defined. |
| Methods Summary | |
void
|
close()
Closes the wrapped IndexSearcher instance. |
org.apache.lucene.search.IndexSearcher
|
getSearcher()
Returns the wrapped IndexSearcher instance. |
Number
|
search(<helma.Search.Query> query, <helma.Search.QueryFilter> filter)
Searches an index using the query passed as argument. |
void
|
sortBy(<String> fieldName )
Sets a field as result sorting field. |
| Constructor Detail |
helma.Search.Searcher(<helma.Search.Index> index)
index
- The index to search in.
| Properties Detail |
helma.Search.HitCollection hits
java.util.Vector sortFields
| Method Detail |
void close()
org.apache.lucene.search.IndexSearcher getSearcher()
Number search(<helma.Search.Query> query, <helma.Search.QueryFilter> filter)
query
- The query to use for searching
filter
- An optional query filter for filtering the results.
void sortBy(<String> fieldName )
fieldName
- The name of the field in the index by which the search result should be ordered.
type
- The type of the field defined by argument fieldName. Valid arguments are "string", "float", "int", "score", "doc", "auto", "custom". Default is "auto". See http://lucene.apache.org/java/docs/api/org/apache/lucene/search/SortField.html for an explanation.
| SUMMARY: Constructor | Properties | Methods | DETAIL: Constructor | Properties | Methods |


Best of technology, networking and comunication
Who we areStay updated with our offer of Smartphones, Tablets, Networking and Smart Living.
Our Devices PromotionsNeed some help with our products? Find out more about our assistance services!
Get Started Highlights187


airmap Package
airdefs Module
airdefs
AirMapSDK
Created by AirMap Team on 6/28/16.
Copyright (c) 2016 AirMap, Inc. All rights reserved.
-
class airmap.airdefs.Advisories(distance, last_updated, name, city, color, country, longitude, properties, state, latitude, type, id)[source]
Adivosry group list
| Notes: | Distance, date of last update, name, city, color(status), country, longitude, properties, state, latitude, type, id |
-
class airmap.airdefs.Advisory[source]
Advisoy information (Pre-Flight, In-Flight)
| Notes: | Advisory status color list |
-
class Color[source]
Flight status color code
-
Colors
Color code
| Parameters: |
- gray – Disbabled
- green – Go
- yellow – Advise
- red – NoFly
|
alias of Enum
-
enum(*sequential, **named)[source]
-
class airmap.airdefs.Globals[source]
Global settings
| Notes: | Session parametes address, port, timeot, api key, token, pilot id, flight id |
-
AirConnected = False
-
dbgPrint(data)[source]
Debug send to console
| Parameters: | data – Debug or information to send to console |
| Returns: | None |
-
httpPort = 80
-
httpsAddr = 'api.airmap.io'
-
httpsPort = 443
-
keyAddr = 'sso.airmap.io'
-
myFlightID = None
-
myToken = None
-
pilotIDValid = False
-
pilot_id = None
-
strPrint(data)[source]
Information send to console
| Parameters: | data – information to send to console |
| Returns: | None |
-
telemetryAddr = 'api-aero-telemetry.airmap.com'
-
thisCID = None
-
timeOut = 18
-
xapikey = None
-
class airmap.airdefs.Notify[source]
Enable notifications
| Parameters: |
- on – Enable notifications
- off – Disable notifications
|
-
off = False
-
on = True
-
class airmap.airdefs.Properties(prop_name, prop_value)[source]
Name to Value Keypairs
-
class airmap.airdefs.Public[source]
Make flight public
| Parameters: |
- on – Public flight
- off – Private flight
|
-
off = False
-
on = True
-
class airmap.airdefs.Requirement[source]
Notification requirments contact key pair list
-
State
alias of Enum
-
enum(*sequential, **named)[source]
-
class airmap.airdefs.Startup[source]
Startup configuration
-
class Drone[source]
Drone information (ID, Location, Status)
-
State
alias of Enum
-
enum(*sequential, **named)[source]
-
class airmap.airdefs.Weather[source]
Weather control parameters
| Parameters: |
- on – Enable weather data
- off – Disable weather data
|
-
off = 'false'
-
on = 'true'
connect Module
connect
AirMapSDK
Created by AirMap Team on 6/28/16.
Copyright (c) 2016 AirMap, Inc. All rights reserved.
-
class airmap.connect.Connect[source]
-
connect()[source]
Connect to service
| Param: | None |
| Returns: | True - if connected otherwise False |
-
connection = None
Connection instance
| Notes: | HTTPS access variable |
-
get_SecureToken()[source]
Retrieve security token and refresh
| Param: | None |
| Returns: | Token if successful otherwise False |
| Todo: | Remove hardcoded token and add token from https endpoint based on CID |
-
get_boardID()[source]
Retrieve CID from mmcblk0
| Param: | None |
| Returns: | CID otherwise False |
Connection headerssecurity and format
| Notes: | Security and format headers |
-
os = <module 'os' from '/usr/lib/python2.7/os.pyc'>
OS access
-
set_Timeout(time_out)[source]
Set https request timeout time
| Parameters: | time_out – Timeout time in seconds |
| Returns: | True - Success, False - Fail |
-
set_XAPIKey(xapikey)[source]
Set https request timeout time
| Parameters: | xapikey – X-API-Key from developers account |
| Returns: | True - Success, False - Fail |
-
thisGlobals = <airmap.airdefs.Globals instance at 0x2b5bef5ce2d8>
Global parameter access
| Notes: | Endpoint address, ports, token, id(s) |
statusAPI Module
statusAPI
AirMapSDK
Created by AirMap Team on 6/28/16.
Copyright (c) 2016 AirMap, Inc. All rights reserved.
-
class airmap.statusAPI.Status[source]
-
cmd_ProcessAdvisories()[source]
-
connection = None
-
get_Advisories()[source]
-
get_Advisory(id)[source]
-
get_Condition()[source]
-
get_Humidity()[source]
-
get_MaxDistance()[source]
-
get_Precipitation()[source]
-
get_StatusCode()[source]
-
get_StatusColor()[source]
-
get_Temperature()[source]
-
get_Visibility()[source]
-
get_WindGusting()[source]
-
get_WindHeading()[source]
-
get_WindSpeed()[source]
-
get_status(gps_lat, gps_lon, weather)[source]
-
levelDown(data)[source]
-
localAdvisories = []
-
localLevelDown = []
-
localProperties = []
-
os = <module 'os' from '/usr/lib/python2.7/os.pyc'>
-
status_json = None
-
thisGlobals = <airmap.airdefs.Globals instance at 0x2b5bef5ce440>
flightAPI Module
flightAPI
AirMapSDK
Created by AirMap Team on 6/28/16.
Copyright (c) 2016 AirMap, Inc. All rights reserved.
-
class airmap.flightAPI.Flight[source]
-
cmd_KillFlights(pilotID)[source]
-
connection = None
-
create_FlightPoint(time, lat, lon, public, notify)[source]
-
delete_Flight(flightID)[source]
-
end_Flight(flightID)[source]
-
get_FlightList(pilotID)[source]
-
get_PilotID()[source]
-
os = <module 'os' from '/usr/lib/python2.7/os.pyc'>
-
thisGlobals = <airmap.airdefs.Globals instance at 0x2b5bef5ce5f0>
drone Module
drone
AirMapSDK
Created by AirMap Team on 6/28/16.
Copyright (c) 2016 AirMap, Inc. All rights reserved.
-
class airmap.drone.drone[source]
log Module
log
AirMapSDK
Created by AirMap Team on 6/28/16.
Copyright (c) 2016 AirMap, Inc. All rights reserved.
-
class airmap.log.log[source]
telemetryAPI Module
telemetryAPI
AirMapSDK
Created by AirMap Team on 6/28/16.
Copyright (c) 2016 AirMap, Inc. All rights reserved.
-
class airmap.telemetryAPI.Telemetry[source]
-
connection = None
-
os = <module 'os' from '/usr/lib/python2.7/os.pyc'>
-
post_Telemetry(flightID, lat, lon, alt, ground_speed, heading, barometer, status, battery, drone, seq, logused)[source]
-
put_Telemetry(flightID, lat, lon, alt, ground_speed, heading, barometer, status, battery, drone, seq, logused)[source]
-
thisGlobals = <airmap.airdefs.Globals instance at 0x2b5bef5ce710>
alertsAPI Module
alertsAPI
AirMapSDK
Created by AirMap Team on 6/28/16.
Copyright (c) 2016 AirMap, Inc. All rights reserved.
-
class airmap.alertsAPI.alertsAPI[source]


There will be several workshops and activities throughout the day, each day of the retreat. The goal of each workshop is to create a fun and unique environment for each participant to go deeper within themselves and to meet themselves in the moment. Each activity will present a situation which gives you an opportunity to catch yourself doing or thinking something completely different, so you suddenly realize a completely new or very old side of yourself.
Listed below are some workshops, offering is subject to change in any moment.


"the author" will refer to Jeremy May, the creator of this app.
"the app" will refer to the Gallery Hangout extension.
"Upload" or "Share" are synonymous terms which designate the action of selecting an image and uploading it through the app so others can see it in the app.
By using Gallery Hangout in Google+ Hangout, you are agreeing to these terms and conditions below.
In addition, you are also agreeing to the Terms of Service set forth by
Google and
Imgur.
To reiterate some of the things you agree not to do with this app:
- Don't breach another's copyright by uploading their works
- Don't upload gore or other obscene material
- Don't advertise
- Don't solicit
- Don't upload any material that can be considered "hate speech"
- Don't upload illegal pornographic material (i.e. Bestiality, Child Pornography, etc.)
Because this app uses Imgur, Imgur reserves the right to decide whether uploaded content is illegal and will take the necessary legal action; in addition to banning you.
By using this app, you absolve the author from any damages, losses, or incurred fees that may occur while using it. This includes, but is not limited to, bandwidth fees incurred due to uploading or downloading images shared while using the app; legal or court fees incurred due to the uploading of illegal and/or copyrighted and/or trademarked material; your computer spontaneously imploding while sharing your favorite images.
Because this app is free and not made by a crack team of super human programmers (only 1 super human programmer), you can expect occasional problems. Because it is free, the author owes the user nothing, except maybe an apology. Fixes for problems or loss of service are not guaranteed by the author.
By using this app, the user also agrees to realize that the author has no control over the state of services provided (for free) by Imgur as well.
The user agrees to the copyrights and licenses for all the software used within this app.
Gallery Hangout is licensed under the terms of
Apache License v2.0.
JQuery, JQuery UI, and JQuery Layout are all licensed under the terms of the
MIT License.
Jquery ToastMessage is licensed under the terms of the
Apache License v2.0.
The privacy policy for this app can be found
here.


{% extends "base.html" %} {% load bootstrap3 %} {% block title %}Home{% endblock %} {% block content %}
{{ request.site.name }} is a way to waste spammers' time. If you get a spam email, simply forward it to<EMAIL_ADDRESS>and {{ request.site.name }} will strip your email address, pretend it's a real person and reply to the email. Just remember to strip out any personal information from the body of the email, as it will be used so the reply looks more legitimate.
That way, the spammer will start talking to a bot, and hopefully waste some time there instead of spending it on a real victim. Meanwhile, {{ request.site.name }} will send you an email with a link to the conversation, so you can watch it unfold live!
WARNING: The service isn't done yet! It looks like crap and there may be loads of wonky stuff going on. That said, you can help by cautiously using it for a bit, and opening an issue if you notice something wrong or if you have any suggestions.
Also, it turns out email is expensive. Please donate to keep the service running! Big thanks go to ElasticEmail, which handles our email sending for us.
Thanks for your help!
| Person | Subject | Date | Msgs |
|---|---|---|---|
| {{ conversation.sender_name }} | {{ conversation.message_set.first.subject }} | {{ conversation.last_message_time|date:"d M Y" }} | {{ conversation.num_messages}} |


Master index
Index for gmmbayestb-v1.0
Dependency Graph for gmmbayestb-v1.0
Generated on Thu 14-Apr-2005 13:50:21 by
m2html
© 2003


Thanks {{purchase.client.first_name }}. You have successully booked onto {{purchase.bookings[0].service_name }}.


This is a paragraph which is, for the most part, utterly undistinguished—but its emphasized text is quite another story altogether.


No problem! Just enter the email you submitted when getting the API key initially and it will be sent to you immediately.


Home
Hotel
Flight
Register/Login
Profile
Home
Hotel
Flight
Register/Login
Hotel
From:
To:
Location:
Lodon
Japan
Rooms:
1
2
Pre-booking
Flight
From:
To:
Location:
Lodon
Japan
Pre-booking
London
Rome, Milan, Naples
SILVER HOTEL, 4 NIGHTS, 5 STARS
$1,700 Book Now
London
Paris, Marseille, Lyon
NEW PALACE, 5 NIGHTS, 5 STARS
$2,200 Book Now
Japan
Berlin, Hamburg, Munich
LUXE HOTEL, 5 NIGHTS, 6 STARS
$3,300 Book Now
Japan
Madrid, Bercelona, Valencia
GOOD HOTEL, 4 NIGHTS, 6 STARS
$4,400 Book Now
Japan
Amsterdam, Delft, The Hague
BEST HOTEL, 6 NIGHTS, 7 STARS
$5,500 Book Now
Lodon
Zürich, Geneva, Basel
NEW HOTEL, 7 NIGHTS, 7 STARS
$6,600 Book Now


Giacomo Puccini (1858 - 1924)
Giacomo Puccini was born on December 22, 1858, to a family of church musicians in Lucca. He first studied with his uncle at the Instituto Pacini in Lucca, but a performance of Verdi's "Aida" brought forth a love for operatic composition. Puccini attended the Milan Conservatory and studied under Bazzini and Ponchielli. His first opera, "Le Villi," was written in 1884, at the age of 26.
The opera "Edgar," written in 1893, was a failure, but "Manon Lescaut" proved to be an international success. More successes followed, including three of the most popular operas in history: "La BohÃ¨me" (1896), "Tosca" (1900), and the incomparable "Madama Butterfly," written in 1904. For each opera, Puccini collaborated with the librettists Illica and Giacosa. The successful team broke up with Giacosa's death in 1906.
Domestic tragedies plagued the rest of Puccini's life. His next opera, "The West," did not appear until 1910. Although containing many musical and stylistic innovations, this opera has never received the popular acclaim of his earlier work.
Puccini's final opera, "Turandot," produced in 1926, is a grand and ambitious piece. Sadly, the work was unfinished and the final act had to be written by Franco Alfano. The conductor, Leopold Stokowski, later refused to conduct the final act; instead, he told the audience, "and here the composer laid down his pen." Stokowski then left the stage.
Puccini died on November 29, 1924 in Brussels at the age of 65.


[gecode-users] compiling for 32bits on snow leopard
Denys Duchier
denys.duchier at univ-orleans.fr
Fri Oct 30 15:04:36 CET 2009
Hi Guys,
A colleague of mine has been having quite a bit of difficulty trying to
install Gecode on her brand new Mac. When compiling from sources for
32bits: I added -m32 to CFLAGS and CXXFLAGS, but it turns out that's not
sufficient. I had to tweak the Makefile and add -m32 also to DLLFLAGS.
Maybe there's a better way, but I thought I'd pass on the info. Perhaps
you can tweak configure to make this easier. Me, I don't know macs from
a hole in the ground, so I won't try.
Cheers,
--Denys
More information about the gecode-users
mailing list


|
GML
Library
|
A mathematical 3 x 3 matrix of floating-point values. More...
#include <matrix_3.hpp>
Public Member Functions | |
| Matrix3 ()=default | |
| Default constructor. Elements of the Matrix3 are initialised to 0.0f by default. | |
| Matrix3 (float diagonal) | |
| Constructs a Matrix3 with all diagonal elements set to a specific value. More... | |
| Matrix3 (float a, float b, float c, float d, float e, float f, float g, float h, float i) | |
| Constructs a Matrix3 with specified values. More... | |
| Matrix3 (const Vector3 &col0, const Vector3 &col1, const Vector3 &col2) | |
| Constructs a Matrix3 with specified columns. More... | |
| Matrix3 (const Matrix2 &mat2) | |
| Constructs a Matrix3 from a Matrix2. More... | |
| Matrix3 (const Matrix4 &mat4) | |
| Constructs a Matrix3 from a Matrix4. More... | |
| Vector3 | getRow (unsigned int idx) const |
| Constructs and returns a specific row of the Matrix3. More... | |
| Matrix3 | transpose () const |
| Calculates and returns the transpose matrix of the Matrix3. More... | |
| Matrix3 | inverse () const |
| Calculates and returns the inverse matrix of the Matrix3. More... | |
| float | determinant () const |
| Calculates and returns the determinant of the Matrix3. More... | |
| Vector3 & | operator[] (unsigned int idx) |
| Accesses the columns of the Matrix3 using a given index. More... | |
| const Vector3 & | operator[] (unsigned int idx) const |
| Accesses the columns of the Matrix3 using a given index. More... | |
| Matrix3 & | operator+= (const Matrix3 &rhs) |
| Adds another Matrix3 to the Matrix3. More... | |
| Matrix3 & | operator-= (const Matrix3 &rhs) |
| Subtracts another Matrix3 from the Matrix3. More... | |
| Matrix3 & | operator *= (float s) |
| Multiplies the elements of the Matrix3 by a scalar value. More... | |
| Matrix3 & | operator/= (float s) |
| Divides the elements of the Matrix3 by a scalar value. More... | |
| Matrix3 | operator- () const |
| Creates a copy of the Matrix3 with all components' signs flipped. More... | |
Public Attributes | |
| Vector3 | columns [3] |
| The columns of the Matrix3. | |
Static Public Attributes | |
| static const Matrix3 | zero |
| A static Matrix3 with all elements set to 0.0f. More... | |
| static const Matrix3 | identity |
| A static Matrix3 with all diagonal elements set to 1.0f, AKA the Identity matrix. More... | |
A mathematical 3 x 3 matrix of floating-point values.
This struct is used to represent square matrices with 3 columns and 3 rows.
&someMatrix[0][0];
. This provides a pointer to the matrix's first element. Definition at line 20 of file matrix_3.hpp.
| gml::Matrix3::Matrix3 | ( | float | diagonal | ) |
Constructs a Matrix3 with all diagonal elements set to a specific value.
| diagonal | The value given to the diagonal elements of the Matrix3. |
Definition at line 20 of file matrix_3.cpp.
| gml::Matrix3::Matrix3 | ( | float | a, |
| float | b, | ||
| float | c, | ||
| float | d, | ||
| float | e, | ||
| float | f, | ||
| float | g, | ||
| float | h, | ||
| float | i | ||
| ) |
Constructs a Matrix3 with specified values.
| a | The first column's first element. (The first row's first element) |
| b | The first column's second element. (The second row's first element) |
| c | The first column's third element. (The third row's first element) |
| d | The second column's first element. (The first row's second element) |
| e | The second column's second element. (The second row's second element) |
| f | The second column's third element. (The third row's second element) |
| g | The third column's first element. (The first row's third element) |
| h | The third column's second element. (The second row's third element) |
| i | The third column's third element. (The third row's third element) |
Definition at line 27 of file matrix_3.cpp.
| gml::Matrix3::Matrix3 | ( | const Matrix2 & | mat2 | ) |
| gml::Matrix3::Matrix3 | ( | const Matrix4 & | mat4 | ) |
| float gml::Matrix3::determinant | ( | ) | const |
Calculates and returns the determinant of the Matrix3.
Definition at line 89 of file matrix_3.cpp.
| Vector3 gml::Matrix3::getRow | ( | unsigned int | idx | ) | const |
Constructs and returns a specific row of the Matrix3.
| idx | The index of the row to return. |
Definition at line 54 of file matrix_3.cpp.
| Matrix3 gml::Matrix3::inverse | ( | ) | const |
Calculates and returns the inverse matrix of the Matrix3.
In 3D graphics, the inverse of a matrix is useful to reverse the original matrix's transformation.
Definition at line 72 of file matrix_3.cpp.
| Matrix3 & gml::Matrix3::operator *= | ( | float | s | ) |
Multiplies the elements of the Matrix3 by a scalar value.
| s | A scalar value to multiply each Matrix3 element by. |
Definition at line 120 of file matrix_3.cpp.
| Matrix3 gml::Matrix3::operator- | ( | ) | const |
Creates a copy of the Matrix3 with all components' signs flipped.
Definition at line 134 of file matrix_3.cpp.
| Matrix3 & gml::Matrix3::operator/= | ( | float | s | ) |
Divides the elements of the Matrix3 by a scalar value.
| s | A scalar value to multiply each Matrix3 element by. |
Definition at line 127 of file matrix_3.cpp.
| Vector3 & gml::Matrix3::operator[] | ( | unsigned int | idx | ) |
Accesses the columns of the Matrix3 using a given index.
| idx | The specified index of the column to return. |
Definition at line 96 of file matrix_3.cpp.
| const Vector3 & gml::Matrix3::operator[] | ( | unsigned int | idx | ) | const |
Accesses the columns of the Matrix3 using a given index.
| idx | The specified index of the column to return. |
Definition at line 101 of file matrix_3.cpp.
| Matrix3 gml::Matrix3::transpose | ( | ) | const |
Calculates and returns the transpose matrix of the Matrix3.
The transpose of a matrix is the same matrix but with elements of rows and columns switch around. In other words the matrix rows become the columns and the columns become the rows.
Definition at line 63 of file matrix_3.cpp.
|
static |
A static Matrix3 with all diagonal elements set to 1.0f, AKA the Identity matrix.
Definition at line 23 of file matrix_3.hpp.
|
static |
A static Matrix3 with all elements set to 0.0f.
Definition at line 22 of file matrix_3.hpp.


LOG IN
User Name
Password
LOGIN
SIGNUP
×
SIGN UP
Username
This field is required
Password
This field is required
Password must be over 6 characters
Email
This field is required
Your email address is invalid


Resource Type: process_scheduler
- Defined in:
- lib/puppet/type/process_scheduler.rb
- Providers:
-
process_scheduler
Overview
Manage Solaris process scheduler administration. See: dispadmin(8) It does not modify scheduler parameters. Once a scheduler has been set it cannot be unset by puppet.
NOTE The name of the resource is always the literal string 'current'


Recipe 10.14. Creating a Share on WindowsCredit: John Nielsen ProblemYou want to share a folder of your Windows PC on a LAN. SolutionPyWin32's win32net module makes this task very easy: import win32net import win32netcon shinfo={ } shinfo['netname'] = 'python test' shinfo['type'] = win32netcon.STYPE_DISKTREE shinfo['remark'] = 'data files' shinfo['permissions'] = 0 shinfo['max_uses'] = -1 shinfo['current_uses'] = 0 shinfo['path'] = 'c:\\my_data' shinfo['passwd'] = '' server = 'servername' win32net.NetShareAdd(server, 2, shinfo) DiscussionWhile the task of sharing a folder is indeed fairly easy to accomplish, finding the information on how you do so isn't. All I could find in the win32net documentation was that you needed to pass a dictionary holding the share's data "in the format of SHARE_INFO_*." I finally managed to integrate this tidbit with the details from the Windows SDK (http://msdn.microsoft.com) and produce the information in this recipe. One detail that took me some effort to discover is that the constants you need to use as the value for the 'type' enTRy are "hidden away" in the win32netcon module. See AlsoPyWin32 docs at http://sourceforge.net/projects/pywin32/; Microsoft's MSDN site, http://msdn.microsoft.com. |