Silly English-test but with some new words for me.
Hard test for modals
http://www.grammarbank.com/modal-verbs-test.html
2016-09-11 Проверим, сколько продержатся 2 батарейки #GPultraPlus alkaline в мышке.
-- source https://gist.github.com/ali-abrar/080f8696c446c477b007 | |
import Reflex.Dom | |
import Data.Monoid | |
main :: IO () | |
main = mainWidgetWithHead headWidget bodyWidget | |
headWidget = do | |
elAttr "link" ("href" =: "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" <> "rel" =: "stylesheet" <> "type" =: "text/css") $ return () |
Silly English-test but with some new words for me.
Hard test for modals
http://www.grammarbank.com/modal-verbs-test.html
2016-09-11 Проверим, сколько продержатся 2 батарейки #GPultraPlus alkaline в мышке.
/a/ => char 'a'
/abcd/ => string "abcd"
sequence [ char 'a', char 'b', char 'c', char 'd' ]
(:) <$> char 'a' <*> string "bcd"
(++) <$> string "ab" <*> string "cd"
/[abcd]/ => oneOf "abcd"
/[^abcd]/ => noneOf "abcd"
/[a-z]/ => oneOf ['a'..'z']
http://www.paolocapriotti.com/assets/applicative.pdf
1.4 Example: applicative parsers The idea that monads are “too flexible” has also been explored, again in the context of parsing, by Swierstra and Duponcheel ([12]), who showed how to improve both performance and error-reporting capabilities of an embedded language for grammars by giving up some of the expressivity of monads. The basic principle is that, by weakening the monadic interface to that of an applicative functor (or, more precisely, an alternative
git clone https://github.com/ku-fpg/hermit
cd hermit
git checkout 'f0d7b767487'
cabal install --only-dep
cabal configure
cabal build
cabal install
##Building hmatrix on Windows 7
Replace minghc-7.10.2-x86_64\ghc-7.10.2\mingw
with
mingw
from x86_64-mingw32-gcc-4.6.3-release-c,c++,fortran-sjlj.zip
Here you have a full Fortran compiler, not shipped with minghc-7.10.2.
So you should have the following
$ gcc --version
gcc.exe (niXman's build) 4.6.3
module Families where | |
import System.Random | |
import Control.Monad | |
import Data.List | |
numPop = 20 | |
num = numPop `div` 2 | |
type Generation = [Pair] | |
data Pair = Pair {husband::Person, wife::Person, idFamily::Int} |
module Nptel_ass2_test_hspec where | |
import Nptel_ass2 | |
import Test.Hspec | |
main :: IO () | |
main = hspec $ do | |
describe "Assignment 2" $ do | |
describe "ramanujan" $ do | |
it "Test Case 1" $ do |
module Nptel_ass2_test_hunit | |
where | |
import Test.HUnit | |
import Test.Hspec | |
import Test.Hspec.Contrib.HUnit | |
-- Name of your file with the assignment | |
-- without trailing .hs | |
import Nptel_ass2 |
num48 = 999999999999999999999998999999999999999999999999 | |
strNum24 = replicate 47 '0' ++ show (10 ^ (58*48) `div` num48) | |
chunks _ [] = [] | |
chunks n xs = let (h, t) = splitAt n xs in h : chunks n t | |
result24 = putStr $ unlines $ map (unwords . chunks 24) $ chunks 48 strNum24 | |
-------- | |
fibs :: [Integer] | |
fibs = 0:1: zipWith (+) fibs (tail fibs) |