Skip to content

Instantly share code, notes, and snippets.

View alexlib's full-sized avatar
:octocat:
Working

Alex Liberzon alexlib

:octocat:
Working
View GitHub Profile
@alexlib
alexlib / README.md
Created April 25, 2011 20:52 — forked from chrisjacob/README.md
Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Intro

Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Author: Chris Jacob @_chrisjacob

Tutorial (Gist): https://gist.github.com/833223

The Result

@alexlib
alexlib / sphinx-on-github.md
Created April 25, 2011 22:27
Combination of few things to make Sphinx documentation working for my Github repository

Combination of two great advices to make Sphinx documentation working for my project

** Author: ** Alex Liberzon http://github.com/alexlib

  1. Followed the "grandparent" advice from https://gist.github.com/833223
  • it means that we have openpiv-python/master and openpiv-python/gh-pages directories, each has its own .git structure and doesn't know one about another.
  1. In the master branch, in the master/openpiv/docs/sphinx_docs a) echo "_build/" > .gitignore
@alexlib
alexlib / reconstruction_with_cardinal_series.py
Created May 10, 2011 15:44
Periodic signal reconstruction using cardinal series
import numpy as np
import matplotlib.pyplot as plt
def reconstruct_with_sinc(ts,fd,t):
n, = ts.shape
dt = ts[1] - ts[0]
fr = []
for k,ti in enumerate(t):
# for each time point
sumf = 0.0
for i in range(n):
@alexlib
alexlib / loadvec_Insight.m
Created December 19, 2011 08:55
Load Insight 3G (tm) vector files (*.VEC) into PIVMAT (tmp) toolbox
function [v] = loadvec_Insight(dirname)
%{
Copyright (c) 2011, Alex Liberzon (alex-dot-liberzon-at-gmail-dot-com)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
@alexlib
alexlib / 00README.rst
Created January 5, 2012 19:52 — forked from phaustin/00README.rst
Copy-less bindings of C-generated arrays with Cython

Cython example of exposing C-computed arrays in Python without data copies

The goal of this example is to show how an existing C codebase for numerical computing (here c_code.c) can be wrapped in Cython to be exposed in Python.

The meat of the example is that the data is allocated in C, but exposed in Python without a copy using the PyArray_SimpleNewFromData numpy

@alexlib
alexlib / three_reservoir_graphical_solution.ipynb
Created October 16, 2012 23:40
Engineering Hydraulics @ TAU - graphical solution of a three-reservoir problem
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexlib
alexlib / GPTutorial.ipynb
Created October 16, 2012 23:52 — forked from fonnesbeck/GPTutorial.ipynb
An iPython notebook containing a short PyMC tutorial on Gaussian Processes. Requires PyMC and iPython (>=0.12) to be installed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexlib
alexlib / cpipe.ipynb
Created November 17, 2012 20:38
cpipe
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexlib
alexlib / python_for_engineering_hydraulics.ipynb
Created November 18, 2012 21:23
Python for Engineering Hydraulics course
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexlib
alexlib / colebrook.ipynb
Created November 18, 2012 21:51
Translation of the Matlab function colebrook.m to IPython notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.