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 Prelude hiding (length, maximum, minimum, sum, map) | |
import Control.Applicative ((<$>)) | |
import Control.Monad | |
import Data.List (foldl') | |
import qualified Data.Map as M | |
import Foreign.C | |
import qualified Data.Vector.Generic as GV | |
import qualified Data.Vector.Unboxed as VU |
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
name: pca-2d | |
version: 0.1 | |
synopsis: Two-dimensional PCA example | |
license: BSD3 | |
author: Ian Ross | |
maintainer: ian@skybluetrades.net | |
copyright: Copyright (2014) Ian Ross | |
category: Data | |
build-type: Simple | |
cabal-version: >=1.8 |
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 Control.Applicative ((<$>)) | |
import Control.Monad (forM_, foldM, when) | |
import System.FilePath | |
import qualified Data.Array.Repa as Repa | |
import qualified Data.Array.Repa.Eval as Repa | |
import Data.Array.Repa.Repr.ForeignPtr (F) |
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 Prelude hiding (enumFromThenTo, length, map, mapM_, replicate, zipWith) | |
import Data.Vector hiding ((++)) | |
import System.Random | |
import System.IO | |
-- Number of sample points. | |
n :: Int | |
n = 10 |
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 Numeric | |
import Control.Applicative ((<$>)) | |
import System.FilePath | |
import Data.NetCDF | |
import Data.NetCDF.HMatrix | |
import Data.NetCDF.Vector | |
import Foreign.C |
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 Numeric | |
import Control.Applicative ((<$>)) | |
import Control.Monad | |
import System.FilePath | |
import Data.NetCDF | |
import Data.NetCDF.HMatrix | |
import Data.NetCDF.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
module Main where | |
import Control.Applicative ((<$>)) | |
import Control.Monad (forM_, zipWithM_) | |
import Data.List (intercalate) | |
import System.FilePath | |
import qualified Data.Vector.Storable as SV | |
import Data.NetCDF | |
import Data.NetCDF.HMatrix |
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 OverloadedStrings, TemplateHaskell, | |
QuasiQuotes, FlexibleContexts #-} | |
-- Yesod code to implement a form field based on the jQuery slider | |
-- widget defined at http://egorkhmelev.github.com/jslider | |
-- | |
-- File layout: we need access to the CSS and JavaScript files for the | |
-- slider plugin, along with the images used for theming the sliders. | |
-- If the CSS is in .../css/jquery.slider.min.css, then the image | |
-- files must be in .../img. A type class is provided to set up the |
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] |
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. |
OlderNewer