code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class Link(base.BaseRichTextComponent): <NEW_LINE> <INDENT> name = 'Link' <NEW_LINE> category = 'Basic Input' <NEW_LINE> description = 'A link to a URL.' <NEW_LINE> frontend_name = 'link' <NEW_LINE> tooltip = 'Insert link' <NEW_LINE> _customization_arg_specs = [{ 'name': 'url', 'description': ( 'The link URL. If no pro...
A rich-text component for displaying links.
62598fc23346ee7daa33778c
class MetadataPreprocessor(Preprocessor): <NEW_LINE> <INDENT> def run(self, lines): <NEW_LINE> <INDENT> meta = Metadata() <NEW_LINE> key = None <NEW_LINE> while lines: <NEW_LINE> <INDENT> line = lines.pop(0) <NEW_LINE> if line.strip() == '': <NEW_LINE> <INDENT> break <NEW_LINE> <DEDENT> m1 = META_RE.match(line) <NEW_LI...
Get Meta-Data.
62598fc260cbc95b063645c4
class Converter(object): <NEW_LINE> <INDENT> __hash__ = object.__hash__ <NEW_LINE> def __init__(self, decode, encode=None): <NEW_LINE> <INDENT> fallback_encode = getattr(__builtins__, "unicode", str) <NEW_LINE> self.single_decode = decode <NEW_LINE> self.single_encode = encode or fallback_encode <NEW_LINE> <DEDENT> def...
Decode from strings to objects and back. Used internally by the :meth:`morepath.App.converter` directive. Only used for decoding for a list with a single value, will error if more or less than one value is entered. Used for decoding/encoding URL parameters and path parameters.
62598fc25166f23b2e243668
class DisablePoll_args: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRUCT, '_valueId', (RemoteValueID, RemoteValueID.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, _valueId=None,): <NEW_LINE> <INDENT> self._valueId = _valueId <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__cla...
Attributes: - _valueId
62598fc28a349b6b436864c6
class WhatPage(TiedToUser): <NEW_LINE> <INDENT> MODEL_CHOICES = ( ("item", "item"), ("purchase", "purchase"), ) <NEW_LINE> obj = models.CharField(max_length=15, choices=MODEL_CHOICES, unique=True) <NEW_LINE> page_number = models.IntegerField() <NEW_LINE> number_per_page = models.IntegerField() <NEW_LINE> def __unicode_...
Where was the User looking last?
62598fc23d592f4c4edbb13f
class VisaIOWarning(Warning): <NEW_LINE> <INDENT> def __init__(self, error_code): <NEW_LINE> <INDENT> abbreviation, description = completion_and_error_messages.get(error_code, ('?', 'Unknown code.')) <NEW_LINE> super(VisaIOWarning, self).__init__('%s (%d): %s' % (abbreviation, error_code, description)) <NEW_LINE> self....
Exception class for VISA I/O warnings. According to the specification VPP-4.3.2 and the NI implementation.
62598fc23317a56b869be694
class BaseNetworkTask(task.Task): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super().__init__(**kwargs) <NEW_LINE> self._network_driver = None <NEW_LINE> self.task_utils = task_utils.TaskUtils() <NEW_LINE> self.lb_repo = repositories.LoadBalancerRepository() <NEW_LINE> <DEDENT> @property <NEW...
Base task to load drivers common to the tasks.
62598fc2ec188e330fdf8b1c
class ComponentsResource(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': ...
An azure resource object. 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. :ivar id: Azure resource Id. :vartype id: str :ivar name: Azure resource name. :vartype name: str :ivar type: Azure resource type. :va...
62598fc297e22403b383b192
class Products(models.Model): <NEW_LINE> <INDENT> productid = models.AutoField(primary_key=True) <NEW_LINE> name = models.CharField(max_length=50) <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return self.name <NEW_LINE> <DEDENT> def __unicode__(self): <NEW_LINE> <INDENT> return "<Product %u: %u>" % (self.producti...
>>> names=['D', 'F', 'B', 'A', 'C', 'E', 'G'] >>> for n in names: product = Products.objects.create(name=n) >>> p = Products.objects >>> len(list(p.all())) 7 >>> len(list(p.all()[:3])) 3 >>> len(list(p.all()[2:5])) 3 >>> len(list(p.all()[5:])) 2 >>> p.all()[0:0] [] >>> p.all()[0:0][:10] [] >>> pn = p.order_by('name') >...
62598fc24c3428357761a544
class Message: <NEW_LINE> <INDENT> def __init__(self, delivery_info, properties, body): <NEW_LINE> <INDENT> self.delivery_info = delivery_info <NEW_LINE> self.properties = properties <NEW_LINE> self.body = body
A wrapper around the tuple that pika returns when reading a message.
62598fc25fcc89381b266291
class NerRDFTypeFilter(object): <NEW_LINE> <INDENT> def __init__(self, endpoint, accepted_types): <NEW_LINE> <INDENT> self.endpoint = endpoint <NEW_LINE> self.accepted_types = accepted_types <NEW_LINE> self.query = 'SELECT ?type WHERE{<%(uri)s> rdf:type ?type}' <NEW_LINE> <DEDENT> def __call__(self, named_entities): <N...
A filter based on the RDF type on entity E.g. filter = NerRDFTypeFilter('http://dbpedia.org/sparql', ('http://schema.org/Place', 'http://dbpedia.org/ontology/Agent', 'http://dbpedia.org/ontology/Place'))
62598fc263b5f9789fe853fb
class SchedulerInitTestCase(test.NoDBTestCase): <NEW_LINE> <INDENT> driver_cls = fakes.FakeScheduler <NEW_LINE> @mock.patch.object(host_manager.HostManager, '_init_instance_info') <NEW_LINE> @mock.patch.object(host_manager.HostManager, '_init_aggregates') <NEW_LINE> def test_init_using_default_hostmanager(self, mock_in...
Test case for base scheduler driver initiation.
62598fc2d486a94d0ba2c259
class ArchitectureValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> ARCHITECTURE_UNSPECIFIED = 0 <NEW_LINE> X86 = 1 <NEW_LINE> X64 = 2
The CPU architecture for which packages in this distribution channel were built Values: ARCHITECTURE_UNSPECIFIED: Unknown architecture X86: X86 architecture X64: x64 architecture
62598fc226068e7796d4cbe4
class _RestIterable(object): <NEW_LINE> <INDENT> def __init__(self, response): <NEW_LINE> <INDENT> resp = response.json() <NEW_LINE> if 'errors' in resp: <NEW_LINE> <INDENT> self.results = resp['errors'] <NEW_LINE> <DEDENT> elif 'statuses' in resp: <NEW_LINE> <INDENT> self.results = resp['statuses'] <NEW_LINE> <DEDENT>...
Iterate statuses, errors or other iterable objects in a REST API response. :param response: The request.Response from a Twitter REST API request
62598fc24527f215b58ea158
class LivePipelineGetRequest(MethodRequestEmptyBodyBase): <NEW_LINE> <INDENT> _validation = { 'method_name': {'required': True, 'readonly': True}, 'name': {'required': True}, } <NEW_LINE> _attribute_map = { 'method_name': {'key': 'methodName', 'type': 'str'}, 'api_version': {'key': '@apiVersion', 'type': 'str'}, 'name'...
Retrieves an existing live pipeline. 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. :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str :ivar api_versi...
62598fc299fddb7c1ca62f31
class NotQueuedError(Error): <NEW_LINE> <INDENT> def __init__(self, message: str, team: Team): <NEW_LINE> <INDENT> super().__init__(message) <NEW_LINE> self.team = team
Team is not queued
62598fc2aad79263cf42ea5e
class SendInvoiceHandler(EmailHandler): <NEW_LINE> <INDENT> def message(self, sender, order, **kwargs): <NEW_LINE> <INDENT> email = render_to_string('plata/notifications/order_completed.txt', self.context(kwargs)).splitlines() <NEW_LINE> content = StringIO.StringIO() <NEW_LINE> pdf = PDFDocument(content) <NEW_LINE> inv...
Send an e-mail with attached invoice to the customer after successful order completion, optionally BCC'ing the addresses passed as ``always_bcc`` to the handler upon initialization. Usage:: signals.order_completed.connect( SendInvoiceHandler(always_bcc=['owner@example.com']), weak=False)
62598fc23d592f4c4edbb141
@test(groups=["plugins", "murano_plugin"]) <NEW_LINE> class MuranoPlugin(TestBasic): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(MuranoPlugin, self).__init__() <NEW_LINE> check_plugin_path_env( var_name='MURANO_PLUGIN_PATH', plugin_path=settings.MURANO_PLUGIN_PATH ) <NEW_LINE> <DEDENT> def setup_m...
Murano Plugin Tests.
62598fc23317a56b869be695
class TestDeleteMember(unittest.TestCase): <NEW_LINE> <INDENT> layer = INTEGRATION_ANON_SURVEY_TESTING <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.portal = self.layer['portal'] <NEW_LINE> data_path = os.path.dirname(utils.__file__) <NEW_LINE> data_catch = open(os.path.join(data_path, 'user_import'), 'rU') <NEW...
Test member deletion
62598fc271ff763f4b5e7a07
class StatusCodeEnum(str, Enum): <NEW_LINE> <INDENT> JOB_PENDING = 'job_pending' <NEW_LINE> JOB_IN_PROGRESS = 'job_in_progress' <NEW_LINE> JOB_FINISHED = 'job_finished' <NEW_LINE> JOB_FAILED = 'job_failed' <NEW_LINE> JOB_CANCELLED = 'job_cancelled'
Status of Jobs.
62598fc20fa83653e46f516f
class model_file_read(BaseModel): <NEW_LINE> <INDENT> task: Task <NEW_LINE> filegroup: Union[StrictStr, List[StrictStr]] <NEW_LINE> base_url: Optional[StrictStr] = "/var/nornir-salt/" <NEW_LINE> task_name: Optional[StrictStr] = None <NEW_LINE> last: Optional[StrictInt] = 1 <NEW_LINE> index: Optional[StrictStr] = "commo...
Model for nornir_salt.plugins.tasks.file_read plugin arguments
62598fc2a8370b77170f066c
class Pbkdf1_Test(TestCase): <NEW_LINE> <INDENT> descriptionPrefix = "pbkdf1" <NEW_LINE> pbkdf1_tests = [ (b('password'), hb('78578E5A5D63CB06'), 1000, 16, 'sha1', hb('dc19847e05c64d2faf10ebfb4a3d2a20')), (b('password'), b('salt'), 1000, 0, 'md5', b('')), (b('password'), b('salt'), 1000, 1, 'md5', hb('84')), (b('...
test kdf helpers
62598fc25fc7496912d483c0
class AdministrationRights(object): <NEW_LINE> <INDENT> _0 = "0" <NEW_LINE> _1 = "1" <NEW_LINE> _2 = "2" <NEW_LINE> _4 = "4" <NEW_LINE> _8 = "8" <NEW_LINE> _16 = "16" <NEW_LINE> _32 = "32" <NEW_LINE> _64 = "64" <NEW_LINE> swagger_types = { } <NEW_LINE> attribute_map = { } <NEW_LINE> def __init__(self): <NEW_LINE> <INDE...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fc2d8ef3951e32c7fa1
class Not(Validator): <NEW_LINE> <INDENT> def __init__(self, other, message): <NEW_LINE> <INDENT> self.other = other <NEW_LINE> self.message = message <NEW_LINE> <DEDENT> def __call__(self, obj, location="/"): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.other(obj, location) <NEW_LINE> <DEDENT> except: <NEW_LINE> ...
Validate a structure by specifying what it shouldn't be.
62598fc2be7bc26dc9251fa1
class LeadMassActionForm(forms.Form): <NEW_LINE> <INDENT> status = forms.ModelChoiceField(queryset=[], required=False) <NEW_LINE> assignedto = forms.ModelChoiceField(queryset=[], required=False) <NEW_LINE> instance = None <NEW_LINE> def __init__(self, user, *args, **kwargs): <NEW_LINE> <INDENT> if 'instance' in kwargs:...
Mass action form for Orders
62598fc2ec188e330fdf8b1e
class CopyFileToFile(RsyncClone): <NEW_LINE> <INDENT> def __init__(self, src, dst, **kwargs): <NEW_LINE> <INDENT> super().__init__(src, dst, **kwargs) <NEW_LINE> <DEDENT> def __call__(self, *args, **kwargs) -> None: <NEW_LINE> <INDENT> PythonBatchCommandBase.__call__(self, *args, **kwargs) <NEW_LINE> resolved_src: Path...
copy a file src to dst, dst is a full path to the destination file {options_doc_str}
62598fc2796e427e5384ea20
class ScrapeSensor(Entity): <NEW_LINE> <INDENT> def __init__(self, hass, rest, name, select, value_template, unit): <NEW_LINE> <INDENT> self.rest = rest <NEW_LINE> self._name = name <NEW_LINE> self._state = STATE_UNKNOWN <NEW_LINE> self._select = select <NEW_LINE> self._value_template = value_template <NEW_LINE> self._...
Representation of a web scrape sensor.
62598fc25fcc89381b266292
class Interval(object): <NEW_LINE> <INDENT> def __init__(self, s=0, e=0): <NEW_LINE> <INDENT> self.start = s <NEW_LINE> self.end = e <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return str(self.start) + "-" + str(self.end)
表示start到stop的数字区间
62598fc2f9cc0f698b1c5416
class Farsnews(scrapy.Spider): <NEW_LINE> <INDENT> name = "Farsnews" <NEW_LINE> allowed_domains = ["farsnews.com"] <NEW_LINE> urls = [ "http://www.farsnews.com/RSS", "http://www.farsnews.com/rss/world", "http://www.farsnews.com/rss/politics", "http://www.farsnews.com/rss/universities", "http://www.farsnews.com/rss/spor...
Farsnews Crawler
62598fc2a219f33f346c6a92
class company(object): <NEW_LINE> <INDENT> def symbol(self,symbol): <NEW_LINE> <INDENT> self.symbol=symbol
This a a general company description
62598fc226068e7796d4cbe6
class PackageHandler(BaseAptRepoHandler): <NEW_LINE> <INDENT> allowed_methods = ('GET', 'DELETE') <NEW_LINE> model = server.aptrepo.models.Package <NEW_LINE> _DEFAULT_MAX_PACKAGES = 100 <NEW_LINE> @handle_exception <NEW_LINE> def read(self, request, **kwargs): <NEW_LINE> <INDENT> if (len(kwargs) == 0): <NEW_LINE> <INDE...
REST API call handler for packages
62598fc2a05bb46b3848aaf7
class MissingCorpusException(Exception): <NEW_LINE> <INDENT> def __init__(self, message=MISSING_CORPUS_MESSAGE, *args, **kwargs): <NEW_LINE> <INDENT> super(MissingCorpusException, self).__init__(message, *args, **kwargs)
Exception thrown when a user tries to use a feature that requires a dataset or model that the user does not have on their system.
62598fc2851cf427c66b8541
class Wizard(Character): <NEW_LINE> <INDENT> def __init__(self, is_evil): <NEW_LINE> <INDENT> super().__init__(15, 10, 12, 700, 1, 100, "Wizard") <NEW_LINE> self._is_evil = is_evil <NEW_LINE> self._mana = 150 <NEW_LINE> <DEDENT> def level_up(self): <NEW_LINE> <INDENT> super().level_up() <NEW_LINE> if self._is_evil: <NE...
Wizard Character Type Class
62598fc25166f23b2e24366c
class UsernamePasswordTests(unittest.TestCase): <NEW_LINE> <INDENT> def test_interface(self): <NEW_LINE> <INDENT> I, C = credentials.IUsernamePassword, mc.UsernamePassword <NEW_LINE> self.assertTrue(I.implementedBy(C)) <NEW_LINE> <DEDENT> def test_simple(self): <NEW_LINE> <INDENT> username, password = "username", "pass...
Tests for a storable username and password pair.
62598fc24428ac0f6e6587b0
class option(nodes.General, nodes.Element): <NEW_LINE> <INDENT> pass
node for defining an option
62598fc24a966d76dd5ef160
class Cost(object): <NEW_LINE> <INDENT> def __init__(self, vcls): <NEW_LINE> <INDENT> self.l = 0.0 <NEW_LINE> self.r = 0.0 <NEW_LINE> self.i = 0.0 <NEW_LINE> self.path = vcls() <NEW_LINE> <DEDENT> def set_lri(self, value): <NEW_LINE> <INDENT> self.l = self.r = self.i = value
Represents a Cost for opt strategy calculation
62598fc24f88993c371f0650
class MicrosoftPartnerSdkContractsV1CollectionsPagedResourceCollectionMicrosoftPartnerSdkContractsV1Invoice(Model): <NEW_LINE> <INDENT> _validation = { 'total_count': {'readonly': True}, 'items': {'readonly': True}, 'attributes': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'continuation_token': {'key': 'continu...
Paged Resource Collection. Variables are only populated by the server, and will be ignored when sending a request. :param continuation_token: Gets or sets the continuation token. :type continuation_token: str :ivar total_count: Gets the total count. :vartype total_count: int :ivar items: Gets the collection items. :v...
62598fc2283ffb24f3cf3b10
class LinkWorldAngularVelocityState(LinkState): <NEW_LINE> <INDENT> def __init__(self, robot, link_ids=None, window_size=1, axis=None, ticks=1): <NEW_LINE> <INDENT> super(LinkWorldAngularVelocityState, self).__init__(robot, link_ids, window_size=window_size, axis=axis, ticks=ticks) <NEW_LINE> <DEDENT> def _read(self): ...
Link world angular velocity state
62598fc27047854f4633f65f
class http_completion(BaseHTTPRequestHandler): <NEW_LINE> <INDENT> def _set_headers(self): <NEW_LINE> <INDENT> self.send_response(200) <NEW_LINE> self.send_header("Content-type", "application/json") <NEW_LINE> self.end_headers() <NEW_LINE> <DEDENT> def do_POST(self): <NEW_LINE> <INDENT> self._set_headers() <NEW_LINE> l...
Completion handler which returns the completions for a given source, line and cursor positon.
62598fc2ff9c53063f51a8da
class TestMergeCounts(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.subdir = './test_merge_counts_files/' <NEW_LINE> self.counts1 = '{0}/counts1.txt'.format(self.subdir) <NEW_LINE> self.counts2 = '{0}/counts2.txt'.format(self.subdir) <NEW_LINE> self.expected = '{0}/expected_merge.txt...
Runs ``dms_merge`` on test data to add counts.
62598fc2442bda511e95c6ec
class PreferenceType5: <NEW_LINE> <INDENT> q = 0 <NEW_LINE> p = 1 <NEW_LINE> def __init__(self, q=0, p=1): <NEW_LINE> <INDENT> self.q = q <NEW_LINE> self.p = p <NEW_LINE> <DEDENT> def value(self, diff): <NEW_LINE> <INDENT> if (diff <= self.q): <NEW_LINE> <INDENT> return 0 <NEW_LINE> <DEDENT> if (diff <= self.p): <NEW_L...
Linear preferences and indifference zone.
62598fc221bff66bcd722ef7
class CCT(NumericValue): <NEW_LINE> <INDENT> bank = BANK_1 <NEW_LINE> unit = 'K' <NEW_LINE> locations = MemoryRange(start=0x21, end=0x22, default=0xff, type_=MemoryType.NVM_RW_L) <NEW_LINE> mask_supported = True <NEW_LINE> max_value = 17000 <NEW_LINE> @classmethod <NEW_LINE> def raw_to_value(cls, raw): <NEW_LINE> <INDE...
CCT in K Valid when in the range 0..17000 May return "Part 209 implemented" for raw value 0xfffe
62598fc263b5f9789fe853ff
class Car: <NEW_LINE> <INDENT> def __init__(self, name, fuel=0): <NEW_LINE> <INDENT> self.fuel = fuel <NEW_LINE> self.odometer = 0 <NEW_LINE> self.name = name <NEW_LINE> <DEDENT> def str(self): <NEW_LINE> <INDENT> return "{}, fuel= {}, Odometer: {}".format(self.name, self.fuel, self.odometer) <NEW_LINE> <DEDENT> def ad...
Represent a Car object.
62598fc2d486a94d0ba2c25d
class V2beta2ContainerResourceMetricSource(object): <NEW_LINE> <INDENT> openapi_types = { 'container': 'str', 'name': 'str', 'target': 'V2beta2MetricTarget' } <NEW_LINE> attribute_map = { 'container': 'container', 'name': 'name', 'target': 'target' } <NEW_LINE> def __init__(self, container=None, name=None, target=None,...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually.
62598fc25fcc89381b266293
class ScriptConfig: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.conf_path = '/grafana_script/config/scriptconfig.ini' <NEW_LINE> self.filepath = self.load_filepath() <NEW_LINE> <DEDENT> def load_filepath(self): <NEW_LINE> <INDENT> return os.path.abspath('') + self.conf_path <NEW_LINE> <DEDENT> def ...
Get values from your configuration.ini file
62598fc255399d3f056267a4
class SequenceFileDataset(dataset_ops.DatasetSource): <NEW_LINE> <INDENT> @deprecation.deprecated( None, "tf.contrib.hadoop will be removed in 2.0, the support for Apache Hadoop " "will continue to be provided through the tensorflow/io GitHub project.") <NEW_LINE> def __init__(self, filenames): <NEW_LINE> <INDENT> self...
A Sequence File Dataset that reads the sequence file.
62598fc29f288636728189c2
class Ne(Binary): <NEW_LINE> <INDENT> pass
An AST that checks if the left node does not equal the right node when evaluating.
62598fc2a05bb46b3848aaf9
class TransformerDecoderLayer(TransformerDecoderLayerBase): <NEW_LINE> <INDENT> def __init__( self, d_model, heads, d_ff, dropout, attention_dropout, self_attn_type="scaled-dot", max_relative_positions=0, aan_useffn=False, full_context_alignment=False, alignment_heads=0, pos_ffn_activation_fn=ActivationFunction.relu, )...
Transformer Decoder layer block in Pre-Norm style. Pre-Norm style is an improvement w.r.t. Original paper's Post-Norm style, providing better converge speed and performance. This is also the actual implementation in tensor2tensor and also avalable in fairseq. See https://tunz.kr/post/4 and :cite:`DeeperTransformer`. ....
62598fc27b180e01f3e49196
class IgnSismologiaFeedManager(FeedManagerBase): <NEW_LINE> <INDENT> def __init__( self, generate_callback, update_callback, remove_callback, coordinates, filter_radius=None, filter_minimum_magnitude=None, ): <NEW_LINE> <INDENT> feed = IgnSismologiaFeed( coordinates, filter_radius=filter_radius, filter_minimum_magnitud...
Feed Manager for IGN Sismología feed.
62598fc260cbc95b063645ca
class RequestTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.environ = { 'HTTP_COOKIE': COOKIE_STRING, 'REQUEST_METHOD': 'get', 'PATH_INFO': '/hello/world', 'QUERY_STRING': 'a=1&b=text', } <NEW_LINE> self.request = Request(self, self.environ) <NEW_LINE> <DEDENT> def testApp(se...
Test case for partial template execution
62598fc2cc40096d6161a31f
class BoxOAuth2Token(basetoken.OAuth2Token): <NEW_LINE> <INDENT> def __init__(self, *args, **kw): <NEW_LINE> <INDENT> kw.setdefault("auth_uri", "https://api.box.com/oauth2/authorize") <NEW_LINE> kw.setdefault("token_uri", "https://api.box.com/oauth2/token") <NEW_LINE> kw.setdefault("revoke_uri", "https://api.box.com/oa...
Token object for OAuth 2.0 as described on <http://code.google.com/apis/accounts/docs/OAuth2.html>. Uses "Bearer" rather than OAuth as HTTP auth scheme
62598fc2091ae35668704eb5
class Solution: <NEW_LINE> <INDENT> @printTime() <NEW_LINE> def minCut(self, s: str) -> int: <NEW_LINE> <INDENT> self.len = len(s) <NEW_LINE> mem = [[True for _ in range(self.len)] for _ in range(self.len)] <NEW_LINE> for i in range(self.len - 1, - 1, -1): <NEW_LINE> <INDENT> for j in range(i + 1, self.len): <NEW_LINE>...
DP
62598fc23317a56b869be697
class JobPriority(util.OrderedEnum): <NEW_LINE> <INDENT> EVENT_SERVICE = 1 <NEW_LINE> EVENT_STATE = 2 <NEW_LINE> EVENT_TIME = 3 <NEW_LINE> EVENT_DEFAULT = 4 <NEW_LINE> @staticmethod <NEW_LINE> def from_event_type(event_type): <NEW_LINE> <INDENT> if event_type == EVENT_TIME_CHANGED: <NEW_LINE> <INDENT> return JobPriorit...
Provides priorities for bus events.
62598fc27c178a314d78d72d
class Group(Container): <NEW_LINE> <INDENT> def add_criterion(self, name, priority, and_or, search_type, value): <NEW_LINE> <INDENT> criterion = SearchCriteria(name, priority, and_or, search_type, value) <NEW_LINE> self.criteria.append(criterion) <NEW_LINE> <DEDENT> @property <NEW_LINE> def is_smart(self): <NEW_LINE> <...
Abstract class for ComputerGroup and MobileDeviceGroup.
62598fc250812a4eaa620d2c
@test(groups=[VOLUMES_DRIVER], depends_on_classes=[AddVolume]) <NEW_LINE> class AfterVolumeIsAdded(VolumeTest): <NEW_LINE> <INDENT> @time_out(120) <NEW_LINE> def test_api_get(self): <NEW_LINE> <INDENT> volume = poll_until(lambda: self.story.get_volume(), lambda volume: volume["status"] != "creating") <NEW_LINE> self.as...
Check that the volume can be retrieved via the API, and setup. All we want to see returned is a list-like with an initial string.
62598fc2283ffb24f3cf3b12
class GetMediaItem(AuthenticatedMethod): <NEW_LINE> <INDENT> method_name = 'wp.getMediaItem' <NEW_LINE> method_args = ('attachment_id',) <NEW_LINE> results_class = WordPressMedia
Retrieve an individual media item. Parameters: `attachment_id`: ID of the media item. Returns: :class:`WordPressMedia` instance.
62598fc2ec188e330fdf8b22
class SpikeDetector(base.Component): <NEW_LINE> <INDENT> waveform_src = base.RequiredFeature("SignalSource", base.HasAttributes("signal")) <NEW_LINE> def __init__(self, thresh='auto', contact=0, type='max', resample=1, sp_win=(-0.2, 0.8), align=True): <NEW_LINE> <INDENT> self._thresh = thresh <NEW_LINE> self.contact = ...
Detect Spikes with alignment
62598fc2f9cc0f698b1c5418
class MacroFrame(ga._AnagFrame): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> if not kwargs.has_key('title') and len(args) < 3: <NEW_LINE> <INDENT> kwargs['title'] = FRAME_TITLE <NEW_LINE> <DEDENT> ga._AnagFrame.__init__(self, *args, **kwargs) <NEW_LINE> self.LoadAnagPanel(MacroPanel(sel...
Frame Gestione tabella Macro.
62598fc2a05bb46b3848aafb
class SGDParams(Params): <NEW_LINE> <INDENT> class Fields: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> class Defaults: <NEW_LINE> <INDENT> pass
Stochastic gradient descent updates.
62598fc25166f23b2e243670
class CodeMetrics(object): <NEW_LINE> <INDENT> def __init__(self, code, ast): <NEW_LINE> <INDENT> self.code = code <NEW_LINE> self.ast = ast <NEW_LINE> <DEDENT> @property <NEW_LINE> def loc(self): <NEW_LINE> <INDENT> return len(self.code.split("\n")) <NEW_LINE> <DEDENT> @property <NEW_LINE> def linelength(self): <NEW_L...
Some simple metrics about the code
62598fc2cc40096d6161a320
class Fila: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.dados = [] <NEW_LINE> self.tamanho = 0 <NEW_LINE> <DEDENT> def push(self, valor): <NEW_LINE> <INDENT> self.dados.append(valor) <NEW_LINE> self.tamanho += 1 <NEW_LINE> <DEDENT> def pop(self): <NEW_LINE> <INDENT> if not self.empty(): <NEW_LINE> ...
Implementa uma fila de tamanho estatico
62598fc260cbc95b063645cc
class Environment(object): <NEW_LINE> <INDENT> def __init__(self, name, environment_tree): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.tree = environment_tree <NEW_LINE> <DEDENT> def provider(self): <NEW_LINE> <INDENT> return self.tree.get('provider', 'heat') <NEW_LINE> <DEDENT> def provider_params(self): <NEW...
The object that describe the customer environment.
62598fc2aad79263cf42ea65
class MainHandler(tornado.web.RequestHandler): <NEW_LINE> <INDENT> def get(self, path=None): <NEW_LINE> <INDENT> gfl = GenerateFileList() <NEW_LINE> if path: <NEW_LINE> <INDENT> p = path if path[0] == '/' else '/' + path <NEW_LINE> fida = FileInfoDictAssembler(item_path=p) <NEW_LINE> (dir_list, file_list) = fida.fetch(...
top main url
62598fc27c178a314d78d72f
class Options(Structure): <NEW_LINE> <INDENT> _fields_ = [("level", c_int), ("n_empties", c_int), ("midgame_error", c_int) , ("endcut_error", c_int), ("verbosity", c_int)];
Options class.
62598fc271ff763f4b5e7a0d
class RunCommandResult(OperationStatusResponse): <NEW_LINE> <INDENT> _validation = { 'name': {'readonly': True}, 'status': {'readonly': True}, 'start_time': {'readonly': True}, 'end_time': {'readonly': True}, 'error': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'status': ...
Run command operation response. Variables are only populated by the server, and will be ignored when sending a request. :ivar name: Operation ID :vartype name: str :ivar status: Operation status :vartype status: str :ivar start_time: Start time of the operation :vartype start_time: datetime :ivar end_time: End time o...
62598fc250812a4eaa620d2d
class Plugin(ABC): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.driver = None <NEW_LINE> self.message_listeners: Dict[ re.Pattern, Sequence[MessageFunction] ] = defaultdict(list) <NEW_LINE> self.webhook_listeners: Dict[ re.Pattern, Sequence[WebHookFunction] ] = defaultdict(list) <NEW_LINE> self.help...
A Plugin is a self-contained class that defines what functions should be executed given different inputs. It will be called by the EventHandler whenever one of its listeners is triggered, but execution of the corresponding function is handled by the plugin itself. This way, you can implement multithreading or multipro...
62598fc27047854f4633f664
class TableRowGroupBox(ParentBox): <NEW_LINE> <INDENT> proper_table_child = True <NEW_LINE> internal_table_or_caption = True <NEW_LINE> tabular_container = True <NEW_LINE> proper_parents = (TableBox, InlineTableBox) <NEW_LINE> header_group = False <NEW_LINE> footer_group = False
Box for elements with ``display: table-row-group``
62598fc27cff6e4e811b5cb5
class AutosCreateView(LoginRequiredMixin, CreateView): <NEW_LINE> <INDENT> def form_valid(self, form): <NEW_LINE> <INDENT> print('form_valid called') <NEW_LINE> object = form.save(commit=False) <NEW_LINE> object.owner = self.request.user <NEW_LINE> object.save() <NEW_LINE> return super(AutosCreateView, self).form_valid...
Sub-class of the CreateView to automatically pass the Request to the Form and add the owner to the saved object.
62598fc2a8370b77170f0672
class Event(resource.Resource): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def sample(cls): <NEW_LINE> <INDENT> return cls()
Event descriptor.
62598fc2ff9c53063f51a8de
class AladdinDevice(CoverEntity): <NEW_LINE> <INDENT> _attr_device_class = CoverDeviceClass.GARAGE <NEW_LINE> _attr_supported_features = SUPPORTED_FEATURES <NEW_LINE> def __init__(self, acc: AladdinConnectClient, device: DoorDevice) -> None: <NEW_LINE> <INDENT> self._acc = acc <NEW_LINE> self._device_id = device["devic...
Representation of Aladdin Connect cover.
62598fc223849d37ff851343
class BaseHandler(web.RequestHandler): <NEW_LINE> <INDENT> def initialize(self, database): <NEW_LINE> <INDENT> self.db = database
Not really necessary class. It can be used in order to extend base functionality of all specific request handlers. Now it provides quick access to database object, although it is available in singleton manner.
62598fc2d486a94d0ba2c261
class DataStats(object): <NEW_LINE> <INDENT> _PREC = 1e-9 <NEW_LINE> def __init__(self, var_names=None, raw_data=None): <NEW_LINE> <INDENT> self.var_names = var_names <NEW_LINE> if raw_data is not None: <NEW_LINE> <INDENT> self.raw_data = raw_data <NEW_LINE> <DEDENT> <DEDENT> def get_corr_mat(self): <NEW_LINE> <INDENT>...
Manages statistical information on causal model. Allows for specification of statistics "by hand" when sample data is not available.
62598fc2adb09d7d5dc0a80d
class BaseModel(): <NEW_LINE> <INDENT> def __init__(self, object_name, table): <NEW_LINE> <INDENT> self.table = table <NEW_LINE> self.object_name = object_name <NEW_LINE> self.error_message = "" <NEW_LINE> self.error_code = 200 <NEW_LINE> self.id = generate_id(table) <NEW_LINE> <DEDENT> def as_json(self): <NEW_LINE> <I...
model that defines all models
62598fc2283ffb24f3cf3b15
class CopyTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.l = [0, 3, 16, 1] <NEW_LINE> <DEDENT> def testcopyPitches(self): <NEW_LINE> <INDENT> a = PCSet(self.l) <NEW_LINE> b = PSet(self.l) <NEW_LINE> c = a.copy() <NEW_LINE> d = b.copy() <NEW_LINE> self.assertTrue(c.pitches == self.l and d....
Create a new instance with the pitches, settings and class of the original
62598fc2fff4ab517ebcda77
class TestBravoFactoryStarted(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.d = tempfile.mkdtemp() <NEW_LINE> self.name = "unittest" <NEW_LINE> self.bcp = BravoConfigParser() <NEW_LINE> self.bcp.add_section("world unittest") <NEW_LINE> d = { "authenticator" : "offline", "automatons" ...
Tests which require ``startFactory()`` to be called.
62598fc24527f215b58ea160
class OnetSkillListProcessor(object): <NEW_LINE> <INDENT> def __init__(self, onet_source, output_filename, hash_function, ksa_types=None): <NEW_LINE> <INDENT> self.output_filename = output_filename <NEW_LINE> self.onet_source = onet_source <NEW_LINE> self.hash_function = hash_function <NEW_LINE> self.ksa_types = ksa_ty...
An object that creates a skills CSV based on ONET data Originally written by Kwame Porter Robinson
62598fc2a05bb46b3848aafd
class StopTrackingDownloadCount(BackendMessage): <NEW_LINE> <INDENT> pass
Stop tracking the download count.
62598fc3167d2b6e312b7208
class Resnet_2D(nn.Module): <NEW_LINE> <INDENT> def __init__(self, input_nc, output_nc, ngf=64, norm_layer=nn.BatchNorm2d, use_dropout=False, n_blocks=6, padding_type='reflect', n_downsampling = 2): <NEW_LINE> <INDENT> assert(n_blocks >= 0) <NEW_LINE> super(Resnet_2D, self).__init__() <NEW_LINE> if type(norm_layer) == ...
Resnet-based generator that consists of Resnet blocks between a few downsampling/upsampling operations. We adapt Torch code and idea from Justin Johnson's neural style transfer project(https://github.com/jcjohnson/fast-neural-style)
62598fc37047854f4633f666
class DS18B20_on_Arduino_HTTPServer_RequestHandler(BaseHTTPRequestHandler): <NEW_LINE> <INDENT> __ports = None <NEW_LINE> def do_GET(self): <NEW_LINE> <INDENT> if self.__ports is None: <NEW_LINE> <INDENT> serial_devices = [] <NEW_LINE> for g in SERIAL_FILENAME_GLOBS: <NEW_LINE> <INDENT> serial_devices.extend(glob.glob(...
A subclass of BaseHTTPRequestHandler to provide information about DS18B20 sensors.
62598fc350812a4eaa620d2e
class Solution: <NEW_LINE> <INDENT> def topSort(self, graph): <NEW_LINE> <INDENT> incoming = {} <NEW_LINE> for node in graph: <NEW_LINE> <INDENT> if node not in incoming: <NEW_LINE> <INDENT> incoming[node] = set() <NEW_LINE> <DEDENT> for des in node.neighbors: <NEW_LINE> <INDENT> if des not in incoming: <NEW_LINE> <IND...
@param graph: A list of Directed graph node @return: A list of integer
62598fc357b8e32f52508267
class UtahJazz(NBA_Team): <NEW_LINE> <INDENT> full_name = "Utah Jazz" <NEW_LINE> name = "Jazz" <NEW_LINE> team_id = 1610612762 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super().__init__()
NBA's Washington Wizards Static Information
62598fc363b5f9789fe85405
class PersonWeekQuotaShotsResource(Resource, ArgsMixin): <NEW_LINE> <INDENT> @jwt_required <NEW_LINE> def get(self, person_id, year, week): <NEW_LINE> <INDENT> project_id = self.get_project_id() <NEW_LINE> task_type_id = self.get_task_type_id() <NEW_LINE> user_service.check_person_access(person_id) <NEW_LINE> weighted ...
Get ended shots used for quota calculation of this week.
62598fc355399d3f056267aa
class RegistryStatistics(Model): <NEW_LINE> <INDENT> _validation = { 'total_device_count': {'readonly': True}, 'enabled_device_count': {'readonly': True}, 'disabled_device_count': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'total_device_count': {'key': 'totalDeviceCount', 'type': 'long'}, 'enabled_device_count...
Identity registry statistics. Variables are only populated by the server, and will be ignored when sending a request. :ivar total_device_count: The total count of devices in the identity registry. :vartype total_device_count: long :ivar enabled_device_count: The count of enabled devices in the identity registry. :v...
62598fc3d486a94d0ba2c263
class TestRail(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.configs = self.load_configs() <NEW_LINE> u = self.configs['user'] <NEW_LINE> p = self.configs['password'] <NEW_LINE> self.url = self.configs['url'] <NEW_LINE> self.rest = restclient.RestClient(u, p) <NEW_LINE> <DEDENT> def load_con...
Interface to the TestRail API
62598fc3377c676e912f6ebd
class ModifyPublishSubscribeNameRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.PublishSubscribeId = None <NEW_LINE> self.PublishSubscribeName = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.PublishSubscribeId = params.get("PublishSubscribeId"...
ModifyPublishSubscribeName请求参数结构体
62598fc35fcc89381b266296
class Annotation(): <NEW_LINE> <INDENT> def __init__(self, start, end, annotation): <NEW_LINE> <INDENT> self.start = start <NEW_LINE> self.end = end <NEW_LINE> self.annotation = annotation
Wraps a semantic annotation with offset information
62598fc326068e7796d4cbee
class InlineResponse2013(object): <NEW_LINE> <INDENT> def __init__(self, status=None, schedule=None): <NEW_LINE> <INDENT> self.swagger_types = { 'status': 'str', 'schedule': 'Schedule' } <NEW_LINE> self.attribute_map = { 'status': 'status', 'schedule': 'schedule' } <NEW_LINE> self._status = status <NEW_LINE> self._sche...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fc33346ee7daa337792
class FASTQMetadataFile(MetadataFile): <NEW_LINE> <INDENT> category_name = 'FASTQ'; <NEW_LINE> def collect_metadata(self): <NEW_LINE> <INDENT> return {}
A metadata file type for fastq.gz files
62598fc397e22403b383b19d
class DeleteEnvironmentRequest(proto.Message): <NEW_LINE> <INDENT> name = proto.Field(proto.STRING, number=1,)
The request message for [Environments.DeleteEnvironment][google.cloud.dialogflow.v2beta1.Environments.DeleteEnvironment]. Attributes: name (str): Required. The name of the environment to delete. / Format: - ``projects/<Project Number / ID>/agent/environments/<Environment ID>`` - ``projec...
62598fc366673b3332c30668
class MockClusterGenerator(): <NEW_LINE> <INDENT> def __init__(self, num_clusters, nodes_per_cluster, x, y, stddev, seed=None): <NEW_LINE> <INDENT> self.num_clusters = num_clusters <NEW_LINE> self.nodes_per_cluster = nodes_per_cluster <NEW_LINE> self.x = x <NEW_LINE> self.y = y <NEW_LINE> self.stddev = stddev <NEW_LINE...
Class that handles and generates mock clusters and nodes in 2D Args: num_clusters(``int``): Number of clusters to generate nodes_per_cluster(``int``): Total nodes per cluster x(``float``): Max x coord y(``float``): Max y coord stddev(``float``): stddev of nodes around each cluster centre Example U...
62598fc38a349b6b436864d2
class LxFdtDump(gdb.Command): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(LxFdtDump, self).__init__("lx-fdtdump", gdb.COMMAND_DATA, gdb.COMPLETE_FILENAME) <NEW_LINE> <DEDENT> def fdthdr_to_cpu(self, fdt_header): <NEW_LINE> <INDENT> fdt_header_be = ">IIIIIII" <NEW_LINE> fdt_header_le = "<IIIIIII" <...
Output Flattened Device Tree header and dump FDT blob to the filename specified as the command argument. Equivalent to 'cat /proc/fdt > fdtdump.dtb' on a running target
62598fc3aad79263cf42ea68
class Number(Type): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Type.__init__(self) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def validate(cls, value): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> float(value) <NEW_LINE> <DEDENT> except TypeError: <NEW_LINE> <INDENT> raise ValueError("Invalid value '%...
This class represents an integer or float in the configuration model. On these integers the following operations are supported: +, -, /, *
62598fc3e1aae11d1e7ce96f
class SingleSwitchTopo(Topo): <NEW_LINE> <INDENT> def build(self): <NEW_LINE> <INDENT> s3 = self.addSwitch('s3') <NEW_LINE> s1 = self.addSwitch('s1') <NEW_LINE> s2 = self.addSwitch('s2') <NEW_LINE> s4 = self.addSwitch('s4') <NEW_LINE> s5 = self.addSwitch('s5') <NEW_LINE> h1 = self.addHost('h1') <NEW_LINE> h2 = self.add...
Single switch connected to n hosts.
62598fc37cff6e4e811b5cb9
class Meta(NamedModel.Meta): <NEW_LINE> <INDENT> app_label = _app_label <NEW_LINE> db_table = db_table(_app_label, _email_type) <NEW_LINE> verbose_name = _(_email_type_verbose) <NEW_LINE> verbose_name_plural = _(pluralize(_email_type_verbose))
Model meta class declaration.
62598fc37d847024c075c651
class AverageMeter(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.reset() <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT> self.val = 0 <NEW_LINE> self.avg = 0 <NEW_LINE> self.sum = 0 <NEW_LINE> self.count = 0 <NEW_LINE> self.max = 0 <NEW_LINE> <DEDENT> def update(self, val, n=1): <NE...
Computes and stores the average and current value
62598fc392d797404e388cac
class TextProcess(BaseEstimator, TransformerMixin): <NEW_LINE> <INDENT> def __init__(self, index_num): <NEW_LINE> <INDENT> self.index_num = index_num <NEW_LINE> <DEDENT> def fit(self, X, y=None): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def transform(self, X, y=None): <NEW_LINE> <INDENT> if type(X) == pd.cor...
process text data with making new features
62598fc3283ffb24f3cf3b19
class Connection(object): <NEW_LINE> <INDENT> def __init__(self, connection): <NEW_LINE> <INDENT> self._connection = connection <NEW_LINE> <DEDENT> def _get_or_create_user(self, user_data): <NEW_LINE> <INDENT> User = get_user_model() <NEW_LINE> attributes = user_data["attributes"] <NEW_LINE> user_fields = { field_name:...
A connection to an LDAP server.
62598fc35fcc89381b266297
class _IncrDecr(_RExprNode): <NEW_LINE> <INDENT> def __init__(self, expr): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.expr = expr <NEW_LINE> <DEDENT> descrip = None <NEW_LINE> cmd = None <NEW_LINE> return_new = None <NEW_LINE> def make_il(self, il_code, symbol_table, c): <NEW_LINE> <INDENT> lval = self.expr...
Base class for prefix/postfix increment/decrement operators.
62598fc35fdd1c0f98e5e228
class PfsSqliteRegistry(PfsSqlRegistry): <NEW_LINE> <INDENT> placeHolder = "?" <NEW_LINE> def __init__(self, location): <NEW_LINE> <INDENT> if os.path.exists(location): <NEW_LINE> <INDENT> conn = sqlite3.connect(location) <NEW_LINE> conn.text_factory = str <NEW_LINE> self.root = location <NEW_LINE> <DEDENT> else: <NEW_...
A SQLite-based registry
62598fc3091ae35668704ebc
class DutyAssignmentSubmittedEvent(Model): <NEW_LINE> <INDENT> def __init__(self, event_type=None, duty_id=None): <NEW_LINE> <INDENT> self.openapi_types = { 'event_type': str, 'duty_id': str } <NEW_LINE> self.attribute_map = { 'event_type': 'eventType', 'duty_id': 'dutyId' } <NEW_LINE> self._event_type = event_type <NE...
NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually.
62598fc34f88993c371f0655