tl;dr - curly braces are used to disambiguate, quotes are used to form a "single word".
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
quicksort :: [Int] -> [Int] | |
quicksort [] = [] | |
quicksort [x] = [x] | |
quicksort xs = | |
quicksort(less) ++ [pivot] ++ quicksort(greater) | |
where | |
m = length xs `div` 2 | |
pivot = xs!!m | |
less = [ xs!!i | i <- [0..(length xs)-1], xs!!i <= pivot && i /= m ] | |
greater = [ xs!!i | i <- [0..(length xs)-1], xs!!i > pivot && i /= m ] |
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
http://en.wikipedia.org/wiki/Animal | |
http://en.wikipedia.org/wiki/Gnathifera_(phylum) | |
http://en.wikipedia.org/wiki/Gnathostomulid | |
http://en.wikipedia.org/wiki/Testis | |
http://en.wikipedia.org/wiki/Infertility | |
http://en.wikipedia.org/wiki/Embryo_transfer | |
http://en.wikipedia.org/wiki/Foal | |
http://en.wikipedia.org/wiki/Gestation | |
http://en.wikipedia.org/wiki/Uterus | |
http://en.wikipedia.org/wiki/Asherman%27s_syndrome |
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 sys import stdin as d | |
def dr(): return d.readline().rstrip() | |
def gr(): r1=int(dr())-1; return [ [ int(s) for s in dr().split() ] for z in [1]*4 ][r1] | |
nc=int(dr()) | |
for i in range(nc):r=list(set(gr()).intersection(set(gr())));l=len(r);print ''.join(['Case #',str(i+1),': ',"Volunteer cheated!"if l==0 else"Bad magician!"if l>1 else`r[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
def quicksort(arr): | |
if arr == []: | |
return [] | |
if len(arr) == 1: | |
return arr | |
m = len(arr) / 2 | |
pivot = arr[m] | |
less = [ arr[x] for x in range(0, len(arr)) if arr[x] <= pivot and x != m ] | |
greater = [ arr[x] for x in range(0, len(arr)) if arr[x] > pivot and x != m ] | |
return quicksort(less) + [pivot] + quicksort(greater) |
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 sys import stdin | |
import sys | |
N = 10 # number of sequences | |
body = stdin.read() | |
body = body.split('\n') | |
body = body[3:len(body)-2] | |
final_body = [] | |
for elem in body: |
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
digraph unix { | |
node [color=lightblue2, style=filled]; | |
"node1" -> "node2" | |
"node3" -> "node2" | |
"node4" -> "node1" | |
} |
Dirs:
ssh
- Contains scripts/data/etc. that should bescp
ed onto remote machines such as Chris's cluster.22
- blah
Testing
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 lasagne.nonlinearities import * | |
from lasagne.layers import Layer | |
class SpatialSoftmaxLayer(Layer): | |
""" | |
Softmax layer that computes the softmax over pixels in the same location, | |
i.e., over the channel axis. This layer will automatically use the CuDNN | |
version of this softmax if it is available. | |
Parameters |
OlderNewer