code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class DeleteSTFT(object): <NEW_LINE> <INDENT> def __call__(self, data): <NEW_LINE> <INDENT> del data["stft"] <NEW_LINE> return data
Pytorch doesn't like complex numbers, use this transform to remove STFT after computing the mel spectrogram.
62598fa22c8b7c6e89bd3645
class Conf: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.debug = False <NEW_LINE> self.ddebug = False <NEW_LINE> self.config = None
Class which contains runtime variables
62598fa27cff6e4e811b58a6
class TestNotImplementedIsPropagated(object): <NEW_LINE> <INDENT> def test_not_implemented_is_propagated(self): <NEW_LINE> <INDENT> C = cmp_using(eq=lambda a, b: NotImplemented if a == 1 else a == b) <NEW_LINE> assert C(2) == C(2) <NEW_LINE> assert C(1) != C(1)
Test related to functions that return NotImplemented.
62598fa2851cf427c66b8148
class DescribeTaskStatusResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TaskResult = None <NEW_LINE> self.TaskType = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.TaskResult = params.get("TaskResult") <NEW_LIN...
DescribeTaskStatus返回参数结构体
62598fa2009cb60464d013a5
class UndoAction(AbstractCommandStackAction): <NEW_LINE> <INDENT> def perform(self, event): <NEW_LINE> <INDENT> self.undo_manager.undo() <NEW_LINE> <DEDENT> def _update_action(self): <NEW_LINE> <INDENT> name = self.undo_manager.undo_name <NEW_LINE> if name: <NEW_LINE> <INDENT> name = "&Undo " + name <NEW_LINE> self.ena...
An action that undos the last command of the active command stack.
62598fa2d7e4931a7ef3bf1a
class CompressionType(object): <NEW_LINE> <INDENT> NONE = 0 <NEW_LINE> GZIP = 1 <NEW_LINE> SNAPPY = 2
Enum for the various compressions supported. :cvar NONE: Indicates no compression in use :cvar GZIP: Indicates gzip compression in use :cvar SNAPPY: Indicates snappy compression in use
62598fa2442bda511e95c2db
class CryptoKeyAuditRule(AuditRule): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def __new__(self,identity,cryptoKeyRights,flags): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> AccessMask=property(lambda self: object(),lambda self,v: None,lambda self: None) <NEW_LINE> CryptoKeyRights=property(lambda self: object(),lamb...
Represents an audit rule for a cryptographic key. An audit rule represents a combination of a user's identity and an access mask. An audit rule also contains information about the how the rule is inherited by child objects,how that inheritance is propagated,and for what conditions it is audited. CryptoKeyAuditRule(i...
62598fa27b25080760ed732a
class Recipe(models.Model): <NEW_LINE> <INDENT> user = models.ForeignKey( settings.AUTH_USER_MODEL, on_delete=models.CASCADE, ) <NEW_LINE> title = models.CharField(max_length=255) <NEW_LINE> time_minutes = models.IntegerField() <NEW_LINE> price = models.DecimalField(max_digits=6, decimal_places=2) <NEW_LINE> link = mod...
Ingredients to be used for a recipe
62598fa285dfad0860cbf9b4
class RawAsyncServer(RawServer): <NEW_LINE> <INDENT> pool = pool.Pool() <NEW_LINE> def handle_handler(self, handler): <NEW_LINE> <INDENT> self.pool.start(Greenlet(handler.run))
Prefered server instead of RawServer. Async server using :class:`gevent.Greenlet` in a :class:`gevent.pool` to allow asynchronous calls. This will ensure you are not loosing data because the handler is too long.
62598fa276e4537e8c3ef42c
class Artifact(SkeleYaml): <NEW_LINE> <INDENT> VERSIONED_NAME = "{filename}_v{version}.{ext}" <NEW_LINE> SINGULAR_NAME = "{filename}.{ext}" <NEW_LINE> schema = Schema({ 'name': And(str, error="Artifact 'name' must be a String"), 'file': And(str, error="Artifact 'file' must be a String"), Optional('singular'): And(bool,...
Artifact Class Object contained within a list of the artifactory configuration in order to specify the artifact files and artifact names
62598fa20c0af96317c56202
class RequestParams(object): <NEW_LINE> <INDENT> params = None <NEW_LINE> def __init__(self, param=None): <NEW_LINE> <INDENT> self.delimiter = ',' <NEW_LINE> if param is None: <NEW_LINE> <INDENT> self.params = NoCaseMultiDict() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.params = NoCaseMultiDict(param) <NEW_LINE...
This class represents key-value request parameters. It allows case-insensitive access to all keys. Multiple values for a single key will be concatenated (eg. to ``layers=foo&layers=bar`` becomes ``layers: foo,bar``). All values can be accessed as a property. :param param: A dict or ``NoCaseMultiDict``.
62598fa23eb6a72ae038a4c4
class StagingCallback(Callback): <NEW_LINE> <INDENT> def __init__(self, stage_op, unstage_op, nr_stage): <NEW_LINE> <INDENT> self.nr_stage = nr_stage <NEW_LINE> self.stage_op = stage_op <NEW_LINE> self.fetches = tf.train.SessionRunArgs( fetches=[stage_op, unstage_op]) <NEW_LINE> <DEDENT> def _before_train(self): <NEW_L...
A callback registered by this input source, to make sure stage/unstage is run at each step.
62598fa299cbb53fe6830d54
class Replacer(object): <NEW_LINE> <INDENT> def __init__(self, original_expr): <NEW_LINE> <INDENT> self.original_expr = original_expr <NEW_LINE> self.escaped_map = {} <NEW_LINE> <DEDENT> def __call__(self, match): <NEW_LINE> <INDENT> meter_name = match.group(1) <NEW_LINE> escaped_name = self.escape(meter_name) <NEW_LIN...
Replaces matched meter names with escaped names. If the meter name is not followed by parameter access in the expression, it defaults to accessing the 'volume' parameter.
62598fa20a50d4780f70525c
class Client(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=100, help_text="Name of client to display") <NEW_LINE> slug = models.CharField(max_length=50, help_text="Used in URL", unique=True) <NEW_LINE> url = models.URLField(blank=True, help_text="URL to send viewer to") <NEW_LINE> class Meta: <N...
Database Object Model for storing the clients that the projects where done for
62598fa291af0d3eaad39c8d
class FeatureDragger(FeaturePicker): <NEW_LINE> <INDENT> feature_dragged = pyqtSignal(int, QgsPointXY) <NEW_LINE> drag_cursor = QCursor(Qt.DragMoveCursor) <NEW_LINE> def __init__(self, ui_element: QWidget, layers: List[QgsVectorLayer] = [], canvas: QgsMapCanvas = None, target_epsg: int = 25832): <NEW_LINE> <INDENT> sup...
tool for moving features on the map canvas with drag & drop, does not change the geometry of the dragged feature but draws a marker at the new position and emits the geometry Attributes ---------- feature_dragged : pyqtSignal emitted when a feature is dragged or clicked on the map canvas, (feature id, release ...
62598fa2f548e778e596b42f
class Model(object): <NEW_LINE> <INDENT> def request(self, headers, path_params, query_params, body_value): <NEW_LINE> <INDENT> _abstract() <NEW_LINE> <DEDENT> def response(self, resp, content): <NEW_LINE> <INDENT> _abstract()
Model base class. All Model classes should implement this interface. The Model serializes and de-serializes between a wire format such as JSON and a Python object representation.
62598fa23d592f4c4edbad4e
class FaultProvider: <NEW_LINE> <INDENT> def __init__(self, worklist_values): <NEW_LINE> <INDENT> self._worklist_values = worklist_values <NEW_LINE> available_languages = { "chineseEnabled": '也池馳弛水马弓土人女', "russianEnabled": 'ДРЛИПЦЗГБЖ', "greekEnabled": 'ΑαΒβΓγΔδΕεΖζΗηΘθΙιψΩω', "japaneseEnabled": '日一大二目五後.女かたまやたば', "kor...
Gives faulty input to exam-objects
62598fa2498bea3a75a579a3
class Robot(object): <NEW_LINE> <INDENT> speed = 0 <NEW_LINE> direction = 0 <NEW_LINE> position = Position(0, 0) <NEW_LINE> room = None <NEW_LINE> def __init__(self, room, speed): <NEW_LINE> <INDENT> self.speed = speed <NEW_LINE> self.direction = random.randint(0, 360) <NEW_LINE> self.position = room.getRandomPosition(...
Represents a robot cleaning a particular room. At all times the robot has a particular position and direction in the room. The robot also has a fixed speed. Subclasses of Robot should provide movement strategies by implementing updatePositionAndClean(), which simulates a single time-step.
62598fa2d268445f26639ac3
class TopFrameView(BaseInsertView): <NEW_LINE> <INDENT> def get_top_frame(self, wb_url, wb_prefix, host_prefix, env, frame_mod, replay_mod, coll='', extra_params=None): <NEW_LINE> <INDENT> embed_url = wb_url.to_str(mod=replay_mod) <NEW_LINE> if wb_url.timestamp: <NEW_LINE> <INDENT> timestamp = wb_url.timestamp <NEW_LIN...
The template view class associated with rendering the replay iframe
62598fa22ae34c7f260aaf61
class AlarmNum(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'alarm_num' <NEW_LINE> uuid = db.Column(db.BigInteger, primary_key=True) <NEW_LINE> org_id = db.Column(db.BIGINT, default=None) <NEW_LINE> row_datetime = db.Column(db.DateTime, default=None) <NEW_LINE> alarm_num = db.Column(db.Integer, default=None)
报警次数
62598fa2aad79263cf42e660
class MainServer(): <NEW_LINE> <INDENT> def __init__(self, host, commandPort, dataPort, userPort, infoPort): <NEW_LINE> <INDENT> self.host = host <NEW_LINE> self.portC = commandPort <NEW_LINE> self.portD = dataPort <NEW_LINE> self.portU = userPort <NEW_LINE> self.portI = infoPort <NEW_LINE> self.threads = [] <NEW_LINE>...
Main server class - can handle communication with machine, user and data saving.
62598fa292d797404e388aa6
class PollyPerformance(experiment.Experiment): <NEW_LINE> <INDENT> NAME = "pollyperformance" <NEW_LINE> def actions_for_project(self, project): <NEW_LINE> <INDENT> configs = settings.CFG["perf"]["config"].value <NEW_LINE> if configs is None: <NEW_LINE> <INDENT> warnings.warn( "({0}) should not be null.".format( repr(se...
The polly performance experiment.
62598fa297e22403b383ad8d
class TestSystemDynamics(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> mu = 1. <NEW_LINE> self.sys = SystemDynamics(ModelCOE(mu)) <NEW_LINE> <DEDENT> def test_instantiation(self): <NEW_LINE> <INDENT> self.assertIsInstance(self.sys, SystemDynamics) <NEW_LINE> <DEDENT> def test_getattr(self...
Test class for SystemDynamics.
62598fa207f4c71912baf2c5
class McmcProposalProbs(dict): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> object.__setattr__(self, 'comp', 1.0) <NEW_LINE> object.__setattr__(self, 'compDir', 0.0) <NEW_LINE> object.__setattr__(self, 'rjComp', 0.0) <NEW_LINE> object.__setattr__(self, 'rMatrix', 1.0) <NEW_LINE> object.__setattr__(self, ...
User-settable relative proposal probabilities. An instance of this class is made as Mcmc.prob, where you can do, for example:: yourMcmc.prob.local = 2.0 These are relative proposal probs, that do not sum to 1.0, and affect the calculation of the final proposal probabilities (ie the kind that do sum to 1). It is...
62598fa263d6d428bbee2633
class ModelAdminMiddleware(object): <NEW_LINE> <INDENT> def process_request(self, request): <NEW_LINE> <INDENT> referer_url = request.META.get('HTTP_REFERER') <NEW_LINE> return_to_index_url = request.session.get('return_to_index_url') <NEW_LINE> try: <NEW_LINE> <INDENT> if all(( return_to_index_url, referer_url, reques...
Whenever loading wagtail's wagtailadmin_explore views, we check the session for a `return_to_list_url` value (set by some views), to see if the user should be redirected to a custom list view instead, and if so, redirect them to it.
62598fa28e7ae83300ee8f22
@implementer(IPolicyForHTTPS) <NEW_LINE> class BrowserLikePolicyForHTTPS(object): <NEW_LINE> <INDENT> def __init__(self, trustRoot=None): <NEW_LINE> <INDENT> self._trustRoot = trustRoot <NEW_LINE> <DEDENT> @_requireSSL <NEW_LINE> def creatorForNetloc(self, hostname, port): <NEW_LINE> <INDENT> return optionsForClientTLS...
SSL connection creator for web clients.
62598fa23cc13d1c6d4655ee
class IssueLinkRequest(NamedTuple): <NEW_LINE> <INDENT> issue_key: str <NEW_LINE> url: str <NEW_LINE> def as_dict(self) -> Dict[str, str]: <NEW_LINE> <INDENT> return {"issue_key": self.issue_key, "url": self.url}
Issue to add to a task annotation.
62598fa2fbf16365ca793f3d
class AbstractTodo: <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def query(cls, **search_parameters): <NEW_LINE> <INDENT> raise NotImplementedError( ERROR.format(cls.__class__.__name__, "query()")) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def active_todos(cls): <NEW_LINE> <INDENT> raise NotImplementedError( ERROR.for...
Interface for any implementation of :class:`Todo`.
62598fa2435de62698e9bc76
class HelloWorldOther2(BaseHelloWorldText): <NEW_LINE> <INDENT> def _helloWorldText(self, b): <NEW_LINE> <INDENT> b.div(color=Color('#00FFFF')) <NEW_LINE> b.text('And yet another world on this page.') <NEW_LINE> b._div()
Private method. Inheriting from *BaseHelloWorldText* component, the class name generated by @self.getClassName()@ results in @HelloWorldHome@. Color is different per page.
62598fa257b8e32f5250805c
class IFactoryNode(IApplicationNode, IChildFactory): <NEW_LINE> <INDENT> pass
Application node for static children.
62598fa2460517430c431f9c
class PrivateEndpointConnection(SubResource): <NEW_LINE> <INDENT> _validation = { 'type': {'readonly': True}, 'etag': {'readonly': True}, 'provisioning_state': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': ...
PrivateEndpointConnection resource. Variables are only populated by the server, and will be ignored when sending a request. :param id: Resource ID. :type id: str :param name: The name of the resource that is unique within a resource group. This name can be used to access the resource. :type name: str :ivar type: The...
62598fa2e1aae11d1e7ce764
class Copy(ReceiverOption): <NEW_LINE> <INDENT> def apply(self, receiver): <NEW_LINE> <INDENT> receiver.source.distribution_mode = Terminus.DIST_MODE_COPY
Receiver option which copies messages to the receiver. This ensures that all receivers receive all incoming messages, no matter how many receivers there are. This is achieved by setting the receiver source distribution mode to :const:`proton.Terminus.DIST_MODE_COPY`.
62598fa20c0af96317c56204
class MultilangResourcesAux(): <NEW_LINE> <INDENT> def _get_lang_name(self, lang): <NEW_LINE> <INDENT> loc = Locale(lang) <NEW_LINE> return loc.display_name or loc.english_name <NEW_LINE> <DEDENT> def _format_resource_items(self, items): <NEW_LINE> <INDENT> out = h.format_resource_items(items) <NEW_LINE> new_out = [] <...
IDatasetForm has some problems when inherited more than once, so this class exposes methods for being reused by external plugins that needs the multilang resources functionality.
62598fa2baa26c4b54d4f132
class refresher(object): <NEW_LINE> <INDENT> def __init__(self, server, output_pv): <NEW_LINE> <INDENT> self.server = server <NEW_LINE> self.output_pv = output_pv <NEW_LINE> self.name = output_pv + ":REFRESH" <NEW_LINE> <DEDENT> def set(self, value=None): <NEW_LINE> <INDENT> self.server.refresh_record(self.output_pv)
This class is designed to be passed instead of a mirror record, when its set method is then called it refreshes the held PV on the held server.
62598fa24f88993c371f044b
class EntityTypesServicer(object): <NEW_LINE> <INDENT> def ListEntityTypes(self, request, context): <NEW_LINE> <INDENT> context.set_code(grpc.StatusCode.UNIMPLEMENTED) <NEW_LINE> context.set_details('Method not implemented!') <NEW_LINE> raise NotImplementedError('Method not implemented!') <NEW_LINE> <DEDENT> def GetEnt...
Manages agent entity types. Refer to [documentation](https://dialogflow.com/docs/entities) for more # details about entity types. Standard methods.
62598fa25166f23b2e24325a
class MilkCoin(Bitcoin): <NEW_LINE> <INDENT> name = 'milkcoin' <NEW_LINE> symbols = ('MUU', ) <NEW_LINE> nodes = ("185.69.55.50", ) <NEW_LINE> port = 35235 <NEW_LINE> message_start = b'\xf1\xd5\xd1\xf2' <NEW_LINE> base58_prefixes = { 'PUBKEY_ADDR': 50, 'SCRIPT_ADDR': 55, 'SECRET_KEY': 178 }
Class with all the necessary MilkCoin network information based on https://github.com/milkcoin/milk/blob/master/src/net.cpp (date of access: 02/16/2018)
62598fa2097d151d1a2c0ead
class S3OrganisationTypeTagModel(S3Model): <NEW_LINE> <INDENT> names = ["org_organisation_type_tag"] <NEW_LINE> def model(self): <NEW_LINE> <INDENT> T = current.T <NEW_LINE> s3 = current.response.s3 <NEW_LINE> tablename = "org_organisation_type_tag" <NEW_LINE> table = self.define_table(tablename, self.org_organisation_...
Organisation Type Tags
62598fa299cbb53fe6830d56
class SingleNode(object): <NEW_LINE> <INDENT> def __init__(self, item): <NEW_LINE> <INDENT> self.item = item <NEW_LINE> self.next = None
节点类型
62598fa2d268445f26639ac4
class ProjectSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> owner = serializers.ReadOnlyField(source='owner.username', required=False) <NEW_LINE> phases = ProjectPhaseSerializer(many=True, read_only=True) <NEW_LINE> notes = NoteSerializer(many=True, required=False) <NEW_LINE> builds = TenantBuildInfoSeria...
This needs to be addressed ASAP
62598fa28a43f66fc4bf1ffe
class XValidation(object): <NEW_LINE> <INDENT> def __init__(self, categories, fixmat, num_slices): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def generate(self, subject_partition, image_partition): <NEW_LINE> <INDENT> raise NotImplementedError
Interface for a cross-validation object.
62598fa22ae34c7f260aaf63
class ConfigFloat(ConfigOpt): <NEW_LINE> <INDENT> def __init__(self, sformat=None, **kwargs): <NEW_LINE> <INDENT> self._sformat = sformat <NEW_LINE> super(ConfigFloat, self).__init__(**kwargs) <NEW_LINE> <DEDENT> def parse(self, value): <NEW_LINE> <INDENT> if self._sformat is not None: <NEW_LINE> <INDENT> return float(...
Configuration option of type floating point number. Internal representation of the object is a Python ``float``. .. inheritance-diagram:: ConfigFloat :parts: 1 :param str sformat: Format to be used by :py:func:`print` to export the internal float.
62598fa23c8af77a43b67e82
class LevelCheckboxWdg(CheckboxColWdg): <NEW_LINE> <INDENT> CB_NAME = 'prod_level' <NEW_LINE> def set_cb_name(self): <NEW_LINE> <INDENT> self.name = self.CB_NAME
widget to display a checkbox in the column with select-all control
62598fa21f5feb6acb162aa5
class CCUser(models.User): <NEW_LINE> <INDENT> optional_keys = models.User.optional_keys + ('sapObjectStatus', 'ccObjectStatus', 'camObjectStatus', 'password_expires_at', 'password_failures', 'userAccountControl')
Extended user class with SAP specific user (internal) attributes
62598fa2dd821e528d6d8db8
class HybridLoader: <NEW_LINE> <INDENT> def __init__(self, db_path, ext): <NEW_LINE> <INDENT> self.db_path = db_path <NEW_LINE> self.ext = ext <NEW_LINE> if self.ext == '.npy': <NEW_LINE> <INDENT> self.loader = lambda x: np.load(x) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.loader = lambda x: np.load(x)['feat']...
If db_path is a director, then use normal file loading If lmdb, then load from lmdb The loading method depend on extention.
62598fa22ae34c7f260aaf64
class BoundingBoxSampleAnnotation: <NEW_LINE> <INDENT> __slots__ = ('value', 'top') <NEW_LINE> storage_signature = 'std_bboxes' <NEW_LINE> def __init__(self, prealloc_obj = 0): <NEW_LINE> <INDENT> self.value = ndarray((4, prealloc_obj), dtype = 'int32', order = 'C') <NEW_LINE> self.top = 0 <NEW_LINE> <DEDENT> def add_r...
The class stores single matrix which represents all bounding boxes on given sample (which is supposed to be a single image). The data layout is designed to accelerate matrix operations such as selecting max or min on one feature channel (for instance, x_min or y_max), not one bounding box. So note that the data is stor...
62598fa2435de62698e9bc77
class JobMatch(models.Model): <NEW_LINE> <INDENT> user = models.ForeignKey(User, verbose_name=_("User"), on_delete=models.CASCADE) <NEW_LINE> job = models.ForeignKey(Job, verbose_name=_("Job"), on_delete=models.CASCADE, null=True, blank=True) <NEW_LINE> show = models.BooleanField(_("Show"), default=True) <NEW_LINE> cl...
Model definition for JobMatch.
62598fa2d7e4931a7ef3bf1d
class SPECIAL(GenericSeminar): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @cached_property <NEW_LINE> def talks(self): <NEW_LINE> <INDENT> eastern = timezone('US/Eastern') <NEW_LINE> filename = os.path.join(os.path.dirname(os.path.abspath(__file__)),'special.yaml') <NEW_LINE> r...
class used for special seminars, like yearly events
62598fa27d847024c075c24a
class ConnectionMonitorTcpConfiguration(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'port': {'key': 'port', 'type': 'int'}, 'disable_trace_route': {'key': 'disableTraceRoute', 'type': 'bool'}, } <NEW_LINE> def __init__( self, *, port: Optional[int] = None, disable_trace_route: Optional[bool] = N...
Describes the TCP configuration. :param port: The port to connect to. :type port: int :param disable_trace_route: Value indicating whether path evaluation with trace route should be disabled. :type disable_trace_route: bool
62598fa22c8b7c6e89bd3649
class CircularList(list): <NEW_LINE> <INDENT> def __getitem__(self, index): <NEW_LINE> <INDENT> index = index % self.__len__() <NEW_LINE> return super().__getitem__(index)
>>> l = CircularList([1, 2, 3]) >>> l [1, 2, 3] >>> l[2] 3 >>> l[3] 1 >>> l[100] 2 >>>
62598fa28e7ae83300ee8f24
class Bless(Spell): <NEW_LINE> <INDENT> name = "Bless" <NEW_LINE> level = 1 <NEW_LINE> casting_time = "1 action" <NEW_LINE> casting_range = "30 feet" <NEW_LINE> components = ('V', 'S', 'M') <NEW_LINE> materials = """A sprinkling of holy water""" <NEW_LINE> duration = "Concentration, up to 1 minute" <NEW_LINE> ritual = ...
You bless up to three creatures of your choice within range. Whenever a target makes an attack roll or a saving throw before the spell ends, the target can roll a d4 and add the number rolled to the attack roll or saving throw. At Higher Levels: When you cast this spell using a spell slot of 2nd level or higher, y...
62598fa245492302aabfc354
class Tree: <NEW_LINE> <INDENT> def __init__(self, state=None, score=None, children=None, m=None) -> None: <NEW_LINE> <INDENT> self.state = state <NEW_LINE> self.score = score <NEW_LINE> self.children = children[:] if children is not None else [] <NEW_LINE> self.move = m
A bare-bones Tree ADT that identifies the root with the entire tree.
62598fa2435de62698e9bc78
class TransmissionSensor(Entity): <NEW_LINE> <INDENT> def __init__(self, sensor_type, transmission_client, client_name): <NEW_LINE> <INDENT> self._name = SENSOR_TYPES[sensor_type][0] <NEW_LINE> self.tm_client = transmission_client <NEW_LINE> self.type = sensor_type <NEW_LINE> self.client_name = client_name <NEW_LINE> s...
Representation of a Transmission sensor.
62598fa266656f66f7d5a275
class HKSAL7(FinTS3Segment): <NEW_LINE> <INDENT> account = DataElementGroupField(type=KTI1, _d="Kontoverbindung international") <NEW_LINE> all_accounts = DataElementField(type='jn', _d="Alle Konten") <NEW_LINE> max_number_responses = DataElementField(type='num', max_length=4, required=False, _d="Maximale Anzahl Einträg...
Saldenabfrage, version 7 Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Messages -- Multibankfähige Geschäftsvorfälle
62598fa324f1403a926857f5
class SetAuditConfigRequest(JDCloudRequest): <NEW_LINE> <INDENT> def __init__(self, parameters, header=None, version="v1"): <NEW_LINE> <INDENT> super(SetAuditConfigRequest, self).__init__( '/regions/{regionId}/agents', 'PATCH', header, version) <NEW_LINE> self.parameters = parameters
配置数据库审计信息
62598fa3498bea3a75a579a6
class ESP(object): <NEW_LINE> <INDENT> def __init__(self, port,baud=19200): <NEW_LINE> <INDENT> self.lock = threading.Lock() <NEW_LINE> try: <NEW_LINE> <INDENT> self.ser = serial.Serial(port=port, baudrate=baud, bytesize=8, timeout=1, parity='N', rtscts=1) <NEW_LINE> self.Abort = self.abort <NEW_LINE> ve = self.version...
Driver for Newport's ESP (100/300) motion controller. :Usage: >>> esp = NewportESP.ESP('/dev/ttyUSB0') # open communication with controller >>> stage = esp.axis(1) # open axis no 1
62598fa338b623060ffa8f18
class FileTypes(Enum): <NEW_LINE> <INDENT> surface = 1 <NEW_LINE> sounding = 2 <NEW_LINE> grid = 3
GEMPAK file type.
62598fa330dc7b766599f6d2
class MedicalInfoForSection(PacketsForSection): <NEW_LINE> <INDENT> template_name = 'trips/medical_packet.html'
Packets for croos, by section. Contains leader and trippee med information.
62598fa3fff4ab517ebcd66a
class RedfishSystemBiosNotFoundError( Exception ): <NEW_LINE> <INDENT> pass
Raised when the BIOS resource cannot be found
62598fa38a43f66fc4bf2001
class ConfigurationConfig(AppConfig): <NEW_LINE> <INDENT> name = "satchmo.configuration" <NEW_LINE> verbose_name = "Configuration" <NEW_LINE> def ready(self): <NEW_LINE> <INDENT> pass
Configuration app.
62598fa3e5267d203ee6b791
class Ingredient: <NEW_LINE> <INDENT> def __init__(self, food_product, amount=None, weight_unit=None, amount_type=1): <NEW_LINE> <INDENT> self.food_product = food_product <NEW_LINE> self.amount = amount <NEW_LINE> self.amount_type = amount_type <NEW_LINE> self.weight_unit = weight_unit <NEW_LINE> if AMOUNT_TYPE[self.am...
Ingredient of a meal
62598fa3498bea3a75a579a7
class Category(models.Model): <NEW_LINE> <INDENT> index_weight = 100 <NEW_LINE> trade = models.ForeignKey(Trade,verbose_name=_("trade"),null=True,blank=True) <NEW_LINE> parent = models.ForeignKey('self',verbose_name=_("parent"),null=True,blank=True) <NEW_LINE> code = models.CharField(_("code"),max_length=const.DB_CHAR_...
分类
62598fa33617ad0b5ee05fd7
class HeapPriorityQueue(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._heap = [] <NEW_LINE> self._dict = {} <NEW_LINE> <DEDENT> def push(self, item): <NEW_LINE> <INDENT> heapq.heappush(self._heap, (item.prio, item.key)) <NEW_LINE> self._dict[item.key] = item <NEW_LINE> <DEDENT> def pop(self)...
Priority queue based on heapq module.
62598fa38c0ade5d55dc35d2
class QueryEditorCtrl(wx.TextCtrl): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> wx.TextCtrl.__init__(self, *args, **kwargs)
MySQL Query Editor control.
62598fa3d58c6744b42dc216
class Robot(Circle): <NEW_LINE> <INDENT> def __init__(self, pos): <NEW_LINE> <INDENT> center = Point(pos, Y_VALUE) <NEW_LINE> super().__init__(center, 7) <NEW_LINE> self.setOutline('green') <NEW_LINE> self.draw(p.win) <NEW_LINE> self.reverse = False <NEW_LINE> <DEDENT> def getPos(self): <NEW_LINE> <INDENT> return self....
A naive object with a few helper methods.
62598fa3435de62698e9bc79
class SimpleDictCache(NoCache): <NEW_LINE> <INDENT> def __init__(self, cache_name='default', timeout=None, public=None, private=None, *args, **kwargs): <NEW_LINE> <INDENT> super(SimpleDictCache, self).__init__(*args, **kwargs) <NEW_LINE> self.serializer = UTCSerializer() <NEW_LINE> self.timeout = timeout or self.cache....
Uses Django's current ``CACHES`` configuration to store cached data.
62598fa38da39b475be03066
class Pokemon_Stats: <NEW_LINE> <INDENT> def __init__(self, root, type1, type2, height, weight, entry): <NEW_LINE> <INDENT> self.frame = Frame(root) <NEW_LINE> self.labels = [] <NEW_LINE> self.pokemon = (type1, type2, height, weight, entry) <NEW_LINE> self.create_widgets() <NEW_LINE> self.frame.pack() <NEW_LINE> <DEDEN...
Frame for Pokémon stats
62598fa3be8e80087fbbeee6
class H6(H): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> tagName = "h6"
Defines the least important heading
62598fa30c0af96317c56207
class ComputeTargetInstancesListRequest(_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> proj...
A ComputeTargetInstancesListRequest object. Fields: filter: Sets a filter expression for filtering listed resources, in the form filter={expression}. 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 at...
62598fa332920d7e50bc5edc
class GroupActivityView(ListView): <NEW_LINE> <INDENT> template_name = 'groups/activity.html' <NEW_LINE> group = None <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> if not self.group: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> members = ([(member.user.id) for member in self.gr...
Returns recent group activity.
62598fa32c8b7c6e89bd364c
class EntryItem(Item): <NEW_LINE> <INDENT> title = Field() <NEW_LINE> date = Field() <NEW_LINE> text = Field()
A blog entry.
62598fa3cc0a2c111447ae94
class AssertionCombiner(object): <NEW_LINE> <INDENT> def __init__(self, license): <NEW_LINE> <INDENT> self.license = license <NEW_LINE> <DEDENT> def handle_file(self, input_filename, output_file): <NEW_LINE> <INDENT> combine_assertions([input_filename], output_file, self.license)
A class that wraps the combine_assertions function, so it can be tested in the same way as the readers, despite its extra parameters.
62598fa363d6d428bbee2638
class NodePath(Node): <NEW_LINE> <INDENT> def __init__(self, parent, isGroup, name): <NEW_LINE> <INDENT> assert isinstance(name, str) and name != '', 'Invalid node name %s' % name <NEW_LINE> self.name = name <NEW_LINE> self._match = MatchString(self, name) <NEW_LINE> super().__init__(parent, isGroup, ORDER_PATH) <NEW_L...
Provides a node that matches a simple string path element. @see: Node
62598fa316aa5153ce400387
@implementer(IVocabularyFactory) <NEW_LINE> class LicensesVocabulary(object): <NEW_LINE> <INDENT> def __call__(self, context): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> licenses = api.portal.get_registry_record( 'rdfmarshaller_licenses', interface=ILicenses) <NEW_LINE> items = [ SimpleTerm(str(y), str(y), str(y)) fo...
LicensesVocabularyFactory
62598fa356b00c62f0fb2738
class itkNearestNeighborInterpolateImageFunctionID2D(itkInterpolateImageFunctionPython.itkInterpolateImageFunctionID2D): <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 co...
Proxy of C++ itkNearestNeighborInterpolateImageFunctionID2D class
62598fa330dc7b766599f6d4
class Map(object): <NEW_LINE> <INDENT> def __init__(self, filename=params['DEFAULT_MAP']): <NEW_LINE> <INDENT> self.obstacles = pygame.sprite.Group() <NEW_LINE> self.ground = pygame.sprite.Group() <NEW_LINE> self.obs_coords = set() <NEW_LINE> self.ground_coords = set() <NEW_LINE> cur_path = os.getcwd() <NEW_LINE> map_p...
Represents all obstacle on map
62598fa34f88993c371f044d
class StationMagnitudeContributionIndex(_object): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> __setattr__ = lambda self, name, value: _swig_setattr(self, StationMagnitudeContributionIndex, name, value) <NEW_LINE> __swig_getmethods__ = {} <NEW_LINE> __getattr__ = lambda self, name: _swig_getattr(self, Statio...
Proxy of C++ Seiscomp::DataModel::StationMagnitudeContributionIndex class.
62598fa37047854f4633f25f
class EC3POInterfaceError(c.InterfaceError): <NEW_LINE> <INDENT> pass
Error class to raise in ec3po interface issues.
62598fa3498bea3a75a579a9
class AtwDeviceZoneClimate(MelCloudClimate): <NEW_LINE> <INDENT> _attr_max_temp = 30 <NEW_LINE> _attr_min_temp = 10 <NEW_LINE> _attr_supported_features = SUPPORT_TARGET_TEMPERATURE <NEW_LINE> def __init__( self, device: MelCloudDevice, atw_device: AtwDevice, atw_zone: Zone ) -> None: <NEW_LINE> <INDENT> super().__init_...
Air-to-Water zone climate device.
62598fa39c8ee823130400b2
class TestZendeskIntegration(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 testZendeskIntegration(self): <NEW_LINE> <INDENT> pass
ZendeskIntegration unit test stubs
62598fa3379a373c97d98e98
class MapWrapper(object): <NEW_LINE> <INDENT> def __init__(self, pool=1): <NEW_LINE> <INDENT> self.pool = None <NEW_LINE> self._mapfunc = map <NEW_LINE> self._own_pool = False <NEW_LINE> if callable(pool): <NEW_LINE> <INDENT> self.pool = pool <NEW_LINE> self._mapfunc = self.pool <NEW_LINE> <DEDENT> else: <NEW_LINE> <IN...
Parallelisation wrapper for working with map-like callables, such as `multiprocessing.Pool.map`. Parameters ---------- pool : int or map-like callable If `pool` is an integer, then it specifies the number of threads to use for parallelization. If ``int(pool) == 1``, then no parallel processing is used and ...
62598fa3796e427e5384e61b
class GrpcDebugHook(session_run_hook.SessionRunHook): <NEW_LINE> <INDENT> def __init__(self, grpc_debug_server_addresses, watch_fn=None, thread_name_filter=None, log_usage=True): <NEW_LINE> <INDENT> for address in grpc_debug_server_addresses: <NEW_LINE> <INDENT> if address.startswith(_GRPC_ENDPOINT_PREFIX): <NEW_LINE> ...
A hook that streams debugger-related events to any grpc_debug_server. For example, the debugger data server is a grpc_debug_server. The debugger data server writes debugger-related events it receives via GRPC to logdir. This enables debugging features in Tensorboard such as health pills. When the arguments of debug_u...
62598fa3236d856c2adc937e
class TestIsVisibleCss: <NEW_LINE> <INDENT> @pytest.fixture(autouse=True) <NEW_LINE> def setup(self, stubs): <NEW_LINE> <INDENT> self.frame = stubs.FakeWebFrame(QRect(0, 0, 100, 100)) <NEW_LINE> <DEDENT> def test_visibility_visible(self): <NEW_LINE> <INDENT> elem = get_webelem(QRect(0, 0, 10, 10), self.frame, visibilit...
Tests for is_visible with CSS attributes. Attributes: frame: The FakeWebFrame we're using to test.
62598fa32c8b7c6e89bd364d
class Daughter(Heir): <NEW_LINE> <INDENT> def add(self, calc, mother, father): <NEW_LINE> <INDENT> calc.deceased_set.first().add_daughter(daughter=self, mother=mother, father=father) <NEW_LINE> <DEDENT> def get_quote(self, calc): <NEW_LINE> <INDENT> if calc.has_son(): <NEW_LINE> <INDENT> self.asaba = True <NEW_LINE> se...
Daughter Class
62598fa3adb09d7d5dc0a412
class LuftdatenConnectionError(LuftdatenError): <NEW_LINE> <INDENT> pass
When a connection error is encountered.
62598fa330bbd722464698bb
class get_result: <NEW_LINE> <INDENT> thrift_spec = ( (0, TType.STRUCT, 'success', (Person, Person.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, success=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBinaryProtocol.TBinar...
Attributes: - success
62598fa3656771135c48950b
class BigbysHand(Spell): <NEW_LINE> <INDENT> name = "Bigbys Hand" <NEW_LINE> level = 5 <NEW_LINE> casting_time = "1 action" <NEW_LINE> casting_range = "120 feet" <NEW_LINE> components = ('V', 'S', 'M') <NEW_LINE> materials = """An eggshell and a snakeskin glove""" <NEW_LINE> duration = "Instantaneous" <NEW_LINE> ritual...
You create a Large hand of shimmering, translucent force in an unoccupied space that you can see within range. The hand lasts for the spell’s duration, and it moves at your command, mimicking the movements of your own hand. The hand is an object that has AC 20 and hit points equal to your hit point maximum. If it ...
62598fa345492302aabfc358
class EvenMask(BinaryMask): <NEW_LINE> <INDENT> def __init__(self, size): <NEW_LINE> <INDENT> super().__init__(size) <NEW_LINE> <DEDENT> def __call__(self): <NEW_LINE> <INDENT> return np.array([1 if i % 2 == 0 else 0 for i in range(self.size)])
1 for even, 0 for odds
62598fa332920d7e50bc5ede
class Graph: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.edges = defaultdict(list) <NEW_LINE> self.distances = {} <NEW_LINE> <DEDENT> def add_edge(self, from_node, to_node, distance): <NEW_LINE> <INDENT> self.edges[from_node].append(to_node) <NEW_LINE> self.distances[(from_node, to_node)] = distanc...
data structure to store weighted directed graph in the form of adjecency list
62598fa30c0af96317c56209
class CommunityList(Widget, BaseList): <NEW_LINE> <INDENT> CHILD_ATTRIBUTE = "data"
Class to represent a Related Communities widget. Find an existing one: .. code-block:: python community_list = None widgets = reddit.subreddit('redditdev').widgets for widget in widgets.sidebar: if isinstance(widget, praw.models.CommunityList): community_list = widget break ...
62598fa3435de62698e9bc7c
class BucketlistSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> items = ItemSerializer(many=True, read_only=True) <NEW_LINE> created_by = CreatedbyField(read_only=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Bucketlist <NEW_LINE> fields = ('id', 'name', 'items', 'date_created', 'date_modified',...
Model serializer for the bucketlist model
62598fa385dfad0860cbf9b8
class GB3DownstreamUTR(GB3Part, GB3OmegaModule): <NEW_LINE> <INDENT> signature = ("GCTT", "GGTA")
A GoldenBraid 3.0 3' Untranslated Region.
62598fa33317a56b869be48d
class DatasetHistoValues(Dataset): <NEW_LINE> <INDENT> def __init__(self, generator, document): <NEW_LINE> <INDENT> self.generator = generator <NEW_LINE> self.document = document <NEW_LINE> self.linked = None <NEW_LINE> self._invalidpoints = None <NEW_LINE> self.changeset = -1 <NEW_LINE> <DEDENT> def getData(self): <NE...
A dataset for getting the height of the bins in a histogram.
62598fa366656f66f7d5a279
class PaxosMessage: <NEW_LINE> <INDENT> def __init__(self, msg_type, request_seq): <NEW_LINE> <INDENT> self.msg_type = msg_type <NEW_LINE> self.request_seq = request_seq <NEW_LINE> self.new_block = None <NEW_LINE> self.prop_block = None <NEW_LINE> self.supp_block = None <NEW_LINE> self.com_block = None <NEW_LINE> self....
A paxos message used to commit a block. Args: msg_type (str): TRY, TRY_OK, PROPOSE, PROPOSE_ACK or COMMIT. request_seq (int): each message contains a request sequence number s.t outdated messaged can be detected. Attributes: new_block (int): block_id of new block (block a quick node wants to commit). ...
62598fa3e1aae11d1e7ce767
class SessionMiddleware(object): <NEW_LINE> <INDENT> def __init__(self, bugsnag): <NEW_LINE> <INDENT> self.bugsnag = bugsnag <NEW_LINE> <DEDENT> def __call__(self, notification): <NEW_LINE> <INDENT> tls = ThreadLocals.get_instance() <NEW_LINE> session = tls.get_item('bugsnag-session', {}).copy() <NEW_LINE> if session: ...
Session middleware ensures that a session is appended to the notification.
62598fa391af0d3eaad39c95
class RNNModel(nn.Module): <NEW_LINE> <INDENT> def __init__(self, rnn_type, ntoken, ninp, nhid, nlayers, dropout=0.5, tie_weights=False): <NEW_LINE> <INDENT> super(RNNModel, self).__init__() <NEW_LINE> print("building RNN language model...") <NEW_LINE> self.drop = nn.Dropout(dropout) <NEW_LINE> self.encoder = nn.Embedd...
Container module with an encoder, a recurrent module, and a decoder.
62598fa399cbb53fe6830d5c
class ProjectionGetTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> sim.setup(max_delay=0.5) <NEW_LINE> sim.Population.nPop = 0 <NEW_LINE> self.target33 = sim.Population((3,3), sim.IF_curr_alpha, label="target33") <NEW_LINE> self.target6 = sim.Population((6,), sim.IF_curr_alpha, label=...
Tests of the getWeights(), getDelays() methods of the Projection class.
62598fa3be383301e0253680
class DescribePlayErrorCodeDetailInfoListRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.StartTime = None <NEW_LINE> self.EndTime = None <NEW_LINE> self.Granularity = None <NEW_LINE> self.StatType = None <NEW_LINE> self.PlayDomains = None <NEW_LINE> self.MainlandOrOversea = None...
DescribePlayErrorCodeDetailInfoList request structure.
62598fa37047854f4633f261
class TestGenerate(TestCase): <NEW_LINE> <INDENT> generated_files = ('django-partial.po', 'djangojs-partial.po', 'mako.po') <NEW_LINE> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> sys.stderr.write( "\nThis test tests that i18n extraction (`paver i18n_extract`) works properly. " "If you experience fa...
Tests functionality of i18n/generate.py
62598fa33539df3088ecc13d
class _CatCubeMeans(_BaseCubeMeans): <NEW_LINE> <INDENT> @lazyproperty <NEW_LINE> def means(self): <NEW_LINE> <INDENT> return self._means
Means cube-measure for a non-MR stripe.
62598fa3498bea3a75a579ab
class Bottom_Method(object): <NEW_LINE> <INDENT> def __init__(self, driver): <NEW_LINE> <INDENT> self.driver = driver <NEW_LINE> <DEDENT> def find_elem_in_dom(self, locator, timeout=5): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return WebDriverWait(self.driver, timeout).until( EC.presence_of_element_located((By.CSS_...
底层方法封装
62598fa3e5267d203ee6b795