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
/** | |
* @name Flame | |
* @description jquery plugin to generate flame on a canvas element. | |
* Based on http://codepen.io/jackrugile/pen/Jbnpv | |
* @copyright (c) 2015 wassname | |
* @license: MIT | |
*/ | |
;(function ( $, window, document, undefined ) { | |
var pluginName = "flame"; |
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
/** | |
* Lodash mixins for combinatorics | |
* by: wassname & visangela | |
* url: https://gist.github.com/wassname/a882ac3981c8e18d2556/edit | |
* lodash contrib issue: https://github.com/node4good/lodash-contrib/issues/47 | |
* lic: same as lodash | |
* Inspired by python itertools: https://docs.python.org/2.7/library/itertools.html | |
* | |
* Usage: | |
* permutations([0,1,2],2) // [[0,1],[0,2],[1,0],[1,2],[2,0],[2,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
// use lodash and es6 to invert a Object by subvalues. This let's you catalouge subvalues by keys | |
/** | |
* inverts a object by many values | |
* e.g. invertByMany({ 'a': [1,2,3], 'b': [1], c:[2]}) | |
* // {"1":["a","b"],"2":["a","c"],"3":["a"]} | |
**/ | |
var invertByMany=(dataObj)=> | |
_.transform(dataObj, (result, values, key)=> | |
_.map(values,subvalue=> |
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
/** | |
Put links to injectable scripts in the cdns array. Try searching on cdnjs.com | |
but if you need the latest you can use the github version via https://rawgit.com/. | |
This start with // so they word on https and http. | |
They are not minified so comment are visible during development. | |
**/ | |
var cdns = [ | |
/* polyfill */ |
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
/* | |
Importing natural into webpack (the node nlp toolkit) | |
This is just copy of natural's index.js with some exports commented out. | |
This way it works in webpack, however I haven't full tested it. | |
*/ | |
exports.SoundEx = require('natural/lib/natural/phonetics/soundex'); | |
exports.Metaphone = require('natural/lib/natural/phonetics/metaphone'); | |
exports.DoubleMetaphone = require('natural/lib/natural/phonetics/double_metaphone'); |
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
// using Math.random | |
Math.random().toString(36).slice(2) | |
// => "j9ix7gr3xw7iiww8nqkh5b3xr" |
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
/** | |
* eslint.recommended (annotated) | |
* ================ | |
* Annotated defaults based on eslint.recommended | |
* | |
* @author: wassname | |
* @license: MIT | |
* @website https://gist.github.com/wassname/4693303388396c5f074b10865a969b43 | |
* @date 2017-11-13T23:08 | |
* @eslint-version: 4.11.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
""" | |
See: https://github.com/sixty-north/segpy/issues/29 | |
This iherits it licence from segpy | |
This is for segpy commit: 91562fd | |
""" | |
import os | |
import sys | |
root = os.path.dirname(os.path.dirname(__file__)) | |
segpy_path=os.path.join(root,'segpy') |
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 {jStat} from 'jstat' | |
/** | |
* describe statistics of data | |
* like: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.describe.html | |
* @param {Object} data - e.g. {x:[1,2,3],y:[6,7,8]} | |
* @return {Object} - e.g. {x:{mean:2,...},y:{...}} | |
*/ | |
export function describe(data){ | |
var labels = { |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.