<commit_before>import urllib.request
import json
resp = urllib.request.urlopen('http://worldcup.sfg.io/matches').read()
for jogo in json.loads(resp.decode('utf-8')):
    if jogo['status'] == 'completed':
        print (jogo['home_team']['country'], jogo['home_team']['goals'], 'vs', jogo['away_team']['country'], jogo['away_team']['goals'])<commit_msg>Switching python to a functional style.<commit_after>from json import loads as lds
from urllib.request import urlopen as uop
print("\n".join([" vs ".join(map(lambda x: x['country']+" "+str(x['goals']),(i['home_team'], i['away_team']))) 
    for i in lds(ruop('http://worldcup.sfg.io/matches').read().decode('utf-8')) if i['status']=='completed']))
{'fraction_non_alphanumeric': 0.2246065808297568, 'fraction_numerical': 0.002861230329041488, 'mean_word_length': 6.608695652173913, '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': '1823595', 'n_tokens_mistral': 241, 'n_tokens_neox': 236, 'n_words': 48}