code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class IdentityWebContextAdapter(metaclass=ABCMeta): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def __init__(self) -> None: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def _on_request_init(self) -> None: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def _on_reque...
Context Adapter abstract base class. Extend this to enable IdentityWebPython to work within any environment (e.g. Flask, Django, Windows Desktop app, etc)
62599075627d3e7fe0e087cd
class DofIndex( ArrayFunc ): <NEW_LINE> <INDENT> def __init__( self, array, iax, index ): <NEW_LINE> <INDENT> assert index.ndim >= 1 <NEW_LINE> assert isinstance( array, numpy.ndarray ) <NEW_LINE> self.array = array <NEW_LINE> assert 0 <= iax < self.array.ndim <NEW_LINE> self.iax = iax <NEW_LINE> self.index = index <NE...
element-based indexing
625990753d592f4c4edbc7ff
class FaceAPI(PartialAPI): <NEW_LINE> <INDENT> def __init__(self, api): <NEW_LINE> <INDENT> super().__init__(api) <NEW_LINE> self.saved_faces = set() <NEW_LINE> <DEDENT> async def list(self, pretty=False) -> Set[str]: <NEW_LINE> <INDENT> res = self.saved_faces = set(await self._get_j('faces')) <NEW_LINE> if pretty: <NE...
perform face detection, training, recognition; delete faces
625990757d43ff24874280b6
@implementer(IRecord) <NEW_LINE> class Record(Source, _Convertable): <NEW_LINE> <INDENT> def __init__(self, genre, id_, *args, **kw): <NEW_LINE> <INDENT> super(Record, self).__init__(genre, 'a', args, **kw) <NEW_LINE> self.id = id_ <NEW_LINE> if isinstance(self.genre, str): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> ...
A BibTeX record is an ordered dict with two special properties - id and genre. To overcome the limitation of single values per field in BibTeX, we allow fields, i.e. values of the dict to be iterables of strings as well. Note that to support this use case comprehensively, various methods of retrieving values will beha...
6259907555399d3f05627e5e
class DecoderStack(tf.compat.v1.layers.Layer): <NEW_LINE> <INDENT> def __init__(self, params): <NEW_LINE> <INDENT> if params["couple_encoder_decoder"]: <NEW_LINE> <INDENT> name = "encoder" <NEW_LINE> with tf.compat.v1.variable_scope( name, reuse=tf.compat.v1.AUTO_REUSE) as scope: <NEW_LINE> <INDENT> super(DecoderStack,...
Transformer decoder stack.
62599075fff4ab517ebcf15c
class Meta: <NEW_LINE> <INDENT> model = Flight <NEW_LINE> fields = ('id', 'pickup', 'destination', 'departure_date', 'return_date', 'no_travellers', 'passport_number', )
Meta class to map serializer's fields with the model fields.
625990757d847024c075dd1f
class Config(object): <NEW_LINE> <INDENT> DEBUG = False <NEW_LINE> CSRF_ENABLED = True <NEW_LINE> SECRET_KEY = getenv('SECRET', 'dodo@N9shiv:)()') <NEW_LINE> SQLALCHEMY_DATABASE_URI = getenv('DATABASE_URL', DEFAULT_DB_URL) <NEW_LINE> SQLALCHEMY_TRACK_MODIFICATIONS = False <NEW_LINE> JWT_AUTH_URL_RULE = '/api/v1/login' ...
Parent Babe configuration class.
62599075460517430c432cfb
class TestReportItem(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def testReportItem(self): <NEW_LINE> <INDENT> model = thirdwatch_api.models.report_item.ReportItem()
ReportItem unit test stubs
625990751f5feb6acb16453a
class SimpleSingleFieldHandler(SingleFieldHandler): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def _get(cls, event): <NEW_LINE> <INDENT> return event.get(cls.fieldnames[0], '') <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def _patch(cls, event, value): <NEW_LINE> <INDENT> event[cls.fieldnames[0]] = value
Handler for single-string details that require no special processing.
6259907563b5f9789fe86aaa
class SUSAN(FSLCommand): <NEW_LINE> <INDENT> _cmd = 'susan' <NEW_LINE> input_spec = SUSANInputSpec <NEW_LINE> output_spec = SUSANOutputSpec <NEW_LINE> def _format_arg(self, name, spec, value): <NEW_LINE> <INDENT> if name == 'fwhm': <NEW_LINE> <INDENT> return spec.argstr % (float(value) / np.sqrt(8 * np.log(2))) <NEW_LI...
use FSL SUSAN to perform smoothing Examples -------- >>> from nipype.interfaces import fsl >>> from nipype.testing import example_data >>> print anatfile #doctest: +SKIP anatomical.nii #doctest: +SKIP >>> sus = fsl.SUSAN() >>> sus.inputs.in_file = example_data('structural.nii') >>> sus.inputs.brightness_threshold = 2...
62599075e1aae11d1e7cf4b1
class KalmanFilter(object): <NEW_LINE> <INDENT> def __init__(self, dof=6): <NEW_LINE> <INDENT> self.dof = dof <NEW_LINE> self.A = np.eye(dof) <NEW_LINE> self.H = np.eye(dof) <NEW_LINE> self.B = 0 <NEW_LINE> self.Q = np.zeros(shape=(dof, dof)) <NEW_LINE> self.R = np.eye(dof) / 50 <NEW_LINE> self.P = np.eye(dof) <NEW_LIN...
Simple Multi-variate Kalman Filter.
62599075a17c0f6771d5d84f
class Error(): <NEW_LINE> <INDENT> def __init__(self, code, message): <NEW_LINE> <INDENT> self.code = code <NEW_LINE> self.message = message
просто класс для описания ошибок - ч бы было удобнее их отдавать получателю.
625990754527f215b58eb643
class SlotsAndDict(object): <NEW_LINE> <INDENT> __slots__ = ('__dict__', 'attribute') <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> attribute = "hi"
To allow dynamic assignment, add __dict__ to __slots__. This kills a lot of the time + memory benefits of __slots__, but is still faster than pure __dict__ .
6259907592d797404e3897fe
class LoreDeprecationTests(TestCase): <NEW_LINE> <INDENT> if _PY3: <NEW_LINE> <INDENT> skip = "Lore is not being ported to Python 3." <NEW_LINE> <DEDENT> def test_loreDeprecation(self): <NEW_LINE> <INDENT> reflect.namedAny("twisted.lore") <NEW_LINE> warningsShown = self.flushWarnings() <NEW_LINE> self.assertEqual(1, le...
Contains tests to make sure Lore is marked as deprecated.
62599075f548e778e596ced5
@inherit_doc <NEW_LINE> class DefaultParamsWriter(MLWriter): <NEW_LINE> <INDENT> def __init__(self, instance: "Params"): <NEW_LINE> <INDENT> super(DefaultParamsWriter, self).__init__() <NEW_LINE> self.instance = instance <NEW_LINE> <DEDENT> def saveImpl(self, path: str) -> None: <NEW_LINE> <INDENT> DefaultParamsWriter....
Specialization of :py:class:`MLWriter` for :py:class:`Params` types Class for writing Estimators and Transformers whose parameters are JSON-serializable. .. versionadded:: 2.3.0
625990752c8b7c6e89bd512e
class _ConstantVacuumPermittivity(CommandManager): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(_ConstantVacuumPermittivity, self).__init__() <NEW_LINE> self.pixmap = "fem-solver-analysis-thermomechanical.svg" <NEW_LINE> self.menutext = Qt.QT_TRANSLATE_NOOP( "FEM_ConstantVacuumPermittivity", "Const...
The FEM_ConstantVacuumPermittivity command definition
62599075dc8b845886d54f01
class Normalize(object): <NEW_LINE> <INDENT> def __init__(self, mean, std): <NEW_LINE> <INDENT> self.mean = mean <NEW_LINE> self.std = std <NEW_LINE> <DEDENT> def __call__(self, image): <NEW_LINE> <INDENT> image = (image - self.mean) / self.std <NEW_LINE> return image
Convert ndarrays in sample to Tensors. Args: mean: Mean of rgb channels std: Standard deviation of rgb channels
62599075091ae3566870657f
class KubeBackend(BaseBackend, KubeMixIn): <NEW_LINE> <INDENT> kubectl_command = "kubectl" <NEW_LINE> env_key = "_env" <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self.secret_exists = None <NEW_LINE> self.workflow = kwargs.get("workflow") <NEW_LINE> s...
Manages native `kubectl secret` storage
62599075796e427e538500c0
class Lambda(pm.Deterministic): <NEW_LINE> <INDENT> def __init__(self, name, lam_fun, doc='A Deterministic made from an anonymous function', *args, **kwds): <NEW_LINE> <INDENT> (parent_names, parent_values) = get_signature(lam_fun) <NEW_LINE> if parent_values is None: <NEW_LINE> <INDENT> raise ValueError( '%s: All argu...
L = Lambda(name, lambda p1=p1, p2=p2: f(p1, p2)[, doc, dtype=None, trace=True, cache_depth=2, plot=None]) Converts second argument, an anonymous function, into a Deterministic object with specified name. :Parameters: name : string The name of the deteriministic object to be created. lambda : function ...
625990752c8b7c6e89bd512f
class DgmTypeEffect(models.Model): <NEW_LINE> <INDENT> type = models.ForeignKey(InvType) <NEW_LINE> effect = models.ForeignKey(DgmEffect) <NEW_LINE> is_default = models.BooleanField(default=False) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> app_label = 'eve_db' <NEW_LINE> ordering = ['id'] <NEW_LINE> verbose_name = 'Inv...
Effects related to items. Effects are like boolean flags - if an item has an effect listed, it's subject to this effect with the specified parameters, listed as per the DgmEffect. CCP Table: dgmTypeEffects CCP Primary key: ("typeID" smallint(6), "effectID" smallint(6))
625990755fcc89381b266dfc
class EventListener(object): <NEW_LINE> <INDENT> def __init__(self, state=state): <NEW_LINE> <INDENT> self.state = state <NEW_LINE> self.connection = establish_connection() <NEW_LINE> self.receiver = EventReceiver(self.connection, handlers={"*": self.state.event}) <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <INDENT...
Capture events sent by messages and store them in memory.
625990758a43f66fc4bf3adc
class TestFileSignature(unittest.TestCase): <NEW_LINE> <INDENT> def test_form(self): <NEW_LINE> <INDENT> self.assertEqual(len(store.MAGIC), 8) <NEW_LINE> self.assertEqual(b"\211KAS\r\n\032\n", store.MAGIC)
Checks the file signature is what we think it should be.
625990758a349b6b43687ba1
class InvalidWorkpieceDimensions(PolyshaperError): <NEW_LINE> <INDENT> def __init__(self, machine_width, machine_height): <NEW_LINE> <INDENT> PolyshaperError.__init__(self, 4) <NEW_LINE> self.machine_width = machine_width <NEW_LINE> self.machine_height = machine_height <NEW_LINE> <DEDENT> def to_string(self): <NEW_LINE...
The exception generated when the workpiece does not fit the machine
6259907532920d7e50bc798f
class ResponseData(BaseResponseData): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__(DiagnosticSessionControl) <NEW_LINE> self.session_echo = None <NEW_LINE> self.session_param_records = None <NEW_LINE> self.p2_server_max = None <NEW_LINE> self.p2_star_server_max = None
.. data:: session_echo Request subfunction echoed back by the server .. data:: session_param_records Raw session parameter records. Data given by the server. For 2006 configurations, this data can is manufacturer specific. For 2013 version and above, this data correspond to P2 and P2* timing requirem...
62599075435de62698e9d750
class ApiResponseForexPairs(object): <NEW_LINE> <INDENT> swagger_types = { 'pairs': 'list[ForexPair]' } <NEW_LINE> attribute_map = { 'pairs': 'pairs' } <NEW_LINE> def __init__(self, pairs=None): <NEW_LINE> <INDENT> self._pairs = None <NEW_LINE> self.discriminator = None <NEW_LINE> if pairs is not None: <NEW_LINE> <INDE...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
625990754428ac0f6e659e77
class Logger: <NEW_LINE> <INDENT> def __init__(self,logfilename, debugfilename): <NEW_LINE> <INDENT> self.logfilename = logfilename <NEW_LINE> self.logfile = open(logfilename,'w') <NEW_LINE> self.logfile.write('<?xml version="1.0" encoding="UTF-8"?>\n') <NEW_LINE> self.logfile.write('<cli-logger machine="%s">\n\n' % so...
This class is responsible for writing the XML log file
625990752ae34c7f260aca2d
class Oscillator: <NEW_LINE> <INDENT> PATTERN = [NEUTRAL, PLUS, NEUTRAL, MINUS] <NEW_LINE> def __init__(self, frequency=3**9, timer=Timer, debug=False): <NEW_LINE> <INDENT> self._period = 1 / frequency / len(Oscillator.PATTERN) <NEW_LINE> self._output = ConnectionPoint(ConnectionPoint.WRITER) <NEW_LINE> self._idx = 0 <...
A clock that oscillates between (-), (0), and (+) such that every other tick is (0), and the reamining values swap between (-) and (+) Ex. (0), (+), (0), (-), (0), (+), (0), (-), (0), ... Default frequency is 19683 (3 ** 9)Hz.
62599075cc0a2c111447c775
class ImageTestClass(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.new_user = User(username = "beryl", email = "[email protected]", password = "show001") <NEW_LINE> self.new_user.save() <NEW_LINE> self.new_profile = Profile(profile_pic = '/posts', bio = "hello world", contacts = "[email protected]...
Test case for the Image class and it's behaviours.
625990752c8b7c6e89bd5130
class Gestures: <NEW_LINE> <INDENT> def __init__(self, device): <NEW_LINE> <INDENT> self.device = device <NEW_LINE> self.gestures = {} <NEW_LINE> self.params = {} <NEW_LINE> self.specs = {} <NEW_LINE> index = 0 <NEW_LINE> next_gesture_index = 0 <NEW_LINE> field_high = 0x00 <NEW_LINE> while field_high != 0x01: <NEW_LINE...
Information about the gestures that a device supports. Right now only some information fields are supported. WARNING: Assumes that parameters are always global, which is not the case.
62599075dc8b845886d54f03
class ProblemaNreinas(blocales.Problema): <NEW_LINE> <INDENT> def __init__(self, n=8): <NEW_LINE> <INDENT> self.n = n <NEW_LINE> <DEDENT> def estado_aleatorio(self): <NEW_LINE> <INDENT> estado = list(range(self.n)) <NEW_LINE> shuffle(estado) <NEW_LINE> return tuple(estado) <NEW_LINE> <DEDENT> def vecinos(self, estado):...
Las N reinas en forma de búsqueda local se inicializa como entorno = ProblemaNreinas(n) donde n es el número de reinas a colocar Por default son las clásicas 8 reinas.
62599075aad79263cf430100
class UserModelTestCase(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> User.query.delete() <NEW_LINE> Message.query.delete() <NEW_LINE> Follows.query.delete() <NEW_LINE> self.client = app.test_client() <NEW_LINE> <DEDENT> def test_user_model(self): <NEW_LINE> <INDENT> u = User(email="[email protected]"...
Test model for users.
6259907521bff66bcd7245b1
class MacroGetter(object): <NEW_LINE> <INDENT> def __call__(self, context, request, view, name): <NEW_LINE> <INDENT> return zope.component.getMultiAdapter( (context, view, request), interface=interfaces.IMacroTemplate, name=name)
Collect named IMacroTemplate via TAL namespace called ``macro``.
62599075009cb60464d02e84
class Testcase(object): <NEW_LINE> <INDENT> def __init__(self, _tc_name=None, _tc_start_time=None, _tc_end_time=None, _tc_status=None, _tc_log=None): <NEW_LINE> <INDENT> self._name = _tc_name <NEW_LINE> self._start_time = _tc_start_time <NEW_LINE> self._end_time = _tc_end_time <NEW_LINE> self._status = _tc_status <NEW_...
This object contains all attribute of a testcase
625990753539df3088ecdbe0
class Segment_MEA(models.Model): <NEW_LINE> <INDENT> segment = models.ForeignKey( X12Segment ) <NEW_LINE> MEA01 = models.CharField( max_length=2 ) <NEW_LINE> MEA02 = models.CharField( max_length=3 ) <NEW_LINE> MEA03 = models.CharField( max_length=20 ) <NEW_LINE> MEA05 = models.CharField( max_length=20, null=True, blank...
Properties(syntax=u'R03050608 C0504 C0604 L07030506 E0803',req_sit=u'S',repeat=u'20',pos=u'462',desc=u'Test Result')
625990757d43ff24874280b8
class GkukanMusiumdbDialogTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_icon_png(self): <NEW_LINE> <INDENT> path = ':/plugins/GkukanMusiumdb/icon.png' <NEW_LINE> icon = QIcon(path) <NEW...
Test rerources work.
6259907516aa5153ce401e23
class EnterHold(Event): <NEW_LINE> <INDENT> pass
Wait for the player to hit start.
625990754f6381625f19a14f
class DenseSliceCOO(sparse.COO): <NEW_LINE> <INDENT> def __getitem__(self, *args, **kwargs): <NEW_LINE> <INDENT> obj = super().__getitem__(*args, **kwargs) <NEW_LINE> try: <NEW_LINE> <INDENT> return obj.todense() <NEW_LINE> <DEDENT> except AttributeError: <NEW_LINE> <INDENT> return obj
Just like sparse.COO, but returning a dense array on indexing/slicing
625990757d847024c075dd23
class IBlogEntry(Interface): <NEW_LINE> <INDENT> pass
Marker interface for SimpleBlog blog entry object.
625990758a43f66fc4bf3ade
class TestVP9Speed(unittest.TestCase): <NEW_LINE> <INDENT> def test_speed(self): <NEW_LINE> <INDENT> vp9 = VP9() <NEW_LINE> self._test_speed_normal_values(vp9) <NEW_LINE> self._test_speed_abnormal_values(vp9) <NEW_LINE> <DEDENT> def _test_speed_normal_values(self, vp9): <NEW_LINE> <INDENT> vp9.speed = 0 <NEW_LINE> self...
Tests all Speed option values for the VP9 object.
625990754527f215b58eb645
class Historian: <NEW_LINE> <INDENT> def __init__(self, config, dxl, recorder, register_monitor): <NEW_LINE> <INDENT> self.__config = config <NEW_LINE> self.__dxl = dxl <NEW_LINE> self.__recorder = recorder <NEW_LINE> self.__register_monitor = register_monitor <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <INDENT> se...
Historian is the class encapsulating a single instance of the Historian listening for events being sent on the OpenDXL fabric
62599075f548e778e596ced9
class Curve: <NEW_LINE> <INDENT> def __init__ (self): <NEW_LINE> <INDENT> self.numPoints = -1 <NEW_LINE> self.order = -1 <NEW_LINE> self.points = [] <NEW_LINE> self.knots = [] <NEW_LINE> pass
Curve object
625990754428ac0f6e659e79
class Meta: <NEW_LINE> <INDENT> model = User <NEW_LINE> fields = ("last_login", "last_request")
Last login and last request
625990752ae34c7f260aca2f
class GlobalBear(Bear): <NEW_LINE> <INDENT> def __init__(self, file_dict, section, message_queue, TIMEOUT=0): <NEW_LINE> <INDENT> Bear.__init__(self, section, message_queue, TIMEOUT) <NEW_LINE> self.file_dict = file_dict <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def kind(): <NEW_LINE> <INDENT> return BEAR_KIND.GLOBA...
A GlobalBear is able to analyze semantical facts across several file. The results of a GlobalBear will be presented grouped by the origin Bear. Therefore Results spanning above multiple files are allowed and will be handled right. If you only look at one file at once anyway a LocalBear is better for your needs. (And ...
625990752c8b7c6e89bd5132
class PaintingWithList(BasePainting): <NEW_LINE> <INDENT> def __init__(self, fig_support=111, name=""): <NEW_LINE> <INDENT> super(PaintingWithList, self).__init__(fig_support, name) <NEW_LINE> <DEDENT> def painting_mul_list(self, feature: list, label: list, index: int): <NEW_LINE> <INDENT> x_scatter = np.array([_data[i...
画图(用于回归)
625990754a966d76dd5f0834
class BaseView: <NEW_LINE> <INDENT> _host = None <NEW_LINE> @property <NEW_LINE> def host(self): <NEW_LINE> <INDENT> return self._host <NEW_LINE> <DEDENT> @host.setter <NEW_LINE> def host(self, host): <NEW_LINE> <INDENT> self._host = host
base class for views
625990752c8b7c6e89bd5133
class Int32RectValueSerializer(ValueSerializer): <NEW_LINE> <INDENT> def CanConvertFromString(self,value,context): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def CanConvertToString(self,value,context): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def ConvertFromString(self,value,context): <NEW_LINE> <INDENT> pass <NE...
Converts instances of System.String to and from instances of System.Windows.Int32Rect. Int32RectValueSerializer()
625990755fcc89381b266dfe
class Executor(base_example_gen_executor.BaseExampleGenExecutor): <NEW_LINE> <INDENT> def GetInputSourceToExamplePTransform(self): <NEW_LINE> <INDENT> return _BigQueryToExample
Generic TFX BigQueryExampleGen executor.
6259907521bff66bcd7245b3
class CircuitBlock(object): <NEW_LINE> <INDENT> def __init__(self, num_bit): <NEW_LINE> <INDENT> self.num_bit = num_bit <NEW_LINE> <DEDENT> def __call__(self, qureg, theta_list): <NEW_LINE> <INDENT> raise <NEW_LINE> <DEDENT> @property <NEW_LINE> def num_param(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tocs...
the building block of a circuit. This is an abstract class.
6259907532920d7e50bc7992
class KeyState(UGen): <NEW_LINE> <INDENT> __documentation_section__ = None <NEW_LINE> __slots__ = () <NEW_LINE> _ordered_input_names = ( 'keycode', 'minval', 'maxval', 'lag', ) <NEW_LINE> _valid_calculation_rates = None <NEW_LINE> def __init__( self, calculation_rate=None, keycode=0, lag=0.2, maxval=1, minval=0, ): <NE...
:: >>> key_state = ugentools.KeyState.ar( ... keycode=0, ... lag=0.2, ... maxval=1, ... minval=0, ... ) >>> key_state KeyState.ar()
62599075009cb60464d02e86
class TableCreationError(HTTPException): <NEW_LINE> <INDENT> pass
handle table creation error
6259907516aa5153ce401e25
class game_state(): <NEW_LINE> <INDENT> def __init__(self, num_players, starting_coins, low_card, high_card, discard): <NEW_LINE> <INDENT> self.num_players = num_players <NEW_LINE> self.starting_coins = starting_coins <NEW_LINE> self.low_card = low_card <NEW_LINE> self.high_card = high_card <NEW_LINE> self.discard = di...
Define a class for tracking the state of the No Thanks game.
62599075aad79263cf430103
class SuperMatchData(DataModel): <NEW_LINE> <INDENT> def __init__(self, d=None): <NEW_LINE> <INDENT> DataModel.__init__(self) <NEW_LINE> self.match_number = -1 <NEW_LINE> self.scout_name = "" <NEW_LINE> self.blue_speed = {} <NEW_LINE> self.red_speed = {} <NEW_LINE> self.blue_torque = {} <NEW_LINE> self.red_torque = {} ...
Data model that contains the data collect by a Super Scout for a match
62599075460517430c432cfe
class GetMonthsOfYearTestCase(TestCase): <NEW_LINE> <INDENT> longMessage = True <NEW_LINE> def test_function(self): <NEW_LINE> <INDENT> self.assertEqual( utils.get_months_of_year(datetime.datetime.now().year - 1), 12) <NEW_LINE> self.assertEqual( utils.get_months_of_year(datetime.datetime.now().year + 1), 1) <NEW_LINE>...
Tests for the ``get_months_of_year`` function.
62599075d268445f2663a803
class TFModel(Model, TFParams, HasInputMapping, HasOutputMapping, HasBatchSize, HasModelDir, HasExportDir, HasSignatureDefKey, HasTagSet): <NEW_LINE> <INDENT> def __init__(self, tf_args): <NEW_LINE> <INDENT> super(TFModel, self).__init__() <NEW_LINE> self.args = Namespace(tf_args) <NEW_LINE> self._setDefault(input_mapp...
Spark ML Model backed by a TensorFlow model checkpoint/saved_model on disk. During ``transform()``, each executor will run an independent, single-node instance of TensorFlow in parallel, so the model must fit in memory. The model/session will be loaded/initialized just once for each Spark Python worker, and the sessio...
62599075fff4ab517ebcf162
class TestInlineResponse2022ConfigIdByConfigTypeId(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def make_instance(self, include_optional): <NEW_LINE> <INDENT> if include_optional : <NEW_LINE> <INDEN...
InlineResponse2022ConfigIdByConfigTypeId unit test stubs
625990758a43f66fc4bf3ae0
class SkuAvailabilityListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[SkuAvailability]'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(SkuAvailabilityListResult, self).__init__(**kwargs) <NEW_LINE> self.value = kwargs.get('value...
Check SKU availability result list. :param value: Check SKU availability result list. :type value: list[~azure.mgmt.cognitiveservices.models.SkuAvailability]
625990758a349b6b43687ba5
class ChecksumForm(forms.Form): <NEW_LINE> <INDENT> checksum = ChecksumField(required=True) <NEW_LINE> def __init__(self, translation, *args, **kwargs): <NEW_LINE> <INDENT> self.translation = translation <NEW_LINE> super(ChecksumForm, self).__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def clean_checksum(self): <NEW_LI...
Form for handling checksum IDs for translation.
6259907563b5f9789fe86ab0
class TestGitReceiveOldModified(Base): <NEW_LINE> <INDENT> expected_title = "git.receive" <NEW_LINE> expected_subti = ('[email protected] pushed to datanommer (master). "Try ' 'removing requirement on python-bunch."') <NEW_LINE> expected_secondary_icon = ( 'https://seccdn.libravatar.org/avatar/' '1a0d2acfddb1911ecf55da...
Sample message from the first generation of git-category messages that have been modified in datanommer to match the new topics.
62599075a17c0f6771d5d852
class TestSystemApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = ibmwex.apis.system_api.SystemApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_download_logs(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_download...
SystemApi unit test stubs
6259907523849d37ff852a03
class SymmetricCDPSolver(CDPSolver): <NEW_LINE> <INDENT> def __init__(self, rounding_digits) -> None: <NEW_LINE> <INDENT> super().__init__(rounding_digits) <NEW_LINE> self.__rounding_digits = rounding_digits <NEW_LINE> <DEDENT> def solve_partial_charges( self, graph: nx.Graph, charge_dists_collector: Dict[Atom, Tuple[C...
An optimizing solver using Dynamic Programming, C version. Use the HistogramCollector to produce appropriate charge distributions.
6259907592d797404e389801
class HTTPMethodNotAllowed(OptionalRepresentation, HTTPError): <NEW_LINE> <INDENT> def __init__(self, allowed_methods, **kwargs): <NEW_LINE> <INDENT> new_headers = {'Allow': ', '.join(allowed_methods)} <NEW_LINE> super(HTTPMethodNotAllowed, self).__init__(status.HTTP_405, **kwargs) <NEW_LINE> if not self.headers: <NEW_...
405 Method Not Allowed. The method received in the request-line is known by the origin server but not supported by the target resource. The origin server MUST generate an Allow header field in a 405 response containing a list of the target resource's currently supported methods. A 405 response is cacheable by defaul...
6259907566673b3332c31d4a
class TestAggregationSystem(VumiTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.aggregator_workers = [] <NEW_LINE> self.now = 0 <NEW_LINE> self.worker_helper = self.add_helper(WorkerHelper()) <NEW_LINE> self.broker = BrokerWrapper(self.worker_helper.broker) <NEW_LINE> <DEDENT> def fake_time(sel...
Tests tying MetricTimeBucket and MetricAggregator together.
62599075d486a94d0ba2d905
class TestAlmTask(AlmTask): <NEW_LINE> <INDENT> def __init__(self, task_id, alm_id, priority, status, timestamp): <NEW_LINE> <INDENT> self.task_id = task_id <NEW_LINE> self.alm_id = alm_id <NEW_LINE> self.priority = priority <NEW_LINE> self.status = status <NEW_LINE> self.timestampe = timestamp <NEW_LINE> <DEDENT> def ...
Simple test ALM Task
625990752c8b7c6e89bd5134
class FileDialog ( MFileDialog, Dialog ): <NEW_LINE> <INDENT> implements( IFileDialog ) <NEW_LINE> action = Enum( 'open', 'open files', 'save as' ) <NEW_LINE> default_directory = Unicode <NEW_LINE> default_filename = Unicode <NEW_LINE> default_path = Unicode <NEW_LINE> directory = Unicode <NEW_...
The toolkit specific implementation of a FileDialog. See the IFileDialog interface for the API documentation.
62599075091ae35668706585
class RetriableHTTPError(Exception): <NEW_LINE> <INDENT> pass
Raised when we get an HTTP error code that's worth retrying
625990755fcc89381b266dff
class StateResource(object): <NEW_LINE> <INDENT> swagger_types = { 'code': 'str', 'country_code_iso3': 'str', 'id': 'int', 'name': 'str' } <NEW_LINE> attribute_map = { 'code': 'code', 'country_code_iso3': 'country_code_iso3', 'id': 'id', 'name': 'name' } <NEW_LINE> def __init__(self, code=None, country_code_iso3=None, ...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
625990755166f23b2e244d22
class DetectLogos(base.Command): <NEW_LINE> <INDENT> detailed_help = {'auth_hints': vision_command_util.VISION_AUTH_HELP} <NEW_LINE> @staticmethod <NEW_LINE> def Args(parser): <NEW_LINE> <INDENT> flags.AddVisionFlags(parser) <NEW_LINE> <DEDENT> def Run(self, args): <NEW_LINE> <INDENT> return vision_command_util.RunVisi...
Detect popular product logos within an image. Detect popular product logos within an image. {auth_hints}
625990754f6381625f19a151
class MeanAbsoluteError(function.Function): <NEW_LINE> <INDENT> def check_type_forward(self, in_types): <NEW_LINE> <INDENT> type_check.expect(in_types.size() == 2) <NEW_LINE> type_check.expect( in_types[0].dtype == numpy.float32, in_types[1].dtype == numpy.float32, in_types[0].shape == in_types[1].shape ) <NEW_LINE> <D...
Mean absolute error function.
625990751b99ca40022901dc
class NormalRelation(CrossSectionRelation): <NEW_LINE> <INDENT> def __init__(self, cross_section, slope, datum=0): <NEW_LINE> <INDENT> super().__init__(cross_section, datum) <NEW_LINE> self._slope = slope <NEW_LINE> <DEDENT> def discharge(self, stage): <NEW_LINE> <INDENT> depth = stage - self._datum <NEW_LINE> return s...
Normal stage-discharge relation Parameters ---------- xs : CrossSection Cross section to base relation on slope : float Bed slope datum : float, optional Stage datum, optional (the default is 0)
6259907516aa5153ce401e27
class getJobStatus_args(object): <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRING, 'jobName', 'UTF8', None, ), ) <NEW_LINE> def __init__(self, jobName=None,): <NEW_LINE> <INDENT> self.jobName = jobName <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot._fast_decode is not None and isinsta...
Attributes: - jobName
625990757d847024c075dd27
class DenseJacobian(AssembledJacobian): <NEW_LINE> <INDENT> def __init__(self, system): <NEW_LINE> <INDENT> super().__init__(DenseMatrix, system=system)
Assemble dense global <Jacobian>.
62599075baa26c4b54d50bfc
class StockPickingRefundDocumentWizard(models.TransientModel): <NEW_LINE> <INDENT> _name = 'stock.picking.refund.wizard' <NEW_LINE> @api.multi <NEW_LINE> def create_refund(self): <NEW_LINE> <INDENT> picking_pool = self.env['stock.picking'] <NEW_LINE> move_pool = self.env['stock.move'] <NEW_LINE> quant_pool = self.env['...
Wizard for generate refund document
62599075442bda511e95d9fe
class HostTestPluginCopyMethod_JN51xx(HostTestPluginBase): <NEW_LINE> <INDENT> name = "HostTestPluginCopyMethod_JN51xx" <NEW_LINE> type = "CopyMethod" <NEW_LINE> capabilities = ["jn51xx"] <NEW_LINE> required_parameters = ["image_path", "serial"] <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> HostTestPluginBase.__in...
Plugin interface adaptor for the JN51xxProgrammer tool.
625990753317a56b869bf1ec
class AbstractModel(ABC): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def generate_competency(self, min_competency): <NEW_LINE> <INDENT> return random.uniform(min_competency, 1.0) <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def generate_ambition(self, min_ambition): <NEW_LINE> <INDENT> return random.uniform(min_a...
Implements a simple model for household decision-making. AbstractModel inherits ABC (Abstract Base Class), which provides the @abstractmethod decorator. The AbstractModel must be inherited by the AgentModel, which must override all abstract methods of the AbstractModel class.
6259907555399d3f05627e67
class BaseTestData(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.app = create_app('testing') <NEW_LINE> with self.app.app_context(): <NEW_LINE> <INDENT> self.client = self.app.test_client() <NEW_LINE> <DEDENT> self.admin_signin = self.client.post( "/api/v2/auth/signin", json=admin_lo...
base test data
625990755fdd1c0f98e5f8cb
class AsyncWiredDimmer3(WiredDimmer3, AsyncDimmer): <NEW_LINE> <INDENT> pass
HMIPW-DRD3 (Homematic IP Wired Dimming Actuator – 3x channels)
625990757d43ff24874280bb
class TestAuthenticationApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = payoneer_mobile_api.apis.authentication_api.AuthenticationApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_authentication_challenge_authenticate_post(sel...
AuthenticationApi unit test stubs
6259907560cbc95b06365a15
class JNTTDockerServerCommon(Common): <NEW_LINE> <INDENT> longdelay = 50 <NEW_LINE> shortdelay = 30
Common tests for servers on docker
6259907597e22403b383c852
class ProxyTypeMtproto(Object): <NEW_LINE> <INDENT> ID = "proxyTypeMtproto" <NEW_LINE> def __init__(self, secret, **kwargs): <NEW_LINE> <INDENT> self.secret = secret <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read(q: dict, *args) -> "ProxyTypeMtproto": <NEW_LINE> <INDENT> secret = q.get('secret') <NEW_LINE> retur...
An MTProto proxy server Attributes: ID (:obj:`str`): ``ProxyTypeMtproto`` Args: secret (:obj:`str`): The proxy's secret in hexadecimal encoding Returns: ProxyType Raises: :class:`telegram.Error`
625990758a349b6b43687ba9
class simplePDBatom: <NEW_LINE> <INDENT> def __init__(self,line=""): <NEW_LINE> <INDENT> if (line): <NEW_LINE> <INDENT> self.atnum = int(line[6:6+5]) <NEW_LINE> self.atname = line[12:12+4].strip() <NEW_LINE> self.alt = line[16:16+1].strip() <NEW_LINE> self.resname = line[17:17+3].strip().replace('+','') <NEW_LIN...
Trival atom type that knows how to parse an ATOM line from a pdb file, and how to print itself out again
6259907532920d7e50bc7997
class Settings(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.screen_width = 800 <NEW_LINE> self.screen_height = 600 <NEW_LINE> self.bg_color = (230, 230, 230) <NEW_LINE> self.ship_speed_factor = 1.5 <NEW_LINE> self.bullet_speed_factor = 1 <NEW_LINE> self.bullet_width = 3 <NEW_LINE> self.bullet_hei...
docstring for Settings
625990753346ee7daa338308
class HardwareManagerNotFound(RESTError): <NEW_LINE> <INDENT> message = 'No valid HardwareManager found.' <NEW_LINE> def __init__(self, details=None): <NEW_LINE> <INDENT> if details is not None: <NEW_LINE> <INDENT> details = details <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> details = self.message <NEW_LINE> <DEDENT...
Error raised when no valid HardwareManager can be found.
62599075ad47b63b2c5a919e
class Event(models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=100) <NEW_LINE> created_date = models.DateTimeField(default=datetime.datetime.now, blank=True, null=True) <NEW_LINE> description = models.TextField(max_length=5000, blank=True, null=True) <NEW_LINE> location = models.CharField(max_length...
An event represent
6259907556b00c62f0fb4221
class EditMediaStreamInfo(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.StreamId = None <NEW_LINE> self.StartTime = None <NEW_LINE> self.EndTime = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.StreamId = params.get("StreamId") <NEW_LINE> self.StartT...
Video stream editing information
62599075f548e778e596cedf
class rcase(object): <NEW_LINE> <INDENT> def __init__(self, chan): <NEW_LINE> <INDENT> self.chan = chan <NEW_LINE> <DEDENT> def ready(self): <NEW_LINE> <INDENT> return self.chan.recv_ready() <NEW_LINE> <DEDENT> def exec_(self): <NEW_LINE> <INDENT> return self.chan.recv()
A case that will ``chan.recv()`` when the channel is able to receive.
62599075dc8b845886d54f0a
class Image(BaseModel): <NEW_LINE> <INDENT> img_type = models.CharField( '图片类型', null=True, max_length=30, default='', choices=IMAGE_TYPE) <NEW_LINE> order = models.IntegerField('排序位置', default=0) <NEW_LINE> active = models.BooleanField('生效', default=True) <NEW_LINE> name = models.CharField('名称', max_length=255, defaul...
图片
62599075379a373c97d9a972
class Person(object): <NEW_LINE> <INDENT> def __init__(self, name, age, gender, convert, years_baptized, hobby): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.age = age <NEW_LINE> self.gender = gender <NEW_LINE> self.convert = convert <NEW_LINE> self.years_baptized = years_baptized <NEW_LINE> self.hobby = hobby ...
Has the attributes of a missionary
625990757c178a314d78e893
class ExclusionOfLiability(Base): <NEW_LINE> <INDENT> __table_args__ = {'schema': app_schema_name} <NEW_LINE> __tablename__ = 'exclusion_of_liability' <NEW_LINE> id = sa.Column(sa.Integer, primary_key=True, autoincrement=False) <NEW_LINE> title = sa.Column(JSONType, nullable=False) <NEW_LINE> content = sa.Column(JSONTy...
The bucket you can throw all addresses in the application should be able to use for the get egrid webservice. This is a bypass for the moment. In the end it seems ways more flexible to bind a service here but if you like you can use it. Attributes: id (int): The identifier. This is used in the database only and mu...
62599075167d2b6e312b8239
class DataModelV2: <NEW_LINE> <INDENT> def __init__(self, relatedness_path, unigrams_path, trigrams_path): <NEW_LINE> <INDENT> self.unigram = {} <NEW_LINE> self.trigram = {} <NEW_LINE> self.relatedness = {} <NEW_LINE> self.word_vector = {} <NEW_LINE> self._parse_relatedness(relatedness_path) <NEW_LINE> self._parse_unig...
Class for parsing the cleaned relatedness, unigram and trigram data. For each sentence in puns dataset [data-agg.csv], we have precomputed relateness and trigram data. We just pass this data for a sentence to a probabilistic model which computes ambiguity and distinctiveness for a given pun/nonpun. Note: Word ve...
625990757cff6e4e811b7390
class UnknownUser(User): <NEW_LINE> <INDENT> @property <NEW_LINE> def name(self) -> Optional[str]: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> def hasPrivilege(self, priv: str) -> bool: <NEW_LINE> <INDENT> return False
Anonymous user who has no privileges.
625990758e7ae83300eea9e3
class WorkQueueTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> os.mkdir(TMP) <NEW_LINE> self.queuename = os.path.join(TMP, "wq") <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> shutil.rmtree(TMP) <NEW_LINE> <DEDENT> def test_constructor(self): <NEW_LINE> <INDENT> wqueue...
Test case for obsticket.WorkQueue.
6259907591f36d47f2231b37
class CondorConfigValException(Exception): <NEW_LINE> <INDENT> def __init__(self,src): <NEW_LINE> <INDENT> self.source = src
If we couldn't read a condor_config_val
62599075460517430c432d01
class PreprocessorIfCondition: <NEW_LINE> <INDENT> file = None <NEW_LINE> linenr = None <NEW_LINE> column = None <NEW_LINE> E = None <NEW_LINE> result = None <NEW_LINE> def __init__(self, element): <NEW_LINE> <INDENT> _load_location(self, element) <NEW_LINE> self.E = element.get('E') <NEW_LINE> self.result = int(elemen...
Information about #if/#elif conditions
62599075aad79263cf430109
class YoutubeVideoRegistrationError(enum.IntEnum): <NEW_LINE> <INDENT> UNSPECIFIED = 0 <NEW_LINE> UNKNOWN = 1 <NEW_LINE> VIDEO_NOT_FOUND = 2 <NEW_LINE> VIDEO_NOT_ACCESSIBLE = 3
Enum describing YouTube video registration errors. Attributes: UNSPECIFIED (int): Enum unspecified. UNKNOWN (int): The received error code is not known in this version. VIDEO_NOT_FOUND (int): Video to be registered wasn't found. VIDEO_NOT_ACCESSIBLE (int): Video to be registered is not accessible (e.g. private...
6259907555399d3f05627e6a
class WidgetSerializer(DynamicFieldsMixin, serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Widget <NEW_LINE> fields = ('__all__') <NEW_LINE> <DEDENT> def validate_analysis_framework(self, analysis_framework): <NEW_LINE> <INDENT> if not analysis_framework.can_modify(self.context...
Widget Model Serializer
625990758a349b6b43687bab
class PyAutopep8(Package): <NEW_LINE> <INDENT> homepage = "https://github.com/hhatto/autopep8" <NEW_LINE> url = "https://github.com/hhatto/autopep8/archive/ver1.2.2.tar.gz" <NEW_LINE> version('1.2.2', 'def3d023fc9dfd1b7113602e965ad8e1') <NEW_LINE> extends('python') <NEW_LINE> depends_on('py-setuptools', type='buil...
Automatic pep8 formatter
62599075ad47b63b2c5a91a0
class AvailableProvidersListCountry(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'country_name': {'key': 'countryName', 'type': 'str'}, 'providers': {'key': 'providers', 'type': '[str]'}, 'states': {'key': 'states', 'type': '[AvailableProvidersListState]'}, } <NEW_LINE> def __init__( self, *, cou...
Country details. :param country_name: The country name. :type country_name: str :param providers: A list of Internet service providers. :type providers: list[str] :param states: List of available states in the country. :type states: list[~azure.mgmt.network.v2020_07_01.models.AvailableProvidersListState]
6259907523849d37ff852a09
class FitFailedError(RuntimeError, TypeError): <NEW_LINE> <INDENT> pass
Error for failed estimator 'fit' call. Inherits type error to accommodate Scikit-learn expectation of a ``TypeError`` on failed array checks in estimators.
625990752ae34c7f260aca37
class clsUser(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'user' <NEW_LINE> U_fullname = db.Column(db.String(50)) <NEW_LINE> U_username = db.Column(db.String(16), primary_key = True, index = True) <NEW_LINE> U_password = db.Column(db.String(200)) <NEW_LINE> U_email = db.Column(db.String(30), unique = True) <NEW_L...
Clase que define el modelo Usuario
625990755fdd1c0f98e5f8cf
class IterationTwoTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.lst_of_obs = [("A", "B", "B", "A")] * 10 + [("B", "A", "B")] * 20 <NEW_LINE> self.pi = hashdict([("s", 0.846,), ("t", 0.154)]) <NEW_LINE> self.A = LMatrix(rlabels = ["s", "t"], data = np.array([ [0.298, 0.702], [0.1...
Continuing the first iteration, this is the second iteration
62599075009cb60464d02e8e