code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class LogCatcher(object): <NEW_LINE> <INDENT> def __init__(self, logger): <NEW_LINE> <INDENT> self.logger = getattr(logger, "logger", logger) <NEW_LINE> self.handler = CatcherHandler() <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> self.logger.addHandler(self.handler) <NEW_LINE> return self <NEW_LINE> <DE...
Context manager that catches log messages. User can make an assertion on their content or fetch them all. Usage:: LOG = logging.getLogger(__name__) ... def foobar(): with LogCatcher(LOG) as catcher_in_rye: LOG.warning("Running Kids") catcher_in_rye.assertInLogs("Running Kids"...
62598f6e925a0f43d25e782a
class Category(Model): <NEW_LINE> <INDENT> __tablename__ = 'category' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> name = Column(String(64), nullable=False) <NEW_LINE> parent_id = Column(Integer, ForeignKey('category.id'), nullable=True) <NEW_LINE> subcategories = relationship('Category', backref=backre...
An item in the category tree.
62598f6ebe8e80087fbbe84c
class GaussianSpaceSampler(SpaceSampler): <NEW_LINE> <INDENT> def __init__(self, mus, variances, correlation): <NEW_LINE> <INDENT> self.mus = mus <NEW_LINE> self.stds = _np.sqrt(_np.array(variances)) <NEW_LINE> self.correlation = correlation <NEW_LINE> <DEDENT> def __call__(self, length): <NEW_LINE> <INDENT> xy = _np.r...
Returns samples from a Multivariate normal distribution. :param mus: A pair of the mean values of the Gaussian in each variable. :param variances: A pair of the variances of the Gaussian in each variable. :param correlation: The correlation between the two Gaussians.
62598f6e15baa72349461778
class CaptureResolutionBox(ResolutionBox): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> ResolutionBox.__init__(self, id='', longname='Capture Resolution') <NEW_LINE> self.__dict__.update(**kwargs) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> msg = Jp2kBox.__str__(self) <NEW_LINE> ...
Container for Capture resolution box information. Attributes ---------- id : str 4-character identifier for the box. length : int length of the box in bytes. offset : int offset of the box from the start of the file. longname : str more verbose description of the box. VR, HR : float Vertical, horiz...
62598f6e50485f2cf55da75e
class YahooCinemaSpider(CinemaSpider): <NEW_LINE> <INDENT> name = "yahoo_cinema" <NEW_LINE> allowed_domains = ["movies.yahoo.co.jp"] <NEW_LINE> start_urls = ['http://movies.yahoo.co.jp/area/'] <NEW_LINE> county_xpath = '//div[@id="allarea"]//a' <NEW_LINE> cinema_xpath = '//div[@id="theater"]//a' <NEW_LINE> cinema_site_...
cinema info spider for http://movies.yahoo.co.jp
62598f6eb57a9660fecd127d
class MadHatterBot(BaseCustomBot): <NEW_LINE> <INDENT> interval: int <NEW_LINE> stopLoss: float <NEW_LINE> stopLossPrice: float <NEW_LINE> disableAfterStopLoss: bool <NEW_LINE> priceChangeToBuy: float <NEW_LINE> priceChangeToSell: float <NEW_LINE> priceChangeTarget: float <NEW_LINE> macd: Indicator <NEW_LINE> bbands: I...
Data Object containing a Mad Hatter Bot :ivar interval: int: :ivar stopLoss: float: :ivar stopLossPrice: float: :ivar disableAfterStopLoss: bool: :ivar priceChangeToBuy: float: :ivar priceChangeToSell: float: :ivar priceChangeTarget: float: :ivar macd: :class:`~haasomeapi.dataobjects.custombots.dataobjects.Indicator`:...
62598f6efb3f5b602db47da8
class PlayerJob(object): <NEW_LINE> <INDENT> def __init__(self, _job, _payload, _frompid): <NEW_LINE> <INDENT> self.frompid = _frompid <NEW_LINE> self.job = _job <NEW_LINE> self.payload = _payload
_job (string, ex. 'resize' or 'adjust' etc.) _data (payload pertaining to chosen job)
62598f6e63f4b57ef0085967
class BetaP2PNodeStub(object): <NEW_LINE> <INDENT> def GetNodeState(self, request, timeout, metadata=None, with_call=False, protocol_options=None): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> GetNodeState.future = None <NEW_LINE> def GetKnownPeers(self, request, timeout, metadata=None, with_call...
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.
62598f6e73bcbd0ca4bc9a40
class ThreadTransactionManager(TransactionManager): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._txns = {} <NEW_LINE> self._synchs = {} <NEW_LINE> <DEDENT> def begin(self): <NEW_LINE> <INDENT> tid = thread.get_ident() <NEW_LINE> txn = self._txns.get(tid) <NEW_LINE> if txn is not None: <NEW_LINE> <I...
Thread-aware transaction manager. Each thread is associated with a unique transaction.
62598f6e76d4e153a661c401
class GulpBuild(build_py, RunnerMixin): <NEW_LINE> <INDENT> user_options = build_py.user_options + [ ('task=', None, 'Specify the gulp task(s) to run') ] <NEW_LINE> def initialize_options(self): <NEW_LINE> <INDENT> self.task = 'default' <NEW_LINE> return super().initialize_options() <NEW_LINE> <DEDENT> def finalize_opt...
Custom build_py command that runs gulp. Replace build_py with this command to have node automatically installed (if required), and have gulp run to execute the default task before proceeding with the regular build_py tasks. Usage in setup.py:: from setuptools_node import GulpBuild setup(cmdclass={ 'build_py...
62598f6e1d351010ab8f3330
class SQLCompiler(compiler.SQLCompiler): <NEW_LINE> <INDENT> def get_from_clause(self): <NEW_LINE> <INDENT> old_tables = list(self.query.tables) <NEW_LINE> for table in itertools.chain(*self.query.translation_aliases.values()): <NEW_LINE> <INDENT> if table in self.query.tables: <NEW_LINE> <INDENT> self.query.tables.rem...
Overrides get_from_clause to LEFT JOIN translations with a locale.
62598f6ed18da76e235b6d2e
class View(object): <NEW_LINE> <INDENT> http_method_names = ['get', 'post', 'put', 'patch', 'delete', 'head', 'options', 'trace'] <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> for key, value in six.iteritems(kwargs): <NEW_LINE> <INDENT> setattr(self, key, value) <NEW_LINE> <DEDENT> <DEDENT> @classonlymet...
Intentionally simple parent class for all views. Only implements dispatch-by-method and simple sanity checking.
62598f6e6fece00bbaccb17c
class geo_parcelle(Mapable, ModelSQL, ModelView): <NEW_LINE> <INDENT> __name__ = 'seed.geo_parcelle' <NEW_LINE> _rec_name = 'tex' <NEW_LINE> garden = fields.Many2One( 'seed.garden', string=u'Garden', help=u'Garden of plot', ) <NEW_LINE> tex = fields.Char( string = u'Short name of parcelle', required = False, readonly =...
Parcelle
62598f6ed6c5a102081e1936
class Customer(object): <NEW_LINE> <INDENT> def __init__(self, name, email, city): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.email = email <NEW_LINE> self.city = city <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return (f'Customer name: {self.name}\nCustomer email: {self.email}\nCustomer Locat...
Creates a customer object that holds general information about the borrower
62598f6e50485f2cf55da760
class ExcelDateWidget(CharWidget): <NEW_LINE> <INDENT> def __init__(self, date_mode, *args, **kwargs): <NEW_LINE> <INDENT> self.date_mode = date_mode <NEW_LINE> super().__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def render(self, value, obj=None): <NEW_LINE> <INDENT> if value is None: <NEW_LINE> <INDENT> return None ...
Excel date widget. * ``date_mode``
62598f6ecad5886f8bdc4b12
class Configurations: <NEW_LINE> <INDENT> def __init__(self, config_file_path="../CONFIGS/lotopy/config.txt"): <NEW_LINE> <INDENT> with open(config_file_path, mode="r", encoding="utf-8") as config_file: <NEW_LINE> <INDENT> self.__config_dict = dict(arg.rstrip("\n").split("=") for arg in config_file.readlines()) <NEW_LI...
Object holding configurations for the project. Encapsulates reading configs from a file
62598f6e5166f23b2e242bcd
class Dict(dict): <NEW_LINE> <INDENT> def __init__(self, **kw): <NEW_LINE> <INDENT> super(Dict, self).__init__(**kw) <NEW_LINE> <DEDENT> def __setattr__(self, key, value): <NEW_LINE> <INDENT> self[key] = value
Simple dict but also support access as x.y style. >>> d1 = Dict() >>> d1['x'] = 100 >>> d1.x 100 >>> d1.y = 200 >>> d1['y'] 200 >>> d2 = Dict(a=1, b=2, c='3') >>> d2.c '3' >>> d2['empty'] Traceback (most recent call last): ... KeyError: 'empty' >>> d2.empty Traceback (most recent call last): ... AttributeError...
62598f6e8e05c05ec3f6ea3e
class List(ConfigBase, collections.MutableSequence): <NEW_LINE> <INDENT> def __init__(self, inner_type, jsonish_fn=list, hidden=AutoHide): <NEW_LINE> <INDENT> super(List, self).__init__(hidden) <NEW_LINE> self.inner_type = inner_type <NEW_LINE> self.jsonish_fn = jsonish_fn <NEW_LINE> self.data = [] <NEW_LINE> <DEDENT> ...
Provides a semi-homogenous list()-like configuration object.
62598f6e07d97122c4216495
@public <NEW_LINE> class DirectoryPluginProvider(PluginProvider): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> self.path = os.path.abspath(path) <NEW_LINE> <DEDENT> def provide(self): <NEW_LINE> <INDENT> found_plugins = [] <NEW_LINE> if os.path.exists(os.path.join(self.path, 'plugin.yml')): <NEW_LI...
A plugin provider that looks up plugins in a given directory. :param path: directory to look for plugins in
62598f6e1f5feb6acb16242b
class ReportedUpdateTypes(object): <NEW_LINE> <INDENT> TYPE_TO_FLAGS = { 'all': dict( ignore_alpha_beta_rc_releases=False, ignore_feature_releases=False, ignore_compat_releases=False, ignore_bug_fix_releases=False, ignore_security_releases=False, ), 'feature': dict( ignore_alpha_beta_rc_releases=True, ignore_feature_re...
Represent which types of updates are of interest to a client.
62598f6eec188e330fdf8094
class InvalidTemplatePathError(Error): <NEW_LINE> <INDENT> pass
Thrown when a template path is not a Github SSH path
62598f6e8c3a8732951f5d42
class CosmosObject(object_base.VersionedObject): <NEW_LINE> <INDENT> OBJ_SERIAL_NAMESPACE = 'cosmos_object' <NEW_LINE> OBJ_PROJECT_NAMESPACE = 'cosmos' <NEW_LINE> fields = { 'created_at': object_fields.DateTimeField(nullable=True), 'updated_at': object_fields.DateTimeField(nullable=True), } <NEW_LINE> def as_dict(self)...
Base class and object factory. This forms the base of all objects that can be remoted or instantiated via RPC. Simply defining a class that inherits from this base class will make it remotely instantiatable. Objects should implement the necessary "get" classmethod routines as well as "save" object methods as appropria...
62598f6e15baa7234946177c
class CFBoundaryVariable(CFVariable): <NEW_LINE> <INDENT> cf_identity = 'bounds' <NEW_LINE> @classmethod <NEW_LINE> def identify(cls, variables, ignore=None, target=None, warn=True): <NEW_LINE> <INDENT> result = {} <NEW_LINE> ignore, target = cls._identify_common(variables, ignore, target) <NEW_LINE> for nc_var_name, n...
A CF-netCDF boundary variable is associated with a CF-netCDF variable that contains coordinate data. When a data value provides information about conditions in a cell occupying a region of space/time or some other dimension, the boundary variable provides a description of cell extent. A CF-netCDF boundary variable wil...
62598f6e16aa5153ce3ffcf0
class SamplesFile(SubjectsFile): <NEW_LINE> <INDENT> __internal_id_1 = object() <NEW_LINE> __primary_key = 'primary_key' <NEW_LINE> primary_key_rule = __primary_key, ('subject_id', 'sample_id'), join_cast('_') <NEW_LINE> __rename_1 = primary_key_rule[2](('Lab-based schema for identifying each subject', ('Lab-based sche...
TODO ...
62598f6e7c178a314d78cc97
class StatMeter(object): <NEW_LINE> <INDENT> def __init__(self, name, csv_name=None): <NEW_LINE> <INDENT> self.reset() <NEW_LINE> self.name = name <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT> self.vals = [] <NEW_LINE> self.img_names = [] <NEW_LINE> <DEDENT> def update(self, val, img_name): <NEW_LINE> <INDEN...
Computes and stores the error vals and image names
62598f6ec432627299fa27c9
class ElasticPoolDatabaseActivitiesOperations: <NEW_LINE> <INDENT> models = _models <NEW_LINE> def __init__(self, client, config, serializer, deserializer) -> None: <NEW_LINE> <INDENT> self._client = client <NEW_LINE> self._serialize = serializer <NEW_LINE> self._deserialize = deserializer <NEW_LINE> self._config = con...
ElasticPoolDatabaseActivitiesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. :type models: ~azure.mgmt.sql.models :...
62598f6e5e10d32532ce34e5
class CrashInfo: <NEW_LINE> <INDENT> __slots__ = ('id', '_json', '_crash', 'bucket_id') <NEW_LINE> def __init__(self, report_id, json, bucket_id): <NEW_LINE> <INDENT> self.id = report_id <NEW_LINE> self._crash = None <NEW_LINE> self._json = json <NEW_LINE> self.bucket_id = bucket_id <NEW_LINE> <DEDENT> @property <NEW_L...
A bunch of info about a crash including its bucket assignment.
62598f6e50485f2cf55da763
class Label(Field): <NEW_LINE> <INDENT> def __init__(self, driver, query_type="", query="", top_element=None): <NEW_LINE> <INDENT> super(Field, self).__init__(driver, query_type, query, top_element) <NEW_LINE> <DEDENT> def get_text_content(self): <NEW_LINE> <INDENT> return self.exec_script_on_extjs_cmp('return extCmp.h...
classdocs
62598f6e30c21e258be97ff5
class TestConsultLabel(unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> basepath = os.path.split(os.path.dirname(__file__))[1] <NEW_LINE> cls.basename = os.path.splitext(os.path.basename(__file__))[0] <NEW_LINE> cls.basename = basepath + "-" + cls.basename <NEW_LI...
页面展示项的标题
62598f6e73bcbd0ca4bc9a42
class _ConverterBase(_AbstractConverter): <NEW_LINE> <INDENT> def __init__(self, owner, uid, clsName, tag): <NEW_LINE> <INDENT> _AbstractConverter.__init__(self, owner, uid, clsName, tag) <NEW_LINE> self._converter = owner.converter <NEW_LINE> self._inputMsgCls = None <NEW_LINE> self._outputMsgCls = None <NEW_LINE> sel...
Class which implements the basic functionality of a Converter.
62598f6e8e05c05ec3f6ea3f
class SvVoltage(StateVariable): <NEW_LINE> <INDENT> def __init__(self, angle=0.0, v=0.0, TopologicalNode=None, *args, **kw_args): <NEW_LINE> <INDENT> self.angle = angle <NEW_LINE> self.v = v <NEW_LINE> self._TopologicalNode = None <NEW_LINE> self.TopologicalNode = TopologicalNode <NEW_LINE> super(SvVoltage, self).__ini...
State variable for voltage.
62598f6e8a349b6b43685a35
@add_metaclass(ExtensionMethod) <NEW_LINE> class ObservableRange(Observable): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def range(cls, start, count, scheduler=None): <NEW_LINE> <INDENT> scheduler = scheduler or current_thread_scheduler <NEW_LINE> def subscribe(observer): <NEW_LINE> <INDENT> def action(scheduler, i): ...
Uses a meta class to extend Observable with the methods in this class
62598f6e30c21e258be97ff6
class Evaluator(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.mean_ap = [] <NEW_LINE> self.prec_at = defaultdict(list) <NEW_LINE> self.rel_prec = defaultdict(list) <NEW_LINE> <DEDENT> def eval(self, queries, weights, Y_score, Y_test, n_relevant): <NEW_LINE> <INDENT> Y_true = make_relevance_m...
The ``Evaluator`` evaluates a retrieval method, collects the perfromance measures, and keeps values of multiple runs (for example in k-fold cross-validation).
62598f6e07d97122c4216496
class GsBranchesRenameCommand(TextCommand, GitCommand): <NEW_LINE> <INDENT> def run(self, edit): <NEW_LINE> <INDENT> sublime.set_timeout_async(self.run_async, 0) <NEW_LINE> <DEDENT> def run_async(self): <NEW_LINE> <INDENT> interface = ui.get_interface(self.view.id()) <NEW_LINE> remote_name, branch_name = interface.get_...
Rename selected branch.
62598f6e6e29344779affe51
class Motor: <NEW_LINE> <INDENT> def __init__(self, name=None): <NEW_LINE> <INDENT> if name is None: <NEW_LINE> <INDENT> self.name = "Unnamed Motor" <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.name = name <NEW_LINE> <DEDENT> self.is_home = False <NEW_LINE> self.is_in_pos = False <NEW_LINE> self.is_pushing = Fals...
The Motor object holds parameters for a given actuator Args: name (str): motor name (default "Unnamed Motor")
62598f6f30c21e258be97ff7
class PerfilUsuarioCreateView(MessageMixin, PermissionRequiredMixin, LoggerCreatedMixin, CreateView): <NEW_LINE> <INDENT> model = PerfilUsuario <NEW_LINE> permission_required = "gestion_usuarios.add_perfilusuario" <NEW_LINE> raise_exception = True <NEW_LINE> form_class = PerfilUsuarioCreateForm <NEW_LINE> mensaje_log =...
Autor: RADY CONSULTORES Fecha: 2 Septiembre 2016 Vista de creación de usuarios con permisos, mixin de mensaje para registro exitoso, mixin de auditoría y método form_valid para asignar el password al usuario que se está creando
62598f6ffb3f5b602db47dab
class BIP0032AddressRecord(AddressRecord): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(BIP0032AddressRecord, self).__init__(**kwargs) <NEW_LINE> pycoin_wallet = kwargs.get('pycoin_wallet') <NEW_LINE> color_string = hashlib.sha256(self.color_set.get_earliest()).digest() <NEW_LINE> self.in...
Subclass of AddressRecord which is deterministic and BIP0032 compliant. BIP0032AddressRecord will use a pycoin wallet to create addresses for specific colors.
62598f6f7b25080760ed6c92
class SimpleGui(BaseGui): <NEW_LINE> <INDENT> def __init__(self, default_fields, title="DialogUI", size=(400, 700)): <NEW_LINE> <INDENT> super(SimpleGui, self).__init__() <NEW_LINE> self.title = title <NEW_LINE> self.data = default_fields <NEW_LINE> self.initUI(size) <NEW_LINE> self.displayform() <NEW_LINE> <DEDENT> de...
This class renders a GUI form from data provided by a JSON settings file. It handles methods to read and parse the settings file, as well as inputs given by the user, and update the settings file accordingly. The JSON file should be formatted as follow: # Data format Whether data are stored in a variable or in a JSON ...
62598f6fd4950a0f3b110a32
class LocalLoader(Loader): <NEW_LINE> <INDENT> options = [] <NEW_LINE> def __init__(self, bytes_sample_size=config.DEFAULT_BYTES_SAMPLE_SIZE): <NEW_LINE> <INDENT> self.__bytes_sample_size = bytes_sample_size <NEW_LINE> self.__stats = None <NEW_LINE> <DEDENT> def attach_stats(self, stats): <NEW_LINE> <INDENT> self.__sta...
Loader to load source from filesystem.
62598f6fd10714528d69d6c4
class Login(forms.Form): <NEW_LINE> <INDENT> user_name = forms.CharField( label="Username:" ) <NEW_LINE> user_name.widget.attrs.update({'class': 'login-form', 'id': 'login-user'}) <NEW_LINE> password = forms.CharField( label="Password:", widget=forms.PasswordInput() ) <NEW_LINE> password.widget.attrs.update({'class': '...
Basic login form This form renders into a very simple login field, with fields identified differently, both for styling and the optional javascript by-name handling. Whilst this form is extremely simple, coding one each and every time we wish to use one is just dumb and it's much easier to code it once and import it i...
62598f6fd18da76e235b6d31
@abstract <NEW_LINE> class ObjectNode(_user_module.ObjectNodeMixin, ActivityNode, TypedElement): <NEW_LINE> <INDENT> isControlType = EAttribute( eType=Boolean, derived=False, changeable=True, default_value=False ) <NEW_LINE> ordering = EAttribute( eType=ObjectNodeOrderingKind, derived=False, changeable=True, default_va...
An ObjectNode is an abstract ActivityNode that may hold tokens within the object flow in an Activity. ObjectNodes also support token selection, limitation on the number of tokens held, specification of the state required for tokens being held, and carrying control values. <p>From package UML::Activities.</p>
62598f6f1f5feb6acb16242f
class SignupView(FormView): <NEW_LINE> <INDENT> template_name = 'users/signup.html' <NEW_LINE> form_class = SignupForm <NEW_LINE> success_url = reverse_lazy('users:login') <NEW_LINE> def form_valid(self, form): <NEW_LINE> <INDENT> form.save() <NEW_LINE> return super().form_valid(form)
Users sign up view
62598f6fd6c5a102081e193c
class Type: <NEW_LINE> <INDENT> BOOLEAN = 1 <NEW_LINE> DOUBLE = 2 <NEW_LINE> FLOAT = 3 <NEW_LINE> INTEGER = 4 <NEW_LINE> LONG = 5 <NEW_LINE> LINK = 6 <NEW_LINE> STRING = 7 <NEW_LINE> TAG = 8 <NEW_LINE> NULL = 9 <NEW_LINE> TIMESTAMP = 10 <NEW_LINE> _VALUES_TO_NAMES = { 1: "BOOLEAN", 2: "DOUBLE", 3: "FLOAT", 4: "INTEGER"...
Enumerates the possible TObject types
62598f6f287bf620b62713b5
class SingleLinkList(object): <NEW_LINE> <INDENT> def __init__(self, node=None): <NEW_LINE> <INDENT> self.__head = node <NEW_LINE> <DEDENT> def is_empty(self): <NEW_LINE> <INDENT> return self.__head is None <NEW_LINE> <DEDENT> def length(self): <NEW_LINE> <INDENT> count = 0 <NEW_LINE> current = self.__head <NEW_LINE> w...
单链表
62598f6f56b00c62f0fb20ae
class subgod(ABC): <NEW_LINE> <INDENT> version = '0.1' <NEW_LINE> @abstractmethod <NEW_LINE> def __init__(self, name, type, hitpoints, devotion, attack, defence): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.type = type <NEW_LINE> self.hitpoints = hitpoints <NEW_LINE> self.devotion = devotion <NEW_LINE> self.ra...
This is the subgod class from which all other subgods/servant god classes derive
62598f6fd10714528d69d6c5
class PyTypesentry(PythonPackage): <NEW_LINE> <INDENT> homepage = "https://github.com/h2oai/typesentry" <NEW_LINE> git = "https://github.com/h2oai/typesentry.git" <NEW_LINE> version('0.2.7', commit='0ca8ed0e62d15ffe430545e7648c9a9b2547b49c') <NEW_LINE> depends_on('py-colorama@0.3.0:', type=('build', 'run'))
Python library for run-time type checking for type-annotated functions.
62598f6f3eb6a72ae0389e39
class SnippetList(generics.ListCreateAPIView): <NEW_LINE> <INDENT> queryset = Snippet.objects.all() <NEW_LINE> serializer_class = SnippetSerializer <NEW_LINE> permission_classes = (permissions.IsAuthenticatedOrReadOnly,)
List all code snippets, or create a new one.
62598f6f8c3a8732951f5d47
class ConstExpr(AtomicExpr): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> super(ConstExpr, self).__init__("ConstExpr", value) <NEW_LINE> <DEDENT> def clone(self, nodes): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return f"ConstExpr({self.value})" <N...
A representation of a constant value
62598f6f73bcbd0ca4bc9a45
class LocalesViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Local.objects.all() <NEW_LINE> serializer_class = LocalSerializer <NEW_LINE> lookup_field = 'id_local'
API endpoint that allows users to be viewed or edited.
62598f6fd99f1b3c44d04eae
class AlignmentDict(dict): <NEW_LINE> <INDENT> def __getitem__(self, nam): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return super(AlignmentDict, self).__getitem__(tuple(sorted(nam))) <NEW_LINE> <DEDENT> except KeyError: <NEW_LINE> <INDENT> for i, key in enumerate(self): <NEW_LINE> <INDENT> if nam == i: <NEW_LINE> <I...
:py:func:`dict` of :class:`pytadbit.Alignment` Modified getitem, setitem, and append in order to be able to search alignments by index or by name. linked to a :class:`pytadbit.Chromosome`
62598f6f38b623060ffa8894
class RegBlock(object): <NEW_LINE> <INDENT> def __init__(self, radar, configfile_section_name = "registers"): <NEW_LINE> <INDENT> with self._addattr(): <NEW_LINE> <INDENT> self.__radar__ = radar <NEW_LINE> self.__maps__ = {} <NEW_LINE> self.__keys__ = [] <NEW_LINE> self.__config_file_section__ = configfile_section_name...
The RegBlock class encapsulates one or more RegMap objects (register maps). This class is intended to be sub-classed for specific chips or chip versions. The sub-class will overload the __init__ function and call the __add_map__ function for each register map that is part of the register block.
62598f6f167d2b6e312b6776
class TestDiffusion2DBase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.PDE = Pde() <NEW_LINE> self.PDE.set_model('Simple. Analyt 2D diffusion PDE') <NEW_LINE> self.PDE.set_params([np.pi, np.pi*2]) <NEW_LINE> self.PDE.set_verb(False, False, False) <NEW_LINE> self.PDE.set_tau(tau=1.E-...
Base class for 2D diffusion problem
62598f6f91af0d3eaad39604
class Edge: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def __getitem__(self, attr: str): <NEW_LINE> <INDENT> raise NotImplementedError
Opaque representation of an edge. The implementation details of this edge may vary from backend to backend. In general, you are not allowed to use edges received as output from one backend as input to another.
62598f6f6aa9bd52df0d46cd
class TimeoutError(CeleryError): <NEW_LINE> <INDENT> pass
The operation timed out.
62598f6fac7a0e7691f71d0f
class Variation(models.Model): <NEW_LINE> <INDENT> product = models.ForeignKey(Product, on_delete=models.CASCADE) <NEW_LINE> title = models.CharField(max_length=120) <NEW_LINE> description = models.TextField(null=True, blank=True) <NEW_LINE> options = models.ManyToManyField(ProductOption) <NEW_LINE> price = models.Deci...
Model for product variations.
62598f6f56b00c62f0fb20b0
class TabResponsePayload(Model): <NEW_LINE> <INDENT> _attribute_map = { "type": {"key": "type", "type": "str"}, "value": {"key": "value", "type": "TabResponseCards"}, "suggested_actions": {"key": "suggestedActions", "type": "TabSuggestedActions"}, } <NEW_LINE> def __init__( self, *, type=None, value=None, suggested_act...
Initializes a new instance of the TabResponsePayload class. :param type: Gets or sets choice of action options when responding to the tab/fetch message. Possible values include: 'continue', 'auth' or 'silentAuth' :type type: str :param value: Gets or sets the TabResponseCards when responding to tab/fetch activity wi...
62598f6fa8ecb03325870a00
class MultiFactorScheduler(LRScheduler): <NEW_LINE> <INDENT> def __init__(self, step, factor=1): <NEW_LINE> <INDENT> super(MultiFactorScheduler, self).__init__() <NEW_LINE> assert isinstance(step, list) and len(step) >= 1 <NEW_LINE> for i, _step in enumerate(step): <NEW_LINE> <INDENT> if i != 0 and step[i] <= step[i-1]...
Reduce learning rate in factor at steps specified in a list Assume the weight has been updated by n times, then the learning rate will be base_lr * factor^(sum((step/n)<=1)) # step is an array Parameters ---------- step: list of int schedule learning rate after n updates factor: float the factor for reducing...
62598f6f30c21e258be97ffc
class ModifiedInitStandardMLP(StandardMLP): <NEW_LINE> <INDENT> def __init__(self, input_size, num_classes, hidden_sizes): <NEW_LINE> <INDENT> super().__init__(input_size, num_classes, hidden_sizes) <NEW_LINE> weight_density = 1.0 <NEW_LINE> input_flag = False <NEW_LINE> for layer in self.classifier: <NEW_LINE> <INDENT...
A standard MLP which differs only in feed-forward weight initialization: the bounds of the Uniform distribution used to initialization weights are +/- 1/sqrt(I x W x F) where I is the density of the input for a given layer, W is always 1.0 (since MLPs have dense weights), and F is fan-in. This only differs from Kaimi...
62598f6fdc8b845886d52dac
class NestProtectSensor(NestSensor): <NEW_LINE> <INDENT> @property <NEW_LINE> def state(self): <NEW_LINE> <INDENT> return self._state <NEW_LINE> <DEDENT> def update(self): <NEW_LINE> <INDENT> state = getattr(self.device, self.variable) <NEW_LINE> if self.variable == 'battery_level': <NEW_LINE> <INDENT> self._state = ge...
Return the state of nest protect.
62598f6f925a0f43d25e7836
class Client(object): <NEW_LINE> <INDENT> def incr(self, name, delta=1, tags=None): <NEW_LINE> <INDENT> pass
StatsD client dropping all metrics.
62598f6f1d351010ab8f333a
class RejectSampling(Exception): <NEW_LINE> <INDENT> pass
Exception used for rejection sampling
62598f6f0383005118f6cefd
class UpdateTracker(Resource): <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> self.reqparser = reqparse.RequestParser() <NEW_LINE> self.reqparser.add_argument('id', required=True, type=str) <NEW_LINE> self.reqparser.add_argument('description', required=False, default="", type=str) <NEW_LINE> <DEDEN...
Update Tracker
62598f6f76d4e153a661c40b
class RPCWrapper(CoinRPC): <NEW_LINE> <INDENT> network = None <NEW_LINE> def __init__(self, service_url, **kwargs): <NEW_LINE> <INDENT> super(RPCWrapper, self).__init__(service_url=service_url, **kwargs) <NEW_LINE> <DEDENT> def dump_priv_key(self, addr): <NEW_LINE> <INDENT> return self.dumpprivkey(addr) <NEW_LINE> <DED...
Creates a wrapper for a coin's JSON RPC response. Unlike CoinRPC its methods wrap coin specific RPC calls. Additionally, responses are returned as objects instead of JSON. .. note:: Woefully incomplete atm - more of a proof of concept
62598f6fd18da76e235b6d33
class Timer(object): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> self.start = time.time() <NEW_LINE> <DEDENT> def __exit__(self, ty, val, tb): <NEW_LINE> <INDENT> end = time.time() <NEW_LINE> print("timer: " + self.name ...
Automatically collect Spark result and do timing.
62598f6f8c3a8732951f5d4a
class GraphiteMonitorPickleServerTestCase(ScalyrTestCase): <NEW_LINE> <INDENT> def test_execute_request_mock_logger_success(self): <NEW_LINE> <INDENT> mock_logger = mock.Mock() <NEW_LINE> server = GraphitePickleServer( only_accept_local=True, port=5899, run_state=None, buffer_size=1024, max_request_size=1024 * 5, max_c...
Test cases whre we don't start actual TCP server but just exercise the request / data parsing code.
62598f6f287bf620b62713b7
class EnergyCorrector( object ): <NEW_LINE> <INDENT> def __init__(self, fnam, histnam='h_cor'): <NEW_LINE> <INDENT> self.file = TFile(fnam) <NEW_LINE> if self.file.IsZombie(): <NEW_LINE> <INDENT> raise ValueError(fnam+' cannot be opened') <NEW_LINE> <DEDENT> self.hist = self.file.Get(histnam) <NEW_LINE> if self.hist==N...
Generic energy corrector
62598f6f9b70327d1c57e5a8
class FolderCacheItem(db.Model): <NEW_LINE> <INDENT> __bind_key__ = 'folders' <NEW_LINE> __tablename__ = 'folder_cache_item' <NEW_LINE> __table_args__ = ( db.UniqueConstraint('account_name', 'folder_name'), ) <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> account_name = db.Column(db.String(300), nul...
Store folder UID list and validity.
62598f6f21bff66bcd72245b
class Slug(GameObject): <NEW_LINE> <INDENT> def __init__(self, world): <NEW_LINE> <INDENT> super(Slug, self).__init__(world) <NEW_LINE> self.has_resource = False <NEW_LINE> self.goal = None <NEW_LINE> self.time_to_next_decision = 0 <NEW_LINE> self.speed = 100 <NEW_LINE> self.radius = 20 <NEW_LINE> self.color = 'yellow'
fearless, inhuman, slimy protagonists
62598f6f5166f23b2e242bd7
class InterruptionFilter(cros_test_proxy.Filter): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.close_count = 0 <NEW_LINE> <DEDENT> def setup(self): <NEW_LINE> <INDENT> self.data_size = 0 <NEW_LINE> <DEDENT> def OutBound(self, data): <NEW_LINE> <INDENT> if self.close_count < 3: <NEW_LINE> <INDENT> if...
This filter causes the proxy to interrupt the download 3 times. It does this by closing the first three connections after they transfer 2M total in the outbound direction.
62598f6f8e05c05ec3f6ea43
class ReplyError(GibsonError): <NEW_LINE> <INDENT> pass
Generic error while executing the query
62598f6f30c21e258be97ffe
class Chinese(Language): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> from textrank4zh import TextRank4Keyword, TextRank4Sentence <NEW_LINE> self.handler = TextRank4Sentence() <NEW_LINE> import jieba as jieba <NEW_LINE> self.jieba = jieba <NEW_LINE> <DEDENT> def get_text_from_docx(self, docx_path): <NEW_...
This is a class for handling Chinese
62598f6f63f4b57ef008596d
class Trainer(DefaultTrainer): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def build_evaluator(cls, cfg, dataset_name, output_folder=None): <NEW_LINE> <INDENT> if output_folder is None: <NEW_LINE> <INDENT> output_folder = os.path.join(cfg.OUTPUT_DIR, "inference") <NEW_LINE> <DEDENT> evaluator_list = [] <NEW_LINE> evalu...
We use the "DefaultTrainer" which contains a number pre-defined logic for standard training workflow. They may not work for you, especially if you are working on a new research project. In that case you can use the cleaner "SimpleTrainer", or write your own training loop.
62598f6f1d351010ab8f333c
class DeltaFetch(object): <NEW_LINE> <INDENT> def __init__(self, dir, dbmodule='anydbm', reset=False): <NEW_LINE> <INDENT> self.dir = dir <NEW_LINE> self.dbmodule = __import__(dbmodule) <NEW_LINE> self.reset = reset <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_crawler(cls, crawler): <NEW_LINE> <INDENT> s = craw...
This is a spider middleware to ignore requests to pages containing items seen in previous crawls of the same spider, thus producing a "delta crawl" containing only new items. This also speeds up the crawl, by reducing the number of requests that need to be crawled, and processed (typically, item requests are the most ...
62598f6fd10714528d69d6ca
class PlotScatterPitchClassOffset(PlotScatter): <NEW_LINE> <INDENT> values = ['pitchClass', 'offset'] <NEW_LINE> def __init__(self, streamObj, *args, **keywords): <NEW_LINE> <INDENT> PlotScatter.__init__(self, streamObj, *args, **keywords) <NEW_LINE> self.fy = lambda n:n.pitchClass <NEW_LINE> self.fyTicks = self.ticksP...
A scatter plot of pitch class and offset >>> from music21 import * >>> s = corpus.parseWork('bach/bwv324.xml') #_DOCS_HIDE >>> p = graph.PlotScatterPitchClassOffset(s, doneAction=None) #_DOCS_HIDE >>> #_DOCS_SHOW s = corpus.parseWork('bach/bwv57.8') >>> #_DOCS_SHOW p = graph.PlotScatterPitchClassOffset(s) >>> p.id 'sc...
62598f6fa4f1c619b294ddf3
class Union(SetOperation): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> def _produce(self) -> Iterator[AbstractRow]: <NEW_LINE> <INDENT> return toolz.unique( itertools.chain(self.left, self.right), key=lambda row: frozenset(row.items()), )
Union between two relations.
62598f6fd6c5a102081e1942
class ANSI: <NEW_LINE> <INDENT> dictForeBack={ 'fore' : 3, 'back' : 4 } <NEW_LINE> dictColour={ 'black' : 0, 'red' : 1, 'green' : 2, 'yellow' : 3, 'blue' : 4, 'magenta' : 5, 'cyan' : 6, 'white' : 7 } <NEW_LINE> dictStyle={ 'normal' : 0, 'bold': 1, 'italic' : 3, 'underline' :4, 'inverse': 7, 'strikethrough' : 9 } <NEW_L...
GetANSI(text,foreback,colour,style) text - text to print forecolour - [black|red|green|yellow|blue|magenta|cyan|white] backcolour - [black|red|green|yellow|blue|magenta|cyan|white] style - [normal|bold|italic|underline|inverse|strikethough] Returns a string with ansi precursors to set foreground and background colours...
62598f6f6fece00bbaccb188
class SyslogFacilities(Enum): <NEW_LINE> <INDENT> KERN = "kern" <NEW_LINE> USER = "user" <NEW_LINE> MAIL = "mail" <NEW_LINE> DAEMON = "daemon" <NEW_LINE> AUTH = "auth" <NEW_LINE> SYSLOG = "syslog" <NEW_LINE> LPR = "lpr" <NEW_LINE> NEWS = "news" <NEW_LINE> UUCP = "uucp" <NEW_LINE> CRON = "cron" <NEW_LINE> AUTHPRV = "aut...
List of known facilities Officially, these are standardized by RFC 5425, however, in practice a lot of these have more common usages than what is defined by the RFC, so this is directly based on the names in syslog-ng; since we're feeding logs in based on what we get there we're going to use their names.
62598f6f16aa5153ce3ffcfa
class TestCreatorBehavior(FunctionalTestCase): <NEW_LINE> <INDENT> use_browser = True <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> super(TestCreatorBehavior, self).setUp() <NEW_LINE> self.grant('Contributor') <NEW_LINE> fti = DexterityFTI('ReferenceFTI') <NEW_LINE> fti.behaviors = ('opengever.base.behaviors.creator....
The Creator behavior sets the creator an content creation. It also adds a creators field with listCreators() and setCreators() methods. The field is hidden by default.
62598f6f7c178a314d78cca1
class LikePost(BlogHandler): <NEW_LINE> <INDENT> def get(self, post_id): <NEW_LINE> <INDENT> if self.user: <NEW_LINE> <INDENT> self.render("front.html") <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.redirect("/login") <NEW_LINE> <DEDENT> <DEDENT> def post(self, post_id): <NEW_LINE> <INDENT> key = db.Key.from_path(...
likePosts handler
62598f6f5e10d32532ce34ea
class testResourceModel(SimpleTestTopology): <NEW_LINE> <INDENT> def testBaseResourceModelApi(self): <NEW_LINE> <INDENT> r = BaseResourceModel() <NEW_LINE> self.assertTrue(len(r._flavors) == 5) <NEW_LINE> f = ResourceFlavor("test", {"testmetric": 42}) <NEW_LINE> r.addFlavour(f) <NEW_LINE> self.assertTrue("test" in r._f...
Test the general resource model API and functionality.
62598f6f6fece00bbaccb189
class V1beta1SubjectAccessReview(object): <NEW_LINE> <INDENT> swagger_types = { 'api_version': 'str', 'kind': 'str', 'metadata': 'V1ObjectMeta', 'spec': 'V1beta1SubjectAccessReviewSpec', 'status': 'V1beta1SubjectAccessReviewStatus' } <NEW_LINE> attribute_map = { 'api_version': 'apiVersion', 'kind': 'kind', 'metadata': ...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f6fac7a0e7691f71d13
class TagForm(FlaskForm): <NEW_LINE> <INDENT> name = StringField('Name', validators=[DataRequired()]) <NEW_LINE> description = StringField('Description', validators=[DataRequired()]) <NEW_LINE> submit = SubmitField('Submit')
Form for admin to add or edit a tag
62598f6f56b00c62f0fb20b4
class CriteriaDelimiterClash(Exception): <NEW_LINE> <INDENT> pass
The delimiter for criteria is also contained on one of the keys in the document
62598f6fd10714528d69d6cb
class UpdateRoleParametersAction(UpdateParametersAction): <NEW_LINE> <INDENT> def __init__(self, role, container=constants.DEFAULT_CONTAINER_NAME): <NEW_LINE> <INDENT> super(UpdateRoleParametersAction, self).__init__(parameters=None, container=container) <NEW_LINE> self.role = role <NEW_LINE> <DEDENT> def run(self, con...
Updates role related parameters in plan environment .
62598f6f8e05c05ec3f6ea44
class ReduceFunction(Function): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def reduce(self, value1, value2): <NEW_LINE> <INDENT> pass
Base interface for Reduce functions. Reduce functions combine groups of elements to a single value, by taking always two elements and combining them into one. Reduce functions may be used on entire data sets, or on grouped data sets. In the latter case, each group is reduced individually. The basic syntax for using a ...
62598f6f76d4e153a661c40e
class EventOrigin(enum.Enum): <NEW_LINE> <INDENT> local = "LOCAL" <NEW_LINE> remote = "REMOTE" <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.value
Represents origin of an event.
62598f6f1f037a2d8b9e38ed
class DostaAbcdjmCtdbpPDclTelemeteredDriver(SimpleDatasetDriver): <NEW_LINE> <INDENT> def _build_parser(self, stream_handle): <NEW_LINE> <INDENT> parser = CtdbpPDclCommonParser(FLORD_TELEM_CONFIG, stream_handle, self._exception_callback) <NEW_LINE> return parser
Derived ctdbp_p_dcl driver class All this needs to do is create a concrete _build_parser method
62598f6f73bcbd0ca4bc9a4b
class InvalidTarget(TokenEndpointError): <NEW_LINE> <INDENT> pass
Raised when the Token Endpoint returns error = invalid_target
62598f6f0383005118f6cf01
class TestConfig(YodaTestHelper): <NEW_LINE> <INDENT> filename = None <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> super(TestConfig, self).setUp() <NEW_LINE> self.filename = self.sandbox.path + "/yoda_config_test.txt" <NEW_LINE> f = open(self.filename, "w") <NEW_LINE> f.write("foobar: \n bar: baz\n bur: buz\n") <N...
Yoda configuration test suite.
62598f6f76d4e153a661c40f
class BaseOutput(ABC): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def put(self, output: str) -> None: <NEW_LINE> <INDENT> pass
Abstract base class for output to user.
62598f6f1f5feb6acb162438
class BaseTime(models.Model): <NEW_LINE> <INDENT> created = models.DateTimeField(u'创建时间', auto_now_add=True) <NEW_LINE> updated = models.DateTimeField(u'修改时间', auto_now=True) <NEW_LINE> objects = models.Manager() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> ordering = ['-id', ]
基本模型,带创建更新时间
62598f6f66673b3332c2fbbe
class DynamicValue(object): <NEW_LINE> <INDENT> def __init__(self, value=0): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> self.target = value <NEW_LINE> self.time = 0 <NEW_LINE> <DEDENT> def __call__(self, target=None, time=0): <NEW_LINE> <INDENT> if target is None: <NEW_LINE> <INDENT> return self.value <NEW_LINE>...
docstring for DynamicValue
62598f6f5e10d32532ce34eb
class RouteHandler(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.route = route <NEW_LINE> super(RouteHandler, self).__init__()
注册路由
62598f6f30c21e258be98001
class ImageStandardizer(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.image_mean = None <NEW_LINE> self.image_std = None <NEW_LINE> self.dim = None <NEW_LINE> self.N = None <NEW_LINE> <DEDENT> def extract_channel(self, X, flag): <NEW_LINE> <INDENT> extract = np....
Channel-wise standardization for batch of images to mean 0 and variance 1. The mean and standard deviation parameters are computed in `fit(X)` and applied using `transform(X)`. X has shape (N, image_height, image_width, color_channel)
62598f6f07d97122c421649f
class OpdrachtVrijgevenView(UserPassesTestMixin, View): <NEW_LINE> <INDENT> def test_func(self): <NEW_LINE> <INDENT> return self.request.user.is_authenticated <NEW_LINE> <DEDENT> def handle_no_permission(self): <NEW_LINE> <INDENT> return HttpResponseRedirect(reverse('Plein:plein')) <NEW_LINE> <DEDENT> @staticmethod <NE...
Django class-based view voor het toevoegen van een product
62598f6f30c21e258be98002
class FieldInfo(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.FieldName = None <NEW_LINE> self.IsPrimaryKey = None <NEW_LINE> self.FieldType = None <NEW_LINE> self.FieldSize = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.FieldName = params.get("Fie...
表格字段信息列表
62598f6fa8ecb03325870a06
class AdventDay11(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.nom="AdventDay11" <NEW_LINE> <DEDENT> def __run__(self): <NEW_LINE> <INDENT> print("Class AdventDay11 --run--") <NEW_LINE> return " return AdventDay11"
classdocs
62598f6fd53ae8145f917c97
class GraphLayer(AbstractNode): <NEW_LINE> <INDENT> icon = SvgIcon.layer <NEW_LINE> layer = None <NEW_LINE> def init(self): <NEW_LINE> <INDENT> self.valid_children = {GraphLayerData} <NEW_LINE> self.tags.add(NodeTags.is_rearrangable) <NEW_LINE> self.tags.add(NodeTags.is_deletable) <NEW_LINE> self.children = [GraphLayer...
Container for a layer.
62598f6fd4950a0f3b110a37
class NotFoundRequestPublicationFactory: <NEW_LINE> <INDENT> def canHandle(self, environment): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> def __call__(self): <NEW_LINE> <INDENT> return (ProtocolErrorRequest, ProtocolErrorPublicationFactory(404))
An IRequestPublicationFactory which always yields a 404.
62598f6f30dc7b766599f05f
class ToggleAutojudgeDatasetHandler(BaseHandler): <NEW_LINE> <INDENT> def get(self, dataset_id): <NEW_LINE> <INDENT> dataset = self.safe_get_item(Dataset, dataset_id) <NEW_LINE> task = dataset.task <NEW_LINE> self.contest = task.contest <NEW_LINE> dataset.autojudge = not dataset.autojudge <NEW_LINE> if try_commit(self....
Toggle whether a given dataset is judged automatically or not.
62598f6f73bcbd0ca4bc9a4d