I hereby claim:
- I am divinegod on github.
- I am divinegod (https://keybase.io/divinegod) on keybase.
- I have a public key whose fingerprint is FF3B 85F1 5FED 1BBE 4DE2 DAE7 4436 2922 E568 02FA
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
var h = require('virtual-dom/h'); | |
var diff = require('virtual-dom/diff'); | |
var patch = require('virtual-dom/patch'); | |
var createElement = require('virtual-dom/create-element'); | |
var _ = require('underscore'); | |
// 1: Create a function that declares what the DOM should look like | |
function render(count) { | |
var els = _(count).times(function(n) { return h('li', {}, [String(n), 'this has<html><b> in it']); }); | |
return h('div', {}, _.shuffle(els)); |
#!/usr/bin/env python3 | |
import re | |
split_regex = re.compile(r'\W').split | |
def ngram_word(n, text): | |
"""Returns n-grams from text as a list of strings | |
>>> ngram_word(3, 'Hello, world! rejoice and be happy') | |
['hello world rejoice', 'world rejoice and', 'rejoice and be', 'and be happy'] |
def kwargs_to_obj(**kwargs): | |
""" Return an object populated from a kwargs dict. | |
Useful for mapping html form post request to python object. | |
>>> kwargs_to_obj(**{'horse.age':23, 'horse.color': 'bleu', 'horse.legs[]': 'fl,fr,rl,rr'}) | |
{'horse': {'color': 'bleu', 'age': 23, 'legs': ['fl', 'fr', 'rl', 'rr']}} | |
""" | |
result = {} | |
for k, v in kwargs.items(): | |
name_path = k.split('.') |
var Logger = require('npmlog') | |
var express = require('express') | |
var app = express() | |
app.get('/', function(req, res) { | |
res.send('Hello') | |
}) | |
console.log('starting server') |