Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# License: MIT. See license file in root directory
# Copyright(c) JetsonHacks (2017-2019)
OPENCV_VERSION=4.1.1
# Jetson Nano
ARCH_BIN=5.3
INSTALL_DIR=/usr/local
# Download the opencv_extras repository
# If you are installing the opencv testdata, ie
@madelinegannon
madelinegannon / jetson-nano_openFrameworks_setup_tutorial.md
Last active February 4, 2024 16:41
How to Set Up the NVIDIA Jetson Nano for openFrameworks
@bellbind
bellbind / demorgan.v
Last active October 19, 2019 02:20
[coq] Proof of de morgan laws
(*[Proof of de Morgan laws with coq]*)
(*{NOTE: coq tactics for Propositional Logic]
|- A -> B =intro A1=> A1: A |- B
|- A -> B -> C =intros A1 B1=> A1: A, B1: B |- C
|- A\/B =left=> |- A
|- A\/B =right=> |- B
|- A/\B =split=> |- A ; |- B
|- False =absurd (A)=> |- ~A ; |- A
AB: A->B |- B =apply AB=> AB: A->B |- A
@bruzed
bruzed / README.md
Created September 6, 2018 17:27 — forked from juancabrera/README.md
Creating a JavaScript build for AR Studio with Webpack and Babel

Creating a JavaScript build for AR Studio with Webpack and Babel.

Scripting in AR Studio might be difficult sometimes, having all the code in one file is not ideal, hard for collaboration and quite likely to be messy. Here is a simple guide to have a super simple web-like JavaScript build that allows you to have the all files and the structure you want.

Sample project (or use your own)

Get the sample project from this page (Mug.zip), unzip it and go to the Mug Finished Effect folder. Or, use your own project.

JavaScript build

@CarlosGS
CarlosGS / raspberry_fast_capture.py
Last active February 26, 2024 04:16
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
@blole
blole / openai-gym-mcts.py
Last active June 8, 2023 19:24
Monte Carlo tree search agent for https://gym.openai.com
#!/usr/bin/env python2
import os
import gym
import sys
import random
import itertools
from time import time
from copy import copy
from math import sqrt, log
@stonehippo
stonehippo / docker_usb_guest_osx.md
Last active June 12, 2024 10:36
Getting a USB device to show up in a Docker container on OS X

Getting a USB device to show up in a Docker container on OS X

Some background

I was trying to get the Arduino IDE to work inside a Docker container on OS X. I was able to get the IDE working (see Getting X11 GUI applications to work on OS X with Docker), but I could not figure out how to make the USB port for the Arduino visible.

The solution

I first tried to directly map hardware serial port into the Docker container, doing something like this:

//libusb+ch340 data transfer demo
//gcc usb.c `pkg-config libusb-1.0 --libs --cflags` -o usb
#include <errno.h>
#include <signal.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <sys/select.h>
@frozeman
frozeman / createContract.js
Last active September 5, 2018 18:57
Deploy contracts on Ethereum and reliable get the contract address
// -> Soldity
// **********
// Your Soldity contract
event Created(bytes32 indexed identifier);
contract MyContract {
function MyContract(bytes32 identifier) {
Created(identifier);
}
@ngauthier
ngauthier / timeout_and_tick.go
Created February 10, 2015 18:14
Golang timeout and tick loop
// keepDoingSomething will keep trying to doSomething() until either
// we get a result from doSomething() or the timeout expires
func keepDoingSomething() (bool, error) {
timeout := time.After(5 * time.Second)
tick := time.Tick(500 * time.Millisecond)
// Keep trying until we're timed out or got a result or got an error
for {
select {
// Got a timeout! fail with a timeout error
case <-timeout: