Skip to content

Instantly share code, notes, and snippets.

View suhrmann's full-sized avatar
🚀

Simon Uhrmann suhrmann

🚀
  • TC Freyung | th-deg.de/tc-freyung
  • Bavaria, Germany
  • 02:38 (UTC +01:00)
View GitHub Profile
@suhrmann
suhrmann / random_kick_with_sound.js
Last active June 8, 2017 03:16
A Script for sinusbot to kick a player who's randomly choosen and play a sound shortly before the kick.
registerPlugin({
name: 'Random Kick With Sound',
version: '1.0',
description: 'If someone sends "!rkick" to the bot, he will randomly kick one member from the channel while playing a medley.',
author: 'vadammt <vadammt@mordsgau.de>',
vars: {
message: {
title: 'Message which user activated random kick. (%n = nickname)',
type: 'string'
},
@suhrmann
suhrmann / DEVELOPER-INSTRUCTIONS.md
Last active May 12, 2017 13:04
Instructions for developing on viktorgino/headunit-desktop

Development Instructions for HeadUnit Desktop


!!! IMPORTANT NOTE !!!

I created this document mostly for myself to document the steps to contribute in the headunit-desktop project, but I thought it can help one or two.
I continue writing on it and some points may be incomplete or even wrong.
Feel free to leave feedback in the comment section. For discussions there's a Gitter chat

How-To

You can simply follow @viktorgino's build and install instructions for headunit-desktop.

@suhrmann
suhrmann / Stocks.py
Created November 27, 2019 17:29
Fixed @sryza/spark-ts-examples/python/Stocks.py
from datetime import datetime
from pyspark import SparkConf, SparkContext, SQLContext
from pyspark.sql import Row
from pyspark.sql.types import StructType, StructField, TimestampType, DoubleType, StringType
from sparkts.datetimeindex import uniform, BusinessDayFrequency
from sparkts.timeseriesrdd import time_series_rdd_from_observations
def lineToRow(line):
@suhrmann
suhrmann / Example.py
Created November 27, 2019 19:00
twosigma/flint/example/Flint Example.ipynb as Python script
from pyspark import SparkContext, SQLContext
from pyspark.sql import Row
from pyspark.sql.types import StructType, StructField, TimestampType, DoubleType, StringType
import ts.flint
from ts.flint import FlintContext
flintContext = FlintContext(sqlContext)
sp500 = spark.read.option('header', True).option('inferSchema', True).csv('sp500.csv').withColumnRenamed('Date', 'time')
sp500 = flintContext.read.dataframe(sp500)
@suhrmann
suhrmann / EFI tree
Last active March 7, 2020 10:09
MacOS Catalina 10.15.3 on Asus Z370-A, Intel i8700K, Radeon RX 5700 XT
$/Volumes/EFI/EFI tree
.
├── BOOT
│   └── BOOTX64.efi
├── CLOVER
│   ├── ACPI
│   │   ├── WINDOWS
│   │   ├── origin
│   │   └── patched
│   │   ├── SSDT-DTPG.aml
@suhrmann
suhrmann / mount_bitlocked_windows.sh
Last active May 5, 2020 14:04
Mount a BitLocker encrypted (Windows) drive using 'dislocker' - Created and tested on Ubuntu 20.04
# Mount a BitLocker encrypted (Windows) partition
### SET THESE VALUES
# Set either(!) BITLOCKER_RECOVERY_KEY or BITLOCKER_USER_PASSWORD used to unlock drive
BITLOCKER_USER_PASSWORD=
BITLOCKER_RECOVERY_KEY= # e.g. 123456-123456-123456-123456-123456-123456-123456-123456
# The drive to mount (where Windows is located)
WINDOWS_PARTITION=/dev/nvme0n1p4 # Or /dev/sda4
@suhrmann
suhrmann / debugger.py
Created May 16, 2020 10:09
Query all attributes of modules found in the Anno 1800 Python API; query depth: 1 - thanks to [Nick11 / anno1800_python_api_prober](https://github.com/Nick11/anno1800_python_api_prober)
import sys, binascii
import os
import datetime
sys.path.append(SRC_PATH)
from api_wrapper import api_wrapper as api
import pprint
def main():
wood_id = 120008
@suhrmann
suhrmann / install-docker-on-raspberry-pi.sh
Last active August 7, 2020 09:08
Install Docker and `docker-compose` on the Raspberry Pi
# Based on:
# "Docker auf dem Raspberry Pi" (Docker on Raspberry Pi), c't 2/2019,
# https://www.heise.de/select/ct/2019/2/1546749973900625
# Download install script
curl -fsSL https://get.docker.com -o get-docker.sh
# Install Docker
sudo sh get-docker.sh
@suhrmann
suhrmann / run_videopose3d__in_the_wild.sh
Last active December 4, 2020 20:44
Run script for "Inference in the wild" of https://github.com/facebookresearch/VideoPose3D - Make sure requirements are met, described in comment
#!/bin/sh
# The input videos to detect - if directory apply script on each video of it - use absolute path!
INPUT_PATH="/path/to/your/videos/"
# Path were detected annotations and rendered videos are stored - use absolute path!
OUTPUT_DIR="$HOME/Development/VideoPose3D/output_directory"
# Custom name for the generated dataset - here: using name of directory $INPUT_PATH
# Used to generate data/data_2d_custom_<DATASET_NAME>.npz
@suhrmann
suhrmann / settings.json
Last active December 29, 2020 15:59
Settings of VSCode plugin "LaTeX Workshop" to use _minted_ (syntax highlighting) and _glossaries_
{
"latex-workshop.view.pdf.viewer": "tab",
/**
* Add minted (syntax highlighting): Source: https://tex.stackexchange.com/a/437089
* Add glossary support: https://github.com/James-Yu/LaTeX-Workshop/issues/238#issuecomment-411358410
*/
"latex-workshop.latex.recipes": [
{ // glossary support