<commit_before># Ingest Beloit Data

import mx.DateTime
from pyIEM import mesonet, iemAccessOb, iemAccess, iemAccessDatabase
iemdb = iemAccessDatabase.iemAccessDatabase()

hrfile = open('/mnt/home/mesonet/ot/ot0005/incoming/Beloit/BeloitHourly.dat','r').readlines()

lastline = hrfile[-1]
tokens = lastline.split(",")
stamp = tokens[0].replace('"', '')
tmpf = mesonet.c2f( float(tokens[3]) )
rh = float(tokens[4])
if rh > 100: rh = 100
if rh < 0: rh = 0
srad = float(tokens[5])
if srad < 0: srad = 0
sknt = float(tokens[6]) * 2.0
drct = tokens[7]
phour = float(tokens[8]) / 25.4
c1tmpf = mesonet.c2f( float(tokens[9]) )
mslp = tokens[10]
reftemp = tokens[11]
voltage = tokens[12]

ts = mx.DateTime.strptime(stamp, '%Y-%m-%d %H:%M:%S')

iemob = iemAccessOb.iemAccessOb("OT0009")
iemob.setObTime(ts)
iemdb.data['tmpf'] = tmpf
iemdb.data['dwpf'] = mesonet.dwpf(tmpf, relh)
iemob.data['sknt'] = sknt
iemob.data['drct'] = drct
iemob.data['phour'] = phour
iemob.data['mslp'] = mslp
iemob.data['c1tmpf'] = c1tmpf
iemob.data['srad'] = srad
iemob.updateDatabase(iemdb)



<commit_msg>mispelling, sign<commit_after># Ingest Beloit Data

import mx.DateTime
from pyIEM import mesonet, iemAccessOb, iemAccess, iemAccessDatabase
iemdb = iemAccessDatabase.iemAccessDatabase()

hrfile = open('/mnt/home/mesonet/ot/ot0005/incoming/Beloit/BeloitHourly.dat','r').readlines()

lastline = hrfile[-1]
tokens = lastline.split(",")
stamp = tokens[0].replace('"', '')
tmpf = mesonet.c2f( float(tokens[3]) )
rh = float(tokens[4])
if rh > 100: rh = 100
if rh < 0: rh = 0
srad = float(tokens[5])
if srad < 0: srad = 0
sknt = float(tokens[6]) * 2.0
drct = tokens[7]
phour = float(tokens[8]) / 25.4
c1tmpf = mesonet.c2f( float(tokens[9]) )
mslp = tokens[10]
reftemp = tokens[11]
voltage = tokens[12]

ts = mx.DateTime.strptime(stamp, '%Y-%m-%d %H:%M:%S')

iemob = iemAccessOb.iemAccessOb("OT0009")
iemob.setObTime(ts)
iemob.data['tmpf'] = tmpf
iemob.data['dwpf'] = mesonet.dwpf(tmpf, relh)
iemob.data['sknt'] = sknt
iemob.data['drct'] = drct
iemob.data['phour'] = phour
iemob.data['mslp'] = mslp
iemob.data['c1tmpf'] = c1tmpf
iemob.data['srad'] = srad
iemob.updateDatabase(iemdb)




{'fraction_non_alphanumeric': 0.18439386901997212, 'fraction_numerical': 0.03994426381792847, 'mean_word_length': 5.410714285714286, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3800339', 'n_tokens_mistral': 975, 'n_tokens_neox': 913, 'n_words': 175}