This file contains hidden or 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
| Your score: 18 (17 good, 4 not found, 1 too short, 1 repeated) | |
| Your score: 33 (20 good, 4 not found, 2 too short, 2 repeated) | |
| Your score: 23 (21 good, 5 not found, 2 too short, 4 repeated) | |
| Your score: 13 (5 good, 0 not found, 0 too short, 0 repeated) | |
| Your score: 24 (4 good, 1 not found, 0 too short, 0 repeated) |
This file contains hidden or 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
| def unique(l): | |
| return list(set(l)) | |
| def check(board, needle, path, pos): | |
| if pos[0] < 0 or pos[0] > 3: return False | |
| if pos[1] < 0 or pos[1] > 3: return False | |
| if pos in path: return False | |
| return board[pos[0]][pos[1]] == needle | |
| def search(board, needle, pos, path = []): |
This file contains hidden or 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 <iostream> | |
| #include <math.h> | |
| using namespace std; | |
| bool isCrystal(int m, int x, int y) { | |
| int curX = x; | |
| int curY = y; | |
| for (int curM = m; curM > 0; curM--) { | |
| int majorSize = pow(5, curM) / 5; |
This file contains hidden or 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 "WPILib.h" | |
| #include "S5.h" | |
| #define dashboard SmartDashboard::GetInstance() | |
| static void PeriodicTask(S5 *encoder) { | |
| while (1) { | |
| encoder->Periodic(); | |
| Wait(0.005); | |
| } |
This file contains hidden or 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
| 0xD # Correct start sequence byte one | |
| 0xA # Correct start sequence byte two | |
| 0x13 # Garbage.... | |
| 0xD8 # ... | |
| 0x1 # .. | |
| 0x7E # Correct start sequence byte three | |
| 0x70 # Correct command ID | |
| 0x12 # Data count | |
| 0x1F # data | |
| 0x0 |
This file contains hidden or 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 "TruePoint.h" | |
| #define INT(name) (name) = GetInt(); printf("(name) int") | |
| #define ANGLE(name) (name) = GetKang(); printf("(name) angle") | |
| static void ComTask(TruePoint *truePoint) { | |
| while (true) { | |
| truePoint->Process(); | |
| Wait(0.005); | |
| } |
This file contains hidden or 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
| startSequence = [0x0D, 0x0E, 0x7E] | |
| expectedByte = 0 | |
| packetByteCount = 0 | |
| currentPacketID = 0 | |
| dataSize = 0 | |
| loop: | |
| byte = getByte() | |
| if byte == startSequence[expectedByte]: |
This file contains hidden or 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 "TruePoint.h" | |
| static void ComTask(TruePoint *truePoint) { | |
| while (true) { | |
| truePoint->GetBuffer(); | |
| Wait(0.005); | |
| } | |
| } | |
| TruePoint::TruePoint(): |
This file contains hidden or 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 team2200.smartdashboard.extension.rectangletracker; | |
| import edu.wpi.first.smartdashboard.camera.LaptopExtension; | |
| import edu.wpi.first.smartdashboard.properties.BooleanProperty; | |
| import edu.wpi.first.smartdashboard.properties.NumberProperty; | |
| import edu.wpi.first.smartdashboard.types.DataType; | |
| import edu.wpi.first.wpijavacv.WPIBinaryImage; | |
| import edu.wpi.first.wpijavacv.WPIColor; | |
| import edu.wpi.first.wpijavacv.WPIColorImage; | |
| import edu.wpi.first.wpijavacv.WPIContour; |
This file contains hidden or 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 team2200.smartdashboard.extension.rectangletracker; | |
| import edu.wpi.first.smartdashboard.camera.WPICameraExtension; | |
| import edu.wpi.first.smartdashboard.robot.Robot; | |
| import edu.wpi.first.wpilibj.networking.NetworkTable; | |
| import edu.wpi.first.wpijavacv.*; | |
| public class RectangleTracker extends WPICameraExtension { | |
| public static final String NAME = "Rectangle Tracker"; |