Skip to content

Instantly share code, notes, and snippets.

⚔️
Load average: 233.0

Alphadelta14

⚔️
Load average: 233.0
  • AlphaServ Computing Solutions
  • Massachusetts, USA
Block or report user

Report or block Alphadelta14

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View input.js
var myAnonymous = (b, c) => b*c;
function makeSummer(a, b=2, c=3){
return (a) => a+b+c;
}
function listPrinter(...d){
console.log(d);
}
@Alphadelta14
Alphadelta14 / product.js
Created Aug 22, 2015
Node.JS Sugar Cartesian Product
View product.js
require('sugar');
export.product = function(){
var pools = Array.create(arguments);
return pools.reduce(function(accumulated, next){
return accumulated.map(function(prefix){
return next.map(function(suffix){
return prefix.concat([suffix]);
View Catchrate Lists
In [4]: sorted([(p.personal.catchrate, p.natid) for p in pokemon])
Out[4]:
[(0, 0),
(3, 144),
(3, 145),
(3, 146),
(3, 150),
(3, 243),
(3, 244),
(3, 245),
View collections.js
// `mongo 127.0.0.1/MMApp collections.js`
function size(size) {
var unit, res, factor=1;
['B', 'KB', 'MB', 'GB', 'TB'].every(function(unit_) {
factor_ = factor*1024;
res = size/factor_;
unit = unit_;
if(isNaN(res) || res < 1) {
return false;
@Alphadelta14
Alphadelta14 / setup.py
Created Aug 25, 2015
Working alternate install location
View setup.py
from setuptools.command.install import install
from setuptools import setup
class root_usr_install(install):
prefix = '/local'
def __init__(self, *args, **kwargs):
install.__init__(self, *args, **kwargs)
You can’t perform that action at this time.