This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"java.configuration.updateBuildConfiguration": "automatic", | |
"files.exclude": { // Hide files in Explorer panel | |
"**/.git": true, // Default excluded | |
"**/.svn": true, | |
"**/.hg": true, | |
"**/CVS": true, | |
"**/.DS_Store": true, | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package frc.robot.util; | |
public class Deadband { | |
private double minValue; | |
private double m; | |
private double deadband; | |
public Deadband(double minValue, double deadband) { | |
this.minValue = minValue; | |
m = calcM(minValue, deadband); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy | |
import math | |
from enum import Enum | |
class GripPipeline: | |
""" | |
An OpenCV pipeline generated by GRIP. | |
""" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Ray Rashif <[email protected]> | |
# Contributor: Tobias Powalowski <[email protected]> | |
pkgbase=opencv344 | |
pkgname=(opencv344 opencv344-samples) | |
pkgver=3.4.4 | |
pkgrel=1 | |
pkgdesc="Open Source Computer Vision Library" | |
arch=(x86_64) | |
license=(BSD) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# back when i wrote this i didnt add any version info | |
# so i wasnt able to run it almost a year later | |
# anyway heres last working versions as of 04/14/2020 | |
# python 3.8.2 | |
starlette==0.11.4 # old, Mar 18, 2019 | |
uvicorn==0.11.3 # this is the newest at time of writing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from typing import AsyncGenerator, Dict, List, Tuple | |
import cv2 | |
import uvicorn | |
from starlette.applications import Starlette | |
from starlette.responses import HTMLResponse | |
# ----------------------------------------------------------------------------- | |
# Reusable ASGI framework |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import functools | |
import inspect | |
import itertools | |
import typing | |
class Arg(typing.NamedTuple): | |
name: str | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import multiprocessing as mp | |
import numpy as np | |
# Create a np.ndarray that can be shared across processes | |
# Array.np and Array.arr point to the same memory | |
# This memory is shared between the processes | |
# And mp.RawArray can be sent to a new spawned process | |
class Array: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threading | |
import queue | |
import time | |
class Program: | |
def __init__(self): | |
self.queue = queue.Queue() | |
self.pipeline = Pipeline(self) | |
self.web = Webserver(self) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import edu.wpi.first.wpilibj.shuffleboard.BuiltInWidgets; | |
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardContainer; | |
import edu.wpi.first.wpilibj.shuffleboard.SuppliedValueWidget; | |
import edu.wpi.first.wpilibj.util.Color; | |
import java.util.Map; | |
public class ShuffleboardRGB { | |
public final SuppliedValueWidget<Boolean> widget; | |
private static final String offStr = "Color when false"; |
OlderNewer