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/env python | |
# -*- coding: UTF-8 -*- | |
from __future__ import division | |
from __future__ import print_function | |
from marshal import dump, load | |
from random import sample | |
from glob import glob | |
from pdb import * | |
import subprocess as sub | |
import sys |
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/env python | |
# -*- coding: UTF-8 -*- | |
from __future__ import division | |
from marshal import dump, load | |
from random import sample | |
from glob import glob | |
from pdb import * | |
import subprocess as sub | |
import sys | |
import re |
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/env python | |
# -*- coding: UTF-8 -*- | |
from __future__ import division | |
from marshal import dump, load | |
from random import sample | |
from glob import glob | |
from pdb import * | |
import sys | |
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/env python | |
# -*- coding: UTF-8 -*- | |
from marshal import dump, load | |
from random import sample | |
from glob import glob | |
from pdb import * | |
import sys | |
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/env python | |
# -*- coding: UTF-8 -*- | |
from marshal import dump, load | |
from random import sample | |
from glob import glob | |
from pdb import * | |
import sys | |
def run_experiment(residues, interests, ss_code=None, mind=0.0, maxd=100.0): |
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/env python | |
# -*- coding: UTF-8 -*- | |
from __future__ import division | |
import numpy as np | |
import math | |
def flatten(l): | |
out = [] | |
for item in l: | |
if isinstance(item, (list, tuple)): |
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/env ruby | |
# | |
# Offset | Length | Description | |
# ======================================== | |
# 0 | 1 | minor width offset | |
# 1 | 1 | major width offset | |
# 2 | 1 | minor height offset | |
# 3 | 1 | major height offset | |
# 4 | 768 | 256-color pallet | |
# 772 | 1 | number of cycles (N) |
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/env ruby | |
# | |
# Offset | Length | Description | |
# ======================================== | |
# 0 | 1 | minor width offset | |
# 1 | 1 | major width offset | |
# 2 | 1 | minor height offset | |
# 3 | 1 | major height offset | |
# 4 | 768 | 256-color pallet | |
# 772 | 1 | number of cycles (N) |
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/env ruby -w | |
# ✓ FizzBuzz | |
# ✓ Fibonacci | |
# ✓ Bubblesort | |
# ✓ Mergesort | |
# ✓ Search Tree | |
# ✓ Rotated minimum | |
# ✓ Prime factorization | |
def fizz_buzz n |
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
-- Linked List | |
data LL a = Empty | Cons a (LL a) | |
instance (Show a) => Show (LL a) where | |
show Empty = "[]" | |
show (Cons a l) = (show a) ++ ":" ++ (show l) | |
nth :: LL a -> Int -> a | |
nth (Cons a _) 0 = a |