code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class MultiGetPool(object): <NEW_LINE> <INDENT> def __init__(self, size=POOL_SIZE): <NEW_LINE> <INDENT> self._inq = Queue() <NEW_LINE> self._size = size <NEW_LINE> self._started = Event() <NEW_LINE> self._stop = Event() <NEW_LINE> self._lock = Lock() <NEW_LINE> self._workers = [] <NEW_LINE> <DEDENT> def enq(self, task)...
Encapsulates a pool of fetcher threads. These threads can be used across many multi-get requests.
62598ef791f36d47f2230301
class MsgsFactory(factory.django.DjangoModelFactory): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = models.Msgs <NEW_LINE> <DEDENT> mail_id = factory.Sequence(lambda n: "mailid{}".format(n)) <NEW_LINE> secret_id = factory.Sequence(lambda n: smart_bytes("id{}".format(n))) <NEW_LINE> sid = factory.SubFactor...
Factory for Mailaddr.
62598ef79f288636728170ba
class ADCICover(ADCIEntity, CoverEntity): <NEW_LINE> <INDENT> def __init__( self, controller: ADCIController, device_data: adci.ADCIGarageDoorData ): <NEW_LINE> <INDENT> super().__init__(controller, device_data) <NEW_LINE> self._device: adci.ADCIGarageDoorData = device_data <NEW_LINE> self._attr_device_class: CoverDevi...
Integration Cover Entity.
62598ef7283ffb24f3cf2165
class WindowButtons(UnityIntrospectionObject): <NEW_LINE> <INDENT> def get_buttons(self, visible_only=True): <NEW_LINE> <INDENT> if visible_only: <NEW_LINE> <INDENT> return self.get_children_by_type(WindowButton, visible=True) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> return self.get_children_by_type(WindowButton) ...
The window buttons class
62598ef763d6d428bbee1089
class ARFieldLimitUnion(Union): <NEW_LINE> <INDENT> _fields_ = [ ('intLimits', ARIntegerLimitsStruct), ('realLimits', ARRealLimitsStruct), ('charLimits', ARCharLimitsStruct), ('diaryLimits', ARDiaryLimitsStruct), ('enumLimits', AREnumLimitsStruct), ('maskLimits', AREnumLimitsStruct), ('attachLimits', ARAttachLimitsStru...
Union used to hold field limits (ar.h line 3991).
62598ef776e4537e8c3ede74
class Argument(Node): <NEW_LINE> <INDENT> def __init__(self, argumentType, name = None, modifiers = set()): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.__type = argumentType <NEW_LINE> self.__name = name <NEW_LINE> self.__modifiers = modifiers <NEW_LINE> <DEDENT> def ResolveType(self, scope): <NEW_LINE> <IND...
Function argument. Captures the type (potentially a Type or UnresolvedType) and the name of the argument.
62598ef77d847024c075ac8a
class VarsDistributed(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.distributed_vars = [] <NEW_LINE> <DEDENT> def add_distributed_var(self, origin_var, slice_var, is_slice=None, block_id=None, offset=None, vtype=None, endpoint=None): <NEW_LINE> <INDENT> self.distributed_vars.append( VarDistr...
a gather about VarDistributed with many methods to find distributed vars. through the class, we can get overview about the distributed parameters on parameter servers. this class may centralized and convenient for developer to manage and get variable's distribute. other module can also use this to find variables such i...
62598ef756ac1b37e6300aa8
class _EksWorkers(resource.BaseResource): <NEW_LINE> <INDENT> def __init__(self, name, region): <NEW_LINE> <INDENT> super(_EksWorkers, self).__init__() <NEW_LINE> self.create_token = str(uuid.uuid4()) <NEW_LINE> self.delete_token = str(uuid.uuid4()) <NEW_LINE> self.name = name <NEW_LINE> self.region = region <NEW_LINE>...
Class representing the nodes in an EKS cluster.
62598ef74428ac0f6e656e0a
class _3DBase(Serialisable): <NEW_LINE> <INDENT> view3D = Typed(expected_type=View3D, allow_none=True) <NEW_LINE> floor = Typed(expected_type=Surface, allow_none=True) <NEW_LINE> sideWall = Typed(expected_type=Surface, allow_none=True) <NEW_LINE> backWall = Typed(expected_type=Surface, allow_none=True) <NEW_LINE> def _...
Base class for 3D charts
62598ef7097d151d1a2bf8e0
class MongoDBConnection(object): <NEW_LINE> <INDENT> def __init__(self, host='127.0.0.1', port=27017): <NEW_LINE> <INDENT> self.host = host <NEW_LINE> self.port = port <NEW_LINE> self.connection = None <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> self.connection = MongoClient(self.host, self.port) <NEW_...
MongoDB Connection
62598ef7498bea3a75a563f0
class Cifar100TrainConfig(Cifar100CommonConfig): <NEW_LINE> <INDENT> transforms = [ dict(type='RandomCrop', size=32, padding=4), dict(type='RandomHorizontalFlip'), dict(type='ToTensor'), dict(type='Normalize', mean=[0.50707519, 0.48654887, 0.44091785], std=[0.26733428, 0.25643846, 0.27615049])] <NEW_LINE> @classmethod ...
Default Cifar100 config.
62598ef701c39578d7f1165f
class GUIMouse(GUIBase): <NEW_LINE> <INDENT> Cursor = wx.NullCursor <NEW_LINE> def OnLeftDown(self, event): <NEW_LINE> <INDENT> EventType = FloatCanvas.EVT_FC_LEFT_DOWN <NEW_LINE> if not self.parent.HitTest(event, EventType): <NEW_LINE> <INDENT> self.parent._RaiseMouseEvent(event, EventType) <NEW_LINE> <DEDENT> <DEDENT...
Mouse mode checks for a hit test, and if nothing is hit, raises a FloatCanvas mouse event for each event.
62598ef73617ad0b5ee049e4
class HtmlAttr(dict, UnicodeMixin): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def _get_name(string): <NEW_LINE> <INDENT> if re.match(r'^[A-Za-z0-9]+$', string): <NEW_LINE> <INDENT> words = re.split(r'(^[a-z]*)|([A-Z][^A-Z]+)', string) <NEW_LINE> return '-'.join(c for c in words if c is not None and c).lower() <NEW_L...
Implements an object to manage and render attributes of an HTML element. HtmlAttr is a dict with a custom rendering to string method. It converts camelcase inputs to dash separated notation and removes the value of all boolean attributes. >>> demo = HtmlAttr(attr='value', boolean=None, camelCase=True) >>> pri...
62598ef7009cb60464cffe0d
class FloatProperty(BaseProperty): <NEW_LINE> <INDENT> _allowed_python_types = [float, NoneType] <NEW_LINE> def __init__(self, name, value, xml_path): <NEW_LINE> <INDENT> super(FloatProperty, self).__init__( name, value, xml_path, self._allowed_python_types) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def is_valid(cls,...
A property that accepts float input
62598ef767a9b606de54488c
class PidCmdline(ReadFile): <NEW_LINE> <INDENT> FILENAME = ospath.join('proc', '%s', 'cmdline') <NEW_LINE> KEY = 'pidcmdline' <NEW_LINE> CACHED = True <NEW_LINE> def normalize(self): <NEW_LINE> <INDENT> LOGGER.debug("Normalize") <NEW_LINE> try: <NEW_LINE> <INDENT> ret = self.lines[0].strip('\0').split('\0') <NEW_LINE> ...
PidCmdline handling
62598ef771ff763f4b5e601e
class Upscaler: <NEW_LINE> <INDENT> Convert, EachChannel = range(2) <NEW_LINE> def __init__(self, name, grayscale=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> assert grayscale is None or grayscale is Upscaler.Convert or grayscale is Upscaler.EachChannel, "grayscale must be one...
Abstract base class for upscaling algorithms
62598ef7167d2b6e312b5858
class CheckEpisode(CheckBase): <NEW_LINE> <INDENT> def check(self): <NEW_LINE> <INDENT> super().check() <NEW_LINE> if not using_remote_theme(): <NEW_LINE> <INDENT> self.check_reference_inclusion() <NEW_LINE> <DEDENT> <DEDENT> def check_metadata(self): <NEW_LINE> <INDENT> super().check_metadata() <NEW_LINE> if self.meta...
Check an episode page.
62598ef7796e427e5384d058
class FilterPlugin(BasePlugin): <NEW_LINE> <INDENT> default_workspace_category = 'Filter' <NEW_LINE> pass
Filter plugin.
62598ef766656f66f7d58ca3
class Workout(models.Model): <NEW_LINE> <INDENT> date = models.DateField() <NEW_LINE> name = models.CharField( max_length=128, default='Workout', blank=True ) <NEW_LINE> user = models.ForeignKey( User, related_name='user_set', on_delete=models.CASCADE ) <NEW_LINE> is_active = models.BooleanField( verbose_name='activity...
Workout is a complex of exercises with set amount of sets and reps for each exercise.
62598ef7aad79263cf42d0cd
class NewsletterSignupViewTestCase(ViewRequestFactoryTestMixin, TestCase): <NEW_LINE> <INDENT> view_class = views.NewsletterSignupView <NEW_LINE> def get_view_name(self): <NEW_LINE> <INDENT> return 'newsletter_signup' <NEW_LINE> <DEDENT> def setUp(self): <NEW_LINE> <INDENT> self.data = {'email': 'email@example.com'} <N...
Tests for the ``NewsletterSignupView`` view class.
62598ef7ff9c53063f518f20
class Generator(object): <NEW_LINE> <INDENT> def __init__(self, args, task, models): <NEW_LINE> <INDENT> self.args = args <NEW_LINE> self.task = task <NEW_LINE> self.models = models <NEW_LINE> self.src_dict = task.source_dictionary <NEW_LINE> self.tgt_dict = task.target_dictionary <NEW_LINE> self.use_cuda = torch.cuda....
PyTorch Hub API for generating sequences from a pre-trained translation or language model.
62598ef73317a56b869bd9c4
class LoiFrottement: <NEW_LINE> <INDENT> TYPES = ['FkSto', 'Fk'] <NEW_LINE> def __init__(self, nom_loi_frottement, type, comment=''): <NEW_LINE> <INDENT> check_preffix(nom_loi_frottement, 'Fk') <NEW_LINE> if type not in LoiFrottement.TYPES: <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> self.id = nom...
Friction law (Strickler coefficient could vary with Z elevation) :param id: friction law identifier :type id: str :param type: friction law type :type type: str :param loi_Fk: ndarray(dtype=float, ndim=2) with Strickler coefficient varying with elevation :type loi_Fk: 2D-array :param comment: optional text explanation...
62598ef7a05bb46b38489132
class S800(ColumnCorpus): <NEW_LINE> <INDENT> def __init__( self, base_path: Union[str, Path] = None, in_memory: bool = True, sentence_splitter: SentenceSplitter = None, ): <NEW_LINE> <INDENT> if type(base_path) == str: <NEW_LINE> <INDENT> base_path: Path = Path(base_path) <NEW_LINE> <DEDENT> columns = {0: "text", 1: "...
S800 corpus For further information see Pafilis et al.: The SPECIES and ORGANISMS Resources for Fast and Accurate Identification of Taxonomic Names in Text http://www.plosone.org/article/info:doi%2F10.1371%2Fjournal.pone.0065390
62598ef75166f23b2e241c9a
class GeneralsheetCreator(Creator): <NEW_LINE> <INDENT> def __init__(self, workbook, **flags): <NEW_LINE> <INDENT> self.workbook = workbook <NEW_LINE> self._flags = flags <NEW_LINE> self._components = {} <NEW_LINE> <DEDENT> def update(self, data): <NEW_LINE> <INDENT> date = data.date <NEW_LINE> if date in self._compone...
Provides the functionality for displaying order data. Categorizes the orders and segments them into separate worksheets to display the data.
62598ef7e1aae11d1e7cdca1
@register(names=('UI', 'UInt_t'), builtin=True) <NEW_LINE> class UInt(BaseScalar): <NEW_LINE> <INDENT> type = 'i' <NEW_LINE> typename = 'UInt_t' <NEW_LINE> def __new__(cls, default=0, **kwargs): <NEW_LINE> <INDENT> return BaseScalar.__new__(cls, 'I', [UInt.convert(default)]) <NEW_LINE> <DEDENT> def __init__(self, defau...
This is a variable containing an unsigned integer
62598ef7236d856c2adc8878
class ConstantRamp(TimeRamp): <NEW_LINE> <INDENT> _scaler_key_ = 'constant_ramp' <NEW_LINE> def __call__(self, timestep): <NEW_LINE> <INDENT> if timestep < 0: <NEW_LINE> <INDENT> raise ValueError('Timestep is < 0.') <NEW_LINE> <DEDENT> return 1.0
TimeRamp that always returns 1.0
62598ef791f36d47f2230303
class Loader(object): <NEW_LINE> <INDENT> def __init__(self, datadir=""): <NEW_LINE> <INDENT> if datadir == "": <NEW_LINE> <INDENT> self.basedir = os.path.abspath(os.path.dirname(__file__)) <NEW_LINE> self.datadir = os.path.abspath( os.path.join(self.basedir, '../', 'data')) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT...
docstring for Loader
62598ef74a966d76dd5ed79a
class TaskAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('title', 'pk')
defines admin display characteristics for Tasks
62598ef7a8370b77170eeca3
class BundleListView(TemplateView): <NEW_LINE> <INDENT> template_name = 'web/bundles/index.html' <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super(BundleListView, self).get_context_data(**kwargs) <NEW_LINE> service = BundleService(self.request.user) <NEW_LINE> results = service.items(...
Displays the list of bundles.
62598ef7a219f33f346c50ee
class partition_name_to_spec_args: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRING, 'part_name', None, None, ), ) <NEW_LINE> def __init__(self, part_name=None,): <NEW_LINE> <INDENT> self.part_name = part_name <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBinaryProtocol...
Attributes: - part_name
62598ef763d6d428bbee108d
class Illness: <NEW_LINE> <INDENT> def __init__(self, name: str, immunity: Callable, wt_form: Type[FlaskForm], form_data_extractor: Callable, ): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.form = wt_form <NEW_LINE> self._immunity = immunity <NEW_LINE> self._form_data_extractor = form_data_extractor <NEW_LINE> ...
Class to contain a class' data (ie student objects) and related methods. ... Attributes ---------- name : str Illness' name form : FlaskForm Flask-WTF WTForm object, renders form in HTML and validates data. Methods ------- immunity Wraps illness' immunity function. extract_data(form) Wraps funct...
62598ef79f288636728170be
class Board: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass
A fairly static object, created once for each size/shape of board and ruleset.
62598ef75fdd1c0f98e5c864
class RandomBrightness(Operation): <NEW_LINE> <INDENT> def __init__(self, probability, min_factor,max_factor): <NEW_LINE> <INDENT> Operation.__init__(self, probability) <NEW_LINE> self.min_factor = min_factor <NEW_LINE> self.max_factor = max_factor <NEW_LINE> <DEDENT> def perform_operation(self, images): <NEW_LINE> <IN...
This class is used to random change image brightness.
62598ef71f5feb6acb161513
class RequestError(Exception): <NEW_LINE> <INDENT> def __init__(self, message: str) -> None: <NEW_LINE> <INDENT> self.id = str(uuid4()).lower() <NEW_LINE> self.message = message <NEW_LINE> <DEDENT> def __str__(self) -> str: <NEW_LINE> <INDENT> return json.dumps(self.asdict()) <NEW_LINE> <DEDENT> def asdict(self) -> Dic...
Exception that can be raised when request failed. message: Error message as a string.
62598ef7f548e778e5969e4c
class ReadOnlyPanel(EditHandler): <NEW_LINE> <INDENT> def __init__(self, attr, style=None, add_hidden_input=False, *args, value=None, **kwargs): <NEW_LINE> <INDENT> if type(attr)=='str': <NEW_LINE> <INDENT> self.attr = attr <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.attr = str(attr) <NE...
ReadOnlyPanel EditHandler Class - built from ideas on https://github.com/wagtail/wagtail/issues/2893 Most credit to @BertrandBordage for this. Usage: attr: name of field to display style: optional, any valid style string add_hidden_input: optional, add a hidden input field to allow retrievi...
62598ef73346ee7daa336ac7
class ActorRegistry(object): <NEW_LINE> <INDENT> _actor_refs = [] <NEW_LINE> _actor_refs_lock = _threading.RLock() <NEW_LINE> @classmethod <NEW_LINE> def broadcast(cls, message, target_class=None): <NEW_LINE> <INDENT> if isinstance(target_class, basestring): <NEW_LINE> <INDENT> targets = cls.get_by_class_name(target_cl...
Registry which provides easy access to all running actors. Contains global state, but should be thread-safe.
62598ef763b5f9789fe83a1f
class MobileNetV2(tf.keras.Model): <NEW_LINE> <INDENT> def __init__(self, channels, init_block_channels, final_block_channels, remove_exp_conv, in_channels=3, in_size=(224, 224), classes=1000, data_format="channels_last", **kwargs): <NEW_LINE> <INDENT> super(MobileNetV2, self).__init__(**kwargs) <NEW_LINE> self.in_size...
MobileNetV2 model from 'MobileNetV2: Inverted Residuals and Linear Bottlenecks,' https://arxiv.org/abs/1801.04381. Parameters: ---------- channels : list of list of int Number of output channels for each unit. init_block_channels : int Number of output channels for the initial unit. final_block_channels : int ...
62598ef73539df3088ecab6d
class BYO_RPi_Station(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.wind_count = 0 <NEW_LINE> self.radius_cm = 9.0 <NEW_LINE> self.rain_count = 0 <NEW_LINE> self.gust = 0 <NEW_LINE> self.wind_speed_sensor = Button(5) <NEW_LINE> self.wind_speed_sensor.when_pressed = self.spin <NEW_LINE> self....
Object that represents a BYO_Station.
62598ef7460517430c430d48
class Index(Resource): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> return {'status': "Bucket List Service API is ready"}
Index page
62598ef756ac1b37e6300aac
class InviteOnlyChanError(CommandError): <NEW_LINE> <INDENT> def __init__(self, channel: str): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.msgid = 'ERR_INVITEONLYCHAN' <NEW_LINE> self.msgparams = {'channel': channel}
473 - Cannot join channel (+i)
62598ef77d847024c075ac8e
class DigMontage(object): <NEW_LINE> <INDENT> def __init__(self, hsp, hpi, elp, point_names, nasion=None, lpa=None, rpa=None, dev_head_t=None, dig_ch_pos=None): <NEW_LINE> <INDENT> self.hsp = hsp <NEW_LINE> self.hpi = hpi <NEW_LINE> self.elp = elp <NEW_LINE> self.point_names = point_names <NEW_LINE> self.nasion = nasio...
Montage for Digitized data Montages are typically loaded from a file using read_dig_montage. Only use this class directly if you're constructing a new montage. Parameters ---------- hsp : array, shape (n_points, 3) The positions of the headshape points in 3d. These points are in the native digitizer space. hp...
62598ef7851cf427c66b6b87
class InferThresholdingLayer(Transformation): <NEW_LINE> <INDENT> def __init__(self, mem_mode="const"): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.mem_mode = mem_mode <NEW_LINE> <DEDENT> def apply(self, model): <NEW_LINE> <INDENT> graph = model.graph <NEW_LINE> node_ind = 0 <NEW_LINE> graph_modified = False...
Convert any MultiThreshold into a standalone thresholding HLS layer.
62598ef730bbd722464684f6
class Task: <NEW_LINE> <INDENT> def __init__(self, task_name, nproc, working_dir, binary, *args, **keywords): <NEW_LINE> <INDENT> self.name = task_name <NEW_LINE> self.nproc = int(nproc) <NEW_LINE> self.working_dir = working_dir <NEW_LINE> self.binary = binary <NEW_LINE> self.args = [str(a) for a in args] if args else ...
Container for task information: :param name: task name :type name: str :param nproc: number of processes the task needs :type nproc: int :param working_dir: location to launch task from :type working_dir: str :param binary: full path to executable to launch :type binary: str :param \*args: arguments for *binary* :para...
62598ef75fcc89381b265589
class FlaskLoginClient(FlaskClient): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> user = kwargs.pop("user", None) <NEW_LINE> fresh = kwargs.pop("fresh_login", True) <NEW_LINE> super().__init__(*args, **kwargs) <NEW_LINE> if user: <NEW_LINE> <INDENT> with self.session_transaction() as ses...
A Flask test client that knows how to log in users using the Flask-Login extension. This is taken from flask-login 0.5, but right now airflow needs <0.5
62598ef74f88993c371ef94b
class ADLSGen2FolderDataSet(DataSet): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'readonly': True}, 'file_system': {'required': True}, 'folder_path': {'required': Tru...
An ADLS Gen 2 folder data set. 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 resource id of the azure resource. :vartype id: str :ivar name: Name of the azure resource. :vartype name: str :iva...
62598ef7a05bb46b38489134
class GeneViewSet(viewsets.ReadOnlyModelViewSet): <NEW_LINE> <INDENT> queryset = models.Gene.objects.fast() <NEW_LINE> serializer_class = serializers.GeneSerializer <NEW_LINE> filter_backends = (DjangoFilterBackend, SearchFilter) <NEW_LINE> filterset_class = filters.GeneFilter <NEW_LINE> search_fields = ( 'symbol', 'sy...
ViewSet for viewing Genes.
62598ef75166f23b2e241c9c
class Solution: <NEW_LINE> <INDENT> def closestDivisors(self, num: int) -> List[int]: <NEW_LINE> <INDENT> def helper(n): <NEW_LINE> <INDENT> s = int(math.sqrt(n) // 1) <NEW_LINE> for v1 in range(s, 1, -1): <NEW_LINE> <INDENT> v2 = n // v1 <NEW_LINE> if not n % v1 and not n % v2: <NEW_LINE> <INDENT> return [v1, v2] <NEW...
I dont know what the algorithm is...
62598ef767a9b606de544890
class CanvasDemo(EasyFrame): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> EasyFrame.__init__(self, title = "Canvas Demo 2") <NEW_LINE> self.colors = ("blue", "green", "red", "yellow") <NEW_LINE> self.shapes = list() <NEW_LINE> self.canvas = self.addCanvas(row = 0, column = 0, columnspan = 2, width = 300,...
Draws filled ovals on a canvas, and allows the user to erase them all.
62598ef72c8b7c6e89bd2081
class NetstringMessageTooLong(NetstringProtocolError): <NEW_LINE> <INDENT> def __init__(self, size, maxsize): <NEW_LINE> <INDENT> msg = ('netstring message length exceeds configured maxsize: %s > %s' % (size, maxsize)) <NEW_LINE> super(NetstringMessageTooLong, self).__init__(msg)
NetstringMessageTooLong is raised when the size prefix contains a valid integer, but that integer is larger than the :type:`NetstringSocket`'s configured *maxsize*. When this exception is raised, it's recommended to simply close the connection instead of trying to recover.
62598ef763d6d428bbee108f
class ConfigHandler(object): <NEW_LINE> <INDENT> def __init__(self, path: str): <NEW_LINE> <INDENT> self.path = self.__load_path(path) <NEW_LINE> self.config = dict() <NEW_LINE> if os.path.exists(self.path) is False: <NEW_LINE> <INDENT> raise IOError("%s not exists" % self.path) <NEW_LINE> <DEDENT> self.cf = configpars...
Main class of configuration handler
62598ef776e4537e8c3ede7a
class FourStratsV2a: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def generate(): <NEW_LINE> <INDENT> strategies = [] <NEW_LINE> limits=[50, 20, 10] <NEW_LINE> sources = ['his', 'our', 'dna'] <NEW_LINE> strategies.extend([ generate_meta_strategy_pair( WrappedRFindStrategy, limits=limits, sources=sources, shenanigans=Fa...
Contains 4 type of strategies: - RFindWrapped (with 4 windows and 3 sources wrapped inside a Kumoko) - DecisionTree - HPSDojo (from high performance notebook) - TestingPleaseIgnore
62598ef75fdd1c0f98e5c866
class ReparseType(enum.Enum): <NEW_LINE> <INDENT> MOUNT_POINT = 0x0003 <NEW_LINE> SYMLINK = 0x000C <NEW_LINE> HSM = 0x0004 <NEW_LINE> HSM2 = 0x0006 <NEW_LINE> SIS = 0x0008 <NEW_LINE> WIM = 0x0008 <NEW_LINE> CSV = 0x0009 <NEW_LINE> DFS = 0x000A <NEW_LINE> DFSR = 0x0012 <NEW_LINE> DEDUP = 0x0013 <NEW_LINE> NFS = 0x0014 <...
Possible tags for a reparse point based on the winnt.h
62598ef756ac1b37e6300aad
class A(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def s(): <NEW_LINE> <INDENT> pass
A class with a static method.
62598ef7f548e778e5969e4e
class Emojis(): <NEW_LINE> <INDENT> emojis = { ':+1:': u'\U0001F44D', } <NEW_LINE> @staticmethod <NEW_LINE> def get(emoji_code): <NEW_LINE> <INDENT> return Emojis.emojis.get(emoji_code, emoji_code)
I am using this table as reference: http://apps.timwhitlock.info/emoji/tables/unicode
62598ef7be383301e02520a1
class Summary(Response): <NEW_LINE> <INDENT> def __init__(self, investor_id): <NEW_LINE> <INDENT> self._investor_id = investor_id <NEW_LINE> response = request.get(self.url) <NEW_LINE> Response.__init__(self, response) <NEW_LINE> <DEDENT> @property <NEW_LINE> def available_cash(self): <NEW_LINE> <INDENT> return self.js...
Get the response of summary endpoint
62598ef7460517430c430d4a
class Cache(object): <NEW_LINE> <INDENT> def __init__(self, key): <NEW_LINE> <INDENT> self.key = key <NEW_LINE> self.attrs = {} <NEW_LINE> self.cache() <NEW_LINE> <DEDENT> def cache(self): <NEW_LINE> <INDENT> from pyasm.biz import ExpressionParser <NEW_LINE> parser = ExpressionParser() <NEW_LINE> logins = parser.eval("...
Generic caching class
62598ef726068e7796d4b21d
class SerieAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> prepopulated_fields = {'slug': ('name', )} <NEW_LINE> list_display = ( 'name', 'created' ) <NEW_LINE> date_hierarchy = 'created' <NEW_LINE> search_fields = ('name', 'created', ) <NEW_LINE> list_filter = ('created', )
Classe admin utilizada no django admin para oferecer as opcoes de CRUD do model Serie
62598ef7aad79263cf42d0d0
class RoleList(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'value': {'readonly': True}, 'next_link': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[Role]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LI...
Collection of all the roles on the Data Box Edge device. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The Value. :vartype value: list[~azure.mgmt.databoxedge.v2019_07_01.models.Role] :ivar next_link: Link to the next set of results. :vartype next_link: str
62598ef7796e427e5384d05c
class _EmbeddingColumn(_FeatureColumn, collections.namedtuple( "_EmbeddingColumn", ["sparse_id_column", "dimension", "combiner", "stddev"])): <NEW_LINE> <INDENT> def __new__(cls, sparse_id_column, dimension, combiner="mean", stddev=None): <NEW_LINE> <INDENT> if stddev is None: <NEW_LINE> <INDENT> stddev = 1 / math.sqrt...
Represents an embedding column. Args: sparse_id_column: A _SparseColumn which is created by `sparse_column_with_*` functions. dimension: An integer specifying dimension of the embedding. combiner: A string specifying how to reduce if there are multiple entries in a single row. Currently "mean", "sqrtn" a...
62598ef7be7bc26dc92512c4
class TCPDeviceCloudMonitor(DeviceCloudMonitor): <NEW_LINE> <INDENT> def __init__(self, conn, monitor_id, tcp_client_manager): <NEW_LINE> <INDENT> DeviceCloudMonitor.__init__(self, conn, monitor_id) <NEW_LINE> self._tcp_client_manager = tcp_client_manager <NEW_LINE> <DEDENT> def add_callback(self, callback): <NEW_LINE>...
Device Cloud Monitor with TCP transport type
62598ef7f548e778e5969e4f
class NoneDiv(Operator): <NEW_LINE> <INDENT> grok.context(zope.interface.Interface) <NEW_LINE> grok.name('div') <NEW_LINE> def __call__(self, operand2): <NEW_LINE> <INDENT> return 0
Div for None.
62598ef763b5f9789fe83a21
class CursesSnakeGameExe(object): <NEW_LINE> <INDENT> SPEED_UP_RATIO = 5 <NEW_LINE> def __init__(self, win_width=60, win_height=20, speed="normal"): <NEW_LINE> <INDENT> self._frame_seconds = self._speed2frame_seconds(speed) <NEW_LINE> self._game_state = snake_state_machine.SnakeStateMachine(win_width, win_height) <NEW_...
Curses based snake executor
62598ef7cc40096d61619639
@final <NEW_LINE> class ImportMembersVisitor(BaseNodeVisitor): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs) -> None: <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self._imports_count = 0 <NEW_LINE> self._imported_names_count = 0 <NEW_LINE> self._import_from_members_validator = _ImportFromM...
Counts imports in a module.
62598ef7091ae356687034db
class TinyImagesSubset(ImageFolder): <NEW_LINE> <INDENT> def __init__(self, train=True, transform=None, target_transform=None): <NEW_LINE> <INDENT> root = osp.join(cfg.DATASET_ROOT, 'tiny-images-subset') <NEW_LINE> if not osp.exists(root): <NEW_LINE> <INDENT> raise ValueError('Dataset not found at {}. Please download i...
A 800K subset of the 80M TinyImages data consisting of 32x32 pixel images from the internet. Note: that the dataset is unlabeled.
62598ef744b2445a339b5dce
class EditView: <NEW_LINE> <INDENT> def __init__(self, context, request): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> self.request = request <NEW_LINE> self.adapted = IMarkerInterfaces(context) <NEW_LINE> self.context_url = self.context.absolute_url() <NEW_LINE> <DEDENT> def __call__(self, SAVE=None, add=(), ...
Marker interface edit view.
62598ef74f88993c371ef94c
class Workflow(wfs.Workflow): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs) -> None: <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self.tasks: list[epsm.Task] = [] <NEW_LINE> self.makespan: float = 0.0 <NEW_LINE> self.orig_makespan: float = 0.0 <NEW_LINE> self.spare_time: float = 0.0
Extends basic functionality of Workflow class with specific fields and methods required by the EPSM algorithm.
62598ef760cbc95b06362bf9
class IImageCroppingAT(IImageCroppingMarker): <NEW_LINE> <INDENT> pass
Image cropping support marker interface for Archetypes based content
62598ef7fff4ab517ebcc09a
class UpdateHost(command.UpdateCommand): <NEW_LINE> <INDENT> resource = 'host' <NEW_LINE> json_indent = 4 <NEW_LINE> log = logging.getLogger(__name__ + '.UpdateHost') <NEW_LINE> name_key = 'hypervisor_hostname' <NEW_LINE> id_pattern = HOST_ID_PATTERN <NEW_LINE> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parse...
Update attributes of a host.
62598ef7379a373c97d978bb
class URLRedirectTests(URLTestCaseBase): <NEW_LINE> <INDENT> def test_no_prefix_response(self): <NEW_LINE> <INDENT> response = self.client.get('/not-prefixed/') <NEW_LINE> self.assertEqual(response.status_code, 200) <NEW_LINE> <DEDENT> def test_en_redirect(self): <NEW_LINE> <INDENT> response = self.client.get('/account...
Tests if the user gets redirected to the right URL when there is no language-prefix in the request URL.
62598ef74527f215b58e87c5
class IFinalStageDirective(IStageBase, IInQueue): <NEW_LINE> <INDENT> pass
Final stage. Requires input queue only to get tasks.
62598ef771ff763f4b5e6024
class RekallAction(ClientActionStub): <NEW_LINE> <INDENT> in_rdfvalue = rekall_types.RekallRequest <NEW_LINE> out_rdfvalues = [rekall_types.RekallResponse]
Runs a Rekall command on live memory.
62598ef79f288636728170c2
class Hello(HandlerInterface): <NEW_LINE> <INDENT> handler = CommandHandler <NEW_LINE> def apply(self, bot, update): <NEW_LINE> <INDENT> update.message.reply_text('Hello {}'.format(update.message.from_user.first_name))
Test echo command for bot
62598ef73d592f4c4edb97b1
class BaseBarFeed(feed.BaseFeed): <NEW_LINE> <INDENT> def __init__(self, frequency, maxLen=None): <NEW_LINE> <INDENT> super(BaseBarFeed, self).__init__(maxLen) <NEW_LINE> self.__frequency = frequency <NEW_LINE> self.__useAdjustedValues = False <NEW_LINE> self.__defaultInstrument = None <NEW_LINE> self.__currentBars = N...
Base class for :class:`pyalgotrade.bar.Bar` providing feeds. :param frequency: The bars frequency. Valid values defined in :class:`pyalgotrade.bar.Frequency`. :param maxLen: The maximum number of values that the :class:`pyalgotrade.dataseries.bards.BarDataSeries` will hold. Once a bounded length is full, when new ...
62598ef72ae34c7f260a99a5
class SvgAttributesDialogTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.dialog = SvgAttributesDialog(None) <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> self.dialog = None <NEW_LINE> <DEDENT> def test_dialog_ok(self): <NEW_LINE> <INDENT> button = self.dialog.button_...
Test dialog works.
62598ef7fff4ab517ebcc09b
class FgdEntityOutput(object): <NEW_LINE> <INDENT> def __init__(self, name, value_type, description=''): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> self._value_type = value_type <NEW_LINE> self._description = description <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return '<FgdEntityOutput {' + ...
An entity output, as represented in a Fgd file.
62598ef767a9b606de544893
class Page(object): <NEW_LINE> <INDENT> login_url = "http://bbs.meizu.cn" <NEW_LINE> def __init__(self, selenium_driver, base_url, parent=None): <NEW_LINE> <INDENT> self.base_url = base_url <NEW_LINE> self.driver = selenium_driver <NEW_LINE> self.timeout = 30 <NEW_LINE> self.parent = parent <NEW_LINE> <DEDENT> def _ope...
基本类,用于所有页面的继承
62598ef73346ee7daa336ac9
class HDivElement(WrapperElementBase): <NEW_LINE> <INDENT> def __init__(self, wrappee): <NEW_LINE> <INDENT> assert isinstance(wrappee, TensorProductElement) <NEW_LINE> if any(fe.formdegree is None for fe in wrappee.factors): <NEW_LINE> <INDENT> raise ValueError("Form degree of subelement is None, cannot H(div)!") <NEW_...
H(div) wrapper element for tensor product elements.
62598ef7460517430c430d4c
@attrs(kw_only=True, auto_attribs=True) <NEW_LINE> class ExecutionReport(JidType, hint="Coveo.ExecutionReport"): <NEW_LINE> <INDENT> logs: Opt[List[LogEntry]] = None <NEW_LINE> duration: Opt[float] = None <NEW_LINE> result: Opt[ExecutionResult] = None <NEW_LINE> exception: Opt[str] = None <NEW_LINE> def __init__( self,...
Report on the execution of an operation
62598ef766656f66f7d58ca9
class TestNodeCLI(): <NEW_LINE> <INDENT> def __init__(self, binary, datadir): <NEW_LINE> <INDENT> self.args = [] <NEW_LINE> self.binary = binary <NEW_LINE> self.datadir = datadir <NEW_LINE> self.input = None <NEW_LINE> <DEDENT> def __call__(self, *args, input=None): <NEW_LINE> <INDENT> self.args = [str(arg) for arg in ...
Interface to gpunion-cli for an individual node
62598ef726068e7796d4b220
@provides(IMATSEval) <NEW_LINE> class MATS1DElastic(MATS1DEval): <NEW_LINE> <INDENT> E = Float(1., label="E", desc="Young's Modulus", auto_set=False, enter_set=True) <NEW_LINE> _stress_strain_curve = Instance(MFnLineArray) <NEW_LINE> def __stress_strain_curve_default(self): <NEW_LINE> <INDENT> return MFnLineArray(ydata...
Elastic Model.
62598ef763b5f9789fe83a23
class Bullet(pygame.sprite.Sprite): <NEW_LINE> <INDENT> def __init__(self, x, y, rot): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.image = pygame.Surface([4, 4]) <NEW_LINE> self.image.fill((255, 255, 255)) <NEW_LINE> self.rect = self.image.get_rect() <NEW_LINE> self.rect.x = x <NEW_LINE> self.rect.y = y <NEW...
This class represents the bullets.
62598ef74527f215b58e87c6
class BaseWrapper(object): <NEW_LINE> <INDENT> arguments = [] <NEW_LINE> def __init_args(self): <NEW_LINE> <INDENT> self._key_mapping = {} <NEW_LINE> self._args = {} <NEW_LINE> self._args_order = [] <NEW_LINE> for (name, key) in self.arguments: <NEW_LINE> <INDENT> self._key_mapping[name] = key <NEW_LINE> self._args[nam...
Базовый класс для генерации аргументов командной строки по заданным параметрам
62598ef75fcc89381b26558b
@Declarations.add_declaration_type(isAnEntry=True) <NEW_LINE> class Mixin(MixinType): <NEW_LINE> <INDENT> autodoc_anyblok_bases = True <NEW_LINE> autodoc_anyblok_fields = True
The Mixin class are used to define a behaviours on models: * Add new mixin class:: @Declarations.register(Declarations.Mixin) class MyMixinclass: pass * Remove a mixin class:: Declarations.unregister(Declarations.Mixin.MyMixinclass, MyMixinclass)
62598ef7009cb60464cffe15
@implementer(IPolicyForHTTPS) <NEW_LINE> class HostnameCachingHTTPSPolicy(object): <NEW_LINE> <INDENT> def __init__(self, policyforHTTPS, cacheSize=20): <NEW_LINE> <INDENT> self._policyForHTTPS = policyforHTTPS <NEW_LINE> self._cache = collections.OrderedDict() <NEW_LINE> self._cacheSize = cacheSize <NEW_LINE> <DEDENT>...
IPolicyForHTTPS that wraps a L{IPolicyForHTTPS} and caches the created L{IOpenSSLClientConnectionCreator}. This policy will cache up to C{cacheSize} L{client connection creators <twisted.internet.interfaces. IOpenSSLClientConnectionCreator>} for reuse in subsequent requests to the same hostname. @ivar _policyForHTTPS...
62598ef7e5267d203ee6a1c9
class OhmconnectSensor(SensorEntity): <NEW_LINE> <INDENT> def __init__(self, name, ohmid): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> self._ohmid = ohmid <NEW_LINE> self._data = {} <NEW_LINE> <DEDENT> @property <NEW_LINE> def name(self): <NEW_LINE> <INDENT> return self._name <NEW_LINE> <DEDENT> @property <NEW_LIN...
Representation of a OhmConnect sensor.
62598ef7283ffb24f3cf216e
class Options(usage.Options): <NEW_LINE> <INDENT> optParameters = [ ["config", "c", None, _("Load this settings.ini file")], ["id", None, 0, _("Unique ID for this instance"), int], ] <NEW_LINE> def __init__(self, module): <NEW_LINE> <INDENT> self._module = module <NEW_LINE> super(Options, self).__init__() <NEW_LINE> <D...
Une classe qui gère les options d'un connecteur de Vigilo.
62598ef77d43ff248742685d
class BarchartPlotter(Plotter): <NEW_LINE> <INDENT> def __init__(self, figname='barchart', plotdir='plots', title=None): <NEW_LINE> <INDENT> super(BarchartPlotter, self).__init__(plotdir=plotdir) <NEW_LINE> self.figname = figname <NEW_LINE> self.title = title <NEW_LINE> self.legend = {} <NEW_LINE> self.values = default...
Barchart plotter for generating direct comparison plots. :params figname: Name of output file :params plotdir: Directory to store the plot in :params title: Plot title to be printed on top Example usage: with BarchartPlotter(figname=..., plotdir=...) as barchart: barchart.add_point(gflops[0], oi[0], label='Point...
62598ef7627d3e7fe0e05753
class ODataConnectionError(ODataError): <NEW_LINE> <INDENT> pass
Raised when the endpoint responds with an HTTP error code
62598ef771ff763f4b5e6026
class MS2Info(): <NEW_LINE> <INDENT> def __init__(self, ms2_name, sample_name): <NEW_LINE> <INDENT> self.name = ms2_name <NEW_LINE> self.mz = [] <NEW_LINE> self.intensity = [] <NEW_LINE> self.segment_num = 0 <NEW_LINE> self.max_int = 0 <NEW_LINE> self.sample_name = sample_name <NEW_LINE> <DEDENT> def add_mz(self, mz): ...
a special data structure defined by self to store ms2 information
62598ef7167d2b6e312b5860
class Exclude(object): <NEW_LINE> <INDENT> def __init__(self, org, name=None): <NEW_LINE> <INDENT> self.org = org <NEW_LINE> self.name = name <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return all([other, type(other) == Exclude, self.org == other.org, self.name == other.name]) <NEW_LINE> <DEDENT> d...
Represents a dependency exclude pattern to filter transitive dependencies against.
62598ef79f288636728170c4
class skipIfNoPlanValidatorForProblemKind(object): <NEW_LINE> <INDENT> def __init__(self, kind: ProblemKind): <NEW_LINE> <INDENT> self.kind = kind <NEW_LINE> <DEDENT> def __call__(self, test_fun): <NEW_LINE> <INDENT> msg = "no plan validator available for the given problem kind" <NEW_LINE> cond = get_env().factory._get...
Skip a test if there are no plan validator for the given problem kind.
62598ef72ae34c7f260a99a7
class Route: <NEW_LINE> <INDENT> def __init__(self, path, methods, controller): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> self.methods = methods <NEW_LINE> self.controller = controller <NEW_LINE> <DEDENT> def register(self, wsgi_app): <NEW_LINE> <INDENT> wsgi_app.add_url_rule( rule=self.path, view_func=self.contr...
A route object defines an endpoint of the application. :param path: a string used to register path of url which invokes given controller :param methods: an array of string defining allowed HTTP methods for the endpoint :param controller: the method which will be invoked
62598ef73d592f4c4edb97b4
class TestSourcePackage(BugTargetBugFilingDuplicateSearchInherited, TestCaseWithFactory): <NEW_LINE> <INDENT> layer = DatabaseFunctionalLayer <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> super(TestSourcePackage, self).setUp() <NEW_LINE> self.bug_supervisor = self.factory.makePerson() <NEW_LINE> distribution = self.f...
Tests for product serieses as bug targets.
62598ef7adb09d7d5dc08e84
class Router: <NEW_LINE> <INDENT> def __init__(self, version="", prefix=""): <NEW_LINE> <INDENT> self.version = version.strip("/\\") <NEW_LINE> self.prefix = prefix.strip("/\\") <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def get_pe8(content: str): <NEW_LINE> <INDENT> if content.endswith("Handler"): <NEW_LINE> <INDENT...
如果不需要分组可以直接在Handler上面增加装饰器,如:: @register.route(version="v3") class RecpHandler(BaseHandler): ... 访问地址:http://127.0.0.1:8095/v3/recp 分组路由,如:: 实例化router对象 router=register.Router(prefix="/prefix",version="v3") @router.route() class RecpHandler(BaseHandler): ... @router...
62598ef77047854f4633dc8e
class Knight(Piece): <NEW_LINE> <INDENT> name = 'Knight' <NEW_LINE> value = 3 <NEW_LINE> symbol = 'N' <NEW_LINE> max_moves = 1 <NEW_LINE> number = 2 <NEW_LINE> def possibleMoves(self, start): <NEW_LINE> <INDENT> row, col = position(start) <NEW_LINE> directions = [] <NEW_LINE> if row < 6: <NEW_LINE> <INDENT> if col > 0:...
The Knight. >>> piece = Knight() >>> start = 'B1' >>> piece.possibleMoves(start) [['A3'], ['C3'], ['D2']] >>> wanted = ('A3', 'C3', 'D2') >>> _wantedMovesPossible(piece, start, wanted) True >>> unwanted = ('B2', 'D3', 'D1') >>> _unwantedMovesNotPossible(piece, start, unwanted) True >>> start = 'E3' >>> wanted = ('D...
62598ef74428ac0f6e656e13
class ResNetV2(ResNet): <NEW_LINE> <INDENT> def __init__(self, block, layers, channels, classes=1000, thumbnail=False, **kwargs): <NEW_LINE> <INDENT> super(ResNetV2, self).__init__(channels, classes, **kwargs) <NEW_LINE> assert len(layers) == len(channels) - 1 <NEW_LINE> self.features.add(nn.BatchNorm(scale=False, epsi...
ResNet V2 model from `"Identity Mappings in Deep Residual Networks" <https://arxiv.org/abs/1603.05027>`_ paper. Parameters ---------- block : HybridBlock Class for the residual block. Options are BasicBlockV1, BottleneckV1. layers : list of int Numbers of layers in each block channels : list of int Numbers...
62598ef723849d37ff84f984
class PassportNormaliser(AlnumNormaliser): <NEW_LINE> <INDENT> def _inp(s, text_to_normalise): <NEW_LINE> <INDENT> text_to_normalise = super()._inp(text_to_normalise) <NEW_LINE> return text_to_normalise.upper() <NEW_LINE> <DEDENT> def _outp(s, text): <NEW_LINE> <INDENT> if len(text) != 8: return text <NEW_LINE> return ...
normalise a Brazilian passport number
62598ef799fddb7c1ca62266
class LoggingDelegator(object): <NEW_LINE> <INDENT> def __init__(self, fetcher): <NEW_LINE> <INDENT> self.fetcher = fetcher <NEW_LINE> self.requests = [] <NEW_LINE> <DEDENT> @property <NEW_LINE> def last_request(self): <NEW_LINE> <INDENT> return self.requests[-1] if self.requests else None <NEW_LINE> <DEDENT> def fetch...
Wraps a fetcher and logs all requests.
62598ef74527f215b58e87c8
class InternalDetection: <NEW_LINE> <INDENT> def __init__(self, node, deep_search): <NEW_LINE> <INDENT> self.node = node <NEW_LINE> self.deep_search = deep_search <NEW_LINE> self.firewall = node.object <NEW_LINE> self.result = [] <NEW_LINE> <DEDENT> def __getstate__(self): <NEW_LINE> <INDENT> state = self.__dict__.copy...
InternalDetection class. Implement the internal detection algorithm. Parameters ---------- node : Node. The node to test deep_search : bool. Enable deep search. firewall : Firewall. The firewall to test result : list. A list of string of detected error
62598ef7656771135c487f51
class ActualizarLugarRecoleccionView(LoginRequiredMixin, GroupRequiredMixin, UserFormKwargsMixin, UpdateView): <NEW_LINE> <INDENT> model = LugarRecoleccion <NEW_LINE> form_class = ActualizarLugarRecoleccionForm <NEW_LINE> template_name = 'administracion/formulario_lugar_recoleccion.html' <NEW_LINE> success_url = revers...
Muestra el formulario para actualizar una LugarRecoleccion especifica.
62598ef732920d7e50bc48f5