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
# open https://docs.google.com/spreadsheets/d/1k77hjQolIU3Lw6mq-d1GgbKQQpTPU6obExG5CsfI4E0 | |
# highlight whole column, Ctrl+C | |
import json | |
src = ''' | |
0.1833333333 | |
0.4333333333 | |
0.45 | |
0.45 |
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 python | |
from itertools import cycle | |
class Node(object): | |
def __init__(self, value, left=None, right=None): | |
self.value = value | |
self.left = left | |
self.right = right | |
def preorder(self, shape=False): |
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
name: channeltest | |
dependencies: | |
- pip=7.0.3=py27_0 | |
- python=2.7.10=0 | |
- scandir=1.1=py27_0 | |
- setuptools=17.0=py27_0 |
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
FROM rails:onbuild |
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
name: scipy | |
dependencies: | |
- numpy=1.10.1=py27_0 | |
- openssl=1.0.2d=0 | |
- pip=7.1.2=py27_0 | |
- python=2.7.11=0 | |
- readline=6.2=2 | |
- scipy=0.16.0=np110py27_1 | |
- setuptools=18.5=py27_0 | |
- sqlite=3.8.4.1=1 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
# | |
# Install Jupyter Notebook with Python 2 and Python 3 kernels on Debian | |
# from http://stackoverflow.com/a/34421527/347567 | |
set -o errexit | |
# As root, install `pip` and `jupyter` from apt, and the development packages, too. | |
apt-get update | |
apt-get install -y \ |
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 bats | |
# | |
# Bash Automated Testing System (BATS) | |
# https://github.com/sstephenson/bats | |
# | |
# Test curltail, both sourced and executed | |
@test "Missing argument, sourced" { | |
. curltail.sh | |
run curltail |
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 | |
# | |
# alias for npm that only uses git over https | |
set -o errexit # exit on any error | |
real_npm=`which npm` | |
npm_install() | |
{ |
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 | |
# | |
# Find live hosts on local network with nmap | |
quiet() { $@ >/dev/null 2>&1; } | |
error() { echo 2>&1 "$@"; } | |
if ! quiet command -v nmap | |
then | |
error "You must install nmap." |
OlderNewer