I hereby claim:
- I am pdeutsch on github.
- I am pete_deutsch (https://keybase.io/pete_deutsch) on keybase.
- I have a public key ASCg24tH9OKcmkzx6T0eQGxZmWoRWaMjht2-fnAXNGZvIAo
To claim this, I am signing this object:
package com.pete.test; | |
import java.awt.BasicStroke; | |
import java.awt.Color; | |
import java.awt.Graphics2D; | |
import java.awt.image.BufferedImage; | |
import java.text.NumberFormat; | |
import org.ddogleg.struct.FastQueue; |
package com.pete.test; | |
import java.lang.management.ManagementFactory; | |
import java.lang.management.ThreadInfo; | |
import java.lang.management.ThreadMXBean; | |
import org.pmw.tinylog.Configurator; | |
import org.pmw.tinylog.Level; | |
import org.pmw.tinylog.Logger; | |
import org.pmw.tinylog.writers.ConsoleWriter; |
import java.util.ArrayList; | |
import java.util.List; | |
public class MatrixTest { | |
static class Point { | |
double x, y; | |
Point(double x, double y) { this.x = x; this.y = y; } | |
double[] asArray() { return new double[] { x, y }; } | |
public String toString() { return String.format("[%.2f, %.2f]", x, y); } | |
} |
public class PPosTest { | |
private static final double MIN_TURN_SPEED = 0.1; | |
private static final double kP_TURN = -0.01; //todo: tune value | |
public static void main(String[] args) { | |
PPosTest test = new PPosTest(); | |
for (double targetVelocity = 0.15; targetVelocity < 0.31; targetVelocity += 0.1) { | |
for (int i = 0; i < 10; i++) { | |
test.execute(targetVelocity, 0.0, (double)i * 3.0); |
I hereby claim:
To claim this, I am signing this object:
I installed pyv4l2 on the Rasperry Pi. https://pypi.org/project/pyv4l2/
It failed at first, but I did a pip3 install Cython
first and then pip3 install pyv4l2
installed correctly.
There are four methods available on the Control object, as shown below. I also executed the get_controls()
method
and you can see that this dumps out a data structure containing all the possible settings, their names, values,
default values, control ID, and other configuration parameters.
>>> from pyv4l2.control import Control
# This application requires that you install Flask (pip install Flask) | |
# and OpenCV. | |
# It will start the OpenCV image processing in the background thread, | |
# and start then start the Flask app. The OpenCV thread will read from | |
# the camera and populate the img variable with the latest image capture. | |
# | |
# Opening http://localhost:7070 in your browser should show the latest | |
# image capture. Refreshing the page will show the newest image. | |
import cv2 |
import java.io.File; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
class DeleteOldFiles { | |
public static void main(String[] args) { | |
deleteFiles(); | |
} | |
import com.google.common.base.Stopwatch; | |
import java.io.*; | |
import java.text.DecimalFormat; | |
import java.util.concurrent.TimeUnit; | |
/** | |
* This code attempts several different methods of creating and printing a string similar to: | |
* test1: 4379747.584; test2: 4379747.684; test3: 4379747.784 | |
* |
import cv2 | |
import numpy as np | |
import math | |
# create an array of points in the shape of a hexagon | |
def make_hex_shape(): | |
pts = [] | |
for ang in range(0, 355, 60): | |
ang_r = math.radians(ang) |