<commit_before>import json
import urllib2
import webbrowser
from Tkinter import *

selectedTags = set()
listsLabels = ['A', 'B', 'C', 'D', 'E', 'Other']
lists = {}
root = Tk()
handleEntry = Entry(root)

def updateTablesWithUnsolvedProblems(solvedProblems):
    url = 'http://codeforces.com/api/problemset.problems?tags='
    for tag in selectedTags:
        fixedTag = ''
        for c in tag:
            if c == ' ':
                fixedTag += '%20'
            else:
                fixedTag += c
        url += fixedTag + ';'
    result = getResult(url)
    problems = result['problems']
    problemsStatistics = result['problemStatistics']

    for key, value in lists.iteritems():
        value[0].delete(0,END)
        del value[1][:]

    for idx, problem in enumerate(problems):
        problemID = str(problem['contestId']) + str(problem['index'])
        if problemID not in solvedProblems:
            problemIdx = str(problem['index'])
            if(len(problemIdx) > 1 or problemIdx[0] < 'A' or problemIdx[0] > 'E'):
                problemIdx = 'Other'
            problemURL = 'http://codeforces.com/contest/' +  str(problem['contestId']) + '/problem/' + str(problem['index'])
            lists[problemIdx][1].append((problem['name'], problemsStatistics[idx]['solvedCount'], problemURL))

    for value in lists.itervalues():
        value[1].sort(key = lambda x : -x[1])
        for item in value[1]:
            value[0].insert(END,item[0] + ' (' + str(item[1]) + ')')


def refresh():<commit_msg>changing problem link to problemset mode instead of contest<commit_after>import json
import urllib2
import webbrowser
from Tkinter import *

selectedTags = set()
listsLabels = ['A', 'B', 'C', 'D', 'E', 'Other']
lists = {}
root = Tk()
handleEntry = Entry(root)

def updateTablesWithUnsolvedProblems(solvedProblems):
    url = 'http://codeforces.com/api/problemset.problems?tags='
    for tag in selectedTags:
        fixedTag = ''
        for c in tag:
            if c == ' ':
                fixedTag += '%20'
            else:
                fixedTag += c
        url += fixedTag + ';'
    result = getResult(url)
    problems = result['problems']
    problemsStatistics = result['problemStatistics']

    for key, value in lists.iteritems():
        value[0].delete(0,END)
        del value[1][:]

    for idx, problem in enumerate(problems):
        problemID = str(problem['contestId']) + str(problem['index'])
        if problemID not in solvedProblems:
            problemIdx = str(problem['index'])
            if(len(problemIdx) > 1 or problemIdx[0] < 'A' or problemIdx[0] > 'E'):
                problemIdx = 'Other'
            problemURL = 'http://codeforces.com/problemset/problem/' +  str(problem['contestId']) + '/' + str(problem['index'])
            lists[problemIdx][1].append((problem['name'], problemsStatistics[idx]['solvedCount'], problemURL))

    for value in lists.itervalues():
        value[1].sort(key = lambda x : -x[1])
        for item in value[1]:
            value[0].insert(END,item[0] + ' (' + str(item[1]) + ')')

def refresh():
{'fraction_non_alphanumeric': 0.15509409474367294, 'fraction_numerical': 0.010382868267358857, 'mean_word_length': 2.7144578313253014, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '4830603', 'n_tokens_mistral': 989, 'n_tokens_neox': 937, 'n_words': 222}