Skip to content

Instantly share code, notes, and snippets.

View daknuett's full-sized avatar
🏠
Working from home

Daniel Knuettel daknuett

🏠
Working from home
View GitHub Profile
@daknuett
daknuett / pingtest.py
Created March 8, 2016 18:09
searching for hosts using ping and a little python3 script
#!/usr/bin/python2
import os, sys, time
from optparse import OptionParser
# get some IPs
end=20
start=2
# these are most common last numbers
@daknuett
daknuett / make_everything_ok.py
Last active June 14, 2018 16:45
Makes everything ok, optional by using a neuronal network.
#!/usr/bin/python3
#
# Copyright(c) 2017 Daniel Knüttel
#
# This script is free software.
# Anyways if you think this script is worth it
# and we meet shout a drink for me.
@daknuett
daknuett / alldoc.py
Created January 20, 2017 19:58
Extract rst documentation from (non-python) sourcefiles
#!/usr/bin/python3
#
# Copyright(c) 2017 Daniel Knüttel
#
# This program is free software.
# Anyways if you think this program is worth it
# and we meet shout a drink for me.
@daknuett
daknuett / hearth.py
Last active March 11, 2020 14:53
Print stuff with hearth
import shutil, math, sys
"""
Share love on your computer.
Usage:
::
python3 hearth.py {line}
@daknuett
daknuett / collect_mail.py
Created February 14, 2017 17:21
Send emails to multiple recipients with ease
import smtplib, argparse, json, sys
from email.mime.multipart import *
from email.mime.text import *
"""
Send emails to a lot of receipients with ease.
"""
#
@daknuett
daknuett / imgtotext.py
Created February 15, 2017 21:50
Convert Images to text
import shutil, math, sys
import matplotlib.image
import numpy as np
import matplotlib.pyplot as plt
#
# Copyright(c) 2017 Daniel Knüttel
#
# This program is free software.
@daknuett
daknuett / sphinx-github-doc.make
Last active February 19, 2018 09:26
A simple Makefile to make sphinx html suit github-pages
# Using github-pages with sphinx-build documentation
# is a pain in the ass.
# This makefile solves the problems quickly.
# just add these lines to the "html" rule that sphinx-quickstart
# generated and save this file with the name github-make in
# the folder that contains your sphinx-Makefile:
#
# @echo "Copying files to /docs..."
# if [ -e ../docs ] ;then rm -rf ../docs;fi
@daknuett
daknuett / SimpleArithmeticParser.ipynb
Created January 16, 2018 11:08
SimpleArithmeticParser.ipynb -- A Demo Parser written in python3
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import requests
import time
import json
url = "https://de.wikipedia.org/w/api.php?action=query&prop=revisions&titles=Jan_B%C3%B6hmermann&rvslots=*&rvprop=timestamp|user|content&rvlimit=max&format=json"
url2 = "https://de.wikipedia.org/w/api.php?action=query&prop=revisions&titles=Jan_B%C3%B6hmermann&rvslots=*&rvprop=timestamp|user|content&rvlimit=max&format=json&rvstart={}"
s = requests.Session()
USE_LOADED_DATA = False
if(not USE_LOADED_DATA):
@daknuett
daknuett / Dockerfile
Last active May 15, 2020 11:58
Dockerfile for gpt
FROM debian:latest
RUN apt-get update
RUN apt-get install -y gcc cmake libmpfr-dev libgmp-dev git build-essential autoconf
RUN apt-get install -y wget libssl-dev zlib1g-dev
RUN apt-get install -y rpm
RUN apt-get install -y python3 python3-pip
RUN wget https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.3-1.src.rpm
RUN rpm -i openmpi-4.0.3-1.src.rpm