<commit_before># For python 3 compatible
from __future__ import division, absolute_import, print_function
try: input = raw_input
except: pass

from getch import getch
import game_structure as gs
from musictools import (play_progression, random_progression, 
    random_key, isvalidnote, resolve_with_chords, chordname, 
    random_chord, easy_play, play_wait)
import settings as st

# External Dependencies
import time, random, sys
from collections import OrderedDict
from multiprocessing import Process
from mingus.midi import fluidsynth  # requires FluidSynth is installed
from mingus.core import progressions, intervals, chords as ch
import mingus.core.notes as notes
from mingus.containers import NoteContainer, Note, Bar


# Decorators
def repeat_question(func):
   def func_wrapper(*args, **kwargs):
       st.NEWQUESTION = False
       return func(*args, **kwargs)
   return func_wrapper


def new_question(func):
   def func_wrapper(*args, **kwargs):
       st.NEWQUESTION = True
       return func(*args, **kwargs)
   return func_wrapper


# Menu Command Actions
@repeat_question
def play_cadence():
    play_progression(st.CADENCE, st.KEY, Iup=st.I)
    # time.sleep(2 * st.DELAY)


@repeat_question
def set_delay():
    st.DELAY = float(input("Enter the desired delay time (in seconds): "))


@new_question
def toggle_triads7ths():
    if st.I == "I7":
        st.I, st.II, st.III, st.IV, st.V, st.VI, st.VII = \
            "I", "II", "III", "IV", "V", "VI", "VII"
    else:
        st.I, st.II, st.III, st.IV, st.V, st.VI, st.VII = \
            "I7", "II7", "III7", "IV7", "V7", "VI7", "VII7"
    st.NUMERALS = st.I, st.II, st.III, st.IV, st.V, st.VI, st.VII


@new_question
def set_key(reset_score=True):
    mes = ("Enter the desired key, use upper-case for major "
           "and lower-case for minor (e.g. C or c).\n"
            "Enter R/r for a random major/minor key.")
    newkey = input(mes)
    keys = ['A', 'Bb', 'B', 'C', 'C#', 'D', 'Eb', 'E', 'F', 'F#', 'G', 'Ab']
    if newkey == 'R':
        st.KEY = random.choice(keys)
    elif newkey == 'r':
        st.KEY = random.choice(keys).lower()
    elif notes.is_valid_note(newkey):
        st.KEY = newkey
    else:
        print("Input key not understood, key unchanged.")
    st.CURRENT_MODE.intro()
    if reset_score:
        st.COUNT = 0
        st.SCORE = 0


@repeat_question
def toggle_many_octaves():
    st.MANY_OCTAVES = not st.MANY_OCTAVES


@repeat_question
def arpeggiate(invert=False, descending=False, chord=None, bpm=None, durations=None):
    if not bpm:
        bpm = st.BPM

    # if not delay:
    #     delay = st.DELAY/2

    if chord:
        pass
    elif st.CURRENT_MODE.name in ['single_chord', 'chord_tone']:
        chord = st.CURRENT_Q_INFO["chord"]
    elif st.CURRENT_MODE.name in ['interval']:
        chord = st.CURRENT_Q_INFO["interval"]
    else:
        print("Arpeggiation not available in {} mode.".format(st.CURRENT_MODE))
        return
<commit_msg>tell user when MANY_OCTAVES setting is changed<commit_after># For python 3 compatible
from __future__ import division, absolute_import, print_function
try: input = raw_input
except: pass

from getch import getch
import game_structure as gs
from musictools import (play_progression, random_progression, 
    random_key, isvalidnote, resolve_with_chords, chordname, 
    random_chord, easy_play, play_wait)
import settings as st

# External Dependencies
import time, random, sys
from collections import OrderedDict
from multiprocessing import Process
from mingus.midi import fluidsynth  # requires FluidSynth is installed
from mingus.core import progressions, intervals, chords as ch
import mingus.core.notes as notes
from mingus.containers import NoteContainer, Note, Bar


# Decorators
def repeat_question(func):
   def func_wrapper(*args, **kwargs):
       st.NEWQUESTION = False
       return func(*args, **kwargs)
   return func_wrapper


def new_question(func):
   def func_wrapper(*args, **kwargs):
       st.NEWQUESTION = True
       return func(*args, **kwargs)
   return func_wrapper


# Menu Command Actions
@repeat_question
def play_cadence():
    play_progression(st.CADENCE, st.KEY, Iup=st.I)
    # time.sleep(2 * st.DELAY)


@repeat_question
def set_delay():
    st.DELAY = float(input("Enter the desired delay time (in seconds): "))


@new_question
def toggle_triads7ths():
    if st.I == "I7":
        st.I, st.II, st.III, st.IV, st.V, st.VI, st.VII = \
            "I", "II", "III", "IV", "V", "VI", "VII"
    else:
        st.I, st.II, st.III, st.IV, st.V, st.VI, st.VII = \
            "I7", "II7", "III7", "IV7", "V7", "VI7", "VII7"
    st.NUMERALS = st.I, st.II, st.III, st.IV, st.V, st.VI, st.VII


@new_question
def set_key(reset_score=True):
    mes = ("Enter the desired key, use upper-case for major "
           "and lower-case for minor (e.g. C or c).\n"
            "Enter R/r for a random major/minor key.")
    newkey = input(mes)
    keys = ['<KEY> 'C#', 'D', 'Eb', 'E', 'F', 'F#', 'G', 'Ab']
    if newkey == 'R':
        st.KEY = random.choice(keys)
    elif newkey == 'r':
        st.KEY = random.choice(keys).lower()
    elif notes.is_valid_note(newkey):
        st.KEY = newkey
    else:
        print("Input key not understood, key unchanged.")
    st.CURRENT_MODE.intro()
    if reset_score:
        st.COUNT = 0
        st.SCORE = 0


@repeat_question
def toggle_many_octaves():
    st.MANY_OCTAVES = not st.MANY_OCTAVES
    print("MANY_OCTAVE : {}".format(st.MANY_OCTAVES))


@repeat_question
def arpeggiate(invert=False, descending=False, chord=None, bpm=None, durations=None):
    if not bpm:
        bpm = st.BPM

    # if not delay:
    #     delay = st.DELAY/2

    if chord:
        pass
    elif st.CURRENT_MODE.name in ['single_chord', 'chord_tone']:
        chord = st.CURRENT_Q_INFO["chord"]
    elif st.CURRENT_MODE.name in ['interval']:
        chord = st.CURRENT_Q_INFO["interval"]
    else:
        print("Arpeggiation not available in {} mode.".format(st.CURRENT_MODE))
        return

{'fraction_non_alphanumeric': 0.12818378558348592, 'fraction_numerical': 0.004661228566672216, 'mean_word_length': 3.129209621993127, 'pattern_counts': {'":': 2, '<': 4, '<?xml version=': 0, '>': 4, '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': '2168677', 'n_tokens_mistral': 2159, 'n_tokens_neox': 2061, 'n_words': 577}