Skip to content

Instantly share code, notes, and snippets.

View shouldsee's full-sized avatar
👀

shouldsee

👀
View GitHub Profile
@shouldsee
shouldsee / docker-compose-systemd-unit.md
Last active October 7, 2022 08:29 — forked from mosquito/README.md
Add doker-compose as a systemd unit

Docker compose as a systemd unit

CANGELOG

  • 20221007: calls with -f to place all compose.yml in the same directory.

Content

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

@shouldsee
shouldsee / pg-pong.py
Created June 1, 2017 10:51 — 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
# 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