- Control.Concurrent.SampleVar
- Data.HashTable
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
def primes(limit): | |
""" | |
generate lazy (finite) sequence of primes below limit | |
>>> list(primes(100)) | |
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97] | |
>>> sum(primes(1000*1000)) | |
37550402023 | |
""" |
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 Text.JSON | |
import Text.JSON.Types | |
import Control.DeepSeq | |
instance NFData JSValue where | |
rnf JSNull = () | |
rnf (JSBool _) = () | |
rnf (JSRational b _) = rnf b | |
rnf (JSString s) = rnf s | |
rnf (JSArray a) = rnf a |
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 Control.Exception | |
import Control.Monad | |
import Data.Maybe | |
import Data.Version | |
import Distribution.PackageDescription (PackageDescription(..), HookedBuildInfo, GenericPackageDescription(..)) | |
import Distribution.Package (PackageIdentifier(..)) | |
import Distribution.Simple (defaultMainWithHooks, simpleUserHooks, UserHooks(..)) | |
import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(..)) | |
import Distribution.Simple.Setup (BuildFlags(..), ConfigFlags(..)) | |
import Distribution.Simple.Utils (die) |
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
#!/bin/bash | |
( while read L | |
do echo $L > /tmp/pubkey | |
printf "%-16s => " $(cut -f 3 -d ' ' /tmp/pubkey) | |
ssh-keygen -l -f /tmp/pubkey | |
done | |
rm /tmp/pubkey | |
) < .ssh/authorized_keys |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>criterion report</title> | |
<!--[if lte IE 8]> | |
<script language="javascript" type="text/javascript"> | |
if(!document.createElement("canvas").getContext){(function(){var z=Math;var K=z.round;var J=z.sin;var U=z.cos;var b=z.abs;var k=z.sqrt;var D=10;var F=D/2;function T(){return this.context_||(this.context_=new W(this))}var O=Array.prototype.slice;function G(i,j,m){var Z=O.call(arguments,2);return function(){return i.apply(j,Z.concat(O.call(arguments)))}}function AD(Z){return String(Z).replace(/&/g,"&").replace(/"/g,""")}function r(i){if(!i.namespaces.g_vml_){i.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML")}if(!i.namespaces.g_o_){i.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML")}if(!i.styleSheets.ex_canvas_){var Z=i.createStyleSheet();Z |
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.DeepSeq | |
import Control.Exception (evaluate) | |
import Criterion.Main | |
import qualified Data.ByteString.Char8 as B | |
import qualified Data.Text as T | |
import qualified Data.Text.Encoding as TE | |
import qualified Data.Text.ICU.Convert as TI |
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 MagicHash #-} | |
module Data.ByteString.Raw (RawByteString, empty, fromByteString, toByteString) where | |
import qualified Data.ByteString as B | |
import Data.ByteString.Internal | |
import GHC.Prim | |
import GHC.ForeignPtr | |
import GHC.Types | |
import System.IO.Unsafe (unsafePerformIO) |
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 CPP, BangPatterns, MagicHash, UnliftedFFITypes, UnboxedTuples, ScopedTypeVariables #-} | |
-- | Tests/Benchmarks for new GHC.Integer.GMP.Internals.{import,export}Integer primitives | |
import Control.Monad | |
import Criterion.Main | |
import Data.Bits | |
import Data.ByteString.Short.Internal (ShortByteString(SBS)) | |
import qualified Data.ByteString.Short.Internal as SBS | |
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
/dist/ |
OlderNewer