Do the whole thing:
PYTHONPATH='.' luigi --module small Small --local-scheduler
| #!/usr/bin/env bash | |
| # mostly from http://word.bitly.com/post/31921713978/static-analysis | |
| function cfmt { | |
| if [[ $# -ne 1 ]]; then | |
| echo "Usage: cfmt <file>" | |
| else | |
| astyle \ | |
| --style=1tbs \ | |
| --lineend=linux \ | |
| --convert-tabs \ |
| model_G = nn.Sequential() | |
| model_G:add(nn.JoinTable(2, 2)) | |
| model_G:add(cudnn.SpatialConvolutionUpsample(3+1, 64, 7, 7, 1, 1)):add(cudnn.ReLU(true)) | |
| model_G:add(nn.SpatialBatchNormalization(64, nil, nil, false)) | |
| model_G:add(cudnn.SpatialConvolutionUpsample(64, 368, 7, 7, 1, 4)):add(cudnn.ReLU(true)) | |
| model_G:add(nn.SpatialBatchNormalization(368, nil, nil, false)) | |
| model_G:add(nn.SpatialDropout(0.5)) | |
| model_G:add(cudnn.SpatialConvolutionUpsample(368, 128, 7, 7, 1, 4)):add(cudnn.ReLU(true)) | |
| model_G:add(nn.SpatialBatchNormalization(128, nil, nil, false)) | |
| model_G:add(nn.FeatureLPPooling(2,2,2,true)) |
Do the whole thing:
PYTHONPATH='.' luigi --module small Small --local-scheduler
| #!/usr/bin/env python | |
| from sys import stdin, stdout | |
| import csv | |
| rdr = csv.reader(stdin, delimiter='\t') | |
| wrt = csv.writer(stdout, delimiter='\t') | |
| vals = [] | |
| rows = [] | |
| for row in rdr: |
## ngram following http://tidytextmining.com/ngrams.html
library(dplyr)
library(tidytext)
library(tidyr)
# load manually downloaded web of science data dump
tt <- jsonlite::stream_in(file("data/wos_total.json"), verbose = FALSE) %>%
filter(!is.na(AB))Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh
Easily checkout local copies of pull requests from remotes:
git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it outgit pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out| Latency Comparison Numbers | |
| -------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| package main | |
| import ( | |
| "io" | |
| "log" | |
| "mime/multipart" | |
| "net/http" | |
| "os" | |
| "path/filepath" | |
| "runtime" |
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "io" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| "sync" |
| // Pipe creates a synchronous in-memory pipe. | |
| // It can be used to connect code expecting an io.Reader | |
| // with code expecting an io.Writer. | |
| // Reads on one end are matched with writes on the other, | |
| // copying data directly between the two; there is no internal buffering. | |
| // It is safe to call Read and Write in parallel with each other or with | |
| // Close. Close will complete once pending I/O is done. Parallel calls to | |
| // Read, and parallel calls to Write, are also safe: | |
| // the individual calls will be gated sequentially. |