Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# Run rubocop after all tests pass | |
group :tdd, halt_on_fail: true do | |
guard :rspec, | |
cmd: 'bundle exec rspec -f documentation --color', | |
run_all: {cmd: 'bundle exec rspec -f documentation --color'}, | |
keep: true, | |
all_on_start: true, | |
all_after_pass: true do | |
<?xml version="1.1" encoding="UTF-8"?> | |
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd"> | |
<!--Last edited by Ukelele version 3.2.2.166 on 2017-03-06 at 13:11 (BRT)--> | |
<keyboard group="126" id="-29669" name="Brasileiro Nativo" maxout="1"> | |
<layouts> | |
<layout first="0" last="17" mapSet="16c" modifiers="f4"/> | |
<layout first="18" last="18" mapSet="a88" modifiers="f4"/> | |
<layout first="21" last="23" mapSet="a88" modifiers="f4"/> | |
<layout first="30" last="30" mapSet="a88" modifiers="f4"/> | |
<layout first="194" last="194" mapSet="a88" modifiers="f4"/> |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
def print_confusion_matrix(confusion_matrix, class_names, figsize = (10,7), fontsize=14): | |
"""Prints a confusion matrix, as returned by sklearn.metrics.confusion_matrix, as a heatmap. | |
Note that due to returning the created figure object, when this funciton is called in a | |
notebook the figure willl be printed twice. To prevent this, either append ; to your | |
function call, or modify the function by commenting out the return expression. |
seq 1 9 | xargs -I{} sh -c 'shuf everything.csv -n 999 > sample_{}.csv' |
# ZSH only | |
print -rl **/*(.Om) > frames.txt | |
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:autoaspect:vqscale=3 -vf scale=1920:1080 -mf type=jpeg:fps=24 mf://@frames.txt -o time-lapse.avi |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/usr/bin/env ruby | |
#------------------------------------------------------------------------------ | |
# Aggregate Print useful information from /proc/[pid]/smaps | |
# | |
# pss - Roughly the amount of memory that is "really" being used by the pid | |
# swap - Amount of swap this process is currently using | |
# | |
# Reference: | |
# http://www.mjmwired.net/kernel/Documentation/filesystems/proc.txt#361 |
#!/bin/bash | |
PIDFILE=".watch.pid" | |
touch $PIDFILE || (echo "Unable to write to .watch.pid" && exit 1) | |
# Kill off old processes | |
while read pid; do | |
kill $pid | |
done < $PIDFILE |
{ | |
"AD" => ["Catalan"], | |
"AE" => ["Arabic"], | |
"AF" => ["Dari", "Pashto"], | |
"AG" => ["English"], | |
"AI" => ["English"], | |
"AL" => ["Albaniana"], | |
"AM" => ["Armenian"], | |
"AN" => ["Dutch", "Papiamento"], | |
"AR" => ["Spanish"], |
#lang racket | |
(require parser-tools/lex | |
(prefix-in re- parser-tools/lex-sre) | |
parser-tools/yacc) | |
(provide (all-defined-out)) | |
(define-tokens a (NUM VAR)) | |
(define-empty-tokens b (+ - EOF LET IN)) | |
(define-lex-trans number | |
(syntax-rules () |