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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for tonyfast-2019.9.25.22.46-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a977eca2cfdbf93a17a3b43e9e98cc44029a27817d8e68ad8f8e5162d27ab30 |
|
MD5 | 106481bd172bf421f8856744b0f4c7b6 |
|
BLAKE2b-256 | 1a9728f09ebbdea22bb62ef75986262f412ffd1141c0444086e7af283ccea686 |