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
from datetime import datetime, timedelta | |
try: | |
from itertools import islice, filterfalse | |
except ImportError: | |
# Python 2.x | |
from itertools import islice, ifilterfalse as filterfalse | |
def _daily(start_date=datetime.now(), interval=1): |
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
from __future__ import division | |
import struct | |
import bz2 | |
# Generate data - round to nearest 1e11 so that no data is lost when formatting in ASCII | |
xx = range(10**7) | |
x = [round(ii*1e11)/(1e11*len(xx)) for ii in xx] | |
sx = struct.pack('d'*len(x), *x) | |
# Write it to file as a text and binary file |
NewerOlder