code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class Food(Sprite): <NEW_LINE> <INDENT> def __init__(self, ai_settings, screen, food_str): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.screen = screen <NEW_LINE> self.ai_settings = ai_settings <NEW_LINE> self.food_str = food_str <NEW_LINE> self.text_color = (255, 30, 30) <NEW_LINE> self.font = pygame.font.Sy...
表示单个食物的类
62598fc9ad47b63b2c5a7bd0
class AdminAuthenticationForm(AuthenticationForm): <NEW_LINE> <INDENT> this_is_the_login_form = django.forms.BooleanField(widget=floppyforms.HiddenInput, initial=1, error_messages={'required': ugettext_lazy("Please log in again, because your session has expired.")}) <NEW_LINE> def clean(self): <NEW_LINE> <INDENT> usern...
A custom authentication form used in the admin app. Liberally copied from django.contrib.admin.forms.AdminAuthenticationForm
62598fc997e22403b383b27b
class StubServer(UserAccountMixin, asyncssh.SSHServer): <NEW_LINE> <INDENT> def connection_made(self, conn: asyncssh.SSHServerConnection) -> None: <NEW_LINE> <INDENT> print("SSH connection received from %s." % conn.get_extra_info("peername")[0]) <NEW_LINE> <DEDENT> def connection_lost(self, exc: typing.Union[None, Exce...
SFTP server interface based on asyncssh.SSHServer.
62598fc9ec188e330fdf8c0c
class install(distutils_install): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> distutils_install.run(self) <NEW_LINE> print('') <NEW_LINE> print(bcolors.HEADER + 'License' + bcolors.ENDC) <NEW_LINE> print('') <NEW_LINE> print("Wirecloud is licensed under a AGPLv3+ license with a classpath-like exception \n" +...
Customized setuptools install command - prints info about the license of Wirecloud after installing it.
62598fca167d2b6e312b72ee
class tr: <NEW_LINE> <INDENT> def __init__(self, transform): <NEW_LINE> <INDENT> self.tr = transform <NEW_LINE> <DEDENT> def __ror__(self, input): <NEW_LINE> <INDENT> return map(self.tr, input)
apply arbitrary transform to each sequence element
62598fcacc40096d6161a393
@dataclass(frozen=True) <NEW_LINE> class RangeLiteral: <NEW_LINE> <INDENT> start: Optional[int] = None <NEW_LINE> end: Optional[int] = None <NEW_LINE> def __str__(self) -> str: <NEW_LINE> <INDENT> if self.start is None: <NEW_LINE> <INDENT> return "*" <NEW_LINE> <DEDENT> elif self.end is None: <NEW_LINE> <INDENT> return...
RangeLiteral = '*', [SP], [IntegerLiteral, [SP]], ['..', [SP], [IntegerLiteral, [SP]]] ;
62598fca099cdd3c6367559d
class RelengPackageExtensionInterface(RelengExtensionInterface): <NEW_LINE> <INDENT> def build(self, name, opts): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def configure(self, name, opts): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def install(self, name, opts): <NEW_LINE> <INDENT> return False
interface to implement a custom fetch-type Extensions wishing to define a custom fetch type can implement this interface and register it (see ``add_fetch_type``) during the extension's setup stage. This will allow an project support custom VCS-types defined in package definitions (for example "<PKG>_VCS_TYPE='ext-myaw...
62598fca283ffb24f3cf3bfc
class IncrementalCorrelationFilterThinWrapper(object): <NEW_LINE> <INDENT> def __init__(self, cf_callable=mccf, icf_callable=imccf): <NEW_LINE> <INDENT> self.cf_callable = cf_callable <NEW_LINE> self.icf_callable = icf_callable <NEW_LINE> <DEDENT> def increment(self, A, B, n_x, Z, t): <NEW_LINE> <INDENT> if isinstance(...
Wrapper class for defining an Incremental Correlation Filter. Parameters ---------- cf_callable : `callable`, optional The correlation filter function. Possible options are: ============ =========================================== Class Method ============ ======================================...
62598fca26068e7796d4ccd3
class TndAsyncTestResource(TndBaseTestResource): <NEW_LINE> <INDENT> @gen.coroutine <NEW_LINE> def list(self): <NEW_LINE> <INDENT> raise gen.Return(self.fake_db) <NEW_LINE> <DEDENT> @gen.coroutine <NEW_LINE> def detail(self, pk): <NEW_LINE> <INDENT> for item in self.fake_db: <NEW_LINE> <INDENT> if item['id'] == int(pk)...
asynchronous basic view_method
62598fca091ae35668704fa1
class DnsLogView(LogView): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> config = mmc.plugins.network.NetworkConfig("network") <NEW_LINE> self.logfile = config.dnsLogFile <NEW_LINE> self.maxElt= 200 <NEW_LINE> self.file = open(self.logfile, 'r') <NEW_LINE> if config.dnsType == "pdns": <NEW_LINE> <INDENT> ...
Get DNS service log content.
62598fca377c676e912f6f32
class ClientException(CallofDutyException): <NEW_LINE> <INDENT> pass
Exception which is thrown when an operation in the Client class fails.
62598fcad486a94d0ba2c34a
class BagStandardizer(BagPreprocesser): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(BagStandardizer, self).__init__(StandardScaler())
Standardizes each feature dimension to have zero mean and unit variance, regardless of the bag it falls into. This is just :class:`BagPreprocesser` with :class:`sklearn.preprocessing.StandardScaler`.
62598fca71ff763f4b5e7af9
class RouteRedirect(Route): <NEW_LINE> <INDENT> target = models.ForeignKey('routes.Route', related_name='+') <NEW_LINE> permanent = models.BooleanField(default=False) <NEW_LINE> view = views.RouteRedirectView.as_view() <NEW_LINE> def clean(self): <NEW_LINE> <INDENT> if self.target_id == self.route_ptr_id: <NEW_LINE> <I...
When `route` is browsed to, browser should be redirected to `target`. This model holds the data required to make that connection.
62598fca091ae35668704fa2
class Test_Console(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.mock_stdin = create_autospec(sys.stdin) <NEW_LINE> self.mock_stdout = create_autospec(sys.stdout) <NEW_LINE> <DEDENT> def create(self, server=None): <NEW_LINE> <INDENT> return HBNBCommand(stdin=self.mock_stdin, stdout=s...
Console Unittest
62598fcaad47b63b2c5a7bd4
class StructuredValue(Intangible): <NEW_LINE> <INDENT> pass
Structured values are strings - for example, addresses - that have certain constraints on their structure.
62598fca283ffb24f3cf3bff
class ConsecutiveHyperlinkedField(serializers.HyperlinkedIdentityField): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.lookup_fields = kwargs.pop('lookup_fields', None) <NEW_LINE> super(ConsecutiveHyperlinkedField, self).__init__(*args, **kwargs) <NEW_LINE> <DEDENT> @staticmethod <NE...
Inheritor of serializers.HyperlinkedIdentityField serializer that allows to define a tuple of lookup fields, where field can be dot-notated string.
62598fca0fa83653e46f5261
class Account(DefaultAccount): <NEW_LINE> <INDENT> def get_absolute_url(self): <NEW_LINE> <INDENT> from django.core.urlresolvers import reverse <NEW_LINE> return reverse('character:sheet', kwargs={'object_id': self.id}) <NEW_LINE> <DEDENT> def last_puppet(self): <NEW_LINE> <INDENT> return self.db._last_puppet
This class describes the actual OOC account (i.e. the user connecting to the MUD). It does NOT have visual appearance in the game world (that is handled by the character which is connected to this). Comm channels are attended/joined using this object. It can be useful e.g. for storing configuration options for your ga...
62598fcaa219f33f346c6b83
class PosetType(ABC): <NEW_LINE> <INDENT> def __init__(self, entity_universe_type='label'): <NEW_LINE> <INDENT> self.entity_universe_type = entity_universe_type <NEW_LINE> <DEDENT> def get_params(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def set_params(self): <NEW_LINE> <INDENT> pass
Abstract class for PosetType Used by models and data containers to query what kind of Poset is being fed in. Parameters: ------------ entity_universe_type: str "label": all potential entities in the universe are known "object": an entity is observed at most once "semi": "object" except entities can reoccur
62598fca3617ad0b5ee064c3
class NameValidator(BaseValidator): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(NameValidator, self).__init__() <NEW_LINE> <DEDENT> def check(self, parent): <NEW_LINE> <INDENT> control = self.GetWindow() <NEW_LINE> newName = control.GetValue() <NEW_LINE> msg, OK = '', True <NEW_LINE> if newName ==...
Validation checks if the value in Name field is a valid Python identifier and if it does not clash with existing names.
62598fcad8ef3951e32c8019
class NaturalLanguageProcessing(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.stop_words = set(stopwords.words('english')) <NEW_LINE> self.labeled_names = ([(name, 'male') for name in names.words('male.txt')] + [(name, 'female') for name in names.words('female.txt')]) <NEW_LINE> random.shuff...
docstring for Nlp.
62598fca656771135c4899ec
class AlfabetMusic(Resource): <NEW_LINE> <INDENT> def get(self, artista): <NEW_LINE> <INDENT> artista = remover_acentos_char_especiais(artista) <NEW_LINE> if not vagalume.request(artista, ''): <NEW_LINE> <INDENT> sys.exit(2) <NEW_LINE> <DEDENT> top_musicas, alfabet_musicas = vagalume.search(artista) <NEW_LINE> return {...
Recurso para listar todas as musicas de um artista
62598fca3d592f4c4edbb22f
class Event(models.Model): <NEW_LINE> <INDENT> __package__ = 'UML.CommonBehavior' <NEW_LINE> packageable_element = models.OneToOneField('PackageableElement', on_delete=models.CASCADE, primary_key=True)
An Event is the specification of some occurrence that may potentially trigger effects by an object.
62598fca283ffb24f3cf3c02
class KeyImportParameters(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'key': {'required': True}, } <NEW_LINE> _attribute_map = { 'hsm': {'key': 'Hsm', 'type': 'bool'}, 'key': {'key': 'key', 'type': 'JsonWebKey'}, 'key_attributes': {'key': 'attributes', 'type': 'KeyAttributes'}, 'tags': {'key': 'tag...
The key import parameters. All required parameters must be populated in order to send to Azure. :param hsm: Whether to import as a hardware key (HSM) or software key. :type hsm: bool :param key: Required. The Json web key. :type key: ~azure.keyvault.v7_1.models.JsonWebKey :param key_attributes: The key management att...
62598fca23849d37ff85142f
class Tag(object): <NEW_LINE> <INDENT> def __init__(self, tree=MerkleTree(), chunksz=DEFAULT_CHUNK_SIZE, filesz=None): <NEW_LINE> <INDENT> self.tree = tree <NEW_LINE> self.chunksz = chunksz <NEW_LINE> self.filesz = filesz <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return (isinstance(other, Tag) an...
The Tag class represents the file tag that is a stripped merkle tree, that is a merkle tree without the leaves, which are the seeded hashes of each chunk. it also includes the chunk size used for breaking up the file
62598fcaa05bb46b3848abe9
class Worker(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, tasks, results): <NEW_LINE> <INDENT> super(Worker, self).__init__() <NEW_LINE> self.tasks = tasks <NEW_LINE> self.results = results <NEW_LINE> self.services = {} <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> while 1: <NEW_LINE> <INDENT> res...
Consume tasks and put the result in the queue
62598fca63b5f9789fe854f3
class IPaddress(models.Model): <NEW_LINE> <INDENT> ip_address = models.GenericIPAddressField(max_length=50, verbose_name='IP address', help_text=ugettext_lazy('IP address which is issued to a customer by a Remote Access Server.')) <NEW_LINE> ras = models.ForeignKey(RAS, verbose_name='Remote Access Server', help_text=ug...
IPaddress Class : IP addresses which Remote Access Servers can issue a IP address can be assigned to a customer
62598fca091ae35668704fa6
class CommandBase(Request): <NEW_LINE> <INDENT> is_command = True <NEW_LINE> _non_matched_attrs = Request._non_matched_attrs + ('command_name',) <NEW_LINE> @property <NEW_LINE> def command_name(self): <NEW_LINE> <INDENT> if self.docs and self.docs[0]: <NEW_LINE> <INDENT> return list(self.docs[0])[0] <NEW_LINE> <DEDENT>...
A command the client executes on the server.
62598fcaff9c53063f51a9ca
class Student: <NEW_LINE> <INDENT> def __init__(self, first_name, last_name, age): <NEW_LINE> <INDENT> self.first_name = first_name <NEW_LINE> self.last_name = last_name <NEW_LINE> self.age = age <NEW_LINE> <DEDENT> def to_json(self, attrs=None): <NEW_LINE> <INDENT> if attrs is None: <NEW_LINE> <INDENT> return self.__d...
defines class Student
62598fcad8ef3951e32c801a
class HasCachedMethods(object): <NEW_LINE> <INDENT> def __init__(self, method_cache=None): <NEW_LINE> <INDENT> self._method_cache = method_cache or {} <NEW_LINE> <DEDENT> @property <NEW_LINE> def _method_cache_info(self): <NEW_LINE> <INDENT> cached_info = OrderedDict() <NEW_LINE> for k, v in self.__class__.__dict__.ite...
Provides convenience methods for working with :class:`cachedmethod`.
62598fcabf627c535bcb1828
class Measure(Thing): <NEW_LINE> <INDENT> def __init__(self, sensor_id, unit, medium=None, observation_type=None, description=None, id=None, material_properties=None, value_properties=None, on_index=False, outdoor=False, associated_locations=None, method=None, external_id=None, set_point=False, ambient=None): <NEW_LINE...
Measure description
62598fca4527f215b58ea24d
class NoteBooksTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def test_option_quotes(self): <NEW_LINE> <INDENT> option_data_frame = pandas.core.common.load( './quantlib/test/data/df_SPX_24jan2011.pkl' ) <NEW_LINE> df_final = Compute_IV( option_data_frame, tMin=0.5/12, nMin=6, QDMin=.2, QDMax=.8 ) <NEW_LINE> print('Nu...
Test some functions used in notebooks. Mostly useful to test stability of pandas API
62598fcadc8b845886d5393a
class Module_six_moves_urllib_robotparser(_LazyModule): <NEW_LINE> <INDENT> pass
Lazy loading of moved objects in scapy.modules.six.urllib_robotparser
62598fcaa219f33f346c6b87
class TableEntryWidget(urwid.AttrMap): <NEW_LINE> <INDENT> _text = None <NEW_LINE> signals = ["activate"] <NEW_LINE> def __init__(self, title): <NEW_LINE> <INDENT> self._text = SelectableText(title) <NEW_LINE> super(TableEntryWidget, self).__init__(self._text, 'table.entry', 'table.entry:focus') <NEW_LINE> <DEDENT> def...
An entry in a table
62598fca283ffb24f3cf3c04
class Piece: <NEW_LINE> <INDENT> def __init__(self, name, pos=0): <NEW_LINE> <INDENT> self.pos = pos <NEW_LINE> self.name = name <NEW_LINE> self.locations = [] <NEW_LINE> self.jail = False <NEW_LINE> self.jail_try = 0 <NEW_LINE> self.jail_free = False <NEW_LINE> <DEDENT> def move(self): <NEW_LINE> <INDENT> d1, d2 = sel...
Each instance of this class is a piece in the game. The class takes a name and an initial starting point as arguments.
62598fcacc40096d6161a397
class Config(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> _here = os.path.dirname(__file__) <NEW_LINE> sys.path.insert(0, os.path.abspath(os.path.join(_here, "..", ".."))) <NEW_LINE> sys.path.insert(0, os.path.abspath(os.path.join(_here))) <NEW_LINE> self.demo_root = os.path.abspath(os.path.join...
Configuration variables for this test suite This creates a variable named CONFIG (${CONFIG} when included in a test as a variable file. Example: *** Settings *** | Variable | ../resources/config.py *** Test Cases *** | Example | | log | username: ${CONFIG}.username | | log | root url: ${CONFIG}.root_url
62598fca4428ac0f6e6588a6
class VtTradeData(VtBaseData): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(VtTradeData, self).__init__() <NEW_LINE> self.symbol = EMPTY_STRING <NEW_LINE> self.exchange = EMPTY_STRING <NEW_LINE> self.vtSymbol = EMPTY_STRING <NEW_LINE> self.tradeID = EMPTY_STRING <NEW_LINE> self.vtTradeID = EMPTY_ST...
成交数据类
62598fca851cf427c66b8633
class CompoundHeaderLine(HeaderLine): <NEW_LINE> <INDENT> def __init__(self, key, value, mapping): <NEW_LINE> <INDENT> super().__init__(key, value) <NEW_LINE> self.mapping = OrderedDict(mapping.items()) <NEW_LINE> if "Number" not in self.mapping: <NEW_LINE> <INDENT> warnings.warn( '[vcfpy] WARNING: missing number, usin...
Base class for compound header lines, currently format and header lines Compound header lines describe fields that can have more than one entry. Don't use this class directly but rather the sub classes.
62598fca4c3428357761a63d
class UplinkStatusPropagationExtensionTestPlugin( db_base_plugin_v2.NeutronDbPluginV2, usp_db.UplinkStatusPropagationMixin): <NEW_LINE> <INDENT> supported_extension_aliases = [apidef.ALIAS] <NEW_LINE> @staticmethod <NEW_LINE> @resource_extend.extends([apidef.COLLECTION_NAME]) <NEW_LINE> def _extend_network_project_defa...
Test plugin to mixin the uplink status propagation extension.
62598fcaaad79263cf42eb4e
class VuetifyCompletions(sublime_plugin.EventListener): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.color_class_completions = [ ("%s \tColor class - Vuetify" % s, s) for s in color_classes] <NEW_LINE> <DEDENT> def on_query_completions(self, view, prefix, locations): <NEW_LINE> <INDENT> if view.matc...
Provide tag completions for Vuetify elements and v-{component} attributes
62598fcad486a94d0ba2c352
class TextFile(Stream): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self._name = None <NEW_LINE> self.name = name <NEW_LINE> file_handle = open(name, 'at') <NEW_LINE> Stream.__init__(self, file_handle) <NEW_LINE> <DEDENT> def __del__(self): <NEW_LINE> <INDENT> self.stream.close() <NEW_LINE> <DEDEN...
Destination to flush metrics to a file
62598fca0fa83653e46f5267
class DNTFile(object): <NEW_LINE> <INDENT> def __init__(self, filename): <NEW_LINE> <INDENT> self.filename = filename <NEW_LINE> self.columns = [] <NEW_LINE> self.Row = None <NEW_LINE> self.rows = [] <NEW_LINE> <DEDENT> def read_all(self): <NEW_LINE> <INDENT> self.parse_header() <NEW_LINE> with open(self.filename, 'rb'...
Object for reading/writing DragonNest DNT files.
62598fcabf627c535bcb182a
class DrawerDriver(): <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> def __init__(self, scale=1., options=None): <NEW_LINE> <INDENT> if options is None: <NEW_LINE> <INDENT> self._options = self.get_default_options(scale) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self._options = options <NEW_LINE> <DEDENT> <...
ABC for drawer drivers. This class defines an interface for "drawer drivers" which take care of the low level details of drawing the world, on behalf of the :class:`arboris.visu.Drawer` class.
62598fcaab23a570cc2d4f2e
class DeploymentScriptsError(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'error': {'key': 'error', 'type': 'ErrorResponse'}, } <NEW_LINE> def __init__( self, *, error: Optional["ErrorResponse"] = None, **kwargs ): <NEW_LINE> <INDENT> super(DeploymentScriptsError, self).__init__(**kwargs) <NEW_LI...
Deployment scripts error response. :ivar error: Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). :vartype error: ~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ErrorResponse
62598fca4527f215b58ea24f
class Color(String): <NEW_LINE> <INDENT> pass
Color type user interface A subclass of `qargparse.String`, not production ready.
62598fcaaad79263cf42eb50
class Rescale(object): <NEW_LINE> <INDENT> def __init__(self,output_size): <NEW_LINE> <INDENT> assert isinstance(output_size, (int, tuple)) <NEW_LINE> self.output_size = output_size <NEW_LINE> <DEDENT> def __call__(self, sample): <NEW_LINE> <INDENT> image, landmarks = sample["image"], sample["landmarks"] <NEW_LINE> h, ...
Rescale the image into a given size Args: output_size (tuple or int): Desired output size. If tuple, output is matched to output_size. If int, smaller of image edges is matched to output_size keeping aspect ratio the same.
62598fca656771135c4899f2
class Variable(object): <NEW_LINE> <INDENT> distributions = {'Normal': pyro.distributions.Normal, 'Binomial': pyro.distributions.Binomial, 'Exponential': pyro.distributions.Exponential, 'fixed': 0} <NEW_LINE> def __init__(self, internal, name, dist, param): <N...
Class to define a variable that is part of the psychological process. Wrapper around pyro.distribution object for easier interface.
62598fcad486a94d0ba2c354
class UTS: <NEW_LINE> <INDENT> BINARY_TYPE = ResourceType.UTS <NEW_LINE> def __init__( self ): <NEW_LINE> <INDENT> self.resref: ResRef = ResRef.from_blank() <NEW_LINE> self.tag: str = "" <NEW_LINE> self.comment: str = "" <NEW_LINE> self.active: bool = False <NEW_LINE> self.continuous: bool = False <NEW_LINE> self.loopi...
Stores sound data. Attributes: tag: "Tag" field. resref: "TemplateResRef" field. active: "Active" field. continuous: "Continuous" field. looping: "Looping" field. positional: "Positional" field. random_position: "RandomPosition" field. random_pick: "Random" field. elevation: "Elevat...
62598fca956e5f7376df583f
class TableDescStats(BaseGenTableTest): <NEW_LINE> <INDENT> def runTest(self): <NEW_LINE> <INDENT> entries = self.do_table_desc_stats() <NEW_LINE> seen = set() <NEW_LINE> for entry in entries: <NEW_LINE> <INDENT> logging.debug(entry.show()) <NEW_LINE> self.assertNotIn(entry.table_id, seen) <NEW_LINE> self.assertNotIn(e...
Test retrieving table desc stats
62598fca23849d37ff851435
class IC_7400(Base_14pin): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.pins = [ None, 0, 0, None, 0, 0, None, 0, None, 0, 0, None, 0, 0, 0] <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> output = {} <NEW_LINE> output[3] = NAND(self.pins[1], self.pins[2]).output() <NEW_LINE> output[6] = NAND...
This is a QUAD 2 INPUT NAND gate IC Pin Configuration: Pin Number Description 1 A Input Gate 1 2 B Input Gate 1 3 Y Output Gate 1 4 A Input Gate 2 5 B Input Gate 2 6 Y Output Gate 2 7 Ground 8 Y Output Gate 3 9 B Input Gate 3 10 A Input Gate 3 11 Y Outpu...
62598fca5fdd1c0f98e5e30f
class ParseError(Exception): <NEW_LINE> <INDENT> pass
Exception raised when parsing fails
62598fca091ae35668704fad
class SLJ(Pair): <NEW_LINE> <INDENT> _cpp_class_name = 'PotentialPairSLJ' <NEW_LINE> def __init__(self, nlist, default_r_cut=None, default_r_on=0., mode='none'): <NEW_LINE> <INDENT> if mode == 'xplor': <NEW_LINE> <INDENT> raise ValueError("xplor is not a valid mode for SLJ potential") <NEW_LINE> <DEDENT> super().__init...
Shifted Lennard-Jones pair potential. Args: nlist (`hoomd.md.nlist.NList`): Neighbor list. default_r_cut (float): Default cutoff radius :math:`[\mathrm{length}]`. default_r_on (float): Default turn-on radius :math:`[\mathrm{length}]`. mode (str): Energy shifting mode. `SLJ` specifies that a shifted Le...
62598fcafbf16365ca79443d
class Mutation: <NEW_LINE> <INDENT> def __init__(self, childs, probability): <NEW_LINE> <INDENT> self.childs = childs <NEW_LINE> self.probability = probability <NEW_LINE> <DEDENT> def perform(self): <NEW_LINE> <INDENT> for i, ind in enumerate(self.childs): <NEW_LINE> <INDENT> self.__mutate(i, ind) <NEW_LINE> <DEDENT> <...
Производит мутацию у потомков
62598fcaaad79263cf42eb52
class PageLinkComponent(core.LinkInline): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def defaultSettings(): <NEW_LINE> <INDENT> settings = core.LinkInline.defaultSettings() <NEW_LINE> settings['alternative'] = (None, "An alternative link to use when the file doesn't exist.") <NEW_LINE> settings['optional'] = (False, ...
Creates correct link when *.md files is provide, modal links when a source files is given, otherwise a core.Link token.
62598fca7c178a314d78d823
class JsonWidgetExportImportHandler(WidgetExportImportHandler): <NEW_LINE> <INDENT> def __init__(self, attributes): <NEW_LINE> <INDENT> self.attributes = attributes <NEW_LINE> <DEDENT> def read(self, widget_node, params): <NEW_LINE> <INDENT> child_nodes = dict( (noNS(c.tag), c.text.strip()) for c in widget_node.iterchi...
plone.autoform widget attributes handler. May be given an arbitrary amount of attributes used on a widget, together with the expected type. The values are then parsed and stored as JSON. For example, the following xml... <field name="birthday" type="zope.schema.Date"> <form:widget type="plone.formwidget.datetime.z...
62598fca283ffb24f3cf3c09
class TestDirectoryDomainListResults(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 testDirectoryDomainListResults(self): <NEW_LINE> <INDENT> pass
DirectoryDomainListResults unit test stubs
62598fcaec188e330fdf8c1a
class RunningMax(Peak): <NEW_LINE> <INDENT> __documentation_section__ = 'Trigger Utility UGens' <NEW_LINE> __slots__ = () <NEW_LINE> _ordered_input_names = ( 'source', 'trigger', ) <NEW_LINE> _valid_calculation_rates = None <NEW_LINE> def __init__( self, calculation_rate=None, source=None, trigger=0, ): <NEW_LINE> <IND...
Tracks maximum signal amplitude. :: >>> source = ugentools.In.ar(0) >>> trigger = ugentools.Impulse.kr(1) >>> running_max = ugentools.RunningMax.ar( ... source=source, ... trigger=0, ... ) >>> running_max RunningMax.ar()
62598fca956e5f7376df5840
class DashIOAdvertisement(dbus.service.Object): <NEW_LINE> <INDENT> PATH_BASE = "/org/bluez/example/advertisement" <NEW_LINE> def __init__(self, index, service_uuid): <NEW_LINE> <INDENT> self.path = self.PATH_BASE + str(index) <NEW_LINE> self.bus = dbus.SystemBus() <NEW_LINE> self.service_uuids = [] <NEW_LINE> self.ser...
BLE Advertisement
62598fca60cbc95b063646c2
class HaVipDisassociateAddressIpRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.HaVipId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.HaVipId = params.get("HaVipId")
HaVipDisassociateAddressIp request structure.
62598fcacc40096d6161a39a
class SetGeometryType(Operator): <NEW_LINE> <INDENT> bl_idname = "phobos.define_geometry" <NEW_LINE> bl_label = "Define Geometry" <NEW_LINE> bl_options = {'UNDO'} <NEW_LINE> geomType : EnumProperty( items=defs.geometrytypes, name="Type", default="box", description="Phobos geometry type" ) <NEW_LINE> def execute(self, c...
Edit geometry type of selected object(s)
62598fca71ff763f4b5e7b05
class AuthorizerFunc(Authorizer): <NEW_LINE> <INDENT> def __init__(self, f): <NEW_LINE> <INDENT> self._f = f <NEW_LINE> <DEDENT> def authorize(self, ctx, identity, ops): <NEW_LINE> <INDENT> allowed = [] <NEW_LINE> caveats = [] <NEW_LINE> for op in ops: <NEW_LINE> <INDENT> ok, fcaveats = self._f(ctx, identity, op) <NEW_...
Implements a simplified version of Authorizer that operates on a single operation at a time.
62598fca091ae35668704fae
class NbAbandon(Donnee): <NEW_LINE> <INDENT> cle = "nb_abandon" <NEW_LINE> expression = Donnee.compiler(r"^([0-9]+) matelots minimum$") <NEW_LINE> def __init__(self, nombre=1): <NEW_LINE> <INDENT> Donnee.__init__(self) <NEW_LINE> self.nombre = nombre <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "No...
Classe définissant la donnée de configuration 'nb_abandon'. Cette donnée de configuration permet de configurer le nombre minimum de matelots avant que l'équipage se rende. Si cette donnée est à 5 et qu'il ne reste plus que 5 matelots dans l'équipage, alors l'équipage se rend.
62598fca5fc7496912d4843c
class MachineSpecs(Base): <NEW_LINE> <INDENT> _def_cpu_cnt = {'workstation': 1, 'blade': 2, 'rackmount': 4} <NEW_LINE> _def_nic_cnt = {'workstation': 1, 'blade': 2, 'rackmount': 2} <NEW_LINE> _def_memory = {'workstation': 2048, 'blade': 8192, 'rackmount': 16384} <NEW_LINE> __tablename__ = 'machine_specs' <NEW_LINE> id ...
Captures the configuration hardware components for a given model
62598fcad8ef3951e32c801e
class Solution: <NEW_LINE> <INDENT> def sortedListToBST(self, head): <NEW_LINE> <INDENT> num = [] <NEW_LINE> while head: <NEW_LINE> <INDENT> num.append(head.val) <NEW_LINE> head = head.next <NEW_LINE> <DEDENT> return self.sortedArrayToBST(num) <NEW_LINE> <DEDENT> def sortedArrayToBST(self, num): <NEW_LINE> <INDENT> n =...
@see https://oj.leetcode.com/problems/convert-sorted-list-to-binary-search-tree/
62598fcad486a94d0ba2c358
class AbstractSyncPlugin(metaclass=abc.ABCMeta): <NEW_LINE> <INDENT> NAME: typing.Optional[str] = None <NEW_LINE> @abc.abstractmethod <NEW_LINE> def configure(self, info: typing.Dict[str, typing.Any]) -> None: <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def connect(s...
The specification/"interface" a synchronization plugin implements. Every abstract method in this class is a plugin hook.
62598fca9f28863672818a3f
class NoBackupError(Error): <NEW_LINE> <INDENT> pass
Error for when you try to restore a backup but one does not exist.
62598fca283ffb24f3cf3c0b
class SlidersApp(HBox): <NEW_LINE> <INDENT> extra_generated_classes = [["SlidersApp", "SlidersApp", "HBox"]] <NEW_LINE> inputs = Instance(VBoxForm) <NEW_LINE> text = Instance(TextInput) <NEW_LINE> offset = Instance(Slider) <NEW_LINE> amplitude = Instance(Slider) <NEW_LINE> phase = Instance(Slider) <NEW_LINE> freq = Ins...
An example of a browser-based, interactive plot with slider controls.
62598fcaec188e330fdf8c1c
class Card(object): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return '<Card: {0}, estimation: {1}>'.format(self.name, self.task_estimate or 'None') <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return str(self) <NEW_LINE> <DEDENT> def __init__(self, containing_list, card_dict, status): <N...
Represents a Trello card.
62598fcaa219f33f346c6b8f
class DynamicOperation(Operation): <NEW_LINE> <INDENT> def __call__(self, map_obj, **params): <NEW_LINE> <INDENT> self.p = param.ParamOverrides(self, params) <NEW_LINE> callback = self._dynamic_operation(map_obj) <NEW_LINE> if isinstance(map_obj, DynamicMap): <NEW_LINE> <INDENT> return map_obj.clone(callback=callback, ...
Dynamically applies an operation to the elements of a HoloMap or DynamicMap. Will return a DynamicMap wrapping the original map object, which will lazily evaluate when a key is requested. The _process method should be overridden in subclasses to apply a specific operation, DynamicOperation itself applies a no-op, makin...
62598fca5fcc89381b266310
class TodoForm(FlaskForm): <NEW_LINE> <INDENT> title = StringField(label=('Enter Task:'), validators=[DataRequired()]) <NEW_LINE> state = SelectField(u'Select State', choices=[( 'todo'), ('in-progress'), ('done')]) <NEW_LINE> submit = SubmitField('Add')
Todo form.
62598fca3d592f4c4edbb239
class DescribeEdgeSnNodesRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.EdgeUnitId = None <NEW_LINE> self.NamePattern = None <NEW_LINE> self.SNPattern = None <NEW_LINE> self.RemarkPattern = None <NEW_LINE> self.Offset = None <NEW_LINE> self.Limit = None <NEW_LINE> <DEDENT> def ...
DescribeEdgeSnNodes请求参数结构体
62598fcabe7bc26dc925201e
class VendingMachine(object): <NEW_LINE> <INDENT> def __init__(self, product, price): <NEW_LINE> <INDENT> self.product = product <NEW_LINE> self.price = price <NEW_LINE> self.balance = 0 <NEW_LINE> self.stock = 0 <NEW_LINE> <DEDENT> def restock(self, stock): <NEW_LINE> <INDENT> self.stock += stock <NEW_LINE> return (('...
A vending machine that vends some product for some price. >>> v = VendingMachine('crab', 10) >>> v.vend() 'Machine is out of stock.' >>> v.restock(2) 'Current crab stock: 2' >>> v.vend() 'You must deposit $10 more.' >>> v.deposit(7) 'Current balance: $7' >>> v.vend() 'You must deposit $3 more.' >>> v.deposit(5) 'Curre...
62598fca283ffb24f3cf3c0c
class TestSendSmtpEmailSender(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 testSendSmtpEmailSender(self): <NEW_LINE> <INDENT> pass
SendSmtpEmailSender unit test stubs
62598fcaf9cc0f698b1c5496
class SubscriberList(ListCreateAPIView): <NEW_LINE> <INDENT> serializer_class = SubscriberSerializer <NEW_LINE> model = Subscriber <NEW_LINE> permission_classes = property(_permission_classes) <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> return self.model.objects.filter(user=self.request.user) <NEW_LINE> <DED...
List and create new subscriptions for the currently logged in user.
62598fca26068e7796d4cce3
class GlobalConf(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.source_solver = SourceSolverConf() <NEW_LINE> self.script_solver = ScriptSolverConf() <NEW_LINE> self.model_solver = ModelSolverConf() <NEW_LINE> self.valid_solver = ValidConf()
The definition of global configuration
62598fca5fc7496912d4843d
class Normalize(object): <NEW_LINE> <INDENT> def __init__(self, mean, std): <NEW_LINE> <INDENT> self.mean = mean <NEW_LINE> self.std = std <NEW_LINE> <DEDENT> def __call__(self, tensor): <NEW_LINE> <INDENT> return F.normalize(tensor, self.mean, self.std)
用均值和标准偏差对张量图像进行归一化. 给定均值: ``(M1,...,Mn)`` 和标准差: ``(S1,..,Sn)`` 用于 ``n`` 个通道, 该变换将标准化输入 ``torch.*Tensor`` 的每一个通道. 例如: ``input[channel] = (input[channel] - mean[channel]) / std[channel]`` Args: mean (sequence): 每一个通道的均值序列. std (sequence): 每一个通道的标准差序列.
62598fca851cf427c66b863b
class InstanceView(object): <NEW_LINE> <INDENT> def __init__(self, instance, req=None): <NEW_LINE> <INDENT> self.instance = instance <NEW_LINE> self.req = req <NEW_LINE> <DEDENT> def data(self): <NEW_LINE> <INDENT> instance_dict = { "id": self.instance.id, "name": self.instance.name, "status": self.instance.status, "li...
Uses a SimpleInstance.
62598fcaff9c53063f51a9d4
class Sin(Func): <NEW_LINE> <INDENT> function = 'SIN' <NEW_LINE> name = 'Sin'
SQL function for calculating the sine.
62598fca283ffb24f3cf3c0d
class PackageXmlAnalyzer(PackageAnalyzer): <NEW_LINE> <INDENT> def analyze_file(self, path: str, dependencies: dict) -> dict: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> file = open(path, "r") <NEW_LINE> tree = parse(file) <NEW_LINE> <DEDENT> except ParseError: <NEW_LINE> <INDENT> logging.warning("[PackageXmlAnalyzer]...
Analyzer plug-in for ROS' package.xml files (catkin).
62598fcaab23a570cc2d4f32
class Paths(object): <NEW_LINE> <INDENT> def __init__(self, root_dir, project_dir, variant_dir): <NEW_LINE> <INDENT> self._root_dir = root_dir <NEW_LINE> self._project_dir = project_dir <NEW_LINE> self._variant_dir = variant_dir <NEW_LINE> self._sources_dir = root_dir.Dir('sources') <NEW_LINE> self._tools_dir = root_di...
Defines common paths used for builds.
62598fca283ffb24f3cf3c0e
class PickleLoader(object): <NEW_LINE> <INDENT> def __init__(self, dir, letters=None): <NEW_LINE> <INDENT> if letters is not None: <NEW_LINE> <INDENT> letters = letters.upper() <NEW_LINE> <DEDENT> self.dir = dir <NEW_LINE> self.letters = letters <NEW_LINE> <DEDENT> def iterate(self): <NEW_LINE> <INDENT> for letter in s...
Iterator for loading and returning a series of SenseObjects from a sequence of pickled files
62598fca4428ac0f6e6588b0
class Orden(models.Model): <NEW_LINE> <INDENT> cliente = models.ForeignKey(Cliente, related_name='ordenes') <NEW_LINE> estado = models.ForeignKey(EstadoOrden, related_name='ordenes') <NEW_LINE> fechafin = models.DateField(null=True) <NEW_LINE> fechainicio = models.DateField(default=timezone.now) <NEW_LINE> observacione...
Esta clase incluye los datos de cabecera de una orden de trabajo
62598fca63b5f9789fe854ff
class ComposeTransform(Transform): <NEW_LINE> <INDENT> def __init__(self, parts): <NEW_LINE> <INDENT> super(ComposeTransform, self).__init__() <NEW_LINE> self.parts = parts <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> if not isinstance(other, ComposeTransform): <NEW_LINE> <INDENT> return False <NEW_...
Composes multiple transforms in a chain. The transforms being composed are responsible for caching. Args: parts (list of :class:`Transform`): A list of transforms to compose.
62598fca099cdd3c636755a6
class Command(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'command' <NEW_LINE> __table_args__ = ( UniqueConstraint('jobstep_id', 'order', name='unq_command_order'), ) <NEW_LINE> id = Column(GUID, primary_key=True, default=uuid.uuid4) <NEW_LINE> jobstep_id = Column(GUID, ForeignKey('jobstep.id', ondelete="CASCADE"), ...
The information of the script run on one node within a jobstep: the contents of the script are included, and later the command can be updated with status/return code. changes-client has no real magic beyond running commands, so the list of commands it ran basically tells you everything that happened. Looks like only ...
62598fca7cff6e4e811b5db1
class Comparator(Query): <NEW_LINE> <INDENT> def __init__(self, index, value): <NEW_LINE> <INDENT> self.index = index <NEW_LINE> self._value = value <NEW_LINE> <DEDENT> def _get_value(self, names, value=_marker): <NEW_LINE> <INDENT> if value is _marker: <NEW_LINE> <INDENT> value = self._value <NEW_LINE> <DEDENT> if isi...
Base class for all comparators used in queries.
62598fca3346ee7daa33780c
class CheckersBase(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.reporter = ProblemReporter() <NEW_LINE> <DEDENT> def run(self, checker, path): <NEW_LINE> <INDENT> self.reporter.clear_problems() <NEW_LINE> controller._run_checker(checker, False, path) <NEW_LINE> <DEDENT> def get_reported_lin...
Base class to use checkers test
62598fca7c178a314d78d829
class EDISegmentError(TransactionError): <NEW_LINE> <INDENT> pass
Class for EDISegment
62598fca3d592f4c4edbb23d
class _IndicatorColumn(_DenseColumn, _SequenceDenseColumn, collections.namedtuple('_IndicatorColumn', ['categorical_column'])): <NEW_LINE> <INDENT> @property <NEW_LINE> def name(self): <NEW_LINE> <INDENT> return '{}_indicator'.format(self.categorical_column.name) <NEW_LINE> <DEDENT> def _transform_feature(self, inputs)...
Represents a one-hot column for use in deep networks. Args: categorical_column: A `_CategoricalColumn` which is created by `categorical_column_with_*` function.
62598fca5fcc89381b266312
class ModifyAnimatedGraphicsTemplateRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Definition = None <NEW_LINE> self.Name = None <NEW_LINE> self.Width = None <NEW_LINE> self.Height = None <NEW_LINE> self.ResolutionAdaptive = None <NEW_LINE> self.Format = None <NEW_LINE> self.Fp...
ModifyAnimatedGraphicsTemplate request structure.
62598fcabe7bc26dc9252020
class Book(models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=200) <NEW_LINE> author = models.ForeignKey('Author', on_delete=models.SET_NULL, null=True) <NEW_LINE> summary = models.TextField(max_length=1000, help_text="Enter a brief description of the book") <NEW_LINE> isbn = models.CharField( 'ISBN...
Model representing a book (but not a specific copy of a book).
62598fcaadb09d7d5dc0a905
class SignatureEnvelopeSettingsInfo: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swaggerTypes = { 'ownerShouldSign': 'bool', 'orderedSignature': 'bool', 'reminderTime': 'float', 'stepExpireTime': 'float', 'envelopeExpireTime': 'float', 'emailSubject': 'str', 'emailBody': 'str', 'isDemo': 'bool', 'w...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fca851cf427c66b863f
class DummyBaseEvent(object): <NEW_LINE> <INDENT> event_type = "boussole-dummy" <NEW_LINE> is_directory = False <NEW_LINE> def __init__(self, src, dst=None): <NEW_LINE> <INDENT> self.src_path = src <NEW_LINE> self.dest_path = dst or src
Dummy event base to pass to almost all handler event methods
62598fca50812a4eaa620daa
class DataCitePreconditionError(DataCiteRequestError): <NEW_LINE> <INDENT> pass
metadata must be uploaded first
62598fca283ffb24f3cf3c11
class Gifts(Setting): <NEW_LINE> <INDENT> def __init__(self, x, y, hw=25, hh=25, c=25): <NEW_LINE> <INDENT> super().__init__(x, y, hw, hh, c) <NEW_LINE> self.anchor = (0, 0) <NEW_LINE> self.get_sprite() <NEW_LINE> self.scale = 0.1 <NEW_LINE> <DEDENT> def get_sprite(self): <NEW_LINE> <INDENT> s = Sprite('pic/lipin.png')...
给玩家回血的物体
62598fcaec188e330fdf8c22
class Analyzer(): <NEW_LINE> <INDENT> def __init__(self, positives, negatives): <NEW_LINE> <INDENT> self.dic = {} <NEW_LINE> load_dictionary(self, positives, 1) <NEW_LINE> load_dictionary(self, negatives, -1) <NEW_LINE> <DEDENT> def analyze(self, tweet): <NEW_LINE> <INDENT> score = 0 <NEW_LINE> tokenizer = nltk.tokeniz...
Implements sentiment analysis.
62598fca55399d3f056268a6
class BasePlugin(QObject): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> super(BasePlugin, self).__init__() <NEW_LINE> <DEDENT> def activate(self): <NEW_LINE> <INDENT> pass
A base from which every plugin should inherit
62598fca4a966d76dd5ef264
class Selu: <NEW_LINE> <INDENT> def __call__(self, x): <NEW_LINE> <INDENT> return selu(x)
The scaled exponential linear unit [3]_ activation function is described by the following formula: :math:`a = 1.6732632423543772848170429916717` :math:`b = 1.0507009873554804934193349852946` :math:`f(x) = b*max(x, 0)+min(0, exp(x) - a)` Args: x (ndarray, Node): Input numpy array or Node instance. Exa...
62598fca5fc7496912d48440
class Confess(BaseMode): <NEW_LINE> <INDENT> STATE = ( ('待审核', '待审核'), ('通过', '通过'), ('未通过', '未通过') ) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> db_table = 'confess' <NEW_LINE> <DEDENT> userID = models.IntegerField(default=1, verbose_name="用户id") <NEW_LINE> userName = models.CharField(max_length=30, default='表白墙', verb...
贴子表
62598fca851cf427c66b8641
class PhoneCallDiscardReasonDisconnect(TLObject): <NEW_LINE> <INDENT> __slots__: List[str] = [] <NEW_LINE> ID = 0xe095c1a0 <NEW_LINE> QUALNAME = "types.PhoneCallDiscardReasonDisconnect" <NEW_LINE> def __init__(self) -> None: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read(data: BytesIO, *...
This object is a constructor of the base type :obj:`~pyrogram.raw.base.PhoneCallDiscardReason`. Details: - Layer: ``122`` - ID: ``0xe095c1a0`` **No parameters required.**
62598fcaaad79263cf42eb5c
class AnswerAPI(MethodView): <NEW_LINE> <INDENT> decorators = [token_required] <NEW_LINE> @staticmethod <NEW_LINE> def post(current_user, question_id): <NEW_LINE> <INDENT> database = Database(app.config['DATABASE_URL']) <NEW_LINE> answer_db = AnswerBbQueries() <NEW_LINE> data = request.get_json() <NEW_LINE> if validate...
This class-based view for answering a question.
62598fca656771135c4899fe
class GPSLoggerView(HomeAssistantView): <NEW_LINE> <INDENT> url = '/api/gpslogger' <NEW_LINE> name = 'api:gpslogger' <NEW_LINE> def __init__(self, async_see, config): <NEW_LINE> <INDENT> self.async_see = async_see <NEW_LINE> self._password = config.get(CONF_PASSWORD) <NEW_LINE> self.requires_auth = self._password is No...
View to handle GPSLogger requests.
62598fca3d592f4c4edbb242