<commit_before>""" 
Module hosting class representing the connection data
to the gogonlinux website
"""

import json
import requests
import os
import stat

WEBSITE_URL = "http://www.gogonlinux.com"
AVAILABLE_GAMES = "/available"
BETA_GAMES = "/available-beta"

def obtain_available_games():
    """ Return JSON list of all available games. """
    resp = requests.get(url=(WEBSITE_URL + AVAILABLE_GAMES))
    return json.loads(resp.text) #pylint: disable=E1103

def obtain_beta_available_games():
    """
    Obtain JSON list of all available games, even 
    the ones flagged as beta/unreleased
    """
    resp = requests.get(url=(WEBSITE_URL + BETA_GAMES))
    return json.loads(resp.text) #pylint: disable=E1103

def generate_dummy_data(game_id):
    """
    Create fake JSON data for games that aren't yet supported by 
    any existing repository.
    """
    data = {}
    data[game_id] = {}
    data[game_id]["install_script"] = "404"
    data[game_id]["launch_script"] = "404"
    data[game_id]["uninstall_script"] = "404"
    data[game_id]["online_id"] = game_id
    data[game_id]["full_name"] = game_id
    data[game_id]["released"] = '1'
    data[game_id]["emulation"] = "unknown"
    data[game_id]["cover_url"] = "http://gogonlinux.com/images/empty_cover.jpg"
    data[game_id]["compat"] = "red"
    data[game_id]["private_repository"] = '1'
    data[game_id]["repository_url"] = "forced"
    return json.loads(json.dumps(data))


def download_script(target, url):
    """ 
    Download a script from the gogonlinux url
    and save it to the target position
    """
    reqs = requests.get(url)
    with open(target, "w+") as file_handle:<commit_msg>fixed wrong game dummy data<commit_after>""" 
Module hosting class representing the connection data
to the gogonlinux website
"""

import json
import requests
import os
import stat

WEBSITE_URL = "http://www.gogonlinux.com"
AVAILABLE_GAMES = "/available"
BETA_GAMES = "/available-beta"

def obtain_available_games():
    """ Return JSON list of all available games. """
    resp = requests.get(url=(WEBSITE_URL + AVAILABLE_GAMES))
    return json.loads(resp.text) #pylint: disable=E1103

def obtain_beta_available_games():
    """
    Obtain JSON list of all available games, even 
    the ones flagged as beta/unreleased
    """
    resp = requests.get(url=(WEBSITE_URL + BETA_GAMES))
    return json.loads(resp.text) #pylint: disable=E1103

def generate_dummy_data(game_id):
    """
    Create fake JSON data for games that aren't yet supported by 
    any existing repository.
    """
    data = {}
    data["install_script"] = "404"
    data["launch_script"] = "404"
    data["uninstall_script"] = "404"
    data["online_id"] = game_id
    data["title"] = game_id
    data["released"] = '1'
    data["emulation"] = "unknown"
    data["cover_url"] = "http://gogonlinux.com/images/empty_cover.jpg"
    data["compat"] = "red"
    data["private_repository"] = '1'
    data["repository_url"] = "forced"
    return json.loads(json.dumps(data))


def download_script(target, url):
    """ 
    Download a script from the gogonlinux url
    and save it to the target position
    """
    reqs = requests.get(url)
    with open(target, "w+") as file_handle:
{'fraction_non_alphanumeric': 0.13152985074626866, 'fraction_numerical': 0.01181592039800995, 'mean_word_length': 3.903963414634146, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '92490', 'n_tokens_mistral': 1112, 'n_tokens_neox': 1061, 'n_words': 262}