code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class VirtualMachineScaleSetSku(Model): <NEW_LINE> <INDENT> _validation = { 'resource_type': {'readonly': True}, 'sku': {'readonly': True}, 'capacity': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'resource_type': {'key': 'resourceType', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'capacity': {'key': '... | Describes an available virtual machine scale set sku.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar resource_type: The type of resource the sku applies to.
:vartype resource_type: str
:ivar sku: The Sku.
:vartype sku: ~azure.mgmt.compute.v2017_03_30.models.Sku
:ivar cap... | 62598f73d99f1b3c44d04f49 |
class MiniOvl: <NEW_LINE> <INDENT> def __init__(self, mini_line): <NEW_LINE> <INDENT> fields = mini_line.split() <NEW_LINE> self.id1 = fields[0] <NEW_LINE> self.len1 = int(fields[1]) <NEW_LINE> self.b1 = int(fields[2]) <NEW_LINE> self.e1 = int(fields[3]) <NEW_LINE> self.strand = fields[4] <NEW_LINE> self.id2 = fields[5... | Overlap between two reads, named 1 and 2, from line of minimap file.
Such a line contains :
query name, length, 0-based start, end, strand,
target name, length, start, end, the number of matching bases.
Parameters
----------
mini_line : str (line from minimap file)
Attributes
----------
id1 : str (read id of read 1)
id... | 62598f73167d2b6e312b6810 |
@dataclass <NEW_LINE> class ProcessFailure: <NEW_LINE> <INDENT> local_rank: int <NEW_LINE> pid: int <NEW_LINE> exitcode: int <NEW_LINE> error_file: str <NEW_LINE> error_file_data: JSON = field(init=False) <NEW_LINE> message: str = field(init=False) <NEW_LINE> timestamp: int = field(init=False) <NEW_LINE> def __post_ini... | Represents the failed process result. When the worker process fails,
it may record failure root cause into the file.
Tries to read the failure timestamp from the provided ``error_file``,
if the ``error_file`` does not exist, the timestamp is the current
timestamp (seconds since epoch).
The ``message`` field is a conci... | 62598f7321bff66bcd7224f6 |
class StaticRootS3BotoStorage(storages.backends.s3boto.S3BotoStorage): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> kwargs['location'] = "static" <NEW_LINE> super(StaticRootS3BotoStorage, self).__init__(*args, **kwargs) | Storage for save all static files in static folder. | 62598f7373bcbd0ca4bc9ae1 |
@dataclasses.dataclass <NEW_LINE> class TableConstraints: <NEW_LINE> <INDENT> tablename: str <NEW_LINE> constraints: t.List[Constraint] <NEW_LINE> def __post_init__(self): <NEW_LINE> <INDENT> foreign_key_constraints: t.List[Constraint] = [] <NEW_LINE> unique_constraints: t.List[Constraint] = [] <NEW_LINE> primary_key_c... | All of the constraints for a certain table in the database. | 62598f73d164cc6175820809 |
class LocalServerInvoker(ServerInvoker): <NEW_LINE> <INDENT> def invoke(self, *args, **kwargs): <NEW_LINE> <INDENT> return self.parallel_server.invoke(*args, **kwargs) <NEW_LINE> <DEDENT> def invoke_async(self, *args, **kwargs): <NEW_LINE> <INDENT> return self.parallel_server.invoke_async(*args, **kwargs) <NEW_LINE> <D... | Invokes services directly on the current server, without any network-based RPC.
| 62598f736fece00bbaccb21f |
class TestGCEComputeResourceTestCases: <NEW_LINE> <INDENT> @tier1 <NEW_LINE> def test_positive_crud_gce_cr(self, module_org, module_location): <NEW_LINE> <INDENT> cr_name = gen_string('alpha') <NEW_LINE> compresource = entities.GCEComputeResource( name=cr_name, provider='GCE', email=GCE_SETTINGS['client_email'], key_pa... | Tests for ``api/v2/compute_resources``. | 62598f73d18da76e235b6d81 |
class ExpertiseCreateView(generics.CreateAPIView): <NEW_LINE> <INDENT> model = Expertise <NEW_LINE> serializer_class = ExpertiseSerializer | Create new Expertise. | 62598f73ac7a0e7691f71dac |
class Estimator(object): <NEW_LINE> <INDENT> def __init__(self, model): <NEW_LINE> <INDENT> self.counts = {} <NEW_LINE> self.count_total = model.alphabet_size * model.symbol_prior <NEW_LINE> self._model = model <NEW_LINE> <DEDENT> def prob(self, symbol): <NEW_LINE> <INDENT> count = self.counts.get(symbol, None) <NEW_LI... | The estimator for a CTS node.
This implements a Dirichlet-multinomial model with specified prior. This
class does not perform alphabet checking, and will return invalid
probabilities if it is ever fed more than `model.alphabet_size` distinct
symbols.
Args:
model: Reference to CTS model. We expected model.symbol_pri... | 62598f737c178a314d78cd3b |
class EcsServiceWithHealthCheckGracePeriodSeconds(ecs.Service): <NEW_LINE> <INDENT> props = ecs.Service.props <NEW_LINE> props['HealthCheckGracePeriodSeconds'] = (positive_integer, False) | ECS Service class with HealthCheckGracePeriodSeconds added. | 62598f73287bf620b627144c |
class ServiceEndpointPropertiesFormat(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'provisioning_state': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'service': {'key': 'service', 'type': 'str'}, 'locations': {'key': 'locations', 'type': '[str]'}, 'provisioning_state': {'key': 'provisioningSt... | The service endpoint properties.
Variables are only populated by the server, and will be ignored when sending a request.
:param service: The type of the endpoint service.
:type service: str
:param locations: A list of locations.
:type locations: list[str]
:ivar provisioning_state: The provisioning state of the servic... | 62598f738a349b6b43685ad7 |
@dataclass <NEW_LINE> class ConnectionGraph: <NEW_LINE> <INDENT> edges_fwd: EdgeMap = field(default_factory=lambda: defaultdict(set)) <NEW_LINE> edges_rev: EdgeMap = field(default_factory=lambda: defaultdict(set)) <NEW_LINE> def add_edge(self, source: Node, sink: Node) -> None: <NEW_LINE> <INDENT> self.edges_fwd[source... | A directed graph of Nodes. | 62598f736e29344779affef4 |
class ReLight(object): <NEW_LINE> <INDENT> def add(self, x, z): <NEW_LINE> <INDENT> coords = (x, z) <NEW_LINE> self.all_columns.add(coords) <NEW_LINE> <DEDENT> def calc_lighting(self): <NEW_LINE> <INDENT> mclevel = self.save_file <NEW_LINE> for column_coords in self.all_columns: <NEW_LINE> <INDENT> x = column_coords[0]... | keep track of which squares need to be relit, and then relight them | 62598f731d351010ab8f33d4 |
class StorageAccountAttributes(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'created': {'readonly': True}, 'updated': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'enabled': {'key': 'enabled', 'type': 'bool'}, 'created': {'key': 'created', 'type': 'unix-time'}, 'updated': {'key': 'updated', '... | The storage account management attributes.
Variables are only populated by the server, and will be ignored when sending a request.
:param enabled: the enabled state of the object.
:type enabled: bool
:ivar created: Creation time in UTC.
:vartype created: ~datetime.datetime
:ivar updated: Last updated time in UTC.
:va... | 62598f7323e79379d538bd8c |
class WhoisRecord(SchemaBase): <NEW_LINE> <INDENT> subject = Column(Text, nullable=False, unique=True) <NEW_LINE> idna_subject = Column(Text, nullable=True, unique=False) <NEW_LINE> expiration_date = Column(Text, nullable=False) <NEW_LINE> epoch = Column(Integer, nullable=False) <NEW_LINE> registrar = Column(Text, null... | Provides the schema of our whois_record table. | 62598f7326238365f5fac40a |
class Timeout(Error): <NEW_LINE> <INDENT> pass | The datastore operation timed out. This can happen when you attempt to
put, get, or delete too many entities or an entity with too many properties,
or if the datastore is overloaded or having trouble. | 62598f7315fb5d323ce7e5bd |
class TestConditionParentCommand(CLICommand): <NEW_LINE> <INDENT> name = "test" <NEW_LINE> description = "Evaluate condition and print the result." <NEW_LINE> example = "test player_facing up" <NEW_LINE> def invoke(self, ctx: InvokeContext, line: str) -> None: <NEW_LINE> <INDENT> print("need more arguments or syntax er... | Command that will test a condition. | 62598f73b830903b9686e0bd |
class SvnUpdateTask(TaskBase): <NEW_LINE> <INDENT> def __init__( self, dir ): <NEW_LINE> <INDENT> super(SvnUpdateTask, self).__init__() <NEW_LINE> self.dir = dir <NEW_LINE> <DEDENT> def do( self ): <NEW_LINE> <INDENT> self.reporter.message( "SVN UPDATE DIR: %s" % self.dir ) <NEW_LINE> return execProg( "svn update --non... | Svn Update Dir Step | 62598f73167d2b6e312b6812 |
class Context(object): <NEW_LINE> <INDENT> def __init__(self, base_directory, options=Namespace()): <NEW_LINE> <INDENT> self._base_directory = base_directory <NEW_LINE> self._defaults = {} <NEW_LINE> self._options = options <NEW_LINE> pass <NEW_LINE> <DEDENT> def set_base_directory(self, base_directory): <NEW_LINE> <IN... | Contextual data and information for plugins. | 62598f731f5feb6acb1624cd |
class TestStrip(unittest.TestCase): <NEW_LINE> <INDENT> @given( build_nat(10, 3), build_strip_config(), build_relation(), build_base(16), ) <NEW_LINE> @settings(max_examples=100) <NEW_LINE> def test_xform(self, number, config, relation, base): <NEW_LINE> <INDENT> result = Strip(config, base).xform(number, relation) <NE... | Test Strip. | 62598f73d6c5a102081e19db |
class XYNode(Node): <NEW_LINE> <INDENT> def __init__(self, node_id, pos_x=0, pos_y=0, threat_value=0): <NEW_LINE> <INDENT> super().__init__(node_id=node_id) <NEW_LINE> self.pos_x = pos_x <NEW_LINE> self.pos_y = pos_y <NEW_LINE> self.threat_value = threat_value <NEW_LINE> <DEDENT> def get_heuristic(self, goal_node): <NE... | XYNode is the 2D Node which should be used with XYEnvironment
Most use cases have no need to generate XYNode directly.
See 'test_search.py' for example of generating all XYNodes in a given XYEnvironment. | 62598f730a366e3fb87dc25d |
class BlockBatchSizeAdjuster: <NEW_LINE> <INDENT> def __init__( self, block_batch_size_config: BlockBatchSizeConfig, base: float = 2.0, step_size: float = 1.0, ) -> None: <NEW_LINE> <INDENT> self._block_batch_size_config = block_batch_size_config <NEW_LINE> self._base = base <NEW_LINE> self._step_size = step_size <NEW_... | Helper to dynamically adjust the block batch size.
Internally it uses an exponential function of base ``base`` onto which the block range given
in the config is mapped.
The default values for ``base`` and ``step_size`` fit well for ranges that span several orders
of magnitude. For very small ranges those values may n... | 62598f738c3a8732951f5de5 |
class RetryInterceptor(ClientInterceptor): <NEW_LINE> <INDENT> def __init__(self, retries): <NEW_LINE> <INDENT> self._retries = retries <NEW_LINE> <DEDENT> def intercept(self, method, request_or_iterator, call_details): <NEW_LINE> <INDENT> tries_remaining = 1 + self._retries <NEW_LINE> while 0 < tries_remaining: <NEW_L... | Test interceptor that retries failed RPCs. | 62598f73cad5886f8bdc4bb8 |
class FakeSender: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.sentBoxes = [] <NEW_LINE> self.unhandledErrors = [] <NEW_LINE> self.expectedErrors = 0 <NEW_LINE> <DEDENT> def expectError(self): <NEW_LINE> <INDENT> self.expectedErrors += 1 <NEW_LINE> <DEDENT> def sendBox(self, box): <NEW_LINE> <INDENT... | This is a fake implementation of the 'box sender' interface implied by
L{AMP}. | 62598f7391af0d3eaad396a2 |
class LocalTransport(RemoteTransport): <NEW_LINE> <INDENT> name = 'local_node' <NEW_LINE> def _connect(self, password): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> def _disconnect(self): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> @property <NEW_LINE> def connected(self): <NEW_LINE> <INDENT> return True... | A 'transport' to represent a local node. No remote connection is actually
made, and all commands set to be run by this transport are executed locally
without any wrappers. | 62598f738a43f66fc4bf1a16 |
class ConsumerBuffer(): <NEW_LINE> <INDENT> def __init__(self, dispatcher, index, data): <NEW_LINE> <INDENT> logger.trace("Initializing %s: (dispatcher: '%s', index: %s, data: %s)", self.__class__.__name__, dispatcher, index, data) <NEW_LINE> self._data = data <NEW_LINE> self._id = index <NEW_LINE> self._dispatcher = d... | Memory buffer for consuming | 62598f73287bf620b627144e |
class UwsgiPanel(Panel): <NEW_LINE> <INDENT> title = _('uWSGI Status') <NEW_LINE> nav_title = _('uWSGI Status') <NEW_LINE> template = 'uwsgi/panel.html' <NEW_LINE> @property <NEW_LINE> def nav_subtitle(self): <NEW_LINE> <INDENT> if uwsgi is not None: <NEW_LINE> <INDENT> status = _('Version %s, %d Workers') % ( uwsgi.ve... | uWSGI Debug Toolbar Panel | 62598f738e05c05ec3f6ea91 |
class GreedyAdvisor(SubjectAdvisor): <NEW_LINE> <INDENT> def __init__(self, comparator): <NEW_LINE> <INDENT> SubjectAdvisor.__init__(self) <NEW_LINE> self.comparator = comparator <NEW_LINE> <DEDENT> def pickSubjects(self, subjects, maxWork): <NEW_LINE> <INDENT> sortedSubjects = sorted(subjects, self.comparator) <NEW_LI... | An advisor that picks subjects based on a greedy algorithm. | 62598f741d351010ab8f33d6 |
class GroveButton(object): <NEW_LINE> <INDENT> def __init__(self, pin): <NEW_LINE> <INDENT> self.__btn = Factory.getButton("GPIO-HIGH", pin) <NEW_LINE> self.__last_time = time.time() <NEW_LINE> self.__on_press = None <NEW_LINE> self.__on_release = None <NEW_LINE> self.__btn.on_event(self, GroveButton.__handle_event) <N... | Grove Button class
Args:
pin(int): the number of gpio/slot your grove device connected. | 62598f74d53ae8145f917d2e |
class AbstractRequestHandlerChain(object): <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> @abstractmethod <NEW_LINE> def request_handler(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def request_interceptors(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abstractmethod <NE... | Abstract class containing Request Handler and corresponding
Interceptors. | 62598f747b25080760ed6d36 |
class ProductCostPlanOperation(ModuleTestCase): <NEW_LINE> <INDENT> module = 'product_cost_plan_operation' | Product Cost Plan Operation Test | 62598f741f037a2d8b9e3986 |
@register_metric <NEW_LINE> class EmptyMetric(Metric): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> CLASS_NAME = 'empty' <NEW_LINE> def _handle(self, *args, **kwargs) -> None: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def to_metric_data(self) -> MetricDataCollection: <NEW_LINE> <INDENT> return MetricDataCollection(... | A metric that disregards all data that it's fed, and outputs nothing.
A placeholder for the times when you configure metrics and decide to leave some of them out
blank. | 62598f74e76e3b2f99fd82c8 |
class DetectionTargetLayer(KE.Layer): <NEW_LINE> <INDENT> def __init__(self, config, **kwargs): <NEW_LINE> <INDENT> super(DetectionTargetLayer, self).__init__(**kwargs) <NEW_LINE> self.config = config <NEW_LINE> <DEDENT> def call(self, inputs): <NEW_LINE> <INDENT> proposals = inputs[0] <NEW_LINE> gt_class_ids = inputs[... | Subsamples proposals and generates target box refinement, class_ids,
and masks for each.
Inputs:
proposals: [batch, N, (y1, x1, y2, x2)] in normalized coordinates. Might
be zero padded if there are not enough proposals.
gt_class_ids: [batch, MAX_GT_INSTANCES] Integer class IDs.
gt_boxes: [batch, MAX_GT_INST... | 62598f7473bcbd0ca4bc9ae6 |
class TaasAgentRpcCallbackMixin(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(TaasAgentRpcCallbackMixin, self).__init__() <NEW_LINE> <DEDENT> def consume_api(self, agent_api): <NEW_LINE> <INDENT> self.agent_api = agent_api <NEW_LINE> <DEDENT> def create_tap_service(self, context, tap_servic... | Mixin for Taas agent Implementations. | 62598f7438b623060ffa8934 |
class VoltageRecordingRegion(RecordingRegion): <NEW_LINE> <INDENT> def bytes_per_frame(self, n_neurons): <NEW_LINE> <INDENT> words_per_frame = n_neurons // 2 + n_neurons % 2 <NEW_LINE> return 4 * words_per_frame <NEW_LINE> <DEDENT> def to_array(self, mem, vertex_slice, n_steps): <NEW_LINE> <INDENT> data, _, n_neurons =... | Region used to record neuron input voltages.
Voltage regions use 1 short per neuron per timestep but pad each frame to a
multiple of words. | 62598f74ac7a0e7691f71db0 |
@ChallengeResponse.register <NEW_LINE> class HTTP01Response(KeyAuthorizationChallengeResponse): <NEW_LINE> <INDENT> typ = "http-01" <NEW_LINE> PORT = 80 <NEW_LINE> WHITESPACE_CUTSET = "\n\r\t " <NEW_LINE> def simple_verify(self, chall, domain, account_public_key, port=None): <NEW_LINE> <INDENT> if not self.verify(chall... | ACME http-01 challenge response. | 62598f744d74a7450cd58b26 |
class EntityNotFoundError(Exception): <NEW_LINE> <INDENT> pass | Error raised when an entity is not found in a repository | 62598f7407d97122c4216539 |
class Node: <NEW_LINE> <INDENT> def __init__(self, mode): <NEW_LINE> <INDENT> self.mode = mode <NEW_LINE> self.next = list() <NEW_LINE> self.term = False <NEW_LINE> self.term_idx = -1 <NEW_LINE> <DEDENT> def add_profile(self, profile, profile_idx): <NEW_LINE> <INDENT> if len(profile) == 0: <NEW_LINE> <INDENT> return <N... | Single node of profiles tree | 62598f74b57a9660fecd1318 |
class ConfigurationView(ChainMap, AttributeDictMixin): <NEW_LINE> <INDENT> def __init__(self, changes, defaults=None, keys=None, prefix=None): <NEW_LINE> <INDENT> defaults = [] if defaults is None else defaults <NEW_LINE> super().__init__(changes, *defaults) <NEW_LINE> self.__dict__.update( prefix=prefix.rstrip('_') + ... | A view over an applications configuration dictionaries.
Custom (but older) version of :class:`collections.ChainMap`.
If the key does not exist in ``changes``, the ``defaults``
dictionaries are consulted.
Arguments:
changes (Mapping): Map of configuration changes.
defaults (List[Mapping]): List of dictionarie... | 62598f7426238365f5fac40e |
class Query(GranoObject): <NEW_LINE> <INDENT> def __init__(self, client, clazz, endpoint, params=None): <NEW_LINE> <INDENT> super(Query, self).__init__(client, None) <NEW_LINE> self.clazz = clazz <NEW_LINE> self.endpoint = endpoint <NEW_LINE> self.params = params or {} <NEW_LINE> <DEDENT> def reload(self): <NEW_LINE> <... | A query is a mechanism to store query state and paginate
through result sets returned by the server. | 62598f74dc8b845886d52e4d |
class SinglePeriodInflow(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.currentValue = None <NEW_LINE> <DEDENT> def sampleValue(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def getValue(self): <NEW_LINE> <INDENT> return self.currentValue | A single inflow represents the inflow of material to the model in one single period. To implement material inflows to the system over the entire simulated time implement ExternalListInflow or ExternalFunctionInflow
To implement use subclass | 62598f741f5feb6acb1624d1 |
class Transformer_tp_sum(Transformer): <NEW_LINE> <INDENT> arg_num = 2 <NEW_LINE> context = 'mul' <NEW_LINE> @staticmethod <NEW_LINE> def match(v1, v2): <NEW_LINE> <INDENT> return ( isinstance(v1, TP) and isinstance(v2, sp.Sum) ) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def transform(v1 : TP, v2 : sp.Sum): <NEW_LIN... | TP(a, b) * Sum(f, limits) → Sum(TP(a, b) * f, limits) | 62598f748c3a8732951f5de9 |
class Scatter(PlotlyDict): <NEW_LINE> <INDENT> _name = 'scatter' | Valid attributes for 'scatter' at path [] under parents ():
['connectgaps', 'customdata', 'customdatasrc', 'dx', 'dy', 'error_x',
'error_y', 'fill', 'fillcolor', 'hoverinfo', 'hoverinfosrc',
'hoverlabel', 'hoveron', 'hovertext', 'hovertextsrc', 'ids', 'idssrc',
'legendgroup', 'line', 'marker', 'mode', ... | 62598f74be383301e0253092 |
class CompiledQuery(object): <NEW_LINE> <INDENT> def __init__(self, store, query): <NEW_LINE> <INDENT> self._store = store <NEW_LINE> self._query = query <NEW_LINE> self._build() <NEW_LINE> <DEDENT> @property <NEW_LINE> def _meta(self): <NEW_LINE> <INDENT> return self._query._meta <NEW_LINE> <DEDENT> @property <NEW_LIN... | A signature class for implementing a :class:`.Query` in a
pulsar data :class:`.Store`.
.. attribute:: _query
The underlying :class:`.Query`
.. attribute:: _store
The :class:`.Store` executing the :attr:`query` | 62598f74e76e3b2f99fd82ca |
class Fetcher: <NEW_LINE> <INDENT> def url_valid(self, url): <NEW_LINE> <INDENT> return bool(urlparse(url).netloc) <NEW_LINE> <DEDENT> def fetch(self, url): <NEW_LINE> <INDENT> response = requests.get(url) <NEW_LINE> if response.status_code == 404: <NEW_LINE> <INDENT> raise NotFoundException('URL not found: %s' % (url)... | Retrieves the HTML content of a page via HTTP requests. | 62598f7473bcbd0ca4bc9ae8 |
@dataclass <NEW_LINE> class DovadoRequiredKeysMixin: <NEW_LINE> <INDENT> identifier: str | Mixin for required keys. | 62598f7450485f2cf55da80a |
class SchoolMember: <NEW_LINE> <INDENT> def __init__(self, name, age): <NEW_LINE> <INDENT> assert isinstance(name, str), "Name must be str" <NEW_LINE> assert isinstance(age, int) and age > 0, "Age must be int" <NEW_LINE> self._name = name.title() <NEW_LINE> self._age = age <NEW_LINE> print(f"(Создан {SchoolMember.__nam... | Representing any human being in school.
| 62598f74ac7a0e7691f71db2 |
class SpecializedFruitManager(SpecializationManager): <NEW_LINE> <INDENT> def get_queryset(self): <NEW_LINE> <INDENT> return super(SpecializedFruitManager, self).get_queryset().filter( rotten=False ) | And any specializations also shouldn't return any rotten fruit
specializations. | 62598f74a8ecb03325870aa3 |
class Neuron: <NEW_LINE> <INDENT> def __init__(self, nx): <NEW_LINE> <INDENT> if not isinstance(nx, int): <NEW_LINE> <INDENT> raise TypeError("nx must be an integer") <NEW_LINE> <DEDENT> if nx < 1: <NEW_LINE> <INDENT> raise ValueError("nx must be a positive integer") <NEW_LINE> <DEDENT> self.__W = np.random.normal(0, 1... | Neuron class | 62598f7476d4e153a661c4ae |
class TemplateawsscripterHandlerError(awsscripterException): <NEW_LINE> <INDENT> pass | Error raised if awsscripter_handler() is not defined correctly in the template. | 62598f741d351010ab8f33da |
class Info(object): <NEW_LINE> <INDENT> def __init__(self, path, uid, type, mtime, digest=None): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> self.uid = uid <NEW_LINE> self.type = type <NEW_LINE> self.mtime = mtime <NEW_LINE> self.digest = digest <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "In... | Data transfer object representing the state in one tree | 62598f7450485f2cf55da80b |
class CreateQrSessionResponse(object): <NEW_LINE> <INDENT> def __init__(self, authSessionId=None,): <NEW_LINE> <INDENT> self.authSessionId = authSessionId <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.... | Attributes:
- authSessionId | 62598f74d99f1b3c44d04f51 |
class FormWidgets(OrderedDict): <NEW_LINE> <INDENT> mode = FORM_INPUT <NEW_LINE> prefix = 'widgets.' <NEW_LINE> fieldsets = () <NEW_LINE> def __init__(self, fields, form, request): <NEW_LINE> <INDENT> self.form_fields = fields <NEW_LINE> self.form = form <NEW_LINE> self.request = request <NEW_LINE> super(FormWidgets, s... | Form widgets manager.
Widget is bound to content field. | 62598f74d10714528d69d768 |
class Config(object): <NEW_LINE> <INDENT> APP_SETTINGS="development" <NEW_LINE> DEBUG = False <NEW_LINE> CSRF_ENABLED = True <NEW_LINE> SECRET = "some-very-long-string-of-random-characters-CHANGE-TO-YOUR-LIKING" <NEW_LINE> SQLALCHEMY_DATABASE_URI = 'postgresql://postgres:15december@localhost/flask_api' <NEW_LINE> FLASK... | Parent configuration class. | 62598f7430c21e258be980a0 |
class Persona: <NEW_LINE> <INDENT> def __init__(self, tipo): <NEW_LINE> <INDENT> self.cedula = 0 <NEW_LINE> self.nombreCompleto = "" <NEW_LINE> self.telefono = 0 <NEW_LINE> self.voto = 0 <NEW_LINE> self.tipo = tipo <NEW_LINE> <DEDENT> def setCedula(self, cedula): <NEW_LINE> <INDENT> self.cedula = cedula <NEW_LINE> <DED... | Clase Persona
Atributos: cedula (int)
nombreCompleto (str)
telefono (int)
voto (int)
tipo (str) | 62598f740383005118f6cf9e |
class ChipClassificationLabelSource(LabelSource): <NEW_LINE> <INDENT> def __init__(self, label_source_config: 'ChipClassificationLabelSourceConfig', vector_source: 'VectorSource', class_config: 'ClassConfig', crs_transformer: 'CRSTransformer', extent: Optional[Box] = None, lazy: bool = False): <NEW_LINE> <INDENT> self.... | A source of chip classification labels.
Ideally the vector_source contains a square for each cell in the grid. But
in reality, it can be difficult to label imagery in such an exhaustive way.
So, this can also handle sources with non-overlapping polygons that
do not necessarily cover the entire extent. It infers the gr... | 62598f74ec188e330fdf813c |
class IForumsWorkspace(IForumFolder, IWorkspace): <NEW_LINE> <INDENT> pass | forums workspace | 62598f7430dc7b766599f0f9 |
class LumpNav2Test(ScriptedLoadableModuleTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> slicer.mrmlScene.Clear() <NEW_LINE> <DEDENT> def runTest(self): <NEW_LINE> <INDENT> self.setUp() <NEW_LINE> self.test_LumpNav21() <NEW_LINE> <DEDENT> def test_LumpNav21(self): <NEW_LINE> <INDENT> self.delayDisplay("... | This is the test case for your scripted module.
Uses ScriptedLoadableModuleTest base class, available at:
https://github.com/Slicer/Slicer/blob/master/Base/Python/slicer/ScriptedLoadableModule.py | 62598f74be383301e0253093 |
class TestMongoAggregation(TestMongoBase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super().setUp() <NEW_LINE> self.collection.insert([ {'type': 'A', 'val': 1}, {'type': 'A', 'val': 2}, {'type': 'A', 'val': 3}, {'type': 'B', 'val': 10}, {'type': 'B', 'val': -1}, {'type': 'C', 'val': 5} ]) <NEW_LINE> <DE... | Tests the aggregation operations on a MongoDB | 62598f74cad5886f8bdc4bbe |
class Server(BaseHTTPRequestHandler): <NEW_LINE> <INDENT> monitor = None <NEW_LINE> 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_HEAD(self): <NEW_LINE> <INDENT> self._set_heade... | Server that replies the Rx stats requested via HTTP | 62598f74d18da76e235b6d85 |
class Assignment(BaseAutoResultElement): <NEW_LINE> <INDENT> def __init__(self, connection): <NEW_LINE> <INDENT> BaseAutoResultElement.__init__(self, connection) <NEW_LINE> self.answers = [] <NEW_LINE> <DEDENT> def endElement(self, name, value, connection): <NEW_LINE> <INDENT> if name == 'Answer': <NEW_LINE> <INDENT> a... | Class to extract an Assignment structure from a response (used in ResultSet)
Will have attributes named as per the Developer Guide,
e.g. AssignmentId, WorkerId, HITId, Answer, etc | 62598f7450485f2cf55da80c |
class Repository(object): <NEW_LINE> <INDENT> def __init__(self, name, definition): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.url = definition.get("url") <NEW_LINE> self.branch = definition.get("branch", None) <NEW_LINE> self.notification_emails = definition.get("notification_emails") <NEW_LINE> self.app_id ... | A class representing a repository, read in from `repositories.yaml` | 62598f7491af0d3eaad396a8 |
class PerlTk(PerlPackage): <NEW_LINE> <INDENT> homepage = "https://metacpan.org/pod/distribution/Tk/Tk.pod" <NEW_LINE> url = "https://cpan.metacpan.org/authors/id/S/SR/SREZIC/Tk-804.035.tar.gz" <NEW_LINE> version('804.035', sha256='4d2b80291ba6de34d8ec886a085a6dbd2b790b926035a087e99025614c5ffdd4') <NEW_LINE> versi... | Interface to Tk Graphics Library | 62598f747c178a314d78cd43 |
class HekaDjangoClient(DjangoClient): <NEW_LINE> <INDENT> def is_enabled(self): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> def send(self, **kwargs): <NEW_LINE> <INDENT> return Client.send(self, **kwargs) <NEW_LINE> <DEDENT> def send_encoded(self, message, public_key=None, auth_header=None, **kwargs)... | This client simply overrides the send_encoded method in the base
Client so that we use settings.HEKA for transmission | 62598f74287bf620b6271455 |
class UpdatePwdView(View): <NEW_LINE> <INDENT> def post(self, request): <NEW_LINE> <INDENT> modify_form = ModifyPwdForm(request.POST) <NEW_LINE> if modify_form.is_valid(): <NEW_LINE> <INDENT> pwd1 = request.POST.get("password1", "") <NEW_LINE> pwd2 = request.POST.get("password2", "") <NEW_LINE> if pwd1 != pwd2: <NEW_LI... | 个人中心修改密码 | 62598f74a4f1c619b294de89 |
class BusquedaExcepcion(Exception): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return repr(self.value) | BusquedaExcepcion maneja las excepciones para la clase Busqueda
Como usar esta clase:
raise BusquedaExcepcion("Arreglo fuera de los limites") | 62598f74b57a9660fecd131d |
class XMLRPCAuthenticatedTests(XMLRPCTests): <NEW_LINE> <INDENT> user = b"username" <NEW_LINE> password = b"asecret" <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.p = reactor.listenTCP(0, server.Site(TestAuthHeader()), interface="127.0.0.1") <NEW_LINE> self.port = self.p.getHost().port <NEW_LINE> self.factories ... | Test with authenticated proxy. We run this with the same inout/ouput as
above. | 62598f7415baa72349461828 |
@register <NEW_LINE> class Breakpoint(BaseSchema): <NEW_LINE> <INDENT> __props__ = { "id": { "type": "integer", "description": "An optional unique identifier for the breakpoint." }, "verified": { "type": "boolean", "description": "If true breakpoint could be set (but not necessarily at the desired location)." }, "messa... | Information about a Breakpoint created in setBreakpoints or setFunctionBreakpoints.
Note: automatically generated code. Do not edit manually. | 62598f7407d97122c421653d |
class MetadataSchema(Schema): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super().__init__(**kwargs) <NEW_LINE> <DEDENT> root_folder_id = fields.Str() <NEW_LINE> shared_vpc_host_project = fields.Str() | Schema for Metadata Response. | 62598f7473bcbd0ca4bc9aeb |
class RedirectView(generic.RedirectView, View): <NEW_LINE> <INDENT> pass | Extends Django's RedirectView class with features from
daydreamer.views.generic.View. | 62598f74796e427e5384e034 |
class Pipeline(object): <NEW_LINE> <INDENT> def __init__(self, inputer, extractor, tokenizer, labeler, filterer, informer=None): <NEW_LINE> <INDENT> self.inputer = inputer <NEW_LINE> self.extractor = extractor <NEW_LINE> self.tokenizer = tokenizer <NEW_LINE> self.labeler = labeler <NEW_LINE> self.filterer = filterer <N... | Pipeline describes the process of importing a Corpus | 62598f7407d97122c421653e |
class Hand: <NEW_LINE> <INDENT> def __init__(self, label = ""): <NEW_LINE> <INDENT> self.label = label <NEW_LINE> self.cards = [] <NEW_LINE> <DEDENT> def add_card(self, card): <NEW_LINE> <INDENT> self.cards.append(card) <NEW_LINE> <DEDENT> def add_cards(self, cards): <NEW_LINE> <INDENT> for card in cards: <NEW_LINE> <I... | A labeled collection of cards usually held by a single player but could be used for other purposes. | 62598f74d99f1b3c44d04f55 |
class Parser: <NEW_LINE> <INDENT> def __init__(self, address): <NEW_LINE> <INDENT> with open(address, 'r') as f: <NEW_LINE> <INDENT> self.string = f.read().split("%%") <NEW_LINE> <DEDENT> self.entities = self.string[0].rstrip().lstrip() <NEW_LINE> self.potential = self.string[1].rstrip().lstrip() <NEW_LINE> self.mandat... | This class will generate the .colextpn file to create a coloured extented petri net
from the definitions given in the file at the address given as an argument for this file | 62598f7430c21e258be980a3 |
class ElectionMutations(graphene.ObjectType): <NEW_LINE> <INDENT> create_new_election_group = nodes.election_group.CreateNewElectionGroup.Field() <NEW_LINE> update_base_settings = nodes.election_group.UpdateBaseSettings.Field() <NEW_LINE> publish_election_group = nodes.election_group.PublishElectio... | Mutations container class | 62598f745e10d32532ce353c |
class _FullLoggedFunction( _LoggedFunction ): <NEW_LINE> <INDENT> _callTrace = getLog( 'OpenGL.calltrace' ) <NEW_LINE> def __call__( self, *args, **named ): <NEW_LINE> <INDENT> argRepr = [] <NEW_LINE> function = getattr( self, '' ) <NEW_LINE> for arg in args: <NEW_LINE> <INDENT> argRepr.append( repr(arg) ) <NEW_LINE> <... | Fully-logged function wrapper (logs all call params to OpenGL.calltrace) | 62598f7407d97122c421653f |
class OCSPValuesType (pyxb.binding.basis.complexTypeDefinition): <NEW_LINE> <INDENT> _TypeDefinition = None <NEW_LINE> _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY <NEW_LINE> _Abstract = False <NEW_LINE> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'OCSPValuesType') <NEW_LINE> _... | Complex type {http://uri.etsi.org/01903/v1.3.2#}OCSPValuesType with content type ELEMENT_ONLY | 62598f74a4f1c619b294de8b |
class ConfigServiceV2Stub(object): <NEW_LINE> <INDENT> def __init__(self, channel): <NEW_LINE> <INDENT> self.ListSinks = channel.unary_unary( '/google.logging.v2.ConfigServiceV2/ListSinks', request_serializer=google_dot_cloud_dot_proto_dot_logging_dot_v2_dot_logging__config__pb2.ListSinksRequest.SerializeToString, resp... | Service for configuring sinks used to export log entries outside of
Stackdriver Logging. | 62598f74be8e80087fbbe8fe |
class TestCountSheeps(unittest.TestCase): <NEW_LINE> <INDENT> def test_count_sheeps(self): <NEW_LINE> <INDENT> array1 = [True, True, True, False, True, True, True, True, True, False, True, False, True, False, False, True, True, True, True, True, False, False, True, True] <NEW_LINE> self.assertEqual(count_sheeps(array1)... | Class to test 'count_sheeps' function | 62598f741f037a2d8b9e398e |
class AddContactForm(Form): <NEW_LINE> <INDENT> name = StringField('Name:', validators=[InputRequired()]) <NEW_LINE> email = StringField('Email:', validators=[InputRequired()]) <NEW_LINE> phone = StringField('Phone:') <NEW_LINE> lead_source = SelectField('Lead Source', choices=[ ('', ''), ('Web Site', 'Web Site'), ('Ph... | Add a contact | 62598f74167d2b6e312b681c |
class MockLoraCacheExtended(MockLoraCache): <NEW_LINE> <INDENT> def populate_cache(self, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def calculate_derived_unit_data(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def calculate_primary_engagements(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @prop... | Mocks enough of `LoraCache` to test `AdLifeCycle` | 62598f740383005118f6cfa2 |
class SubnetAssociation(Model): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, } <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(SubnetAssociation, ... | Network interface and its custom security rules.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Subnet ID.
:vartype id: str
:param security_rules: Collection of custom security rules.
:type security_rules:
list[~azure.mgmt.network.v2018_04_01.models.SecurityRule] | 62598f74ec188e330fdf8140 |
class ActionEnum(Enum): <NEW_LINE> <INDENT> no_action = 1 <NEW_LINE> disable_interface = 2 <NEW_LINE> log = 3 <NEW_LINE> efd = 4 <NEW_LINE> @staticmethod <NEW_LINE> def _meta_info(): <NEW_LINE> <INDENT> from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_ethernet_link_oam_oper as meta <NEW_LINE> return meta._meta_t... | ActionEnum
Actions supported by an OAM interface
.. data:: no_action = 1
Disabled (do nothing)
.. data:: disable_interface = 2
Disable the interface
.. data:: log = 3
Log the event and do nothing else
.. data:: efd = 4
EFD the interface | 62598f74e76e3b2f99fd82cf |
class FloatTest(Test): <NEW_LINE> <INDENT> def __init__(self,tolerance=0.001): <NEW_LINE> <INDENT> self.tolerance = tolerance <NEW_LINE> self.test_set = [0] <NEW_LINE> self.test_set.extend([(10.0)**e for e in range(-40,41,2)]) <NEW_LINE> self.test_set.extend([-(10.0)**e for e in range(-40,41,2)]) <NEW_LINE> self.test_s... | Class for testing float ping pong. | 62598f740a366e3fb87dc268 |
class ann1svm_diagnoser(a_star_frame): <NEW_LINE> <INDENT> def __init__(self, p0=0.99): <NEW_LINE> <INDENT> super(ann1svm_diagnoser, self).__init__() <NEW_LINE> self.obs = None <NEW_LINE> self.svm = None <NEW_LINE> self.p0 = p0 <NEW_LINE> <DEDENT> def load_svm(self, file): <NEW_LINE> <INDENT> self.svm = jo... | search diagnosis using 1svm as the likelihood estimator | 62598f747c178a314d78cd46 |
class HungryAnt(Ant): <NEW_LINE> <INDENT> name = 'Hungry' <NEW_LINE> food_cost = 4 <NEW_LINE> time_to_digest = 3 <NEW_LINE> implemented = False <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> Ant.__init__(self) <NEW_LINE> self.digesting = 0 <NEW_LINE> <DEDENT> def eat_bee(self, bee): <NEW_LINE> <INDENT> bee.reduce_a... | HungryAnt will take three turns to digest a Bee in its place.
While digesting, the HungryAnt can't eat another Bee. | 62598f7491af0d3eaad396ac |
class UserSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> offer_rides = serializers.PrimaryKeyRelatedField( many=True, queryset=OfferRides.objects.all()) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = User <NEW_LINE> fields = ( 'id', 'username', 'offer_rides',) | Class UserSerializer serializer | 62598f74d99f1b3c44d04f57 |
class Solution: <NEW_LINE> <INDENT> def singleNumber(self, A): <NEW_LINE> <INDENT> return reduce(lambda x, y: x ^ y, A) if A != [] else 0 | @param A : an integer array
@return : a integer | 62598f7423e79379d538bd98 |
class MenuItemFormItem(BaseModel): <NEW_LINE> <INDENT> type: MenuItemType = Schema( ..., description='Indicates the type of the object' ) <NEW_LINE> description: str = Schema( ..., description='The description for this `MenuItemFormItem`') <NEW_LINE> value: str = Schema( None, description='The value for this `MenuItemF... | [`FormItem`](#formitem) related component used to display menu items,
selectable or raw | 62598f7466673b3332c2fc61 |
class jchatbot(cmd.Cmd): <NEW_LINE> <INDENT> version = Configurations.app_version <NEW_LINE> if Configurations.elasticsearch_checkonstartup: <NEW_LINE> <INDENT> intro = "Welcome to JD's chatbot ... version 0.2 [cmdLine version]... \n\n" "Connected to backend v1 => ES ( {} ) and Lucene ( {} )".format( es(... | JDs Chat BOT | 62598f744d74a7450cd58b2a |
class CEMOptimizer: <NEW_LINE> <INDENT> def __init__(self, num_cem, cem_elite, cem_iter, action_size, bounds, device, **kwargs): <NEW_LINE> <INDENT> self.pop_size = num_cem <NEW_LINE> self.elite = cem_elite <NEW_LINE> self.iters = cem_iter <NEW_LINE> self.action_size = action_size <NEW_LINE> self.bounds = bounds <NEW_L... | Implements the cross entropy method.
The main input when calling is the network. We assume that the network
has the following components:
* state_net: Computes a hidden representation from an image
* action_net: Computes a hidden representation from an action
* qnet: Computes an output q value from hidden states & ac... | 62598f7463f4b57ef00859bf |
class Version2VHDIFileTest(test_lib.Ext2ImageFileTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(Version2VHDIFileTest, self).setUp() <NEW_LINE> test_path = self._GetTestFilePath(['ext2.vhdx']) <NEW_LINE> self._SkipIfPathNotExists(test_path) <NEW_LINE> self._os_path_spec = path_spec_factory.Fac... | Tests the VHDI file-like object on a VHDX image file. | 62598f74287bf620b6271459 |
class DebianRadius(radius, DebianPlugin, UbuntuPlugin): <NEW_LINE> <INDENT> files = ('/etc/freeradius',) <NEW_LINE> def setup(self): <NEW_LINE> <INDENT> super(DebianRadius, self).setup() <NEW_LINE> self.add_copy_specs(["/etc/freeradius", "/etc/pam.d/radiusd", "/etc/default/freeradius", "/var/log/freeradius"]) | radius related information on Debian distributions
| 62598f74b57a9660fecd1320 |
class DuplicateError(Error): <NEW_LINE> <INDENT> def __init__(self, expression, message): <NEW_LINE> <INDENT> self.expression = expression <NEW_LINE> self.message = message | Exception raised for errors in the input.
Attributes:
expression -- input expression in which the error occurred
message -- explanation of the error | 62598f74b830903b9686e0c3 |
class IteratorCaseFilter(object): <NEW_LINE> <INDENT> implements(ICaseFilter) <NEW_LINE> def __init__(self, iterator): <NEW_LINE> <INDENT> self._iterator = iterator <NEW_LINE> self._current = None <NEW_LINE> self._next() <NEW_LINE> <DEDENT> def select(self, seqno, case): <NEW_LINE> <INDENT> if self._current is None: <N... | Select based on an iterator of case numbers.
iterator: iterator
Provides case numbers, assumed to be in increasing order. | 62598f74b57a9660fecd1321 |
class UserChangeForm(forms.ModelForm): <NEW_LINE> <INDENT> password = ReadOnlyPasswordHashField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = User <NEW_LINE> fields = ('username', 'email', 'password', 'first_name', 'last_name', 'is_active', 'is_admin', 'is_staff', 'notify_activity') <NEW_LINE> <DEDENT> def clean... | A form for updating users. Includes all the fields on
the user, but replaces the password field with admin_disable
password hash display field. | 62598f74d53ae8145f917d38 |
class TestFrequency(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 testFrequency(self): <NEW_LINE> <INDENT> pass | Frequency unit test stubs | 62598f741f037a2d8b9e3990 |
class ProjectImage(models.Model): <NEW_LINE> <INDENT> project = models.ForeignKey(Project, related_name='images', on_delete=models.CASCADE) <NEW_LINE> image = models.ImageField(verbose_name="Imagen", upload_to=upload_location, null=True, blank=True) <NEW_LINE> comments = models.CharField(verbose_name="Título", max_leng... | Images tied to a project | 62598f74796e427e5384e038 |
class path_entry(PropertyGroup): <NEW_LINE> <INDENT> objectName = StringProperty(name="Object Name") <NEW_LINE> radius = FloatProperty(name="Radius", min=0) <NEW_LINE> mode = EnumProperty(name="Mode", items=[("bidirectional", "Bidirectional", "", 1), ("road", "Road", "", 2), ("directional", "Directional", "", 3)]) <NEW... | For storing a single path | 62598f7423e79379d538bd99 |
class AddPresetCamera(AddPresetBase, Operator): <NEW_LINE> <INDENT> bl_idname = "camera.preset_add" <NEW_LINE> bl_label = "Add Camera Preset" <NEW_LINE> preset_menu = "CAMERA_PT_presets" <NEW_LINE> preset_defines = [ "cam = bpy.context.camera" ] <NEW_LINE> preset_subdir = "camera" <NEW_LINE> use_focal_length: BoolPrope... | Add or remove a Camera Preset | 62598f7450485f2cf55da812 |
class PlacemarkIndexer(PhraseSearchIndexer): <NEW_LINE> <INDENT> _SPLIT_CHARS = re.compile("[^a-z0-9 ]") <NEW_LINE> def Index(self, col, value): <NEW_LINE> <INDENT> places = value._asdict().values() <NEW_LINE> places.reverse() <NEW_LINE> return super(PlacemarkIndexer, self).Index(col, ' '.join(places)) <NEW_LINE> <DEDE... | An indexer class which emits index terms for each hierarchical
name in a placemark structure.
Phrase searching is supported by reversing the placemark names from
least to most specific (so "Paris, France" and "New York, NY" work
properly).
TODO(spencer): provide an additional mechanism for searching
specifically for ... | 62598f74c432627299fa287a |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.