I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.
if ufw is not installed by default be sure to install it first.
""" | |
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) |
""" | |
This script demonstrates the use of nested transactions in SQLAlchemy, including | |
a workaround for an issue with the SQLite backend. | |
References: | |
http://docs.sqlalchemy.org/en/latest/orm/session_transaction.html#using-savepoint | |
http://docs.sqlalchemy.org/en/latest/dialects/sqlite.html#serializable-isolation-savepoints-transactional-ddl | |
""" | |
from sqlalchemy import Column, String, Integer |
""" 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 |
# Instructions for 4.14 and cuda 9.1 | |
# If upgrading from 4.13 and cuda 9.0 | |
$ sudo apt-get purge --auto-remove libcud* | |
$ sudo apt-get purge --auto-remove cuda* | |
$ sudo apt-get purge --auto-remove nvidia* | |
# also remove the container directory direcotory at /usr/local/cuda-9.0/ | |
# Important libs required with 4.14.x with Cuda 9.X | |
$ sudo apt install libelf1 libelf-dev |
;; | |
;; 28.07.2017 | |
;; Charles Wang | |
;; | |
;;;;;;; Tweaks for Org & org-latex ;;;;;; | |
(defvar cw/org-last-fragment nil | |
"Holds the type and position of last valid fragment we were on. Format: (FRAGMENT_TYPE FRAGMENT_POINT_BEGIN)" | |
) |
https://github.com/aancel/admin/wiki/VirtualGL-on-Ubuntu
https://virtualgl.org/About/Introduction
When you use ssh with X forwarding, you might have noticed that you cannot execute programs that require 3D acceleration. That's where VirtualGL comes into play.
# ag <https://github.com/ggreer/the_silver_searcher> | |
# from=str1 to=sth agr path1 path2 ... | |
# backs up to .pbak | |
comment() { | |
} | |
doc() { | |
} | |
function agr { | |
doc 'usage: from=sth to=another agr [ag-args]' |