Skip to content

Instantly share code, notes, and snippets.

View wolfv's full-sized avatar
🚀

Wolf Vollprecht wolfv

🚀
View GitHub Profile
@wolfv
wolfv / jit.py
Created November 4, 2018 09:28 — forked from serge-sans-paille/jit.py
Pythran-based dummy JIT compiler
import pythran
import inspect
import hashlib
import itertools
import imp
import re
import os
import numpy as np
activate_jit = True
@wolfv
wolfv / xsimd.ipynb
Created May 3, 2018 21:16 — forked from jpivarski/xsimd.ipynb
AVX-512 cumsum implementation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wolfv
wolfv / logsumexp.cc
Created April 16, 2017 23:45 — forked from nbecker/logsumexp.cc
logsumexp.cc
#include <numpy/arrayobject.h>
#include "pybind11/pybind11.h"
#include "pybind11/stl.h"
#include "xtensor/xarray.hpp"
#include "xtensor/xtensor.hpp"
#include "xtensor/xcontainer.hpp"
#include "xtensor/xbroadcast.hpp"
//#include "xtensor/xbuilder.hpp"
#include "xtensor/xview.hpp"
#include "xtensor/xeval.hpp"
from sqlalchemy_continuum import get_versioning_manager, make_versioned, versioning_manager, version_class, transaction_class
from sqlalchemy_continuum.plugins import TransactionMetaPlugin
from silverflask import db
meta_plugin = TransactionMetaPlugin()
make_versioned(plugins=[meta_plugin])
class VersionedMixin(object):
"""Base class for SQL Alchemy continuum objects that supports tagging"""
from sqlalchemy_continuum import get_versioning_manager
class VersionBase(object):
"""Base class for SQL Alchemy continuum objects that supports tagging"""
@classmethod
def tag_current_transaction(cls, **kwargs):
"""Add keyword arguments that will be stored as a `TransactionMeta`
entry on next successful commit that includes versioned objects.
"""
@wolfv
wolfv / gist:4110633
Created November 19, 2012 13:28 — forked from igorw/gist:4108347
React v0.2.4 release notes

React v0.2.4 is more awesome

DNS promises

This release has two major improvements. The first one is that react/dns is now using a promise based API. In case you missed it, react/promise is a PHP library for promises. Take a look at the README and familiarize yourself with it, as it will be used by many libs in the react ecosystem, including core.

The previous API was:

 $dns-&gt;resolve('igor.io', function ($ip) {