Skip to content

Instantly share code, notes, and snippets.


Roberto Gandolfo Hashioka rogaha

View GitHub Profile
rogaha /
Created Mar 7, 2017 — forked from syhw/
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
import numpy, theano, sys, math
from theano import tensor as T
from theano import shared
from theano.tensor.shared_randomstreams import RandomStreams
rogaha /
Created Mar 7, 2017 — forked from karpathy/
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
View gist:005f972919e7348d9948
- 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]
profiles_dockeruser.date_joined_month: before this month
sorts: [profiles_dockeruser.date_joined_month]
View gist:46a42add58ac0dacc642
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:
! Or report a bug at:
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'
View gist:2860c3243a8e6a4de141
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
View gist:a15036fdcffac4842453
Internal Server Error
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/", line 131, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File "/usr/local/lib/python2.7/dist-packages/newrelic-", line 853, in __call__
result = application(environ, _start_response)
File "/usr/local/lib/python2.7/dist-packages/newrelic-", line 95, in literal_wrapper
View gist:6954270e15ab7f141e3f
root@42e8d052494e:~# tail -f /var/log/registry_hub.log
return wrapped(*args, **kwargs)
File "/home/docker/docker_index/profiles/", line 118, in process_request
if not sso_enabled() or should_skip_sso(request):
File "/home/docker/docker_index/profiles/", line 36, in sso_enabled
return waffle.switch_is_active(SSO_SWITCH_NAME)
File "/src/django-waffle/waffle/", line 132, in switch_is_active
switch = cache.get(keyfmt(SWITCH_CACHE_KEY, switch_name))
File "/usr/local/lib/python2.7/dist-packages/redis_cache/", line 31, in _decorator
raise e.parent
View gist:5cc036a608d98fb1dfd1
Step 0 : FROM stackbrew/ubuntu:12.04
---> c17f3f519388
Step 1 : MAINTAINER Docker SaaS Team <>
---> Using cache
---> 9c3019c4fa7f
Step 2 : ADD ./serverconf/scripts/ /build/scripts/
---> Using cache
---> b7d2967ba7cc
Step 3 : RUN /build/scripts/
---> Running in 7e4b2b0cfc88
View gist:dae8ac950911dd684d38
2014-09-15 16:28:38,289 INFO PoolWorker-33: child process calling
2014-09-15 16:28:50,480 ERROR PoolWorker-9: metrics.metric_recurly_revenue: returned an error: [Errno 110] Connection timed out Retrying in 1 second...
Traceback (most recent call last):
File "/metrics/run", line 66, in run_module
result =*args)
File "/metrics/metrics/", line 9, in run
'name': 'recurly_monthly_recurring_revenue', 'value_i': get_monthly_recurring_revenue()
File "/metrics/metrics/", line 25, in get_monthly_recurring_revenue
active = sum([s.unit_amount_in_cents/100 for s in recurly.Subscription.all() if s.state in 'active'])
File "/usr/local/lib/python2.7/dist-packages/recurly/", line 92, in __iter__
View gist:35080f1b34a047adf5b5
### Keybase proof
I hereby claim:
* I am rogaha on github.
* I am rogaha ( on keybase.
* I have a public key whose fingerprint is 926B BD95 8604 9F11 BBC5 0D18 AE0D E675 7148 4F2F
To claim this, I am signing this object:
You can’t perform that action at this time.