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
const Utils = require('./utils'); | |
const Index = require('../search/index'); | |
const FILTERS = ['your','filter','fields','here']; | |
const Telemetry = { | |
// Middleware to start a span before the route controller | |
start : function(req, res, next) { | |
if(req && !req.span) { |
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
export NEURAL_HOST=$1 | |
if [ -z "$1" ] | |
then | |
export NEURAL_HOST=localhost | |
fi | |
node load_icecat.js --name icecat --files vectors/icecat.jsonl/ --host $NEURAL_HOST |
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
//---------------------------------------------------------- | |
//Gets the querystring value for the specified key | |
$.querystring = (function(key,url){ | |
url = url || window.location.search; | |
key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); | |
var regex = new RegExp("[\\?&]"+key+"=([^&#]*)"); | |
var results = regex.exec( url ); | |
return (!results)?"":decodeURIComponent(results[1].replace(/\+/g, " ")); | |
}).bind($); |
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
Admins-MacBook-Pro:apps max$ git clone https://github.com/SeaseLtd/rated-ranking-evaluator | |
Cloning into 'rated-ranking-evaluator'... | |
remote: Enumerating objects: 4224, done. | |
remote: Total 4224 (delta 0), reused 0 (delta 0), pack-reused 4224 | |
Receiving objects: 100% (4224/4224), 27.38 MiB | 11.37 MiB/s, done. | |
Resolving deltas: 100% (1204/1204), done. | |
Admins-MacBook-Pro:apps max$ cd rated-ranking-evaluator/ | |
Admins-MacBook-Pro:rated-ranking-evaluator max$ ls | |
CONTRIBUTING.md README.md rre-maven-archetype rre-server | |
LICENSE.md pom.xml rre-maven-plugin |
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(global){ | |
global.module = {}; | |
global.require = function(){}; | |
Object.defineProperty(global.module,'exports',{ | |
set:function(m) { | |
if (typeof m === 'function') { | |
var str = m.toString(); | |
var name = str.substring(9,str.indexOf('(')).replace(/\s+/,''); | |
global[name] = m; | |
} else if (typeof m === '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
#!/usr/bin/env node | |
var fs = require('fs'); | |
var cm = require('commonmark'); | |
var convert = function(markdown) { | |
var reader = new cm.Parser(); | |
var writer = new cm.HtmlRenderer(); | |
var parsed = reader.parse(markdown); | |
var result = writer.render(parsed); | |
return result; |
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(){ | |
var getColor = function(c) { | |
var temp = document.createElement("div"); | |
var color = {r:0,g:0,b:0,a:0}; | |
temp.style.color = c; | |
temp.style.display = "none"; | |
document.body.appendChild(temp); | |
var style = window.getComputedStyle(temp,null).color; | |
document.body.removeChild(temp); |
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
startups(0.265) | Previously: https://news.ycombinator.com/item?id=9990221 | |
religion(0.227) | Out of curiosity, why secular humanism vs existential nihilism? I don't think I'll switch sides and time soon, but if I did it would be to nihilism. | |
education(0.245) | Education and Healthcare: Two services which should not be offered by businesses seeking to make a profit. I think future generations will look back and ask: "What were they thinking?" | |
religion(0.203) | Also if the opposite sex thinks you're gay but you're straight, it's harder to attract them. |
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
Starting training using file 10m.txt | |
Vocab size: 305432 | |
Words in train file: 565170189 | |
Alpha: 0.000045 Progress: 99.91% Words/thread/sec: 107.57k | |
real 174m19.955s | |
user 1315m35.661s | |
sys 3m27.011s | |
--------------------------- |
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
#!/usr/bin/env node | |
var linestream = require('line-stream'); | |
var htmldecode = require('htmldec'); | |
var s = linestream(); | |
var numbers = "zero,one,two,three,four,five,six,seven,eight,nine".split(','); | |
var reletter = /[a-z_]/i; | |
var renumber = /[0-9]/; | |
var reclose = /\<\/[^\>]+\>/g; |
NewerOlder