This file contains hidden or 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 Math | |
class FrequencyDistribution | |
attr :samples, :data | |
def initialize samples=[] | |
@data = {} | |
samples.each(&method(:add)) | |
end |
This file contains hidden or 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 bitstring | |
from sys import argv | |
class SegmentsFile(object): | |
def __init__(self, path): | |
self.stream = bitstring.ConstBitStream(filename=path) | |
def read_32(self): | |
return self.stream.read('uint:32') |
OlderNewer