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 edu.wpi.teamname; | |
import javafx.application.Application; | |
import javafx.scene.Scene; | |
import javafx.scene.control.Button; | |
import javafx.scene.control.Label; | |
import javafx.scene.layout.BorderPane; | |
import javafx.stage.Stage; | |
public class App extends Application { |
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
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
void foo() { | |
volatile int i = 0; | |
volatile char x[] = "exploit"; | |
printf("Doing something with %s\n", x); | |
} |
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
class OverridableAutonomous(AutonomousStateMachine) | |
joystick: wpilib.Joystick | |
def on_iteration(self): | |
if self.joystick.getRawButton() | |
# change to teleop | |
class Autonomous(OverridableAutonomous): | |
@timed_state | |
... | |
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 csv | |
################ | |
################ | |
# For this part, I recommend cropping the image so you can really see things. | |
# Whatever you crop it to, save those coordinates | |
THREED_STARTX = 1420 | |
THREED_ENDX = 2030 |
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
//The Structures for Lines, Sets and the cache itself/// | |
struct Line { | |
int valid; | |
unsigned long tag; | |
int age; | |
}; | |
struct Set { | |
struct Line* lines; | |
}; |
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
// | |
// FrameExtractor.swift | |
// Created by Bobo on 29/12/2016. | |
// | |
import UIKit | |
import AVFoundation | |
protocol FrameExtractorDelegate: class { | |
func captured(image: UIImage) |
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
while (change >= tolerance) | |
{ | |
change = 0.0; | |
for (int i = 1; i < path.length - 1; i++) | |
{ | |
for (int j = 0; j < path[i].length; j++) | |
{ | |
double aux = newPath[i][j]; | |
newPath[i][j] += (weight_data * (path[i][j] - newPath[i][j])) + (weight_smooth * (newPath[i - 1][j] + newPath[i + 1][j] - (2.0 * newPath[i][j]))); | |
change += Math.abs(aux - newPath[i][j]); |
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 com.qualcomm.ftcrobotcontroller.opmodes.autonomous; | |
/** | |
* Created by winterst on 2/11/16. | |
*/ | |
public class BlueColorAuto extends StatefulAutonomous{ | |
@timed_state(duration = 15, first = true) | |
public void driveForward() throws NoSuchMethodException { | |
tank.move(-.25f, -.25f); |
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
from pyfrc.physics.drivetrains import four_motor_drivetrain | |
import wpilib | |
class PhysicsEngine: | |
def __init__(self, controller): | |
self.controller = controller | |
def update_sim(self, hal_data, now, tm_diff): |
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
"field": { | |
"w": 27, | |
"h": 27, | |
"px_per_ft": 10, | |
"objects": [ | |
{ "color": "blue", | |
"points": [ [0, 0], [0, 4.5], [24, 4.5], [24, 0] ] }, | |
NewerOlder