Skip to content

Instantly share code, notes, and snippets.

View j-faria's full-sized avatar

João Faria j-faria

View GitHub Profile
@user202729
user202729 / a-description.md
Last active January 3, 2025 11:18
a hack to get PythonTeX to work on overleaf...

Put this as your TeX file

\documentclass{article}
\usepackage{shellesc}

%\usepackage{fancyvrb}
%\usepackage{fvextra}
%\fvset{breaklines=true, breakanywhere=true}
@imneme
imneme / randutils.hpp
Last active September 25, 2024 13:41
Addresses common issues with C++11 random number generation; makes good seeding easier, and makes using RNGs easy while retaining all the power.
/*
* Random-Number Utilities (randutil)
* Addresses common issues with C++11 random number generation.
* Makes good seeding easier, and makes using RNGs easy while retaining
* all the power.
*
* The MIT License (MIT)
*
* Copyright (c) 2015-2022 Melissa E. O'Neill
*
@adrn
adrn / cmd-line-function.py
Created September 24, 2013 20:40
Specify which function to run in a module from the command line
import sys
def some_name():
print("function 1")
def some_other_name():
print("function 2")
if __name__ == "__main__":
func = getattr(sys.modules[__name__], sys.argv[1])