<commit_before>#!/usr/bin/env python

from influxdb import InfluxDBClient
import os, time, PyNUT, argparse, socket

WAIT_TIME = 60 # seconds


def main(host='localhost', port=8086, ups='upsoem'):
    user = 'admin'
    password = '<PASSWORD>'
    dbname = 'beastcraft'
    dbclient = InfluxDBClient(host, port, user, password, dbname)

    while True:
        try:
            nutclient = PyNUT.PyNUTClient()
        except socket.error, e:
            raise
            print '%s connecting to nut-server, retrying in %d seconds' % (repr(e), WAIT_TIME)
            time.sleep(WAIT_TIME)
    
    while True:<commit_msg>Updated exception handling<commit_after>#!/usr/bin/env python

from influxdb import InfluxDBClient
import os, time, PyNUT, argparse, socket

WAIT_TIME = 60 # seconds


def main(host='localhost', port=8086, ups='upsoem'):
    user = 'admin'
    password = '<PASSWORD>'
    dbname = 'beastcraft'
    dbclient = InfluxDBClient(host, port, user, password, dbname)

    while True:
        try:
            nutclient = PyNUT.PyNUTClient()
        except socket.error, e:
            print '%s connecting to nut-server, retrying in %d seconds' % (repr(e), WAIT_TIME)
            time.sleep(WAIT_TIME)
    
    while True:
{'fraction_non_alphanumeric': 0.11174089068825911, 'fraction_numerical': 0.009716599190283401, 'mean_word_length': 2.8385093167701863, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6006529', 'n_tokens_mistral': 416, 'n_tokens_neox': 393, 'n_words': 108}