code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class IExportView(Interface): <NEW_LINE> <INDENT> pass
IExportView interface
62598f92cb5e8a47e493bfaa
class DebugChainError(Exception): <NEW_LINE> <INDENT> pass
This exception is raised if the user attempts to load an illegal value into a debug chain register (e.g. loading 2 into a single bit register) or if there is a mismatch between the debug chain in hardware and software.
62598f92b830903b9686e2ac
class InotifyMonitor(_ProcessEvent): <NEW_LINE> <INDENT> def __init__(self, modules, on_change=None, **kwargs): <NEW_LINE> <INDENT> assert pyinotify <NEW_LINE> self._modules = modules <NEW_LINE> self._on_change = on_change <NEW_LINE> self._wm = None <NEW_LINE> self._notifier = None <NEW_LINE> <DEDENT> def register_with...
File change monitor based on Linux kernel `inotify` subsystem
62598f922ae34c7f260aad5a
@patch.dict('os.environ', {'GENIE_BYPASS_HOME_CONFIG': '1'}) <NEW_LINE> class TestingGenieJob(unittest.TestCase): <NEW_LINE> <INDENT> def test_default_command_tag(self): <NEW_LINE> <INDENT> job = pygenie.jobs.GenieJob() <NEW_LINE> assert_equals( job.get('default_command_tags'), [u'type:genie'] ) <NEW_LINE> <DEDENT> def...
Test GenieJob.
62598f92b7558d589546329d
class TestOrgsorgidprojectsprojectidbuildtargetsSettingsAdvancedUnityPlayerSettingsAndroid(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def testOrgsorgidprojectsprojectidbuildtargetsSettingsAdvanced...
OrgsorgidprojectsprojectidbuildtargetsSettingsAdvancedUnityPlayerSettingsAndroid unit test stubs
62598f9263d6d428bbee242d
class SaveModelCallbackFp32(TrackerCallback): <NEW_LINE> <INDENT> def __init__( self, learn: Learner, monitor: str = "valid_loss", mode: str = "auto", every: str = "improvement", name: str = "bestmodel", ): <NEW_LINE> <INDENT> super().__init__(learn, monitor=monitor, mode=mode) <NEW_LINE> self.every, self.name = every,...
A `TrackerCallback` that saves the model when monitored quantity is best.
62598f92851cf427c66b7f36
class UserBlockedEvent(sgqlc.types.Type, Node): <NEW_LINE> <INDENT> __schema__ = github_schema <NEW_LINE> __field_names__ = ('actor', 'block_duration', 'created_at', 'subject') <NEW_LINE> actor = sgqlc.types.Field(Actor, graphql_name='actor') <NEW_LINE> block_duration = sgqlc.types.Field(sgqlc.types.non_null(UserBlockD...
Represents a 'user_blocked' event on a given user.
62598f92a8ecb03325870e78
class Config: <NEW_LINE> <INDENT> SECRET_KEY = "tj193345" <NEW_LINE> SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://jamesmwangi:tj193345@localhost/pitch' <NEW_LINE> UPLOADED_PHOTOS_DEST ='app/static/photos' <NEW_LINE> MAIL_SERVER = 'smtp.googlemail.com' <NEW_LINE> MAIL_PORT = 587 <NEW_LINE> MAIL_USE_TLS = True <NEW_L...
General configuration parent class
62598f923539df3088ecbf30
class JsonBFilterBackend(BaseFilterBackend): <NEW_LINE> <INDENT> def filter_queryset(self, request, queryset, view): <NEW_LINE> <INDENT> lookup_name = 'jsonb' <NEW_LINE> filter_field = getattr(view, 'jsonb_filter_field', None) <NEW_LINE> if not filter_field: <NEW_LINE> <INDENT> raise ImproperlyConfigured('JsonBFilterBa...
Generic configurable filter for JsonBField Requires the following properties, configured on the view using this filter backend: jsonb_filter_field: The name of the django model field to filter against NOTE: Currently, there can be at most one jsonb field to filter over. parametrizing the fieldnames will allow indefin...
62598f92baa26c4b54d4ef26
class CommentUpdateModelMixin(mixins.UpdateModelMixin): <NEW_LINE> <INDENT> def update(self, request, *args, **kwargs): <NEW_LINE> <INDENT> partial = kwargs.pop('partial', False) <NEW_LINE> self.object = self.get_object_or_none() <NEW_LINE> serializer = self.get_serializer(self.object, data=request.DATA, files=request....
This is modified mixin that allows us to perform PATCH request but returns detailed serializer. Should be very easy to use it anywhere else, for now, comment serializer is hardcoded.
62598f92e76e3b2f99fd86a8
class EntityCreateMixin(object): <NEW_LINE> <INDENT> def create_missing(self): <NEW_LINE> <INDENT> for field_name, field in self.get_fields().items(): <NEW_LINE> <INDENT> if field.required and not hasattr(self, field_name): <NEW_LINE> <INDENT> if hasattr(field, 'default'): <NEW_LINE> <INDENT> value = field.default <NEW...
This mixin provides the ability to create an entity. The methods provided by this class work together. The call tree looks like this:: create └── create_json └── create_raw ├── create_missing └── create_payload In short, here is what the methods do: :meth:`create_missing` ...
62598f92a219f33f346c648c
class Person(object): <NEW_LINE> <INDENT> def __init__(self, name, age): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.age = age <NEW_LINE> <DEDENT> def print(self): <NEW_LINE> <INDENT> print("self.name = %s" % self.name) <NEW_LINE> print("self.age = %d" % self.age)
docstring for Person
62598f92a05bb46b3848a4f0
class MogoFactory(base.Factory): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def _build(cls, model_class, *args, **kwargs): <NEW_LINE> <INDENT> return model_class(*args, **kwargs) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def _create(cls, model_class...
Factory for mogo objects.
62598f927d847024c075c043
class FakeScorer(FakeIterator, QueryScorer): <NEW_LINE> <INDENT> _score = 10 <NEW_LINE> def score(self): <NEW_LINE> <INDENT> return self._score
This is a fake query scorer for testing purposes. You create the object with the posting IDs as arguments, and then returns them as you call next() or skip_to(). >>> fpr = FakeScorer(1, 5, 10, 80) >>> fpr.id 1 >>> fpr.next() >>> fpr.id 5
62598f9223e79379d538c176
class EvalConfigObj(ConfigObj, EvalConf): <NEW_LINE> <INDENT> def __init__(self, infile=None, user_values=None, **kwargs): <NEW_LINE> <INDENT> infile = os.path.join(here, 'modules_params.ini') if infile is None else infile <NEW_LINE> usr = ConfigObj(infile=user_values) <NEW_LINE> defaults = ConfigObj(infile) <NEW_LINE>...
Inherits :py:class:`configobj.ConfigObj` and adds arbitrary code execution to config file
62598f92d486a94d0ba2bc44
class FeedReader: <NEW_LINE> <INDENT> def __init__(self, news_feed_parser=RssNewsFeedParser): <NEW_LINE> <INDENT> self._news_feed_parser = news_feed_parser() <NEW_LINE> <DEDENT> def get_news(self, news_type, max_items=0): <NEW_LINE> <INDENT> return self._news_feed_parser.get_news(news_type, max_items)
Base class for all FeedReader types
62598f929b70327d1c57ea13
class HTTPFailException(Exception): <NEW_LINE> <INDENT> def __init__(self, message=None): <NEW_LINE> <INDENT> Exception.__init__(self, message)
The exception class that is raised when HTTP error occurs.
62598f920383005118f6d36d
class Point(object): <NEW_LINE> <INDENT> def __init__(self, x, y, color=None): <NEW_LINE> <INDENT> self.x = x <NEW_LINE> self.y = y <NEW_LINE> self.color = color <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "Point({}, {})".format(self.x, self.y) <NEW_LINE> <DEDENT> def dist(self, p): <NEW_LINE> <IN...
Classe que define pontos (pixels) a partir de coordenadas x, y e sua cor
62598f926fb2d068a7693c6b
class ContactOrganizationSerializer(ContactAssociationSerializer): <NEW_LINE> <INDENT> class Meta(ContactAssociationSerializer.Meta): <NEW_LINE> <INDENT> model = models.ContactOrganization <NEW_LINE> fields = ContactAssociationSerializer.Meta.fields + ( "organization", "unit")
ContactOrganization model serializer class.
62598f927047854f4633f051
class DateRangeMixin: <NEW_LINE> <INDENT> start = None <NEW_LINE> start_format = "%Y-%m-%d" <NEW_LINE> end = None <NEW_LINE> end_format = "%Y-%m-%d" <NEW_LINE> def get_start(self): <NEW_LINE> <INDENT> start = self.start <NEW_LINE> if start is None: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> start = self.kwargs['start...
A mixin class for a view quering objects inside a date range :Attributes: * ``start`` The start date, defaults to the current date * ``start_format`` The format of the start date. Defaults to %Y-%m-%d * ``end`` (Optional). The end date * ``end_format`` The format of the end date. Defaults to %Y-%m-%d
62598f9223849d37ff850d37
class Bicycle(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.color = "red" <NEW_LINE> self.gears = 12 <NEW_LINE> self.tires = "street" <NEW_LINE> <DEDENT> def set_bike_info(self, x, y, z): <NEW_LINE> <INDENT> self.color = x <NEW_LINE> self.gears = y <NEW_LINE> self.tires = z <NEW_LINE> <DEDEN...
Create an object called bicycle that contains color, gears, and tire properties
62598f9255399d3f05626190
class ShipperTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_ship(self): <NEW_LINE> <INDENT> base_dir = os.path.join(os.getcwd(), 'tests/emails') <NEW_LINE> src_dir = os.path.join(base_dir, 'src') <NEW_LINE> dest_dir = src_dir.replace(os.path.basename(src_dir), 'build') <NEW_LINE> BuilderMock = flexmock(artisan.s...
Test individual methods in Shipper class.
62598f9226068e7796d4c5d4
class DiscreteTabularPolicy: <NEW_LINE> <INDENT> def __init__(self, observation_space: Space, action_space: Space, default_value=0): <NEW_LINE> <INDENT> self.observation_space = observation_space <NEW_LINE> self.action_space = action_space <NEW_LINE> self.default_value = default_value <NEW_LINE> self.q_table = np.full(...
Implements a tabular Q-function for a discrete observation and action space
62598f9285dfad0860cbf8ac
class UnPairedDataset(AbstractDataset): <NEW_LINE> <INDENT> def __init__(self, img_path_a, img_path_b, pool_size, pool_prob, img_size, n_channels, img_extensions=[".png", ".jpg"], load_fn=default_load_fn_2d): <NEW_LINE> <INDENT> super().__init__((img_path_a, img_path_b), load_fn, img_extensions, None) <NEW_LINE> self.i...
Dataset to whold 2 unpaired datasets and returning samples from both of them. Contains an Image pool for each dataset. See Also -------- :class:`UnPairedRandomSampler` :class:`ImagePool`
62598f9207f4c71912baf0bd
class ConvLayer: <NEW_LINE> <INDENT> def __init__(self, input_shape, n_size, n_filter, stride=1, activation='relu', batch_normal=False, weight_decay=None, name='conv'): <NEW_LINE> <INDENT> self.input_shape = input_shape <NEW_LINE> self.n_filter = n_filter <NEW_LINE> self.activation = activation <NEW_LINE> self.stride =...
单个卷积层 包含 init 函数和 getoutput 函数 init 函数的作用是初始化整个神经网络 getoutput 函数
62598f92a219f33f346c648e
class BinsonArrayInterface(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.value = None <NEW_LINE> <DEDENT> def _set_list(self, value): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> <DEDENT> def append(self, value): <NEW_LINE> <INDENT> from pybinson import binson_values <NEW_LINE> if not i...
Dummy
62598f920c0af96317c55ff8
class BugzillaAttachment(PatchPattern): <NEW_LINE> <INDENT> URL_PATTERN = r'^((?:https?://)?.+/attachment\.cgi\?(?:.+&)?id=\d+(?:&.+)?)$' <NEW_LINE> URL_REPLACE_STR = r'(?:(attachment\.cgi\?)|action=(diff|edit)?)' <NEW_LINE> URL_REPLACE_WITH = '\\1action=diff&format=raw&'
Patches from links to diffs in bugzilla attachments can be fetched by setting the GET parameters 'action=diff' and 'format=raw'
62598f92a17c0f6771d5beaf
class Solution3: <NEW_LINE> <INDENT> def longestPalindrome(self, s: str) -> str: <NEW_LINE> <INDENT> sLen = len(s) <NEW_LINE> dp = [[False] * sLen for _ in range(sLen)] <NEW_LINE> maxLen = 1 <NEW_LINE> begin = 0 <NEW_LINE> for j in range(1, sLen): <NEW_LINE> <INDENT> for i in range(j): <NEW_LINE> <INDENT> if j - i < 3:...
动态规划 -> 空间换时间 状态转移方程: P(i, j) = s[i] == s[j] or (j - i < 3 or P(i+1, j-1)) 其中 j - i < 3 表示s[i:j+1]的长度为2、3时,只需要比较s[i]是否等于s[j]即可,而i==j的情况,就肯定为True了 P(i, j) 表示字符串 s[i:j+1] 是否是回文字符串,值为 False / True 表示判断的子串的长度如果不大于3的话,就没有校验这个子串的必要了 在状态转移方程中,我们是从长度较短的字符串向长度较长的字符串进行转移
62598f9245492302aabfc14b
class SmallCircleDataView(DataTreeView): <NEW_LINE> <INDENT> def __init__(self, store, redraw_plot, add_feature, settings): <NEW_LINE> <INDENT> DataTreeView.__init__(self, store, redraw_plot, add_feature, settings) <NEW_LINE> renderer_dir = Gtk.CellRendererText() <NEW_LINE> renderer_dir.set_property("editable", True) <...
This class is used for small circle datasets. It inherits from DataTreeView. It creates 3 columns for dip direction, dip and opening angle.
62598f926e29344779b002cc
class ReplacementType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): <NEW_LINE> <INDENT> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'ReplacementType') <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('MapsPlatformDescriptor.xsd', 476, 2) <NEW_LINE> _Documentation = None
An atomic simple type.
62598f927cff6e4e811b568e
class LogTool(app_framework.ToolBase): <NEW_LINE> <INDENT> def __init__(self, name, parentwidget): <NEW_LINE> <INDENT> super(LogTool, self).__init__(name, parentwidget) <NEW_LINE> self.setAllowedAreas(QtCore.Qt.RightDockWidgetArea | QtCore.Qt.BottomDockWidgetArea) <NEW_LINE> self.setBaseSize(600,600) <NEW_LINE> self._p...
Log window tool.
62598f9229b78933be269f16
class Meta: <NEW_LINE> <INDENT> model = SourceOptions <NEW_LINE> fields = ['ssl_protocol', 'ssl_cert_verify', 'disable_ssl', 'use_paramiko']
Metadata for serializer.
62598f92435de62698e9ba66
class SQFParserError(SQFError): <NEW_LINE> <INDENT> def __init__(self, position, message): <NEW_LINE> <INDENT> super().__init__(position, "error:%s" % message)
Raised by the parser and analyzer
62598f9232920d7e50bc5cd3
class MLPWithRescaling(ParameterizedFunc): <NEW_LINE> <INDENT> def __init__(self, sizes, nonlinearities, names=None, init_col_norms=None): <NEW_LINE> <INDENT> assert len(nonlinearities) == len(sizes)-1 <NEW_LINE> if names is None: names = [str(i) for i in xrange(len(sizes))] <NEW_LINE> else: assert len(names) == len(si...
A sequence of DenseLayer
62598f9260cbc95b06363fba
class ThreeDayWeatherForecast(db.Model): <NEW_LINE> <INDENT> date_time_added = db.DateTimeProperty(auto_now_add=True) <NEW_LINE> noaa_observation_time = db.DateTimeProperty() <NEW_LINE> noaa_observation_location = db.StringProperty() <NEW_LINE> current_temp_c = db.FloatProperty() <NEW_LINE> current_temp_f = db.FloatPro...
AppEngine data model to store 3 day weather forecast module. All data in table from NOAA
62598f923c8af77a43b67d74
class Comment(models.Model): <NEW_LINE> <INDENT> post = models.ForeignKey('blog.Post', on_delete=models.CASCADE, related_name='comments') <NEW_LINE> author = models.CharField(max_length=200) <NEW_LINE> text = models.TextField() <NEW_LINE> created_date = models.DateField(default=timezone.now) <NEW_LINE> approved = model...
Represents the Post's Comment model
62598f92851cf427c66b7f39
class Priority(_TestrailObject, _Comparable): <NEW_LINE> <INDENT> cache = None <NEW_LINE> def _settle_attributes(self, attributes): <NEW_LINE> <INDENT> self.id = attributes['id'] <NEW_LINE> self.name = attributes['name'] <NEW_LINE> self.short_name = attributes['short_name'] <NEW_LINE> self.is_default = attributes['is_d...
Priority of Test or Case: Blocker, Critical, Normal and others. Attributes: id -- The ID of the priority name -- The full name of the priority short_name -- The short name of the priority (is used in tables) is_default -- True if this priority is set by default in new test cases pr...
62598f92a4f1c619b294e260
@python_2_unicode_compatible <NEW_LINE> class LobbyistEmpLobbyist1Cd(CalAccessBaseModel): <NEW_LINE> <INDENT> UNIQUE_KEY = False <NEW_LINE> DOCUMENTCLOUD_PAGES = [ DocumentCloud(id='2711614-CalAccessTablesWeb', start_page=97, end_page=98), ] <NEW_LINE> lobbyist_id = fields.IntegerField( db_column='LOBBYIST_ID', verbose...
This is an undocumented model.
62598f926aa9bd52df0d4b42
class CrossEntropyLoss2D(nn.Module): <NEW_LINE> <INDENT> def __init__(self, weight=None, size_average=True, ignore_label=-100): <NEW_LINE> <INDENT> super(CrossEntropyLoss2D, self).__init__() <NEW_LINE> self.nll_loss = torch.nn.NLLLoss(weight, size_average, ignore_index=ignore_label) <NEW_LINE> <DEDENT> def forward(self...
https://github.com/ycszen/pytorch-seg/blob/master/loss.py https://discuss.pytorch.org/t/about-segmentation-loss-function/2906/8 Example: >>> from clab.criterions import * >>> #inputs, targets = testdata_sseg() >>> weight = Variable(torch.FloatTensor([1, 1, 0])) >>> size_average = True >>> inputs = ...
62598f9285dfad0860cbf8ad
class TransmitOralProcessWithInitRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.SeqId = None <NEW_LINE> self.IsEnd = None <NEW_LINE> self.VoiceFileType = None <NEW_LINE> self.VoiceEncodeType = None <NEW_LINE> self.UserVoiceData = None <NEW_LINE> self.SessionId = None <NEW_LINE>...
TransmitOralProcessWithInit请求参数结构体
62598f92dd821e528d6d8ba9
class Relations(object): <NEW_LINE> <INDENT> def __init__(self, relations): <NEW_LINE> <INDENT> self.relations = relations <NEW_LINE> self.processed = set([]) <NEW_LINE> self.to_be_processed = set(relations.keys()) <NEW_LINE> <DEDENT> def check_if_finished(self): <NEW_LINE> <INDENT> return not self.to_be_processed <NEW...
A class that outputs layers of a graph
62598f9224f1403a926856eb
class BingSearch(BaseSearch): <NEW_LINE> <INDENT> SEARCH_URL = 'https://www.bing.com' <NEW_LINE> RESULT_SELECTOR = 'li.b_algo h2 a' <NEW_LINE> TOTAL_SELECTOR = 'span.sb_count' <NEW_LINE> NEXT_PAGE_SELECTOR = 'li.b_pag ul li a.sb_pagN' <NEW_LINE> def __init__(self, ignored_sites=None, ignored_extensions=None): <NEW_LINE...
Summary Attributes: RESULT_SELECTOR (str): Description SEARCH_URL (str): Description TOTAL_SELECTOR (str): Description
62598f92adb09d7d5dc0a1fc
class IMFPP_Library_Resource(Interface): <NEW_LINE> <INDENT> pass
Description of the Example Type
62598f92656771135c4892f5
class Major(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=20, unique=True) <NEW_LINE> facultyId = models.ForeignKey('Faculty') <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.name
专业
62598f92cc0a2c111447ac88
class ReferenceEvent(WorkflowCompareMixin): <NEW_LINE> <INDENT> def __init__(self, name, ordinal): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.ordinal = ordinal
Stub object that can be used to compare an event against a known state.
62598f928e71fb1e983bb729
class AIMHeader(ft.StrParamDict): <NEW_LINE> <INDENT> field_name = "A-IM" <NEW_LINE> normalize = staticmethod(string.lower)
The A-IM request-header field is similar to Accept, but restricts the instance-manipulations (section 10.1) that are acceptable in the response. A-IM = "A-IM" ":" #( instance-manipulation [ ";" "q" "=" qvalue ] )
62598f920fa83653e46f4b5e
class HACQSpectrum: <NEW_LINE> <INDENT> def __init__(self, spectrumData, spectrumHeader): <NEW_LINE> <INDENT> self.data = array('H', spectrumData) <NEW_LINE> self.startWavelength = spectrumHeader.startWavelength <NEW_LINE> self.wavelengthIncrement = spectrumHeader.wavelengthIncrement <NEW_LINE> self.numPoints = spectru...
Class that encapsulates spectrum data returned from hyperion. instance variables: data -- An array containing the spectrum data. If a calFunction is specified in the initializer, then this will be a numpy array. startWavelength -- Wavelength corresponding to the first point in the spectrum....
62598f928e71fb1e983bb72a
class HTTPGetUsersInfo(web.View): <NEW_LINE> <INDENT> @authentication <NEW_LINE> async def get(self, token: str) -> web.Response: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> ids = parse.urlparse(self.request.query['ids']) <NEW_LINE> <DEDENT> except KeyError: <NEW_LINE> <INDENT> self.request.app['logger'].error("URL pa...
A Class used to represent Web View of GetLikes method via HTTP.
62598f926e29344779b002ce
class WsgiMock(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.headers = CaseInsensitiveDict() <NEW_LINE> self.status = "550 start_response() was not called" <NEW_LINE> self.logger = logging.getLogger(__name__) <NEW_LINE> self.logger.info('Created WSGI Mock - ID = {0}'.format(id(self))) <NEW_L...
StackInAWSGI WSGI Mock for the WSGI start_response() callable The WsgiMock object is used is place of the start_response callable when running a raw WSGI application for testing.
62598f92379a373c97d98c92
class StackWest(Stack): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> Stack.__init__(self, parent)
Subclass of Stack oriented westwards.
62598f92d58c6744b42dc109
class UpdateUsers(MetaInput): <NEW_LINE> <INDENT> def process(self): <NEW_LINE> <INDENT> file_lines = [] <NEW_LINE> for item in self.items: <NEW_LINE> <INDENT> for user in item.sub_elements: <NEW_LINE> <INDENT> file_line = "%s:%s:%s:%s:%s,%s,%s,%s,%s:%s:%s\n" % ( user.attributes.get("username", ""), user.attributes.get...
Class for processing recieved user data.
62598f9221a7993f00c65bf3
class Error(frictionless.errors.Error): <NEW_LINE> <INDENT> defaults: dict = {} <NEW_LINE> def __init__(self: "Error", note: str = "", **kwargs: Any) -> None: <NEW_LINE> <INDENT> self["code"]: str = self.code <NEW_LINE> self["name"]: str = self.name <NEW_LINE> self["tags"]: List[str] = self.tags <NEW_LINE> self["note"]...
Generic error.
62598f92462c4b4f79dbb67d
class LoadIctalDataTask(Task): <NEW_LINE> <INDENT> def filename(self): <NEW_LINE> <INDENT> return 'data_ictal_%s_%s' % (self.task_core.target, self.task_core.pipeline.get_name()) <NEW_LINE> <DEDENT> def load_data(self): <NEW_LINE> <INDENT> return parse_input_data(self.task_core.data_dir, self.task_core.target, 'ictal',...
Load the ictal mat files 1 by 1, transform each 1-second segment through the pipeline and return data in the format {'X': X, 'Y': y, 'latencies': latencies}
62598f92004d5f362081ee37
class OnBehalfOf(OnBehalfOfType_): <NEW_LINE> <INDENT> c_tag = 'OnBehalfOf' <NEW_LINE> c_namespace = NAMESPACE <NEW_LINE> c_children = OnBehalfOfType_.c_children.copy() <NEW_LINE> c_attributes = OnBehalfOfType_.c_attributes.copy() <NEW_LINE> c_child_order = OnBehalfOfType_.c_child_order[:] <NEW_LINE> c_cardinality = On...
The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:OnBehalfOf element
62598f9201c39578d7f129fe
class Label(ttk.Label): <NEW_LINE> <INDENT> def __init__(self, text=None, parent=None): <NEW_LINE> <INDENT> super().__init__(parent, text=text) <NEW_LINE> autoPack(self) <NEW_LINE> <DEDENT> def text(self): <NEW_LINE> <INDENT> return self["text"] <NEW_LINE> <DEDENT> def setText(self, text): <NEW_LINE> <INDENT> self["tex...
标签
62598f9285dfad0860cbf8ae
class _KeywordEvent(object): <NEW_LINE> <INDENT> name = "" <NEW_LINE> replace_method = False <NEW_LINE> func = None <NEW_LINE> def __new__(cls, keyword, instance, event): <NEW_LINE> <INDENT> if isinstance(getattr(keyword, event.name, None), cls): <NEW_LINE> <INDENT> return getattr(keyword, event.name) <NEW_LINE> <DEDEN...
Instrumentation to apply an event to a keyword.
62598f92e76e3b2f99fd86ae
class EditorialStatus(Persistent): <NEW_LINE> <INDENT> zope.interface.implements(interfaces.IEditorialStatus, IContained) <NEW_LINE> __name__ = __parent__ = None <NEW_LINE> status = FieldProperty(interfaces.IEditorialStatus['status']) <NEW_LINE> comment = FieldProperty(interfaces.IEditorialStatus['comment']) <NEW_LINE>...
An editorial status object, that lives in a history container.
62598f9223e79379d538c17c
class FMRegressionModel(_JavaRegressionModel, _FactorizationMachinesParams, JavaMLWritable, JavaMLReadable): <NEW_LINE> <INDENT> @property <NEW_LINE> @since("3.0.0") <NEW_LINE> def intercept(self): <NEW_LINE> <INDENT> return self._call_java("intercept") <NEW_LINE> <DEDENT> @property <NEW_LINE> @since("3.0.0") <NEW_LINE...
Model fitted by :class:`FMRegressor`. .. versionadded:: 3.0.0
62598f923cc13d1c6d4653e3
@ns.route(get_deal_uri) <NEW_LINE> class GetDeal(Resource): <NEW_LINE> <INDENT> @api.expect(get_deals) <NEW_LINE> def post(self): <NEW_LINE> <INDENT> json_obj = request.get_json() <NEW_LINE> item_id = json_obj.get('itemId') <NEW_LINE> if checking_deal(item_id): <NEW_LINE> <INDENT> return getting_deal(item_id), HTTP_STA...
Getting Deals
62598f92d7e4931a7ef3bd19
class BMIIndex(Metrics): <NEW_LINE> <INDENT> id = "bmitickets" <NEW_LINE> name = "Backlog Management Index" <NEW_LINE> desc = "Number of tickets closed out of the opened ones in a given period" <NEW_LINE> data_source = ITS <NEW_LINE> def get_agg(self): <NEW_LINE> <INDENT> data = {} <NEW_LINE> closed_tickets = Closed(se...
The Backlog Management Index measures efficiency dealing with tickets This is based on the book "Metrics and Models in Software Quality Engineering. Chapter 4.3.1. By Stephen H. Kan. BMI is calculated as the number of closed tickets out of the opened tickets in a given period. This metric aims at having an overview o...
62598f924e4d562566372098
class Bom(dict): <NEW_LINE> <INDENT> def stockcheck(self): <NEW_LINE> <INDENT> for pg in self.values(): <NEW_LINE> <INDENT> a = pg.stockcheck() <NEW_LINE> if a is None: <NEW_LINE> <INDENT> yield (STOCK_UNKNOWN, pg.part) <NEW_LINE> <DEDENT> elif not a: <NEW_LINE> <INDENT> yield (STOCK_OUT, pg.part) <NEW_LINE> <DEDENT> e...
A bill of materials.
62598f92a17c0f6771d5beb2
class Recording: <NEW_LINE> <INDENT> def __init__(self, hoplength = 2048): <NEW_LINE> <INDENT> self.CHUNK = hoplength <NEW_LINE> FORMAT = pyaudio.paFloat32 <NEW_LINE> CHANNELS = 1 <NEW_LINE> RATE = 44100 <NEW_LINE> self.p = pyaudio.PyAudio() <NEW_LINE> self.stream = self.p.open(format=FORMAT, channels=CHANNELS, rate=RA...
Class used to record music from the microphone
62598f9245492302aabfc14f
class DataParseError(Exception): <NEW_LINE> <INDENT> def __init__(self, msg): <NEW_LINE> <INDENT> self.msg = msg <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return repr(self.msg)
Raised when errors concerning parsing html data encountered.
62598f92435de62698e9ba69
class TypeAnnotation(FakeAnnotation): <NEW_LINE> <INDENT> SUPPORTED_TYPES: set[str] = { "Union", "Any", "Dict", "Mapping", "List", "Sequence", "Set", "Optional", "Callable", "Iterator", "IO", "overload", "Type", "AsyncIterator", "NotRequired", } <NEW_LINE> FALLBACK: dict[str, tuple[int, ...] | None] = { "AsyncIterator"...
Wrapper for `typing` type annotation. Arguments: wrapped_type -- Original type annotation as a string.
62598f92ac7a0e7691f72184
class WebsocketHandler(conn.SockJSConnection): <NEW_LINE> <INDENT> def open(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def on_open(self, info): <NEW_LINE> <INDENT> self.ip = info.ip <NEW_LINE> self.request = info <NEW_LINE> self.open() <NEW_LINE> <DEDENT> def write_message(self, msg): <NEW_LINE> <INDENT> self....
If you already use Tornado websockets for your application and want try sockjs-tornado, change your handlers to derive from this WebsocketHandler class. There are some limitations, for example only self.request only contains remote_ip, cookies and arguments collection
62598f92be8e80087fbbecd4
class QueryLoop(): <NEW_LINE> <INDENT> def __init__(self, indicator, currency, timeout=300): <NEW_LINE> <INDENT> self.indicator = indicator <NEW_LINE> self.currency = currency <NEW_LINE> self.timeout = timeout <NEW_LINE> self.last_known = {"last": "0.00"} <NEW_LINE> <DEDENT> def loop(self): <NEW_LINE> <INDENT> result =...
QueryLoop accepts the indicator to which the result will be written and an cryptocurrency to obtain the results from. To define an cryptocurrency you only need to implement the query method and return the results in a pre-determined format so that it will be consistent.
62598f9260cbc95b06363fbe
class AnalysisDefinitionPaged(Paged): <NEW_LINE> <INDENT> _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, 'current_page': {'key': 'value', 'type': '[AnalysisDefinition]'} } <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(AnalysisDefinitionPaged, self).__init__(*args, **kwar...
A paging container for iterating over a list of :class:`AnalysisDefinition <azure.mgmt.web.models.AnalysisDefinition>` object
62598f9216aa5153ce400179
class SceneFile(object): <NEW_LINE> <INDENT> def __init__(self, dir='', descriptor='main', version=1, ext="ma"): <NEW_LINE> <INDENT> FilePath = cmds.file(q=True, sn=True) <NEW_LINE> if(FilePath == ""): <NEW_LINE> <INDENT> self._dir = Path(dir) <NEW_LINE> self.descriptor = descriptor <NEW_LINE> self.version = version <N...
Class used to represent a DCC software scene file can be used to manipulate scene files without needing direct influence on the scene Attributes: dir(str, optional): Directory to the scene file, defaults to '' descriptor(str, optional): Short descriptor of the scene file, defaults to main version (int, optional): Ver...
62598f9207d97122c4216927
class SiteScraper(object): <NEW_LINE> <INDENT> def __init__(self, language="en"): <NEW_LINE> <INDENT> self.language = language <NEW_LINE> self.articleScraper = ArticleScraper(self.language) <NEW_LINE> self.articleURLs = {} <NEW_LINE> self.articles = {} <NEW_LINE> <DEDENT> def searchSite(self, siteURL): <NEW_LINE> <INDE...
SiteScraper downloads all the the documents from a
62598f92b5575c28eb712b09
class DriverTestCase(BaseTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super().setUp() <NEW_LINE> self.rideOffer={ "created_by":"paul", "destination":"Westlands", "from_location":"Pumu", "departure_time":"10:30", "price":"300" } <NEW_LINE> <DEDENT> def test_driver_can_create_ride_offer(self): <NEW...
This class represents Driver requests test case
62598f92d6c5a102081e1dba
class ContextHook(hooks.PecanHook): <NEW_LINE> <INDENT> def __init__(self, public_api_routes): <NEW_LINE> <INDENT> self.public_api_routes = public_api_routes <NEW_LINE> super(ContextHook, self).__init__() <NEW_LINE> <DEDENT> def before(self, state): <NEW_LINE> <INDENT> headers = state.request.headers <NEW_LINE> auth_to...
Configures a request context and attaches it to the request. The following HTTP request headers are used: X-User-Id or X-User: Used for context.user_id. X-Tenant-Id or X-Tenant: Used for context.tenant. X-Auth-Token: Used for context.auth_token. X-Roles: Used for setting context.is_admin flag to ei...
62598f926fb2d068a7693c6e
class AtomicSwapInterface: <NEW_LINE> <INDENT> def get_public_key(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def get(self, swap_id): <NEW_LINE> <INDENT> pass
Implements atomic swap interface.
62598f920a50d4780f70504d
class Structure(Entity): <NEW_LINE> <INDENT> def __init__(self, id): <NEW_LINE> <INDENT> self.level = "S" <NEW_LINE> Entity.__init__(self, id) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "<Structure id=%s>" % self.get_id() <NEW_LINE> <DEDENT> def get_models(self): <NEW_LINE> <INDENT> for m in sel...
The Structure class contains a collection of Model instances.
62598f928e7ae83300ee8d1e
class AssumeVisitor(ExpressionVisitor): <NEW_LINE> <INDENT> def visit_UnaryBooleanOperation(self, expr: UnaryBooleanOperation, state): <NEW_LINE> <INDENT> raise ValueError("The expression should not contain any unary boolean operations like negation (Neg)!") <NEW_LINE> <DEDENT> def visit_BinaryBooleanOperation(self, ex...
Visits an expression and recursively 'assumes' the condition tree.
62598f92d99f1b3c44d05326
class DFault(Exception): <NEW_LINE> <INDENT> def __init__(self, faultCode, faultString, tid=None): <NEW_LINE> <INDENT> self.faultCode = faultCode <NEW_LINE> self.faultString = faultString <NEW_LINE> self.tid = tid <NEW_LINE> self.args = (faultCode, faultString) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT...
Indicates an Datagram EBRPC fault package.
62598f924428ac0f6e6581a2
class ReorderOptions(StateOptions): <NEW_LINE> <INDENT> TYPE = 1 <NEW_LINE> NAME = 2 <NEW_LINE> NUMASC = 3 <NEW_LINE> NUMDESC = 4 <NEW_LINE> REVERSE = 5 <NEW_LINE> EXIT = 6
Enum values for reorder options
62598f92dd821e528d6d8bac
class MplInteraction(object): <NEW_LINE> <INDENT> def __init__(self, figure): <NEW_LINE> <INDENT> self._fig_ref = weakref.ref(figure) <NEW_LINE> self._cids = [] <NEW_LINE> <DEDENT> def __del__(self): <NEW_LINE> <INDENT> self.disconnect() <NEW_LINE> <DEDENT> def _add_connection(self, event_name, callback): <NEW_LINE> <I...
Base class for class providing interaction to a matplotlib Figure.
62598f92dc8b845886d53237
class TestHTMLMarkupGenerator(): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_get_input(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_create_html(self): <NEW_LINE> <INDENT> pass
Unit tests for the HTMLMarkupGenerator class
62598f92596a8972361278f5
class LazyLoaderVirtualEnabledTest(TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> cls.opts = salt.config.minion_config(None) <NEW_LINE> cls.opts['disable_modules'] = ['pillar'] <NEW_LINE> cls.opts['grains'] = salt.loader.grains(cls.opts) <NEW_LINE> <DEDENT> def setUp(sel...
Test the base loader of salt.
62598f9224f1403a926856ed
@dataclass <NEW_LINE> class ModelArguments: <NEW_LINE> <INDENT> text_model_name_or_path: str = field( metadata={ "help": "The text model checkpoint for weights initialization." "Don't set if you want to train a model from scratch." }, ) <NEW_LINE> vision_model_name_or_path: str = field( metadata={ "help": "The vision m...
Arguments pertaining to which model/config/tokenizer we are going to fine-tune, or train from scratch.
62598f9223e79379d538c17e
class Yaml: <NEW_LINE> <INDENT> def parse(filename): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> with open(filename) as f: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return yaml.load(f) <NEW_LINE> <DEDENT> except yaml.YAMLError as e: <NEW_LINE> <INDENT> log.critical("Problem parsing {} as YAML: {}".format( filename,...
Class for handling YAML
62598f920c0af96317c55ffe
class YTSerializer(Serializer): <NEW_LINE> <INDENT> def serialize(self, stream, base=None, encoding=None, **args): <NEW_LINE> <INDENT> if base is not None: <NEW_LINE> <INDENT> warnings.warn("YTSerializer does not support base.") <NEW_LINE> <DEDENT> if encoding is not None: <NEW_LINE> <INDENT> warnings.warn("YTSerialize...
Serializes RDF graphs to YTriples format.
62598f92b57a9660fecd16f3
class DevDaemonServiceMaker(object): <NEW_LINE> <INDENT> implements(IServiceMaker, IPlugin) <NEW_LINE> tapname = "devdaemon" <NEW_LINE> description = "The DevDaemon service." <NEW_LINE> options = Options <NEW_LINE> def makeService(self, options): <NEW_LINE> <INDENT> service = MultiService() <NEW_LINE> devdaemon = DevDa...
Service maker for the daemon.
62598f92d7e4931a7ef3bd1b
@dataclass(frozen=True, config=PydanticConfig) <NEW_LINE> class Connection: <NEW_LINE> <INDENT> value_a: str <NEW_LINE> value_b: str <NEW_LINE> similarity: Similarity = field(default_factory=lambda: Similarity(0))
The similarity between two values in a categorical property.
62598f924e4d56256637209a
class DataRetriever: <NEW_LINE> <INDENT> STORES_BASE_URLS = { 'magazineluiza': 'https://busca.magazineluiza.com.br/busca?q={}', 'americanas': 'https://www.americanas.com.br/busca/{}', 'submarino': 'https://www.submarino.com.br/busca/{}', 'casasbahia': 'https://www.casasbahia.com.br/{}/b', 'extra': 'https://www.extra.co...
Class that uses multiple PageExtractors to retrieve data queried from different websites
62598f9230bbd722464697b3
class SchemeNumber(SchemeValue): <NEW_LINE> <INDENT> def numberp(self): <NEW_LINE> <INDENT> return scheme_true <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "scnum({})".format(self) <NEW_LINE> <DEDENT> def eq(self, y): <NEW_LINE> <INDENT> return scbool(self == _check_num(y, "=")) <NEW_LINE> <DEDENT...
The parent class of all Scheme numeric types.
62598f92fff4ab517ebcd465
class GoToBall(Node): <NEW_LINE> <INDENT> def __init__(self, ball, dist): <NEW_LINE> <INDENT> super(GoToBall, self).__init__() <NEW_LINE> self.ball = ball <NEW_LINE> self.dist = dist <NEW_LINE> self.k_t = (0.7, 0.01, 0.1) <NEW_LINE> self.k_d = (0.001, 0.0001, 0.0001) <NEW_LINE> self.theta_integral = 0.0 <NEW_LINE> self...
Face the ball
62598f9229b78933be269f19
class Temp(Resource): <NEW_LINE> <INDENT> def get(self, date): <NEW_LINE> <INDENT> check_date(date) <NEW_LINE> return df_to_reponse(weather[weather.DATE == date]) <NEW_LINE> <DEDENT> def delete(self, date): <NEW_LINE> <INDENT> check_date(date) <NEW_LINE> weather.drop(weather.index[weather.DATE == date], inplace=True) <...
Access to a single date in ISO8601 (YYYYMMDD) format
62598f92435de62698e9ba6c
class Settings: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.screen_width = 1080 <NEW_LINE> self.screen_height = 600 <NEW_LINE> self.bg_color = (230, 230, 230) <NEW_LINE> self.ship_limit = 3 <NEW_LINE> self.bullet_width = 3 <NEW_LINE> self.bullet_height = 15 <NEW_LINE> self.bullet_color = (60, 60, 6...
A class to store all settings for Alien Invasion.
62598f9216aa5153ce40017b
class DoubleOffset(Component): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Component.__init__(self, ('offset','step')) <NEW_LINE> self.name = 'double offset' <NEW_LINE> self.isbackground = True <NEW_LINE> self.convolved = False <NEW_LINE> self.interfase = 0 <NEW_LINE> self.offset.grad = self.grad_offset...
Given an array of the same shape as Spectrum energy_axis, returns it as a component that can be added to a model.
62598f92097d151d1a2c0ca6
class UserProfile(models.Model): <NEW_LINE> <INDENT> uuid = UUIDField(unique=True, auto=True) <NEW_LINE> user = models.OneToOneField(User, related_name='profile') <NEW_LINE> affiliation = models.CharField(max_length=100, blank=True) <NEW_LINE> catch_all_project = models.ForeignKey('Project', blank=True, null=True) <NEW...
Extend Django user model: https://docs.djangoproject.com/en/1.7/topics/auth/customizing/#extending-the-existing-user-model
62598f92009cb60464d011a9
class InitialSIDQuery(compquery.ComponentQuery, contextquery.ContextQuery): <NEW_LINE> <INDENT> def results(self): <NEW_LINE> <INDENT> self.log.info("Generating results from {0.policy}".format(self)) <NEW_LINE> self.log.debug("Name: {0.name!r}, regex: {0.name_regex}".format(self)) <NEW_LINE> self.log.debug("User: {0.us...
Initial SID (Initial context) query. Parameter: policy The policy to query. Keyword Parameters/Class attributes: name The Initial SID name to match. name_regex If true, regular expression matching will be used on the Initial SID name. user The criteria to match th...
62598f92d6c5a102081e1dbc
class SphericalRotationSequence(RotationSequence3D): <NEW_LINE> <INDENT> def __init__(self, angles, axes_order, name=None, **kwargs): <NEW_LINE> <INDENT> self._n_inputs = 2 <NEW_LINE> self._n_outputs = 2 <NEW_LINE> super().__init__(angles, axes_order=axes_order, name=name, **kwargs) <NEW_LINE> self._inputs = ("lon", "l...
Perform a sequence of rotations about arbitrary number of axes in spherical coordinates. Parameters ---------- angles : list A sequence of angles (in deg). axes_order : str A sequence of characters ('x', 'y', or 'z') corresponding to the axis of rotation and matching the order in ``angles``.
62598f92462c4b4f79dbb681
class CatalogLoader(_object): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> __setattr__ = lambda self, name, value: _swig_setattr(self, CatalogLoader, name, value) <NEW_LINE> __swig_getmethods__ = {} <NEW_LINE> __getattr__ = lambda self, name: _swig_getattr(self, CatalogLoader, name) <NEW_LINE> def __init__(s...
Proxy of C++ YACS::ENGINE::CatalogLoader class
62598f92e64d504609df91f3
class DestroyVolumeTests( make_istatechange_tests( DestroyVolume, dict(blockdevice_id=ARBITRARY_BLOCKDEVICE_ID), dict(blockdevice_id=ARBITRARY_BLOCKDEVICE_ID_2), ) ): <NEW_LINE> <INDENT> def test_run(self): <NEW_LINE> <INDENT> node = u"192.0.2.1" <NEW_LINE> dataset_id = uuid4() <NEW_LINE> deployer = create_blockdeviced...
Tests for ``DestroyVolume``.
62598f92a79ad16197769cda
class JSONObjectWithFieldsTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> from letsencrypt.acme.jose.json_util import JSONObjectWithFields <NEW_LINE> from letsencrypt.acme.jose.json_util import Field <NEW_LINE> class MockJSONObjectWithFields(JSONObjectWithFields): <NEW_LINE> <INDENT> x...
Tests for letsencrypt.acme.jose.json_util.JSONObjectWithFields.
62598f92b7558d58954632a8
class TextExplainer(Wrapper): <NEW_LINE> <INDENT> def __init__(self, predict_proba, class_names): <NEW_LINE> <INDENT> Wrapper.__init__(self, predict_proba, class_names=class_names) <NEW_LINE> self.methods = ['lime', 'cle', 'anchor', 'shap'] <NEW_LINE> self.__initialization() <NEW_LINE> <DEDENT> def __initialization(sel...
Integrated explainer which explains text classifiers.
62598f92fbf16365ca793d2e
class Prefix(commands.Cog,name='prefix'): <NEW_LINE> <INDENT> def __init__(self, bot): <NEW_LINE> <INDENT> self.bot = bot <NEW_LINE> with open('prefixes.json') as f: <NEW_LINE> <INDENT> self.prefixes = json.load(f) <NEW_LINE> <DEDENT> self.bot.command_prefix = self.get_prefix <NEW_LINE> self.default_prefix = '!' <NEW_L...
Change your bots prefix for servers
62598f924e4d56256637209c
class NexusMissingRequiredFields(exceptions.NeutronException): <NEW_LINE> <INDENT> message = _("Missing required field(s) to configure nexus switch: " "%(fields)s")
Missing required fields to configure nexus switch.
62598f92d486a94d0ba2bc4e
class BaseMiddleware: <NEW_LINE> <INDENT> def __init__(self, wsgi_app: IWSGIApp, config: Mapping = {}) -> None: <NEW_LINE> <INDENT> self.app = wsgi_app <NEW_LINE> self.config = config <NEW_LINE> <DEDENT> def before(self, environ: dict, start_response: Callable) -> WSGIRequest: <NEW_LINE> <INDENT> return environ, start_...
Base class for WSGI middlewares. Child classes should override :func:`.before` and/or :func:`.after`\.
62598f92b5575c28eb712b0b