Skip to content

Instantly share code, notes, and snippets.

View num3ric's full-sized avatar

Éric Renaud-Houde num3ric

View GitHub Profile
@num3ric
num3ric / interleave.cpp
Last active December 2, 2020 21:58
In-place array interleaving
#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
#include <assert.h>
typedef std::chrono::high_resolution_clock Clock;
template<typename T>
@num3ric
num3ric / seqalignment.py
Created September 16, 2011 18:26
Sequence alignment - Dynamic programming algorithm
#!/usr/bin/python -O
import numpy as np
from numpy import array
A, C, G, T = 0, 1, 2, 3
int_to_char = {0:'A', 1:'C', 2:'G', 3:'T'}
#indel = -1
#scoring = array([[1,-1,-1,-1],
#[-1,1,-1,-1],
@num3ric
num3ric / gaussian_elim.py
Created November 11, 2011 05:56
Gaussian elimination using NumPy.
import numpy as np
def GENP(A, b):
'''
Gaussian elimination with no pivoting.
% input: A is an n x n nonsingular matrix
% b is an n x 1 vector
% output: x is the solution of Ax=b.
% post-condition: A and b have been modified.
'''
-.../Build/Android/PipelineCaches/...
-.../PS4/...
-.../QNX/...
-.../XB1/...
-.../Platforms/GDK/...
-.../Platforms/PS5/...
-.../Platforms/Sony/...
-.../Platforms/WinGDK/...
-.../Platforms/XSX/...
-.../Platforms/XboxCommon/...