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
package main | |
import ( | |
"log" | |
"time" | |
"flag" | |
"net/http" | |
"net/http/httputil" | |
) |
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
package main | |
import ( | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"encoding/base64" | |
) | |
func main() { |
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
package main | |
import ( | |
"github.com/go-pg/pg" | |
"log" | |
) | |
type Thing struct { | |
Id int | |
Title string |
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
POS_SUFFIX_CLASSIFIER = [('scious', 'adj'), ('ation', 'noun'), ('cious', 'adj'), ('ience', 'noun'), ('ance', 'noun'), ('able', 'adj'), | |
('ible', 'adj'), ('ancy', 'noun'), ('cial', 'adj'), ('ence', 'noun'), ('eous', 'adj'), ('hood', 'noun'), | |
('ical', 'adj'), ('ious', 'adj'), ('less', 'noun'), ('ling', 'noun'), ('most', 'adv'), ('ness', 'noun'), ('ship', 'noun'), | |
('sion', 'noun'), ('tail', 'verb'), ('tain', 'verb'), ('tude', 'noun'), ('ture', 'noun'), ('acy', 'noun'), | |
('ary', 'adj'), ('ain', 'verb'), ('age', 'noun'), ('ate', 'verb'), ('ent', 'adj'), ('ant', 'adj'), | |
('ane', 'adj'), ('dom', 'noun'), ('eer', 'adj'), ('ent', 'adj'), ('est', 'adj'), ('ery', 'adj'), | |
('ful', 'adj'), ('ice', 'verb'), ('ien', 'noun'), ('ile', 'adj'), ('ine', 'adj'), ('ion', 'noun'), ('ing', 'adj'), | |
('ish', 'adj'), ('ism', 'noun'), ('ist', 'noun'), ('ity', 'noun'), ('ize', 'verb'), ('ose', 'adj'), | |
('ory', 'adj'), ('ous', 'adj'), ('sor', 'adj'), ('tor', 'noun'), ('an', 'noun'), ('al', 'adj'), ('cy', 'noun'), | |
('er', 'adj'), ('en', 'adj'), ( |
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
package main | |
import ( | |
"log" | |
"fmt" | |
"encoding/gob" | |
"bytes" | |
"runtime/pprof" | |
"bufio" | |
"strconv" |
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
import random | |
import statsd | |
import time | |
random.seed(123) | |
client = statsd.StatsClient() | |
order_metrics = [] | |
N_VIDEOS = 5000 |
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
imap jk <Esc> | |
cnoreabbrev nt tabnew | |
nmap gr gT | |
set laststatus=2 | |
set showtabline=2 | |
set autoindent | |
syntax on | |
set number | |
set incsearch | |
set ignorecase |
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
#coding: utf-8 | |
from decimal import Decimal as TrueDecimal | |
import traceback | |
def main1(): | |
def compute(x): | |
k1 = Decimal('3.5') | |
k2 = Decimal('1.5') | |
k3 = Decimal('6') |
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/perl | |
sub get_all_branches { | |
my @branches = (); | |
open(BRANCHES, 'git ls-remote origin|') or die $!; | |
while (<BRANCHES>) { | |
chomp; | |
$line = $_; | |
if ($line =~ /\s*refs\/heads\/(.*)$/) { |
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 unindent(code): | |
lines = code.split('\n') | |
indent_len = 0 | |
for line in lines: | |
stripped = line.strip() | |
if stripped: | |
indent_len = line.index(stripped[0]) | |
break | |
if indent_len == 0: | |
return code |
NewerOlder