Skip to content

Instantly share code, notes, and snippets.

View hensing's full-sized avatar

Henning Dickten hensing

View GitHub Profile
@jph00
jph00 / py.md
Last active May 31, 2022 06:16
Organized and hyperlinked index to every module, function, and class in the Python standard library

All of the python 3.9 standard library

For a version without the collapsible details sections (so you can search the whole thing in your browser), click here.

@darookee
darookee / mqtt_export.py
Created April 7, 2016 11:08
Export Home Assistant state changes to MQTT
"""
MQTT publisher for all Home Assistant states.
Copyright (c) 2016 Fabian Affolter <[email protected]>
Licensed under MIT
For questions and issues please use https://community.home-assistant.io
To use this component you will need to add something like the
following to your configuration.yaml file.
@SpotlightKid
SpotlightKid / getdocstrings.py
Created September 1, 2014 09:22
Parse Python source code and get or print docstrings.
# -*- coding: utf-8 -*-
"""Parse Python source code and get or print docstrings."""
__all__ = ('get_docstrings', 'print_docstrings')
import ast
from itertools import groupby
from os.path import basename, splitext
@Nurdok
Nurdok / python_conversion.md
Last active July 11, 2024 15:00
Python Conversion

Python Number Conversion Chart

From To Expression
@jonathan-taylor
jonathan-taylor / execute_and_save.py
Created June 8, 2012 08:09
A script to load an .ipynb file, execute all cells in order and output the resulting notebook. Depends on https://github.com/jonathan-taylor/nbconvert/tree/json2json
"""
simple example script for running notebooks and saving the resulting notebook.
Usage: `execute_and_save.py foo.ipynb [bar.ipynb [...]]`
Each cell is submitted to the kernel, and the outputs are overwritten and
stored in new notebooks foo_executed.ipynb, etc.
"""
import os,sys,time
@leif81
leif81 / git_fix_author
Created March 9, 2011 21:50
Written to change the unix name used for a cvs commit to a pretty git name for the user. Implementation borrowed from http://lists.freedesktop.org/archives/portland/2010-October.txt author-conv-file format (same format as git-cvsimport requires):
#!/bin/bash
export $authors_file=author-conv-file
git filter-branch -f --env-filter '
get_name () {
grep "^$1=" "$authors_file" |
sed "s/^.*=\(.*\) <.*>$/\1/"
}