code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class PickTaretMask(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__layer = Lambda(lambda inputs: self.__pick_target_mask(*inputs) , output_shape=self.__pick_target_mask_output_shape) <NEW_LINE> <DEDENT> def __call__(self, inputs): <NEW_LINE> <INDENT> return self.__layer(inputs) <NEW_LINE> <DEDENT... | TODO : Write description
Pick Target Mask Layer class | 62598ffb0a366e3fb87dd3b0 |
class UrlsMeta(type): <NEW_LINE> <INDENT> def __new__(meta, name, bases, attrs): <NEW_LINE> <INDENT> validators = collections.defaultdict(set) <NEW_LINE> for attr in attrs.values(): <NEW_LINE> <INDENT> if hasattr(attr, "validates"): <NEW_LINE> <INDENT> validators[attr.validates].add(attr) <NEW_LINE> <DEDENT> <DEDENT> a... | This metaclass aggregates the validator functions marked
using the Urls.validate decorator. | 62598ffb187af65679d2a0d8 |
class Publicacao(BlogPost): <NEW_LINE> <INDENT> autoria = models.CharField(max_length=150, verbose_name='Autoria') <NEW_LINE> categorias = models.ManyToManyField(AreaDeAtuacao, verbose_name='Categorias') <NEW_LINE> ano_de_publicacao = models.IntegerField(verbose_name='Ano de publicação', choices=YEAR_CHOICES, default=c... | Publicações relacionadas à temática do site. | 62598ffb15fb5d323ce7f702 |
class PhotoAlbumsResultSet(ResultSet): <NEW_LINE> <INDENT> def get_Response(self): <NEW_LINE> <INDENT> return self._output.get('Response', None) | Retrieve the value for the "Response" output from this choreography execution. (The response from Facebook. Corresponds to the ResponseFormat input. Defaults to JSON.) | 62598ffb3cc13d1c6d46610d |
class IntraChainDistSqLocal(AllParticlePosLocal, analysis_IntraChainDistSq): <NEW_LINE> <INDENT> def __init__(self, system, fpl): <NEW_LINE> <INDENT> if not pmi._PMIComm or pmi._MPIcomm.rank in pmi._PMIComm.getMPIcpugroup(): <NEW_LINE> <INDENT> cxxinit(self, analysis_IntraChainDistSq, system, fpl) <NEW_LINE> <DEDENT> <... | The (local) IntraChainDistSq object | 62598ffb627d3e7fe0e07860 |
class getCoinPurchaseHistory_args(object): <NEW_LINE> <INDENT> thrift_spec = ( None, None, (2, TType.STRUCT, 'request', (CoinHistoryCondition, CoinHistoryCondition.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, request=None,): <NEW_LINE> <INDENT> self.request = request <NEW_LINE> <DEDENT> def read(self, iprot):... | Attributes:
- request | 62598ffb4c3428357761ac6e |
class Insane(object): <NEW_LINE> <INDENT> def __init__(self, stats): <NEW_LINE> <INDENT> self.deaths = stats['deaths_team_insane'] if 'deaths_team_insane' in stats else None <NEW_LINE> self.losses = stats['losses_team_insane'] if 'losses_team_insane' in stats else None <NEW_LINE> self.kills = stats['kills_team_insane']... | The player's teams insane SkyWars stats.
:param stats: The raw SkyWars stats data from the API.
:type stats: dict | 62598ffb0a366e3fb87dd3b8 |
@ui.register_ui( link_facebook_login=ui.Link( By.CSS_SELECTOR, '.list-group-item span[class*="facebook-logo"]'), link_google_login=ui.Link( By.CSS_SELECTOR, '.list-group-item span[class*="google-logo"]'), link_amazon_login=ui.Link( By.CSS_SELECTOR, '.list-group-item span[class*="amazon-logo"]'), link_imdb_login=ui.Link... | Login IMDB page. | 62598ffb627d3e7fe0e07868 |
class TestFunctionsMustbeLowercaseOnly(TestCase): <NEW_LINE> <INDENT> def test_pass_lowercase_call(self): <NEW_LINE> <INDENT> result = run_linter_throw("lowercase_func (ARGUMENT)\n", whitelist=["style/lowercase_func"]) <NEW_LINE> self.assertTrue(result) <NEW_LINE> <DEDENT> def test_fail_uppercase_call(self): <NEW_LINE>... | Test case for functions and macros being lowercase. | 62598ffb187af65679d2a0dd |
class SingleCursorDatabaseConnector(object): <NEW_LINE> <INDENT> def __init__(self, database, host='localhost', port=5439, user='postgres', password='postgres', autocommit=True): <NEW_LINE> <INDENT> self.database = database <NEW_LINE> self.host = host <NEW_LINE> self.port = port <NEW_LINE> self.user = user <NEW_LINE> s... | Wraps the psycopg2 connection and cursor functions to reconnect on close.
SingleCursorDatabaseConnector maintains a single cursor to a psycopg2
database connection. Lazy initialization is used, so all connection and
cursor management happens on the method calls. | 62598ffb4c3428357761ac76 |
class AH_polytope(): <NEW_LINE> <INDENT> def __init__(self,t,T,P,color='blue'): <NEW_LINE> <INDENT> self.T=T <NEW_LINE> self.t=np.atleast_2d(t) <NEW_LINE> self.P=P <NEW_LINE> self.type='AH_polytope' <NEW_LINE> self.n=T.shape[0] <NEW_LINE> if T.shape[1]!=P.H.shape[1]: <NEW_LINE> <INDENT> ValueError("Error: not appropria... | An AH_polytope is an affine transformation of an H-polytope and is defined as:
.. math::
\mathbb{Q}=\{t+Tx | x \in \mathbb{R}^p, H x \le h \}
Attributes:
* P: The underlying H-polytope :math:`P:\{x \in \mathbb{R}^p | Hx \le h\}`
* T: :math:`\mathbb{R}^{n \times p}` matrix: linear transformation
*... | 62598ffb627d3e7fe0e07870 |
class Disableable: <NEW_LINE> <INDENT> def __init__(self, *args, enabled=True, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self.enabled = enabled <NEW_LINE> <DEDENT> def selectable(self): <NEW_LINE> <INDENT> return self.enabled | Mixin to make widgets selectable by setting widget.enabled. | 62598ffb4c3428357761ac7c |
class Admin(User): <NEW_LINE> <INDENT> def __init__(self, first_name, last_name, username, email_address): <NEW_LINE> <INDENT> super().__init__(first_name, last_name, username, email_address) <NEW_LINE> self.privileges = Privileges() | Class describing an Admin user profile. | 62598ffb187af65679d2a0e3 |
class TestableLimitLineParser(LineParserWrapper, lineparsermod.LimitLineParser): <NEW_LINE> <INDENT> pass | Wrapper over LimitLineParser to make it testable. | 62598ffb3cc13d1c6d466123 |
class RaisingJob(NullJob): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> raise RaisingJobException(self.message) | A job that raises when it runs. | 62598ffb627d3e7fe0e07876 |
class Submarine(Ship): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Ship.__init__(self, "submarine", 3) | Submarine piece. | 62598ffb187af65679d2a0e4 |
class MonkeyPatchDefaultTestCase(test.NoDBTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(MonkeyPatchDefaultTestCase, self).setUp() <NEW_LINE> self.flags( monkey_patch=True) <NEW_LINE> <DEDENT> def test_monkey_patch_default_mod(self): <NEW_LINE> <INDENT> for module in CONF.monkey_patch_modules... | Unit test for default monkey_patch_modules value. | 62598ffb3cc13d1c6d466125 |
class AutoscalingLinksTest(ScalingGroupWebhookFixture): <NEW_LINE> <INDENT> def test_scaling_group_links(self): <NEW_LINE> <INDENT> self.assertTrue(self.group.links is not None, msg='No links returned upon scaling group creation' ' for group {0}'.format(self.group.id)) <NEW_LINE> self._validate_links(self.group.links.s... | Verify links on the autoscaling api response calls. | 62598ffb0a366e3fb87dd3cb |
class SocketHandler(websocket.WebSocketHandler): <NEW_LINE> <INDENT> def check_origin(self, origin): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> def open(self): <NEW_LINE> <INDENT> if self not in WSS: <NEW_LINE> <INDENT> WSS.append(self) <NEW_LINE> <DEDENT> <DEDENT> def on_message(self, message): <NEW_LINE> <IN... | The websocket handler defines the basic functionality of the
websockets. Javascript snippet to try in browser:
socket = new WebSocket('ws://127.0.0.1:5000/v1/ws'); | 62598ffb15fb5d323ce7f71c |
class SpatialAnalysisPersonLineCrossingLineEvents(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'line': {'required': True}, } <NEW_LINE> _attribute_map = { 'line': {'key': 'line', 'type': 'NamedLineBase'}, 'events': {'key': 'events', 'type': '[SpatialAnalysisPersonLineCrossingEvent]'}, } <NEW_LINE> d... | SpatialAnalysisPersonLineCrossingLineEvents.
All required parameters must be populated in order to send to Azure.
:ivar line: Required. The named line.
:vartype line: ~azure.media.videoanalyzer.edge.models.NamedLineBase
:ivar events: The event configuration.
:vartype events:
list[~azure.media.videoanalyzer.edge.mode... | 62598ffb4c3428357761ac84 |
class SearchForm(forms.ModelForm): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(SearchForm, self).__init__(*args, **kwargs) <NEW_LINE> default_text = u'Search...' <NEW_LINE> self.fields['query'].widget.attrs['value'] = default_text <NEW_LINE> self.fields['query'].widget.attrs['onfo... | Форма поиска | 62598ffc3cc13d1c6d46612b |
class Forecaster(pl.LightningModule): <NEW_LINE> <INDENT> def __init__(self, num_bands: int, output_timesteps: int, hparams: Namespace,) -> None: <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.output_timesteps = output_timesteps <NEW_LINE> self.lstm = UnrolledLSTM( input_size=num_bands, hidden_size=hparams.fore... | An LSTM based model to predict a multispectral sequence.
:param input_size: The number of input bands passed to the model. The
input vector is expected to be of shape [batch_size, timesteps, bands]
:param output_timesteps: The number of timesteps to predict
hparams
--------
The default values for these parameters... | 62598ffc15fb5d323ce7f724 |
class TestFlatteners(unittest.TestCase): <NEW_LINE> <INDENT> def test_flattener_returns_dict_flattener_for_json(self): <NEW_LINE> <INDENT> testing_file = "./tests/json_testing_sample.json" <NEW_LINE> file_type = get_data_type(testing_file) <NEW_LINE> self.assertEqual(flatteners[file_type], flatten_dict) <NEW_LINE> <DED... | Tests flatenner returned based on Data Type | 62598ffc4c3428357761ac8a |
class AssignPermissionToServiceKeyUserRole(UpgradeStep): <NEW_LINE> <INDENT> def __call__(self): <NEW_LINE> <INDENT> self.install_upgrade_profile() | Assign permission to ServiceKeyUser role.
| 62598ffc0a366e3fb87dd3d9 |
class Pci(extensions.V3APIExtensionBase): <NEW_LINE> <INDENT> name = "PCIAccess" <NEW_LINE> alias = ALIAS <NEW_LINE> version = 1 <NEW_LINE> def get_resources(self): <NEW_LINE> <INDENT> resources = [extensions.ResourceExtension(ALIAS, PciController(), collection_actions={'detail': 'GET'})] <NEW_LINE> return resources <N... | Pci access support. | 62598ffc4c3428357761ac94 |
class JSON(PandasDataFrame): <NEW_LINE> <INDENT> def __init__(self, path, nrecs=1000, transformers=None, **kwargs): <NEW_LINE> <INDENT> super(JSON, self).__init__(pd.read_json(path, **kwargs), nrecs=nrecs, transformers=transformers) | Create a JSON data message handler
Parameters
----------
path : string
Path to JSON file.
nrecs : int, optional
Number of records to send at a time
**kwargs : keyword arguments, optional
Arguments sent to :func:`pandas.read_json`.
See Also
--------
:func:`pandas.read_json`
:class:`PandasDataFrame`
Return... | 62598ffc15fb5d323ce7f730 |
class FluentLoggerFactory: <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def from_url(cls, url): <NEW_LINE> <INDENT> parts = urlsplit(url) <NEW_LINE> if parts.scheme != 'fluent': <NEW_LINE> <INDENT> raise ValueError('Invalid URL: "%s".' % url) <NEW_LINE> <DEDENT> if parts.query or parts.fragment: <NEW_LINE> <INDENT> rais... | For use with ``structlog.configure(logger_factory=...)``. | 62598ffc3cc13d1c6d46613b |
class V1beta1_LivenessProbe(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swaggerTypes = { 'exec_info': 'V1beta1_ExecAction', 'httpGet': 'V1beta1_HTTPGetAction', 'initialDelaySeconds': 'long', 'tcpSocket': 'V1beta1_TCPSocketAction', 'timeoutSeconds': 'long' } <NEW_LINE> self.exec_info = None... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598ffc0a366e3fb87dd3e1 |
class Parameters(object): <NEW_LINE> <INDENT> DOMAIN_ID = build_v3_parameter_relation('domain_id') <NEW_LINE> ENDPOINT_ID = build_v3_parameter_relation('endpoint_id') <NEW_LINE> GROUP_ID = build_v3_parameter_relation('group_id') <NEW_LINE> POLICY_ID = build_v3_parameter_relation('policy_id') <NEW_LINE> PROJECT_ID = bui... | Relationships for Common parameters. | 62598ffc15fb5d323ce7f732 |
class FBFogMode (object): <NEW_LINE> <INDENT> kFBFogModeLinear=property(doc="Linear falloff. ") <NEW_LINE> kFBFogModeExponential=property(doc="Exponential falloff. ") <NEW_LINE> kFBFogModeSquareExponential=property(doc="Squared exponential falloff. ") <NEW_LINE> pass | Fog falloff modes.
| 62598ffc0a366e3fb87dd3e5 |
class Solution(object): <NEW_LINE> <INDENT> def lowestCommonAncestor(self, root, p, q): <NEW_LINE> <INDENT> if not root or root == p or root == q: <NEW_LINE> <INDENT> return root <NEW_LINE> <DEDENT> left = self.lowestCommonAncestor(root.left, p, q) <NEW_LINE> right = self.lowestCommonAncestor(root.right, p, q) <NEW_LIN... | Recursive method: DFS.
If the current (sub)tree contains both p and q, then the function result is their LCA.
If only one of them is in that subtree, then the result is that one of them.
If neither are in that subtree, the result is null/None/nil.
More version can be found here:
https://discuss.leetcode.com/topic/1856... | 62598ffc187af65679d2a0f3 |
class _StorageDefaultObjectAclsRepository( repository_mixins.ListQueryMixin, _base_repository.GCPRepository): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(_StorageDefaultObjectAclsRepository, self).__init__( component='defaultObjectAccessControls', list_key_field='bucket', **kwargs) | Implementation of Storage Default Object Access Controls repository. | 62598ffc0a366e3fb87dd3e7 |
class Classifier(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_channels, num_anchors, num_classes, num_layers, pyramid_levels=5, onnx_export=False): <NEW_LINE> <INDENT> super(Classifier, self).__init__() <NEW_LINE> self.num_anchors = num_anchors <NEW_LINE> self.num_classes = num_classes <NEW_LINE> self.num_laye... | modified by Zylo117 | 62598ffc462c4b4f79dbc3fd |
class SimpleUserListView(ListAPIView): <NEW_LINE> <INDENT> permission_classes = (IsAuthenticatedOrReadOnly,) <NEW_LINE> queryset = SimpleUser.objects.all() <NEW_LINE> serializer_class = SimpleUserSerializer | Show information about users id, username, last_login, last_request | 62598ffc4c3428357761aca0 |
class RegistroE111(Registro): <NEW_LINE> <INDENT> campos = [ CampoFixo(1, 'REG', 'E111'), Campo(2, 'COD_AJ_APUR'), Campo(3, 'DESCR_COMPL_AJ'), CampoNumerico(4, 'VL_AJ_APUR'), ] <NEW_LINE> nivel = 4 | AJUSTE/BENEFÍCIO/INCENTIVO DA APURAÇÃO DO ICMS | 62598ffc4c3428357761aca2 |
class RejectInvitation(AcceptInvitation): <NEW_LINE> <INDENT> def __call__(self, iid=None): <NEW_LINE> <INDENT> if not iid: <NEW_LINE> <INDENT> iid = self.request.get('iid') <NEW_LINE> <DEDENT> self.load(iid) <NEW_LINE> notify(InvitationRejectedEvent(self.target, self.invitation)) <NEW_LINE> self.send_email() <NEW_LINE... | Reject a invitation. Like accept but with different messages
and without partipating. | 62598ffc15fb5d323ce7f73e |
class IdxINDEXNAME(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'idxINDEXNAME' <NEW_LINE> id_idxINDEX = db.Column(db.MediumInteger(9, unsigned=True), db.ForeignKey(IdxINDEX.id), primary_key=True) <NEW_LINE> ln = db.Column(db.Char(5), primary_key=True, server_default='') <NEW_LINE> type = db.Column(db.Char(3), primary... | Represent a IdxINDEXNAME record. | 62598ffc0a366e3fb87dd3ef |
class ImportPlugin(BasePlugin): <NEW_LINE> <INDENT> default_workspace_category = 'Import' <NEW_LINE> pass | Import plugin. | 62598ffc15fb5d323ce7f740 |
class Variables: <NEW_LINE> <INDENT> class __Variables: <NEW_LINE> <INDENT> def __init__(self, tupel=None): <NEW_LINE> <INDENT> for x in tupel._fields: <NEW_LINE> <INDENT> setattr(self, x, tupel.__getattribute__(x)) <NEW_LINE> <DEDENT> <DEDENT> <DEDENT> instance=None <NEW_LINE> def __init__(self, tupel=None): <NEW_LINE... | Singleton-Object | 62598ffd462c4b4f79dbc405 |
class IsDigit(FieldValidator): <NEW_LINE> <INDENT> regex = re.compile('^-{0,1}[0-9]+$') <NEW_LINE> def validate_value(self): <NEW_LINE> <INDENT> if not self.value: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> return re.search(self.regex, self.value) is not None | Will fail if value is not a digit. | 62598ffd15fb5d323ce7f741 |
class _LDAPQuery(object): <NEW_LINE> <INDENT> def __init__(self, base_dn, filter_tmpl, scope, attributes, cache_period): <NEW_LINE> <INDENT> self.base_dn = base_dn <NEW_LINE> self.filter_tmpl = filter_tmpl <NEW_LINE> self.scope = scope <NEW_LINE> self.attributes = attributes <NEW_LINE> self.cache_period = cache_period ... | Represents an LDAP query.
Provides rudimentary in-RAM caching of query results. | 62598ffd187af65679d2a0f9 |
class Contribution(models.Model): <NEW_LINE> <INDENT> applicant = models.ForeignKey(ApplicantApproval, on_delete=models.CASCADE) <NEW_LINE> project = models.ForeignKey(Project, on_delete=models.PROTECT) <NEW_LINE> date_started = models.DateField(verbose_name="Date contribution was started") <NEW_LINE> date_merged = mod... | An Outreachy applicant must make contributions to a project in order to be
eligible to be accepted as an intern. The Contribution model is a record
of that contribution that the applicant submits to the Outreachy website.
Contributions are recorded from the start of the contribution period to
when the final application... | 62598ffd15fb5d323ce7f748 |
class TransparencySetting(Element): <NEW_LINE> <INDENT> BlendingSetting = EmbeddedDocumentField(BlendingSetting) <NEW_LINE> DropShadowSetting = EmbeddedDocumentField(DropShadowSetting) <NEW_LINE> FeatherSetting = EmbeddedDocumentField(FeatherSetting) <NEW_LINE> InnerShadowSetting = EmbeddedDocumentField(InnerShadowSett... | You can apply transparency effects to page items in an InDesign layout. In
IDML, you accomplish this using the <TransparencySetting> element. A child
element (or elements) of this element specify the transparency effect you
want to apply. | 62598ffd187af65679d2a0ff |
class Mqtt(BaseShellyAttribute): <NEW_LINE> <INDENT> def __init__(self, json_def=None): <NEW_LINE> <INDENT> if json_def is None: <NEW_LINE> <INDENT> json_obj = {} <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> json_obj = json.loads(json_def) <NEW_LINE> <DEDENT> self.__dict__ = json_obj <NEW_LINE> self.connected = False ... | Represents Mqtt attributes | 62598ffd462c4b4f79dbc415 |
class BaseResponseInfoExtractor: <NEW_LINE> <INDENT> def __new__(cls, *arg, **kwargs): <NEW_LINE> <INDENT> if not hasattr(cls, '_instance'): <NEW_LINE> <INDENT> cls._instance = object.__new__(cls) <NEW_LINE> <DEDENT> return cls._instance <NEW_LINE> <DEDENT> def get_status_code(self, response): <NEW_LINE> <INDENT> raise... | Helper class help to extract logging-relevant information from HTTP response object | 62598ffd4c3428357761acb6 |
class FunctionSubTests(unittest.TestCase): <NEW_LINE> <INDENT> def testSub(self): <NEW_LINE> <INDENT> g = Function.Function_xn(4)+Function.Function_xn(3)+Function.Function_xn(2)+Function.Function_xn(1) <NEW_LINE> for x in range (2,11): <NEW_LINE> <INDENT> r = randint(2,x) <NEW_LINE> t = Function.Function_xn(randint(1,4... | Test + overloads | 62598ffd15fb5d323ce7f752 |
class Builder(object): <NEW_LINE> <INDENT> def __init__(self, element): <NEW_LINE> <INDENT> if not isinstance(element, xml4h.nodes.Element): <NEW_LINE> <INDENT> raise ValueError( "Builder can only be created with an %s.%s instance, not %s" % (xml4h.nodes.Element.__module__, xml4h.nodes.Element.__name__, element)) <NEW_... | Builder class that wraps an :class:`xml4h.nodes.Element` node with methods
for adding XML content to an underlying DOM. | 62598ffd3cc13d1c6d46615c |
class ComponentConfig(object): <NEW_LINE> <INDENT> __slots__ = ( 'realm', 'extra', 'keyring', 'controller', 'shared' ) <NEW_LINE> def __init__(self, realm=None, extra=None, keyring=None, controller=None, shared=None): <NEW_LINE> <INDENT> assert(realm is None or type(realm) == six.text_type) <NEW_LINE> self.realm = real... | WAMP application component configuration. An instance of this class is
provided to the constructor of :class:`autobahn.wamp.protocol.ApplicationSession`. | 62598ffd627d3e7fe0e078b1 |
class TestResourceConfiguration(BaseRuleTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(TestResourceConfiguration, self).setUp() <NEW_LINE> self.collection.register(Required()) <NEW_LINE> <DEDENT> def test_file_positive(self): <NEW_LINE> <INDENT> self.helper_file_positive() <NEW_LINE> <DEDENT>... | Test Resource Properties | 62598ffd3cc13d1c6d46615e |
class AttentionBlock(torch.nn.Module): <NEW_LINE> <INDENT> def __init__(self, size): <NEW_LINE> <INDENT> super(AttentionBlock, self).__init__() <NEW_LINE> self.atten_e2v = Attention(size) <NEW_LINE> self.atten_v2e = Attention(size) <NEW_LINE> <DEDENT> def forward(self, nodes, edges, adjacency, incidence): <NEW_LINE> <I... | Attention Block | 62598ffd462c4b4f79dbc419 |
class ResistantVirus(SimpleVirus): <NEW_LINE> <INDENT> def __init__(self, maxBirthProb, clearProb, resistances, mutProb): <NEW_LINE> <INDENT> super().__init__(maxBirthProb, clearProb) <NEW_LINE> self.resistances = resistances <NEW_LINE> self.mutProb = float(mutProb) <NEW_LINE> <DEDENT> def getResistance(self, drug): <N... | Representation of a virus which can have drug resistance. | 62598ffd0a366e3fb87dd407 |
class Package(models.Model): <NEW_LINE> <INDENT> class Meta(object): <NEW_LINE> <INDENT> managed = False <NEW_LINE> verbose_name = _("Package") <NEW_LINE> verbose_name_plural = _("Packages") <NEW_LINE> db_table = "package_view" <NEW_LINE> <DEDENT> c_name = models.CharField( verbose_name=_("Name"), max_length=255, ) <NE... | DCRM Proxy Model: Package | 62598ffd627d3e7fe0e078b7 |
class DatasetBase(object): <NEW_LINE> <INDENT> def __init__(self, json_path_input, json_path_labels, data_root, extension, is_test=False): <NEW_LINE> <INDENT> self.json_path_input = json_path_input <NEW_LINE> self.json_path_labels = json_path_labels <NEW_LINE> self.data_root = data_root <NEW_LINE> self.extension = exte... | To read json data and construct a list containing video sample `ids`,
`label` and `path` | 62598ffd4c3428357761acbe |
class SenseNet(nn.Module): <NEW_LINE> <INDENT> def __init__(self, input_dim=600, supersenses=None, transform=False): <NEW_LINE> <INDENT> super(SenseNet, self).__init__() <NEW_LINE> self.input_dim = input_dim <NEW_LINE> self.supersenses = supersenses <NEW_LINE> self.stoi = {s: i for i, s in enumerate(self.supersenses)} ... | Network component that predicts one of 41 possible discrete
WordNet supersense tags. Input is bilstm hidden state (or
possibly concatenation of two hidden states).
Information about the 41 supersense tags are here:
https://dl.acm.org/citation.cfm?id=1610158 | 62598ffd15fb5d323ce7f75a |
class PcapConnectionWrapper: <NEW_LINE> <INDENT> def __init__(self, conn, pcap_file): <NEW_LINE> <INDENT> self.conn = conn <NEW_LINE> self.pcap_file = pcap_file <NEW_LINE> can.pcap.write_header(self.pcap_file) <NEW_LINE> <DEDENT> def send_frame(self, frame): <NEW_LINE> <INDENT> can.pcap.write_frame(self.pcap_file, time... | Connection wrapper which logs all frames sent and received into a wireshark
compatible pcap file. | 62598ffd187af65679d2a106 |
class Region(object): <NEW_LINE> <INDENT> def __init__(self, pos, size, tool=None, color=None): <NEW_LINE> <INDENT> self.rect = Rectangle(pos, size) <NEW_LINE> self.tool = tool <NEW_LINE> self.color = color <NEW_LINE> self.last_value = None <NEW_LINE> self.last_snapshot = None <NEW_LINE> <DEDENT> def take_snapshot(self... | This is the top level scraping tool. | 62598ffd627d3e7fe0e078bd |
class LearningAgent(Agent): <NEW_LINE> <INDENT> def __init__(self, env, learning=False, epsilon=1.0, alpha=0.5): <NEW_LINE> <INDENT> super(LearningAgent, self).__init__(env) <NEW_LINE> self.planner = RoutePlanner(self.env, self) <NEW_LINE> self.valid_actions = self.env.valid_actions <NEW_LINE> self.learning = learning ... | An agent that learns to drive in the Smartcab world.
This is the object you will be modifying. | 62598ffe0a366e3fb87dd411 |
class FSLiveCommand(RemoteCommand): <NEW_LINE> <INDENT> GLOBAL_EH = None <NEW_LINE> LOCAL_EH = None <NEW_LINE> CRITICAL = False <NEW_LINE> TARGET_STATUS_RC_MAP = { } <NEW_LINE> def fs_status_to_rc(self, status): <NEW_LINE> <INDENT> return self.TARGET_STATUS_RC_MAP.get(status, RC_RUNTIME_ERROR) <NEW_LINE> <DEDENT> def _... | shine <cmd> [-f <fsname>] [-n <nodes>] [-dqv]
'CRITICAL' could be set if command will run action that can
damage filesystems. | 62598ffe15fb5d323ce7f762 |
class Field(Bet): <NEW_LINE> <INDENT> def __init__(self, bet_amount, double=[2, 12], triple=[]): <NEW_LINE> <INDENT> self.name = "Field" <NEW_LINE> self.double_winning_numbers = double <NEW_LINE> self.triple_winning_numbers = triple <NEW_LINE> self.winning_numbers = [2, 3, 4, 9, 10, 11, 12] <NEW_LINE> self.losing_numbe... | Parameters
----------
double : list
Set of numbers that pay double on the field bet (default = [2,12])
triple : list
Set of numbers that pay triple on the field bet (default = []) | 62598ffe0a366e3fb87dd415 |
class Book(models.Model): <NEW_LINE> <INDENT> ref = models.IntegerField() <NEW_LINE> iban = models.CharField(max_length=100) <NEW_LINE> name = models.CharField(max_length=250) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return "{book.name} (ref: {book.ref}, iban: {book.iban})" <NEW_LINE> <DEDENT> class ReadonlyMe... | A completely different model | 62598ffe462c4b4f79dbc42a |
class _Module: <NEW_LINE> <INDENT> def GetIDsOfNames(self,riid,rgszNames,cNames,lcid,rgDispId): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def GetTypeInfo(self,iTInfo,lcid,ppTInfo): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def GetTypeInfoCount(self,pcTInfo): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def Invoke... | Exposes the System.Reflection.Module class to unmanaged code. | 62598ffe15fb5d323ce7f76a |
class XLSReader(DataReader): <NEW_LINE> <INDENT> types = ("xls", "xlsx") <NEW_LINE> def __init__(self, filename=None): <NEW_LINE> <INDENT> super(XLSReader, self).__init__(filename) <NEW_LINE> if not xlrd: <NEW_LINE> <INDENT> print('**********************************************************') <NEW_LINE> print('You need ... | XLS/XLSX file's reader. | 62598ffe187af65679d2a10d |
class NodeStats(InternalTelemetryDevice): <NEW_LINE> <INDENT> def __init__(self, config, metrics_store): <NEW_LINE> <INDENT> super().__init__(config, metrics_store) <NEW_LINE> self.cluster = None <NEW_LINE> <DEDENT> def attach_to_cluster(self, cluster): <NEW_LINE> <INDENT> self.cluster = cluster <NEW_LINE> <DEDENT> def... | Gathers statistics via the Elasticsearch nodes stats API | 62598ffe0a366e3fb87dd41b |
class Message(object): <NEW_LINE> <INDENT> def __init__(self, message, numbers=None, group_id=None, schedule_time=None, optouts=False): <NEW_LINE> <INDENT> self.message = message <NEW_LINE> if numbers is None and group_id is None: <NEW_LINE> <INDENT> raise Exception('numbers or group_id must be set.') <NEW_LINE> <DEDEN... | Base message class
Attributes:
message: The message content.
numbers: A List of numbers to send the message to.
group_id: The group_id to send the message to. Overrides numbers.
schedule_time: A datetime object specifying when to send the message.
optouts: A Boolean setting whether to check the rec... | 62598ffe4c3428357761acd2 |
class DbfMemoFieldDef(DbfFieldDef): <NEW_LINE> <INDENT> typeCode = "M" <NEW_LINE> defaultValue = " " * 10 <NEW_LINE> length = 10 <NEW_LINE> def decodeValue(self, value): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def encodeValue(self, value): <NEW_LINE> <INDENT> raise NotImplementedError | Definition of the memo field.
Note: memos aren't currently completely supported. | 62598ffe462c4b4f79dbc432 |
class ShoppingCartViewSet(XBModelViewSet): <NEW_LINE> <INDENT> permission_classes = [IsAuthenticated,IsOwnerOrReadOnly] <NEW_LINE> authentication_classes = [JSONWebTokenAuthentication,SessionAuthentication] <NEW_LINE> serializer_class = ShopCartListSerializer <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> num =... | list:
获取购物车详情
create:
加入购物车
delete:
删除购物记录
update:
更新购物记录 | 62598ffe15fb5d323ce7f76e |
class UserImageForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = UserProfile <NEW_LINE> fields = ['profile_img'] <NEW_LINE> labels = { 'profile_img': _("Profile image") } <NEW_LINE> <DEDENT> def clean_profile_img(self): <NEW_LINE> <INDENT> return resize_img(self.cleaned_data["profile_im... | Form used for changing the profile picture
It is a model form, containing only one field - profile_img | 62598ffe462c4b4f79dbc434 |
class UserCreationForm(forms.ModelForm): <NEW_LINE> <INDENT> email = forms.EmailField(label='Email', widget=forms.EmailInput({'placeholder': 'Enter Email:'}), required=True) <NEW_LINE> password1 = forms.CharField(label='Password', widget=forms.PasswordInput) <NEW_LINE> password2 = forms.CharField(label='Password confir... | Repeat password are not in model, so implemented as fields | 62598ffe15fb5d323ce7f770 |
class InlineResponse2002(object): <NEW_LINE> <INDENT> swagger_types = { 'code': 'int', 'error': 'str', 'message': 'list[InlineResponse2002Message]' } <NEW_LINE> attribute_map = { 'code': 'code', 'error': 'error', 'message': 'message' } <NEW_LINE> def __init__(self, code=None, error=None, message=None): <NEW_LINE> <INDE... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598ffe187af65679d2a110 |
class SavedMetricsException(Exception): <NEW_LINE> <INDENT> pass | Raise this exception if there's a problem recovering the saved metric
list from the statedir. This will always happen on the first run, and
should be ignored. On subsequent runs, it probably means a config
problem where the statedir can't be written or something. | 62598ffe187af65679d2a114 |
class DirModel(UsageStats, QtCore.QAbstractListModel): <NEW_LINE> <INDENT> def __init__(self, *args): <NEW_LINE> <INDENT> UsageStats.__init__(self) <NEW_LINE> QtCore.QAbstractListModel.__init__(self, *args) <NEW_LINE> self._viewMode = 0 <NEW_LINE> self.dir = QtCore.QDir() <NEW_LINE> self.dir.setFilter(QtCore.QDir.AllDi... | Directory list browser | 62598ffe0a366e3fb87dd42b |
class Link(Resource): <NEW_LINE> <INDENT> href = wtypes.text <NEW_LINE> target = wtypes.text <NEW_LINE> rel = wtypes.text | Web link. | 62598ffe462c4b4f79dbc441 |
class producer: <NEW_LINE> <INDENT> def __iter__(self): <NEW_LINE> <INDENT> self.lst = flow.wrap(slowlist([1,2,3])) <NEW_LINE> self.nam = flow.wrap(slowlist(_onetwothree)) <NEW_LINE> self.next = self.yield_lst <NEW_LINE> return self <NEW_LINE> <DEDENT> def yield_lst(self): <NEW_LINE> <INDENT> self.next = self.yield... | iterator version of the following generator...
def producer():
lst = flow.wrap(slowlist([1,2,3]))
nam = flow.wrap(slowlist(_onetwothree))
while True:
yield lst
yield nam
yield (lst.next(),nam.next()) | 62598ffe627d3e7fe0e078dc |
class GeohashLocator(ALocator): <NEW_LINE> <INDENT> def __init__(self, itemCollection): <NEW_LINE> <INDENT> if itemCollection == None: <NEW_LINE> <INDENT> raise ValueError() <NEW_LINE> <DEDENT> self.container = GeohashContainer(itemCollection) <NEW_LINE> <DEDENT> def Search(self, lat, lng, radiusMeters): <NEW_LINE> <IN... | A class which can be used to locate points within specified radius of a center
This particular type of Locator uses geohashing for fast searches.
However, results usually also include locations which are slightly more distant than desired.
Consider using HybridLocator which runs a search with GeohashLocator and further... | 62598ffe0a366e3fb87dd42f |
class GemRequirement(PackageRequirement): <NEW_LINE> <INDENT> REQUIREMENTS = {ExecutableRequirement('gem')} <NEW_LINE> def __init__(self, package, version="", require=""): <NEW_LINE> <INDENT> PackageRequirement.__init__(self, 'gem', package, version) <NEW_LINE> self.require = require <NEW_LINE> <DEDENT> def install_com... | This class is a subclass of ``PackageRequirement``. It specifies the proper
type for ``ruby`` packages automatically and provide a function to check
for the requirement. | 62598ffe187af65679d2a118 |
class DefaultClause(FetchedValue): <NEW_LINE> <INDENT> has_argument = True <NEW_LINE> def __init__(self, arg, for_update=False, _reflected=False): <NEW_LINE> <INDENT> util.assert_arg_type(arg, (util.string_types[0], expression.ClauseElement, expression.TextClause), 'arg') <NEW_LINE> super(DefaultClause, self).__init__(... | A DDL-specified DEFAULT column value.
:class:`.DefaultClause` is a :class:`.FetchedValue`
that also generates a "DEFAULT" clause when
"CREATE TABLE" is emitted.
:class:`.DefaultClause` is generated automatically
whenever the ``server_default``, ``server_onupdate`` arguments of
:class:`.Column` are used. A :class:`.D... | 62598fff4c3428357761ace6 |
class ModelChoiceField(ChoiceField): <NEW_LINE> <INDENT> default_error_messages = { 'invalid_choice': _('Select a valid choice. That choice is not one of' ' the available choices.'), } <NEW_LINE> iterator = ModelChoiceIterator <NEW_LINE> def __init__(self, queryset, empty_label="---------", required=True, widget=None, ... | A ChoiceField whose choices are a model QuerySet. | 62598fff0a366e3fb87dd433 |
class MellanoxDirectPlugin(plugin.PluginBase): <NEW_LINE> <INDENT> def __init__(self, **config): <NEW_LINE> <INDENT> processutils.configure(**config) <NEW_LINE> <DEDENT> def get_supported_vifs(self): <NEW_LINE> <INDENT> return set([objects.PluginVIFSupport(PLUGIN_NAME, '1.0', '1.0')]) <NEW_LINE> <DEDENT> def plug(self,... | A VIF type that plugs the interface directly into the Mellanox physical
network fabric. | 62598fff4c3428357761ace8 |
class ExtendingSender(Sender, ABC): <NEW_LINE> <INDENT> def __init__(self, sender: Optional[Sender]): <NEW_LINE> <INDENT> self.sender = sender or SyncSender() <NEW_LINE> <DEDENT> @property <NEW_LINE> def is_async(self) -> bool: <NEW_LINE> <INDENT> return self.sender.is_async <NEW_LINE> <DEDENT> def close(self) -> Union... | Base class for senders that extend other senders.
Parameters
----------
sender
request sender, :class:`SyncSender` if not specified | 62598fff627d3e7fe0e078e2 |
class BatteryNotifier(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, parent, device_id, device_name): <NEW_LINE> <INDENT> super(BatteryNotifier, self).__init__() <NEW_LINE> self.event = threading.Event() <NEW_LINE> if notify2 is not None: <NEW_LINE> <INDENT> notify2.init('razer_daemon') <NEW_LINE> <DEDENT> s... | Thread to notify about battery | 62598fff3cc13d1c6d466190 |
class IntegerSlider(Slider): <NEW_LINE> <INDENT> DISCRETE = True <NEW_LINE> @staticmethod <NEW_LINE> def value_to_number(x): <NEW_LINE> <INDENT> if not isinstance(x, int): <NEW_LINE> <INDENT> raise TypeError('expected int, got {}'.format(type(x).__name__)) <NEW_LINE> <DEDENT> return x <NEW_LINE> <DEDENT> @staticmethod ... | A type of :class:`Slider` that accepts only integer values/bounds. | 62598fff15fb5d323ce7f788 |
class ArtemiaMap: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._graph = None <NEW_LINE> self._cards = None <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_place_cards(cls, cards: List[MapPlaceCard]) -> 'ArtemiaMap': <NEW_LINE> <INDENT> cards_len = len(cards) <NEW_LINE> if cards_len != 10: <NEW_... | The Artemia map class. | 62598fff462c4b4f79dbc44f |
class InstrumentationManager(object): <NEW_LINE> <INDENT> def __init__(self, class_): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def manage(self, class_, manager): <NEW_LINE> <INDENT> setattr(class_, '_default_class_manager', manager) <NEW_LINE> <DEDENT> def dispose(self, class_, manager): <NEW_LINE> <INDENT> delattr... | User-defined class instrumentation extension.
:class:`.InstrumentationManager` can be subclassed in order
to change
how class instrumentation proceeds. This class exists for
the purposes of integration with other object management
frameworks which would like to entirely modify the
instrumentation methodology of the OR... | 62598fff187af65679d2a11e |
class MatchLSTMAttention(torch.nn.Module): <NEW_LINE> <INDENT> def __init__(self, input_p_dim, input_q_dim, output_dim): <NEW_LINE> <INDENT> super(MatchLSTMAttention, self).__init__() <NEW_LINE> self.input_p_dim = input_p_dim <NEW_LINE> self.input_q_dim = input_q_dim <NEW_LINE> self.output_dim = output_dim <NEW_LINE> s... | input: p (passage): batch x inp_p
passage_lengths
q (question) batch x time x inp_q
question lengths
h_tm1: batch x out (Output hidden state)
depth: int
output: z: batch x inp_p+inp_q | 62598fff3cc13d1c6d466194 |
class Schedule: <NEW_LINE> <INDENT> def __init__(self, start_date: datetime = None, end_date: datetime = None): <NEW_LINE> <INDENT> if start_date is not None: <NEW_LINE> <INDENT> start_date = pendulum.instance(start_date) <NEW_LINE> <DEDENT> if end_date is not None: <NEW_LINE> <INDENT> end_date = pendulum.instance(end_... | Base class for Schedules
Args:
- start_date (datetime, optional): an optional start date for the schedule
- end_date (datetime, optional): an optional end date for the schedule | 62598fff462c4b4f79dbc451 |
class ClientApiClient(MetaApiClient): <NEW_LINE> <INDENT> def __init__(self, http_client, token: str, domain: str = 'agiliumtrade.agiliumtrade.ai'): <NEW_LINE> <INDENT> super().__init__(http_client, token, domain) <NEW_LINE> self._host = f'https://mt-client-api-v1.{domain}' <NEW_LINE> <DEDENT> async def get_hashing_ign... | metaapi.cloud client API client (see https://metaapi.cloud/docs/client/) | 62598fff0a366e3fb87dd43e |
class HasVerbosity(Params): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(HasVerbosity, self).__init__() <NEW_LINE> self.verbose = Param(self, "verbose", "Stdout verbosity") <NEW_LINE> self._setDefault(verbose=0) <NEW_LINE> <DEDENT> def set_verbosity(self, verbose): <NEW_LINE> <INDENT> self._paramMa... | Parameter mixin for output verbosity
| 62598fff4c3428357761acf5 |
class FitExperiment(Experiment): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.initialized = False <NEW_LINE> self.__dict__.update(kwargs) <NEW_LINE> req_param(self, ['dataset', 'model']) <NEW_LINE> opt_param(self, ['backend']) <NEW_LINE> opt_param(self, ['live'], False) <NEW_LINE> if self.... | In this `Experiment`, a model is trained on a training dataset to
learn a set of parameters
Note that a pre-fit model may be loaded depending on serialization
parameters (rather than learning from scratch). The same may also apply to
the datasets specified.
Keyword Args:
backend (neon.backends.Backend): The back... | 62598fff627d3e7fe0e078ee |
class AlueponIdentity(IanaInterfaceTypeIdentity): <NEW_LINE> <INDENT> _prefix = 'ianaift' <NEW_LINE> _revision = '2014-05-08' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> IanaInterfaceTypeIdentity.__init__(self) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def _meta_info(): <NEW_LINE> <INDENT> from ydk.models.iet... | Ethernet Passive Optical Networks (E\-PON). | 62598fff462c4b4f79dbc459 |
class MaxMindGeoWebClient(geoip2.webservice.Client, GeoIpClientAdapter): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._account_id = current_app.config.get('MAXMIND_WEB_ACCOUNT_ID') <NEW_LINE> self._license_key = current_app.config.get('MAXMIND_WEB_LICENSE_KEY') <NEW_LINE> self._host = current_app.co... | A GeoIP client using the MaxMind web service api. | 62598fff187af65679d2a123 |
class vtkDataArrayFromNumPyMultiArray(vtkDataArrayFromNumPyBuffer): <NEW_LINE> <INDENT> def __init__(self, vtk_class, ctype, data=None, buffered=True): <NEW_LINE> <INDENT> self.buffered = buffered <NEW_LINE> vtkDataArrayFromNumPyBuffer.__init__(self, vtk_class, ctype, data) <NEW_LINE> <DEDENT> def read_numpy_array(self... | Class for reading vtkDataArray from a multi-dimensional NumPy array.
This class can be used to generate a vtkDataArray from a NumPy array.
The NumPy array should be of the form <gridsize> x <number of components>
where 'number of components' indicates the number of components in
each gridpoint in the vtkDataArray. No... | 62598fff3cc13d1c6d4661a2 |
class ZF: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> if config.random: <NEW_LINE> <INDENT> with_random_url = safe_get(config.zf_url).url <NEW_LINE> _random = with_random_url.split('/')[-2] <NEW_LINE> self.base_url=config.zf_url+_random+'/' <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.base_url = c... | 处理用户第一次请求时的数据
| 62598fff627d3e7fe0e078f7 |
class Solution: <NEW_LINE> <INDENT> def fail_MLE_minPathSum(self, grid): <NEW_LINE> <INDENT> length_row = len(grid) <NEW_LINE> length_column = len(grid[0]) <NEW_LINE> if length_row == 1: <NEW_LINE> <INDENT> return sum(grid[0]) <NEW_LINE> <DEDENT> if length_column == 1: <NEW_LINE> <INDENT> sum_min = 0 <NEW_LINE> for row... | @param grid: a list of lists of integers.
@return: An integer, minimizes the sum of all numbers along its path | 62598fff3cc13d1c6d4661a5 |
class CallsFilter(object): <NEW_LINE> <INDENT> def __call__(self, occurrence): <NEW_LINE> <INDENT> if not occurrence.is_called(): <NEW_LINE> <INDENT> return False | Filter out non-call occurrences. | 62598fff3cc13d1c6d4661a7 |
class __Backend: <NEW_LINE> <INDENT> def __init__(self, backend_c): <NEW_LINE> <INDENT> self.__backend_c = backend_c <NEW_LINE> <DEDENT> def __del__(self): <NEW_LINE> <INDENT> connect_lib().marky_backend_free(self.__backend_c) <NEW_LINE> <DEDENT> def backend_c(self): <NEW_LINE> <INDENT> return self.__backend_c | A container for a Marky Backend.
Do not instantiate directly, instead create Backend instances using backend_*(). | 62598fff0a366e3fb87dd450 |
class LogHandler(logging.Handler): <NEW_LINE> <INDENT> def __init__(self, request, level=logging.INFO): <NEW_LINE> <INDENT> logging.Handler.__init__(self, level) <NEW_LINE> self.request = request <NEW_LINE> <DEDENT> def emit(self, record): <NEW_LINE> <INDENT> entry = self.format(record) <NEW_LINE> status = record.level... | Log handler
Logs information to the log table in the system database. | 62598fff462c4b4f79dbc465 |
class CIVulnScan(BackgroundSubProcess): <NEW_LINE> <INDENT> cmd = ["ci-vulnscan"] <NEW_LINE> def _parse_args(self, *args, project_path: str = None): <NEW_LINE> <INDENT> if not project_path: <NEW_LINE> <INDENT> raise Exception("No project path given") <NEW_LINE> <DEDENT> args = ['--project-path', project_path] <NEW_LINE... | Executed ci-build with a custom build command | 6259900015fb5d323ce7f7a4 |
class AttributeList(NodeListBase): <NEW_LINE> <INDENT> _list_item_type = Attribute | Represents a list attributes. | 625990003cc13d1c6d4661ae |
class BaseGeometry(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def area(self): <NEW_LINE> <INDENT> raise Exception("area() is not implemented") <NEW_LINE> <DEDENT> def integer_validator(self, name, value): <NEW_LINE> <INDENT> if (type(value) is not int): <NEW_LINE> <INDENT> r... | "
Template for a base geometry object | 6259900015fb5d323ce7f7a8 |
class Structure(object): <NEW_LINE> <INDENT> __slots__ = [ 'title', 'atms', 'bonds', 'latt_vecs' ] <NEW_LINE> def __init__(self, title): <NEW_LINE> <INDENT> self.title = title <NEW_LINE> self.atms = [] <NEW_LINE> self.bonds = [] <NEW_LINE> self.latt_vecs = [] <NEW_LINE> <DEDENT> def extend_atms(self, atms_iter): <NEW_L... | Chemical structure class
This class are for storing the enough information for plotting a structure
out by using pov-ray. So it is at the central position of this piece of
code, with readers generating its instances from the input file, and
plotters writes the pov-ray files based on the information stored in its
insta... | 62599000462c4b4f79dbc47f |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.