Skip to content

Instantly share code, notes, and snippets.

@wolfv
wolfv / run_conda_builds.py
Created July 28, 2019 18:13
Run many conda builds in parallel, as fast as possible.
from pathlib import Path
import jinja2
import yaml
from conda.models.match_spec import MatchSpec
import networkx as nx
# import matplotlib.pyplot as plt
import os, random, time, json
import workerpool
NO_BUILD_LOCAL_PKGS = True
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <deque>
#include <future>
#include <iostream>
#include <mutex>
#include <thread>
#include <vector>
@HiImJulien
HiImJulien / Swift Meets CCxx.md
Last active March 30, 2024 19:00
This gist is a simple example on how to call a function written in swift from C/C++, without taking the detour via Objective-C/C++.

Swift Meets C/C++

This gist is a simple example on how to call a function written in swift from C/C++, without taking the detour via Objective-C/C++.


Analytics

In this example we're going to invoke a function called say_hello, which, as the name already suggests, prints "Hello, World!" to the terminal.

@yurydelendik
yurydelendik / !wasmllvm.md
Last active February 23, 2024 05:08
Using WebAssembly in LLVM

NOTE: the content is out-of-date. All development is moved to the https://github.com/yurydelendik/wasmception

Using WebAssembly in LLVM

Compiling

# locations, e.g.
export WORKDIR=~/llvmwasm; mkdir -p $WORKDIR
export INSTALLDIR=$WORKDIR
@thlorenz
thlorenz / builiding-lldb-on-mac-with-jit-support-simple-steps.md
Last active July 24, 2019 01:32
Building lldb with GDB JIT support on Mac OSX.

Building lldb on Mac

Create Codesign Certificate

First we need to create a certificate. The llvm provided a way to do that, but I found this way to work slightly better for me. Just substitute lldb_codesign for the certificate name, instead of gdb-cert.

Install swig dependency

@nocnokneo
nocnokneo / CMakeLists.txt
Last active January 4, 2024 03:34
VTK Rendered to an FBO in a Qt Quick 2 Scene Graph
cmake_minimum_required(VERSION 2.8.11)
project(VtkFboInQtQuick)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
@wycats
wycats / gist:1627976
Created January 17, 2012 18:26
How to debug dynamic loading
export DYLD_PRINT_OPTS="1"
export DYLD_PRINT_ENV="1"
export DYLD_PRINT_LIBRARIES="1"
export DYLD_PRINT_LIBRARIES_POST_LAUNCH="1"
export DYLD_PRINT_APIS="1"
export DYLD_PRINT_BINDINGS="1"
export DYLD_PRINT_INITIALIZERS="1"
export DYLD_PRINT_REBASINGS="1"
export DYLD_PRINT_SEGMENTS="1"
export DYLD_PRINT_STATISTICS="1"
@thomasballinger
thomasballinger / gist:1336916
Created November 3, 2011 16:13
nifti2nrrd dwi conversion
#!/usr/bin/env python
#TODO
#1) Add measurement frame
#2) Save data part of nifti to its own file, and point to it in 'data file' field
import nibabel as nib
import sys