A Pen by Christian Gawron on CodePen.
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
static void handle_ota(esp_mqtt_event_handle_t event, char *path[], int numComponents) | |
{ | |
esp_err_t err; | |
static esp_ota_handle_t update_handle = 0; | |
if (numComponents < 3) | |
{ | |
ESP_LOGW(TAG, "too few components"); | |
return; | |
} |
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> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World für HTML5</title> | |
</head> | |
<body> | |
<h1>Hallo Welt!</h1> | |
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. |
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
<h1>Zentraler Pizza-Service der Fachhochschule Südwestfalen</h1> | |
<form method="post" action="https://localhost/inet_sose2019/echo.php" target="_blank"> | |
<section id="customer_data"> | |
<p><label for="customer">Name:</label><input id="customer" name="customer" required="true" /></p> | |
<p><label for="phone">Telefon:</label><input id="phone" type="tel" name="phone"></p> | |
<p><label for="email">Email:</label><input id="email" type="email" name="email"></p> | |
<p> | |
<label for="location">Standort:</label> | |
<select id="location" name="location"> | |
<option value="hagen">Hagen</option> |
I hereby claim:
- I am cgawron on github.
- I am cgawron (https://keybase.io/cgawron) on keybase.
- I have a public key ASBZ1rggrJJGsnktQ7Y3OunpnOpNmMRQ-hi3I4ecGLzLxAo
To claim this, I am signing this object:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Define the network architecture | |
class Net(nn.Module): | |
def __init__(self): | |
super(Net, self).__init__() | |
self.conv1 = nn.Conv2d(1, 32, 3, 1) | |
self.conv2 = nn.Conv2d(32, 64, 3, 1) | |
self.dropout1 = nn.Dropout2d(0.25) | |
self.dropout2 = nn.Dropout2d(0.5) | |
self.fc1 = nn.Linear(9216, 128) | |
self.fc2 = nn.Linear(128, 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
# goes through right boundary | |
if self.head.x > self.w - BLOCK_SIZE: | |
self.head = Point(0, self.head.y) | |
# goes through left boundary | |
elif self.head.x < 0: | |
self.head = Point(self.w - BLOCK_SIZE, self.head.y) | |
# goes through bottom boundary | |
elif self.head.y > self.h - BLOCK_SIZE: |
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
WHITE = (255, 255, 255) # Python's color code for white | |
EYE_WIDTH = 3 | |
EYE_HEIGHT = 3 | |
def draw_snake_eyes(self, direction): | |
pt = self.snake[0] | |
if direction == 'UP': | |
eye_pos1 = (pt.x + 5, pt.y + 5) | |
eye_pos2 = (pt.x + BLOCK_SIZE - 10, pt.y + 5) |
OlderNewer