<commit_before>from wine_env import wine_rc
import argparse
import os
import re


def main():

    parser = argparse.ArgumentParser()
    parser.add_argument('bottle', help='The name of the Wine bottle, e.g. PvZ', type=is_valid_bottle)
    parser.add_argument('--wine', help='The path to the Wine executable to use')
    parser.add_argument('-win32', help='Set WINEARCH=win32 in the bottle', action='store_true')
    args = parser.parse_args()

    if args.wine and not os.path.isfile(args.wine):
        print('Wine must be the path to an executable')
        sys.exit(1)

    bin = os.path.join(os.path.expandvars('$HOME'), '.local', 'share', 'wineprefixes', args.bottle, 'bin')
    os.makedirs(bin, exist_ok=True)

    rcs = (
        ('runrc.sh', wine_rc.RunRC(args.bottle, args.wine, args.win32)),
        ('runrc.fish', wine_rc.RunRCFish(args.bottle, args.wine, args.win32)),
        ('corkrc.sh', wine_rc.CorkRC(args.bottle, args.wine, args.win32)),
        ('corkrc.fish', wine_rc.CorkRCFish(args.bottle, args.wine, args.win32)),
        ('uncorkrc.sh', wine_rc.UncorkRC(args.bottle, args.wine, args.win32)),
        ('uncorkrc.fish', wine_rc.UncorkRCFish(args.bottle, args.wine, args.win32)),
    )

    for rc_basename, rc_maker in rcs:
        with open(os.path.join(bin, rc_basename), 'w+') as f:
            f.write(rc_maker.get_rc())
<commit_msg>bottle.py no longer tries to call CorkRC<commit_after>from wine_env import wine_rc
import argparse
import os
import re


def main():

    parser = argparse.ArgumentParser()
    parser.add_argument('bottle', help='The name of the Wine bottle, e.g. PvZ', type=is_valid_bottle)
    parser.add_argument('--wine', help='The path to the Wine executable to use')
    parser.add_argument('-win32', help='Set WINEARCH=win32 in the bottle', action='store_true')
    args = parser.parse_args()

    if args.wine and not os.path.isfile(args.wine):
        print('Wine must be the path to an executable')
        sys.exit(1)

    bin = os.path.join(os.path.expandvars('$HOME'), '.local', 'share', 'wineprefixes', args.bottle, 'bin')
    os.makedirs(bin, exist_ok=True)

    rcs = (
        ('runrc.sh', wine_rc.RunRC(args.bottle, args.wine, args.win32)),
        ('runrc.fish', wine_rc.RunRCFish(args.bottle, args.wine, args.win32)),
        ('uncorkrc.sh', wine_rc.UncorkRC(args.bottle, args.wine, args.win32)),
        ('uncorkrc.fish', wine_rc.UncorkRCFish(args.bottle, args.wine, args.win32)),
    )

    for rc_basename, rc_maker in rcs:
        with open(os.path.join(bin, rc_basename), 'w+') as f:
            f.write(rc_maker.get_rc())

{'fraction_non_alphanumeric': 0.15322269394056348, 'fraction_numerical': 0.011578541103820918, 'mean_word_length': 3.5314685314685317, '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': '6467848', 'n_tokens_mistral': 999, 'n_tokens_neox': 945, 'n_words': 202}