code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class CVEmailer(Messenger): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> print("[+] CVEmailer instance created. ") <NEW_LINE> <DEDENT> def compose(self, data_list): <NEW_LINE> <INDENT> self.content = info_data <NEW_LINE> print("compose()") <NEW_LINE> <DEDENT> def send(self): <NEW_LINE> <INDENT> API_AUTH ...
Send CVE notifications via email
62598fbc7047854f4633f59b
class TestDeletePlatformInteractor(itb.InteractorTestBase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super().setUp() <NEW_LINE> def get_platforms(): <NEW_LINE> <INDENT> platform = {'id': 'id', 'name': 'a platform'} <NEW_LINE> return [p.Platform.from_dict(platform)] <NEW_LINE> <DEDENT> self.__target = pi...
Unit tests for DeletePlatformInteractor
62598fbc57b8e32f525081ff
class batch_manager(context_error_handler): <NEW_LINE> <INDENT> def __init__( self, *inputs, n_elem: int = 1e6, batch_size: Optional[int] = None, max_batch_size: int = 1024, ): <NEW_LINE> <INDENT> if not inputs: <NEW_LINE> <INDENT> raise ValueError("inputs should be provided in general_batch_manager") <NEW_LINE> <DEDEN...
Process data in batch. Parameters ---------- inputs : tuple(np.ndarray), auxiliary array inputs. n_elem : {int, float}, indicates how many elements will be processed in a batch. batch_size : int, indicates the batch_size; if None, batch_size will be calculated by `n_elem`. Examples -------- >>> with...
62598fbcbf627c535bcb166a
class UpdateProject(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = 'panda_engine.update_project' <NEW_LINE> bl_label = 'Update Project Files' <NEW_LINE> def execute(self, _context): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> config = pman.get_config(os.path.dirname(bpy.data.filepath) if bpy.data.filepath else N...
Re-copies any missing project files
62598fbca8370b77170f05a5
class TextTableCell(object): <NEW_LINE> <INDENT> def __init__(self, content, colspan=None, rowspan=None, bgColor=None, alignH=None, alignV=None): <NEW_LINE> <INDENT> self.__content=content <NEW_LINE> self.__colspan=colspan <NEW_LINE> self.__rowspan=rowspan <NEW_LINE> self.__bgColor=bgColor <NEW_LINE> self.__alignH=alig...
A really basic HTML cell definition
62598fbc50812a4eaa620cce
class EdgeConv(MessagePassing): <NEW_LINE> <INDENT> def __init__(self, nn: Callable, aggr: str = 'max', **kwargs): <NEW_LINE> <INDENT> super().__init__(aggr=aggr, **kwargs) <NEW_LINE> self.nn = nn <NEW_LINE> self.reset_parameters() <NEW_LINE> <DEDENT> def reset_parameters(self): <NEW_LINE> <INDENT> reset(self.nn) <NEW_...
The edge convolutional operator from the `"Dynamic Graph CNN for Learning on Point Clouds" <https://arxiv.org/abs/1801.07829>`_ paper .. math:: \mathbf{x}^{\prime}_i = \sum_{j \in \mathcal{N}(i)} h_{\mathbf{\Theta}}(\mathbf{x}_i \, \Vert \, \mathbf{x}_j - \mathbf{x}_i), where :math:`h_{\mathbf{\Theta}}` d...
62598fbc091ae35668704de9
class ListValueRule: <NEW_LINE> <INDENT> def __init__(self, *, marshal): <NEW_LINE> <INDENT> self._marshal = marshal <NEW_LINE> <DEDENT> def to_python(self, value, *, absent: bool = None): <NEW_LINE> <INDENT> return ( None if absent else repeated.RepeatedComposite(value.values, marshal=self._marshal) ) <NEW_LINE> <DEDE...
A rule translating google.protobuf.ListValue and list-like objects.
62598fbc97e22403b383b0ce
class Answer(models.Model): <NEW_LINE> <INDENT> question = models.ForeignKey(Question, on_delete=models.CASCADE, related_name='answers') <NEW_LINE> mark = models.PositiveIntegerField(default=0) <NEW_LINE> text = models.CharField(max_length=60, blank=True) <NEW_LINE> img = models.ImageField(upload_to='answer', blank=Tru...
"Відповідь
62598fbc92d797404e388c46
class SAPSSFSLKY(Packet): <NEW_LINE> <INDENT> name = "SAP SSFS LKY" <NEW_LINE> fields_desc = [ StrFixedLenField("preamble", "RSecSSFsLKY", 11), ]
SAP SSFS LKY file format packet.
62598fbcad47b63b2c5a7a1c
class PasswordCredentialHash( OktaObject ): <NEW_LINE> <INDENT> def __init__(self, config=None): <NEW_LINE> <INDENT> super().__init__(config) <NEW_LINE> if config: <NEW_LINE> <INDENT> if "algorithm" in config: <NEW_LINE> <INDENT> if isinstance(config["algorithm"], password_credential_hash_algorithm.PasswordCredentialHa...
A class for PasswordCredentialHash objects.
62598fbc4428ac0f6e6586ea
class TestCreateAndGetSingleCustomer(APITestCase): <NEW_LINE> <INDENT> fake = Factory.create() <NEW_LINE> customer_data = { 'first_name': fake.first_name(), 'last_name': fake.last_name(), 'email': fake.safe_email(), } <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> url = reverse('collect_opinions:customers') <NEW_LINE>...
Test module for GET single customer API using endpoint api/customers/{pk}
62598fbcdc8b845886d53781
class ProductionAgroindustrial(models.Model): <NEW_LINE> <INDENT> production = models.ForeignKey( "producer.Production", related_name="production_agroindustrial", on_delete=models.CASCADE ) <NEW_LINE> description = models.CharField(max_length=50, blank=True, null=True) <NEW_LINE> raw_material = models.CharField(max_len...
Produccion agroindustrial
62598fbc57b8e32f52508200
class DiscoveryStartRequest(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swagger_types = { 'start_ip': 'str', 'end_ip': 'str', 'use_agents': 'bool', 'connection_timeout': 'int', 'max_ports_to_use': 'int' } <NEW_LINE> self.attribute_map = { 'start_ip': 'startIP', 'end_ip': 'endIP', 'use_agen...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fbc63d6d428bbee2978
class HighWeekDaysTimerGenerator(CyclicTimerGenerator): <NEW_LINE> <INDENT> def __init__(self, clock, seed): <NEW_LINE> <INDENT> start_date = pd.Timestamp("6 June 2016 00:00:00") <NEW_LINE> CyclicTimerGenerator.__init__(self, clock=clock, seed=seed, config=CyclicTimerProfile( profile=[5., 5., 5., 5., 5., 3., 3.], profi...
Basic CyclicTimerGenerator with a one week period that allocates higher probabilities to week-day vs week-ends
62598fbcf548e778e596b76e
class _Player: <NEW_LINE> <INDENT> def __init__(self, name, rating): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.rating = rating <NEW_LINE> <DEDENT> def compareRating(self, opponent): <NEW_LINE> <INDENT> return (1 + 10 ** ((opponent.rating - self.rating) / 400.0)) ** -1
A class to represent a player in the Elo Rating System
62598fbc9f2886367281895f
class Solution(object): <NEW_LINE> <INDENT> def restoreIpAddresses(self, s): <NEW_LINE> <INDENT> ans = [] <NEW_LINE> self.helper(ans, s, 4, []) <NEW_LINE> return ['.'.join(x) for x in ans] <NEW_LINE> <DEDENT> def helper(self, ans, s, k, temp): <NEW_LINE> <INDENT> if len(s) > k* 3: <NEW_LINE> <INDENT> return <NEW_LINE> ...
DFS回溯来实现,注意判断条件即可 Runtime: 20 ms, faster than 100.00% of Python online submissions for Restore IP Addresses. Memory Usage: 11.9 MB, less than 5.09% of Python online submissions for Restore IP Addresses.
62598fbc97e22403b383b0d0
class vggish_stat(): <NEW_LINE> <INDENT> def __init__(self,data): <NEW_LINE> <INDENT> self.data = data <NEW_LINE> <DEDENT> def mean(self): <NEW_LINE> <INDENT> MEAN = [] <NEW_LINE> for embedding in self.data: <NEW_LINE> <INDENT> mean = [] <NEW_LINE> samples = 128 <NEW_LINE> for idx in range(samples): <NEW_LINE> <INDENT>...
taking standard deviation and mean as final features from the entire segment
62598fbcec188e330fdf8a5a
class AssignmentPersonalInfo(PersonalInfo): <NEW_LINE> <INDENT> headline = ugettext_lazy('I am candidate for the following elections') <NEW_LINE> default_weight = 40 <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> return (Assignment.objects.filter(assignment_related_users__user=self.request.user) .exclude(assign...
Class for personal info block for the assignment app.
62598fbcfff4ab517ebcd9ac
class RedisHelper(object): <NEW_LINE> <INDENT> _client = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> if RedisHelper._client is None: <NEW_LINE> <INDENT> self._create_redis_client() <NEW_LINE> <DEDENT> <DEDENT> @classmethod <NEW_LINE> def get_client(cls): <NEW_LINE> <INDENT> if RedisHelper._client is None: <...
redis 连接助手
62598fbce1aae11d1e7ce909
class Axes(): <NEW_LINE> <INDENT> def __init__(self, fig, xscale='linear', yscale='linear'): <NEW_LINE> <INDENT> self._fig = fig <NEW_LINE> self._xscale = xscale <NEW_LINE> self._yscale = yscale <NEW_LINE> <DEDENT> def axis(self, lims): <NEW_LINE> <INDENT> l = __last_fig()._graph.activeLayer() <NEW_LINE> if 4 != len(li...
A very minimal replica of matplotlib.axes.Axes. The true Axes is a sublcass of matplotlib.artist and provides tons of functionality. At the moment this just provides a few set methods for properties such as labels and axis limits.
62598fbcaad79263cf42e99d
class StockForecastDiffView(TemplateView): <NEW_LINE> <INDENT> template_name = 'pages/forecast_diff.html' <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context_data = super(StockForecastDiffView, self).get_context_data() <NEW_LINE> code = self.request.GET.get('stock_code') <NEW_LINE> name = self....
股票对比页面
62598fbc23849d37ff85127c
class AnalyticDriver(Driver): <NEW_LINE> <INDENT> def __init__(self, options, connection): <NEW_LINE> <INDENT> super(AnalyticDriver, self).__init__(options, connection) <NEW_LINE> self.commands += ['send'] <NEW_LINE> <DEDENT> def send(self, **kwargs): <NEW_LINE> <INDENT> raise Exception("This method needs to be impleme...
Driver containing basic commands used by all analytics drivers.
62598fbc3d592f4c4edbb088
class ArcSummary(object): <NEW_LINE> <INDENT> GCOV_ARC_ON_TREE = 1 <NEW_LINE> GCOV_ARC_FAKE = 1 << 1 <NEW_LINE> GCOV_ARC_FALLTHROUGH = 1 << 2 <NEW_LINE> def __init__(self, src_block, dst_block, flag): <NEW_LINE> <INDENT> self.src_block = src_block <NEW_LINE> self.dst_block = dst_block <NEW_LINE> self.on_tree = bool(fla...
Summarizes an arc from a .gcno file. Attributes: src_block_index: integer index of the source basic block. dstBlockIndex: integer index of the destination basic block. on_tree: True iff arc has flag GCOV_ARC_ON_TREE. fake: True iff arc has flag GCOV_ARC_FAKE. fallthrough: True iff arc has flag GCOV...
62598fbc3539df3088ecc476
class SubAreaSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> subs = AreaSerializer(many=True, read_only=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Area <NEW_LINE> fields = ('id', 'name', 'subs')
子行政区划信息序列化器
62598fbc091ae35668704ded
@dataclass <NEW_LINE> class TestCase: <NEW_LINE> <INDENT> pipeline_func: Callable <NEW_LINE> mode: kfp.dsl.PipelineExecutionMode = kfp.dsl.PipelineExecutionMode.V2_COMPATIBLE <NEW_LINE> enable_caching: bool = False <NEW_LINE> arguments: Optional[Dict[str, str]] = None <NEW_LINE> verify_func: Callable[[ int, kfp_server_...
Test case for running a KFP sample
62598fbcd7e4931a7ef3c25e
class Gate(object): <NEW_LINE> <INDENT> def __init__(self, name, targets=None, controls=None, arg_value=None, arg_label=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.targets = None <NEW_LINE> self.controls = None <NEW_LINE> if not isinstance(targets, Iterable) and targets is not None: <NEW_LINE> <INDENT> ...
Representation of a quantum gate, with its required parametrs, and target and control qubits. Parameters ---------- name : string Gate name. targets : list or int Gate targets. controls : list or int Gate controls. arg_value : float Argument value(phi). arg_label : string Label for gate representat...
62598fbc377c676e912f6e56
class OnlyTrainSinkNode(NilSinkNode): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(OnlyTrainSinkNode, self).__init__(**kwargs) <NEW_LINE> self.set_permanent_attributes(dummy_collection = DummyDataset()) <NEW_LINE> <DEDENT> def process_cu...
Store only meta information and perform training but not testing The node performs only training on the node chain, so that the test procedure can be performed manually, e.g. for debug and testing reasons. The node is very similar to the NilSinkNode. .. todo:: Merge the nil-nodes .. todo:: Change name to more meani...
62598fbc71ff763f4b5e7944
class RedirectedStdio(object): <NEW_LINE> <INDENT> def __init__(self, connection): <NEW_LINE> <INDENT> self.connection = connection <NEW_LINE> self.redir = rpyc.classic.redirected_stdio(self.conn) <NEW_LINE> self.redir.__enter__() <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def...
redirect stdio of remote host to this local host
62598fbc9f28863672818960
class PsicovManager(CorrMutGeneric): <NEW_LINE> <INDENT> def __init__(self, seqsManager, outPath): <NEW_LINE> <INDENT> CorrMutGeneric.__init__(self,seqsManager, outPath) <NEW_LINE> self.seqsManager= seqsManager <NEW_LINE> self.corrMutOutPath= myMakeDir(outPath,"corrMut") <NEW_LINE> self.featName="psicov" <NEW_LINE> <DE...
Computes corrMut and processes their outputs. Extends class CorrMutGeneric
62598fbc7d43ff24874274e9
class ObjectIdShuffler(SONManipulator): <NEW_LINE> <INDENT> def will_copy(self): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> def transform_incoming(self, son, collection): <NEW_LINE> <INDENT> if not "_id" in son: <NEW_LINE> <INDENT> return son <NEW_LINE> <DEDENT> transformed = SON({"_id": son["_id"]}) <NEW_LINE...
A son manipulator that moves _id to the first position.
62598fbc099cdd3c636754c7
class MRDANGLE0Test(systemtesting.MantidSystemTest): <NEW_LINE> <INDENT> def runTest(self): <NEW_LINE> <INDENT> wsg = MRFilterCrossSections(Filename="REF_M_24949") <NEW_LINE> ws_norm = LoadEventNexus(Filename="REF_M_24945", NXentryName="entry-Off_Off", OutputWorkspace="r_24945") <NEW_LINE> theta = MRGetTheta(Workspace=...
Test data loading and cross-section extraction
62598fbc2c8b7c6e89bd3990
class PluginScriptSubmissionMachine(generics.ListAPIView): <NEW_LINE> <INDENT> authentication_classes = (ApiKeyAuthentication,) <NEW_LINE> permission_classes = (HasRWPermission,) <NEW_LINE> serializer_class = PluginScriptSubmissionSerializer <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> serial = self.kwargs['s...
Get the plugin script submissions for a machine
62598fbce1aae11d1e7ce90a
@adapter(IPloneSiteRoot, IHTTPRequest) <NEW_LINE> @implementer(ITraversable) <NEW_LINE> class APITraverser(object): <NEW_LINE> <INDENT> def __init__(self, context, request=None): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> self.request = request <NEW_LINE> <DEDENT> def traverse(self, name, postpath): <NEW_LIN...
The root API traverser
62598fbcbe7bc26dc9251f41
class RedSFTPFile(object): <NEW_LINE> <INDENT> def __init__(self,sftp,remote_path,sftp_flags,file_mode): <NEW_LINE> <INDENT> self.sftp = sftp <NEW_LINE> self.remote_path = remote_path <NEW_LINE> self.sftp_flags = sftp_flags <NEW_LINE> self.file_mode = file_mode <NEW_LINE> self.open() <NEW_LINE> <DEDENT> def __check_for...
Interact with files over SFTP using a class rather than passing a file handle around. .. warning:: This class simply uses the functions from `redssh.sftp.RedSFTP` minus any requirement for the `file_obj` argument for calls. :param sftp: `redssh.sftp.RedSFTP` object from the session you'd like to interact via. :type s...
62598fbcad47b63b2c5a7a20
class ArrayIndependentMetropolis(ArrayMetropolis): <NEW_LINE> <INDENT> def __init__(self, scale=1.): <NEW_LINE> <INDENT> self.scale = scale <NEW_LINE> <DEDENT> def calibrate(self, W, x): <NEW_LINE> <INDENT> m, cov = rs.wmean_and_cov(W, view_2d_array(x.theta)) <NEW_LINE> x.shared['mean'] = m <NEW_LINE> x.shared['chol_co...
Independent Metropolis (Gaussian proposal).
62598fbc23849d37ff85127e
class IFFT(_BaseIFFT): <NEW_LINE> <INDENT> def __init__(self, invec, outvec, nbatch=1, size=None): <NEW_LINE> <INDENT> super(IFFT, self).__init__(invec, outvec, nbatch, size) <NEW_LINE> logging.warning(WARN_MSG) <NEW_LINE> self.prec, self.itype, self.otype = _check_fft_args(invec, outvec) <NEW_LINE> <DEDENT> def execut...
Class for performing IFFTs via the numpy interface.
62598fbc44b2445a339b6a5b
class BlackSwaptionPricerHelper(object): <NEW_LINE> <INDENT> def make_payers_swaption_wrt_strike( self, init_swap_rate, swap_annuity, option_maturity, vol): <NEW_LINE> <INDENT> function = mafipy.function <NEW_LINE> return lambda option_strike: function.black_payers_swaption_value( init_swap_rate=init_swap_rate, option_...
BlackSwaptionPricerHelper Helper functions to generate a function with respect to a sigle variable. For instance, black formula as a function of volatility is needed to evaluate market smile by implied volatility.
62598fbc21bff66bcd722e35
class TextItem(Item): <NEW_LINE> <INDENT> def __init__(self, arg): <NEW_LINE> <INDENT> super(TextItem, self).__init__() <NEW_LINE> self.arg = arg
docstring for TextItem
62598fbc5fcc89381b266232
class NumEpisodesObserver(object): <NEW_LINE> <INDENT> def __init__(self, variable_scope='num_episodes_step_observer'): <NEW_LINE> <INDENT> with tf.compat.v1.variable_scope(variable_scope): <NEW_LINE> <INDENT> self._num_episodes = common.create_variable( 'num_episodes', 0, shape=[], dtype=tf.int32) <NEW_LINE> <DEDENT> ...
Class to count number of episodes run by an observer.
62598fbc3539df3088ecc478
class MyProfileForm(Form): <NEW_LINE> <INDENT> username = StringField( 'Username', validators=[ optional(), Regexp( r'^[a-zA-Z0-9_]+$', message=("Username should be one word, letters, " "numbers, and underscores only.") ), username_exists ]) <NEW_LINE> email = StringField( 'Email', validators=[ optional(), Email(), ema...
Edit user profile
62598fbc60cbc95b0636450a
class strLabelConverter(object): <NEW_LINE> <INDENT> def __init__(self, alphabet, ignore_case=True): <NEW_LINE> <INDENT> self._ignore_case = ignore_case <NEW_LINE> self.alphabet = alphabet + '-' <NEW_LINE> self.dict = {} <NEW_LINE> for i, char in enumerate(alphabet): <NEW_LINE> <INDENT> self.dict[char] = i + 1 <NEW_LIN...
Convert between str and label. NOTE: Insert `blank` to the alphabet for CTC. Args: alphabet (str): set of the possible characters. ignore_case (bool, default=True): whether or not to ignore all of the case.
62598fbc63d6d428bbee297d
class Device(base.Device): <NEW_LINE> <INDENT> def __init__(self, event_loop): <NEW_LINE> <INDENT> super().__init__(event_loop) <NEW_LINE> self.prepared_data = None <NEW_LINE> <DEDENT> def update(self, data): <NEW_LINE> <INDENT> self.prepared_data = data <NEW_LINE> for future in self.readers: <NEW_LINE> <INDENT> future...
Sim device class
62598fbc167d2b6e312b7142
class Token(namedtuple('Token', FIELD_NAMES_PLUS)): <NEW_LINE> <INDENT> def __lt__(self, other): <NEW_LINE> <INDENT> if not isinstance(other, Token): <NEW_LINE> <INDENT> raise TypeError("unorderable types: %s < %s" % (self.__class__.__name__, other.__class__.__name__)) <NEW_LINE> <DEDENT> self_fields = self[:-1] <NEW_L...
CoNLL-X style dependency token. Fields include: - form (the word form) - lemma (the word's base form or lemma) -- empty for SubprocessBackend - pos (part of speech tag) - index (index of the token in the sentence) - head (index of the head of this token), and - deprel (the dependency relation between this token and its...
62598fbcec188e330fdf8a5e
class ReprovisionPolicy(Model): <NEW_LINE> <INDENT> _validation = { 'update_hub_assignment': {'required': True}, 'migrate_device_data': {'required': True}, } <NEW_LINE> _attribute_map = { 'update_hub_assignment': {'key': 'updateHubAssignment', 'type': 'bool'}, 'migrate_device_data': {'key': 'migrateDeviceData', 'type':...
The behavior of the service when a device is re-provisioned to an IoT hub. :param update_hub_assignment: When set to true (default), the Device Provisioning Service will evaluate the device's IoT Hub assignment and update it if necessary for any provisioning requests beyond the first from a given device. If set to ...
62598fbcff9c53063f51a81a
class NDaysBeforeLastTradingDayOfWeek(TradingDayOfWeekRule): <NEW_LINE> <INDENT> def __init__(self, n): <NEW_LINE> <INDENT> super(NDaysBeforeLastTradingDayOfWeek, self).__init__(n, invert=True) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def get_last_trading_day_of_week(dt, cal): <NEW_LINE> <INDENT> prev = None <NEW_L...
A rule that triggers n days before the last trading day of the week.
62598fbc2c8b7c6e89bd3992
class DevicesField(ObjectFieldRelatedSet): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> super(ObjectFieldRelatedSet, self).__init__(name, default=[], readonly=True) <NEW_LINE> <DEDENT> def datum_to_value(self, instance, datum): <NEW_LINE> <INDENT> if datum is None: <NEW_LINE> <INDENT> return [] <NE...
Field for `FilesystemGroupDevices`.
62598fbc23849d37ff851280
class Seat: <NEW_LINE> <INDENT> def __init__(self, location: str, factor: int=8): <NEW_LINE> <INDENT> self.encodedlocation = location <NEW_LINE> self.rowfactor = factor <NEW_LINE> <DEDENT> @property <NEW_LINE> def encodedlocation(self): <NEW_LINE> <INDENT> return self.__encodedlocation <NEW_LINE> <DEDENT> @encodedlocat...
"binary space partitioning" machine system for encoding airplane seating assignment... in the North Pole...
62598fbc3d592f4c4edbb08b
class IPTagger(object): <NEW_LINE> <INDENT> name='ip_tagger' <NEW_LINE> def __init__(self, nlp, pattern_id='IPTagger', attrs=('has_ipv4', 'is_ipv4', 'ipv4'), force_extension=False, subnets_to_keep=4): <NEW_LINE> <INDENT> self._has_ipv4, self._is_ipv4, self._ipv4 = attrs <NEW_LINE> self.matcher = Matcher(nlp.vocab) <NEW...
spaCy v2.0 pipeline component for adding IP meta data to `Doc` objects. USAGE: >>> import spacy >>> from spacy.lang.en import English >>> from cyberspacy import IPTagger >>> nlp = English() >>> ip_Tagger = IPTagger(nlp) >>> nlp.add_pipe(ip_Tagger, first=True) >>> doc = nlp(u'This is a sentence which contains 2.3.4.5 a...
62598fbc3317a56b869be635
class _ConfigSection(object): <NEW_LINE> <INDENT> def __getattr__(self, attr): <NEW_LINE> <INDENT> if attr in self.__dict__: <NEW_LINE> <INDENT> return self.__dict__[attr] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> raise AttributeError('No "%s" setting in section.' % attr) <NEW_LINE> <DEDENT> <DEDENT> def __getitem_...
Hold settings for a section of the configuration file.
62598fbc76e4537e8c3ef773
class AuthTokenSerializer(serializers.Serializer): <NEW_LINE> <INDENT> email = serializers.CharField() <NEW_LINE> password = serializers.CharField( style={'input_type': 'password'}, trim_whitespace=False ) <NEW_LINE> def validate(self, attrs): <NEW_LINE> <INDENT> email = attrs.get('email') <NEW_LINE> password = attrs.g...
Serializer for the user authentication object
62598fbc21bff66bcd722e37
class DateQueryState(QueryState): <NEW_LINE> <INDENT> def __init__(self, filter, date): <NEW_LINE> <INDENT> QueryState.__init__(self, filter) <NEW_LINE> self.date = date <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return '<DateQueryState date=%r>' % (self.date,)
Create a new DateQueryState object. :cvar date: date
62598fbca219f33f346c69d3
class Timeseries(object): <NEW_LINE> <INDENT> def __init__(self, hadm_id, data_id, timeseries_data): <NEW_LINE> <INDENT> self.hadm_id = hadm_id <NEW_LINE> self.data_id = data_id <NEW_LINE> self.series = timeseries_data.sort_index() if timeseries_data is not None else pd.Series() <NEW_LINE> self.series = self.series.ren...
Wrapper for timeseries data, contains a time-indexed pandas.Series object as well as a dataIDs.DataID object describing what the data is and the hadm_id signifying where the data came from.
62598fbc442bda511e95c62a
class CalibrationMode(enum.IntEnum): <NEW_LINE> <INDENT> BootTareGyroAccel = 0 <NEW_LINE> Temperature = 1 <NEW_LINE> Magnetometer12Pt = 2 <NEW_LINE> Magnetometer360 = 3 <NEW_LINE> Accelerometer = 5 <NEW_LINE> Unknown = -1
Various calibration modes supported by Pigeon.
62598fbc3539df3088ecc47a
class LinkedBag(object): <NEW_LINE> <INDENT> def __init__(self,sourceCollection = None): <NEW_LINE> <INDENT> self._items = None <NEW_LINE> self._size = None <NEW_LINE> if sourceCollection: <NEW_LINE> <INDENT> for item in sourceCollection: <NEW_LINE> <INDENT> self.add(item) <NEW_LINE> <DEDENT> <DEDENT> <DEDENT> def __it...
A link-based bag implementation.
62598fbc283ffb24f3cf3a50
class Numbers(object): <NEW_LINE> <INDENT> _precision = 0 <NEW_LINE> _near0 = 1.0 <NEW_LINE> _near100 = 99.0 <NEW_LINE> def __init__(self, n_files=0, n_statements=0, n_excluded=0, n_missing=0, n_branches=0, n_partial_branches=0, n_missing_branches=0 ): <NEW_LINE> <INDENT> self.n_files = n_files <NEW_LINE> self.n_statem...
The numerical results of measuring coverage. This holds the basic statistics from `Analysis`, and is used to roll up statistics across files.
62598fbc56ac1b37e63023bb
class InfrastructureStorage: <NEW_LINE> <INDENT> def __init__(self, context): <NEW_LINE> <INDENT> self.__context = context <NEW_LINE> <DEDENT> def configure_tiers(self, datacenter, tier): <NEW_LINE> <INDENT> log.info("Enabling tier %s..." % tier) <NEW_LINE> tiers = datacenter.listTiers() <NEW_LINE> tiers[0].setName(tie...
Provides access to infrastructure storage features.
62598fbc60cbc95b0636450c
class InvalidTestRunError(Exception): <NEW_LINE> <INDENT> pass
Raised if test run is invalid.
62598fbc091ae35668704df1
@urls.register <NEW_LINE> class FloatingIPs(generic.View): <NEW_LINE> <INDENT> url_regex = r'network/floatingips/$' <NEW_LINE> @rest_utils.ajax() <NEW_LINE> def get(self, request): <NEW_LINE> <INDENT> result = api.neutron.tenant_floating_ip_list(request) <NEW_LINE> return {'items': [ip.to_dict() for ip in result]}
API for floating IP addresses.
62598fbc9f28863672818962
class TransactionsCommandsMixin: <NEW_LINE> <INDENT> def unwatch(self): <NEW_LINE> <INDENT> fut = self._pool_or_conn.execute(b'UNWATCH') <NEW_LINE> return wait_ok(fut) <NEW_LINE> <DEDENT> def watch(self, key, *keys): <NEW_LINE> <INDENT> fut = self._pool_or_conn.execute(b'WATCH', key, *keys) <NEW_LINE> return wait_ok(fu...
Transaction commands mixin. For commands details see: http://redis.io/commands/#transactions Transactions HOWTO: >>> tr = redis.multi_exec() >>> result_future1 = tr.incr('foo') >>> result_future2 = tr.incr('bar') >>> try: ... result = await tr.execute() ... except MultiExecError: ... pass # check what hap...
62598fbc7d43ff24874274eb
class _Query(object): <NEW_LINE> <INDENT> __slots__ = ('flags', 'ns', 'ntoskip', 'ntoreturn', 'spec', 'fields', 'codec_options', 'read_preference', 'limit', 'batch_size') <NEW_LINE> name = 'find' <NEW_LINE> def __init__(self, flags, ns, ntoskip, ntoreturn, spec, fields, codec_options, read_preference, limit, batch_size...
A query operation.
62598fbc377c676e912f6e58
class PersonalInformation(forms.Form): <NEW_LINE> <INDENT> nickname = forms.CharField(error_messages={ 'max_length': '昵称长度必须小于50位', }, required=False, max_length=50, ) <NEW_LINE> telephone = forms.CharField(validators=[ RegexValidator(r'^1[13456789]\d{9}$', "提示信息:手机号码格式错误"), ], required=False) <NEW_LINE> birthday = for...
验证个人信息合格性
62598fbc3346ee7daa33772f
class TableClause(Immutable, FromClause): <NEW_LINE> <INDENT> __visit_name__ = "table" <NEW_LINE> named_with_column = True <NEW_LINE> implicit_returning = False <NEW_LINE> _autoincrement_column = None <NEW_LINE> def __init__(self, name, *columns, **kw): <NEW_LINE> <INDENT> super(TableClause, self).__init__() <NEW_LINE>...
Represents a minimal "table" construct. This is a lightweight table object that has only a name, a collection of columns, which are typically produced by the :func:`_expression.column` function, and a schema:: from sqlalchemy import table, column user = table("user", column("id"), col...
62598fbc56ac1b37e63023bc
class VolumeTypeManager(base.ManagerWithFind): <NEW_LINE> <INDENT> resource_class = VolumeType <NEW_LINE> def list(self): <NEW_LINE> <INDENT> warnings.warn('The novaclient.v2.volume_types module is deprecated ' 'and will be removed after Nova 2016.1 is released. Use ' 'python-cinderclient or python-openstacksdk instead...
DEPRECATED: Manage :class:`VolumeType` resources.
62598fbc956e5f7376df5765
@core.off_by_default <NEW_LINE> @core.flake8ext <NEW_LINE> class MockAutospecCheck(object): <NEW_LINE> <INDENT> name = "mock_check" <NEW_LINE> version = "1.00" <NEW_LINE> def __init__(self, tree, filename): <NEW_LINE> <INDENT> self.filename = filename <NEW_LINE> self.tree = tree <NEW_LINE> <DEDENT> def run(self): <NEW_...
Check for 'autospec' in mock.patch/mock.patch.object calls Okay: mock.patch('target_module_1', autospec=True) Okay: mock.patch('target_module_1', autospec=False) Okay: mock.patch('target_module_1', autospec=None) Okay: mock.patch('target_module_1', defined_mock) Okay: mock.patch('target_module_1', new=defined_mock) Ok...
62598fbdcc40096d6161a2c0
class PVPowerSim(Simulation): <NEW_LINE> <INDENT> settings = SimParameter( ID="Tuscon_SAPM", path="~/SimKit_Simulations", thresholds=None, interval=[1, "hour"], sim_length=[0, "hours"], write_frequency=0, write_fields={ "data": ["latitude", "longitude", "Tamb", "Uwind"], "outputs": ["monthly_energy", "annual_energy"] }...
PV Power Demo Simulations
62598fbdf548e778e596b775
class Namelist_Stmt(StmtBase): <NEW_LINE> <INDENT> subclass_names = [] <NEW_LINE> use_names = ['Namelist_Group_Name', 'Namelist_Group_Object_List'] <NEW_LINE> @staticmethod <NEW_LINE> def match(string): <NEW_LINE> <INDENT> if string[:8].upper()!='NAMELIST': <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> line = string[8...
:: <namelist-stmt> = NAMELIST / <namelist-group-name> / <namelist-group-object-list> [ [ , ] / <namelist-group-name> / <namelist-group-object-list> ]... Attributes ---------- items : (Namelist_Group_Name, Namelist_Group_Object_List)-tuple
62598fbdf9cc0f698b1c53b6
class Wait(base.CreateCommand): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Args(parser): <NEW_LINE> <INDENT> _AddWaitArgs(parser) <NEW_LINE> <DEDENT> def Run(self, args): <NEW_LINE> <INDENT> return operations_util.Wait(operations.OperationsClient(), args.operation)
Wait for a Cloud ML Engine operation to complete.
62598fbd57b8e32f52508204
class Meta: <NEW_LINE> <INDENT> model = Relationtype
MetatypeAdminForm's Meta
62598fbd4527f215b58ea09d
class GM2MTgtQuerySet(query.QuerySet): <NEW_LINE> <INDENT> def __init__(self, model=None, query=None, using=None, hints=None): <NEW_LINE> <INDENT> super(GM2MTgtQuerySet, self).__init__(model, query, using, hints) <NEW_LINE> try: <NEW_LINE> <INDENT> if self._iterable_class is not query.ModelIterable: <NEW_LINE> <INDENT>...
A QuerySet for GM2M models which yields actual target generic objects instead of GM2M objects when iterated over It can also filter the output by model (= content type)
62598fbd26068e7796d4cb2a
class MirroredVariable(DistributedVariable, Mirrored, checkpointable.CheckpointableBase): <NEW_LINE> <INDENT> def __init__(self, index, primary_var, aggregation): <NEW_LINE> <INDENT> for v in six.itervalues(index): <NEW_LINE> <INDENT> v._mirrored_container = weakref.ref(self) <NEW_LINE> <DEDENT> self._primary_var = pri...
Holds a map from device to variables whose values are kept in sync.
62598fbdcc0a2c111447b1dc
class Task(models.Model): <NEW_LINE> <INDENT> user = models.ForeignKey("UserProfile") <NEW_LINE> task_type_choices = ((0, 'cmd'), (1, 'file_transfer')) <NEW_LINE> task_type = models.SmallIntegerField(choices=task_type_choices) <NEW_LINE> content = models.TextField(verbose_name="任务内容") <NEW_LINE> login_ip = models.CharF...
批量任务记录表
62598fbd97e22403b383b0d8
class EqualTo(BaseValidator): <NEW_LINE> <INDENT> NOT_EQUAL = 'notEqual' <NEW_LINE> error_messages = {NOT_EQUAL: "'$value' is not equal to '$comp_value'"} <NEW_LINE> def __init__(self, comp_value=None, *args, **kwargs): <NEW_LINE> <INDENT> super(EqualTo, self).__init__(*args, **kwargs) <NEW_LINE> self.comp_value = comp...
Compares value with a static value.
62598fbd656771135c48983e
class MySysLogHandler(logging.handlers.SysLogHandler): <NEW_LINE> <INDENT> def __init__(self, address, facility=logging.handlers.SysLogHandler.LOG_USER, socktype=socket.SOCK_DGRAM, ssl_enabled=False): <NEW_LINE> <INDENT> logging.Handler.__init__(self) <NEW_LINE> self.address = address <NEW_LINE> self.facility = facilit...
Custom Syslog logging handler that includes CEFEvent. For some reason python SysLogHandler appends \x00 byte to every record sent, This fixes it and replaces it with \n.
62598fbd71ff763f4b5e794a
class SlowNumbaPickler(pickle._Pickler): <NEW_LINE> <INDENT> dispatch = pickle._Pickler.dispatch.copy() <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self.__trace = [] <NEW_LINE> self.__memo = {} <NEW_LINE> <DEDENT> def save(self, obj): <NEW_LINE> <INDE...
Extends the pure-python Pickler to support the pickling need in Numba. Adds pickling for closure functions, modules. Adds customized pickling for _CustomPickled to avoid invoking a new Pickler instance. Note: this is used on Python < 3.8 unless `pickle5` is installed. Note: This is good for debugging because the C-p...
62598fbd56ac1b37e63023be
class Meta(BaseTable.Meta): <NEW_LINE> <INDENT> model = models.ConfigCompliance <NEW_LINE> fields = ( "pk", "device", )
Metaclass attributes of ConfigComplianceTable.
62598fbd55399d3f056266e5
class gates(element): <NEW_LINE> <INDENT> def __init__(self, width = 32, *inputs): <NEW_LINE> <INDENT> super(gates, self).__init__() <NEW_LINE> self.width = width <NEW_LINE> self.inputs = inputs <NEW_LINE> self.value = None <NEW_LINE> <DEDENT> def setInputs(*inputs): <NEW_LINE> <INDENT> self.inputs = inputs
docstring for element
62598fbde1aae11d1e7ce90d
class CachedSimpleResource(SimpleResource): <NEW_LINE> <INDENT> def __init__(self, uri, duration=datetime.timedelta(weeks=1), invalidateCache=False): <NEW_LINE> <INDENT> self.needsCaching = invalidateCache or self.isExpired(uri) <NEW_LINE> if self.needsCaching: <NEW_LINE> <INDENT> self.uri = uri <NEW_LINE> <DEDENT> els...
Adds a caching layer on top of SimpleResource. duration is a timedelta or number of seconds for which the cache is valid (default: one week). Setting invalidateCache to True re-caches immediately.
62598fbd3617ad0b5ee06317
class menu_create_result: <NEW_LINE> <INDENT> thrift_spec = ( (0, TType.I16, 'success', None, None, ), (1, TType.STRUCT, 'e', (MPError, MPError.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, success=None, e=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> self.e = e <NEW_LINE> <DEDENT> def read(sel...
Attributes: - success - e
62598fbd5166f23b2e2435af
class Type: <NEW_LINE> <INDENT> __slots__ = ["name", "tparam", "python_class"] <NEW_LINE> def __init__(self, name, tparam=None, python_class=None): <NEW_LINE> <INDENT> if tparam is None: <NEW_LINE> <INDENT> tparam = [] <NEW_LINE> <DEDENT> assert isinstance(name, _string_types) <NEW_LINE> assert isinstance(tparam, list)...
- Type.name : A string with the name of the object - Type.tparam : For classes with template parameters, (list, dict), this contains a list of Type objects of the template parameters - Type.python_class : The original python class implementing this type. Two Type objects compare equal ...
62598fbdf9cc0f698b1c53b7
class SourceCheck(Check): <NEW_LINE> <INDENT> source = True <NEW_LINE> def check_target_unit_with_flag(self, sources, targets, unit): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def check_single(self, source, target, unit): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def check_source(self, source, uni...
Basic class for source checks.
62598fbde5267d203ee6bad0
class muli(CALExt): <NEW_LINE> <INDENT> def block(self, d, a, value): <NEW_LINE> <INDENT> code = self.get_active_code() <NEW_LINE> temp = code.prgm.acquire_register((value, value, value, value)) <NEW_LINE> code.add(cal.mul(d, a, temp)) <NEW_LINE> code.prgm.release_register(temp) <NEW_LINE> return
Floating point multiply immediate
62598fbd4c3428357761a48d
class PilImage(qrcode.image.base.BaseImage): <NEW_LINE> <INDENT> def __init__(self, border, width, box_size): <NEW_LINE> <INDENT> if Image is None and ImageDraw is None: <NEW_LINE> <INDENT> raise NotImplementedError("PIL not available") <NEW_LINE> <DEDENT> super(PilImage, self).__init__(border, width, box_size) <NEW_LI...
PIL image builder, default format is PNG.
62598fbd63d6d428bbee2982
class DSNfe(FrontEnd): <NEW_LINE> <INDENT> def __init__(self, name, inputs=None, band=None, pols_out=None, output_names=None, active=True): <NEW_LINE> <INDENT> mylogger = logging.getLogger(module_logger.name+".DSNfe") <NEW_LINE> mylogger.debug(" initializing FrontEnd %s", self) <NEW_LINE> band, output_names, pols_out =...
A generic DSN front end. This handles bands S, X and Ka. A DSN front end has only one input but either one or two outputs for one or two polarizations. The standard DSN receivers are dual S/X and dual X/Ka, separately fed using a dichroic reflector to divert the longer wavelength beam. It may have two simultaneou...
62598fbd4f6381625f1995aa
class MergeCssInDocumentOneLineCommand(sublime_plugin.TextCommand): <NEW_LINE> <INDENT> def run(self, edit): <NEW_LINE> <INDENT> view = self.view <NEW_LINE> if ST2: <NEW_LINE> <INDENT> setlists = Lib.get_default_set() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> setlists = modeCSS.Lib.get_default_set() <NEW_LINE> <DED...
压缩整个文档为一行
62598fbd167d2b6e312b7148
class TestWriters(unittest.TestCase): <NEW_LINE> <INDENT> def test_writers(self): <NEW_LINE> <INDENT> test_urls = [ 'https://www.youtube.com/watch?v=5qap5aO4i9A', 'https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow' ] <NEW_LINE> downloader = ChatDownloader() <NEW_LINE> with tempfile.TemporaryDirectory() as tmp: <...
Class used to run unit tests for writers.
62598fbdec188e330fdf8a64
class GetDebugConfigResponse(_messages.Message): <NEW_LINE> <INDENT> config = _messages.StringField(1)
Response to a get debug configuration request. Fields: config: The encoded debug configuration for the requested component.
62598fbd97e22403b383b0da
class AndroidResources(AndroidTarget): <NEW_LINE> <INDENT> def __init__(self, resource_dir=None, **kwargs): <NEW_LINE> <INDENT> super(AndroidResources, self).__init__(**kwargs) <NEW_LINE> address = kwargs['address'] <NEW_LINE> try: <NEW_LINE> <INDENT> self.resource_dir = os.path.join(address.spec_path, resource_dir) <N...
Android resources used to generate R.java.
62598fbd7d43ff24874274ed
class OrganizationUserTreeView(APIView): <NEW_LINE> <INDENT> authentication_classes = (JSONWebTokenAuthentication,) <NEW_LINE> permission_classes = (IsAuthenticated,) <NEW_LINE> def get(self, request, format=None): <NEW_LINE> <INDENT> organizations = Organization.objects.all() <NEW_LINE> serializer = OrganizationUserTr...
组织架构关联用户树
62598fbd71ff763f4b5e794c
class ExtendedManifestAE1(Component): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(ExtendedManifestAE1, self).__init__('ext_mft', 'Extended Manifest', 0) <NEW_LINE> <DEDENT> def dump_info(self, pref, comp_filter): <NEW_LINE> <INDENT> hdr = self.cdir['ext_mft_hdr'] <NEW_LINE> if hdr.adir['length'].v...
Extended manifest
62598fbd2c8b7c6e89bd3998
class SecurityGroupViewResult(Model): <NEW_LINE> <INDENT> _attribute_map = { 'network_interfaces': {'key': 'networkInterfaces', 'type': '[SecurityGroupNetworkInterface]'}, } <NEW_LINE> def __init__(self, network_interfaces=None): <NEW_LINE> <INDENT> super(SecurityGroupViewResult, self).__init__() <NEW_LINE> self.networ...
The information about security rules applied to the specified VM. :param network_interfaces: List of network interfaces on the specified VM. :type network_interfaces: list[~azure.mgmt.network.v2017_03_01.models.SecurityGroupNetworkInterface]
62598fbdff9c53063f51a820
class SchoolList(ObtainTokenBase): <NEW_LINE> <INDENT> def test_school_list(self): <NEW_LINE> <INDENT> token, university = self.obtain_token() <NEW_LINE> self.client.credentials(HTTP_AUTHORIZATION='Bearer {0}'.format(token)) <NEW_LINE> response = self.client.get(reverse('school_list'), data={'format': 'json'}) <NEW_LIN...
Test for School list api.
62598fbde1aae11d1e7ce90e
class OGPublication(Publication): <NEW_LINE> <INDENT> _name: str = '' <NEW_LINE> suggestedTime = ( 5 ) <NEW_LINE> def service(self) -> 'OGService': <NEW_LINE> <INDENT> return typing.cast('OGService', super().service()) <NEW_LINE> <DEDENT> def marshal(self) -> bytes: <NEW_LINE> <INDENT> return '\t'.join(['v1', self._nam...
This class provides the publication of a oVirtLinkedService
62598fbd4428ac0f6e6586f5
class StringGrid(BaseGrid): <NEW_LINE> <INDENT> def load_source(self): <NEW_LINE> <INDENT> return self.filename.translate(maketrans( '0%s' % self.free_char, self.mystery_char * 2))
Grid loaded from a String
62598fbd99fddb7c1ca62ed5
class DataFlowJavaOperator(BaseOperator): <NEW_LINE> <INDENT> template_fields = ['options', 'jar'] <NEW_LINE> ui_color = '#0273d4' <NEW_LINE> @apply_defaults <NEW_LINE> def __init__( self, jar, dataflow_default_options=None, options=None, gcp_conn_id='google_cloud_default', delegate_to=None, *args, **kwargs): <NEW_LINE...
Start a Java Cloud DataFlow batch job. The parameters of the operation will be passed to the job. It's a good practice to define dataflow_* parameters in the default_args of the dag like the project, zone and staging location. ``` default_args = { 'dataflow_default_options': { 'project': 'my-gcp-project',...
62598fbd5fcc89381b266236
class APIResourceNotFoundError(APIError): <NEW_LINE> <INDENT> def __init__(self, field, message=''): <NEW_LINE> <INDENT> super(APIResourceNotFoundError, self).__init__('value:notfound', field, message)
Indicate the resource was not found. The data specifies the resource name. 表明找不到资源,data说明资源名字
62598fbd66673b3332c305a5
class TelegramPoll(BaseTelegramBotEntity): <NEW_LINE> <INDENT> def __init__(self, bot, hass, allowed_chat_ids): <NEW_LINE> <INDENT> BaseTelegramBotEntity.__init__(self, hass, allowed_chat_ids) <NEW_LINE> self.update_id = 0 <NEW_LINE> self.websession = async_get_clientsession(hass) <NEW_LINE> self.update_url = '{0}/getU...
Asyncio telegram incoming message handler.
62598fbd97e22403b383b0db
class AsyncResponse(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.error = None <NEW_LINE> self.version = None <NEW_LINE> self.status = None <NEW_LINE> self.reason = None <NEW_LINE> self.headers = None <NEW_LINE> self.body = None <NEW_LINE> self.json_body = None <NEW_LINE> self.request = None...
Store the response of asynchronous request When get the response, user should check if error is None (which means no Exception happens). If error is None, then should check if the status is expected.
62598fbd50812a4eaa620cd4
class ModifyDDoSPolicyCaseResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Success = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("Success") is not None: <NEW_LINE> <INDENT> self.Success = SuccessCode...
ModifyDDoSPolicyCase response structure.
62598fbd2c8b7c6e89bd399a
class AsyncWithWrapper: <NEW_LINE> <INDENT> def __init__(self, ctxmanager, *args, **kwargs): <NEW_LINE> <INDENT> self.manager = ctxmanager(*args, **kwargs) <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> return self.manager.__enter__() <NEW_LINE> <DEDENT> def __exit__(self, exc_type, exc_val, exc_tb): <NEW...
A wrapper that allows using a ``with`` context manager with ``async with``.
62598fbd55399d3f056266e9
class start_page(ProtectedPage): <NEW_LINE> <INDENT> def GET(self): <NEW_LINE> <INDENT> log.clear(NAME) <NEW_LINE> cmd = "sudo chkconfig watchdog on" <NEW_LINE> run_process(cmd) <NEW_LINE> cmd = "sudo /etc/init.d/watchdog start" <NEW_LINE> run_process(cmd) <NEW_LINE> restart(3) <NEW_LINE> return self.core_render.restar...
Start watchdog service page
62598fbd92d797404e388c4d