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
""" | |
Visualize a list of search suggestions as an ascii trie. | |
Inputs: | |
- searches: a list of strings, each representing a sentance | |
Usage: | |
>>>searches=[ | |
'online calculator', | |
'online photo editor', |
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
// 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
// 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
""" | |
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
/** | |
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 */ |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// ==UserScript== | |
// @name Facebook Mobile Timeline Cleaner | |
// @namespace https://github.com/wassname/fbmtimelinecleaner | |
// @include https://*m.facebook.com/*/allactivity* | |
// @require http://code.jquery.com/jquery-1.8.3.min.js | |
// @grant GM_xmlhttpRequest | |
// @grant GM_getValue | |
// @grant GM_setValue | |
// @version 0.40 | |
// ==/UserScript== |
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
""" | |
Load cmudict/CMU Pronouncing Dictionary as a dataset for keras | |
author: wassname | |
url : https://gist.github.com/wassname/ce0ac72c50832b0a27e67bd97ba36080 | |
""" | |
from keras.utils.data_utils import get_file | |
from sklearn.model_selection import train_test_split | |
import numpy as np |