code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class SageVideo(BaseVideo): <NEW_LINE> <INDENT> def __init__(self, mf, log): <NEW_LINE> <INDENT> BaseVideo.__init__(self) <NEW_LINE> self.watchedStartTime = 0 <NEW_LINE> self.watchedEndTime = 0 <NEW_LINE> self.realWatchedStartTime = 0 <NEW_LINE> self.realWatchedEndTime = 0 <NEW_LINE> airing = mf.get('Airing') <NEW_LINE... | Class that represents a SageTV video object | 6259904fec188e330fdf9d27 |
class TripletLoss(nn.Module): <NEW_LINE> <INDENT> def __init__(self, margin=0.3, distance='consine', use_gpu=True): <NEW_LINE> <INDENT> super(TripletLoss, self).__init__() <NEW_LINE> if distance not in ['euclidean', 'consine']: <NEW_LINE> <INDENT> raise KeyError("Unsupported distance: {}".format(distance)) <NEW_LINE> <... | Triplet loss with hard positive/negative mining.
Reference:
Hermans et al. In Defense of the Triplet Loss for Person Re-Identification. arXiv:1703.07737.
Code imported from https://github.com/Cysu/open-reid/blob/master/reid/loss/triplet.py.
Args:
margin (float): margin for triplet. | 6259904f7b25080760ed8722 |
class Parameter(DriverParameter): <NEW_LINE> <INDENT> INTERVAL = 'SampleInterval' <NEW_LINE> INSTRUMENT_SERIES = 'InstrumentSeries' | Device specific parameters for THSPH. | 6259904f6fece00bbaccce44 |
class _BitmapTools(object): <NEW_LINE> <INDENT> CROP_PIXELS = 0 <NEW_LINE> HISTOGRAM = 1 <NEW_LINE> BOUNDING_BOX = 2 <NEW_LINE> def __init__(self, dimensions, pixels): <NEW_LINE> <INDENT> binary = './bitmaptools' <NEW_LINE> assert os.path.exists(binary), 'You must build bitmaptools first!' <NEW_LINE> self._popen = subp... | Wraps a child process of bitmaptools and allows for one command. | 6259904f23e79379d538d986 |
class SecondaryIndexingLatencyTest(SecondaryIndexTest): <NEW_LINE> <INDENT> @with_stats <NEW_LINE> def apply_scanworkload(self): <NEW_LINE> <INDENT> rest_username, rest_password = self.cluster_spec.rest_credentials <NEW_LINE> logger.info('Initiating the scan workload') <NEW_LINE> cmdstr = "cbindexperf -cluster {} -auth... | This test applies scan workload against a 2i server and measures
the indexing latency | 6259904f7cff6e4e811b6ec5 |
class CleanSummer(): <NEW_LINE> <INDENT> def clean_text(self): <NEW_LINE> <INDENT> data = self.cleaned_data['text'] <NEW_LINE> max_length = self.summer_max_length <NEW_LINE> cleaned = cleanText(data) <NEW_LINE> if len(cleaned)>max_length: <NEW_LINE> <INDENT> raise ValidationError("This text has length "+str(len(cleaned... | Assumes the plugin Summernote is being used as a widget for a field called text,
which this class then implements the cleaning method for | 6259904f6e29344779b01acd |
class _GroupObserver(object): <NEW_LINE> <INDENT> def __init__(self, group): <NEW_LINE> <INDENT> self.group = group <NEW_LINE> self._observed = {} <NEW_LINE> self._unobserved = set() <NEW_LINE> self._init_connections() <NEW_LINE> <DEDENT> def _observe(self, actor): <NEW_LINE> <INDENT> add_handler = actor.connect("actor... | Helper class for Group. This class observes all group descendants. When
subgroup change it schedules update in scanning seqence. | 6259904f23849d37ff852548 |
class Comparator: <NEW_LINE> <INDENT> def equals(self, rhs): <NEW_LINE> <INDENT> raise NotImplementedError('method must be implemented by a subclass.') <NEW_LINE> <DEDENT> def __eq__(self, rhs): <NEW_LINE> <INDENT> return self.equals(rhs) <NEW_LINE> <DEDENT> def __ne__(self, rhs): <NEW_LINE> <INDENT> return not self.eq... | Base class for all Mox comparators.
A Comparator can be used as a parameter to a mocked method when the exact
value is not known. For example, the code you are testing might build up
a long SQL string that is passed to your mock DAO. You're only interested
that the IN clause contains the proper primary keys, so you... | 6259904f8da39b475be0466f |
class InsertChartMixin: <NEW_LINE> <INDENT> def insert_chart( self, slice_name: str, owners: List[int], datasource_id: int, created_by=None, datasource_type: str = "table", description: Optional[str] = None, viz_type: Optional[str] = None, params: Optional[str] = None, cache_timeout: Optional[int] = None, certified_by:... | Implements shared logic for tests to insert charts (slices) in the DB | 6259904f30c21e258be99c8f |
class Node: <NEW_LINE> <INDENT> def __init__(self, data, parent=None): <NEW_LINE> <INDENT> self.__children = [] <NEW_LINE> self.__data = data <NEW_LINE> self.__parent = parent <NEW_LINE> <DEDENT> def add_child(self, node): <NEW_LINE> <INDENT> if node in self.__children: <NEW_LINE> <INDENT> raise ValueError('Node has al... | Generic node class | 6259904fa79ad1619776b501 |
class TestQpidInvalidTopologyVersion(_QpidBaseTestCase): <NEW_LINE> <INDENT> scenarios = [ ('direct', dict(consumer_cls=qpid_driver.DirectConsumer, consumer_kwargs={}, publisher_cls=qpid_driver.DirectPublisher, publisher_kwargs={})), ('topic', dict(consumer_cls=qpid_driver.TopicConsumer, consumer_kwargs={'exchange_name... | Unit test cases to test invalid qpid topology version. | 6259904fb57a9660fecd2f07 |
class InternalEvent(Event): <NEW_LINE> <INDENT> __metaclass__ = abc.ABCMeta <NEW_LINE> def __init__(self, label=None, logical_round=-1, event_time=None, timeout_disallowed=False, prunable=False): <NEW_LINE> <INDENT> super(InternalEvent, self).__init__(prefix='i', label=label, logical_round=logical_round, event_time=eve... | An InternalEvent is one that happens within the controller(s) under
simulation. Derivatives of this class verify that the internal event has
occurred during replay in its proceed method before it returns. | 6259904fa8ecb0332587269d |
class LintMessage(object): <NEW_LINE> <INDENT> msg = "" <NEW_LINE> def __init__(self, msg, level=INFO, producer="unknown", msgid=None): <NEW_LINE> <INDENT> self.msg = msg <NEW_LINE> self.level = level <NEW_LINE> self.producer = producer <NEW_LINE> self.msgid = msgid <NEW_LINE> <DEDENT> def __unicode__(self): <NEW_LINE>... | A base class for all lint messages. | 6259904f596a897236128ff4 |
class PlayerDataMap(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Key = None <NEW_LINE> self.Value = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Key = params.get("Key") <NEW_LINE> self.Value = params.get("Value") | 玩家自定义数据
| 6259904fd7e4931a7ef3d503 |
class CreateQueueRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.QueueName = None <NEW_LINE> self.MaxMsgHeapNum = None <NEW_LINE> self.PollingWaitSeconds = None <NEW_LINE> self.VisibilityTimeout = None <NEW_LINE> self.MaxMsgSize = None <NEW_LINE> self.MsgRetentionSeconds = None ... | CreateQueue请求参数结构体
| 6259904fb830903b9686eec0 |
class AnalysisDirMetadata(MetadataDict): <NEW_LINE> <INDENT> def __init__(self,filen=None): <NEW_LINE> <INDENT> MetadataDict.__init__(self, attributes = { 'run_name':'run_name', 'run_number': 'run_number', 'source': 'source', 'platform':'platform', 'assay': 'assay', 'processing_software': 'processing_software', 'bcl2fa... | Class for storing metadata about an analysis directory
Provides a set of data items representing metadata about
the current analysis, which are loaded from and saved to
an external file.
The metadata items are:
run_name: name of the run
run_number: run number assigned by local facility
source: source of the data (e.... | 6259904f82261d6c5273090c |
class HTMLEmailBackend(EmailBackend): <NEW_LINE> <INDENT> formats = ('subject.txt', 'message.html') <NEW_LINE> def _strip_tags(self, html): <NEW_LINE> <INDENT> s = MLStripper() <NEW_LINE> s.feed(html) <NEW_LINE> return s.get_data() <NEW_LINE> <DEDENT> def send(self, messages, recipients, *args, **kwargs): <NEW_LINE> <I... | Email delivery backend with html support as alternative content. | 6259904f3c8af77a43b68983 |
class DocumentFragmentValueReadTests(TestCase): <NEW_LINE> <INDENT> def test_value_uses_schema_to_find_default_value(self): <NEW_LINE> <INDENT> fragment = DocumentFragment( document=None, parent=None, value=DefaultValue, item=None, schema={"default": "default value"}) <NEW_LINE> self.assertEqual(fragment.value, "defaul... | Tests related to reading values | 6259904f7b25080760ed8723 |
class CompositeRule(ClientRule): <NEW_LINE> <INDENT> def __init__(self, children, rule_type=RuleType.COMPOSITE.name, rule_id=None): <NEW_LINE> <INDENT> super(CompositeRule, self).__init__(rule_type, rule_id) <NEW_LINE> self._children = tuple(children) <NEW_LINE> <DEDENT> @property <NEW_LINE> def children(self): <NEW_LI... | Composite rule to match request by several rules simultaneously. | 6259904f73bcbd0ca4bcb715 |
class WindLoad(RotatableLoad): <NEW_LINE> <INDENT> def __init__(self, *, load_name: str, load_no, wind_speed: float, angle: float, symmetrical: bool, abbrev: str = ''): <NEW_LINE> <INDENT> super().__init__(load_name = load_name, load_no = load_no, load_value = wind_speed, angle = angle, symmetrical = symmetrical, abbre... | WindLoad is a sub-class of RotatableLoad, however it has an additional
method to scale the load based on the windspeed, and the load can be entered
as either load or wind_speed. | 6259904f29b78933be26ab08 |
class CorsController(Controller): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def convert_response(req, resp, success_code, response_class): <NEW_LINE> <INDENT> if resp.status_int == success_code: <NEW_LINE> <INDENT> headers = dict() <NEW_LINE> if req.object_name: <NEW_LINE> <INDENT> headers['x-amz-version-id'] = ... | Handles the following APIs:
- GET Bucket CORS
- PUT Bucket CORS
- DELETE Bucket CORS | 6259904fd53ae8145f9198ee |
class TestCardResponse(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 testCardResponse(self): <NEW_LINE> <INDENT> pass | CardResponse unit test stubs | 6259904f1f037a2d8b9e52b1 |
class OneToManyDescriptor(LinkDescriptor): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(OneToManyDescriptor, self).__init__( linked_is_p=True, p_value_is_list=False, **kwargs) <NEW_LINE> <DEDENT> def get_reverse(self, cls): <NEW_LINE> <INDENT> return ManyToOneDescriptor( this_key=self._li... | This object has an attribute, represented by this field, that can
contain only one member, that refers to linked object. | 6259904f3cc13d1c6d466bc5 |
class AuthenticationError(APIException): <NEW_LINE> <INDENT> status_code = status.HTTP_401_UNAUTHORIZED <NEW_LINE> default_detail = _('身份校验错误') <NEW_LINE> default_code = 'Authentication Failed' | jwt校验错误 | 6259904f435de62698e9d28a |
class SipDialError(OpenTokException): <NEW_LINE> <INDENT> pass | Indicates that there was a SIP dial specific problem:
The Session ID passed in is invalid or you attempt to start a SIP call for a session
that does not use the OpenTok Media Router. | 6259904fd6c5a102081e35aa |
class OccupationType(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'occupationtypes' <NEW_LINE> pk_id = db.Column(db.Text(), primary_key=True) <NEW_LINE> name = db.Column(db.Text()) <NEW_LINE> occupation_id = db.Column(db.Text(), db.ForeignKey('occupations.pk_id')) <NEW_LINE> def __init__(self, **data): <NEW_LINE> <IN... | Model for OccupationType | 6259904f8e7ae83300eea51e |
class VsphereVirtualDiskVolumeSource(_kuber_definitions.Definition): <NEW_LINE> <INDENT> def __init__( self, fs_type: str = None, storage_policy_id: str = None, storage_policy_name: str = None, volume_path: str = None, ): <NEW_LINE> <INDENT> super(VsphereVirtualDiskVolumeSource, self).__init__( api_version="core/v1", k... | Represents a vSphere volume resource. | 6259904f7d847024c075d860 |
class UserProfile(AbstractBaseUser, PermissionsMixin): <NEW_LINE> <INDENT> email = models.EmailField(max_length=255, unique=True) <NEW_LINE> name = models.CharField(max_length=255) <NEW_LINE> is_active = models.BooleanField(default=True) <NEW_LINE> is_staff = models.BooleanField(default=False) <NEW_LINE> objects = User... | Represent a user profile inside our system | 6259904fa79ad1619776b502 |
class FlavorProfileResponse(BaseFlavorProfileType): <NEW_LINE> <INDENT> id = wtypes.wsattr(wtypes.UuidType()) <NEW_LINE> name = wtypes.wsattr(wtypes.StringType()) <NEW_LINE> provider_name = wtypes.wsattr(wtypes.StringType()) <NEW_LINE> flavor_data = wtypes.wsattr(wtypes.StringType()) <NEW_LINE> @classmethod <NEW_LINE> ... | Defines which attributes are to be shown on any response. | 6259904fb7558d589546496d |
class TaskDetails(DetailView): <NEW_LINE> <INDENT> template_name = "task_details.html" <NEW_LINE> context_object_name = 'task' <NEW_LINE> model = Task <NEW_LINE> pk_url_kwarg = "id" | Shows info about task.
| 6259904fdd821e528d6da367 |
class feederzip(datafeeder): <NEW_LINE> <INDENT> def __init__(self, gens, preptrain=None): <NEW_LINE> <INDENT> self.gens = gens <NEW_LINE> self.preptrain = preptrain if preptrain is not None else pk.preptrain([]) <NEW_LINE> <DEDENT> def batchstream(self): <NEW_LINE> <INDENT> while True: <NEW_LINE> <INDENT> batchlist = ... | Zip multiple generators (with or without a restartgenerator method) | 62599050287bf620b6273076 |
class OpenSSLSeeker(Seeker): <NEW_LINE> <INDENT> NAME = "OpenSSL" <NEW_LINE> VERSION_STRING = " part of OpenSSL " <NEW_LINE> def searchLib(self, logger): <NEW_LINE> <INDENT> key_string = self.VERSION_STRING <NEW_LINE> ids = ["SHA1", "SHA-256", "SHA-512", "SSLv3", "TLSv1", "ASN.1", "EVP", "RAND", "RSA", "Big Number"] <N... | Seeker (Identifier) for the OpenSSL open source library. | 62599050596a897236128ff5 |
class IngredientSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Ingredient <NEW_LINE> fields = ('name',) <NEW_LINE> read_only_fields = ('id',) | Serializer for ingredients | 62599050e76e3b2f99fd9e8c |
class LongTable(Tabular): <NEW_LINE> <INDENT> def __init__(self, content): <NEW_LINE> <INDENT> Tabular.__init__(self, content) <NEW_LINE> self._set_tab_type('longtabu') <NEW_LINE> self.repeats = 1 <NEW_LINE> self.caption = 'Table 1' <NEW_LINE> self.label = 'table1' <NEW_LINE> self.loc = 'c' <NEW_LINE> <DEDENT> def set_... | class for LateX longtables
| 6259905055399d3f056279a7 |
class FileOpenEvent(EngineEvent): <NEW_LINE> <INDENT> def __init__(self, file_path): <NEW_LINE> <INDENT> super(FileOpenEvent, self).__init__() <NEW_LINE> self._file_path = file_path <NEW_LINE> <DEDENT> @property <NEW_LINE> def file_path(self): <NEW_LINE> <INDENT> return self._file_path <NEW_LINE> <DEDENT> def __str__(s... | An object representation of a file-open event. | 625990503617ad0b5ee075cd |
class DBAlter: <NEW_LINE> <INDENT> pass | This class manages the interactions to modify data
in the database | 6259905082261d6c5273090d |
class ValuePrinter(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, logger): <NEW_LINE> <INDENT> threading.Thread.__init__(self) <NEW_LINE> self.logger = logger <NEW_LINE> self.values = dict(self.logger.values) <NEW_LINE> self.printing = True <NEW_LINE> self.screen = curses.initscr() <NEW_LINE> self.win = curs... | Print values nicely in terminal | 62599050379a373c97d9a4b8 |
class monitoring_site(object): <NEW_LINE> <INDENT> def __init__(self,url_template): <NEW_LINE> <INDENT> self.url_template = url_template <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return 'url - %' % self.url_template <NEW_LINE> <DEDENT> def get_page(self,univ_num): <NEW_LINE> <INDENT> return university_... | The wrapper for site's url
get_page returns wrapper for the specific university page to parse | 625990503c8af77a43b68984 |
class CancelOrStopIntentHandler(AbstractRequestHandler): <NEW_LINE> <INDENT> def can_handle(self, handler_input): <NEW_LINE> <INDENT> return (is_intent_name("AMAZON.CancelIntent")(handler_input) or is_intent_name("AMAZON.StopIntent")(handler_input)) <NEW_LINE> <DEDENT> def handle(self, handler_input): <NEW_LINE> <INDEN... | Single handler for Cancel and Stop Intent. | 6259905010dbd63aa1c7206b |
@jsonld.s( type=[ 'prov:SoftwareAgent', 'wfprov:WorkflowEngine', ], context={ 'prov': 'http://purl.org/dc/terms/', 'wfprov': 'http://purl.org/wf4ever/wfprov#', }, frozen=True, slots=True, ) <NEW_LINE> class SoftwareAgent: <NEW_LINE> <INDENT> label = jsonld.ib(context='rdfs:label', kw_only=True) <NEW_LINE> was_started_b... | Represent a person. | 625990507b25080760ed8724 |
class HsMetricsNonDup(HsMetrics): <NEW_LINE> <INDENT> parent_task = luigi.Parameter(default=("ratatosk.lib.tools.picard.MergeSamFiles", ), is_list=True) | Run on non-deduplicated data | 625990506fece00bbaccce48 |
class TestRun: <NEW_LINE> <INDENT> def test_run(self, mocker): <NEW_LINE> <INDENT> mock_serve = mocker.patch('websockets.serve') <NEW_LINE> mock_get_event_loop = mocker.patch('asyncio.get_event_loop') <NEW_LINE> mock_ensure_future = mocker.patch('asyncio.ensure_future') <NEW_LINE> hub = DumplingHub() <NEW_LINE> mocker.... | Test the run() method of the DumplingHub. | 625990500c0af96317c577a7 |
class DummyClientComputation(tff.learning.framework.ClientDeltaFn): <NEW_LINE> <INDENT> def __init__(self, model, input_spec, client_weight_fn=None): <NEW_LINE> <INDENT> del client_weight_fn <NEW_LINE> self._model = tff.learning.framework.enhance(model) <NEW_LINE> self._input_spec = input_spec <NEW_LINE> py_typecheck.c... | Client TensorFlow logic for example.
Designed to mimic the class `ClientFedAvg` from federated_averaging.py | 6259905023e79379d538d98a |
class Topic(DocumentBase): <NEW_LINE> <INDENT> zones = ['title', 'desc', 'narr'] <NEW_LINE> def __init__(self, fname): <NEW_LINE> <INDENT> if fname.endswith('.gz'): <NEW_LINE> <INDENT> opener = gzip.open <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> opener = open <NEW_LINE> <DEDENT> with opener(fname, mode='rt') as ins... | Represents one query topic. Like the document has zones ``title``
and ``text``, the Topic has zones ``title``, ``desc``, and ``narr``.
>>> fname = '../test_data/topic-401-AH.vert'
>>> t = Topic(fname)
The Topic is uniquely identified by its topic id (``tid``):
>>> t.tid
'10.2452/401-AH'
Which is also its ``uid``:
... | 62599050cb5e8a47e493cbcd |
class RevokeActionTestCase(AdminTestMixin, DjangoCAWithCertTestCase): <NEW_LINE> <INDENT> def test_basic(self): <NEW_LINE> <INDENT> data = { 'action': 'revoke', '_selected_action': [self.cert.pk], } <NEW_LINE> response = self.client.post(self.changelist_url, data) <NEW_LINE> self.assertRedirects(response, self.changeli... | Test the "revoke" action in the changelist. | 62599050435de62698e9d28c |
class BigqueryTablesGetRequest(messages.Message): <NEW_LINE> <INDENT> datasetId = messages.StringField(1, required=True) <NEW_LINE> projectId = messages.StringField(2, required=True) <NEW_LINE> tableId = messages.StringField(3, required=True) | A BigqueryTablesGetRequest object.
Fields:
datasetId: Dataset ID of the requested table
projectId: Project ID of the requested table
tableId: Table ID of the requested table | 625990508da39b475be04673 |
class AttributedMixin: <NEW_LINE> <INDENT> def __contains__(self, name): <NEW_LINE> <INDENT> return name in self._attributes <NEW_LINE> <DEDENT> def __getitem__(self, name): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> if name in self._attributes: <NEW_LINE> <INDENT> return self._attributes[name] <NEW_LINE> <DEDENT> el... | Obsługa atrybutów. | 6259905023849d37ff85254c |
class DUP2_X2(NoOperandsInstruction): <NEW_LINE> <INDENT> def execute(self, frame): <NEW_LINE> <INDENT> stack = frame.operand_stack <NEW_LINE> slot1 = stack.pop_slot() <NEW_LINE> slot2 = stack.pop_slot() <NEW_LINE> slot3 = stack.pop_slot() <NEW_LINE> slot4 = stack.pop_slot() <NEW_LINE> stack.push_slot(copy_slot(slot2))... | bottom -> top
[...][d][c][b][a]
____/ __/
| __/
V V
[...][b][a][d][c][b][a] | 62599050a79ad1619776b503 |
class FP16Optimizer(_FP16OptimizerMixin, optim.FairseqOptimizer): <NEW_LINE> <INDENT> def __init__(self, args, params, fp32_optimizer, fp32_params): <NEW_LINE> <INDENT> super().__init__(args) <NEW_LINE> self.fp16_params = params <NEW_LINE> self.fp32_optimizer = fp32_optimizer <NEW_LINE> self.fp32_params = fp32_params <... | Wrap an *optimizer* to support FP16 (mixed precision) training. | 62599050a8ecb033258726a1 |
class CorsConfiguration(AWSProperty): <NEW_LINE> <INDENT> props: PropsDictType = { "CorsRules": ([CorsRules], True), } | `CorsConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-cors.html>`__ | 62599050b57a9660fecd2f0b |
class UserInfoEmbed(discord.Embed): <NEW_LINE> <INDENT> def __init__(self, ctx: commands.Context, user: discord.User): <NEW_LINE> <INDENT> self.user = user <NEW_LINE> self.prefix = ctx.prefix.replace(ctx.bot.user.mention, f"@{ctx.bot.user.name}") <NEW_LINE> self.set_author( name=str(user), url=f"https://discordapp.com/... | Représente un discord.Embed avec les informations sur un utilisateur.
TODO : add desc | 62599050004d5f362081fa30 |
class lateralNet(BasicModule): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> self.inplanes = 16 <NEW_LINE> super(lateralNet, self).__init__(path) <NEW_LINE> block = BasicBlock <NEW_LINE> self.conv1 = nn.Conv2d(2, 16, 3, padding=1) <NEW_LINE> self.bn1 = nn.BatchNorm2d(16) <NEW_LINE> self.relu1 = nn.R... | in 40x40 | 6259905076e4537e8c3f0a15 |
class NewLayerMergedFromVisible (Command): <NEW_LINE> <INDENT> display_name = _("New Layer from Visible") <NEW_LINE> def __init__(self, doc, **kwds): <NEW_LINE> <INDENT> super(NewLayerMergedFromVisible, self).__init__(doc, **kwds) <NEW_LINE> self._old_current_path = doc.layer_stack.current_path <NEW_LINE> self._result_... | Create a new layer from the merge of all visible layers
Performs a Merge Visible, and inserts the result into the layer
stack just before the highest root of any visible layer. | 62599050b830903b9686eec2 |
class RadioButtonGroup: <NEW_LINE> <INDENT> def __init__(self, parent, command, labels, default): <NEW_LINE> <INDENT> self.command = command <NEW_LINE> self.buttons = [] <NEW_LINE> self.button = None <NEW_LINE> for text in labels: <NEW_LINE> <INDENT> if type(text) in (ListType, TupleType): <NEW_LINE> <INDENT> b = Quisk... | This class encapsulates a group of radio buttons. This class is not a button!
The "labels" is a list of labels for the toggle buttons. An item
of labels can be a list/tuple, and the corresponding button will
be a cycle button. | 62599050e5267d203ee6cd7a |
class CipurpfifipversionEnum(Enum): <NEW_LINE> <INDENT> ipv4 = 1 <NEW_LINE> ipv6 = 2 <NEW_LINE> @staticmethod <NEW_LINE> def _meta_info(): <NEW_LINE> <INDENT> from ydk.models.cisco_ios_xe._meta import _CISCO_IP_URPF_MIB as meta <NEW_LINE> return meta._meta_table['CiscoIpUrpfMib.Cipurpfifmontable.Cipurpfifmonentry.Cipur... | CipurpfifipversionEnum
Specifies the version of IP forwarding on an interface
to which the table row URPF counts, rates, and
configuration apply.
.. data:: ipv4 = 1
.. data:: ipv6 = 2 | 62599050097d151d1a2c2500 |
class VirtualRouterListener(AWSProperty): <NEW_LINE> <INDENT> props: PropsDictType = { "PortMapping": (PortMapping, True), } | `VirtualRouterListener <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualrouter-virtualrouterlistener.html>`__ | 625990506fece00bbaccce4a |
class WeightedNGramDict(object): <NEW_LINE> <INDENT> def __init__(self, corpus, train_sentences): <NEW_LINE> <INDENT> self.weights = {} <NEW_LINE> sub_corpus = bagofwords.BagOfWords() <NEW_LINE> for sentence in train_sentences: <NEW_LINE> <INDENT> sub_corpus.add_words(sentence.lower().split(" ")) <NEW_LINE> <DEDENT> se... | A dictionary where each NGram hold only one value - a weight.
| 62599050b5575c28eb713711 |
class StartDateSorter(Sorter): <NEW_LINE> <INDENT> def __init__(self, *, ascending: bool = True, missing_first: bool = False) -> None: <NEW_LINE> <INDENT> self.order = 1 if ascending else -1 <NEW_LINE> self.missing_value = ( date.max if (ascending ^ missing_first) else date.min ).toordinal() <NEW_LINE> <DEDENT> def key... | Sort tasks by start dates.
Tasks can be sorted in either ascending or descending order. Tasks without start
dates can be put at either the start or the end of the section.
:param ascending: Direction of the sort.
:param missing_first: Whether to place tasks without a due date at the start or end. | 625990507b25080760ed8725 |
class itkMapContainerULSUL(ITKCommonBasePython.itkObject,pyBasePython.mapsetUL): <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, *args): <NEW_LINE> <INDENT> _itkMapContainerPython.i... | Proxy of C++ itkMapContainerULSUL class | 6259905007d97122c4218134 |
class Builder: <NEW_LINE> <INDENT> walk = Graph() <NEW_LINE> subway = Graph() <NEW_LINE> bus = Graph() <NEW_LINE> def addStation(self, name): <NEW_LINE> <INDENT> self.walk.addNode(name) <NEW_LINE> self.subway.addNode(name) <NEW_LINE> self.bus.addNode(name) <NEW_LINE> <DEDENT> def canWalk(self, a, b, time): <NEW_LINE> <... | Further abstract Graph for our specific case. | 6259905073bcbd0ca4bcb719 |
class UserChangeForm(forms.ModelForm): <NEW_LINE> <INDENT> password = ReadOnlyPasswordHashField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Thinker <NEW_LINE> fields = ('email', 'password', 'date_of_birth', 'is_active', 'is_admin') <NEW_LINE> <DEDENT> def clean_password(self): <NEW_LINE> <INDENT> return self.i... | A form for updating users. Includes all the fields on
the user, but replaces the password field with admin's
password hash display field. | 62599050e64d504609df9e16 |
class SomfyDataUpdateCoordinator(DataUpdateCoordinator): <NEW_LINE> <INDENT> def __init__( self, hass: HomeAssistant, logger: logging.Logger, *, name: str, client: SomfyApi, update_interval: timedelta | None = None, ) -> None: <NEW_LINE> <INDENT> super().__init__( hass, logger, name=name, update_interval=update_interva... | Class to manage fetching Somfy data. | 62599050009cb60464d029c9 |
class GtkUIPlugin(PluginInitBase): <NEW_LINE> <INDENT> def __init__(self, plugin_name): <NEW_LINE> <INDENT> from piaportforward.gtkui import GtkUI as _plugin_cls <NEW_LINE> self._plugin_cls = _plugin_cls <NEW_LINE> super(GtkUIPlugin, self).__init__(plugin_name) | Plugin for the GTK UI | 62599050d6c5a102081e35ae |
class Buffer2D(BufferBase): <NEW_LINE> <INDENT> def __init__(self, cell_num, *args, **kwargs): <NEW_LINE> <INDENT> if cell_num is None: cell_num = 100 <NEW_LINE> super().__init__(cell_num, *args, **kwargs) <NEW_LINE> if self.origin is None: <NEW_LINE> <INDENT> self.origin = np.zeros(2) <NEW_LINE> <DEDENT> self.dtheta =... | 2D performance buffer. | 62599050498bea3a75a58fb1 |
class ProtectedExpatParser(expatreader.ExpatParser): <NEW_LINE> <INDENT> def __init__(self, forbid_dtd=True, forbid_entities=True, *args, **kwargs): <NEW_LINE> <INDENT> expatreader.ExpatParser.__init__(self, *args, **kwargs) <NEW_LINE> self.forbid_dtd = forbid_dtd <NEW_LINE> self.forbid_entities = forbid_entities <NEW_... | An expat parser which disables DTD's and entities by default. | 625990508e71fb1e983bcf55 |
class HTTPSDFRead(SDFRead): <NEW_LINE> <INDENT> _data_struct = HTTPDataStruct <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> if None in (PageCacheURL, HTTPArray): <NEW_LINE> <INDENT> raise ImportError("thingking") <NEW_LINE> <DEDENT> super(HTTPSDFRead, self).__init__(*args, **kwargs) <NEW_LINE> <DE... | Read an SDF file hosted on the internet.
Given an SDF file (see http://bitbucket.org/JohnSalmon/sdf), parse the
ASCII header and construct numpy memmap array
access.
Parameters
----------
filename: string
The filename associated with the data to be loaded.
header: string, optional
If separate from the data file, a fi... | 625990508da39b475be04676 |
class _KMedoids(ClusterMixin, TransformerMixin): <NEW_LINE> <INDENT> def __init__(self, n_clusters=8, n_passes=1, metric='euclidean', random_state=None): <NEW_LINE> <INDENT> self.n_clusters = n_clusters <NEW_LINE> self.n_passes = n_passes <NEW_LINE> self.metric = metric <NEW_LINE> self.random_state = random_state <NEW_... | K-Medoids clustering
This method finds a set of cluster centers that are themselves data points,
attempting to minimize the mean-squared distance from the datapoints to
their assigned cluster centers.
This algorithm requires computing the full distance matrix between all pairs
of data points, requiring O(N^2) memory.... | 62599050d486a94d0ba2d455 |
class Iter: <NEW_LINE> <INDENT> class Frame: <NEW_LINE> <INDENT> def __init__(self, sx): <NEW_LINE> <INDENT> self.sx = sx <NEW_LINE> self.items = sx.rawchildren <NEW_LINE> self.index = 0 <NEW_LINE> <DEDENT> def next(self): <NEW_LINE> <INDENT> if self.index < len(self.items): <NEW_LINE> <INDENT> result = self.items[self... | The content iterator - used to iterate the L{Content} children.
The iterator provides a I{view} of the children that is free of container
elements such as <xsd::all/>, <xsd:choice/> or <xsd:sequence/>.
@ivar stack: A stack used to control nesting.
@type stack: list | 6259905007d97122c4218135 |
class StaticAssetsIntegration(DevServerIntegration): <NEW_LINE> <INDENT> _response = None <NEW_LINE> _root_folder = None <NEW_LINE> def init(self): <NEW_LINE> <INDENT> self._response = None <NEW_LINE> self._root_folder = os.path.realpath(instantiator.get_class_abslocation(BasicSettings)) <NEW_LINE> <DEDENT> def test_im... | This class provides the integration tests for ensuring StaticAssets controller works as expected. | 6259905082261d6c5273090f |
class V1beta1StatefulSetSpec(object): <NEW_LINE> <INDENT> def __init__(self, replicas=None, selector=None, service_name=None, template=None, volume_claim_templates=None): <NEW_LINE> <INDENT> self.swagger_types = { 'replicas': 'int', 'selector': 'V1LabelSelector', 'service_name': 'str', 'template': 'V1PodTemplateSpec', ... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62599050fff4ab517ebcecae |
class flooder(threading.Thread): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> threading.Thread.__init__(self) <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> grasp.tprint("Flooding", obj2.name, "for ever") <NEW_LINE> while True: <NEW_LINE> <INDENT> time.sleep(60) <NEW_LINE> grasp.flood(asa_nonce, ... | Thread to flood PrefixManager.Params repeatedly | 62599050e76e3b2f99fd9e91 |
class CommentCreateView(CreateView): <NEW_LINE> <INDENT> model = Comment <NEW_LINE> fields = ['comment'] <NEW_LINE> template_name = 'comment.html' <NEW_LINE> def form_valid(self, form): <NEW_LINE> <INDENT> form.instance.author = self.request.user <NEW_LINE> form.instance.article = Article.objects.get(id=self.kwargs['pk... | Let the user to comment of an article. | 62599050097d151d1a2c2502 |
class StatTextLineParser(BaseParser): <NEW_LINE> <INDENT> whois_option_list = [ make_option("-k", "--keep-alive", action="store_true", help="use a persistent connection") ] <NEW_LINE> def __init__(self, protocol, *args, **kwargs): <NEW_LINE> <INDENT> self.protocol = protocol <NEW_LINE> BaseParser.__init__(self, *args, ... | BaseParser subclass that responds to input from whois clients. | 6259905007f4c71912bb08c6 |
class StreamReader(_Reader): <NEW_LINE> <INDENT> def __init__(self, input, peek=None): <NEW_LINE> <INDENT> super().__init__(input) <NEW_LINE> self._peek = peek <NEW_LINE> <DEDENT> def __next__(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> block, cdata = Block.from_stream(self._input, self._peek) <NEW_LINE> if not... | Implements _Reader to handle input data that is not accessible through a buffer interface. | 6259905076d4e153a661dcc1 |
class VirtualNetworkBgpCommunities(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'virtual_network_community': {'required': True}, 'regional_community': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'virtual_network_community': {'key': 'virtualNetworkCommunity', 'type': 'str'}, 'regional_communi... | Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
:param virtual_network_community: Required. The BGP community ass... | 62599050dc8b845886d54a50 |
class Int8(Uint8): <NEW_LINE> <INDENT> dtype_id = 6 <NEW_LINE> _ctype = _C.c_int8 <NEW_LINE> _ntype = _N.int8 | 8-bit signed number | 6259905029b78933be26ab0b |
class ChecksConfig(AppConfig): <NEW_LINE> <INDENT> name = 'specialhandling.checks' | Checks app configuration | 625990507cff6e4e811b6ecd |
class TextBuilder(object): <NEW_LINE> <INDENT> file_extensions = ["txt"] <NEW_LINE> tesseract_configs = [] <NEW_LINE> cuneiform_args = ["-f", "text"] <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read_file(file_descriptor): <NEW_LINE> <INDENT> return file_descr... | If passed to image_to_string(), image_to_string() will return a simple
string. This string will be the output of the OCR tool, as-is. In other
words, the raw text as produced by the tool.
Warning:
The returned string is encoded in UTF-8 | 62599050b57a9660fecd2f0e |
class DesignateInstanceEntryFactory(driver.DnsInstanceEntryFactory): <NEW_LINE> <INDENT> def create_entry(self, instance_id): <NEW_LINE> <INDENT> zone = DesignateDnsZone(id=DNS_DOMAIN_ID, name=DNS_DOMAIN_NAME) <NEW_LINE> name = base64.b32encode(hashlib.md5(instance_id).digest())[:11] <NEW_LINE> hostname = ("%s.%s" % (n... | Defines how instance DNS entries are created for instances. | 625990503eb6a72ae038baed |
class NodeIsOwnerOrReadOnly(permissions.BasePermission): <NEW_LINE> <INDENT> def has_object_permission(self, request, view, node): <NEW_LINE> <INDENT> if request.method in permissions.SAFE_METHODS: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> return node.map.author == request.user | Object-level permission to only allow owners of an object to edit it. | 62599050d6c5a102081e35b0 |
class TargetPoolAggregatedList(messages.Message): <NEW_LINE> <INDENT> @encoding.MapUnrecognizedFields('additionalProperties') <NEW_LINE> class ItemsValue(messages.Message): <NEW_LINE> <INDENT> class AdditionalProperty(messages.Message): <NEW_LINE> <INDENT> key = messages.StringField(1) <NEW_LINE> value = messages.Messa... | A TargetPoolAggregatedList object.
Messages:
ItemsValue: A map of scoped target pool lists.
Fields:
id: Unique identifier for the resource; defined by the server (output
only).
items: A map of scoped target pool lists.
kind: Type of resource.
nextPageToken: A token used to continue a truncated list requ... | 6259905021a7993f00c673fb |
class CategorySerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Category <NEW_LINE> fields = ('id', 'name', 'description') | Description:
Default Serializers | 625990508e7ae83300eea524 |
class User(Model): <NEW_LINE> <INDENT> id = Column(Integer, primary_key=True) <NEW_LINE> username = Column(String(32), index=True) <NEW_LINE> password_hash = Column(String(64)) <NEW_LINE> email = Column(String(254)) <NEW_LINE> def hash_password(self, password): <NEW_LINE> <INDENT> self.password_hash = pwd_context.encry... | Registered user information is stored in database.db | 62599050d53ae8145f9198f5 |
class JunitXml(object): <NEW_LINE> <INDENT> def __init__(self, testsuit_name, test_cases, total_tests=None, total_failures=None): <NEW_LINE> <INDENT> self.testsuit_name = testsuit_name <NEW_LINE> self.test_cases = test_cases <NEW_LINE> self.failing_test_cases = self._get_failing_test_cases() <NEW_LINE> self.total_tests... | A class which is designed to create a junit test xml file.
Note: currently this class is designed to return the junit xml file
in a string format (through the dump method). | 62599050004d5f362081fa32 |
class UrlTableTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_insert_url(self): <NEW_LINE> <INDENT> url1 = "http://pycm.baidu.com:8081" <NEW_LINE> url_table_obj = url_table.UrlTable() <NEW_LINE> url_table_obj.insert_url(url1) <NEW_LINE> result = url_table_obj.insert_url(url1) <NEW_LINE> assert result is False | url table class test | 625990504428ac0f6e6599c6 |
class PropertiedClassWithDjango(db.PropertiedClass): <NEW_LINE> <INDENT> def __new__(cls, name, bases, attrs): <NEW_LINE> <INDENT> if name == 'BaseModel': <NEW_LINE> <INDENT> return super(PropertiedClassWithDjango, cls).__new__(cls, name, bases, attrs) <NEW_LINE> <DEDENT> new_class = super(PropertiedClassWithDjango, cl... | Metaclass for the combined Django + App Engine model class.
This metaclass inherits from db.PropertiedClass in the appengine library.
This metaclass has two additional purposes:
1) Register each model class created with Django (the parent class will take
care of registering it with the appengine libraries).
2) Add ... | 6259905026068e7796d4ddd7 |
class TestScriptHelperEnvironment(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.assertTrue( hasattr(script_helper, '__cached_interp_requires_environment')) <NEW_LINE> script_helper.__dict__['__cached_interp_requires_environment'] = None <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LI... | Code coverage for interpreter_requires_environment(). | 625990506fece00bbaccce4e |
class InstanceGroupManager(_messages.Message): <NEW_LINE> <INDENT> baseInstanceName = _messages.StringField(1) <NEW_LINE> creationTimestamp = _messages.StringField(2) <NEW_LINE> currentActions = _messages.MessageField('InstanceGroupManagerActionsSummary', 3) <NEW_LINE> description = _messages.StringField(4) <NEW_LINE> ... | An Instance Group Manager resource.
Fields:
baseInstanceName: The base instance name to use for instances in this
group. The value must be 1-58 characters long. Instances are named by
appending a hyphen and a random four-character string to the base
instance name. The base instance name must comply with ... | 6259905007f4c71912bb08c9 |
class ChatServicer(bolthole_pb2_grpc.ChatServicer): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__queues__ = [] <NEW_LINE> self.__users__ = {} <NEW_LINE> <DEDENT> def GetMessage(self, request, context): <NEW_LINE> <INDENT> if not request.user.id: <NEW_LINE> <INDENT> context.set_details('bad argumen... | Class to handle the Chat service implementation
Attributes
----------
__queues__ : list with users chat history queues
__users__ : dictionary with users
Methods
-------
__init__(self) : Constructor
GetMessage(self, request, context) : Handles the GetMessage | 6259905030dc7b76659a0cc6 |
class TestVertexShard(unittest.TestCase): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def setup_class(self): <NEW_LINE> <INDENT> if _cfg.server_backend == 'cassandra': <NEW_LINE> <INDENT> clear_graph() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> Gremlin().gremlin_post('graph.truncateBackend();') <NEW_LINE> <DEDENT> ... | 通过指定的分片大小split_size,获取顶点分片信息(可以与 Scan 配合使用来获取顶点)。 | 625990508a43f66fc4bf362c |
class AdaDelta(StepStrategy): <NEW_LINE> <INDENT> def __init__(self, rho=0.95, eps=1.0e-6): <NEW_LINE> <INDENT> assert eps > 0, 'eps must be positive.' <NEW_LINE> assert 0 < rho < 1, 'rho must be strictly between 0 and 1.' <NEW_LINE> self.eps = eps <NEW_LINE> self.rho = rho <NEW_LINE> <DEDENT> def updates(self, parms, ... | ADADELTA step size strategy. For details, see:
M. D. Zeiler, "ADADELTA: An adaptive learning rate method", arXiv, 2012. | 62599050498bea3a75a58fb5 |
class Crypt(Transformer): <NEW_LINE> <INDENT> _salt = None <NEW_LINE> def __init__(self, salt=None): <NEW_LINE> <INDENT> Transformer.__init__(self) <NEW_LINE> self._salt = salt <NEW_LINE> <DEDENT> def realEncode(self, data): <NEW_LINE> <INDENT> if self._salt is None: <NEW_LINE> <INDENT> return crypt(data, data[:2]) <NE... | UNIX style crypt.
If no salt is specified will use first two chars of data, ala pwd style. | 625990508e71fb1e983bcf59 |
class ManPageCliTreeGenerator(CliTreeGenerator): <NEW_LINE> <INDENT> def Run(self, cmd): <NEW_LINE> <INDENT> return subprocess.check_output(cmd) <NEW_LINE> <DEDENT> def GetVersion(self): <NEW_LINE> <INDENT> return 'MAN(1)' <NEW_LINE> <DEDENT> def AddFlags(self, command, content, is_global=False): <NEW_LINE> <INDENT> de... | man page CLI tree generator. | 62599050a79ad1619776b506 |
class GenericValidator(BaseValidator): <NEW_LINE> <INDENT> __slots__ = ('base_schema') <NEW_LINE> _diagnostic = ( 'Ensure that each document has a metadata, schema and data section. ' 'Each document must pass the schema defined under: ' 'https://airship-deckhand.readthedocs.io/en/latest/' 'validation.html#base-schema')... | Validator used for validating all documents, regardless whether concrete
or abstract, or what version its schema is. | 625990508e71fb1e983bcf5a |
class PolyFitter(Fitter): <NEW_LINE> <INDENT> def __init__(self, x, y, degree): <NEW_LINE> <INDENT> Fitter.__init__(self, x, y) <NEW_LINE> coeffs = numpy.polyfit(x, y, degree) <NEW_LINE> repr_str = str(numpy.poly1d(coeffs)) <NEW_LINE> values = numpy.polyval(coeffs, self.x) <NEW_LINE> self._fill_cache(0, coeffs, values,... | Class for polynomial curve fitting. | 6259905076e4537e8c3f0a1b |
class CompileBbcode(PageCompiler): <NEW_LINE> <INDENT> name = "bbcode" <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> if bbcode is None: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> self.parser = bbcode.Parser() <NEW_LINE> self.parser.add_simple_formatter("note", "") <NEW_LINE> <DEDENT> def compile(self, source, ... | Compile bbcode into HTML. | 6259905099cbb53fe683237a |
class TeamsAPI(object): <NEW_LINE> <INDENT> def __init__(self, session): <NEW_LINE> <INDENT> assert isinstance(session, RestSession) <NEW_LINE> super(TeamsAPI, self).__init__() <NEW_LINE> self.session = session <NEW_LINE> <DEDENT> @generator_container <NEW_LINE> def list(self, max=None): <NEW_LINE> <INDENT> assert max ... | Cisco Spark Teams-API wrapper class.
Wrappers the Cisco Spark Teams-API and exposes the API calls as Python
method calls that return native Python objects.
Attributes:
session(RestSession): The RESTful session object to be used for API
calls to the Cisco Spark service. | 62599050596a897236128ff9 |
@abstract <NEW_LINE> class RedefinableElement(_user_module.RedefinableElementMixin, NamedElement): <NEW_LINE> <INDENT> isLeaf = EAttribute(eType=Boolean, derived=False, changeable=True, default_value=False) <NEW_LINE> redefinedElement = EReference( ordered=False, unique=True, containment=False, derived=True, upper=-1, ... | A RedefinableElement is an element that, when defined in the context of a Classifier, can be redefined more specifically or differently in the context of another Classifier that specializes (directly or indirectly) the context Classifier.
<p>From package UML::Classification.</p> | 62599050379a373c97d9a4c0 |
class DailyActivity(Resource): <NEW_LINE> <INDENT> def create_transaction(self, user_id, access_token): <NEW_LINE> <INDENT> response = self._post(endpoint="/users/{}/activity-transactions".format(user_id), access_token=access_token) <NEW_LINE> if not response: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> return ... | This resource allows partners to access their users' daily activity data.
https://www.polar.com/accesslink-api/?http#daily-activity | 62599050ac7a0e7691f73970 |
class HTTPException(Exception): <NEW_LINE> <INDENT> def __init__(self, reference, http_status_code, url, method_name, message): <NEW_LINE> <INDENT> self.reference = reference <NEW_LINE> self.url = url <NEW_LINE> self.method_name = method_name <NEW_LINE> self.http_status_code = http_status_code <NEW_LINE> self.msg = mes... | Custom Exception non 404 errors | 62599050e5267d203ee6cd80 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.