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> | |
<html> | |
<head> | |
<title>d3.js example | circle packing in a rectangle</title> | |
<script src="http://d3js.org/d3.v2.js"></script> | |
<style type="text/css"> | |
</style> | |
</head> | |
<body> | |
<div id="canvas"></div> |
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
#!/usr/bin/env bash | |
TMPFILE=$(mktemp) | |
trap "rm $TMPFILE" exit | |
set -x | |
set -e | |
error_and_exit() { | |
echo -e "$(basename $0): $1" |
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
(executable (name test_rng) (libraries async mirage-crypto-rng-async) (preprocess (pps ppx_jane))) |
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 String = StringLabels | |
type t = Bytes.t | |
external unsafe_get_64 : Bytes.t -> int -> int64 = "%caml_string_get64u" | |
external unsafe_set_64 : Bytes.t -> int -> int64 -> unit = "%caml_string_set64u" | |
let pp_hum fmt t = | |
Printf.fprintf fmt "x%.16Lx" (unsafe_get_64 t 0); | |
Printf.fprintf fmt "x%.16Lx" (unsafe_get_64 t 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
#include <assert.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <netinet/ip.h> |
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
OASISFormat: 0.4 | |
Name: packbug | |
Plugins: META (0.4), DevFiles (0.4) | |
BuildTools: ocamlbuild | |
Authors: garbage | |
Version: garbage | |
License: PD | |
Synopsis: garbage |
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
# twitter1.json | |
┌─────────────────────────┬──────────┬────────────┬──────────┬──────────┬─────────┬──────────┬───────────────┬──────────┬──────────┬─────────────────┬────────────┐ | |
│ Name │ Time/Run │ mWd/Run │ mjWd/Run │ Prom/Run │ mGC R^2 │ mGC/Run │ 95ci │ mjGC R^2 │ mjGC/Run │ 95ci │ Percentage │ | |
├─────────────────────────┼──────────┼────────────┼──────────┼──────────┼─────────┼──────────┼───────────────┼──────────┼──────────┼─────────────────┼────────────┤ | |
│ twitter1: angstrom-json │ 16.12us │ 7_590.08w │ 10.25w │ 10.25w │ 1.00 │ 28.95e-3 │ -0.06% +0.06% │ 0.20 │ 0.09e-3 │ -21.97% +22.24% │ 75.47% │ | |
│ twitter1: ezjsonm │ 21.35us │ 11_403.10w │ 17.20w │ 17.20w │ 1.00 │ 43.50e-3 │ -0.06% +0.06% │ 0.21 │ 0.13e-3 │ -20.83% +21.49% │ 100.00% │ | |
│ twitter1: yojson │ 8.44us │ 652.00w │ │ │ 1.00 │ 2.49e-3 │ -0.37% +0.37% │ │ │ │ 39.52% │ | |
└─────────────────────── |
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
$ ./pure_benchmark.native -q 30 +time # 4.02.3 | |
Estimated testing time 1m (2 benchmarks x 30s). Change using -quota SECS. | |
┌──────┬──────────┬──────────┬───────────────┬─────────┬──────────┬──────────┬────────────┐ | |
│ Name │ Time R^2 │ Time/Run │ 95ci │ mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │ | |
├──────┼──────────┼──────────┼───────────────┼─────────┼──────────┼──────────┼────────────┤ | |
│ json │ 1.00 │ 21.16ms │ -0.59% +0.62% │ 18.67Mw │ 239.28kw │ 239.28kw │ 47.53% │ | |
│ http │ 1.00 │ 44.52ms │ -0.28% +0.29% │ 32.01Mw │ 65.11kw │ 65.11kw │ 100.00% │ | |
└──────┴──────────┴──────────┴───────────────┴─────────┴──────────┴──────────┴────────────┘ | |
$ ./pure_benchmark.native -q 30 +time # 4.03.0+flambda | |
Estimated testing time 1m (2 benchmarks x 30s). Change using -quota SECS. |
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 Permutation | |
( permute -- :: RandomGen g => [a] -> g -> ([a], g) | |
, permuteST -- :: RandomGen g => [a] -> g -> ST s ([a], g) | |
, permuteIO -- :: [a] -> IO [a] | |
, unsafePermute -- :: [a] -> [a] | |
) where | |
import Control.Monad ( foldM ) | |
-- N.B. Unsafe operations have been deprecated in the original module and have | |
-- been moved to Control.Monad.ST.Unsafe. |
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
var g = svg.selectAll('g') | |
.data(/* the data */) | |
g.enter().append('circle') | |
g.selectAll('circle') | |
.attr('r', function(d) { /* radius */ }) |
NewerOlder