Skip to content

Instantly share code, notes, and snippets.

View ricardodeazambuja's full-sized avatar

Ricardo de Azambuja ricardodeazambuja

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ricardodeazambuja
ricardodeazambuja / EditGraph.py
Created April 22, 2020 22:39 — forked from ByungSunBae/EditGraph.py
simple tensorflow graph edit example
# from : https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/graph_editor/examples/edit_graph_example.py
import numpy as np
import tensorflow as tf
from tensorflow.contrib import graph_editor as ge
# create a graph
g = tf.Graph()
with g.as_default():
@ricardodeazambuja
ricardodeazambuja / webcam-to-numpy-array-from-your-browser-in-colab.ipynb
Last active April 22, 2020 13:29
Webcam to Numpy array from your browser in Colab
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ricardodeazambuja
ricardodeazambuja / raspberry_fast_capture.py
Created April 15, 2020 13:35 — forked from CarlosGS/raspberry_fast_capture.py
Fast reading from the raspberry camera with Python, Numpy, and OpenCV. See the comments for more details.
# Fast reading from the raspberry camera with Python, Numpy, and OpenCV
# Allows to process grayscale video up to 124 FPS (tested in Raspberry Zero Wifi with V2.1 camera)
#
# Made by @CarlosGS in May 2017
# Club de Robotica - Universidad Autonoma de Madrid
# http://crm.ii.uam.es/
# License: Public Domain, attribution appreciated
import cv2
import numpy as np
@ricardodeazambuja
ricardodeazambuja / rawInjection.py
Created March 31, 2020 14:01 — forked from davidlares/rawInjection.py
Raw Sockets with Python: Sniffing and network packet injections.
#!/usr/bin/python
import socket
import struct
# creating a rawSocket for communications
# PF_SOCKET (packet interface), SOCK_RAW (Raw socket) - htons (protocol) 0x08000 = IP Protocol
rawSocket = socket.socket(socket.PF_PACKET, socket.SOCK_RAW, socket.htons(0x0800))
# deciding interface - packet sniffing and then injection
@ricardodeazambuja
ricardodeazambuja / upload-github-release-asset.sh
Created February 21, 2020 15:19 — forked from stefanbuck/upload-github-release-asset.sh
Script to upload a release asset using the GitHub API v3.
#!/usr/bin/env bash
#
# Author: Stefan Buck
# License: MIT
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
#
#
# This script accepts the following parameters:
#
# * owner
@ricardodeazambuja
ricardodeazambuja / dgoogle_download.sh
Last active February 16, 2020 14:32 — forked from isphus1973/dgoogle_download.sh
How to download stuff directly from google drive into a jupyter notebook / colab
#!/bin/sh
######Usage#######
# ./dgoogle_download.sh FILE_ID OUTPUT_NAME
## Remember to chomod +x dgoogle_download.sh
#This scrip is based on https://unix.stackexchange.com/questions/136371/how-to-download-a-folder-from-google-drive-using-terminal
FROM ricardodeazambuja/pizero:aiy
# This is responsible for making your current docker work with arm images:
# $ sudo apt install qemu qemu-user-static binfmt-support-
# And this line is responsible for enabling it (MUST run after a restart):
# $ docker run --privileged linuxkit/binfmt:v0.7
ENV OPENCV_VERSION=4.2.0