No project description provided
Project description
%reload_ext tonyfast
from tonyfast import jschema; import pandas, requests
df = jschema.Dict(
(x.name, F"""{x.url.replace(
'https://gist.github.com/tonyfast/', 'https://api.github.com/gists/'
)}""") for x in "".git().submodules).series().apply(jschema.Uri.json).apply(pandas.Series)
df[[x for x in df.columns if x.endswith('_at')]] = df[[x for x in df.columns if x.endswith('_at')]].apply(pandas.to_datetime)
df = df.loc[df.updated_at.sort_values(ascending=False).index]
series.
url https://api.github.com/gists/646e4f4f216286c6a...
forks_url https://api.github.com/gists/646e4f4f216286c6a...
commits_url https://api.github.com/gists/646e4f4f216286c6a...
id 646e4f4f216286c6aa0a17fadba2c505
node_id MDQ6R2lzdDY0NmU0ZjRmMjE2Mjg2YzZhYTBhMTdmYWRiYT...
git_pull_url https://gist.github.com/646e4f4f216286c6aa0a17...
git_push_url https://gist.github.com/646e4f4f216286c6aa0a17...
html_url https://gist.github.com/646e4f4f216286c6aa0a17...
files {'QR.ipynb': {'filename': 'QR.ipynb', 'type': ...
public True
created_at 2019-09-12 02:10:16+00:00
updated_at 2019-09-20 13:15:49+00:00
description
comments 1
user None
comments_url https://api.github.com/gists/646e4f4f216286c6a...
owner {'login': 'tonyfast', 'id': 4236275, 'node_id'...
forks []
history [{'user': {'login': 'tonyfast', 'id': 4236275,...
truncated False
Name: tonyfast/qr, dtype: object
export = nbformat.v4.new_notebook(cells=[])
for path, series in df.iterrows():
export['cells'].append(nbformat.NotebookNode(F"""## {}
* > {series.description}
""".json()['cells'][0]))
for file, row in jschema.List(
series.files.values()
).pipe(pandas.DataFrame).pipe(lambda df: df[df.language=="Jupyter Notebook"]).set_index('filename').iterrows():
export['cells'][-1].source = ''.join(export['cells'][-1].source)
__import__('IPython').display.Markdown(nbconvert.get_exporter('markdown')(exclude_input=True).from_notebook_node(export)[0])
Automatically generate interactive widgets for functions.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tonyfast-2019.9.25.22.40.tar.gz
(78.7 kB
view hashes)
Built Distribution
Close
Hashes for tonyfast-2019.9.25.22.40-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff65ea49e07370df15f7c4f1697f9aec0057b9c190aebd27cd2052e1d1c6317b |
|
MD5 | 403970e1de451644e7595ad583cfc23a |
|
BLAKE2b-256 | f6ce96a90e390404cef9d446f91762d13e9330557b50984791deeed3960cf4bd |