Skip to content

Instantly share code, notes, and snippets.

View fabito's full-sized avatar
🏠
Working from home

Fábio Franco Uechi fabito

🏠
Working from home
View GitHub Profile
- id: 'port-forward'
name: 'gcr.io/cloud-builders/docker'
args: [
'run',
'-itd',
'--network-alias', 'ml-pipeline.local',
'-e', 'CLOUDSDK_COMPUTE_ZONE=${_KF_ZONE}',
'-e', 'CLOUDSDK_CONTAINER_CLUSTER=${_KF_CLUSTER}',
'-e', 'CLOUDSDK_CORE_PROJECT=${_KF_PROJECT}',
'-p', '8888:8888',
@fabito
fabito / cloudbuild.list-pipelines.yaml
Last active August 30, 2020 21:27
Using kubectl port-forward within Google Cloud Build jobs
- id: 'list-pipelines'
name: 'curlimages/curl:7.72.0'
args: [
'-v',
'--retry-connrefused',
'--connect-timeout', '5',
'--max-time', '10',
'--retry', '5',
'--retry-delay', '0',
'--retry-max-time', '40',
@fabito
fabito / index.html
Last active October 30, 2019 11:21
blue_green_demo_webapp
<html lang="en" style="height:100%"><head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Pulsars Rollouts</title>
<style>
html, body {
margin: 0;
padding: 0;
height: 100%;
@fabito
fabito / ssd_mobilenet_v1_widerface.config
Created June 18, 2019 16:20
ssd_mobilenet_v1_widerface.config
model {
ssd {
num_classes: 1
box_coder {
faster_rcnn_box_coder {
y_scale: 10.0
x_scale: 10.0
height_scale: 5.0
width_scale: 5.0
}
@fabito
fabito / dumb-ap-wired-link.sh
Created October 18, 2018 13:09 — forked from braian87b/dumb-ap-wired-link.sh
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
@fabito
fabito / ssd_mobilenet_v1_widerface.config
Created September 24, 2018 13:49
tf object detection api - ssd face widerface detector config
model {
ssd {
num_classes: 1
box_coder {
faster_rcnn_box_coder {
y_scale: 10.0
x_scale: 10.0
height_scale: 5.0
width_scale: 5.0
}
@fabito
fabito / play.py
Created August 28, 2018 04:33
neyboy - play
env = gym.make('neyboy-v0')
while True:
ev = screen.get_key()
action = 0
if ev in (Screen.KEY_LEFT, ord('A'), ord('a')):
action = 1
elif ev in (Screen.KEY_RIGHT, ord('D'), ord('d')):
action = 2
@fabito
fabito / pause_resume.py
Created August 22, 2018 04:51
neyboy - pause resume sample
import gym
import gym_neyboy
env = gym.make('neyboy-v0')
env.reset()
for _ in range(10):
long_running_process()
env.step(env.action_space.sample()) # take a random action
@fabito
fabito / game_state.py
Created August 22, 2018 03:13
neyboy game - game state
GameState = namedtuple('GameState', ['score', 'status', 'snapshot', 'dimensions'])
@fabito
fabito / initialize.py
Created August 22, 2018 02:39
neyboy game - initialize
async def initialize(self):
self.browser = await launch(headless=self.headless)
self.page = await self.browser.newPage()
await self.page.goto(self.game_url, {'waitUntil': 'networkidle2'})
envjs_path = pathlib.Path(__file__).resolve().parent.joinpath('env.js')
await self.page.addScriptTag(dict(path=str(envjs_path)))
await self.is_ready()