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
import random | |
def generate_dynamic_response_body(dict): | |
#build up string programmatically | |
response_body = """ | |
<html> | |
<head> | |
<title>Dynamic Demo</title> | |
<link rel="stylesheet" href="styles/style.css"> |
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
import socket | |
import time | |
import signal | |
#added for parsing urls | |
import urllib | |
#added for tracing prints | |
import traceback | |
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
# Done: get the Request Method | |
request_method = request_line.split(' ')[0] | |
file_name = "." + request_line.split(' ')[1] | |
file_extension = file_name.split(".")[2] | |
# Done: read all Request Headers into a dictionary. | |
headers = {} | |
while True: | |
header_line = reader_from_browser.readline().decode("utf-8") |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Selectors</title> | |
<style> | |
</style> | |
</head> |
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
// Pin 10 - Left LED Orange | |
#define REG_DDR_LED_ORANGE DDR_ | |
#define REG_PORT_LED_ORANGE PORT_ | |
#define BIT_LED_ORANGE _ | |
// Pin 3 - Left Pushbutton Orange | |
#define REG_DDR_BUTTON_ORANGE DDR_ | |
#define REG_PORT_BUTTON_ORANGE PORT_ | |
#define REG_PIN_BUTTON_ORANGE PIN_ | |
#define BIT_BUTTON_ORANGE _ |
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
import 'package:exam1_emoji_matching/emoji_matching_game.dart'; | |
import 'package:test/test.dart'; | |
void main() { | |
late MatchingGame game3; | |
late MatchingGame game5; | |
late MatchingGame game10; | |
setUp(() { | |
game3 = MatchingGame(3); | |
game10 = MatchingGame(10); |
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
import "package:test/test.dart"; | |
import "tic_tac_toe_game.dart"; | |
void main() { | |
late TicTacToeGame game; | |
setUp(() { | |
game = TicTacToeGame(); | |
}); | |
test("Initial Game", () { | |
expect(game.state, equals(TicTacToeState.xTurn)); |
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
! function (e) { | |
var n = function (e) { | |
var n = e.split(".")[1]; | |
if (n = JSON.parse(atob(n)), n.d) n = n.d; | |
else { | |
var r = n.uid; | |
n = n.claims, n.uid = r | |
} | |
return { | |
token: e, |
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
""" | |
rosegraphics.py - a simple Graphics library for Python. | |
Its key feature is: | |
-- USING this library provides a simple introduction to USING objects. | |
Other key features include: | |
-- It has a rich set of classes, methods and instance variables. | |
In addition to classes like Circles that are natural for students, | |
it has other kinds of classes like RoseWindow and SimpleTurtle |
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
""" | |
rosegraphics.py - a simple Graphics library for Python. | |
Its key feature is: | |
-- USING this library provides a simple introduction to USING objects. | |
Other key features include: | |
-- It has a rich set of classes, methods and instance variables. | |
In addition to classes like Circles that are natural for students, | |
it has other kinds of classes like RoseWindow and SimpleTurtle |
NewerOlder