<commit_before>import csv
import time
import matplotlib.pyplot as plt
            
def run_simulation(data_a, data_b):
    data = data_a + data_b
    
    time.sleep(2)
    
    return data


def csv_read(f):
    reader = csv.reader(open(f, 'rU'), delimiter=':')
    data = []
    for row in reader:
        data.append(row)
    return data    
        
def extract_column(data, column):
        col_data = []
        for row in data:
            col_data.append(float(row[column]))
        return col_data
  
def plot(x,y):
    kwargs = {}        
    plt.scatter(x, y, s=20, c='b', marker='o', cmap=None, norm=None, 
                    vmin=None, vmax=None, alpha=None, linewidths=None, verts=None, **kwargs)
    plt.xlabel('Temperature')
    plt.ylabel('Precipitation')
    plt.show()
    
######################################################################################    
#Main Program
dataA = csv_read('data1.dat')
dataB = csv_read('data2.dat')
#Simulation
data = run_simulation(dataA, dataB)
#GetTemperature
columnX = extract_column(data, 0)
#GetPrecipitation
columnY = extract_column(data, 1)
plot(columnX, columnY)<commit_msg>Applied pep8<commit_after>import csv
import time
import matplotlib.pyplot as plt


def run_simulation(data_a, data_b):
    data = data_a + data_b

    time.sleep(2)

    return data


def csv_read(f):
    reader = csv.reader(open(f, 'rU'), delimiter=':')
    data = []
    for row in reader:
        data.append(row)
    return data


def extract_column(data, column):
        col_data = []
        for row in data:
            col_data.append(float(row[column]))
        return col_data


def plot(x, y):
    kwargs = {}
    plt.scatter(x, y, s=20, c='b', marker='o', cmap=None, norm=None,
                    vmin=None, vmax=None, alpha=None, linewidths=None,
                    verts=None, **kwargs)
    plt.xlabel('Temperature')
    plt.ylabel('Precipitation')
    plt.show()


###############################################################################
#Main Program
dataA = csv_read('data1.dat')
dataB = csv_read('data2.dat')
#Simulation
data = run_simulation(dataA, dataB)
#GetTemperature
columnX = extract_column(data, 0)
#GetPrecipitation
columnY = extract_column(data, 1)
plot(columnX, columnY)
{'fraction_non_alphanumeric': 0.1922735346358792, 'fraction_numerical': 0.0066607460035523975, 'mean_word_length': 3.250943396226415, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2216220', 'n_tokens_mistral': 780, 'n_tokens_neox': 741, 'n_words': 163}