Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
// Chrome extension 'content scripts' run in a sandboxed 'isolated world' | |
// (http://code.google.com/chrome/extensions/content_scripts.html#execution-environment). | |
// However, there are ways to get out and execute js code in the page | |
// context. Google searching revealed the following ways: | |
//////////////////////////////////////////////////////////////////////////////// | |
// http://blog.afterthedeadline.com/2010/05/14/how-to-jump-through-hoops-and-make-a-chrome-extension/ | |
// it looks like jQuery must be loaded by the content-script | |
jQuery('body').append('<script type="text/javascript">(function(l) { | |
var res = document.createElement('SCRIPT'); |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
--- | |
# ^^^ YAML documents must begin with the document separator "---" | |
# | |
#### Example docblock, I like to put a descriptive comment at the top of my | |
#### playbooks. | |
# | |
# Overview: Playbook to bootstrap a new host for configuration management. | |
# Applies to: production | |
# Description: | |
# Ensures that a host is configured for management with Ansible. |
<?php | |
function cidr_match($ip, $ranges) | |
{ | |
$ranges = (array)$ranges; | |
foreach($ranges as $range) { | |
list($subnet, $mask) = explode('/', $range); | |
if((ip2long($ip) & ~((1 << (32 - $mask)) - 1)) == ip2long($subnet)) { | |
return true; | |
} | |
} |
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |
from __future__ import division | |
from numpy.fft import rfft | |
from numpy import argmax, mean, diff, log | |
from matplotlib.mlab import find | |
from scipy.signal import blackmanharris, fftconvolve | |
from time import time | |
import sys | |
try: | |
import soundfile as sf | |
except ImportError: |