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
/* | |
Speedo converter by jes | |
How to re-program the board: | |
Orient the board so the programming header is at top left and the LED is at bottom left. | |
Pins are as follows, from top: | |
1. Reset | |
2. 0 (RX) | |
3. 1 (TX) | |
4. +5V |
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
/* magcube solver | |
* James Stanley 2018 | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <math.h> | |
/* uncomment this if you want to find new cube sets instead of using the set I settled on, ... */ |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use GD; | |
my $filename1 = shift or die "usage: xorimg ONE.PNG TWO.PNG > OUTPUT.PNG\n"; | |
my $filename2 = shift or die "usage: xorimg ONE.PNG TWO.PNG > OUTPUT.PNG\n"; |
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
package main | |
import ( | |
"fmt" | |
"net" | |
"os" | |
"strings" | |
) | |
func main() { |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use bytes; | |
my $input = 'BYGRBLBYBLBLBYBRBLGYBYYYBLBYBYBLBYFYBLGYBGRGBGRRBGFRBLBFBLBYBYFLBLBGBYYBBLYYBGRLBYYFBYGRBYFRBLBFBGYFBYRRBGRYBGYFBGRRBLGG'; | |
for my $b (0 .. 5) { |
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
'use strict'; | |
class Markov { | |
constructor() { | |
this.maxLength = 30; | |
this.dict = {}; | |
} | |
addSentence(text) { | |
// '\0' is a sentinel marking the beginning + end of sentences |
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
package main | |
import ( | |
"fmt" | |
"golang.org/x/net/proxy" | |
"net" | |
"os" | |
"strconv" | |
"time" | |
) |
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
'use strict'; | |
class Markov { | |
constructor() { | |
this.minLength = 6; | |
this.maxLength = 30; | |
this.dict = {}; | |
} | |
addSentence(text) { |
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> | |
#include <unistd.h> | |
#include <time.h> | |
int main() { | |
srand(time(NULL)); | |
short *buf = malloc(1048576); | |
for (int i = 0; i < 1000; i++) { |
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> | |
#include <unistd.h> | |
#include <time.h> | |
#include <inttypes.h> | |
// lfsr64 from https://github.com/russm/lfsr64/blob/master/lfsr64.c | |
uint64_t byte_feedback[256] = { | |
0x0000000000000000, 0xc70000000000000b, 0x8e0000000000000d, 0x4900000000000006, |