Skip to content

Instantly share code, notes, and snippets.

View qwo's full-sized avatar

Stanley Zheng qwo

View GitHub Profile
@bogger
bogger / deploy.prototxt
Last active January 20, 2025 06:23
GoogLeNet_cars
name: "GoogleNet"
input: "data"
input_dim: 10
input_dim: 3
input_dim: 224
input_dim: 224
# hierarchy 1
# conv -> relu -> pool -> lrn
@chrissimpkins
chrissimpkins / gist:5bf5686bae86b8129bee
Last active April 6, 2025 09:16
Atom Editor Cheat Sheet: macOS

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
@karpathy
karpathy / min-char-rnn.py
Last active May 19, 2025 10:44
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
#!/bin/bash
for i in `seq 1 7306`;
do
frame=$(printf '%06d' "$i")
echo $frame
curl "https://slack.com/api/chat.postMessage?token=SLACK_API_TOKEN&channel=CHANNEL_ID&username=Star%20Wars&text=http://starwars.toomanycooks.kitchen/out$frame.jpg&as_user=starwarsbot"
sleep 10
done
@afeld
afeld / civictech.md
Last active March 17, 2025 01:53
civic tech jobs in NYC (or remote)
@yunghoy
yunghoy / gist:a425f91824d26461bb2e3653bc56ebbf
Last active June 2, 2022 00:34
AMQP library (RabbitMQ) - async/await
alias babel-node='babel-node --presets stage-0'
------ RECV ------
// babel-node recv2.js "#"
// babel-node recv2.js "kern.*"
const amqp = require('amqplib');
const args = process.argv.slice(2);
if (args.length == 0) {
@Rich-Harris
Rich-Harris / footgun.md
Last active March 9, 2025 06:13
Top-level `await` is a footgun

Edit — February 2019

This gist had a far larger impact than I imagined it would, and apparently people are still finding it, so a quick update:

  • TC39 is currently moving forward with a slightly different version of TLA, referred to as 'variant B', in which a module with TLA doesn't block sibling execution. This vastly reduces the danger of parallelizable work happening in serial and thereby delaying startup, which was the concern that motivated me to write this gist
  • In the wild, we're seeing (async main(){...}()) as a substitute for TLA. This completely eliminates the blocking problem (yay!) but it's less powerful, and harder to statically analyse (boo). In other words the lack of TLA is causing real problems
  • Therefore, a version of TLA that solves the original issue is a valuable addition to the language, and I'm in full support of the current proposal, which you can read here.

I'll leave the rest of this document unedited, for archaeological

@lordnynex
lordnynex / app.go
Created September 22, 2016 22:18 — forked from Bochenski/app.go
Negroni golang mgo middleware example
package main
import (
"github.com/codegangsta/negroni"
"github.com/gorilla/context"
"github.com/unrolled/render"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"log"
"net/http"
@qwo
qwo / emoji.js
Last active May 17, 2017 09:22 — forked from beaugunderson/emoji.js
Scrape all emojis with descriptions from unicode.org/emoji/charts website
/*TODO Remove Tag when Done */
var request = require('request');
var cheerio = require('cheerio');
var fs = require('fs');
console.log('retrieving unicode table...');
request.get('http://unicode.org/emoji/charts/full-emoji-list.html', function (err, response, body) {
console.log('loading data...');
@inytar
inytar / Graphs 2016_12_16.ipynb
Last active January 30, 2022 01:03
Graphs 2016_12_16
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.