Most Unix/Linux systems come with python pre-installed:
$ python -V
| # first update all remote branches | |
| git fetch --all --prune | |
| # loop over all local/remote pairs | |
| git for-each-ref --format="%(refname:short) %(upstream:short)" refs/heads | \ | |
| while read local remote | |
| do | |
| # make sure remote exists | |
| [ -z "$remote" ] && continue |
| #!/usr/bin/env python | |
| # homework average is worth 15% of the grade and lowest will be thrown out | |
| HOMEWORK = [ | |
| 100, # hw1 | |
| 100, # hw2 | |
| 100, # hw3 | |
| 100, # hw4 | |
| 100, # hw5 | |
| ] |
| package main | |
| import ( | |
| "fmt" | |
| "strconv" | |
| ) | |
| // sentinel value for channels |
| import pytest | |
| class Fixture(): | |
| @property | |
| def foo(self): | |
| raise NotImplementedError | |
| @pytest.fixture |
| // ==UserScript== | |
| // @name Hipchat Click to View Images | |
| // @version 0.2 | |
| // @match https://*.hipchat.com/chat | |
| // @copyright 2014, Zach "theY4Kman" Kanzler | |
| // @grant GM_unsafeWindow | |
| // ==/UserScript== | |
| // Add styles to initially disable images |
| # Usage: | |
| # cd ~/my_old_repo | |
| # git-move HEAD ~/my_new_repo | |
| function git-move { | |
| src=$(pwd) | |
| commit=$1 | |
| dest=$2 | |
| git rev-list $commit --reverse | | |
| while read hash; do |
| from .local import config | |
| config.render(globals()) |
| // Excerpt from Practical Cryptography With Go | |
| // https://leanpub.com/gocrypto/read#leanpub-auto-block-padding | |
| // Pad applies the PKCS #7 padding scheme on the buffer. | |
| func Pad(in []byte) []byte { | |
| padding := 16 - (len(in) % 16) | |
| if padding == 0 { | |
| padding = 16 | |
| } | |
| for i := 0; i < padding; i++ { |
| #!/usr/bin/env python | |
| from itertools import chain | |
| from random import SystemRandom | |
| import sys | |
| PLANTS = { | |
| 'Stinging Nettle': 3, | |
| 'Sorrel': 3, |