<commit_before>import os
import platform
import urllib
import urllib2
import glob
import time
import sys
import subprocess
import string

def get_timestamp():
  print(time.time())

def install_dumpling():
  try:
    if (not os.path.isfile(dumplingPath)):
      url = "https://dumpling.azurewebsites.net/api/client/dumpling.py"
      scriptPath = os.path.dirname(os.path.realpath(__file__))
      downloadLocation = scriptPath + "/dumpling.py"
      response = urllib2.urlopen(url)
      if response.getcode() == 200:
        with open(downloadLocation, 'w') as f:
          f.write(response.read())
        subprocess.call([sys.executable, downloadLocation, "install", "--update"])
      else:
        raise urllib2.URLError("HTTP Status Code" + str(result.getcode()))

    subprocess.call([sys.executable, dumplingPath, "install"])
  except urllib2.HTTPError, e:
    print("Dumpling cannot be installed due to: " + str(e))
  except  urllib2.URLError, e:
    print(e.reason)
  except:<commit_msg>Fix dumplinghelper to not log 'error format' (#1909)<commit_after>import os
import platform
import urllib
import urllib2
import glob
import time
import sys
import subprocess
import string

def get_timestamp():
  print(time.time())

def install_dumpling():
  try:
    if (not os.path.isfile(dumplingPath)):
      url = "https://dumpling.azurewebsites.net/api/client/dumpling.py"
      scriptPath = os.path.dirname(os.path.realpath(__file__))
      downloadLocation = scriptPath + "/dumpling.py"
      response = urllib2.urlopen(url)
      if response.getcode() == 200:
        with open(downloadLocation, 'w') as f:
          f.write(response.read())
        subprocess.call([sys.executable, downloadLocation, "install", "--update"])
      else:
        raise urllib2.URLError("HTTP Status Code" + str(result.getcode()))

    subprocess.call([sys.executable, dumplingPath, "install"])
  except urllib2.HTTPError, e:
    print("Dumpling cannot be installed due to: " + str(e).replace(':', '')) # Remove : to avoid looking like error format
  except  urllib2.URLError, e:
    print(e.reason)
  except:
{'fraction_non_alphanumeric': 0.1279847182425979, 'fraction_numerical': 0.009551098376313277, 'mean_word_length': 3.707865168539326, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5327129', 'n_tokens_mistral': 698, 'n_tokens_neox': 680, 'n_words': 161}