This notebook is part of a poster session at #SPS17. Code snippets affixed to the poster were encoded, computed, and the results shared here. Visit our forum for background.
%matplotlib inline
import matplotlib.pyplot as plt
from sklearn.datasets import make_blobs
X, y = make_blobs(n_samples=2017,centers=99)
plt.scatter(X[:, 0], X[:, 1], c=y, s=50, cmap='rainbow')
br''or.0jif.1else-2
import this
import antigravity
# in Python 3, opens a browser pointing to https://xkcd.com/353/
Not sure what the intent here was?
a=[*'abc']*False
int(False)
# I gather at this point we should be seeing something interesting..
False + True
Data below collected using this script.
self_references_in_docs = {
# https://github.com/bottlepy/bottle
'Bottle': {'refs': 6962, 'size': 54583},
# https://docs.djangoproject.com
'Django': {'refs': 14941, 'size': 136397},
# http://flask.readthedocs.org
'Flask': {'refs': 1306, 'size': 13667},
# https://github.com/Pylons/pyramid
'Pyramid': {'refs': 5207, 'size': 73288},
# https://github.com/scrapy/scrapy
'Scrapy': {'refs': 1760, 'size': 17627},
# https://github.com/tornadoweb/tornado
'Tornado': {'refs': 928, 'size': 6348},
# https://github.com/twisted/twisted
'Twisted': {'refs': 5242, 'size': 75888},
# https://github.com/webpy/webpy
'WebPy': {'refs': 9, 'size': 1164},
}
for t in self_references_in_docs.keys():
o = self_references_in_docs[t]
o['avg'] = o['refs']/o['size']
import numpy as np
X = np.arange(len(self_references_in_docs))
Y = [t['avg'] for t in self_references_in_docs.values()]
plt.bar(X, Y, width=0.5)
plt.xticks(X, self_references_in_docs.keys())
plt.show()
fn main() {
loop {
println!("Rust is awesome!");
}
}
This raises the question of how to add Rust code to Jupyter notebooks, something this project attempts to answer: https://github.com/pwoolcoc/jupyter-rs
For a survey of supported languages see: https://github.com/jupyter/jupyter/wiki/Jupyter-kernels