code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class CardFooter(Component): <NEW_LINE> <INDENT> @_explicitize_args <NEW_LINE> def __init__(self, children=None, id=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, tag=Component.UNDEFINED, **kwargs): <NEW_LINE> <INDENT> self._prop_names = ['children', 'id', 'style', 'className', 'tag'] <N... | A CardFooter component.
Keyword arguments:
- children (a list of or a singular dash component, string or number; optional): The children of this component
- id (string; optional): The ID of this component, used to identify dash components
in callbacks. The ID needs to be unique across all of the
components in an app.... | 62598f403cc13d1c6d46496d |
class TDFByteStreamTestReadFloat(TDFByteStreamTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.data = [1.1, 2.2, 3.3] <NEW_LINE> self.fmt = self.endianness + 'fff' <NEW_LINE> self.binary_data = struct.pack(self.fmt, *self.data) <NEW_LINE> self.file_object = cStringIO.StringIO(self.binary_data) <NEW_... | Test reading four byte floating point numbers.
| 62598f403cc13d1c6d46496f |
class ThriftConnection(PoolingConnection): <NEW_LINE> <INDENT> transport_schema = 'thrift' <NEW_LINE> def __init__(self, host='localhost', port=9500, framed_transport=False, thrift_ssl=False, thrift_socket_extra_args=None, thrift_headers=None, **kwargs): <NEW_LINE> <INDENT> if not THRIFT_AVAILABLE: <NEW_LINE> <INDENT> ... | Connection using the `thrift` protocol to communicate with elasticsearch.
See https://github.com/elasticsearch/elasticsearch-transport-thrift for additional info. | 62598f40462c4b4f79dbabfc |
class DocumentFromOfficeatwork(WizzardWrappedAddForm): <NEW_LINE> <INDENT> typename = 'opengever.document.document' <NEW_LINE> def _create_form_class(self, parent_form_class, steptitle): <NEW_LINE> <INDENT> class WrappedForm(parent_form_class): <NEW_LINE> <INDENT> skip_validate_file_field = True <NEW_LINE> label = _(u'... | Initialize creation of a document with officeatwork.
Creates a document with the default add form, but hides the file-field.
Then redirects to a view that initiates creation with officeatwork. | 62598f40627d3e7fe0e0608c |
class StreamModeH5(object): <NEW_LINE> <INDENT> MODE_RESULT_DB= 'mode_estimation_result.h5' <NEW_LINE> VEDRAN_METHOD= 'vedran_method' <NEW_LINE> __h5namefile= '' <NEW_LINE> __h5file= None <NEW_LINE> __resfolder= '' <NEW_LINE> __gResults= None <NEW_LINE> __dmode= None <NEW_LINE> def __init__(self, respath= '', resfile= ... | _h5file file object with reference to the .h5 file
_group object to keep in memory a group from the .h5 file
cdataset objet to keep in memory the dataset of signals from the .h5 file | 62598f4015fb5d323ce7df2c |
class Matcher(object): <NEW_LINE> <INDENT> def __init__(self, key, value): <NEW_LINE> <INDENT> self.key = key <NEW_LINE> self.value = value <NEW_LINE> self.fallback_key = '' <NEW_LINE> <DEDENT> def _get_disk_key(self, device): <NEW_LINE> <INDENT> disk = device.to_json() <NEW_LINE> def findkeys(node: Union[list, dict], ... | The base class to all Matchers
It holds utility methods such as _get_disk_key
and handles the initialization. | 62598f400a366e3fb87dbbd6 |
class CategoryForm(Form): <NEW_LINE> <INDENT> name = StringField(u'Name', validators=[validators.Length(min=3, max=50)]) | Category form | 62598f4015fb5d323ce7df2e |
class UnpackZipArchive(Command): <NEW_LINE> <INDENT> def __init__(self, archive, dir): <NEW_LINE> <INDENT> self.archive = archive <NEW_LINE> self.dir = dir <NEW_LINE> Command.__init__(self, 'unzip', ["-q", archive, '-d', dir]) <NEW_LINE> self.run_error = self._f("Couldn't unpack '%s': {err_reason}", self.archive) | Wrap zip to Unpack a zip file | 62598f40462c4b4f79dbac04 |
class BombManager(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.bombs = [] <NEW_LINE> <DEDENT> def draw_bombs(self, screen): <NEW_LINE> <INDENT> for bomb in self.bombs: <NEW_LINE> <INDENT> bomb.draw(screen) <NEW_LINE> <DEDENT> <DEDENT> def add_bomb(self, bomb): <NEW_LINE> <INDENT> self.bombs... | manages bombs | 62598f4015fb5d323ce7df30 |
class ConnectorUnit(object,metaclass=MetaConnectorUnit): <NEW_LINE> <INDENT> _model_name = None <NEW_LINE> def __init__(self, connector_env): <NEW_LINE> <INDENT> super(ConnectorUnit, self).__init__() <NEW_LINE> self.connector_env = connector_env <NEW_LINE> self.backend = self.connector_env.backend <NEW_LINE> self.backe... | Abstract class for each piece of the connector:
Examples:
* :py:class:`connector.connector.Binder`
* :py:class:`connector.unit.mapper.Mapper`
* :py:class:`connector.unit.synchronizer.Synchronizer`
* :py:class:`connector.unit.backend_adapter.BackendAdapter`
Or basically any class intended to be registe... | 62598f40eab8aa0e5d30af80 |
class _GAPICVisionAPI(object): <NEW_LINE> <INDENT> def __init__(self, client=None): <NEW_LINE> <INDENT> self._client = client <NEW_LINE> self._annotator_client = image_annotator_client.ImageAnnotatorClient( credentials=client._credentials, lib_name='gccl', lib_version=__version__) <NEW_LINE> <DEDENT> def annotate(self,... | Vision API for interacting with the gRPC version of Vision.
:type client: :class:`~google.cloud.vision.client.Client`
:param client: Instance of ``Client`` object. | 62598f40eab8aa0e5d30af82 |
class AuthorizeOperatorMethod(ContractMethod): <NEW_LINE> <INDENT> def __init__( self, web3_or_provider: Union[Web3, BaseProvider], contract_address: str, contract_function: ContractFunction, validator: Validator = None, ): <NEW_LINE> <INDENT> super().__init__(web3_or_provider, contract_address, validator) <NEW_LINE> s... | Various interfaces to the authorizeOperator method. | 62598f403cc13d1c6d46497f |
class BasicAuthPasswordIdentityProvider(IdentityProviderBase): <NEW_LINE> <INDENT> def __init__(self, api_version, idp): <NEW_LINE> <INDENT> IdentityProviderBase.__init__(self, api_version, idp) <NEW_LINE> self._allow_additional = False <NEW_LINE> self._required += [['url']] <NEW_LINE> self._optional += [['ca'], ['cert... | BasicAuthPasswordIdentityProvider
Attributes:
Args:
api_version(str): OpenShift config version
idp (dict): idp config dict
Raises:
AnsibleFilterError: | 62598f40eab8aa0e5d30af86 |
class ProdigalGeneFeatureParser(): <NEW_LINE> <INDENT> def __init__(self, filename): <NEW_LINE> <INDENT> check_file_exists(filename) <NEW_LINE> self.genes = {} <NEW_LINE> self.last_coding_base = {} <NEW_LINE> self.__parseGFF(filename) <NEW_LINE> self.coding_base_masks = {} <NEW_LINE> for seq_id in self.genes: <NEW_LINE... | Parses prodigal gene feature files (GFF) output. | 62598f4015fb5d323ce7df38 |
class TkPainter(Painter): <NEW_LINE> <INDENT> def __init__(self, canvas: Canvas) -> None: <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.canvas = canvas <NEW_LINE> self.draw_functions[Line] = self.draw_line <NEW_LINE> <DEDENT> def draw_line(self, line: Line) -> None: <NEW_LINE> <INDENT> self.canvas.create_line(... | TkinterのCanvas用のPainter | 62598f40627d3e7fe0e0609e |
class SubCommand(object): <NEW_LINE> <INDENT> name = None <NEW_LINE> def shared_args(self, parser): <NEW_LINE> <INDENT> parser.add_argument("--quiet", action="store_true", help="Run quietly unless an error occurred") <NEW_LINE> <DEDENT> def args(self, parser): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def run(self, ... | A SubCommand template base class | 62598f403cc13d1c6d464987 |
class TaskHighestValidationCriterion(object): <NEW_LINE> <INDENT> def __init__(self, context): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> <DEDENT> @property <NEW_LINE> def query(self): <NEW_LINE> <INDENT> return highest_validation_criterion('task') | Return catalog criteria following highest validation group member | 62598f400a366e3fb87dbbe8 |
class TrainEngine(uci.Engine): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(TrainEngine, self).__init__(**kwargs) <NEW_LINE> self.training_data_received = threading.Condition() <NEW_LINE> self.traindata_data = [] <NEW_LINE> <DEDENT> def traindata(self, version='3', async_callback=None): <... | add traindata uci command to engine | 62598f41eab8aa0e5d30af90 |
class PasDeTraficInconnuError(Exception): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Exception.__init__(self,"pas de trafic inconnu au noeud, normalement l'erruer est en amont") <NEW_LINE> self.erreur_type='PasDeTraficInconnuError' | Exception levée si la ligne n'est pas affectée à du trafic | 62598f41627d3e7fe0e060a6 |
class ExternalLengthPredictor(Predictor): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> super(ExternalLengthPredictor, self).__init__() <NEW_LINE> self.trg_lengths = load_external_lengths(path) <NEW_LINE> <DEDENT> def get_unk_probability(self, posterior): <NEW_LINE> <INDENT> if self.n_consumed < sel... | This predictor loads the distribution over target sentence
lengths from an external file. The file contains blank separated
length:score pairs in each line which define the length
distribution. The predictor adds the specified scores directly
to the EOS score. | 62598f413cc13d1c6d464995 |
class SomeObject(object): <NEW_LINE> <INDENT> __metaclass__ = extendabletype <NEW_LINE> immutable = False <NEW_LINE> knowntype = object <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> assert type(self) is not SomeObject <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return (self.__class__ is other.... | The set of all objects. Each instance stands
for an arbitrary object about which nothing is known. | 62598f41627d3e7fe0e060ae |
class Clients(object): <NEW_LINE> <INDENT> def __init__(self, domain, token, telemetry=True): <NEW_LINE> <INDENT> self.domain = domain <NEW_LINE> self.client = RestClient(jwt=token, telemetry=telemetry) <NEW_LINE> <DEDENT> def _url(self, id=None): <NEW_LINE> <INDENT> url = 'https://{}/api/v2/clients'.format(self.domain... | Auth0 applications endpoints
Args:
domain (str): Your Auth0 domain, e.g: 'username.auth0.com'
token (str): Management API v2 Token
telemetry (bool, optional): Enable or disable Telemetry
(defaults to True) | 62598f410a366e3fb87dbbf6 |
class TestNagiosHostStateChange(Base): <NEW_LINE> <INDENT> expected_title = "nagios.host.state.change" <NEW_LINE> expected_subti = "proxy04.fedoraproject.org is down: \"ZOMG!\"" <NEW_LINE> expected_icon = 'https://apps.fedoraproject.org/img/icons/nagios-logo.png' <NEW_LINE> expected_secondary_icon = expected_icon <NEW_... | It might not be a good idea... but we hooked our `nagios instance
<https://admin.fedoraproject.org/nagios>`_ because "open infrastructure".
Note that, you shouldn't really rely on this stream for alerts about
systems, because if you're expecting to get an alert about fedmsg being
down, via fedmsg... well, it's just not... | 62598f4115fb5d323ce7df4e |
class LogisticRegression(object): <NEW_LINE> <INDENT> def __init__(self, n_in, m_out,learning_rate): <NEW_LINE> <INDENT> self.input = None <NEW_LINE> self.output = None <NEW_LINE> self.Z = None <NEW_LINE> self.delta = None <NEW_LINE> self.W = None <NEW_LINE> self.b = None <NEW_LINE> self.p_learning_rate = learning_rate... | classdocs | 62598f4121a7993f00c651a0 |
class TestCouponBookPagedMetadata(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 testCouponBookPagedMetadata(self): <NEW_LINE> <INDENT> model = billforward.models.coupon_book_paged_metadata.Coupon... | CouponBookPagedMetadata unit test stubs | 62598f413cc13d1c6d46499d |
class ExecutorStrategy(Strategy): <NEW_LINE> <INDENT> executor_factory = Executor <NEW_LINE> def create_executor(self): <NEW_LINE> <INDENT> return self.executor_factory() <NEW_LINE> <DEDENT> def execute(self, graph, *args, plugins=None, services=None, **kwargs): <NEW_LINE> <INDENT> context = self.create_graph_execution... | Strategy based on a concurrent.futures.Executor subclass (or similar interface). | 62598f41eab8aa0e5d30afa5 |
class LFRecord(DirectSubkeyList): <NEW_LINE> <INDENT> def __init__(self, buf, offset, parent): <NEW_LINE> <INDENT> super(LFRecord, self).__init__(buf, offset, parent) <NEW_LINE> _id = self.unpack_string(0x0, 2) <NEW_LINE> if _id != b"lf": <NEW_LINE> <INDENT> raise ParseException("Invalid LF Record ID") <NEW_LINE> <DEDE... | The LFRecord is a simple structure containing a list of offsets/pointers
to subkey NKRecords.
The LFRecord also contains a hash for the name of the subkey pointed to
by the offset, which enables more efficient seaching of the Registry tree. | 62598f4115fb5d323ce7df56 |
class FromTestComplexClass(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.name = "Igor" <NEW_LINE> self.surname = "Hnizdo" <NEW_LINE> self.date = datetime(2015, 1, 1) <NEW_LINE> self.student = FromTestComplexChildClass() <NEW_LINE> self.knows = [FromTestComplexChildClass('Mrs. Souckova'), Fro... | From Test Class | 62598f4121a7993f00c651a6 |
class NoNOSSviSwitch(exceptions.NeutronException): <NEW_LINE> <INDENT> message = _("No usable NOS switch found to create SVI interface.") | No usable nos switch found. | 62598f41627d3e7fe0e060ba |
class SampleQueryArgsSchema(SortQueryArgsSchema): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> strict = True <NEW_LINE> <DEDENT> name = ma.fields.String() <NEW_LINE> number = ma.fields.Integer() | Sample sort query parameters schema | 62598f41462c4b4f79dbac30 |
class _answers: <NEW_LINE> <INDENT> def __init__(self, inputs): <NEW_LINE> <INDENT> self._inputs = [str(i) for i in inputs] <NEW_LINE> <DEDENT> def extend(self, items): <NEW_LINE> <INDENT> self._inputs.extend(items) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "|".join(self._inputs) <NEW_LINE> <DED... | Simulate a series of terminal inputs by popping them from a list if called. | 62598f413cc13d1c6d4649a7 |
class MySection(ConfigSection): <NEW_LINE> <INDENT> pass | This is MySection's docstring. | 62598f41627d3e7fe0e060c0 |
class Render(object): <NEW_LINE> <INDENT> def __init__(self, appName=" Default Application Name "): <NEW_LINE> <INDENT> self.screen = curses.initscr() <NEW_LINE> self.screen.clear() <NEW_LINE> self.screen.border(0) <NEW_LINE> self.screen.addstr(0, 2, appName) <NEW_LINE> <DEDENT> def add_panel(self, **kwargs): <NEW_LINE... | Class responsible to render views | 62598f41eab8aa0e5d30afaf |
class Item(ABC): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def get_uid(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> raise NotImplementedError | Abstract class for Item
| 62598f4121a7993f00c651b0 |
class CategoryPage(ListView): <NEW_LINE> <INDENT> model = Product <NEW_LINE> template_name = 'my_shop/cats.html' <NEW_LINE> context_object_name = 'products' <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> return Product.objects.filter(cid = self.kwargs['pk']) | страница с материалами категории | 62598f4115fb5d323ce7df62 |
class Binomial(Distribution): <NEW_LINE> <INDENT> def __init__(self, prob=.5, size=20): <NEW_LINE> <INDENT> self.p = prob <NEW_LINE> self.n = size <NEW_LINE> Distribution.__init__(self, self.calculate_mean(), self.calculate_stdev()) <NEW_LINE> <DEDENT> def calculate_mean(self): <NEW_LINE> <INDENT> self.mean = self.p * ... | Binomial distribution class for calculating and
visualizing a Binomial distribution.
Attributes:
mean (float) representing the mean value of the distribution
stdev (float) representing the standard deviation of the distribution
data_list (list of floats) a list of floats to be extracted from the data file... | 62598f423cc13d1c6d4649ab |
class ChoiceFormatter(Formatter): <NEW_LINE> <INDENT> def __init__(self, mapping, sort=None, *args, **kwargs): <NEW_LINE> <INDENT> super(ChoiceFormatter, self).__init__(*args, **kwargs) <NEW_LINE> if isinstance(mapping, list): <NEW_LINE> <INDENT> mapping = {v: str(v) for v in mapping} <NEW_LINE> <DEDENT> self.mapping =... | Formatter for choice data values. | 62598f42627d3e7fe0e060c4 |
class CustomUpdater(training.StandardUpdater): <NEW_LINE> <INDENT> def __init__(self, train_iter, optimizer, converter, device, accum_grad=1): <NEW_LINE> <INDENT> super(CustomUpdater, self).__init__( train_iter, optimizer, converter=converter, device=device) <NEW_LINE> self.accum_grad = accum_grad <NEW_LINE> self.forwa... | Custom updater for chainer.
Args:
train_iter (iterator | dict[str, iterator]): Dataset iterator for the
training dataset. It can also be a dictionary that maps strings to
iterators. If this is just an iterator, then the iterator is
registered by the name ``'main'``.
optimizer (optimizer... | 62598f42eab8aa0e5d30afb3 |
class VirtualMachineScaleSetVMListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'value': {'required': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[VirtualMachineScaleSetVM]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, val... | The List Virtual Machine Scale Set VMs operation response.
All required parameters must be populated in order to send to Azure.
:ivar value: Required. The list of virtual machine scale sets VMs.
:vartype value: list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVM]
:ivar next_link: The uri to fetch the... | 62598f423cc13d1c6d4649ad |
class CLICommand(ABC): <NEW_LINE> <INDENT> name: ClassVar[str] = "command name" <NEW_LINE> description: ClassVar[str] = "command description" <NEW_LINE> usable_from_root: ClassVar[bool] = True <NEW_LINE> example: ClassVar[str] = "" <NEW_LINE> def invoke(self, ctx: InvokeContext, line: str) -> None: <NEW_LINE> <INDENT> ... | Base class for CLIOptions. | 62598f42462c4b4f79dbac3a |
class CoreEmail(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def sendMail(cls, sender, recipients, subject, body, filesList=[], recipients_cc=[], recipients_bcc=[]): <NEW_LINE> <INDENT> returnValue = True <NEW_LINE> returnError = '' <NEW_LINE> body = ''.join([ body, '\n', 'This is an automated message from "{0}... | This class contains methods that provide a simple interface to the email
capabilities of python. The methods should be used directly without
creating a instance of the class. | 62598f420a366e3fb87dbc0e |
@injected <NEW_LINE> @setup(IVerificationStatusService, name='verificationStatusService') <NEW_LINE> class VerificationStatusServiceAlchemy(EntityGetServiceAlchemy, EntityFindServiceAlchemy, IVerificationStatusService): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> EntityGetServiceAlchemy.__init__(self, V... | Implementation for @see: IVerificationStatusService | 62598f42eab8aa0e5d30afb7 |
class DescribeCertificateDetailResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.CertificateDetail = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("CertificateDetail") is not None: <NEW_LINE> <INDENT> s... | DescribeCertificateDetail response structure.
| 62598f42627d3e7fe0e060ca |
class AlterField(FieldOperation): <NEW_LINE> <INDENT> def __init__(self, model_name, name, field, preserve_default=True): <NEW_LINE> <INDENT> self.field = field <NEW_LINE> self.preserve_default = preserve_default <NEW_LINE> super(AlterField, self).__init__(model_name, name) <NEW_LINE> <DEDENT> def deconstruct(self): <N... | Alters a field's database column (e.g. null, max_length) to the provided new field | 62598f42462c4b4f79dbac3e |
class LogAs(ICTVAuthPage): <NEW_LINE> <INDENT> logger = getLogger('pages') <NEW_LINE> def get(self, target_user): <NEW_LINE> <INDENT> @PermissionGate.administrator <NEW_LINE> def log_as(): <NEW_LINE> <INDENT> u = User.selectBy(email=target_user).getOne() <NEW_LINE> real_user_dict = self.session['user'] if 'real_user' n... | Logs the super_administrator as another user, by inserting the "logged_as" field in the session.
'logged_as': {'id': [[target_user_id]], 'email': [[target_user_email]], 'full_name': target_user_fullname} | 62598f420a366e3fb87dbc12 |
class Pager(object): <NEW_LINE> <INDENT> def __init__(self, endpoint, request_opts=None, **kwargs): <NEW_LINE> <INDENT> if hasattr(endpoint, 'get'): <NEW_LINE> <INDENT> endpoint = partial(endpoint.get, **kwargs) <NEW_LINE> self._endpoint = endpoint <NEW_LINE> <DEDENT> elif callable(endpoint): <NEW_LINE> <INDENT> endpoi... | Generator that takes an endpoint (top level endpoints with `.get)` and lazily loads items from Server.
Supports all `RequestOptions` including starting on any page. Also used by models to load sub-models
(users in a group, views in a workbook, etc) by passing a different endpoint.
Will loop over anything that returns ... | 62598f423cc13d1c6d4649b3 |
class DisabledModuleAudit(BaseAudit): <NEW_LINE> <INDENT> def __init__(self, modules): <NEW_LINE> <INDENT> if modules is None: <NEW_LINE> <INDENT> self.modules = [] <NEW_LINE> <DEDENT> elif isinstance(modules, six.string_types): <NEW_LINE> <INDENT> self.modules = [modules] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> ... | Audits Apache2 modules.
Determines if the apache2 modules are enabled. If the modules are enabled
then they are removed in the ensure_compliance. | 62598f4221a7993f00c651ba |
class OutputNode(VLibNode): <NEW_LINE> <INDENT> def __init__(self, dest=None, strFunc=None, **kwargs): <NEW_LINE> <INDENT> VLibNode.__init__(self, **kwargs) <NEW_LINE> self._dest = dest <NEW_LINE> self._func = strFunc <NEW_LINE> <DEDENT> def next(self): <NEW_LINE> <INDENT> parents = self.GetParents() <NEW_LINE> args = ... | base class for nodes which dump output
Assumptions:
- destination supports a write() method
- strFunc, if provided, returns a string representation of
the input
- inputs (parents) can be stepped through in lockstep
Usage Example:
>>> from rdkit.VLib.Supply import SupplyNode
>>> supplier = SupplyNod... | 62598f42eab8aa0e5d30afbd |
class TestTubeHolder(Benchmark): <NEW_LINE> <INDENT> def __init__(self, dimensions=2): <NEW_LINE> <INDENT> Benchmark.__init__(self, dimensions) <NEW_LINE> self._bounds = list(zip([-10.0] * self.N, [10.0] * self.N)) <NEW_LINE> self.global_optimum = [[-pi / 2, 0.0]] <NEW_LINE> self.fglob = -10.87229990155800 <NEW_LINE> <... | TestTubeHolder objective function.
This class defines the TestTubeHolder [1]_ global optimization problem. This
is a multimodal minimization problem defined as follows:
.. math::
f_{\text{TestTubeHolder}}(x) = - 4 \left | {e^{\left|{\cos
\left(\frac{1}{200} x_{1}^{2} + \frac{1}{200} x_{2}^{2}\right)}
\r... | 62598f42627d3e7fe0e060d0 |
class BadLuckPlayer(Player): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.nextmove = random.choice(MOVES) <NEW_LINE> <DEDENT> def move(self): <NEW_LINE> <INDENT> return self.nextmove <NEW_LINE> <DEDENT> def bad_luck(self, their_move): <NEW_LINE> <INDENT> if their_move =... | Class of the Bad Luck Player
It always looses, unless the opponent is also a BadLuckPlayer. In this
case, it is even more funny to see.
Attribute
---------
nextmove : str
The next move based on what this player learned from the
previous round | 62598f4221a7993f00c651be |
class AssessmentWindowView(View): <NEW_LINE> <INDENT> def get(self, request, **kwargs): <NEW_LINE> <INDENT> assessment_id = request.GET.get('assessment_id') <NEW_LINE> assessment = IndividualAssessment.objects.get( id=assessment_id ) <NEW_LINE> questions = IndividualQuestion.objects.filter( assessment=assessment ).valu... | ' View to get questions to assessment window. | 62598f42462c4b4f79dbac44 |
class IAfterWidgetUpdateEvent(IWidgetEvent): <NEW_LINE> <INDENT> pass | An event sent out after the widget was updated. | 62598f42eab8aa0e5d30afbf |
class LiveFileHandler(FileSystemEventHandler): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.last_modified = datetime.now() <NEW_LINE> <DEDENT> def on_modified(self, event): <NEW_LINE> <INDENT> if datetime.now() - self.last_modified < timedelta(seconds=1): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDEN... | Watch a file change a emit an websocket event | 62598f42462c4b4f79dbac46 |
class On(object): <NEW_LINE> <INDENT> def __init__(self, *targets): <NEW_LINE> <INDENT> self.targets = Selection(*targets) <NEW_LINE> self.results = {} <NEW_LINE> self.total_results = [] <NEW_LINE> <DEDENT> def do(self, actions=[]): <NEW_LINE> <INDENT> self.results = {} <NEW_LINE> self.total_results = [] <NEW_LINE> for... | This is a helper class that works on [a [Selection]] of targets.
The main method is [self.do] that applies a number of [Actions] to the
[Selection] | 62598f42eab8aa0e5d30afc3 |
class TagValuesListApiView(generics.ListAPIView): <NEW_LINE> <INDENT> serializer_class = TagValueModelSerializer <NEW_LINE> permission_classes = (IsAuthenticated,) <NEW_LINE> pagination_class = None <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> tag_key = TagKey.objects.filter(**self.kwargs).first() <NEW_LINE> ... | 标签的值列表api | 62598f420a366e3fb87dbc1c |
class ReauthApi(Resource): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.reqparse = reqparse.RequestParser() <NEW_LINE> self.reqparse.add_argument('auth_token', type=str, required=True, help='No auth_token provided', location='json') <NEW_LINE> super(ReauthApi, self).__init__() <NEW_LINE> <DEDENT> de... | Class that manages the browser handling API | 62598f4221a7993f00c651c4 |
class ParserTransition(Edge): <NEW_LINE> <INDENT> def __init__(self, state_name, type_=None, next_state_name=None, next_state=None, mask=None, value=None): <NEW_LINE> <INDENT> super(ParserTransition, self).__init__(state_name, next_state_name if next_state_name is not None else 'sink') <NEW_LINE> assert (state_name is ... | Class representing the P4 parser transitions | 62598f423cc13d1c6d4649bf |
class WorkExperienceViewSet(mixins.CreateModelMixin, mixins.DestroyModelMixin, mixins.UpdateModelMixin, viewsets.GenericViewSet): <NEW_LINE> <INDENT> queryset = WorkExperience.objects.all() <NEW_LINE> serializer_class = WorkExperienceModelSerializer <NEW_LINE> lookup_field = 'pk' <NEW_LINE> def get_permissions(self): <... | User view set.
Handle sign up, login and account verification. | 62598f420a366e3fb87dbc22 |
class CropGraphicPixmapItem(FieldItemGraphicPixmapItem): <NEW_LINE> <INDENT> def __init__(self,graphics_list): <NEW_LINE> <INDENT> super().__init__(graphics_list) <NEW_LINE> self.crop = None <NEW_LINE> <DEDENT> def update_status(self): <NEW_LINE> <INDENT> if self.crop._status == "Seed": <NEW_LINE> <INDENT> self.setPixm... | This class provides a pixmap item with a preset image for teh crop | 62598f42462c4b4f79dbac50 |
class MeasureSupplementalData(backboneelement.BackboneElement): <NEW_LINE> <INDENT> resource_name = "MeasureSupplementalData" <NEW_LINE> def __init__(self, jsondict=None, strict=True): <NEW_LINE> <INDENT> self.criteria = None <NEW_LINE> self.identifier = None <NEW_LINE> self.path = None <NEW_LINE> self.usage = None <NE... | Supplemental data.
The supplemental data criteria for the measure report, specified as either
the name of a valid CQL expression within a referenced library, or a valid
FHIR Resource Path. | 62598f42eab8aa0e5d30afcb |
class DQNAgent(object): <NEW_LINE> <INDENT> def __init__(self, state_size, action_size, mode): <NEW_LINE> <INDENT> self.state_size = state_size <NEW_LINE> self.action_size = action_size <NEW_LINE> self.memory = deque(maxlen=2000) <NEW_LINE> self.gamma = 0.95 <NEW_LINE> if mode == "train": <NEW_LINE> <INDENT> self.epsil... | A simple Deep Q agent | 62598f420a366e3fb87dbc24 |
class FabricTest(object): <NEW_LINE> <INDENT> def setup(self): <NEW_LINE> <INDENT> clear_expectations() <NEW_LINE> self.previous_env = copy.deepcopy(env) <NEW_LINE> self.previous_output = output.items() <NEW_LINE> self.env_setup() <NEW_LINE> self.tmpdir = tempfile.mkdtemp() <NEW_LINE> <DEDENT> def set_network(self): <N... | Nose-oriented test runner which wipes state.env and provides file helpers. | 62598f42eab8aa0e5d30afcf |
class If(Expr): <NEW_LINE> <INDENT> def __init__(self, predicate, then_body, else_body): <NEW_LINE> <INDENT> super(If, self).__init__() <NEW_LINE> self.predicate = predicate <NEW_LINE> self.then_body = then_body <NEW_LINE> self.else_body = else_body <NEW_LINE> <DEDENT> def to_tuple(self): <NEW_LINE> <INDENT> return tup... | Class for COOL If...Then...Else block. | 62598f4221a7993f00c651d0 |
class AdHocTree(object): <NEW_LINE> <INDENT> __slots__ = ['parent', 'name'] <NEW_LINE> def __init__(self, parent=None, name="root"): <NEW_LINE> <INDENT> self.parent = parent <NEW_LINE> self.name = name <NEW_LINE> <DEDENT> def __call__(self, *args, **kwargs): <NEW_LINE> <INDENT> elements = list(self) <NEW_LINE> try: <NE... | builds an arbitrary tree structure using object attributes
:Usage:
>>> aht = AdHocTree().foo.bar
>>> aht
<AdHocTree: root/foo/bar>
- can be extended:
>>> newtree = newtree = aht.new_foo.new_bar
>>> newtree
<AdHocTree: root/foo/bar/new_foo/new_bar> | 62598f423cc13d1c6d4649cb |
class Retry(object): <NEW_LINE> <INDENT> def __init__(self, max_retry_count=-1, inc_sleep_time=10, max_sleep_time=60, exceptions=()): <NEW_LINE> <INDENT> self._max_retry_count = max_retry_count <NEW_LINE> self._inc_sleep_time = inc_sleep_time <NEW_LINE> self._max_sleep_time = max_sleep_time <NEW_LINE> self._exceptions ... | Decorator for retrying a function upon suggested exceptions.
The method retries for given number of times and the sleep
time increments till the max sleep time is reached.
If max retries is set to -1, then the decorated function is
invoked indefinitely till no exception is thrown or if
the caught exception is not in t... | 62598f42462c4b4f79dbac58 |
class MaxReRuns(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.default = Task.max_reruns <NEW_LINE> <DEDENT> def validator(self): <NEW_LINE> <INDENT> root = validator.factory('integer') <NEW_LINE> return root <NEW_LINE> <DEDENT> def on_task_start(self, task, config): <NEW_LINE> <INDENT> self.... | Overrides the maximum amount of re-runs allowed by a task. | 62598f43627d3e7fe0e060e6 |
@implementer(ICallToActionBehavior) <NEW_LINE> @adapter(IDexterityContent) <NEW_LINE> class CallToActionBehavior(object): <NEW_LINE> <INDENT> def __init__(self, context): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> <DEDENT> @property <NEW_LINE> def color(self): <NEW_LINE> <INDENT> if hasattr(self.context, 'co... | Adapter. | 62598f4321a7993f00c651d4 |
class Paddle(GRectangle): <NEW_LINE> <INDENT> def __init__(self,x,y,width,height,fillcolor): <NEW_LINE> <INDENT> GRectangle.__init__(self,x=x,y=y,width=width,height=height, fillcolor=fillcolor) <NEW_LINE> GRectangle(x=x,y=y,width=width,height=height, fillcolor=fillcolor).linecolor=fillcolor <NEW_LINE> <DEDENT> def coll... | An instance is the game paddle.
This class contains a method to detect collision with the ball, as well as
move it
left and right. You may wish to add more features to this class.
The attributes of this class are those inherited from GRectangle.
LIST MORE ATTRIBUTES (AND THEIR INVARIANTS) HERE IF NECESSARY | 62598f433cc13d1c6d4649d1 |
class TitFor2Tats(Player): <NEW_LINE> <INDENT> def strategy(self, opponent): <NEW_LINE> <INDENT> if opponent.history[-2:] == ['D', 'D']: <NEW_LINE> <INDENT> return 'D' <NEW_LINE> <DEDENT> return 'C' <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "Tit For 2 Tats" | A player starts by cooperating and then defects only after two defects by opponent. | 62598f4315fb5d323ce7df88 |
class DirectPaste(AbstractLinkWriter): <NEW_LINE> <INDENT> def getlink(self, filename, lineno, funcname): <NEW_LINE> <INDENT> return ('%s:%s' % (filename, lineno), "") | No-link writer (inliner)
| 62598f4321a7993f00c651d8 |
class MultipleVhostsTestGentoo(util.ApacheTest): <NEW_LINE> <INDENT> _multiprocess_can_split_ = True <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> test_dir = "gentoo_apache/apache" <NEW_LINE> config_root = "gentoo_apache/apache/apache2" <NEW_LINE> vhost_root = "gentoo_apache/apache/apache2/vhosts.d" <NEW_LINE> super(... | Multiple vhost tests for non-debian distro | 62598f43627d3e7fe0e060ee |
class V1beta1ThirdPartyResource(object): <NEW_LINE> <INDENT> def __init__(self, kind=None, apiVersion=None, metadata=None, description=None, versions=None): <NEW_LINE> <INDENT> self.swagger_types = { 'kind': 'str', 'apiVersion': 'str', 'metadata': 'V1ObjectMeta', 'description': 'str', 'versions': 'list[V1beta1APIVersio... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598f430a366e3fb87dbc33 |
class Item(db.Expando): <NEW_LINE> <INDENT> DRAFT, PUBLISHED, TRASH = range(3) <NEW_LINE> slug = db.StringProperty(indexed=True) <NEW_LINE> title = db.StringProperty(indexed=False) <NEW_LINE> content = db.TextProperty() <NEW_LINE> content_html = db.TextProperty() <NEW_LINE> status = db.IntegerProperty(indexed=True, def... | Model for all content | 62598f433cc13d1c6d4649d7 |
class CmsPluginPageCreator(CmsPageCreator): <NEW_LINE> <INDENT> placeholder_slots = () <NEW_LINE> def __init__(self, apphook, apphook_namespace, *args, **kwargs): <NEW_LINE> <INDENT> self.apphook = apphook <NEW_LINE> self.apphook_namespace = apphook_namespace <NEW_LINE> super(CmsPluginPageCreator, self).__init__(*args,... | Create a Django CMS plugin page and fill the content.
Useable for default production fixtures or unittests fixtures.
The idea is to inherit from this class and update it for your need by
overwrite some methods ;) | 62598f43462c4b4f79dbac66 |
class H5NetCDFStore(WritableCFDataStore): <NEW_LINE> <INDENT> def __init__(self, filename, mode='r', format=None, group=None, writer=None): <NEW_LINE> <INDENT> import h5netcdf.legacyapi <NEW_LINE> if format not in [None, 'NETCDF4']: <NEW_LINE> <INDENT> raise ValueError('invalid format for h5netcdf backend') <NEW_LINE> ... | Store for reading and writing data via h5netcdf
| 62598f43627d3e7fe0e060f6 |
class forcing_element_6_states(DT_TMM_Element_6_states): <NEW_LINE> <INDENT> def calculate_velocity_and_accel(self, i): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def calculate_ABDE(self, i, dt, int_case=2, debug=0, print_times=0): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def calculate_transfer_matrix(self, i, f=... | This is a base class for external forcing inputs to a DT-TMM
model. The plan is to try and just treat them like pure TMM
forcing elements: generate the transfer matrix directly without
worrying about ABDE, velocity or acceleration. Hopefully this
doesn't mess up other elements or the system. So, several methods
that... | 62598f43462c4b4f79dbac6c |
class PermissionMixin(object): <NEW_LINE> <INDENT> failure_redirect_path = reverse_lazy('accounts:profile') <NEW_LINE> permissions_required = None <NEW_LINE> def check_permission(self, user, view): <NEW_LINE> <INDENT> for permission in self.permissions_required: <NEW_LINE> <INDENT> if not has_object_permission(permissi... | Insert a permission in one class based view. | 62598f4315fb5d323ce7df9a |
class IGMPv3mra(Packet): <NEW_LINE> <INDENT> name = "IGMPv3mra" <NEW_LINE> fields_desc = [ShortField("qryIntvl", 0), ShortField("robust", 0)] | IGMP Multicast Router Advertisement extension for IGMPv3.
Payload of IGMPv3 when type=0x30 | 62598f4321a7993f00c651ea |
class Unauthorized(AuthError): <NEW_LINE> <INDENT> pass | Client needs to authenticate | 62598f4315fb5d323ce7df9c |
class ContainerDevice(object): <NEW_LINE> <INDENT> def __init__(self, device_id, name, make, model, device_class): <NEW_LINE> <INDENT> self.device_id = device_id <NEW_LINE> self.name = name <NEW_LINE> self.make = make <NEW_LINE> self.model = model <NEW_LINE> self.device_class = device_class | Attributes
----------
device_id : str
name : str
make : str
model : str
device_class : str | 62598f43462c4b4f79dbac72 |
class PubTelemetry(MosqPubBase): <NEW_LINE> <INDENT> def __init__(self, conf_path, pub_count=2000): <NEW_LINE> <INDENT> super().__init__(conf_path) <NEW_LINE> self.count = 0 <NEW_LINE> self.pub_count = pub_count <NEW_LINE> <DEDENT> def run(self, image_array, user_mode, user_angle, user_throttle, pilot_angle, pilot_thro... | スロットル、アングル値をMQTTブローカへPublishするPubTelemetryクラス。 | 62598f43627d3e7fe0e06100 |
class AppLaunch(tank.Hook): <NEW_LINE> <INDENT> def execute(self, app_path, app_args, version, **kwargs): <NEW_LINE> <INDENT> system = sys.platform <NEW_LINE> if system == "linux2": <NEW_LINE> <INDENT> cmd = "%s %s &" % (app_path, app_args) <NEW_LINE> <DEDENT> elif self.parent.get_setting("engine") in ["tk-flame", "tk-... | Hook to run an application. | 62598f4321a7993f00c651ee |
class _SingleHead(_Head): <NEW_LINE> <INDENT> __metaclass__ = abc.ABCMeta <NEW_LINE> def __init__( self, problem_type, logits_dimension, label_name=None, weight_column_name=None, head_name=None): <NEW_LINE> <INDENT> if problem_type is None: <NEW_LINE> <INDENT> raise ValueError("Invalid problem_type %s." % problem_type)... | Interface for a single head/top of a model. | 62598f43462c4b4f79dbac76 |
class EventContainer(object): <NEW_LINE> <INDENT> area_wide_rain_grids_filename = 'area_wide_rain_grids.json' <NEW_LINE> radar_grids_filename = 'radar_grids.json' <NEW_LINE> def __init__(self, path=None): <NEW_LINE> <INDENT> self._events = [] <NEW_LINE> if path is not None: <NEW_LINE> <INDENT> self.from_path(path) <NEW... | Container for events aka scenario | 62598f433cc13d1c6d4649ed |
class PreviousClanMemberStatusCog(commands.Cog): <NEW_LINE> <INDENT> bot: commands.Bot <NEW_LINE> def __init__(self, bot: commands.Bot): <NEW_LINE> <INDENT> self.bot = bot <NEW_LINE> <DEDENT> @commands.command("back") <NEW_LINE> async def previous_status(self, ctx: commands.context.Context): <NEW_LINE> <INDENT> if Util... | クラメンの凸状況をひとつ前の状態に戻す | 62598f44462c4b4f79dbac7a |
class CustomError(Exception): <NEW_LINE> <INDENT> def __init__(self, msg, cause): <NEW_LINE> <INDENT> Exception.__init__(self) <NEW_LINE> self.msg = msg <NEW_LINE> self.cause = cause | Defining a CustomError class. | 62598f44eab8aa0e5d30aff7 |
class BugCategory(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=100) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> verbose_name = 'Bug category' <NEW_LINE> verbose_name_plural = 'Bug categories' <NEW_LINE> ordering = ['name', ] <NEW_LINE> <DEDENT> @python_2_unicode_compatible <NEW_LINE> def __str__... | Category of bug report
This is important because when extracting similar bug reports,
only those reports of the same category are searched. | 62598f44462c4b4f79dbac7e |
class SimpleRecorder(RecorderBase): <NEW_LINE> <INDENT> def record_simple_info(self, content): <NEW_LINE> <INDENT> print(content, end='\n\n') <NEW_LINE> <DEDENT> def record_procedure(self, content): <NEW_LINE> <INDENT> print(content, end='\n\n') <NEW_LINE> <DEDENT> def record_exception(self, content): <NEW_LINE> <INDEN... | 简单打印 | 62598f44627d3e7fe0e0610c |
@implementer(IAgentEndpointFactory) <NEW_LINE> @attr.s <NEW_LINE> class _EndpointFactory(object): <NEW_LINE> <INDENT> reactor = attr.ib() <NEW_LINE> def endpointForURI(self, uri): <NEW_LINE> <INDENT> if uri.scheme not in {b'http', b'https'}: <NEW_LINE> <INDENT> raise SchemeNotSupported("Unsupported scheme: %r" % (uri.s... | An endpoint factory used by :class:`RequestTraversalAgent`.
:ivar reactor: The agent's reactor.
:type reactor: :class:`MemoryReactor` | 62598f44627d3e7fe0e0610e |
class Seat(Entity): <NEW_LINE> <INDENT> collection = 'seats' <NEW_LINE> resource = 'seat' <NEW_LINE> _relations = { 'advertiser', } <NEW_LINE> _rmx_units = t1types.enum({'CPM', 'PCT_MEDIA'}, 'PCT_MEDIA') <NEW_LINE> _pull = { 'bill_media_to_client': t1types.int_to_bool, 'created_on': t1types.strpt, 'id': int, 'organizat... | Seat entity. | 62598f4415fb5d323ce7dfae |
class Order(models.Model): <NEW_LINE> <INDENT> YES = 'YES' <NEW_LINE> NO = 'NO' <NEW_LINE> NEW = 'NEW' <NEW_LINE> APPROVAL_STATE = [ (YES, 'YES'), (NO, 'NO'), (NEW, 'NEW'), ] <NEW_LINE> country = models.CharField(max_length=255, blank=False) <NEW_LINE> first_name = models.CharField(max_length=255, blank=False) <NEW_LIN... | change these defaults wen time to move database | 62598f4415fb5d323ce7dfb0 |
class InvalidState(Exception): <NEW_LINE> <INDENT> pass | Exception class raised when an error occurs in :class:`.State`. | 62598f440a366e3fb87dbc5c |
class PolicyManager(base.CrudManager): <NEW_LINE> <INDENT> resource_class = Policy <NEW_LINE> collection_key = 'policies' <NEW_LINE> key = 'policy' <NEW_LINE> @positional(1, enforcement=positional.WARN) <NEW_LINE> def create(self, blob, type='application/json', **kwargs): <NEW_LINE> <INDENT> return super(PolicyManager,... | Manager class for manipulating Identity policies. | 62598f440a366e3fb87dbc5e |
class Continue(HTTPResponse): <NEW_LINE> <INDENT> status, reason, message = 100, "Continue", None | 100 Continue (RFC 2616) | 62598f44462c4b4f79dbac8c |
class AUBusinessNumberField(CharField): <NEW_LINE> <INDENT> default_validators = [AUBusinessNumberFieldValidator()] <NEW_LINE> def prepare_value(self, value): <NEW_LINE> <INDENT> if value is None: <NEW_LINE> <INDENT> return value <NEW_LINE> <DEDENT> spaceless = ''.join(value.split()) <NEW_LINE> return '{} {} {} {}'.for... | A form field that validates input as an Australian Business Number (ABN)
.. versionadded:: 1.3 | 62598f440a366e3fb87dbc60 |
class RP(dns_rdata.Rdata): <NEW_LINE> <INDENT> __slots__ = ['mbox', 'txt'] <NEW_LINE> def __init__(self, rdclass, rdtype, mbox, txt): <NEW_LINE> <INDENT> super(RP, self).__init__(rdclass, rdtype) <NEW_LINE> self.mbox = mbox <NEW_LINE> self.txt = txt <NEW_LINE> <DEDENT> def to_text(self, origin=None, relativize=True, **... | RP record
@ivar mbox: The responsible person's mailbox
@type mbox: dns_name.Name object
@ivar txt: The owner name of a node with TXT records, or the root name
if no TXT records are associated with this RP.
@type txt: dns_name.Name object
@see: RFC 1183 | 62598f4415fb5d323ce7dfc1 |
class Provider(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=75) <NEW_LINE> description = models.TextField(default='No description available.') <NEW_LINE> website = models.URLField(blank=True, null=True) <NEW_LINE> measures = models.ManyToManyField(Measure, null=True, blank=True) <NEW_LINE> logo... | Displayed as an advert next to measure pages | 62598f44462c4b4f79dbac98 |
class NullWebAuthManager(BaseWebAuthManager): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(NullWebAuthManager, self).__init__(*args, **kwargs) <NEW_LINE> self.username = "test" <NEW_LINE> <DEDENT> def SetUserName(self, username): <NEW_LINE> <INDENT> self.username = username <NEW_LI... | Null web auth manager always returns test user unless set. | 62598f453cc13d1c6d464a11 |
class APIPluginsRequest(APIRequest): <NEW_LINE> <INDENT> @server_side <NEW_LINE> def dispatch(self): <NEW_LINE> <INDENT> res = APIPluginsResponse() <NEW_LINE> return res | API plugins request.
{
"type": "request",
"request": "plugins"
} | 62598f4515fb5d323ce7dfc8 |
class Token(db.Model): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> token = db.Column(db.String(128), index=True) <NEW_LINE> type = db.Column(db.String(10)) <NEW_LINE> timestamp = db.Column(db.Integer, default=int(time())) <NEW_LINE> file_id = db.Column(db.Integer, db.ForeignKey('file.id'... | Token database model
Stores information about every token generated.
From pagination to confirmation and resetting passwords, this database is used in everything. | 62598f4515fb5d323ce7dfca |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.