Skip to content

Instantly share code, notes, and snippets.

View cgawron's full-sized avatar

Christian Gawron cgawron

View GitHub Profile
@cgawron
cgawron / esp_mqtt_ota.c
Created May 3, 2018 05:16
ESP32 OTA with espmqtt
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;
}
@cgawron
cgawron / beispiel_html5.markdown
Created February 4, 2019 21:49
Beispiel_HTML5
@cgawron
cgawron / hello_world.html
Created March 7, 2019 16:20
Hello World in HTML5
<!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.
@cgawron
cgawron / index.html
Created April 29, 2019 08:22
Pizza Order
<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>

Keybase proof

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:

@cgawron
cgawron / HC2020_practice_round.ipynb
Last active January 20, 2020 15:41
Solution for Practice Round of Hash Code 2020
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cgawron
cgawron / aufgabe.md
Created May 19, 2023 10:48
Thomas' Matheproblem

Wir zeigen:

$$\frac{\partial}{\partial t} \int_0^{\phi(t)} f(x) dx = \frac{\partial \phi}{\partial t}(t) f(\phi(t))$$

Physikerargumentation

Nach Kettenregel gilt

$$\frac{\partial}{\partial t} = \frac{\partial \phi}{\partial t} \frac{\partial}{\partial \phi}$$
@cgawron
cgawron / Ferienkurs
Created October 4, 2023 11:03
CNN für FashionMNIST
# 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)
# 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:
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)