Skip to content

Instantly share code, notes, and snippets.

View DexGroves's full-sized avatar

DG DexGroves

  • London
View GitHub Profile

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@etienne87
etienne87 / pg-pong.py
Last active October 3, 2021 06:36 — forked from karpathy/pg-pong.py
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
from chainer import cuda
import cupy as cp
import time, threading
#backend
@karpathy
karpathy / pg-pong.py
Created May 30, 2016 22:50
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" 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
@quartox
quartox / plotInteractions.R
Created April 14, 2016 16:15
Using plotly to create 3d partial dependence plots for variable interactions in a gbm model.
suppressMessages(library("gbm"))
suppressMessages(library("plotly"))
PlotInteraction <- function(model, interactingVariables) {
interactionEffect <- .ComputeInteractionEffect(model, interactingVariables)
.PlotInteractionSurface(interactionEffect, interactingVariables)
}
.PlotInteractionSurface <- function(interactionEffect, interactingVariables) {
xAxis <- .GetXAxis(interactionEffect)
@bearfrieze
bearfrieze / comprehensions.md
Last active December 23, 2023 22:49
Comprehensions in Python the Jedi way

Comprehensions in Python the Jedi way

by Bjørn Friese

Beautiful is better than ugly. Explicit is better than implicit.

-- The Zen of Python

I frequently deal with collections of things in the programs I write. Collections of droids, jedis, planets, lightsabers, starfighters, etc. When programming in Python, these collections of things are usually represented as lists, sets and dictionaries. Oftentimes, what I want to do with collections is to transform them in various ways. Comprehensions is a powerful syntax for doing just that. I use them extensively, and it's one of the things that keep me coming back to Python. Let me show you a few examples of the incredible usefulness of comprehensions.

@EderSantana
EderSantana / CATCH_Keras_RL.md
Last active June 22, 2024 17:07
Keras plays catch - a single file Reinforcement Learning example
@bishboria
bishboria / springer-free-maths-books.md
Last active June 8, 2024 06:39
Springer made a bunch of books available for free, these were the direct links
@nylki
nylki / char-rnn recipes.md
Last active March 16, 2024 15:13
char-rnn cooking recipes

do androids dream of cooking?

The following recipes are sampled from a trained neural net. You can find the repo to train your own neural net here: https://github.com/karpathy/char-rnn Thanks to Andrej Karpathy for the great code! It's really easy to setup.

The recipes I used for training the char-rnn are from a recipe collection called ffts.com And here is the actual zipped data (uncompressed ~35 MB) I used for training. The ZIP is also archived @ archive.org in case the original links becomes invalid in the future.

@levi
levi / riot_esports_api.md
Last active July 8, 2024 22:51
Riot LoL eSports Unofficial API Documentation
@andreineculau
andreineculau / 1.pre.sh
Last active October 26, 2016 13:52
Jenkins - kill all subprocesses in the pre- or post-build phase
set +x
# Add this as the 1st build Exec shell
# Only for situations where you have 1 and only 1 executor per machine
# And you don't care about processes being left running after the job run ends
# Look for processes that have a BUILD_ID env var
# that is NOT the same as the current job's BUILD_ID
# nor same as dontKillMe
echo "Killing orphan spawned processes..."