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
// | |
// Created by はるふ on 2017/12/11. | |
// Copyright © 2017年 ha1f. All rights reserved. | |
// | |
import Foundation | |
import CoreImage | |
import AVFoundation | |
extension CIFilter { |
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
var Utils = { | |
/* modified version of https://gist.github.com/1243697 | |
* adds detection of file extension rather than hard-coding .jpg as in the original | |
*/ | |
_getExtension: function(fn) { | |
// from http://stackoverflow.com/a/680982/292947 | |
var re = /(?:\.([^.]+))?$/; | |
var tmpext = re.exec(fn)[1]; | |
return (tmpext) ? tmpext : ''; | |
}, |
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 | |
from multicam import Multicam | |
mcam = Multicam(gpio_mode='bcm') | |
cv2.imshow('Cam A', mcam.capture(cam='a')) | |
cv2.imshow('Cam B', mcam.capture(cam='b')) | |
cv2.imshow('Cam C', mcam.capture(cam='c')) | |
cv2.imshow('Cam D', mcam.capture(cam='d')) | |
# cv2.imshow('Cam E', mcam.capture(cam='e')) |
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.components; | |
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; | |
import edu.wpi.first.networktables.NetworkTable; | |
import edu.wpi.first.networktables.NetworkTableEntry; | |
import edu.wpi.first.networktables.NetworkTableInstance; | |
/** | |
LimeLight wrapper class | |
*/ |
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 | |
def main(): | |
cam = open_cam_usb(1, 1024, 768) | |
# cam = open_cam_onboard(1024, 768) # Use Jetson onboard camera | |
if cam.isOpened() is False: | |
print('failed to open camera') | |
exit() | |
while 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
''' | |
slider.py - Demonstrating a user of trackbars on OpenCV windows | |
Author: Tim Poulsen, github.com/skypanther | |
License: MIT | |
2018-10-15 | |
Example usage: | |
python3 slider.py -i path/to/image.jpg | |
''' |
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
int circumferenceInInches = 123; | |
int pulsesPerRotation = 1000; | |
protected void function auto1() { | |
RobotDrive drive = RobotMap.driveSystemdrive; | |
CANTalon talon = RobotMap.driveSystemCANTalon1; | |
//Change control mode of talon, other options are Follower Mode or Voltage Compensation | |
talon.changeControlMode(ControlMode.Position); | |
//Select either QuadEncoder or Pulse Width / Analog, we want Quad |
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
// alternative to built-in base64 encode function, which has outstanding bugs | |
// alternatively, use: | |
// String(Ti.Utils.base64encode(theBlob)).replace(/(\r\n|\n|\r)/gm,""); | |
function Base64EncodeAscii(str) { | |
if (/([^\u0000-\u00ff])/.test(str)) { | |
throw 'String must be ASCII'; | |
} | |
var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; | |
var o1, | |
o2, |
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
// implement like this: | |
var window = Ti.UI.createWindow({ | |
backgroundColor:'#fff' | |
}); | |
// draw the gridlines first so your other elements stack on top of them | |
// without requiring you to set the z-index property of each | |
var grid = require('gridlines'); | |
grid.drawgrid(10,window); |
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
var _ = require('underscore')._; | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
settings: { | |
appName: 'YourAppName', | |
ppUuid: 'uuid', /* Provisioning profile UUID */ | |
distributionName: 'cert_name', /* Distr. certificate name */ | |
keystoreLocation: '/Users/path/to/android.keystore', /* path to keystore */ | |
storePassword: 'keystore_password', /* keystore password */ |
NewerOlder