Skip to content

Instantly share code, notes, and snippets.

View stlehmann's full-sized avatar
:bowtie:

Stefan Lehmann stlehmann

:bowtie:
View GitHub Profile
@stlehmann
stlehmann / sympy_efctjacobi.ipynb
Last active August 29, 2015 14:10
IPython Notebook for extracting the Jacobian out of an exponential function with SymPy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stlehmann
stlehmann / pdfsplit.py
Created November 28, 2014 09:02
Split a pdf file in multiple documents
#! python3
import os
import sys
import argparse
from PyPDF2 import PdfFileReader, PdfFileWriter
def split_pdf(input, output, stepsize=1):
output = output or os.path.splitext(input)[0]
@stlehmann
stlehmann / wifi_temp.ino
Created December 28, 2014 21:42
Read Temperature from onewire sensor end send to Thingspeak
#include <OneWire.h>
#include <DallasTemperature.h>
#include <uartWIFI.h>
#define SSID "my_network"
#define PASS "my_password"
#define ONEWIRE_BUS 10
#define THINGSPEAK_IP "184.106.153.149"
#define THINGSPEAK_KEY "my_thingspeak_key"
@stlehmann
stlehmann / keymap.cson
Created January 7, 2015 09:28
My Atom Keymap
# Your keymap
#
# Atom keymaps work similarly to stylesheets. Just as stylesheets use selectors
# to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
# Here's an example taken from Atom's built-in keymap:
@stlehmann
stlehmann / interfaces
Created January 11, 2015 19:17
RaspberryPi WiFi config
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid my_ssid
wpa-psk my_password
@stlehmann
stlehmann / setup.py
Created January 13, 2015 12:45
py2exe setup script for PyQt5 application including matplotlib, numpy, scipy, pandas
#! python3.4
from setuptools import setup
import os
import py2exe
import matplotlib
includes = ["sip",
"PyQt5",
"PyQt5.QtCore",
"PyQt5.QtGui",
@stlehmann
stlehmann / run_pyqt_application.pyw
Created January 23, 2015 06:51
add translator for Qt internals and application specific strings
#!python3.4
"""
Script for starting a PyQt5 Application.
"""
import sys
from PyQt5.QtWidgets import QApplication
from PyQt5.Qt import QLocale, QTranslator
from myapp import VERSION
@stlehmann
stlehmann / wifitest.sh
Created March 7, 2015 08:32
Shell script for periodic check if the Wifi adapter is still up
#!/bin/bash
TESTIP=192.168.1.1
ping -c4 ${TESTIP} > /dev/null
if [ $? != 0 ]
then
logger -t $0 "WiFi seems down, restarting"
ifdown --force wlan0
@stlehmann
stlehmann / Pandoc.sublime-settings
Last active August 29, 2015 14:16
Settings file of sublimetext-Pandoc plugin
{
"user": {
// transformations
"transformations": {
"reStructuredText": {
"new-buffer": 1,
"scope": {
"text.html.markdown": "markdown"
},
"syntax_file": "Packages/RestructuredText/RestructuredText.tmLanguage",
@stlehmann
stlehmann / Preferences.sublime-settings.json
Created March 20, 2015 07:09
Sublime Text 3 User Preferences
{
"color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme",
"font_size": 14,
"ignored_packages":
[
"Vintage"
],
"rulers":
[
80