Skip to content

Instantly share code, notes, and snippets.

@Susensio
Susensio / sd.fish
Created October 17, 2023 07:22 — forked from arcuru/sd.fish
Fish shell completions for ianthehenry/sd
# Completions for the custom Script Directory (sd) script
# MODIFIED from https://gist.github.com/patricksjackson/5065e4a9d8e825dafc7824112f17a5e6
# Improvements:
# - compliant with SD_ROOT
# - better handling of empty folders
# These are based on the contents of the Script Directory, so we're reading info from the files.
# The description is taken either from the first line of the file $cmd.help,
# or the first non-shebang comment in the $cmd file.
@Susensio
Susensio / dynamic_plotting.py
Created September 26, 2018 08:45 — forked from greydanus/dynamic_plotting.py
Dynamic plotting for matplotlib
"Dynamic plotting in matplotlib. Copy and paste into a Jupyter notebook."
# written October 2016 by Sam Greydanus
%matplotlib notebook
import matplotlib.pyplot as plt
import numpy as np
import time
def plt_dynamic(x, y, ax, colors=['b']):
for color in colors:
ax.plot(x, y, color)
@Susensio
Susensio / rotation_spacing.py
Last active September 17, 2018 10:41 — forked from jsfenfen/output.png
Detecting rotation and line spacing of image of page of text using Radon transform
# -*- coding: utf-8 -*-
"""
Inspired in https://gist.github.com/jsfenfen/4c615775007b802117b7
Automatically detect rotation and line spacing of an image of text using
Fourier transforms
If image is rotated by the inverse of the output, the lines will be
horizontal (though they may be upside-down depending on the original image)
@Susensio
Susensio / HumbleBundle books.md
Last active August 29, 2018 10:32 — forked from santiagobasulto/README.md
Download HumbleBundle books in batch with a simple Python script.

Download HumbleBundle books

This is a quick Python script I wrote to download HumbleBundle books in batch. I bought the amazing Machine Learning by O'Reilly bundle. There were 15 books to download, with 3 different file formats per book. So I scratched a quick script to download all of them in batch.

(Final Result: books downloaded)