code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class navbar(htmlelement): <NEW_LINE> <INDENT> def __init__(self, barType, **kw): <NEW_LINE> <INDENT> self.id = kw['id'] if 'id' in kw else '' <NEW_LINE> self.barType = barType <NEW_LINE> self.bg = 'bg-dark' if not 'bgcolor' in kw else 'bg-%s'%(kw['bgcolor']) <NEW_LINE> self.header = kw['header'] if 'header' in kw else... | barType - type options (top / bottom ) TOODOO: right / left
kw:
bgcolor: default dark, light,dark, primary,
options:
fixed-top
fixed-bottom
navbar-dark
Example:
<nav class="navbar navbar-inverse fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-bra... | 62598ef0f9cc0f698b1c46c3 |
class ServiceError(Exception): <NEW_LINE> <INDENT> pass | Exception is raised in case a response message was received, but not
corresponding request is available. | 62598ef03317a56b869bd95a |
class AnswerBase(object): <NEW_LINE> <INDENT> parser = resource.RequestParser() <NEW_LINE> parser.add_argument('answer_text', type=str) <NEW_LINE> parser.add_argument('answer_upload_url', type=str) <NEW_LINE> parser.add_argument('answer_multiple_choice', type=int) <NEW_LINE> view_fields = ( 'id', 'url', 'question_type'... | Provide an as_dict method and a parser. | 62598ef0a8370b77170eebcc |
class AbstractTkTabbed(AbstractTkStacked): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def shell_tab_position_changed(self, tab_position): <NEW_LINE> <INDENT> raise NotImplementedError | The abstract toolkit Tabbed interface.
| 62598ef060cbc95b06362b29 |
class VaswaniRule(extension.Extension): <NEW_LINE> <INDENT> def __init__( self, attr, d, warmup_steps=4000, init=None, target=None, optimizer=None, scale=1.0, ): <NEW_LINE> <INDENT> self._attr = attr <NEW_LINE> self._d_inv05 = d ** (-0.5) * scale <NEW_LINE> self._warmup_steps_inv15 = warmup_steps ** (-1.5) <NEW_LINE> s... | Trainer extension to shift an optimizer attribute magically by Vaswani.
Args:
attr (str): Name of the attribute to shift.
rate (float): Rate of the exponential shift. This value is multiplied
to the attribute at each call.
init (float): Initial value of the attribute. If it is ``None``, the
... | 62598ef0377c676e912f6156 |
class ExtraMove(NextPlayer): <NEW_LINE> <INDENT> pass | an extra move for the current player was triggered | 62598ef0009cb60464cffd38 |
class Cursor(bb.Struct): <NEW_LINE> <INDENT> __slots__ = [ '_value_value', '_value_present', '_expiration_value', '_expiration_present', ] <NEW_LINE> _has_required_fields = True <NEW_LINE> def __init__(self, value=None, expiration=None): <NEW_LINE> <INDENT> self._value_value = None <NEW_LINE> self._value_present = Fals... | :ivar paper.Cursor.value: The actual cursor value.
:ivar paper.Cursor.expiration: Expiration time of ``value``. Some cursors
might have expiration time assigned. This is a UTC value after which the
cursor is no longer valid and the API starts returning an error. If
cursor expires a new one needs to be obtai... | 62598ef0d58c6744b42db6aa |
class FitLinearZero(Fit): <NEW_LINE> <INDENT> def __init__(self, x, y, popt=None, yerr=None): <NEW_LINE> <INDENT> def func(x, m=1): <NEW_LINE> <INDENT> return m * x <NEW_LINE> <DEDENT> Fit.__init__(self, x, y, func, popt, yerr) <NEW_LINE> self._fit() <NEW_LINE> self.m = self.popt[0] <NEW_LINE> <DEDENT> def derivative(s... | :math:`mx` | 62598ef0fff4ab517ebcbfc1 |
class TempClone: <NEW_LINE> <INDENT> def __init__(self, url: str): <NEW_LINE> <INDENT> import posixpath <NEW_LINE> self.path = join(gettempdir(), posixpath.basename(url)) <NEW_LINE> if not isdir(self.path): <NEW_LINE> <INDENT> Repo.clone_from(url, self.path) <NEW_LINE> <DEDENT> self.git = Git(self.path) <NEW_LINE> <DED... | Create a clone in a temp dir used to write and push file changes | 62598ef030dc7b766599e073 |
class Reaction: <NEW_LINE> <INDENT> def __init__(self, language, name, parameters, condition, effect): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.language = language <NEW_LINE> self.parameters = parameters <NEW_LINE> self.condition = condition <NEW_LINE> self.effect = effect <NEW_LINE> self._check_well_formed... | A (possibly lifted) reaction | 62598ef055399d3f05624d0f |
class Common(object): <NEW_LINE> <INDENT> def test_051_dbserver_no_auto_migrate(self): <NEW_LINE> <INDENT> options = JNTOptions({'conf_file':self.getDataFile(self.server_conf)}) <NEW_LINE> options.load() <NEW_LINE> options.set_option('database','auto_migrate', False) <NEW_LINE> try: <NEW_LINE> <INDENT> with self.assert... | Common tests for models
| 62598ef0cb5e8a47e493b56d |
class LOOT_134: <NEW_LINE> <INDENT> pass | Toothy Chest | 62598ef0e5267d203ee6a0f2 |
@mixin("property_adder") <NEW_LINE> class Stats(LastfmBase): <NEW_LINE> <INDENT> class Meta(object): <NEW_LINE> <INDENT> properties = ["listeners", "playcount", "tagcount", "count", "match", "rank", "weight", "attendance", "reviews"] <NEW_LINE> <DEDENT> def __init__(self, subject, **kwargs): <NEW_LINE> <INDENT> self._s... | A class representing the stats of an artist. | 62598ef0a8370b77170eebcd |
class AreaReinforcementCurve(CurveElement,IDisposable): <NEW_LINE> <INDENT> def Dispose(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def getBoundingBox(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def ReleaseUnmanagedResources(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def setElementT... | An object that specifies the type of a floor in Autodesk Revit. | 62598ef0379a373c97d977e0 |
class S3OrgMenuLayout(S3NavigationItem): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def layout(item): <NEW_LINE> <INDENT> name = "IFRC" <NEW_LINE> logo = None <NEW_LINE> root_org = current.auth.root_org() <NEW_LINE> if root_org: <NEW_LINE> <INDENT> db = current.db <NEW_LINE> s3db = current.s3db <NEW_LINE> language = ... | Layout for the organisation-specific menu | 62598ef0cc40096d616195cd |
class ITC0305_HostStatistics(BaseTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.dm = super(self.__class__, self).setUp() <NEW_LINE> LogPrint().info("Pre-Test: Create host '%s' for this TC." % self.dm.host_name) <NEW_LINE> self.assertTrue(smart_create_host(self.dm.host_name, self.dm.xml_host_in... | @summary: ITC-03主机管理-05主机信息统计 | 62598ef0be383301e0251fc4 |
class SearchProblem: <NEW_LINE> <INDENT> def get_start_state(self): <NEW_LINE> <INDENT> utilities.raise_not_defined() <NEW_LINE> <DEDENT> def is_goal_state(self, state): <NEW_LINE> <INDENT> utilities.raise_not_defined() <NEW_LINE> <DEDENT> def get_successors(self, state): <NEW_LINE> <INDENT> utilities.raise_not_defined... | This class outlines the structure of a search problem. The methods here
should only be implemented in classes that derive from this one. | 62598ef0442bda511e95ac4c |
class OrthogonalPredicate(Predicate): <NEW_LINE> <INDENT> name = 'orthogonal' <NEW_LINE> handler = Dispatcher("OrthogonalHandler", doc="Handler for key 'orthogonal'.") | Orthogonal matrix predicate.
Explanation
===========
``Q.orthogonal(x)`` is true iff ``x`` is an orthogonal matrix.
A square matrix ``M`` is an orthogonal matrix if it satisfies
``M^TM = MM^T = I`` where ``M^T`` is the transpose matrix of
``M`` and ``I`` is an identity matrix. Note that an orthogonal
matrix is necess... | 62598ef056ac1b37e63009d6 |
@six.add_metaclass(abc.ABCMeta) <NEW_LINE> class HostingDeviceDriver(object): <NEW_LINE> <INDENT> @abc.abstractmethod <NEW_LINE> def hosting_device_name(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def create_config(self, context, credentials_info, connectivity_info): <NEW_LINE> <I... | This class defines the API for hosting device drivers.
These are used by Cisco (routing service) plugin to perform
various (plugin independent) operations on hosting devices. | 62598ef04f6381625f1988b0 |
class TotalHTTPTrendCriteria(AbstractCriteria): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_type_string(): <NEW_LINE> <INDENT> return 'http_trend' <NEW_LINE> <DEDENT> def __init__(self, autostop, param_str): <NEW_LINE> <INDENT> AbstractCriteria.__init__(self) <NEW_LINE> self.seconds_count = 0 <NEW_LINE> self.c... | HTTP Trend Criteria | 62598ef0baa26c4b54d4dab6 |
class NoDevError(DevPoolError): <NEW_LINE> <INDENT> pass | 设备不在设备池中 | 62598ef0a219f33f346c501d |
class UdsRestServerTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_udsrestsrv(self): <NEW_LINE> <INDENT> socket = os.path.join( tempfile.gettempdir(), 'no', 'such', 'dir', 'foo.sock' ) <NEW_LINE> rest_server = rest.UdsRestServer(socket) <NEW_LINE> rest_server._setup_endpoint(mock.Mock()) <NEW_LINE> self.assertTru... | Test for treadmill.rest.UdsRestServer. | 62598ef07047854f4633dbbc |
class Instrument(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=80) <NEW_LINE> object_type = models.CharField(max_length=31, choices=OBJECT_TYPE, verbose_name="ObjectType", blank=True, null=True) <NEW_LINE> today_prc = models.DecimalField(max_digits=4, decimal_places=3, blank=True, null=True) <NE... | Define Portfolio model with reference object_type and its attributes. | 62598ef032920d7e50bc4817 |
class MPImageRecenter: <NEW_LINE> <INDENT> def __init__(self, location): <NEW_LINE> <INDENT> self.location = location | recenter on location | 62598ef0a8370b77170eebce |
class datasetGenerator: <NEW_LINE> <INDENT> def __init__(self, dataset="", size=200, filename="data.json", randomSeed=42): <NEW_LINE> <INDENT> if dataset == "": <NEW_LINE> <INDENT> if "json.data" in os.walk(os.path.join("..", "data", filename)): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> d... | creates a base dataset from senseval in NLTK
it generates data.json dataset by instanciating it
or by retrieving data from https://github.com/sebischair/NLU-Evaluation-Corpora
create chatito https://rodrigopivi.github.io/Chatito/ | 62598ef0f9cc0f698b1c46c4 |
class TitForTatWithNonTrivialInitialzer(Player): <NEW_LINE> <INDENT> def __init__(self, x: Any): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> name = "Tit For Tat" <NEW_LINE> classifier = {} | Same name as TitForTat, but with empty classifier. | 62598ef0dc8b845886d51db0 |
class TestRiderEmailsView(TestCase): <NEW_LINE> <INDENT> fixtures = ['populaires.yaml', 'riders.yaml'] <NEW_LINE> def test_rider_emails_bad_uuid(self): <NEW_LINE> <INDENT> url = reverse( 'populaires:rider-emails', args=('VicPop', '27Mar2011', 'f00')) <NEW_LINE> response = self.client.get(url) <NEW_LINE> self.assertEqua... | Functional tests for rider email address list view.
| 62598ef060cbc95b06362b2b |
class SpiderQueueTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.q = self._get_queue() <NEW_LINE> self.name = 'spider1' <NEW_LINE> self.args = {'arg1': 'val1', 'arg2': 2} <NEW_LINE> self.msg = self.args.copy() <NEW_LINE> self.msg['name'] = self.name <NEW_LINE> <DEDENT> def _get_qu... | This test case can be used easily for testing other SpiderQueue's by
just changing the _get_queue() method. It also supports queues with
deferred methods. | 62598ef0aad79263cf42cff8 |
class VOMS(object): <NEW_LINE> <INDENT> def __init__(self, vomsdir_path, ca_path, vomsapi_lib): <NEW_LINE> <INDENT> self.VOMSApi = ctypes.CDLL(vomsapi_lib) <NEW_LINE> self.VOMSApi.VOMS_Init.restype = ctypes.POINTER(_vomsdata) <NEW_LINE> self.VOMSDIR = ctypes.c_char_p(vomsdir_path) <NEW_LINE> self.CADIR = ctypes.c_char_... | Context Manager for VOMS handling | 62598ef02ae34c7f260a98d2 |
class SMB2CreateAppInstanceVersion(Structure): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.fields = OrderedDict([ ('structure_size', IntField( size=2, default=24 )), ('reserved', IntField(size=2)), ('padding', IntField(size=4)), ('app_instance_version_high', IntField(size=8)), ('app_instance_versio... | [MS-SMB2] 2.2.13.2.15 SMB2_CREATE_APP_INSTANCE_VERSION
Used when the client is supplying a version for the app instance identifier
provided by an application.
Valid for the SMB 3.1.1+ family | 62598ef0bd1bec0571e144c0 |
class JsonCollectionItemCatalogPage(JsonCollectionCatalogPage): <NEW_LINE> <INDENT> def update_jc(self, results): <NEW_LINE> <INDENT> self._jc_items = [{ 'href': view_url(self.context, i), 'data': [{ 'name': 'title', 'value': self.context.title, 'prompt': 'Title', }], } for i in results] | This presents the items returned as a list of items, which may be
used to retrieve a Collection+JSON document, which implies the
targeted link MUST have a Collection+JSON view. | 62598ef0e5267d203ee6a0f3 |
class InvalidEventTypeOrderException(Exception): <NEW_LINE> <INDENT> pass | Invalid order of event types | 62598ef0fff4ab517ebcbfc3 |
class ClassicSofa(Sofa): <NEW_LINE> <INDENT> def lie_on(self) -> str: <NEW_LINE> <INDENT> return 'I sit on a Classic Sofa' | product implement Sofa: ClassicSofa | 62598ef0be7bc26dc9251258 |
class SkipFirst(LoggingFilter): <NEW_LINE> <INDENT> params = { 'skip_first': None, } <NEW_LINE> @classmethod <NEW_LINE> def initialize_context(cls, context, **kwargs): <NEW_LINE> <INDENT> super(SkipFirst, cls).initialize_context(context, **kwargs) <NEW_LINE> context['first_has_been_skipped'] = False <NEW_LINE> <DEDENT>... | Ignore the first log call but process all subsequent calls. | 62598ef02c8b7c6e89bd1fae |
class FireAnt(Ant): <NEW_LINE> <INDENT> name = 'Fire' <NEW_LINE> damage = 3 <NEW_LINE> food_cost = 5 <NEW_LINE> armor = 1 <NEW_LINE> implemented = True <NEW_LINE> def reduce_armor(self, amount): <NEW_LINE> <INDENT> if amount >= self.armor: <NEW_LINE> <INDENT> bees = list(self.place.bees) <NEW_LINE> Insect.reduce_armor(... | FireAnt cooks any Bee in its Place when it expires. | 62598ef04527f215b58e86ea |
class FileTreeItem(TreeItemComposite): <NEW_LINE> <INDENT> def __init__(self, fileToAnnotate, headerToInclude): <NEW_LINE> <INDENT> TreeItemComposite.__init__(self, TreeItemType.FILE, fileToAnnotate, headerToInclude) <NEW_LINE> self.fileToAnnotate_ = fileToAnnotate <NEW_LINE> self.headerToInclude_ = headerToInclude <NE... | Tree item for a file. | 62598ef0d486a94d0ba2a7b8 |
class Error: <NEW_LINE> <INDENT> total_files_saved = 0 <NEW_LINE> def __init__(self, initial_total: float, all_concentrations: list, enzymes: dict, cut_off: float = save_cutoff): <NEW_LINE> <INDENT> self.all_concentrations = all_concentrations <NEW_LINE> self.total_concentration = sum(all_concentrations) <NEW_LINE> sel... | Simple error class to handle result saving and keeping track of plots saved | 62598ef056b00c62f0fb10bf |
@NodeGroup.action_registry.register('delete') <NEW_LINE> class DeleteNodeGroup(Action): <NEW_LINE> <INDENT> schema = type_schema('delete') <NEW_LINE> permissions = ('eks:DeleteNodegroup',) <NEW_LINE> def process(self, resources): <NEW_LINE> <INDENT> client = local_session(self.manager.session_factory).client('eks') <NE... | Delete node group(s). | 62598ef067a9b606de5447ba |
class AIS328DQTR(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.bus = smbus.SMBus(1) <NEW_LINE> self.device_address = 0x18 <NEW_LINE> print(hex(int('00101111',2))) <NEW_LINE> self.bus.write_byte_data(self.device_address, 0x20, 0x2f) <NEW_LINE> self.full_scale = 2 <NEW_LINE> self.bus.write_byt... | Class for reading accelerometer output | 62598ef0be8e80087fbbd83c |
class Pharrell: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.message = 'hello from Pharrell class' <NEW_LINE> <DEDENT> def get_message(self): <NEW_LINE> <INDENT> return self.message | looking at how to add a class | 62598ef07d847024c075abba |
class ErpChartOfAccounts(Document): <NEW_LINE> <INDENT> def __init__(self, *args, **kw_args): <NEW_LINE> <INDENT> super(ErpChartOfAccounts, self).__init__(*args, **kw_args) <NEW_LINE> <DEDENT> _attrs = [] <NEW_LINE> _attr_types = {} <NEW_LINE> _defaults = {} <NEW_LINE> _enums = {} <NEW_LINE> _refs = [] <NEW_LINE> _many... | Accounting structure of a business. Each account represents a financial aspect of a business, such as its Accounts Payable, or the value of its inventory, or its office supply expenses.Accounting structure of a business. Each account represents a financial aspect of a business, such as its Accounts Payable, or the valu... | 62598ef04a966d76dd5ed6c8 |
class gms10_TestOutput(TestOutput): <NEW_LINE> <INDENT> __test__ = True <NEW_LINE> @classmethod <NEW_LINE> def setUpClass(self): <NEW_LINE> <INDENT> super(gms10_TestOutput, self).setUpClass('GMS10.gms', 'GMS10_output.json') | Tests model generated output versus known
static output. | 62598ef03317a56b869bd95c |
class PicFrameSizeTest(object): <NEW_LINE> <INDENT> openapi_types = { 'frame_size': 'str', 'reject_on_error': 'bool', 'checked': 'bool' } <NEW_LINE> attribute_map = { 'frame_size': 'frame_size', 'reject_on_error': 'reject_on_error', 'checked': 'checked' } <NEW_LINE> def __init__(self, frame_size=None, reject_on_error=N... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually. | 62598ef023849d37ff84f8a7 |
class DbVersion(MigrateBase): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> self.init_logging() <NEW_LINE> print(migrate_api.db_version(url=self.dburi, repository=self.repository)) | Shows the current version of the database. | 62598ef0377c676e912f6158 |
class CO2Sensor: <NEW_LINE> <INDENT> cmd = bytearray([0xFE, 0x04, 0x00, 0x03, 0x00, 0x01, 0xD5, 0xC5]) <NEW_LINE> baudrate = 9600 <NEW_LINE> timeout = 0.5 <NEW_LINE> no_data = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> serial_devices = serial.tools.list_ports.comports() <NEW_LINE> print('\n ------Select CO... | Passive transmission.
Big-endian. (CRC: little-endian.)
CRC: CRC-16(Modbus).
Send:
=========================================================
| 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 |
---------------------------------------------------------
| 0xFE | 0x04 |Start Address| NumberOfReg | CRC |
====... | 62598ef0090684286d592ad9 |
class OSMQueueConsumer(ConsumerMixin): <NEW_LINE> <INDENT> def __init__(self, connection, queues, callback): <NEW_LINE> <INDENT> self.connection = connection <NEW_LINE> self.queues = queues <NEW_LINE> self.callback = callback <NEW_LINE> self.connect_max_retries = CONNECTION_RETRIES <NEW_LINE> self.retry_tracker = 0 <NE... | Open stack message queue consumer. | 62598ef05166f23b2e241bc8 |
class Quantity(with_metaclass(abc.ABCMeta, object)): <NEW_LINE> <INDENT> adjustable_attributes = frozenset(["last_val", "last_update_time"]) <NEW_LINE> def __init__(self, start_value=None, start_time=None, meta=None): <NEW_LINE> <INDENT> self.last_update_time = start_time or time.time() <NEW_LINE> self.meta = meta <NEW... | Attributes that should be adjustable via a simulation control interface.
Parameters
----------
start_time : float
The initial time when a quantity is updated.
start_value : float
The initial value of a quantity.
meta : dict
This data structure must contain all the attribute description data
of all quan... | 62598ef030dc7b766599e077 |
class DeferredValue(object): <NEW_LINE> <INDENT> def __init__(self, func, cache_value=True): <NEW_LINE> <INDENT> self.func = func <NEW_LINE> self.cache_value = cache_value <NEW_LINE> self._value = _UNSET <NEW_LINE> <DEDENT> def get_value(self): <NEW_LINE> <INDENT> if self._value is not _UNSET and self.cache_value: <NEW... | :class:`DeferredValue` is a wrapper type, used to defer computing
values which would otherwise be expensive to stringify and
format. This is most valuable in areas like logging, where one
would not want to waste time formatting a value for a log message
which will subsequently be filtered because the message's log
leve... | 62598ef0498bea3a75a56320 |
class Associative(numpy.ndarray): <NEW_LINE> <INDENT> def __new__(cls, buff): <NEW_LINE> <INDENT> background = cls._get_background(numpy.array(buff)) <NEW_LINE> diff = numpy.subtract(buff, background) <NEW_LINE> abs_diff = numpy.absolute(diff) / 256.0 <NEW_LINE> return abs_diff <NEW_LINE> <DEDENT> @classmethod <NEW_LIN... | `A` elements wrapped to a single object | 62598ef0dd821e528d6d772c |
class CleanupException(Exception): <NEW_LINE> <INDENT> pass | SODAR Taskflow cleanup exception | 62598ef02c8b7c6e89bd1faf |
class UpdateNamespaceResponse(object): <NEW_LINE> <INDENT> swagger_types = { 'namespace': 'Namespace' } <NEW_LINE> attribute_map = { 'namespace': 'namespace' } <NEW_LINE> def __init__(self, namespace=None): <NEW_LINE> <INDENT> self._namespace = None <NEW_LINE> self.discriminator = None <NEW_LINE> if namespace is not No... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598ef03d592f4c4edb96da |
class DocxTableTableFillTableCell(object): <NEW_LINE> <INDENT> swagger_types = { 'target_tag': 'str', 'replacement_value': 'str' } <NEW_LINE> attribute_map = { 'target_tag': 'TargetTag', 'replacement_value': 'ReplacementValue' } <NEW_LINE> def __init__(self, target_tag=None, replacement_value=None): <NEW_LINE> <INDENT>... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598ef0a8370b77170eebd1 |
class Movie: <NEW_LINE> <INDENT> def __init__(self, movie_title, movie_poster_url, movie_trailer_url): <NEW_LINE> <INDENT> self.title = movie_title <NEW_LINE> self.poster = movie_poster_url <NEW_LINE> self.trailer = movie_trailer_url | The Movie class initializes a Movie object.
Attributes:
title: Movie Title (string)
poster: URL of the Movie Poster
trailer: URL of the Movie Trailer | 62598ef0d486a94d0ba2a7b9 |
class VerbositySlider(SphinxDirective): <NEW_LINE> <INDENT> has_content = False <NEW_LINE> required_arguments = 1 <NEW_LINE> optional_arguments = 0 <NEW_LINE> final_argument_whitespace = False <NEW_LINE> def run(self): <NEW_LINE> <INDENT> return [verbosity_slider(max_verbosity=self.arguments[0].strip())] | Directive to set the highlighting language for code blocks, as well
as the threshold for line numbers. | 62598ef0796e427e5384cf86 |
class RegulatingCondEq(ConductingEquipment): <NEW_LINE> <INDENT> def __init__(self, Controls=None, RegulatingControl=None, *args, **kw_args): <NEW_LINE> <INDENT> self._Controls = [] <NEW_LINE> self.Controls = [] if Controls is None else Controls <NEW_LINE> self._RegulatingControl = None <NEW_LINE> self.RegulatingContro... | A type of conducting equipment that can regulate a quanity (i.e. voltage or flow) at a specific point in the network.A type of conducting equipment that can regulate a quanity (i.e. voltage or flow) at a specific point in the network.
| 62598ef099cbb53fe682f69b |
class TicketLoginProtocol(protocol.ProcessProtocol): <NEW_LINE> <INDENT> def __init__(self, stdin, p4base): <NEW_LINE> <INDENT> self.deferred = defer.Deferred() <NEW_LINE> self.stdin = stdin.encode('ascii') <NEW_LINE> self.stdout = b'' <NEW_LINE> self.stderr = b'' <NEW_LINE> self.p4base = p4base <NEW_LINE> <DEDENT> def... | Twisted process protocol to run `p4 login` and enter our password
in the stdin. | 62598ef0442bda511e95ac50 |
class IsolationPlayer: <NEW_LINE> <INDENT> def __init__(self, search_depth=3, score_fn=custom_score_3, timeout=10.): <NEW_LINE> <INDENT> self.search_depth = search_depth <NEW_LINE> self.score = score_fn <NEW_LINE> self.time_left = None <NEW_LINE> self.TIMER_THRESHOLD = timeout | Base class for minimax and alphabeta agents -- this class is never
constructed or tested directly.
******************** DO NOT MODIFY THIS CLASS ********************
Parameters
----------
search_depth : int (optional)float(own_moves - opp_moves)
A strictly positive integer (i.e., 1, 2, 3,...) for the number of
... | 62598ef0d7e4931a7ef3a888 |
class NeptuneWSService(NeptuneServiceSkeleton): <NEW_LINE> <INDENT> def __init__(self, host, port, name=None): <NEW_LINE> <INDENT> super().__init__(name) <NEW_LINE> self.host = host <NEW_LINE> self.port = port <NEW_LINE> self.runner = None <NEW_LINE> self.routes = {} <NEW_LINE> <DEDENT> def init(self): <NEW_LINE> <INDE... | Example:
ws_server = NeptuneWSService('0.0.0.0', '1313')
wsrpc = NeptuneWSRpc('/13', self.client_manager)
ws_server.add_route(wsrpc)
ws_server.add_route(WebSocketEcho()) | 62598ef056ac1b37e63009da |
class Outbound(A10BaseClass): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.ERROR_MSG = "" <NEW_LINE> self.required=[] <NEW_LINE> self.b_key = "outbound" <NEW_LINE> self.a10_url="/axapi/v3/cgnv6/nat64/fragmentation/outbound" <NEW_LINE> self.DeviceProxy = "" <NEW_LINE> self.frag_action = "" ... | Class Description::
Fragmentation Behavior from NAT inside to NAT outside.
Class outbound supports CRUD Operations and inherits from `common/A10BaseClass`.
This class is the `"PARENT"` class for this module.`
:param frag_action: {"description": "'drop': Drop Silently; 'ipv4': Use IPv4 fragmentation (default); 'send-i... | 62598ef04f6381625f1988b2 |
class SyncMenu: <NEW_LINE> <INDENT> def __init__(self, controller, funcs): <NEW_LINE> <INDENT> self.controller: BinsyncController = controller <NEW_LINE> self.selected_funcs = funcs <NEW_LINE> <DEDENT> def open_sync_menu(self): <NEW_LINE> <INDENT> menu_table = self._build_menu_table() <NEW_LINE> dialog = MenuDialog(men... | The UI to directly use the controller for syncing operations.
Allows the user to select another user and do one of 3 options:
1. Sync (the selected functions)
2. Sync Structs
3. Sync All (grab every function for that user) | 62598ef04a966d76dd5ed6c9 |
class BlogPostSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = BlogPost <NEW_LINE> fields = ('id', 'created', 'title', 'body', 'owner') | Blog post serializer | 62598ef0f9cc0f698b1c46c6 |
class Logout(BlogHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> self.logout() <NEW_LINE> self.redirect('/blog') | Logout handler | 62598ef091f36d47f223029b |
class PublicKeysCache: <NEW_LINE> <INDENT> def __init__(self, cache_time): <NEW_LINE> <INDENT> self.cached_at = 0 <NEW_LINE> self.cache = None <NEW_LINE> self.cache_time = cache_time <NEW_LINE> <DEDENT> def get(self, now): <NEW_LINE> <INDENT> if not self.cache: <NEW_LINE> <INDENT> raise CacheMissError <NEW_LINE> <DEDEN... | In-memory time-based cache. store with set(), retrieve with get(). | 62598ef123849d37ff84f8a9 |
class EquityForm(forms.ModelForm): <NEW_LINE> <INDENT> def __init__(self, user, *args, **kwargs): <NEW_LINE> <INDENT> super(EquityForm, self ).__init__(*args, **kwargs) <NEW_LINE> self.fields['equity_type'].label = _("Equity type") <NEW_LINE> self.fields['issue_price'].label = _("Issue price") <NEW_LINE> self.fields['s... | Equity form | 62598ef1a79ad16197768810 |
class _MasterTopicDefnProvider: <NEW_LINE> <INDENT> def __init__(self, treeConfig: TreeConfig): <NEW_LINE> <INDENT> self.__providers = [] <NEW_LINE> self.__treeConfig = treeConfig <NEW_LINE> <DEDENT> def addProvider(self, provider): <NEW_LINE> <INDENT> assert (isinstance(provider, ITopicDefnProvider)) <NEW_LINE> if pro... | Stores a list of topic definition providers. When queried for a topic
definition, queries each provider (registered via addProvider()) and
returns the first complete definition provided, or (None,None).
The providers must follow the ITopicDefnProvider API. | 62598ef176e4537e8c3edda5 |
class NoUArmPortException(IOError): <NEW_LINE> <INDENT> def __init__(self, error): <NEW_LINE> <INDENT> self.error = error <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return repr(self.error) | .. _NoUArmPortException: | 62598ef12c8b7c6e89bd1fb2 |
class MediaCrate(SeratoCrate): <NEW_LINE> <INDENT> def __init__(self, parent: Type[MC] = None, children: Tuple[Type[MC]] = None) -> None: <NEW_LINE> <INDENT> super().__init__(parent, children) <NEW_LINE> <DEDENT> def load_crate(self, path: str, volume: str, volume_path: str, prefix: str = None) -> None: <NEW_LINE> <IND... | A media folder represented as a Serato Crate.
This class is intended to read a given media folder and represent it as a
Serato Crate. | 62598ef1e5267d203ee6a0f8 |
class LikelihoodFactor(Factor): <NEW_LINE> <INDENT> def __init__(self, mean_variable, value_variable, variance): <NEW_LINE> <INDENT> super(LikelihoodFactor, self).__init__([mean_variable, value_variable]) <NEW_LINE> self.mean = mean_variable <NEW_LINE> self.value = value_variable <NEW_LINE> self.variance = variance <NE... | Connects two variables, the value of one being the mean of the
message sent to the other. | 62598ef1d268445f26638f87 |
class CloudTasksQueuePurgeOperator(BaseOperator): <NEW_LINE> <INDENT> template_fields = ("location", "queue_name", "project_id", "gcp_conn_id") <NEW_LINE> @apply_defaults <NEW_LINE> def __init__( self, location: str, queue_name: str, project_id: Optional[str] = None, retry: Optional[Retry] = None, timeout: Optional[flo... | Purges a queue by deleting all of its tasks from Cloud Tasks.
:param location: The location name in which the queue will be purged.
:type location: str
:param queue_name: The queue's name.
:type queue_name: str
:param project_id: (Optional) The ID of the GCP project that owns the Cloud Tasks.
If set to None or mi... | 62598ef110dbd63aa1c6f368 |
class CreateMember(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.driver = get_driver() <NEW_LINE> logging.info("打开浏览器成功") <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> self.driver.quit() <NEW_LINE> logging.info("关闭浏览器成功") <NEW_LINE> <DEDENT> def test_create_member(self)... | 测试新增成员页面 | 62598ef12ae34c7f260a98d7 |
class write_module(object): <NEW_LINE> <INDENT> def __init__(self, code, tempdir): <NEW_LINE> <INDENT> self.code = code <NEW_LINE> self.tempdir = tempdir <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> print('Creating {0}test_imports_future_stdlib.py ...'.format(self.tempdir)) <NEW_LINE> with io.open(self.... | A context manager to streamline the tests. Creates a temp file for a
module designed to be imported by the ``with`` block, then removes it
afterwards. | 62598ef1283ffb24f3cf20a1 |
class ObjectInvertHidden(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "object.invert_visibility" <NEW_LINE> bl_label = "Invert hidden" <NEW_LINE> bl_description = "Hide currently visible objects and reveals previously visible." <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> selectafter : BoolProperty( ... | Tooltip | 62598ef1442bda511e95ac52 |
class Convertisseur: <NEW_LINE> <INDENT> def depuis_version_0(objet, classe): <NEW_LINE> <INDENT> objet.set_version(classe, 1) <NEW_LINE> groupe = objet._groupes["npc"] <NEW_LINE> groupe_pnj = objet.ajouter_groupe("pnj") <NEW_LINE> del objet._groupes["npc"] <NEW_LINE> joueur = objet._groupes["joueur"] <NEW_LINE> joueur... | Classe pour envelopper les convertisseurs. | 62598ef18a43f66fc4bf0964 |
class TaskListAPI(ParadeResource): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> return list(self.context.list_tasks()) | The api blue print to execute etl task | 62598ef1d7e4931a7ef3a88a |
class TetrAMMCounter(DeviceCounter): <NEW_LINE> <INDENT> invalid_device_msg = 'TetrAMM epics device invalid' <NEW_LINE> def __init__(self, prefix, outpvs=None, nchan=4, use_calc=False, use_unlabeled=False): <NEW_LINE> <INDENT> DeviceCounter.__init__(self, prefix, outpvs=outpvs) <NEW_LINE> fields = [('AveragingTime_RBV'... | Counter for TetrAMM | 62598ef17d847024c075abbe |
class HostipGeoIPProvider(GeolocationBackend): <NEW_LINE> <INDENT> API_URL = "http://api.hostip.info/get_json.php" <NEW_LINE> @property <NEW_LINE> def name(self): <NEW_LINE> <INDENT> return "Hostip.info" <NEW_LINE> <DEDENT> def _refresh(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> reply = self._session.get(self.... | The Hostip GeoIP service provider. | 62598ef18e7ae83300ee7880 |
class Task(object): <NEW_LINE> <INDENT> def __init__(self, metaInput, parameterDict, eventsPerJob, metaPrev=None, nbTasks=None, sinFile=None, eventsPerBaseFile=None, applicationOptions=None, taskName='', ): <NEW_LINE> <INDENT> LOG.notice('Creating task with meta', str(metaInput)) <NEW_LINE> self.meta = dict(metaInput) ... | Object holding all information for a task. | 62598ef163b5f9789fe8394e |
class UserAuthPWMdl(Base): <NEW_LINE> <INDENT> __tablename__ = 'userauthpw' <NEW_LINE> def __init__(self, passwd): <NEW_LINE> <INDENT> self.set(passwd) <NEW_LINE> <DEDENT> uid = Column(Integer, ForeignKey(UserMdl.get_table_name() + '.id'), primary_key = True) <NEW_LINE> user = relationship(UserMdl, uselist = False, bac... | Usually this model is not directly used, except when creating a new
user; use :attr:`UserMdl.auth_pw <pynojo.model.user.UserMdl.auth_pw>`
instead. | 62598ef1f548e778e5969d7c |
class _ASettingsPage(WrappingTextMixin, ATreeMixin): <NEW_LINE> <INDENT> _setting_ids = set() <NEW_LINE> def __init__(self, parent, page_desc): <NEW_LINE> <INDENT> super(_ASettingsPage, self).__init__(page_desc, parent) <NEW_LINE> self._mark_changed = None <NEW_LINE> self._request_restart = None <NEW_LINE> self._settin... | Abstract class for all settings pages. | 62598ef166656f66f7d58bd3 |
class ObjDict(dict): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> dict.__init__(self, *args, **kwargs) <NEW_LINE> self.__dict__ = self | dictからobjectに変更することが出来ます
例えば、下記コードを実装できることになる:
example = {'key1': 'value1', 'key2': 2}
print(example['key1'])
obj_example = ObjDict(**example)
print(obj_example.key1)
print(obj_example['key1']) | 62598ef14527f215b58e86ef |
class endpoint2d(recoBase): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(endpoint2d, self).__init__() <NEW_LINE> self._productName = 'endpoint2d' <NEW_LINE> self._process = evd.DrawEndpoint() <NEW_LINE> self._brush = (0, 0, 0) <NEW_LINE> self.init() <NEW_LINE> <DEDENT> def drawObjects(self, view_ma... | docstring for endpoint2d | 62598ef123849d37ff84f8ab |
class Save_ExportScreenshot(OneItemLink): <NEW_LINE> <INDENT> _text = _(u'Export Screenshot...') <NEW_LINE> _help = _(u'Export the saved screenshot from a save game') <NEW_LINE> def Execute(self): <NEW_LINE> <INDENT> imagePath = FileSave.display_dialog(Link.Frame, _(u'Save Screenshot as:'), bass.dirs[u'patches'].s, _(u... | Exports the saved screenshot from a save game. | 62598ef13d592f4c4edb96dd |
class GameStats(): <NEW_LINE> <INDENT> def __init__(self, ai_settings): <NEW_LINE> <INDENT> self.ai_settings = ai_settings <NEW_LINE> self.reset_stats() <NEW_LINE> self.game_active = False <NEW_LINE> self.high_score = 0 <NEW_LINE> <DEDENT> def reset_stats(self): <NEW_LINE> <INDENT> self.ships_left = self.ai_settings.sh... | 跟踪游戏的统计信息 | 62598ef1377c676e912f615a |
class NodeLinksList(generics.ListCreateAPIView, NodeMixin): <NEW_LINE> <INDENT> permission_classes = ( drf_permissions.IsAuthenticatedOrReadOnly, ContributorOrPublic, ReadOnlyIfRegistration, base_permissions.TokenHasScope, ) <NEW_LINE> required_read_scopes = [CoreScopes.NODE_LINKS_READ] <NEW_LINE> required_write_scopes... | Node Links to other nodes. *Writeable*.
Node Links act as pointers to other nodes. Unlike Forks, they are not copies of nodes;
Node Links are a direct reference to the node that they point to.
##Node Link Attributes
`type` is "node_links"
None
##Links
See the [JSON-API spec regarding pagination](http://jsonapi... | 62598ef116aa5153ce3fecf1 |
class AllTranslationsAdminMixin(object): <NEW_LINE> <INDENT> def all_translations(self, obj): <NEW_LINE> <INDENT> available = list(obj.get_available_languages()) <NEW_LINE> langs = [] <NEW_LINE> for lang, _ in settings.LANGUAGES: <NEW_LINE> <INDENT> if lang in available: <NEW_LINE> <INDENT> langs.append(lang) <NEW_LINE... | To use this, apply this mixin to your Admin class, then add
'all_translations' to your list_display list. | 62598ef1cb5e8a47e493b571 |
class MessageStub(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.channel_session = {} <NEW_LINE> self.reply_channel = Channel('foo!123') | Minimal stub for replicating `channels.message.Message` | 62598ef1dd821e528d6d7730 |
class Resource(base.Resource): <NEW_LINE> <INDENT> def associate(self, server=None): <NEW_LINE> <INDENT> self._http.post('/servers/%s/action' % server.get_id(), data=utils.get_json_body( 'addFloatingIp', address=self.ip)) <NEW_LINE> <DEDENT> def disassociate(self): <NEW_LINE> <INDENT> self._http.post('/servers/%s/actio... | Resource class for floating IPs in Compute API v2 | 62598ef1aad79263cf42cfff |
class PlacementAPIConflict(CyborgException): <NEW_LINE> <INDENT> _msg_fmt = _("A conflict was encountered attempting to invoke the " "placement API at URL %(url)s: %(error)s") | Any 409 error from placement APIs should use (a subclass of) this
exception. | 62598ef197e22403b38396e1 |
class TwoOrientationsPlotGroup( TemplatePlotGroup ): <NEW_LINE> <INDENT> unit_size = param.Number(default=25,bounds=(9,None),doc="box size of a single unit") <NEW_LINE> def _make_template_plot(self,plot_template_name,plot_template,**kw): <NEW_LINE> <INDENT> view_dict = {'Strength': kw['sheet'].views.maps, 'Hue': ... | Display with small segments the two most preferred orientations for each
units in the sheet. Only orientation with significative selectivity are
shown. Darker segments correspond to orientations with more selective
response. | 62598ef1097d151d1a2bf811 |
class Dataset(Serializable): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.setup_data(**kwargs) <NEW_LINE> super().__init__() <NEW_LINE> <DEDENT> def config(self, **kwargs): <NEW_LINE> <INDENT> super().config(**kwargs) <NEW_LINE> <DEDENT> def setup_data(self, **kwargs): <NEW_LINE> <INDENT> ... | Preparing data for model training and inferencing. | 62598ef1cc0a2c11144797f7 |
class OffRendererVertexInfo(OffRendererElementInfo): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> for _s in [OffRendererElementInfo]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) <NEW_LINE> __setattr__ = lambda self, name, value: _swig_setattr(self, OffRendererVertexInfo, name, value) <NE... | Proxy of C++ FIFE::OffRendererVertexInfo class | 62598ef13539df3088ecaaa3 |
class StatmechDepository(Database): <NEW_LINE> <INDENT> def __init__(self, label='', name='', short_desc='', long_desc=''): <NEW_LINE> <INDENT> Database.__init__(self, label=label, name=name, short_desc=short_desc, long_desc=long_desc) <NEW_LINE> <DEDENT> def load_entry(self, index, label, molecule, statmech, reference... | A class for working with the RMG statistical mechanics (frequencies)
depository. | 62598ef110dbd63aa1c6f36a |
@pytest.mark.draft <NEW_LINE> @pytest.mark.components <NEW_LINE> @pytest.allure.story('Pathfinder_Edge_Device') <NEW_LINE> @pytest.allure.feature('GET') <NEW_LINE> class Test_PFE_Components(object): <NEW_LINE> <INDENT> @pytest.allure.link('https://jira.qumu.com/browse/TC-45316') <NEW_LINE> @pytest.mark.Pathfinder_Edge_... | PFE Pathfinder_Edge_Device test cases. | 62598ef11f5feb6acb161445 |
@types.add_property( 'tab', type=str, doc="The character that pressing tab inserts.") <NEW_LINE> class TextEdit(TextBase): <NEW_LINE> <INDENT> def __init__(self, text='', *, tab='\t', **kwargs): <NEW_LINE> <INDENT> self._prop_tab = '\t' <NEW_LINE> wrapperclass = _get_wrapper('widgets.textwidgets:TextEdit') <NEW_LINE> s... | A multiline text widget.
.. code-block:: none
,-----------.
| Line 0 |
| Line 1 |
| Line 2 |
| Line 3 |
| |
`-----------'
.. note:: The TextEdit widget doesn't work that well right now. I'll
make a better TextEdit widget when I have time and it will
have... | 62598ef12ae34c7f260a98d9 |
class BE06(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> input = open("./Corpus/BE06/BE06.pkl", 'rb') <NEW_LINE> reader = load(input) <NEW_LINE> input.close() <NEW_LINE> <DEDENT> except IOError as e: <NEW_LINE> <INDENT> filelist = [] <NEW_LINE> words = [] <NEW_LINE> for f... | Class for the BE06 Wordlist corpora construction and encapsulation. | 62598ef1be8e80087fbbd842 |
class Polyhedral(VolumeMapper): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def _getmask(pia, wm, polys, shape): <NEW_LINE> <INDENT> from .. import polyutils <NEW_LINE> mask = sparse.csr_matrix((len(wm), np.prod(shape))) <NEW_LINE> from tvtk.api import tvtk <NEW_LINE> measure = tvtk.MassProperties() <NEW_LINE> planes ... | Uses an actual (likely concave) polyhedra betwen the pial and white surfaces
to estimate the thickness | 62598ef17d847024c075abc1 |
class SmoothBivariateSpline(BivariateSpline): <NEW_LINE> <INDENT> def __init__(self, x, y, z, w=None, bbox=[None] * 4, kx=3, ky=3, s=None, eps=None): <NEW_LINE> <INDENT> xb,xe,yb,ye = bbox <NEW_LINE> nx,tx,ny,ty,c,fp,wrk1,ier = dfitpack.surfit_smth(x,y,z,w, xb,xe,yb,ye, kx,ky,s=s, eps=eps,lwrk2=1) <NEW_LINE> if ier in ... | Smooth bivariate spline approximation.
Parameters
----------
x, y, z : array_like
1-D sequences of data points (order is not important).
w : array_like, optional
Positive 1-D sequence of weights, of same length as `x`, `y` and `z`.
bbox : array_like, optional
Sequence of length 4 specifying the boundary of... | 62598ef11b99ca400228e907 |
class WhoisNl(WhoisEntry): <NEW_LINE> <INDENT> regex = { 'name': None, 'address': None, 'zip_code': None, 'city': None, 'country': None } <NEW_LINE> def __init__(self, domain, text): <NEW_LINE> <INDENT> if text.endswith('is free'): <NEW_LINE> <INDENT> raise PywhoisError(text) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDEN... | Whois parser for .nl domains
| 62598ef1a8370b77170eebd6 |
class MailmanSubscribers(ServiceMonitor): <NEW_LINE> <INDENT> model = 'lists.List' <NEW_LINE> verbose_name = _("Mailman subscribers") <NEW_LINE> delete_old_equal_values = True <NEW_LINE> def monitor(self, mail_list): <NEW_LINE> <INDENT> context = self.get_context(mail_list) <NEW_LINE> self.append('echo %(object_id)i $(... | Monitors number of list subscribers via <tt>list_members</tt> | 62598ef17047854f4633dbc4 |
class SystemInfoServerProtocol(WampServerProtocol): <NEW_LINE> <INDENT> uri = "http://system-monitor.com" <NEW_LINE> def onSessionOpen(self): <NEW_LINE> <INDENT> self.infoModel = SystemInfo() <NEW_LINE> self.registerMethodForRpc(self.uri + '/sysInfo.getTotalMemory', self.infoModel, lambda i: self.infoModel.getTotalMemo... | This is simple system info server protocol.
As with other server classes, model is created, when new connection
is established, and deleted when client closes websocket connection | 62598ef19c8ee8231303f553 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.