Skip to content

Instantly share code, notes, and snippets.

View irieger's full-sized avatar

Ingmar Rieger irieger

View GitHub Profile
@irieger
irieger / sample_result.txt
Last active March 25, 2020 13:58
Sample python script to calculate the spreading of the virus
>>> virus(1.3)
Spreding with r0=1 over 10 rounds
Round 001, newly infected in round: 000001.30, cases overall: 000002.30
Round 002, newly infected in round: 000001.69, cases overall: 000003.99
Round 003, newly infected in round: 000002.20, cases overall: 000006.19
Round 004, newly infected in round: 000002.86, cases overall: 000009.04
Round 005, newly infected in round: 000003.71, cases overall: 000012.76
Round 006, newly infected in round: 000004.83, cases overall: 000017.58
Round 007, newly infected in round: 000006.27, cases overall: 000023.86
Round 008, newly infected in round: 000008.16, cases overall: 000032.01
@irieger
irieger / cfencode_libav.cpp
Last active October 26, 2019 07:50
Excerpt of my try to use libavformat to pack (mov) movie containers with external CFHD frame encoding
std::string filename;
AVFormatContext* format_context = NULL;
int32_t out_height = 1080;
int32_t out_width = 1920;
int32_t out_framerate = 24;
AVOutputFormat* out_format = nullptr;
AVStream* out_avstream = nullptr;
@irieger
irieger / CMakeLists.txt
Last active February 23, 2018 07:55
ffmpeg compile and link test
cmake_minimum_required( VERSION 2.8 FATAL_ERROR )
project( ffmpeg-linking-test )
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/" )
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -O0 -g" )
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -O2" )