<commit_before><commit_msg>Adding data util file for downloads<commit_after>import os.path
from astropy.utils import data
from astroplan import download_IERS_A


def download_all_files():
    download_IERS_A()

    for i in range(4214, 4219):
        fn = 'index-{}.fits'.format(i)
        data_folder = "/var/panoptes/astrometry.net/data"
        dest = "{}/{}".format(data_folder, fn)

        if not os.path.exists(dest):
            url = "http://data.astrometry.net/4200/{}".format(fn)
            df = data.download_file(url)
            os.rename(df, dest)


if __name__ == '__main__':
    download_all_files()
{'fraction_non_alphanumeric': 0.13290113452188007, 'fraction_numerical': 0.019448946515397084, 'mean_word_length': 2.911392405063291, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '1167224', 'n_tokens_mistral': 218, 'n_tokens_neox': 205, 'n_words': 43}