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
# assuming python and pip are already installed | |
# installing the instantclient is usually where problems happen | |
# download the following files from oracle | |
# | |
# oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm | |
# oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm | |
# oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm | |
# install the rpms |
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
func chunk_split(chunks []Chunk, lim int) [][]chunk_slices { | |
var chunk []Chunk | |
chunk_slices := make([][]Chunk, 0, len(chunks)/lim+1) | |
for len(chunks) >= lim { | |
chunk, chunks = chunks[:lim], chunks[lim:] | |
chunk_slices = append(chunk_slices, chunk) | |
} | |
if len(buf) > 0 { | |
chunk_slices = append(chunk_slices, chunks[:len(chunks)]) |
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
""" | |
A file lock implementation that tries to avoid platform specific | |
issues. It is inspired by a whole bunch of different implementations | |
listed below. | |
- https://bitbucket.org/jaraco/yg.lockfile/src/6c448dcbf6e5/yg/lockfile/__init__.py | |
- http://svn.zope.org/zc.lockfile/trunk/src/zc/lockfile/__init__.py?rev=121133&view=markup | |
- http://stackoverflow.com/questions/489861/locking-a-file-in-python | |
- http://www.evanfosmark.com/2009/01/cross-platform-file-locking-support-in-python/ | |
- http://packages.python.org/lockfile/lockfile.html |
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
#include <iostream> | |
#include <boost/function.hpp> | |
#include <boost/bind.hpp> | |
#include <boost/random/mersenne_twister.hpp> | |
#include <boost/random/uniform_real_distribution.hpp> | |
#include <boost/random/normal_distribution.hpp> | |
int main(int argc, char* argv[]) | |
{ | |
size_t seed = 1234567890; |