Skip to content

Instantly share code, notes, and snippets.

View deeplook's full-sized avatar

deeplook

View GitHub Profile
@deeplook
deeplook / gh_cloc.py
Last active October 5, 2023 15:11
Fetch GitHub repo and run cloc on it.
#!/usr/bin/env python
"""
Find the default branch of a GitHub repository online,
download its zipped archive, unpack it in a temporary
directory, and run cloc over it and show the output table.
$ python gh_cloc.py zslayton cron
22 text files.
classified 19 files
@deeplook
deeplook / app.py
Created October 14, 2022 14:30
Try serving geopandas/matplotlib content with Flask.
"""
Try serving geopandas/matplotlib content with Flask.
Run with:
flask --app app run
"""
from flask import Flask, Response
@deeplook
deeplook / aws_translate.py
Created March 8, 2022 10:30
Snippet for using AWS Translate online service.
"""
Snippet for using AWS Translate online service.
See https://aws.amazon.com/translate/ for more information.
"""
import os
import boto3 # pip install boto3
@deeplook
deeplook / fit_bounds.ipynb
Created December 9, 2021 18:28
Testing ipyleaflt map.fit_bounds(), setting zoom level too low
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@deeplook
deeplook / st_svg2pdf_app.py
Created January 17, 2021 10:40
A minimal streamlit app for an svg2pdf converter
"""
Run with:
$ streamlit run st_svg2pdf_app.py
"""
import base64
import os
import subprocess
import tempfile
@deeplook
deeplook / series.ipynb
Last active January 16, 2021 14:02
This is a generator which creates sequences of integers as often presented in so-called *IQ tests* (or CCAT, Criteria Cognitive Aptitude Test) where people are asked to tell the next element after a given sequence of numbers.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@deeplook
deeplook / fetch_springer_ebooks.py
Created April 29, 2020 19:49
Fetch free Springer ebooks.
#!/usr/bin/env python3
"""
Download free Springer ebooks.
Examples:
python fetch_springer_ebooks python
python fetch_springer_ebooks --dest my/ebooks math
python fetch_springer_ebooks
@deeplook
deeplook / covid19_travel_restrictions.ipynb
Created April 19, 2020 18:34
COVID-19 travel restictions example remake im 10 lines of code.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@deeplook
deeplook / covidohedron.ipynb
Last active April 3, 2020 09:43
A sperical view to the COVID-19 distribution.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@deeplook
deeplook / geojson.ipynb
Created April 1, 2020 08:04
GeoJSON with ipyvolume
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.