code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class GetStickerSet(Object): <NEW_LINE> <INDENT> ID = "getStickerSet" <NEW_LINE> def __init__(self, set_id, extra=None, **kwargs): <NEW_LINE> <INDENT> self.extra = extra <NEW_LINE> self.set_id = set_id <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read(q: dict, *args) -> "GetStickerSet": <NEW_LINE> <INDENT> set_id =... | Returns information about a sticker set by its identifier
Attributes:
ID (:obj:`str`): ``GetStickerSet``
Args:
set_id (:obj:`int`):
Identifier of the sticker set
Returns:
StickerSet
Raises:
:class:`telegram.Error` | 62598f8b8e05c05ec3f6ec14 |
class TestCompareXLSXFiles(ExcelComparisonTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.maxDiff = None <NEW_LINE> filename = 'macro01.xlsm' <NEW_LINE> test_dir = 'xlsxwriter/test/comparison/' <NEW_LINE> self.vba_dir = test_dir + 'xlsx_files/' <NEW_LINE> self.got_filename = test_dir + '_test_' + f... | Test file created by XlsxWriter against a file created by Excel. | 62598f8b29b78933be269ea7 |
class MergedResult(IteratorResult): <NEW_LINE> <INDENT> closed = False <NEW_LINE> def __init__(self, cursor_metadata, results): <NEW_LINE> <INDENT> self._results = results <NEW_LINE> super(MergedResult, self).__init__( cursor_metadata, itertools.chain.from_iterable( r._raw_row_iterator() for r in results ), ) <NEW_LINE... | A :class:`_engine.Result` that is merged from any number of
:class:`_engine.Result` objects.
Returned by the :meth:`_engine.Result.merge` method.
.. versionadded:: 1.4 | 62598f8b23e79379d538c097 |
class IsyInvalidArgError(IsyError): <NEW_LINE> <INDENT> pass | General exception for command errors. | 62598f8beab8aa0e5d30b911 |
class OperationMetadata(_messages.Message): <NEW_LINE> <INDENT> endTime = _messages.StringField(1) <NEW_LINE> insertTime = _messages.StringField(2) <NEW_LINE> method = _messages.StringField(3) <NEW_LINE> operationType = _messages.StringField(4) <NEW_LINE> target = _messages.StringField(5) <NEW_LINE> user = _messages.St... | Metadata for the given google.longrunning.Operation.
Fields:
endTime: Timestamp that this operation completed.@OutputOnly
insertTime: Timestamp that this operation was created.@OutputOnly
method: API method that initiated this operation. Example:
google.appengine.v1beta4.Version.CreateVersion.@OutputOnly
o... | 62598f8b8da39b475be02d76 |
class MessageReader(BaseIOHandler, Iterable[can.Message], metaclass=ABCMeta): <NEW_LINE> <INDENT> pass | The base class for all readers. | 62598f8bf7d966606f747b76 |
class CoroTypes: <NEW_LINE> <INDENT> StartUp = startup <NEW_LINE> ShutDown = shutdown <NEW_LINE> Periodic = periodic | Different types of coroutine which can be used with the main loop. | 62598f8b656771135c489214 |
class TalkListView(TemplateView): <NEW_LINE> <INDENT> template_name = "grade/talks_list.html" <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super(TalkListView, self).get_context_data(**kwargs) <NEW_LINE> days = Talk.objects.dates("date", "day") <NEW_LINE> hours = map(lambda x: str(x).zf... | View utilizada para mostrar as palestras | 62598f8b6e29344779b001ed |
class TranscriptSearchInputSet(InputSet): <NEW_LINE> <INDENT> def set_APIKey(self, value): <NEW_LINE> <INDENT> super(TranscriptSearchInputSet, self)._set_input('APIKey', value) <NEW_LINE> <DEDENT> def set_ID(self, value): <NEW_LINE> <INDENT> super(TranscriptSearchInputSet, self)._set_input('ID', value) <NEW_LINE> <DEDE... | An InputSet with methods appropriate for specifying the inputs to the TranscriptSearch
Choreo. The InputSet object is used to specify input parameters when executing this Choreo. | 62598f8b925a0f43d25e7bcf |
class CONVSegmentAlgorithm(object): <NEW_LINE> <INDENT> def __init__(self, sequence, threshold): <NEW_LINE> <INDENT> self.sequence_o = PrepareSequence(sequence) <NEW_LINE> self.sequence = self.sequence_o.bin_code() <NEW_LINE> self.periodicity_threshold = threshold <NEW_LINE> self.candidates = [] <NEW_LINE> <DEDENT> def... | mapping scheme should follow the rule:
F(e_(i)) * F(e_(i-j)) != 0 if e_(i) == e_(i-j) else 0 | 62598f8bb7558d58954631cd |
class VersionInfoMixIn(object): <NEW_LINE> <INDENT> def has_snapshot(self, path): <NEW_LINE> <INDENT> if os.path.exists(self.snapshot_snap_path(path)): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> return False <NEW_LINE> <DEDENT> def list_versions(self, path): <NEW_LINE> <INDENT> snap_dir = self.snapshot_snap_pa... | MixIn that provides versioning information for a filesystem.
| 62598f8bcb5e8a47e493bf3c |
class SimpleQueue(list): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(SimpleQueue, self).__init__() <NEW_LINE> self._condition = threading.Condition() <NEW_LINE> <DEDENT> def acquire(self, *args): <NEW_LINE> <INDENT> self._condition.acquire(*args) <NEW_LINE> <DEDENT> def release(self): <NEW_LINE> <... | Simple condition locked queue
This queue is a list with additionnal condition locking features.
@ivar _condition: condition for locking feature
@type _condition: L{Condition<threading>} | 62598f8bd53ae8145f91802a |
class RemoveLines(Mutator): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(RemoveLines, self).__init__() <NEW_LINE> <DEDENT> def mutate(self, data, to_be_removed=1): <NEW_LINE> <INDENT> lines = data.split('\n') <NEW_LINE> if len(lines) < to_be_removed: <NEW_LINE> <INDENT> return '' <NEW_LINE> <DEDENT... | Removes a number of lines. | 62598f8bc432627299fa2b65 |
class BetaGroupServiceServicer(object): <NEW_LINE> <INDENT> def ListGroups(self, request, context): <NEW_LINE> <INDENT> context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) <NEW_LINE> <DEDENT> def GetGroup(self, request, context): <NEW_LINE> <INDENT> context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) <NEW_LINE> <... | The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This class was generated
only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0. | 62598f8b6aa9bd52df0d4a6d |
class PerMessageSnappyResponse(PerMessageCompressResponse, PerMessageSnappyMixin): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def parse(Klass, params): <NEW_LINE> <INDENT> client_no_context_takeover = False <NEW_LINE> server_no_context_takeover = False <NEW_LINE> for p in params: <NEW_LINE> <INDENT> if len(params[p]) ... | Set of parameters for `permessage-snappy` responded by server. | 62598f8b23849d37ff850c58 |
class FaultWrapper(base_wsgi.Middleware): <NEW_LINE> <INDENT> _status_to_type = {} <NEW_LINE> @staticmethod <NEW_LINE> def status_to_type(status): <NEW_LINE> <INDENT> if not FaultWrapper._status_to_type: <NEW_LINE> <INDENT> for clazz in utils.walk_class_hierarchy(webob.exc.HTTPError): <NEW_LINE> <INDENT> FaultWrapper._... | Calls down the middleware stack, making exceptions into faults. | 62598f8b004d5f362081edc6 |
class BinopAexp(Aexp): <NEW_LINE> <INDENT> def __init__(self, op, left, right): <NEW_LINE> <INDENT> self.op = op <NEW_LINE> self.left = left <NEW_LINE> self.right = right <NEW_LINE> <DEDENT> def replace(self,x,y): <NEW_LINE> <INDENT> return BinopAexp(self.op,self.left.replace(x,y),self.right.replace(x,y)) <NEW_LINE> <D... | Handles arithmetic expressions such as
x/1, 1-8, y+2 ... | 62598f8b3cc13d1c6d465301 |
class pageGenreConstraintType (pyxb.binding.datatypes.string): <NEW_LINE> <INDENT> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'pageGenreConstraintType') <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('https://rs-test.poms.omroep.nl/v1/schema/urn:vpro:api:constraint:page:2013', 63, 2) <NEW_LINE> _Docu... | An atomic simple type. | 62598f8b6fece00bbaccb524 |
class TestForeignKeyModel(models.Model): <NEW_LINE> <INDENT> int_field = models.IntegerField() <NEW_LINE> test_model = models.ForeignKey(TestModel, on_delete=models.CASCADE) <NEW_LINE> objects = ManagerUtilsManager() | A test model that has a foreign key. | 62598f8b442bda511e95bff7 |
class ClassTable(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'classtables' <NEW_LINE> classid = db.Column(db.Integer, primary_key=True) <NEW_LINE> classname = db.Column(db.String(64)) <NEW_LINE> syllabus = db.Column(db.String(64)) <NEW_LINE> def __init__(self, classname, syllabus): <NEW_LINE> <INDENT> self.cla... | class table. | 62598f8b24f1403a9268567b |
class ConfigFrameStatusBar(StatusBar): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> StatusBar.__init__(self, parent) <NEW_LINE> connect(self.update, signal='status_update', sender=Any) <NEW_LINE> connect(self.clear, signal='status_clear', sender=Any) <NEW_LINE> <DEDENT> def update(self, data): <N... | ConfigFrameStatusBar collects status bar construction and actions | 62598f8be76e3b2f99fd85ca |
class EnqueueData( collections.namedtuple( 'EnqueueData', ['embedding_indices', 'sample_indices', 'aggregation_weights'])): <NEW_LINE> <INDENT> def __new__(cls, embedding_indices, sample_indices=None, aggregation_weights=None): <NEW_LINE> <INDENT> return super(EnqueueData, cls).__new__(cls, embedding_indices, sample_in... | Data to be enqueued through generate_enqueue_ops(). | 62598f8b6aa9bd52df0d4a6e |
class SelectPrefabSpawnLocators(bpy.types.Operator): <NEW_LINE> <INDENT> bl_label = "Select Prefab Spawn Locators" <NEW_LINE> bl_idname = "object.select_prefab_spawns" <NEW_LINE> bl_description = "Select prefab spawn locators" <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> lprint('D Select Prefab Spawn Loca... | Selects all prefab spawn locators. | 62598f8bf7d966606f747b78 |
class BlobsToMask: <NEW_LINE> <INDENT> def __init__(self, append_label=False, boundary=False, cross_entropy=False, **kwargs): <NEW_LINE> <INDENT> self.cross_entropy = cross_entropy <NEW_LINE> self.boundary = boundary <NEW_LINE> self.append_label = append_label <NEW_LINE> <DEDENT> def __call__(self, m): <NEW_LINE> <INDE... | Returns binary mask from labeled image, i.e. every label greater than 0 is treated as foreground. | 62598f8b21a7993f00c65b11 |
class Store(Expr): <NEW_LINE> <INDENT> def __init__(self,listaExpresiones): <NEW_LINE> <INDENT> self.type = "STORE" <NEW_LINE> self.expresiones = listaExpresiones <NEW_LINE> self.sig = None | Nodo que almacena el apuntador del arbol de expresiones de la
instruccion STORE | 62598f8b7b25080760ed7045 |
class BetaCmleExampleStub(object): <NEW_LINE> <INDENT> def Predict(self, request, timeout, metadata=None, with_call=False, protocol_options=None): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> Predict.future = None | The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This class was generated
only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0. | 62598f8b50485f2cf55dab11 |
class InvalidDeploymentGroupError(Exception): <NEW_LINE> <INDENT> pass | InvalidDeploymentGroupError
Represents that a deployment group's configuration is invalid | 62598f8b9b70327d1c57e939 |
class Complex(object): <NEW_LINE> <INDENT> def __init__(self, real_part, imag_part): <NEW_LINE> <INDENT> assert type(real_part) in {int, float}, 'first argument is not int or float' <NEW_LINE> assert type(imag_part) in {int, float}, 'second argument is not int or float' <NEW_LINE> self.__real_part = float(real_part) <N... | class for complex numbers
>>> z1 = Complex(1, 2)
>>> z1.get_real_part()
1.0
>>> z1.get_imag_part()
2.0
>>> z1.modulus() == math.sqrt(5)
True
>>> z2 = Complex.from_real_number(3)
>>> z1.equals(z2)
False
>>> z3 = z1.add(z2)
>>> z3.equals(Complex(4, 2))
True
>>> z4 = z1.mul(z2)
>>> z4.equals(Complex(3, 6))
True
>>> z4
Co... | 62598f8b3eb6a72ae038a1cf |
class EnumerateTitle(BaseHandler): <NEW_LINE> <INDENT> def get(self, title): <NEW_LINE> <INDENT> survey_id = ( self.session .query(Survey.id) .filter_by(url_slug=title) .scalar() ) <NEW_LINE> if survey_id is None: <NEW_LINE> <INDENT> raise tornado.web.HTTPError(404) <NEW_LINE> <DEDENT> Enumerate.get(self, survey_id) | View and submit to a survey identified by title. | 62598f8bc432627299fa2b67 |
class ICustomUserFolder(Interface): <NEW_LINE> <INDENT> pass | A CustomUserFolder. | 62598f8b8a43f66fc4bf1d20 |
class BlankWeeklySelectedQuestionsEmailAlertTests(EmailAlertTests): <NEW_LINE> <INDENT> @setup_email_alert_tests <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.notification_schedule['q_sel'] = 'w' <NEW_LINE> self.setup_timestamp = timezone.now() - datetime.timedelta(14) <NEW_LINE> self.expected_results['q_ask'] =... | blank means that this is testing for the absence of email
because questions are not followed as set by default in the
parent class | 62598f8b097d151d1a2c0bc2 |
class Tree(object): <NEW_LINE> <INDENT> def __init__(self, root=None): <NEW_LINE> <INDENT> self.root = root <NEW_LINE> <DEDENT> def add(self, elem): <NEW_LINE> <INDENT> node = Node(elem) <NEW_LINE> if self.root == None: <NEW_LINE> <INDENT> self.root = node <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> queue = [] <NEW_L... | 树类 | 62598f8b45492302aabfc070 |
class DescribeCDNUsageDataRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.StartTime = None <NEW_LINE> self.EndTime = None <NEW_LINE> self.DataType = None <NEW_LINE> self.DataInterval = None <NEW_LINE> self.DomainNames = None <NEW_LINE> self.SubAppId = None <NEW_LINE> <DEDENT> de... | DescribeCDNUsageData request structure.
| 62598f8b0383005118f6d295 |
class DNSQueryMonitoringProtocolTestCase(test_monitor.BaseLoopingCheckMonitoringProtocolTestCase): <NEW_LINE> <INDENT> monitorClass = DNSQueryMonitoringProtocol <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.config['dnsquery.hostnames'] = '["en.wikipedia.org"]' <NEW_LINE> super(DNSQueryMonitoringProtocolTestCase,... | Test case for `pybal.monitors.DNSQueryMonitoringProtocol`. | 62598f8b23e79379d538c09a |
class MongoStorage(DataStorage): <NEW_LINE> <INDENT> def __init__(self, db_name, collection_name, host="localhost", port=27017): <NEW_LINE> <INDENT> super(MongoStorage, self).__init__() <NEW_LINE> self.client = None <NEW_LINE> self.collection = None <NEW_LINE> self.db = None <NEW_LINE> self.host = host <NEW_LINE> self.... | MongoDB database adapter. | 62598f8b3c8af77a43b67d04 |
class AbstractState(object): <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> @abstractproperty <NEW_LINE> def position(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abstractproperty <NEW_LINE> def momentum(self): <NEW_LINE> <INDENT> pass | Represents a point in phase-space. | 62598f8bec188e330fdf843a |
class GenericGroupInputs(InputsBase[GroupInputSlot, TNodeBase], Generic[TNodeBase]): <NEW_LINE> <INDENT> def _create_slot_instance(self, name) -> GroupInputSlot: <NEW_LINE> <INDENT> return GroupInputSlot(self._owner, name) | A basic class for group inputs.
Subclass this to specify inputs for a specialized node group. | 62598f8b29b78933be269ea9 |
class Resolver(object): <NEW_LINE> <INDENT> def __init__(self, opts): <NEW_LINE> <INDENT> self.opts = opts <NEW_LINE> self.auth = salt.loader.auth(opts) <NEW_LINE> <DEDENT> def _send_token_request(self, load): <NEW_LINE> <INDENT> master_uri = 'tcp://' + salt.utils.zeromq.ip_bracket(self.opts['interface']) + ... | The class used to resolve options for the command line and for generic
interactive interfaces | 62598f8b16aa5153ce4000a0 |
class PatternList(object): <NEW_LINE> <INDENT> def __init__(self, *args): <NEW_LINE> <INDENT> self.patterns = [ ] <NEW_LINE> for i in args: <NEW_LINE> <INDENT> self.load(plat.path(i)) <NEW_LINE> <DEDENT> <DEDENT> def match(self, s): <NEW_LINE> <INDENT> slash_s = "/" + s <NEW_LINE> for p in self.patterns: <NEW_LINE> <IN... | Used to load in the blacklist and whitelist patterns. | 62598f8b4e4d562566371fc1 |
class Photo(models.Model): <NEW_LINE> <INDENT> owner = models.ForeignKey( User, related_name='photos', related_query_name='photo', ) <NEW_LINE> height = models.IntegerField(blank=True, null=True, default=0) <NEW_LINE> width = models.IntegerField(blank=True, null=True, default=0) <NEW_LINE> image = models.ImageField(upl... | docstring for Photo | 62598f8b66656f66f7d59f93 |
@unittest.skip("FIXME: plugin writer action required") <NEW_LINE> class PublishAnyRepoVersionTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def test_all(self): <NEW_LINE> <INDENT> cfg = config.get_config() <NEW_LINE> client = api.Client(cfg, api.json_handler) <NEW_LINE> body = gen_shelter_remote() <NEW_LINE> remote =... | Test whether a particular repository version can be published.
This test targets the following issues:
* `Pulp #3324 <https://pulp.plan.io/issues/3324>`_
* `Pulp Smash #897 <https://github.com/PulpQE/pulp-smash/issues/897>`_ | 62598f8b23e79379d538c09b |
class RtaxTaxonAssigner(TaxonAssigner): <NEW_LINE> <INDENT> Name = "RtaxTaxonAssigner" <NEW_LINE> Application = "RTAX classifier" <NEW_LINE> Citation = "Soergel D.A.W., Dey N., Knight R., and Brenner S.E. 2012. Selection of primers for optimal taxonomic classification of environmental 16S rRNA gene sequences. ISME J... | Assign taxon using RTAX
| 62598f8bd53ae8145f91802d |
class InvalidFormatEmailError(Error): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.msg = "형식에 맞는 이메일을 입력해주세요." | 올바르지 않은 형식의 이메일 에러 | 62598f8bd6c5a102081e1cdf |
class ActionItem(ndb.Model): <NEW_LINE> <INDENT> creator = ndb.StructuredProperty(User) <NEW_LINE> time_created = ndb.DateTimeProperty(auto_now_add=True) <NEW_LINE> creator_note = ndb.StringProperty(indexed=False) <NEW_LINE> completer = ndb.StructuredProperty(User) <NEW_LINE> time_completed = ndb.DateTimeProperty() <NE... | Represents a task to be completed. | 62598f8bb830903b9686e240 |
class TagDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteView): <NEW_LINE> <INDENT> model = Tag <NEW_LINE> permission_required = 'cmdb.delete_tag' <NEW_LINE> def delete(self, request, *args, **kwargs): <NEW_LINE> <INDENT> response = super().delete(request, *args, **kwargs) <NEW_LINE> messages.success(requ... | 删除标签 | 62598f8b656771135c489218 |
class V1beta1CertificateSigningRequestCondition(object): <NEW_LINE> <INDENT> def __init__(self, last_update_time=None, message=None, reason=None, type=None): <NEW_LINE> <INDENT> self.swagger_types = { 'last_update_time': 'V1Time', 'message': 'str', 'reason': 'str', 'type': 'str' } <NEW_LINE> self.attribute_map = { 'las... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598f8b6e29344779b001f1 |
class TilesDownloader(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.enableProxy=False <NEW_LINE> self.imgsPath="" <NEW_LINE> <DEDENT> def download(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> req = urllib.request.urlopen(tiles_url, timeout=1000) <NEW_LINE> <DED... | 瓦片地图下载器 | 62598f8b8e71fb1e983bb64d |
class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> get_latest_by = 'created_at', <NEW_LINE> ordering = [ '-created_at', '-modified_at' ] | Meta class. | 62598f8bf7d966606f747b7b |
class _AttributeInitializerMixin(object): <NEW_LINE> <INDENT> def __new__(cls, *args, **options): <NEW_LINE> <INDENT> managed_attrs = cls.get_managed_attributes() <NEW_LINE> attr_map = {} <NEW_LINE> for managed_attr in managed_attrs: <NEW_LINE> <INDENT> managed_attr_name = managed_attr.name <NEW_LINE> try: <NEW_LINE> <... | Base class for mixins for automatic initialization of managed attributes
Works in collaboration with the L{DeclarationCollector} and automatically
initializes all attributes for which a keyword of the same name is passed
to the constructor. This can also be used together with the
L{_AttributeControllerMixin} (see the ... | 62598f8bcb5e8a47e493bf3e |
class ResetAttachCcnInstancesRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.CcnId = None <NEW_LINE> self.CcnUin = None <NEW_LINE> self.Instances = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.CcnId = params.get("CcnId") <NEW_LINE> self.CcnUi... | ResetAttachCcnInstances request structure.
| 62598f8b3eb6a72ae038a1d1 |
@skipIf(NO_MOCK, NO_MOCK_REASON) <NEW_LINE> class HipchatTestCase(TestCase, LoaderModuleMockMixin): <NEW_LINE> <INDENT> def setup_loader_modules(self): <NEW_LINE> <INDENT> return {hipchat: {}} <NEW_LINE> <DEDENT> @patch('salt.modules.hipchat._query', MagicMock(return_value=True)) <NEW_LINE> def test_list_rooms(self): <... | Test cases for salt.modules.hipchat | 62598f8b9b70327d1c57e93b |
class TestFileCacherDB(TestFileCacherBase, unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> file_cacher = FileCacher() <NEW_LINE> self._setUp(file_cacher) <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> shutil.rmtree(self.cache_base_path, ignore_errors=True) | Tests for the FileCacher service with a database backend. | 62598f8b435de62698e9b98c |
class ChannelFloat32(metaclass=Metaclass): <NEW_LINE> <INDENT> __slots__ = [ '_name', '_values', ] <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> assert all(['_' + key in self.__slots__ for key in kwargs.keys()]), 'Invalid arguments passed to constructor: %r' % kwargs.keys() <NEW_LINE> self.nam... | Message class 'ChannelFloat32'. | 62598f8b4428ac0f6e6580c1 |
class CertificateImportParameters(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'base64_encoded_certificate': {'required': True}, } <NEW_LINE> _attribute_map = { 'base64_encoded_certificate': {'key': 'value', 'type': 'str'}, 'password': {'key': 'pwd', 'type': 'str'}, 'certificate_policy': {'key': 'po... | The certificate import parameters.
All required parameters must be populated in order to send to Azure.
:param base64_encoded_certificate: Required. Base64 encoded representation of the certificate
object to import. This certificate needs to contain the private key.
:type base64_encoded_certificate: str
:param passw... | 62598f8be64d504609df9181 |
class FieldPages(Pages): <NEW_LINE> <INDENT> def prepare_embed(self, entries, page, *, first=False): <NEW_LINE> <INDENT> self.embed.clear_fields() <NEW_LINE> self.embed.description = discord.Embed.Empty <NEW_LINE> for key, value in entries: <NEW_LINE> <INDENT> self.embed.add_field(name=key, value=value, inline=False) <... | Similar to Pages except entries should be a list of
tuples having (key, value) to show as embed fields instead. | 62598f8b45492302aabfc072 |
class EllipticCurveFp(EllipticCurve): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> p = self.p <NEW_LINE> assert p >= 0 <NEW_LINE> size = 0 <NEW_LINE> while p > 0: <NEW_LINE> <INDENT> q, r = divmod( p, 256 ) <NEW_LINE> size += 1 <NEW_LINE> p = q <NEW_LINE> <DEDENT> self.coord_size = size <NEW_LINE> self.I... | Elliptic Curve over the field of integers modulo a prime p. | 62598f8b1f037a2d8b9e3c77 |
class UsersProfile(DetailView): <NEW_LINE> <INDENT> model = User <NEW_LINE> view_name = 'users-profile' <NEW_LINE> app_name = 'users' <NEW_LINE> templates = { 'html': 'page.users.profile.html' } <NEW_LINE> def get_object(self): <NEW_LINE> <INDENT> username = self.kwargs.get('username', self.request.user.username) <NEW_... | Muestra el perfil del usuario. | 62598f8be76e3b2f99fd85cd |
class OrderedDeclarationWrapper(LazyValue): <NEW_LINE> <INDENT> def __init__(self, declaration, sequence, *args, **kwargs): <NEW_LINE> <INDENT> super(OrderedDeclarationWrapper, self).__init__(*args, **kwargs) <NEW_LINE> self.declaration = declaration <NEW_LINE> self.sequence = sequence <NEW_LINE> <DEDENT> def evaluate(... | Lazy wrapper around an OrderedDeclaration.
Attributes:
declaration (declarations.OrderedDeclaration): the OrderedDeclaration
being wrapped
sequence (int): the sequence counter to use when evaluatin the
declaration | 62598f8b45492302aabfc073 |
class UserResource(GenericResource): <NEW_LINE> <INDENT> route_base = '/users/' <NEW_LINE> resource_object = User <NEW_LINE> searchargs = { 'email': fields.Str(required=True), } <NEW_LINE> loginargs = { 'email': fields.Str(required=True), 'password': fields.Str(required=True) } <NEW_LINE> @as_json <NEW_LINE> @route('/p... | Class describing resources to manipulate User objects. | 62598f8b23e79379d538c09c |
class Service_Type(snapbill.Base): <NEW_LINE> <INDENT> def __init__(self, id, connection=None): <NEW_LINE> <INDENT> super(Service_Type, self).__init__(id, connection=connection) <NEW_LINE> self._type = 'service_type' <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def list(search, connection=None): <NEW_LINE> <INDENT> ret... | Group of a type of service | 62598f8b73bcbd0ca4bc9ded |
class StoragePoolInfo(XMLSerializable): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> super(StoragePoolInfo, self).__init__(ElementTree.Element("pool", attrib={"type": "dir"})) <NEW_LINE> ElementTree.SubElement(self._root, "name") <NEW_LINE> targetElement = ElementTree.SubElement(self._root, "target... | Storage pool, i.e., a folder containing storage volumes
:param name: name
:type name: str | 62598f8b0c0af96317c55f2a |
class StringPointer8(StringPointer): <NEW_LINE> <INDENT> def __init__(self, size=0, address=None): <NEW_LINE> <INDENT> super().__init__(size, address, bit_size=8) | A `StringPointer8` field is a :class:`StringPointer` field
with a :class:`Field` *size* of one byte. | 62598f8b26068e7796d4c4fb |
class gtractTransformToDisplacementField(SlicerCommandLine): <NEW_LINE> <INDENT> input_spec = gtractTransformToDisplacementFieldInputSpec <NEW_LINE> output_spec = gtractTransformToDisplacementFieldOutputSpec <NEW_LINE> _cmd = " gtractTransformToDisplacementField " <NEW_LINE> _outputs_filenames = {'outputDeformationFiel... | title: Create Displacement Field
category: Diffusion.GTRACT
description: This program will compute forward deformation from the given Transform. The size of the DF is equal to MNI space
version: 4.0.0
documentation-url: http://wiki.slicer.org/slicerWiki/index.php/Modules:GTRACT
license: http://mri.radiology.uiowa.... | 62598f8b442bda511e95bffb |
class EdtMuet(Editeur): <NEW_LINE> <INDENT> def __init__(self, pere, objet=None, attribut=None): <NEW_LINE> <INDENT> Editeur.__init__(self, pere, objet, attribut) <NEW_LINE> <DEDENT> def entrer(self): <NEW_LINE> <INDENT> canal = self.objet <NEW_LINE> canal.flags = canal.flags ^ MUET <NEW_LINE> self.migrer_contexte(self... | Classe définissant le contexte éditeur 'muet'.
Ce contexte permet d'éditer le 'mutisme' d'un canal. | 62598f8b24f1403a9268567d |
class PositionwiseFeedForward(nn.Module): <NEW_LINE> <INDENT> def __init__(self, d_model, d_ff, dropout=0.1): <NEW_LINE> <INDENT> super(PositionwiseFeedForward, self).__init__() <NEW_LINE> self.w_1 = nn.Linear(d_model, d_ff) <NEW_LINE> self.w_2 = nn.Linear(d_ff, d_model) <NEW_LINE> self.dropout = nn.Dropout(dropout) <N... | Implements position-wise feedforward sublayer.
FFN(x) = max(0, xW1 + b1)W2 + b2 | 62598f8ba05bb46b3848a419 |
class Config(dict): <NEW_LINE> <INDENT> def __init__(self, file_=None): <NEW_LINE> <INDENT> if file_: <NEW_LINE> <INDENT> self.load_file(file_) <NEW_LINE> <DEDENT> <DEDENT> def load_file(self, filename): <NEW_LINE> <INDENT> with open(filename, "rt") as fh: <NEW_LINE> <INDENT> cfg = yaml.load(fh.read()) <NEW_LINE> <DEDE... | Configuration helper class.
It starts empty, and then the config can be set at any time. | 62598f8bfb3f5b602db47f80 |
@dataclass <NEW_LINE> class Interface(InformationResource): <NEW_LINE> <INDENT> _inherited_slots: ClassVar[List[str]] = [] <NEW_LINE> class_class_uri: ClassVar[URIRef] = CSOLINK.Interface <NEW_LINE> class_class_curie: ClassVar[str] = "csolink:Interface" <NEW_LINE> class_name: ClassVar[str] = "interface" <NEW_LINE> clas... | a point where two systems, subjects, organizations, etc. meet and interact. | 62598f8b0a366e3fb87dc570 |
class FileSystemTarget(Target): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> <DEDENT> @abc.abstractproperty <NEW_LINE> def fs(self): <NEW_LINE> <INDENT> raise <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def open(self, mode): <NEW_LINE> <INDENT> pass <NEW_LINE> <DE... | Base class for FileSystem Targets like :class:`~luigi.file.LocalTarget` and :class:`~luigi.contrib.hdfs.HdfsTarget`.
A FileSystemTarget has an associated :py:class:`FileSystem` to which certain operations can be
delegated. By default, :py:meth:`exists` and :py:meth:`remove` are delegated to the
:py:class:`FileSystem`,... | 62598f8bb830903b9686e241 |
class Columns(object): <NEW_LINE> <INDENT> (HOST, STATE, RAM, CPU, RESERVED, UNTIL, GROUPS, CAPABILITIES, IP_ADDRESS) = range(9) <NEW_LINE> DEFAULT = 'host,state,ram,cpu,reserved,until,ip_address' <NEW_LINE> DEFAULT_JSON = 'state,host' <NEW_LINE> @staticmethod <NEW_LINE> def get_columns(columns_string): <NEW_LINE> <IND... | Enumeration for the columns. | 62598f8b94891a1f408b94be |
class UnitTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.args_array = {} <NEW_LINE> self.args_array2 = {"-a": True} <NEW_LINE> self.args_array3 = {"-a": True, "-c": True} <NEW_LINE> self.args_array4 = {"-a": True, "-d": True} <NEW_LINE> self.opt_req_list = [] <NEW_LINE> self.opt_... | Class: UnitTest
Description: Class which is a representation of a unit testing.
Methods:
setUp
test_two_require_one_fail
test_two_require
test_one_require
test_empty_argsarray
test_empty_optreqlist
test_both_empty | 62598f8c3eb6a72ae038a1d3 |
class FunPDBeClientLogger(object): <NEW_LINE> <INDENT> def __init__(self, name="general", write_mode="a"): <NEW_LINE> <INDENT> self.write_mode = write_mode <NEW_LINE> self.logger = logging.getLogger(name) <NEW_LINE> self.configure() <NEW_LINE> <DEDENT> def configure(self): <NEW_LINE> <INDENT> config = logging.FileHandl... | The FunPDBe client uses logging to log
information and error to an output
file. The file path is defined in
constants.LOG_FILENAME | 62598f8c596a897236127815 |
class UserList(Resource): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.reqparse = reqparse.RequestParser() <NEW_LINE> self.reqparse.add_argument('name', type=str, required=True, help='No user name provided', location='json') <NEW_LINE> self.reqparse.add_argument('password', type=str, required=True, ... | User list resource.
Used by /users GET(all the users) and POST(to create a user). | 62598f8cd7e4931a7ef3bc3c |
class Stats(object): <NEW_LINE> <INDENT> def __init__(self, stats_dict): <NEW_LINE> <INDENT> self._object = stats_dict <NEW_LINE> for key in stats_dict: <NEW_LINE> <INDENT> setattr(self, key.lower(), stats_dict[key]) <NEW_LINE> <DEDENT> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "<Usage: num_objects={} siz... | RADOS Gateway User stats | 62598f8ce64d504609df9182 |
class HSAKernel(HSAKernelBase): <NEW_LINE> <INDENT> def __init__(self, llvm_module, name, argtypes): <NEW_LINE> <INDENT> super(HSAKernel, self).__init__() <NEW_LINE> self._llvm_module = llvm_module <NEW_LINE> self.assembly, self.binary = self._finalize() <NEW_LINE> self.entry_name = name <NEW_LINE> self.argument_types ... | A HSA kernel object | 62598f8c8a43f66fc4bf1d24 |
class JobInputInline(TabularInline): <NEW_LINE> <INDENT> model = JobInput <NEW_LINE> form = JobInputForm <NEW_LINE> extra = 0 <NEW_LINE> suit_classes = 'suit-tab suit-tab-inputs' <NEW_LINE> exclude = ('order',) <NEW_LINE> readonly_fields = ('name', 'api_name', 'value', 'file_path') <NEW_LINE> can_delete = False <NEW_LI... | List JobModels inputs | 62598f8c1f037a2d8b9e3c79 |
class CsvToWikiTable: <NEW_LINE> <INDENT> def __init__(self, inp, aggr, sep="|"): <NEW_LINE> <INDENT> self.input = inp <NEW_LINE> self.df = pd.read_csv(self.input, sep=sep) <NEW_LINE> self.column = aggr <NEW_LINE> self.group = None <NEW_LINE> <DEDENT> def get_group(self): <NEW_LINE> <INDENT> self.group = self.df[self.c... | Class to convert CSV file to wiki tables; the CSV needs an aggregation
column like the name of the different CAI groups (sezioni) or mountains
Good idea is to clean your CSV file with OpenRefine | 62598f8c3cc13d1c6d465307 |
class ParameterGeneration(function.Function): <NEW_LINE> <INDENT> def __init__(self, R, n_win=2): <NEW_LINE> <INDENT> self.R = R <NEW_LINE> self.n_win = n_win <NEW_LINE> <DEDENT> def forward_cpu(self, inputs): <NEW_LINE> <INDENT> O, = inputs <NEW_LINE> T, dim = O.shape[0], O.shape[1] / self.n_win <NEW_LINE> y = np.zero... | Parameter generation based on
Maximum-Likelihood criterion | 62598f8c73bcbd0ca4bc9def |
class NonlinearVstack(NonlinearOperator): <NEW_LINE> <INDENT> def __init__(self, nl_op1, nl_op2): <NEW_LINE> <INDENT> if not (isinstance(nl_op1, NonlinearOperator) and isinstance(nl_op2, NonlinearOperator)): <NEW_LINE> <INDENT> raise TypeError("Provided operators must be NonLinearOperator instances") <NEW_LINE> <DEDENT... | Stack of operators class
| d1 | | f(m) |
h(m) = | | = | |
| d2 | | g(m) | | 62598f8cec188e330fdf843e |
class TopHitsResults(): <NEW_LINE> <INDENT> def __init__(self, *, matching_results=None, hits=None): <NEW_LINE> <INDENT> self.matching_results = matching_results <NEW_LINE> self.hits = hits <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def _from_dict(cls, _dict): <NEW_LINE> <INDENT> args = {} <NEW_LINE> valid_keys = ['ma... | Top hit information for this query.
:attr int matching_results: (optional) Number of matching results.
:attr list[QueryResult] hits: (optional) Top results returned by the
aggregation. | 62598f8c5f7d997b871f91a9 |
class OWLSubClassOfAxiom(OWLClassAxiom): <NEW_LINE> <INDENT> __slots__ = '_sub_class', '_super_class' <NEW_LINE> def __init__(self, sub_class: OWLClassExpression, super_class: OWLClassExpression): <NEW_LINE> <INDENT> self._sub_class = sub_class <NEW_LINE> self._super_class = super_class <NEW_LINE> <DEDENT> def get_sub_... | Represents an SubClassOf axiom in the OWL 2 Specification. | 62598f8cb57a9660fecd161d |
class GcsConfigOpsTest(test.TestCase): <NEW_LINE> <INDENT> @pytest.mark.skipif(sys.platform == "darwin", reason=None) <NEW_LINE> def test_set_block_cache(self): <NEW_LINE> <INDENT> cfg = gcs.BlockCacheParams(max_bytes=1024*1024*1024) <NEW_LINE> if tf_v1: <NEW_LINE> <INDENT> with tf.Session() as session: <NEW_LINE> <IND... | GCS Config OPS test | 62598f8ce76e3b2f99fd85d0 |
class FullPath(object): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> self.path = path | Shortern path usage for API caller (see also SElement getLynk) | 62598f8c24f1403a9268567e |
class ReleaseViews(ListCreateAPIView): <NEW_LINE> <INDENT> serializer_class = CreateNewsModelSerializer | 简单的情况下 和ReleaseViews(APIView):效果是一样的
path('users/', ListCreateAPIView.as_view(queryset=User.objects.all(), serializer_class=UserSerializer), name='user-list')
header: { 一个大坑,微信小程序必须用json 格式
"Content-Type": "application/json" //指定请求格式是json
}, | 62598f8c596a897236127816 |
class ApproximateQAgent(PacmanQAgent): <NEW_LINE> <INDENT> def __init__(self, extractor='IdentityExtractor', **args): <NEW_LINE> <INDENT> self.featExtractor = util.lookup(extractor, globals())() <NEW_LINE> PacmanQAgent.__init__(self, **args) <NEW_LINE> self.weights = util.Counter() <NEW_LINE> <DEDENT> def getWeights(se... | ApproximateQLearningAgent
You should only have to overwrite getQValue
and update. All other QLearningAgent functions
should work as is. | 62598f8c82261d6c5272fca5 |
class _GlobalAutoReject(BaseAutoReject): <NEW_LINE> <INDENT> def __init__(self, n_channels=None, n_times=None, thresh=40e-6): <NEW_LINE> <INDENT> self.thresh = thresh <NEW_LINE> self.n_channels = n_channels <NEW_LINE> self.n_times = n_times <NEW_LINE> <DEDENT> def fit(self, X, y=None): <NEW_LINE> <INDENT> if self.n_cha... | Class to compute global rejection thresholds.
Parameters
----------
n_channels : int | None
The number of channels in the epochs. Defaults to None.
n_times : int | None
The number of time points in the epochs. Defaults to None.
thresh : float
Boilerplate API. The rejection threshold. | 62598f8cdd821e528d6d8adc |
class ec2Manager(Manager): <NEW_LINE> <INDENT> def _initialize_client(self, session): <NEW_LINE> <INDENT> return session.client('ec2') <NEW_LINE> <DEDENT> def launch(self): <NEW_LINE> <INDENT> from awspot.actions.ec2 import Launch <NEW_LINE> action = Launch(self.client, self.parser, self.args) <NEW_LINE> return action.... | Class for managing ec2 spot instances. | 62598f8cd4950a0f3b110c06 |
class Meta: <NEW_LINE> <INDENT> model = models.Container <NEW_LINE> fields = ['owner', 'app', 'release', 'type', 'num', 'state', 'created', 'updated', 'uuid'] | Metadata options for a :class:`ContainerSerializer`. | 62598f8cb830903b9686e242 |
class ConnectionPool(object): <NEW_LINE> <INDENT> def __init__(self, size, **kwargs): <NEW_LINE> <INDENT> if not isinstance(size, six.integer_types): <NEW_LINE> <INDENT> raise TypeError('Pool size arg must be an integer') <NEW_LINE> <DEDENT> if size < _MIN_POOL_SIZE: <NEW_LINE> <INDENT> raise ValueError('Pool size must... | Thread-safe connection pool.
.. note::
All keyword arguments are passed unmodified to the
:class:`Connection <.happybase.connection.Connection>` constructor
**except** for ``autoconnect``. This is because the ``open`` /
``closed`` status of a connection is managed by the pool. In addition,
if ``cl... | 62598f8c71ff763f4b5e7311 |
class EnglishOCRResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TextDetections = None <NEW_LINE> self.Angel = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("TextDetections") is not None: <NEW_LINE> <I... | EnglishOCR返回参数结构体
| 62598f8c96565a6dacd2cd48 |
class MonetaryConverter(models.AbstractModel): <NEW_LINE> <INDENT> _name = 'ir.qweb.field.monetary' <NEW_LINE> _inherit = 'ir.qweb.field' <NEW_LINE> @api.model <NEW_LINE> def value_to_html(self, value, options): <NEW_LINE> <INDENT> display_currency = options['display_currency'] <NEW_LINE> fmt = "%.{0}f".format(display_... | ``monetary`` converter, has a mandatory option
``display_currency`` only if field is not of type Monetary.
Otherwise, if we are in presence of a monetary field, the field definition must
have a currency_field attribute set.
The currency is used for formatting *and rounding* of the float value. It
is assumed that the l... | 62598f8cbaa26c4b54d4ee54 |
class SendReceiveItem(InvTestFunctions): <NEW_LINE> <INDENT> def test_inv003_send_receive_items(self): <NEW_LINE> <INDENT> user = "normal" <NEW_LINE> method = "search" <NEW_LINE> send_data = [("site_id", "Cruz Vermelha de Timor-Leste (CVTL) National Warehouse (Warehouse)", "option", ), ("to_site_id", "Lospalos Warehous... | Inventory Test - Send-Receive Workflow (Send-Receive items)
@Case: INV003
@param items: This test Send-Receive a specific item to another party.
This test assume that regression/inv-mngt has been added to prepop
- e.g. via demo/IFRC_Train
@TestDoc: https://docs.google.com/spreadsheet/ccc?key=0AmB3hMcgB... | 62598f8c656771135c48921c |
class UserGrants(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def create(**kwargs): <NEW_LINE> <INDENT> return UserGrants(**kwargs) <NEW_LINE> <DEDENT> def __init__(self, json=None, **kwargs): <NEW_LINE> <INDENT> if json is None and not kwargs: <NEW_LINE> <INDENT> raise ValueError('No data or kwargs present') ... | auto-generated. don't touch. | 62598f8cd7e4931a7ef3bc3e |
class Rule(ConditionalElement): <NEW_LINE> <INDENT> def __new__(cls, *args, salience=0): <NEW_LINE> <INDENT> obj = super(Rule, cls).__new__(cls, *args) <NEW_LINE> obj._wrapped = None <NEW_LINE> obj._wrapped_args = [] <NEW_LINE> obj._wrapped_self = None <NEW_LINE> obj.salience = salience <NEW_LINE> return obj <NEW_LINE>... | Base ``CE``, all ``CE`` are to derive from this class.
This class is used as a decorator, thus provoking __call__
to be called twice:
#. The first call is when the decorator is been created. At this
point we assign the function decorated to ``self._wrapped`` and
return ``self`` to be called the second time.
#.... | 62598f8c15baa72349461b21 |
class AccountsManager(object): <NEW_LINE> <INDENT> def __init__(self, accounts_module, desired_accounts, system, lock_file, lock_fname, single_pass=True): <NEW_LINE> <INDENT> if not lock_fname: <NEW_LINE> <INDENT> lock_fname = LOCKFILE <NEW_LINE> <DEDENT> self.accounts = accounts_module <NEW_LINE> self.desired_accounts... | Create accounts on a machine. | 62598f8cd53ae8145f918032 |
class DishPublicViewTest(APITestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.dish = Dish.objects.create(name='TestViewNameDish', description='TestViewDescriptionDish', price=19.99, preparation_time=45, is_vege=True) <NEW_LINE> self.dish.save() <NEW_LINE> <DEDENT> def test_retrieve_public_view_di... | Test suite for the api dish public view. | 62598f8c097d151d1a2c0bc8 |
class DjangoChannelsFTPHandler(FTPHandler): <NEW_LINE> <INDENT> banner = "teroftpd ready." <NEW_LINE> max_login_attempts = 1 <NEW_LINE> passive_ports = list(range(settings.PASSIVE_PORTS_MIN, settings.PASSIVE_PORTS_MAX)) <NEW_LINE> masquerade_address = os.getenv('FTPD_MASQUERADE_ADDRESS') <NEW_LINE> def __init__(self, c... | Tero FTP Handler. | 62598f8c07d97122c4216849 |
class HttpClientError(AioNapHttpBaseException): <NEW_LINE> <INDENT> pass | Called when the server tells us there was a client error (4xx). | 62598f8ce76e3b2f99fd85d1 |
class NotesHandler(NewebeAuthHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> notes = NoteManager.get_all() <NEW_LINE> self.return_documents(notes) <NEW_LINE> <DEDENT> def post(self): <NEW_LINE> <INDENT> logger.info("Note creation received.") <NEW_LINE> data = self.get_body_as_dict(expectedFields=["titl... | This handler handles requests that retrieve lists of notes ordered by
title.
* GET: Retrieves all notes ordered by title.
* POST: Create a new note. | 62598f8c004d5f362081edca |
class QuestionNotAnswered(QuestionException): <NEW_LINE> <INDENT> pass | This question was not answered yet | 62598f8c26068e7796d4c4ff |
class GameOver(Exception): <NEW_LINE> <INDENT> def __init__(self, player): <NEW_LINE> <INDENT> self.player = player <NEW_LINE> self.scores_write() <NEW_LINE> print(f'Your score: {player.score}.') <NEW_LINE> <DEDENT> def scores_write(self): <NEW_LINE> <INDENT> file = open('scores.txt', 'a') <NEW_LINE> file.writelines(f"... | end game | 62598f8c07d97122c421684a |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.