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.Complex | |
import Text.Printf | |
import Test.QuickCheck | |
import Text.RE.PCRE | |
:set -XFlexibleContexts | |
:set -XOverloadedStrings | |
:set -XQuasiQuotes | |
:set -XScopedTypeVariables | |
let f2c dc = (dc - 32) * (5 / 9) | |
let c2f df = ((9 / 5) * df) + 32 |
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
myFunction :: [String] -> IO () | |
myFunction args= | |
do | |
let val=fmap (+3)$fmap length args | |
blah<-readFile "foo.txt" | |
let myNewList=[blah, | |
mconcat(fmap show val ) ,"hello"] | |
print myNewList | |
-- Formatted to |
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 group(ls): | |
'''group([1,1,2,2,3,3]) = [[1, 1], [2, 2], [3, 3]]''' | |
if len(ls) <= 1: | |
return [ls] | |
else: | |
current_head = ls[0] | |
current_group = [current_head] | |
rest_of_list = ls[1:] | |
ls_idx = 0 | |
for item in rest_of_list: |
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
Wild Wild West | |
Wild Wild West, Jim West, desperado, rough rider | |
No you don't want nada | |
None of this, gun in this, brotha runnin this, | |
Buffalo soldier, look it's like I told ya | |
Any damsel that's in distress | |
Be out of that dress when she meet Jim West | |
Rough neck so go check the law and abide | |
Watch your step with flex and get a hole in your side | |
Swallow your pride, don't let your lip react, |
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
module Combinators where | |
import Control.Monad (forM_) | |
import Test.Hspec | |
import Test.QuickCheck | |
import Text.RE.PCRE | |
alphabetical :: Gen Char | |
alphabetical = elements $ ['A'..'Z'] ++ ['a'..'z'] |
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/env stack | |
{- stack script | |
--resolver lts-14.6 | |
--package aeson | |
--package bytestring | |
-} | |
{-# OPTIONS_GHC -Wall #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} |
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/env sage | |
# -*- mode: Python -*- | |
'''To run this, run the terminal command "sage graphs.sage". Or simply run the | |
command sage and type the lines of code into the prompt | |
To get help, from the sage prompt run help(plot), or see | |
http://doc.sagemath.org/html/en/reference/plotting/sage/plot/plot.html | |
''' |
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/env python | |
from __future__ import division | |
import numpy as np | |
f = open('clean1.data', 'r') | |
f_nums = [map(float, x.strip().split(',')[2:]) for x in f.readlines()] | |
d = np.array(f_nums) | |
d_cols = d.transpose() |
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
# This file has been auto-generated by i3-config-wizard(1). | |
# It will not be overwritten, so edit it as you like. | |
# | |
# Should you change your keyboard layout somewhen, delete | |
# this file and re-run i3-config-wizard(1). | |
# | |
# i3 config file (v4) | |
# | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! |
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
\documentclass[12pt]{article} | |
\usepackage[letterpaper,margin=0.2in,landscape,layoutvoffset=0in]{geometry} | |
\usepackage{tabu} | |
\usepackage{tikz} | |
\pagenumbering{gobble} | |
\begin{document} |
NewerOlder