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
-- | some packages i needed to install to get opengl working | |
-- sudo apt-get install mesa-utils libglu1-mesa-dev freeglut3-dev mesa-common-dev | |
-- libglew-dev libglfw3-dev libglm-dev | |
-- libao-dev libmpg123-dev xlibmesa-glu-dev | |
import Util | |
import qualified Data.Text as T | |
import qualified Graphics.Gloss as G | |
import Graphics.Gloss | |
import Data.Traversable |
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/env python3 | |
# go from a csv of nested data to a bunch of sql insert statements | |
from csv import reader | |
from uuid import uuid4 | |
file_name = "category.csv" | |
def do(): | |
collections = {} |
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
module Swarm where | |
-- | Particle Swarm Optimization | |
-- | |
-- Goals | |
-- 1. optimize with a Particle Swarm to find some optimal goal within a decently complex function | |
-- 2. attempt to parallelize each particle trajectory | |
-- 3. visualize | |
import Data.Maybe |
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
-- File auto generated by purescript-bridge! -- | |
module App.Crud where | |
import Data.Lens (Lens', Prism', lens, prism') | |
import Data.Lens.Iso.Newtype (_Newtype) | |
import Data.Lens.Record (prop) | |
import Data.Maybe (Maybe, Maybe(..)) | |
import Data.Newtype (class Newtype) | |
import Data.Symbol (SProxy(..)) |
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
machine: | |
services: | |
- postgresql | |
database: | |
override: | |
- createuser -s -d test | |
- createdb rsvptest | |
dependencies: |
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
-- like this? | |
import Language.PureScript.Bridge.PSTypes (psInt) | |
int64Bridge :: BridgePart | |
int64Bridge = typeName ^== "Int64" >> return psInt | |
mainBridge = defaultBridge <|> int64Bridge |
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
{-# OPTIONS_GHC -fno-warn-orphans #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE KindSignatures #-} | |
module Main | |
( main | |
) where |
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.Eff.JQuery as Q | |
import Prelude hiding (div) | |
import Control.Monad.Eff | |
import Control.Monad.Eff.Timer (TIMER) | |
data Message | |
= Success | |
| Failure | |
| Info |
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
# naive amortization implementation using enumerators. | |
# used for a possible answer to compare against candidate solutions | |
# intended to determine how a candidate breaks up a problem | |
# similar haskell implementation - https://gist.github.com/tippenein/8dceb2d50272ec24ce13fe83f3a57bfa | |
module Amortizable | |
include Enumerable |
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/env runhaskell | |
import Crypto.Hash | |
import Data.ByteString | |
import Prelude hiding (readFile) | |
import System.Environment (getArgs) | |
keyFor :: FilePath -> IO () | |
keyFor filepath = do | |
bytes <- readFile filepath |
NewerOlder