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
__author__ = 'davide' | |
import sys | |
import random | |
import itertools as it | |
import operator | |
from functools import lru_cache | |
from collections import Counter | |
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
__author__ = "davide" | |
import struct | |
import socket | |
import argparse | |
import sys | |
from datetime import datetime | |
import time | |
from collections import defaultdict | |
from signal import signal, SIGINT, SIG_IGN |
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
__author__ = 'Kami' | |
from collections import defaultdict | |
import itertools as it | |
class MappingError(Exception): | |
pass | |
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 TM.TM where | |
import Control.Monad.State (State, evalState, get, put) | |
import Control.Monad.Trans (lift) | |
import Control.Monad.Trans.Writer (WriterT, runWriterT, tell) | |
import Data.List (intercalate, nub, (\\)) | |
import qualified Data.Map as Map (Map, fromList, keys, lookup, | |
notMember, null, union) | |
newtype Tape = Tape { tapeList :: [CellContent] } |
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
__author__ = 'davide' | |
import matplotlib.pyplot as plt | |
from collections import defaultdict | |
import numpy as np | |
from datetime import datetime, timedelta | |
import pandas as pd | |
from statsmodels.tsa.vector_ar.var_model import VAR | |
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 ProvaGL where | |
import Control.Monad | |
import Data.IORef (IORef, newIORef) | |
import Graphics.UI.GLUT | |
points :: Int -> [(GLfloat,GLfloat,GLfloat)] | |
points n = [ (sin (2*pi*k/n'), cos (2*pi*k/n'), 0) | k <- [1..n'] ] | |
where n' = fromIntegral n |
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 ProveGL.Clock where | |
import Data.IORef | |
import Data.Time.LocalTime | |
import Graphics.UI.GLUT | |
applyTo :: (a, a) -> (a -> b) -> (b, b) | |
applyTo (x, y) f = (f x, f y) | |
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
{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} | |
module CF.CF where | |
import Control.Arrow | |
import Control.Monad | |
import Control.Monad.Error | |
import Data.Char | |
import Data.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
module Change where | |
import Control.Arrow ((&&&)) | |
import Data.Function (on) | |
import Data.List (group) | |
-- Coin datatype | |
data Coin = OneCent | TwoCents | FiveCents | | |
TenCents | TwentyCents | FiftyCents | |
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 asyncio | |
import os | |
import pathlib | |
import aiohttp | |
import bs4 | |
__author__ = 'Davide Canton' |
OlderNewer