code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class Config(object): <NEW_LINE> <INDENT> MONGO_HOST = '127.0.0.1' <NEW_LINE> MONGO_PORT = 27017 <NEW_LINE> MONGO_DB_NAME = 'dbzipcode' <NEW_LINE> POSTMAN_ENDPOINT = 'http://api.postmon.com.br/v1/cep/'
App configuration
62598ee53539df3088eca92b
class Solution: <NEW_LINE> <INDENT> def twoSum6(self, nums, target): <NEW_LINE> <INDENT> if len(nums) < 2: <NEW_LINE> <INDENT> return 0 <NEW_LINE> <DEDENT> hash = {} <NEW_LINE> res = 0 <NEW_LINE> for i in range(len(nums)): <NEW_LINE> <INDENT> if target - nums[i] in hash and hash[target - nums[i]] == False: <NEW_LINE> <...
@param: nums: an array of integer @param: target: An integer @return: An integer
62598ee5236d856c2adc8750
class PyCalcUi(QMainWindow): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.setWindowTitle('PyCalc') <NEW_LINE> self.setFixedSize(235, 235) <NEW_LINE> self.generalLayout = QVBoxLayout() <NEW_LINE> self._centralWidget = QWidget(self) <NEW_LINE> self.setCentralWidget(self._...
PyCalc's View (GUI).
62598ee557b8e32f52507441
class Config(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.path = Section() <NEW_LINE> self.path.root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) <NEW_LINE> self.path.config = os.path.join(self.path.root, 'config') <NEW_LINE> self.hostname = socket.gethostname() <NEW_LIN...
MODEL: 1. Files specified in the "include" attribute are read recursively. 2. Starts with "include" set to ["environment.py", "system.py"] 3. These may include other customization files that override standard config. 4. Do not check in these customization files. 5. Word "hostname" in names is replaced by the actual ho...
62598ee56aa9bd52df0d3529
class IorHdf5(IorTestBase): <NEW_LINE> <INDENT> def test_ior_hdf5(self): <NEW_LINE> <INDENT> self.run_ior_with_pool() <NEW_LINE> <DEDENT> def test_ior_hdf5_vol(self): <NEW_LINE> <INDENT> hdf5_plugin_path = self.params.get("plugin_path", '/run/hdf5_vol/*') <NEW_LINE> mount_dir = self.params.get("mount_dir", "/run/dfuse/...
Test class Description: Runs IOR/HDF5 on 2 server with basic parameters. :avocado: recursive
62598ee5d7e4931a7ef3a717
class _Getch: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.impl = _GetchWindows() <NEW_LINE> <DEDENT> except ImportError: <NEW_LINE> <INDENT> self.impl = _GetchUnix() <NEW_LINE> <DEDENT> <DEDENT> def getch(self): return self() <NEW_LINE> def __call__(self): return self.im...
Gets a single character from standard input. Does not echo to the screen.
62598ee501c39578d7f11422
@inherit_doc <NEW_LINE> class MulticlassClassificationEvaluator(JavaEvaluator, HasLabelCol, HasPredictionCol, JavaMLReadable, JavaMLWritable): <NEW_LINE> <INDENT> metricName = Param(Params._dummy(), "metricName", "metric name in evaluation " "(f1|weightedPrecision|weightedRecall|accuracy)", typeConverter=TypeConverters...
.. note:: Experimental Evaluator for Multiclass Classification, which expects two input columns: prediction and label. >>> scoreAndLabels = [(0.0, 0.0), (0.0, 1.0), (0.0, 0.0), ... (1.0, 0.0), (1.0, 1.0), (1.0, 1.0), (1.0, 1.0), (2.0, 2.0), (2.0, 0.0)] >>> dataset = spark.createDataFrame(scoreAndLabels, ["predict...
62598ee55fdd1c0f98e5c628
class NBestList(object): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> raise AttributeError("No constructor defined") <NEW_LINE> <DEDENT> __repr__ = _swig_repr <NEW_LINE> def...
Proxy of C NBestList struct
62598ee5435de62698e9a44f
class Observer (object): <NEW_LINE> <INDENT> class Status (object): <NEW_LINE> <INDENT> INACTIVE = 0 <NEW_LINE> ACTIVE = 1 <NEW_LINE> <DEDENT> def __init__ (self, sl, res, token): <NEW_LINE> <INDENT> self.status = self.Status.INACTIVE <NEW_LINE> self.res = res <NEW_LINE> self._slave = sl <NEW_LINE> self._token = token ...
An object of class Observer represents a declared observer. An observer observes a resource on a slave with some parameters. Resource and slave may not always exist: an observer may be created when the slave is not up, or the slave may stop at any time (to preserve battery life for example) during the observation perio...
62598ee54e4d562566370a92
class CmdProgressBar(object): <NEW_LINE> <INDENT> def __init__(self, total_width=80, prefix=""): <NEW_LINE> <INDENT> self.prog_bar = "[]" <NEW_LINE> self.width = total_width <NEW_LINE> self.prefix = prefix <NEW_LINE> self.amount = 0 <NEW_LINE> self.update_amount(0) <NEW_LINE> <DEDENT> def update_amount(self, new = 0): ...
Creates a text-based progress bar. Call the object to update and print the progress bar. The progress will look as shown below. 22% [======== ] The progress bar's width is specified on init.
62598ee566656f66f7d58a5a
class TTSConverter: <NEW_LINE> <INDENT> def __init__(self, audio_folder, language='en', slow=False): <NEW_LINE> <INDENT> self.language = language <NEW_LINE> self.slow = slow <NEW_LINE> self._audio_dir = audio_folder <NEW_LINE> if not os.path.exists(self._audio_dir): <NEW_LINE> <INDENT> os.makedirs(self._audio_dir) <NEW...
Convert text to speech using the Google Text-to-Speech-API. Attributes: language (string): language code for desired language slow (bool): whether the speech should be slower than default
62598ee532920d7e50bc46a6
class _JSONEncoder(json.JSONEncoder): <NEW_LINE> <INDENT> def default(self, obj): <NEW_LINE> <INDENT> if isinstance(obj, decimal.Decimal): <NEW_LINE> <INDENT> return str(obj) <NEW_LINE> <DEDENT> return super(_JSONEncoder, self).default(obj)
JSON编码
62598ee5d268445f26638ecb
class TransformationContext: <NEW_LINE> <INDENT> def __init__(self, before, between, after): <NEW_LINE> <INDENT> if not all(isinstance(comp, circuit.Circuit) for comp in [before, between, after]): <NEW_LINE> <INDENT> raise TypeError( 'before, between and after must be Circuits (found types: %s)' %', '.join(type(comp)._...
Represents the operations which remain untouched under a operation. There are three groups of operations split along the time axis of the circuit, each one represented by an instance of Circuit: * "before": the operations which are to be executed before the operations in the focus. * "between": the operations which ...
62598ee5d7e4931a7ef3a718
class Model(object): <NEW_LINE> <INDENT> def __init__(self, *args, **kwds): <NEW_LINE> <INDENT> self.mesh = kwds['mesh'] <NEW_LINE> self.elements = {} <NEW_LINE> self.nodes = self.mesh.nodes <NEW_LINE> self.group_no = self.mesh.group_no <NEW_LINE> logging.debug("Model created") <NEW_LINE> <DEDENT> def assign_bc(self,*a...
General model function
62598ee530dc7b766599df02
class Generic_dbutils(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tname(self, table): <NEW_LINE> <INDENT> if table != "biosequence": <NEW_LINE> <INDENT> return table <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> return "bioentry" <NEW_LINE> <DEDENT> <DEDENT> def las...
Default database utilities.
62598ee5379a373c97d97674
class Workload(metaclass=abc.ABCMeta): <NEW_LINE> <INDENT> @abc.abstractmethod <NEW_LINE> def __init__(self, delegate, args): <NEW_LINE> <INDENT> self._delegate = delegate <NEW_LINE> <DEDENT> @property <NEW_LINE> def delegate(self): <NEW_LINE> <INDENT> return self._delegate <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_...
This is meant to be an abstract base class for all workloads. As such, it doesn't do anything useful besides define the interface that the workload generator expects and hold onto one property for derived classes.
62598ee556b00c62f0fb0f4a
class Config(object): <NEW_LINE> <INDENT> def __init__(self, config_file): <NEW_LINE> <INDENT> self.config_file = config_file <NEW_LINE> self._app_settings = {} <NEW_LINE> if not os.path.isfile(config_file): <NEW_LINE> <INDENT> raise ConfigError('Failed to find config file "%s"' % config_file) <NEW_LINE> <DEDENT> tree ...
Class for reading and writing to the config file
62598ee5462c4b4f79dba074
class Schematizer: <NEW_LINE> <INDENT> class Result(namedtuple('Result', ['columns', 'errors'])): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> <DEDENT> def __init__(self, columns=None, requester=None): <NEW_LINE> <INDENT> self._columns = columns <NEW_LINE> self._requester = requester if requester else Requester() <NEW...
A Schematizer is initialized with an expected set of Column instances and a Requester instance, and can then perform schematization on URIs retrieved through the Requester.
62598ee54e4d562566370a93
class V1beta1RoleList(object): <NEW_LINE> <INDENT> def __init__(self, kind=None, api_version=None, metadata=None, items=None): <NEW_LINE> <INDENT> self.swagger_types = { 'kind': 'str', 'api_version': 'str', 'metadata': 'V1ListMeta', 'items': 'list[V1beta1Role]' } <NEW_LINE> self.attribute_map = { 'kind': 'kind', 'api_v...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598ee591f36d47f22301e0
class GlobalDeclarations(ModuleAnalysis): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.result = dict() <NEW_LINE> super(GlobalDeclarations, self).__init__() <NEW_LINE> <DEDENT> def visit_Module(self, node): <NEW_LINE> <INDENT> duc = SilentDefUseChains() <NEW_LINE> duc.visit(node) <NEW_LINE> self.res...
Gather all kind of identifier defined at global scope. >>> import gast as ast >>> from pythran import passmanager >>> from pythran.analyses import GlobalDeclarations >>> node = ast.parse(''' ... import math ... import math as maths ... from math import cos ... c = 12 ... def foo(a): ... b = a + 1''') >>> pm = pass...
62598ee5a8370b77170eea5e
class Logger(object): <NEW_LINE> <INDENT> DEFAULT_LOGGING = { 'version': 1, 'disable_existing_loggers': True, 'root': { 'level': 'NOTSET', 'handlers': ['file'], }, 'handlers': { 'file': { 'level': 'DEBUG', 'class': 'logging.handlers.RotatingFileHandler', 'filename': LOGFILE, 'mode': 'a', 'maxBytes': 10485760, 'backupCo...
Pseudo-Class for Logger - Wrapper for logging module
62598ee5cc0a2c111447967d
class ArchiveLayout: <NEW_LINE> <INDENT> def __init__(self, archivePath, uid, timestamp=""): <NEW_LINE> <INDENT> self.__archivePath = archivePath <NEW_LINE> self.__uid = uid <NEW_LINE> self.__timestamp = timestamp <NEW_LINE> if (not len(timestamp) > 0): <NEW_LINE> <INDENT> self.__timestamp = datetime.datetime.now().str...
This class will generate the paths based on a given archivePath and uid for all the directories that will be used by sx. Example of Layout: Compressed Reports Path: ~/sxarchive/creports/15555553/2.17-04-18_123703 Extracted Reports Path: ~/sxarchive/ereports/15555553/2.17-04-18_123703 Non-report Files Path: ~/...
62598ee560cbc95b063629b7
class Executor(object): <NEW_LINE> <INDENT> def __init__(self, timeout=None): <NEW_LINE> <INDENT> self.logger = logging.getLogger(self.__class__.__name__) <NEW_LINE> self.timeout = timeout <NEW_LINE> <DEDENT> def _timeout(self, proc): <NEW_LINE> <INDENT> if proc.poll() is None: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDE...
A convenient way to run external commands with :class:`subprocess.Popen`
62598ee592d797404e387eb8
class State: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.subset = set() <NEW_LINE> self.concepts = Counter() <NEW_LINE> self.length = 0 <NEW_LINE> self.score = 0
State class Internal class used as a structure to keep track of the search state in the tabu_search method. Args: subset (set): a subset of sentences concepts (Counter): a set of concepts for the subset length (int): the length in words score (int): the score for the subset
62598ee538b623060ffa7711
class PriceQtyOverride(models.Model): <NEW_LINE> <INDENT> base_price = models.ForeignKey(ProductPrice, related_name='qty_overrides') <NEW_LINE> min_qty = models.DecimalField(_("minimal quantity"), max_digits=10, decimal_places=4) <NEW_LINE> price = models.DecimalField(_("unit price"), max_digits=12, decimal_places=4) <...
Overrides price of product unit, depending of total quantity being sold.
62598ee5236d856c2adc8751
class SubstanceCheck(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "substance.check" <NEW_LINE> bl_label = "Check the number version and path to Substance Painter" <NEW_LINE> path = bpy.props.StringProperty( name="Substance Painter Path", ) <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> user_preferen...
Tooltip
62598ee5e64d504609df86fc
class Catfact: <NEW_LINE> <INDENT> def __init__(self, bot): <NEW_LINE> <INDENT> self.bot = bot <NEW_LINE> <DEDENT> @commands.command(name="catfact") <NEW_LINE> async def _cookie(self, ctx): <NEW_LINE> <INDENT> with open('catfacts.json', encoding='utf-8') as cat_file: <NEW_LINE> <INDENT> catdata = json.loads(cat_file.re...
Random Cat Fact.
62598ee5f548e778e5969c10
class HasCheckpointInterval(Params): <NEW_LINE> <INDENT> checkpointInterval = Param(Params._dummy(), "checkpointInterval", "checkpoint interval (>= 1)") <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(HasCheckpointInterval, self).__init__() <NEW_LINE> self.checkpointInterval = Param(self, "checkpointInterval",...
Mixin for param checkpointInterval: checkpoint interval (>= 1).
62598ee5498bea3a75a561b1
class ReLU(function.Function): <NEW_LINE> <INDENT> def __init__(self, use_cudnn=True): <NEW_LINE> <INDENT> self.use_cudnn = use_cudnn <NEW_LINE> <DEDENT> def check_type_forward(self, in_types): <NEW_LINE> <INDENT> type_check.expect( in_types.size() == 1, in_types[0].dtype == numpy.float32 ) <NEW_LINE> <DEDENT> def forw...
Rectified Linear Unit.
62598ee576e4537e8c3edc33
class DykstrasProjectionAlgorithm(bases.ExplicitAlgorithm): <NEW_LINE> <INDENT> INTERFACES = [properties.Function, properties.ProjectionOperator] <NEW_LINE> def __init__(self, output=False, eps=consts.TOLERANCE, max_iter=10000, min_iter=1): <NEW_LINE> <INDENT> self.output = output <NEW_LINE> self.eps = eps <NEW_LINE> s...
Dykstra's projection algorithm. Computes the projection onto the intersection of two convex sets. The functions have projection operators (ProjectionOperator.proj) onto the corresponding convex sets.
62598ee5aad79263cf42ce85
class DerivedConstraint: <NEW_LINE> <INDENT> def __init__(self, variables, problem=None, weight=1, record=True): <NEW_LINE> <INDENT> self.variables = variables <NEW_LINE> self.problem = problem <NEW_LINE> self.weight = weight <NEW_LINE> self.record = record <NEW_LINE> self.init_constraints() <NEW_LINE> <DEDENT> def ini...
Abstract class for constraints that are equivalent to a conjunction of primitive or derived constraints.
62598ee501c39578d7f11424
class TestAuthorCoinstitution(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> wos_data = rd.wos.parse("./testin/authorinstitutions_test.txt") <NEW_LINE> meta_list = rd.wos.convert(wos_data) <NEW_LINE> self.node_attribs_check = nt.authors.author_coinstitution(meta_list, 1) <NE...
Test the author_coinstitution network Assumes reader is functioning the //testin/authorinstitution_testrecords.txt file is constructed with the following properties: the first paper has 6 authors and 6 institutions , where one author Wu,ZD shares affiliations with 2 other different institutions and authors. t...
62598ee5097d151d1a2bf69b
class WaitOnPinCommand(Packet): <NEW_LINE> <INDENT> CMD = 0x25 <NEW_LINE> dtype = 'B' <NEW_LINE> COUNT = 1 <NEW_LINE> DEFAULT_DATA = 17
Like Dwell: suspend execution until input pin goes high. Right now only pin 17 is supported.
62598ee5e76e3b2f99fd70b3
class StrSeq(Template): <NEW_LINE> <INDENT> def __init__(self, split=True, default=REQUIRED): <NEW_LINE> <INDENT> super(StrSeq, self).__init__(default) <NEW_LINE> self.split = split <NEW_LINE> <DEDENT> def _convert_value(self, x, view): <NEW_LINE> <INDENT> if isinstance(x, util.STRING): <NEW_LINE> <INDENT> return x <NE...
A template for values that are lists of strings. Validates both actual YAML string lists and single strings. Strings can optionally be split on whitespace.
62598ee530bbd722464682b4
class ServerConnectionError(Exception): <NEW_LINE> <INDENT> pass
Server connection exception.
62598ee57d847024c075aa4a
class WhoisPl(WhoisEntry): <NEW_LINE> <INDENT> regex = { 'domain_name': 'DOMAIN NAME: *(.+)\n', 'registrar': 'REGISTRAR:\n\s*(.+)', 'registrar_url': 'URL: *(.+)', 'status': 'Registration status:\n\s*(.+)', 'registrant_name': ...
Whois parser for .pl domains
62598ee54e4d562566370a94
class DiffInfo(Record): <NEW_LINE> <INDENT> diff_type = SafeProperty( coerce=_coerce_diff, isa=DiffTypes.EnumValue, required=True, doc="Enumeration describing the type of difference; a " ":py:class:`DiffType` value.") <NEW_LINE> base = SafeProperty( isa=FieldSelector, required=True, doc="A FieldSelector object referrin...
Container for storing diff information that can be used to reconstruct the values diffed.
62598ee532920d7e50bc46a8
class TokenCredentials(OAuthCredentials): <NEW_LINE> <INDENT> def __init__(self, consumer_key, consumer_secret, access_token_key, access_token_secret, api=None): <NEW_LINE> <INDENT> super(TokenCredentials, self).__init__(api=api, consumer_key=consumer_key, consumer_secret=consumer_secret, token_key=access_token_key, to...
OAuth authorization schema, which contains both consumer and access token credentials. This is the most frequently used schema for API call on behalf of a user, who authorized the application in the "three-stage dance". Access token is usually stored along with user information permanently.
62598ee5f9cc0f698b1c460c
class Dbpw(Base): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> os.system("aws ssm get-parameter --name \"/local/CFG_MYSQL_MASTER_PASS\" --with-decryption --query 'Parameter.Value' --output text")
Generates Database PW from AWS
62598ee57d43ff2487426739
class ImageDownloadableMediaMessageProtocolEntity(DownloadableMediaMessageProtocolEntity): <NEW_LINE> <INDENT> def __init__(self, mimeType, fileHash, url, ip, size, fileName, encoding, width, height, caption = None, _id = None, _from = None, to = None, notify = None, timestamp = None, participant = None, preview = None...
<message t="{{TIME_STAMP}}" from="{{CONTACT_JID}}" offline="{{OFFLINE}}" type="text" id="{{MESSAGE_ID}}" notify="{{NOTIFY_NAME}}"> <media type="{{DOWNLOADABLE_MEDIA_TYPE: (image | audio | video)}}" mimetype="{{MIME_TYPE}}" filehash="{{FILE_HASH}}" url="{{DOWNLOAD_URL}}" ip="{{...
62598ee5379a373c97d97676
class TensorForestEstimator(estimator.Estimator): <NEW_LINE> <INDENT> def __init__(self, params, device_assigner=None, model_dir=None, graph_builder_class=tensor_forest.RandomForestGraphs, config=None, weights_name=None, keys_name=None, feature_engineering_fn=None, early_stopping_rounds=100, num_trainers=1, trainer_id=...
An estimator that can train and evaluate a random forest. Example: ```python params = tf.contrib.tensor_forest.python.tensor_forest.ForestHParams( num_classes=2, num_features=40, num_trees=10, max_nodes=1000) # Estimator using the default graph builder. estimator = TensorForestEstimator(params, model_dir=model_d...
62598ee58e71fb1e983ba0e6
class DecodedFormatter(logging.Formatter): <NEW_LINE> <INDENT> def format(self, record): <NEW_LINE> <INDENT> message = super(DecodedFormatter, self).format(record) <NEW_LINE> if message.startswith('b\''): <NEW_LINE> <INDENT> message = message.split('\'')[1] <NEW_LINE> <DEDENT> return message
Custom formatter to remove the b'' from the logged text
62598ee563b5f9789fe837d9
class DriverProfile(models.Model): <NEW_LINE> <INDENT> user = models.OneToOneField( "users.User", on_delete=models.CASCADE, related_name="driverprofile_user", ) <NEW_LINE> photo = models.URLField() <NEW_LINE> timestamp_created = models.DateTimeField(auto_now_add=True,) <NEW_LINE> last_updated = models.DateTimeField(aut...
Generated Model
62598ee54428ac0f6e656bce
class Departamento: <NEW_LINE> <INDENT> def __init__(self, nombre_depto, id_depto): <NEW_LINE> <INDENT> self.nombre_depto = nombre_depto <NEW_LINE> self.id_depto = id_depto <NEW_LINE> self.lista_empleados = [] <NEW_LINE> <DEDENT> def aniadir_empleado(self, empleado): <NEW_LINE> <INDENT> self.lista_empleados.append(empl...
Clase para gestionar departamentos
62598ee5462c4b4f79dba076
class AgentStatusWatcher_t(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.testInit = TestInit(__file__) <NEW_LINE> self.testInit.setLogging() <NEW_LINE> self.testInit.setDatabaseConnection() <NEW_LINE> self.reqmonDBName = "wmstat_t" <NEW_LINE> self.localDBName = "wmstat_t_local" <NEW_...
TestCase for AgentStatustWatcher module
62598ee53c8af77a43b67271
class itkImageToImageFilterLM3LM3(itkImageSourceLM3): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") <NEW_LINE> __repr__ = _swig_repr <NEW_LINE> Inp...
Proxy of C++ itkImageToImageFilterLM3LM3 class
62598ee5aad79263cf42ce86
@swagger.tags('User_Resource') <NEW_LINE> class User_routes(Resource): <NEW_LINE> <INDENT> @swagger.reorder_with(UsersSHEMA, response_code=200,description='OK') <NEW_LINE> @swagger.reorder_with(MessageSHEMA, response_code=404,description='User does not exists') <NEW_LINE> def get(self, user_id: int): <NEW_LINE> <INDENT...
Restful class for user routes
62598ee5a8370b77170eea60
class ShiftRuleManager(models.Manager): <NEW_LINE> <INDENT> def get_queryset(self): <NEW_LINE> <INDENT> query_set = super().get_queryset() <NEW_LINE> return query_set.select_related("shift").prefetch_related("roles")
ShiftRule Manager.
62598ee5cc0a2c111447967f
class TestSynsetResponseEntity(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 testSynsetResponseEntity(self): <NEW_LINE> <INDENT> pass
SynsetResponseEntity unit test stubs
62598ee591f36d47f22301e1
class Client(object): <NEW_LINE> <INDENT> def __init__( self, user, password, host=None, unix_socket=None, driver=u"mysql" ): <NEW_LINE> <INDENT> self._host = host <NEW_LINE> self._unix_socket = unix_socket <NEW_LINE> self._user = user <NEW_LINE> self._password = password <NEW_LINE> self._driver = driver <NEW_LINE> <DE...
Serialize MySQL requests.
62598ee54a966d76dd5ed560
class DataGenerator(keras.utils.Sequence): <NEW_LINE> <INDENT> def __init__(self, dataset, batch_size=32, shuffle=True): <NEW_LINE> <INDENT> self.dataset = dataset <NEW_LINE> self.batch_size = batch_size <NEW_LINE> self.shuffle = shuffle <NEW_LINE> self.num_classes = self.dataset.labels.max() + 1 <NEW_LINE> self.on_epo...
Generates Localization dataset for Keras
62598ee555399d3f05624bae
class LiveConfig(AppConfig): <NEW_LINE> <INDENT> name = "server.live"
AppConfig for live.
62598ee57b25080760ed5b16
class TypenameAndInstantiations: <NEW_LINE> <INDENT> rule = ( IDENT("typename") + Optional( EQUAL + LBRACE + ((delimitedList(TemplatedType.rule ^ Typename.rule) ("instantiations"))) + RBRACE )).setParseAction(lambda t: Template.TypenameAndInstantiations( t.typename, t.instantiations)) <NEW_LINE> def __init__(self, type...
Rule to parse the template parameters. template<typename POSE> // POSE is the Instantiation.
62598ee55166f23b2e241a53
class OutputLayer(Module): <NEW_LINE> <INDENT> def __init__(self, dimension): <NEW_LINE> <INDENT> Module.__init__(self) <NEW_LINE> self.dimension = dimension <NEW_LINE> <DEDENT> def forward(self, input): <NEW_LINE> <INDENT> output = OutputLayerFunction.apply( self.dimension, input.metadata, input.features ) <NEW_LINE> ...
Used in conjunction with an InputLayer for 'autoencoder' style networks Takes a SparseConvNetTensor and results a float Tensor of size N x n_feature_planes N is defined by the InputLayer Behavior during forward-/back-propagation depends on the InputLayer's mode
62598ee538b623060ffa7713
class LogisticRegressionModel(JavaModel): <NEW_LINE> <INDENT> @property <NEW_LINE> def weights(self): <NEW_LINE> <INDENT> warnings.warn("weights is deprecated. Use coefficients instead.") <NEW_LINE> return self._call_java("weights") <NEW_LINE> <DEDENT> @property <NEW_LINE> @since("1.6.0") <NEW_LINE> def coefficients(se...
Model fitted by LogisticRegression.
62598ee5236d856c2adc8752
class TradeDate(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.utc_time = 0.0 <NEW_LINE> self.strtime = ''
交易日期、时间
62598ee5e64d504609df86fd
class Square: <NEW_LINE> <INDENT> def __init__(self, size=0): <NEW_LINE> <INDENT> self.size = size <NEW_LINE> <DEDENT> @property <NEW_LINE> def size(self): <NEW_LINE> <INDENT> return self.__size <NEW_LINE> <DEDENT> @size.setter <NEW_LINE> def size(self, value): <NEW_LINE> <INDENT> if not isinstance(value, int): <NEW_LI...
establish object Square
62598ee53317a56b869bd8a5
class InvalidURLError(Exception): <NEW_LINE> <INDENT> pass
Exception raised when Soledad encounters a malformed URL.
62598ee5f7d966606f74666d
class S3MainMenu(default.S3MainMenu): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def menu_modules(cls): <NEW_LINE> <INDENT> AUTHENTICATED = current.session.s3.system_roles.AUTHENTICATED <NEW_LINE> return [ MM("Contacts", c="hrm", f="staff")( ), MM("Facilities", c="org", f="facility", m="summary", restrict=[AUTHENTICAT...
Custom Application Main Menu: The main menu consists of several sub-menus, each of which can be customised separately as a method of this class. The overall composition of the menu is defined in the menu() method, which can be customised as well: Function Sub-Menu Access to (standard) menu_modu...
62598ee5090684286d592a1e
class Parser: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.filename = "" <NEW_LINE> self._errors = [] <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def __find_column(token): <NEW_LINE> <INDENT> last_cr = token.lexer.lexdata.rfind('\n', 0, token.lexpos) <NEW_LINE> if last_cr < 0: <NEW_LINE> <INDENT> l...
Parser class
62598ee5f548e778e5969c12
@dataclass(frozen=True) <NEW_LINE> class UnableToGetAgentMetadata(ReportItemMessage): <NEW_LINE> <INDENT> agent: str <NEW_LINE> reason: str <NEW_LINE> _code = codes.UNABLE_TO_GET_AGENT_METADATA <NEW_LINE> @property <NEW_LINE> def message(self) -> str: <NEW_LINE> <INDENT> return ( f"Agent '{self.agent}' is not installed...
There were some issues trying to get metadata of agent agent -- agent which metadata were unable to obtain reason -- reason of failure
62598ee5e5267d203ee69f82
class LocationSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(LocationSerializer, self).__init__(*args, **kwargs) <NEW_LINE> <DEDENT> class Meta: <NEW_LINE> <INDENT> model = Location
Serialize Location Model.
62598ee5ac7a0e7691f70b93
class WechatParser(BaseNewsParser): <NEW_LINE> <INDENT> CONF = TaskConfWechatParser <NEW_LINE> def parse_index(self, response): <NEW_LINE> <INDENT> r = re.compile(self._conf.url_re, re.UNICODE) <NEW_LINE> i = r.groups <NEW_LINE> for m in r.finditer(response.body_as_unicode()): <NEW_LINE> <INDENT> yield m.group(i) <NEW_...
微信抓站解析
62598ee5baa26c4b54d4d94c
@ddt.ddt <NEW_LINE> class PaginateSearchResultsTestCase(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(PaginateSearchResultsTestCase, self).setUp() <NEW_LINE> self.default_size = 6 <NEW_LINE> self.default_page = 1 <NEW_LINE> self.search_results = { "count": 3, "took": 1, "results": [ { '_id':...
Test cases for paginate_search_results method
62598ee5097d151d1a2bf69d
class NSResourceData: <NEW_LINE> <INDENT> def __init__(self, message, offset): <NEW_LINE> <INDENT> self.name = decode_string(message, offset)[1] <NEW_LINE> <DEDENT> def print(self): <NEW_LINE> <INDENT> print(' NS: {0}'.format(self.name))
resource data class
62598ee566656f66f7d58a5e
class UnknownRepository(CydraError): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return "The Project %s does not contain a repository named %s of type %s" % (self.project_name, self.repository_name, self.repository_type)
Repository that was asked for is unknown Params: repository_name: name of the repository repository_type: type of the repository project_name: name of project the repository is in
62598ee5d268445f26638ecd
class GaussianSimilarityTMSE(nn.Module): <NEW_LINE> <INDENT> def __init__(self, threshold=4, sigma=1.0, ignore_index=255): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.threshold = threshold <NEW_LINE> self.ignore_index = ignore_index <NEW_LINE> self.mse = nn.MSELoss(reduction='none') <NEW_LINE> self.sigma = s...
Temporal MSE Loss Function with Gaussian Similarity Weighting
62598ee58e71fb1e983ba0e8
class Verb(object): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.name = self.__class__.__name__ <NEW_LINE> self.body = None <NEW_LINE> self.nestables = None <NEW_LINE> self.verbs = [] <NEW_LINE> self.attrs = {} <NEW_LINE> for k, v in kwargs.items(): <NEW_LINE> <INDENT> if k == "sender": k ...
KooKoo basic verb object.
62598ee5435de62698e9a454
class Observer(object): <NEW_LINE> <INDENT> def __init__(self, manager): <NEW_LINE> <INDENT> self.manager = manager <NEW_LINE> self.callback = None <NEW_LINE> <DEDENT> def set_callback(self, func): <NEW_LINE> <INDENT> self.callback = func <NEW_LINE> <DEDENT> def watch(self): <NEW_LINE> <INDENT> spinner = yaspin(text="W...
Class to model a modification observer.
62598ee563b5f9789fe837db
class UserProfileManager(BaseUserManager): <NEW_LINE> <INDENT> def create_user(self, email, name, password=None): <NEW_LINE> <INDENT> if not email: <NEW_LINE> <INDENT> raise ValueError('Users Must Have An Email Address.') <NEW_LINE> <DEDENT> email = self.normalize_email(email) <NEW_LINE> user = self.model(email=email, ...
Helps Django work with our custom user model.
62598ee599cbb53fe682f52f
class Spinner: <NEW_LINE> <INDENT> def __init__(self, step): <NEW_LINE> <INDENT> self._n = self._x = 0 <NEW_LINE> self._chars = "\\|/-" <NEW_LINE> self._step = step <NEW_LINE> <DEDENT> def spin(self): <NEW_LINE> <INDENT> self._n += 1 <NEW_LINE> if self._n % self._step == 0: <NEW_LINE> <INDENT> sys.stdout.write("\b" + s...
Displays an ASCII spinner
62598ee5097d151d1a2bf69e
@api.route("/vowel-service") <NEW_LINE> class VowelService(Resource): <NEW_LINE> <INDENT> def post(self): <NEW_LINE> <INDENT> vowels_in_word = "" <NEW_LINE> new_message = "" <NEW_LINE> for chr in api.payload["message"]: <NEW_LINE> <INDENT> if chr in "AEIOUaeiou": <NEW_LINE> <INDENT> vowels_in_word = vowels_in_word + ch...
Reverse value of key "message
62598ee54e4d562566370a97
class GetObjectAllMixin(): <NEW_LINE> <INDENT> model_class = None <NEW_LINE> def get_object(self): <NEW_LINE> <INDENT> assert self.model_class is not None, ( "'%s' did not set model_class" % self.__class__.__name__ ) <NEW_LINE> queryset = self.filter_queryset(self.model_class.objects.all()) <NEW_LINE> lookup_url_kwarg ...
A mixin that provides an override of the get_object method. Useful when we want both a filtered get_queryset but also want the get_object method to provide 401 (unauthorized) and 403 (forbidden) errors not just 404 (not found).
62598ee50a50d4780f703a28
class Student: <NEW_LINE> <INDENT> def __init__(self, first_name, last_name, age): <NEW_LINE> <INDENT> self.first_name = first_name <NEW_LINE> self.last_name = last_name <NEW_LINE> self.age = age <NEW_LINE> <DEDENT> def to_json(self, attrs=None): <NEW_LINE> <INDENT> if type(attrs) is list and all(type(t) is str for t i...
Class that defines a student
62598ee5cad5886f8bdc397f
class RecipeSource: <NEW_LINE> <INDENT> def search(self, term): <NEW_LINE> <INDENT> raise NotImplemented()
Represents a source of raw recipes, e.g. a particular recipe website.
62598ee591f36d47f22301e2
class CreateArgparserTest(TestCase): <NEW_LINE> <INDENT> def test_happy(self): <NEW_LINE> <INDENT> def parser_callback(parser): <NEW_LINE> <INDENT> self.assertEqual(type(parser), ArgumentParser, 'parser in callback must be ArgumentParser') <NEW_LINE> <DEDENT> parser = create_argparser('Some description', parser_callbac...
Test the create_argparser method.
62598ee54f6381625f1987fb
class EntityDeleteMixin(object): <NEW_LINE> <INDENT> def delete_raw(self): <NEW_LINE> <INDENT> return client.delete( self.path(which='self'), **self._server_config.get_client_kwargs() ) <NEW_LINE> <DEDENT> def delete(self, synchronous=True): <NEW_LINE> <INDENT> response = self.delete_raw() <NEW_LINE> response.raise_for...
This mixin provides the ability to delete an entity. The methods provided by this class work together. The call tree looks like this:: delete → delete_raw In short, here is what the methods do: :meth:`delete_raw` Make an HTTP DELETE request to the server. :meth:`delete` Check the server's response for e...
62598ee5fbf16365ca792721
class FailureDefinitionAccessor(object,IDisposable): <NEW_LINE> <INDENT> def Dispose(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def GetApplicableResolutionTypes(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def GetDefaultResolutionType(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def GetDescriptio...
A class that provides access to the details of a FailureDefinition after the definition has been defined.
62598ee555399d3f05624bb0
class PowerLawModel(FunctionModel1DAuto): <NEW_LINE> <INDENT> def f(self,x,A=1,p=1): <NEW_LINE> <INDENT> return A*x**p <NEW_LINE> <DEDENT> _fittypes=['linearized'] <NEW_LINE> fittype = 'leastsq' <NEW_LINE> def fitLinearized(self,x,y,fixedpars=(),**kwargs): <NEW_LINE> <INDENT> lm = LinearModel(m=self.p,b=np.log10(self.A...
A single power law model :math:`Ax^p`
62598ee5aad79263cf42ce88
class Port(Base): <NEW_LINE> <INDENT> __tablename__ = "port" <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> name = Column(String(256), nullable=False)
Contain all information about a Port
62598ee53eb6a72ae0388cc1
class TestFrameworkLoaderSaveConfig(BaseFrameworkLoader): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> super().setUpClass() <NEW_LINE> sys.path.append(get_data_dir()) <NEW_LINE> cls.testframeworks_dir = os.path.join(get_data_dir(), 'testframeworks') <NEW_LINE> <DEDENT> @classmeth...
This will test the dynamic framework loader activity being able to save some configurations
62598ee592d797404e387eba
class MockRecommenderFactory: <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> mock_legacy = MockRecommender({"abc": 1.0, "bcd": 1.1, "cde": 1.2}) <NEW_LINE> mock_locale = MockRecommender({"def": 2.0, "efg": 2.1, "fgh": 2.2, "abc": 2.3}) <NEW_LINE> mock_collaborative = MockRecommender( {"ghi": 3.0,...
A RecommenderFactory provides support to create recommenders. The existence of a factory enables injection of dependencies into the RecommendationManager and eases the implementation of test harnesses.
62598ee585dfad0860cbeda7
class ServerStateHandler(handler.ApiHandler): <NEW_LINE> <INDENT> @api.require(acl.has_access) <NEW_LINE> def get(self): <NEW_LINE> <INDENT> if model.is_primary(): <NEW_LINE> <INDENT> mode = 'primary' <NEW_LINE> <DEDENT> elif model.is_replica(): <NEW_LINE> <INDENT> mode = 'replica' <NEW_LINE> <DEDENT> else: <NEW_LINE> ...
Reports replication state of a service.
62598ee5090684286d592a1f
class TaskStartStatusView(TaskCompletionView): <NEW_LINE> <INDENT> def get_conditions_status(self): <NEW_LINE> <INDENT> return self.task.start_conditions_status() <NEW_LINE> <DEDENT> def get_state_status(self): <NEW_LINE> <INDENT> return self.task.starting_states_status()
View of the popup showing the start completion details of a created task. Display the status of each start condition of the task. Display the status of each subtask. Display if the starting state is matched or not.
62598ee563d6d428bbee0e4b
class LinterScope: <NEW_LINE> <INDENT> def __init__(self, linter_manager, linter_callable): <NEW_LINE> <INDENT> self.linter_manager = linter_manager <NEW_LINE> self.linter = linter_callable() <NEW_LINE> self.main_linter = linter_manager.linter <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> self.linter_man...
Linter Context manager. used when calling a rule function. Allows substitution of main linter for a linter that takes into account any applicable exclusions, if applicable.
62598ee5009cb60464cffbce
class KeyVaultReferenceResource(ProxyOnlyResource): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 't...
Web app key vault reference and status ARM resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :ivar name: Resource Name. :vartype name: str :ivar kind: Kind of resource. :vartype kind: str :ivar type: Resource type. :vartype type: ...
62598ee5e5267d203ee69f84
class BrandsInformationList(ListResource): <NEW_LINE> <INDENT> def __init__(self, version): <NEW_LINE> <INDENT> super(BrandsInformationList, self).__init__(version) <NEW_LINE> self._solution = {} <NEW_LINE> <DEDENT> def get(self): <NEW_LINE> <INDENT> return BrandsInformationContext(self._version, ) <NEW_LINE> <DEDENT> ...
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
62598ee58da39b475be0182a
class StackedState(object): <NEW_LINE> <INDENT> def __init__(self, state_shape=12, num_stack=4, goal_state=None,use_cuda=False): <NEW_LINE> <INDENT> self.state = torch.zeros(num_stack, state_shape) <NEW_LINE> self.num_stack = num_stack <NEW_LINE> self.state_shape = state_shape <NEW_LINE> self.use_cuda = use_cuda <NEW_L...
stacked state for Pepper
62598ee5dd821e528d6d75c4
class RemesaDetalle(DetailView): <NEW_LINE> <INDENT> model = Reporte <NEW_LINE> template_name = 'productividad/remesa_detalle.html' <NEW_LINE> context_object_name = 'reporte' <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super().get_context_data(**kwargs) <NEW_LINE> context['rem'] = Rem...
Clase para visualizar el informe de productividad
62598ee5fff4ab517ebcbe58
class Demo(object): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> attributes = _rtneuron.AttributeMap() <NEW_LINE> attributes.use_meshes = False <NEW_LINE> attributes.inflatable_neurons = True <NEW_LINE> self._gui = display_empty_scene_with_GUI( GUI, attributes, *args, **kwargs) <NEW_LINE...
Synaptic projections demo. This application allows the user to load a circuit and target set and then pick cells to see their anterograde and retrograde connections. See rtneuron.sceneops.SynapticProjections for details on how synaptic pathways are displayed.
62598ee51f5feb6acb1612d1
class MethodTypeCpInfo(KaitaiStruct): <NEW_LINE> <INDENT> SEQ_FIELDS = ["descriptor_index"] <NEW_LINE> def __init__(self, _io, _parent=None, _root=None): <NEW_LINE> <INDENT> self._io = _io <NEW_LINE> self._parent = _parent <NEW_LINE> self._root = _root if _root else self <NEW_LINE> self._debug = collections.defaultdict...
.. seealso:: Source - https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.9
62598ee5435de62698e9a456
class PaperIdentity(DisambiguationMixin): <NEW_LINE> <INDENT> paper = models.ForeignKey('Paper', related_name='instantiations') <NEW_LINE> instance = models.ForeignKey('PaperInstance', related_name='identities')
Represents the assertion that a :class:`.PaperInstance` refers to a specific :class:`.Paper`\.
62598ee56e29344779afecb0
class BidResponse(Object): <NEW_LINE> <INDENT> id = Field(String, required=True) <NEW_LINE> seatbid = Field(Array(SeatBid), required=True) <NEW_LINE> bidid = Field(String) <NEW_LINE> cur = Field(String) <NEW_LINE> customdata = Field(String) <NEW_LINE> ext = Field(String) <NEW_LINE> @staticmethod <NEW_LINE> def minimal(...
The top-level bid response object. The “id” attribute is a reflection of the bid request ID for logging purposes. Similarly, “bidid” is an optional response tracking ID for bidders. If specified, it can be included in the subsequent win notice call if the bidder wins. At least one “seatbid” object is required, which c...
62598ee53d592f4c4edb9575
class DumpIJSONSerializableTest(unittest.TestCase): <NEW_LINE> <INDENT> class MockJSONSerialiazable(object): <NEW_LINE> <INDENT> zope.interface.implements(interfaces.IJSONSerializable) <NEW_LINE> def to_json(self): <NEW_LINE> <INDENT> return [3, 2, 1] <NEW_LINE> <DEDENT> <DEDENT> @classmethod <NEW_LINE> def _call(cls, ...
Tests for letsencrypt.acme.util.dump_ijsonserializable.
62598ee5a79ad16197768698
class CustomUserSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> email = serializers.EmailField( required=True ) <NEW_LINE> username = serializers.CharField() <NEW_LINE> password = serializers.CharField(min_length=8, write_only=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = models.CustomUser <NEW_...
Currently unused in preference of the below
62598ee563b5f9789fe837dd
class _GiveUpOnSendfile(Exception): <NEW_LINE> <INDENT> pass
Exception raised in case use of sendfile() fails on first try, in which case send() will be used.
62598ee50a50d4780f703a2a
class ShareItem(Model): <NEW_LINE> <INDENT> _validation = { 'name': {'required': True}, 'properties': {'required': True}, } <NEW_LINE> _attribute_map = { 'name': {'key': 'Name', 'type': 'str', 'xml': {'name': 'Name'}}, 'snapshot': {'key': 'Snapshot', 'type': 'str', 'xml': {'name': 'Snapshot'}}, 'properties': {'key': 'P...
A listed Azure Storage share item. All required parameters must be populated in order to send to Azure. :param name: Required. :type name: str :param snapshot: :type snapshot: str :param properties: Required. :type properties: ~azure.storage.fileshare.models.ShareProperties :param metadata: :type metadata: dict[str, ...
62598ee5656771135c487d14
class TestStructObjects: <NEW_LINE> <INDENT> def test_path_slice_nested_dicts(self): <NEW_LINE> <INDENT> data = { "a": { "b": { "c": { "d": "bingo!" } } } } <NEW_LINE> assert sugar.utils.structs.path_slice(data, "a", "b", "c", "d").get("d") == "bingo!" <NEW_LINE> <DEDENT> def test_path_slice_nested_other_objects(self):...
Test suite for struct objects.
62598ee560cbc95b063629bd
class RouteReadOnly(VapiStruct): <NEW_LINE> <INDENT> def __init__(self, destination=None, prefix=None, gateway=None, interface_name=None, is_static=None, ): <NEW_LINE> <INDENT> self.destination = destination <NEW_LINE> self.prefix = prefix <NEW_LINE> self.gateway = gateway <NEW_LINE> self.interface_name = interface_nam...
``Routes.RouteReadOnly`` class Structure that describes how routing is performed for a particular destination and prefix. A destination/prefix of 0.0.0.0/0 ( for IPv4) or ::/0 (for IPv6) refers to the default gateway. .. tip:: The arguments are used to initialize data attributes with the same names.
62598ee5be8e80087fbbd6ce
class UndoTaskView(FlowTaskManagePermissionMixin, BaseTaskActionView): <NEW_LINE> <INDENT> action_name = 'undo' <NEW_LINE> def can_proceed(self): <NEW_LINE> <INDENT> return self.activation.undo.can_proceed() <NEW_LINE> <DEDENT> def perform(self): <NEW_LINE> <INDENT> self.activation.undo() <NEW_LINE> self.success('Task ...
Undo the task.
62598ee5d6c5a102081e07b0