code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class prototype: <NEW_LINE> <INDENT> def types(self): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def label(self, type): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def html(self, type): <NEW_LINE> <INDENT> raise NotImplementedError() | Prototype for a marking object that defines the rules for marking artifacts. | 6259903d596a897236128eca |
class SwatInjection(ManagedObject): <NEW_LINE> <INDENT> consts = SwatInjectionConsts() <NEW_LINE> naming_props = set(['name']) <NEW_LINE> mo_meta = MoMeta("SwatInjection", "swatInjection", "inject-[name]", VersionMeta.Version101e, "InputOutput", 0x3f, [], ["admin"], ['topSystem'], ['swatAction'], ["Get"]) <NEW_LINE> pr... | This is SwatInjection class. | 6259903de76e3b2f99fd9c44 |
class CopyGenerator(ReportGenerator): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> copy_dict = self.skin_dict['CopyGenerator'] <NEW_LINE> log_success = to_bool(weeutil.config.search_up(copy_dict, 'log_success', True)) <NEW_LINE> copy_list = [] <NEW_LINE> if self.first_run: <NEW_LINE> <INDENT> try: <NEW_LINE> ... | Class for managing the 'copy generator.'
This will copy files from the skin subdirectory to the public_html
subdirectory. | 6259903d711fe17d825e15b8 |
class _Variable(object): <NEW_LINE> <INDENT> def __init__(self, var_name, var_type, initial_value=None, length=None): <NEW_LINE> <INDENT> if var_type not in VAR_TYPES: <NEW_LINE> <INDENT> raise Exception("{0}: unknown variable type".format(var_type)) <NEW_LINE> <DEDENT> if var_type == VAR_ARRAY: <NEW_LINE> <INDENT> if ... | Variable class
| 6259903d15baa723494631c9 |
class ReachabilityObserver(ABC): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def reachability_update(self, is_online: bool) -> None: <NEW_LINE> <INDENT> pass | The Observer interface declares the reachability_update method, used by subjects. | 6259903d94891a1f408ba013 |
class BetaLoadReportingServiceStub(object): <NEW_LINE> <INDENT> def StreamLoadStats(self, request_iterator, timeout, metadata=None, with_call=False, protocol_options=None): <NEW_LINE> <INDENT> raise NotImplementedError() | 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. | 6259903d15baa723494631ca |
@base.ReleaseTracks(base.ReleaseTrack.BETA) <NEW_LINE> class Delete(base.DeleteCommand): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Args(parser): <NEW_LINE> <INDENT> flags.GetTPUNameArg().AddToParser(parser) <NEW_LINE> compute_flags.AddZoneFlag( parser, resource_type='tpu', operation_type='delete', explanation=( ... | Deletes a Cloud TPU. | 6259903d73bcbd0ca4bcb4c3 |
class TRMMMetaDataTransformer(object): <NEW_LINE> <INDENT> def __init__(self, meta_transformer_config=None): <NEW_LINE> <INDENT> if not meta_transformer_config: <NEW_LINE> <INDENT> meta_transformer_config = {} <NEW_LINE> <DEDENT> self.debug_logger = meta_transformer_config.get('debug_logger',lambda*a,**kwa:None) <NEW_L... | Class TRMMMetaDataTransformer:
1) converts the header string inside a given bin file into a dictionary
2) adds additional custom field values to the dictionary (values to fields not associated with the bin's meta-data) | 6259903d07d97122c4217ed7 |
@dataclasses.dataclass <NEW_LINE> class Operation: <NEW_LINE> <INDENT> path: str <NEW_LINE> summary: str <NEW_LINE> description: str <NEW_LINE> operation_id: str <NEW_LINE> tags: List[str] <NEW_LINE> security: Security <NEW_LINE> verb: str <NEW_LINE> path_parameters: List[StringParameter] <NEW_LINE> query_parameters: L... | An operation uniquely identified with a path and HTTP verb | 6259903d23e79379d538d738 |
class LoudnessSensor(AnalogSensor): <NEW_LINE> <INDENT> def __init__(self, port="AD1", gpg=None, use_mutex=False): <NEW_LINE> <INDENT> debug("Loudness Sensor on port " + port) <NEW_LINE> self.set_descriptor("Loudness sensor") <NEW_LINE> try: <NEW_LINE> <INDENT> AnalogSensor.__init__(self, port, "INPUT", gpg, use_mutex)... | | Class for the `Grove Loudness Sensor`_.
| This class derives from :py:class:`~easygopigo3.AnalogSensor` class, so all of their attributes and methods are inherited.
| For creating a :py:class:`~easygopigo3.LoudnessSensor` object we need to call :py:meth:`~easygopigo3.EasyGoPiGo3.init_loudness_sensor` method like in ... | 6259903d07f4c71912bb066b |
class TestDFA(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> class TRecognizer(antlr3.BaseRecognizer): <NEW_LINE> <INDENT> api_version = 'HEAD' <NEW_LINE> <DEDENT> self.recog = TRecognizer() <NEW_LINE> <DEDENT> def testInit(self): <NEW_LINE> <INDENT> dfa = antlr3.DFA( self.recog, 1, eot=[]... | Test case for the DFA class. | 6259903d4e696a045264e73e |
class KubernetesTests(TestCase): <NEW_LINE> <INDENT> def test_01_service_manager_install(self): <NEW_LINE> <INDENT> subprocess.check_call( ['vagrant', 'plugin', 'install', 'vagrant-service-manager'] ) <NEW_LINE> <DEDENT> def test_02_VagrantUp(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> exit_code = subprocess.ch... | This class tests Kubernetes on ADB box. | 6259903dcad5886f8bdc5999 |
class OffRLAlgo(RLAlgo): <NEW_LINE> <INDENT> def __init__( self, pretrain_epochs=0, min_pool=0, target_hard_update_period=1000, use_soft_update=True, tau=0.001, opt_times=1, **kwargs): <NEW_LINE> <INDENT> super(OffRLAlgo, self).__init__(**kwargs) <NEW_LINE> self.pretrain_epochs = pretrain_epochs <NEW_LINE> self.target_... | Base RL Algorithm Framework | 6259903d8da39b475be04428 |
class ModelGeotagManager(models.Manager): <NEW_LINE> <INDENT> pass | A manager for retrieving tags for a particular model. | 6259903dec188e330fdf9ad3 |
class ConfigNotFoundException(SelfDefinedException): <NEW_LINE> <INDENT> pass | Exception class that representing configuration not found. | 6259903dd53ae8145f919696 |
class CumMax(Stream[float]): <NEW_LINE> <INDENT> def __init__(self, skip_na: bool = True) -> None: <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.skip_na = skip_na <NEW_LINE> self.c_max = -np.inf <NEW_LINE> <DEDENT> def forward(self) -> float: <NEW_LINE> <INDENT> node = self.inputs[0] <NEW_LINE> if self.skip_na... | A stream operator that creates a cumulative maximum of values.
Parameters
----------
skip_na : bool, default True
Exclude NA/null values. If a value is NA, the result will be NA.
References
----------
[1] https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.cummax.html | 6259903d1f5feb6acb163e2d |
class Dataset(NameDescriptionMixin): <NEW_LINE> <INDENT> created_at = CreatedAtField() <NEW_LINE> owner = models.ForeignKey(settings.AUTH_USER_MODEL) <NEW_LINE> projects = models.ManyToManyField('project.Project', related_name='datasets') | Defines a dataset imported into a project by a user. | 6259903db5575c28eb7135e6 |
class Solution: <NEW_LINE> <INDENT> def subarraySum(self, nums): <NEW_LINE> <INDENT> prefix_sum = {0: -1} <NEW_LINE> sum = 0 <NEW_LINE> for i in xrange(len(nums)): <NEW_LINE> <INDENT> sum += nums[i] <NEW_LINE> if sum in prefix_sum: <NEW_LINE> <INDENT> return [prefix_sum[sum] + 1, i] <NEW_LINE> <DEDENT> else: <NEW_LINE>... | @param nums: A list of integers
@return: A list of integers includes the index of the first number
and the index of the last number | 6259903d379a373c97d9a263 |
class EntryDiscussions(DiscussionFeed): <NEW_LINE> <INDENT> def get_object(self, request, year, month, day, slug): <NEW_LINE> <INDENT> return get_object_or_404(Entry, slug=slug, creation_date__year=year, creation_date__month=month, creation_date__day=day) <NEW_LINE> <DEDENT> def items(self, obj): <NEW_LINE> <INDENT> re... | Feed for discussions on an entry. | 6259903ddc8b845886d547f0 |
class _RegexHook(_Hook): <NEW_LINE> <INDENT> type = HookType.regex <NEW_LINE> def __init__(self, function): <NEW_LINE> <INDENT> _Hook.__init__(self, function) <NEW_LINE> self.regexes = [] <NEW_LINE> <DEDENT> def add_hook(self, *regexes, **kwargs): <NEW_LINE> <INDENT> self._add_hook(**kwargs) <NEW_LINE> if len(regexes) ... | :type regexes: list[re.__Regex] | 6259903d8a349b6b43687480 |
class WindowsCodepagePlugin( interface.WindowsRegistryValueArtifactPreprocessorPlugin): <NEW_LINE> <INDENT> ARTIFACT_DEFINITION_NAME = 'WindowsCodePage' <NEW_LINE> def _ParseValueData(self, mediator, value_data): <NEW_LINE> <INDENT> if not isinstance(value_data, str): <NEW_LINE> <INDENT> raise errors.PreProcessFail( 'U... | The Windows codepage plugin. | 6259903d004d5f362081f901 |
class MonNotification(monasca_setup.detection.Plugin): <NEW_LINE> <INDENT> def _detect(self): <NEW_LINE> <INDENT> if find_process_cmdline('monasca-notification') is not None: <NEW_LINE> <INDENT> self.available = True <NEW_LINE> <DEDENT> <DEDENT> def build_config(self): <NEW_LINE> <INDENT> log.info("\tEnabling the Monas... | Detect the Monsaca notification engine and setup some simple checks. | 6259903dd164cc61758221b1 |
class AddColumnPipe(Pipe): <NEW_LINE> <INDENT> def __init__(self, engineer_func: Callable[[pd.DataFrame], pd.Series], name: str): <NEW_LINE> <INDENT> self.__engineer_func = engineer_func <NEW_LINE> self.__name = name <NEW_LINE> <DEDENT> def flush(self, data: pd.DataFrame) -> pd.DataFrame: <NEW_LINE> <INDENT> column = s... | Perform feature engineering to add a column to data.
:param engineer_func: Callable to engineer a new column
:param names: Name for the new column | 6259903d15baa723494631cc |
class GaussianProcessLogMarginalLikelihood(GaussianProcessLogLikelihood): <NEW_LINE> <INDENT> def __init__(self, covariance_function, historical_data): <NEW_LINE> <INDENT> super(GaussianProcessLogMarginalLikelihood, self).__init__( covariance_function, historical_data, log_likelihood_type=C_GP.LogLikelihoodTypes.log_ma... | Class for computing the Log Marginal Likelihood, ``log(p(y | X, \theta))``.
That is, the probability of observing the training values, y, given the training points, X,
and hyperparameters (of the covariance function), ``\theta``.
This is a measure of how likely it is that the observed values came from our Gaussian Pr... | 6259903d30dc7b76659a0a6c |
class ShowVlanRemoteSpanSchema(MetaParser): <NEW_LINE> <INDENT> schema = {'vlan_id': {Any(): {'vlan_is_remote_span':bool} }, } | Schema for show vlan remote-span | 6259903d50485f2cf55dc1be |
class HuffyPenguin(GenericTumblrV1): <NEW_LINE> <INDENT> name = "huffypenguin" <NEW_LINE> long_name = "Huffy Penguin" <NEW_LINE> url = "https://huffy-penguin.tumblr.com" | Class to retrieve Huffy Penguin comics. | 6259903dd10714528d69efa9 |
class Button: <NEW_LINE> <INDENT> def __init__(self, ai_game, msg): <NEW_LINE> <INDENT> self.screen = ai_game.screen <NEW_LINE> self.screen_rect = self.screen.get_rect() <NEW_LINE> self.width, self.height = 200, 50 <NEW_LINE> self.button_color = (0, 255, 0) <NEW_LINE> self.text_color = (255, 255, 255) <NEW_LINE> self.f... | Simple model of a button. | 6259903dc432627299fa421e |
class ColumnCollisionTest(fixtures.MappedTest): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def define_tables(cls, metadata): <NEW_LINE> <INDENT> Table( "book", metadata, Column( "id", Integer, primary_key=True, test_needs_autoincrement=True ), Column("book_id", String(50)), Column("title", String(50)), ) <NEW_LINE> <D... | Ensure the mapper doesn't break bind param naming rules on flush. | 6259903d3c8af77a43b68859 |
class Net(resnet.Net): <NEW_LINE> <INDENT> def __init__(self, opt, ds, metaparams=None, masks=None): <NEW_LINE> <INDENT> super(Net, self).__init__(opt, ds) <NEW_LINE> self.meta = [metaparams] <NEW_LINE> if self.meta[0] is None: <NEW_LINE> <INDENT> self.meta = [partition.Metaparam(opt)] <NEW_LINE> <DEDENT> share = self.... | ResNet that supports masking for feature partitioning. | 6259903dbe383301e0254a53 |
class JobStoreExistsException(Exception): <NEW_LINE> <INDENT> def __init__(self, locator): <NEW_LINE> <INDENT> super(JobStoreExistsException, self).__init__( "The job store '%s' already exists. Use --restart to resume the workflow, or remove " "the job store with 'toil clean' to start the workflow from scratch" % locat... | Indicates that the specified job store already exists. | 6259903d66673b3332c31633 |
class BandwidthSchedule(ARMBaseModel): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'start': {'required': True}, 'stop': {'required': True}, 'rate_in_mbps': {'required': True}, 'days': {'required': True}, } <NEW_LINE> _attribute_map = { 'id': {'ke... | The bandwidth schedule details.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: The path ID that uniquely identifies the object.
:vartype id: str
:ivar name: The object name.
:vartype name: str
:iva... | 6259903d21a7993f00c671a9 |
class TimeSeriesBase(orm.StdModel): <NEW_LINE> <INDENT> converter = DateTimeConverter <NEW_LINE> def todate(self, v): <NEW_LINE> <INDENT> return todatetime(v) <NEW_LINE> <DEDENT> def size(self): <NEW_LINE> <INDENT> return self.data.size() <NEW_LINE> <DEDENT> class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> <D... | Timeseries base model class | 6259903d287bf620b6272e27 |
class PiggyBankSingle(object): <NEW_LINE> <INDENT> openapi_types = { 'data': 'PiggyBankRead' } <NEW_LINE> attribute_map = { 'data': 'data' } <NEW_LINE> def __init__(self, data=None, local_vars_configuration=None): <NEW_LINE> <INDENT> if local_vars_configuration is None: <NEW_LINE> <INDENT> local_vars_configuration = Co... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually. | 6259903d30c21e258be99a49 |
class DictTree(dict, Named): <NEW_LINE> <INDENT> IGNORE_CHILD='IGNORE_CHILD' <NEW_LINE> def __init__( self, name, children=() ): <NEW_LINE> <INDENT> Named.__init__(self, name) <NEW_LINE> for i,c in enumerate(children): <NEW_LINE> <INDENT> c_name= c.name if isinstance(c, DictTree) else self._leaf_name(c, i) <NEW_LINE> s... | A dict that can have other DictTree objects as values.
Basically, a arbitrary tree that can have any object as a leave. | 6259903d07d97122c4217edb |
class EnumerationEventFormatterHelperTest(test_lib.EventFormatterTestCase): <NEW_LINE> <INDENT> def testInitialization(self): <NEW_LINE> <INDENT> event_formatter_helper = interface.EnumerationEventFormatterHelper() <NEW_LINE> self.assertIsNotNone(event_formatter_helper) <NEW_LINE> <DEDENT> def testFormatEventValues(sel... | Tests for the enumeration event formatter helper. | 6259903dd10714528d69efaa |
class TestMultiClassMeasure(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> torch.manual_seed(1001) <NEW_LINE> base = -15 * torch.ones(16, 4, 256, 256) <NEW_LINE> base[:, 0] *= -1 <NEW_LINE> negative_base = torch.randn(16, 4, 256, 256) <NEW_LINE> negative_base[:, 0] = negative_base.min() - ... | Base class for testing losses. It provides dummy images with varying similarity,
such that various degrees of the loss functions / metrics can be emulated. | 6259903dc432627299fa421f |
class Scraper(object): <NEW_LINE> <INDENT> def __init__(self, conf, **kwargs): <NEW_LINE> <INDENT> self.conf = conf <NEW_LINE> self.kwarg = kwargs <NEW_LINE> self.last_status_code = None <NEW_LINE> self.last_exception = None <NEW_LINE> if 'timeout' not in self.kwarg: <NEW_LINE> <INDENT> self.kwarg['timeout'] = self.con... | This class enables easy usage of request module. Its main feature is trying
to connect multiple times before throwing an exception. | 6259903dbe383301e0254a55 |
class Ghost(Entity): <NEW_LINE> <INDENT> ghosts = [] <NEW_LINE> def __init__(self, id): <NEW_LINE> <INDENT> super(Ghost, self).__init__(Constants.TYPE_GHOST) <NEW_LINE> self.value = Constants.VALUE_GHOST_BASIC <NEW_LINE> self.id = id <NEW_LINE> self._generate_random_ghost_position() <NEW_LINE> self.alive = True <NEW_LI... | Class that will handle the ghost entity | 6259903d07f4c71912bb066f |
class SupervisedTrainer(Trainer): <NEW_LINE> <INDENT> def __init__(self, model, optimizer='adam', loss='cross_entropy', metrics=None): <NEW_LINE> <INDENT> from magnet.nodes.functional import wiki <NEW_LINE> if isinstance(optimizer, str): optimizer = optimizer_wiki[optimizer.lower()](model.parameters()) <NEW_LINE> if is... | A simple trainer that implements a supervised approach where a simple
model :math:`\hat{y} = f(x)` is trained to map :math:`\hat{y}` to
ground-truth :math:`y` according to some specified loss.
This is the training routine that most high-level deep learning frameworks
implement.
Args:
model (``nn.Module``): The mo... | 6259903d10dbd63aa1c71e14 |
class MySQLParams(Params): <NEW_LINE> <INDENT> def __init__(self, params): <NEW_LINE> <INDENT> if 'name' not in params: <NEW_LINE> <INDENT> raise MySQLParseException('"name" is a required parameter') <NEW_LINE> <DEDENT> if 'user' not in params: <NEW_LINE> <INDENT> raise MySQLParseException('"user" is a required paramet... | Container for MySQL parameters. Has some helpful methods to get
args for the `mysql` and `mysqldump` commands, as well as a method
to load the MySQLdb database. | 6259903d30c21e258be99a4a |
class Teacher(models.Model): <NEW_LINE> <INDENT> org = models.ForeignKey(CourseOrg, verbose_name="所属机构") <NEW_LINE> name = models.CharField(max_length=50, verbose_name="教师名称") <NEW_LINE> work_years = models.IntegerField(default=0, verbose_name="工作年限", null=True, blank=True) <NEW_LINE> work_company = models.CharField(ma... | 讲师表 | 6259903d287bf620b6272e29 |
class IPv4Address(_BaseV4, _BaseIP): <NEW_LINE> <INDENT> def __init__(self, address): <NEW_LINE> <INDENT> _BaseIP.__init__(self, address) <NEW_LINE> _BaseV4.__init__(self, address) <NEW_LINE> if isinstance(address, int): <NEW_LINE> <INDENT> self._ip = address <NEW_LINE> if address < 0 or address > self._ALL_ONES: <NEW_... | Represent and manipulate single IPv4 Addresses. | 6259903d507cdc57c63a5fd9 |
class connection(): <NEW_LINE> <INDENT> def add(self,a,b): <NEW_LINE> <INDENT> return a+b <NEW_LINE> <DEDENT> def setConnectionString(self,connectionString): <NEW_LINE> <INDENT> self.connectionString = connectionString <NEW_LINE> return self <NEW_LINE> <DEDENT> def getConnectionString(self): <NEW_LINE> <INDENT> return ... | classdocs | 6259903d287bf620b6272e2a |
class TestAzAz(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.fake = Faker("az") <NEW_LINE> Faker.seed(0) <NEW_LINE> <DEDENT> def test_first_name(self): <NEW_LINE> <INDENT> name = self.fake.first_name() <NEW_LINE> assert name <NEW_LINE> self.assertIsInstance(name, str) <NEW_LINE> asse... | Tests for az_AZ locale person provider | 6259903d6e29344779b01890 |
class TestWriteCCNoSop(TestWriteCCFull): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> cdl_convert.ColorCorrection.members = {} <NEW_LINE> self.cdl = cdl_convert.ColorCorrection("burp_200.x15", '') <NEW_LINE> self.cdl.sat = 1.0128109381 <NEW_LINE> self.cdl.sat_node.desc = ['I am a lovely sat node'] <NEW_LINE... | Tests writing a CC XML with no SOP node | 6259903d91af0d3eaad3b074 |
class NetworkInterfaceDnsSettings(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'applied_dns_servers': {'readonly': True}, 'internal_fqdn': {'readonly': True}, 'internal_domain_name_suffix': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, 'ap... | DNS settings of a network interface.
Variables are only populated by the server, and will be ignored when sending a request.
:param dns_servers: List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure
provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be
... | 6259903d63b5f9789fe863ab |
class FlatMenuTestCase(TestCase): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def create_test_menus_for_site(site, count=3, set_option_vals=False): <NEW_LINE> <INDENT> for i in range(1, count + 1): <NEW_LINE> <INDENT> obj = FlatMenu.objects.create( site=site, handle='test-%s' % i, title='Test Menu %s' % i ) <NEW_LINE>... | A base TestCase class for testing FlatMenu model class methods | 6259903dd164cc61758221b5 |
class RedisDict(dict): <NEW_LINE> <INDENT> def __init__(self, redis_url: Union[str, 'StrictRedis'], key_id: str, seq: Optional[Iterable] = None, **kwargs): <NEW_LINE> <INDENT> self._redis = redis_from_url_or_object(redis_url) <NEW_LINE> self.key_id = key_id <NEW_LINE> args = [] if seq is None else [seq] <NEW_LINE> supe... | Dictionary, that store in Redis as one solid json by his own redis key (key_id)
for save dict in redis it's need to call :meth:`telegram.ext.redis_util.RedisDict.flush`
read object from redis on initialization :meth:`telegram.ext.redis_util.RedisDict.__init__` | 6259903d50485f2cf55dc1c2 |
class WrongPresentationType(ValueError): <NEW_LINE> <INDENT> pass | The file read was not a valid file for this type. | 6259903d3c8af77a43b6885b |
class Grades(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.students = [] <NEW_LINE> self.grades = {} <NEW_LINE> self.isSorted = True <NEW_LINE> <DEDENT> def addStudent(self, student): <NEW_LINE> <INDENT> if student in self.students: <NEW_LINE> <INDENT> raise ValueError("Duplicate student") <... | A mapping from Students to a list of grades | 6259903d45492302aabfd718 |
class ResourceDomainObjectTests(unittest.TestCase): <NEW_LINE> <INDENT> def test_construction_positional(self): <NEW_LINE> <INDENT> resource = Resource('foo', 'bar') <NEW_LINE> self.assertEqual('foo', resource.type) <NEW_LINE> self.assertEqual('bar', resource.id) <NEW_LINE> <DEDENT> def test_construction_named(self): <... | Tests the construction of the snaps.domain.Resource class | 6259903d66673b3332c31637 |
class CycleInfo: <NEW_LINE> <INDENT> def __init__(self, active_time, inactive_time, quantity): <NEW_LINE> <INDENT> self.active_time = active_time <NEW_LINE> self.inactive_time = inactive_time <NEW_LINE> self.quantity = quantity <NEW_LINE> <DEDENT> @property <NEW_LINE> def average_time(self): <NEW_LINE> <INDENT> return ... | Holds information about cycle sequence.
This class is used only when all cycles in sequence have the same
parameters.
Attributes:
active_time: How long this effect is active.
inactive_time: How long this effect is inactive after its activity.
quantity: Defines how many times cycle should be repeated. | 6259903dd6c5a102081e3365 |
class TestDestinyDefinitionsDestinyTalentGridDefinition(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 testDestinyDefinitionsDestinyTalentGridDefinition(self): <NEW_LINE> <INDENT> pass | DestinyDefinitionsDestinyTalentGridDefinition unit test stubs | 6259903d0fa83653e46f6119 |
class GenericStringSimilarityFeatureSpace: <NEW_LINE> <INDENT> def __init__(self, alphabet, n, Y, is_normalized, gs_kernel): <NEW_LINE> <INDENT> self.n = int(n) <NEW_LINE> self.is_normalized = is_normalized <NEW_LINE> self._y_lengths = numpy.array([len(y) for y in Y]) <NEW_LINE> self.max_train_length = numpy.max(self._... | Output space for the Generic String kernel with position and n-gram similarity.
Doesn't use a sparse matrix representation because it takes in account the similarity between the n-grams.
This is used to compute the weights of the graph during the inference phase.
Attributes
----------
n : int
N-gram length.
is_no... | 6259903d30c21e258be99a4c |
class AnalyticsConfig(AppConfig): <NEW_LINE> <INDENT> name = 'analytics' | Configs for analytics app. | 6259903d8c3a8732951f7797 |
class Readings(pygame.sprite.Sprite): <NEW_LINE> <INDENT> def __init__(self, orientation = None, width = 10, height = 10): <NEW_LINE> <INDENT> pygame.sprite.Sprite.__init__(self) <NEW_LINE> self.image = pygame.image.load("reading.png") <NEW_LINE> self.rect = self.image.get_rect() <NEW_LINE> self.orientation = orientati... | This class represents a piece of reading material. | 6259903dd4950a0f3b111760 |
class WishListCreateView(PageTitleMixin, CreateView): <NEW_LINE> <INDENT> model = WishList <NEW_LINE> template_name = 'customer/wishlists/wishlists_form.html' <NEW_LINE> active_tab = "wishlists" <NEW_LINE> page_title = _('Create a new wish list') <NEW_LINE> form_class = WishListForm <NEW_LINE> product = None <NEW_LINE>... | Create a new wishlist
If a product ID is assed as a kwargs, then this product will be added to
the wishlist. | 6259903d379a373c97d9a269 |
class RecognizeCarRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.ImageUrl = None <NEW_LINE> self.ImageBase64 = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.ImageUrl = params.get("ImageUrl") <NEW_LINE> self.ImageBase64 = params.get("ImageBase... | RecognizeCar请求参数结构体
| 6259903d73bcbd0ca4bcb4ca |
class VWAPEventWindow(EventWindow): <NEW_LINE> <INDENT> def __init__(self, market_aware=True, window_length=None, delta=None): <NEW_LINE> <INDENT> EventWindow.__init__(self, market_aware, window_length, delta) <NEW_LINE> self.fields = ('price', 'volume') <NEW_LINE> self.flux = 0.0 <NEW_LINE> self.totalvolume = 0.0 <NEW... | Iteratively maintains a vwap for a single sid over a given
timedelta. | 6259903d07f4c71912bb0672 |
class CountyShape: <NEW_LINE> <INDENT> def __init__(self, county): <NEW_LINE> <INDENT> shp_fp = "Bay_Area_County_Boundaries/ark28722-s7hs4j-shapefile/s7hs4j.shp" <NEW_LINE> shp = gpd.read_file(DATA_DIR + shp_fp, encoding='UTF-8') <NEW_LINE> if any(shp['COUNTY'] == county): <NEW_LINE> <INDENT> self.boundary = shp[shp['C... | Get county boundaries.
The tracts near the border of the counties in the US Census are very
rough, especially if the county borders water. To nicely plot the tracts,
a `shp` file with more precise boundary definitions is intersected with
the tract polygons defined in the US Census. The tract boundaries are
adjusted to... | 6259903de76e3b2f99fd9c4c |
class Scalpel(MakefilePackage, SourceforgePackage): <NEW_LINE> <INDENT> homepage = "http://scalpel.sourceforge.net/index.html" <NEW_LINE> sourceforge_mirror_path = "scalpel/scalpel-0.5.4.tar.gz" <NEW_LINE> version('0.5.4', sha256='506f731b3886def158c15fd8b74fa98390f304a507d2040972e6b09ddefac8f0') <NEW_LINE> version('0.... | Scalpel is a software package for detecting INDELs (INsertions and
DELetions) mutations in a reference genome which has been sequenced
with next-generation sequencing technology. | 6259903db57a9660fecd2cbb |
@public <NEW_LINE> class ISteamNews(SteamWebAPI): <NEW_LINE> <INDENT> def GetNewsForApp(self, appid, maxlength='', enddate='', count='', feeds='', method_version=2): <NEW_LINE> <INDENT> parameters = { 'appid': appid, 'maxlength': maxlength, 'enddate': enddate, 'count': count, 'feeds': feeds, } <NEW_LINE> return self.ap... | Methods relating to Steam News. | 6259903d76d4e153a661db94 |
class ObjectName(TraitType): <NEW_LINE> <INDENT> info_text = "a valid object identifier in Python" <NEW_LINE> if sys.version_info[0] < 3: <NEW_LINE> <INDENT> _name_re = re.compile(r"[a-zA-Z_][a-zA-Z0-9_]*$") <NEW_LINE> def isidentifier(self, s): <NEW_LINE> <INDENT> return bool(self._name_re.match(s)) <NEW_LINE> <DEDENT... | A string holding a valid object name in this version of Python.
This does not check that the name exists in any scope. | 6259903d96565a6dacd2d8ab |
class ForwardInstance(Instance): <NEW_LINE> <INDENT> __slots__ = ('resolve', 'args', 'kwargs') <NEW_LINE> def __init__(self, resolve, args=None, kwargs=None, factory=None): <NEW_LINE> <INDENT> self.resolve = resolve <NEW_LINE> self.args = args <NEW_LINE> self.kwargs = kwargs <NEW_LINE> if factory is not None: <NEW_LINE... | An Instance which delays resolving the type definition.
The first time the value is accessed or modified, the type will
be resolved and the forward instance will behave identically to
a normal instance. | 6259903d23e79379d538d740 |
class TestV1beta1StorageClassList(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 testV1beta1StorageClassList(self): <NEW_LINE> <INDENT> pass | V1beta1StorageClassList unit test stubs | 6259903d3c8af77a43b6885c |
@renderer <NEW_LINE> class MIDI7Render(Render): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__(7) | convert int <-> bytes with 0 msb
| 6259903e73bcbd0ca4bcb4cb |
class ComputerVisionClient(ComputerVisionClientOperationsMixin, SDKClient): <NEW_LINE> <INDENT> def __init__( self, endpoint, credentials): <NEW_LINE> <INDENT> self.config = ComputerVisionClientConfiguration(endpoint, credentials) <NEW_LINE> super(ComputerVisionClient, self).__init__(self.config.credentials, self.confi... | The Computer Vision API provides state-of-the-art algorithms to process images and return information. For example, it can be used to determine if an image contains mature content, or it can be used to find all the faces in an image. It also has other features like estimating dominant and accent colors, categorizing t... | 6259903ec432627299fa4221 |
class UserUpdateJob(UpdateView): <NEW_LINE> <INDENT> def get_object(self, queryset=None): <NEW_LINE> <INDENT> return UserJob.objects.get(pk=self.kwargs['job']) <NEW_LINE> <DEDENT> model = UserJob <NEW_LINE> fields = '__all__' <NEW_LINE> section = "Job Profile" <NEW_LINE> title = 'update' <NEW_LINE> button = 'Update' <N... | Update job details for a user | 6259903e287bf620b6272e2e |
class ProductionConfig(BaseConfig): <NEW_LINE> <INDENT> SECRET_KEY = 'my_precious' <NEW_LINE> DEBUG = False <NEW_LINE> SQLALCHEMY_DATABASE_URI = database_url | Production configuration. | 6259903eac7a0e7691f7372b |
class Journal(Component): <NEW_LINE> <INDENT> TYPE = 'journal' <NEW_LINE> def __init__(self, target, device): <NEW_LINE> <INDENT> Component.__init__(self, target.fs, target.server, target.action_enabled, target._mode) <NEW_LINE> self.target = target <NEW_LINE> self.dev = device <NEW_LINE> <DEDENT> @property <NEW_LINE> ... | Manage a target external journal device. | 6259903e26068e7796d4db89 |
class AuthApi(Resource): <NEW_LINE> <INDENT> def post(self): <NEW_LINE> <INDENT> args = AuthParser.post.parse_args() <NEW_LINE> user = User.query.get(args['user_no']) <NEW_LINE> if not user: <NEW_LINE> <INDENT> abort(400, message="用户名不存在或者密码错误", code=ErrorCode.user_not_found.value) <NEW_LINE> <DEDENT> if not user.check... | 用户认证 | 6259903e15baa723494631d4 |
class ImEncoder(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_size, zsize=32, use_res=False, use_bn=False, depth=0, colors=3): <NEW_LINE> <INDENT> a, b, c = 16, 64, 128 <NEW_LINE> p, q, r = 4, 4, 4 <NEW_LINE> super().__init__() <NEW_LINE> self.zsize = zsize <NEW_LINE> modules = [ util.Block(colors, a, use_res=u... | Encoder for a VAE | 6259903e16aa5153ce401730 |
class ImgurScrapeMIMEParser(BaseMIMEParser): <NEW_LINE> <INDENT> pattern = re.compile(r'https?://(w+\.)?(m\.)?imgur\.com/[^.]+$') <NEW_LINE> @staticmethod <NEW_LINE> def get_mimetype(url): <NEW_LINE> <INDENT> page = requests.get(url) <NEW_LINE> soup = BeautifulSoup(page.content, 'html.parser') <NEW_LINE> tag = soup.fin... | The majority of imgur links don't point directly to the image, so we need
to open the provided url and scrape the page for the link.
Scrape the actual image url from an imgur landing page. Imgur intentionally
obscures this on most reddit links in order to draw more traffic for their
advertisements.
There are a couple... | 6259903e26238365f5fadd9a |
class HTTP01DualNetworkedServersTest(unittest.TestCase): <NEW_LINE> <INDENT> _multiprocess_can_split_ = True <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.account_key = jose.JWK.load( test_util.load_vector('rsa1024_key.pem')) <NEW_LINE> self.resources = set() <NEW_LINE> from acme.standalone import HTTP01DualNetw... | Tests for acme.standalone.HTTP01DualNetworkedServers. | 6259903e07d97122c4217ee1 |
class Example(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def getGithubUrl(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): <NEW_LINE> <INDENT> return grpc.experimental.unary_unary(request, target... | Missing associated documentation comment in .proto file. | 6259903ed10714528d69efad |
class Player (models.Model): <NEW_LINE> <INDENT> firstName = models.CharField(max_length=70) <NEW_LINE> lastName = models.CharField(max_length=70) <NEW_LINE> birth = models.DateField() <NEW_LINE> vk_link = models.CharField(max_length=30, null=True) <NEW_LINE> basePosition = models.CharField(max_length=1) <NEW_LINE> ima... | Simple model of player. | 6259903e23e79379d538d742 |
@Predictor.register("sentence-tagger") <NEW_LINE> class SentenceTaggerPredictor(Predictor): <NEW_LINE> <INDENT> def __init__( self, model: Model, dataset_reader: DatasetReader, language: str = "en_core_web_sm", ) -> None: <NEW_LINE> <INDENT> super().__init__(model, dataset_reader) <NEW_LINE> self._tokenizer = SpacyToke... | Predictor for any model that takes in a sentence and returns
a single set of tags for it. In particular, it can be used with
the [`CrfTagger`](../models/crf_tagger.md) model
and also the [`SimpleTagger`](../models/simple_tagger.md) model. | 6259903e3c8af77a43b6885d |
class RenderParams(OrderedDict): <NEW_LINE> <INDENT> def __init__(self, render_id="00", folder='~', filename='sample.wav', duration=20.0, wait=0.0): <NEW_LINE> <INDENT> OrderedDict.__init__(self, [ ('render_id', render_id), ('folder', folder), ('filename', filename), ('duration', duration), ('wait', wait) ]) <NEW_LINE>... | Keep track of render params. | 6259903ebe383301e0254a5b |
class size_spider(scrapy.Spider): <NEW_LINE> <INDENT> name = "akc" <NEW_LINE> allowed_domains = ["akc.org"] <NEW_LINE> start_urls = ["http://www.akc.org/dog-breeds/"] <NEW_LINE> def parse(self, response): <NEW_LINE> <INDENT> top_atoz = response.xpath('//ul[@class="pagination"]')[0] <NEW_LINE> atoz = top_atoz.xpath(".//... | use `scrapy crawl akc -o akc.json` to run this spider | 6259903e4e696a045264e743 |
class CommandToolBitLoad: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def GetResources(self): <NEW_LINE> <INDENT> return { "Pixmap": "Path_ToolBit", "MenuText": QT_TRANSLATE_NOOP("Path_ToolBitLoad", "Load Tool"), "ToolTip": QT_TRANSLATE_NOOP( "Path_ToolBitLoad", "Load an existin... | Command used to load an existing Tool from a file into the current document. | 6259903ed6c5a102081e3369 |
class InfoBox(Gtk.Box): <NEW_LINE> <INDENT> def __init__(self, all_elements, uuid=None): <NEW_LINE> <INDENT> Gtk.Box.__init__(self, halign=Gtk.Align.CENTER, height_request=90, spacing=5, margin_top=10, margin_left=10, margin_right=10) <NEW_LINE> actions.destroy_children(self) <NEW_LINE> element = get_by_uuid(uuid, all_... | Box with information about the selected storage element.
| 6259903e10dbd63aa1c71e1a |
class BaseNotificationStoreProvider(object): <NEW_LINE> <INDENT> __metaclass__ = abc.ABCMeta <NEW_LINE> @abc.abstractmethod <NEW_LINE> def get_notification_message_by_id(self, msg_id, options=None): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def save_notification_... | The base abstract class for all notifications data providers, such as MySQL/Django-ORM backed.
IMPORTANT: NotificationStoreProvider is assumed to be a singleton, therefore there must be
no state stored in the instance of the provider class. | 6259903e0fa83653e46f611d |
class UnifiedDiffParser(t_diff.TextDiffParser): <NEW_LINE> <INDENT> diff_format = "unified" <NEW_LINE> BEFORE_FILE_CRE = re.compile(r"^--- ({0})(\s+{1})?(.*)$".format(pd_utils.PATH_RE_STR, t_diff.EITHER_TS_RE_STR)) <NEW_LINE> AFTER_FILE_CRE = re.compile(r"^\+\+\+ ({0})(\s+{1})?(.*)$".format(pd_utils.PATH_RE_STR, t_diff... | Class to parse "unified" diffs
| 6259903e23e79379d538d743 |
class NamedUnit(UnitBase): <NEW_LINE> <INDENT> def __init__(self, st, register=False, doc=None, format=None): <NEW_LINE> <INDENT> UnitBase.__init__(self) <NEW_LINE> if isinstance(st, (bytes, unicode)): <NEW_LINE> <INDENT> self._names = [st] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> if len(st) == 0: <NEW_LINE> <INDE... | The base class of units that have a name.
Parameters
----------
st : str or list of str
The name of the unit. If a list, the first element is the
canonical (short) name, and the rest of the elements are
aliases.
register : boolean, optional
When `True`, also register the unit in the standard unit
... | 6259903e30c21e258be99a51 |
class SimulationRunMethod(Waveform): <NEW_LINE> <INDENT> def runSim(self, sim): <NEW_LINE> <INDENT> duration = randrange(1, 300) <NEW_LINE> while sim.run(duration, quiet=QUIET): <NEW_LINE> <INDENT> duration = randrange(1, 300) | Basic test of run method of Simulation object | 6259903e50485f2cf55dc1c7 |
@ClassFactory.register(ClassType.NETWORK) <NEW_LINE> class AdaptiveAvgPool2d(nn.AdaptiveAvgPool2d, OperatorSerializable): <NEW_LINE> <INDENT> def __init__(self, output_size=(1, 1)): <NEW_LINE> <INDENT> super(AdaptiveAvgPool2d, self).__init__(output_size) <NEW_LINE> <DEDENT> def forward(self, x): <NEW_LINE> <INDENT> ret... | AdaptiveAvgPool2d Module inherit nn.AdaptiveAvgPool2d. | 6259903e16aa5153ce401732 |
class TestTimeField(unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls) -> None: <NEW_LINE> <INDENT> init_testing() <NEW_LINE> <DEDENT> def test_basic(self) -> None: <NEW_LINE> <INDENT> mtd = application.PROJECT.conn_manager.manager().metadata("flupdates") <NEW_LINE> self.assertTrue(mtd)... | Test time field. | 6259903ebaa26c4b54d504ed |
class Plants: <NEW_LINE> <INDENT> lookup = {} <NEW_LINE> def __init__(self, name, emoji, rarity, level_up_boost): <NEW_LINE> <INDENT> self.name = name.capitalize() <NEW_LINE> self.emoji = lookup_emoji(emoji) <NEW_LINE> self.rarity = rarity <NEW_LINE> self.single = False <NEW_LINE> self.pet_multiplyer = level_up_boost <... | All the plants you can collect
These can be stacked | 6259903ed99f1b3c44d068e1 |
class TestNcValue(BaseTestCase): <NEW_LINE> <INDENT> __metaclass__ = TestNcValueMeta <NEW_LINE> def test_singleton(self): <NEW_LINE> <INDENT> value = TEST_VALUES[1] <NEW_LINE> meta_val_a = noca.nc_value.value(value, METADATAS[0]) <NEW_LINE> meta_val_b = noca.nc_value.value(value, METADATAS[1]) <NEW_LINE> self.assertIs(... | Metaclass helps to instantiate the TestNcValueMeta with all tests | 6259903e24f1403a926861ef |
class RaycastInterceptor(b2.rayCastCallback): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self.__type = None <NEW_LINE> self.__point = None <NEW_LINE> <DEDENT> def ReportFixture(self, fixture, point, normal, fraction): <NEW_LINE> <INDENT> sel... | Raycast callback used in the laser targetting. Returns the userData of the intersected
fixture body, which results in walls or targets | 6259903e07f4c71912bb0677 |
class RandomCrop(object): <NEW_LINE> <INDENT> def __init__(self, min_ious=(0.1, 0.3, 0.5, 0.7, 0.9), min_crop_size=0.3): <NEW_LINE> <INDENT> self.sample_mode = (1, *min_ious, 0) <NEW_LINE> self.min_crop_size = min_crop_size <NEW_LINE> <DEDENT> def __call__(self, img, boxes, labels): <NEW_LINE> <INDENT> h, w, c = img.sh... | 随机切割:随机体现在一方面是随机选择切割ious的大小(从0/0.1/0.3/0.5/0.7/0.9/1),即要求切出来的图片大小跟gt bbox
相比,计算的最小ious要大于随机出来的iou值,这样每次虽然随机切割,但每次包含的gt bbox尺寸也不同,但至少要包含一点(因为ious>0.1)
另一方面是随机定义一个w,h,计算该切出图片跟gt bbox的ious(包含在上面的过程)
同时,强制要求切出来的图片要包含所有bbox的中心点,以确保gt bbox至少1/4在切出的图片上,否则太小就没有训练意义了 | 6259903e21a7993f00c671b3 |
class TestBuildCQM(unittest.TestCase): <NEW_LINE> <INDENT> def test_build_cqm1(self): <NEW_LINE> <INDENT> cqm = build_knapsack_cqm([10, 1], [5, 7], 10) <NEW_LINE> self.assertEqual(cqm.objective.linear, {0: -10.0, 1: -1.0}) <NEW_LINE> self.assertEqual(cqm.constraints["capacity"].lhs.linear, {0: 5.0, 1: 7.0}) <NEW_LINE> ... | Verify correct construction of CQM for very_small.csv data with weight 10. | 6259903e10dbd63aa1c71e1c |
class Network(object): <NEW_LINE> <INDENT> def __init__(self, id): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.populations = {} <NEW_LINE> self.projections = {} <NEW_LINE> <DEDENT> @property <NEW_LINE> def location(self): <NEW_LINE> <INDENT> location_sum = mathutils.Vector((0,0,0)) <NEW_LINE> for _, population in ... | This class represents a network. Network consists of populations and projections between them. | 6259903e23849d37ff8522ff |
class ShowIpBgpAllDampeningParameters(ShowIpBgpAllDampeningParameters_iosxe): <NEW_LINE> <INDENT> pass | Parser for show ip bgp all dampening parameters | 6259903e287bf620b6272e31 |
class ApiType(Enum): <NEW_LINE> <INDENT> exec = 'exec' <NEW_LINE> cloudflare = 'cloudflare' | The API scheme. | 6259903e507cdc57c63a5fe1 |
class AndExpression(SimpleComparison, Binary): <NEW_LINE> <INDENT> def __init__(self, ebpf, left, right): <NEW_LINE> <INDENT> Binary.__init__(self, ebpf, left, right, Opcode.AND) <NEW_LINE> SimpleComparison.__init__(self, ebpf, left, right, Opcode.JSET) <NEW_LINE> self.opcode = (Opcode.JSET, None, Opcode.JSET, None) <N... | The & operator may also be used as a comparison | 6259903e8da39b475be04434 |
class AbilityName(TableBase): <NEW_LINE> <INDENT> __tablename__ = 'ability_names' <NEW_LINE> language_id = sa.Column(sa.Integer, sa.ForeignKey('languages.id'), primary_key=True) <NEW_LINE> ability_id = sa.Column(sa.Integer, sa.ForeignKey('abilities.id'), primary_key=True) <NEW_LINE> name = sa.Column(sa.Text, nullable=F... | An ability's name in a particular language. | 6259903e711fe17d825e15bf |
class ExternalSite(models.Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> db_table = 'gcd_external_site' <NEW_LINE> app_label = 'gcd' <NEW_LINE> ordering = ('site',) <NEW_LINE> verbose_name_plural = 'External Sites' <NEW_LINE> <DEDENT> site = models.CharField(max_length=255) <NEW_LINE> matching = models.Cha... | Pre-approved external sites that can be linked to. | 6259903e8e05c05ec3f6f77e |
class IndexView(HTMLMixin, SimpleView): <NEW_LINE> <INDENT> methods = ['GET'] <NEW_LINE> @classmethod <NEW_LINE> def get_view_name(cls): <NEW_LINE> <INDENT> return 'index' <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def get_view_icon(cls): <NEW_LINE> <INDENT> return 'module-lab' <NEW_LINE> <DEDENT> @classmethod <NEW_LI... | View presenting home page. | 6259903e94891a1f408ba01a |
class GetLatestDeliveryTaskAPI(APIView): <NEW_LINE> <INDENT> permission_classes = (AllowAny,) <NEW_LINE> def get(self, request): <NEW_LINE> <INDENT> if queue.read_data_from_queue() is False: <NEW_LINE> <INDENT> return Response({"status": False, "message": "No New Order", "data": None}, status=status.HTTP_200_OK) <NEW_L... | This endpoint is used to return the latest delivery task.
This API is used by the delivery boys to get the latest delivery task. | 6259903e63b5f9789fe863b3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.