code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class _ListView(QtGui.QListView): <NEW_LINE> <INDENT> def __init__(self, editor): <NEW_LINE> <INDENT> QtGui.QListView.__init__(self) <NEW_LINE> self._editor = editor <NEW_LINE> self.setItemDelegate(_ItemDelegate(editor, self)) <NEW_LINE> self.setModel(editor.model) <NEW_LINE> factory = editor.factory <NEW_LINE> if fact... | A QListView configured to behave as expected by TraitsUI.
| 62598f8ba8ecb03325870d8e |
class LineCollection(Collection): <NEW_LINE> <INDENT> _edge_default = True <NEW_LINE> def __init__(self, segments, *args, zorder=2, **kwargs ): <NEW_LINE> <INDENT> argnames = ["linewidths", "colors", "antialiaseds", "linestyles", "offsets", "transOffset", "norm", "cmap", "pickradius", "zorder", "facecolors"] <NEW_LINE>... | Represents a sequence of `.Line2D`\s that should be drawn together.
This class extends `.Collection` to represent a sequence of
`.Line2D`\s instead of just a sequence of `.Patch`\s.
Just as in `.Collection`, each property of a *LineCollection* may be either
a single value or a list of values. This list is then used cy... | 62598f8b73bcbd0ca4bc9ddb |
@context.add <NEW_LINE> class Olleh(Message): <NEW_LINE> <INDENT> server_name = field.String() <NEW_LINE> motd = field.String() | The server accepts the client. | 62598f8be76e3b2f99fd85bc |
class Spider: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.tokens = [] <NEW_LINE> self.title = "" <NEW_LINE> <DEDENT> def parser(self, urlIn): <NEW_LINE> <INDENT> page = urllib.request.urlopen(urlIn) <NEW_LINE> page = page.read() <NEW_LINE> soup = BeautifulSoup(page) <NEW_LINE> self.title = soup.tit... | Class to download a web page and then create a list of (normalized) tokens | 62598f8b15baa72349461b0c |
class MenuItem: <NEW_LINE> <INDENT> def __init__(self, value, text, status=0): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> self.text = text <NEW_LINE> self.status = status | A menu item which can also be used with radiolists and checklists. | 62598f8bf7d966606f747b6a |
class HiliteTreeprocessor(markdown.treeprocessors.Treeprocessor): <NEW_LINE> <INDENT> def run(self, root): <NEW_LINE> <INDENT> blocks = root.getiterator('pre') <NEW_LINE> for block in blocks: <NEW_LINE> <INDENT> children = block.getchildren() <NEW_LINE> if len(children) == 1 and children[0].tag == 'code': <NEW_LINE> <I... | Hilight source code in code blocks. | 62598f8b7cff6e4e811b559f |
class SeeError(Exception): <NEW_LINE> <INDENT> pass | This is used internally by :func:`see.see` to indicate an invalid
attribute, such as one that raises an exception when it is accessed. | 62598f8b8e71fb1e983bb63d |
class DrawPane(wx.PyScrolledWindow): <NEW_LINE> <INDENT> VSIZE = (1000, 1000) <NEW_LINE> def __init__(self, *args, **kw): <NEW_LINE> <INDENT> wx.PyScrolledWindow.__init__(self, *args, **kw) <NEW_LINE> self.SetScrollbars(10, 10, 100, 100) <NEW_LINE> self.prepare_buffer() <NEW_LINE> cdc = wx.ClientDC(self) <NEW_LINE> sel... | A PyScrolledWindow with a 1000x1000 drawable area | 62598f8b656771135c489208 |
class DispatchFinished(BaseRoutingException): <NEW_LINE> <INDENT> pass | Raised by:
- server.display
- server.redirect
Can be used by user to stop anything after. It means:
- finish request (session, etc.)
- return data to browser | 62598f8b498bea3a75a576b1 |
class PartitionVridStatus(A10BaseClass): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.ERROR_MSG = "" <NEW_LINE> self.required=[] <NEW_LINE> self.b_key = "partition-vrid-status" <NEW_LINE> self.a10_url="/axapi/v3/vrrp-a/partition-vrid-status/oper" <NEW_LINE> self.DeviceProxy = "" <NEW_LINE>... | Class Description::
Operational Status for the object partition-vrid-status.
Class partition-vrid-status supports CRUD Operations and inherits from `common/A10BaseClass`.
This class is the `"PARENT"` class for this module.`
:param DeviceProxy: The device proxy for REST operations and session handling. Refer to `commo... | 62598f8b8da39b475be02d6b |
class WeightedDataMaskCDFTestCase( data_manipulation_test_base.AbstractCDFTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.data_values = '1 2; 3 4' <NEW_LINE> self.weight_values = '5 1; 1 1' <NEW_LINE> self.mask_values = None <NEW_LINE> self.expected_average = 14.0/8 <NEW_LINE> self.expected_med... | Using more realistic weights. | 62598f8b3617ad0b5ee05cd1 |
class User(db.Model, UserMixin): <NEW_LINE> <INDENT> __tablename__ = 'user' <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> active = db.Column('is_active', db.Boolean(), nullable=False, server_default='1') <NEW_LINE> email = db.Column(db.String(255), nullable=False, unique=True) <NEW_LINE> email_conf... | User class to handle authentication and authorization.
active: can login e.g. not banned
email_confirmed_at: Zeitstempel, an dem die E-Mail bestätigt wurde
roles: Liste der, dem User zugeorndeten Regeln | 62598f8b30dc7b766599f3e6 |
class WebpushFcmOptions(object): <NEW_LINE> <INDENT> def __init__(self, link=None): <NEW_LINE> <INDENT> self.link = link | Options for features provided by the FCM SDK for Web.
Args:
link: The link to open when the user clicks on the notification. Must be an HTTPS URL
(optional). | 62598f8bcb5e8a47e493bf36 |
class AbstractExtractor: <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> @abstractmethod <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.name = None <NEW_LINE> <DEDENT> def _name(self): <NEW_LINE> <INDENT> return self.name <NEW_LINE> <DEDENT> def _language(self, item): <NEW_LINE> <INDENT> return None <NE... | Abstract class for article extractors.
| 62598f8bd7e4931a7ef3bc2a |
class TrieNode(Base): <NEW_LINE> <INDENT> __tablename__ = 'trienode' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> trie_id = Column(Integer, nullable=False) <NEW_LINE> node_id = Column(Integer, ForeignKey('node.id'), nullable=False) <NEW_LINE> node = relationship("AddressNode") | The mapping-table of TRIE id and Node id. Stored in 'trienode' table.
Attributes
----------
id : int
The key identifier that is automatically sequentially numbered.
trie_id : int
TRIE id that corresponds one-to-one to a notation.
node_id : int
Node id that corresponds one-to-one to an AddressNode.
node : A... | 62598f8b004d5f362081edc0 |
class TryExceptEntry(TryExceptEntryBase): <NEW_LINE> <INDENT> def __init__(self, address): <NEW_LINE> <INDENT> super(TryExceptEntry, self).__init__(address) <NEW_LINE> self.handler = Dword(address + 8) + idaapi.get_imagebase() <NEW_LINE> self.target = Dword(address + 12) + idaapi.get_imagebase() <NEW_LINE> <DEDENT> def... | Represents a __try/__except style SCOPE_TABLE | 62598f8b3cc13d1c6d4652f5 |
class HierarchySettingsInfo(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'type': {'readonly': True}, 'name': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'... | The hierarchy settings resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: The fully qualified ID for the settings object. For example,
/providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000/settings/default.
:vartype id: str
:iva... | 62598f8b10dbd63aa1c70745 |
class CircuitEvent(Event): <NEW_LINE> <INDENT> _POSITIONAL_ARGS = ('id', 'status', 'path') <NEW_LINE> _KEYWORD_ARGS = { 'BUILD_FLAGS': 'build_flags', 'PURPOSE': 'purpose', 'HS_STATE': 'hs_state', 'REND_QUERY': 'rend_query', 'TIME_CREATED': 'created', 'REASON': 'reason', 'REMOTE_REASON': 'remote_reason', 'SOCKS_USERNAME... | Event that indicates that a circuit has changed.
The fingerprint or nickname values in our 'path' may be **None** if the
VERBOSE_NAMES feature isn't enabled. The option was first introduced in tor
version 0.1.2.2, and on by default after 0.2.2.1.
The CIRC event was one of the first Control Protocol V1 events and was
... | 62598f8b63d6d428bbee2347 |
class MyNetworkMonitor(threading.Thread): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> threading.Thread.__init__(self) <NEW_LINE> self.AD = "-" <NEW_LINE> AF_INET6 = getattr(socket, 'AF_INET6', object()) <NEW_LINE> self.proto_map = { (AF_INET, SOCK_STREAM): 'tcp', (AF_INET6, SOCK_STREAM): 'tcp6', (AF_INE... | Used to monitor the number of network connections to the server. | 62598f8b435de62698e9b97d |
class MESH_OT_Print3D_Check_Thick(Operator): <NEW_LINE> <INDENT> bl_idname = "mesh.print3d_check_thick" <NEW_LINE> bl_label = "Print3D Check Thickness" <NEW_LINE> @staticmethod <NEW_LINE> def main_check(obj, info): <NEW_LINE> <INDENT> scene = bpy.context.scene <NEW_LINE> print_3d = scene.print_3d <NEW_LINE> faces_error... | Check geometry is above the minimum thickness preference (relies on correct normals) | 62598f8b8c0ade5d55dc3452 |
class IApp(Interface): <NEW_LINE> <INDENT> pass | Marker interface for an application context.
| 62598f8b3c8af77a43b67cfd |
class Viewlet(ViewletBase): <NEW_LINE> <INDENT> index = ViewPageTemplateFile('lightbox.pt') <NEW_LINE> css_class = "componentFull" <NEW_LINE> img_size = "lightbox" <NEW_LINE> component = "lightbox" <NEW_LINE> @property <NEW_LINE> @memoize <NEW_LINE> def images(self): <NEW_LINE> <INDENT> items = [] <NEW_LINE> provider =... | Viewlet showing the lightbox of the images
| 62598f8b23e79379d538c08c |
class BaseTask(object): <NEW_LINE> <INDENT> def __init__(self, cooldown_class=None): <NEW_LINE> <INDENT> from htk.cachekeys import TaskCooldown <NEW_LINE> if inspect.isclass(cooldown_class) and issubclass(cooldown_class, TaskCooldown): <NEW_LINE> <INDENT> self.cooldown_class = cooldown_class <NEW_LINE> <DEDENT> else: <... | Base class for background tasks
Examples:
- Daily or weekly updates
- Drip reminders
- Account status reports
- Shopping cart abandonment reminders | 62598f8b07d97122c4216836 |
class Order(Base): <NEW_LINE> <INDENT> __tablename__ = 'order' <NEW_LINE> id = Column(Integer, Sequence('order_seq_id', optional=True), primary_key=True,) <NEW_LINE> description = Column(Text) <NEW_LINE> value = Column(Integer) <NEW_LINE> external_reference_number = Column(Text, unique=True) <NEW_LINE> status = Column(... | Models a basic order and supplies utility methods for find orders by
id and external reference number. | 62598f8b5f7d997b871f91a0 |
class Acceleration(Payload): <NEW_LINE> <INDENT> def __init__(self, x = 0, y = 0, z = 0, raw = None, timestamp = 0): <NEW_LINE> <INDENT> self.x = 0 <NEW_LINE> self.y = 0 <NEW_LINE> self.z = 0 <NEW_LINE> if raw == None or len(raw) != 6: <NEW_LINE> <INDENT> raise ValueError( "Bad length!") <NEW_LINE> <DEDENT> Payload.__i... | Horizon Message Payload - Acceleration | 62598f8b0fa83653e46f4a7d |
class AttachmentPart(object): <NEW_LINE> <INDENT> def __init__(self, image, attachment_point=None): <NEW_LINE> <INDENT> self.image = image <NEW_LINE> dimensions = image.get_rect() <NEW_LINE> self.width = dimensions.width <NEW_LINE> self.height = dimensions.height <NEW_LINE> self.attachment_point = attachment_point <NEW... | Singular part of the attachment set. Holds position, image and allows to get mirrored part.
Doesn't know how to draw itself (acts primarily as a image/coord container) | 62598f8bd53ae8145f91801f |
class Side(object): <NEW_LINE> <INDENT> def __init__(self, max_fielded): <NEW_LINE> <INDENT> self._max_fielded = max_fielded <NEW_LINE> self._side = [None for _ in range(max_fielded)] <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> return self._max_fielded <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <... | Handles a side on the field of battle | 62598f8b94891a1f408b94b6 |
class BertClassifier(nn.Module): <NEW_LINE> <INDENT> def __init__(self, config, num_labels, pooling="max"): <NEW_LINE> <INDENT> super(BertClassifier, self).__init__() <NEW_LINE> self.bert = BertModel(config) <NEW_LINE> self.dropout = nn.Dropout(config.hidden_dropout_prob) <NEW_LINE> self.classifier = nn.Linear(config.h... | BERT model for classification.
This module is composed of the BERT model with a linear layer on top of
the pooled output.
Example usage:
```python
# Already been converted into WordPiece token ids
input_ids = torch.LongTensor([[31, 51, 99], [15, 5, 0]])
input_mask = torch.LongTensor([[1, 1, 1], [1, 1, 0]])
token_type_... | 62598f8b71ff763f4b5e72ff |
class ProjectSchema(Schema): <NEW_LINE> <INDENT> name = fields.Str() <NEW_LINE> id = fields.Str() <NEW_LINE> description = fields.Str(allow_none=True) <NEW_LINE> public = fields.Boolean() <NEW_LINE> public = fields.Boolean() <NEW_LINE> latest_experiment_name = fields.Str(allow_none=True) <NEW_LINE> @post_load <NEW_LINE... | Project schema | 62598f8b656771135c48920a |
class Contact(Object): <NEW_LINE> <INDENT> ID = 0xb0700011 <NEW_LINE> def __init__( self, phone_number: str, first_name: str, last_name: str = None, vcard: str = None, user_id: int = None ): <NEW_LINE> <INDENT> self.phone_number = phone_number <NEW_LINE> self.first_name = first_name <NEW_LINE> self.last_name = last_nam... | This object represents a phone contact.
Args:
phone_number (``str``):
Contact's phone number.
first_name (``str``):
Contact's first name.
last_name (``str``, *optional*):
Contact's last name.
vcard (``str``, *optional*):
Contact's vCard.
user_id (``int``, *option... | 62598f8b8da39b475be02d6d |
class BaseTabProxy(BaseCatalogListingTab): <NEW_LINE> <INDENT> implements(ITabbedViewProxy) <NEW_LINE> def render(self): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> def __call__(self): <NEW_LINE> <INDENT> return self.render_preferred_view() <NEW_LINE> <DEDENT> def render_preferred_view(self): <NEW_LINE> <INDENT> ret... | This proxyview is looking for the last
used view-mode (list or gallery) on a tab
and reopens this view. | 62598f8bc432627299fa2b5b |
class Fit: <NEW_LINE> <INDENT> def __init__(self, atoms): <NEW_LINE> <INDENT> self.crds = get_crds(atoms) <NEW_LINE> self.crdset = ksh.crdset(self.crds) <NEW_LINE> <DEDENT> def no_rotate(self): <NEW_LINE> <INDENT> fit = self.crdset.calc_all() <NEW_LINE> self.no_rotate = fit <NEW_LINE> return self.no_rotate <NEW_LINE> <... | Results of one fit | 62598f8b9b70327d1c57e92d |
class Block: <NEW_LINE> <INDENT> def __init__(self, number_of_colors): <NEW_LINE> <INDENT> self.color = randint(0, number_of_colors-1) <NEW_LINE> self.selected = False | Class which describes one block | 62598f8bd6c5a102081e1cd2 |
class MelodicIntervalDiversity(DiscreteAnalysis): <NEW_LINE> <INDENT> _DOC_ALL_INHERITED = False <NEW_LINE> name = 'Interval Diversity' <NEW_LINE> identifiers = ['ambitus', 'range', 'span'] <NEW_LINE> def __init__(self, referenceStream=None): <NEW_LINE> <INDENT> DiscreteAnalysis.__init__(self, referenceStream=reference... | An analysis method to determine the diversity of intervals used in a Stream.
| 62598f8bf8510a7c17d7df3e |
class TestParentBranchTimeDoubleFix(BaseTest): <NEW_LINE> <INDENT> def test_no_attribute_raises(self): <NEW_LINE> <INDENT> fix = ParentBranchTimeDoubleFix('1.nc', '/a') <NEW_LINE> exception_text = ('Cannot find attribute branch_time_in_parent in ' 'file 1.nc') <NEW_LINE> self.assertRaisesRegex(AttributeNotFoundError, e... | Test ParentBranchTimeDoubleFix | 62598f8b8a43f66fc4bf1d14 |
class PostPageView(DetailView): <NEW_LINE> <INDENT> http_method_names = ['get'] <NEW_LINE> model = Post <NEW_LINE> template_name = 'post.html' <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super(PostPageView, self).get_context_data(**kwargs) <NEW_LINE> context['form'] = CommentForm() <N... | The class describes the presentation of the post page and processes
the requests. | 62598f8b15baa72349461b0f |
class MockInterpreter(Interpreter): <NEW_LINE> <INDENT> def __init__(self, space, err_stream=None, inp_stream=None): <NEW_LINE> <INDENT> if err_stream is None: <NEW_LINE> <INDENT> self.msgs = [] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.msgs = err_stream <NEW_LINE> <DEDENT> Interpreter.__init__(self, space) <N... | Like the interpreter, but captures stdout
| 62598f8b6aa9bd52df0d4a63 |
@route('/Borough/Api/delete/falseAliasName') <NEW_LINE> class DeletefalseAliasnameHandle(BaseController): <NEW_LINE> <INDENT> def initialize(self): <NEW_LINE> <INDENT> self.service = BoroughOnlineService() <NEW_LINE> self.result = {"message": "success", "code": 200} <NEW_LINE> <DEDENT> @catch_exception <NEW_LINE> def g... | 小区拆分别名删除 | 62598f8bd7e4931a7ef3bc2c |
class AvanceObjeto(models.Model): <NEW_LINE> <INDENT> fecha_creacion = models.DateField(default=datetime.date.today) <NEW_LINE> objeto = models.ForeignKey(Objeto) <NEW_LINE> descripcion = models.TextField() <NEW_LINE> imagenes = models.ManyToManyField(Imagen, through='AvancesObjetosImagenes', blank=True) <NEW_LINE> cla... | Reporte de avance de un objeto enviado por un artesano. | 62598f8b097d151d1a2c0bb6 |
class JobCode(ModelNormal): <NEW_LINE> <INDENT> allowed_values = { } <NEW_LINE> validations = { } <NEW_LINE> additional_properties_type = None <NEW_LINE> _nullable = False <NEW_LINE> @cached_property <NEW_LINE> def openapi_types(): <NEW_LINE> <INDENT> return { 'id': (int,), 'code': (str,), 'client': (str,), 'client_id'... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the a... | 62598f8b23849d37ff850c4e |
class ProductProduct(orm.Model): <NEW_LINE> <INDENT> _inherit = 'product.product' <NEW_LINE> def get_all_fields_to_update(self, all_db=None): <NEW_LINE> <INDENT> res = {} <NEW_LINE> if all_db is None: <NEW_LINE> <INDENT> _logger.warning('No all_db for generate extra fields') <NEW_LINE> return res <NEW_LINE> <DEDENT> if... | Model name: Add extra fields to product
| 62598f8b3cc13d1c6d4652f7 |
class BrowseGaleryTests(Browser): <NEW_LINE> <INDENT> def test_galery(self): <NEW_LINE> <INDENT> self.selenium.get('%s%s' % (self.live_server_url, '/galery/')) <NEW_LINE> header_title = self.selenium.find_element_by_tag_name("h1") <NEW_LINE> self.assertEqual(header_title.text, "Galerie") <NEW_LINE> card_titles = self.s... | Tests for the browsing | 62598f8ba79ad16197769bf4 |
class _RNNBase(sequence_to_sequence.SequenceToSequence): <NEW_LINE> <INDENT> def auto_config(self, num_replicas=1): <NEW_LINE> <INDENT> config = super().auto_config(num_replicas=num_replicas) <NEW_LINE> return config_util.merge_config( config, { "params": { "optimizer": "Adam", "learning_rate": 0.0002, }, "train": { "b... | Base class for RNN based NMT models. | 62598f8b462c4b4f79dbb593 |
class AffiliateReferralActionAdmin(TimestampedModelAdmin): <NEW_LINE> <INDENT> model = models.AffiliateReferralAction <NEW_LINE> include_created_on_in_list = True <NEW_LINE> list_display = [ "id", "get_affiliate_name", "get_affiliate_code", "created_user_id", "created_order_id", ] <NEW_LINE> raw_id_fields = ["affiliate... | Admin for AffiliateReferralAction | 62598f8b96565a6dacd2cd40 |
class SpecWaitObject: <NEW_LINE> <INDENT> def __init__(self, connection): <NEW_LINE> <INDENT> self.connection = weakref.ref(connection) <NEW_LINE> self.isdisconnected = True <NEW_LINE> self.channelWasUnregistered = False <NEW_LINE> self.value = None <NEW_LINE> self.spec_reply_arrived_event = gevent.event.Event() <NEW_L... | Helper class for waiting specific events from Spec | 62598f8bb830903b9686e23a |
class TestAuthLogin(BaseTestCase): <NEW_LINE> <INDENT> def test_post_user_login(self): <NEW_LINE> <INDENT> user = add_random_user() <NEW_LINE> credentials = dict(username=user.username, password="test") <NEW_LINE> response, data = self.send_post("/auth/login", credentials) <NEW_LINE> self.assertTrue(data["status"] == "... | Tests for User Login | 62598f8beab8aa0e5d30b909 |
class TestClientInterrogateEndToEnd(base.AutomatedTest): <NEW_LINE> <INDENT> platforms = ["Windows", "Linux", "Darwin"] <NEW_LINE> flow = "Interrogate" <NEW_LINE> attributes = [aff4.VFSGRRClient.SchemaCls.CLIENT_INFO, aff4.VFSGRRClient.SchemaCls.GRR_CONFIGURATION, aff4.VFSGRRClient.SchemaCls.HOSTNAME, aff4.VFSGRRClient... | Tests the Interrogate flow on Windows. | 62598f8bf7d966606f747b6e |
class CloudWatch(object): <NEW_LINE> <INDENT> def __init__(self, key, secret_key, metric): <NEW_LINE> <INDENT> self.base_url = "monitoring.ap-northeast-1.amazonaws.com" <NEW_LINE> self.key = key <NEW_LINE> self.secret_key = secret_key <NEW_LINE> self.metric = metric <NEW_LINE> <DEDENT> def get_instance_id(self, instanc... | Base class for Amazon CloudWatch | 62598f8b71ff763f4b5e7301 |
class TestRenameInitFilemapAlt(object): <NEW_LINE> <INDENT> skiptests = not TEST_HARVESTER_INIT_FILEMAP_ALT <NEW_LINE> @pytest.mark.skipif(skiptests, reason="Work in progress") <NEW_LINE> @patch('photo_rename.harvester.Filemap', Stub2Filemap) <NEW_LINE> @patch('photo_rename.Harvester.read_alt_file_map') <NEW_LINE> @pat... | Tests using alternate file map. | 62598f8ba4f1c619b294e178 |
class _ClientGSSKexAuth(_ClientAuth): <NEW_LINE> <INDENT> @asyncio.coroutine <NEW_LINE> def _start(self): <NEW_LINE> <INDENT> if self._conn.gss_kex_auth_requested(): <NEW_LINE> <INDENT> self.logger.debug1('Trying GSS key exchange auth') <NEW_LINE> yield from self.send_request(key=self._conn.get_gss_context()) <NEW_LINE... | Client side implementation of GSS key exchange auth | 62598f8bcad5886f8bdc4e54 |
class TransformDisabled(TransformConfigException): <NEW_LINE> <INDENT> def __init__(self, name=None, message=None): <NEW_LINE> <INDENT> if not message: <NEW_LINE> <INDENT> message = "Transform is currently disabled" <NEW_LINE> if name: <NEW_LINE> <INDENT> message += ': ' + name <NEW_LINE> <DEDENT> <DEDENT> super(Transf... | an exception indicating that a template is currently (marked as) disabled | 62598f8b9b70327d1c57e92f |
class TweetFetch: <NEW_LINE> <INDENT> def __init__(self, args): <NEW_LINE> <INDENT> self.logger = args.logger <NEW_LINE> self.logger.debug("Setting Up Stream!") <NEW_LINE> config = json.load(open(args.config)) <NEW_LINE> streamListener = StreamListener() <NEW_LINE> streamListener.setup(dict(logger=args.logger, stream_p... | Tweet Fetcher Class | 62598f8b76d4e153a661c7a7 |
class Device(object): <NEW_LINE> <INDENT> type = None <NEW_LINE> _type_str = "undefined device" <NEW_LINE> @classmethod <NEW_LINE> def class_from_type(cls, type): <NEW_LINE> <INDENT> for cls in cls.__subclasses__(): <NEW_LINE> <INDENT> if type == cls.type: <NEW_LINE> <INDENT> return cls <NEW_LINE> <DEDENT> <DEDENT> rai... | Abstract class wrapping DeviceType
Provides convienence functions for associcated Mediums.
type is DeviceType constant (e.g. Constants.DeviceType_DVD). | 62598f8b7b25080760ed703b |
class CourseChapter(LearningObject): <NEW_LINE> <INDENT> generate_table_of_contents = models.BooleanField( verbose_name=_('LABEL_GENERATE_TOC'), default=False, ) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> verbose_name = _('MODEL_NAME_COURSE_CHAPTER') <NEW_LINE> verbose_name_plural = _('MODEL_NAME_COURSE_CHAPTER_PLURAL'... | Chapters can offer and organize learning material as one page chapters. | 62598f8b6aa9bd52df0d4a65 |
class Attitude(_object): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> __setattr__ = lambda self, name, value: _swig_setattr(self, Attitude, name, value) <NEW_LINE> __swig_getmethods__ = {} <NEW_LINE> __getattr__ = lambda self, name: _swig_getattr(self, Attitude, name) <NEW_LINE> __repr__ = _swig_repr <NEW_LI... | Proxy of C++ vn::math::AttitudeF class. | 62598f8bdc8b845886d5314a |
class Polygon(object): <NEW_LINE> <INDENT> def __init__(self, vertices): <NEW_LINE> <INDENT> from matplotlib.path import Path <NEW_LINE> self.poly = Path(vertices) <NEW_LINE> <DEDENT> def contains(self, points): <NEW_LINE> <INDENT> points = np.atleast_2d(points) <NEW_LINE> points_flat = points.reshape((-1, 2)) <NEW_LIN... | A polygon, to implement containment conditions. | 62598f8b8e05c05ec3f6ec11 |
class ModuleManage(object): <NEW_LINE> <INDENT> oracle_user = [] <NEW_LINE> oracle_home = '' <NEW_LINE> source_time = '' <NEW_LINE> record_home = '' <NEW_LINE> def __init__(self, option_dict): <NEW_LINE> <INDENT> self.oracle_user = option_dict['usr'] <NEW_LINE> self.source_time = option_dict['day'] <NEW_LINE> if option... | Class about module operations.
:method obtain_object: | 62598f8b16aa5153ce400096 |
class NextRedirectMixin(object): <NEW_LINE> <INDENT> redirect_param = 'next' <NEW_LINE> def get_next_redirect(self): <NEW_LINE> <INDENT> next = self.request.GET.get(self.redirect_param) <NEW_LINE> if next is None: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> netloc = urlparse.urlparse(next)[1] <NEW_LINE> if netl... | A simple mixin for checking for a next parameter for redirects. | 62598f8b24f1403a92685677 |
class Solution: <NEW_LINE> <INDENT> def reverseString(self, s): <NEW_LINE> <INDENT> r = list(s) <NEW_LINE> i, j = 0, len(s) - 1 <NEW_LINE> while i < j: <NEW_LINE> <INDENT> r[i], r[j] = r[j], r[i] <NEW_LINE> i += 1 <NEW_LINE> j -= 1 <NEW_LINE> <DEDENT> return "".join(r) | 344. Reverse String
Example:
Given s = "hello", return "olleh". | 62598f8b15baa72349461b12 |
class Wheel: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.bins = tuple(Bin() for i in range(BIN_NUM)) <NEW_LINE> self.random_generator = random.Random() <NEW_LINE> <DEDENT> def add_outcome(self, number, outcome): <NEW_LINE> <INDENT> self.bins[number].add(outcome) <NEW_LINE> <DEDENT> def choose(self)... | Keep a tuple of 38 bins 0-36, 37(00), pick a random Bin
Attributes:
bins (tuple):a tuple of 38 bins
random_generator (random): a class of random | 62598f8b596a897236127808 |
class Solution(object): <NEW_LINE> <INDENT> def letterCombinations(self, digits): <NEW_LINE> <INDENT> digit_to_letters = { '2': ['a', 'b', 'c'], '3': ['d', 'e', 'f'], '4': ['g', 'h', 'i'], '5': ['j', 'k', 'l'], '6': ['m', 'n', 'o'], '7': ['p', 'q', 'r', 's'], '8': ['t', 'u', 'v'], '9': ['w', 'x', 'y', 'z'], '0': [' '] ... | Time complexity : O(3^n x 4^m)
where
N is the number of digits in the input that maps to 3 letters (e.g. 2, 3, 4, 5, 6, 8)
M is the number of digits in the input that maps to 4 letters (e.g. 7, 9),
and N+M is the total number digits in the input.
O(3^n x 4^m): since one as to keep O(3^n x 4^m) solutions | 62598f8bac7a0e7691f7209d |
class Logger(): <NEW_LINE> <INDENT> LOCATION_TEMPLATE = "{cls}:{func}({arg1}) {arg2}" <NEW_LINE> def _log(self, msg=None): <NEW_LINE> <INDENT> from calibre_plugins.marvin_manager.config import plugin_prefs <NEW_LINE> if not plugin_prefs.get('debug_plugin', False): <NEW_LINE> <INDENT> self._log = self.__null <NEW_LINE> ... | A self-modifying class to print debug statements.
If disabled in prefs, methods are neutered at first call for performance optimization | 62598f8b7cff6e4e811b55a5 |
class SuadeConfig(object): <NEW_LINE> <INDENT> DB_PROTOCOL = "postgres" <NEW_LINE> DB_USERNAME = os.getenv('DB_USERNAME') <NEW_LINE> DB_PASSWORD = os.getenv('DB_PASSWORD') <NEW_LINE> DB_HOSTNAME = "candidate.suade.org" <NEW_LINE> DB_DATABASE = "suade" <NEW_LINE> FLASK_HOST = "0.0.0.0" <NEW_LINE> FLASK_PORT = 5000 <NEW_... | The SuadeConfig | 62598f8b287bf620b627174a |
class SaveWin: <NEW_LINE> <INDENT> def __init__(self, pic, hud): <NEW_LINE> <INDENT> self.win = Tk() <NEW_LINE> self.pic = pic <NEW_LINE> self.hud_frame = Frame(master=self.win) <NEW_LINE> self.button_frame = Frame(master=self.win) <NEW_LINE> self.hud = SaveHUD(self.hud_frame, pic, self) <NEW_LINE> self.full_save_butto... | Windows to save an image
| 62598f8ba4f1c619b294e17a |
class OpProd(OpKeepdims): <NEW_LINE> <INDENT> def __init__(self, x: Operation, axis: Optional[Union[int, Sequence[int]]] = None, keepdims: bool = False, **kwargs): <NEW_LINE> <INDENT> super(OpProd, self).__init__(self.__class__, x, axis, keepdims, **kwargs) <NEW_LINE> <DEDENT> def _forward(self, feed_dict: Mapping[Unio... | Product of elements over a given axis. | 62598f8b91af0d3eaad39991 |
class LUISParameters(AnalysisParameters): <NEW_LINE> <INDENT> _validation = { 'target_kind': {'required': True}, 'query': {'max_length': 500, 'min_length': 0}, } <NEW_LINE> _attribute_map = { 'target_kind': {'key': 'targetKind', 'type': 'str'}, 'api_version': {'key': 'apiVersion', 'type': 'str'}, 'additional_properties... | This is a set of request parameters for LUIS Generally Available projects.
All required parameters must be populated in order to send to Azure.
:ivar target_kind: Required. The type of a target service.Constant filled by server. Possible
values include: "luis", "conversation", "question_answering", "non_linked".
:va... | 62598f8b9b70327d1c57e931 |
class SpeedControl(object): <NEW_LINE> <INDENT> def __init__(self, kp, ki=1, kd=0, per=0.5): <NEW_LINE> <INDENT> self.pid_control = PidControl(kp, ki, kd) <NEW_LINE> self.sample_period = per <NEW_LINE> self.avg_velocity = 0 <NEW_LINE> self.prev_throttle = THROTTLE_MIN <NEW_LINE> self.prev_distance = None <NEW_LINE> sel... | Uses PID control to calculate what the throttle of the robot should be. | 62598f8bbde94217f3707430 |
class SmartSsdWwn(Model): <NEW_LINE> <INDENT> def __init__(self, naa: int=None, oui: int=None, id: int=None): <NEW_LINE> <INDENT> self.swagger_types = { 'naa': int, 'oui': int, 'id': int } <NEW_LINE> self.attribute_map = { 'naa': 'naa', 'oui': 'oui', 'id': 'id' } <NEW_LINE> self._naa = naa <NEW_LINE> self._oui = oui <N... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598f8b379a373c97d98ba8 |
class DenialConstraint: <NEW_LINE> <INDENT> def __init__(self, dc_string, schema): <NEW_LINE> <INDENT> dc_string = dc_string.replace('"', "'") <NEW_LINE> split = dc_string.split('&') <NEW_LINE> self.tuple_names = [] <NEW_LINE> self.predicates = [] <NEW_LINE> self.cnf_form = "" <NEW_LINE> self.components = [] <NEW_LINE>... | Class that defines the denial constraints. | 62598f8b3cc13d1c6d4652fb |
class TextosProntosView(FaleConoscoAdminRequired, grok.View): <NEW_LINE> <INDENT> grok.name('textos-prontos') <NEW_LINE> grok.require('zope2.View') <NEW_LINE> grok.context(ISiteRoot) <NEW_LINE> def textos(self): <NEW_LINE> <INDENT> portal = api.portal.get() <NEW_LINE> textos = getattr(portal, 'textos-prontos').objectVa... | View para adicionar vários textos prontos ao Fale Conosco
| 62598f8bb5575c28eb712a93 |
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): <NEW_LINE> <INDENT> VERSION = 2 <NEW_LINE> CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL <NEW_LINE> async def _validate_and_create(self, data): <NEW_LINE> <INDENT> for entry in self.hass.config_entries.async_entries(DOMAIN): <NEW_LINE> <INDENT> if ( ... | Handle a config flow for foscam. | 62598f8b50485f2cf55dab0a |
class LaxURLField(forms.URLField): <NEW_LINE> <INDENT> class AnyURLScheme(object): <NEW_LINE> <INDENT> def __contains__(self, item): <NEW_LINE> <INDENT> if not item or not re.match('^[a-z][0-9a-z+\-.]*$', item.lower()): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> return True <NEW_LINE> <DEDENT> <DEDENT> defaul... | Custom URLField which allows any valid URL scheme | 62598f8bbaa26c4b54d4ee48 |
class _V8BrowsingBenchmark(perf_benchmark.PerfBenchmark): <NEW_LINE> <INDENT> def CreateTimelineBasedMeasurementOptions(self): <NEW_LINE> <INDENT> categories = [ '-*', 'disabled-by-default-memory-infra', 'blink.console', 'disabled-by-default-v8.gc', 'renderer.scheduler', 'v8', 'webkit.console', 'disabled-by-default-mem... | Base class for V8 browsing benchmarks.
This benchmark measures memory usage with periodic memory dumps and v8 times.
See browsing_stories._BrowsingStory for workload description. | 62598f8b0c0af96317c55f21 |
class TransformerConcatEncoderLayer(nn.Module): <NEW_LINE> <INDENT> def __init__(self, embed_dim, num_heads=4, attn_dropout=0.1, relu_dropout=0.1, res_dropout=0.1, attn_mask=False): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.embed_dim = embed_dim <NEW_LINE> self.num_heads = num_heads <NEW_LINE> self.self_at... | Encoder layer block.
Args:
embed_dim: Embedding dimension | 62598f8bc432627299fa2b61 |
class EntryCategoryArchive(BaseArchiveMixin, ArchiveIndexView): <NEW_LINE> <INDENT> template_name_suffix = '_archive_category' <NEW_LINE> context_object_name = 'category' <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> self.category = get_object_or_404(get_category_model(), slug=self.kwargs['slug']) <NEW_LINE> r... | Archive based on tag. | 62598f8ba4f1c619b294e17c |
class Pipeline(object): <NEW_LINE> <INDENT> name = None <NEW_LINE> pipeline = None <NEW_LINE> desc = None | Container for an individual pipeline. No exposed methods. | 62598f8ba17c0f6771d5bdd7 |
class TopLevelPages(Page): <NEW_LINE> <INDENT> subpage_types = ['TopLevelPage'] <NEW_LINE> def get_context(self, request): <NEW_LINE> <INDENT> context = super().get_context(request) <NEW_LINE> pages = self.get_children().live().order_by('-toplevelpage__page_date') <NEW_LINE> context['pages'] = pages <NEW_LINE> return c... | Container for all top-level pages. | 62598f8b4e696a045264dbcf |
class Test_Window: <NEW_LINE> <INDENT> def setup_class(self): <NEW_LINE> <INDENT> self.temp_dir = mkdtemp(prefix='psychopy-tests-test_window') <NEW_LINE> self.win = visual.Window([128,128], pos=[50,50], allowGUI=False, autoLog=False) <NEW_LINE> <DEDENT> def teardown_class(self): <NEW_LINE> <INDENT> shutil.rmtree(self.t... | Some tests just for the window - we don't really care about what's drawn inside it
| 62598f8bf8510a7c17d7df41 |
class itkSimpleDataObjectDecoratorF(ITKCommonBasePython.itkDataObject): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") <NEW_LINE> __repr__ = _swig_r... | Proxy of C++ itkSimpleDataObjectDecoratorF class | 62598f8b0383005118f6d290 |
class Ps(Step): <NEW_LINE> <INDENT> subcommand = "ps" <NEW_LINE> def __init__(self, app_dir: str, flags: str = ""): <NEW_LINE> <INDENT> self.app_dir = app_dir <NEW_LINE> self.flags = flags <NEW_LINE> <DEDENT> def get_name(self) -> str: <NEW_LINE> <INDENT> return f"{super().get_name()}({self.app_dir})" <NEW_LINE> <DEDEN... | docker-compose ps | 62598f8b596a89723612780b |
class PrintJobUploadBlockedMessage(Message): <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> super().__init__( text = I18N_CATALOG.i18nc("@info:status", "Please wait until the current job has been sent."), title = I18N_CATALOG.i18nc("@info:title", "Print error"), lifetime = 10, message_type = Messag... | Message shown when uploading a print job to a cluster is blocked because another upload is already in progress. | 62598f8be76e3b2f99fd85c5 |
class LocalDownload(DownloadInterface): <NEW_LINE> <INDENT> def __init__(self, rootdir): <NEW_LINE> <INDENT> DownloadInterface.__init__(self) <NEW_LINE> logging.debug('Download') <NEW_LINE> self.rootdir = rootdir <NEW_LINE> <DEDENT> def download(self, local_dir): <NEW_LINE> <INDENT> logging.debug('Local:Download') <NEW... | Base class to copy file from local system
protocol=cp
server=localhost
remote.dir=/blast/db/FASTA/
remote.files=^alu.*\.gz$ | 62598f8b63d6d428bbee234f |
class FakePaymentPage(PageObject): <NEW_LINE> <INDENT> def __init__(self, browser, course_id): <NEW_LINE> <INDENT> super(FakePaymentPage, self).__init__(browser) <NEW_LINE> self._course_id = course_id <NEW_LINE> <DEDENT> url = BASE_URL + "/shoppingcart/payment_fake/" <NEW_LINE> def is_browser_on_page(self): <NEW_LINE> ... | Interact with the fake payment endpoint.
This page is hidden behind the feature flag `ENABLE_PAYMENT_FAKE`,
which is enabled in the Bok Choy env settings.
Configuring this payment endpoint also requires configuring the Bok Choy
auth settings with the following:
"CC_PROCESSOR_NAME": "CyberSource2",
"CC_PROCES... | 62598f8b8c0ade5d55dc3456 |
class WhittakerSmoother(object): <NEW_LINE> <INDENT> def __init__(self, signal, smoothness_param, deriv_order=1): <NEW_LINE> <INDENT> self.y = signal <NEW_LINE> assert deriv_order > 0, "deriv_order must be an int > 0" <NEW_LINE> d = np.zeros(deriv_order * 2 + 1, dtype=int) <NEW_LINE> d[deriv_order] = 1 <NEW_LINE> d = n... | References
----------
- kudos to https://gist.github.com/perimosocordiae
See Also
--------
:func:`~radis.misc.signal.als_baseline` | 62598f8b507cdc57c63a4924 |
class SoilTexture(AuthUserDetail, CreateUpdateTime): <NEW_LINE> <INDENT> slug = models.SlugField(unique=True, blank=True) <NEW_LINE> soil_texture = models.CharField(max_length=50, unique=True) <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return self.soil_texture <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE... | Soil texture model. Creates soil type entity. | 62598f8b07d97122c421683e |
class ITrashed(Interface): <NEW_LINE> <INDENT> pass | Marker interface for trashed objects which should no longer appear.
| 62598f8bd4950a0f3b110c01 |
class Func(object): <NEW_LINE> <INDENT> def default_canonize(self, func_term): <NEW_LINE> <INDENT> return STerm(1, func_term.func(*[a.canonize() for a in func_term.args])) <NEW_LINE> <DEDENT> def __init__(self, name, arity=None, canonize=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.arity = arity <NEW_LIN... | Function symbols.
Example:
x, y, z = Vars('x, y, z')
f = Func('f')
print f(x, y, z) | 62598f8bd53ae8145f918027 |
class GoodsCategoryBrand(models.Model): <NEW_LINE> <INDENT> category = models.ForeignKey(GoodsCategory, verbose_name='商品类别', null=True, blank=True) <NEW_LINE> name = models.CharField(verbose_name='品牌名', max_length=30, default='', help_text='品牌名') <NEW_LINE> desc = models.TextField(verbose_name='品牌描述', default='', help_... | 品牌名 | 62598f8bd6c5a102081e1cd9 |
class PkgList(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TotalCount = None <NEW_LINE> self.Content = None <NEW_LINE> self.RepositoryId = None <NEW_LINE> self.RepositoryType = None <NEW_LINE> self.RepositoryName = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <... | 包列表
| 62598f8b8e71fb1e983bb647 |
class HTTPServer(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.server_socket = socket(AF_INET, SOCK_STREAM) <NEW_LINE> self.server_socket.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <INDENT> self.server_socket.listen(128) <NEW_LINE> while True: <NE... | define socket,init socket,reponse,send,close socket | 62598f8bcad5886f8bdc4e57 |
class JsonResponse(HttpResponse): <NEW_LINE> <INDENT> pass | An HTTP response class that consumes data to be serialized to JSON.
:param data: Data to be dumped into json. By default only ``dict`` objects
are allowed to be passed due to a security flaw before EcmaScript 5. See
the ``safe`` parameter for more information.
:param encoder: Should be an json encoder class. Defaults t... | 62598f8b21a7993f00c65b0d |
class ErrorInfo(object): <NEW_LINE> <INDENT> if interfaces is not None: <NEW_LINE> <INDENT> zope.interface.implements(interfaces.ITALExpressionErrorInfo) <NEW_LINE> <DEDENT> def __init__(self, err, position=(None, None)): <NEW_LINE> <INDENT> if isinstance(err, Exception): <NEW_LINE> <INDENT> self.type = err.__class__ <... | Information about an exception passed to an on-error handler. | 62598f8bbe383301e0253394 |
class CookieEnabled(Handler): <NEW_LINE> <INDENT> def startup(self): <NEW_LINE> <INDENT> user_id = self.verify_cookie() <NEW_LINE> if user_id: <NEW_LINE> <INDENT> logged_in = True <NEW_LINE> user = UserAccount.get_by_id(int(user_id)) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> logged_in = False <NEW_LINE> user = None... | Provides Handler with login-related methods, user-information | 62598f8b91af0d3eaad39995 |
class BrillTemplateI(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def applicable_rules(self, tokens, i, correctTag): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def get_neighborhood(self, token, index): <NEW_LINE> <INDENT> r... | An interface for generating lists of transformational rules that
apply at given sentence positions. ``BrillTemplateI`` is used by
``Brill`` training algorithms to generate candidate rules. | 62598f8bd6c5a102081e1cda |
class CustomUserManagerEmptyFieldTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.User = get_user_model() <NEW_LINE> self.user = self.User.objects.create_superuser( email="test@example.com", company="Shell", country="Netherlands", address="sample address", phone="+31647802691", password="t... | Test if empty fields raise exceptions, and if they are the expected ones | 62598f8b435de62698e9b986 |
class BaseManager: <NEW_LINE> <INDENT> KEY = 'cobalt' <NEW_LINE> def __init__(self, client): <NEW_LINE> <INDENT> self.client = client <NEW_LINE> try: <NEW_LINE> <INDENT> self.client.write(self.KEY, '', dir=True) <NEW_LINE> <DEDENT> except (etcd.EtcdAlreadyExist, etcd.EtcdNotFile): <NEW_LINE> <INDENT> pass <NEW_LINE> <D... | Base repository class for objects. | 62598f8b596a89723612780d |
class BTComponentUsagesSummary(object): <NEW_LINE> <INDENT> openapi_types = { 'hierarchy_': 'BTStandardContentHierarchy', 'count': 'int', 'hierarchy': 'BTStandardContentHierarchy' } <NEW_LINE> attribute_map = { 'hierarchy_': 'hierarchy_', 'count': 'count', 'hierarchy': 'hierarchy' } <NEW_LINE> def __init__(self, hierar... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually. | 62598f8b004d5f362081edc5 |
class ZlibArchiveWriter(ArchiveWriter): <NEW_LINE> <INDENT> MAGIC = b'PYZ\0' <NEW_LINE> TOCPOS = 8 <NEW_LINE> HDRLEN = ArchiveWriter.HDRLEN + 5 <NEW_LINE> COMPRESSION_LEVEL = 6 <NEW_LINE> def __init__(self, archive_path, logical_toc, code_dict=None, cipher=None): <NEW_LINE> <INDENT> self.code_dict = code_dict or {} <NE... | ZlibArchive - an archive with compressed entries. Archive is read
from the executable created by PyInstaller.
This archive is used for bundling python modules inside the executable.
NOTE: The whole ZlibArchive (PYZ) is compressed so it is not necessary
to compress single modules with zlib. | 62598f8be76e3b2f99fd85c7 |
class IActionFactory(IField): <NEW_LINE> <INDENT> title = TextLine(title=__(u'Title')) | A component that instantiates a action when called.
| 62598f8b63d6d428bbee2351 |
class Tuple(CompositeParamType): <NEW_LINE> <INDENT> def __init__(self, types): <NEW_LINE> <INDENT> self.types = [convert_type(ty) for ty in types] <NEW_LINE> <DEDENT> @property <NEW_LINE> def arity(self): <NEW_LINE> <INDENT> return len(self.types) <NEW_LINE> <DEDENT> def convert(self, value, param, ctx): <NEW_LINE> <I... | The default behavior of Click is to apply a type on a value directly.
This works well in most cases, except for when `nargs` is set to a fixed
count and different types should be used for different items. In this
case the :class:`Tuple` type can be used. This type can only be used
if `nargs` is set to a fixed number.... | 62598f8bec188e330fdf8436 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.