Skip to content

Instantly share code, notes, and snippets.

View kinkerl's full-sized avatar

Dennis Schwertel kinkerl

  • germany, remote
View GitHub Profile
# pip install pandas matplotlib
import pandas
df1 = pandas.read_csv("OMDAQ-XL _10_24_2019 12_22_21_PM.csv")
print(df1[:5])
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
plt.plot(df1['Date&Time'],df1['T_Housing'])
plt.plot(df1['Date&Time'],df1['T_D44'])
import pytest
def calc(v1_s, v1_ns, v1_sgn, v2_s, v2_ns):
if v1_sgn: # erstes value ist positiv
# Hier ist alles einfach, keine Probleme mit switches
ns = (v1_ns + v2_ns)
#https://serversforhackers.com/c/redirect-http-to-https-nginx
server {
listen 80 www.eurobike.com;
listen [::]:80 default_server ipv6only=on;
server_name www.eurobike.com;
# normaler redirect
rewrite ^/$ http://www.domain2.com permanent;
@kinkerl
kinkerl / getversion_from_github.py
Created July 19, 2018 12:57
getversion_from_github.py
import requests
import click
#get version from github
def get_version_from_string(line):
return line.split("::")[-1].strip()

Keybase proof

I hereby claim:

  • I am kinkerl on github.
  • I am kinkerl (https://keybase.io/kinkerl) on keybase.
  • I have a public key ASDjDbciP_fpP0guY17CJnysnK1IVZXn4B9ei35qTIW-9wo

To claim this, I am signing this object:

@kinkerl
kinkerl / divio-apitest.py
Created February 18, 2018 14:51
Connection to the divio rest API to get information about your website
import requests
import os
import json
class NullAuth(requests.auth.AuthBase):
'''force requests to ignore the ``.netrc``
Some sites do not support regular authentication, but we still
want to store credentials in the ``.netrc`` file and submit them
as form elements. Without this, requests would otherwise use the
import sys
from homie import utils
###
# Wifi settings
###
# Name of Wifi
WIFI_SSID = "YOUR_WIFI_SSID"
@kinkerl
kinkerl / main.py
Last active February 12, 2018 19:28
main.py for microhomie quickstart
import utime
import settings
from homie.node.dht22 import DHT22
from homie import HomieDevice
# Homie device setup
homie_device = HomieDevice(settings)
homie_device.add_node(DHT22(interval=60, pin=2))
#!/bin/sh
for arg; do
realarg="$(realpath "$arg")"
case "$realarg" in
/|/usr|/var|/etc|/home|/bin|/lib|/lib64|/boot|/opt|/media|/root)
echo "refusing to remove $realarg" 1>&2
exit 100
;;
@kinkerl
kinkerl / errorfix.php
Last active April 6, 2016 14:11
php catch all
<?php
// ----------------------------- -----------------------------------------------------------------------
// - Display Errors - http://stackoverflow.com/questions/1475297/phps-white-screen-of-death
// ----------------------------------------------------------------------------------------------------
ini_set('display_errors', 'On');
ini_set('html_errors', 0);
// ----------------------------------------------------------------------------------------------------
// - Error Reporting