Skip to content

Instantly share code, notes, and snippets.

View PierreBdR's full-sized avatar

Pierre Barbier de Reuille PierreBdR

  • Google UK Ltd
  • London, UK
View GitHub Profile
@PierreBdR
PierreBdR / gist:5662309
Created May 28, 2013 12:09
python_property
@property
def ${1:name}(self):
"""
${2:doc}
"""
${3:pass}
@${1}.setter
def ${1}(self, value):
${4:pass}
@PierreBdR
PierreBdR / kde_speed_test
Last active August 29, 2015 14:05
Speed and accuracy test for KDE -- statsmodels vs. pyqt_fit
"""
This module is based on the existing gist of @Padarn here:
https://gist.github.com/Padarn/72d3c0492b7608c4bd7d
"""
from __future__ import division, print_function
import numpy as np
import statsmodels.api as sm
import statsmodels.nonparametric.bandwidths as bandwidths
from statsmodels.sandbox.nonparametric import kernels
(define (interleave-streams . ss)
(define (helper to-process processed)
(λ ()
(if (null? to-process)
((helper (reverse processed) null))
(let* ([next (car to-process)]
[pr (next)])
(cons (car pr) (helper (cdr to-process) (cons (cdr pr) processed)))))))
(helper ss null))