code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class ScaredyCat: <NEW_LINE> <INDENT> pass
An entity that runs away from the player
62599093099cdd3c6367628f
class Hardtanh(Module): <NEW_LINE> <INDENT> def __init__(self, min_value=-1, max_value=1, inplace=False): <NEW_LINE> <INDENT> super(Hardtanh, self).__init__() <NEW_LINE> self.min_val = min_value <NEW_LINE> self.max_val = max_value <NEW_LINE> self.inplace = inplace <NEW_LINE> assert self.max_val > self.min_val <NEW_LINE...
Applies the HardTanh function element-wise HardTanh is defined as:: f(x) = +1, if x > 1 f(x) = -1, if x < -1 f(x) = x, otherwise The range of the linear region :math:`[-1, 1]` can be adjusted Args: min_value: minimum value of the linear region range max_value: maximum value of the linear regio...
62599093283ffb24f3cf55cc
class MarcoProcessor(DataProcessor): <NEW_LINE> <INDENT> def get_train_examples(self, data_dir): <NEW_LINE> <INDENT> logger.info("LOOKING AT {}".format(os.path.join(data_dir, "triples.small.train.tsv"))) <NEW_LINE> return self._create_examples( self._read_tsv(os.path.join(data_dir, "triples.small.train.leave5k.tsv")), ...
Processor for the MRPC data set (GLUE version).
6259909360cbc95b06365bfe
class NotAllowed(ApiRequestError): <NEW_LINE> <INDENT> pass
12 - You're not allowed to do that
62599093091ae35668706960
class RoundedRectangle(clutter.Actor): <NEW_LINE> <INDENT> __gtype_name__ = 'RoundedRectangle' <NEW_LINE> def __init__(self, width, height, arc, step, color=None, border_color=None, border_width=0): <NEW_LINE> <INDENT> super(RoundedRectangle, self).__init__() <NEW_LINE> self._width = width <NEW_LINE> self._height = hei...
Custom actor used to draw a rectangle that can have rounded corners
6259909350812a4eaa621a5d
class GhettoBitStream(object): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> self.bytes = deque(bytearray(data)) <NEW_LINE> self._bit_buffer = deque() <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def __next__(self): <NEW_LINE> <INDENT> if not self._bit_...
Accepts binary data and makes it available as a stream of bits or one byte at a time. Python does not provide a built-in way to read a stream of bits, or a way to represent a single bit. Thus, this class uses character '0' or '1' to represent the status of each bit. Data is converted into the '0' and '1' characters on...
62599093be7bc26dc9252cec
class IPv4AddressAnalyzer(RegexAnalyzer): <NEW_LINE> <INDENT> name = "IPv4AddressAnalyzer" <NEW_LINE> def __init__(self, actions): <NEW_LINE> <INDENT> regex = r"\b\d{1,3}(?:\.\d{1,3}){3}\b" <NEW_LINE> super().__init__(actions, regex) <NEW_LINE> <DEDENT> def verify(self, results): <NEW_LINE> <INDENT> verified_ips = [] <...
Analyzer to match on ip addresses via regex
625990935fdd1c0f98e5fca5
class EquidistantPositionParamDef(PositionParamDef): <NEW_LINE> <INDENT> def __init__(self, values): <NEW_LINE> <INDENT> positions = [] <NEW_LINE> for i, v in enumerate(values): <NEW_LINE> <INDENT> pos = float(i)/(len(values)-1) <NEW_LINE> positions.append(pos) <NEW_LINE> <DEDENT> super(EquidistantPositionParamDef, sel...
Extension of PositionParamDef, in which the position of each value is equidistant from its neighbours and their order is determined by their order in values.
625990933617ad0b5ee07e83
@skip('Not implemented') <NEW_LINE> class TestClark1987SingleComplex(Clark1987): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setup_class(cls): <NEW_LINE> <INDENT> super(TestClark1987SingleComplex, cls).setup_class( dtype=np.complex64, conserve_memory=0 ) <NEW_LINE> cls.results = cls.run_filter()
Basic single precision complex test for the loglikelihood and filtered states.
62599093adb09d7d5dc0c28c
class AverageMeter(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.reset() <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT> self.sum = 0 <NEW_LINE> self.count = 0 <NEW_LINE> <DEDENT> def update(self, val, n=1): <NEW_LINE> <INDENT> self.sum += val * n <NEW_LINE> self.count += n <NEW_LIN...
Computes and stores the average and current value
62599093bf627c535bcb3207
class ITask(object): <NEW_LINE> <INDENT> def get_storage(self): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def create_job(self): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def finish(self): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def is_finis...
Interface for Task.
62599093283ffb24f3cf55d3
class ReaderSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> url = serializers.HyperlinkedIdentityField(view_name="account:reader-detail") <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Reader <NEW_LINE> fields = ('id', 'email', 'password', 'first_name', 'last_name', 'img', 'liked_posts', 'subscribed_ca...
Reader serializer to create, retrieve a reader and get list of readers
62599093656771135c48aeca
class WildFire(poc_grid.Grid): <NEW_LINE> <INDENT> def __init__(self, grid_height, grid_width, queue = poc_queue.Queue()): <NEW_LINE> <INDENT> poc_grid.Grid.__init__(self, grid_height, grid_width) <NEW_LINE> self._fire_boundary = queue <NEW_LINE> <DEDENT> def clear(self): <NEW_LINE> <INDENT> poc_grid.Grid.clear(self) <...
Class that models a burning wild fire using a grid and a queue The grid stores whether a cell is burned (FULL) or unburned (EMPTY) The queue stores the cells on the boundary of the fire
62599093d8ef3951e32c8cf6
class CreditOrgAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('id', 'name', 'username') <NEW_LINE> readonly_fields = ('id',) <NEW_LINE> raw_id_fields = ('username',) <NEW_LINE> list_filter = ('name', 'username') <NEW_LINE> search_fields = ('id', 'name', 'username',)
Кастомизация представления в административной панели, модели кредитных организаций.
6259909355399d3f05628247
class CABWrapperOnlyDependencyOutputterConfiguration(EPMWrapperOnlyDependencyFilterConfiguration, CABDependencyOutputterConfiguration): <NEW_LINE> <INDENT> pass
>>> PhysicalModuleTypes.names(CABInterfaceOnlyDependencyOutputterConfiguration.skip_module_types_as_source) ...
62599093be7bc26dc9252cef
class ExecuteUpdateWorkflowLUser: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.log_event = models.Log.WORKFLOW_UPDATE_LUSERS <NEW_LINE> <DEDENT> def execute_operation( self, user, workflow: Optional[models.Workflow] = None, action: Optional[models.Action] = None, payloa...
Update the LUSER field in a workflow.
62599093dc8b845886d552ee
class Cutoff: <NEW_LINE> <INDENT> def get_mask(self, grid): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def get_modes_number(self, grid): <NEW_LINE> <INDENT> raise NotImplementedError
The base class for mode cutoffs.
62599093283ffb24f3cf55d6
class DeleteMixin(BaseMixin): <NEW_LINE> <INDENT> def delete(self, params, meta, **kwargs): <NEW_LINE> <INDENT> raise NotImplementedError("delete method not implemented") <NEW_LINE> <DEDENT> def on_delete(self, req, resp, handler=None, **kwargs): <NEW_LINE> <INDENT> self.handle( handler or self.delete, req, resp, **kwa...
Add default "delete flow on DELETE" to any resource class.
6259909350812a4eaa621a62
class SimpsonIntegrator3PtTestCases(unittest.TestCase, IntegratorCommonTestCases): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.num_nodes = 7 <NEW_LINE> self.integrator = 'simpson' <NEW_LINE> super(SimpsonIntegrator3PtTestCases, self).__init__(*args, **kwargs)
Only run the common test cases using second order accuracy because it cannot differentiate the quartic accurately
6259909460cbc95b06365c04
class IS_AXI: <NEW_LINE> <INDENT> s = struct.Struct('3Bx2BH31sx') <NEW_LINE> def __init__(self, ReqI=0, AXStart=0, NumCP=0, NumO=0, LName=''): <NEW_LINE> <INDENT> self.Size = 40 <NEW_LINE> self.Type = ISP_AXI <NEW_LINE> self.ReqI = ReqI <NEW_LINE> self.AXStart = AXStart <NEW_LINE> self.NumCP = NumCP <NEW_LINE> self.Num...
AutoX Info
62599094dc8b845886d552f2
class ConnectionState(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'status': {'key': 'status', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(ConnectionState, self).__init__(**kwargs) <NEW_LINE> self.sta...
ConnectionState information. :param status: Status of the connection. Possible values include: "Pending", "Approved", "Rejected", "Disconnected". :type status: str or ~azure.mgmt.eventhub.v2021_06_01_preview.models.PrivateLinkConnectionStatus :param description: Description of the connection state. :type description...
62599094f9cc0f698b1c6168
class Upkeep(Turn): <NEW_LINE> <INDENT> @argtypes(Turn, Player) <NEW_LINE> def __init__(self, player): <NEW_LINE> <INDENT> Turn.__init__(player) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "Upkeep phase signal"
This class serves to signal the upkeep step of a player's turn
62599094adb09d7d5dc0c294
class _UserFilterBasedTrigger(FilterBasedTrigger): <NEW_LINE> <INDENT> def __init__(self, nickname: str = None, user_id: int = None, username: str = None): <NEW_LINE> <INDENT> if nickname is not None: <NEW_LINE> <INDENT> super().__init__(Filters.user(DEFAULT_USERS_HELPER.get_user_id_by_nickname(nickname))) <NEW_LINE> <...
A user filter trigger. This is used to trigger a rule when an incoming message comes from a specific user.
62599094ad47b63b2c5a9581
class toneAnalyserService(object): <NEW_LINE> <INDENT> def importarSentimentos(self): <NEW_LINE> <INDENT> instaRepository = instagramRepository() <NEW_LINE> ibmTone = ibmWebService() <NEW_LINE> listaTags = instaRepository.consultarTudo() <NEW_LINE> for tagInsta in listaTags: <NEW_LINE> <INDENT> tagInsta.sentimento = ib...
description of class
62599094091ae3566870696e
class Sky2Pix_ZenithalPerspective(Sky2PixProjection, Zenithal): <NEW_LINE> <INDENT> mu = Parameter(default=0.0) <NEW_LINE> gamma = Parameter(default=0.0, getter=np.rad2deg, setter=np.deg2rad) <NEW_LINE> @mu.validator <NEW_LINE> def mu(self, value): <NEW_LINE> <INDENT> if np.any(value == -1): <NEW_LINE> <INDENT> raise I...
Zenithal perspective projection - sky to pixel. Corresponds to the ``AZP`` projection in FITS WCS. .. math:: x &= R \sin \phi \\ y &= -R \sec \gamma \cos \theta where: .. math:: R = \frac{180^{\circ}}{\pi} \frac{(\mu + 1) \cos \theta}{(\mu + \sin \theta) + \cos \theta \cos \phi \tan \gamma} Parameters ...
6259909450812a4eaa621a64
class TestCredentials(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.new_credential = Credentials("intagram","pass123") <NEW_LINE> <DEDENT> def test_init(self): <NEW_LINE> <INDENT> self.assertEqual(self.new_credential.account_name,"facebook") <NEW_LINE> self.assertEqual(self.new_crede...
test for Credential
62599094f9cc0f698b1c6169
class ListOrderException(Exception): <NEW_LINE> <INDENT> def __init__(self, msg: str) -> None: <NEW_LINE> <INDENT> self.message = str(msg) <NEW_LINE> <DEDENT> def __str__(self) -> str: <NEW_LINE> <INDENT> return self.message
Should be raised, if the ordering of a list is wrong (e.g. min values in an extent list after max...) :param msg: detailed error message
62599094283ffb24f3cf55dc
class UOWEventHandler(interfaces.AttributeExtension): <NEW_LINE> <INDENT> active_history = False <NEW_LINE> def __init__(self, key): <NEW_LINE> <INDENT> self.key = key <NEW_LINE> <DEDENT> def append(self, state, item, initiator): <NEW_LINE> <INDENT> sess = _state_session(state) <NEW_LINE> if sess: <NEW_LINE> <INDENT> p...
An event handler added to all relation attributes which handles session cascade operations.
62599094dc8b845886d552f6
class PickBestHarness(RestCommand): <NEW_LINE> <INDENT> def __init__(self, files, *args, **kwargs): <NEW_LINE> <INDENT> super(PickBestHarness, self).__init__(*args, **kwargs) <NEW_LINE> self.files = files <NEW_LINE> <DEDENT> def setup(self): <NEW_LINE> <INDENT> mapping = Options() <NEW_LINE> for yaml_file in self.files...
Given a list of harness definition files, pick the one that's the most "available". Assumes files are in YAML format. @rtype: dict
62599094ad47b63b2c5a9583
class ItemAlign(BaseAlign): <NEW_LINE> <INDENT> def align_inner(self, source, target) -> dict: <NEW_LINE> <INDENT> source = str(source) <NEW_LINE> target = str(target) <NEW_LINE> translation = {} <NEW_LINE> if Path(source).is_file() and Path(target).is_file(): <NEW_LINE> <INDENT> translation = FileAlign().align(source,...
从 IterAlign 调用,检查 item 是文件或路径
625990943617ad0b5ee07e91
class TestDecorators(unittest.TestCase): <NEW_LINE> <INDENT> def test_json_decorator(self): <NEW_LINE> <INDENT> method_input = {"a": 1, "b": 2} <NEW_LINE> expected = json.dumps(method_input) <NEW_LINE> response = _my_test_func(method_input, 200) <NEW_LINE> self.assertEquals(expected, response.data) <NEW_LINE> self.asse...
Decorators unit tests
62599094d8ef3951e32c8cfc
class PreferencesDialog(gaupol.BuilderDialog): <NEW_LINE> <INDENT> _widgets = ("notebook",) <NEW_LINE> def __init__(self, parent, application): <NEW_LINE> <INDENT> gaupol.BuilderDialog.__init__(self, "preferences-dialog.ui", connect_signals=False) <NEW_LINE> self._editor_page = EditorPage(self, application) <NEW_LINE> ...
Dialog for editing preferences.
625990947cff6e4e811b7782
class StoreLocation(glance.store.location.StoreLocation): <NEW_LINE> <INDENT> def process_specs(self): <NEW_LINE> <INDENT> self.scheme = self.specs.get('scheme', STORE_SCHEME) <NEW_LINE> self.server_host = self.specs.get('server_host') <NEW_LINE> self.path = os.path.join(DS_URL_PREFIX, self.specs.get('image_dir').strip...
Class describing an VMware URI. An VMware URI can look like any of the following: vsphere://server_host/folder/file_path?dcPath=dc_path&dsName=ds_name
62599094f9cc0f698b1c616b
@cached_class <NEW_LINE> class MaterialsProjectCompatibility(Compatibility): <NEW_LINE> <INDENT> def __init__(self, compat_type="Advanced", correct_peroxide=True, check_potcar_hash=False): <NEW_LINE> <INDENT> module_dir = os.path.dirname(os.path.abspath(__file__)) <NEW_LINE> fp = os.path.join(module_dir, "MPCompatibili...
This class implements the GGA/GGA+U mixing scheme, which allows mixing of entries. Note that this should only be used for VASP calculations using the MaterialsProject parameters (see pymatgen.io.vaspio_set.MPVaspInputSet). Using this compatibility scheme on runs with different parameters is not valid. Args: compat...
625990943617ad0b5ee07e93
class Invite(SlottedModel): <NEW_LINE> <INDENT> code = Field(str) <NEW_LINE> inviter = Field(User) <NEW_LINE> guild = Field(Guild) <NEW_LINE> channel = Field(Channel) <NEW_LINE> max_age = Field(int) <NEW_LINE> max_uses = Field(int) <NEW_LINE> uses = Field(int) <NEW_LINE> temporary = Field(bool) <NEW_LINE> created_at = ...
An invite object. Attributes ---------- code : str The invite code. inviter : :class:`disco.types.user.User` The user who created this invite. guild : :class:`disco.types.guild.Guild` The guild this invite is for. channel : :class:`disco.types.channel.Channel` The channel this invite is for. max_age : ...
62599094d8ef3951e32c8cfd
class Product(models.Model): <NEW_LINE> <INDENT> _inherit = "product.product" <NEW_LINE> @api.multi <NEW_LINE> def write(self, vals): <NEW_LINE> <INDENT> res = super(Product, self).write(vals) <NEW_LINE> if 'default_code' not in vals or not res: <NEW_LINE> <INDENT> return res <NEW_LINE> <DEDENT> templates = [p.product_...
All variants of same product without any code get the same reference number.
62599094be7bc26dc9252cf6
class Matyas(Benchmark): <NEW_LINE> <INDENT> def __init__(self, dimensions=2): <NEW_LINE> <INDENT> Benchmark.__init__(self, dimensions) <NEW_LINE> self.bounds = list(zip([-10.0] * self.dimensions, [ 10.0] * self.dimensions)) <NEW_LINE> self.global_optimum = [0.0] * self.dimensions <NEW_LINE> self.fglob = 0.0 <NEW_LINE...
Matyas test objective function. This class defines the Matyas global optimization problem. This is a multimodal minimization problem defined as follows: .. math:: f_{\text{Matyas}}(\mathbf{x}) = 0.26(x_1^2 + x_2^2) - 0.48x_1x_2 Here, :math:`n` represents the number of dimensions and :math:`x_i \in [-10, 10]` ...
62599094283ffb24f3cf55e4
class BaseTestCase(TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(self): <NEW_LINE> <INDENT> cmds.file(new=True, force=True) <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> cmds.file(new=True, force=True)
Base Class for all unittests.
6259909460cbc95b06365c0a
class ServerExistsError(Exception): <NEW_LINE> <INDENT> pass
Is been raised when the port where the server tried to connect is already in use.
625990945fdd1c0f98e5fcbb
class Watcher(object): <NEW_LINE> <INDENT> def __init__(self, fd, event): <NEW_LINE> <INDENT> self._fd = fd <NEW_LINE> self._event = tornado.ioloop.IOLoop.READ if event == 1 else tornado.ioloop.IOLoop.WRITE <NEW_LINE> self._greenlet = greenlet.getcurrent() <NEW_LINE> self._parent = self._greenlet.parent <NEW_LINE> self...
这里传递过来的都是一些就绪的事件 watcher 用来替换 libev 中的 watcher 直接实例化一个 Watcher(fd, event) 对象,可以替换 greenify.pyx.wait_gevent 中的 hub.loop.io(fd, event)
62599094adb09d7d5dc0c2a0
class Dict(dict): <NEW_LINE> <INDENT> def __init__(self, **kw): <NEW_LINE> <INDENT> super(Dict, self).__init__(**kw) <NEW_LINE> <DEDENT> def __getattr__(self, key): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return self[key] <NEW_LINE> <DEDENT> except KeyError: <NEW_LINE> <INDENT> raise AttributeError(r"'Dict' object...
Simple dict but also support access as x.y style >>>d1=Dict() >>>d1['x']=100 >>>d1.x 100 >>>d1.y=200 >>>d1['y'] 200 >>>d2=Dict(a=1,b=2,c='3') >>>d2.c '3' >>>d2['empty'] Traceback (most recent call last ): ... KeyError:'empty' >>>d2.empty Traceback (most recent call last): ... AttributeError:'Dict' object has no attrbu...
62599094099cdd3c6367629d
class HuffmanTree(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.nodes = [] <NEW_LINE> self.head = None <NEW_LINE> self.dict = {} <NEW_LINE> self.reversed_dict = {} <NEW_LINE> <DEDENT> def add_text(self, text): <NEW_LINE> <INDENT> count = Counter(list(text)) <NEW_LINE> for key in count: <NEW_LINE> ...
Classe com a Árvore de Huffman attr: nodes(Node[]): lista de nós head(Node): nó raíz dict(dict): dicionário com os códigos reversed_dict(dict): dicionário invertido
625990943617ad0b5ee07e99
class TestContainerStartAPIView(TestContainerCreationMixin, TestAPIViewsBase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super().setUp() <NEW_LINE> self.create_one_container() <NEW_LINE> self.create_fake_uuid() <NEW_LINE> <DEDENT> @patch("containers.tasks.container_task.apply_async") <NEW_LINE> def test_...
Tests for ``ContainerStartAPIView``.
625990947cff6e4e811b778a
class GpDescribeField(CoClass): <NEW_LINE> <INDENT> _reg_clsid_ = GUID('{540B9C6B-D49F-4218-B206-67789E19BE07}') <NEW_LINE> _idlflags_ = [] <NEW_LINE> _typelib_path_ = typelib_path <NEW_LINE> _reg_typelib_ = ('{C031A050-82C6-4F8F-8836-5692631CFFE6}', 10, 2)
Geoprocessing DescribeField object.
62599094091ae3566870697c
class TreatedPatient(Patient): <NEW_LINE> <INDENT> def __init__(self, viruses, maxPop): <NEW_LINE> <INDENT> Patient.__init__(self, viruses, maxPop) <NEW_LINE> self.activeDrugs = [] <NEW_LINE> <DEDENT> def addPrescription(self, newDrug): <NEW_LINE> <INDENT> if newDrug not in self.activeDrugs: <NEW_LINE> <INDENT> self.ac...
Representation of a patient. The patient is able to take drugs and his/her virus population can acquire resistance to the drugs he/she takes.
625990943617ad0b5ee07e9b
class ITB(FBOTableEntry): <NEW_LINE> <INDENT> def migrations(self): <NEW_LINE> <INDENT> return (("015_%s_table.sql" % self.record_type, self.sql_table(), "DROP TABLE %s;" % self.record_type),)
Model of a ITB (Invitation To Bid)
62599094adb09d7d5dc0c2a4
class DataSourceManager(object): <NEW_LINE> <INDENT> _domDocument = None <NEW_LINE> def __init__(self, domDocument): <NEW_LINE> <INDENT> self._domDocument = domDocument <NEW_LINE> <DEDENT> def getDataSourceByName(self,stringName): <NEW_LINE> <INDENT> tabDataSourceElement = self._domDocument.getElementsByTagName("data-s...
Create XML conf for sgoa project
62599094d8ef3951e32c8d02
class ActorItem(ClassifierItem): <NEW_LINE> <INDENT> __uml__ = UML.Actor <NEW_LINE> HEAD = 11 <NEW_LINE> ARM = 19 <NEW_LINE> NECK = 10 <NEW_LINE> BODY = 20 <NEW_LINE> __style__ = { 'min-size': (ARM * 2, HEAD + NECK + BODY + ARM), 'name-align': (ALIGN_CENTER, ALIGN_BOTTOM), 'name-padding': (5, 0, 5, 0), 'name-outside':...
Actor item is a classifier in icon mode. Maybe it should be possible to switch to comparment mode in the future.
625990945fdd1c0f98e5fcc1
class DiscData(object): <NEW_LINE> <INDENT> def __init__(self, parent=None, accessible=None, tolink=None): <NEW_LINE> <INDENT> self._accessible = accessible or [] <NEW_LINE> self.parent = parent <NEW_LINE> self._link = None <NEW_LINE> self._tolink = tolink or [] <NEW_LINE> <DEDENT> def accessible(self): <NEW_LINE> <IND...
Natural reading order decoding: incremental building of tree in order of text (one edu at a time) Basic discourse data for a state: chosen links between edus at that stage + right-frontier state. To save space, only new links are stored. the complete solution will be built with backpointers via the parent field RF: r...
62599094be7bc26dc9252cfb
class OrgsorgidprojectsprojectidbuildtargetsCredentialsSigning(object): <NEW_LINE> <INDENT> swagger_types = { 'credentialid': 'str', 'credential_resource_ref': 'OrgsorgidprojectsprojectidbuildtargetsCredentialsSigningCredentialResourceRef' } <NEW_LINE> attribute_map = { 'credentialid': 'credentialid', 'credential_resou...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62599094d8ef3951e32c8d03
class JSONEncodedError(Exception): <NEW_LINE> <INDENT> @property <NEW_LINE> def data(self): <NEW_LINE> <INDENT> return self.args[0]
An error that can be encoded in JSON and should be the return value for an RPC method failure mode.
625990947cff6e4e811b7790
@override_flag('foo', active=False) <NEW_LINE> class OverrideFlagOnClassTransactionTestCase(OverrideFlagOnClassTestsMixin, TransactionTestCase): <NEW_LINE> <INDENT> pass
Run tests with Django TransactionTestCase
62599094dc8b845886d55306
class my_install_data(install_data): <NEW_LINE> <INDENT> def finalize_options(self): <NEW_LINE> <INDENT> if self.install_dir is None: <NEW_LINE> <INDENT> installobj = self.distribution.get_command_obj('install') <NEW_LINE> self.install_dir = installobj.install_lib <NEW_LINE> <DEDENT> print('Installing data files to %s'...
A custom install_data command, which will install it's files into the standard directories (normally lib/site-packages).
6259909460cbc95b06365c0f
class SQLCustomType(object): <NEW_LINE> <INDENT> def __init__(self, type='string', native=None, encoder=None, decoder=None, validator=None, _class=None, widget=None, represent=None): <NEW_LINE> <INDENT> self.type = type <NEW_LINE> self.native = native <NEW_LINE> self.encoder = encoder or (lambda x: x) <NEW_LINE> self.d...
Allows defining of custom SQL types Args: type: the web2py type (default = 'string') native: the backend type encoder: how to encode the value to store it in the backend decoder: how to decode the value retrieved from the backend validator: what validators to use ( default = None, will use the ...
625990947cff6e4e811b7792
class Rectangle: <NEW_LINE> <INDENT> number_of_instances = 0 <NEW_LINE> print_symbol = "#" <NEW_LINE> def __init__(self, width=0, height=0): <NEW_LINE> <INDENT> if type(width) != int: <NEW_LINE> <INDENT> raise TypeError("width must be an integer") <NEW_LINE> <DEDENT> if type(height) != int: <NEW_LINE> <INDENT> raise Ty...
Class Rectangle
62599094be7bc26dc9252cfd
class ModifyAlarmAttributeRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Attribute = None <NEW_LINE> self.Value = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Attribute = params.get("Attribute") <NEW_LINE> self.Value = params.get("Value")
ModifyAlarmAttribute请求参数结构体
62599094adb09d7d5dc0c2aa
class Cpp17Gpp(CompiledLanguage): <NEW_LINE> <INDENT> @property <NEW_LINE> def name(self): <NEW_LINE> <INDENT> return "C++17 / g++" <NEW_LINE> <DEDENT> @property <NEW_LINE> def source_extensions(self): <NEW_LINE> <INDENT> return [".cpp", ".cc", ".cxx", ".c++", ".C"] <NEW_LINE> <DEDENT> @property <NEW_LINE> def header_e...
This defines the C++ programming language, compiled with g++ (the version available on the system) using the C++17 standard.
62599094ad47b63b2c5a958c
class HeartbeatController(BaseController): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(HeartbeatController, self).__init__( NS_HEARTBEAT, target_platform=True) <NEW_LINE> <DEDENT> def receive_message(self, message, data): <NEW_LINE> <INDENT> if self._socket_client.is_stopped: <NEW_LINE> <INDENT> r...
Controller to respond to heartbeat messages.
6259909450812a4eaa621a6f
class CIM_Foo_sub_sub_RejectDeleteProvider(InstanceWriteProvider): <NEW_LINE> <INDENT> provider_classnames = 'CIM_Foo_sub_sub' <NEW_LINE> def DeleteInstance(self, InstanceName): <NEW_LINE> <INDENT> raise CIMError( CIM_ERR_FAILED, "Deletion of {} instances is rejected". format(self.provider_classnames))
Implements a user defined provider for the class CIM_Foo_sub_sub where DeleteInstance is rejected with CIM_ERR_FAILED.
62599094d8ef3951e32c8d05
class MP_PrintPlaylist(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "sound.printplaylist" <NEW_LINE> bl_label = "print playlist" <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> pl = [a.playlist for a in context.scene.mp_playlist] <NEW_LINE> print ('Playlist: \n') <NEW_LINE> for i, p in enumerate(pl):...
Print playlist
625990947cff6e4e811b7794
class TestAddFileReplyPacket(object): <NEW_LINE> <INDENT> def test_get_message(self): <NEW_LINE> <INDENT> state = RET_SUCCESS <NEW_LINE> info = 'test infomation' <NEW_LINE> packet = AddFileReplyPacket(state, info) <NEW_LINE> msg = packet.get_message() <NEW_LINE> eq_(OP_ADD_FILE_REPLY, msg['method']) <NEW_LINE> eq_(stat...
the add file packet
62599094adb09d7d5dc0c2ac
class PDFGrid(object): <NEW_LINE> <INDENT> def __init__(self, x, Q, xfgrid, flavors): <NEW_LINE> <INDENT> self.x = x <NEW_LINE> self.Q = Q <NEW_LINE> self.logx = np.log(self.x) <NEW_LINE> self.logQ2 = np.log(self.Q**2) <NEW_LINE> self.xfgrid = xfgrid <NEW_LINE> self.flavors = flavors <NEW_LINE> self._interpolators = {}...
Class representing an individual subgrid of a PDF in 'lhagrid1' format.
62599094283ffb24f3cf55ec
class RequestStorage(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.queryset_stats = [] <NEW_LINE> <DEDENT> def add_queryset_storage_instance(self, queryset_storage): <NEW_LINE> <INDENT> self.queryset_stats.append(queryset_storage) <NEW_LINE> <DEDENT> @property <NEW_LINE> def total_wasted_mem...
Stores statistics about single request
62599094099cdd3c636762a3
class AnonymousSurvey(object): <NEW_LINE> <INDENT> def __init__(self, question): <NEW_LINE> <INDENT> self.question = question <NEW_LINE> self.responses = [] <NEW_LINE> <DEDENT> def show_question(self): <NEW_LINE> <INDENT> print(self.question) <NEW_LINE> <DEDENT> def store_responses(self, new_response): <NEW_LINE> <INDE...
收集匿名调查问卷的答案
62599094dc8b845886d5530c
class ChartError(Exception): <NEW_LINE> <INDENT> pass
Base chart exception.
62599094adb09d7d5dc0c2b0
class DbDustDumpException(Exception): <NEW_LINE> <INDENT> pass
Base exception for all dump exception
62599094099cdd3c636762a5
class Brand(BaseModel): <NEW_LINE> <INDENT> name = models.CharField(max_length=20, verbose_name='名称') <NEW_LINE> logo = models.ImageField(verbose_name='Logo图片') <NEW_LINE> first_letter = models.CharField(max_length=1, verbose_name='品牌首字母') <NEW_LINE> class Meta: <NEW_LINE> <INDENT> db_table = 'tb_brand' <NEW_LINE> <DED...
品牌
62599094d8ef3951e32c8d08
class PerMessageBzip2(PerMessageCompress, PerMessageBzip2Mixin): <NEW_LINE> <INDENT> DEFAULT_COMPRESS_LEVEL = 9 <NEW_LINE> @classmethod <NEW_LINE> def createFromResponseAccept(Klass, isServer, accept): <NEW_LINE> <INDENT> pmce = Klass(isServer, accept.response.s2c_max_compress_level, accept.compressLevel if accept.comp...
`permessage-bzip2` WebSocket extension processor.
625990947cff6e4e811b779a
class TestOrganizationExternalDatabaseTableColumnsPair(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> <I...
OrganizationExternalDatabaseTableColumnsPair unit test stubs
62599094dc8b845886d55310
class VoteSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> answers = AnswerSerializer(many=True) <NEW_LINE> poll = PollSerializer(read_only=True) <NEW_LINE> poll_id = ObjectIDField( queryset=Poll.objects.filter(end_date__gte=datetime.date.today()), write_only=True ) <NEW_LINE> class Meta: <NEW_LINE> <INDENT...
Vote on Poll read/write serializer.
62599094adb09d7d5dc0c2b2
class AlignBottom(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "object.align_bottom" <NEW_LINE> bl_label = "Align Objects Horizontal Bottom" <NEW_LINE> bl_options = { 'REGISTER', 'UNDO' } <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> scene = context.scene <NEW_LINE> bpy.ops.object.align(align_mode=...
Horizontal Bottom Align
62599095dc8b845886d55314
class InvalidGradingValuesError(Exception): <NEW_LINE> <INDENT> pass
Raised when expecting a list of dictionaries of the format: { count : int, pct_credit : float } But got something bad
62599095ad47b63b2c5a9591
class CombinedParentsChooser(ParentChooser): <NEW_LINE> <INDENT> thisown = _swig_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, fatherChooser: 'ParentChooser', motherChooser: 'ParentChooser', allowSelfing: 'bool'=Tru...
Details: This parent chooser accepts two parent choosers. It takes one parent from each parent chooser and return them as father and mother. Because two parent choosers do not have to choose parents from the same virtual subpopulation, this parent chooser allows you to choose parents from different...
62599095091ae35668706990
class TestMin(TestSymbolic): <NEW_LINE> <INDENT> def test_overload(self): <NEW_LINE> <INDENT> A, B, C, n1, n2, n3 = self.A, self.B, self.C, self.n1, self.n2, self.n3 <NEW_LINE> self.assertEqual(min(A, B), Min(A, B)) <NEW_LINE> self.assertEqual(min(A + B), Min(A + B)) <NEW_LINE> <DEDENT> def test_simplify(self): <NEW_LI...
Tests for Min.
62599095dc8b845886d55316
class TodoSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> id = serializers.UUIDField(read_only=True) <NEW_LINE> title = serializers.CharField(default='') <NEW_LINE> description = serializers.CharField(required=True) <NEW_LINE> completed = serializers.BooleanField(default=False) <NEW_LINE> class Meta: <NEW_...
Converts the model into JSON a json object.
62599095283ffb24f3cf55f8
class ParametricRegressor(SemiParametricRegressor): <NEW_LINE> <INDENT> def __init__(self, regressor, features, appearance_model, transform, update='composition'): <NEW_LINE> <INDENT> super(ParametricRegressor, self).__init__( regressor, features, transform, update=update) <NEW_LINE> self.appearance_model = appearance_...
Fitter of Parametric Regressor. Parameters ---------- regressor: function/closure The regressor to be used from `menpo.fit.regression.regressionfunctions.py`. features: The features used to regress.
625990955fdd1c0f98e5fcd4
@dataclass <NEW_LINE> class AirlySensorEntityDescription(SensorEntityDescription): <NEW_LINE> <INDENT> value: Callable = round
Class describing Airly sensor entities.
62599095be7bc26dc9252d05
class Cmd_Multiview_List_Test(CmdTestCase): <NEW_LINE> <INDENT> @set_storage(extras=['host','plugin','source']) <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> super(Cmd_Multiview_List_Test, self).setUp() <NEW_LINE> <DEDENT> def test_empty_list(self): <NEW_LINE> <INDENT> argv = ['', 'multiview', 'list'] <NEW_LINE> Comm...
Test ``manage.py multiview list``.
62599095283ffb24f3cf55fa
class QuadFcnOnSphere(EqConstDeclarativeNode): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> <DEDENT> def objective(self, x, y): <NEW_LINE> <INDENT> return 0.5 * torch.einsum('bm,bm->b', (y, y)) - torch.einsum('bm,bm->b', (y, x)) <NEW_LINE> <DEDENT> def equality_constraints(s...
Solves the problem minimize f(x, y) = 0.5 * y^Ty - x^T y subject to h(y) = \|y\|^2 = 1
6259909550812a4eaa621a78
class AbstractResponseInterceptor(object): <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> @abstractmethod <NEW_LINE> def process(self, handler_input, response): <NEW_LINE> <INDENT> pass
Interceptor that runs after the handler is called. The process method has to be implemented, to run custom logic on the input and the response generated after the handler is executed on the input.
62599095d8ef3951e32c8d0e
class RegexTransformBase(object): <NEW_LINE> <INDENT> regexes = {} <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> if not hasattr(self.__class__, '_compiled'): <NEW_LINE> <INDENT> self.__class__._compiled = self.compile() <NEW_LINE> <DEDENT> <DEDENT> def compile(self): <NEW_LINE> <INDENT> c = {} <NEW_LINE> for cls i...
Abstract base class for regex transformation engines. Subclasses must provide their own 'regexes' dictionary, mapping regex strings or compiled regexes to member functions. The constructor for this class walks through the class' ancestors and compiles regular expressions as necessary.
62599095adb09d7d5dc0c2be
class BadArguments(PasswordManagerException): <NEW_LINE> <INDENT> pass
Bad arguments passed to command
62599095f9cc0f698b1c617f
class BLENDYN_PT_active_object(BLENDYN_PT_tool_bar, bpy.types.Panel): <NEW_LINE> <INDENT> bl_idname = "BLENDYN_PT_active_object" <NEW_LINE> bl_label = "Active Object info" <NEW_LINE> bl_options = {'DEFAULT_CLOSED'} <NEW_LINE> def draw(self, context): <NEW_LINE> <INDENT> layout = self.layout <NEW_LINE> obj = context.obj...
Visualizes MBDyn data relative to the current active object - Toolbar Panel
62599095091ae3566870699a
class Json(dict, HttpBody): <NEW_LINE> <INDENT> content_type = 'application/json' <NEW_LINE> def __init__(self, d=None): <NEW_LINE> <INDENT> if d is not None: <NEW_LINE> <INDENT> self.update(d) <NEW_LINE> <DEDENT> <DEDENT> def dumps(self, serializer=None): <NEW_LINE> <INDENT> return json.dumps(self) <NEW_LINE> <DEDENT>...
json http body
6259909560cbc95b06365c1d
class Timeout: <NEW_LINE> <INDENT> def __init__(self, timeout, error_message, warn=False): <NEW_LINE> <INDENT> self.start = None <NEW_LINE> self.running = False <NEW_LINE> self.timeout = timeout <NEW_LINE> self.error_message = error_message <NEW_LINE> self.warn = warn <NEW_LINE> self.exception = TimeoutException(self.e...
A timeout object for use in ``while True`` loops instead of ``True``. Create an instance of this class before beginning an infinite loop and call ``run()`` instead of ``True``. Parameters ---------- timeout: int Seconds before loop should timeout. error_message: str Error message to raise in an exception if ...
62599095f9cc0f698b1c6181
class ApplicationError(Exception): <NEW_LINE> <INDENT> pass
ApplicationError raises when an error occurs
625990958a349b6b43687fcc
class MysqlColumn(Column): <NEW_LINE> <INDENT> def __init__(self, name, field_class, raw_column_type, nullable, primary_key=False, column_name=None, index=False, unique=False, default=None, extra_parameters=None, help_text=''): <NEW_LINE> <INDENT> super(MysqlColumn, self).__init__(name, field_class, raw_column_type, nu...
Store metadata about a database column.
62599095283ffb24f3cf5606
class TestModule(object): <NEW_LINE> <INDENT> def tests(self): <NEW_LINE> <INDENT> return { 'a_module': a_module, }
Ansible jinja2 tests
62599095be7bc26dc9252d0c
class pAdicRingLattice(pAdicLatticeGeneric, pAdicRingBaseGeneric): <NEW_LINE> <INDENT> def __init__(self, p, prec, subtype, print_mode, names, label=None): <NEW_LINE> <INDENT> self._subtype = subtype <NEW_LINE> if isinstance(prec,tuple): <NEW_LINE> <INDENT> pAdicRingBaseGeneric.__init__(self, p, prec[1], print_mode, na...
An implementation of the `p`-adic integers with lattice precision. INPUT: - ``p`` -- prime - ``prec`` -- precision cap, given as a pair (``relative_cap``, ``absolute_cap``) - ``subtype`` -- either ``'cap'`` or ``'float'`` - ``print_mode`` -- dictionary with print options - ``names`` -- how to print the prime - `...
62599095f9cc0f698b1c6182
class Publish(ndb.Model): <NEW_LINE> <INDENT> STATUSES = ('new', 'complete', 'failed') <NEW_LINE> _use_cache = False <NEW_LINE> _use_memcache = False <NEW_LINE> type = ndb.StringProperty(choices=TYPES) <NEW_LINE> type_label = ndb.StringProperty() <NEW_LINE> status = ndb.StringProperty(choices=STATUSES, default='new') <...
A comment, like, repost, or RSVP published into a silo. Child of a PublishedPage entity.
625990955fdd1c0f98e5fce3
class CanIsoTpSocket: <NEW_LINE> <INDENT> def __init__(self, interface: str, rx_addr: int, tx_addr: int): <NEW_LINE> <INDENT> self.s = socket.socket(socket.AF_CAN,socket.SOCK_DGRAM,socket.CAN_ISOTP) <NEW_LINE> self.s.bind((interface, rx_addr, tx_addr)) <NEW_LINE> <DEDENT> def __del__(self): <NEW_LINE> <INDENT> self.s.c...
A socket to IsoTp @param interface: name @param rx_addr: the can_id that is received @param tx_addr: the can_id that is transmitted
62599095be7bc26dc9252d0d
class MongoConfiguration(Configuration): <NEW_LINE> <INDENT> schema = Schema("mongo", definition={ "datas": Data("the collection's to store datas", default="datas"), "increments": Data("the collection's to store auto increments", default="increments"), }) <NEW_LINE> default_file = "dc/mongo/parameters.yml"
Class defining the default configuration for the Mongo DC.
625990957cff6e4e811b77b2
class _DevelopmentWE(WebElement): <NEW_LINE> <INDENT> def __init__(self, element, driver): <NEW_LINE> <INDENT> super(_DevelopmentWE, self).__init__(element) <NEW_LINE> self._d = driver <NEW_LINE> <DEDENT> @property <NEW_LINE> def web_development(self): <NEW_LINE> <INDENT> e = self.find_element_by_locator("class=ud_web-...
In case of hover, DevelopmentWebElement will expose all sub categories as properties
62599095d8ef3951e32c8d15
class ResourceLoader(Loader): <NEW_LINE> <INDENT> @abc.abstractmethod <NEW_LINE> def get_data(self, path): <NEW_LINE> <INDENT> raise NotImplementedError
Abstract base class for loaders which can return data from their back-end storage. This ABC represents one of the optional protocols specified by PEP 302.
625990958a349b6b43687fd2
class Pitch(db.Model): <NEW_LINE> <INDENT> __tablename__ = "pitches" <NEW_LINE> id = db.Column(db.Integer, primary_key = True) <NEW_LINE> title = db.Column(db.String) <NEW_LINE> content = db.Column(db.String) <NEW_LINE> category = db.Column(db.String) <NEW_LINE> date = db.Column(db.String) <NEW_LINE> time = db.Column(d...
This is the class which we will use to create the pitches for the app
625990953617ad0b5ee07ec3
class DeploymentmanagerTypesListRequest(_messages.Message): <NEW_LINE> <INDENT> filter = _messages.StringField(1) <NEW_LINE> maxResults = _messages.IntegerField(2, variant=_messages.Variant.UINT32, default=500) <NEW_LINE> pageToken = _messages.StringField(3) <NEW_LINE> project = _messages.StringField(4, required=True)
A DeploymentmanagerTypesListRequest object. Fields: filter: Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string. The field_name is the name of the field you want to compare. Only at...
62599095adb09d7d5dc0c2ce
class UnboundedBucketCeiling(MaturityBucketCeiling): <NEW_LINE> <INDENT> def __init__(self, description=None): <NEW_LINE> <INDENT> super(UnboundedBucketCeiling, self).__init__( periods=1, description=description) <NEW_LINE> <DEDENT> def ceiling_string(self): <NEW_LINE> <INDENT> return "unbounded" <NEW_LINE> <DEDENT> de...
This ceiling would used as a catch all. For example, Interest Rate Derivatives / Swaptions have a time to maturuty bucket for the option which is "over 10 years". ... so this class will be developed when we need to implement Interest Rate Derivatives / Swaptions
62599095283ffb24f3cf560e
class InvalidSimpleArchive(InvalidArchive): <NEW_LINE> <INDENT> pass
The simple archive appears to be invalid.
62599095091ae356687069a6
class HTTPServerHandler(BaseHTTPRequestHandler): <NEW_LINE> <INDENT> def __init__(self, request, address, server, access_uri): <NEW_LINE> <INDENT> self.access_uri = access_uri <NEW_LINE> BaseHTTPRequestHandler.__init__(self, request, address, server) <NEW_LINE> <DEDENT> def do_GET(self): <NEW_LINE> <INDENT> self.send_r...
HTTP Server callbacks to handle Box OAuth redirects
62599095c4546d3d9def8158
class LogEntry(models.Model): <NEW_LINE> <INDENT> LOG_ENTRY_TYPES = ( ("AR", "Access Reqeust"), ("AG", "Access Granted"), ("ADL", "Access Denied Access Level"), ("ADR", "Access Denied Reservation"), ("ADM", "Access Denied Membership") ) <NEW_LINE> created_at = models.DateTimeField() <NEW_LINE> entry_type = models.CharF...
Log Entry This model represents a log entry.
62599095d8ef3951e32c8d18