Skip to content

Instantly share code, notes, and snippets.

View vsee's full-sized avatar

Volker Seeker vsee

View GitHub Profile
@vsee
vsee / abs_humid.py
Created January 9, 2021 20:49
Calculate the absolute humidity based on relative temperature in Celcius and relative humidity in percent.
#!/usr/bin/env python3
"""
Calculate the absolute humidity based on relative temperature in Celcius
and relative humidity in percent.
Based on:
https://carnotcycle.wordpress.com/2012/08/04/how-to-convert-relative-humidity-to-absolute-humidity/
Dry vs. Wet House based on Absolute Humidity:
@vsee
vsee / swapJava
Last active October 8, 2019 12:20
Java version switcher for Ubuntu
#!/bin/bash
# Swaps between java versions
#
# Execute using the source or '.' command to set environment correctly
#
# to install alternatives after unpacking oracle java tar at /opt/jdk1.8.0_202/ execute
# sudo sh -c 'for bin in /opt/jdk1.8.0_202/bin/*; do update-alternatives --install /usr/bin/$(basename $bin) $(basename $bin) $bin 1500; done'
#
# to switch manually for individual bins execute
# sudo update-alternatives --config java
@vsee
vsee / genSquareTransitions.py
Created April 21, 2017 16:51
generates square shaped transitions for a list of given data points.
'''
This script generates square shaped transitions
for a list of given data points.
### Example
Input:
x,y
0,100
5,430
10,200
@vsee
vsee / Makefile
Created April 8, 2017 07:15
Out of Source Build Makefile Template for C++ Projects
APP=appname
SRC_DIR=src
INC_DIR=inc
OBJ_DIR=obj
BIN_DIR=bin
CC=g++
LD=g++
CFLAGS=-O2 -c -Wall -std=c++11