- git
- tmux
- font: SourceCodePro
- emacs + plugins for python/git
- Jupyter
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 <array> | |
#include <iostream> | |
#include <iomanip> | |
namespace { | |
template <typename T, std::size_t N> | |
auto print_array(std::array<T, N> a) { | |
std::cout << "array: |"; | |
for (auto const& e : a) { | |
std::cout << std::setw(2) << e << "|"; |
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 <algorithm> | |
#include <optional> | |
#include <type_traits> | |
#include <unordered_map> | |
#include <vector> | |
#include <cstdio> | |
// http://tristanbrindle.com/posts/a-quicker-study-on-tokenising/ | |
template <typename Iterator, typename Lambda> |
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 <tuple> | |
// Macro to declare elements of an `enum class` | |
#define DEFINE_ENUM_TYPE(type, id) type = id, | |
// Declare currencies | |
#define CURRENCIES(code) \ | |
code(USD, 0) \ | |
code(EUR, 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
-- A gentle introduction to Haskell 98 | |
import Test.QuickCheck | |
import Data.List | |
---------------------------------------------- | |
-- Chapter 2: Values, Types, and Other Goodies | |
data Tree a = Leaf a | Branch (Tree a) (Tree 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
<!DOCTYPE html> | |
<meta charset="utf-8"> <meta name="viewport" content="width=device-width"> | |
<body> | |
<script src="https://d3js.org/d3.v3.min.js"></script> | |
<script src="https://d3js.org/topojson.v1.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/datamaps/0.5.8/datamaps.all.js"></script> | |
<div id="pnlmap" style="height: 100%; width: 100%;"></div> | |
<script> |
<!DOCTYPE html>
<html>
<head>
<title>WebSocket demo</title>
</head>
<body>
<div style="width: 600px; height: 800px;"><canvas id="myChart"></canvas></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
Elm HTML nodes: element [attributes] [children]
, example: h1 [] [text "My Title"]
+------> Model -----+
| |
| |
Update v
^ View
| |
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
/* Simple benchmarking library | |
- Run `f()` in increasing batch sizes | |
- report the estimated time of `f()` by doing a linear regression | |
- Output a vega-lite JSON file for visualization | |
Inspiration: | |
- https://blog.janestreet.com/core_bench-micro-benchmarking-for-ocaml/ | |
- http://www.serpentine.com/blog/2009/09/29/criterion-a-new-benchmarking-library-for-haskell/ | |
- https://vega.github.io/vega-lite/examples/bar.html | |
*/ |
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 <fstream> | |
#include <iostream> | |
#include "kaitai/kaitaistream.h" | |
#include "exif_le.h" | |
#include "exif.h" | |
#include "jpeg.h" | |
#include <map> | |
#include <string> |