This file contains hidden or 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
package memoizer; | |
import memoizer.ConcurrentLRUCache; | |
class YCMemoizer { | |
interface F<R, A> { | |
R apply(A n); | |
} | |
interface F_F<R, A> { |
This file contains hidden or 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
package memoizer; | |
import java.util.Arrays; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.concurrent.ConcurrentLinkedQueue; | |
import java.util.concurrent.atomic.AtomicLong; | |
public class ConcurrentLRUCache { | |
private final int kCacheSize; | |
private final ConcurrentHashMap<Object, CachedValue> mMap; |
This file contains hidden or 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
; .emacs file | |
; Bhaskar Mookerji | |
; | |
; Started: Sunday, 3 October 2010 | |
;;; | |
;;; Static configuration stuff | |
;;; | |
(winner-mode 1) |
This file contains hidden or 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
(ns org.flausenhaus.rocksdb | |
"Idiomatic Clojure bindings for the C++ RocksDB library, an embedded | |
persistent key-value store for flash storage and server workloads based on | |
LevelDB. More details about RocksDB are given at | |
https://github.com/facebook/rocksdb/wiki/Rocksdb-Architecture-Guide. | |
The implementation here borrows heavily from Factual's clj-leveldb. | |
This namespace provides a few things: | |
0. Protocols/type definitions: byte serialization (IByteSerializable), | |
closeable sequences (CloseableSeq), and mutable |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am mookerji on github. | |
* I am mookerji (https://keybase.io/mookerji) on keybase. | |
* I have a public key whose fingerprint is E277 702B 9088 47A1 2228 5D2B A056 FAB1 7C28 EE91 | |
To claim this, I am signing this object: |
This file contains hidden or 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
%typemap(in) float value[ANY] (float temp[$1_dim0]) { | |
int i; | |
if (!PySequence_Check($input)) { | |
PyErr_SetString(PyExc_ValueError,"Expected a sequence"); | |
return NULL; | |
} | |
if (PySequence_Length($input) != $1_dim0) { | |
PyErr_SetString(PyExc_ValueError,"Size mismatch. Expected $1_dim0 elements"); | |
return NULL; | |
} |
This file contains hidden or 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
function generateDish() { | |
var ADJ_PROB = 0.5; | |
var STRUCTURE_PROB = 0.5; | |
var adjs = ["chilled", "fried", "smoked", "brined", "cultured", "farmer's", "pressed", "cured", "charred", "dill", "sweet", "corned", "kefir", "paprika", "pickled", "truffled", "black", "rye", "sour cream", "preserved", "burnt", "seeded", "dried"]; | |
var ingredients = ["cabbage", "chicken", "tongue", "cheese", "liver", "sturgeon", "chard", "tuna", "beef", "radish", "mushroom", "trout", "carrot", "yoghurt", "lard", "bone marrow", "tripe", "bottarga", "egg", "catfish", "ramp", "tendon", "greens", "fennel", "chicories", "bonito", "potato", "garlic", "mussel", "nettle", "herring", "sardine", "walnut", "plum"]; | |
var structures = ["croquettes", "melt", "stew", "soup", "slab", "bread", "butter", "pickles", "dip", "dumplings", "broth", "tartare", "loin", "crackers", "cake", "steak", "flatbread", "toast"]; | |
var dish = ""; | |
if (_.random(0, 100) < ADJ_PROB * 100) { | |
dish += _.sample(adjs) + " "; | |
} |
This file contains hidden or 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 Test.QuickCheck | |
import Test.QuickCheck.Instances.Maybe | |
import Test.QuickCheck.Monadic | |
instance Arbitrary LogLevel where | |
arbitrary = do | |
n <- choose (0, 4) :: Gen Int | |
return $ case n of | |
0 -> LevelDebug | |
1 -> LevelInfo |
This file contains hidden or 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
# Copyright (C) 2015 Swift Navigation Inc. | |
# Contact: Engineering <[email protected]> | |
# | |
# This source is subject to the license found in the file 'LICENSE' which must | |
# be be distributed together with this source. All other rights reserved. | |
# | |
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, | |
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED | |
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. |
This file contains hidden or 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
GST - GNSS Pseudorange Error Statistics | |
1 2 3 4 5 6 7 8 | |
| | | | | | | | | |
$--GST,hhmmss.ss,x.x,x.x,x.x,x.x,x.x,x.x,x.x*hh<CR><LF> | |
1. UTC time of the GGA or GNS fix associated with this sentence. | |
2. RMS value of the standard deviation of the range inputs to | |
the navigation process. Range inputs include pseudoranges & | |
DGNSS corrections. | |
3. Standard deviation of semi-major axis of error ellipse (meters) | |
4. Standard deviation of semi-minor axis of error ellipse (meters) |
OlderNewer