Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from math import log | |
log2= lambda x:log(x,2) | |
from scipy import histogram, digitize, stats, mean, std | |
from collections import defaultdict | |
def mutual_information(x,y): | |
return entropy(y) - conditional_entropy(x,y) | |
def conditional_entropy(x, y): | |
""" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", |
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
import shutil | |
from optparse import OptionParser | |
import sys | |
import functools | |
import re | |
import subprocess | |
import os | |
READELF = '/usr/bin/readelf' | |
def get_dependencies(fname, skip_patterns): |
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
from time import time | |
import scipy | |
from scipy import stats | |
from math import sqrt | |
from multiprocessing import current_process | |
class Progress(object): | |
def __init__(self, tot=None, prefix=None, | |
template='sp: %(speed).02fi/s, pr: %(progress).02f%%, rt: %(remaining)s, it: %(iteration_time)s, %(cnt)s of %(tot)s, pt: %(process_time)s', | |
threaded_cnt= None, print_time=0.25, print_pid=False): |
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
class mydefaultdict(dict): | |
def __init__(self, default, **kwargs): | |
super(mydefaultdict, self).__init__(**kwargs) | |
self.default = default | |
def __getitem__(self, item): | |
try: | |
return super(mydefaultdict, self).__getitem__(item) | |
except KeyError: | |
val = self.default(item) |
NewerOlder