<commit_before>"""
downloads a .2bit genome from UCSC
.. note:: please comply with the restrictions of use at
http://hgdownload.cse.ucsc.edu/downloads.html

and do not over-use this module

By default, genomes are saved to the current directory
"""
from urllib2 import urlopen
from shutil import copyfileobj
from os.path import exists, join
from os import getcwd

<commit_msg>download.py now py3 safe<commit_after>#!/usr/bin/env python
"""
downloads a .2bit genome from UCSC
.. note:: please comply with the restrictions of use at
http://hgdownload.cse.ucsc.edu/downloads.html

and do not over-use this module

By default, genomes are saved to the current directory
"""
import sys
if sys.version_info > (3,):
    from urllib.request import urlopen
else:
    from urllib2 import urlopen

from shutil import copyfileobj
from os.path import exists, join
from os import getcwd


{'fraction_non_alphanumeric': 0.07551487414187644, 'fraction_numerical': 0.006864988558352402, 'mean_word_length': 4.335365853658536, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7342558', 'n_tokens_mistral': 274, 'n_tokens_neox': 263, 'n_words': 112}