Skip to content

Instantly share code, notes, and snippets.

View isaacvitor's full-sized avatar
Working

Isaac Vitor isaacvitor

Working
View GitHub Profile
@isaacvitor
isaacvitor / audio_file_chunker.py
Last active May 5, 2022 17:08
Tool to split wav audio into chunks based on silence
import subprocess
from tempfile import mkstemp
import os
import logging
APP_NAME = 'audio_file_chunker'
logger = logging.getLogger(APP_NAME)
logger.setLevel(logging.ERROR)
aiohttp==3.7.4.post0
aiohttp-cors==0.7.0
aiokafka==0.7.1
async-timeout==3.0.1
attrs==21.2.0
chardet==4.0.0
click==7.1.2
colorclass==2.2.0
colorlog==5.0.1
croniter==1.0.15
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
faust-streaming = "==0.6.9"
[dev-packages]
@isaacvitor
isaacvitor / locustfile.py
Created April 5, 2021 11:03 — forked from reallistic/locustfile.py
Websocket client for locust.io (SockJS)
import time
import json
import gevent
from uuid import uuid4
from locust import HttpLocust, TaskSet, task, ResponseError, events, Locust
import websocket
class SocketClient(object):

Keybase proof

I hereby claim:

  • I am isaacvitor on github.
  • I am isaacvitor (https://keybase.io/isaacvitor) on keybase.
  • I have a public key ASBptaHqKMJh0HTMXT9SxF_i4ktTrpPOQo2PJyUjJazSrAo

To claim this, I am signing this object:

@isaacvitor
isaacvitor / fred_bot.ino
Created September 7, 2020 20:02 — forked from ShawnHymel/fred_bot.ino
Use two magnetic encoders to make a robot drive in a straight line for 1 meter
/**
* Adventures in Science: Fred Bot
* SparkFun Electronics
* Author: M. Hord (October 8, 2013)
* Modified by: B. Huang (October 31, 2014)
* Modified by: Shawn Hymel (July 21, 2017)
*
* Use two magnetic encoders on Fred's motor shafts (48:1
* gearbox, 60mm wheels) to make him move in a straight line for
* 1m.
import cv2
from urllib import request
#import urllib.request
import numpy as np
stream = request.urlopen('http://192.168.254.183/stream')
bts = b''
while True:
bts += stream.read(1024)
function createGrid(targetId, length) {
var rows = []
var cols = []
for (i = 0; i < length; i++) {
rows[i] = document.createElement('div');
rows[i].setAttribute('id','row'+i)
rows[i].setAttribute('class','row')
document.getElementById(targetId).append(rows[i])
for (j = 0; j < length; j++) {
cols[j] = document.createElement('div');
@isaacvitor
isaacvitor / wpstest.ino
Created June 20, 2017 19:41 — forked from copa2/wpstest.ino
Example for WPS connection with https://github.com/esp8266/Arduino
#include <ESP8266WiFi.h>
void setup() {
Serial.begin(115200);
delay(1000);
Serial.printf("\nTry connecting to WiFi with SSID '%s'\n", WiFi.SSID().c_str());
WiFi.mode(WIFI_STA);
WiFi.begin(WiFi.SSID().c_str(),WiFi.psk().c_str()); // reading data from EPROM, last saved credentials
while (WiFi.status() == WL_DISCONNECTED) {