#Quick Guide
sudo atsutil databases -remove
atsutil server -shutdown
atsutil server -ping
#Extended Guide from http://doc.extensis.com/Font-Management-in-OSX-Best-Practices-Guide.pdf
# solution for: | |
# https://stackoverflow.com/questions/12544056/how-to-i-get-the-current-ipython-notebook-name | |
# | |
# aimed at: | |
# IPython 4.2.0 and Python 3.5 | |
import json | |
import os | |
import urllib.request | |
import ipykernel |
""" 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 |
#Quick Guide
sudo atsutil databases -remove
atsutil server -shutdown
atsutil server -ping
#Extended Guide from http://doc.extensis.com/Font-Management-in-OSX-Best-Practices-Guide.pdf
in: | |
type: s3 | |
access_key_id: "{{ env.AWS_ACCESS_KEY_ID }}" | |
secret_access_key: "{{ env.AWS_SECRET_ACCESS_KEY }}" | |
bucket: "{{ env.S3_BUCKET }}" | |
path_prefix: "{{ env.INPUT_PREFIX }}" | |
decoders: | |
- type: gzip | |
parser: | |
type: csv |
$ ./put-s3 --help
sage: put-s3 --file=FILE --bucket=BUCKET --region=REGION [<flags>]
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
-f, --file=FILE upload file
-b, --bucket=BUCKET bucket
-r, --region=REGION region
--path=PATH path
import numpy as np | |
from sklearn.cluster import KMeans | |
class Cluster: | |
def __init__(self, ids: [str], features: [[float]], centroid: []): | |
self.ids = np.array(ids) | |
self.features = np.array(features) | |
self.centroid = centroid |
""" | |
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) |
Docker build "Could not resolve 'archive.ubuntu.com'" apt-get fails to install anything
In Ubuntu Precise 12.04 LTS, after executing docker build command, e.g., docker build -t myimages/pcawg3_1 -f ./icgc_rnaseq_align/
, build engine may halt at step 1: apt-get
with errors similar to Could not resolve 'archive.ubuntu.com'. This is occurring most likely because of inability of docker ubuntu image to resolve apt-get urls with default Google DNS.
To resolve this issue: [Ref. http://stackoverflow.com/a/24991137]
/etc/default/docker
, and preferably replace Google DNS with those from your own ISP:DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
sudo service docker restart
or service restart command for other platforms.no-cache=true
flag to force docker image fetch new DNS, e.g., docker build --no-cache=true -t myimages/pcawg3_2 -f ./icgc_rnaseq_align/
""" | |
以下の論文で提案された改良x-means法の実装 | |
クラスター数を自動決定するk-meansアルゴリズムの拡張について | |
http://www.rd.dnc.ac.jp/~tunenori/doc/xmeans_euc.pdf | |
""" | |
import numpy as np | |
from scipy import stats | |
from sklearn.cluster import KMeans |