This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s1x = 30 | |
s1y = 30 | |
s2 = 20 | |
gen = [] | |
next_gen = [] | |
clicks = [] | |
zero = 50 | |
one = 250 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
pinMode(13, OUTPUT); | |
} | |
void loop() { | |
static uint16_t t = 0; | |
static uint8_t k = 0; | |
static int8_t i = 1; | |
t++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
f=$(pwd) | |
sips --resampleWidth 512 "${f}/${1}" --out "${f}/iTunesArtwork" | |
sips --resampleWidth 1024 "${f}/${1}" --out "${f}/iTunesArtwork@2x" | |
sips --resampleWidth 29 "${f}/${1}" --out "${f}/${2}-29.png" | |
sips --resampleWidth 58 "${f}/${1}" --out "${f}/${2}-29@2x.png" | |
sips --resampleWidth 87 "${f}/${1}" --out "${f}/${2}-29@3x.png" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MathPuzzle { | |
public static float getNumber(String eq) | |
{ | |
float[] stackArray = new float[100]; | |
int stackPointer = 0; | |
for (int i = 0; i < eq.length(); i++) { | |
char c = eq.charAt(i); | |
if ((c>='0') && (c<='9')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
im0 = Image.open("IMG_1.PNG") | |
im1 = Image.open("IMG_2.PNG") | |
im2 = Image.open("IMG_3.PNG") | |
im3 = Image.open("IMG_4.PNG") | |
size = im0.size | |
pix0 = im0.load() | |
pix1 = im1.load() | |
pix2 = im2.load() | |
pix3 = im3.load() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NOW=$(date +"%Y-%m-%d") | |
NUMBER=`cat radio-t_number` | |
RADIOTDIR=~/RadioT/${NUMBER}_${NOW} | |
mkdir -p $RADIOTDIR | |
cd $RADIOTDIR | |
while [ ! -f stream.m3u ]; do | |
wget http://stream.radio-t.com:8181/stream.m3u |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
#include <WiFiUdp.h> | |
#include <DNSServer.h> | |
#include <ESP8266WebServer.h> | |
#include <Adafruit_NeoPixel.h> | |
#include "FS.h" | |
//const char ssid[] = "AnchorFree"; | |
//const char pass[] = "wifi4free!"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define abs(x) ((x)<0 ? -(x) : (x)) | |
double calc_prec(double x, double pr) | |
{ | |
double s = 0; | |
double n = 1; | |
double k = 1; | |
double xx = x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void reverse_array(int *arr, int start, int end) | |
{ | |
for (int i = start; i < (start + end) / 2; i++) | |
{ | |
arr[i] ^= arr[end + start - i - 1]; | |
arr[end + start - i - 1] ^= arr[i]; | |
arr[i] ^= arr[end + start - i - 1]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main() | |
{ | |
FILE *f, *g, *h; | |
f = fopen("f", "r"); | |
g = fopen("g", "w"); | |
h = fopen("h", "w"); |
OlderNewer