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
Xft.dpi: 96 | |
Xft.antialias: true | |
Xft.rgba: rgb | |
Xft.hinting: true | |
Xft.hintstyle: hintfull | |
urxvt.scrollBar: false | |
urxvt.font : xft:Meslo LG M DZ:regular:size=9 | |
urxvt.boldfont: xft:Meslo LG M DZ:bold :size=9 |
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
{-# LANGUAGE OverloadedStrings #-} | |
import qualified Data.ByteString as B | |
import Control.Monad (forever, liftM) | |
import Control.Exception.Base | |
import Network.Socket hiding (recv, send) | |
import Network.Socket.ByteString (recv, send) | |
import Network.BSD |
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
############################################################# | |
################### OFFICIAL UBUNTU REPOS ################### | |
############################################################# | |
###### Ubuntu Main Repos | |
deb http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse | |
deb-src http://archive.ubuntu.com/ubuntu trusty main | |
###### Ubuntu Update Repos | |
deb http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse |
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 System.Environment | |
import Control.Parallel.Strategies | |
import Math.NumberTheory.Primes.Sieve (primes) | |
import Math.NumberTheory.Primes.Testing (isPrime) | |
-- Converts 42d -> 101010d | |
binread :: Integer -> Integer | |
binread 0 = 0 | |
binread n = let (q, r) = n `divMod` 2 |
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 System.Environment | |
import Control.Parallel.Strategies | |
import Math.NumberTheory.Primes.Sieve (primes) | |
import Math.NumberTheory.Primes.Testing (isPrime) | |
-- Converts 42d -> 101010d | |
binread :: Integer -> Integer | |
binread 0 = 0 | |
binread n = let (q, r) = n `divMod` 2 |
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 System.Environment | |
import Control.Parallel.Strategies | |
import Math.NumberTheory.Primes.Sieve (primes) | |
import Math.NumberTheory.Primes.Testing (isPrime) | |
-- Converts 42d -> 101010d | |
binread :: Integer -> Integer | |
binread 0 = 0 | |
binread n = let (q, r) = n `divMod` 2 |
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 System.Environment | |
import Control.Parallel.Strategies | |
import Math.NumberTheory.Primes.Sieve (primes) | |
import Math.NumberTheory.Primes.Testing (isPrime) | |
-- Converts 42d -> 101010d | |
binread :: Integer -> Integer | |
binread 0 = 0 | |
binread n = let (q, r) = n `divMod` 2 |
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 System.Environment | |
import Math.NumberTheory.Primes.Sieve (primes) | |
import Math.NumberTheory.Primes.Testing (isPrime) | |
-- Converts 42d -> 101010d | |
binread :: Integer -> Integer | |
binread 0 = 0 | |
binread n = let (q, r) = n `divMod` 2 | |
in r + 10 * binread q |
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
-- Stolen from http://www.haskell.org/haskellwiki/Testing_primality | |
primes :: [Integer] | |
primes = 2: 3: sieve (tail primes) [5,7..] | |
where | |
sieve (p:ps) xs = h ++ sieve ps [x | x <- t, x `rem` p /= 0] | |
where (h,~(_:t)) = span (< p*p) xs | |
isPrime :: Integer -> Bool | |
isPrime n = n > 1 && all (\ p -> n `rem` p /= 0) (takeWhile (\ p -> p*p < n) primes) |
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 Stats where | |
import Data.List | |
import Data.Maybe | |
import Data.Time.Clock | |
import Data.Time.Calendar | |
import Network.URL | |
import GHC.Exts |