Getting started (for datasets with aligned features)¶
Import the required packages:
[1]:
import os
import sys
from pathlib import Path
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt # optional
import seaborn as sns # optional
import scanpy as sc
from scipy import sparse
import networkx as nx
import torch
If you get trouble with installing CAME, you can download the source code from GitHub, and append the path to sys.path
. For example:
CAME_ROOT = Path('path/to/CAME')
sys.path.append(str(CAME_ROOT))
[2]:
import came
from came import pipeline, pp, pl
ROOT = Path(".") # set root
Using backend: pytorch
0 Load datasets¶
0.1 Load the example datasets¶
[3]:
from came import load_example_data
example_data_dict = load_example_data()
print(example_data_dict.keys())
adatas = example_data_dict['adatas']
dsnames = example_data_dict['dataset_names']
adata_raw1, adata_raw2 = adatas
key_class1 = key_class2 = example_data_dict['key_class']
df_varmap_1v1 = example_data_dict['varmap_1v1'] # set as None if NOT cross species
# setting directory for results
time_tag = came.make_nowtime_tag()
resdir = ROOT /'_temp' / f'{dsnames}-{time_tag}'
figdir = resdir / 'figs'
came.check_dirs(figdir) # check and make the directory
dict_keys(['adatas', 'varmap', 'varmap_1v1', 'dataset_names', 'key_class'])
a new directory made:
_temp\('Baron_human', 'Baron_mouse')-(12-16 18.13.20)\figs
0.2 Load your own datasets¶
To load your own datasets, see the code example below:
# ========= customized paths ==========
dsnames = ('Baron_human', 'Baron_mouse') # the dataset names, set by user
dsn1, dsn2 = dsnames
path_rawdata1 = CAME_ROOT / 'came/sample_data/raw-Baron_human.h5ad'
path_rawdata2 = CAME_ROOT / 'came/sample_data/raw-Baron_mouse.h5ad'
path_varmap_1v1 = CAME_ROOT / f'came/sample_data/gene_matches_1v1_human2mouse.csv'
Load scRNA-seq datasets.
# ========= load data =========
df_varmap = pd.read_csv(path_varmap)
df_varmap_1v1 = pd.read_csv(path_varmap_1v1) if path_varmap_1v1 else came.pp.take_1v1_matches(df_varmap)
adata_raw1 = sc.read_h5ad(path_rawdata1)
adata_raw2 = sc.read_h5ad(path_rawdata2)
adatas = [adata_raw1, adata_raw2]
Sepcifiy the column names of the cell-type labels, where key_class1
is for reference data, and key_class2
is for query data. If there aren’t any cell-type or clustering labels for the query cells, you can set key_class=None
.
key_class1 = 'cell_ontology_class' # set by user
key_class2 = 'cell_ontology_class' # set by user
Setting directory for results
time_tag = came.make_nowtime_tag()
resdir = ROOT /'_temp' / f'{dsnames}-{time_tag}' # set by user
figdir = resdir / 'figs'
came.check_dirs(figdir) # check and make the directory
Filtering genes (a preprocessing step, optional)
sc.pp.filter_genes(adata_raw1, min_cells=3)
sc.pp.filter_genes(adata_raw2, min_cells=3)
0.3 Inspect the compositions of different classes¶
[4]:
# Inspect classes
if key_class2 is not None:
group_counts_ori = pd.concat([
pd.value_counts(adata_raw1.obs[key_class1]),
pd.value_counts(adata_raw2.obs[key_class2]),
], axis=1)
else:
group_counts_ori = pd.value_counts(adata_raw1.obs[key_class1])
group_counts_ori
[4]:
| cell_ontology_class | cell_ontology_class | |
|---|---|---|
| B cell | NaN | 10.0 |
| Schwann cell | 13.0 | 6.0 |
| T cell | 7.0 | 7.0 |
| endothelial cell | 252.0 | 139.0 |
| leukocyte | NaN | 8.0 |
| macrophage | 55.0 | 36.0 |
| mast cell | 25.0 | NaN |
| pancreatic A cell | 2326.0 | 191.0 |
| pancreatic D cell | 601.0 | 218.0 |
| pancreatic PP cell | 255.0 | 41.0 |
| pancreatic acinar cell | 958.0 | NaN |
| pancreatic ductal cell | 1077.0 | 275.0 |
| pancreatic epsilon cell | 18.0 | NaN |
| pancreatic stellate cell | 457.0 | 61.0 |
| type B pancreatic cell | 2525.0 | 894.0 |
1 The default pipeline of CAME¶
Parameter setting:
[5]:
# the numer of training epochs
# (a recommended setting is 200-400 for whole-graph training, and 80-200 for sub-graph training)
n_epochs = 300
# the training batch size
# When the GPU memory is limited, set 1024 or more if possible.
batch_size = None
# the number of epochs to skip for checkpoint backup
n_pass = 100
# whether to use the single-cell networks
use_scnets = True
# node genes, use both the DEGs and HVGs by default
node_source = 'deg,hvg'
ntop_deg = 50
[6]:
came_inputs, (adata1, adata2) = pipeline.preprocess_aligned(
adatas,
key_class=key_class1,
use_scnets=use_scnets,
ntop_deg=ntop_deg,
node_source=node_source,
df_varmap_1v1=df_varmap_1v1, # set as None if NOT cross species
)
outputs = pipeline.main_for_aligned(
**came_inputs,
dataset_names=dsnames,
key_class1=key_class1,
key_class2=key_class2,
do_normalize=True,
n_epochs=n_epochs,
resdir=resdir,
n_pass=n_pass,
batch_size=batch_size,
plot_results=True,
)
dpair = outputs['dpair']
trainer = outputs['trainer']
h_dict = outputs['h_dict']
out_cell = outputs['out_cell']
predictor = outputs['predictor']
obs_ids1, obs_ids2 = dpair.obs_ids1, dpair.obs_ids2
obs = dpair.obs
classes = predictor.classes
[leiden] Time used: 0.2753 s
650 genes before taking unique
taking total of 494 unique differential expressed genes
450 genes before taking unique
taking total of 369 unique differential expressed genes
already exists:
_temp\('Baron_human', 'Baron_mouse')-(12-16 18.13.20)\figs
already exists:
_temp\('Baron_human', 'Baron_mouse')-(12-16 18.13.20)
[*] Setting dataset names:
0-->Baron_human
1-->Baron_mouse
[*] Setting aligned features for observation nodes (self._features)
[*] Setting observation-by-variable adjacent matrices (`self._ov_adjs`) for making merged graph adjacent matrix of observation and variable nodes
-------------------- Summary of the DGL-Heterograph --------------------
Graph(num_nodes={'cell': 10455, 'gene': 3343},
num_edges={('cell', 'express', 'gene'): 4257363, ('cell', 'self_loop_cell', 'cell'): 10455, ('cell', 'similar_to', 'cell'): 65800, ('gene', 'expressed_by', 'cell'): 4257363, ('gene', 'self_loop_gene', 'gene'): 3343},
metagraph=[('cell', 'gene', 'express'), ('cell', 'cell', 'self_loop_cell'), ('cell', 'cell', 'similar_to'), ('gene', 'cell', 'expressed_by'), ('gene', 'gene', 'self_loop_gene')])
self-loops for observation-nodes: True
self-loops for variable-nodes: True
AlignedDataPair with 10455 obs- and 3343 var-nodes
n_obs1 (Baron_human): 8569
n_obs2 (Baron_mouse): 1886
Dimensions of the obs-node-features: 702
a new directory made:
_temp\('Baron_human', 'Baron_mouse')-(12-16 18.13.20)\_models
main directory: _temp\('Baron_human', 'Baron_mouse')-(12-16 18.13.20)
model directory: _temp\('Baron_human', 'Baron_mouse')-(12-16 18.13.20)\_models
============== start training (device='cuda') ==============
C:\Users\Administrator\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\container.py:552: UserWarning: Setting attributes on ParameterDict is not supported.
warnings.warn("Setting attributes on ParameterDict is not supported.")
Epoch 0000 | Train Acc: 0.1117 | Test: 0.0021 (max=0.0021) | AMI=0.0075 | Time: 0.4064
Epoch 0005 | Train Acc: 0.4159 | Test: 0.2519 (max=0.2519) | AMI=0.2858 | Time: 0.1625
Epoch 0010 | Train Acc: 0.3867 | Test: 0.5403 (max=0.5403) | AMI=0.1705 | Time: 0.1396
Epoch 0015 | Train Acc: 0.7065 | Test: 0.4592 (max=0.6013) | AMI=0.3634 | Time: 0.1313
Epoch 0020 | Train Acc: 0.7971 | Test: 0.6092 (max=0.6310) | AMI=0.4382 | Time: 0.1269
Epoch 0025 | Train Acc: 0.8147 | Test: 0.7386 (max=0.7386) | AMI=0.5266 | Time: 0.1244
Epoch 0030 | Train Acc: 0.8661 | Test: 0.7476 (max=0.7476) | AMI=0.5507 | Time: 0.1229
Epoch 0035 | Train Acc: 0.8759 | Test: 0.7359 (max=0.7720) | AMI=0.5480 | Time: 0.1218
Epoch 0040 | Train Acc: 0.9209 | Test: 0.7736 (max=0.7736) | AMI=0.5692 | Time: 0.1207
Epoch 0045 | Train Acc: 0.9447 | Test: 0.7667 (max=0.7842) | AMI=0.5618 | Time: 0.1200
Epoch 0050 | Train Acc: 0.9632 | Test: 0.8033 (max=0.8043) | AMI=0.6154 | Time: 0.1194
Epoch 0055 | Train Acc: 0.9725 | Test: 0.7789 (max=0.8420) | AMI=0.6129 | Time: 0.1189
Epoch 0060 | Train Acc: 0.9748 | Test: 0.8028 (max=0.8537) | AMI=0.6226 | Time: 0.1185
Epoch 0065 | Train Acc: 0.9757 | Test: 0.8441 (max=0.8600) | AMI=0.6777 | Time: 0.1182
Epoch 0070 | Train Acc: 0.9786 | Test: 0.8452 (max=0.8802) | AMI=0.6295 | Time: 0.1180
Epoch 0075 | Train Acc: 0.9800 | Test: 0.8834 (max=0.8834) | AMI=0.6664 | Time: 0.1178
Epoch 0080 | Train Acc: 0.9823 | Test: 0.8621 (max=0.8834) | AMI=0.6479 | Time: 0.1176
Epoch 0085 | Train Acc: 0.9828 | Test: 0.8706 (max=0.8834) | AMI=0.6571 | Time: 0.1175
Epoch 0090 | Train Acc: 0.9858 | Test: 0.8621 (max=0.8834) | AMI=0.6353 | Time: 0.1174
Epoch 0095 | Train Acc: 0.9875 | Test: 0.8754 (max=0.8913) | AMI=0.6688 | Time: 0.1173
[current best] model weights backup
Epoch 0099 | Train Acc: 0.9876 | Test: 0.8770 (max=0.8913) | AMI=0.6630 | Time: 0.1173
[current best] model weights backup
Epoch 0100 | Train Acc: 0.9872 | Test: 0.8871 (max=0.8913) | AMI=0.6810 | Time: 0.1173
[current best] model weights backup
Epoch 0101 | Train Acc: 0.9879 | Test: 0.8913 (max=0.8913) | AMI=0.6932 | Time: 0.1174
Epoch 0105 | Train Acc: 0.9874 | Test: 0.8807 (max=0.8913) | AMI=0.6850 | Time: 0.1173
[current best] model weights backup
Epoch 0106 | Train Acc: 0.9870 | Test: 0.8902 (max=0.8913) | AMI=0.6961 | Time: 0.1174
[current best] model weights backup
Epoch 0110 | Train Acc: 0.9887 | Test: 0.8945 (max=0.8945) | AMI=0.6973 | Time: 0.1174
[current best] model weights backup
Epoch 0114 | Train Acc: 0.9888 | Test: 0.9062 (max=0.9062) | AMI=0.7225 | Time: 0.1174
Epoch 0115 | Train Acc: 0.9898 | Test: 0.8621 (max=0.9062) | AMI=0.6486 | Time: 0.1174
Epoch 0120 | Train Acc: 0.9898 | Test: 0.8897 (max=0.9062) | AMI=0.6883 | Time: 0.1172
Epoch 0125 | Train Acc: 0.9916 | Test: 0.8908 (max=0.9104) | AMI=0.6930 | Time: 0.1172
model weights backup
Epoch 0129 | Train Acc: 0.9909 | Test: 0.8765 (max=0.9104) | AMI=0.6649 | Time: 0.1171
Epoch 0130 | Train Acc: 0.9916 | Test: 0.8955 (max=0.9104) | AMI=0.6903 | Time: 0.1171
Epoch 0135 | Train Acc: 0.9914 | Test: 0.9062 (max=0.9104) | AMI=0.7135 | Time: 0.1170
Epoch 0140 | Train Acc: 0.9926 | Test: 0.8839 (max=0.9130) | AMI=0.6769 | Time: 0.1169
[current best] model weights backup
Epoch 0142 | Train Acc: 0.9886 | Test: 0.8987 (max=0.9130) | AMI=0.7245 | Time: 0.1169
Epoch 0145 | Train Acc: 0.9896 | Test: 0.8918 (max=0.9130) | AMI=0.6879 | Time: 0.1168
[current best] model weights backup
Epoch 0147 | Train Acc: 0.9929 | Test: 0.9120 (max=0.9130) | AMI=0.7280 | Time: 0.1168
Epoch 0150 | Train Acc: 0.9925 | Test: 0.9003 (max=0.9130) | AMI=0.7154 | Time: 0.1167
[current best] model weights backup
Epoch 0155 | Train Acc: 0.9929 | Test: 0.9311 (max=0.9311) | AMI=0.7515 | Time: 0.1168
Epoch 0160 | Train Acc: 0.9933 | Test: 0.9268 (max=0.9311) | AMI=0.7474 | Time: 0.1167
Epoch 0165 | Train Acc: 0.9939 | Test: 0.9136 (max=0.9311) | AMI=0.7268 | Time: 0.1167
Epoch 0170 | Train Acc: 0.9932 | Test: 0.9051 (max=0.9311) | AMI=0.7153 | Time: 0.1166
[current best] model weights backup
Epoch 0171 | Train Acc: 0.9935 | Test: 0.9290 (max=0.9311) | AMI=0.7526 | Time: 0.1166
[current best] model weights backup
Epoch 0172 | Train Acc: 0.9935 | Test: 0.9327 (max=0.9327) | AMI=0.7537 | Time: 0.1166
Epoch 0175 | Train Acc: 0.9924 | Test: 0.9252 (max=0.9327) | AMI=0.7476 | Time: 0.1166
Epoch 0180 | Train Acc: 0.9932 | Test: 0.8977 (max=0.9327) | AMI=0.7001 | Time: 0.1165
[current best] model weights backup
Epoch 0181 | Train Acc: 0.9937 | Test: 0.9300 (max=0.9327) | AMI=0.7598 | Time: 0.1166
[current best] model weights backup
Epoch 0183 | Train Acc: 0.9930 | Test: 0.9305 (max=0.9327) | AMI=0.7642 | Time: 0.1166
Epoch 0185 | Train Acc: 0.9928 | Test: 0.9247 (max=0.9327) | AMI=0.7592 | Time: 0.1165
Epoch 0190 | Train Acc: 0.9939 | Test: 0.9279 (max=0.9327) | AMI=0.7348 | Time: 0.1165
[current best] model weights backup
Epoch 0191 | Train Acc: 0.9937 | Test: 0.9417 (max=0.9417) | AMI=0.7866 | Time: 0.1165
Epoch 0195 | Train Acc: 0.9946 | Test: 0.9343 (max=0.9417) | AMI=0.7492 | Time: 0.1165
Epoch 0200 | Train Acc: 0.9952 | Test: 0.9464 (max=0.9464) | AMI=0.7792 | Time: 0.1165
Epoch 0205 | Train Acc: 0.9950 | Test: 0.9247 (max=0.9464) | AMI=0.7457 | Time: 0.1165
[current best] model weights backup
Epoch 0207 | Train Acc: 0.9945 | Test: 0.9464 (max=0.9464) | AMI=0.7906 | Time: 0.1166
Epoch 0210 | Train Acc: 0.9949 | Test: 0.9321 (max=0.9464) | AMI=0.7565 | Time: 0.1165
model weights backup
Epoch 0215 | Train Acc: 0.9954 | Test: 0.9390 (max=0.9491) | AMI=0.7636 | Time: 0.1165
[current best] model weights backup
Epoch 0220 | Train Acc: 0.9949 | Test: 0.9486 (max=0.9491) | AMI=0.7920 | Time: 0.1165
Epoch 0225 | Train Acc: 0.9956 | Test: 0.9496 (max=0.9496) | AMI=0.7870 | Time: 0.1165
[current best] model weights backup
Epoch 0229 | Train Acc: 0.9954 | Test: 0.9433 (max=0.9496) | AMI=0.7942 | Time: 0.1164
Epoch 0230 | Train Acc: 0.9946 | Test: 0.9343 (max=0.9496) | AMI=0.7742 | Time: 0.1164
Epoch 0235 | Train Acc: 0.9945 | Test: 0.9104 (max=0.9496) | AMI=0.7167 | Time: 0.1164
[current best] model weights backup
Epoch 0239 | Train Acc: 0.9954 | Test: 0.9517 (max=0.9517) | AMI=0.8013 | Time: 0.1164
Epoch 0240 | Train Acc: 0.9956 | Test: 0.9443 (max=0.9517) | AMI=0.7786 | Time: 0.1164
Epoch 0245 | Train Acc: 0.9964 | Test: 0.9470 (max=0.9517) | AMI=0.7858 | Time: 0.1164
Epoch 0250 | Train Acc: 0.9964 | Test: 0.9321 (max=0.9517) | AMI=0.7595 | Time: 0.1164
[current best] model weights backup
Epoch 0252 | Train Acc: 0.9967 | Test: 0.9491 (max=0.9517) | AMI=0.8026 | Time: 0.1164
Epoch 0255 | Train Acc: 0.9965 | Test: 0.9422 (max=0.9517) | AMI=0.7758 | Time: 0.1164
model weights backup
Epoch 0258 | Train Acc: 0.9965 | Test: 0.9475 (max=0.9517) | AMI=0.7836 | Time: 0.1164
Epoch 0260 | Train Acc: 0.9972 | Test: 0.9491 (max=0.9517) | AMI=0.7829 | Time: 0.1164
Epoch 0265 | Train Acc: 0.9973 | Test: 0.9480 (max=0.9517) | AMI=0.7765 | Time: 0.1164
Epoch 0270 | Train Acc: 0.9968 | Test: 0.9470 (max=0.9517) | AMI=0.7744 | Time: 0.1163
[current best] model weights backup
Epoch 0274 | Train Acc: 0.9963 | Test: 0.9571 (max=0.9571) | AMI=0.8026 | Time: 0.1163
Epoch 0275 | Train Acc: 0.9974 | Test: 0.9517 (max=0.9571) | AMI=0.7910 | Time: 0.1163
Epoch 0280 | Train Acc: 0.9972 | Test: 0.9533 (max=0.9571) | AMI=0.7987 | Time: 0.1163
Epoch 0285 | Train Acc: 0.9960 | Test: 0.9517 (max=0.9571) | AMI=0.7967 | Time: 0.1163
Epoch 0290 | Train Acc: 0.9967 | Test: 0.9396 (max=0.9571) | AMI=0.7713 | Time: 0.1163
[current best] model weights backup
Epoch 0291 | Train Acc: 0.9971 | Test: 0.9496 (max=0.9571) | AMI=0.8040 | Time: 0.1163
Epoch 0295 | Train Acc: 0.9972 | Test: 0.9459 (max=0.9571) | AMI=0.8006 | Time: 0.1162
figure has been saved into:
_temp\('Baron_human', 'Baron_mouse')-(12-16 18.13.20)\figs\cluster_index.png
states loaded from: _temp\('Baron_human', 'Baron_mouse')-(12-16 18.13.20)\_models\weights_epoch291.pt
C:\Users\Administrator\AppData\Roaming\Python\Python38\site-packages\torch\nn\modules\container.py:552: UserWarning: Setting attributes on ParameterDict is not supported.
warnings.warn("Setting attributes on ParameterDict is not supported.")
object saved into:
_temp\('Baron_human', 'Baron_mouse')-(12-16 18.13.20)\datapair_init.pickle
Re-order the rows
figure has been saved into:
_temp\('Baron_human', 'Baron_mouse')-(12-16 18.13.20)\figs\contingency_matrix(acc95.0%).png
figure has been saved into:
_temp\('Baron_human', 'Baron_mouse')-(12-16 18.13.20)\figs\contingency_matrix-train.png
figure has been saved into:
_temp\('Baron_human', 'Baron_mouse')-(12-16 18.13.20)\figs\heatmap_probas.pdf
Load other checkpoint (optional)¶
You can load other model checkpoint if the default model is not satisfying.
For example, load the last checkpoint and compute the results of it:
outputs = pipeline.gather_came_results(
dpair,
trainer,
classes=classes,
keys=(key_class1, key_class2),
keys_compare=(key_class1, key_class2),
resdir=resdir,
checkpoint='last',
batch_size=None,
)
You can get all saved checkpoint numbers by:
[7]:
came.get_checkpoint_list(resdir / '_models')
[7]:
[100,
101,
106,
110,
114,
129,
142,
147,
155,
171,
172,
181,
183,
191,
207,
215,
220,
229,
239,
252,
258,
274,
291,
299,
99]
Plot the contingency matrix for query dataset¶
[8]:
# contingency matrix for query dataset
y_true = obs['celltype'][obs_ids2].values
y_pred = obs['predicted'][obs_ids2].values
ax, contmat = pl.plot_contingency_mat(
y_true, y_pred, norm_axis=1,
order_rows=False, order_cols=False,
)
pl._save_with_adjust(ax.figure, figdir / 'contingency_mat.png')
ax.figure
figure has been saved into:
_temp\('Baron_human', 'Baron_mouse')-(12-16 18.13.20)\figs\contingency_mat.png
[8]:
Plot heatmap of predicted probabilities¶
[9]:
name_label = 'celltype'
cols_anno = ['celltype', 'predicted'][:]
df_probs = obs[list(classes)]
gs = pl.wrapper_heatmap_scores(
df_probs.iloc[obs_ids2], obs.iloc[obs_ids2], ignore_index=True,
col_label='celltype', col_pred='predicted',
n_subsample=50,
cmap_heat='magma_r', # if prob_func == 'softmax' else 'RdBu_r'
fp=figdir / f'heatmap_probas.pdf'
)
gs.figure
figure has been saved into:
_temp\('Baron_human', 'Baron_mouse')-(12-16 18.13.20)\figs\heatmap_probas.pdf
[9]:
2 Further analysis¶
By default, CAME will use the last layer of hidden states, as the embeddings, to produce cell- and gene-UMAP.
You can also load ALL of the model hidden states that have been seved during CAME’s default pipeline:
hidden_list = came.load_hidden_states(resdir / 'hidden_list.h5')
hidden_list # a list of dicts
h_dict = hidden_list[-1]. # the last layer of hidden states
Make AnnData objects, storing only the CAME-embeddings and annotations, for cells and genes.
[10]:
adt = pp.make_adata(h_dict['cell'], obs=dpair.obs, assparse=False, ignore_index=True)
gadt = pp.make_adata(h_dict['gene'], obs=dpair.var.iloc[:, :2], assparse=False, ignore_index=True)
# adt.write(resdir / 'adt_hidden_cell.h5ad')
# gadt.write_h5ad(resdir / 'adt_hidden_gene.h5ad')
adding columns to `adata.obs` (ignore_index=True):
original_name, dataset, REF, celltype, predicted, max_probs, is_right, pancreatic acinar cell, type B pancreatic cell, pancreatic D cell, pancreatic stellate cell, pancreatic ductal cell, pancreatic A cell, pancreatic epsilon cell, pancreatic PP cell, endothelial cell, macrophage, Schwann cell, mast cell, T cell, done!
adding columns to `adata.obs` (ignore_index=True):
name, done!
UMAP of cell embeddings¶
[11]:
sc.set_figure_params(dpi_save=200)
sc.pp.neighbors(adt, n_neighbors=15, metric='cosine', use_rep='X')
sc.tl.umap(adt)
# sc.pl.umap(adt, color=['dataset', 'celltype'], ncols=1)
ftype = ['.svg', ''][1]
sc.pl.umap(adt, color='dataset', save=f'-dataset{ftype}')
sc.pl.umap(adt, color='celltype', save=f'-ctype{ftype}')
... storing 'dataset' as categorical
... storing 'REF' as categorical
... storing 'celltype' as categorical
... storing 'predicted' as categorical
WARNING: saving figure to file _temp\('Baron_human', 'Baron_mouse')-(12-16 18.13.20)\figs\umap-dataset.pdf
WARNING: saving figure to file _temp\('Baron_human', 'Baron_mouse')-(12-16 18.13.20)\figs\umap-ctype.pdf
Store UMAP coordinates:
[12]:
obs_umap = adt.obsm['X_umap']
obs['UMAP1'] = obs_umap[:, 0]
obs['UMAP2'] = obs_umap[:, 1]
obs.to_csv(resdir / 'obs.csv')
adt.write(resdir / 'adt_hidden_cell.h5ad')
Setting UMAP to the original adata
[13]:
adata1.obsm['X_umap'] = obs_umap[obs_ids1]
adata2.obsm['X_umap'] = obs_umap[obs_ids2]


@@include('head.html')
@@include('browser-warning.html')
Home
Hello world! This is a test paragraph
@@include('scripts.html')


@import com.mohiva.play.silhouette.api.actions.SecuredRequest @import fr.gospeak.core.domain.{Group, User} @import fr.gospeak.web.auth.domain.{AuthUser, CookieEnv} @import fr.gospeak.web.pages.orga.routes.GroupCtrl @(acceptedUser: User, acceptingOrga: AuthUser, group: Group)(implicit req: SecuredRequest[CookieEnv, AnyContent], messages: Messages)
Hello @acceptedUser.firstName,
Good news! Your application to @group.name.value was accepted by @acceptingOrga.user.firstName \o/
You can now access to the group and fully participate to it.
Make awesome events and help people get together.
The Gospeak team


LoRa Configuration
Frequency
TX Sync Word
RX Sync Word
Encryption Key
Must be 16 characters or less.
Incoming Message Routing
Forward to LoRa
Forward to MQTT
Forward to Elasticsearch
Forward to Display
Idle
Disable RX when not used
Save Settings


HDR of Prof. Benoit Combemale
Abstract
"Towards Language-Oriented Modeling", Benoit Combemale [thesis, slides, video]
Software engineering faces new challenges with the advent of modern software-intensive systems such as complex critical embedded systems, cyber-physical systems and Internet of things. Application domains range from robotics, transportation systems, defense to home automation, smart cities, and energy management, among others. Software is more and more pervasive, integrated into large and distributed systems, and dynamically adaptable in response to a complex and open environment. As a major consequence, the engineering of such systems involves multiple stakeholders, each with some form of domain-specific knowledge, and with an increasingly use of software as an integration layer.Model-Driven Engineering (MDE) aims at reducing the accidental complexity associated with developing complex software-intensive systems through the use of modeling techniques that support separation of concerns and automated generation of system artifacts from models. Separation of concerns is founded on the exploitation of different domain-specific modeling languages (DSMLs), each providing constructs based on abstractions that are specific to a concern of a system. As such, DSMLs are “the heart and soul” of MDE, and have major consequences on the industrial development processes.
The integration of domain-specific concepts and best practices development experience into DSMLs can significantly improve software and systems engineers productivity and system quality. Yet, the development of DSMLs has only been recently recognized as a significant software engineering task itself. Indeed, the development of DSMLs is a challenging task which requires specialized knowledge. This recently resulted in the emergence of Software Language Engineering (SLE), defined as the application of systematic, disciplined, and measurable approaches to the development, use, deployment, and maintenance of languages.
MDE encompasses the identification of added-value domain knowledge, and SLE covers the technical activities to develop DSMLs. However, the interplay between both is still challenging: how to turn application-level and business knowledge into added-value DSMLs? How to scale-up with their multiplication due to the various stakeholders and application domains of interest? Answering these questions is at the core of my research activities for 10 years. The challenge is twofold: to capture domain-specific knowledge into added-value DSMLs while supporting their possible reuse and customization in other contexts; and to support the separation of concerns through the use of multiple DSMLs while ensuring their automatic and correct integration.
In this habilitation à diriger des recherches (HDR), I review a decade of research work in the fields of MDE and SLE. I propose contributions to support a language-oriented modeling, with the particular focus on enabling early validation & verification (V&V) of software-intensive systems. I first present foundational concepts and engineering facilities which help to capture the core domain knowledge into the various heterogeneous concerns of DSMLs (aka. metamodeling in the small), with a particular focus on executable DSMLs to automate the development of dynamic V&V tools. Then, I propose structural and behavioral DSML interfaces, and associated composition operators to reuse and integrate multiple DSMLs (aka. metamodeling in the large).
In these research activities I explore various breakthroughs in terms of modularity and reusability of DSMLs. I also propose an original approach which bridges the gap between the concurrency theory and the algorithm theory, to integrate a formal concurrency model into the execution semantics of DSMLs. All the contributions have been implemented in software platforms – the language workbench Melange and the GEMOC studio - and experienced in real-world case studies to assess their validity. In this context, I also founded the GEMOC initiative, an attempt to federate the community on the grand challenge of the globalization of modeling languages.
Committee
- Prof. Franck Barbier, University of Pau, FR (reviewer)
- Prof. Lionel Briand, University of Luxembourg, LU (reviewer)
- Prof. Betty Cheng, Michigan State University, USA (reviewer)
- Prof. Oscar Nierstrasz, University of Bern, CH (reviewer)
- Prof. Joerg Kienzle, McGill University, CA (examiner)
- Prof. Peter Mosses, Swansea University, UK (examiner)
- Dr. Benoit Baudry, INRIA, FR (examiner)
- Prof. Jean-Marc Jézéquel, University of Rennes 1, FR (examiner)
Further materials
- Document of the HDR thesis
- Slides of the defense
- Video of the defense
- My publications (full list, preprints on HAL, DBLP, Google Scholar)
- DiverSE's SLE Seminar 2015 about the recent activities in the team about software language engineering
- The GEMOC initiative and studio
- The Melange language workbench
[slideshare id=57496497&doc=hdr-combemale-slides-160126085012]
Overall Program
December 3, 2015: Seminar on Software Engineering
- 14:25-14:30: Welcome and introduction
- 14:30-15:15: "Dealing with Uncertainty in Self-Adaptive Systems" (Prof. Betty H.C. Cheng, Michigan State University, US)
- 15:15-15:45: "An attempt to software adaptation classification, illustration with State Chart XML" (Prof. Franck Barbier, University of Pau, FR)
- 15:45-16:15: coffee break
- 16:15-17:00: "Traceability Beyond Source Code: An Elusive Target?" (Prof. Lionel Briand, University of Luxembourg, LU)
- 17:00-17:45: "Domain-Specific Development Tools" (Prof. Oscar Nierstrasz, University of Bern, CH)
December 4, 2015: HDR defense
- 09:30-11:30: "Towards Language-Oriented Modeling" (HDR defense, Benoit Combemale)
- 11:30-12:30: reception


Hitler’s vegetable garden discovered at his secret headquarters
by James RogersA garden that once provided Adolf Hitler with fresh vegetables has been discovered at his infamous Wolf’s Lair headquarters.
Hitler spent much of his time in the final years of the war at the Wolf’s Lair, which is located in what is now Poland. The top-secret, heavily guarded bunker complex was used by the Nazis until January 1945, when it was abandoned and partly destroyed ahead of advancing Soviet forces.
The garden was found on the grounds of Mazurolandia, a nearby theme park museum, and excavations took place during the summer.
“We discovered Hitler's Garden in the 4th Zone of the Wolf's Lair,” said Mazurolandia, in a translated statement, adding that experts from the Mazurian Military Museum were brought in to investigate the site.
HITLER'S SECRET NAZI WAR MACHINE REVEALED IN HIDDEN BASES
The First News reports that the garden was found 2,953 feet from Hitler’s bunker. An excavation uncovered the foundations of the gardener’s house, two greenhouses and an underground boiler room that provided water and warm air to grow fresh produce all year round. Wartime ceramics, porcelain and glassware were also found.
A vegetarian, teetotaler and non-smoker, Hitler enjoyed plenty of green produce at the Wolf’s Lair. Paranoid about being poisoned, the Nazi leader also ensured that a number of food tasters worked at the Wolf’s Lair to sample his meals.
"The food was delicious, only the best vegetables, asparagus, bell peppers, everything you can imagine. And always with a side of rice or pasta," Margot Woelk, one of the food tasters, told the Associated Press in 2013.
HUNDREDS OF CHILLING ITEMS DISCOVERED AT NAZI MASSACRE SITES
Woelk, then in her mid-twenties, spent 2 1/2 years as one of 15 young women who sampled Hitler's food at the Wolf’s Lair.
The Wolf’s Lair was also the scene of an unsuccessful attempt to assassinate the evil German leader on July 20, 1944, when trusted colonel Claus von Stauffenberg detonated a bomb in a conference room at the headquarters. Hitler survived, but nearly 5,000 people were executed following the assassination attempt, including von Stauffenberg.
In 2017, a painted red telephone that belonged to Hitler and was used at the Wolf's Lair — sold at an auction for $243,000. The phone was described by Alexander Historical Auctions in Chesapeake City, Md. as “arguably the most destructive ‘weapon’ of all time."
HITLER'S RED PHONE, A POWERFUL WARTIME 'WEAPON,' SELLS FOR $243,000
The phone was “used in vehicles, trains, his field headquarters, at the Wolf's Lair...and in the last desperate days deep beneath Berlin,” according to the auction house.
Experts are also looking to unlock the sinister secrets of hidden Nazi bases dotted across Europe. Other sites include the vast base of Dag Bromberg, which, like the Wolf's Lair, is hidden in a Polish forest, and the V-2 rocket base Kraftwerk Nord West in France.
HITLER'S SECRET HISTORY REVEALED: STUDY SUGGESTS NAZI LEADER'S GRANDFATHER WAS JEWISH
A number of Nazi sites from World War II have been unearthed in recent years. In 2016, scientists at the Russian Arctic National Park discovered the remains of a secret Nazi base on the remote island of Alexandra Land in the Franz Josef Land archipelago.
CLICK HERE TO GET THE FOX NEWS APP
Earlier this year, local government officials announced the discovery of hundreds of chilling items at Nazi massacre sites in northwestern Germany.
The Associated Press contributed to this article.
Follow James Rogers on Twitter @jamesjrogers


Esri has a premium service which requires adding a token to REST API requests for services like batch geocoding. The service has a few gotchas. The sample code is:
public class EsriTokenResponse
{
[JsonProperty(PropertyName = "access_token")]
public string AccessToken { get; set; }
[JsonProperty(PropertyName = "expires_in")]
public int ExpiresInMinutes { get; set; }
}
public class EsriClient
{
private readonly HttpClient _httpClient;
private readonly string tokenUrl = "https://www.arcgis.com/sharing/rest/oauth2/token";
private readonly string clientId = "add_client_id"; // update
private readonly string clientSecret = "add_client_secret"; // update
private readonly string grantType = "client_credentials";
private readonly int expirationInMinutes = 120;
public EsriClient(HttpClient httpClient)
{
_httpClient = httpClient;
}
public async Task<EsriTokenResponse> GetToken()
{
var url =
$"{tokenUrl}?client_id={clientId}&client_secret={clientSecret}&grant_type={grantType}&expiration={ExpirationInMinutes}";
var response = await _httpClient.PostAsync(url, null);
var result =
await response.Content.ReadAsStringAsync();
var token = JsonConvert.DeserializeObject<EsriTokenResponse>(result);
if (string.IsNullOrWhiteSpace(token.AccessToken)) // Esri does not respect HTTP status codes and will always return 200. It puts errors in the body.
{
throw new Exception("Could not retrieve Esri Token");
}
return token;
}
}
Gotchas
ArcGIS has a REST-like API. It doesn't adhere strictly to REST best practices.
When retrieving the token, I did not expect to put all the parameters into the query string.
Error handling is more laborious than need be, it always returns HTTP 200 OK. For example, in the case of a bad request, the error details are in the body.
{
"error": {
"code": 400,
"error": "invalid_client_id",
"error_description": "Invalid client_id",
"message": "Invalid client_id",
"details": []
}
}


More Information
Designer | ||
|
Dora is a 7th grader. It has been 2 months after she stepped into the world of coding. Although she just had a glance at it, she still thinks she will enjoy it very much. Except for coding, she also likes to use photoshop and to do artworks.
<EMAIL_ADDRESS>|
Radika is currently a 7th grader. A brand new world of coding brings interest to her. She has so much fun in the process of making this website. She and Dora work together to give the most accurate data to the students who are graduating.
<EMAIL_ADDRESS>|


GATasksFetcher¶
-
class
GATasksFetcher
[source]¶ Represents a GATasks fetcher
Notes
This fetcher enables to fetch GATask objects.
- See:
- bambou.NURESTFetcher
Methods¶
Inherited Properties¶
GATasksFetcher.
parent_object
¶Get served object
The fetcher will fill the served object with fetched objects
Returns: Returns the object it is serving.
GATasksFetcher.
relationship
¶Get relationship of the fetcher’s owner and the fetched objects
Returns: Returns the relationship.
GATasksFetcher.
transaction_id
¶Get the transaction ID of the current connection
Returns: the transaction id
Inherited Methods¶
GATasksFetcher.
count
(filter=None, order_by=None, group_by=[], page=None, page_size=None, query_parameters=None, async=False, callback=None)¶Get the total count of objects that can be fetched according to filter
This method can be asynchronous and trigger the callback method when result is ready.
Parameters:
- filter (string) – string that represents a predicate fitler (eg. name == ‘x’)
- order_by (string) – string that represents an order by clause
- group_by (string) – list of names for grouping
- page (int) – number of the page to load
- page_size (int) – number of results per page
- callback (function) – Method that will be triggered asynchronously
Returns: Returns a transaction ID when asynchronous call is made. Otherwise it will return a tuple of information containing (fetcher, served object, count of fetched objects)
GATasksFetcher.
fetch
(filter=None, order_by=None, group_by=[], page=None, page_size=None, query_parameters=None, commit=True, async=False, callback=None)¶Fetch objects according to given filter and page.
Note
This method fetches all managed class objects and store them in local_name of the served object. which means that the parent object will hold them in a list. You can prevent this behavior by setting commit to False. In that case, the fetched children won’t be added in the parent object cache.
Parameters:
- filter (string) – string that represents a predicate filter
- order_by (string) – string that represents an order by clause
- group_by (string) – list of names for grouping
- page (int) – number of the page to load
- page_size (int) – number of results per page
- commit (bool) – boolean to update current object
- callback (function) – Callback that should be called in case of a async request
Returns: Returns a tuple of information (fetcher, served object, fetched objects, connection)
Return type: tuple
Example
>>> entity.children.fetch() (<NUChildrenFetcher at aaaa>, <NUEntity at bbbb>, [<NUChildren at ccc>, <NUChildren at ddd>], <NURESTConnection at zzz>)
GATasksFetcher.
fetcher_with_object
(parent_object, relationship='child')¶Register the fetcher for a served object.
This method will fill the fetcher with managed_class instances
Parameters: parent_object – the instance of the parent object to serve Returns: It returns the fetcher instance.
GATasksFetcher.
flush
()¶Removes all fetched objects
It will clear attribute of the served object
GATasksFetcher.
get
(filter=None, order_by=None, group_by=[], page=None, page_size=None, query_parameters=None, commit=True, async=False, callback=None)¶Fetch object and directly return them
Note
get won’t put the fetched objects in the parent’s children list. You cannot override this behavior. If you want to commit them in the parent you can use :method:vsdk.NURESTFetcher.fetch or manually add the list with :method:vsdk.NURESTObject.add_child
Parameters:
- filter (string) – string that represents a predicate filter
- order_by (string) – string that represents an order by clause
- group_by (string) – list of names for grouping
- page (int) – number of the page to load
- page_size (int) – number of results per page
- commit (bool) – boolean to update current object
- callback (function) – Callback that should be called in case of a async request
Returns: list of vsdk.NURESTObject if any
Return type: list
Example
>>> print entity.children.get() [<NUChildren at xxx>, <NUChildren at yyyy>, <NUChildren at zzz>]
GATasksFetcher.
get_count
(filter=None, order_by=None, group_by=[], page=None, page_size=None, query_parameters=None)¶Get the total count of objects that can be fetched according to filter
Parameters:
- filter (string) – string that represents a predicate fitler (eg. name == ‘x’)
- order_by (string) – string that represents an order by clause
- group_by (string) – list of names for grouping
- page (int) – number of the page to load
- page_size (int) – number of results per page
Returns: Returns the number of objects found
GATasksFetcher.
get_first
(filter=None, order_by=None, group_by=[], query_parameters=None, commit=False, async=False, callback=None)¶Fetch object and directly return the first one
Note
get_first won’t put the fetched object in the parent’s children list. You cannot override this behavior. If you want to commit it in the parent you can use :method:vsdk.NURESTFetcher.fetch or manually add it with :method:vsdk.NURESTObject.add_child
Parameters:
- filter (string) – string that represents a predicate filter
- order_by (string) – string that represents an order by clause
- group_by (string) – list of names for grouping
- page (int) – number of the page to load
- page_size (int) – number of results per page
- commit (bool) – boolean to update current object
- callback (function) – Callback that should be called in case of a async request
Returns: the first object if any, or None
Return type: vsdk.NURESTObject
Example
>>> print entity.children.get_first(filter="name == 'My Entity'") <NUChildren at xxx>
GATasksFetcher.
index
(nurest_object)¶Get index of the given item :param nurest_object: the NURESTObject object to verify
Returns: Returns the position of the object. Raises: Raise a ValueError exception if object is not present –
GATasksFetcher.
managed_object_rest_name
()¶Remote name of the managed object
Returns: Returns a string representing the resource name of the object that has to be fetched.
GATasksFetcher.
new
()¶Create an instance of the managed class
Returns: Returns an instance of managed_class


Introduction to Flink Streaming - Part 7 : Implementing Session Windows using Custom Trigger
In our last blog we discussed about the internals of window API in flink. As we discussed in the blog, understanding internals allows us to implement custom windows in flink API. This flexibility to define our own window logic helps us to implement business rules seamlessly on the stream data.
In this seventh post of the series, we are going to implement a custom window using trigger API. We will be implementing a window which allow us to understand user behavior across a specific session. This will be useful for applications where we want to analyze the data coming from an online portal where user logs in and perform some actions. You can find all other posts from the series here.
TL;DR All code is written using Flink’s scala API and you can access it on github.
User session
A session is often period of time that capture different interactions with an application from user. A session is set up or established at a certain point in time, and then torn down at some later point.
As an example, in an online portal session normally starts when user logs into the application. All the purchases made in this point of time are captured in this session. Session will be torn down when user logged out or it expires when there is no activity for some time.
Session window
A session window, is a window which allows us to group different records from the stream for a specific session. This window will start when the session starts and evaluated when session is ended. This window also will support tracking multiple sessions at a same time.
Session windows are often used to analyze user behavior across multiple interactions bounded by session.
In flink, we only have built in windows for time and count based evaluation. But our session window doesn’t depend upon any of these. So we need to create a custom window which can satisfy our requirement.
Modeling user session
Once we understood about the session and session window, we need to model the session in our code. I have a simple representation of session for explaining the example. Most of the real world session information will much more complicated than it.
The above case class is model of our session. It has following three components
-
sessionId
An identifier which uniquely identifies a session. There can be multiple sessions active at same time. Each of these sessions will have unique session id.
-
value
It’s a value associated each interaction in the session. This signifies the information we want to track with in the session. In real world scenarios, it will be user interactions with the system. As an example, in a online store it may be the product user added to the cart. In our example, it’s a simple double value.
-
endSignal
It’s an optional value in record. This signifies end of the session from the application side. It may be risen because user has logged out or may the session expired. It depends on the application to generate these signals.
Once we modeled the our session, we can now build a trigger which works on this model.
Session Trigger
As we discussed in earlier blog, trigger is a function which decides when a given window evaluates. In our example, we want the window to evaluate when endSignal for given session is sent. As we don’t have any built in trigger for it, we are going to define our own custom trigger.
The below code is for the session trigger
In above code, we are extending Trigger. When we are extending, we are specifying the that data will be represented using Session model class.
Once we extend the trigger, we need to override the 3 methods. They are
-
onElement
This is a callback method, which will be called whenever each record is added to the window. In our code, we check is the endSingal is present. If it’s present we return TriggerResult.FIRE which signifies we need to fire the trigger. Otherwise we will return TriggerResult.CONTINUE which signifies we need to continue adding elements to window.
-
onEventTime and onProcessingTime
The above two methods are used when we use a window which depends on time. As our session logic doesn’t depend on time, we don’t need to worry about them.
You can access complete code here.
Now we have our custom trigger ready. Now we can create a window which evaluates when a given session completes.
Putting all together
In this section, we glue different things we did earlier. The below are the steps.
Step 1 : Read data from socket and convert to session
As the first step, we need to read from the source and model it as session object.
Step 2 : Create keyed stream based on sessionId
As we discussed earlier, we want to evaluate multiple sessions at a time. So we need to created keyedstream stream based on session id.
Step 3 : Create session window
Once we have keyvalue stream, now we can define a window using our custom trigger. As we did with count window, we are going to use GlobalWindow as our window assigner and rather than using CountTrigger we are going to add our custom trigger. We use purging trigger for purging session once it’s evaluated.
The above code created sessionWindowStream which tracks sessions.
Step 4 : Aggregate and Print
Once we have the window, we need to define an aggregate function over window. In this example, we are going to sum the value over session and print to console.
You can access complete code here.
Running the example
As we ran our earlier example, we will be entering data in the stdin of the socket. In our example, socket will be listening on port 9000.
Enter below two lines in the stdin
In the above, we have started two sessions session1 and session2. This will create two windows. As of now, no window will evaluate as session is not yet ended.
Let’s end session1 using below line
Now you will observe the below result in flink
Window for session1 is evaluated now, as it is ended.


- atom
- An atom, in [A-Z][a-z]? format, as per the XYZ file format for molecular structures.
- x coordinate
- The X coordinate, in Angstroms, for an atom in a molecule as per the XYZ file format.
- y coordinate
- The Y coordinate, in Angstroms, for an atom in a molecule as per the XYZ file format.
- z coordinate
- The Y coordinate, in Angstroms, for an atom in a molecule as per the XYZ file format.


dotnet/diagnostics This repository contains the source code for various .NET Core runtime diagnostic tools and documents. - dotnet/diagnostics
Bakedbean.org.uk - Building Stack Overflow Job Search - Parsing Queries Technical blog covering all things .NET and goings on at Stack Overflow
Package Author Identity through Social Proofs Rather than use certificates, social proofs may be a better approach to establishing the identity of a package author
Markdown Monster: A better Markdown Editor for Windows Markdown Monster is an easy to use Markdown Editor and Weblog Publisher for Windows.
microsoft/terminal The new Windows Terminal and the original Windows console host, all in the same place! - microsoft/terminal
Reach a Wider Audience with Multistreaming | Restream Restream is the #1 multistreaming solution. Stream live to YouTube, Twitch, Facebook, and 30+ platforms at once. Get started today.

Introducing GitHub Package Registry Your code. Your packages. One login. Watch the GitHub Package Registry’s surprise launch event with GitHub CEO Nat Friedman and lead developer, Phani Raj. Sign up for the beta here: https://github.co/ytgpr
Full stack web development with ASP.NET Core 3.0 and Blazor - BRK3017 ASP.NET Core 3.0 is loaded with new features for building modern web applications and services. In this session, we'll show you how to use ASP.NET Core 3.0 to build beautiful and interactive client-side web UI with Blazor backed by high-performance gRPC m...
Bakedbean.org.uk - Building Stack Overflow Job Search Technical blog covering all things .NET and goings on at Stack Overflow
Chapter 9: The Philologists and the Gatekeeper – The Analog Antiquarian When Jean-François Champollion died at the age of just 41, the nascent discipline of Egyptology lost much. The one man who had understood ancient Egyptian writing better than any other was gone before he had had the chance to put much of his knowledge dow...
Amazon.com: .NET Internals Cookbook eBook: Adam Furmanek: Kindle Store Buy .NET Internals Cookbook: Read 1 Kindle Store Reviews - Amazon.com
Top 10 coffee brands according to Have I Been Pwned Top 10 coffee brands based on how much their names are used as passwords. Look, not every password research has to be meaningful.
C++ with Visual Studio 2019 and Windows Subsystem for Linux (WSL) | C++ Team Blog In Visual Studio 2019 version 16.1 Preview 3 we have added native support for using C++ with the Windows Subsystem for Linux (WSL). WSL lets you run a lightweight Linux environment directly on Windows, including most command-line tools, utilities, and app...
Three easy endpoints tapir is a library for describing HTTP endpoints. It combines Scala’s typesafety, with the declarative style and introspection…
Three easy endpoints tapir is a library for describing HTTP endpoints. It combines Scala’s typesafety, with the declarative style and introspection…
Monitor Blazor WASM loading and report errors Monitor Blazor WASM loading and report errors. GitHub Gist: instantly share code, notes, and snippets.
Handling Access Tokens for private APIs in ASP.NET Core This article shows how to persist access tokens for a trusted ASP.NET Core application which needs to access secure APIs. These tokens which are persisted are not meant for public clients, but are …
Visual Studio 2019 for Mac version 8.1 Preview 1 | Visual Studio Blog Today, we are proud to announce the next major update for Visual Studio for Mac: Visual Studio 2019 for Mac version 8.1 Preview. In this update, we are offering our new C# editor as the default experience in addition to introducing support for .NET Core 3...
Add .vsconfig for required components to build by huoyaoyuan · Pull Request #566 · microsoft/terminal I've edited it based on what I've seen: Blend and managed UWP are removed ARM32 workloads are removed, because the solution has only ARM64 Keep the explicit vs141 and windows 18362 tools, ...
ZkVM: a new design for fast, confidential smart contracts Exploring the new blockchain architecture for confidential smart contracts


Your browser does not support the HTML5 canvas tag.
Quarter Past
Quarter To
Half Past
1
2
3
4
5
6
7
8
9
10
11
12
Set
Reset


Convert from RGB
Hue will be UNDEFINED if saturation is 0 (Achromatic colors). In other words, if R = G = B, Hue will be UNDEFINED and Saturation will equal 0. i.e HSV = HSL = HSB.
Convert from HEX
Hue will be UNDEFINED if saturation is 0 (Achromatic colors). In other words, if R = G = B, Hue will be UNDEFINED and Saturation will equal 0. i.e HSV = HSL = HSB.
Convert from CMYK
Hue will be UNDEFINED if saturation is 0 (Achromatic colors). In other words, if R = G = B, Hue will be UNDEFINED and Saturation will equal 0. i.e HSV = HSL = HSB.
Just like language translation, color conversion is not always a straight-forward one-to-one mapping. Specifically, RGB has less degrees of freedom (3) than CMYK (4). Therefore, although one can convert any RGB to CMYK without losing information, the inverse is not the case. When a CMYK color is converted to RGB, some information is lost. When you convert that RGB color back to CMYK, you will in most cases get a different (but similar) color.
Convert from HSL
Hue will be UNDEFINED if saturation is 0 (Achromatic colors). In other words, if R = G = B, Hue will be UNDEFINED and Saturation will equal 0. i.e HSV = HSL = HSB.
Convert from HSV
Hue will be UNDEFINED if saturation is 0 (Achromatic colors). In other words, if R = G = B, Hue will be UNDEFINED and Saturation will equal 0. i.e HSV = HSL = HSB.


GFA working on getting pitch invader Awal Suleman released- Kurt Okraku
President of the Ghana Football Association Kurt Okraku has revealed that the FA is working on getting pitch invader Awal Suleman released.
Awal Suleman has been detained by the Cape Coast Police following his invasion of the pitch in Ghana's AFCON qualifier against South Africa.
The 25-year old former 400m runner was arrested by Police after he run onto the pitch in the 84th minute if Ghana's 2-0 win against the Bafana Bafana.
His detention has divided opinions in the public with a social media trend asking for the release Awal.
According to the FA President, Kurt Okraku, the Central Region FA chairman Robert Otieku Duncan and some members of the Association are working with the police to seek for the release of the fan.
This comes after captain of the Black Stars, Andre Ayew added his voice to the young man's plight, pleading for his release.
Awal Suleman, however is being arraigned for court, according to reports.


Alabaster: a Sphinx theme¶
What is Alabaster?¶
Alabaster is a visually (c)lean, responsive, configurable theme for the Sphinx documentation system. It is Python 2+3 compatible.
It began as a third-party theme, and is still maintained separately, but as of Sphinx 1.3, Alabaster is an install-time dependency of Sphinx and is selected as the default theme.
Live examples of this theme can be seen on paramiko.org, fabfile.org and pyinvoke.org.
A changelog can be found at the bottom of this page.
Features¶
Specifically, as compared to Kenneth’s theme:
- Easy ability to install/use as a Python package (tip o’ the hat to Dave & Eric’s sphinx_rtd_theme for showing the way);
- Style tweaks, such as better code-block alignment, Github button placement, page source link moved to footer, improved (optional) related-items sidebar item, etc;
- Many customization hooks, including toggle of various sidebar & footer components; header/link/etc color control; etc;
- Improved documentation for all customizations (pre-existing & new).
Installation¶
The bare minimum required to install is as follows:
pip install alabaster
(or equivalent).Enable the ‘alabaster’ theme, mini-extension, and sidebar templates in your
conf.py
:import alabaster html_theme_path = [alabaster.get_path()] extensions = ['alabaster'] html_theme = 'alabaster' html_sidebars = { '**': [ 'about.html', 'navigation.html', 'relations.html', 'searchbox.html', 'donate.html', ] }
That’s it! You now have the standard Alabaster theme set up. Read on for more configuration options/concerns.
Theme location¶
The function alabaster.get_path
dynamically returns Alabaster’s install
location, ensuring that Sphinx can find and load it regardless of where/how
you installed Alabaster. Using it is highly recommended.
If you’ve manually installed Alabaster and/or are doing funky things to your
PYTHONPATH, you may need to replace the alabaster.get_path()
call with your
own explicit string, as per the Sphinx config docs.
Sidebars¶
Feel free to adjust html_sidebars
as desired - the theme is designed
assuming you’ll always have about.html
activated, but otherwise it doesn’t
care much.
- See the Sphinx docs for details on how this setting behaves.
- Alabaster provides
about.html
(logo, github button + blurb),donate.html
(Gratipay blurb/button) andnavigation.html
(a more flexible version of the builtinlocaltoc
/globaltoc
templates).searchbox.html
comes with Sphinx itself.
Images¶
If you’re using either of the image-related options outlined below (logo
or
touch-icon
), you’ll also want to tell Sphinx where to get your images from.
If so, add a line like this (changing the path if necessary; see the Sphinx
docs for ‘html_static_path’):
html_static_path = ['_static']
Theme options¶
Alabaster’s primary configuration route is the html_theme_options
variable,
set in conf.py
alongside the rest. A brief example (note: snippet doesn’t
include all possible options, see following list!):
html_theme_options = {
'logo': 'logo.png',
'github_user': 'bitprophet',
'github_repo': 'alabaster',
}
Variables and feature toggles¶
logo
: Relative path (from$PROJECT/_static/
) to a logo image, which will appear in the upper left corner above the name of the project.- If
logo
is not set, yourproject
name setting (from the top level Sphinx config) will be used in a text header instead. This preserves a link back to your homepage from inner doc pages.
- If
logo_name
: Set totrue
to insert your site’sproject
name under the logo image as text. Useful if your logo doesn’t include the project name itself. Defaults tofalse
.logo_text_align
: Which CSStext-align
value to use for logo text (if there is any.)body_text_align
: Which CSStext-align
value to use for body text (if there is any.)description
: Text blurb about your project, to appear under the logo.description_font_style
: Which CSSfont-style
to use for description text. Defaults tonormal
.github_user
,github_repo
: Used bygithub_button
andgithub_banner
(see below); does nothing if both of those are set tofalse
.github_button
:true
orfalse
(default:true
) - whether to link to your Github.If
true
, requires that you setgithub_user
andgithub_repo
.See also these other related options, which behave as described in Github Buttons’ README:
github_type
: Defaults towatch
.github_count
: Defaults totrue
.
github_banner
:true
orfalse
(default:false
) - whether to apply a ‘Fork me on Github’ banner in the top right corner of the page.- If
true
, requires that you setgithub_user
andgithub_repo
. - May also submit a string file path (as with
logo
, relative to$PROJECT/_static/
) to be used as the banner image instead of the default.
- If
travis_button
:true
,false
or a Github-style"account/repo"
string - used to display a Travis-CI build status button in the sidebar. Iftrue
, uses yourgithub_(user|repo)
settings; defaults tofalse.
codecov_button
:true
,false
or a Github-style"account/repo"
string - used to display a Codecov build status button in the sidebar. Iftrue
, uses yourgithub_(user|repo)
settings; defaults tofalse.
gratipay_user
: Set to your Gratipay username if you want a Gratipay ‘Donate’ section in your sidebar.- This used to be
gittip_user
before that service changed its name to Gratipay; we’ve left the old setting in place as an alias for backwards compatibility reasons. It may be removed in the future. - If both options are given,
gratipay_user
wins.
- This used to be
analytics_id
: Set to your Google Analytics ID (e.g.UA-#######-##
) to enable tracking.touch_icon
: Path to an image (as withlogo
, relative to$PROJECT/_static/
) to be used for an iOS application icon, for when pages are saved to an iOS device’s home screen via Safari.extra_nav_links
: Dictionary mapping link names to link targets; these will be added in a UL below the main sidebar navigation (provided you’ve enablednavigation.html
.) Useful for static links outside your Sphinx doctree.sidebar_includehidden
: Boolean determining whether the TOC sidebar should include hidden Sphinx toctree elements. Defaults totrue
so you can use:hidden:
in your index page’s root toctree & avoid having 2x copies of your navigation on your landing page.show_powered_by
: Boolean controlling display of thePowered by Sphinx N.N.N. & Alabaster M.M.M
section of the footer. Whentrue
, is displayed next to the copyright information; whenfalse
, is hidden.show_related
: Boolean controlling whether the ‘next/previous/related’ secondary navigation elements are hidden or displayed. Defaults tofalse
since on many sites these elements are superfluous.page_width
: CSS width specifier controlling default content/page width. Defaults to940px
.sidebar_width
: CSS width specifier controlling default sidebar width. Defaults to220px
.
Style colors¶
These should be fully qualified CSS color specifiers such as #004B6B
or
#444
. The first few items in the list are “global” colors used as defaults
for many of the others; update these to make sweeping changes to the
colorscheme. The more granular settings can be used to override as needed.
gray_1
: Dark gray.gray_2
: Light gray.gray_3
: Medium gray.pink_1
: Light pink.pink_2
: Medium pink.body_text
: Main content text.footer_text
: Footer text (includes links.)link
: Non-hovered body links.link_hover
: Body links, hovered.sidebar_header
: Sidebar headers. Defaults togray_1
.sidebar_text
: Sidebar paragraph text.sidebar_link
: Sidebar links (there is no hover variant.) Applies to both header & text links. Defaults togray_1
.sidebar_link_underscore
: Sidebar links’ underline (technically a bottom-border).sidebar_search_button
: Background color of the search field’s ‘Go’ button.sidebar_list
: Foreground color of sidebar list bullets & unlinked text.sidebar_hr
: Color of sidebar horizontal rule dividers. Defaults togray_3
.anchor
: Foreground color of section anchor links (the ‘paragraph’ symbol that shows up when you mouseover page section headers.)anchor_hover_fg
: Foreground color of section anchor links (as above) when moused over. Defaults togray_1
.anchor_hover_bg
: Background color of above.note_bg
: Background of.. note::
blocks. Defaults togray_2
.note_border
: Border of same.seealso_bg
: Background of.. seealso::
blocks. Defaults togray_2
.seealso_border
: Border of same.warn_bg
: Background of.. warn::
blocks. Defaults topink_1
.warn_border
: Border of same. Defaults topink_2
.footnote_bg
: Background of footnote blocks.footnote_border
: Border of same. Defaults togray_2
.pre_bg
: Background of preformatted text blocks (including code snippets.) Defaults togray_2
.narrow_sidebar_bg
: Background of ‘sidebar’ when narrow window forces it to the bottom of the page.narrow_sidebar_fg
: Text color of same.narrow_sidebar_link
: Link color of same. Defaults togray_3
.code_highlight
: Color of highlight when using:emphasize-lines:
in a code block.
Fonts¶
font_family
: Font family of body text. Defaults to'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif
.head_font_family
: Font family of headings. Defaults to'Garamond', 'Georgia', serif
.code_font_size
: Font size of code block text. Defaults to0.9em
.code_font_family
: Font family of code block text. Defaults to'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace
.
Project background¶
Alabaster is a modified (with permission) version of Kenneth Reitz’s “Kr” Sphinx theme (no official repo, but it’s the one used in his Requests project). Kenneth’s theme was itself originally based on Armin Ronacher’s Flask theme. Many thanks to both for their hard work.
Implementation notes¶
- Fabric #419 contains a lot of general exposition & thoughts as I developed Alabaster, specifically with a mind towards using it on two nearly identical ‘sister’ sites (single-version www ‘info’ site & versioned API docs site).
- Alabaster includes/requires a tiny Sphinx extension on top of the theme itself; this is just so we can inject dynamic metadata (like Alabaster’s own version number) into template contexts. It doesn’t add any additional directives or the like, at least not yet.
Changelog¶
0.1.0 (2013-12-31)¶
- First tagged/PyPI’d version.
0.2.0 (2014-01-28)¶
- Allow control of logo replacement text’s alignment.
- Add customized navigation sidebar element.
- Tweak page margins a bit.
- Add a 3rd level of medium-gray to the stylesheet & apply in a few places.
0.3.0 (2014-02-03)¶
- Display Alabaster version in footers alongside Sphinx version. (This necessitates using a mini Sphinx extension).
- Other footer tweaks.
0.3.1 (2014-03-13)¶
- Improved Python 3 compatibility.
- Update styling of changelog pages generated by bitprophet/releases.
0.4.0 (2014-04-06)¶
- Add an option to allow un-hiding one’s toctree.
0.4.1 (2014-04-06)¶
- Fix an inaccuracy in the descriptin of
logo_text_align
. - Update logo & text styling to be more sensible.
0.5.0 (2014-04-09)¶
- Add support for sidebar Travis status buttons.
0.5.1 (2014-04-15)¶
- Fix a bug in the new Travis support, re: its default value.
0.6.0 (2014-04-17)¶
- Allow hiding the ‘powered by’ section of the footer.
- Fix outdated name in
setup.py
URL field.
0.6.1 (2014-09-04)¶
- Update Gittip support to acknowledge the service’s rename to Gratipay.
0.6.2 (2014-11-25)¶
- Make
.. warn::
blocks have a pink background (instead of having no background, which was apparently an oversight of the themes Alabaster is based on) and also make that color configurable.
0.7.1 (2015-02-27)¶
Note
There is no 0.7.0, there was some PyPI fun and replacing sdists isn’t permitted :)
- Finally add a changelog. To the README, for now, because a full doc site isn’t worthwhile just yet.
- Allow configuring a custom Github banner image (instead of simply toggling a default on or off). Thanks to Nicola Iarocci for the original patch.
- Explicitly note Python version support in the README and
setup.py
. - Update Github button image link to use the newly-available HTTPS version of the URL; this helps prevent errors on doc pages served via HTTPS. Thanks to Gustavo Narea for the report.
- Add control over the font size & family of code blocks. Credit to Steven Loria.
- Allow control over font family of body text and headings. Thanks to Georg Brandl.
- Stylize
.. seealso::
blocks same as.. note::
blocks for consistency’s sake (previously,.. seealso::
used the Sphinx default styling, which clashed). We may update these again later but for now, this is an improvement! Thanks again to Steven Loria. - Allow control over CSS
font-style
for the site description/tagline element. Credit: Steven Loria. - Add styling to disable default cell borders on
.. bibliography::
directives’ output. Thanks to Philippe Dessus for the report.
0.7.2 (2015-03-10)¶
- Updated CSS stylesheets to apply monospace styling to both
tt
andcode
elements, instead of just tott
. This addresses a change in HTML generation in Sphinx 1.3 while retaining support for Sphinx 1.2. Thanks to Eric Holscher for the heads up.
0.7.3 (2015-03-20)¶
- Hide
shadow
related styles on bibliography elements, in addition to the earlier change re:border
. Thanks again to Philippe Dessus.
0.7.4 (2015-05-03)¶
- Add
code_highlight
option (which includes general fixes to styling of code blocks containing highlighted lines). Thanks to Steven Loria.
0.7.5 (2015-06-15)¶
Honor Sphinx’s core
html_show_copyright
option when rendering page footer. Thanks to Marcin Wojdyr for the report.Pre-history versions of Alabaster attempted to remove the “related” sub-navigation (typically found as next/previous links in other themes) but this didn’t work right for mobile-oriented styling.
This has been fixed by (re-)adding an improved sidebar nav element for these links and making its display controllable via the new
show_related
theme option (which defaults tofalse
for backwards compatibility).NOTE: to enable the related-links nav, you’ll need to set
show_related
totrue
and addrelations.html
to yourhtml_sidebars
(we’ve updated the example config in this README to indicate this for new installs).Thanks to Tomi Pieviläinen for the bug report.
Update the “Fork me on Github” banner image to use an
https://
URI so sites hosted over HTTPS don’t encounter mixed-content errors. Thanks to@nikolas
for the patch.Remove an orphaned
</li>
from the footer ‘show source’ section. Credit to Marcin Wojdyr.
0.7.6 (2015-06-22)¶
- Update how
setup.py
handles theREADME.rst
file - load it explicitly as UTF-8 so the changelog containing non-ASCII characters doesn’t generateUnicodeDecodeError
in terminal environments whose default encoding is not UTF-8 or other Unicode-compatible encodings. Thanks to Arun Persaud for the report and Max Tepkeev for the suggested fix. - Fix left-margin & padding styling for code blocks within list-item elements, making them consistent with earlier changes applied to top-level code blocks.
- Expose page & sidebar widths as theme options
page_width
andsidebar_width
. Their defaults are the same as the previously static values.
0.7.7 (2015-12-21)¶
- Add some
margin-bottom
totable.field-list p
so field lists (e.g. Python function parameter lists in docstrings) written as multiple paragraphs, look like actual paragraphs instead of all globbing together. - Fix incorrect notes in README re: renamed
github_button_*
options - thebutton_
was dropped but docs did not reflect this. Thanks to Nik Nyby. - Fix
sidebar_hr
setting - stylesheet wasn’t correctly referencing the right variable name. Thanks to Jannis Leidel. - Allow configuring body text-align via
body_text_align
. Credit to Marçal Solà. - Fix a handful of mismatched/unclosed HTML tags in the templates. Thanks to Marvin Pinto for catch & patch.
- Add Codecov badge support to sidebar.


{% extends "maintenance.html" %} {% block page_title %}Integration in production...{% endblock page_title %} {% block maintenance-content %}
The Weekly Integration process has been started. Requests candidates to enter production are being merged on Monitoring production systems.
Please be patient, this operation takes 15 minutes to complete.
{% endblock maintenance-content %}


The MovieDB
Enter Your Movie Name
Search
Create a Collection
Show All Collections
CREATE COLLECTION
MY COLLECTIONS
clear
clear
Name of The Collection
ADD
clear


ASP Bundles
ASP.Net, MSDN
Bundling and minification can reduce the number of http connections (the normal simultaneous limit is 6) and the KBs downloaded (still a problem on mobile, of course). Internally it creates a BundleModule and watches for bundle requests. It includes automatic caching (1 year) with a v querystring based on a hash of the contents.
You can also use it with webforms. Webforms allows bundles to be configured in a bundle.config xml file.
It doesn't really fit with require.js/AMD, which has it's own optimizer (usually Node).
Nuget
Package is Microsoft.AspNet.Web.Optimization, dll is System.Web.Optimization.
It depends on Microsoft.Web.Infrastructure and WebGrease (WebGrease depends on Antlr)
Creating bundles
In application start (Global.asax):
protected void Application_Start()
{
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
In App_Start add a BundleConfig.cs:
//add specific files
bundles.Add(
new ScriptBundle("~/bundles/jquery")
.Include("~/Scripts/jquery-{version}.js" //can be a params list of files
));
//or entire directory
bundles.Add(new ScriptBundle("~/bundles/scripts")
.IncludeDirectory("~/Scripts","*.js"));
IncludeDirectory is dangerous. Css files may be import each other, and files are added in alphabetic order. Adding individual files is more explicit and safe.
//if css includes relative paths, fix them up
bundles.Add(new StyleBundle("~/bundle/sitecss")
.Include("~/Content/nested/site.css", new CssRewriteUrlTransform()));
Pattern rules and advanced use
- There is one * wildcard per string, as a prefix or suffix ("*.js", not "a*.js").
- Wildcards are added in alphabetic order! See ordering below.
- {version} is a special token and matches numeric patterns. So jquery-{version}.js doesn't match jquery-ui-*
- If two files differ by suffixes like *-min.js, then the non-min version is in debug and the min version is in release/optimized (the patterns are in BundleCollection.FileExtensionReplacementList)
//when in debug, use the log form. In release/optimized use the non-log form.
bundles.FileExtensionReplacementList.Add("log", OptimizationMode.WhenDisabled);
Ordering is controlled by the BundleCollection.FileSetOrderList
//mu.js will be moved to the front of the list
var ordering = new BundleFileSetOrdering("mu");
ordering.Files.Add("mu.js");
BundleTable.Bundles.FileSetOrderList.Insert(0, ordering);
//the default orderlist has jquery first (and moo, prototype, ext)
//for css reset.css then normalize.css are first
You can ignore files. There is an empty BundleCollection.IgnoreList and, for use with IncludeDirectory only, a BundleCollection.DirectoryFilter which deals with *-min.js etc. NB: FileExtensionReplacementList does the standard min/debug switching.
//ignore unit test files
BundleTable.Bundles.IgnoreList.Ignore("*test.js");
//IncludeDirectory - ignore logging only in release, but include it in DEBUG
BundleTable.Bundles.DirectoryFilter.Ignore("*logging.js", OptimizationMode.WhenEnabled);
//default ignores in debug and release: *.intellisense, *.vsdoc
//default ignores when debug or optimized: *.min, *.map, *.debug
Configuration
In debug mode (system.web/compilation[@debug=true] ) it is OFF. The files in a bundle are sent individually, un-minimized.
Override it with BundleTable.EnableOptimizations = true.
Razor views
Use @Scripts.Render or @Styles.Render, or @Scripts.Url
@Styles.Render("~/bundles/css")
@Scripts.Render("~/bundles/scripts")
CDNs
For public websites, you'll probably want a jquery CDN:
BundleTable.EnableOptimizations = true; //rqd for cdn
bundles.UseCdn = true; //must set this!!!
var bundle = new ScriptBundle("~/bundles/jquery",
"http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js")
//this is the debug file (not the backup!)
.Include("~/Scripts/jquery-{version}.js");
//is this global variable truthy?
bundle.CdnFallbackExpression = "window.jQuery";
bundles.Add(bundle);
In the html, the Scripts.Render adds this:
<script>(window.jQuery)||document.write('<script src="/bundles/jquery"><\/script>');</script>
Transformers
There are 3rd party nuget packages for Less, Sass and CoffeeScript (eg BundleTransformers.*). Alternatively just use the Visual Studio Web Essentials extension.
You could use bundles to output server localized resources to javascript. IBundleTransform and implement Process (BundleResponse.Content is the concatenated file content). If you create a new Bundle (instead of ScriptBundle), a ctor overload allows you to add transforms, so you can add JsMinify() Transform (i.e. minimization) as well as a custom transform.


Find interesting events to learn from, get entertained, or connect with like-minded people.
Events near you
Thu, Sep 10, 2020 8:00 PM EET
Be Kind Movement Gala Event
Be Kind Movement is delighted to host its third webinar this year and we have an amazing program lined up for you this September!
View eventSat, Oct 3, 2020 4:00 PM EET
The Andrae Concert 2020
Join us for this sensational online concert, featuring the sounds of the Greater Love Gospel Choir and more.
View eventMon, Oct 19, 2020 12:00 PM EET
Poetry Workshop
Join us for this sensational online concert, featuring the sounds of the Greater Love Gospel Choir and more.
View eventFri, Sep 18, 2020 9:00 PM EET
Lantern Virtual Run
Join us for this sensational online concert, featuring the sounds of the Greater Love Gospel Choir and more.
View eventInternational events
We help you look up events globally. Whether you're a traveller looking for things to try out in a new city, we got you covered.
Local events
Do you want to expand your network in your town? We help you find events that suit your taste.
Secure an invitation
Do you like an event? We help you secure your invitation ahead of time.


If you are using dub
add following dependency to your dub.json
or dub.sdl
file.
Latest version (2.0
)
NOTE: This version is backwards API compatible, if you have any compatibility issues, please report them.
New version which features new parser, supports multiline strings and more. Although it is backwards compatible, some smaller issues may occur as it is not completly stable yet.
Stable version (1.1
)
If you don’t need features of latest version or prefer more stable solution.
NOTE: This documentation is targeted for version
2.0
. Some of the documented featured may not be available.


Android-x86 is an open source project maintained by volunteers. To improve the project, we are going to collect some anonymous data from the users.
In the first launch, these data will be collected
• some hardware information
• apps usage
The data will be sent via Google Analytics Services SDK(Software Development Kit) to Google Analytics (GA) server. On the first booting, the users will be prompted to confirm the data collection as shown in the screenshot:
Please say yes (keep the checkboxes checked) to these questions.
If you'd like to stop sending the data later, set these properties by the commands (using root):
The core developers will be granted the permission to read the data. Suggestions to improve the Analytics program are welcome.
The analytics code has been checked in the marshmallow-x86 branch and included in the 6.0-rc2 release.
Most of the analytics code is contributed by Jide Technology Ltd and licensed under Apache License, Version 2.0.


Gentlemen from all corners of Bristol and further a field flock to our unique men’s salon for the pampering and high level of care they know they will receive. Customers are confident that they can count on our discretion and a professional service. They know they will leave our salon feeling and looking their best. We aim to be your home from home, where you always feel special and welcome within our relaxed, unhurried surroundings, all designed to ensure your total relaxation.
Gents, come get a proper cut here. Special prices for aspiring young gents any day of the week and for OAP Gents Monday to Thursday.
The timeless crew cut, going strong since the 18th century. You cannot go wrong with one of our mint crew cuts.
A gents beard is a living sculpture, so get it worked and tamed by the Berninis of Bristol.
We have steady hands and razors for days. Be a dapper gent and show off a certified fade.
Wax your moustache or get a lush new mane. We style and restyle.
We are more than a barbershop, so don't sit on your hands waiting for your turn. Our pool table really ties the room together.


The original post was from Blitz Coder ( http://www.cplusplus.com/member/Blitz_Coder/ ) at http://www.cplusplus.com/forum/beginner/12969/
He asked me to reformat it so here it is
_________________________________________________________________________________
From an old email my friend sent me when I started learning to code
Suggested Study Order:
• variables, data types, and numerical operators
• basic input/output
• logic ( if statements, switch statements )
• loops ( for, while, do-while )
• arrays
• pseudo random number generation
• strings & string functions
• functions
• structures/classes
• enumerated data
• file input/output
• pointers
• sorting
• linked lists
• advanced classes
• recursion
_________________________________________________________________________________
Grading Program
Requires:
variables, data types, and numerical operators
basic input/output
logic (if statements, switch statements)
Write a program that allows the user to enter the grade scored in a programming class (0-100).
If the user scored a 100 then notify the user that they got a perfect score.
★ Modify the program so that if the user scored a 90-100 it informs the user that they scored an A
★★ Modify the program so that it will notify the user of their letter grade
0-59 F 60-69 D 70-79 C 80-89 B 90-100 A
_________________________________________________________________________________
Cola Machine
Requires:
variables, data types, and numerical operators
basic input/output
logic (if statements, switch statements)
Write a program that presents the user w/ a choice of your 5 favorite beverages (Coke, Water, Sprite, ... , Whatever).
Then allow the user to choose a beverage by entering a number 1-5.
Output which beverage they chose.
★ If you program uses if statements instead of a switch statement, modify it to use a switch statement.
If instead your program uses a switch statement, modify it to use if/else-if statements.
★★ Modify the program so that if the user enters a choice other than 1-5 then it will output "Error. choice was not valid, here is your money back."
_________________________________________________________________________________
While( user == gullible )
Requires:
variables, data types, and numerical operators
basic input/output
logic (if statements, switch statements)
loops (for, while, do-while)
Write a program that ccontinues to asks the user to enter any number other than 5 until the user enters the number 5.
Then tell the user "Hey! you weren't supposed to enter 5!" and exit the program.
★ Modify the program so that after 10 iterations if the user still hasn't entered 5 will tell the user "Wow, you're more patient then I am, you win." and exit.
★★ Modify the program so that it asks the user to enter any number other than the number equal to the number of times they've been asked to enter a number. (i.e on the first iteration "Please enter any number other than 0" and on the second iteration "Please enter any number other than 1"m etc. etc. The program must behave accordingly exiting when the user enters the number they were asked not to.)
_________________________________________________________________________________
Pancake Glutton
Requires:
variables, data types, and numerical operators
basic input/output
logic (if statements, switch statements)
loops (for, while, do-while)
arrays
Write a program that asks the user to enter the number of pancakes eaten for breakfast by 10 different people (Person 1, Person 2, ..., Person 10)
Once the data has been entered the program must analyze the data and output which person ate the most pancakes for breakfast.
★ Modify the program so that it also outputs which person ate the least number of pancakes for breakfast.
★★★★ Modify the program so that it outputs a list in order of number of pancakes eaten of all 10 people.
i.e.
Person 4: ate 10 pancakes
Person 3: ate 7 pancakes
Person 8: ate 4 pancakes
...
Person 5: ate 0 pancakes
_________________________________________________________________________________
Bracketing Search
Requires:
variables, data types, and numerical operators
basic input/output
logic (if statements, switch statements)
loops (for, while, do-while)
psudo random numbers
Write a program that calculates a random number 1 through 100. The program then asks the user to guess the number.
If the user guesses too high or too low then the program should output "too high" or "too low" accordingly.
The program must let the user continue to guess until the user correctly guesses the number.
★ Modify the program to output how many guesses it took the user to correctly guess the right number.
★★ Modify the program so that instead of the user guessing a number the computer came up with, the computer guesses the number that the user has secretely decided. The user must tell the computer whether it guesed too high or too low.
★★★★ Modify the program so that no matter what number the user thinks of (1-100) the computer can guess it in 7 or less guesses.
_________________________________________________________________________________
Tic Tac Toe
Requires:
variables, data types, and numerical operators
basic input/output
logic (if statements, switch statements)
loops (for, while, do-while)
arrays
Make a two player tic tac toe game.
★ Modify the program so that it will announce when a player has won the game (and which player won, x or o)
★★ Modify the program so that it is a one player game against the computer (with the computer making its moves randomly)
★★★★ Modify the program so that anytime the player is about to win (aka, they have 2 of 3 x's in a row, the computer will block w/ an o)
_________________________________________________________________________________
Dungeon Crawl
Requires:
variables, data types, and numerical operators
basic input/output
logic (if statements, switch statements)
loops (for, while, do-while)
arrays
Make a program that outputs a simple grid based gameboard to the screen using either numbers or characters.
i.e.
. . . . . . . . . .
.     X
or
0 0 0 0 0 0 0 0 0 0
0 5 0 0 6 0 0 0 0 0
0 0 0 0 0 0 7 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 7 0 0 0 0 0 0
0 0 0 0 0 0 7 0 0 0
0 0 0 0 0 0 0 0 0 4
Allow the user (marked by G in the example) to move either up, down, left, or right each turn. If the player steps on a trap then they lose. If the make it to the treasure 'X' then they win.
★★ Add enemies that move randomly in any direction once per turn. (enemies just like traps cause the player to lose if touched)
HINT: Don't let the player move off the gameboard! You program will crash if they move off the top or bottom of the board!
(the same holds true for enemies)
_________________________________________________________________________________
Fun with Functions
Requires:
variables, data types, and numerical operators
basic input/output
logic (if statements, switch statements)
loops (for, while, do-while)
functions
Write a function titled say_hello() that outputs to the screen "Hello"
★ Modify the function so that it takes an integer argument and says hello a number of times equal to the value passed to it.
★★ Make another function that takes two integers arguments and then returns an integer that is the product of the two integers.
(i.e., integer1: 4, Integer2: 5 returns: 20)
★★★ Make a function called half() that takes an integer argument. The function must print the number it received to the screen, then the program should divide that number by two to make a new number. If the new number is greater than zero the function then calls the function half() passing it the new number as its argument. If the number is zero or less than the function exits
Call the function half() with an argument of 100, the screen output should be
100
50
25
...
...
1.
_________________________________________________________________________________
Strings are your friends, until they betray you.
Requires:
variables, data types, and numerical operators
basic input/output
logic (if statements, switch statements)
loops (for, while, do-while)
functions
strings & string functions
Write a program that asks for a user first name and last name separately.
The program must then store the users full name inside a single string and out put it to the string.
i.e.
Input:
John
Smith
Output:
John Smith
★ Modify the program so that it then replaces every a, e, i , o, u w/ the letter z.
i.e.
John Smith -> Jzhn Smzth
★★ Modify the Program so that it reverses the users name
i.e.
John Smith -> htimS nhoJ
_________________________________________________________________________________
Graduation:
Requires:
variables, data types, and numerical operators
basic input/output
logic (if statements, switch statements)
loops (for, while, do-while)
arrays
pseudo random number generation
strings & string functions
functions
structures/classes
enumerated data
file input/output
pointers
sorting
linked lists
advanced classes
Write a program that creates a linked list of bunny objects.
Each bunny object must have
Sex: Male, Female (random at creation 50/50)
color: white, brown, black, spotted
age : 0-10 (years old)
Name : randomly chosen at creation from a list of bunny names.
radioactive_mutant_vampire_bunny: true/false (decided at time of bunny creation 2% chance of true)
At program initialization 5 bunnies must be created and given random colors.
Each turn afterwards the bunnies age 1 year.
So long as there is at least one male age 2 or older, for each female bunny in the list age 2 or older;
a new bunny is created each turn. (i.e. if there was 1 adult male and 3 adult female bunnies, three new bunnies would be born each turn)
New bunnies born should be the same color as their mother.
If a bunny becomes older than 10 years old, it dies.
If a radioactive mutant vampire bunny is born then each turn it will change exactly one non radioactive bunny into a radioactive vampire bunny.
(if there are two radioactive mutant vampire bunnies two bunnies will be changed each turn and so on...)
Radioactive vampire bunnies are excluded from regular breeding and do not count as adult bunnies.
Radioactive vampire bunnies do not die until they reach age 50.
The program should print a list of all the bunnies in the colony each turn along w/ all the bunnies details, sorted by age.
The program should also output each turns events such as
"Bunny Thumper was born!
Bunny Fufu was born!
Radioactive Mutant Vampire Bunny Darth Maul was born!
Bunny Julius Caesar died!
The program should write all screen output to a file.
When all the bunnies have died the program terminates.
If the bunny population exceeds 1000 a food shortage must occur killing exactly half of the bunnies (randomly chosen)
★ Modify the program to run in real time, with each turn lasting 2 seconds, and a one second pause between each announement.
★★ Allow the user to hit the 'k' key to initiate a mass rabit cull! which causes half of all the rabits to be killed (randomly chosen).
★★★★ Modify the program to place the rabits in an 80x80 grid. Have the rabits move one space each turn randomly.
Mark juvenile males with m, adult males w/ M,
juvenile females w/ f, adult femails w/ F
radioactive mutant vampire bunnies with X
Modify the program so that radioactive mutant vampire bunnies only convert bunnies that end a turn on an adjacent square.
Modify the program so that new babies are born in an empty random adjacent square next to the mother bunny. (if no empty square exits then the baby bunny isn't born)
★★★★★ Modify the program so that it saves each turn to a file and can play back at accelearted speed all subsequent turns.


Mapping Source
This structure represents the following mapping definition:
obf.HealthcareService maps to HealthcareService: Identifier maps to identifier Active maps to active Organization maps to providedBy Category maps to category Type maps to type SpecialtiesHandled maps to specialty Location maps to location Name maps to name CommentOrDescription maps to comment ExtraDetails maps to extraDetails PhotographicImage maps to photo ContactPoint maps to telecom CoverageArea maps to coverageArea ServiceProvisionCode maps to serviceProvisionCode Eligibility maps to eligibility Program maps to program Characteristic maps to characteristic Language maps to communication ReferralMethod maps to referralMethod AppointmentRequired maps to appointmentRequired AvailableTime maps to availableTime NotAvailable maps to notAvailable AvailabilityExceptions maps to availabilityExceptions Endpoint maps to endpoint


archives
home
index
prev
H
prev H
thread-prev
K
thread prev K
thread-next
J
thread next J
next
L
next L
From:
Subject:
Date:
(
/
)


Project Zero Requirements
Harvard CS50's Web Programming with Python and JavaScript
- ✔Your website must contain at least four different .html pages, and it should be possible to get from any page on your website to any other page by following one or more hyperlinks.
- ✔Your website must include at least one list (ordered or unordered), at least one table, and at least one image.
- ✔Your website must have at least one stylesheet file.
- ✔Your stylesheet(s) must use at least five different CSS properties, and at least five different types of CSS selectors. You must use the #id selector at least once, and the .class selector at least once.
- ✔Your stylesheet(s) must include at least one mobile-responsive @media query, such that something about the styling changes for smaller screens.
- ✔You must use Bootstrap 4 on your website, taking advantage of at least one Bootstrap component, and using at least two Bootstrap columns for layout purposes using Bootstrap’s grid model.
- ✔Your stylesheets must use at least one SCSS variable, at least one example of SCSS nesting, and at least one use of SCSS inheritance.
- ✔In README.md, include a short writeup describing your project, what’s contained in each file, and (optionally) any other additional information the staff should know about your project.


This project is a detailed comparison between the common Sentiment Analysis approaches: Rule-Based VADER Sentimentl Analysis Tool, Naive Bayes Classifier, and Deep Learning LSTM. In separate notebooks, I provide the sample codes for running Sentiment Analysis using the Sentiment140 data set.