- Programming is fun again!
- Free (as in beer and as in speech)
- Steep learning curve
- Highly readable, easy to code
- Batteries included
- Package management
This file contains hidden or 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
/* | |
* Arduino Mail Notification | |
* http://www.portwempreludium.de | |
* | |
* See http://portwempreludium.tumblr.com/post/13068255903/dancing-mouse for details. | |
* Based on the XMAS hitcounter by tinkerlog.com | |
*/ | |
int motorPin = 13; // control pin for servo motor | |
int mails = 0; // number of new mails |
This file contains hidden or 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] |
This file contains hidden or 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
"""Wiimote wrapper class.""" | |
import cwiid | |
class Wiimote(): | |
_buttons = { | |
'B': 1<<2, 'home': 1<<7 | |
} | |
def __init__(self, calib = (100, 150, 100, 150)): | |
self.wm = None |
This file contains hidden or 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
// Provides mixins that automatically replace sprite icons with retina images on appropriate devices. | |
@highdpi: ~"(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)"; | |
.sprite (@path, @size, @w, @h, @pad: 0) when (isstring(@path)) | |
{ | |
background-image: url(@path); | |
width: @size; | |
height: @size; | |
display: inline-block; |
This file contains hidden or 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
def get_code(num, alphabet="23456789ABCDEFGHJKLMNPQRSTUVWXYZ"): | |
base = len(alphabet) | |
result = "" | |
num, rem = divmod(num, base) | |
while num: | |
result += alphabet[rem] | |
num, rem = divmod(num, base) | |
result += alphabet[rem] | |
return result[::-1] |
This file contains hidden or 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
// Without jQuery: | |
var setSplashHeight = function () { | |
document.getElementById("splash").style.height = "innerHeight" in window ? window.innerHeight : document.documentElement.offsetHeight; | |
} | |
setSplashHeight(); | |
window.onresize = setSplashHeight(); | |
// With jQuery: | |
var jSetSplashHeight = function () { |
This file contains hidden or 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 hidden or 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 python | |
"""Reduces dependency constraints to a minimal set. | |
Example: if a package is required in version '>2.2 >3.0 <=4.1', then >2.2 is | |
redundant in here -- it's entailed in >3.0 Likewise, in '>=4.2 !=4.2' should | |
just be '>4.2' etc. | |
This script reads in version constrains such as '>2.2 >3.0 <=4.1' and prints | |
a reduced list of constraints or unsatisfa if the constraints can't be |
I hereby claim:
- I am maebert on github.
- I am maebert (https://keybase.io/maebert) on keybase.
- I have a public key whose fingerprint is E463 E807 A4C6 4035 31AD D5FA FA39 CA2C E213 D791
To claim this, I am signing this object:
OlderNewer