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
import Text.ParserCombinators.Parsec | |
import Text.ParserCombinators.Parsec.Combinator | |
import Text.ParserCombinators.Parsec.Expr | |
import Text.ParserCombinators.Parsec.Token | |
import Data.Maybe | |
data Expression = | |
Loop [Expression] | |
| Literal Integer |
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
import Data.List | |
import Data.Char | |
import System.Environment | |
isOp :: String -> Bool | |
isOp x = x `isInfixOf` "+-*/" | |
isInt :: String -> Bool | |
isInt ('-':x:xs) = isInt (x:xs) |
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
#!/usr/bin/python | |
import sys | |
if(len(sys.argv) < 5): | |
print 'Usage: ./beam.py path <debug> <debugpoints> <memsize>' | |
print ' debug: on or off' | |
print ' debugpoints: ;-seperated list of coordinates (e.g. 0,9;0,2)' | |
print ' (use -1,-1 for none)' |
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
import Data.List | |
import System.Environment | |
sqrti :: Int -> Int | |
sqrti = floor . sqrt . fromIntegral | |
squ :: Int -> Int | |
squ x = x * x |
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
# | |
#- arr2nljson | |
# munt, 2016 | |
# | |
# Reads in a JSON array and outputs new-line | |
# separated documents | |
# | |
# | |
import sys |
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
import bson | |
import datetime | |
import sys | |
import queue | |
import threading | |
import time | |
path = lambda x: x['path'] | |
target = lambda x: x['target'] |