Skip to content

Instantly share code, notes, and snippets.

View rogaha's full-sized avatar

Roberto Gandolfo Hashioka rogaha

  • Docker, Inc
  • San Francisco, CA
View GitHub Profile
@rogaha
rogaha / dnn.py
Created March 7, 2017 13:19 — forked from syhw/dnn.py
A simple deep neural network with or w/o dropout in one file.
"""
A deep neural network with or w/o dropout in one file.
License: Do What The Fuck You Want to Public License http://www.wtfpl.net/
"""
import numpy, theano, sys, math
from theano import tensor as T
from theano import shared
from theano.tensor.shared_randomstreams import RandomStreams
@rogaha
rogaha / pg-pong.py
Created March 7, 2017 13:03 — 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
[06:26:34 PM]% docker pull base (master|✚1)[Wed 18 Dec]
[debug] api.go:1036 Calling POST /images/create
2013/12/18 18:26:38 POST /v1.8/images/create?fromImage=base&tag=
[debug] registry.go:303 [registry] Calling GET https://indexstaging-docker.dotcloud.com/v1/repositories/base/images
Pulling repository base
[debug] http.go:168 https://indexstaging-docker.dotcloud.com/v1/repositories/base/images -- HEADERS: map[User-Agent:[docker/0.7.2-dev go/go1.2 git-commit/f768c6a-dirty kernel/3.8.0-27-generic ]]
2013/12/18 18:26:38 HTTP code: 404
@rogaha
rogaha / volume.rst
Last active December 26, 2015 04:29
title

Working with Volumes

description

How to create and share volumes

keywords

Examples, Usage, volume, docker, documentation, examples

Data Volume

v0.3.0

vagrant@precise64:~/docker-registry$ python -m unittest discover -v test
test_nginx_accel_redirect_layer (test_images.TestImages) ... ok
test_notfound (test_images.TestImages) ... ok
test_set_checksum_after (test_images.TestImages) ... ok
test_simple (test_images.TestImages) ... ok
test_unset_nginx_accel_redirect_layer (test_images.TestImages) ... ok
test_auth (test_index.TestIndex) ... ok
test_repository_images (test_index.TestIndex) ... ok
test_search (test_index.TestIndex) ... ok
test_users (test_index.TestIndex) ... ok
@rogaha
rogaha / Vagrantfile
Created August 5, 2013 22:31
Vagrant file - Docker VM
# -*- mode: ruby -*-
# vi: set ft=ruby :
BOX_NAME = ENV['BOX_NAME'] || "ubuntu"
BOX_URI = ENV['BOX_URI'] || "http://files.vagrantup.com/precise64.box"
VF_BOX_URI = ENV['BOX_URI'] || "http://files.vagrantup.com/precise64_vmware_fusion.box"
AWS_REGION = ENV['AWS_REGION'] || "us-east-1"
AWS_AMI = ENV['AWS_AMI'] || "ami-d0f89fb9"
FORWARD_DOCKER_PORTS = ENV['FORWARD_DOCKER_PORTS']
- name: add_a_unique_name_736
title: Docker Hub Sign-ups
type: looker_column
base_view: profiles_dockeruser
dimensions: [profiles_dockeruser.account_state, profiles_dockeruser.date_joined_month]
pivots: [profiles_dockeruser.account_state]
measures: [profiles_dockeruser.count]
filters:
profiles_dockeruser.date_joined_month: before this month
sorts: [profiles_dockeruser.date_joined_month]
rogaha@Robertos-MacBook-Pro:~/development/rogaha/temp/heroku_postgres_monitor$ heroku pg:ps --app prod-docker-io 17:21:51 ☁ master ☀
psql: FATAL: remaining connection slots are reserved for non-replication superuser connections
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: psql failed. exit status 512, output: "" (RuntimeError)
Backtrace: /Library/Ruby/Gems/2.0.0/gems/heroku-3.10.3/lib/heroku/command/pg.rb:571:in `exec_sql_on_uri'
/Library/Ruby/Gems/2.0.0/gems/heroku-3.10.3/lib/heroku/command/pg.rb:561:in `exec_sql'
/Library/Ruby/Gems/2.0.0/gems/heroku-3.10.3/lib/heroku/command/pg.rb:533:in `version'
GET haystack/modelresult/_search
{"query": {"filtered": {"filter": {"bool": {"must": [{"term": {"status": 1}}, {"term": {"is_private": false}}]}}, "query": {"function_score": {"query": {"bool": {"minimum_should_match": 2, "should": [{"match": {"repo_name_auto.partial": {"operator": "and", "query": "rogaha/test1", "boost": 0.05}}}, {"custom_boost_factor": {"boost_factor": 0.05, "query": {"multi_match": {"operator": "and", "fields": ["name_auto^3", "name_auto.partial^2", "name_auto.partial_back", "name_auto.partial_middle"], "query": "rogaha/test1"}}}}, {"custom_boost_factor": {"boost_factor": 0.04, "query": {"multi_match": {"operator": "and", "fields": ["repo_name_auto^3", "repo_name_auto.partial^2", "repo_name_auto.partial_back", "repo_name_auto.partial_middle"], "query": "rogaha/test1"}}}}, {"custom_boost_factor": {"boost_factor": 0.03, "query": {"multi_match": {"operator": "and", "fields": ["namespace_auto^3", "namespace_auto.partial^2", "namespace_auto.partial_back", "namespace_auto.partial_middle"], "q
Internal Server Error
Traceback:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/sync.py", line 131, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File "/usr/local/lib/python2.7/dist-packages/newrelic-2.18.1.15/newrelic/api/web_transaction.py", line 853, in __call__
result = application(environ, _start_response)
File "/usr/local/lib/python2.7/dist-packages/newrelic-2.18.1.15/newrelic/api/function_trace.py", line 95, in literal_wrapper