after = (ms, cb) -> setTimeout cb, ms
every = (ms, cb) -> setInterval cb, ms
Now we can say:
after 500, -> # do something...
Instead of:
setTimeout ->
| # -*- coding: utf-8 -*- | |
| import os | |
| import StringIO | |
| import hashlib | |
| try: | |
| from boto.s3.connection import S3Connection | |
| from boto.s3.key import Key | |
| except ImportError: | |
| raise ImproperlyConfigured, "Could not load Boto's S3 bindings." |
after = (ms, cb) -> setTimeout cb, ms
every = (ms, cb) -> setInterval cb, ms
Now we can say:
after 500, -> # do something...
Instead of:
setTimeout ->
| import time | |
| import networkx as nx | |
| from contextlib import contextmanager | |
| @contextmanager | |
| def hidden_nodes(G, nodes=None): | |
| import types | |
| if nodes is None: | |
| nodes = [] | |
| def successors_iter(G,n): |
| import time | |
| import networkx as nx | |
| from contextlib import contextmanager | |
| @contextmanager | |
| def hidden(G, nodes=None, edges=None): | |
| if nodes is None: | |
| nodes = [] | |
| if edges is None: | |
| edges = [] |
| @media only screen and (min-width: 320px) { | |
| /* Small screen, non-retina */ | |
| } | |
| @media | |
| only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px), | |
| only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px), | |
| only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px), |
| -- TLC - The Tiny Lua Cocoa bridge | |
| -- Note: Only tested with LuaJit 2 Beta 9 on x86_64 with OS X >=10.7.3 & iPhone 4 with iOS 5 | |
| -- Copyright (c) 2012, Fjölnir Ásgeirsson | |
| -- Permission to use, copy, modify, and/or distribute this software for any | |
| -- purpose with or without fee is hereby granted, provided that the above | |
| -- copyright notice and this permission notice appear in all copies. | |
| -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| function cartesianProductOf(){ | |
| return _.reduce(arguments, function(mtrx, vals){ | |
| return _.reduce(vals, function(array, val){ | |
| return array.concat( | |
| _.map(mtrx, function(row){ return row.concat(val); }) | |
| ); | |
| }, []); | |
| }, [[]]); | |
| } |
| function cartesianProductOf(){ | |
| return _.reduce(arguments, function(mtrx, vals){ | |
| return _.reduce(vals, function(array, val){ | |
| return array.concat( | |
| _.map(mtrx, function(row){ return row.concat(val); }) | |
| ); | |
| }, []); | |
| }, [[]]); | |
| } |
| var el = ( function () { | |
| var doc = document; | |
| var directProperties = { | |
| 'class': 'className', | |
| className: 'className', | |
| defaultValue: 'defaultValue', | |
| 'for': 'htmlFor', | |
| html: 'innerHTML', |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |