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
with import <nixpkgs> {}; | |
stdenv.mkDerivation rec { | |
name = "openmp-${version}"; | |
version = "24.6.17"; | |
src = fetchgit { | |
url = "http://llvm.org/git/openmp"; | |
rev = "81a7c91728a2c763d6ecbb9374a0bbf413e43ac4"; | |
#date: "2017-04-25T19:04:07+00:00"; | |
sha256 = "06641656wckpg4va1fn1dz3b6irr525vw699qallhf095h16gskm"; |
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 <random> | |
float randFloat(float low, float high) { | |
thread_local static std::random_device rd; | |
thread_local static std::mt19937 rng(rd()); | |
thread_local std::uniform_real_distribution<float> urd; | |
return urd(rng, decltype(urd)::param_type{low,high}); | |
} |
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/python | |
import sys | |
import json | |
from collections import OrderedDict | |
from operator import itemgetter | |
def getWordMap(filename): | |
wordMap = dict() | |
totalWords = 0 |