Skip to content

Instantly share code, notes, and snippets.

View cgawron's full-sized avatar

Christian Gawron cgawron

View GitHub Profile
import python_weather
import asyncio
class ActionCheckWeather(Action):
def name(self) -> Text:
return "action_check_weather"
async def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
from rasa_sdk import Action
from rasa_sdk.events import SlotSet
import requests
class ActionTellJoke(Action):
def name(self) -> Text:
return "action_tell_joke"
def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
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)
# 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:
@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)
@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 / 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.

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 / 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>
@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.