Skip to content

Instantly share code, notes, and snippets.

View fabito's full-sized avatar

Fábio Franco Uechi fabito

View GitHub Profile
@fabito
fabito / grpc-locust.py
Created September 8, 2020 03:42 — forked from skyrocknroll/grpc-locust.py
grpc locust
from locust.stats import RequestStats
from locust import Locust, TaskSet, task, events
import os
import sys, getopt, argparse
from random import randint,random
import json
from locust.events import EventHook
import requests
import re
import grpc
- id: 'upload-pipeline-version'
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',
- 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