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
int led_pin = 13; | |
void setup() { | |
pinMode(led_pin, OUTPUT); | |
} | |
int dit_high = 60; | |
int dit_low = 120; | |
int dash_high = 120; |
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
int led_pin = 13; | |
void setup() { | |
pinMode(led_pin, OUTPUT); | |
} | |
void loop() { | |
int on_time; | |
int off_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
push-zeros: push-zeros.c | |
gcc -Wall -Werror -o push-zeros push-zeros.c | |
test: push-zeros | |
./push-zeros | |
clean: | |
rm -f push-zeros | |
.PHONY: test clean |
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
test: hical | |
./hical | |
hical: hical.c | |
gcc -Wall -Werror -o hical hical.c | |
clean: | |
rm -f hical | |
.PHONY: test clean |
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
test: paren | |
./paren | |
paren: paren.c | |
gcc -Wall -Werror -o paren paren.c | |
clean: | |
rm -f paren | |
.PHONY: test paren |
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/env python | |
# read in the HTML via stdin: | |
import sys | |
input = sys.stdin.read() | |
# define the set of toknes which our lexer knows about: | |
import re | |
symbol_table = ( | |
("opentag", re.compile(r'<[a-zA-Z].*?>')), |
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
var dict: Dictionary<String, Any> = ["window.rootViewController": UIViewController.self] | |
switch dict["window.rootViewController"] { | |
// Expression pattern of type 'UIViewController.Type' cannot match values of type 'Any' | |
case .some(UIViewController.self): | |
print("yay!") | |
default: | |
print("boo!") | |
} |
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
test: reverse | |
./reverse | |
reverse: reverse.c | |
gcc -Wall -Werror -o reverse reverse.c | |
clean: | |
rm -f reverse | |
.PHONY: test reverse |
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/env python | |
import sys | |
import json | |
# Safe access for lists. | |
def lget(l, i, default=None): | |
if len(l) <= i: | |
return default | |
else: |
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
++ ./shuffle.py '[1]' '[2]' '[1,2]' | |
+ test True == True | |
++ ./shuffle.py '[1]' '[2]' '[2,1]' | |
+ test True == True | |
++ ./shuffle.py '[1,2]' '[3]' '[1,2,3]' | |
+ test True == True | |
++ ./shuffle.py '[1,2]' '[3]' '[1,3,2]' | |
+ test True == True | |
++ ./shuffle.py '[1,2]' '[3]' '[3,1,2]' | |
+ test True == True |
OlderNewer