Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@valgur
valgur / math-finite.h.txt
Last active August 4, 2023 13:22
List of symbols defined in math/bits/math-finite.h that were dropped in glibc 2.31. https://elixir.bootlin.com/glibc/glibc-2.30/source/bits/math-finite.h
__acos_finite
__acosf_finite
__acosl_finite
__acosf128_finite
__acosh_finite
__acoshf_finite
__acoshl_finite
__acoshf128_finite
__asin_finite
__asinf_finite
@valgur
valgur / update_deps.py
Last active August 7, 2023 10:30
Update the dependencies of a ConanCenterIndex recipe
#!/usr/bin/env python3
# suppress distutils warning
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
import datetime
import re
import subprocess
import sys
@valgur
valgur / all_conan_imports.py
Last active June 22, 2023 13:57
All conan imports used in conan-center-index recipes.
from conan import ConanFile, conan_version
from conan.errors import ConanInvalidConfiguration, ConanException
from conan.tools.android import android_abi
from conan.tools.apple import (
XCRun,
fix_apple_shared_install_name,
is_apple_os,
to_apple_arch,
)
from conan.tools.build import (
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@valgur
valgur / elb_elevation.py
Created May 17, 2023 09:58
Data provider for elevation data from Estonian Land Board
import os
from pathlib import Path
import numpy as np
import rasterio
import requests
from scipy.interpolate import RectBivariateSpline
from tqdm.auto import tqdm
@valgur
valgur / Dockerfile
Last active November 6, 2023 16:26
Test a Conan recipe in isolation
FROM conanio/gcc11-ubuntu16.04:latest
USER root
RUN pip install -U conan
COPY <<EOF /root/.conan2/profiles/default
[settings]
arch=x86_64
build_type=Release
@valgur
valgur / init_cc_package.sh
Last active May 9, 2023 19:53
Create a recipe skeleton for a new conan-center-index package.
#!/bin/bash
set -eu -o pipefail
name=$1
version=$2
template=${3:-"cmake_package"}
echo Copying sources...
root=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
pkg_dir=$root/recipes/$name
# Defines the following helper functions:
# - print_target_properties()
# - print_vars()
# - get_all_targets()
# Adapted from https://stackoverflow.com/a/68881024/2997179
# Print all properties of CMake target.
function(print_target_properties target)
if(NOT TARGET ${target})