This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Degree | |
| 0->X | |
| 0->Y | |
| Input "How many to add?", N | |
| While N>0: | |
| 0->S | |
| 0->T | |
| Input "Magnitude: ", S | |
| Input "Angle (deg): ", T | |
| X+Scos(T)->X |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from json import loads | |
| from urllib2 import urlopen | |
| data = loads(urlopen("http://ergast.com/api/f1/results/1.json?limit=1000").read())["MRData"]["RaceTable"]["Races"] | |
| totals = {} | |
| for race in data: | |
| driver_nat = race["Results"][0]["Driver"]["nationality"] | |
| constructor_nat = race["Results"][0]["Constructor"]["nationality"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| double todayHigh, todayLow, monthHigh, monthLow; | |
| //this is the "sentinal input" (or something). It runs only once, before | |
| //we enter the loop, and provides input for the first execution of the | |
| //loop only. | |
| cout << "Enter today's high: "; | |
| cin >> todayHigh; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| template <class T> | |
| class ArbitratyList{ | |
| ArbitraryList(){ | |
| count = 0; | |
| } | |
| T list[4]; | |
| int count; | |
| void add(T tmp){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma config(UART_Usage, UART1, uartVEXLCD, baudRate19200, IOPins, None, None) | |
| #pragma config(UART_Usage, UART2, uartNotUsed, baudRate4800, IOPins, None, None) | |
| #pragma config(Sensor, in8, selector, sensorPotentiometer) | |
| #pragma config(Sensor, dgtl1, qEncoder, sensorQuadEncoder) | |
| #pragma config(Sensor, dgtl3, button, sensorTouch) | |
| #pragma config(Motor, port7, drive, tmotorServoContinuousRotation, openLoop) | |
| //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*// | |
| #define COUNTS_TO_CM (3.1416 * 6.985)/360 //pi * wheel diameter | |
| #define STOP_MOVING_DIST 150 //in cm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $\begin{array}{lllllllllllllllllllllllllllllllll} | |
| & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & \\ %carry digits | |
| & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & \\ %1st number | |
| + & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & \\ %2nd number | |
| \hline | |
| & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & \\ %result | |
| \end{array}$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Tx: 55 ff 00 10 ef 10 ef | |
| reading 7 bytes, timeout = 500 | |
| reading 1 byte, timeout = 500 | |
| Rx: 00 ef ed 10 ff | |
| Retrying... | |
| Tx: 55 ff 00 10 ef 10 ef | |
| reading 7 bytes, timeout = 500 | |
| Rx: 55 ff 00 ef 10 ef 10 | |
| Tx: 55 ff 00 15 ea 01 fe 03 fc 05 fa 07 f8 0b f4 30 cf | |
| reading 23 bytes, timeout = 500 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| echo "Hello World!"; | |
| function make_packet($data) | |
| { | |
| $bytes = str_split($data, 2); | |
| $buffer = "\x55\xff\x00"; | |
| $sum = 0; | |
| foreach ($bytes as $byte) { | |
| $byte = hexdec($byte); | |
| $sum += $byte; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Discourse View Post Source | |
| // @namespace jholbrook | |
| // @author John Holbrook | |
| // @version 0.1 | |
| // @description Adds a 'view post source' button to posts on Discourse forums | |
| // @website https://gist.github.com/dhmmjoph/77edfd56cd54e65acbd4877e3154458a | |
| //Change these or add aditional sites here: | |
| // @match https://www.vexforum.com/t/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for i in {1..30} | |
| do | |
| echo "Loop $i" | |
| youtube-dl -a list.txt | |
| done |