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 ScopedTypeVariables, TypeSynonymInstances, FlexibleInstances #-} | |
module FFT where | |
import Prelude hiding (length, sum, map, zipWith, (++), foldr, foldr1, or, | |
concat, concatMap, replicate, scanl, scanl1, scanr, null, | |
init, last, tail, head, filter, reverse, product, | |
maximum, zip, dropWhile) | |
import qualified Prelude as P | |
import Data.Complex | |
import Data.Vector |
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 rest_framework.generics as generic | |
import simplejson as json | |
from rest_framework.test import APIRequestFactory | |
from tutelary.models import Policy | |
from tutelary.mixins import PermissionRequiredMixin | |
from tutelary.decorators import permissioned_model | |
from django.db import models |
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
[seneca:~] $ ./tst.py | |
Making an A | |
Calling a.m1 | |
In A.m1 | |
In A._m2 | |
In A._m3 | |
Making an B | |
Calling b.m1 | |
In A.m1 | |
In A._m2 |
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 ScopedTypeVariables, GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} | |
module PrimeFFT where | |
import Prelude hiding (length, sum, map, zipWith, (++), foldr, foldr1, or, and, | |
concat, concatMap, replicate, scanl, scanl1, scanr, null, | |
init, last, tail, head, filter, reverse, product, | |
maximum, zip, dropWhile, enumFromTo, all, take) | |
import Data.List (sort, nub) | |
import qualified Prelude as P |
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 TypeSynonymInstances, FlexibleInstances #-} | |
import qualified Data.List as L | |
-- MATRIX ENTRIES | |
data Sign = P | M deriving (Eq, Show) | |
data Entry = Z | O Sign | W Sign Int Int deriving Eq | |
negS :: Sign -> Sign |
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 Main where | |
import Data.WAVE | |
import Prelude hiding (length, sum, map, zipWith, (++), foldr, concat, zip3, | |
replicate, concatMap) | |
import qualified Prelude as P | |
import Data.Complex | |
import Data.Vector | |
import Data.Bits | |
import System.Environment (getArgs) |
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 Prelude hiding (length, sum, map, zipWith, (++), foldr, concat) | |
import qualified Prelude as P | |
import Data.Complex | |
import Data.Vector | |
import Data.Bits | |
i :: Complex Double | |
i = 0 :+ 1 | |
omega :: Int -> Complex Double |
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 TypeSynonymInstances, FlexibleInstances #-} | |
import qualified Data.List as L | |
-- MATRIX ENTRIES | |
data Sign = P | M deriving (Eq, Show) | |
data Entry = Z | O Sign | W Sign Int Int deriving Eq | |
negS :: Sign -> Sign |
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 EmptyDataDecls #-} | |
{-# LANGUAGE NoImplicitPrelude #-} | |
module RingOscillator (main) where | |
import Language.Fay.FFI | |
import Language.Fay.Prelude | |
-- System parameters. |
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 Lorenz where | |
import Data.Default | |
data LzParam t = LzParam { sigma :: t, r :: t, b :: t } deriving (Eq, Show) | |
instance Floating t => Default (LzParam t) where | |
def = LzParam 10 28 (8/3) | |
lorenz :: Floating t => t -> [t] -> [t] |
NewerOlder