Skip to content

Instantly share code, notes, and snippets.

@Iximiel
Iximiel / printfdebug.cpp
Created May 31, 2024 08:30
A small collection of printf-debugging style utilities
#include <iostream>
#define vdbg(...) std::cerr << __LINE__ << ":" << #__VA_ARGS__ << " " << (__VA_ARGS__) << '\n'
@Iximiel
Iximiel / CMakeLists.txt
Last active May 26, 2023 14:48
Passing by reference to the embedded python interpreter with pybind11
cmake_minimum_required(VERSION 3.15...3.22)
project(passByReference LANGUAGES CXX)
find_package(Python COMPONENTS Interpreter Development REQUIRED)
include(FetchContent)
FetchContent_Declare(
Catch2
GIT_SHALLOW TRUE
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.3.2)
FetchContent_MakeAvailable(Catch2)
@Iximiel
Iximiel / chorddiagram.py
Last active October 26, 2022 12:17
ChordDiagram with matplolib in seaborn style
#%%
from typing import Iterable
import matplotlib.pyplot as plt
from matplotlib.patches import Wedge, PathPatch
from matplotlib.collections import PatchCollection
from matplotlib.path import Path
import numpy
def _orderByWeight(data_matrix: numpy.ndarray) -> numpy.ndarray: