code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class LogRaptorConfigError(LogRaptorException): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> Exception.__init__(self, message) <NEW_LINE> logger.debug('!ConfigError: {0}'.format(message)) | Error in a configuration file or a misconfiguration of the package. | 6259904282261d6c52730833 |
class Proxy: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.occupied = 'No' <NEW_LINE> self.producer = None <NEW_LINE> <DEDENT> def produce(self): <NEW_LINE> <INDENT> print("Artist checking if producer is available...") <NEW_LINE> if self.occupied == 'No': <NEW_LINE> <INDENT> self.producer = Producer(... | Define teh 'relatively less resource-intensive' proxyton instantiate as a middleman | 625990426e29344779b01931 |
class AreaInfoHandler(BaseHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> ret = self.redis.get("area_info") <NEW_LINE> <DEDENT> except Exception as e: <NEW_LINE> <INDENT> logging.error(e) <NEW_LINE> ret = None <NEW_LINE> <DEDENT> if ret: <NEW_LINE> <INDENT> logging.debug(ret) <... | 区域选择 | 62599042e76e3b2f99fd9ce9 |
class Registro0000(Registro): <NEW_LINE> <INDENT> campos = [ CampoFixo(1, 'REG', '0000'), CampoFixo(2, 'LECD', 'LECD'), CampoData(3, 'DT_INI'), CampoData(4, 'DT_FIN'), Campo(5, 'NOME'), Campo(6, 'CNPJ'), Campo(7, 'UF'), Campo(8, 'IE'), CampoNumerico(9, 'COD_MUN'), Campo(10, 'IM'), Campo(11, 'IND_SIT_ESP'), Campo(12, 'I... | ABERTURA DO ARQUIVO DIGITAL E IDENTIFICAÇÃO DO EMPRESÁRIO OU DA SOCIEDADE
EMPRESÁRIA | 625990421f5feb6acb163ed2 |
class ModePlugin(): <NEW_LINE> <INDENT> def get_match_results( self, search_term=None, page=1, text=None, response=None, session=None, url=None): <NEW_LINE> <INDENT> parsed_url = urlparse('https://www.google.com/search') <NEW_LINE> url_query = { 'asearch': 'ichunk', 'async': '_id:rg_s,_pms:s,_fmt:pc', 'ijn': str(page -... | Base class for parser plugin. | 6259904223e79379d538d7dc |
class memoize(object): <NEW_LINE> <INDENT> def __init__(self, func): <NEW_LINE> <INDENT> self.func = func <NEW_LINE> <DEDENT> def __get__(self, obj, objtype=None): <NEW_LINE> <INDENT> if obj is None: <NEW_LINE> <INDENT> return self.func <NEW_LINE> <DEDENT> return partial(self, obj) <NEW_LINE> <DEDENT> def __call__(self... | cache the return value of a method
This class is meant to be used as a decorator of methods. The return value
from a given method invocation will be cached on the instance whose method
was invoked. All arguments passed to a method decorated with memoize must
be hashable.
If a memoized method is invoked directly on it... | 62599042dc8b845886d54897 |
class data_generator(DataGenerator): <NEW_LINE> <INDENT> def __iter__(self, random=False): <NEW_LINE> <INDENT> batch_token_ids, batch_segment_ids = [], [] <NEW_LINE> for is_end, (question, equation, answer) in self.sample(random): <NEW_LINE> <INDENT> token_ids, segment_ids = tokenizer.encode( question, equation, maxlen... | 数据生成器
| 6259904207f4c71912bb0711 |
class Criteria: <NEW_LINE> <INDENT> def __init__(self, key: str, format_func, acc_mean: bool): <NEW_LINE> <INDENT> self._key = key <NEW_LINE> self._format_func = format_func <NEW_LINE> self._acc_mean = acc_mean <NEW_LINE> global _all_criterias <NEW_LINE> if self._key in _all_criterias: <NEW_LINE> <INDENT> raise ValueEr... | An object of this class represents one criteria that can be used to evaluate net performance. | 62599042d4950a0f3b1117b0 |
class QuizQuestion(models.Model): <NEW_LINE> <INDENT> u <NEW_LINE> quiz = models.ForeignKey('quiz.Quiz', verbose_name="Quiz") <NEW_LINE> question = models.ForeignKey('quiz.Question', verbose_name="Questão") <NEW_LINE> number = models.IntegerField(verbose_name="Número") <NEW_LINE> def save(self, *args, **kwargs): <NEW_L... | Classe que representa as questões de um quiz. | 625990421d351010ab8f4dfd |
class TestIsIterable(unittest.TestCase): <NEW_LINE> <INDENT> def test_is_iterable(self): <NEW_LINE> <INDENT> self.assertTrue(is_iterable('')) <NEW_LINE> self.assertTrue(is_iterable(())) <NEW_LINE> self.assertTrue(is_iterable([])) <NEW_LINE> self.assertTrue(is_iterable(dict())) <NEW_LINE> self.assertTrue(is_iterable(np.... | Defines :func:`colour.algebra.common.is_iterable` definition unit tests
methods. | 6259904250485f2cf55dc264 |
class AgencyESGActivity(models.Model): <NEW_LINE> <INDENT> id = models.AutoField(primary_key=True) <NEW_LINE> agency = models.ForeignKey('Agency', on_delete=models.CASCADE) <NEW_LINE> activity = models.CharField(max_length=500) <NEW_LINE> activity_display = models.CharField(max_length=500, blank=True, null=True) <NEW_L... | External quality assurance activities in the scope of the ESG. | 6259904221a7993f00c67247 |
class BoreHole(object): <NEW_LINE> <INDENT> def __init__(self, fname): <NEW_LINE> <INDENT> self._fname = fname <NEW_LINE> self._load() <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return self.__class__.__name__ + '("{}")'.format(self._fname) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> out ... | Class to load and store data from a borehole. Each row in the data file
must contain a start depth [m], end depth and a classification. The values
should be separated by whitespace. The first line should contain the
inline position (x and z), text ID and an offset for the text
(for plotting).
The format is very simple... | 6259904210dbd63aa1c71eb7 |
class WorkerMiddleware(MiddlewareMixin if django_version_ge('1.10.0') else object): <NEW_LINE> <INDENT> def process_request(self, request): <NEW_LINE> <INDENT> assert hasattr(request, "user"), "Worker middleware requires authentication middleware to be installed. Also make sure the database is set and writable." <NEW_L... | Sets a request.worker.
- Worker instance if username exists in database
- None otherwise | 62599042d6c5a102081e3405 |
class PeekingIterator(object): <NEW_LINE> <INDENT> def __init__(self, iterator): <NEW_LINE> <INDENT> self.iter = iterator <NEW_LINE> self.temp = self.iter.next() if self.iter.hasNext() else None <NEW_LINE> <DEDENT> def peek(self): <NEW_LINE> <INDENT> return self.temp <NEW_LINE> <DEDENT> def next(self): <NEW_LINE> <INDE... | 题意是求构造一个peek迭代的类对象
Runtime: 24 ms, faster than 28.60% of Python online submissions for Peeking Iterator.
Memory Usage: 11.9 MB, less than 46.67% of Python online submissions for Peeking Iterator. | 6259904273bcbd0ca4bcb56a |
class Dataloader: <NEW_LINE> <INDENT> TRAIN = 'train' <NEW_LINE> TEST = 'test' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def length(self, portion): <NEW_LINE> <INDENT> raise NotImplementedError("Implement length in child class!") <NEW_LINE> <DEDENT> def num_classes(self): <NEW_LINE> <I... | Base class for loading data; any other dataset loading class should inherit from this to ensure consistency
In addition to these functions, also define
1. self.classes which contains strings of all class labels by id,
ie self.classes[0] should give class name of class id 0. See Adience/UTKFace/CIFAR10 classes below
... | 625990428e05c05ec3f6f7cb |
class BetaAssetServicer(object): <NEW_LINE> <INDENT> pass <NEW_LINE> def GetAsset(self, request, context): <NEW_LINE> <INDENT> pass <NEW_LINE> context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) | The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This class was generated
only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0. | 62599042baa26c4b54d50589 |
class TestPuppetProvisioner(object): <NEW_LINE> <INDENT> @pytest.fixture <NEW_LINE> def manifest_dir(self) -> str: <NEW_LINE> <INDENT> __dirname = os.path.dirname(os.path.realpath(__file__)) <NEW_LINE> return os.path.join(__dirname, "assets/puppet-offline-repo") <NEW_LINE> <DEDENT> def test_can_provision_from_local_pup... | Run Puppet Provisioner tests. | 6259904229b78933be26aa33 |
class FunctionClassFactory(FunctionClassFactoryBase): <NEW_LINE> <INDENT> FUNCTION_NAMES = ( 'urn:oasis:names:tc:xacml:1.0:function:string-equal', 'urn:oasis:names:tc:xacml:1.0:function:boolean-equal', 'urn:oasis:names:tc:xacml:1.0:function:integer-equal', 'urn:oasis:names:tc:xacml:1.0:function:double-equal', 'urn:oasi... | Class Factory for *-equal XACML function classes
@cvar FUNCTION_NAMES: equal function URNs
@type FUNCTION_NAMES: tuple
@cvar FUNCTION_NS_SUFFIX: generic suffix for equal function URNs
@type FUNCTION_NS_SUFFIX: string
@cvar FUNCTION_BASE_CLASS: base class for all equal function classes
@type FUNCTION_BASE_CLASS: ndg.... | 6259904223e79379d538d7df |
class TestOmerNoInConfigFile(TestOmerFalseInConfigFile): <NEW_LINE> <INDENT> config_data = "omer = no" | Test "omer = no" in configuration file. | 62599042b830903b9686edea |
@export <NEW_LINE> class AmbiguousDataRequest(Exception): <NEW_LINE> <INDENT> def __init__(self, found, message=''): <NEW_LINE> <INDENT> super().__init__(message) <NEW_LINE> self.found = found | Raised when more than one piece of data match a users' request | 6259904221a7993f00c67249 |
class ShapelinkAccumulator: <NEW_LINE> <INDENT> def __init__( self, shapelink_obj, name ): <NEW_LINE> <INDENT> self.shapelink_obj = shapelink_obj <NEW_LINE> self.name = name <NEW_LINE> <DEDENT> def __repr__( self ): <NEW_LINE> <INDENT> return self.name <NEW_LINE> <DEDENT> def __call__(self, *args, **kw ): <NEW... | Used by Shapelink API object to generate methods for all Shapelink API calls | 6259904221bff66bcd723f4c |
class Die: <NEW_LINE> <INDENT> def __init__(self, possible_values: Sequence) -> None: <NEW_LINE> <INDENT> self._all_values = possible_values <NEW_LINE> self._value = random.choice(self._all_values) <NEW_LINE> <DEDENT> @property <NEW_LINE> def value(self): <NEW_LINE> <INDENT> return self._value <NEW_LINE> <DEDENT> @valu... | Class Die | 62599042c432627299fa4272 |
class OsDelCommand(TemareCommand): <NEW_LINE> <INDENT> def __init__(self, base): <NEW_LINE> <INDENT> TemareCommand.__init__(self, base) <NEW_LINE> self.names = ['osdel'] <NEW_LINE> self.usage = 'OSTYPE' <NEW_LINE> self.summary = 'Remove an operating system type' <NEW_LINE> self.description = ' OSTYPE Nam... | Remove an operating system type
| 6259904230c21e258be99ae8 |
class TestLexerSimple(BaseTestLexer): <NEW_LINE> <INDENT> def test_empty(self): <NEW_LINE> <INDENT> self.run_assert_lexer("", []) <NEW_LINE> <DEDENT> def test_simple(self): <NEW_LINE> <INDENT> input_data = "a 42" <NEW_LINE> exp_tokens = [ self.lex_token('IDENTIFIER', 'a', 1, 0), self.lex_token('decimalValue', 42, 1, 2)... | Simple testcases for the lexical analyzer. | 6259904266673b3332c316db |
class WSGIGateway_10(WSGIGateway): <NEW_LINE> <INDENT> def get_environ(self): <NEW_LINE> <INDENT> req = self.req <NEW_LINE> env = { 'ACTUAL_SERVER_PROTOCOL': req.server.protocol, 'PATH_INFO': bton(req.path), 'QUERY_STRING': bton(req.qs), 'REMOTE_ADDR': req.conn.remote_addr or '', 'REMOTE_PORT': str(req.conn.remote_port... | A Gateway class to interface HTTPServer with WSGI 1.0.x. | 6259904273bcbd0ca4bcb56c |
class Newsletter(models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=255, blank=False) <NEW_LINE> active = models.BooleanField(blank=False) <NEW_LINE> from_email = models.CharField(max_length=255, blank=False, default=getattr(settings, 'NOVA_FROM_EMAIL', ''), help_text=_("The address that issues of t... | A basic newsletter model.
:todo: Change default_template to a TextField? | 62599042b57a9660fecd2d5d |
class ConcentratorS02(ConcentratorWithMetersWithConcentratorName): <NEW_LINE> <INDENT> @property <NEW_LINE> def meter_class(self): <NEW_LINE> <INDENT> return MeterS02 | Class for a concentrator of report S02. | 6259904282261d6c52730835 |
class CompactLatticeEncodeMapper(_EncodeMapper, _encode.CompactLatticeEncodeMapper): <NEW_LINE> <INDENT> pass | Arc encoder for an FST over the compact lattice semiring. | 62599042a8ecb033258724f3 |
class MultiAgentDialogWorld(World): <NEW_LINE> <INDENT> def __init__(self, opt, agents=None, shared=None): <NEW_LINE> <INDENT> super().__init__(opt) <NEW_LINE> if shared: <NEW_LINE> <INDENT> self.agents = create_agents_from_shared(shared['agents']) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.agents = agents <NEW... | Basic world where each agent gets a turn in a round-robin fashion,
receiving as input the actions of all other agents since that agent last
acted. | 6259904229b78933be26aa34 |
class NewSNRStatistic(Stat): <NEW_LINE> <INDENT> def single(self, trigs): <NEW_LINE> <INDENT> return get_newsnr(trigs) <NEW_LINE> <DEDENT> def coinc(self, s0, s1, slide, step): <NEW_LINE> <INDENT> return (s0**2. + s1**2.) ** 0.5 <NEW_LINE> <DEDENT> def coinc_multiifo(self, s, slide, step, ): <NEW_LINE> <INDENT> return ... | Calculate the NewSNR coincident detection statistic | 62599042596a897236128f20 |
class AuthorizationException(TokenException): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(AuthorizationException, self).__init__() | Thrown when a user has tried to access a page for which they need a
token. | 625990421d351010ab8f4e01 |
class Model(object): <NEW_LINE> <INDENT> def __init__(self, model_type, is_train, grid_size): <NEW_LINE> <INDENT> self.model_type = model_type <NEW_LINE> self.is_train = is_train <NEW_LINE> self.grid_size = grid_size <NEW_LINE> <DEDENT> def __call__(self, img_a, img_b, labels): <NEW_LINE> <INDENT> self.img_a = img_a <N... | Create a model for training/testing | 6259904216aa5153ce4017d0 |
class SplitProduction(Wizard): <NEW_LINE> <INDENT> __name__ = 'production.split' <NEW_LINE> start = StateView('production.split.start', 'production_split.split_start_view_form', [ Button('Cancel', 'end', 'tryton-cancel'), Button('Split', 'split', 'tryton-ok', default=True), ]) <NEW_LINE> split = StateTransition() <NEW_... | Split Production | 6259904221a7993f00c6724b |
class ValidationError(Exception): <NEW_LINE> <INDENT> def __init__(self, message:str): <NEW_LINE> <INDENT> Exception.__init__(self, message) | This is used for the `validate()` method, indicating invalidation. | 62599042e64d504609df9d42 |
class GouvFrMetricsTest(DBTestMixin, TestCase): <NEW_LINE> <INDENT> settings = GouvFrSettings <NEW_LINE> def test_public_services(self): <NEW_LINE> <INDENT> ps_badge = Badge(kind=PUBLIC_SERVICE) <NEW_LINE> public_services = [ OrganizationFactory(badges=[ps_badge]) for _ in range(2) ] <NEW_LINE> for _ in range(3): <NEW_... | Check metrics | 6259904221bff66bcd723f4e |
class Speller(Decoder): <NEW_LINE> <INDENT> def __init__(self, conf, output_dim, name=None): <NEW_LINE> <INDENT> self.sample_prob = float(conf['speller_sample_prob']) <NEW_LINE> self.numlayers = int(conf['speller_numlayers']) <NEW_LINE> self.numunits = int(conf['speller_numunits']) <NEW_LINE> self.dropout = float(conf[... | a speller decoder for the LAS architecture | 62599042507cdc57c63a607f |
class Tag(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=255) <NEW_LINE> user = models.ForeignKey( settings.AUTH_USER_MODEL, on_delete=models.CASCADE ) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.name | Tags to be used for a recipe | 62599042287bf620b6272eca |
class S3EventNeedModel(S3Model): <NEW_LINE> <INDENT> names = ("event_event_need", ) <NEW_LINE> def model(self): <NEW_LINE> <INDENT> if current.deployment_settings.get_event_cascade_delete_incidents(): <NEW_LINE> <INDENT> ondelete = "CASCADE" <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> ondelete = "SET NULL" <NEW_LINE>... | Link Events &/or Incidents with Needs | 6259904230c21e258be99aea |
class __metaclass__(type): <NEW_LINE> <INDENT> def __new__(cls, name, bases, dic): <NEW_LINE> <INDENT> if name == 'mk_obj': <NEW_LINE> <INDENT> return type.__new__(cls, name, bases, dic) <NEW_LINE> <DEDENT> del dic['__module__'] <NEW_LINE> mangling = '_%s__' % name <NEW_LINE> msize = len(mangling) <NEW_LINE> for arg_na... | Optional fields should start with double underscores
Examples
--------
Schema initialized using the class inheritance notation
>>> from pyson.schema import *
>>> class Date(mk_obj):
... year = Int()
... month = Int()
... day = Int()
... __is_end_of_the_world = Bool()
>>> Date().is_valid({'year': 201... | 6259904215baa72349463276 |
class OneOf(DetectAugment): <NEW_LINE> <INDENT> def __init__(self, transforms, **kwargs): <NEW_LINE> <INDENT> super(OneOf, self).__init__(**kwargs) <NEW_LINE> self.p = 1 <NEW_LINE> if isinstance(transforms[0], DetectAugment): <NEW_LINE> <INDENT> prob = float(1 / len(transforms)) <NEW_LINE> transforms = [(prob, transfor... | 随即一个增强方式进行增强 | 6259904273bcbd0ca4bcb56f |
class Logger: <NEW_LINE> <INDENT> def __init__(self, mode, *files): <NEW_LINE> <INDENT> self.mode = mode <NEW_LINE> self.files = files <NEW_LINE> <DEDENT> def __call__(self, func): <NEW_LINE> <INDENT> def wrapper(*args, **kwargs): <NEW_LINE> <INDENT> to_log = [] <NEW_LINE> if self.mode[0] == '1': <NEW_LINE> <INDENT> to... | Los modos para el logger se definen como 3 bit:
El primer es para guardar el nombre de la funcion que se invoca
El segundo es para guardar los parametros que se le pasan a la funcion
El tercero es para guardar el __str__ del resultado de la funcion | 625990421f5feb6acb163ed8 |
class MailerDeferredEmailsProcessorTestCase(TestCase): <NEW_LINE> <INDENT> longMessage = True <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.normal_messages = mixer.cycle(10).blend( 'mailer.Message', priority=PRIORITY_MEDIUM) <NEW_LINE> <DEDENT> def test_deferred_emails(self): <NEW_LINE> <INDENT> self.assertEqual... | Test case for the ``deferred_emails`` django-mailer processor. | 625990428da39b475be044d3 |
class MyDecorator(type): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def magic_decorator(mcs, arg=None): <NEW_LINE> <INDENT> def decorator(_func): <NEW_LINE> <INDENT> def wrapper(*a, **ka): <NEW_LINE> <INDENT> ffunc = a[0] <NEW_LINE> mcs._wrapper(ffunc, *a[1:], **ka) <NEW_LINE> return ffunc <NEW_LINE> <DEDENT> return w... | Metaclass that provides a decorator able to be invoked both with and without parenthesis.
The wrapper function logic should be implemented by the client code. | 62599042d164cc617582225c |
class AboutController(BaseController): <NEW_LINE> <INDENT> def index(self,id=None): <NEW_LINE> <INDENT> template = "about.html" <NEW_LINE> return render(template,{"names":[id,'Souphaphone','Phathitmyxay']}) | Generates error documents as and when they are required.
The ErrorDocuments middleware forwards to ErrorController when error
related status codes are returned from the application.
This behaviour can be altered by changing the parameters to the
ErrorDocuments middleware in your config/middleware.py file. | 62599042711fe17d825e160f |
class SampleDiversityRarefaction(Target): <NEW_LINE> <INDENT> def __init__(self, outdir, sample, samdir, sizes, numsampling, indices, avrdir, workdir): <NEW_LINE> <INDENT> Target.__init__(self) <NEW_LINE> self.outdir = outdir <NEW_LINE> self.sample = sample <NEW_LINE> self.samdir = samdir <NEW_LINE> self.sizes = sizes ... | Perform rarefaction analyses on the specific sample
"numsampling" of times | 62599043097d151d1a2c234d |
class Logarithmic1D(Fittable1DModel): <NEW_LINE> <INDENT> amplitude = Parameter(default=1) <NEW_LINE> tau = Parameter(default=1) <NEW_LINE> @staticmethod <NEW_LINE> def evaluate(x, amplitude, tau): <NEW_LINE> <INDENT> return amplitude * np.log(x / tau) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def fit_deriv(x, ampli... | One dimensional logarithmic model.
Parameters
----------
amplitude : float, optional
tau : float, optional
See Also
--------
Exponential1D, Gaussian1D | 62599043be383301e0254afd |
class BObject(BCell): <NEW_LINE> <INDENT> def __init__(self, theX, theY, theName, **kwargs): <NEW_LINE> <INDENT> super(BObject, self).__init__(theX, theY, theName, **kwargs) <NEW_LINE> self.attrs = Attributes() <NEW_LINE> self.walkable = False <NEW_LINE> <DEDENT> def __getattr__(self, attr): <NEW_LINE> <INDENT> if 'att... | BObject class derives from BCell and it implements particular
functionality for cells in the OBJECT layer. | 6259904345492302aabfd7bf |
class Image(Context, TemporaryImage): <NEW_LINE> <INDENT> __tablename__ = 'image' <NEW_LINE> id = Column(Integer, ForeignKey('context.id', ondelete='CASCADE'), primary_key=True) <NEW_LINE> document_id = Column(Integer, ForeignKey('document.id', ondelete='CASCADE')) <NEW_LINE> position = Column(Integer... | A span of characters, identified by Context id and character-index start, end (inclusive).
char_offsets are **relative to the Context start** | 625990431d351010ab8f4e03 |
class StaticSourceNAT(NATElement): <NEW_LINE> <INDENT> typeof = "static_src_nat" | Source NAT defines the available options for configuration. This is
typically used for outbound traffic where you need to hide the original
source address.
Example of changing existing source NAT rule to use a different source
NAT address::
for rule in policy.fw_ipv4_nat_rules.all():
if rule.name == 'sour... | 6259904315baa72349463277 |
class DQN(nn.Module): <NEW_LINE> <INDENT> def __init__(self, args, state_size, action_size, fc1_units=64, fc2_units=64): <NEW_LINE> <INDENT> super(DQN, self).__init__() <NEW_LINE> self.seed = torch.manual_seed(args.seed) <NEW_LINE> self.fc1 = nn.Linear(state_size, fc1_units) <NEW_LINE> self.fc2 = nn.Linear(fc1_units, f... | Actor (Policy) Model. | 62599043507cdc57c63a6081 |
class DownTriangle(T): <NEW_LINE> <INDENT> def draw(self, can, x, y): <NEW_LINE> <INDENT> can.polygon(self.line_style, self.fill_style, ((x, y-self.size/2.0), (x-self.size/1.6, y+self.size/2.0), (x+self.size/1.6, y+self.size/2.0))) | Draws a triangle pointing down. | 62599043d53ae8145f919743 |
class CodeRepresentationError(Exception): <NEW_LINE> <INDENT> pass | Type of error occurring when there is a problem getting the
code-representation of a value. | 6259904363b5f9789fe86451 |
class OutputPluginDescriptor(rdfvalue.RDFProtoStruct): <NEW_LINE> <INDENT> protobuf = output_plugin_pb2.OutputPluginDescriptor <NEW_LINE> def GetPluginClass(self): <NEW_LINE> <INDENT> if self.plugin_name: <NEW_LINE> <INDENT> plugin_cls = OutputPlugin.classes.get(self.plugin_name) <NEW_LINE> if plugin_cls is None: <NEW_... | An rdfvalue describing the output plugin to create. | 62599043004d5f362081f958 |
class DeleteProcedureTemplateResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RequestId = params.get("RequestId") | DeleteProcedureTemplate response structure.
| 625990438e71fb1e983bcdb4 |
class AsyncChannel: <NEW_LINE> <INDENT> _resolver_configured = False <NEW_LINE> @classmethod <NEW_LINE> def _config_resolver(cls, num_threads=10): <NEW_LINE> <INDENT> import salt.ext.tornado.netutil <NEW_LINE> salt.ext.tornado.netutil.Resolver.configure( "salt.ext.tornado.netutil.ThreadedResolver", num_threads=num_thre... | Parent class for Async communication channels | 6259904373bcbd0ca4bcb570 |
class Auth(Structure): <NEW_LINE> <INDENT> __slots__ = ('data', ) <NEW_LINE> _format = "<128s" <NEW_LINE> op_code = Operations.AUTH <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return f"Auth(op_code={self.op_code}, data={self.data})" | Authentication Request
from an Agent to server! | 6259904382261d6c52730837 |
class AzureDataLakeHook(BaseHook): <NEW_LINE> <INDENT> def __init__(self, azure_data_lake_conn_id='azure_data_lake_default'): <NEW_LINE> <INDENT> self.conn_id = azure_data_lake_conn_id <NEW_LINE> self.connection = self.get_conn() <NEW_LINE> <DEDENT> def get_conn(self): <NEW_LINE> <INDENT> conn = self.get_connection(sel... | Interacts with Azure Data Lake.
Client ID and client secret should be in user and password parameters.
Tenant and account name should be extra field as
{"tenant": "<TENANT>", "account_name": "ACCOUNT_NAME"}.
:param azure_data_lake_conn_id: Reference to the Azure Data Lake connection.
:type azure_data_lake_conn_id: st... | 62599043b57a9660fecd2d61 |
class PostViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = models.BoastsRoastsModel.objects.all() <NEW_LINE> serializer_class = serializers.PostSerializer <NEW_LINE> @action(detail=False) <NEW_LINE> def boasts(self,request,pk=None): <NEW_LINE> <INDENT> all_boasts = models.BoastsRoastsModel.objects.filter(... | API endpoint that allows Posts to be viewed | 62599043e76e3b2f99fd9cf1 |
class Spider(NewsSpider): <NEW_LINE> <INDENT> name = "院系/法政" <NEW_LINE> list_urls = [ "http://www3.ouc.edu.cn/fzxy/xydtmore.aspx?id=1", "http://www3.ouc.edu.cn/fzxy/xydtmore.aspx?id=2", "http://www3.ouc.edu.cn/fzxy/xydtmore.aspx?id=3", "http://www3.ouc.edu.cn/fzxy/xydtmore.aspx?id=4", "http://www3.ouc.edu.cn/fzxy/xydtm... | 法政学院
注意这个网站 page.aspx 和 pagestu.aspx 页面的标签id不完全一样 | 62599043d53ae8145f919744 |
class CustomBackend(object): <NEW_LINE> <INDENT> def get_by_secret_key(self,key,password): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> user = User.objects.get(secret_key=key) <NEW_LINE> if password: <NEW_LINE> <INDENT> if user.check_password(password): <NEW_LINE> <INDENT> return user <NEW_LINE> <DEDENT> <DEDENT> else:... | authenticate when given email,phone number or secret key and password | 6259904323e79379d538d7e5 |
class ModuleCreatorWithApps(ModuleCreator): <NEW_LINE> <INDENT> def __init__(self, module_path, area, module_template, **kwargs): <NEW_LINE> <INDENT> if 'app_name' not in kwargs: <NEW_LINE> <INDENT> raise ArgumentError("'app_name' must be provided as keyword " "argument.") <NEW_LINE> <DEDENT> super(ModuleCreatorWithApp... | Abstract class for the management of the creation of app-based modules.
Attributes:
_app_name: The name of the app for the new module.
This is a separate folder in each git repository, corresponding to
the newly created module.
Raises:
:class:`~dls_ade.exceptions.ArgumentError`: If 'app_name' ... | 62599043097d151d1a2c234f |
class ClassInstance(Base): <NEW_LINE> <INDENT> __tablename__ = 'class_instances' <NEW_LINE> id = sa.Column(sa.Integer, sa.Sequence('class_instance_id_seq'), primary_key=True) <NEW_LINE> class_id = sa.Column(sa.Integer, sa.ForeignKey(Class.id), nullable=False) <NEW_LINE> period_id = sa.Column(sa.Integer, sa.ForeignKey(P... | | A ClassInstance is the existence of a :py:class:`Class` with a temporal period associated with it.
| There's a lot of redundancy between different ClassInstances of the same :py:class:`Class`, but sometimes the
associated information and related teachers change wildly. | 625990436fece00bbacccc99 |
class PageMassChangeForm(SelfHandlingForm): <NEW_LINE> <INDENT> page_id = forms.IntegerField( label=_('Page ID'), widget=forms.widgets.HiddenInput) <NEW_LINE> color_scheme = PageColorSchemeSelectField( label=_('Color Scheme'), required=False ) <NEW_LINE> theme = PageThemeSelectField( label=_('Theme'), required=False ) ... | Page Mass Update
Form for mass update of page theme, color scheme and layout | 625990438c3a8732951f7841 |
class Gate(UGen): <NEW_LINE> <INDENT> _ordered_input_names = collections.OrderedDict([("source", None), ("trigger", 0)]) <NEW_LINE> _valid_calculation_rates = (CalculationRate.AUDIO, CalculationRate.CONTROL) | Gates or holds.
::
>>> source = supriya.ugens.WhiteNoise.ar()
>>> trigger = supriya.ugens.Dust.kr(1)
>>> gate = supriya.ugens.Gate.ar(
... source=source,
... trigger=trigger,
... )
>>> gate
Gate.ar() | 6259904382261d6c52730838 |
class ErrorChainTest(TestCase): <NEW_LINE> <INDENT> def test_direct_loop(self): <NEW_LINE> <INDENT> self.assertEqual( _build_error_chain( "group1", "group1", [], ), ["group1", "group1"], ) <NEW_LINE> <DEDENT> def test_simple_indirect_loop(self): <NEW_LINE> <INDENT> self.assertEqual( _build_error_chain( "group1", "group... | Tests blockwart.group._build_error_chain. | 6259904373bcbd0ca4bcb572 |
class MasterLuaHighlighter(MasterHighlighter): <NEW_LINE> <INDENT> extensions = ["lua"] <NEW_LINE> comment = "--" <NEW_LINE> multilineComment = ("--[[", "]]") <NEW_LINE> def getRules(self): <NEW_LINE> <INDENT> return [ [ "[(){}[\]]", QtCore.Qt.darkMagenta, QtCore.Qt.magenta, QtGui.QFont.Bold ], [ r"\b(?:and|break|do|el... | Lua syntax highlighter.
| 625990438a349b6b43687531 |
class RSELimit(BASE, ModelBase): <NEW_LINE> <INDENT> __tablename__ = 'rse_limits' <NEW_LINE> rse_id = Column(GUID()) <NEW_LINE> name = Column(String(255)) <NEW_LINE> value = Column(BigInteger) <NEW_LINE> _table_args = (PrimaryKeyConstraint('rse_id', 'name', name='RSE_LIMITS_PK'), ForeignKeyConstraint(['rse_id'], ['rses... | Represents RSE limits | 6259904315baa7234946327b |
class Feature(BaseOption): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.saveAsImage = SaveAsImage() <NEW_LINE> self.restore = Restore() <NEW_LINE> self.dataView = DataView() <NEW_LINE> self.dataZoom = DataZoom() <NEW_LINE> self.magicType = MagicType() <NEW_LINE> self.brush = Brush() <NEW_LINE> <DEDE... | This Class Is For ToolBox | 62599043d10714528d69f001 |
@total_ordering <NEW_LINE> @autorepr <NEW_LINE> @autoinit <NEW_LINE> class Card(object): <NEW_LINE> <INDENT> suit_map = ['Clubs','Diamonds', 'Hearts', 'Spades'] <NEW_LINE> rank_map = ['Ace', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack', 'Queen', 'King'] <NEW_LINE> __slots__ = ('suit', 'rank') <NEW_LINE> def __s... | Virtual playing card | 6259904373bcbd0ca4bcb574 |
class JobsHistoryViewSet(generics.ListAPIView, viewsets.GenericViewSet): <NEW_LINE> <INDENT> lookup_field = "uuid" <NEW_LINE> permission_classes = (IsAuthenticated,) <NEW_LINE> serializer_class = JobsHistorySerializer <NEW_LINE> queryset = JobsHistory.objects.all() | Jobs History ViewSet
/api/v1/jobs/history/ | 6259904307d97122c4217f89 |
class EventSocketConfig(models.Model): <NEW_LINE> <INDENT> listen_ip = models.IPAddressField() <NEW_LINE> listen_port = models.PositiveIntegerField() <NEW_LINE> password = models.CharField(max_length=25) <NEW_LINE> def form_dict(self): <NEW_LINE> <INDENT> result = {} <NEW_LINE> result["listen_ip"] = self.listen_ip <NEW... | <configuration name="event_socket.conf" description="Socket Client">
<settings>
<param name="listen-ip" value="127.0.0.1"/>
<param name="listen-port" value="8021"/>
<param name="password" value="ClueCon"/>
</settings>
</configuration> | 625990438e71fb1e983bcdb7 |
class UdpReader(UdpHandler): <NEW_LINE> <INDENT> def found_terminator(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def read(self): <NEW_LINE> <INDENT> x = self.ibuffer <NEW_LINE> self.ibuffer = '' <NEW_LINE> return ''.join(x) | This handler does not answer anything. It accumulates data
which it receives, i.e. does the same as the original one. | 62599043cad5886f8bdc59f2 |
class NsqLookupdTest(BaseTest): <NEW_LINE> <INDENT> @run_until_complete <NEW_LINE> async def test_ok(self): <NEW_LINE> <INDENT> conn = NsqLookupd('127.0.0.1', 4161, loop=self.loop) <NEW_LINE> res = await conn.ping() <NEW_LINE> self.assertEqual(res, 'OK') <NEW_LINE> await conn.close() <NEW_LINE> <DEDENT> @run_until_comp... | :see: http://nsq.io/components/nsqd.html | 625990434e696a045264e796 |
class PRelu(NeuralLayer): <NEW_LINE> <INDENT> def __init__(self, input_tensor=2): <NEW_LINE> <INDENT> super(PRelu, self).__init__("prelu") <NEW_LINE> self.input_tensor = input_tensor <NEW_LINE> <DEDENT> def prepare(self): <NEW_LINE> <INDENT> self.alphas = self.create_bias(self.output_dim, "alphas") <NEW_LINE> self.regi... | Probabilistic ReLU.
- http://arxiv.org/pdf/1502.01852v1.pdf | 625990430a366e3fb87ddccf |
class DiskName(basestring): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_api_name(): <NEW_LINE> <INDENT> return "disk-name" | Disk path name | 62599043d164cc6175822261 |
class SecurityQuestionGateForm(forms.Form): <NEW_LINE> <INDENT> error_css_class = "error" <NEW_LINE> required_css_class = "required" <NEW_LINE> answer_one = forms.CharField( label="", max_length=128 ) <NEW_LINE> answer_two = forms.CharField( label="", max_length=128 ) <NEW_LINE> def __init__(self, user, language, *args... | NOTE agreed upon, if user only has one answer, it must be answer_one | 62599043b5575c28eb71363e |
class Job(metaclass=ABCMeta): <NEW_LINE> <INDENT> def __init__(self, creator: User, command: Command): <NEW_LINE> <INDENT> self._creation_time = Time.now() <NEW_LINE> self._creator = creator <NEW_LINE> self._command = command <NEW_LINE> <DEDENT> @property <NEW_LINE> @abstractmethod <NEW_LINE> def next_execution(self) -... | This is the baseclass for all
Jobs, it specifies some interfaces
so business logic can be implemented
in the according Subclass | 6259904326238365f5fade44 |
class Solution: <NEW_LINE> <INDENT> def zigzagLevelOrder(self, root: TreeNode) -> List[List[int]]: <NEW_LINE> <INDENT> if root is None: return [] <NEW_LINE> output = [] <NEW_LINE> d = deque([(root, 0)]) <NEW_LINE> while d: <NEW_LINE> <INDENT> current_node, level = d.popleft() <NEW_LINE> if len(output) == level: <NEW_LI... | Use DFS to get nodes per level, then reverse lists with odd index.
Space : O(log N)
----------------
d : O(log N)
Since we use DFS, the deque only carries nodes from at most two levels.
The number of nodes per level is O(log N).
Time : O(N)
-----------
DFS : O(N)
All nodes must be visited, which is O(N).
... | 6259904323849d37ff8523a5 |
@admin.register(Referendum) <NEW_LINE> class ReferendumAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ( "title", "question", "creator", "slug", "creation_date", "last_update", "publication_date", "event_start", "duration", "event_end", "is_published", "is_in_progress", "is_over", "nb_votes", "results") <NE... | admin class for Referendum model. | 625990431d351010ab8f4e09 |
class OrgCreateProfileForm(OrgProfileForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = GCIOrganization <NEW_LINE> css_prefix = 'gci_org_page' <NEW_LINE> exclude = PROFILE_EXCLUDE | Django form to create the organization profile. | 6259904376d4e153a661dbea |
class RoomType(meta.Base, meta.InnoDBMix): <NEW_LINE> <INDENT> __tablename__ = "RoomType" <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> name = Column(String(20)) <NEW_LINE> rooms = relationship("Room", order_by="Room.id", backref="roomType") <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return "RoomT... | The Type of Room e.g. bedroom or kitchen
:var Integer id: Id
:var String name: Name of the Room
:var rooms (FK): What Rooms objects are of this type | 6259904323e79379d538d7e9 |
class Identified: <NEW_LINE> <INDENT> __slots__ = 'publicId', 'systemId' <NEW_LINE> def _identified_mixin_init(self, publicId, systemId): <NEW_LINE> <INDENT> self.publicId = publicId <NEW_LINE> self.systemId = systemId <NEW_LINE> <DEDENT> def _get_publicId(self): <NEW_LINE> <INDENT> return self.publicId <NEW_LINE> <DED... | Mix-in class that supports the publicId and systemId attributes. | 625990433eb6a72ae038b94c |
class Menu(models.Model): <NEW_LINE> <INDENT> restaurant = models.ForeignKey(Restaurant, related_name='menus', on_delete=models.CASCADE) <NEW_LINE> item = models.ForeignKey(Item, related_name='menus', on_delete=models.CASCADE) | The model class Menu maintains an many to many mapping between Item and
Resaurant | 62599043287bf620b6272ed2 |
class LongestIncreasingSubSequenceImplBinarySearch(LongestIncreasingSubSequence): <NEW_LINE> <INDENT> def length_of_lis(self, nums): <NEW_LINE> <INDENT> if not nums: <NEW_LINE> <INDENT> return 0 <NEW_LINE> <DEDENT> lis = [nums[0]] <NEW_LINE> for index, num in enumerate(nums[1:]): <NEW_LINE> <INDENT> if num > lis[-1]: <... | 经典的滚动数组应用场景:
因为答案只关心长度而不关心sub-sequence内容,所以可以用滚动数组,永远存储当前lis,
当有新的increasing sub-sequence出现的时候,按大小一个一个插入并覆盖滚动数组,如果lis确实变长了,append到结尾就行
这样就能保证滚动数组的长度一定是lis长度,而内容我们是不关心的
Time: O(NlogN)
Space: O(N) | 625990436e29344779b0193c |
class ReduceLROnPlateauCallback(TrackerCallback): <NEW_LINE> <INDENT> def __init__(self, learn:Learner, monitor:str='valid_loss', mode:str='auto', patience:int=0, factor:float=0.2, min_delta:int=0, min_lr:float=0.001): <NEW_LINE> <INDENT> super().__init__(learn, monitor=monitor, mode=mode) <NEW_LINE> self.patience,self... | A `TrackerCallback` that reduces learning rate when a metric has stopped improving. | 62599043d10714528d69f002 |
@cassiopeia.type.core.common.inheritdocs <NEW_LINE> class Participant(cassiopeia.type.dto.common.CassiopeiaDto): <NEW_LINE> <INDENT> def __init__(self, dictionary): <NEW_LINE> <INDENT> self.championId = dictionary.get("championId", 0) <NEW_LINE> self.highestAchievedSeasonTier = dictionary.get("highestAchievedSeasonTier... | Gets all item IDs contained in this object | 6259904373bcbd0ca4bcb576 |
class printing(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): <NEW_LINE> <INDENT> optionList = [("cups", "max size (MiB) to collect per cups log file", "", 50)] <NEW_LINE> def setup(self): <NEW_LINE> <INDENT> self.addCopySpecs([ "/etc/cups/*.conf", "/etc/cups/lpoptions", "/etc/cups/ppd/*.ppd"]) <NEW_LINE> self.addC... | printing related information (cups)
| 625990438e71fb1e983bcdba |
class SoftmaxWithCriterion(Criterion): <NEW_LINE> <INDENT> def __init__(self, ignore_label=None, normalize_mode="VALID", bigdl_type="float"): <NEW_LINE> <INDENT> super(SoftmaxWithCriterion, self).__init__(None, bigdl_type, ignore_label, normalize_mode) | Computes the multinomial logistic loss for a one-of-many classification task,
passing real-valued predictions through a softmax to get a probability distribution over classes.
It should be preferred over separate SoftmaxLayer + MultinomialLogisticLossLayer
as its gradient computation is more numerically stable.
:param... | 62599043d6c5a102081e3411 |
class TestChannel(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(TestChannel, self).setUp() <NEW_LINE> self.test_data_str = open( path.dirname(path.dirname(__file__)) + "/data/search/channel.json" ).read() <NEW_LINE> self.test_data = json.loads(self.test_data_str) <NEW_LINE> <DEDENT> def test... | Tests for Channels model. | 62599043d53ae8145f919749 |
class ConteudoCreate(CreateView): <NEW_LINE> <INDENT> model = Conteudo <NEW_LINE> form_class = ConteudoForm <NEW_LINE> template_name = 'escola/conteudo/create_conteudo.html' <NEW_LINE> def dispatch(self, request, *args, **kwargs): <NEW_LINE> <INDENT> if 'pk_parent' in kwargs.keys(): <NEW_LINE> <INDENT> self.parent = kw... | View para criar um Conteudo.
Dispatch Args:
pk_parent : int - opicional | 6259904350485f2cf55dc271 |
class PluginError(RepositoryError): <NEW_LINE> <INDENT> pass | Indicates an error related to a plugin. | 62599043b57a9660fecd2d68 |
class TagsView(ProtectedRequestHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> self.render_to_response(template_file='tags.html', context={'title': 'Tags'}) | Returns a panel for monitoring groups of devices & users | 62599043596a897236128f25 |
class Adaptor (base.Base): <NEW_LINE> <INDENT> def __init__ (self) : <NEW_LINE> <INDENT> base.Base.__init__ (self, _ADAPTOR_INFO, _ADAPTOR_OPTIONS) <NEW_LINE> self._default_contexts = [] <NEW_LINE> self._have_defaults = False <NEW_LINE> <DEDENT> def sanity_check (self) : <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> ... | This is the actual adaptor class, which gets loaded by SAGA (i.e. by the
SAGA engine), and which registers the CPI implementation classes which
provide the adaptor's functionality. | 6259904326238365f5fade46 |
class Filter: <NEW_LINE> <INDENT> def __init__(self, name, window_size=1, precision=None, entity=None): <NEW_LINE> <INDENT> if isinstance(window_size, int): <NEW_LINE> <INDENT> self.states = deque(maxlen=window_size) <NEW_LINE> self.window_unit = WINDOW_SIZE_UNIT_NUMBER_EVENTS <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDE... | Filter skeleton.
Args:
window_size (int): size of the sliding window that holds previous
values
precision (int): round filtered value to precision value
entity (string): used for debugging only | 6259904345492302aabfd7c7 |
class MemoryStorage(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._results = [] <NEW_LINE> <DEDENT> def add_test_result(self, result): <NEW_LINE> <INDENT> required = {'name', 'version', 'env', 'pytest', 'status'} <NEW_LINE> if not required.issubset(result): <NEW_LINE> <INDENT> raise TypeErro... | Mock class that simulates a PlugsStorage instance. This class simply
holds the values in memory, and is used by TestView as a mock to the real
storage class, allowing the view to be tested without a database. | 62599043d4950a0f3b1117b7 |
class general: <NEW_LINE> <INDENT> __order__ = ['name', 'filename', 'browse_directory'] <NEW_LINE> label = 'General' <NEW_LINE> stock_id = gtk.STOCK_PREFERENCES <NEW_LINE> class name: <NEW_LINE> <INDENT> label = 'Project Name' <NEW_LINE> rtype = types.string <NEW_LINE> default = 'unnamed' <NEW_LINE> <DEDENT> class fil... | General options relating to the project | 62599043a79ad1619776b36c |
class Meta(BaseTable.Meta): <NEW_LINE> <INDENT> model = CommandToken <NEW_LINE> fields = ("pk", "platform", "token", "comment", "actions") <NEW_LINE> default_columns = ("pk", "platform", "comment", "actions") | Metaclass attributes of CommandTokenTable. | 6259904391af0d3eaad3b111 |
class WidgetAdminRoles(object): <NEW_LINE> <INDENT> widget_name = url.Widget.ROLES | Locators for Roles widget on Admin Dashboard. | 6259904315baa7234946327f |
class ServerSideParamMatchingTests(TestWithScenarios, TestCase): <NEW_LINE> <INDENT> scenarios = [ ('should work', dict(key='keyname', value='value', result=True)), ('invalid key', dict(key='k e', value='value', result=False)), ('string value', dict(key='key', value='v e', result=True)), ('string value2', dict(key='k... | Tests for the server side matching decision function. | 6259904316aa5153ce4017da |
class Todo(models.Model): <NEW_LINE> <INDENT> add_date = models.DateTimeField() <NEW_LINE> text = models.CharField(max_length=150) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> verbose_name = 'Todo' <NEW_LINE> verbose_name_plural = 'Todos' <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.text | Model definition for Todo. | 625990433eb6a72ae038b94e |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.