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
#ifndef WILSON_INTERVAL_H /* Prevent Multiple Inclusion */ | |
#define WILSON_INTERVAL_H | |
/* ========================================================================= ** | |
** WILSON BINOMIAL PROPORTION CONFIDENCE INTERVAL ** | |
** ========================================================================= ** | |
** Copyright (C) Jonah H. Harris <[email protected]> ** | |
** All Rights Reserved. ** | |
** ** | |
** Permission is hereby granted, free of charge, to any person obtaining a ** | |
** copy of this software and associated documentation files (the "Software") ** |
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
BEGIN; | |
/* | |
* The following is a SQL common table expression (CTE) port of the Apache | |
* Mahout implementation for calculating the raw log-likelihood ratio of two | |
* events. I needed it for a project and couldn't seem to find anything out | |
* there in pure SQL. While a procedural implementation would be preferred, | |
* this is portable to both SQLite (>= 3.35) and Postgres, which I'm using. | |
* | |
* NOTE: While this gist contains a port of the Mahout unit test, YMMV. | |
* |
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
--- | |
--- Created Created by Swav Swiac on 23/07/2015. | |
--- | |
--- Allows to run Redis Lua script in a debuggable environment resembling one provided by Redis | |
--- | |
--- Usage: | |
--- | |
--- local runner = require 'redis_runner'.connect(host, port) | |
--- | |
--- local KEYS = {} |
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 following is a JavaScript implementation of the Spark+Scala code | |
* snippets for performing recommendation dithering via an epsilon-based | |
* post-processing step using normally distributed random noise. | |
* | |
* Source: | |
* Hristakeva, M. (2015, November 12). Dithering. | |
* A Practical Guide to Building Recommender Systems. | |
* https://buildingrecommenders.wordpress.com/2015/11/11/dithering/ | |
*/ |
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
info: Welcome to Nodejitsu jonah.harris | |
info: jitsu v0.13.2, node v0.10.13 | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command deploy | |
info: Analyzing application dependencies in node ./app.js | |
warn: Local package version appears to be old | |
warn: The package.json version will be incremented automatically | |
warn: About to write /Users/jharris/Projects/node-reverse-geocoder/package.json | |
warn: Using '*' as a version for dependencies may eventually cause issues | |
warn: Use specific versions for dependencies to avoid future problems |
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 parseConnectString(str) { | |
var strLen = str.length; | |
var isFound = false; | |
var sb = []; | |
var par = []; | |
for (var jj = 0; jj < strLen; ++jj) { | |
var c = str[jj]; | |
if (' ' === c) |