import numpy as np
import json
def read32(bs):
data = bs.read(4)
return int.from_bytes(data, byteorder='big', signed=False)
def write32(bs, int_data):
bs.write(int_data.to_bytes(4, byteorder='big', signed=False))
def writeTest():
trainImageFile = open('eyedata_set/train-images.ubyte', 'wb')
count = 4
width = 1024
height = 768
write32(trainImageFile, count)
write32(trainImageFile, width)
write32(trainImageFile, height)
trainImageFile.close()
print('[DONE] write test')
def readTest():
trainImageFile = open('eyedata_set/train-images.ubyte', 'rb')
count = read32(trainImageFile)
width = read32(trainImageFile)
height = read32(trainImageFile)
trainImageFile.close()
print('[DONE] read test')
print('{}, {}, {}'.format(count, width, height))
Subscribe to:
Post Comments (Atom)
Task in UnrealEngine
https://www.youtube.com/watch?v=1lBadANnJaw
-
Unity released very good FPS example for people and I decided to analysis how they make this. Personally I wanted to show you how I analys...
-
When we use DrawDebugSphere function for debugging, it is working well but when you are trying to use it in anim node's function it will...
-
If you press a key 'L' in the jupyter notebook then you can see the line number in the editor.
No comments:
Post a Comment