Skip to content

Instantly share code, notes, and snippets.

View pfernique's full-sized avatar

Pierre Fernique pfernique

  • Limagrain Europe
  • Joze, FRANCE
View GitHub Profile
@pfernique
pfernique / .gitignore
Last active December 3, 2018 12:27
Ubuntu configuration script
*.sublime-workspace
@pfernique
pfernique / svg2png.sh
Created December 12, 2017 09:37
svg2png using Inkscape
for n in $(ls *svg | sed 's/.svg//'); do
inkscape -z -e $n.png $n.svg
convert $n.png -trim +repage $n-trimmed.png
rm $n.png
mv $n-trimmed.png $n.png
done
@pfernique
pfernique / euroscipy.md
Last active June 24, 2017 12:46
Summary for EuroSciPy 2017

AutoWIG: Wrapping very large C++ libraries in Python automatically

Most of Python and R scientific packages incorporate compiled scientific libraries to speed up the execution of the code needed for high-performance computing and to reuse legacy libraries.

Several semi-automatic solutions exist to wrap these compiled libraries: SWIG, Cython, Boost.Python. However, the process of wrapping a large C++ library is cumbersome and time consuming, mainly due some high-level constructs that have no equivalent in Python (template, complex iterators, ...).

In this talk, we introduce AutoWIG, a Python package that enables full C++ introspection using LLVM/Clang technologies. Default strategies have been designed to transform any C++ construct into Python, using Boost.Python for instance. Based on the introspection, a set of classes, methods, namespaces are retrieve and Boost.Python code is generated using the Mako template engine.

@pfernique
pfernique / basic.ipynb
Last active November 3, 2016 14:04
JSS autowig examples
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pfernique
pfernique / docker-build.sh
Last active August 25, 2016 12:05
Build all dockerfiles of the StatisKit organization with build option
set -e
git clone https://github.com/StatisKit/Misc.git
cd Misc
docker build --no-cache --build-arg BUILD="true" -t statiskit/ubuntu:trusty .
docker run -t statiskit/ubuntu:trusty /bin/bash post-link.sh
cd ..
rm -rf Misc
for GITHUB in PyClangLite AutoWIG; do
git clone https://github.com/StatisKit/$GITHUB.git
cd $GITHUB
@pfernique
pfernique / docker-clean.sh
Last active August 26, 2016 13:25
Clean all Docker containers and images
#!/bin/bash
# Delete all containers
docker rm -f $(docker ps -a -q)
# Delete all images
docker rmi -f $(docker images -q)
import subprocess
if not subprocess.check_output(["llvm-config", "--version"]).strip() == '3.8.1':
raise Exception
subprocess.check_call(['clang++', '--version'])
if not subprocess.check_output(["llvm-config", "--has-rtti"]).strip() == 'YES':
raise Exception
import sys
from path import path
@pfernique
pfernique / trusty
Last active August 10, 2016 08:25
Ubuntu trusty dockerfile with development tools for continuous integration
FROM ubuntu:14.04
# Update the OS
RUN apt-get update
# Install userful tools
RUN apt-get install -y build-essential git wget
# Add user for future work
RUN useradd -ms /bin/bash conda-user