Skip to content

Instantly share code, notes, and snippets.

Nezar Abdennur nvictus

Block or report user

Report or block nvictus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nvictus
nvictus / .inputrc
Last active May 1, 2018
linux inputrc
View .inputrc
"\e[A": history-search-backward
"\e[B": history-search-forward
set show-all-if-ambiguous on
set completion-ignore-case on
@nvictus
nvictus / load-dense-contact-matrix.ipynb
Last active Jul 16, 2017
load dense contact matrix
View load-dense-contact-matrix.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nvictus
nvictus / tbwarn.py
Last active Jun 20, 2017
print traceback in warnings
View tbwarn.py
import traceback
import warnings
import sys
def warn_with_traceback(message, category, filename, lineno, file=None, line=None):
log = file if hasattr(file,'write') else sys.stderr
traceback.print_stack(file=log)
log.write(warnings.formatwarning(message, category, filename, lineno, line))
View zarr-s3.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nvictus
nvictus / cooler-from-sparse-text.ipynb
Last active Apr 7, 2017
cooler-from-sparse-text.ipynb
View cooler-from-sparse-text.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nvictus
nvictus / doi2bib
Last active Apr 3, 2017
Fetch reference citations in BibTeX, JSON or YAML from DOI
View doi2bib
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import subprocess
import tempfile
import requests
import argparse
import textwrap
import sys
View higlass-in-jupyter.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nvictus
nvictus / expected.py
Last active Feb 27, 2017
cooler_expected_new.ipynb
View expected.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division, print_function
from multiprocess import Pool
from functools import partial
from itertools import chain
import itertools
import argparse
import sys
View tilt_matrix_diag_utils.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nvictus
nvictus / discreternd.py
Last active Sep 5, 2016
Sample a discrete distribution (i.e. simulate a loaded die) efficiently via the "alias sampling" method
View discreternd.py
"""
Alias sampler
=============
See : <http://www.keithschwarz.com/darts-dice-coins/> by Keith Schwarz.
References
----------
+ Vose, Michael D.
You can’t perform that action at this time.