code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class ToolRequirementsPositiveTest(absltest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.test_console = io.TestIO() <NEW_LINE> <DEDENT> def has_requirement(self, req: tool_requirements.Requirement): <NEW_LINE> <INDENT> tool_requirements._REQUIREMENTS = {'test': [req]} <NEW_LINE> self.assertT...
This will test all positive cases (Having the requirement).
62598f9715baa72349461c9c
class ProductVariantResponse(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swagger_types = { 'product_variants': 'list[ProductVariant]', 'options': 'list[ProductOptionList]' } <NEW_LINE> self.attribute_map = { 'product_variants': 'ProductVariants', 'options': 'Options' } <NEW_LINE> self._pro...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f97b7558d5895463349
class RoomType(Enum): <NEW_LINE> <INDENT> MY = 1 <NEW_LINE> DIRECT = 2 <NEW_LINE> GROUP = 3
room type of ChatWork (my/direct/group)
62598f97627d3e7fe0e06bc3
class ClickObserver(Observer): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._subject_state = "up" <NEW_LINE> <DEDENT> def update(self, observable, arg=None): <NEW_LINE> <INDENT> if observable.getState() == "down": <NEW_LINE> <INDENT> self._subject_state = observable.getState() <NEW_LINE> print("Zdar...
Concrete observer
62598f978e7ae83300ee8db7
class Session: <NEW_LINE> <INDENT> def __init__(self, id, moses_options, crossval_options, dataset, mnemonic, target_feature="case"): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> if "W 1" in moses_options: <NEW_LINE> <INDENT> self.moses_options = moses_options <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.moses_opt...
A class that represents a single run of the MOSES analysis
62598f970c0af96317c5609e
class FBMultiLangManager (object): <NEW_LINE> <INDENT> def FBMultiLangManager(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def GetCurrentLanguage(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def SetCurrentLanguage(self,pLanguage): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> Languages=property(doc="List o...
Language manager. The class FBMultiLangManager indicates the supported languages and allows to query and change the current language.The support for localization is done using conversion tables from internal names to language specific names, so that they can be used in the GUI and other human readable cont...
62598f97d53ae8145f9181a7
class Vres_Agent_View(model_base.BASE, HasId): <NEW_LINE> <INDENT> __tablename__ = 'vres_agent_view' <NEW_LINE> agent_id = sa.Column(sa.String(attr.UUID_LEN)) <NEW_LINE> agent_ip = sa.Column(sa.String(attr.IP_LEN)) <NEW_LINE> agent_nat_ip = sa.Column(sa.String(attr.IP_LEN)) <NEW_LINE> dc_name = sa.Column(sa.String(attr...
Represents a vres_agent_view.
62598f97d6c5a102081e1e5e
class TypeOfSession(messages.Enum): <NEW_LINE> <INDENT> NOT_SPECIFIED = 1 <NEW_LINE> KEYNOTE = 2 <NEW_LINE> LECTURE = 3 <NEW_LINE> WORKSHOP = 4
Type of Session -- enumeration value
62598f971f037a2d8b9e3dfe
class ICreateOrgEvent(Interface): <NEW_LINE> <INDENT> pass
新增一个organization object
62598f9745492302aabfc1f3
class InfoSplitter(BaseVspSplitter): <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, **kwargs): <NEW_LINE> <INDENT> _simuPOP_linop.InfoSplitter_swiginit(self, _simuPOP_linop....
Details: This splitter defines VSPs according to the value of an information field of each indivdiual. A VSP is defined either by a value or a range of values.
62598f978e7ae83300ee8db8
class Room(BaseModel): <NEW_LINE> <INDENT> identity = CharField(max_length=64, index=True) <NEW_LINE> create_time = DateTimeField(default=datetime.datetime.now) <NEW_LINE> update_time = DateTimeField(default=datetime.datetime.now) <NEW_LINE> def __json__(self): <NEW_LINE> <INDENT> return { "id": str(self.id), "oneToOne...
Room for chatting
62598f9794891a1f408b957e
class SelectWithPK(forms.Select): <NEW_LINE> <INDENT> option_template_name = 'widgets/select_option_with_pk.html'
Include the primary key of each option in the option label (e.g. "Router7 (4721)").
62598f97656771135c48939c
class ApplicationEvent(HasStrictTraits): <NEW_LINE> <INDENT> application = ReadOnly <NEW_LINE> event_type = ReadOnly
An event associated with an application
62598f977047854f4633f0fc
class Space(object): <NEW_LINE> <INDENT> def __init__(self, shape=None, dtype=None): <NEW_LINE> <INDENT> import numpy as np <NEW_LINE> self.shape = None if shape is None else tuple(shape) <NEW_LINE> self.dtype = None if dtype is None else np.dtype(dtype) <NEW_LINE> <DEDENT> def sample(self): <NEW_LINE> <INDENT> raise N...
Defines the observation and action spaces, so you can write generic code that applies to any Env. For example, you can choose a random action.
62598f97a8ecb03325870f25
class UpdateOwnProfile(permissions.BasePermission): <NEW_LINE> <INDENT> def has_object_permission(self, request, view, obj): <NEW_LINE> <INDENT> if request.method in permissions.SAFE_METHODS: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> return obj.id == request.user.id
Allow Users to edit their own profile
62598f97851cf427c66b7fe2
class OSWrapperTests(test_os_helper.OSWrapperTests): <NEW_LINE> <INDENT> @defer.inlineCallbacks <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> yield super(OSWrapperTests, self).setUp() <NEW_LINE> self.handler = MementoHandler() <NEW_LINE> self.handler.setLevel(logging.DEBUG) <NEW_LINE> self._logger = logging.getLogger...
Tests for os wrapper functions.
62598f97ac7a0e7691f72227
class Margherita(Pizza): <NEW_LINE> <INDENT> cost = 35.0 <NEW_LINE> ingredients = ['cheese', 'tomatoes', 'basil', 'olives'] <NEW_LINE> def __init__(self, extra_ingredients): <NEW_LINE> <INDENT> super().__init__(self.ingredients, self.cost, extra_ingredients)
This class for pizza Margherita.
62598f9745492302aabfc1f4
class get_edge_result(object): <NEW_LINE> <INDENT> thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), (1, TType.STRUCT, 'ex', (NotFound, NotFound.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, success=None, ex=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> self.ex = ex <NEW_LINE> <DEDE...
Attributes: - success - ex
62598f97f8510a7c17d7e005
class AddLossModule(nn.Module): <NEW_LINE> <INDENT> def __init__(self, module, criterion, ignore_index=PAD): <NEW_LINE> <INDENT> super(AddLossModule, self).__init__() <NEW_LINE> self.module = module <NEW_LINE> self.criterion = criterion <NEW_LINE> self.ignore_index = ignore_index <NEW_LINE> <DEDENT> def forward(self, m...
adds a loss to module for easy parallelization
62598f970fa83653e46f4c06
class TextItem(Item): <NEW_LINE> <INDENT> upnp_class = "object.item.textItem" <NEW_LINE> didl_properties_defs = Item.didl_properties_defs + [ ("upnp", "author", "O"), ("upnp", "res@protection", "O"), ("upnp", "longDescription", "O"), ("upnp", "storageMedium", "O"), ("upnp", "rating", "O"), ("dc", "description", "O"), (...
DIDL Text Item.
62598f97498bea3a75a5783b
class AuthAction(Action): <NEW_LINE> <INDENT> def __call__(self, parser, namespace, values, option_string=None): <NEW_LINE> <INDENT> passman = self.getPasswordManager(values) <NEW_LINE> authenticator = BasicProxyAuth(passman, "mitmproxy") <NEW_LINE> setattr(namespace, self.dest, authenticator) <NEW_LINE> <DEDENT> def g...
Helper class to allow seamless integration int argparse. Example usage: parser.add_argument( "--nonanonymous", action=NonanonymousAuthAction, nargs=0, help="Allow access to any user long as a credentials are specified." )
62598f97a05bb46b3848a59b
@override_settings(EMAIL_BACKEND='anymail.backends.test.EmailBackend') <NEW_LINE> class TestBackendTestCase(SimpleTestCase, AnymailTestMixin): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(TestBackendTestCase, self).setUp() <NEW_LINE> self.message = AnymailMessage('Subject', 'Text Body', 'from@example....
Base TestCase using Anymail's Test EmailBackend
62598f97baa26c4b54d4efcc
class WeightsReader: <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> self.eof = False <NEW_LINE> self.path = path <NEW_LINE> if path is None: <NEW_LINE> <INDENT> self.eof = True <NEW_LINE> return <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.size = os.path.getsize(path) <NEW_LINE> major, minor, r...
YOLO .weights file reader incremental reader of float32 binary files Reference: https://github.com/thtrieu/darkflow/blob/b2aee0000cd2a956b9f1de6dbfef94d53158b7d8/darkflow/utils/loader.py#L107-L138
62598f975f7d997b871f926b
class IConfig(Interface): <NEW_LINE> <INDENT> pass
marker for configuration
62598f9701c39578d7f12a9b
class CatchFrisbee(Game): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.name = 'catch frisbee' <NEW_LINE> self.awake_energy_used = 1
Catch a frisbee game. It deducts one points of the awake_scale.
62598f97b57a9660fecd1798
class RestartRequiredError(Exception): <NEW_LINE> <INDENT> def __init__(self, expression, message='Необходима перезагрузка приложения'): <NEW_LINE> <INDENT> self.expression = expression <NEW_LINE> self.message = message <NEW_LINE> super().__init__(self.expression, self.message)
Exception raised if restart is required. Attributes: expression - input expression in which the error occurred; message - explanation of the error.
62598f97d6c5a102081e1e60
class ZeroPadding2D(Layer): <NEW_LINE> <INDENT> def __init__(self, padding=(1, 1), dim_ordering='default', **kwargs): <NEW_LINE> <INDENT> super(ZeroPadding2D, self).__init__(**kwargs) <NEW_LINE> if dim_ordering == 'default': <NEW_LINE> <INDENT> dim_ordering = K.image_dim_ordering() <NEW_LINE> <DEDENT> self.padding = tu...
Zero-padding layer for 2D input (e.g. picture). # Arguments padding: tuple of int (length 2) How many zeros to add at the beginning and end of the 2 padding dimensions (axis 3 and 4). dim_ordering: 'th' or 'tf'. In 'th' mode, the channels dimension (the depth) is at index 1, in ...
62598f978da39b475be02f00
class Client(object): <NEW_LINE> <INDENT> def __init__(self, loop=None, *args, **kwargs): <NEW_LINE> <INDENT> self._loop = loop or asyncio.get_event_loop() <NEW_LINE> self._client = _Client(*args, **kwargs) <NEW_LINE> self._wrap_blocking_method("connect") <NEW_LINE> self._wrap_blocking_method("connect_srv") <NEW_LINE> ...
An AsyncIO based wrapper around the paho-mqtt MQTT client class. Essentially, the differences between this and the paho.mqtt.client.Client are: * The constructor takes an asyncio loop to use as the first argument. * Blocking methods (connect, connect_srv, reconnect_delay_set) are now coroutines. * Callback function...
62598f9716aa5153ce40021a
class Ordinal(Likelihood): <NEW_LINE> <INDENT> def __init__(self, bin_edges): <NEW_LINE> <INDENT> Likelihood.__init__(self) <NEW_LINE> self.bin_edges = bin_edges <NEW_LINE> self.num_bins = bin_edges.size + 1 <NEW_LINE> self.sigma = Parameter(1.0, transform=transforms.positive) <NEW_LINE> <DEDENT> @params_as_tensors <NE...
A likelihood for doing ordinal regression. The data are integer values from 0 to K, and the user must specify (K-1) 'bin edges' which define the points at which the labels switch. Let the bin edges be [a_0, a_1, ... a_{K-1}], then the likelihood is p(Y=0|F) = phi((a_0 - F) / sigma) p(Y=1|F) = phi((a_1 - F) / sigma) -...
62598f97009cb60464d01242
class Application(altar.application, family="altar.shells.application"): <NEW_LINE> <INDENT> job = altar.simulations.run() <NEW_LINE> job.doc = "the job input parameters" <NEW_LINE> model = altar.models.model() <NEW_LINE> model.doc = "the AlTar model to sample" <NEW_LINE> rng = altar.simulations.rng() <NEW_LINE> rng.do...
The base class for simple AlTar applications
62598f977cff6e4e811b573c
class CheckCommand(CommandNoArgs, CommandSelect): <NEW_LINE> <INDENT> command = b'CHECK'
The ``CHECK`` command initiates an implementation-specific backend synchronization for the selected mailbox. See Also: `RFC 3501 6.4.1. <https://tools.ietf.org/html/rfc3501#section-6.4.1>`_
62598f97097d151d1a2c0d40
class PrecomputedLoader(PipelineLoader): <NEW_LINE> <INDENT> def __init__(self, constants, dates, sids): <NEW_LINE> <INDENT> loaders = {} <NEW_LINE> for column, const in iteritems(constants): <NEW_LINE> <INDENT> frame = DataFrame( const, index=dates, columns=sids, dtype=column.dtype, ) <NEW_LINE> loaders[column] = Data...
Synthetic PipelineLoader that uses a pre-computed array for each column. Parameters ---------- values : dict Map from column to values to use for that column. Values can be anything that can be passed as the first positional argument to a DataFrame whose indices are ``dates`` and ``sids`` dates : iterable[...
62598f974e4d56256637213f
class myCallable(object): <NEW_LINE> <INDENT> def __init__(self, func=None, retWeights=()): <NEW_LINE> <INDENT> self.argtypes = [] <NEW_LINE> self.restype = None <NEW_LINE> self.func = func <NEW_LINE> self.retWeights = retWeights <NEW_LINE> <DEDENT> def __call__(self, *args): <NEW_LINE> <INDENT> self.func(*args) <NEW_L...
Need a class which is callable, but also need it to have the argtypes and restype parameters to match the calls made setting up the CCD.
62598f976e29344779b00378
class ExtendedResourceFile(models.ResourceFile): <NEW_LINE> <INDENT> _attribute_map = { 'http_url': {'key': 'httpUrl', 'type': 'str'}, 'auto_storage_container_name': {'key': 'autoStorageContainerName', 'type': 'str'}, 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, 'storage_container_url': {'key': 'storageContaine...
A file to be downloaded from Azure blob storage to a compute node. :param http_url: The URL of the file within Azure Blob Storage. This URL must be readable using anonymous access; that is, the Batch service does not present any credentials when downloading the blob. There are two ways to get such a URL for a blob ...
62598f97596a89723612799c
class abs(Elementwise): <NEW_LINE> <INDENT> def __init__(self, x): <NEW_LINE> <INDENT> super(abs, self).__init__(x) <NEW_LINE> <DEDENT> @Elementwise.numpy_numeric <NEW_LINE> def numeric(self, values): <NEW_LINE> <INDENT> return np.absolute(values[0]) <NEW_LINE> <DEDENT> def sign_from_args(self): <NEW_LINE> <INDENT> ret...
Elementwise absolute value
62598f97a8ecb03325870f27
class InvalidObjectError(ApiError): <NEW_LINE> <INDENT> pass
An invalid object was received by the server.
62598f97596a89723612799d
class simple_matplotlib_plot(object): <NEW_LINE> <INDENT> def __init__(self, figure_size=(8,8), font_size=12, title_font_size=12, facecolor='white', transparent=False): <NEW_LINE> <INDENT> adopt_init_args(self, locals()) <NEW_LINE> try : <NEW_LINE> <INDENT> import matplotlib <NEW_LINE> import matplotlib.figure <NEW_LIN...
Class for writing a Matplotlib plot to a static image file without a GUI. This should be subclassed and combined with whatever mixin is used to actually responsible for the plotting.
62598f9724f1403a92685740
class RotationMatrix(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def from_euler_angles(euler, rotation_order='ZYX'): <NEW_LINE> <INDENT> cr = cos(euler[0]) <NEW_LINE> sr = sin(euler[0]) <NEW_LINE> sp = sin(euler[1]) <NEW_LINE> cp = cos(euler[1]) <NEW_LINE> cy = cos(euler[2]) <NEW_LINE> sy = sin(euler[2]) <NEW...
Rotation matrix (Direction Cosine Matrix, DCM)
62598f97bde94217f37074f8
class _URLPrimitive(_Primitive): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__("url") <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "mplane.model.prim_url"
Represents a URL. For now, URLs are implemented only as strings, without any parsing or validation.
62598f97b7558d589546334c
class ReturnErrno(BasicBlock): <NEW_LINE> <INDENT> def __init__(self, errno): <NEW_LINE> <INDENT> super().__init__([ SockFilter(BPF_RET, 0x00, 0x00, SECCOMP_RET_ERRNO | (errno & SECCOMP_RET_DATA)) ]) <NEW_LINE> self.errno = errno
A BasicBlock that unconditionally returns the specified errno.
62598f9710dbd63aa1c708d4
class Guide(Region): <NEW_LINE> <INDENT> _weakest_section_locator = (By.CSS_SELECTOR, '.weaker') <NEW_LINE> _chapter_locator = (By.CSS_SELECTOR, '.chapter-panel:not(.weaker)') <NEW_LINE> @property <NEW_LINE> def weakest(self): <NEW_LINE> <INDENT> row_root = self.find_element(*self._weakest_section_locator) <NEW_LINE> r...
The performance guide weakest guide and chapters.
62598f978da39b475be02f01
class ImageNameTests(unittest.TestCase): <NEW_LINE> <INDENT> def test_simple_name(self): <NEW_LINE> <INDENT> pass
Testing file-naming functions
62598f978e71fb1e983bb7d3
@JsonObject(snapshot=SnapshotName, detach=maybe(DetachClientsList), ro=maybe([ClientId]), force=False) <NEW_LINE> class SnapshotReassignDesc(object): <NEW_LINE> <INDENT> pass
snapshot: The name of the snapshot which should be reassigned. detach: The clients from which to detach the given snapshot. ro: The clients on which to attach the snapshot. force: Whether to force detaching of open snapshots.
62598f97a79ad16197769d80
class ObservationSpace(ABC): <NEW_LINE> <INDENT> def __init__(self, env:Environment, minValue:int = 0): <NEW_LINE> <INDENT> self.env = env <NEW_LINE> self._n_ = env.shape <NEW_LINE> self.mV = minValue <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> self._i_ = [] <NEW_LINE> self._tl_ = [] <NEW_LINE> for i in...
Discrete observation space class Stores all the posible observations for an environment and can generate samples with the method sample(). Parameters ---------- env: Environment All the object minValue: int Default 0. The minimum value that a cell's state can take. It's the lower inclusive of the action s...
62598f9756b00c62f0fb25cd
@tf_export("data.experimental.DatasetStructure") <NEW_LINE> class DatasetStructure(structure_lib.Structure): <NEW_LINE> <INDENT> def __init__(self, element_structure): <NEW_LINE> <INDENT> self._element_structure = element_structure <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return (isinstance(othe...
Represents a `Dataset` of structured values.
62598f973c8af77a43b67dcb
class DocumentCheckoutError(Exception): <NEW_LINE> <INDENT> pass
Base checkout exception.
62598f97e64d504609df9246
class CustomPropertyDefinitionSchema(CustomPropertyDefinitionCondensedSchema, EntitySchema): <NEW_LINE> <INDENT> object_types = ma.fields.List(cls_or_instance=ma.fields.Str, required=False, allow_none=True, data_key='objectTypes') <NEW_LINE> description = ma.fields.Str(required=False) <NEW_LINE> @ma.pre_dump() <NEW_LIN...
A marshmallow schema corresponding to a Qlik Sense Custom Property Definition object with full attribution
62598f97bd1bec0571e14f53
class __Regex(object): <NEW_LINE> <INDENT> def __init__(self, flags, groups, groupindex, pattern): <NEW_LINE> <INDENT> self.flags = flags <NEW_LINE> self.groups = groups <NEW_LINE> self.groupindex = groupindex <NEW_LINE> self.pattern = pattern <NEW_LINE> <DEDENT> def search(self, string, pos=0, endpos=-1): <NEW_LINE> <...
Mock class for a regular expression pattern object.
62598f9701c39578d7f12a9d
class LogEntry(object): <NEW_LINE> <INDENT> def __init__(self, timestamp, type, message): <NEW_LINE> <INDENT> self.timestamp = timestamp <NEW_LINE> self.type = type <NEW_LINE> self.message = message <NEW_LINE> entry_time = time.localtime(self.timestamp) <NEW_LINE> self.readable_time = '%02i:%02i:%02i' % ( entry_time[3]...
Individual tor or erebus log entry. **Note:** Tor doesn't include the date in its timestamps so the year component may be inaccurate. (:trac:`15607`) :var int timestamp: unix timestamp for when the event occured :var str readable_time: human readable time of the log entry :var str type: event type :var str message: e...
62598f97097d151d1a2c0d41
class EjectPhasedPaulis(): <NEW_LINE> <INDENT> def __init__(self, tolerance: float = 1e-8) -> None: <NEW_LINE> <INDENT> self.tolerance = tolerance <NEW_LINE> <DEDENT> def optimize_circuit(self, circuit: circuits.Circuit): <NEW_LINE> <INDENT> state = _OptimizerState() <NEW_LINE> for moment_index, moment in enumerate(cir...
Pushes X, Y, and PhasedX gates towards the end of the circuit. As the gates get pushed, they may absorb Z gates, cancel against other X, Y, or PhasedX gates with exponent=1, get merged into measurements (as output bit flips), and cause phase kickback operations across CZs (which can then be removed by the EjectZ optim...
62598f97b7558d589546334d
class ApiStatusCog(neko.Cog): <NEW_LINE> <INDENT> permissions = perms.Permissions.NONE <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> for cog in sub_cogs: <NEW_LINE> <INDENT> self.logger.info(f'Metamorphosing with {cog.__name__}') <NEW_LINE> cog_obj = cog() <NEW_LINE> self.permissions |= getattr(cog_obj, 'permissio...
Collects other cogs' commands for API statuses.
62598f971f037a2d8b9e3e02
class DummyVMController(VMController): <NEW_LINE> <INDENT> def power_on(self, user_id=None): <NEW_LINE> <INDENT> vimma.vmtype.dummy.power_on_vm.delay(self.vm_id, user_id=user_id) <NEW_LINE> <DEDENT> def power_off(self, user_id=None): <NEW_LINE> <INDENT> vimma.vmtype.dummy.power_off_vm.delay(self.vm_id, user_id=user_id)...
VMController for vms of type dummy.
62598f97eab8aa0e5d30baa2
class IMarkerAttachment(Interface): <NEW_LINE> <INDENT> pass
Marker interface for content with attachment.
62598f97be8e80087fbbed7d
class StressTls(stress.StressTest): <NEW_LINE> <INDENT> defconfig = ("ssl_certificate %s/tfw-root.crt;\n" "ssl_certificate_key %s/tfw-root.key;\n" "listen 443 proto=https;\n\n") <NEW_LINE> def create_clients(self): <NEW_LINE> <INDENT> wrk = control.Wrk(ssl=True) <NEW_LINE> wrk.set_script("foo", content="") <NEW_LINE> w...
Load Tempesta with multiple TLS connections.
62598f9701c39578d7f12a9e
class AutoscalingLaunchConfiguration(AutoscalingBase): <NEW_LINE> <INDENT> def __init__(self, ctx_node, resource_id=None, client=None, logger=None): <NEW_LINE> <INDENT> AutoscalingBase.__init__(self, ctx_node, resource_id, client, logger) <NEW_LINE> self.type_name = RESOURCE_TYPE <NEW_LINE> <DEDENT> @property <NEW_LINE...
Autoscaling Autoscaling Launch Configuration interface
62598f97be383301e025351b
class DeleteUserResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Result = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("Result") is not None: <NEW_LINE> <INDENT> self.Result = JgwOperateResponse() <NE...
DeleteUser返回参数结构体
62598f97f7d966606f747d05
class Graph: <NEW_LINE> <INDENT> def __init__(self, n, m, edges): <NEW_LINE> <INDENT> assert len(edges) == m <NEW_LINE> self.n = n <NEW_LINE> self.m = m <NEW_LINE> self.adjMat = [] <NEW_LINE> self.edgeList = [] <NEW_LINE> for i in range(0, n): <NEW_LINE> <INDENT> self.adjMat.append([0]*n) <NEW_LINE> <DEDENT> self.adjLi...
A class to store graph information for small graphs. n is number of vertices m is number of edges edges is list of (a,b), where a and b are vertices
62598f97435de62698e9bb13
class Producer: <NEW_LINE> <INDENT> def produce(self): <NEW_LINE> <INDENT> print("Producer is working hard!") <NEW_LINE> <DEDENT> def meet(self): <NEW_LINE> <INDENT> print("Producer has time to meet you now!")
Define the 'resource-intensive' object to instantiate
62598f978c0ade5d55dc351e
class IllegalRequestException(Exception): <NEW_LINE> <INDENT> pass
General exception for illegal requests to this module.
62598f9724f1403a92685741
class AccumulateResults(luigi.Task): <NEW_LINE> <INDENT> _input_params = luigi.DictParameter() <NEW_LINE> @property <NEW_LINE> def sensor_grids(self): <NEW_LINE> <INDENT> value = pathlib.Path(self.input()['CreateRadFolder']['sensor_grids'].path) <NEW_LINE> return value.as_posix() if value.is_absolute() else ...
Postprocess average irradiance (W/m2) into cumulative radiation (kWh/m2).
62598f97f548e778e596b2ca
class Transform(object): <NEW_LINE> <INDENT> def __call__(self, plottable, **kwargs): <NEW_LINE> <INDENT> raise NotImplemented("Not a valid transform")
Define a transform plugin to the plottable architecture. Transforms operate on axes. The plottable defines the set of transforms available for it, and the axes on which they operate. These transforms can operate on the x axis only, the y axis only or on the x and y axes together. This infrastructure is not able to ...
62598f97cc0a2c111447ad2b
class AttachmentManager(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def record_download(cls, u_id, attachment): <NEW_LINE> <INDENT> now = datetime.datetime.now() <NEW_LINE> data = Data.objects(attachment=attachment).first() <NEW_LINE> AttachmentDownload( down_time=now, user_id=ObjectId(u_id), title=data.title,...
附件管理
62598f976fb2d068a7693cc3
class WidgetObjectsMixin(): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def widgets_from_pose_bones(pose_bones): <NEW_LINE> <INDENT> widgets = [] <NEW_LINE> for pbone in pose_bones: <NEW_LINE> <INDENT> widget = pbone.custom_shape <NEW_LINE> if widget and not widget in widgets: <NEW_LINE> <INDENT> obj_to_bone(widget, p...
Mixin class for collecting widget objects
62598f974428ac0f6e65824b
class CachedAssetFinder: <NEW_LINE> <INDENT> def __init__(self, repo): <NEW_LINE> <INDENT> self.repo = repo <NEW_LINE> <DEDENT> def search(self, code=None, id=None, path=None): <NEW_LINE> <INDENT> self._cache = {} <NEW_LINE> self.search_code = code <NEW_LINE> self.search_id = id <NEW_LINE> self.search_path = path <NEW_...
A class that can be used for finding assets in trees. The results are also cached to improve performance. :param repo: The repository to work on.
62598f97f7d966606f747d06
class Order(models.Model): <NEW_LINE> <INDENT> carts = models.CharField(max_length=200) <NEW_LINE> user_id = models.ForeignKey(User) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return "Order ({1})".format(self.carts)
Model related to store the Orders Fields : carts : Char Field- Foreign Key to the model task.models.Cart
62598f9730dc7b766599f56d
class Feature(object): <NEW_LINE> <INDENT> def __init__(self, parent, realisation=None): <NEW_LINE> <INDENT> self.parent = parent <NEW_LINE> if realisation is not None: <NEW_LINE> <INDENT> self.realisation = realisation <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.realisation = self.determine() <NEW_LINE> <DEDENT...
Metaclass for various kinds of feature Linguistic features are hierarchical, so they should retain a reference to the parent. The realisation is added when known.
62598f97a79ad16197769d83
class DialogNodeCollection(object): <NEW_LINE> <INDENT> def __init__(self, dialog_nodes, pagination): <NEW_LINE> <INDENT> self.dialog_nodes = dialog_nodes <NEW_LINE> self.pagination = pagination <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def _from_dict(cls, _dict): <NEW_LINE> <INDENT> args = {} <NEW_LINE> if 'dialog_n...
An array of dialog nodes. :attr list[DialogNode] dialog_nodes: An array of objects describing the dialog nodes defined for the workspace. :attr Pagination pagination: The pagination data for the returned objects.
62598f9823849d37ff850de7
class QuotasTest(base.BasePCFTest): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setup_clients(cls): <NEW_LINE> <INDENT> super(QuotasTest, cls).setup_clients() <NEW_LINE> cls.client = cls.os.quotas_client <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def resource_setup(cls): <NEW_LINE> <INDENT> super(QuotasTest, cls)....
Tests Quotas.
62598f9863d6d428bbee24de
class ListVersionsPager: <NEW_LINE> <INDENT> def __init__( self, method: Callable[..., version.ListVersionsResponse], request: version.ListVersionsRequest, response: version.ListVersionsResponse, *, metadata: Sequence[Tuple[str, str]] = () ): <NEW_LINE> <INDENT> self._method = method <NEW_LINE> self._request = version....
A pager for iterating through ``list_versions`` requests. This class thinly wraps an initial :class:`google.cloud.dialogflow_v2beta1.types.ListVersionsResponse` object, and provides an ``__iter__`` method to iterate through its ``versions`` field. If there are more pages, the ``__iter__`` method will make additional ...
62598f9885dfad0860cbf904
class ReporteViewSet(mixins.RetrieveModelMixin, mixins.CreateModelMixin, mixins.ListModelMixin, viewsets.GenericViewSet): <NEW_LINE> <INDENT> queryset = Reporte.objects.all().order_by('-fecha_de_reporte') <NEW_LINE> serializer_class = ReporteSerializer <NEW_LINE> def create(self, request, *args, **kwargs): <NEW_LINE> <...
Endpoint de la API para listar, actualizar y ver detalles de los reportes. Métodos permitidos: GET, POST, PUT, PATCH.
62598f981b99ca400228f3bd
class CatalogPrefetchIterator(object): <NEW_LINE> <INDENT> def __init__(self, iterable, chunk_size): <NEW_LINE> <INDENT> self.iterable = iter(iterable) <NEW_LINE> self.chunk_size = chunk_size <NEW_LINE> self._chunk = None <NEW_LINE> self._prefetch = self._prefetch_unknown <NEW_LINE> self._single_jar = None <NEW_LINE> <...
Given an iterator of ``(intid, object)``: - Breaks the iterator into chunks of a given size; - Detects any persistent objects in the chunk connected to a jar (this is done by checking for a ``_p_jar``); - Groups those objects by jar if needed (supporting multiple databases, because `ZODB 5 cu...
62598f98be383301e025351d
@dataclass <NEW_LINE> class Body: <NEW_LINE> <INDENT> name: str <NEW_LINE> mass: float = 0. <NEW_LINE> speed: float = 1. <NEW_LINE> def kinetic_energy(self) -> float: <NEW_LINE> <INDENT> return (self.mass * self.speed ** 2) / 2
Class to represent a physical body.
62598f9832920d7e50bc5d78
class MESH_OT_catt_utils(Operator): <NEW_LINE> <INDENT> bl_idname = "catt.utils" <NEW_LINE> bl_label = "Catt Utils" <NEW_LINE> arg: bpy.props.StringProperty(name='arg', default='') <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> catt_export = context.scene.catt_export <NEW_LINE> if self.arg == 'check_nonflat...
Highlight non-planar faces of the active object (check is more strict than CATT's)
62598f98f7d966606f747d07
class DeletableModelInterface( object ): <NEW_LINE> <INDENT> def delete( self, trans, item, flush=True, **kwargs ): <NEW_LINE> <INDENT> trans.sa_session.add( item ) <NEW_LINE> item.deleted = True <NEW_LINE> if flush: <NEW_LINE> <INDENT> trans.sa_session.flush() <NEW_LINE> <DEDENT> return item <NEW_LINE> <DEDENT> def un...
A mixin/interface for a model that is deletable (i.e. has a 'deleted' attr). Many resources in Galaxy can be marked as deleted - meaning (in most cases) that they are no longer needed, should not be displayed, or may be actually removed by an admin/script.
62598f98596a8972361279a1
class TestConnectionCollectionItem(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 testConnectionCollectionItem(self): <NEW_LINE> <INDENT> pass
ConnectionCollectionItem unit test stubs
62598f98435de62698e9bb15
@dataclass <NEW_LINE> class ExternalReferences: <NEW_LINE> <INDENT> items: List[ExternalRef] = field(default_factory=list) <NEW_LINE> def node(self): <NEW_LINE> <INDENT> return create_node('externalReferences', None, self.items, {}) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def object(node): <NEW_LINE> <INDENT> if n...
ExternalReferences container
62598f984e4d562566372144
class UILogger(UIPrinter): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> UIPrinter.__init__(self, name) <NEW_LINE> self.debug = self.print <NEW_LINE> self.info = self.note <NEW_LINE> self.warning = self.warn <NEW_LINE> self.error = self.fail <NEW_LINE> self.fatal = self.fail <NEW_...
兼容logging库标准接口
62598f983eb6a72ae038a35f
class MainWidget(QtGui.QWidget): <NEW_LINE> <INDENT> def __init__(self, main_, parent=None): <NEW_LINE> <INDENT> super().__init__(parent) <NEW_LINE> self.name = 'main_widget' <NEW_LINE> self.setObjectName(self.name) <NEW_LINE> self.main_ = main_ <NEW_LINE> logging.debug('main widget init') <NEW_LINE> self.init_ui() <NE...
Class for displaying osa registration related ui elements.
62598f9810dbd63aa1c708d8
class SvgNodeItem(NodeItem, QtSvg.QGraphicsSvgItem): <NEW_LINE> <INDENT> def __init__(self, node, symbol=None): <NEW_LINE> <INDENT> QtSvg.QGraphicsSvgItem.__init__(self) <NEW_LINE> NodeItem.__init__(self, node) <NEW_LINE> if symbol: <NEW_LINE> <INDENT> renderer = QImageSvgRenderer(symbol) <NEW_LINE> if symbol != node.d...
SVG node for the scene. :param node: Node instance :param symbol: symbol for the node representation on the scene
62598f98adb09d7d5dc0a2aa
class PikeLexer(CppLexer): <NEW_LINE> <INDENT> name = 'Pike' <NEW_LINE> aliases = ['pike'] <NEW_LINE> filenames = ['*.pike', '*.pmod'] <NEW_LINE> mimetypes = ['text/x-pike'] <NEW_LINE> tokens = { 'statements': [ (words(( 'catch', 'new', 'private', 'protected', 'public', 'gauge', 'throw', 'throws', 'class', 'interface',...
For `Pike <http://pike.lysator.liu.se/>`_ source code. .. versionadded:: 2.0
62598f988e71fb1e983bb7d7
class Customer(models.Model): <NEW_LINE> <INDENT> user = models.OneToOneField(User, on_delete=models.CASCADE) <NEW_LINE> is_customer = models.BooleanField(default=True) <NEW_LINE> picture = models.ImageField( 'profile picture', upload_to='users/customers/pictures/', blank=True, null=True ) <NEW_LINE> delivery_address =...
Customer model. Customer profile hold user's public data: picture and stats.
62598f986fb2d068a7693cc4
class HPNode(object): <NEW_LINE> <INDENT> def __init__(self, lines): <NEW_LINE> <INDENT> self.parents = set() <NEW_LINE> self.children = set() <NEW_LINE> self.alts = set() <NEW_LINE> self._parent_hps = set() <NEW_LINE> for line in lines: <NEW_LINE> <INDENT> line = line.strip() <NEW_LINE> field, value = line.split(': ',...
HPO graph node Attributes: id name parents (HP objects, filled in by HPO) children (HP objects, filled in by HPO) alts (HP terms)
62598f98a17c0f6771d5bf5d
class S3AccessSchema(BaseSchema): <NEW_LINE> <INDENT> bucket_name = fields.Str( required=True, metadata={"update_policy": UpdatePolicy.SUPPORTED}, validate=validate.Regexp(r"^[\*a-z0-9\-\.]+$"), ) <NEW_LINE> key_name = fields.Str(metadata={"update_policy": UpdatePolicy.SUPPORTED}) <NEW_LINE> enable_write_access = field...
Represent the schema of S3 access.
62598f98435de62698e9bb16
class Brain: <NEW_LINE> <INDENT> def __init__(self, freesurfer_dir, surf_type='pial'): <NEW_LINE> <INDENT> freesurfer_dir = Path(freesurfer_dir) <NEW_LINE> for hemi in HEMISPHERES: <NEW_LINE> <INDENT> surf_file = freesurfer_dir / 'surf' / (hemi + '.' + surf_type) <NEW_LINE> setattr(self, hemi, Surf(surf_file))
Class that contains the left and right hemispheres. Parameters ---------- freesurfer_dir : str subject-specific directory created by freesurfer surf_type : str 'pial', 'smoothwm', 'inflated', 'white', or 'sphere'
62598f9867a9b606de545cf6
class TestConvertFunction(object): <NEW_LINE> <INDENT> def test_supported_element(self): <NEW_LINE> <INDENT> note = ETree.Element(mei.NOTE, {'dur': '4', 'pname': 'c', 'octave': '4'}) <NEW_LINE> actual = abjad.convert(note) <NEW_LINE> assert isinstance(actual, Note) <NEW_LINE> <DEDENT> def test_unsupported_element(self)...
Tests for abjad.convert().
62598f980c0af96317c560a5
class Redirect(object): <NEW_LINE> <INDENT> def __init__(self, source, target, status_code, filename, line_number): <NEW_LINE> <INDENT> self.source = source.strip() <NEW_LINE> self.parsed_source = urlparse(self.source) <NEW_LINE> self.target = (target or '').strip() <NEW_LINE> self.parsed_target = urlparse(self.target)...
Encapulates all of the information about a redirect.
62598f98d486a94d0ba2bcf7
class LtmProfileRadius(LtmProfileRadiusSchema): <NEW_LINE> <INDENT> cli_command = "/mgmt/tm/ltm/profile/radius" <NEW_LINE> def rest(self): <NEW_LINE> <INDENT> response = self.device.get(self.cli_command) <NEW_LINE> response_json = response.json() <NEW_LINE> if not response_json: <NEW_LINE> <INDENT> return {} <NEW_LINE>...
To F5 resource for /mgmt/tm/ltm/profile/radius
62598f981b99ca400228f3be
class Receiver(UDPEndpoint): <NEW_LINE> <INDENT> def __init__(self, r_in, r_out, c_in, filename): <NEW_LINE> <INDENT> self.in_socket, self.out_socket = self.create_socket_pair(r_in, r_out, c_in) <NEW_LINE> self.in_socket.settimeout(None) <NEW_LINE> try: <NEW_LINE> <INDENT> self.file = open(filename, "xb") <NEW_LINE> <D...
A Receiver receives incoming packets to construct a sent file, sends acknowledgement packets upon successful transfer of packet.
62598f984527f215b58e9c07
class ClassicalRegister(Register): <NEW_LINE> <INDENT> def __init__(self, parent, name, inter): <NEW_LINE> <INDENT> Register.__init__(self, parent, name, inter) <NEW_LINE> self._argType = "ClassicalRegister" <NEW_LINE> self._start = 0 <NEW_LINE> self._end = self.size
Classical register as created by "creg"
62598f98462c4b4f79dbb72c
class _TreeCutter(c_ast.NodeVisitor): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.accum = {'vars': {}, 'functions': {}, 'structs': {}} <NEW_LINE> self.cache = None <NEW_LINE> <DEDENT> def start_n_end(self, node): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def visit_FuncDecl(self, node): <NEW_LINE...
Local node visitor for c abstract syntax trees. :ivar accum: (dict) Information on variables, functions, and structs accumulated from an abstract syntax tree. :ivar cache: (dict or None) Information stored about parent nodes. Added to accum when node reaches the lowest possible level. .. todo:: Add visit...
62598f98097d151d1a2c0d46
class ClearOverrunCountRequest(DiagnosticStatusSimpleRequest): <NEW_LINE> <INDENT> sub_function_code = 0x0014 <NEW_LINE> def execute(self, *args): <NEW_LINE> <INDENT> _MCB.Counter.BusCharacterOverrun = 0x0000 <NEW_LINE> return ClearOverrunCountResponse(self.message)
Clears the overrun error counter and reset the error flag An error flag should be cleared, but nothing else in the specification mentions is, so it is ignored.
62598f9821a7993f00c65ca3
class PlayCommandIssuedRequest(Request): <NEW_LINE> <INDENT> deserialized_types = { 'object_type': 'str', 'request_id': 'str', 'timestamp': 'datetime', 'locale': 'str' } <NEW_LINE> attribute_map = { 'object_type': 'type', 'request_id': 'requestId', 'timestamp': 'timestamp', 'locale': 'locale' } <NEW_LINE> def __init__(...
NOTE: This class is auto generated. Do not edit the class manually. :param request_id: Represents the unique identifier for the specific request. # noqa: E501 :type request_id: (optional) str :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the r...
62598f987d847024c075c0f5
class UserForgotPasswordViewSet(viewsets.GenericViewSet, ApiResponse): <NEW_LINE> <INDENT> serializer_class = UserForgotPasswordSerializer <NEW_LINE> http_method_names = ("post",) <NEW_LINE> def create(self, request): <NEW_LINE> <INDENT> forgot_password_serializer = self.serializer_class(data=request.data) <NEW_LINE> i...
forgot password
62598f989c8ee82313040000
class StringField(BaseField): <NEW_LINE> <INDENT> def __init__(self, *args, min_length=0, max_length=100, **kwargs): <NEW_LINE> <INDENT> self._editor = Qt.QLineEdit() <NEW_LINE> kwargs.setdefault('default', '') <NEW_LINE> super(StringField, self).__init__(*args, **kwargs) <NEW_LINE> self._length = first_of_type(self.va...
Field to introduce :class:`str` :param min_length: minimum admitted length, defaults to 0 :type min_length: :class:`int` :param max_length: maximum admitted length, defaults to 100 :type max_length: :class:`int`
62598f98d99f1b3c44d053d3
class NumberRangeFilter(filters.NumberFilter): <NEW_LINE> <INDENT> def filter(self, qs, value): <NEW_LINE> <INDENT> if value is not None: <NEW_LINE> <INDENT> if value: <NEW_LINE> <INDENT> time = datetime.fromtimestamp( value).replace(tzinfo=pytz.utc) <NEW_LINE> return qs.exclude( reservation__book_from__lte=time, reser...
Custom number range filter to find out available venue for reservation
62598f98851cf427c66b7fea
@implementer(IPasswordReset) <NEW_LINE> class PasswordReset(Base): <NEW_LINE> <INDENT> def reset_password(self, password): <NEW_LINE> <INDENT> registry = get_current_registry(self) <NEW_LINE> user = registry.content.get_sheet_field(self, IMetadata, 'creator') <NEW_LINE> password_sheet = registry.content.get_sheet( user...
Password reset implementation.
62598f9845492302aabfc1fc
class Application(Frame): <NEW_LINE> <INDENT> def __init__(self, master): <NEW_LINE> <INDENT> super(Application, self).__init__(master) <NEW_LINE> self.grid() <NEW_LINE> self.create_widgets() <NEW_LINE> <DEDENT> def create_widgets(self): <NEW_LINE> <INDENT> Label(self, text = "Wybierz swój ulubiony gatunek filmu." ).gr...
Aplikacja z GUI służąca do wyboru ulubionego gatunku filmów
62598f984e4d562566372146
class StateCRDT(object): <NEW_LINE> <INDENT> def __init__(self, name=None): <NEW_LINE> <INDENT> if name: <NEW_LINE> <INDENT> self.name = name <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.name = NAME <NEW_LINE> <DEDENT> self._state = None <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def merge(cls, x, y): <NEW_LINE>...
This class represents a state-based CRDT, or convergent replicated data type. See http://hal.upmc.fr/inria-00555588/document for more information; all CDRTs defined here are based on definitions in this paper. The "state" of the StateCRDT is a json-able object.
62598f98baa26c4b54d4efd4
class Interval: <NEW_LINE> <INDENT> def __init__(self, start, end): <NEW_LINE> <INDENT> self._start = start <NEW_LINE> self._end = end <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <INDENT> return self._start <NEW_LINE> <DEDENT> def end(self): <NEW_LINE> <INDENT> return self._end <NEW_LINE> <DEDENT> def length(self):...
An interval represents all the integers between a start and end value inclusive. For example, Interval(1,4) represents the values [1,2,3,4] as a simpler object. The idea is to represent intervals in this way to easily check for ordering, overlap, intersection, union, etc. by having to consider the start and end values...
62598f98adb09d7d5dc0a2ac
class WellBehavedHttpTransport(SudsHttpTransport): <NEW_LINE> <INDENT> def u2handlers(self): <NEW_LINE> <INDENT> return []
HttpTransport which properly obeys the ``*_proxy`` environment variables.
62598f98d7e4931a7ef3bdbb