See h5py/h5py#977
View h5py_strings.py
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
"""Read HDF5 strings to Python str | |
h5py 3.0 changed the APIs for storing and reading strings. | |
This shows how to read strings as Python 3 str if you need | |
to support both old and new h5py. | |
""" | |
import h5py | |
import numpy as np | |
f = h5py.File('foo.h5', 'r') |
View cache_format_options.py
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 json | |
import h5py | |
import numpy as np | |
def read_json(path): | |
with open(path) as f: | |
loaded_data = json.load(f) | |
res = {} | |
for info in loaded_data: |
View VDS issue.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View atomicity_issue_pull.py
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 os | |
from time import monotonic | |
import zmq | |
# Set up a PULL socket | |
ctx = zmq.Context() | |
sock = ctx.socket(zmq.PULL) | |
sock.set_hwm(1) | |
sock.connect("tcp://127.0.0.1:8541") |
View pull.py
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 zmq | |
# Set up the socket | |
ctx = zmq.Context() | |
sock = ctx.socket(zmq.PULL) | |
sock.set_hwm(1) | |
sock.setsockopt(zmq.RCVBUF, 16 * 1024) | |
sock.connect("tcp://127.0.0.1:8541") | |
print("RCVHWM", sock.getsockopt(zmq.RCVHWM)) |
View Twitter archive.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View github-py.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Wide tables.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder