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
| import pygame | |
| import sys50,50 | |
| class Coordinate: | |
| x = 0 | |
| y = 0 | |
| def __init__(self, x=0, y=0): | |
| self.x = x |
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
| import cv2 | |
| from subprocess import call, check_output | |
| class CameraSettings: | |
| def __init__(self, captureObject, device): | |
| self.cap = captureObject | |
| self.device = device | |
| def getFocus(self): |
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
| import cv2 | |
| import numpy | |
| import sys | |
| # python hsv_filter.py minH minS minV maxH maxS maxV | |
| if __name__=="__main__": | |
| defaultHSV = [0,0,0,255,255,255] | |
| hsvArgs = sys.argv[1:] |
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
| LOCK="file.lock" | |
| FILENAME="prob15.txt" | |
| TEMPFILE="temp_file.txt" | |
| count=5 | |
| one=1 | |
| i=1 | |
| end=1000 | |
| while [ $i -lt $end ] | |
| do |
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 <stdio.h> | |
| #include <stdbool.h> | |
| int main(void){ | |
| int dim; | |
| printf("This program creates a magic square of a specified size.\n"); | |
| printf("The size must be an odd number between 1 and 99.\n"); | |
| printf("Enter the size of the magic square here: "); | |
| scanf("%d", &dim); |
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> | |
| using namespace std; | |
| bool check(int num) { | |
| if (num % 2 == 0) { | |
| return false; | |
| } | |
| if (num <= 0 || num > 99) { | |
| return false; | |
| } |
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
| file = open('puzzle2.txt', 'r') | |
| while 1: | |
| char = file.read(1) # read by character | |
| if not char: break | |
| if ord(char) == 32 or ord(char) >= 65 and ord(char) <= 90 or ord(char) >= 97 and ord(char) <= 122: | |
| print char, | |
| file.close() |