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 System.Environment | |
| import Control.Applicative | |
| import Data.Maybe | |
| import Data.List | |
| import Data.List.Split | |
| import Data.Map.Strict ((!), Map, fromList) | |
| type Class = String | |
| type Mean = Double | |
| type StdDevSquared = Double |
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 Control.Monad | |
| import Control.Applicative | |
| import Data.Monoid | |
| import Data.Maybe | |
| main :: IO() | |
| main = do | |
| putStr "results: \n" | |
| putStr $ fizzbuzz5 20 |
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/python | |
| import os | |
| import re | |
| df_lines = list(os.popen("/bin/df -h")) | |
| def report(place, line): | |
| # Grab the fields from each line in the df command | |
| fs, size, used, avail, percentage, mount = re.match("(\S+)\s+" * 6, line).groups() |
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 System.IO | |
| import Data.List.Split | |
| -- import Data.MemoCombinators | |
| -- import Debug.Trace(trace) | |
| import Data.Array | |
| main :: IO() | |
| main = do | |
| contents <- readFile "matrix_big.txt" | |
| let matrix = map (map readInt . splitOn ",") . lines $ contents |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <ctype.h> | |
| #define STR_HELPER(x) #x | |
| #define STR(x) STR_HELPER(x) | |
| #define TRIE_INIT_SIZE 100 | |
| #define TRIE_ALPHABET_SIZE 26 | |
| #define FIRST_LETTER 'a' |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <ctype.h> | |
| #define STR_HELPER(x) #x | |
| #define STR(x) STR_HELPER(x) | |
| #define TRIE_INIT_SIZE 100 | |
| #define TRIE_ALPHABET_SIZE 26 | |
| #define FIRST_LETTER 'a' |
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
| # relations.txt -- A way to specify playlist relationships | |
| # | |
| # Comments begin with the '#' character and are ignored | |
| # | |
| # Currently, there's only one type of relation in relations.txt: | |
| # | |
| # 1. Push relations, which are specified using '->' like this: | |
| # pusher_playlist -> pushed_playlist | |
| # And works by pushing changes additions in one playlist to another | |
| # |
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/python | |
| # TODO: Construct a topological ordering for the pushes so they happen | |
| # correctly regardless of their order in the relations.txt file | |
| import re | |
| import sys | |
| import os.path | |
| from exeption import ValueError |
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
| function log(){ | |
| echo "$@" >> log | |
| bash -c "$@" | |
| } |
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
| CC=gcc | |
| CFLAGS=-Wall -O3 -g | |
| LDFLAGS=-pthread | |
| COMPILEONLY=-c | |
| SOURCES=queue.c | |
| OBJECTS=$(SOURCES:.c=.o) | |
| EXECUTABLE=$(firstword $(SOURCES:.c=)) | |
| .PHONY: clean run | |
| .SUFFIXES: |