code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class PlacerRadialPlacementFromChipConstraint(AbstractPlacerConstraint): <NEW_LINE> <INDENT> __slots__ = [ "_x", "_y" ] <NEW_LINE> def __init__(self, x, y): <NEW_LINE> <INDENT> self._x = x <NEW_LINE> self._y = y <NEW_LINE> <DEDENT> @property <NEW_LINE> def x(self): <NEW_LINE> <INDENT> return self._x <NEW_LINE> <DEDENT>...
A constraint that attempts to place a vertex as close to a chip as possible (including on it)
62598fafdd821e528d6d8f48
class ActionTypeTests(TestCase): <NEW_LINE> <INDENT> def actionType(self): <NEW_LINE> <INDENT> return ActionType("myapp:mysystem:myaction", [], [], "An action type") <NEW_LINE> <DEDENT> def test_call(self): <NEW_LINE> <INDENT> actionType = self.actionType() <NEW_LINE> actionType._startAction = lambda *args, **kwargs: 1...
General tests for L{ActionType}.
62598faf8e7ae83300ee90b6
class H2(_H): <NEW_LINE> <INDENT> pass
Implement the ``h2`` HTML tag.
62598faf097d151d1a2c103e
class MediaGraphSink(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'type': {'required': True}, 'name': {'required': True}, 'inputs': {'required': True}, } <NEW_LINE> _attribute_map = { 'type': {'key': '@type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'inputs': {'key': 'inputs', 'type':...
Enables a media graph to write media data to a destination outside of the Live Video Analytics IoT Edge module. You probably want to use the sub-classes and not this class directly. Known sub-classes are: MediaGraphAssetSink, MediaGraphFileSink, MediaGraphIoTHubMessageSink. All required parameters must be populated i...
62598faf99cbb53fe6830eec
class double_well(overdamped_langevin): <NEW_LINE> <INDENT> def invariant_measure(self,x): <NEW_LINE> <INDENT> return np.exp(-self.U(x)/self['kT']) <NEW_LINE> <DEDENT> def U(self,x,**kw): <NEW_LINE> <INDENT> return (x**2-1.0)**2 <NEW_LINE> <DEDENT> def force(self,x,t,**kw): <NEW_LINE> <INDENT> dU = 4*x*(x**2-1) <NEW_LI...
Defines a symmetric double well of height 1kT, under a Langevin overdamped system integrated by Euler-Maruyama. This sets SDE_f to the gradient of the double well potential. Parameters ---------- all parameters defined by SDE_euler_maruyama, overdamped_langevin and
62598faf3346ee7daa337651
class MesosClusterRepository: <NEW_LINE> <INDENT> mesos_enabled = False <NEW_LINE> master_address = None <NEW_LINE> master_port = None <NEW_LINE> secret_file = None <NEW_LINE> role = None <NEW_LINE> principal = None <NEW_LINE> default_volumes = () <NEW_LINE> dockercfg_location = None <NEW_LINE> offer_timeout = None <NE...
A class that stores MesosCluster objects and configuration.
62598faf4f88993c371f0514
class TensorType(ResultType): <NEW_LINE> <INDENT> def __init__(self, shape, dtype='float32'): <NEW_LINE> <INDENT> if not isinstance(shape, (tuple, list)): <NEW_LINE> <INDENT> raise TypeError('shape must be a tuple or list: %s' % str(shape)) <NEW_LINE> <DEDENT> self._type_shape = loom.TypeShape(dtype, shape) <NEW_LINE> ...
Tensors (which may be numpy or tensorflow) of a particular shape. Tensor types implement the numpy array protocol, which means that e.g. `np.ones_like(tensor_type)` will do what you expect it to. Calling `np.array(tensor_type)` returns a zeroed array.
62598faf67a9b606de545fe1
class DeleteEndpoint(command.Command): <NEW_LINE> <INDENT> log = logging.getLogger(__name__ + '.DeleteEndpoint') <NEW_LINE> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(DeleteEndpoint, self).get_parser(prog_name) <NEW_LINE> parser.add_argument( 'endpoint', metavar='<endpoint-id>', help='Endpoint ...
Delete endpoint
62598faf30dc7b766599f861
class CertificateChain: <NEW_LINE> <INDENT> parent = None <NEW_LINE> child = None <NEW_LINE> def __init__(self, cert, path): <NEW_LINE> <INDENT> self.cert = cert <NEW_LINE> self.path = path
Object to store the tree of a certificate chain.
62598faf99fddb7c1ca62df3
class ObjectDetector(ImageModel): <NEW_LINE> <INDENT> def __init__(self, bigdl_type="float"): <NEW_LINE> <INDENT> self.bigdl_type = bigdl_type <NEW_LINE> super(ObjectDetector, self).__init__(None, bigdl_type) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def load_model(path, weight_path=None, bigdl_type="float"): <NEW_L...
A pre-trained object detector model. :param model_path The path containing the pre-trained model
62598faf7d847024c075c3d7
class FormatCBFMiniEigerPhotonFactory(FormatCBFMini): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def understand(image_file): <NEW_LINE> <INDENT> if "ENABLE_PHOTON_FACTORY_TWO_EIGER" in os.environ: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> return False <NEW_LINE> <DEDENT> def _goniometer(self): <NEW_LINE> <I...
A class for reading mini CBF format Eiger images, and correctly constructing a model for the experiment from this. Specific for 2-Eiger setup at Photon Factory based on images sent by Yusuke Yamada. Geometry currently hard-coded as no geometry information in image headers. Assumes image filenames contain the string '_...
62598fafcc0a2c111447b026
class SuperBaseView(GlobalBaseView): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def validate_sign(cls, sign_: str, params: tuple): <NEW_LINE> <INDENT> def f(func): <NEW_LINE> <INDENT> def wrapper(self, request, args): <NEW_LINE> <INDENT> sign = args.get(sign_) <NEW_LINE> key = SimpleEncrypt.decrypt(sign) <NEW_LINE> ke...
对接总后台, 没有登录信息和店铺信息
62598fafaad79263cf42e7e8
class Port(model_base.HasStandardAttributes, model_base.BASEV2, HasId, HasTenant): <NEW_LINE> <INDENT> name = sa.Column(sa.String(attr.NAME_MAX_LEN)) <NEW_LINE> network_id = sa.Column(sa.String(36), sa.ForeignKey("networks.id"), nullable=False) <NEW_LINE> fixed_ips = orm.relationship(IPAllocation, backref='port', lazy=...
Represents a port on a Neutron v2 network.
62598fafcc40096d6161a1e4
class WSIdentityGroupAPITest(unittest.TestCase): <NEW_LINE> <INDENT> def test_subscribe(self): <NEW_LINE> <INDENT> api = identity_group.IdentityGroupAPI() <NEW_LINE> self.assertEqual( [('/identity-groups/foo.bar', '*')], api.subscribe({'topic': '/identity-groups', 'identity-group': 'foo.bar'}) ) <NEW_LINE> self.assertE...
Tests for identity group websocket API.
62598faf01c39578d7f12d93
class MetricsCollections(metaclass=Singleton): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__collections = dict() <NEW_LINE> <DEDENT> @property <NEW_LINE> def collections(self): <NEW_LINE> <INDENT> return self.__collections <NEW_LINE> <DEDENT> @collections.setter <NEW_LINE> def collections(self, va...
This class represents a Singleton that collects all Metrics instances of different types that had been created
62598faf5fdd1c0f98e5dfa0
class MoveRUMarker(ModelSQL, ModelView): <NEW_LINE> <INDENT> _name = "ekd.account.move.marker" <NEW_LINE> _description=__doc__ <NEW_LINE> company = fields.Many2One('company.company', 'Company', required=True, readonly=True, ondelete="RESTRICT") <NEW_LINE> name = fields.Char('Name', size=None) <NEW_LINE> note = fields.T...
Marker for entries
62598fafbf627c535bcb14b4
class UserMessage(messages.Message): <NEW_LINE> <INDENT> message = messages.StringField(1, required=True)
Outbound: user notification
62598faf236d856c2adc9448
class Subsample(object): <NEW_LINE> <INDENT> sub_sampling_type = 'other' <NEW_LINE> def __init__(self, name, num_models, model_group=None, file=None): <NEW_LINE> <INDENT> self.name, self.num_models = name, num_models <NEW_LINE> self.model_group, self.file = model_group, file <NEW_LINE> <DEDENT> num_models_deposited = p...
Base class for a subsample within an ensemble. In some cases the models that make up an :class:`Ensemble` may be partitioned into subsamples, for example to determine if the sampling was exhaustive (see `Viswanath et al. 2017 <https://www.ncbi.nlm.nih.gov/pmc/articles/pmid/29211988/>`_). This base class can be used to...
62598faf4527f215b58e9eeb
class rfid_tag_decoder_f_sptr(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> __repr__ = _swig_repr <NEW_LINE> def __init__(self, *args): <NEW_LINE> <INDENT> this = _rfid_swig.new_rfid_tag_decoder_f_sptr(*args) <NEW_LINE> tr...
Proxy of C++ boost::shared_ptr<(rfid_tag_decoder_f)> class
62598faf097d151d1a2c1040
class IfConfig: <NEW_LINE> <INDENT> def __init__(self, stdout=None, debug=False): <NEW_LINE> <INDENT> if stdout is not None: <NEW_LINE> <INDENT> self.stdout = stdout <NEW_LINE> self.stderr = '' <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> env = os.environ.copy() <NEW_LINE> env.update(LANG='C.utf8') <NEW_LINE> p = Pope...
Wrapper around a single invocation of "ifconfig"
62598fafe1aae11d1e7ce82e
class Guest(db.Model, UserMixin): <NEW_LINE> <INDENT> __tablename__ = 'guests' <NEW_LINE> number = db.Column(db.Integer,primary_key=True) <NEW_LINE> name = db.Column(db.String) <NEW_LINE> availability = db.Column(db.Boolean) <NEW_LINE> rooms = relationship("Room",back_populates="guests") <NEW_LINE> def get_id(self): <N...
room details.
62598faf5166f23b2e2433ef
class IotHubQuotaMetricInfoListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'next_link': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[IotHubQuotaMetricInfo]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, value...
The JSON-serialized array of IotHubQuotaMetricInfo objects with a next link. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The array of quota metrics objects. :vartype value: list[~azure.mgmt.iothub.v2021_03_31.models.IotHubQuotaMetricInfo] :ivar next_link: The n...
62598fafbe8e80087fbbf07a
@pytest.mark.usefixtures('class_devices') <NEW_LINE> class DeviceCreateTest(BaseDefaultTest): <NEW_LINE> <INDENT> def test_create_device_with_existent_project(self): <NEW_LINE> <INDENT> to_send = self.serialized_device <NEW_LINE> to_send.update({'name': self.random_string()}) <NEW_LINE> to_send.update(project=self.proj...
Testing POST 'devices:list-create-devices'
62598faf63b5f9789fe8517d
class VotingClassifier(object): <NEW_LINE> <INDENT> def __init__(self, estimators, voting='hard'): <NEW_LINE> <INDENT> self.estimators = estimators <NEW_LINE> if voting == 'hard' or voting == 'soft': <NEW_LINE> <INDENT> self.voting = voting <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> raise AttributeError('Invalid \'v...
A VotingClassifier is an ensemble model that aggregates the predictions of multiple base models and makes a final prediction based on either hard or soft voting. Args: estimators (list): A list storing the base estimators of the ensemble. voting (str): The voting method to be used. Attributes: estimator...
62598faf7d847024c075c3d9
class TimeDictionaryError(Exception): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.message = ('No se ha introducido un diccionario válido.') <NEW_LINE> Exception.__init__(self, self.message)
Error que se produce cuando no se define un diccionario temporal en el programa principal. Atributos --------- message : string Mensaje de error.
62598fafa8370b77170f03f1
class AesTokenEncryptionTests(FantasticoUnitTestsCase): <NEW_LINE> <INDENT> _aes_iv = None <NEW_LINE> def init(self): <NEW_LINE> <INDENT> self._aes_iv = Random.new().read(AES.block_size) <NEW_LINE> <DEDENT> def test_aes_ok(self): <NEW_LINE> <INDENT> aes_provider = AesTokenEncryption() <NEW_LINE> for key_length in [16, ...
This class provides tests suite for AES token encryption provider from fantastico.
62598faf6e29344779b00672
class TestCfgManager(base.TestCase): <NEW_LINE> <INDENT> @mock.patch( 'oslo_config.generator._get_raw_opts_loaders', _fake_opt_loader) <NEW_LINE> @mock.patch( 'oslo_config.cfg.open', _file_mock({ "svc.tpl": NAMESPACE_FILE_CONTENT, "svc1.conf": CONF_FILE1_CONTENT, "svc2.conf": CONF_FILE2_CONTENT})) <NEW_LINE> def test_i...
Config manager tests
62598fafa8370b77170f03f2
class IMDBProcessor(DataProcessor): <NEW_LINE> <INDENT> def get_train_examples(self, data_dir): <NEW_LINE> <INDENT> return self._create_examples( self._read_tsv(os.path.join(data_dir, "mini_train.tsv")), "train") <NEW_LINE> <DEDENT> def get_dev_examples(self, data_dir): <NEW_LINE> <INDENT> return self._create_examples(...
Processor for the MRPC data set (GLUE version).
62598faf1b99ca400228f53b
class TestCASSSingleObjectApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = cass_client.api.cass_single_object_api.CASSSingleObjectApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_get_competency(self): <NEW_LINE> <INDENT> pass ...
CASSSingleObjectApi unit test stubs
62598fafaad79263cf42e7ea
class Peer: <NEW_LINE> <INDENT> def __init__( self, hostname: str, valid: datetime, aes_key: bytes, aes_iv: bytes, throttling: Optional[int] = None, ): <NEW_LINE> <INDENT> self._hostname = hostname <NEW_LINE> self._valid = valid <NEW_LINE> self._throttling = throttling <NEW_LINE> self._multiplexer = None <NEW_LINE> sel...
Representation of a Peer.
62598faf3539df3088ecc2c9
class IntervalWindowCoder(FastCoder): <NEW_LINE> <INDENT> def _create_impl(self): <NEW_LINE> <INDENT> return coder_impl.IntervalWindowCoderImpl() <NEW_LINE> <DEDENT> def is_deterministic(self): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> def as_cloud_object(self, coders_context=None): <NEW_LINE> <INDENT> return...
Coder for an window defined by a start timestamp and a duration.
62598faf26068e7796d4c96c
class Group(UUIDModel): <NEW_LINE> <INDENT> manager: 'models.ForeignKey[Group, Authenticator]' = UnsavedForeignKey( Authenticator, on_delete=models.CASCADE, related_name='groups' ) <NEW_LINE> name = models.CharField(max_length=128, db_index=True) <NEW_LINE> state = models.CharField(max_length=1, default=State.ACTIVE, d...
This class represents a group, associated with one authenticator
62598faf627d3e7fe0e06ec4
class AboutAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> exclude = ('user',) <NEW_LINE> def save_model(self, request, obj, form, change): <NEW_LINE> <INDENT> if not change: <NEW_LINE> <INDENT> obj.user = request.user <NEW_LINE> <DEDENT> obj.save()
fieldsets = ( ('Photo',{'fields':('main_photo',)}), ('What We Do',{'fields':('what_we_do',)}), ('Who We Are',{'fields':('who_we_are',)}), ('How It Works',{'fields':('how_it_works')}), )
62598faf44b2445a339b697c
class Survey(models.Model): <NEW_LINE> <INDENT> event = models.ForeignKey('core.Event', on_delete=models.CASCADE) <NEW_LINE> slug = models.CharField(**NONUNIQUE_SLUG_FIELD_PARAMS) <NEW_LINE> title = models.CharField( max_length=255, verbose_name=_('Title'), help_text=_('Will be displayed at the top of the survey page.'...
The Labour Manager may have their Workers fill in a Survey some time after signing up. The driving use case for these Surveys is to ask for shift wishes some time before the event. A Survey requires a Model and a Form. The Model is requested to return an instance via Model.for_signup(signup) and it is passed to the For...
62598faf4527f215b58e9eed
class greenhouse_gas_emissions_from_vehicle_travel(Variable): <NEW_LINE> <INDENT> _return_type = "float32" <NEW_LINE> def dependencies(self): <NEW_LINE> <INDENT> return ["psrc.zone.vehicle_miles_traveled"] <NEW_LINE> <DEDENT> def compute(self, dataset_pool): <NEW_LINE> <INDENT> co2_pounds_per_vehicle_mile = .916 <NEW_L...
Calculate the total greenhouse gas emissions for a year.
62598faf3317a56b869be556
class DummyFactory(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.callbacks = {} <NEW_LINE> <DEDENT> def addBootstrap(self, event, callback): <NEW_LINE> <INDENT> self.callbacks[event] = callback
Dummy XmlStream factory that only registers bootstrap observers.
62598faf76e4537e8c3ef5c4
class ClusteringProblem: <NEW_LINE> <INDENT> def __init__(self, cities, facilities, metric, facility_cost): <NEW_LINE> <INDENT> self.facilities = facilities <NEW_LINE> self.cities = cities <NEW_LINE> self._metric = metric <NEW_LINE> self._facility_cost = facility_cost <NEW_LINE> <DEDENT> def ScoreCityAssignment(self, c...
A clustering problem consists of cities, facilities to connect to a metric cost structure for connection and costs for opening facilities.
62598faf5fcc89381b266158
class Slot(Builtin): <NEW_LINE> <INDENT> attributes = ("NHoldAll",) <NEW_LINE> rules = { "Slot[]": "Slot[1]", "MakeBoxes[Slot[n_Integer?NonNegative]," " f:StandardForm|TraditionalForm|InputForm|OutputForm]": ( '"#" <> ToString[n]' ), }
<dl> <dt>'#$n$' <dd>represents the $n$th argument to a pure function. <dt>'#' <dd>is short-hand for '#1'. <dt>'#0' <dd>represents the pure function itself. </dl> X> # = #1 Unused arguments are simply ignored: >> {#1, #2, #3}&[1, 2, 3, 4, 5] = {1, 2, 3} Recursive pure functions can be written us...
62598fafd7e4931a7ef3c0ad
class SocialLink(Model): <NEW_LINE> <INDENT> site = models.CharField( max_length=7, choices=social_links.SOCIAL_SITES, ) <NEW_LINE> url = models.URLField( max_length=255, verbose_name='URL', ) <NEW_LINE> @property <NEW_LINE> def site_name(self): <NEW_LINE> <INDENT> return self.get_site_display() <NEW_LINE> <DEDENT> @pr...
This model holds information about one social media link
62598faf4428ac0f6e65853d
class ActivityRightsDict(TypedDict): <NEW_LINE> <INDENT> cloned_from: Optional[str] <NEW_LINE> status: str <NEW_LINE> community_owned: bool <NEW_LINE> owner_names: List[str] <NEW_LINE> editor_names: List[str] <NEW_LINE> voice_artist_names: List[str] <NEW_LINE> viewer_names: List[str] <NEW_LINE> viewable_if_private: boo...
A dict version of ActivityRights suitable for use by the frontend.
62598faf097d151d1a2c1042
class BookForm(FlaskForm): <NEW_LINE> <INDENT> title = StringField("Title:", validators=[DataRequired(), Length(min=1)]) <NEW_LINE> author_fname = StringField("Author First Name", validators=[DataRequired(), Length(min=1)]) <NEW_LINE> author_lname = StringField("Author Surname", validators=[DataRequired(), Length(min=1...
Form to capture and validate new book to add as well as update book info up_votes and down_votes and date_added are set within the add_book function
62598fafd486a94d0ba2bfe7
class PluginHelpMixin(HasTraits): <NEW_LINE> <INDENT> _cached_help = HTML <NEW_LINE> def get_help(self): <NEW_LINE> <INDENT> if self._cached_help == "": <NEW_LINE> <INDENT> class_path = pathlib.PurePath(inspect.getfile(self.__class__)) <NEW_LINE> help_file = class_path.parents[1] / 'help' / 'views' / (class_path.stem +...
A mixin to get online HTML help for a class. It determines the HTML path name from the class name.
62598faf3539df3088ecc2ca
class UserAPI(APIBase): <NEW_LINE> <INDENT> __class__ = User <NEW_LINE> public_attributes = ('locale', 'name') <NEW_LINE> allowed_attributes = ('name', 'locale', 'fullname', 'created') <NEW_LINE> def _select_attributes(self, user_data): <NEW_LINE> <INDENT> if current_user.is_authenticated() and current_user.admin: <NEW...
Class for the domain object User.
62598fafdd821e528d6d8f4c
class CustomBatchNormManualModule(nn.Module): <NEW_LINE> <INDENT> def __init__(self, n_neurons, eps=1e-5): <NEW_LINE> <INDENT> super(CustomBatchNormManualModule, self).__init__() <NEW_LINE> raise NotImplementedError <NEW_LINE> <DEDENT> def forward(self, input): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> r...
This nn.module implements a custom version of the batch norm operation for MLPs. In self.forward the functional version CustomBatchNormManualFunction.forward is called. The automatic differentiation of PyTorch calls the backward method of this function in the backward pass.
62598faf7d847024c075c3da
@dataclass <NEW_LINE> class Clf: <NEW_LINE> <INDENT> model: Union[BaseEstimator, Lstm] <NEW_LINE> name: str <NEW_LINE> def __post_init__(self) -> None: <NEW_LINE> <INDENT> self.preds = [] <NEW_LINE> self.probs = [] <NEW_LINE> <DEDENT> def __str__(self) -> str: <NEW_LINE> <INDENT> return self.name <NEW_LINE> <DEDENT> de...
A wrapper for classifiers allowing for abstract usage in evaluation.
62598fafbd1bec0571e150ce
class Solution(object): <NEW_LINE> <INDENT> def minCameraCover(self, root): <NEW_LINE> <INDENT> sums = 0 <NEW_LINE> def dfs(root): <NEW_LINE> <INDENT> nonlocal sums <NEW_LINE> if not root: <NEW_LINE> <INDENT> return 1 <NEW_LINE> <DEDENT> left = dfs(root.left) <NEW_LINE> right = dfs(root.right) <NEW_LINE> print(left, ri...
读了很多次,真的不知道知道题啥意思,我的火爆脾气呀 明白了其输入的含义,读着题,感觉很难呀 去搜了一下题解,根据贪心法来解决这道问题 和我昨天做的一个左叶子之和有异曲同工之妙 感觉这道题有点找拐点的意思,有一个0就添加一个相机
62598fafa8370b77170f03f3
class UserForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = User <NEW_LINE> fields = ( 'first_name', 'last_name', ) <NEW_LINE> labels = { 'first_name':'First Name', 'last_name':'Surname', }
User form for getting user fields for Profile
62598faf7c178a314d78d4b4
class LXD(Plugin, UbuntuPlugin): <NEW_LINE> <INDENT> plugin_name = 'lxd' <NEW_LINE> def setup(self): <NEW_LINE> <INDENT> self.add_copy_spec([ "/var/lib/lxd/lxd.db", "/etc/default/lxc-bridge", ]) <NEW_LINE> self.add_copy_spec_limit("/var/log/lxd*", sizelimit=self.get_option("log_size")) <NEW_LINE> self.add_cmd_output([ ...
LXD is a containers hypervisor.
62598faf851cf427c66b82d4
class OptionsManager2ConfigurationAdapter(object): <NEW_LINE> <INDENT> def __init__(self, provider): <NEW_LINE> <INDENT> self.config = provider <NEW_LINE> <DEDENT> def __getattr__(self, key): <NEW_LINE> <INDENT> return getattr(self.config, key) <NEW_LINE> <DEDENT> def __getitem__(self, key): <NEW_LINE> <INDENT> provide...
Adapt an option manager to behave like a `logilab.common.configuration.Configuration` instance
62598faf6e29344779b00674
class ThirstingBlade(Invocation): <NEW_LINE> <INDENT> name = "Thirsting Blade"
You can attack with your pact weapon twice, instead of once, whenever you take the Attack action on your turn. **Prerequisite**: 5th Level, Pact of the Blade
62598fafe5267d203ee6b921
class PreprocessorBase(ParamsBaseClass): <NEW_LINE> <INDENT> def __init__(self, params = [], **kwargs): <NEW_LINE> <INDENT> paramsThis = [Param("enabled", True, friendlyName = "Enabled")] <NEW_LINE> ParamsBaseClass.__init__(self, paramsThis + params, **kwargs) <NEW_LINE> <DEDENT> def OptimizeForSeries(self, fseries): <...
Baseclass for all preprocessors. Params: enabled (bool): is the preprocessor enabled
62598faf23849d37ff8510cc
class SRIAgent(Verifier, Issuer): <NEW_LINE> <INDENT> async def process_post(self, form: dict) -> str: <NEW_LINE> <INDENT> logger = logging.getLogger(__name__) <NEW_LINE> logger.debug('SRIAgent.process_post: >>> form: {}'.format(form)) <NEW_LINE> mro = SRIAgent._mro_dispatch() <NEW_LINE> for ResponderClass in mro: <NEW...
SRI agent is: * a Verifier for: * BC Org Book proofs of BC Registrar * PSPC Org Book proofs of its own SRI registration claims * an Issuer of its own SRI registration claims
62598faf7047854f4633f3f3
class Product(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=190, db_index=True) <NEW_LINE> slug = models.SlugField(max_length=190, db_index=True) <NEW_LINE> brand = models.CharField(max_length=50) <NEW_LINE> sku = models.CharField(max_length=50) <NEW_LINE> price = models.DecimalField(max_digits=...
model class containing information about a product; instances of this class are what the user adds to their shopping cart and can subsequently purchase
62598faf63d6d428bbee27c4
class Movie(): <NEW_LINE> <INDENT> def __init__(self, movie_title, movie_storyline, poster_image, trailer_youtube): <NEW_LINE> <INDENT> self.title = movie_title <NEW_LINE> self.storyline = movie_storyline <NEW_LINE> self.poster_image_url = poster_image <NEW_LINE> self.trailer_youtube_url = trailer_youtube
This class accepts four arguments for our movie page: * Movie title * Storyline * Poster image * Yourtube trailer
62598faf0c0af96317c5639b
class cmd_domain_dcpromo(Command): <NEW_LINE> <INDENT> synopsis = "%prog <dnsdomain> [DC|RODC] [options]" <NEW_LINE> takes_optiongroups = { "sambaopts": options.SambaOptions, "versionopts": options.VersionOptions, "credopts": options.CredentialsOptions, } <NEW_LINE> takes_options = [] <NEW_LINE> takes_options.extend(co...
Promote an existing domain member or NT4 PDC to an AD DC.
62598faf2c8b7c6e89bd37de
class V1MongoClusterConfigurationSpecMongoDB(BaseModel): <NEW_LINE> <INDENT> mongo_name = StringField(required=False) <NEW_LINE> storage_name = StringField(required=False) <NEW_LINE> storage_size = StringField(required=False) <NEW_LINE> storage_data_path = StringField(required=False) <NEW_LINE> storage_class_name = Str...
Model for the `spec.mongodb` field of the V1MongoClusterConfiguration.
62598faf2ae34c7f260ab0fa
class Model(Sized, Iterable, Container): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.item_added = Signal() <NEW_LINE> self.item_removed = Signal() <NEW_LINE> self.model_reset = Signal() <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def add(self, item): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> ...
A model is a data container that provide signal to observe changes. The base model do not provide a way to change directly the data, this to remove useless restrictions to models that will store complex objects where attribute changes but not objects directly. Setter methods and signals can be simply implemented in su...
62598faf99cbb53fe6830ef2
class Squamata(Reptilia): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.order_name = self.__class__.__name__ <NEW_LINE> super(Squamata, self).__init__(**kwargs) <NEW_LINE> <DEDENT> def order_info(self): <NEW_LINE> <INDENT> pass
Creates a Squamata
62598faff548e778e596b5be
@add_metaclass(MetaInstructionCase) <NEW_LINE> class AdcImmWithDecimalTest(unittest.TestCase): <NEW_LINE> <INDENT> asm = 'ADC #10' <NEW_LINE> lex = [('T_INSTRUCTION', 'ADC'), ('T_DECIMAL_NUMBER', '#10')] <NEW_LINE> syn = ['S_IMMEDIATE'] <NEW_LINE> code = [0x69, 0x0A]
Test the arithmetic operation ADC between decimal 10 and the content of the accumulator.
62598faf796e427e5384e7ae
class StorageCenterApiHelper(object): <NEW_LINE> <INDENT> def __init__(self, config, active_backend_id, storage_protocol): <NEW_LINE> <INDENT> self.config = config <NEW_LINE> self.active_backend_id = active_backend_id <NEW_LINE> self.ssn = self.config.dell_sc_ssn <NEW_LINE> self.storage_protocol = storage_protocol <NEW...
StorageCenterApiHelper Helper class for API access. Handles opening and closing the connection to the Dell REST API.
62598fafbd1bec0571e150cf
@implementer(IDomain) <NEW_LINE> class Domain(Model): <NEW_LINE> <INDENT> id = Int(primary=True) <NEW_LINE> mail_host = Unicode() <NEW_LINE> base_url = Unicode() <NEW_LINE> description = Unicode() <NEW_LINE> contact_address = Unicode() <NEW_LINE> def __init__(self, mail_host, description=None, base_url=None, contact_ad...
Domains.
62598faf67a9b606de545fe7
class HyperParams(AttrDict): <NEW_LINE> <INDENT> def __init__(self, names=(), **conf): <NEW_LINE> <INDENT> super(HyperParams, self).__init__(*names) <NEW_LINE> self.conf = {} <NEW_LINE> for key, sett in conf.iteritems(): <NEW_LINE> <INDENT> self.conf[key] = dict((k, v) for k, v in sett.iteritems()) <NEW_LINE> <DEDENT> ...
Describes collection of hyperparameter, each item of which is an instance of HyperParam class. Example of usage: maxnum_iter_conf = {'max': 20, 'min': 20, 'name': 'maxnum_iter', 'size': 1, 'type': 'int'} mu_conf = {'max': 0.1, 'min': 0.001, 'name': 'mu', 'size': 1, 'type': 'float'} maxnum_iter = HyperParam(maxnum_iter...
62598faf7c178a314d78d4b6
class Decoder: <NEW_LINE> <INDENT> def __init__(self, vocab_size, wordvec_size, hidden_size): <NEW_LINE> <INDENT> V, D, H = vocab_size, wordvec_size, hidden_size <NEW_LINE> embed_W = (np.random.randn(V, D) / 100).astype("f") <NEW_LINE> lstm_Wx = (np.random.randn(D, 4 * H) / np.sqrt(D)).astype("f") <NEW_LINE> lstm_Wh = ...
Decoder part (seq2seq)
62598faf4e4d562566372440
class EventNotFound(Exception): <NEW_LINE> <INDENT> def __init__(self, event): <NEW_LINE> <INDENT> super(EventNotFound, self).__init__("Event '%s' was not found" % event)
Raised if an event was not found
62598fafa8370b77170f03f6
class DNBURLValidator(RegexValidator): <NEW_LINE> <INDENT> regex = re.compile(r'.*(?:d-nb.info?|portal.dnb.de?)/.*(?:gnd/?|nid%3D?)(\w+)') <NEW_LINE> message = "Bitte nur Adressen der DNB eingeben (d-nb.info oder portal.dnb.de)." <NEW_LINE> code = "dnb"
RegexValidator for URLs of the German national library. This validator captures the GND ID in the first group for a given valid URL.
62598faf7d43ff248742740f
class AnchorMode(IntEnum): <NEW_LINE> <INDENT> Parent = 0 <NEW_LINE> Cursor = 1
An IntEnum defining the various popup anchor modes.
62598faf63d6d428bbee27c6
class ChrRace(models.Model): <NEW_LINE> <INDENT> id = models.IntegerField(unique=True, primary_key=True) <NEW_LINE> name = models.CharField(max_length=30) <NEW_LINE> short_description = models.TextField(blank=True) <NEW_LINE> description = models.TextField(blank=True) <NEW_LINE> icon_id = models.IntegerField(blank=True...
Table lists available races. Races are numbered like bitmask - 1,2,4,8,16... CCP Table: chrRaces CCP Primary key: "raceID" tinyint(3)
62598faf1b99ca400228f53d
class ComputeAddressesListRequest(_messages.Message): <NEW_LINE> <INDENT> filter = _messages.StringField(1) <NEW_LINE> maxResults = _messages.IntegerField(2, variant=_messages.Variant.UINT32, default=500) <NEW_LINE> orderBy = _messages.StringField(3) <NEW_LINE> pageToken = _messages.StringField(4) <NEW_LINE> project = ...
A ComputeAddressesListRequest object. Fields: filter: Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. The field_name is the name of the field you want to compare. Only atomic field types are supported (strin...
62598faf23849d37ff8510ce
class Application(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def factory(cls, global_config, **local_config): <NEW_LINE> <INDENT> return cls(**local_config) <NEW_LINE> <DEDENT> def __call__(self, environ, start_response): <NEW_LINE> <INDENT> raise NotImplementedError(_('You must implement __call__'))
Base WSGI application wrapper. Subclasses need to implement __call__.
62598faf442bda511e95c472
class LogModules(Base, Dictable): <NEW_LINE> <INDENT> __tablename__ = 'log_modules' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> log_id = Column(Integer, ForeignKey('log_list.log_id')) <NEW_LINE> module_id = Column(Integer) <NEW_LINE> module_name = Column(String(30))
Liste der Module
62598fafadb09d7d5dc0a5a5
class Config: <NEW_LINE> <INDENT> SECRET_KEY='@Lb\xf5\xa864L\x8f\xc9\xe8V\x89\xb3\xc7\x8akx\x9b\x0e\x0eJ\xfa\x10' <NEW_LINE> SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://moringa:Access@localhost/pitches' <NEW_LINE> UPLOADED_PHOTOS_DEST ='app/static/photos' <NEW_LINE> SIMPLEMDE_JS_IIFE = True <NEW_LINE> SIMPLEMDE_US...
General configuration parent class
62598fafff9c53063f51a667
class ScanState(enum.Enum): <NEW_LINE> <INDENT> notScanning = 0 <NEW_LINE> initialScan = 1 <NEW_LINE> computingHashes = 2 <NEW_LINE> checkModified = 3 <NEW_LINE> realHashOnly = 4
State of the filesystem scan. Used internally in :class:`Source`.
62598fafbf627c535bcb14b9
class PipelineCallback(object): <NEW_LINE> <INDENT> def __init__(self, entry_point, req, store=None): <NEW_LINE> <INDENT> self.entry_point = entry_point <NEW_LINE> self.plumbing = Plumbing(req.scope_of(entry_point).plumbing.pipeline, "%s-via-%s" % (req.plumbing.id, entry_point)) <NEW_LINE> self.req = req <NEW_LINE> sel...
A delayed pipeline callback used as a post for parse_saml_metadata
62598faf4527f215b58e9ef1
class BuildTypeMixin(object): <NEW_LINE> <INDENT> def get_build_type(self, build_type): <NEW_LINE> <INDENT> if build_type is None: <NEW_LINE> <INDENT> raise TargetDefinitionException(self, "Target must define a 'build_type' attribute as either " "debug or release") <NEW_LINE> <DEDENT> if build_type.lower() not in ('rel...
Mixin class to validate and normalize build type input for keystores and android targets.
62598faf3317a56b869be558
class ObjectRegionData(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.region = SkyRegionMap().CATCHALL_REGION_ID <NEW_LINE> self.region_center_dot_product = -1
Data representing an individual object's position in a region. We care about the region itself for obvious reasons, but we care about the dot product with the center because it is a measure of how close it is to the center of a region.
62598faff7d966606f748000
class LRUpdate(Callback): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.history = {} <NEW_LINE> self.trained_iterations = 0 <NEW_LINE> <DEDENT> def _get_lr(self): <NEW_LINE> <INDENT> return K.get_value(self.model.optimizer.lr) <NEW_LINE> <DEDENT> def on_train_begin(self,...
This callback is utilized to log the learning rates for every iteration (batch cycle i.e. dataset size / batch size). It is not meant to be directly used as a callback but extended by other callbacks ie. LRFind, LRCycle
62598faf76e4537e8c3ef5c9
class TestWaitForPackage(testing.AsyncTestCase): <NEW_LINE> <INDENT> def setUp(self, *args, **kwargs): <NEW_LINE> <INDENT> super(TestWaitForPackage, self).setUp(*args, **kwargs) <NEW_LINE> packagecloud.TOKEN = "Unittest" <NEW_LINE> packagecloud.ACCOUNT = "Unittest" <NEW_LINE> self.maxDiff = None <NEW_LINE> <DEDENT> @te...
Unit tests for the packagecloud WaitForPackage actor.
62598faf67a9b606de545fe8
class Onreset(HtmlTagAttribute): <NEW_LINE> <INDENT> belongs_to = ['Form']
Script to be run when a reset button in a form is clicked.
62598faf55399d3f0562653f
class SeqGenerator: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.dict = {} <NEW_LINE> <DEDENT> def get_seq(self, prefix, ts): <NEW_LINE> <INDENT> entry = self.dict.get(prefix) <NEW_LINE> if not entry or entry[0] != ts: <NEW_LINE> <INDENT> self.dict[prefix] = [ts, 1] <NEW_LINE> return 0 <NEW_LINE> <D...
Class that will determine the sequence number of a line required for updates.
62598fafd486a94d0ba2bfeb
class SkiaBuildbotPageSet(page_set_module.PageSet): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(SkiaBuildbotPageSet, self).__init__( user_agent_type='desktop', credentials_path = 'data/credentials.json', archive_data_file='data/skia_twitter_desktop.json') <NEW_LINE> urls_list = [ 'http://twitter.c...
Pages designed to represent the median, not highly optimized web
62598faf66673b3332c303e8
class CreateSubscriptionRequest(BaseRequest): <NEW_LINE> <INDENT> def __init__(self, ts_connection, subscription_subject, content_type, content_id, schedule_id, user_id): <NEW_LINE> <INDENT> super().__init__(ts_connection) <NEW_LINE> self._subscription_subject = subscription_subject <NEW_LINE> self._content_type = cont...
Create subscription request for generating API request URLs to Tableau Server. :param ts_connection: The Tableau Server connection object. :type ts_connection: class :param subscription_subject: The subject to display to users receiving the subscription. :type subscription_subject: string :...
62598fafa79ad1619776a083
class Vampire(Monster): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.mon_mult = {'HersheyKisses': 1, 'SourStraws': 1, 'ChocolateBars': 0, 'NerdBombs': 1} <NEW_LINE> self.__id = 1 <NEW_LINE> super().__init__(random.randint(100, 200), random.randint(10, 20), self.mon_mult) <NEW_LINE> <DEDENT> def get_...
Vampire object: A monster type.
62598faf85dfad0860cbfa81
class BaseGenerator(object): <NEW_LINE> <INDENT> def __init__(self, N, batch_size, create_y): <NEW_LINE> <INDENT> self.N = N <NEW_LINE> self.batch_size = batch_size <NEW_LINE> self.batch_start = 0 <NEW_LINE> self.create_y = create_y <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DED...
A generator that dynamically creates batches from a list of N examples.
62598faf7d847024c075c3de
class VectorPrettyPrinter(PrettyPrinter): <NEW_LINE> <INDENT> def _print_Derivative(self, deriv): <NEW_LINE> <INDENT> from sympy.physics.vector.functions import dynamicsymbols <NEW_LINE> t = dynamicsymbols._t <NEW_LINE> dot_i = 0 <NEW_LINE> syms = list(reversed(deriv.variables)) <NEW_LINE> while len(syms) > 0: <NEW_LIN...
Pretty Printer for vectorialexpressions.
62598faf8a43f66fc4bf2196
class UniversalHousingExit(DefaultExit): <NEW_LINE> <INDENT> def at_traverse(self, traversing_object, target_location, **kwargs): <NEW_LINE> <INDENT> if target_location: <NEW_LINE> <INDENT> super().at_traverse(traversing_object, target_location, **kwargs) <NEW_LINE> return <NEW_LINE> <DEDENT> owned_rooms = self.objects...
Allow access to owned houses.
62598fafbe8e80087fbbf080
class PluginSearch(object): <NEW_LINE> <INDENT> schema = { 'type': 'array', 'items': { 'allOf': [ {'$ref': '/schema/plugins?group=search'}, {'maxProperties': 1, 'minProperties': 1} ] } } <NEW_LINE> @plugin.priority(130) <NEW_LINE> def on_task_urlrewrite(self, task, config): <NEW_LINE> <INDENT> if task.manager.unit_test...
Search entry from sites. Accepts list of known search plugins, list is in priority order. Once hit has been found no more searches are performed. Should be used only when there is no other way to get working download url, ie. when input plugin does not provide any downloadable urls. Example:: urlrewrite_search: ...
62598faf283ffb24f3cf38a8
@pytest.mark.usefixtures('verify_mock_vuforia') <NEW_LINE> class TestIncorrect: <NEW_LINE> <INDENT> def test_not_integer(self, endpoint: Endpoint) -> None: <NEW_LINE> <INDENT> endpoint_headers = dict(endpoint.prepared_request.headers) <NEW_LINE> if not endpoint_headers.get('Content-Type'): <NEW_LINE> <INDENT> return <N...
Tests for the ``Content-Length`` header set incorrectly. We cannot test what happens if ``Content-Length`` is removed from a prepared request because ``requests-mock`` behaves differently to ``requests`` - https://github.com/jamielennox/requests-mock/issues/80.
62598faf7047854f4633f3f6
class Layer: <NEW_LINE> <INDENT> def __init__(self, n_outputs=1, **kwargs): <NEW_LINE> <INDENT> self.n_outputs = n_outputs <NEW_LINE> self.kwargs = kwargs <NEW_LINE> self.name = self.__class__.__name__ <NEW_LINE> <DEDENT> def _call(self, nodes): <NEW_LINE> <INDENT> nodes = utils.generic.listify(nodes) <NEW_LINE> if sel...
Base class of all layers. Parameters ---------- n_outputs (default: 1) number of distinct data, and thus nodes, output by the layer's transform. **kwargs hyperparameters of the transformation function. Attributes ---------- n_outputs number of distinct data, and thus nodes, output by the layer's transform...
62598fafa219f33f346c6832
class FeffPathNlegList(object): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> <DEDENT> def __get__(self, instance, owner): <NEW_LINE> <INDENT> lst=[] <NEW_LINE> for i in range(instance.wrapper.nleg): <NEW_LINE> <INDENT> x = eval('feffpathwrapper.get_'+self._name+'(instan...
A descriptor for list-valued FeffPath attributes which have nleg members and describe the geometry of the path, i.e. ri, beta, and eta
62598fafbe383301e0253815
class TestVehicleStatsEngineOilPressureKPa(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 make_instance(self, include_optional): <NEW_LINE> <INDENT> if include_optional : <NEW_LINE> <INDENT> retur...
VehicleStatsEngineOilPressureKPa unit test stubs
62598faf56ac1b37e6302208
class ClasseFonction(Fonction): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def init_types(cls): <NEW_LINE> <INDENT> cls.ajouter_types(cls.peut_contenir_objet, "Objet", "Objet") <NEW_LINE> cls.ajouter_types(cls.peut_contenir_proto, "Objet", "str", "Fraction") <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def peut_conten...
Teste si le conteneur a de la place.
62598fafe5267d203ee6b926
class _ExtensionLinesField(ExtensionField, LinesField): <NEW_LINE> <INDENT> pass
LinesField
62598faf4527f215b58e9ef2
class DSNNWeightedMag(DSNNHeb): <NEW_LINE> <INDENT> def _is_dynamic(self, module): <NEW_LINE> <INDENT> return module.hebbian_prune is not None <NEW_LINE> <DEDENT> def prune(self, module): <NEW_LINE> <INDENT> with torch.no_grad(): <NEW_LINE> <INDENT> weight = module.m.weight.clone().detach() <NEW_LINE> corr = module.get...
Weight weights using correlation
62598faf2ae34c7f260ab0fe
class BaseCompileIT(PantsRunIntegrationTest): <NEW_LINE> <INDENT> _EXTRA_TASK_ARGS=[] <NEW_LINE> @contextmanager <NEW_LINE> def do_test_compile(self, target, expected_files=None, iterations=2, expect_failure=False, extra_args=None, workdir_outside_of_buildroot=False): <NEW_LINE> <INDENT> if not workdir_outside_of_build...
:API: public
62598faf26068e7796d4c972
class VirtualScreen2OrderViewset(DynamicModelViewSet): <NEW_LINE> <INDENT> queryset = VirtualScreen2.objects.all() <NEW_LINE> pagination_class = OrdersPagination <NEW_LINE> permission_classes = (IsAuthenticated,) <NEW_LINE> serializer_class = VirtualScreen2OrderSerializer <NEW_LINE> ordering = ('-add_time',)
订单管理 list: 获取个人订单
62598faffff4ab517ebcd802
class MonoQueue: <NEW_LINE> <INDENT> def __init__(self, A, opt): <NEW_LINE> <INDENT> self.q = deque() <NEW_LINE> self.l=self.r=0 <NEW_LINE> self.A = A <NEW_LINE> self.opt = opt <NEW_LINE> <DEDENT> def append(self): <NEW_LINE> <INDENT> while self.q and self.opt(self.A[self.q[-1]], self.A[self.r]): <NEW_LINE> <INDENT> se...
des: monoqueue on an arraylist, store its indices use it like a sliding window application: max queue: opt=operator.le if equal, select rightmost opt=operator.lt if equal, select leftmost min queue: opt=operator.ge
62598faf38b623060ffa90b8
class BaseCard(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.card = AdaptiveCard() <NEW_LINE> self.card.add(TextBlock("Self Service Bot", size="ExtraLarge", weight="Bolder")) <NEW_LINE> <DEDENT> async def genMessage(self) -> Activity: <NEW_LINE> <INDENT> cardJsonStr = await self.card.to_json() <NE...
The BaseCard class is used to represent a base adaptive card.
62598fafbaa26c4b54d4f2d1
class DomainOrganisationListFilter(OrganisationListFilter): <NEW_LINE> <INDENT> parameter_name = 'domain_organisation__id__exact' <NEW_LINE> def queryset(self, request, queryset): <NEW_LINE> <INDENT> if self.value(): <NEW_LINE> <INDENT> return queryset.filter(domain__organisation_id=self.value()) <NEW_LINE> <DEDENT> el...
Limit the List filter to valid options for the user
62598faf44b2445a339b697f
class BasicPlot: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def line(self, data: pd.DataFrame, x_axis: str, y_axis: str, color: str) -> plot: <NEW_LINE> <INDENT> line = go.Scatter( x=data[x_axis], y=data[y_axis], mode="lines", marker=dict(color=color) ) <NEW_LINE> return line <...
Plotting 'library'
62598faf4527f215b58e9ef3
class psacct(Plugin, RedHatPlugin): <NEW_LINE> <INDENT> def setup(self): <NEW_LINE> <INDENT> self.addCopySpec("/var/account")
Process accounting related information
62598faf5fdd1c0f98e5dfa9