<commit_before>#!/usr/bin/env dls-python2.7

from pkg_resources import require
require('cothread==2.10')
require('scipy==0.10.1')

import cothread
from cothread.catools import caget, caput, camonitor, FORMAT_TIME, FORMAT_CTRL
import numpy
import scipy.io
import os, sys
import traceback

from PyQt4 import QtCore
from PyQt4 import QtGui

from i10 import Ui_i10_knobs


# buttons to move in-chicane bpms up and down


# Alarm colours
ALARM_BACKGROUND = QtGui.QColor(255, 255, 255)
ALARM_COLORS = [
        QtGui.QColor(  0, 215,  20), # None
        QtGui.QColor(255, 140,   0), # Minor
        QtGui.QColor(255,   0,   0), # Major
        QtGui.QColor(255,   0, 255), # Invalid
        ]


class OverCurrentException(Exception):
    def __init__(self, magnet_index):
        self.magnet_index = magnet_index


class Knobs(object):

    '''
    Provides an interface to control the I10 Fast Chicane.
    Values stored in the mat file are obtained through a matlab
    middle layer simulation. The values are calculated to enable<commit_msg>I10: Added module docstring<commit_after>#!/usr/bin/env dls-python2.7


'''
Buttons to move I10 fast chicane magnet offsets and scales.

Provides a gui to control magnet scaling and offsets
in order to allow independant steering of photon and
electron beams to maintain a closed bump.
'''


from pkg_resources import require
require('cothread==2.10')
require('scipy==0.10.1')

import cothread
from cothread.catools import caget, caput, camonitor, FORMAT_TIME, FORMAT_CTRL
import numpy
import scipy.io
import os, sys
import traceback

from PyQt4 import QtCore
from PyQt4 import QtGui

from i10 import Ui_i10_knobs


# Alarm colours
ALARM_BACKGROUND = QtGui.QColor(255, 255, 255)
ALARM_COLORS = [
        QtGui.QColor(  0, 215,  20), # None
        QtGui.QColor(255, 140,   0), # Minor
        QtGui.QColor(255,   0,   0), # Major
        QtGui.QColor(255,   0, 255), # Invalid
        ]


class OverCurrentException(Exception):
    def __init__(self, magnet_index):
        self.magnet_index = magnet_index


class Knobs(object):

    '''
    Provides an interface to control the I10 Fast Chicane.
    Values stored in the mat file are obtained through a matlab
    middle layer simulation. The values are calculated to enable
{'fraction_non_alphanumeric': 0.08171378091872791, 'fraction_numerical': 0.046819787985865724, 'mean_word_length': 3.5757575757575757, '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': '1939620', 'n_tokens_mistral': 825, 'n_tokens_neox': 738, 'n_words': 247}