code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class ChoicesSC14(BasicName): <NEW_LINE> <INDENT> pass | Represents MoV Source options | 62598fa526068e7796d4c826 |
class Hash(Builtin): <NEW_LINE> <INDENT> rules = { 'Hash[expr_]': 'Hash[expr, "MD5"]', } <NEW_LINE> attributes = ('Protected', 'ReadProtected') <NEW_LINE> _supported_hashes = { 'Adler32': lambda: _ZLibHash(zlib.adler32), 'CRC32': lambda: _ZLibHash(zlib.crc32), 'MD5': hashlib.md5, 'SHA': hashlib.sha1, 'SHA224': hashlib.... | <dl>
<dt>'Hash[$expr$]'
<dd>returns an integer hash for the given $expr$.
<dt>'Hash[$expr$, $type$]'
<dd>returns an integer hash of the specified $type$ for the given $expr$.</dd>
<dd>The types supported are "MD5", "Adler32", "CRC32", "SHA", "SHA224", "SHA256", "SHA384", and "SHA512".</dd>
</dl>
> Hash["The Adve... | 62598fa5e5267d203ee6b7db |
class FaxList(ListResource): <NEW_LINE> <INDENT> def __init__(self, version): <NEW_LINE> <INDENT> super(FaxList, self).__init__(version) <NEW_LINE> self._solution = {} <NEW_LINE> self._uri = '/Faxes'.format(**self._solution) <NEW_LINE> <DEDENT> def stream(self, from_=values.unset, to=values.unset, date_created_on_or_be... | PLEASE NOTE that this class contains beta products that are subject to
change. Use them with caution. | 62598fa5498bea3a75a579f0 |
class Connector(object): <NEW_LINE> <INDENT> def __init__(self, factory: AbstractFactory): <NEW_LINE> <INDENT> self.protocol = factory.create_protocol() <NEW_LINE> self.port = factory.create_port() <NEW_LINE> self.parse = factory.create_parser() <NEW_LINE> <DEDENT> def read(self, host, path): <NEW_LINE> <INDENT> url = ... | A client | 62598fa5dd821e528d6d8e03 |
class API(object): <NEW_LINE> <INDENT> def __init__(self,merchant_account,sci_name, subscription,iten_id,amount,currency = "USD", logo=None,notify_url=None,confirm_url=None, return_url=None,return_method=None, cancel_url=None,testmode="OFF",extra_params=None): <NEW_LINE> <INDENT> self.merchant_account = merchant_accoun... | SolidTrustPay API | 62598fa55166f23b2e2432a4 |
class Hub(Location): <NEW_LINE> <INDENT> __tablename__ = 'hub' <NEW_LINE> __mapper_args__ = {'polymorphic_identity': 'hub'} <NEW_LINE> valid_parents = [Company] <NEW_LINE> id = Column(Integer, ForeignKey('location.id', name='hub_loc_fk', ondelete='CASCADE'), primary_key=True) | Hub is a subtype of location | 62598fa54a966d76dd5eedb1 |
class RSADigitalSignature(RSA): <NEW_LINE> <INDENT> def sign(self, message): <NEW_LINE> <INDENT> return self.decrypt(int.from_bytes(message, byteorder='big')) <NEW_LINE> <DEDENT> def verify(self, encrypted_signature, message): <NEW_LINE> <INDENT> signature = b'\x00' + int_to_bytes(self.encrypt(encrypted_signature)) <NE... | Extends the RSA class coded before with the sign / verify functions. | 62598fa5796e427e5384e661 |
class TestOVO(unittest.TestCase): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def test_linear_OVO(self): <NEW_LINE> <INDENT> bin_clf = LSTSVM('linear') <NEW_LINE> ova_clf = OneVsOneClassifier(bin_clf) <NEW_LINE> ova_clf.fit(X, y) <NE... | It tests the functionalities of One-vs-One classifier. | 62598fa54e4d5625663722f2 |
class DescribeslowLogStatisticRequest(JDCloudRequest): <NEW_LINE> <INDENT> def __init__(self, parameters, header=None, version="v2"): <NEW_LINE> <INDENT> super(DescribeslowLogStatisticRequest, self).__init__( '/regions/{regionId}/slowLogStatistic', 'GET', header, version) <NEW_LINE> self.parameters = parameters | 最近3小时,24小时,3天慢sql情况 | 62598fa5090684286d593642 |
class RandomCrop(object): <NEW_LINE> <INDENT> def __init__(self, size, ): <NEW_LINE> <INDENT> if isinstance(size, numbers.Number): <NEW_LINE> <INDENT> self.size = (int(size), int(size)) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.size = size <NEW_LINE> <DEDENT> <DEDENT> @staticmethod <NEW_LINE> def get_params(pi... | Performs a random crop in a given numpy array using only the first two dimensions (width and height) | 62598fa54e4d5625663722f3 |
class UserRegisterSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = User <NEW_LINE> fields = ('id', 'username', 'password', 'name', 'role', ) <NEW_LINE> extra_kwargs = {'password': {'write_only': True}} <NEW_LINE> <DEDENT> def create(self, validated_data): <NEW_LINE> <... | Custom serializer for registration new User-model | 62598fa5656771135c489550 |
class MembershipInfo(colander.Schema): <NEW_LINE> <INDENT> yes_no = ((u'yes', _(u'Yes')), (u'no', _(u'No'))) <NEW_LINE> membership_type = colander.SchemaNode( colander.String(), title=_(u'I want to become a ... ' u'(choose membership type, see C3S SCE statute §5)'), description=_(u'choose the type of membership.'), wid... | Basic member information. | 62598fa51f037a2d8b9e3fb9 |
class CounterSampleQueryDetails(Model): <NEW_LINE> <INDENT> _attribute_map = { 'counter_instance_id': {'key': 'counterInstanceId', 'type': 'str'}, 'from_interval': {'key': 'fromInterval', 'type': 'int'}, 'to_interval': {'key': 'toInterval', 'type': 'int'} } <NEW_LINE> def __init__(self, counter_instance_id=None, from_i... | CounterSampleQueryDetails.
:param counter_instance_id:
:type counter_instance_id: str
:param from_interval:
:type from_interval: int
:param to_interval:
:type to_interval: int | 62598fa51f5feb6acb162af0 |
class Figure (images.Figure): <NEW_LINE> <INDENT> option_spec = images.Figure.option_spec.copy () <NEW_LINE> option_spec.update ( { 'float': partial (multi_choice, image_float_values), } ) <NEW_LINE> required_arguments = 0 <NEW_LINE> optional_arguments = 1 <NEW_LINE> final_argument_whitespace = True <NEW_LINE> figure_c... | Override standard figure. Allow use of no filename. | 62598fa567a9b606de545e9a |
class RandomBatchSampler(VideoBatchSampler): <NEW_LINE> <INDENT> def __init__(self, dir_tree, batch_size, sequential=False, labeled=False): <NEW_LINE> <INDENT> self._dir_tree = dir_tree <NEW_LINE> self.batch_size = int(batch_size) <NEW_LINE> <DEDENT> def update_tree(self, dir_tree): <NEW_LINE> <INDENT> self._dir_tree =... | Randomly samples videos from different classes into the same batch. | 62598fa5097d151d1a2c0ef6 |
class LicenseResponse(object): <NEW_LINE> <INDENT> swagger_types = { 'license_lrn_uuid': 'str', 'license_switch_uuid': 'str' } <NEW_LINE> attribute_map = { 'license_lrn_uuid': 'license_lrn_uuid', 'license_switch_uuid': 'license_switch_uuid' } <NEW_LINE> def __init__(self, license_lrn_uuid=None, license_switch_uuid=None... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598fa5a79ad16197769f31 |
class EmailValidator(DjangoEmailValidator): <NEW_LINE> <INDENT> def __call__(self, value, *args, **kwargs): <NEW_LINE> <INDENT> super(EmailValidator, self).__call__(value, *args, **kwargs) <NEW_LINE> value = force_text(value) <NEW_LINE> domain = value.split('@')[1] <NEW_LINE> try: <NEW_LINE> <INDENT> resolver.query(dom... | Extended EmailValidator which checks for MX records on the domain. | 62598fa544b2445a339b68d6 |
class UpperConfidenceBound(BaseGaussianUtility): <NEW_LINE> <INDENT> def __init__(self, points, values, kernel, mu_prior=0, noise_sigma=0.0, **params): <NEW_LINE> <INDENT> super(UpperConfidenceBound, self).__init__(points, values, kernel, mu_prior, noise_sigma, **params) <NEW_LINE> delta = params.get('delta', 0.5) <NEW... | Implements the UCB method.
See the following sources for more details:
Peter Auer, Using Confidence Bounds for Exploitation-Exploration Trade-offs,
Journal of Machine Learning Research 3 (2002) 397-422, 2011. | 62598fa556ac1b37e63020bc |
class ConnectionMonitorQueryResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'source_status': {'key': 'sourceStatus', 'type': 'str'}, 'states': {'key': 'states', 'type': '[ConnectionStateSnapshot]'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(ConnectionMonitorQueryR... | List of connection states snapshots.
:param source_status: Status of connection monitor source. Possible values include: "Uknown",
"Active", "Inactive".
:type source_status: str or
~azure.mgmt.network.v2018_07_01.models.ConnectionMonitorSourceStatus
:param states: Information about connection states.
:type states: l... | 62598fa55f7d997b871f9348 |
class TestMap(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 testMap(self): <NEW_LINE> <INDENT> model = swagger_client.models.map.Map() | Map unit test stubs | 62598fa523849d37ff850f84 |
class MetricValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> AUTOSCALERS = 0 <NEW_LINE> BACKEND_BUCKETS = 1 <NEW_LINE> BACKEND_SERVICES = 2 <NEW_LINE> CPUS = 3 <NEW_LINE> CPUS_ALL_REGIONS = 4 <NEW_LINE> DISKS_TOTAL_GB = 5 <NEW_LINE> FIREWALLS = 6 <NEW_LINE> FORWARDING_RULES = 7 <NEW_LINE> HEALTH_CHECKS = 8 <NEW_LIN... | [Output Only] Name of the quota metric.
Values:
AUTOSCALERS: <no description>
BACKEND_BUCKETS: <no description>
BACKEND_SERVICES: <no description>
CPUS: <no description>
CPUS_ALL_REGIONS: <no description>
DISKS_TOTAL_GB: <no description>
FIREWALLS: <no description>
FORWARDING_RULES: <no description>
... | 62598fa585dfad0860cbf9dc |
class DelegationStrategyType(Enum): <NEW_LINE> <INDENT> ALWAYS = "ALWAYS" <NEW_LINE> SKILL_RESPONSE = "SKILL_RESPONSE" <NEW_LINE> def to_dict(self): <NEW_LINE> <INDENT> result = {self.name: self.value} <NEW_LINE> return result <NEW_LINE> <DEDENT> def to_str(self): <NEW_LINE> <INDENT> return pprint.pformat(self.value) <... | Enumerates delegation strategies used to control automatic dialog management through the defined dialog model. When no delegation strategies are defined, the value SKILL_RESPONSE is assumed.
Allowed enum values: [ALWAYS, SKILL_RESPONSE] | 62598fa55166f23b2e2432a6 |
class TestDedupeApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = isi_sdk_9_1_0.api.dedupe_api.DedupeApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_get_dedupe_dedupe_summary(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT>... | DedupeApi unit test stubs | 62598fa5a8ecb033258710de |
class AstConditionNode(AstNode, ConditionNode): <NEW_LINE> <INDENT> def __init__(self, ast_cond: _ast.stmt, **kwargs): <NEW_LINE> <INDENT> AstNode.__init__(self, ast_cond, **kwargs) <NEW_LINE> ConditionNode.__init__(self, cond=self.cond_expr()) <NEW_LINE> <DEDENT> def cond_expr(self) -> str: <NEW_LINE> <INDENT> source ... | AstConditionNode is a ConditionNode for _ast.For | _ast.While | _ast.If ({for|while|if}-sentence in code) | 62598fa5f548e778e596b474 |
class Opponent(object): <NEW_LINE> <INDENT> def __init__(self, name, strenght): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.level = strenght <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return f"Digital Oppononent: {self.name} at Level {self.level}" | docstring for Opponent | 62598fa5d486a94d0ba2be9d |
class AddForm(BaseAddForm): <NEW_LINE> <INDENT> schema = IContextualSearchPortlet <NEW_LINE> def updateWidgets(self): <NEW_LINE> <INDENT> super(AddForm, self).updateWidgets() <NEW_LINE> <DEDENT> def create(self, data): <NEW_LINE> <INDENT> return Assignment(**data) | Portlet add form.
This is registered in configure.zcml. The form_fields variable tells
zope.formlib which fields to display. The create() method actually
constructs the assignment that is being added. | 62598fa54a966d76dd5eedb3 |
class TestMixsyn(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> control.use_numpy_matrix(False) <NEW_LINE> <DEDENT> @unittest.skipIf(not slycot_check(), "slycot not installed") <NEW_LINE> def testSiso(self): <NEW_LINE> <INDENT> from control import tf, augw, hinfsyn, mixsyn <NEW_LINE> from ... | Test control.robust.mixsyn | 62598fa5090684286d593643 |
class BOMReference(ReferenceBase): <NEW_LINE> <INDENT> _schema = load_schema(SCHEMA_DIR,'references.json')["bom_ref"] <NEW_LINE> _validator = jsonschema.Draft4Validator(_schema) <NEW_LINE> def __init__(self,**kwargs): <NEW_LINE> <INDENT> ReferenceBase.__init__(self,**kwargs) <NEW_LINE> <DEDENT> def dereference(self,sto... | An object with quantities.
{{references.json#/bom_ref}} | 62598fa57b25080760ed737b |
class Develpoment: <NEW_LINE> <INDENT> DEBUG = True <NEW_LINE> TESTING = False | Development environment configuration | 62598fa5fff4ab517ebcd6b5 |
class svn_txdelta_md5_digest_fn_t: <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> __setattr__ = lambda self, name, value: _swig_setattr(self, svn_txdelta_md5_digest_fn_t, name, value) <NEW_LINE> __swig_getmethods__ = {} <NEW_LINE> __getattr__ = lambda self, name: _swig_getattr(self, svn_txdelta_md5_digest_fn_t... | Proxy of C svn_txdelta_md5_digest_fn_t struct | 62598fa57d43ff248742736a |
class LineReceiver(BaseReceiver, _PauseableMixin): <NEW_LINE> <INDENT> _parsleyGrammarPKG = parseproto.basic <NEW_LINE> _parsleyGrammarName = 'line_receiver' <NEW_LINE> _buffer = b'' <NEW_LINE> _busyReceiving = False <NEW_LINE> delimiter = b'\r\n' <NEW_LINE> MAX_LENGTH = 16384 <NEW_LINE> _mode = 1 <NEW_LINE> @property ... | A protocol that receives lines and/or raw data, depending on mode.
In line mode, each line that's received becomes a callback to
L{lineReceived}. In raw data mode, each chunk of raw data becomes a
callback to L{rawDataReceived}. The L{setLineMode} and L{setRawMode}
methods switch between the two modes.
This is usef... | 62598fa5be383301e02536c8 |
class FilerTeaserPlugin(CMSPluginBase): <NEW_LINE> <INDENT> module = 'Filer' <NEW_LINE> model = models.FilerTeaser <NEW_LINE> raw_id_fields = ('page_link',) <NEW_LINE> name = _("Teaser") <NEW_LINE> TEMPLATE_NAME = 'cmsplugin_filer_teaser/plugins/teaser/%s.html' <NEW_LINE> render_template = TEMPLATE_NAME % 'default' <NE... | TODO: this plugin is becoming very similar to the image plugin... code
should be re-used somehow. | 62598fa5e5267d203ee6b7de |
class Entry(models.Model): <NEW_LINE> <INDENT> topic = models.ForeignKey(Topic, on_delete=models.CASCADE) <NEW_LINE> text = models.TextField() <NEW_LINE> date_added = models.DateTimeField(auto_now_add=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> verbose_name_plural = 'entries' <NEW_LINE> <DEDENT> def __str__(self):... | Something specific learned about a topic | 62598fa54527f215b58e9db2 |
class Oper(A10BaseClass): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.ERROR_MSG = "" <NEW_LINE> self.b_key = "oper" <NEW_LINE> self.DeviceProxy = "" <NEW_LINE> self.session_list = [] <NEW_LINE> for keys, value in kwargs.items(): <NEW_LINE> <INDENT> setattr(self,keys, value) | This class does not support CRUD Operations please use parent.
:param session_list: {"minItems": 1, "items": {"type": "object"}, "uniqueItems": true, "type": "array", "array": [{"properties": {"Session-id": {"type": "number", "format": "number"}, "TTL-in-seconds": {"type": "number", "format": "number"}, "Domain": {"mi... | 62598fa51f5feb6acb162af2 |
class MySawTooth(PeakProfile): <NEW_LINE> <INDENT> def type(self): <NEW_LINE> <INDENT> return "mysawtooth" <NEW_LINE> <DEDENT> def create(self): <NEW_LINE> <INDENT> return MySawTooth() <NEW_LINE> <DEDENT> def clone(self): <NEW_LINE> <INDENT> import copy <NEW_LINE> return copy.copy(self) <NEW_LINE> <DEDENT> tcnt = 0 <NE... | Helper class for testing PeakProfile. | 62598fa5e64d504609df9321 |
class LogToBufferHandler(LogToXmlHandler): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(LogToBufferHandler, self).__init__() <NEW_LINE> <DEDENT> def flush(self): <NEW_LINE> <INDENT> pass | .. class:: LogToBufferHandler()
A log handler that writes log entries to a memory buffer for later retrieval (to a string) in XML, JSON, or text lines,
usually for return to a web service or web page call. | 62598fa57d847024c075c296 |
class VonMisesBM(BasisMatrix): <NEW_LINE> <INDENT> def __init__(self, cs, num_basis, basis_width=1.): <NEW_LINE> <INDENT> def dphi_t(cs, phi): <NEW_LINE> <INDENT> def step(s): <NEW_LINE> <INDENT> return phi.grad(s) * cs.grad() <NEW_LINE> <DEDENT> return step <NEW_LINE> <DEDENT> if num_basis == 1: <NEW_LINE> <INDENT> ce... | Von-Mises Basis Matrix
Matrix containing Von-Mises basis functions. | 62598fa566656f66f7d5a2c0 |
class ARCUITField(RegexField): <NEW_LINE> <INDENT> default_error_messages = { 'invalid': _('Enter a valid CUIT in XX-XXXXXXXX-X or XXXXXXXXXXXX format.'), 'checksum': _("Invalid CUIT."), 'legal_type': _('Invalid legal type. Type must be 27, 20, 30, 23, 24 or 33.'), } <NEW_LINE> def __init__(self, *args, **kwargs): <NEW... | This field validates a CUIT (Código Único de Identificación Tributaria).
ACUIT is of the form XX-XXXXXXXX-V. The last digit is a check digit.
More info:
http://es.wikipedia.org/wiki/Clave_%C3%9Anica_de_Identificaci%C3%B3n_Tributaria
English info:
http://www.justlanded.com/english/Argentina/Argentina-Guide/Visas-Perm... | 62598fa507f4c71912baf314 |
class IotManager(): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_state_topic(device,control): <NEW_LINE> <INDENT> return str.encode('/IoTmanager/{}/{}/status'.format(device,control)) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def get_state_value(state): <NEW_LINE> <INDENT> return str.encode('{{\"status\":{}}}... | The class provides topics compatible with IoTManager[1] for publishing
and reading.
The idea is to make architecture pluggable and make it easy to replace this
class with another implementation for another client.
[1] https://play.google.com/store/apps/details?id=ru.esp8266.iotmanager | 62598fa58e7ae83300ee8f72 |
class TeamCreateView(generics.ListCreateAPIView): <NEW_LINE> <INDENT> queryset = Team.objects.all() <NEW_LINE> serializer_class = TeamSerializer <NEW_LINE> authentication_classes = (TokenAuthentication, BasicAuthentication) <NEW_LINE> def perform_create(self, serializer): <NEW_LINE> <INDENT> serializer.save() | This class defines the create behavior of our rest api. | 62598fa530bbd722464698e0 |
class FormFieldFloat(FormFieldText): <NEW_LINE> <INDENT> def __init__(self, name, required=None, options=None, items=None, caption=None, attributes=None): <NEW_LINE> <INDENT> FormFieldText.__init__(self, name, required, options, items, caption, attributes) <NEW_LINE> self._type = 'float' | Field which allows to store floating point numbers or values | 62598fa599cbb53fe6830da6 |
class SessionStore(requests.Session): <NEW_LINE> <INDENT> def __init__(self, endpoint, reauthenticate, cookie_file=None, login_params=None): <NEW_LINE> <INDENT> super(SessionStore, self).__init__() <NEW_LINE> self.session_base_url = '{0}/api/session'.format(endpoint) <NEW_LINE> self.reauthenticate = reauthenticate <NEW... | A ``requests.Session`` subclass implementing a file-based session store. | 62598fa516aa5153ce4003d3 |
class NameLookup: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._uid_to_cls = {} <NEW_LINE> self._uid_to_name = {} <NEW_LINE> self._cls_to_uid = {} <NEW_LINE> path = os.path.join(data_dir, path_uid_to_name) <NEW_LINE> with open(file=path, mode='r') as file: <NEW_LINE> <INDENT> lines = file.readlines(... | Used for looking up the name associated with a class-number.
This is used to print the name of a class instead of its number,
e.g. "plant" or "horse".
Maps between:
- cls is the class-number as an integer between 1 and 1000 (inclusive).
- uid is a class-id as a string from the ImageNet data-set, e.g. "n00017222".
- na... | 62598fa5cb5e8a47e493c0e0 |
class RegistrationForm(forms.Form): <NEW_LINE> <INDENT> username = forms.RegexField( r"^[a-zA-Z0-9_\-\.]*$", max_length=30, error_messages={ 'invalid': _('Only A-Z, 0-9, "_", "-", and "." are allowed.'), }) <NEW_LINE> password1 = forms.CharField(label=_('Password'), min_length=5, widget=forms.PasswordInput) <NEW_LINE> ... | A standard registration form collecting basic account information.
This form prompts the user for a username, a password (and a confirmation
on that password), e-mail address, first name, and last name. It then
validates these, attempting to create a :py:class:`User`.
This class can be extended by subclasses to provi... | 62598fa5e76e3b2f99fd8907 |
class PodcastDatabaseManager(object): <NEW_LINE> <INDENT> def __init__(self, debug_=False): <NEW_LINE> <INDENT> basedir = "~/.podcast" <NEW_LINE> path = basedir + os.sep + 'podcast.sqlite' <NEW_LINE> if not os.path.exists(expanduser(basedir)): <NEW_LINE> <INDENT> print("Creating base dir %s"%basedir) <NEW_LINE> os.make... | Access to database layer of podcasts. | 62598fa521bff66bcd722b37 |
class AdicionaManPMEdigi(Operator, AddObjectHelper): <NEW_LINE> <INDENT> bl_idname = "mesh.add_man_pme_digi" <NEW_LINE> bl_label = "Add Centroide" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> found = 'Man-PME-digi' in bpy.data.objects <NEW_L... | Create a new Mesh Object | 62598fa5a8ecb033258710e0 |
class OctaveShift(MusicXMLElement): <NEW_LINE> <INDENT> def __init__(self, type=None): <NEW_LINE> <INDENT> MusicXMLElement.__init__(self) <NEW_LINE> self._tag = 'octave-shift' <NEW_LINE> self._attr['type'] = None <NEW_LINE> self._attr['number'] = None <NEW_LINE> self._attr['size'] = None | >>> os = musicxml.OctaveShift()
>>> os.tag
'octave-shift' | 62598fa5dd821e528d6d8e07 |
class TEST(object): <NEW_LINE> <INDENT> def __init__(self,test): <NEW_LINE> <INDENT> self.__test = test <NEW_LINE> <DEDENT> def learn_kernel(self,method='tstat',learning_rate=0.01): <NEW_LINE> <INDENT> if method=='power': <NEW_LINE> <INDENT> loss = -self.__test.get_power() <NEW_LINE> <DEDENT> elif method=='measure': <N... | main class
test needs to have:
get_tstat()
get_estimate()
reset(params1,params2)
get_treshold
get_power() | 62598fa567a9b606de545e9d |
class ChangeopenidForm(forms.Form): <NEW_LINE> <INDENT> openid_url = forms.CharField(max_length=255, widget=forms.TextInput(attrs={'class': "required" })) <NEW_LINE> def __init__(self, data=None, user=None, *args, **kwargs): <NEW_LINE> <INDENT> if user is None: <NEW_LINE> <INDENT> raise TypeError("Keyword argument 'use... | change openid form | 62598fa563d6d428bbee2683 |
class Collectioner(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, scraper): <NEW_LINE> <INDENT> threading.Thread.__init__(self) <NEW_LINE> self.name = 'Collect - {0}'.format(listOfScrapers.index(scraper)+1) <NEW_LINE> self.setDaemon(True) <NEW_LINE> self.scraper = scraper <NEW_LINE> <DEDENT> def run(self): <... | Collectioner is responsible for scrapeing proxies. As argument during initialization
it takes custom scrapers for website with free proxy lists.
It uses global variable (listOfScrapers)
were custom scrapers (for websites with free proxy lists) are listed. | 62598fa566673b3332c3029b |
class UserSetDefaultLocalizationValues(): <NEW_LINE> <INDENT> mi_vals = ['enus', 'engb', 'enuk', 'cygb', 'kwgb', 'enlr', 'mymm', ] <NEW_LINE> def process_request(self, request): <NEW_LINE> <INDENT> if request.user.is_authenticated(): <NEW_LINE> <INDENT> if not request.user.profile.pref_distance_unit: <NEW_LINE> <INDENT... | Set some default vals on the request, based on user's HTTP headers | 62598fa501c39578d7f12c52 |
class Sensor(ZhaEntity): <NEW_LINE> <INDENT> _domain = DOMAIN <NEW_LINE> def __init__(self, unique_id, zha_device, channels, **kwargs): <NEW_LINE> <INDENT> super().__init__(unique_id, zha_device, channels, **kwargs) <NEW_LINE> self._sensor_type = kwargs.get(SENSOR_TYPE, GENERIC) <NEW_LINE> self._unit = UNIT_REGISTRY.ge... | Base ZHA sensor. | 62598fa5fff4ab517ebcd6b7 |
class PatientStateMonitor: <NEW_LINE> <INDENT> def __init__(self, parameters): <NEW_LINE> <INDENT> self._currentState = parameters.get_initial_health_state() <NEW_LINE> self._delta_t = parameters.get_delta_t() <NEW_LINE> self._survivalTime = 0 <NEW_LINE> self._timeToAIDS = 0 <NEW_LINE> self._ifDevelopedAIDS = False <NE... | to update patient outcomes (years survived, cost, etc.) throughout the simulation | 62598fa57d43ff248742736b |
class WebSocket(WebSocketMixin, web.View): <NEW_LINE> <INDENT> async def get(self) -> web.WebSocketResponse: <NEW_LINE> <INDENT> self.room = await get_object_or_404( self.request, Room, name=self.request.match_info['slug'].lower() ) <NEW_LINE> user = self.request.user <NEW_LINE> app = self.request.app <NEW_LINE> app.lo... | Helper для работы с вебсокетами | 62598fa54527f215b58e9db4 |
class IngressHelm(base.BaseHelm): <NEW_LINE> <INDENT> CHART = constants.HELM_CHART_INGRESS <NEW_LINE> SUPPORTED_NAMESPACES = [ common.HELM_NS_KUBE_SYSTEM, common.HELM_NS_OPENSTACK ] <NEW_LINE> def get_namespaces(self): <NEW_LINE> <INDENT> return self.SUPPORTED_NAMESPACES <NEW_LINE> <DEDENT> def get_overrides(self, name... | Class to encapsulate helm operations for the ingress chart | 62598fa51f5feb6acb162af4 |
class SaturationTransform(Transform): <NEW_LINE> <INDENT> def __call__(self, data, label, gt, seg_gt, seg_gt_to_compare): <NEW_LINE> <INDENT> data = cv2.cvtColor(data, cv2.COLOR_BGR2HSV) <NEW_LINE> data = data.astype(np.float32) <NEW_LINE> delta = random.uniform(self.lower, self.upper) <NEW_LINE> data[1] *= delta <NEW_... | Transform hue
Parameters: lower, upper | 62598fa5a17c0f6771d5c107 |
class CommandList(command.BaseCommand): <NEW_LINE> <INDENT> NAME = "list" <NEW_LINE> HELP = "List metrics." <NEW_LINE> def add_arguments(self, parser): <NEW_LINE> <INDENT> parser.add_argument("glob", help="One metric name or globbing on metrics names") <NEW_LINE> parser.add_argument( "--graphite", default=False, action... | List for metrics. | 62598fa599cbb53fe6830da7 |
class deleteRecoveryTasks_args: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRUCT, 'query', (TaskQuery, TaskQuery.thrift_spec), None, ), (2, TType.STRUCT, 'session', (SessionKey, SessionKey.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, query=None, session=None,): <NEW_LINE> <INDENT> self.query = query... | Attributes:
- query
- session | 62598fa556ac1b37e63020bf |
class RosettaSetup: <NEW_LINE> <INDENT> def __init__(self, win, part, previous_movie = None, suffix = ""): <NEW_LINE> <INDENT> self.assy = part.assy <NEW_LINE> self.suffix = suffix <NEW_LINE> self.previous_movie = previous_movie or _stickyParams or Movie(self.assy) <NEW_LINE> self.movie = Movie(self.assy) <NEW_LINE> se... | The "Run Dynamics" dialog class for setting up and launching a simulator run. | 62598fa5435de62698e9bcc8 |
class ProtocolError(SwiftestError): <NEW_LINE> <INDENT> pass | An unexpected state was encountered in the OpenStack protocol.
This is raised on many 500 conditions, for example, or cases where expected
headers are missing from HTTP responses. | 62598fa5d7e4931a7ef3bf6e |
class Identifier(object): <NEW_LINE> <INDENT> def __init__(self, namespace=None, id=None, url=None): <NEW_LINE> <INDENT> self.namespace = namespace <NEW_LINE> self.id = id <NEW_LINE> self.url = url <NEW_LINE> <DEDENT> def to_tuple(self): <NEW_LINE> <INDENT> return (self.namespace, self.id, self.url) <NEW_LINE> <DEDENT>... | An identifier
Attributes:
namespace (:obj:`str`): namespace
id (:obj:`str`): id
url (:obj:`str`): URL | 62598fa58e7ae83300ee8f74 |
class Config(object): <NEW_LINE> <INDENT> def __init__(self, config_file=None, **kwargs): <NEW_LINE> <INDENT> if config_file: <NEW_LINE> <INDENT> with open(config_file, "r") as f: <NEW_LINE> <INDENT> data = yaml.load(f.read()) or {} <NEW_LINE> <DEDENT> <DEDENT> else: <NEW_LINE> <INDENT> data = {} <NEW_LINE> <DEDENT> fo... | This object handles the configuration of Nornir.
Arguments:
config_file(``str``): Yaml configuration file. | 62598fa538b623060ffa8f69 |
class RandomProjectionHasher(Hasher): <NEW_LINE> <INDENT> def __init__(self, feat_dim, sig_dim): <NEW_LINE> <INDENT> super(RandomProjectionHasher, self).__init__(feat_dim, sig_dim) <NEW_LINE> self.planes = self._init_planes() <NEW_LINE> <DEDENT> def _init_planes(self): <NEW_LINE> <INDENT> return randn(self.sig_dim, sel... | RandomProjectionHasher generates random hyperplanes and make
projections from features onto these planes to generate hash values.
It's used together with cosine similarity measure | 62598fa544b2445a339b68d8 |
class Listing(RNode): <NEW_LINE> <INDENT> KIND = "Listing" <NEW_LINE> SCHEMA = RSchema.from_dict({ "modhash": (str, True), "dist": (str, True), "children": (list, False), "after": (str, True), "before": (str, True), }) <NEW_LINE> def __init__(self, _d): <NEW_LINE> <INDENT> super().__init__(_d) <NEW_LINE> <DEDENT> def i... | Internal RNode used for linkage of data structure.
| 62598fa59c8ee823130400d9 |
@base.vectorize <NEW_LINE> class divc(base.Instruction): <NEW_LINE> <INDENT> __slots__ = [] <NEW_LINE> code = base.opcodes['DIVC'] <NEW_LINE> arg_format = ['cw', 'c', 'c'] <NEW_LINE> def execute(self): <NEW_LINE> <INDENT> self.args[0].value = self.args[1].value * pow(self.args[2].value, program.P - 2, program.P) % prog... | Clear division c_i=c_j/c_k.
This instruction is vectorizable | 62598fa57cff6e4e811b58fc |
class OrOp(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def create(cls, opb, loc, values): <NEW_LINE> <INDENT> state = mlir.OperationState(loc, "tfp.Or") <NEW_LINE> state.addTypes( [UnrankedTensorType.get(IntegerType.get(1, opb.getContext()))]) <NEW_LINE> state.addOperands(values) <NEW_LINE> return opb.createOp... | tfp.Or(ops...) This is like tf.Any, except that the first dimension is opened
into `ops`.
Returns a tensor of 1-bit integers which is "Logical OR" of the
coressponding elements in ops... | 62598fa55f7d997b871f934a |
class Stream2EventsStream: <NEW_LINE> <INDENT> max_streambuf = 5 <NEW_LINE> count_streambuf = 0 <NEW_LINE> collected_buffer = b'' <NEW_LINE> pdata = {} <NEW_LINE> def __init__(self, normalizedHandler, slicerHandler): <NEW_LINE> <INDENT> self.nh = normalizedHandler <NEW_LINE> self.sh = slicerHandler <NEW_LINE> <DEDENT> ... | This is a major class, transforming a stream of data (coming from a file, socket etc.) into a normalized array (event) | 62598fa5460517430c431fc5 |
class CompositeOverlay(ViewableElement, Composable): <NEW_LINE> <INDENT> _deep_indexable = True <NEW_LINE> def hist(self, dimension=None, num_bins=20, bin_range=None, adjoin=True, index=None, show_legend=False, **kwargs): <NEW_LINE> <INDENT> main_layer_int_index = getattr(self, "main_layer", None) or 0 <NEW_LINE> if in... | CompositeOverlay provides a common baseclass for Overlay classes. | 62598fa53617ad0b5ee06026 |
class ReportSection(object): <NEW_LINE> <INDENT> def __init__(self, view, generator): <NEW_LINE> <INDENT> self.view = view <NEW_LINE> self.generator = generator <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.view(self.generator()) | A Report Section
A report section contains a generator and a top-level view.
When something attempts to serialize the section by calling
str() on it, the section runs the generator and calls the view
on the resulting model.
.. seealso::
Class :class:`BasicReport`
:func:`BasicReport.add_section`
:param vie... | 62598fa56aa9bd52df0d4d9d |
class Match(db.Model): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> user_id = db.Column(db.Integer, db.ForeignKey('user.id')) <NEW_LINE> project_id = db.Column(db.Integer, db.ForeignKey('project.id')) <NEW_LINE> result = db.Column(db.Integer, nullable=False) <NEW_LINE> def __init__(self, ... | This class is the database model for the Match between a L{User} and a L{Project}. | 62598fa54428ac0f6e6583f5 |
class ArgValidatorPath(ArgValidatorStr): <NEW_LINE> <INDENT> def __init__(self, name, required=False, default_value=None): <NEW_LINE> <INDENT> ArgValidatorStr.__init__(self, name, required, default_value, None) <NEW_LINE> <DEDENT> def _validate_impl(self, value, name): <NEW_LINE> <INDENT> ArgValidatorStr._validate_impl... | Valides that the value is a valid posix absolute path | 62598fa5236d856c2adc93a5 |
class DocumentWatchTests(TestCaseBase): <NEW_LINE> <INDENT> fixtures = ['users.json'] <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> super(DocumentWatchTests, self).setUp() <NEW_LINE> self.document = _create_document() <NEW_LINE> self.client.login(username='rrosario', password='testpass') <NEW_LINE> product(save=True)... | Tests for un/subscribing to document edit notifications. | 62598fa54e4d5625663722f8 |
class SampleView(grok.View): <NEW_LINE> <INDENT> grok.context(IISBNValidationResult) <NEW_LINE> grok.require('zope2.View') | sample view class | 62598fa566673b3332c3029d |
class GenomeDownloader(object): <NEW_LINE> <INDENT> def __init__(self, config, ftp_host, ftp_path, genome, update_progress): <NEW_LINE> <INDENT> self.ftp_util = FTPUtil(config) <NEW_LINE> self.local_dir = os.path.join(config.download_dir, genome) <NEW_LINE> self.ftp_host = ftp_host <NEW_LINE> self.ftp_path = ftp_path <... | Retrieves 2bit genome file from via FTP. | 62598fa5851cf427c66b819c |
class PasswordResetConfirmView(CurrentAppMixin, generic.UpdateView): <NEW_LINE> <INDENT> template_name = "registration/password_reset_confirm.html" <NEW_LINE> form_class = SetPasswordForm <NEW_LINE> success_url = reverse_lazy('django.contrib.auth.views.password_reset_complete') <NEW_LINE> token_generator = default_toke... | Check that the given token is valid then prompt the user for a new pasword. | 62598fa58e71fb1e983bb986 |
class ProtectedFileSystemStorage(FileSystemStorage): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> kwargs["location"] = PROTECTED_MEDIA_ROOT <NEW_LINE> kwargs["base_url"] = PROTECTED_MEDIA_URL <NEW_LINE> super(ProtectedFileSystemStorage, self).__init__(*args, **kwargs) | A class to manage protected files.
We have to override the methods in the FileSystemStorage class which
are decorated with cached_property for this class to work as intended. | 62598fa592d797404e388acf |
class AddCaseForm(BaseAddCaseForm, BaseCaseVersionForm, BaseCaseForm): <NEW_LINE> <INDENT> def clean(self): <NEW_LINE> <INDENT> BaseCaseForm.clean(self) <NEW_LINE> BaseAddCaseForm.clean(self) <NEW_LINE> return self.cleaned_data <NEW_LINE> <DEDENT> def save(self): <NEW_LINE> <INDENT> assert self.is_valid() <NEW_LINE> ve... | Form for adding a new single case and some number of versions. | 62598fa5a17c0f6771d5c109 |
class Subscription(AbstractSubscription): <NEW_LINE> <INDENT> class Meta(AbstractSubscription.Meta): <NEW_LINE> <INDENT> swappable = 'SUBSCRIPTION_MODEL' | Default Subscription Model. If you want to change this, check out AbstractSubscription | 62598fa599cbb53fe6830da9 |
class ConsoleProtocol(abc.ABC): <NEW_LINE> <INDENT> @abc.abstractmethod <NEW_LINE> def read(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def write(self, data: bytes): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def sendline(self, line: str... | Abstract class for the ConsoleProtocol | 62598fa52c8b7c6e89bd369a |
class DataTypeDefinitionTest(test_lib.BaseTestCase): <NEW_LINE> <INDENT> def testIsComposite(self): <NEW_LINE> <INDENT> data_type_definition = data_types.DataTypeDefinition( 'int32', aliases=['LONG', 'LONG32'], description='signed 32-bit integer') <NEW_LINE> result = data_type_definition.IsComposite() <NEW_LINE> self.a... | Data type definition tests. | 62598fa599fddb7c1ca62d52 |
class TutorGroup(models.Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> verbose_name = _("Kleingruppe") <NEW_LINE> verbose_name_plural = _("Kleingruppen") <NEW_LINE> ordering = ['group_category', 'name'] <NEW_LINE> unique_together = ('ophase', 'name') <NEW_LINE> <DEDENT> ophase = models.ForeignKey(Ophase, m... | A group of students guided by tutors. | 62598fa563d6d428bbee2686 |
class BaseLMI(object): <NEW_LINE> <INDENT> def __new__(cls, lhs, rhs, rel_cls, assert_symmetry=True): <NEW_LINE> <INDENT> lhs = sympify(lhs) <NEW_LINE> rhs = sympify(rhs) <NEW_LINE> if assert_symmetry: <NEW_LINE> <INDENT> if lhs.is_Matrix and hasattr(lhs, 'is_symmetric') and not lhs.is_symmetric(): <... | Not intended for general use
BaseLMI is used so that LMI_* classes can share functions. | 62598fa5009cb60464d013f9 |
class IOLogRecordResumeTests(TestCaseWithParameters): <NEW_LINE> <INDENT> parameter_names = ('resume_cls',) <NEW_LINE> parameter_values = ((SessionResumeHelper1,), (SessionResumeHelper2,), (SessionResumeHelper3,)) <NEW_LINE> def test_build_IOLogRecord_missing_delay(self): <NEW_LINE> <INDENT> with self.assertRaises(Corr... | Tests for :class:`~plainbox.impl.session.resume.SessionResumeHelper1`,
:class:`~plainbox.impl.session.resume.SessionResumeHelper2' and
:class:`~plainbox.impl.session.resume.SessionResumeHelper3' and how they
handle resuming IOLogRecord objects | 62598fa53317a56b869be4b4 |
class ResourceVariableSaveable(SaveableObject): <NEW_LINE> <INDENT> def __init__(self, var, slice_spec, name): <NEW_LINE> <INDENT> self._var_device = var.device <NEW_LINE> self._var_shape = var.shape <NEW_LINE> if isinstance(var, ops.Tensor): <NEW_LINE> <INDENT> self.handle_op = var.op.inputs[0] <NEW_LINE> tensor = var... | SaveableObject implementation that handles ResourceVariables. | 62598fa5435de62698e9bcca |
class MetricAbstractModel(models.Model): <NEW_LINE> <INDENT> time_start = models.DateTimeField() <NEW_LINE> time_end = models.DateTimeField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> abstract = True | Metric Abstract Model | 62598fa5eab8aa0e5d30bc5e |
class hierarchy_info_t(object): <NEW_LINE> <INDENT> def __init__(self, related_class=None, access=None, is_virtual=False): <NEW_LINE> <INDENT> if related_class: <NEW_LINE> <INDENT> assert(isinstance(related_class, class_t)) <NEW_LINE> <DEDENT> self._related_class = related_class <NEW_LINE> if access: <NEW_LINE> <INDENT... | describes class relationship | 62598fa5d6c5a102081e201c |
class PersistentConsoleToggleCommand(WindowCommand): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> settings = sublime.load_settings("Persistent Console.sublime-settings") <NEW_LINE> enablePackage = settings.get("enable") <NEW_LINE> verb = "disabled" if enablePackage is True else "enabled" <NEW_LINE> settings.s... | Checks whether to show console on new window. | 62598fa55f7d997b871f934b |
class ErrorDetails(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, code: Optional[str] = None, target: Optional[str] = None, message: ... | Common error details representation.
:ivar code: Error code.
:vartype code: str
:ivar target: Error target.
:vartype target: str
:ivar message: Error message.
:vartype message: str | 62598fa55fdd1c0f98e5de6d |
class CEAccessTest: <NEW_LINE> <INDENT> def _getAccessParams( self, element ): <NEW_LINE> <INDENT> _basePath = 'Resources/Sites' <NEW_LINE> domains = gConfig.getSections( _basePath ) <NEW_LINE> if not domains[ 'OK' ]: <NEW_LINE> <INDENT> return domains <NEW_LINE> <DEDENT> domains = domains[ 'Value' ] <NEW_LINE> for dom... | CEAccessTest
| 62598fa5009cb60464d013fa |
class full_frame(object): <NEW_LINE> <INDENT> def __init__(self, device): <NEW_LINE> <INDENT> self.bounding_box = (0, 0, device.width, device.height) <NEW_LINE> <DEDENT> def redraw_required(self, image): <NEW_LINE> <INDENT> self.image = image <NEW_LINE> return True <NEW_LINE> <DEDENT> def inflate_bbox(self): <NEW_LINE>... | Always renders the full frame every time. This is slower than
:py:class:`diff_to_previous` as there are generally more
pixels to update on every render, but it has a more consistent render time.
Not all display drivers may be able to use the differencing framebuffer, so
this is provided as a drop-in replacement.
:para... | 62598fa5cc0a2c111447aee5 |
class OutboundEnvironmentEndpointList(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'value': {'required': True}, 'next_link': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW... | Collection of Outbound Environment Endpoints.
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 value: Required. Collection of resources.
:type value: list[~storage_pool_management.models.OutboundEnviron... | 62598fa50a50d4780f7052b1 |
class DoesNotExist(Exception): <NEW_LINE> <INDENT> pass | The requested content does not exist. | 62598fa58a43f66fc4bf2052 |
class InvalidStream(BloopException, ValueError): <NEW_LINE> <INDENT> pass | This is not a valid stream definition. | 62598fa510dbd63aa1c70a87 |
class InMemoryRequest(DummyRequest): <NEW_LINE> <INDENT> def __init__(self, *a, **kw): <NEW_LINE> <INDENT> DummyRequest.__init__(self, *a, **kw) <NEW_LINE> self.requestHeaders = Headers() <NEW_LINE> <DEDENT> def redirect(self, url): <NEW_LINE> <INDENT> self.setResponseCode(http.FOUND) <NEW_LINE> self.setHeader(b'locati... | In-memory `IRequest`. | 62598fa5dd821e528d6d8e0a |
class GeocodeCache(CustomCacheScheme): <NEW_LINE> <INDENT> def get_cache_duration(self): <NEW_LINE> <INDENT> duration = TIMEOUT_1_HOUR <NEW_LINE> return duration | Cache management object for geocode lookups
So we don't hit Google maps geocode too frequently for the same location
prekey = [<location_name>,] | 62598fa563d6d428bbee2687 |
class DisjunctionPermission(BasePermission): <NEW_LINE> <INDENT> def __init__(self, *permissions): <NEW_LINE> <INDENT> self.permissions = permissions <NEW_LINE> <DEDENT> def has_permission(self, request, view): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> def has_object_permission(self, request, view, obj): <NEW... | Create new permission as disjunction (OR) of provided instantiated permissions.
Requires at least one permission to have both `has_permission` and `has_object_permission` satisfied. | 62598fa5498bea3a75a579f9 |
class Keyword(Base, MasterModel): <NEW_LINE> <INDENT> name = Column(Text) <NEW_LINE> identifier = Column(String(255)) <NEW_LINE> entries = relationship( "Entry", secondary=entry_keyword, back_populates="keywords") <NEW_LINE> @property <NEW_LINE> def data(self): <NEW_LINE> <INDENT> data = { 'name': self.name, 'identifie... | UniProt keywords summarise the content of a UniProtKB entry and facilitate the search for
proteins of interest.
:cvar str name: Keyword
:cvar str identifier: Keyword identifier
:cvar list entries: list of :class:`.Entry` object
**Table view**
.. image:: _static/models/keyword.png
:target: _images/keyword.png
**... | 62598fa5d486a94d0ba2bea3 |
class MysqlPipeline(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.conn = MySQLdb.connect('127.0.0.1', 'root', '111111', 'spider_db', charset="utf8") <NEW_LINE> self.cursor = self.conn.cursor() <NEW_LINE> <DEDENT> def close_spider(self, spider): <NEW_LINE> <INDENT> self.cursor.close() <NEW_LI... | 用于不同Mysqlpipeline的继承 | 62598fa58e7ae83300ee8f77 |
class VcsPySvnPlugin(QObject): <NEW_LINE> <INDENT> def __init__(self, ui): <NEW_LINE> <INDENT> super(VcsPySvnPlugin, self).__init__(ui) <NEW_LINE> self.__ui = ui <NEW_LINE> self.__subversionDefaults = { "StopLogOnCopy": 1, "LogLimit": 20, "CommitMessages": 20, } <NEW_LINE> from VcsPlugins.vcsPySvn.ProjectHelper import ... | Class implementing the PySvn version control plugin. | 62598fa5b7558d5895463505 |
class OpenGLError(Exception): <NEW_LINE> <INDENT> pass | Generic OpenGL error. | 62598fa57b25080760ed7381 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.