This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# BASH shell script for mounting an encrypted EncFS folder for | |
# for sharing with other user/users who are member of $GROUP | |
# Since EncFS runs in userland, no root privileges are needed. | |
# Remember to uncomment user_allow_other in /etc/fuse.conf | |
# It is currently configured to mount the encrypted folder: | |
# ~/.private | |
# on the unencrypted mount point (which is created upon mount): | |
# ~/private |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from distutils.core import setup | |
from distutils.extension import Extension | |
from Cython.Distutils import build_ext | |
setup( | |
cmdclass = {'build_ext': build_ext}, | |
ext_modules = [Extension("tracer", ["tracer.pyx"])] | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Mandelbrot example using cython | |
""" | |
# stdlib imports | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from infer import MetaInfer | |
from infer import types as t | |
class Vec2(metaclass=MetaInfer): | |
# Typed slots: | |
_typed_init_slots = ( | |
('x', t.double, 0.0), | |
('y', t.double, 0.0) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enabling -ffast-math makes the two versions competetive, without it explicit is much faster... | |
# (~20x for exponent of 5) | |
CFLAGS ?= -std=c99 -O3 #-ffast-math | |
LIBS ?= -lrt -lm | |
.PHONY: all | |
output.txt: main | |
$(CC) --version > $@ | |
./$< 42 >> $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# distutils: language = c++ | |
from func cimport func as _func | |
def func(double inp): | |
cdef double out | |
_func[double, 3](&inp, &out); | |
return out; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from __future__ import (absolute_import, division, | |
print_function, unicode_literals) | |
from sparse import SMat | |
def _print(a): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:ff2051673721abee70ec74bc10add60780735c583e66f767e30c0906bd95ba38" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# distutils: language = c++ | |
from func cimport func as _func | |
def func(double inp): | |
cdef double out | |
_func[double, double](&inp, &out); | |
return out; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_myclib.cpp | |
_myclib.so | |
build/ | |
cython_debug/ |
OlderNewer