I hereby claim:
- I am aldro61 on github.
- I am aldro61 (https://keybase.io/aldro61) on keybase.
- I have a public key whose fingerprint is 70AC 5392 B66E 4935 58E6 B243 F5E3 1272 81E8 C206
To claim this, I am signing this object:
| # Generate a logspace from numpy in bash | |
| # Usage: logspace start end [count, default=10] | |
| # Just source this file or add it to your .bashrc | |
| logspace () { | |
| start=$1 | |
| end=$2 | |
| if [ $# -ne 3 ] | |
| then | |
| count=10 | |
| else |
| """ | |
| Load the MNIST dataset into numpy arrays | |
| Author: Alexandre Drouin | |
| License: BSD | |
| """ | |
| import numpy as np | |
| from tensorflow.examples.tutorials.mnist import input_data |
I hereby claim:
To claim this, I am signing this object:
| def load_hic_matrix(hic_path): | |
| f = open(hic_path, "r") | |
| # Parse the header | |
| header = f.next() | |
| assert header[0] == "#" | |
| min_row, max_row, min_col, max_col = [int(x) for x in header[2:].split(" ")] | |
| # Create an empty matrix of n_fragments x n_fragments | |
| hic = np.zeros((max_col + 1, max_col + 1)) |
| """ | |
| Compile with gcc flag -mpopcnt | |
| """ | |
| import numpy as np | |
| cimport numpy as np | |
| cimport cython | |
| from libc.stdint cimport uint32_t, uint8_t | |
| cdef extern int __builtin_popcount(unsigned int) nogil |
| # Copyright (c) 2013 Alexandre Drouin. All rights reserved. | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy of | |
| # this software and associated documentation files (the "Software"), to deal in | |
| # the Software without restriction, including without limitation the rights to | |
| # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | |
| # of the Software, and to permit persons to whom the Software is furnished to do | |
| # so, subject to the following conditions: | |
| # | |
| # The above copyright notice and this permission notice shall be included in all |