<commit_before>import datetime
import ftplib
from glob import glob
import os
from shutil import rmtree
import tarfile
import time

def ftp_connect():
    """
    Connect to ftp site
    """
    ftp = ftplib.FTP('ftp.ecmwf.int')
    ftp.login('safer','neo2008')
    ftp.cwd('tcyc')
    ftp.set_debuglevel(1)
    return ftp
    
def remove_old_ftp_downloads(folder):
    """
    remove files/folders older than 1 day old
    """
    date_now = datetime.datetime.utcnow()
    all_paths = glob(os.path.join(folder,'Runoff*netcdf*'))
    for path in all_paths:
        date_file = datetime.datetime.strptime(os.path.basename(path).split('.')[1],'%Y%m%d')
        if date_now - date_file > datetime.timedelta(1):
            if os.path.isdir(path):
                rmtree(path)
            else:
                os.remove(path)
                
def download_ftp(dst_filename, local_path):<commit_msg>Removed login information for ecmwf ftp server<commit_after>import datetime
import ftplib
from glob import glob
import os
from shutil import rmtree
import tarfile
import time

def ftp_connect():
    """
    Connect to ftp site
    """
    ftp = ftplib.FTP('ftp.ecmwf.int')
    ftp.login('','')
    ftp.cwd('tcyc')
    ftp.set_debuglevel(1)
    return ftp
    
def remove_old_ftp_downloads(folder):
    """
    remove files/folders older than 1 day old
    """
    date_now = datetime.datetime.utcnow()
    all_paths = glob(os.path.join(folder,'Runoff*netcdf*'))
    for path in all_paths:
        date_file = datetime.datetime.strptime(os.path.basename(path).split('.')[1],'%Y%m%d')
        if date_now - date_file > datetime.timedelta(1):
            if os.path.isdir(path):
                rmtree(path)
            else:
                os.remove(path)
                
def download_ftp(dst_filename, local_path):
{'fraction_non_alphanumeric': 0.11940298507462686, 'fraction_numerical': 0.006633499170812604, 'mean_word_length': 2.6565656565656566, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1510337', 'n_tokens_mistral': 635, 'n_tokens_neox': 606, 'n_words': 129}