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
{"cc": "", "bookmark": "", "venus-mars": "", "arrow-circle-o-down": "", "comment-o": "", "long-arrow-left": "", "arrow-right": "", "delicious": "", "chevron-circle-left": "", "bullhorn": "", "outdent": "", "jpy": "", "drupal": "", "hdd-o": "", "hand-o-left": "", "pinterest": "", "plane": "", "question": "", "child": "", "circle-o": "", "italic": "", "meanpath": "", "subway": "", "google-plus": "", "angle-up": "", "star": "", "star-half-empty": "", "facebook-official": "", "youtube-square": "", "rss": "", "toggle-off": "", "list-ol": "", "dot-circle-o": "", "copyright": "", "user": "", "key": "", "minus-square-o": "", "mobile": "", "table": "", "columns": "", "bolt": "", "fighter-jet": "& |
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 os | |
import re | |
import gzip | |
import base64 | |
import json | |
from glob import glob | |
from argparse import ArgumentParser | |
from KnoDB.crawler.scc import case_parser | |
from KnoDB.crawler import bcca |
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
// The default comparator is for any values that can be | |
// compared with '==', '<', '<=', '>', '>='. | |
function defaultComparator(candidate, target) { | |
if (target < candidate) { | |
return -1 | |
} else if (target > candidate) { | |
return 1 | |
} else { | |
return 0 | |
} |
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
function keyframeInterpolate(keyframes, time, timing, lib) { | |
const first = 0 | |
const last = keyframes.length - 1 | |
// Clamp time to [0, 1] | |
time = Math.max(Math.min(time, 1), 0) | |
if (!Array.isArray(keyframes) || !keyframes.length) { | |
return lib.zero() | |
} |
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
// PriorityQueue.js MIT License © 2014 James Abney http://github.com/jabney | |
(function(ex) { | |
'use strict'; | |
// --------------------------------------------------------------- | |
// PriorityQueue Constructor | |
// A heap-based priority queue. | |
// --------------------------------------------------------------- | |
ex.PriorityQueue = function PriorityQueue(compare) { | |
var compare = compare || function(a, b) { return a < b; }, |
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
/** | |
* Implement a simplified createSelector function mimicking the reselect module. | |
* | |
* Memoizes the result of a function called with a state object as its argument. | |
* The given function is only called when state values change. | |
*/ | |
/** | |
* A resolver returns a value from a state object (key/value pairs). | |
* |
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
/** | |
* Minimal implementation of react-redux style provider and connect function. | |
*/ | |
import React, { useState, useEffect, useContext } from 'react' | |
const StoreContext = React.createContext(null) | |
/** | |
* Wraps root component for providing store context, e.g., | |
* |
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 <chrono> | |
#include <iomanip> | |
#include <iostream> | |
#include <numeric> | |
#include <thread> | |
#include <vector> | |
using namespace std; |
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
/** | |
* An experimental view that can iterate over a subset of an array. | |
* - Not unit tested, there are undoubtedly bugs. | |
*/ | |
"use strict"; | |
const clamp = (min: number, max: number, value: number) => { | |
return Math.min(max, Math.max(min, value)); | |
}; |
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
interface IValueCache<T> { | |
get: () => T; | |
invalidate: () => void; | |
} | |
/** | |
* A simple cache that invalidates based on a timer. Every access of | |
* the value will refresh the timer. | |
* | |
* Even this simple class can be broken up into useful pieces and then |