Pretty-print in python.
pretty_print([RED, UNDERLINE], "DANGER!")
print(
pretty_format([YELLOW], "Careful!"),
"Are you sure you want to do the thing?"
# For general operation | |
sudo apt-get install build-essential git-core pkg-config automake libtool wget zlib1g-dev python-dev libbz2-dev | |
# For regression test suite: | |
sudo apt-get install libsoap-lite-perl | |
# Clone the source | |
git clone https://github.com/moses-smt/mosesdecoder.git mosesdecoder | |
cd mosesdecoder |
#!/bin/bash | |
# Stolen ahem I mean borrowed from @gkiar | |
rawdir='HCP900/raw' | |
cd ${rawdir} | |
for i in `ls `; | |
do |
#!/usr/bin/env python | |
import sys | |
import argparse | |
import networkx as nx | |
import community | |
from networkx.readwrite import json_graph | |
import json | |
Pretty-print in python.
pretty_print([RED, UNDERLINE], "DANGER!")
print(
pretty_format([YELLOW], "Careful!"),
"Are you sure you want to do the thing?"
DEPRECATED: Use this instead, which is all this and more!!
Say you have a website example.com
.
setState('answer', 42);
#!/usr/bin/env python3 | |
""" | |
Usage: | |
./ipinfo [router|local|global] | |
./ipinfo geo [ip] | |
For example, to get your OWN location: | |
./ipinfo geo $(ipinfo global) |
Notebooks are designed for easy reproducibility and code-sharing. Babysitting and debugging someone else's notebook sucks. Don't curse your friends with this burden!
When a user opens your notebook, they should be able to run all cells in order without any additional intervention.
Inputs that must be made to enable the code to run (e.g. password prompts, API tokens, etc) should be requested as soon as the notebook starts running.
{ | |
"data": [{"id": "926202781534388224", "has_media": true, "favorites": 0, "retweets": 0}, {"id": "925899260981399553", "has_media": false, "favorites": 0, "retweets": 0}, {"id": "925466309869043714", "has_media": false, "favorites": 2, "retweets": 0}, {"id": "925107363782283269", "has_media": true, "favorites": 1, "retweets": 0}, {"id": "924714332591620097", "has_media": false, "favorites": 2, "retweets": 0}, {"id": "924327510124441602", "has_media": false, "favorites": 0, "retweets": 0}, {"id": "923986889803223040", "has_media": false, "favorites": 2, "retweets": 1}, {"id": "923752187288870914", "has_media": false, "favorites": 0, "retweets": 0}, {"id": "923376386047344640", "has_media": false, "favorites": 0, "retweets": 0}, {"id": "923017521296543744", "has_media": false, "favorites": 0, "retweets": 0}, {"id": "922573311799975936", "has_media": false, "favorites": 0, "retweets": 0}, {"id": "922210485453426691", "has_media": false, "favorites": 0, "retweets": 0}, {"id": "921818671022051333", "has_media |
#!/usr/bin/env python | |
import os | |
import sys | |
import subprocess | |
if (sys.argv[1] == 'on'): | |
subprocess.check_output('/opt/vc/bin/tvservice -p', shell=True) | |
if len(sys.argv) > 2 and sys.argv[2] == "up": |