Code for Keras plays catch blog post
python qlearn.py
- Generate figures
Code for Keras plays catch blog post
python qlearn.py
http://unix.stackexchange.com/a/183492 | |
http://rolfblijleven.blogspot.co.uk/2015/02/howto-persistent-device-names-on.html | |
$ dmesg | grep ttyUSB | |
[ 1173.771734] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0 | |
$ udevadm info --name=/dev/ttyUSBx --attribute-walk | |
Udevadm info starts with the device specified by the devpath and then | |
walks up the chain of parent devices. It prints for every device | |
found, all possible attributes in the udev rules key format. |
/* | |
* Set up your Git configuration | |
*/ | |
git config --global user.email "[email protected]" | |
git config --global user.name "Your Name" | |
git config --global core.editor "nano" |
# Install the PyDrive wrapper & import libraries. | |
!pip install -U -q PyDrive | |
from pydrive.auth import GoogleAuth | |
from pydrive.drive import GoogleDrive | |
from google.colab import auth | |
from oauth2client.client import GoogleCredentials | |
# Authenticate and create the PyDrive client. | |
auth.authenticate_user() | |
gauth = GoogleAuth() |
#!/usr/bin/env python | |
""" | |
How to use it: | |
1. Just `kill -2 PROCESS_ID` or `kill -15 PROCESS_ID`, | |
The Tornado Web Server Will shutdown after process all the request. | |
2. When you run it behind Nginx, it can graceful reboot your production server. | |
""" | |
import time |
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear! | |
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy. | |
* Off the top of my head * | |
1. Fork their repo on Github | |
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it | |
git remote add my-fork [email protected] |
def press_statistic(y_true, y_pred, xs): | |
""" | |
Calculation of the `Press Statistics <https://www.otexts.org/1580>`_ | |
""" | |
res = y_pred - y_true | |
hat = xs.dot(np.linalg.pinv(xs)) | |
den = (1 - np.diagonal(hat)) | |
sqr = np.square(res/den) | |
return sqr.sum() |