A Step-By-Step Guide from Unboxing to Creative Coding
#!/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 |
(*[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 |
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.
Get the sample project from this page (Mug.zip), unzip it and go to the Mug Finished Effect
folder. Or, use your own project.
# 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 |
#!/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 |
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.
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> |
// -> Soldity | |
// ********** | |
// Your Soldity contract | |
event Created(bytes32 indexed identifier); | |
contract MyContract { | |
function MyContract(bytes32 identifier) { | |
Created(identifier); | |
} |
// 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: |