code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class BaseCronApp(RequiredConfig): <NEW_LINE> <INDENT> required_config = Namespace() <NEW_LINE> def __init__(self, config, job_information): <NEW_LINE> <INDENT> self.config = config <NEW_LINE> self.job_information = job_information <NEW_LINE> <DEDENT> def main(self, function=None, once=True): <NEW_LINE> <INDENT> if fun...
The base class from which Socorro apps are based
62598eef7d43ff24874267e1
class genAddOutlineMaterial(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "object.geoink_addoutlinemat" <NEW_LINE> bl_label = "add outlines materials" <NEW_LINE> C = bpy.context <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> return context.active_object is not None <NEW_LINE> <DED...
Adds a Material to make outlines
62598eef10dbd63aa1c6f343
class SettingString(Setting): <NEW_LINE> <INDENT> id = sa.Column(sa.Integer, sa.ForeignKey('config.settings.id'), primary_key=True) <NEW_LINE> @declared_attr <NEW_LINE> def value(cls) -> sa.Column: <NEW_LINE> <INDENT> return sa.Column(sa.String) <NEW_LINE> <DEDENT> @declared_attr <NEW_LINE> def __mapper_args__(cls) -> ...
String-valued setting.
62598eef21bff66bcd721421
class Point3D: <NEW_LINE> <INDENT> def __init__(self, x: float = 0, y: float = 0, z: float = 0): <NEW_LINE> <INDENT> self._p = (x, y, z) <NEW_LINE> <DEDENT> def set_x(self, x): <NEW_LINE> <INDENT> pos = self._p <NEW_LINE> self._p = (x, pos[1], pos[2]) <NEW_LINE> <DEDENT> def set_y(self, y): <NEW_LINE> <INDENT> pos = se...
this class represents a three dimensions point. contains x, y, z @authors Eliav Amar and Tehila Abadi
62598eef498bea3a75a562fe
class DBOperations: <NEW_LINE> <INDENT> def __init__(self, host_ip, port_no, user_name, password): <NEW_LINE> <INDENT> self.host = host_ip <NEW_LINE> self.port = port_no <NEW_LINE> self.name = user_name <NEW_LINE> self.pwd = password <NEW_LINE> <DEDENT> def connect(self, database): <NEW_LINE> <INDENT> try: <NEW_LINE> <...
Class for implementing methods for MySQL database operations
62598eeff548e778e5969d57
class BoundContainerWithGetAttr(BoundContainer): <NEW_LINE> <INDENT> def __getattr__(self, attr): <NEW_LINE> <INDENT> return self.config.get_member(self.get_data_dict(), attr, self.prefix)
A configuration bound to a data container where we expect the user to use getattr syntax (container.FOO) to access the members. This is used by ConfigSection
62598eefe5267d203ee6a0d4
class install(_install): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> resource_file = os.path.join(os.path.dirname(__file__), 'gramps', 'gen', 'utils', 'resource-path') <NEW_LINE> with io.open(resource_file, 'w', encoding='utf-8', errors='strict') as fp: <NEW_LINE> <INDENT> path = os.path.abspath(os.path.join...
Custom install command.
62598eef167d2b6e312b5765
class HTMLFormInput: <NEW_LINE> <INDENT> type = '' <NEW_LINE> name = '' <NEW_LINE> value = '' <NEW_LINE> x = 0 <NEW_LINE> y = 0 <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return "HTML Input <" + self.name + "(" + self.type + ")>"
Represents an input element of an HTML form Attributes | **type**: The input type | **name**: The input name | **value**: The input value | **x**: The x-coordinate if this input is an image | **y**: The y-coordinate if this input is an image
62598eefd486a94d0ba2a799
@six.add_metaclass(abc.ABCMeta) <NEW_LINE> class L3RouterHostingDeviceBaseScheduler(object): <NEW_LINE> <INDENT> def get_candidates(self, plugin, context, r_hd_binding_db): <NEW_LINE> <INDENT> router = r_hd_binding_db.router <NEW_LINE> tenant_id = router['tenant_id'] <NEW_LINE> router_type_db = r_hd_binding_db.router_t...
Slot-aware base scheduler of Neutron routers to hosting devices.
62598eef627d3e7fe0e05656
@dataclass <NEW_LINE> class APIGatewayProxyResult: <NEW_LINE> <INDENT> status_code: int <NEW_LINE> body: str <NEW_LINE> headers: Mapping[Union[bool, int, float, str]] = field(default_factory=dict) <NEW_LINE> multi_value_headers: MultiValueMapping[Union[bool, int, float, str]] = field(default_factory=dict) <NEW_LINE> is...
https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html
62598eefbe7bc26dc9251248
class ReachabilityQuickTestsUpdate(extension.ClientExtensionUpdate, ReachabilityQuickTest): <NEW_LINE> <INDENT> shell_command = 'reachability-quick-tests-update' <NEW_LINE> list_columns = ['id', 'name', 'src_tenant_id', 'src_tenant_name', 'src_segment_id', 'src_segment_name', 'src_ip', 'dst_ip', 'expected_result'] <NEW...
Update a Reachability Quick Test.
62598eef23849d37ff84f885
class TextRNN(TextModel): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(TextRNN, self).__init__(**kwargs) <NEW_LINE> self.number_classes =3 <NEW_LINE> self.lstm_dim =128 <NEW_LINE> self.dense_dim = 256 <NEW_LINE> <DEDENT> def attention_3d_block(self,inputs): <NEW_LINE> <INDENT> a = Permute...
docstring for TextRNN
62598eef460517430c430c54
class MessageFilterValue(Model): <NEW_LINE> <INDENT> project = models.ForeignKey(Project, null=True) <NEW_LINE> group = models.ForeignKey(Group) <NEW_LINE> times_seen = models.PositiveIntegerField(default=0) <NEW_LINE> key = models.CharField(choices=FILTER_KEYS, max_length=32) <NEW_LINE> value = models.CharField(max_le...
Stores the total number of messages seen by a group matching the given filter.
62598eefa05bb46b3848903d
class Block: <NEW_LINE> <INDENT> def __init__(self, header_line, statements): <NEW_LINE> <INDENT> pass
Block - starts with a heading line optionally followed by multiple lines
62598eef92d797404e387f61
class BatchLoader(DataLoader): <NEW_LINE> <INDENT> def __init__(self, samples, batch_size=32, shuffle=True): <NEW_LINE> <INDENT> super().__init__(samples, batch_size, shuffle) <NEW_LINE> <DEDENT> def get_batches(self): <NEW_LINE> <INDENT> if self.shuffle: <NEW_LINE> <INDENT> random.shuffle(self.samples) <NEW_LINE> <DED...
Iterate over data samples in random batches.
62598eef3317a56b869bd94c
class Solution: <NEW_LINE> <INDENT> def swapIntegers(self, A, index1, index2): <NEW_LINE> <INDENT> tmp1 = A[index1] <NEW_LINE> A[index1] = A[index2] <NEW_LINE> A[index2] = tmp1
@param A: An integer array @param index1: the first index @param index2: the second index @return: nothing
62598eefcb5e8a47e493b55f
class stock_move(osv.osv): <NEW_LINE> <INDENT> _inherit = 'stock.move' <NEW_LINE> _columns = {'picking_subtype': fields.related('picking_id', 'subtype', string='Picking Subtype', type='selection', selection=[('picking', 'Picking'),('ppl', 'PPL'),('packing', 'Packing')],), }
corresponding picking subtype
62598eef7b25080760ed5c67
class UserReviewDetails(APIView): <NEW_LINE> <INDENT> def get(self, request, pk, format=None): <NEW_LINE> <INDENT> reviews = user_review.objects.get(pk=pk) <NEW_LINE> serializer = UserReviewSerializer(reviews, many=False) <NEW_LINE> return Response(serializer.data, status=status.HTTP_200_OK)
Retrieve a particular review of a user
62598eef4c34283577618ab1
class TestFileSensor: <NEW_LINE> <INDENT> def test_files_present(self, local_mock_dir, test_dag): <NEW_LINE> <INDENT> task = sensors.FileSensor( path=posixpath.join(local_mock_dir, "*.txt"), hook=LocalHook(), task_id="file_sensor", dag=test_dag ) <NEW_LINE> assert task.poke({}) <NEW_LINE> <DEDENT> def test_files_missin...
Tests for the FileSensor class.
62598eef97e22403b38396bc
class Field_inreplyto_link(_Field): <NEW_LINE> <INDENT> label = 'In-Reply-To URL' <NEW_LINE> path = ['inReplyTo', 'link']
Take a dict, assign to self.value the value of inReplyTo.link. Should only appear in Replies.
62598eef38b623060ffa786b
class NontransactionalSession(SessionError): <NEW_LINE> <INDENT> pass
Exception raised when commit or rollback is attempted on a non transactional session.
62598eef090684286d592ac9
class LearningRateScheduler(object): <NEW_LINE> <INDENT> def __init__(self, lr_type, initial_lr): <NEW_LINE> <INDENT> self.lr_type = lr_type <NEW_LINE> self.initial_lr = initial_lr <NEW_LINE> self.min_learning_rate = 0.0001 <NEW_LINE> <DEDENT> def __call__(self, global_step): <NEW_LINE> <INDENT> if self.lr_type == "fix...
Implements pre-defined learning rate schedulers.
62598eef4f88993c371ef8cf
class ThreadClient(threading.Thread): <NEW_LINE> <INDENT> def __init__(self,conn): <NEW_LINE> <INDENT> threading.Thread.__init__(self) <NEW_LINE> global list_clients <NEW_LINE> self.connexion = conn <NEW_LINE> self.etat_client = 0 <NEW_LINE> self.coord_balle = {} <NEW_LINE> self.nom = self.getName() <NEW_LINE> list_cli...
dérivation de classe pour gérer la connexion avec un client
62598eefd58c6744b42db69c
class ID_module(nn.Module): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(ID_module, self).__init__() <NEW_LINE> self.linear = nn.Linear(768, 2) <NEW_LINE> <DEDENT> def forward(self, X): <NEW_LINE> <INDENT> X = self.linear(X) <NEW_LINE> return X
Intent detection module.
62598eefe5267d203ee6a0d5
class Port(Integer): <NEW_LINE> <INDENT> PORT_MIN = 0 <NEW_LINE> PORT_MAX = 65535 <NEW_LINE> def __init__(self, min=None, max=None, type_name='port', choices=None): <NEW_LINE> <INDENT> min = self.PORT_MIN if min is None else min <NEW_LINE> max = self.PORT_MAX if max is None else max <NEW_LINE> if min < self.PORT_MIN: <...
Port type Represents a L4 Port. :param min: Optional check that value is greater than or equal to min. :param max: Optional check that value is less than or equal to max. :param type_name: Type name to be used in the sample config file. :param choices: Optional sequence of valid values. .. versionadded:: 3.16
62598eef32920d7e50bc47fa
class FileGalaxyOptionManager(object): <NEW_LINE> <INDENT> def __init__(self, app): <NEW_LINE> <INDENT> self.app = app <NEW_LINE> <DEDENT> def setup(self): <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> def set_properties(self, properties, section="app:main", description=None, priority_offset=0): <NEW_LINE> <INDEN...
Default Galaxy option manager, modifies `$galaxy_config_dir/$OPTIONS_FILE_NAME` directly.
62598eefb7558d5895461e14
class GenericGenXSimulatorFilter(paf.filter_base.Filter): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> paf.filter_base.Filter.__init__(self) <NEW_LINE> p = port.Port(MAKE_DATA()) <NEW_LINE> self.input_port["instrument"] = p <NEW_LINE> self.add_expected_parameter("scan_start", MAKE_DATA(.1), MAKE_DATA(.1)...
filter for doing simulation using simulator
62598eef30dc7b766599e057
class LoosePointFunc(object): <NEW_LINE> <INDENT> def __init__(self, f, model): <NEW_LINE> <INDENT> self.f = f <NEW_LINE> self.model = model <NEW_LINE> <DEDENT> def __call__(self, *args, **kwargs): <NEW_LINE> <INDENT> point = Point(model=self.model, *args, **kwargs) <NEW_LINE> return self.f(**point)
Wraps so a function so it takes a dict of arguments instead of arguments but can still take arguments.
62598eef23849d37ff84f887
class Saver(ModelCallback): <NEW_LINE> <INDENT> def __init__(self, log_dir: Union[str, Path], *args, **kwargs): <NEW_LINE> <INDENT> self.log_dir = log_dir <NEW_LINE> super().__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def on_epoch_end(self, **kwargs): <NEW_LINE> <INDENT> if not self.training: <NEW_LINE> <INDENT> retu...
TODO
62598eef5fdd1c0f98e5c76f
class RandomMappingFunctionSource(AbstractFnSource, Source): <NEW_LINE> <INDENT> m = random.shuffle(list(range(1, 100))) <NEW_LINE> def _func(self, x): <NEW_LINE> <INDENT> return self.m[x - 1]
A source that transmits a random mapping of x to y values.
62598eefaad79263cf42cfdb
class CreateEmvDataDecryptRequest(object): <NEW_LINE> <INDENT> _names = { "cipher":'cipher', "tags":'tags', "dukpt":'dukpt' } <NEW_LINE> def __init__(self, cipher=None, tags=None, dukpt=None): <NEW_LINE> <INDENT> self.cipher = cipher <NEW_LINE> self.dukpt = dukpt <NEW_LINE> self.tags = tags <NEW_LINE> <DEDENT> @classme...
Implementation of the 'CreateEmvDataDecryptRequest' model. TODO: type model description here. Attributes: cipher (string): Emv Decrypt cipher type dukpt (CreateEmvDataDukptDecryptRequest): Dukpt data request tags (list of CreateEmvDataTlvDecryptRequest): Encrypted tags list
62598eef32920d7e50bc47fb
class DECoverageType(CoClass): <NEW_LINE> <INDENT> _reg_clsid_ = GUID('{80172DB6-5715-4157-B253-6150EA74203E}') <NEW_LINE> _idlflags_ = [] <NEW_LINE> _typelib_path_ = typelib_path <NEW_LINE> _reg_typelib_ = ('{1CE6AC65-43F5-4529-8FC0-D7ED298E4F1A}', 10, 2)
Coverage Data Element object Type.
62598eefdc8b845886d51d92
class IOPlugin: <NEW_LINE> <INDENT> __metaclass__ = abc.ABCMeta <NEW_LINE> Data = collections.namedtuple( 'IOPluginData', 'account_key account_reg key cert chain' ) <NEW_LINE> EMPTY_DATA = Data( account_key=None, account_reg=None, key=None, cert=None, chain=None, ) <NEW_LINE> def __init__(self, path): <NEW_LINE> <INDEN...
Input/output plugin. In case of any problems, `persisted`, `load` and `save` methods should raise `Error`, for which message will be displayed directly to the user through STDERR (in `main`).
62598eef56ac1b37e63009ba
class CcxFieldOverride(models.Model): <NEW_LINE> <INDENT> ccx = models.ForeignKey(CustomCourseForEdX, db_index=True, on_delete=models.CASCADE) <NEW_LINE> location = UsageKeyField(max_length=255, db_index=True) <NEW_LINE> field = models.CharField(max_length=255) <NEW_LINE> class Meta(object): <NEW_LINE> <INDENT> app_lab...
Field overrides for custom courses. .. no_pii:
62598eef5fc7496912d47658
class AccountCmdSet(default_cmds.AccountCmdSet): <NEW_LINE> <INDENT> key = 'DefaultAccount' <NEW_LINE> def at_cmdset_creation(self): <NEW_LINE> <INDENT> super(AccountCmdSet, self).at_cmdset_creation() <NEW_LINE> self.remove(default_cmds.CmdCWho) <NEW_LINE> self.remove(default_cmds.CmdCBoot) <NEW_LINE> self.remove(defau...
This is the cmdset available to the Account at all times. It is combined with the `CharacterCmdSet` when the Account puppets a Character. It holds game-account-specific commands, channel commands, etc.
62598eef442bda511e95ac31
class UnstructuredNearest(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return 'UnstructuredNearest()' <NEW_LINE> <DEDENT> def regridder(self, src_cube, target_grid): <NEW_LINE> <INDENT> from iris.analysis.trajectory import ...
This is a nearest-neighbour regridding scheme for regridding data whose horizontal (X- and Y-axis) coordinates are mapped to the *same* dimensions, rather than being orthogonal on independent dimensions. For latitude-longitude coordinates, the nearest-neighbour distances are computed on the sphere, otherwise flat Eucl...
62598ef04c34283577618ab3
class KubeClauseBuilder(jc.ContractClauseBuilder): <NEW_LINE> <INDENT> def __init__(self, title, kubectl, retryable_for_secs=0, strict=False): <NEW_LINE> <INDENT> super(KubeClauseBuilder, self).__init__( title=title, retryable_for_secs=retryable_for_secs) <NEW_LINE> self.__factory = KubeObjectFactory(kubectl) <NEW_LINE...
A ContractClause that facilitates observing Kubernetes state.
62598ef076e4537e8c3edd84
class ThreadWithReturnValue(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, group=None, target=None, name=None, args=(), kwargs={}, Verbose=None): <NEW_LINE> <INDENT> threading.Thread.__init__(self, group, target, name, args, kwargs) <NEW_LINE> self._return = None <NEW_LINE> <DEDENT> def run(self): <NEW_LINE>...
Thread with a join() that returns whatever the target did.
62598ef0dd821e528d6d770e
class QuoteDetail(APIView): <NEW_LINE> <INDENT> @swagger_auto_schema( auto_schema=None, ) <NEW_LINE> def get_object(self, pk): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return Quote.objects.get(pk=pk) <NEW_LINE> <DEDENT> except Quote.DoesNotExist: <NEW_LINE> <INDENT> raise Http404 <NEW_LINE> <DEDENT> <DEDENT> @swagg...
Retrieve, update or delete a quote instance.
62598ef0be8e80087fbbd81f
class TextComponent(TextComponentRefMut): <NEW_LINE> <INDENT> def drop(self): <NEW_LINE> <INDENT> if self.ptr != None: <NEW_LINE> <INDENT> livesplit_core_native.TextComponent_drop(self.ptr) <NEW_LINE> self.ptr = None <NEW_LINE> <DEDENT> <DEDENT> def __del__(self): <NEW_LINE> <INDENT> self.drop() <NEW_LINE> <DEDENT> def...
The Text Component simply visualizes any given text. This can either be a single centered text, or split up into a left and right text, which is suitable for a situation where you have a label and a value.
62598ef038b623060ffa786d
class Meta: <NEW_LINE> <INDENT> verbose_name = 'Imagem' <NEW_LINE> verbose_name_plural = 'Imagens'
Definições do model.
62598ef0a17c0f6771d5aa23
class NDDataWrite(registry.UnifiedReadWrite): <NEW_LINE> <INDENT> def __init__(self, instance, cls): <NEW_LINE> <INDENT> super().__init__(instance, cls, 'write') <NEW_LINE> <DEDENT> def __call__(self, *args, **kwargs): <NEW_LINE> <INDENT> registry.write(self._instance, *args, **kwargs)
Write this CCDData object out in the specified format. This function provides the NDData interface to the astropy unified I/O layer. This allows easily writing a file in many supported data formats using syntax such as:: >>> from astropy.nddata import CCDData >>> dat = CCDData(np.zeros((12, 12)), unit='adu') # ...
62598ef044b2445a339b5d53
class CommonTags(object): <NEW_LINE> <INDENT> content_object = None <NEW_LINE> def set_use_by_date(self, days_in_future): <NEW_LINE> <INDENT> date_expiry = timezone.now() + timedelta(days=days_in_future) <NEW_LINE> self.content_object.date_use_by = date_expiry <NEW_LINE> self.content_object.save() <NEW_LINE> return dat...
These tags apply to both stock and products
62598ef07d43ff24874267e3
@skipIf(not isGraphvizModuleInstalled(), "Graphviz module is not installed.") <NEW_LINE> @skipIf(not isTwistedInstalled(), "Twisted is not installed.") <NEW_LINE> class ElementMakerTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> from .._visualize import elementMaker <NEW_LINE> self.elementMake...
L{elementMaker} generates HTML representing the specified element.
62598ef0d58c6744b42db69d
class GuiTestSuite: <NEW_LINE> <INDENT> def __init__(self, queue: queue.Queue, shell): <NEW_LINE> <INDENT> self._queue = queue <NEW_LINE> self._shell = shell <NEW_LINE> self._current_thread = None <NEW_LINE> self._timeout = True <NEW_LINE> self._shutting_down = False <NEW_LINE> <DEDENT> def _start_new(self): <NEW_LINE>...
GUI test suite runner poll function should be scheduled from timer for periodic updates
62598ef066673b3332c2eb79
class MyRS: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.core = reedsolo.RSCodec(10) <NEW_LINE> <DEDENT> def encode(self, code: str, text: str) -> Image.Image: <NEW_LINE> <INDENT> assert (len(code) <= 6) <NEW_LINE> code_bytes = bytearray(code, 'ascii') <NEW_LINE> print(code_bytes) <NEW_LINE> code_ma...
使用方法和MyBCH 一样, 最多可以输入48 bits 但是最多只能有5bits error 但是有解码检测, 即告诉使用者是否解码正确, 如果不正确 decoder 返回''
62598ef03539df3088ecaa82
class StreamWithError(object): <NEW_LINE> <INDENT> def __init__(self, stream, exception_type, num_reads=0): <NEW_LINE> <INDENT> self._stream = stream <NEW_LINE> self._exception_type = exception_type <NEW_LINE> self._num_reads = num_reads <NEW_LINE> self._count = 0 <NEW_LINE> <DEDENT> def read(self, n=-1): <NEW_LINE> <I...
A wrapper to simulate errors while reading from a stream :param stream: The underlying stream to read from :param exception_type: The exception type to throw :param num_reads: The number of times to allow a read before raising the exception. A value of zero indicates to raise the error on the first read.
62598ef0956e5f7376df4a60
class CpSolverSolutionCallback(pywrapsat.SolutionCallback): <NEW_LINE> <INDENT> def OnSolutionCallback(self): <NEW_LINE> <INDENT> self.on_solution_callback() <NEW_LINE> <DEDENT> def BooleanValue(self, lit): <NEW_LINE> <INDENT> if not self.Response().solution: <NEW_LINE> <INDENT> raise RuntimeError('Solve() has not be c...
Solution callback. This class implements a callback that will be called at each new solution found during search. The method OnSolutionCallback() will be called by the solver, and must be implemented. The current solution can be queried using the BooleanValue() and Value() methods.
62598ef0627d3e7fe0e0565a
class SEPZeroSpecial(nodes.SparseNodeVisitor): <NEW_LINE> <INDENT> sep_url = Headers.sep_url <NEW_LINE> def unknown_visit(self, node): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def visit_reference(self, node): <NEW_LINE> <INDENT> node.replace_self(mask_email(node)) <NEW_LINE> <DEDENT> def visit_field_list(self, node...
Perform the special processing needed by SEP 0: - Mask email addresses. - Link SEP numbers in the second column of 4-column tables to the SEPs themselves.
62598ef07b180e01f3e4842f
class SolrStringField(SolrTypedField): <NEW_LINE> <INDENT> field_type = "string"
Solr string field.
62598ef0cc0a2c11144797d6
class BRPaginationError(Exception): <NEW_LINE> <INDENT> def __init__(self, error): <NEW_LINE> <INDENT> super().__init__(error)
Raised when :meth:`asyncbattlerite.models.MatchPaginator.next` or :meth:`asyncbattlerite.models.MatchPaginator.prev` are called when the paginator is on the last or first page respectively.
62598ef030dc7b766599e059
class XSzxipcf(XSMultiplicativeModel): <NEW_LINE> <INDENT> __function__ = _f77_or_c_12100("zxipcf") <NEW_LINE> def __init__(self, name='zxipcf'): <NEW_LINE> <INDENT> self.Nh = Parameter(name, 'Nh', 10, 0.05, 500, 0.0, hugeval, '10^22 atoms / cm^2') <NEW_LINE> self.log_xi = Parameter(name, 'log_xi', 3, -3, 6, -hugeval, ...
The XSPEC zxipcf model: partial covering absorption by partially ionized material. The model is described at [1]_. .. note:: Deprecated in Sherpa 4.10.0 The ``logxi`` parameter has been renamed ``log_xi`` to match the XSPEC definition. The name ``logxi`` can still be used to access the parameter, but this n...
62598ef03346ee7daa336a4f
class AvailableServiceAliasesResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'next_link': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[AvailableServiceAlias]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs )...
An array of available service aliases. Variables are only populated by the server, and will be ignored when sending a request. :param value: An array of available service aliases. :type value: list[~azure.mgmt.network.v2019_09_01.models.AvailableServiceAlias] :ivar next_link: The URL to get the next set of results. :...
62598ef02c8b7c6e89bd1f91
class InvalidOptionId(RobinhoodException): <NEW_LINE> <INDENT> pass
When an invalid option id is given
62598ef0d268445f26638f77
class BinarizationTrainer(PreprocessingTrainer): <NEW_LINE> <INDENT> def __init__(self, threshold=0.0): <NEW_LINE> <INDENT> proxy = gateway.jvm.org.apache.ignite.ml.preprocessing.binarization.BinarizationTrainer() <NEW_LINE> proxy.withThreshold(threshold) <NEW_LINE> PreprocessingTrainer.__init__(self, gateway.jvm.org.a...
Binarization trainer.
62598ef05fc7496912d47659
class ReactionFlatFileParser( FlatFileParser ): <NEW_LINE> <INDENT> def __init__( self, delimiter='\t', comment='#' ): <NEW_LINE> <INDENT> FlatFileParser.__init__( self, delimiter, comment ) <NEW_LINE> requiredHeaders = {"Abbreviation":"Name", "OfficialName":"OfficialName", "Equation":"Equation"} <NEW_LINE> optionalHea...
@summary: Parser for reaction flat files
62598ef0851cf427c66b6a93
class Priced(models.Model): <NEW_LINE> <INDENT> unit_price = fields.MoneyField(_("Unit price")) <NEW_LINE> sale_id = models.IntegerField(null=True) <NEW_LINE> sale_price = fields.MoneyField(_("Sale price")) <NEW_LINE> sale_from = models.DateTimeField(_("Sale start"), blank=True, null=True) <NEW_LINE> sale_to = models.D...
Abstract model with unit and sale price fields. Inherited by ``Product`` and ``ProductVariation`` models.
62598ef0097d151d1a2bf7ef
class PoliticalInformationInline(admin.TabularInline): <NEW_LINE> <INDENT> model = PoliticalInformation
This class implements PoliticalInformation inline for Person in Omnipotence
62598ef07b25080760ed5c6c
class PushBulletNotificationProvider: <NEW_LINE> <INDENT> def __init__(self, pb): <NEW_LINE> <INDENT> self.pushbullet = pb <NEW_LINE> self._data = None <NEW_LINE> self.listener = None <NEW_LINE> self.thread = threading.Thread(target=self.retrieve_pushes) <NEW_LINE> self.thread.daemon = True <NEW_LINE> self.thread.start...
Provider for an account, leading to one or more sensors.
62598ef04c34283577618ab5
class CachingMixin: <NEW_LINE> <INDENT> invalidate_model = False <NEW_LINE> cache_enabled = True <NEW_LINE> def flush_key(self): <NEW_LINE> <INDENT> return flush_key(self) <NEW_LINE> <DEDENT> @property <NEW_LINE> def cache_key(self): <NEW_LINE> <INDENT> return self._cache_key(self.pk) <NEW_LINE> <DEDENT> @classmethod <...
Inherit from this class to get caching and invalidation helpers.
62598ef071ff763f4b5e5f2f
class FeatureUninstallError(BaseDatabaseError): <NEW_LINE> <INDENT> def __init__(self, **kw): <NEW_LINE> <INDENT> super(FeatureUninstallError, self).__init__( 'Can\'t uninstall feature "{{current}}" from model "{model}" because it\'s ' 'not even installed, valid installed features are: {{allowed}}', **kw)
Can't uninstall feature that isn't installed.
62598ef0f548e778e5969d5c
class Request(RequestBase): <NEW_LINE> <INDENT> def __init__(self, refund_id: str=None): <NEW_LINE> <INDENT> self.refund_id = refund_id <NEW_LINE> super().__init__() <NEW_LINE> <DEDENT> def requires_api_token(self): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> def requires_service_id(self): <NEW_LINE> <INDENT> r...
Request object for the Refund::info API :param str refund_id: Refund ID
62598ef0090684286d592acb
class Topic(models.Model): <NEW_LINE> <INDENT> TOPIC_CHOICES = ( ('Politics', 'Politics'), ('Health', 'Health'), ('Sport', 'Sport'), ('Tech', 'Tech') ) <NEW_LINE> topic = models.CharField(max_length=8, choices=TOPIC_CHOICES, unique=True, primary_key=True) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.to...
Class representing db of topics
62598ef07d43ff24874267e4
class program_result_close(orm.TransientModel): <NEW_LINE> <INDENT> _name = 'program.result.close' <NEW_LINE> _description = "Result Mass Closer" <NEW_LINE> _columns = { 'line_ids': fields.many2many( 'program.result.close.line', 'program_result_close_rel', string='Results', ), } <NEW_LINE> def _build_result_ids(self, c...
Form to mass-close results based on their states and user's group rights
62598ef02ae34c7f260a98b9
class UpdateExternalSegment(neutronV20.UpdateCommand): <NEW_LINE> <INDENT> resource = 'external_segment' <NEW_LINE> log = logging.getLogger(__name__ + '.UpdateExternalSegment') <NEW_LINE> def add_known_arguments(self, parser): <NEW_LINE> <INDENT> parser.add_argument( '--description', help=_('New description of the Exte...
Update External Segment's information.
62598ef021bff66bcd721427
class PersonParticipationView(LaunchpadView): <NEW_LINE> <INDENT> @property <NEW_LINE> def label(self): <NEW_LINE> <INDENT> return 'Team participation for ' + self.context.displayname <NEW_LINE> <DEDENT> def _asParticipation(self, membership=None, team=None, via=None): <NEW_LINE> <INDENT> if ((membership is None and te...
View for the ~person/+participation page.
62598ef0e5267d203ee6a0d9
class EventsMonthCalendar(HTMLCalendar): <NEW_LINE> <INDENT> def __init__(self, year, month, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self.month = month <NEW_LINE> self.year = year <NEW_LINE> self.start_url = "https://github.com/qkzk/cours/blob/master/" <NEW_LINE> self.end_url ...
Classe qui étend HTMLCalendar en formattant les jours Utilisée pour générer une table d'un mois dont les jours pointent vers une page de la semaine. Les pages étant rangées dans des sous dossiers par période
62598ef066673b3332c2eb7b
class Range(_messages.Message): <NEW_LINE> <INDENT> ipCidrRange = _messages.StringField(1) <NEW_LINE> network = _messages.StringField(2)
Represents a found unused range. Fields: ipCidrRange: CIDR range in "10.x.x.x/y" format that is within the allocated ranges and currently unused. network: In the Shared VPC host project, the VPC network that's peered with the consumer network. For example: `projects/1234321/global/networks/host-network...
62598ef0091ae356687033ea
class SuspendPolicy: <NEW_LINE> <INDENT> NONE = 0 <NEW_LINE> EVENT_THREAD = 1 <NEW_LINE> ALL = 2
http://docs.oracle.com/javase/8/docs/platform/jpda/jdwp/jdwp-protocol.html#JDWP_SuspendPolicy
62598ef0e5267d203ee6a0da
class Type3View(APIView): <NEW_LINE> <INDENT> renderer_classes = [JSONRenderer] <NEW_LINE> def get(self, request, format=None): <NEW_LINE> <INDENT> Types = Type3.objects.all() <NEW_LINE> Types_serializer = Type3ModelSerializer(Types, many=True) <NEW_LINE> return Response(Types_serializer.data)
all Type3
62598ef0d486a94d0ba2a79f
class View(Table): <NEW_LINE> <INDENT> def exists_in_database(self): <NEW_LINE> <INDENT> sql = _COUNT_VIEWS_QUERY.format(self._schema.name, self._name) <NEW_LINE> return self._connection.execute_sql_scalar(sql) == 1
Represents a database view on a schema. Provides a mechanism for creating, alter and drop views. Args: schema (mysqlx.Schema): The Schema object. name (str): The table name.
62598ef0be7bc26dc925124b
class Config(object): <NEW_LINE> <INDENT> init_scale = 0.08 <NEW_LINE> learning_rate = 0.6 <NEW_LINE> max_grad_norm = 5 <NEW_LINE> num_layers = 2 <NEW_LINE> num_steps = 35 <NEW_LINE> hidden_size = 650 <NEW_LINE> max_epoch = 10 <NEW_LINE> max_max_epoch = 39 <NEW_LINE> keep_prob = 0.5 <NEW_LINE> lr_decay = 1 / 1.15 <NEW_...
config for training.
62598ef0e1aae11d1e7cdc29
class RangoFechasFiltro(admin.SimpleListFilter): <NEW_LINE> <INDENT> title = u'Por fechas' <NEW_LINE> parameter_name = 'flt_fechas' <NEW_LINE> template = 'admin/porfechasfiltro.html' <NEW_LINE> filtro_tipos = () <NEW_LINE> def __init__(self, request, params, model, model_admin): <NEW_LINE> <INDENT> super(RangoFechasFil...
Filtro para rangos de fechas. Además se puede escoger entre distintos campos del modelo. Por ejemplo filtrar por fecha de creación o fecha de modificación.
62598ef0aad79263cf42cfdf
class QPCIBus(QSparseBus): <NEW_LINE> <INDENT> def __init__(self, busid, bus_type, aobject=None, length=32, first_port=0): <NEW_LINE> <INDENT> super(QPCIBus, self).__init__('bus', [['addr', 'func'], [length, 8]], busid, bus_type, aobject) <NEW_LINE> self.first_port = (first_port, 0) <NEW_LINE> <DEDENT> @staticmethod <N...
PCI Bus representation (bus&addr, uses hex digits)
62598ef05fdd1c0f98e5c773
class DF17(ExtendedSquitter): <NEW_LINE> <INDENT> def __init__(self, frombuf): <NEW_LINE> <INDENT> ExtendedSquitter.__init__(self, frombuf) <NEW_LINE> self.DF = (frombuf[0] & 0xf8) >> 3 <NEW_LINE> self.CA = (frombuf[0] & 0x07) <NEW_LINE> self.AA = (frombuf[1] << 16) | (frombuf[2] << 8) | frombuf[3] <NEW_LINE> self.squa...
DF17 (Extended Squitter) message. Fields: DF, CA, AA, address, crc_ok; plus those of ExtendedSquitter.
62598ef0dc8b845886d51d96
class DatasetPluginHelper: <NEW_LINE> <INDENT> def __init__(self, doc): <NEW_LINE> <INDENT> self._doc = doc <NEW_LINE> <DEDENT> @property <NEW_LINE> def datasets1d(self): <NEW_LINE> <INDENT> return [ name for name, ds in self._doc.data.items() if (ds.dimensions == 1 and ds.datatype == 'numeric') ] <NEW_LINE> <DEDENT> @...
Helpers to get existing datasets for plugins.
62598ef0fff4ab517ebcbfaa
class cardHundredFourteen(unittest.TestCase): <NEW_LINE> <INDENT> def testPlayable(self): <NEW_LINE> <INDENT> app = Labyrinth(1, 1, testBlankScenarioSetup) <NEW_LINE> self.assertTrue(app.deck["114"].playable("US", app)) <NEW_LINE> self.assertTrue(app.deck["114"].playable("Jihadist", app)) <NEW_LINE> <DEDENT> def testPu...
GTMO
62598ef092d797404e387f64
class ChRIS_DB(object): <NEW_LINE> <INDENT> __metaclass__ = abc.ABCMeta <NEW_LINE> def log(self, *args): <NEW_LINE> <INDENT> if len(args): <NEW_LINE> <INDENT> self._log = args[0] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> return self._log <NEW_LINE> <DEDENT> <DEDENT> def name(self, *args): <NEW_LINE> <INDENT> if l...
The server class for the C_snode server
62598ef0097d151d1a2bf7f1
class GoogleCalendarData(object): <NEW_LINE> <INDENT> def __init__(self, calendar_service, calendar_id, search=None): <NEW_LINE> <INDENT> self.calendar_service = calendar_service <NEW_LINE> self.calendar_id = calendar_id <NEW_LINE> self.search = search <NEW_LINE> self.event = None <NEW_LINE> <DEDENT> @Throttle(MIN_TIME...
Class to utilize calendar service object to get next event.
62598ef057b8e32f525074ed
class DesignateTypeType(Enum): <NEW_LINE> <INDENT> Register = 49 <NEW_LINE> Cancel = 50 <NEW_LINE> def __int__(self): <NEW_LINE> <INDENT> return self.value <NEW_LINE> <DEDENT> def __char__(self): <NEW_LINE> <INDENT> return chr(self.value)
指定类型类型
62598ef0a8370b77170eebb7
class WorkoutManagerEditTestCase(WorkoutManagerTestCase): <NEW_LINE> <INDENT> object_class = '' <NEW_LINE> url = '' <NEW_LINE> pk = None <NEW_LINE> user_success = 'admin' <NEW_LINE> user_fail = 'test' <NEW_LINE> data = {} <NEW_LINE> data_ignore = () <NEW_LINE> def edit_object(self, fail=False): <NEW_LINE> <INDENT> if s...
Tests editing an object as an authorized user, a different one and a logged out one.
62598ef01f5feb6acb161426
class TestReach(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.nodes = ["A", "B", "C", "D"] <NEW_LINE> self.edges = [("A", "B", 1), ("A", "C", 1), ("B", "C", 1), ("C", "D", 1)] <NEW_LINE> self.graph = construct_graph(self.nodes, self.edges) <NEW_LINE> <DEDENT> def test_Infinite_Reach(...
Reach A | | C--D |/ B
62598ef097e22403b38396c2
class CreateDDoSGeoIPBlockConfigRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.InstanceId = None <NEW_LINE> self.DDoSGeoIPBlockConfig = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.InstanceId = params.get("InstanceId") <NEW_LINE> if params.g...
CreateDDoSGeoIPBlockConfig请求参数结构体
62598ef0d58c6744b42db69f
class NavigationMode(xsi.Enumeration): <NEW_LINE> <INDENT> decode = { 'linear': 1, 'nonlinear': 2 }
The navigation mode determines the general paths that the candidate may take. A testPart in linear mode restricts the candidate to attempt each item in turn. Once the candidate moves on they are not permitted to return. A testPart in nonlinear mode removes this restriction - the candidate is free to navigate to any ite...
62598ef0167d2b6e312b576d
class kderp_purchase_job_allocated_combine(osv.osv_memory): <NEW_LINE> <INDENT> _name = 'kderp.purchase.job.allocated.combine' <NEW_LINE> def create_lookup_id(self, cr, uid, new_rec, context = {}): <NEW_LINE> <INDENT> domain = [] <NEW_LINE> for key in new_rec: <NEW_LINE> <INDENT> arg = (key,'=', new_rec[key]) <NEW_LINE...
This model for query purchase and job allocated in Hanoi and HCM
62598ef023849d37ff84f88d
class LRUCache(object): <NEW_LINE> <INDENT> class LinkNode(object): <NEW_LINE> <INDENT> def __init__(self, k, x): <NEW_LINE> <INDENT> self.key = k <NEW_LINE> self.val = x <NEW_LINE> self.prev = None <NEW_LINE> self.next = None <NEW_LINE> <DEDENT> <DEDENT> def __init__(self, capacity): <NEW_LINE> <INDENT> self.capacity ...
Hash table + double linked list Time: O(1)
62598ef0be7bc26dc925124c
class BooBrowseNamespacesCommand(TextCommand): <NEW_LINE> <INDENT> def run(self, edit): <NEW_LINE> <INDENT> view = self.view <NEW_LINE> self.list = [] <NEW_LINE> items = [] <NEW_LINE> resp = server(view).query( 'namespaces', fname=view.file_name(), code='', ) <NEW_LINE> from .SublimeBoo import symbol_for <NEW_LINE> see...
Browse global namespaces
62598ef02c8b7c6e89bd1f95
class AddViewpointSeq(Version): <NEW_LINE> <INDENT> def Transform(self, client, follower, callback): <NEW_LINE> <INDENT> from viewpoint import Viewpoint <NEW_LINE> def _OnQuery(viewpoint): <NEW_LINE> <INDENT> with util.Barrier(partial(callback, follower)) as b: <NEW_LINE> <INDENT> follower.viewed_seq = 0 <NEW_LINE> sel...
Add update_seq attribute to Viewpoint and viewed_seq attribute to Follower, each with starting value of 0.
62598ef0bd1bec0571e144b4
class Tracked(mongoengine.Document): <NEW_LINE> <INDENT> meta = {'allow_inheritance': True} <NEW_LINE> def track(self): <NEW_LINE> <INDENT> raise NotImplementedError( "Attempted to track abstract class") <NEW_LINE> <DEDENT> @property <NEW_LINE> def description(self): <NEW_LINE> <INDENT> return self._description
*Abstract* class to represent a piece of information from the debugee to track.
62598ef0d268445f26638f79
class TaeminWOTD(plugin.TaeminPlugin): <NEW_LINE> <INDENT> __location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))) <NEW_LINE> DICO = os.path.join(__location__, "dico_rare.txt") <NEW_LINE> helper = {} <NEW_LINE> def __init__(self, taemin): <NEW_LINE> <INDENT> super().__init__(taemin) <NEW_L...
Taemin plugin to send new word every day
62598ef02c8b7c6e89bd1f96
class ResBertForMMSequenceClassification(PreTrainedBertModel): <NEW_LINE> <INDENT> def __init__(self, config, num_labels=2, bert_layer=True, tfn=True): <NEW_LINE> <INDENT> super(ResBertForMMSequenceClassification, self).__init__(config) <NEW_LINE> self.num_labels = num_labels <NEW_LINE> self.bert_layer = bert_layer <NE...
Entity-Attention BERT model for classification with text and image inputs, 1+text. Res-BERT+BL w TFN
62598ef0097d151d1a2bf7f3
class SubstanceDStyle(Style): <NEW_LINE> <INDENT> background_color = "#f8f8f8" <NEW_LINE> default_style = "" <NEW_LINE> styles = { Whitespace: "#bbbbbb", Comment: "italic #60a0b0", Comment.Preproc: "noitalic #007020", Comment.Special: "noitalic bg:#fff0f0", Keyword: ...
SubstanceD pygments style based on friendly style
62598ef0379a373c97d977ca
class Float64(Scalar): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return ("%E" % self._value).replace("E","D")
64-bit floating point number
62598ef0f9cc0f698b1c46b9
class Employee: <NEW_LINE> <INDENT> pass
class documentation
62598ef0283ffb24f3cf2086
class Mineral(Molecule): <NEW_LINE> <INDENT> def __init__(self, composition, name=None): <NEW_LINE> <INDENT> Molecule.__init__(self, composition, name=name) <NEW_LINE> <DEDENT> @property <NEW_LINE> def unit_mass(self): <NEW_LINE> <INDENT> return sum([self.number(ele) * amu[ele] * c.u.to('g') for ele in self.elements])
Subclass of molecules.Molecule because it requires some of the same functionality. Inputs ------ name : string (optional) A string describing the molecule. Defaults to None composition : dictionary A dictionary describing the number of atoms of each element type in the molecule Attrib...
62598ef07b25080760ed5c70
class FEST(BaseEstimator, ClassifierMixin): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.model = id_generator(10) <NEW_LINE> <DEDENT> def __del__(self): <NEW_LINE> <INDENT> call(["rm", self.model_filename]) <NEW_LINE> <DEDENT> def fit(self, X, y): <NEW_LINE> <INDENT> self.train_filename = self.model...
Simple Python Wrapper for FEST (https://github.com/fest/fest) Supports only binary classification.
62598ef04c34283577618ab9
class CategoryViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Category.objects.all() <NEW_LINE> serializer_class = CategorySerializer
retrieve: Return the given category. list: Return a list of all the existing categories. create: Create a new category instance.
62598ef03317a56b869bd950
class HpssStatus(AbstractStatus): <NEW_LINE> <INDENT> _disk = 'disk' <NEW_LINE> _tape = 'tape' <NEW_LINE> _error = 'error' <NEW_LINE> def __init__(self, mtime, ctime, bytes_per_level, filesize): <NEW_LINE> <INDENT> super(HpssStatus, self).__init__( mtime, ctime, bytes_per_level, filesize ) <NEW_LINE> self.mtime = mtime...
HPSS Status Class. Class for handling hpss status pieces needs mtime,ctime, bytes per level array.
62598ef01b99ca400228e8f8
class UploadIndicatorCSVForm(SourceInForm): <NEW_LINE> <INDENT> error_css_class = 'error' <NEW_LINE> required_css_class = 'required' <NEW_LINE> filedata = forms.FileField() <NEW_LINE> related_id = forms.CharField(widget=forms.HiddenInput(), required=False, label=form_consts.Common.RELATED_ID) <NEW_LINE> related_type = ...
Django form for uploading Indicators via a CSV file.
62598ef0d486a94d0ba2a7a2
class GraphQlField(object): <NEW_LINE> <INDENT> def __init__( self, descriptor, method_name, partial_args, partial_kwargs, context_args, attr): <NEW_LINE> <INDENT> self.descriptor = descriptor <NEW_LINE> self.method_name = method_name <NEW_LINE> self.partial_args = partial_args <NEW_LINE> self.partial_kwargs = partial_...
A GraphQL field. Consists of a GraphQlFieldDescriptor describing the field's "interface" as well as other attributes indicating the "implementation" - the way to determine the field's value. This is also for GraphQL mutations, which are basically like fields. Public attributes: basestring attr - The name of the att...
62598ef0be8e80087fbbd825