SELECT
file.project,
COUNT(*) as total_downloads,
FROM
TABLE_DATE_RANGE(
[the-psf:pypi.downloads],
TIMESTAMP("20160114"),
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
var MyComponent = Factory({ | |
willMount: function(element, context) { | |
console.log('component mounted', element.tagName); | |
}; | |
willUnmount: function(element, context) { | |
console.log('component unmount', element.tagName); | |
}; | |
view: function() { |
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
m.callableComponent = function (componentObj) { | |
var componentFn = function (props, content) { | |
return m.component(componentFn, props, content) | |
} | |
if (componentObj) { | |
for (var prop in componentObj) { | |
componentFn[prop] = componentObj | |
} | |
} | |
return componentFn |
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
/* bling.js */ | |
window.$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function (name, fn) { | |
this.addEventListener(name, fn); | |
} | |
NodeList.prototype.__proto__ = Array.prototype; |
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
import six | |
import inflection | |
import marshmallow as ma | |
class Model(object): | |
def __init__(self, **kwargs): | |
self._schema = self.Schema() | |
self.load(**kwargs) |
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
#!/usr/bin/env bash | |
# dontforget | |
# Description: A stupid script for short term reminders in bash | |
# Requires: espeak, mpg123, notify-send, ogg123 (vorbis-tools) | |
# Source: http://brettterpstra.com/2016/01/22/quick-reminders-from-terminal | |
# Usage: | |
# | |
# Arguments just need to contain a number and a bunch of words. | |
# | |
# The number can be anywhere in the arguments, but there shouldn't |
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
# Copyright (c) 2016-2018 Ming Qin (覃明) <https://github.com/QinMing> | |
# Open source under MIT LICENSE. | |
lazy_load() { | |
# Act as a stub to another shell function/command. When first run, it will load the actual function/command then execute it. | |
# E.g. This made my zsh load 0.8 seconds faster by loading `nvm` when "nvm", "npm" or "node" is used for the first time | |
# $1: space separated list of alias to release after the first load | |
# $2: file to source | |
# $3: name of the command to run after it's loaded | |
# $4+: argv to be passed to $3 |
Not for everyone. Each programmer has their own appreciation of what is good coding music.
(From most influential to least)
React Fiber is an ongoing reimplementation of React's core algorithm. It is the culmination of over two years of research by the React team.