(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
upstream lb-subprint { | |
ip_hash; | |
server 192.241.180.249:3222 weight=10 max_fails=3 fail_timeout=30s; # Reverse proxy to machine-1 | |
server 192.241.241.152:3222 weight=10 max_fails=3 fail_timeout=30s; # Reverse proxy to machine-2 | |
} | |
server { | |
listen 80; | |
server_name www.subprint.com subprint.com; |
CmdUtils.CreateCommand({ | |
name: "AES encrypt", | |
takes: {plaintext: noun_arb_text}, | |
modifiers: {key: noun_arb_text}, | |
icon: "chrome://ubiquity/skin/icons/sum.png", | |
description: "Encrypt the selected text", | |
execute: function( directObj, modifiers) | |
{ | |
if (modifiers.key.text.length <= 0) | |
displayMessage("No key has been enter selected."); |
// ------------------------------------------------------------------------- | |
// Filename: astar.h | |
// Version: 1.24 | |
// Date: 2002/03/08 | |
// Purpose: Provide template for a* algorythm | |
// (c) T.Frogley 1999-2002 | |
// ------------------------------------------------------------------------- | |
#ifndef ASTAR_H | |
#define ASTAR_H |
""" 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 |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# # # # # scheduled_job.rb - recurring schedules for delayed_job.rb # # # # # | |
# | |
# This file is version controlled at https://gist.github.com/ginjo/3688965 | |
# | |
# Forked from https://gist.github.com/kares/1024726 | |
# | |
# This is an enhanced version of the original scheduled_job.rb | |
# It was born out of the need to schedule a whole bunch of simple jobs. | |
# I started with the sample below and quickly found that I was repeating | |
# a lot of code. So I created the Delayed::Task pseudo-class that allows |
# | |
# Recurring Job using Delayed::Job | |
# | |
# Setup Your job the "plain-old" DJ (perform) way, include this module | |
# and Your handler will re-schedule itself every time it succeeds. | |
# | |
# Sample : | |
# | |
# class MyJob | |
# include Delayed::ScheduledJob |
# Tested on DelayedJob 2.1 | |
class MyRecurringDelayedJob | |
def perform | |
# ...some slow code | |
end | |
def success(job) | |
MyRecurringDelayedJob.schedule_job(job) | |
end |
feat: add hat wobble | |
^--^ ^------------^ | |
| | | |
| +-> Summary in present tense. | |
| | |
+-------> Type: chore, docs, feat, fix, refactor, style, or test. |