This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script automatically installs a bunch of command line (Git, wget, | |
# imagemagick, ...) and GUI (Dropbox, Chrome, Skype, ...) apps on a fresh | |
# Mac. | |
# | |
# It also sets up a Python Scientific Computing environment (matplotlib, | |
# scipy, iPython Notebook, ...) | |
# | |
# Requirement: Have the XCode Command Line Tools installed (download from |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
########################################################## | |
# | |
# This is a shell script for keeping a journal that is | |
# * plaintext, | |
# * time-stamped, | |
# * encrypted, and | |
# * edited with vim. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Problem to be solved: | |
# https://instagram-engineering.com/instagram-engineering-challenge-the-unshredder-7ef3f7323ab1 | |
import PIL.Image, numpy, fractions | |
image = numpy.asarray(PIL.Image.open('TokyoPanoramaShredded.png').convert('L')) | |
diff = numpy.diff([numpy.mean(column) for column in image.transpose()]) | |
threshold, width = 1, 0 | |
def sequence(conn, start): | |
seq = [start] |