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

import sys

ERR = "** PROBLEM: "

problem_count = 0

version = sys.version
print "Python %s" % version.replace("\n", " | ")

curr = sys.version_info
required = (2,5)

if curr[0] < required[0]:
    print >>sys.stderr, "\n%sThe Python version looks too low, 2.5 is required." % ERR
    problem_count += 1
elif curr[1] < required[1]:
    print >>sys.stderr, "\n%sThe Python version looks too low, 2.5 is required." % ERR
    problem_count += 1

if curr == (2,4):
    print >>sys.stderr, "\n%sPython 2.4 detected: this should work but it is untested and unsupported." % ERR

# --------------------------------------------------------------------------

# This will be a package brought in later, right now it is embedded in lib/
try:
    import cyvents
except ImportError:
    print >>sys.stderr, "\n%sCannot locate the cyvents package." % ERR
    problem_count += 1

# --------------------------------------------------------------------------

try:
    import boto
except ImportError:
    print >>sys.stderr, "\n%sCannot locate the boto package." % ERR
    problem_count += 1

# --------------------------------------------------------------------------

try:
    import simplejson
except ImportError:
    print >>sys.stderr, "\n%sCannot locate the simplejson package." % ERR
    problem_count += 1

# --------------------------------------------------------------------------

if problem_count:
    sys.exit(1)<commit_msg>dependency check had wrong import<commit_after>#!/usr/bin/env python

import sys

ERR = "** PROBLEM: "

problem_count = 0

version = sys.version
print "Python %s" % version.replace("\n", " | ")

curr = sys.version_info
required = (2,5)

if curr[0] < required[0]:
    print >>sys.stderr, "\n%sThe Python version looks too low, 2.5 is required." % ERR
    problem_count += 1
elif curr[1] < required[1]:
    print >>sys.stderr, "\n%sThe Python version looks too low, 2.5 is required." % ERR
    problem_count += 1

if curr == (2,4):
    print >>sys.stderr, "\n%sPython 2.4 detected: this should work but it is untested and unsupported." % ERR

# --------------------------------------------------------------------------

# This will be a package brought in later, right now it is embedded in lib/
try:
    import cloudyvents.cyvents
except ImportError:
    print >>sys.stderr, "\n%sCannot locate the cyvents package." % ERR
    problem_count += 1

# --------------------------------------------------------------------------

try:
    import boto
except ImportError:
    print >>sys.stderr, "\n%sCannot locate the boto package." % ERR
    problem_count += 1

# --------------------------------------------------------------------------

try:
    import simplejson
except ImportError:
    print >>sys.stderr, "\n%sCannot locate the simplejson package." % ERR
    problem_count += 1

# --------------------------------------------------------------------------

if problem_count:
    sys.exit(1)
{'fraction_non_alphanumeric': 0.30135593220338985, 'fraction_numerical': 0.01423728813559322, 'mean_word_length': 1.5885964912280701, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 27, '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': '2131582', 'n_tokens_mistral': 819, 'n_tokens_neox': 789, 'n_words': 269}