This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Convert a number from Roman notation to Arabic. | |
# Nick Bailey, nickbailey at github.com. 25th July 2023. | |
# From https://gist.github.com/pysysops/7596f1c0a5c6d14151bbd987a2fb95e5 | |
# Syntax check from the python roman package: https://pypi.org/project/roman/ | |
# | |
function roman () { | |
roman_numerals=$(echo $1 | tr a-z A-Z) | |
# Test that it is valid | |
[[ "${roman_numerals//[IVXLCDM]/}" == "" ]] || { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A little bit of research to find out how to regress jack to ALSA :) | |
// compile with g++ push_to_jack.cpp -ljack | |
#include <jack/jack.h> | |
#include <thread> | |
#include <mutex> | |
#include <condition_variable> | |
#include <iostream> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{minimal} | |
\usepackage{tikz,ifthen} | |
\usetikzlibrary{calc} | |
% HELPER MACROS | |
% Proportional postion of the first tick | |
% | |
% Arguments: number of segments, ratio |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Test the thread_pool class | |
* | |
* Compile with g++ -I.. ../thread_pool.cpp thread_pool-test.cpp -pthread | |
*/ | |
#include <iostream> | |
#include <mutex> | |
#include <exception> | |
#include "thread_pool.h" |