Writing large data using HFile incuding some metadata for future search
Code: "metadata1.py". Programming language: Python DMelt Version 1. Last modified: 07/23/2017. License: Pro
https://datamelt.org/code/cache/metadata1_6215.py
To run this script using the DMelt IDE, copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.


from jhplot.io import *
from jhplot import *

ps=math.Poisson(500)
def event(entry):
  p1,p2,p3=P0D('a'),P0D('b'),P0D('c')
  p1.randomUniform(ps.next(),0,1)
  p2.randomNormal(ps.next(),0,1)
  p3.randomNormal(ps.next(),0,1)
  return [str(entry),p1,p2,p3]

f=HFile('data.jser','w')
for i in range(5000):
  ev=event(i)
  if (i%100 == 0):
     print 'event=',ev[0]
  f.write(ev)
f.close()

Ads help maintain this website.