code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class SMP2018ECDTCorpus: <NEW_LINE> <INDENT> __corpus_name__ = 'SMP2018ECDTCorpus' <NEW_LINE> __zip_file__name = 'http://s3.bmio.net/coco_nlp/SMP2018ECDTCorpus.tar.gz' <NEW_LINE> @classmethod <NEW_LINE> def load_data(cls, subset_name: str = 'train', shuffle: bool = True, cutter: str = 'char') -> Tuple[List[List[str]], ...
https://worksheets.codalab.org/worksheets/0x27203f932f8341b79841d50ce0fd684f/ This dataset is released by the Evaluation of Chinese Human-Computer Dialogue Technology (SMP2018-ECDT) task 1 and is provided by the iFLYTEK Corporation, which is a Chinese human-computer dialogue dataset. Sample:: label ...
62598eedf7d966606f74676c
class Fraction: <NEW_LINE> <INDENT> def __init__(self, numerator: int, denominator: int) -> None: <NEW_LINE> <INDENT> self.numerator = numerator <NEW_LINE> self.denominator = denominator <NEW_LINE> <DEDENT> def get_numerator(self) -> int: <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> numerator = pro...
Class Fraction
62598eedbe383301e0251f54
class Addr(int): <NEW_LINE> <INDENT> def __init__(self, arg): <NEW_LINE> <INDENT> self.int = arg <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return hex(self.int) <NEW_LINE> <DEDENT> def __add__(self,n): <NEW_LINE> <INDENT> datatype = type(n) <NEW_LINE> if datatype == Addr: <NEW_LINE> <INDENT> return Addr...
Used to represent adresses
62598eedaad79263cf42cf86
class ChatDataWrapper: <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def for_platform(cls, platform, data): <NEW_LINE> <INDENT> if platform == ChatPlatform.FACEBOOK: <NEW_LINE> <INDENT> return FbChatDataWrapper(data) <NEW_LINE> <DEDENT> if platform == ChatPlatform.TELEGRAM: <NEW_LINE> <INDENT> return TgChatDataWrapper(da...
wrapper class to provide same api for facebook and telegram
62598eed66673b3332c2eb23
class InfluxDBPoints(): <NEW_LINE> <INDENT> pass
InfluxDBに書き込むデータを保持するクラス
62598eed7d847024c075ab48
class YXSlicer(OrthoSlicer): <NEW_LINE> <INDENT> _cut_displayed = 'yx'
The ``YXSlicer`` class enables to combine coronal and sagittal views on the same figure with plotting functions of Nilearn like :func:`nilearn.plotting.plot_img`. This visualization mode can be activated by setting ``display_mode='yx'``: .. code-block:: python from nilearn.datasets import load_mni152_template ...
62598eedd7e4931a7ef3a81a
class AFDRelistedNullEditor(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.afd_prefix = "Wikipedia:Articles for deletion/" <NEW_LINE> self.category = pywikibot.Category(site, "Category:Relisted AfD debates") <NEW_LINE> <DEDENT> def process_log(self, log): <NEW_LINE> <INDENT> for page in log.i...
Makes a null edit to AfDs transcluded in the logs on [[Category:Relisted AfD debates]]
62598eed3317a56b869bd923
class TestPtBr: <NEW_LINE> <INDENT> def test_phone_number(self, faker, num_samples): <NEW_LINE> <INDENT> pattern: Pattern = re.compile( r"(?:\+55 )?" r"(?:[1-8]1|84|\((?:0[1-8]1|084)\))" r" \d{4}[ -]\d{4}|" r"\d{4}?[ -]\d{3}[ -]\d{4}", ) <NEW_LINE> for _ in range(num_samples): <NEW_LINE> <INDENT> phone_number = faker.p...
Test pt_BR phone number provider methods
62598eed60cbc95b06362ab9
class BaseBuilder: <NEW_LINE> <INDENT> def __init__(self, queues=None): <NEW_LINE> <INDENT> self.queues = queues <NEW_LINE> if self.queues is None: <NEW_LINE> <INDENT> self.queues = [] <NEW_LINE> <DEDENT> <DEDENT> def isrunning(self): <NEW_LINE> <INDENT> return False
构建工具
62598eed2ae34c7f260a9861
class GetButton(BaseItem): <NEW_LINE> <INDENT> item_type = 'button' <NEW_LINE> extra_attributes = [ ('title', 'title'), ('icon', 'icon'), ('url', 'redirect'), ] <NEW_LINE> def __init__(self, alignment, css_class_suffix, title, url, icon=None): <NEW_LINE> <INDENT> super(GetButton, self).__init__(alignment, css_class_suf...
A button which triggers a GET request
62598eeda8370b77170eeb60
class Seen(BaseResponder): <NEW_LINE> <INDENT> config_namespace = 'botnet' <NEW_LINE> config_name = 'seen' <NEW_LINE> def __init__(self, config): <NEW_LINE> <INDENT> super(Seen, self).__init__(config) <NEW_LINE> self.ms = MessageStore(lambda: self.config_get('message_data')) <NEW_LINE> <DEDENT> @parse_command([('nick',...
Allows users to see when was the last time someone said something. Example module config: "botnet": { "seen": { "message_data": "/path/to/message_data_file.json" } }
62598eedf9cc0f698b1c468c
class PostOrderAction(ApplicationResult): <NEW_LINE> <INDENT> is_final = is_successful = True <NEW_LINE> affects = ApplicationResult.POST_ORDER <NEW_LINE> def __init__(self, description): <NEW_LINE> <INDENT> self.description = description
For when an offer condition is met but the benefit is deferred until after the order has been placed. Eg buy 2 books and get 100 loyalty points.
62598eede5267d203ee6a082
class Car: <NEW_LINE> <INDENT> def __init__(self, i, type): <NEW_LINE> <INDENT> self.id = i <NEW_LINE> self.location = 0.0 <NEW_LINE> if type == 0: <NEW_LINE> <INDENT> self.calcDrive = nervous <NEW_LINE> <DEDENT> if type == 1: <NEW_LINE> <INDENT> self.calcDrive = normal <NEW_LINE> <DEDENT> if type == 2: <NEW_LINE> <IND...
:file: Car.py :author: Jeff Ross :details: Handles the car class to represent the cars on the road
62598eed0a50d4780f703b23
class TransferType(Enum): <NEW_LINE> <INDENT> MASTER_TRANSFER_IN = "master-transfer-in" <NEW_LINE> MASTER_TRANSFER_OUT = "master-transfer-out"
master-transfer-in:sub account transfer to main account currency master-transfer-out :main account transfer to sub account
62598eede5267d203ee6a083
class CanRentBikePermission(BasePermission): <NEW_LINE> <INDENT> message = "You cannot rent a bike at this time." <NEW_LINE> def has_permission(self, request, view): <NEW_LINE> <INDENT> if not request.user or not request.user.is_authenticated: <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> if request.method in SA...
The request is authenticated as a user and has add_rent permission.
62598eed8da39b475be01928
class CleanupException(Exception): <NEW_LINE> <INDENT> pass
Exception raised from the cleanup method of an ITunableLoop.
62598eedd486a94d0ba2a748
class QuotientOfSimplicialSet_finite(QuotientOfSimplicialSet, PushoutOfSimplicialSets_finite): <NEW_LINE> <INDENT> def __init__(self, inclusion, vertex_name='*'): <NEW_LINE> <INDENT> subcomplex = inclusion.domain() <NEW_LINE> PushoutOfSimplicialSets_finite.__init__(self, [inclusion, subcomplex.constant_map()], vertex_n...
The quotient of finite simplicial sets. When the simplicial sets involved are finite, there is a :meth:`quotient_map` method available.
62598eed97e22403b383966b
@add_metaclass(ExtensionMethod) <NEW_LINE> class ControlledObservableWindowed(ControlledObservable): <NEW_LINE> <INDENT> def windowed(self, window_size, scheduler=None): <NEW_LINE> <INDENT> scheduler = scheduler or current_thread_scheduler <NEW_LINE> return WindowedObservable(self, window_size, scheduler)
Uses a meta class to extend Observable with the methods in this class
62598eed63b5f9789fe838d9
class WebProxyScriptElement(ConfigurationElement): <NEW_LINE> <INDENT> DownloadTimeout=property(lambda self: object(),lambda self,v: None,lambda self: None) <NEW_LINE> ElementProperty=property(lambda self: object(),lambda self,v: None,lambda self: None) <NEW_LINE> EvaluationContext=property(lambda self: object(),lambda...
Represents information used to configure Web proxy scripts. This class cannot be inherited. WebProxyScriptElement()
62598eed23849d37ff84f833
class AclBase: <NEW_LINE> <INDENT> __slots__ = "__dict_known_ips", "__buffer_acl" <NEW_LINE> def __init__(self, buffer_acl=True): <NEW_LINE> <INDENT> acheck(bool, buffer_acl=buffer_acl) <NEW_LINE> self.__buffer_acl = buffer_acl <NEW_LINE> self.__dict_known_ips = {} <NEW_LINE> <DEDENT> def check_level_ipv4(self, ip_addr...
Base class for all ACL special classes.
62598eede1aae11d1e7cdbfd
class Group1ViewInfo(NetAppObject): <NEW_LINE> <INDENT> _node = None <NEW_LINE> @property <NEW_LINE> def node(self): <NEW_LINE> <INDENT> return self._node <NEW_LINE> <DEDENT> @node.setter <NEW_LINE> def node(self, val): <NEW_LINE> <INDENT> if val != None: <NEW_LINE> <INDENT> self.validate('node', val) <NEW_LINE> <DEDEN...
1st nested typedef at level 1
62598eedbaa26c4b54d4da49
class IpLists(object): <NEW_LINE> <INDENT> swagger_types = { 'ip_lists': 'list[IpList]' } <NEW_LINE> attribute_map = { 'ip_lists': 'ipLists' } <NEW_LINE> def __init__(self, ip_lists=None): <NEW_LINE> <INDENT> self._ip_lists = None <NEW_LINE> self.discriminator = None <NEW_LINE> if ip_lists is not None: <NEW_LINE> <INDE...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598eedcc40096d61619596
class MultiListOption(MultiOption): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def get_options(cls, section, prefix, default=None, option_cls=None): <NEW_LINE> <INDENT> return super(MultiListOption, cls).get_options(section, prefix, default, option_cls or ListOption)
Extended version of MultiOption to automatically return ListOptions with ``get_options``
62598eed60cbc95b06362abb
class Geometry(ras41.Geometry): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Geometry, self).__init__()
HECRAS Geomerty version RAS500.
62598eed009cb60464cffccc
class Subtractor(Transformer): <NEW_LINE> <INDENT> thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") <NEW_LINE> __repr__ = _swig_repr <NEW_LINE> def __init__(self, *args): <NEW_LINE> <INDENT> _fastjet.Subtractor_swiginit(self, _fastjet.new_Subtractor(*args)) <NEW_LINE> <D...
Class that helps perform jet background subtraction. This class derives from Transformer and makes use of a pointer to a BackgroundEstimatorBase object in order to determine the background in the vicinity of a given jet and then subtract area*background from the jet. It can also be initialised with a specific fixed ...
62598eed435de62698e9a552
class Citation(object): <NEW_LINE> <INDENT> def __init__(self, text, citing_paper_id, cited_paper_id, citing_paper_title=None, cited_paper_title=None, citing_paper_year=None, cited_paper_year=None, citing_author_ids=None, cited_author_ids=None, extended_context=None, section_number=None, section_title=None, intent=None...
Class representing a citation object
62598eed26068e7796d4b0d9
class MessagingListNotFound(GCSMSError): <NEW_LINE> <INDENT> pass
Messaging list not found.
62598eed32920d7e50bc47a9
class RuleCondition(): <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> msg = "Cannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}".format( ", ".join(['RuleConditionSingleProperty', 'RuleConditionOrLvl2', 'RuleConditionAndLvl2'])) <NEW_LINE> raise Exception(msg)
RuleCondition.
62598eed21bff66bcd7213d1
class DataBase: <NEW_LINE> <INDENT> _PLOT_METHODS = PlotMethods <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.root = None <NEW_LINE> self.plot = self._PLOT_METHODS(self) <NEW_LINE> <DEDENT> @property <NEW_LINE> def root_built(self): <NEW_LINE> <INDENT> return (Path(self.root) / "meta.tsv").exists() <NEW_LINE>...
Mixin for `DataTree`, `DataBranch`, and derived class
62598eed2c8b7c6e89bd1f3d
class IndexView(generic.ListView): <NEW_LINE> <INDENT> template_name = 'polls/index.html' <NEW_LINE> context_object_name = 'latest_question_list' <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> return Question.objects.filter(pub_date__lte=timezone.now()).order_by('-pub_date')
Display the index view with question sorted from most recent to oldest.
62598eedadb09d7d5dc08d45
class Decode(BaseNode): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.encoding = kwargs.pop('encoding', 'utf-8') <NEW_LINE> super().__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def process(self, msg): <NEW_LINE> <INDENT> msg.payload = msg.payload.decode(self.encoding) <NEW_LINE> ret...
Decode payload from byte to specified encoding
62598eed57b8e32f525074c2
class EXPDTA(object): <NEW_LINE> <INDENT> def __init__(self, line): <NEW_LINE> <INDENT> record = line[0:6].strip() <NEW_LINE> if record == "EXPDTA": <NEW_LINE> <INDENT> self.technique = line[10:70].strip() <NEW_LINE> <DEDENT> else: logger.error(record+'\n') ; raise ValueError
EXPDTA field The EXPDTA record identifies the experimental technique used. This may refer to the type of radiation and sample, or include the spectroscopic or modeling technique. Permitted values include: ELECTRON DIFFRACTION FIBER DIFFRACTION FLUORESCENCE TRANSFER NEUTRON DIFFRACTION NMR THEORETICAL MODEL X-RAY DIFF...
62598eedd486a94d0ba2a749
class MessageTree: <NEW_LINE> <INDENT> def __init__(self, tree): <NEW_LINE> <INDENT> self.__tree = tree <NEW_LINE> <DEDENT> def is_language_matches(self, language_id): <NEW_LINE> <INDENT> raise RuntimeError("is_language_matches() method should be overrided.") <NEW_LINE> <DEDENT> def has_message(self, key_path): <NEW_LI...
Base class for all message tree classes.
62598eed7b25080760ed5c17
class UpdateWorker(Thread): <NEW_LINE> <INDENT> def __init__(self, agent, in_queue_size): <NEW_LINE> <INDENT> super(UpdateWorker, self).__init__() <NEW_LINE> self.agent = agent <NEW_LINE> self.input_queue = queue.Queue(maxsize=in_queue_size) <NEW_LINE> self.output_queue = queue.Queue() <NEW_LINE> self.daemon = True <NE...
Executes learning separate from the main event loop as described in the Ape-X paper. Communicates with the main thread via a queue.
62598eed091ae35668703394
class activate_result: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRUCT, 'e', (NotAliveException, NotAliveException.thrift_spec), None, ), (2, TType.STRUCT, 'aze', (AuthorizationException, AuthorizationException.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, e=None, aze=None,): <NEW_LINE> <INDENT> sel...
Attributes: - e - aze
62598eed4e4d562566370b94
class WhoIsAtHome(AppDaemon): <NEW_LINE> <INDENT> def initialize(self): <NEW_LINE> <INDENT> engine = self.get_app("brain").engine <NEW_LINE> keyword = ["дом", "квартира"] <NEW_LINE> people = ["кто", "брат"] <NEW_LINE> for k in keyword: <NEW_LINE> <INDENT> engine.register_entity(k, "WhoIsAtHomeKeyword") <NEW_LINE> <DEDE...
Tells, who is at home now
62598eeda8370b77170eeb61
class JobStep(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'job_step' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> task_name = Column(String(200)) <NEW_LINE> date = Column(DateTime, nullable=False) <NEW_LINE> status = Column(Enum(*list(StatusExecution.values()), name='StatusExecutionEnumType'), nullab...
Records a task execution
62598eed2eb69b55b15a0749
class ComputeTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.dropq_compute = MockComputeTests() <NEW_LINE> self.client = Client() <NEW_LINE> <DEDENT> def test_submit_calculation(self): <NEW_LINE> <INDENT> data = { 'param1': {'stuff': {'more stuff': 1, 2: 'other stuff'}}, 'param2': {'param...
Test the views of this app.
62598eeda8370b77170eeb62
class Error(errors.ServiceError): <NEW_LINE> <INDENT> SERVICE_TYPE = 'Logcat'
Root error type for logcat service.
62598eed56ac1b37e6300968
class LyGenTextDef(LyObject): <NEW_LINE> <INDENT> def __init__(self, value = None): <NEW_LINE> <INDENT> LyObject.__init__(self) <NEW_LINE> self.value = value <NEW_LINE> <DEDENT> def stringOutput(self): <NEW_LINE> <INDENT> return str(self.value) + " "
holds either full_markup, string, or DIGIT
62598eed2ae34c7f260a9864
class SendNotificationResultSet(ResultSet): <NEW_LINE> <INDENT> def getJSONFromString(self, str): <NEW_LINE> <INDENT> return json.loads(str) <NEW_LINE> <DEDENT> def get_Response(self): <NEW_LINE> <INDENT> return self._output.get('Response', None)
A ResultSet with methods tailored to the values returned by the SendNotification Choreo. The ResultSet object is used to retrieve the results of a Choreo execution.
62598eed30bbd722464683b1
class _NpcArrayStorage(PickleStorage): <NEW_LINE> <INDENT> extension = '.npy' <NEW_LINE> def __init__(self, directory): <NEW_LINE> <INDENT> super().__init__(directory) <NEW_LINE> self._array_except_data = {} <NEW_LINE> <DEDENT> def load(self, key): <NEW_LINE> <INDENT> if not self._opened: <NEW_LINE> <INDENT> raise Valu...
Subclass of :class:`Storage` which saves long-term data on disk with :func:`numpy.save`. This class can **only** accept :class:`~tenpy.linalg.np_conserve.Array` objects to be stored. It does so by keeping the "metadata" like charges in RAM and only stores the actual dense tensors. Parameters ---------- directory : pa...
62598eed7d847024c075ab4b
class TestRXT(unittest.TestCase): <NEW_LINE> <INDENT> def test_rxt_01(self): <NEW_LINE> <INDENT> exp = iadpython.read_rxt('./tests/data/basic-A.rxt') <NEW_LINE> self.assertAlmostEqual(exp.m_r[0], 0.299262, delta=1e-5) <NEW_LINE> self.assertAlmostEqual(exp.m_r[-1], 0.09662, delta=1e-5) <NEW_LINE> self.assertIsNone(exp.m...
RXT files data.
62598eed56b00c62f0fb1050
class dataset(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.ys = [] <NEW_LINE> self.train_batch_pointer = 0 <NEW_LINE> self.val_batch_pointer = 0 <NEW_LINE> <DEDENT> def open_dataset(self, file): <NEW_LINE> <INDENT> self.f = tables.open_file(file,'r') <NEW_LINE> self.cam = self.f.root.images <NEW_...
Data preparation for training/validation.
62598eede1aae11d1e7cdbfe
class Meta: <NEW_LINE> <INDENT> model = Order <NEW_LINE> fields = ('id', 'notes', 'meals', 'date') <NEW_LINE> read_only_fields = ['date']
Meta class to map serializer's fields with the model fields.
62598eeda219f33f346c4fb9
class Bank(abc_assessment_objects.Bank, osid_objects.OsidCatalog): <NEW_LINE> <INDENT> _namespace = 'assessment.Bank' <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> osid_objects.OsidCatalog.__init__(self, object_name='BANK', **kwargs) <NEW_LINE> <DEDENT> @utilities.arguments_not_none <NEW_LINE> def get_ba...
A bank defines a collection of assessments and items.
62598eed4428ac0f6e656ccb
class MlProjectsModelsListRequest(_messages.Message): <NEW_LINE> <INDENT> pageSize = _messages.IntegerField(1, variant=_messages.Variant.INT32) <NEW_LINE> pageToken = _messages.StringField(2) <NEW_LINE> parent = _messages.StringField(3, required=True)
A MlProjectsModelsListRequest object. Fields: pageSize: Optional. The number of models to retrieve per "page" of results. If there are more remaining results than this number, the response message will contain a valid value in the `next_page_token` field. The default value is 20, and the maximum page si...
62598eed60cbc95b06362abd
class DoubleSettingError(ValueError): <NEW_LINE> <INDENT> pass
Некоторые поля настроек пользователю может быть запрещено изменять дважды. Если он это делает, поднимается данное исключение.
62598eed009cb60464cffcce
class PypackerVlanGenerator(BaseGenerator): <NEW_LINE> <INDENT> def __next__(self): <NEW_LINE> <INDENT> current = self.value <NEW_LINE> if self.iterator >= self.count and self.count != 0: <NEW_LINE> <INDENT> self.value = self.start_value <NEW_LINE> self.iterator = 1 <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.va...
Iteration class for list of VLANs generation. Args: start_value(str): initial Vlan value increment(int): incrementation step count(int): number of iteration steps
62598eed01c39578d7f11522
class circle_layout(layout): <NEW_LINE> <INDENT> def __init__(self, graph, iterations=100): <NEW_LINE> <INDENT> layout.__init__(self, graph, iterations) <NEW_LINE> self.type = "circle" <NEW_LINE> self.r = 8 <NEW_LINE> self.c = 2 <NEW_LINE> self.a = pi/2 <NEW_LINE> <DEDENT> def _get_orbits(self): return self.c <NEW_LINE...
Simple layout with nodes arranged on one or more circles.
62598eed9c8ee8231303f519
class RepeatedValueModel(base_models.BaseModel): <NEW_LINE> <INDENT> values = datastore_services.StringProperty(repeated=True)
Subclass of BaseModel with a repeated StringProperty named 'values'.
62598eed2c8b7c6e89bd1f3f
class OCPReportDBCleanerError(Exception): <NEW_LINE> <INDENT> pass
Raise an error during OCP report cleaning.
62598eed796e427e5384cf17
class AbstractConnection(AbstractMessagingMixin, AbstractStreamingMixin, metaclass=abc.ABCMeta): <NEW_LINE> <INDENT> pass
An abstract interface for communication operations, except its lifecycle management operations which are responsible to binder and connector.
62598eeda8370b77170eeb63
class Treatment(object): <NEW_LINE> <INDENT> def __init__(self, reference=None): <NEW_LINE> <INDENT> self.reference = reference <NEW_LINE> <DEDENT> def code_with_intercept(self, levels): <NEW_LINE> <INDENT> return _dummy_code(levels) <NEW_LINE> <DEDENT> def code_without_intercept(self, levels): <NEW_LINE> <INDENT> if s...
Treatment coding (also known as dummy coding). This is the default coding. For reduced-rank coding, one level is chosen as the "reference", and its mean behaviour is represented by the intercept. Each column of the resulting matrix represents the difference between the mean of one level and this reference level. For...
62598eed56ac1b37e630096a
class NoEmailError(RuntimeError): <NEW_LINE> <INDENT> pass
Raised when an API method is called that requires a user email address, and no email is set in the current config
62598eedbe8e80087fbbd7cf
class _StandardInstanceCommand(_DeviceCommand): <NEW_LINE> <INDENT> _opcode = None <NEW_LINE> def __init__(self, device, instance): <NEW_LINE> <INDENT> if self._opcode is None: <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> self.destination = self._check_destination(device) <NEW_LINE> if not isinstan...
A standard command addressed to a control device instance.
62598eed236d856c2adc87d5
class UNet(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_dim, n_classes, depth = 4, n_filters = 16, drop_prob = 0.1, y_range = None): <NEW_LINE> <INDENT> super(UNet, self).__init__() <NEW_LINE> ds_convs = [] <NEW_LINE> for i in range(depth): <NEW_LINE> <INDENT> if i == 0: ds_convs.append(ConvBlock(in_dim, n_fil...
A U-Net for semantic segmentation.
62598eed38b623060ffa781b
class Icmp(A10BaseClass): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.ERROR_MSG = "" <NEW_LINE> self.required=[] <NEW_LINE> self.b_key = "icmp" <NEW_LINE> self.a10_url="/axapi/v3/ip/nat/icmp" <NEW_LINE> self.DeviceProxy = "" <NEW_LINE> self.respond_to_ping = "" <NEW_LINE> self.always_sour...
Class Description:: Configure NAT ICMP settings. Class icmp supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this module.` :param respond_to_ping: {"default": 0, "optional": true, "type": "number", "description": "Respond to ICMP echo requests to NAT pool IPs (d...
62598eed16aa5153ce3fec7f
class ScanConfig(_database.DatabaseAndFileDocument): <NEW_LINE> <INDENT> label = 'Configuration' <NEW_LINE> collection_name = 'scan_configuration' <NEW_LINE> db_dict = _collections.OrderedDict([ ('idn', {'field': 'id', 'dtype': int, 'not_null': True}), ('date', {'dtype': str, 'not_null': True}), ('hour', {'dtype': str,...
Read, write and stored scan configuration data.
62598eed283ffb24f3cf202f
class MainWithErrorTestCase(TestScriptRunningTestCase): <NEW_LINE> <INDENT> def test_traceback(self): <NEW_LINE> <INDENT> self.assertIn('Traceback', self.stderr)
Test how marbles.core.main and unittest.main handle test errors.
62598eed167d2b6e312b5718
class DirectoryConfLoader(ConfLoader): <NEW_LINE> <INDENT> def __init__(self, base_dir, suffix='.yaml'): <NEW_LINE> <INDENT> self.base_dir = base_dir <NEW_LINE> self.suffix = suffix <NEW_LINE> <DEDENT> def needs_reload(self, app_name, timestamps): <NEW_LINE> <INDENT> if not timestamps: <NEW_LINE> <INDENT> return True <...
Load application configurations from a directory.
62598eed627d3e7fe0e05609
class KomesManSprite(MySprite): <NEW_LINE> <INDENT> def __init__(self, tilesize): <NEW_LINE> <INDENT> super(KomesManSprite, self).__init__() <NEW_LINE> self.animations = { AnimationState.MOVE_UP: [ pygame.image.load('res/img/PacU_001.png'), pygame.image.load('res/img/PacU_002.png'), pygame.image.load('res/img/PacU_003....
KomesMan.
62598eed3539df3088ecaa31
class LessThanSMx(FuncSMx): <NEW_LINE> <INDENT> def smx_setup(self, threshold=0.5, **kwargs): <NEW_LINE> <INDENT> func = lambda x: x < threshold <NEW_LINE> super(LessThanSMx, self).smx_setup(func=func)
Stop when status < threshold
62598eed8a43f66fc4bf08f3
class ImmutableError(Exception): <NEW_LINE> <INDENT> pass
Exception raised when attempting to replace an immutable value.
62598eeda219f33f346c4fbb
class EmailAuthBackend(object): <NEW_LINE> <INDENT> def authenticate(self, request, username=None, password=None): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> user= User.objects.get(email=username) <NEW_LINE> if user.check_password(password): <NEW_LINE> <INDENT> return user <NEW_LINE> <DEDENT> return None <NEW_LINE> <...
Authenticate using email address
62598eedfff4ab517ebcbf57
class CaptureDescription(Model): <NEW_LINE> <INDENT> _validation = { 'interval_in_seconds': {'maximum': 900, 'minimum': 60}, 'size_limit_in_bytes': {'maximum': 524288000, 'minimum': 10485760}, } <NEW_LINE> _attribute_map = { 'enabled': {'key': 'enabled', 'type': 'bool'}, 'encoding': {'key': 'encoding', 'type': 'Encodin...
Properties to configure capture description for eventhub. :param enabled: A value that indicates whether capture description is enabled. :type enabled: bool :param encoding: Enumerates the possible values for the encoding format of capture description. Possible values include: 'Avro', 'AvroDeflate' :type encoding: s...
62598eedbe7bc26dc9251222
class SrcExplicit(TestSystem): <NEW_LINE> <INDENT> def __init__(self, nonbondedMethod=app.PME): <NEW_LINE> <INDENT> system_xml_filename = get_data_filename("data/src-explicit/system.xml") <NEW_LINE> state_xml_filename = get_data_filename("data/src-explicit/state.xml") <NEW_LINE> infile = open(system_xml_filename, 'r') ...
Src kinase (AMBER 99sb-ildn) in explicit TIP3P solvent. Parameters ---------- nonbondedMethod : simtk.openmm.app nonbonded method, optional, default=app.PME Sets the nonbonded method to use for the water box (CutoffPeriodic, app.Ewald, app.PME). Examples -------- >>> src = SrcExplicit() >>> system, positions = src...
62598eeddc8b845886d51d44
class ParallelTestRunnerTest(SimpleTestCase): <NEW_LINE> <INDENT> def test_subtest(self): <NEW_LINE> <INDENT> for i in range(2): <NEW_LINE> <INDENT> with self.subTest(index=i): <NEW_LINE> <INDENT> self.assertEqual(i, i)
End-to-end tests of the parallel test runner. These tests are only meaningful when running tests in parallel using the --parallel option, though it doesn't hurt to run them not in parallel.
62598eed99cbb53fe682f62d
class BaseLogger(object): <NEW_LINE> <INDENT> def __init__(self, logLevel=logging.INFO, filename="baselog.log", logFormat="%(levelname)s:%(message)s"): <NEW_LINE> <INDENT> basename = os.path.basename(filename) <NEW_LINE> self.logLevel = logLevel <NEW_LINE> self.filename = filename <NEW_LINE> self.logFormat = logFormat ...
base class inherited by other loggers
62598eed38b623060ffa781d
class LocalBookingDialog(QtWidgets.QDialog): <NEW_LINE> <INDENT> def __init__(self, target, parent=None): <NEW_LINE> <INDENT> QtWidgets.QDialog.__init__(self, parent) <NEW_LINE> QtWidgets.QVBoxLayout(self) <NEW_LINE> btn_layout = QtWidgets.QHBoxLayout() <NEW_LINE> self.setWindowTitle("Assign Local Cores") <NEW_LINE> se...
A dialog to wrap a LocalBookingWidget. Provides action buttons.
62598eedbe383301e0251f5a
class NamcoPulse50WaveGenerator(NamcoWaveGenerator): <NEW_LINE> <INDENT> def __init__(self, variance=5): <NEW_LINE> <INDENT> self.wave_position = 0 <NEW_LINE> self.variance = variance <NEW_LINE> super().__init__() <NEW_LINE> <DEDENT> def getBaseRepresentation(self): <NEW_LINE> <INDENT> return [0 for i in range(16)] + [...
Generate a new N163 waveform that is structurally similar to that of a 50% pulse wave, with a given hint of variance. Extends the NamcoWaveGenerator class.
62598eed460517430c430c09
class MunicipioAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('estado', 'municipio') <NEW_LINE> list_filter = ['municipio'] <NEW_LINE> search_fields = ['estado', 'municipio']
:param list_display: Muesta el str de los campos en la vista lista :param list_filter: Crea un campo para filtrar y le decimos en que campo :param search_fields: Crea un campo para busqueda directa especificando cuales campos
62598eed92d797404e387f3b
class Flag(Enum): <NEW_LINE> <INDENT> VERBOSE = 'verbose' <NEW_LINE> QUIET = 'quiet' <NEW_LINE> COLOR = 'color' <NEW_LINE> SAFEMODE = 'safemode'
Execution flag identifiers.
62598eed283ffb24f3cf2031
class ComplexConjugateNode(Node): <NEW_LINE> <INDENT> _fields = ['complex_node'] <NEW_LINE> def __init__(self, complex_node, **kwargs): <NEW_LINE> <INDENT> super(ComplexConjugateNode, self).__init__(**kwargs) <NEW_LINE> self.complex_node = complex_node
mycomplex.conjugate()
62598eed56ac1b37e630096d
class DeviceTestStepBase(TestStepBase): <NEW_LINE> <INDENT> def __init__(self, tc_conf, global_conf, ts_conf, factory): <NEW_LINE> <INDENT> TestStepBase.__init__(self, tc_conf, global_conf, ts_conf, factory) <NEW_LINE> self._device = self._factory.create_device(self._pars.device) <NEW_LINE> self._config = self._factory...
Implements a base test step which involves a device. .. uml:: class TestStepBase class DeviceTestStepBase { run(context) } TestStepBase <|- DeviceTestStepBase
62598eed7c178a314d78bc16
class StringBuilder(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.string = [] <NEW_LINE> <DEDENT> def append(self, string): <NEW_LINE> <INDENT> if string: <NEW_LINE> <INDENT> self.string.append(string) <NEW_LINE> <DEDENT> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return ''.join(self.st...
Builds string parts together acting like Java/.NET StringBuilder
62598eed167d2b6e312b571a
class BiodiversityGain(Biodiversity): <NEW_LINE> <INDENT> offset = models.ForeignKey(Offset, help_text="The relevant offset, should only link to offsets of type 'hectares'.")
Every time a development occurs there is a loss of biodiversity. Sometimes this biodiversity loss is reflected in the offset, sometimes not. This table will store the each piece of biodiversity lost for a development footprint.
62598eedeab8aa0e5d30a4fd
class DocumentUserStatusResponse: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swaggerTypes = { 'result': 'DocumentUserStatusResult', 'status': 'str', 'error_message': 'str' } <NEW_LINE> self.result = None <NEW_LINE> self.status = None <NEW_LINE> self.error_message = None
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598eed10dbd63aa1c6f2f8
class InputError(Exception): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return repr(self.value)
For throwing exceptions from the input module
62598eedd7e4931a7ef3a821
class Exploit(exploits.Exploit): <NEW_LINE> <INDENT> __info__ = { 'name': 'Shuttle 915 WM DNS Change', 'description': 'Module exploits Shuttle Tech ADSL Modem-Router 915 WM dns change vulnerability.' 'If the target is vulnerable it is possible to change dns settings.', 'authors': [ 'Todor Donev <todor.doven[at]gmail.co...
Exploit implementation for Shuttle Tech ADSL Modem-Router 915 WM DNS Change vulnerability. If the target is vulnerable it possible to change dns settings"
62598eedd486a94d0ba2a74e
class Salmon(Fish): <NEW_LINE> <INDENT> pass
description
62598eed5fdd1c0f98e5c722
class GeneralFeedbackForm(forms.Form): <NEW_LINE> <INDENT> comment = forms.CharField(widget=forms.Textarea(attrs={'cols':'64'}), required=False)
Form for general feedback
62598eedff9c53063f518de6
class Rule2(object): <NEW_LINE> <INDENT> def disambiguate(self, word): <NEW_LINE> <INDENT> matches = re.match(r'^ber([bcdfghjklmnpqrstvwxyz])([a-z])(.*)', word) <NEW_LINE> if matches: <NEW_LINE> <INDENT> if re.match(r'^er(.*)$', matches.group(3)): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> return matches.group(1) +...
Disambiguate Prefix Rule 2 Rule 2 : berCAP -> ber-CAP where C != 'r' AND P != 'er'
62598eed4f6381625f19887c
class SetObserver(metaclass=abc.ABCMeta): <NEW_LINE> <INDENT> @abc.abstractmethod <NEW_LINE> def element_added(self, elem) -> None: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def element_removed(self, elem) -> None: <NEW_LINE> <INDENT> pass
An interface that defines those methods that observers of :class:`reldata.util.observable_set.ObservableSet`s and :class:`reldata.util.ordered_set.OrderedSet`s, respectively, have to implement.
62598eed6e29344779afedb8
class LBADL(chainer.Chain): <NEW_LINE> <INDENT> def __init__(self, n_class: int, med_dim: int=1024, drop_rate: float=0.5): <NEW_LINE> <INDENT> super(LBADL, self).__init__() <NEW_LINE> with self.init_scope(): <NEW_LINE> <INDENT> self.med_fc = links.Linear( None, med_dim, initialW=initializers.Normal(scale=0.01)) <NEW_LI...
Chain to feed output of Extractor to FC => BN => ReLU => DO => FC.
62598eedcc40096d61619599
class Tips(Base): <NEW_LINE> <INDENT> __tablename__ = 'tips' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> name = Column(String(32))
docstring for Tips
62598eedb7558d5895461dc8
class ActiveWindow(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.window_id = None <NEW_LINE> self.detect() <NEW_LINE> <DEDENT> def detect(self): <NEW_LINE> <INDENT> active_window = check_output(('xprop', '-root', '_NET_ACTIVE_WINDOW')) <NEW_LINE> self.window_id = active_window.split(' ')[-1]...
Information about the active/focused window.
62598eed2c8b7c6e89bd1f43
class MoreLikeThisError(SanjabError): <NEW_LINE> <INDENT> pass
Raised when a model instance has not been provided for More Like This.
62598eedbe7bc26dc9251223
class SubmitJobView(View): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def render_page(request, form=None): <NEW_LINE> <INDENT> log = logging.getLogger(__name__) <NEW_LINE> log.debug("Enter") <NEW_LINE> try: <NEW_LINE> <INDENT> categories = Category.get_current() <NEW_LINE> <DEDENT> except ObjectDoesNotExist: <NEW_LIN...
Views to process the submitting form.
62598eed8e7ae83300ee7812
class Dataviews(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.client = pymongo.MongoClient(host=HOST, port=PORT) <NEW_LINE> self.db = self.client[MONGO_DB] <NEW_LINE> self.collection = self.db[MONGO_COLLECTION] <NEW_LINE> self.collection_own= self.db[MONGO_COLLECTION_OWN] <NEW_LINE> <DEDENT> def g...
数据可视化
62598eed091ae3566870339a
class IsNoneNode(Node, ArmLogicTreeNode): <NEW_LINE> <INDENT> bl_idname = 'LNIsNoneNode' <NEW_LINE> bl_label = 'Is None' <NEW_LINE> bl_icon = 'CURVE_PATH' <NEW_LINE> def init(self, context): <NEW_LINE> <INDENT> self.inputs.new('ArmNodeSocketAction', 'In') <NEW_LINE> self.inputs.new('NodeSocketShader', 'Value') <NEW_LIN...
Is none node
62598eed38b623060ffa781f
class MinimaxAgent(MultiAgentSearchAgent): <NEW_LINE> <INDENT> def getAction(self, gameState): <NEW_LINE> <INDENT> agents = gameState.getNumAgents() <NEW_LINE> depth = agents * self.depth <NEW_LINE> def minimax(gameState, depth, agent): <NEW_LINE> <INDENT> legalActions = gameState.getLegalActions(agent) <NEW_LINE> if d...
Your minimax agent (question 2)
62598eed236d856c2adc87d7
class TestComputeStatsPerIEB(TestCase): <NEW_LINE> <INDENT> def test_complex(self): <NEW_LINE> <INDENT> observed = compute_stats_per_ieb(BED3_TRUE, BED3_PRED, 2) <NEW_LINE> print(observed.values.tolist()) <NEW_LINE> print(STATS_PER_IEB.values.tolist()) <NEW_LINE> self.assertTrue(observed.equals(STATS_PER_IEB))
Tests for exfi.compare.compute_stats_per_ieb
62598eeddd821e528d6d76c2
@override_settings(STATICFILES_STORAGE='django.contrib.staticfiles.storage.StaticFilesStorage') <NEW_LINE> class HomepageTestCase(ViewTestMixin, TestCase): <NEW_LINE> <INDENT> def test_render_homepage(self): <NEW_LINE> <INDENT> with self.assertTemplateUsed('home.html'): <NEW_LINE> <INDENT> response = self.client.get(re...
Homepage view.
62598eeda8370b77170eeb68
class PostQuestion(BaseScreen): <NEW_LINE> <INDENT> def __init__(self, db_manager, user_id): <NEW_LINE> <INDENT> self.user_id = user_id <NEW_LINE> BaseScreen.__init__(self, db_manager=db_manager) <NEW_LINE> <DEDENT> def _setup(self): <NEW_LINE> <INDENT> print('POST QUESTION') <NEW_LINE> <DEDENT> def run(self): <NEW_LIN...
Class representing the post question screen. Allows the user to post a question which will be added to the database.
62598eed283ffb24f3cf2033
class RequireCaptcha(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_captcha(reddit_session, captcha_id): <NEW_LINE> <INDENT> url = urljoin(reddit_session.config['captcha'], captcha_id + '.png') <NEW_LINE> sys.stdout.write('Captcha URL: %s\nCaptcha: ' % url) <NEW_LINE> sys.stdout.flush() <NEW_LINE> captch...
Decorator for methods that require captchas.
62598eed5fc7496912d47634
class HbPath(object): <NEW_LINE> <INDENT> def __init__(self, n): <NEW_LINE> <INDENT> self.n = n <NEW_LINE> <DEDENT> def square(self): <NEW_LINE> <INDENT> return self.n * self.n
classdocs
62598eed92d797404e387f3c
class Startup(Base): <NEW_LINE> <INDENT> __tablename__ = 'startups' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> name = Column(String, nullable=False) <NEW_LINE> location = Column(String, nullable=False) <NEW_LINE> popularity = Column(Integer, nullable=False) <NEW_LINE> market = Column(String, nullable=...
Startup is a class representing a startup
62598eedaad79263cf42cf8f
class Settings(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.screen_width = 1200 <NEW_LINE> self.screen_height = 800 <NEW_LINE> self.bg_color = (230, 230, 230) <NEW_LINE> self.ship_limit = 3 <NEW_LINE> self.bullet_width = 3 <NEW_LINE> self.bullet_height = 15 <NEW_LINE> self.bullet_color = 60, 60, ...
存储所有设置的类
62598eed4a966d76dd5ed65e
class Linear(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.output = None <NEW_LINE> <DEDENT> def outputs(self, input): <NEW_LINE> <INDENT> return input <NEW_LINE> <DEDENT> def back_propagate(self, grad): <NEW_LINE> <INDENT> return grad
Linear activation function
62598eed91f36d47f2230265