<commit_before># Copyright 2013-2017 DataStax, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os

EVENT_LOOP_MANAGER = os.getenv('EVENT_LOOP_MANAGER', "libev")
if EVENT_LOOP_MANAGER == "gevent":
    import gevent.monkey
    gevent.monkey.patch_all()
    from cassandra.io.geventreactor import GeventConnection
    connection_class = GeventConnection
elif EVENT_LOOP_MANAGER == "eventlet":
    from eventlet import monkey_patch
    monkey_patch()

    from cassandra.io.eventletreactor import EventletConnection
    connection_class = EventletConnection
elif EVENT_LOOP_MANAGER == "async":
    from cassandra.io.asyncorereactor import AsyncoreConnection
    connection_class = AsyncoreConnection
elif EVENT_LOOP_MANAGER == "twisted":
    from cassandra.io.twistedreactor import TwistedConnection
    connection_class = TwistedConnection
else:
    from cassandra.io.libevreactor import LibevConnection
    connection_class = LibevConnection

from cassandra.cluster import Cluster
Cluster.connection_class = connection_class

try:
    import unittest2 as unittest
except ImportError:<commit_msg>Updated variable comparison to be effective with Job Creator in tests<commit_after># Copyright 2013-2017 DataStax, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os

EVENT_LOOP_MANAGER = os.getenv('EVENT_LOOP_MANAGER', "libev")
if "gevent" in EVENT_LOOP_MANAGER:
    import gevent.monkey
    gevent.monkey.patch_all()
    from cassandra.io.geventreactor import GeventConnection
    connection_class = GeventConnection
elif "eventlet" in EVENT_LOOP_MANAGER:
    from eventlet import monkey_patch
    monkey_patch()

    from cassandra.io.eventletreactor import EventletConnection
    connection_class = EventletConnection
elif "async" in EVENT_LOOP_MANAGER:
    from cassandra.io.asyncorereactor import AsyncoreConnection
    connection_class = AsyncoreConnection
elif "twisted" in EVENT_LOOP_MANAGER:
    from cassandra.io.twistedreactor import TwistedConnection
    connection_class = TwistedConnection
else:
    from cassandra.io.libevreactor import LibevConnection
    connection_class = LibevConnection

from cassandra.cluster import Cluster
Cluster.connection_class = connection_class

try:
    import unittest2 as unittest
except ImportError:
{'fraction_non_alphanumeric': 0.05900430239704978, 'fraction_numerical': 0.007990165949600492, 'mean_word_length': 4.950639853747715, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3687387', 'n_tokens_mistral': 932, 'n_tokens_neox': 902, 'n_words': 317}