I hereby claim:
- I am jhedev on github.
- I am joelhermanns (https://keybase.io/joelhermanns) on keybase.
- I have a public key ASDd_xFQBcq0HMJ7wbtppli0t-7hlK5ygJJrkevIiEIKXQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| module Main where | |
| import Data.List | |
| mult :: Int | |
| mult = sum $ nub [i*x | x <- [3,5], i <- [1..(1000 -1)`div` x]] | |
| main :: IO () | |
| main = print mult |
| problem4 :: [Int] -> Int | |
| problem4 = read . foldl1 (++) . map show . sortBy f | |
| f:: Int -> Int -> Ordering | |
| f x y | v1 == v2 = EQ | |
| | v1 < v2 = GT | |
| | v1 > v2 = LT | |
| where | |
| v1 = concatInt x y | |
| v2 = concatInt y x |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| import Control.Applicative | |
| import Control.Monad.Trans.Resource | |
| import Control.Monad.IO.Class | |
| import qualified Data.ByteString.Char8 as BSC | |
| import Data.Conduit | |
| import qualified Data.Conduit.Combinators as C | |
| import qualified Data.Conduit.List as CL |
| #!/usr/bin/env python3.3 | |
| # -*- coding: utf-8 -*- | |
| import time | |
| def interrupt_decorator(handler): | |
| def decorator(fun): | |
| def wrapper(*args, **kwargs): | |
| try: | |
| fun(*args, **kwargs) |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| import itertools | |
| def gen(i): | |
| while True: | |
| yield i | |
| i = i + 1 | |
| def primes(gen): |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| start = 0x0001F300 | |
| while start < 0x1F58E: | |
| print(hex(start), chr(start)) | |
| start+=1 |
| sum $ map (\(a,b) -> a*b `mod` 103) $ map (\(a,b) -> ((256^(7-a)) `mod` 103,b)) $ zip [1..] $ map (`mod` 103) $ map ord "string" |
| # Taken from https://github.com/HIPERFIT/L0Language/blob/master/git-hooks/pre-commit | |
| fail() { | |
| echo "Aborting commit due to verification errors." | |
| echo "If you disagree, use git commit --no-verify." | |
| exit 1 | |
| } | |
| hlintable() { | |
| ! egrep -q '{-# LANGUAGE.*QuasiQuotes' $1 |
| \setbeamertemplate{footline}{ | |
| \leavevmode% | |
| \hbox{% | |
| \begin{beamercolorbox}[wd=.4\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}% | |
| \usebeamerfont{author in head/foot}\insertshortauthor | |
| \end{beamercolorbox}% | |
| \begin{beamercolorbox}[wd=.6\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}% | |
| \usebeamerfont{title in head/foot}\insertshorttitle\hspace*{3em} | |
| \insertframenumber{} \hspace*{1ex} | |
| \end{beamercolorbox}}% |