<commit_before>from machinekit import hal
from machinekit import rtapi as rt
from machinekit import config as c


def setup_motion(kinematics='trivkins'):
    rt.loadrt(kinematics)
    rt.loadrt('tp')

    # motion controller, get name and thread periods from ini file
    rt.loadrt(c.find('EMCMOT', 'EMCMOT'),
              servo_period_nsec=c.find('EMCMOT', 'SERVO_PERIOD'),
              num_joints=c.find('TRAJ', 'AXES'),
              num_aio=51,
              num_dio=21)<commit_msg>python/fdm: make motion loading more modular<commit_after>from machinekit import hal
from machinekit import rtapi as rt
from machinekit import config as c


def setup_motion(kinematics='trivkins', tp='tp', num_aio=50, num_dio=21):
    rt.loadrt(kinematics)
    rt.loadrt(tp)

    # motion controller, get name and thread periods from ini file
    rt.loadrt(c.find('EMCMOT', 'EMCMOT'),
              servo_period_nsec=c.find('EMCMOT', 'SERVO_PERIOD'),
              num_joints=c.find('TRAJ', 'AXES'),
              num_aio=num_aio,
              num_dio=num_dio,
              tp=tp,
              kins=kinematics)
{'fraction_non_alphanumeric': 0.1088929219600726, 'fraction_numerical': 0.007259528130671506, 'mean_word_length': 2.9676258992805757, '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': '339855', 'n_tokens_mistral': 390, 'n_tokens_neox': 369, 'n_words': 85}