Skip to content
{{ message }}

Instantly share code, notes, and snippets.

🍍
haskall

# Ezequiel Alvarez alvare

🍍
haskall
Created Oct 16, 2019
View wc.hs
 {-# LANGUAGE BangPatterns #-} {-# LANGUAGE LambdaCase #-} module Lib ( someFunc ) where import Data.Char import Data.IORef import System.IO
Created Oct 28, 2016
proba
View _.md
Created Oct 3, 2016
2015_1er_parcial_2ndo_c_p1.hs
View 2015_1er_parcial_2ndo_c_p1.hs
 module Main where data Ball = R | B deriving (Show, Eq) data Coin = Ca | Ce deriving (Show, Eq) s_a = [(Ca, [a, b, c, d]) | a <- l, b <- l, c <- l, d <- l] where l = [R, R, R, R, B, B] s_e = [(Ce, [a, b, c, d]) | a <- l, b <- l, c <- l, d <- l]
Created Apr 1, 2016
Scalpel scraper for Dr. Who IMDB ratings.
View scraper.hs
 -- stack --resolver lts-5.8 runghc --package "aeson scalpel bytestring text" {-# LANGUAGE LambdaCase #-} module Main where import Control.Monad (forM) import Text.HTML.Scalpel import Data.Aeson import Data.Text (Text, unpack, pack, strip) import qualified Data.Text.IO as T import qualified Data.ByteString.Lazy as B
Created Feb 25, 2016
alphabet-cipher kata solution
View coder.clj
 (ns alphabet-cipher.coder) ; Vemos que encodear un caracter `m` con ; una letra de keyword `k` es equivalente a sumar sus indices ; en el abecedario modulo 26. ; ; Por ejemplo: con indice("m") = 12 y indice("s") = 18 tenemos ; 12 + 18 ≡ 4 (mod 26) ; y 4 = indice("e") ;
Created Oct 4, 2015
View broken_mapTask_.hs
 module Main where import Control.Concurrent.Async.Pool main :: IO () main = do withTaskGroup 5 \$ \g -> mapTasks_ g \$ map print [1..10] putStrLn "Done!"
Created Jul 1, 2015
Cluster/partition spatial data in equal sized convex spacially cohesive parts
View clusters.py
 # coding: utf-8 import csv import json import numpy as np def r_tree(points, K): """ STR method for building R-Tree like structure. http://stats.stackexchange.com/a/40785 http://www.dtic.mil/dtic/tr/fulltext/u2/a324493.pdf (pag. 8)
Created Jul 16, 2014
View keybase.md

### Keybase proof

I hereby claim:

• I am alvare on github.
• I am alvare (https://keybase.io/alvare) on keybase.
• I have a public key whose fingerprint is 299F A304 4E77 184C 7831 7E7D A45B 3D40 CF96 B477

To claim this, I am signing this object:

Last active Dec 30, 2015
Data.Sequence lol
View testv2.hs
 import Text.Printf import System.CPUTime import qualified Data.Sequence as Seq import Data.Sequence ((><), (<|), (|>)) import Data.Foldable (toList) time :: IO t -> IO t time a = do start <- getCPUTime v <- a
Created Dec 5, 2013
View test jp
 import Text.Printf import Control.Exception import System.CPUTime time :: IO t -> IO t time a = do start <- getCPUTime v <- a end <- getCPUTime let diff = (fromIntegral (end - start)) / (10^12)