graphql
hero {
name
friends {
name
}
}
import binascii | |
import sqlite3 | |
import collections | |
import math | |
import re | |
RE_SPLIT = re.compile(r'[^A-Za-z0-9_]+') | |
def tokenize(s): | |
# this is super basic and should be replaced with a real tokenizer |
#!/bin/bash | |
set -euo pipefail | |
CONTAINER="$(pwd | sha256sum | awk '{print $1}')" | |
if docker inspect "$CONTAINER" 2> /dev/null > /dev/null; | |
then | |
docker start "$CONTAINER" -ai | |
else | |
docker run --name="$CONTAINER" -v $(pwd):/root -w /root -ti ubuntu bash | |
fi |
import { FSWatcher } from "chokidar"; | |
import { Project, ProjectOptions } from "ts-morph"; | |
import invariant from "invariant"; | |
interface TsMorphWatcherFsEvent { | |
type: "add" | "unlink" | "change"; | |
path: string; | |
} | |
type TsMorphWatcherEvent = TsMorphWatcherFsEvent | { type: "ready" }; |
hero {
name
friends {
name
}
}
I hereby claim:
To claim this, I am signing this object:
import time | |
class Bucket(object): | |
def __init__(self, max_amount, refill_time, refill_amount): | |
self.max_amount = max_amount | |
self.refill_time = refill_time | |
self.refill_amount = refill_amount | |
self.reset() | |
def _refill_count(self): |
To be clear we continue to run many Redis services in our production environment. It’s a great tool for prototyping and small workloads. For our use case however, we believe the cost and complexity of our setup justifies urgently finding alternate solutions.
'use strict'; | |
var React = require('react'); | |
var emptyFunction = require('../../jslib/emptyFunction'); | |
var throttle = require('lodash.throttle'); | |
var listening = false; | |
var instances = []; |
function makeStyle(defaults, tagName) { | |
tagName = tagName || 'div'; | |
var Style = React.createClass({ | |
getDefaultProps: function() { | |
return assign({}, defaults); | |
}, | |
render: function() { | |
var style = assign({}, this.props); | |
delete style.children; |
var Style = React.createClass({ | |
render: function() { | |
var style = assign({}, this.props); | |
delete style.children; | |
return React.createElement( | |
'div', | |
{style: style, children: this.props.children} | |
); | |
} |