code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class TestSample: <NEW_LINE> <INDENT> def test_sample_dimensions(self, qubit_device_2_wires): <NEW_LINE> <INDENT> qubit_device_2_wires.reset() <NEW_LINE> qubit_device_2_wires.apply([qml.RX(1.5708, wires=[0]), qml.RX(1.5708, wires=[1])]) <NEW_LINE> qubit_device_2_wires.shots = 10 <NEW_LINE> qubit_device_2_wires._wires_m... | Tests that samples are properly calculated. | 62598fed091ae3566870542f |
class ParseError(Error): <NEW_LINE> <INDENT> def __init__(self, text, offset): <NEW_LINE> <INDENT> self._text = text <NEW_LINE> self._offset = offset <NEW_LINE> self._line = line(text, offset) <NEW_LINE> self._column = column(text, offset) <NEW_LINE> message = _format_invalid_syntax(text, offset) <NEW_LINE> super(Parse... | This exception is raised when the parser fails to parse the text.
| 62598fee3cc13d1c6d465f68 |
class UpdatableAPISyntheticsResource(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def update_synthetics(cls, id, params=None, **body): <NEW_LINE> <INDENT> if params is None: <NEW_LINE> <INDENT> params = {} <NEW_LINE> <DEDENT> path = "{resource_name}/tests/{resource_id}".format(resource_name=cls._resource_name, ... | Update Synthetics resource | 62598feec4546d3d9def7692 |
class UpdateObserverDict(ObservedDict): <NEW_LINE> <INDENT> def __init__( self, name, observer, initial_dict=None, initial_yaml_string=None, *args, **kwargs, ): <NEW_LINE> <INDENT> self.observer = observer <NEW_LINE> self.name = name <NEW_LINE> check_input_args = [i is None for i in [initial_dict, initial_yaml_string]]... | Dictionary subclass which observes a dictionary and updates an attribute of
the model_data xarray dataset with a YAML string of that dictionary.
This update takes place whenever a value is updated in the dictionary.
Parameters
----------
name : str
The model_data attribute key to update.
observer : xarray Dataset ... | 62598fee26238365f5fad37a |
class TagDetail(generics.RetrieveUpdateDestroyAPIView): <NEW_LINE> <INDENT> http_method_names = ['get', 'put', 'delete'] <NEW_LINE> queryset = Tag.objects.all() <NEW_LINE> serializer_class = TagSerializer <NEW_LINE> permission_classes = (permissions.IsAuthenticated, IsOwnerOrChris) <NEW_LINE> def retrieve(self, request... | A tag view. | 62598feead47b63b2c5a806b |
class TankAnt(BodyguardAnt): <NEW_LINE> <INDENT> name = 'Tank' <NEW_LINE> damage = 1 <NEW_LINE> implemented = True <NEW_LINE> food_cost = 6 <NEW_LINE> armor = 2 <NEW_LINE> is_container = True <NEW_LINE> def action(self, colony): <NEW_LINE> <INDENT> if self.contained_ant != None: <NEW_LINE> <INDENT> self.contained_ant.a... | TankAnt provides both offensive and defensive capabilities. | 62598fee4c3428357761aac8 |
class TipoServicioAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ("nombre", "get_icono",) <NEW_LINE> exclude = ("width", "height",) | Tipo de servicio | 62598fee091ae3566870543d |
@key_as_value <NEW_LINE> class CONFIG_KEYS(object): <NEW_LINE> <INDENT> SERVER_URI = '' <NEW_LINE> LOGIN_USERNAME = '' <NEW_LINE> LOGIN_PASSWORD = '' <NEW_LINE> PATCH_METEOR_CLIENT = '' <NEW_LINE> RECONNECT_ENABLED = '' <NEW_LINE> HEARTBEAT_ENABLED = '' <NEW_LINE> HEARTBEAT_INTERVAL = '' <NEW_LINE> HEARTBEAT_FUNC = '' ... | Class that contains config keys.
After decorated by `key_as_value`, the attribute values are set to be the
attribute names, i.e. CONFIG_KEYS.SERVER_URI == 'SERVER_URI'.
Config values can be overridden by env variables. Config key `SERVER_URI`
maps to env variable name `ROCKETCHAT_SERVER_URI`. Use string
'0', 'false' ... | 62598fee26238365f5fad382 |
class AttributeValue(ctypes.Union): <NEW_LINE> <INDENT> _arg_type = ctypes.c_uint64 <NEW_LINE> _fields_ = [ ("uint8", ctypes.c_uint8), ("uint16", ctypes.c_uint16), ("uint32", ctypes.c_uint32), ("uint64", ctypes.c_uint64), ("int8", ctypes.c_int8), ("int16", ctypes.c_int16), ("int32", ctypes.c_int32), ("int64", ctypes.c_... | ctypes does not support unions as (non-pointer) arguments
_arg_value / _arg_type is a crude and evil hack to guess
the right argument type. This type must be correct in terms of
size (maximum of the union) and
calling convention (architecture specific, but for AMD64 int usually wins).
Whenever used as a direct function... | 62598fee3cc13d1c6d465f76 |
@Singleton <NEW_LINE> class Tools: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.tools = {} <NEW_LINE> self.load_yaml() <NEW_LINE> <DEDENT> def load_yaml(self): <NEW_LINE> <INDENT> yaml_file = None <NEW_LINE> config_file_search = [os.path.join(os.path.abspath(os.sep), "dgenies", "tools.yaml"), "/etc/... | Load (from yaml file) and store available alignement tools | 62598fee4c3428357761aad0 |
class DefaultNamed: <NEW_LINE> <INDENT> def __init__(self, package, name=None, *args, **kwargs): <NEW_LINE> <INDENT> name = name or self.default_name <NEW_LINE> super(DefaultNamed, self).__init__(package, name, *args, **kwargs) | Mix-in for Parts that have a default name. Subclasses should include
a 'default_name' attribute, which will be used during construction
if a name is not explicitly defined. | 62598feec4546d3d9def7699 |
class Parse(luigi.Task): <NEW_LINE> <INDENT> id = luigi.IntParameter() <NEW_LINE> def requires(self): <NEW_LINE> <INDENT> return [Skeleton(), Download(self.id)] <NEW_LINE> <DEDENT> def output(self): <NEW_LINE> <INDENT> with open('./cn_database/config.yaml', 'r') as f: <NEW_LINE> <INDENT> config = yaml.load(f) <NEW_LINE... | Gets a XML file and parses it to a .tsv file using the skeleton.
Raises an error if XML is empty | 62598fee091ae35668705443 |
class DeepLabv3FinalBlock(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_channels, out_channels, bottleneck_factor=4): <NEW_LINE> <INDENT> super(DeepLabv3FinalBlock, self).__init__() <NEW_LINE> assert (in_channels % bottleneck_factor == 0) <NEW_LINE> mid_channels = in_channels // bottleneck_factor <NEW_LINE> sel... | DeepLabv3 final block.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
bottleneck_factor : int, default 4
Bottleneck factor. | 62598fee627d3e7fe0e076cc |
class InceptionResnetV2Unet(UnetModel): <NEW_LINE> <INDENT> def __init__(self, config_dict, name=None): <NEW_LINE> <INDENT> super().__init__(config_dict) <NEW_LINE> self.name = 'incepres_unet' if name is None else name <NEW_LINE> <DEDENT> def build_model(self, inp, mode, regularizer=None): <NEW_LINE> <INDENT> net = inp... | Unet with Inception Resnet v2 decoder | 62598fee26238365f5fad388 |
class MessageMaker(AbsMessageMaker): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.keyword = '' <NEW_LINE> self.keychannel = 0 <NEW_LINE> self.reply = '' <NEW_LINE> <DEDENT> async def executeFunction(self, message, clinet) -> str: <NEW_LINE> <INDENT> asyncio_result = await self._makeMessage(message) ... | メッセージを作成する基底クラス
absMessageMakerから直接いろんなMessageMakerに飛ばないのは
オーバーライドさせたかったから。
ness_mado_message_maker.pyを見てもらうとわかるが、
このクラスを継承すれば変数に値を入れるだけでbotが反応するようにしてある。 | 62598fee627d3e7fe0e076ce |
class _Trigger(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def fetch_all(): <NEW_LINE> <INDENT> all_triggers = [] <NEW_LINE> if trigger_body.id is not None: <NEW_LINE> <INDENT> all_triggers.append(trigger_body) <NEW_LINE> <DEDENT> methods_calls.trace += '.fetch_all' <NEW_LINE> return all_triggers <NEW_LINE> <... | Mock api methods | 62598feead47b63b2c5a807d |
class ButtonWidget(object): <NEW_LINE> <INDENT> def __call__(self, field, **kwargs): <NEW_LINE> <INDENT> kwargs.setdefault('id', field.id) <NEW_LINE> kwargs.setdefault('type', field.button_type) <NEW_LINE> kwargs.setdefault('value', field.value) <NEW_LINE> return HTMLString(u'<button %s>%s</button>' % (html_params(name... | Реализует тег <button>. | 62598fee091ae35668705449 |
class Destroy(Object): <NEW_LINE> <INDENT> ID = "destroy" <NEW_LINE> def __init__(self, extra=None, **kwargs): <NEW_LINE> <INDENT> self.extra = extra <NEW_LINE> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read(q: dict, *args) -> "Destroy": <NEW_LINE> <INDENT> return Destroy() | Closes the TDLib instance, destroying all local data without a proper logout. The current user session will remain in the list of all active sessions. All local data will be destroyed. After the destruction completes updateAuthorizationState with authorizationStateClosed will be sent
Attributes:
ID (:obj:`str`): `... | 62598fee187af65679d2a00f |
class UserDefinedType(Column): <NEW_LINE> <INDENT> value_manager = UDTValueManager <NEW_LINE> def __init__(self, user_type, **kwargs): <NEW_LINE> <INDENT> self.user_type = user_type <NEW_LINE> self.db_type = "frozen<{0}>".format(user_type.type_name()) <NEW_LINE> super(UserDefinedType, self).__init__(**kwargs) <NEW_LINE... | User Defined Type column
http://www.datastax.com/documentation/cql/3.1/cql/cql_using/cqlUseUDT.html
These columns are represented by a specialization of :class:`cassandra.cqlengine.usertype.UserType`.
Please see :ref:`user_types` for examples and discussion. | 62598fee627d3e7fe0e076d4 |
class GsDiffCommand(WindowCommand, GitCommand): <NEW_LINE> <INDENT> def run(self, **kwargs): <NEW_LINE> <INDENT> sublime.set_timeout_async(lambda: self.run_async(**kwargs), 0) <NEW_LINE> <DEDENT> def run_async(self, in_cached_mode=False, file_path=None, current_file=False, base_commit=None, target_commit=None, disable_... | Create a new view to display the difference of `target_commit`
against `base_commit`. If `target_commit` is None, compare
working directory with `base_commit`. If `in_cached_mode` is set,
display a diff of the Git index. Set `disable_stage` to True to
disable Ctrl-Enter in the diff view. | 62598fee187af65679d2a010 |
class MessageTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def test_validate_message(self): <NEW_LINE> <INDENT> payload = {'args': [], 'kwargs': {}} <NEW_LINE> message.KaleMessage._validate_task_payload(payload) <NEW_LINE> <DEDENT> def test_message(self): <NEW_LINE> <INDENT> payload = {'args': [], 'kwargs': {}} <NEW... | Test KaleMessage. | 62598fee4c3428357761aadc |
class ReprFailExample(TerminalRepr): <NEW_LINE> <INDENT> Markup = { '+': dict(green=True), '-': dict(red=True), '?': dict(bold=True), } <NEW_LINE> def __init__(self, filename, lineno, outputfile, message): <NEW_LINE> <INDENT> self.filename = filename <NEW_LINE> self.lineno = lineno <NEW_LINE> self.outputfile = outputfi... | Reports output mismatches in a nice and informative representation. | 62598fee3cc13d1c6d465f84 |
class NumberOfCommonMelodicIntervalsFeature(featuresModule.FeatureExtractor): <NEW_LINE> <INDENT> id = 'M7' <NEW_LINE> def __init__(self, dataOrStream=None, *arguments, **keywords): <NEW_LINE> <INDENT> featuresModule.FeatureExtractor.__init__(self, dataOrStream=dataOrStream, *arguments, **keywords) <NEW_LINE> self.name... | Number of melodic intervals that represent at least 9% of all melodic intervals.
>>> s = corpus.parse('bwv66.6')
>>> fe = features.jSymbolic.NumberOfCommonMelodicIntervalsFeature(s)
>>> f = fe.extract()
>>> f.vector
[3] | 62598fefad47b63b2c5a8087 |
class JobWorkUnitTest(JobTestBase): <NEW_LINE> <INDENT> def notestJobCreatesWorkUnits(self): <NEW_LINE> <INDENT> self.createSingleJobWorkflow() <NEW_LINE> testRunLumi = Run(1, 45) <NEW_LINE> loadByFRL = WorkUnit(taskID=self.testWorkflow.id, fileid=self.testFileA['id'], runLumi=testRunLumi) <NEW_LINE> loadByFRL.load() <... | Create jobs and test that associated WorkUnits are correct | 62598fef3cc13d1c6d465f8a |
class OverviewPage(Template.Page): <NEW_LINE> <INDENT> titleElements = [ Nouvelle.tag('img', _class='banner', src='/media/img/banner-70-nb.png', width=329, height=52, alt='CIA.vc: The open source version control informant.'), ] <NEW_LINE> logoElements = [] <NEW_LINE> heading = Template.pageBody[ "This is a brief overvi... | A web page showing an overview of open source activity, meant to
be used as a front page for the CIA web site. We want to act as
a jumping-off point for the rest of the site, so this page doesn't
include its own sidebar- it will copy the sidebar from a given page. | 62598fef627d3e7fe0e076df |
class ToTensor(object): <NEW_LINE> <INDENT> def __call__(self, pic): <NEW_LINE> <INDENT> if isinstance(pic, np.ndarray): <NEW_LINE> <INDENT> img = torchTool.from_numpy(pic.transpose((2, 0, 1))) <NEW_LINE> return img.float().div(255) <NEW_LINE> <DEDENT> if accimage is not None and isinstance(pic, accimage.Image): <NEW_L... | Convert a ``PIL.Image`` or ``numpy.ndarray`` to tensor.
Converts a PIL.Image or numpy.ndarray (H x W x C) in the range
[0, 255] to a torch.FloatTensor of shape (C x H x W) in the range [0.0, 1.0]. | 62598fef26238365f5fad39a |
class Error(object): <NEW_LINE> <INDENT> def __init__(self, result=None, code=None, message=None): <NEW_LINE> <INDENT> self.result = result <NEW_LINE> self.code = code <NEW_LINE> self.message = message <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return self.__dict__.__str__() | This class represents the result of a call to the API.
It does not necessarily represent a failed call because this implies the result of the call itself | 62598fef4c3428357761aaee |
class ArticleUpdateForm(ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Article <NEW_LINE> fields = ('title', 'content',) <NEW_LINE> <DEDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(ArticleUpdateForm, self).__init__(*args, **kwargs) <NEW_LINE> self.helper = FormHelper(self... | View ArticleUpdateForm | 62598fefc4546d3d9def76a8 |
class MajorDomo(object): <NEW_LINE> <INDENT> _worker_pool = [] | The controller | 62598fef627d3e7fe0e076ed |
class MainGameEventHandler(EventHandler): <NEW_LINE> <INDENT> def ev_keydown(self, event: tcod.event.KeyDown) -> Optional[ActionOrHandler]: <NEW_LINE> <INDENT> action: Optional[Action] = None <NEW_LINE> key = event.sym <NEW_LINE> modifier = event.mod <NEW_LINE> player: Actor = self.engine.player <NEW_LINE> if key == tc... | Handles events from TCOD. | 62598fef091ae35668705467 |
class catalog_013(models.Model): <NEW_LINE> <INDENT> id = models.IntegerField(primary_key=True) <NEW_LINE> src_word = models.CharField(max_length=50) <NEW_LINE> tar_word = models.CharField(max_length=50) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.src_word + "-->" + self.tar_word | Create a table which contains catalog id
and word pair.
The number of this catalog table is 013
It contains three columns:
id int type catalog id
src_word char type the source word which needs to be subsitute
tar_word char type the word that is translated from the source word | 62598fefc4546d3d9def76ad |
class CategoricalDataset(object): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> self.data = data <NEW_LINE> self.codes = collections.OrderedDict( (var, np.unique(data[var])) for var in data ) <NEW_LINE> self.dimensions = [len(code) for code in self.codes.values()] <NEW_LINE> <DEDENT> def to_onehot_f... | Class to convert between pandas DataFrame with categorical variables
and a torch Tensor with onehot encodings of each variable
Parameters
----------
data : pandas.DataFrame | 62598fefad47b63b2c5a80a1 |
class TransferAppDataProcessor(ZipProcessor): <NEW_LINE> <INDENT> zip_pattern = r'\d+_\d+_\d+_TR_Applications\.txt' <NEW_LINE> def transform(self): <NEW_LINE> <INDENT> with open(self.fn, encoding='utf8') as f: <NEW_LINE> <INDENT> data = f.read() <NEW_LINE> <DEDENT> pattern = r'custom_questions_(\d+)_(.+?)(?=[\t\r\n])' ... | Class for handling Transfer Application Data files. | 62598fefc4546d3d9def76af |
class NetConvOnly(nn.Module): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.conv1 = nn.Conv2d(1, 32, 3, 1) <NEW_LINE> self.conv2 = nn.Conv2d(32, 64, 3, 1) <NEW_LINE> self.dropout1 = nn.Dropout2d(0.25) <NEW_LINE> self.dropout2 = nn.Dropout2d(0.5) <NEW_LINE> self.conv3 = n... | Adapted Lenet model, to be quantized and synthesized.
I. e. replaced the fully connected layers with 1x1 convolutions and
a final global average pooling. | 62598fef627d3e7fe0e076f7 |
class CheckPoint(Unit): <NEW_LINE> <INDENT> def __init__(self, x, y, entity_id, r, vx, vy): <NEW_LINE> <INDENT> self.x = x <NEW_LINE> self.y = y <NEW_LINE> self.entity_id = entity_id <NEW_LINE> self.radius = r <NEW_LINE> self.x_velocity = vx <NEW_LINE> self.y_velocity = vy <NEW_LINE> <DEDENT> def bounce(self, other_uni... | A checkpoint | 62598fef187af65679d2a021 |
class AutoScalingBlockDevice(base.Property): <NEW_LINE> <INDENT> def __init__(self, delete_on_termination=None, iops=None, snapshot_id=None, volume_size=None, volume_type=None): <NEW_LINE> <INDENT> super(AutoScalingBlockDevice, self).__init__() <NEW_LINE> self._values = {'DeleteOnTermination': delete_on_termination, 'i... | The AutoScaling EBS Block Device type is an embedded property of the
AutoScaling Block Device Mapping type. | 62598fef4c3428357761aafe |
class ContinuumVar(QsoSimVar,SpectralFeatureVar): <NEW_LINE> <INDENT> pass | Base class for variables that define the quasar spectral continuum. | 62598fef4c3428357761ab00 |
class VnsfoVnsfWrongPackageFormat(ExceptionMessage): <NEW_LINE> <INDENT> pass | Wrong vNSFO package format. | 62598fef3cc13d1c6d465fa8 |
class UserState: <NEW_LINE> <INDENT> def __init__(self, scenario_name, step_name, context=None): <NEW_LINE> <INDENT> self.scenario_name = scenario_name <NEW_LINE> self.step_name = step_name <NEW_LINE> self.context = context or dict(step_index='regular', text_index='regular', failure_index='regular') | Состояние пользователя внутри сценария. | 62598ff0187af65679d2a023 |
class Individual(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.rank = None <NEW_LINE> self.crowding_distance = None <NEW_LINE> self.dominated_solutions = set() <NEW_LINE> self.genes = None <NEW_LINE> self.objectives = None <NEW_LINE> self.dominates = None <NEW_LINE> <DEDENT> def set_objectiv... | Represents one individual | 62598ff04c3428357761ab02 |
class ReplicaPoolParamsV1Beta1(_messages.Message): <NEW_LINE> <INDENT> autoRestart = _messages.BooleanField(1) <NEW_LINE> baseInstanceName = _messages.StringField(2) <NEW_LINE> canIpForward = _messages.BooleanField(3) <NEW_LINE> description = _messages.StringField(4) <NEW_LINE> disksToAttach = _messages.MessageField('E... | Configuration information for a ReplicaPools v1beta1 API resource.
Directly maps to ReplicaPool InitTemplate.
Fields:
autoRestart: Whether these replicas should be restarted if they experience
a failure. The default value is true.
baseInstanceName: The base name for instances within this ReplicaPool.
canIpFo... | 62598ff026238365f5fad3c0 |
class CDR_REPORT_COLUMN_NAME(Choice): <NEW_LINE> <INDENT> date = _('start date') <NEW_LINE> call_id = _('call ID') <NEW_LINE> leg = _('leg') <NEW_LINE> caller_id = _('caller ID') <NEW_LINE> phone_no = _('phone no') <NEW_LINE> gateway = _('gateway') <NEW_LINE> duration = _('duration') <NEW_LINE> bill_sec = _('bill sec')... | Column Name for the CDR Report | 62598ff0187af65679d2a028 |
@since('3.0.21') <NEW_LINE> class TestSecondaryIndexes(ReplicaSideFiltering): <NEW_LINE> <INDENT> __test__ = True <NEW_LINE> def create_index(self): <NEW_LINE> <INDENT> return True | @jira_ticket CASSANDRA-8272
Tests the consistency of secondary indexes queries when some of the replicas have stale data. | 62598ff03cc13d1c6d465fb4 |
class CertificateMergeParameters(Model): <NEW_LINE> <INDENT> _validation = { 'x509_certificates': {'required': True}, } <NEW_LINE> _attribute_map = { 'x509_certificates': {'key': 'x5c', 'type': '[bytearray]'}, 'certificate_attributes': {'key': 'attributes', 'type': 'CertificateAttributes'}, 'tags': {'key': 'tags', 'typ... | The certificate merge parameters.
All required parameters must be populated in order to send to Azure.
:param x509_certificates: Required. The certificate or the certificate
chain to merge.
:type x509_certificates: list[bytearray]
:param certificate_attributes: The attributes of the certificate
(optional).
:type ce... | 62598ff026238365f5fad3c2 |
class LayerOutput(object): <NEW_LINE> <INDENT> def __init__(self, name, layer_type, parents=None, activation=None, num_filters=None, img_norm_type=None, size=None, outputs=None, reverse=None): <NEW_LINE> <INDENT> assert isinstance(name, basestring) <NEW_LINE> assert isinstance(layer_type, basestring) <NEW_LINE> assert ... | LayerOutput is output for layer function. It is used internally by several
reasons.
- Check layer connection make sense.
- FC(Softmax) => Cost(MSE Error) is not good for example.
- Tracking layer connection.
- Pass to layer methods as input.
:param name: Layer output name.
:type name: basestring
:param layer_t... | 62598ff0c4546d3d9def76b8 |
@attr.s(auto_attribs=True, init=False) <NEW_LINE> class Datagroup(model.Model): <NEW_LINE> <INDENT> can: Optional[MutableMapping[str, bool]] = None <NEW_LINE> created_at: Optional[int] = None <NEW_LINE> id: Optional[str] = None <NEW_LINE> model_name: Optional[str] = None <NEW_LINE> name: Optional[str] = None <NEW_LINE>... | Attributes:
can: Operations the current user is able to perform on this object
created_at: UNIX timestamp at which this entry was created.
id: Unique ID of the datagroup
model_name: Name of the model containing the datagroup. Unique when combined with name.
name: Name of the datagroup. Unique when c... | 62598ff0627d3e7fe0e07709 |
class DiskDict(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.db = get_default_temp_db_instance() <NEW_LINE> self.table_name = rand_alpha(30) <NEW_LINE> columns = [('index_', 'INTEGER'), ('key', 'BLOB'), ('value', 'BLOB')] <NEW_LINE> pks = ['index_'] <NEW_LINE> self.db.create_table(self.table... | It's a dict that stores items in a sqlite3 database and has the following
features:
- Dict-like API
- Is thread safe
- Deletes the table when the instance object is deleted
:author: Andres Riancho (andres.riancho@gmail.com) | 62598ff0187af65679d2a02a |
class TimeoutHTTPConnection(http_client.HTTPConnection): <NEW_LINE> <INDENT> _timeout = None <NEW_LINE> def __init__(self, host, port=None, strict=None, timeout=None): <NEW_LINE> <INDENT> http_client.HTTPConnection.__init__(self, host, port, strict) <NEW_LINE> self._timeout = timeout or TimeoutHTTPConnection._timeout <... | A timeout control enabled HTTPConnection.
Inherit httplib.HTTPConnection class and provide the socket timeout
control. | 62598ff04c3428357761ab10 |
class TracerouteSchema(MetaParser): <NEW_LINE> <INDENT> schema = { 'traceroute':{ Any():{ 'hops':{ Any():{ 'paths':{ Any():{ 'address': str, Optional('asn'): int, Optional('name'): str, Optional('probe_msec'): list, Optional('vrf_in_name'): str, Optional('vrf_out_name'): str, Optional('vrf_in_id'): str, Optional('vrf_o... | Schema for:
* 'traceroute'
* 'traceroute mpls traffic-eng tunnel {tunnelid}' | 62598ff03cc13d1c6d465fb8 |
class GH_UndoException(Exception, ISerializable, _Exception): <NEW_LINE> <INDENT> def add_SerializeObjectState(self, *args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def remove_SerializeObjectState(self, *args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __init__(self, *args): <NEW_LINE> <INDENT> pass <NEW_LI... | GH_UndoException(message: str)
GH_UndoException(message: str, *args: Array[object]) | 62598ff0627d3e7fe0e0770f |
class Txt(webpage.WebpageRaw): <NEW_LINE> <INDENT> head = False <NEW_LINE> visited = [] <NEW_LINE> def parse(self, *args, **kwargs): <NEW_LINE> <INDENT> self.links = [y for x in self.html.split('\n') for y in x.split('\r') if validate.url_explicit(y)] | Parses Txt sitemaps. | 62598ff0c4546d3d9def76bc |
class CourseKeyMalformedErrorMiddleware(BaseProcessErrorMiddleware): <NEW_LINE> <INDENT> @property <NEW_LINE> def error(self): <NEW_LINE> <INDENT> return CourseKeyMalformedError <NEW_LINE> <DEDENT> @property <NEW_LINE> def error_code(self): <NEW_LINE> <INDENT> return 'course_key_malformed' <NEW_LINE> <DEDENT> @property... | Raise 400 if course key is malformed. | 62598ff0627d3e7fe0e07711 |
class TestContentTypeSelect(TestCase): <NEW_LINE> <INDENT> def test_filter_choices(self): <NEW_LINE> <INDENT> ctype = ContentType.objects.get_for_model(TestModel) <NEW_LINE> test_choice = (str(ctype.pk), ctype.name) <NEW_LINE> ctype = ContentType.objects.get_for_model(AnotherTestModel) <NEW_LINE> another_choice = (str(... | Tests for the widget for selecting models in the Image admin | 62598ff03cc13d1c6d465fc1 |
class QPushButton_cRankStocks_clicked(QThread): <NEW_LINE> <INDENT> log_signal = pyqtSignal(str) <NEW_LINE> def __init__(self, date, parent=None): <NEW_LINE> <INDENT> super(QPushButton_cRankStocks_clicked, self).__init__(parent) <NEW_LINE> self.date = date <NEW_LINE> self.header = "RankList" <NEW_LINE> <DEDENT> def __d... | 龙虎榜数据 | 62598ff0ad47b63b2c5a80c1 |
class Root(TemplateNode): <NEW_LINE> <INDENT> _sources, _targets = None, None <NEW_LINE> @_util.Property <NEW_LINE> def encoder(): <NEW_LINE> <INDENT> def fget(self): <NEW_LINE> <INDENT> return self._udict['encoder'] <NEW_LINE> <DEDENT> return locals() <NEW_LINE> <DEDENT> @_util.Property <NEW_LINE> def decoder(): <NEW_... | Root Node class
This class has to be used as the initial root of the tree. | 62598ff0091ae3566870548d |
class Assign(Internal): <NEW_LINE> <INDENT> def __init__(self, value, dst): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.value = value <NEW_LINE> self.dst = dst <NEW_LINE> <DEDENT> def __call__(self, player): <NEW_LINE> <INDENT> if isinstance(self.dst, str): <NEW_LINE> <INDENT> dst = PYTHON(self.dst, player) ... | Assign(value, dst) => action
где:
value - имя значения которое будет изменено
dst (function) - Функция (lambda), возрат запуска которой будет новым значение для value-name
Функция dst обязана принимать один аргумент. Пр.
lambda player: player.values["yuri_love"] + 1 | 62598ff0091ae3566870548f |
class RepositoryResource(proto.Message): <NEW_LINE> <INDENT> class AptRepository(proto.Message): <NEW_LINE> <INDENT> class ArchiveType(proto.Enum): <NEW_LINE> <INDENT> ARCHIVE_TYPE_UNSPECIFIED = 0 <NEW_LINE> DEB = 1 <NEW_LINE> DEB_SRC = 2 <NEW_LINE> <DEDENT> archive_type = proto.Field( proto.ENUM, number=1, enum="OSPol... | A resource that manages a package repository.
This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields... | 62598ff0c4546d3d9def76c0 |
class LearningRateSchedulerFixedStep(AdaptiveLearningRateScheduler): <NEW_LINE> <INDENT> def __init__(self, schedule: List[Tuple[float, int]], updates_per_checkpoint: int) -> None: <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> check_condition(all(num_updates > 0 for (_, num_updates) in schedule), "num_updates for e... | Use a fixed schedule of learning rate steps: lr_1 for N steps, lr_2 for M steps, etc.
:param schedule: List of learning rate step tuples in the form (rate, num_updates).
:param updates_per_checkpoint: Updates per checkpoint. | 62598ff0627d3e7fe0e07719 |
class BlacklistToken(DB.Model): <NEW_LINE> <INDENT> __tablename__ = 'blacklist_tokens' <NEW_LINE> id = Column(Integer, primary_key=True, autoincrement=True) <NEW_LINE> token = Column(String(500), unique=True, nullable=False) <NEW_LINE> blacklisted_on = Column(DateTime, nullable=False) <NEW_LINE> def __init__(self, toke... | Token Model for storing JWT tokens | 62598ff026238365f5fad3d6 |
class Executable(object): <NEW_LINE> <INDENT> def __init__(self, mod): <NEW_LINE> <INDENT> self.mod = mod <NEW_LINE> self._function_params = {} <NEW_LINE> self._save = self.mod["save"] <NEW_LINE> self._get_lib = self.mod["get_lib"] <NEW_LINE> self._get_bytecode = self.mod["get_bytecode"] <NEW_LINE> self._get_stats = se... | Relay VM executable | 62598ff0091ae35668705495 |
@testing_utils.skipUnlessGPU <NEW_LINE> class TestConvai2LanguageModel(unittest.TestCase): <NEW_LINE> <INDENT> def test_languagemodel_f1(self): <NEW_LINE> <INDENT> import projects.convai2.baselines.language_model.eval_f1 as eval_f1 <NEW_LINE> with testing_utils.capture_output() as stdout: <NEW_LINE> <INDENT> report = e... | Checks that the language model produces correct results. | 62598ff126238365f5fad3d8 |
class OSBase: <NEW_LINE> <INDENT> def check_presence(self): <NEW_LINE> <INDENT> raise OSDetectException("check_presence unimplemented") <NEW_LINE> <DEDENT> def get_name(self): <NEW_LINE> <INDENT> raise OSDetectException("get_name unimplemented") <NEW_LINE> <DEDENT> def get_version(self): <NEW_LINE> <INDENT> raise OSDet... | This defines the API used for OS detection within the os_detect
module for roslib. All OS specific instantiantions must inherit
and override these methods. | 62598ff1091ae35668705499 |
class BotList(messages.Message): <NEW_LINE> <INDENT> cursor = messages.StringField(1) <NEW_LINE> items = messages.MessageField(BotInfo, 2, repeated=True) <NEW_LINE> now = message_types.DateTimeField(3) <NEW_LINE> death_timeout = messages.IntegerField(4) | Wraps a list of BotInfo. | 62598ff1627d3e7fe0e07721 |
class QuestionAnswersEntity(entities.BaseEntity): <NEW_LINE> <INDENT> data = db.TextProperty(indexed=False) <NEW_LINE> @classmethod <NEW_LINE> def safe_key(cls, db_key, transform_fn): <NEW_LINE> <INDENT> return db.Key.from_path(cls.kind(), transform_fn(db_key.id_or_name())) | Student answers to individual questions. | 62598ff13cc13d1c6d465fcf |
class UrlAuthResultAccepted(TLObject): <NEW_LINE> <INDENT> __slots__ = ["url"] <NEW_LINE> ID = 0x8f8c0e4e <NEW_LINE> QUALNAME = "types.UrlAuthResultAccepted" <NEW_LINE> def __init__(self, *, url: str): <NEW_LINE> <INDENT> self.url = url <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read(b: BytesIO, *args) -> "UrlAut... | Attributes:
LAYER: ``112``
Attributes:
ID: ``0x8f8c0e4e``
Parameters:
url: ``str``
See Also:
This object can be returned by :obj:`messages.RequestUrlAuth <pyrogram.api.functions.messages.RequestUrlAuth>` and :obj:`messages.AcceptUrlAuth <pyrogram.api.functions.messages.AcceptUrlAuth>`. | 62598ff1ad47b63b2c5a80d5 |
class Folder(SObject): <NEW_LINE> <INDENT> SEARCH_TYPE = "sthpw/folder" <NEW_LINE> def get_children(my): <NEW_LINE> <INDENT> search = Search(Folder) <NEW_LINE> search.add_filter("parent_id", my.get_id() ) <NEW_LINE> return search.get_sobjects() <NEW_LINE> <DEDENT> def create(my, parent, subdir, sobject): <NEW_LINE> <IN... | Defines all of the settings for a given production | 62598ff115fb5d323ce7f5cb |
class DirectTemplateView(TemplateView): <NEW_LINE> <INDENT> extra_context = None <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super(self.__class__, self).get_context_data(**kwargs) <NEW_LINE> if self.extra_context is not None: <NEW_LINE> <INDENT> for key, value in self.extra_context.it... | Extend Django ``TemplateView`` to accept extra contexts. | 62598ff13cc13d1c6d465fd9 |
class Message(db.Model): <NEW_LINE> <INDENT> __tablename__ = "messages" <NEW_LINE> message_id = db.Column(db.Integer, autoincrement=True, primary_key=True) <NEW_LINE> sess_id = db.Column(db.Integer, db.ForeignKey("messages_sessions.sess_id"), nullable=False) <NEW_LINE> from_user_id = db.Column(db.Integer, db.ForeignKey... | Users exchange messages. | 62598ff1187af65679d2a03c |
class SellarProblemWithArrays(om.Problem): <NEW_LINE> <INDENT> def __init__(self, model_class=SellarDerivatives, **kwargs): <NEW_LINE> <INDENT> super(SellarProblemWithArrays, self).__init__(model_class(**kwargs)) <NEW_LINE> model = self.model <NEW_LINE> model.add_design_var('z', lower=np.array([-10.0, 0.0]), upper=np.a... | The Sellar problem with ndarray variable options | 62598ff1ad47b63b2c5a80db |
class QuickResourceApproveFormView(SuperuserRequiredMixin, ResourceCreateView): <NEW_LINE> <INDENT> def get_initial(self): <NEW_LINE> <INDENT> quick_resource = get_object_or_404(QuickResource, pk=self.kwargs.get('pk')) <NEW_LINE> initial = super().get_initial() <NEW_LINE> initial['owner'] = quick_resource.owner.pk <NEW... | Aprobar un recurso rápido.
Muestra el form de creación del un nuevo recurso normal pero
añade los datos del recurso rápido (obtenidos por el pk del URLConf).
El superuser, ya ha tenido que crear manualmente los datos que faltaban
al recurso. | 62598ff126238365f5fad3ea |
class LocationReportMode(object): <NEW_LINE> <INDENT> T0 = TypeValue(0x00,u'定时上报') <NEW_LINE> T1 = TypeValue(0x01,u'定距上报') <NEW_LINE> T2 = TypeValue(0x02,u'拐点上传') <NEW_LINE> T3 = TypeValue(0x03,u'ACC 状态改变上传') <NEW_LINE> T4 = TypeValue(0x04,u'从运动变为静止状态后,补传最后一个定位点') <NEW_LINE> T5 = TypeValue(0x05,u'网络断开重连后,上报之前最后一个有效上传点'... | 数据点上报类型 | 62598ff1187af65679d2a03d |
class ProducesIVCurve(sciunit.Capability): <NEW_LINE> <INDENT> def produce_iv_curve(self, **run_params): <NEW_LINE> <INDENT> return NotImplementedError("%s not implemented" % inspect.stack()[0][3]) <NEW_LINE> <DEDENT> def produce_iv_curve_ss(self, **run_params): <NEW_LINE> <INDENT> return NotImplementedError("%s not im... | The capability to produce a current-voltage plot for a set of voltage steps | 62598ff1ad47b63b2c5a80dd |
class OfCappedPriorityQueue(CappedPriorityQueue): <NEW_LINE> <INDENT> def push(self, members_with_core): <NEW_LINE> <INDENT> script = self.load_script('of_capped_priority_queue_push') <NEW_LINE> p = self._run_lua_script(script, [self._key], [self._cap] + self._make_members(members_with_core)) <NEW_LINE> return p[0], se... | Overflow-able Priority Queue.
Usage:
of_capped_pq = OfCappedPriorityQueue("hello-of-pq", 3) | 62598ff13cc13d1c6d465fdd |
class AuthenticationExtendedForm(AuthenticationForm): <NEW_LINE> <INDENT> def confirm_login_allowed(self, user: User): <NEW_LINE> <INDENT> if not user.profile.email_is_verified: <NEW_LINE> <INDENT> messages.warning(self.request, _('Place verified you E-Mail address')) <NEW_LINE> <DEDENT> if not user.is_active: <NEW_LIN... | Login check if user and owner is active | 62598ff1091ae356687054a9 |
class ServerLiveMigrateForceAndAbort( integrated_helpers.ProviderUsageBaseTestCase): <NEW_LINE> <INDENT> compute_driver = 'fake.FakeLiveMigrateDriver' <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> super(ServerLiveMigrateForceAndAbort, self).setUp() <NEW_LINE> self.compute1 = self._start_compute(host='host1') <NEW_LIN... | Test Server live migrations, which delete the migration or
force_complete it, and check the allocations after the operations.
The test are using fakedriver to handle the force_completion and deletion
of live migration. | 62598ff115fb5d323ce7f5d3 |
class CoreBluetoothGattCharacteristic(GattCharacteristic): <NEW_LINE> <INDENT> def __init__(self, characteristic): <NEW_LINE> <INDENT> self._characteristic = characteristic <NEW_LINE> self._value_read = threading.Event() <NEW_LINE> <DEDENT> @property <NEW_LINE> def _device(self): <NEW_LINE> <INDENT> return device_list(... | CoreBluetooth GATT characteristic object. | 62598ff1627d3e7fe0e07733 |
class SigmoidLayer(NeuronLayer): <NEW_LINE> <INDENT> def _forwardImplementation(self, inbuf, outbuf): <NEW_LINE> <INDENT> outbuf[:] = sigmoid(inbuf) <NEW_LINE> <DEDENT> def _backwardImplementation(self, outerr, inerr, outbuf, inbuf): <NEW_LINE> <INDENT> inerr[:] = outbuf * (1 - outbuf) * outerr | Layer implementing the sigmoid squashing function. | 62598ff13cc13d1c6d465fe3 |
class Gag(AweRemPlugin): <NEW_LINE> <INDENT> def activate(self): <NEW_LINE> <INDENT> self.handler = GagHandler(self) <NEW_LINE> self.info = {"title": "9gag", "category": "contextual", "priority": -1} <NEW_LINE> self.procmanager = ProcessesManagerSingleton.get() <NEW_LINE> messagemanager.set_callback("9gag", self.on_mes... | Control a 9gag webpage | 62598ff1187af65679d2a041 |
class GruPrezDialog(ga._AnagDialog): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> if not kwargs.has_key('title') and len(args) < 3: <NEW_LINE> <INDENT> kwargs['title'] = FRAME_TITLE <NEW_LINE> <DEDENT> ga._AnagDialog.__init__(self, *args, **kwargs) <NEW_LINE> self.LoadAnagPanel(GruPrezPa... | Dialog Gestione tabella Gruppi prezzi. | 62598ff1091ae356687054b1 |
class KafkaLoggingHandler(logging.Handler): <NEW_LINE> <INDENT> def __init__(self, host, topic, key=None): <NEW_LINE> <INDENT> logging.Handler.__init__(self) <NEW_LINE> self.kafka_topic = topic <NEW_LINE> self.key = key <NEW_LINE> self.producer = KafkaProducer(bootstrap_servers=host) <NEW_LINE> <DEDENT> def emit(self, ... | Class to provide logging handler
How to Use:
step1: define the SERVER and TOPIC need to send
KAFKA_SERVER = 'kafka:9092'
TOPIC = 'kafka_log'
step2: instantiate the handler and add into logger
logger = logging.getLogger("")
kafka_handler = KafkaLoggingHandler(host=KAFKA_SERVER, topic=TOPIC)
logger.ad... | 62598ff115fb5d323ce7f5db |
class Darknet(nn.Module): <NEW_LINE> <INDENT> def __init__(self, config_path, img_size=416): <NEW_LINE> <INDENT> super(Darknet, self).__init__() <NEW_LINE> self.module_defs = parse_model_config(config_path) <NEW_LINE> self.hyperparams, self.module_list = create_modules(self.module_defs) <NEW_LINE> self.yolo_layers = [l... | YOLOv3 object detection model | 62598ff14c3428357761ab42 |
class ALLMusicPraise(models.Model): <NEW_LINE> <INDENT> music = models.ForeignKey(AllSongMusic, blank=True, null=True, on_delete=models.SET_NULL, related_name='allmusic_praise', verbose_name=u'所属歌曲') <NEW_LINE> owner = models.ForeignKey(User, related_name='parise_user', db_index=True, verbose_name=u'赞的人') <NEW_LINE> up... | 赞过的用户 | 62598ff2ad47b63b2c5a80eb |
class TestUtils(unittest.TestCase): <NEW_LINE> <INDENT> def test_get_title(self): <NEW_LINE> <INDENT> under_test = CMakeWriter.get_comment('text of comment') <NEW_LINE> self.assertEqual( '################################################################################\n' '# text of comment\n' '#########################... | This file test methods of utils package | 62598ff2187af65679d2a046 |
class Feature: <NEW_LINE> <INDENT> __slots__ = ('seqid', 'source', 'feature', 'start', 'end', 'score', 'strand', 'phase', 'attrs') <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> attr_str = ' '.join('%s "%s";' % (k, v) for (k, v) in self.attrs.iteritems... | GTF Specification (fields are tab-separated)
1. seqname - sequence name (chromosome)
2. source - program that generated this feature.
3. feature - type of feature ("transcript", "exon")
4. start - start pos of feature (1-based)
5. end - end pos of feature (inclusive)
6. score - number between 0 and 1000
7. strand - '+'... | 62598ff2091ae356687054bb |
class TextFunction(CommandBit): <NEW_LINE> <INDENT> commandmap = FormulaConfig.textfunctions <NEW_LINE> def parsebit(self, pos): <NEW_LINE> <INDENT> self.output = TaggedOutput().settag(self.translated) <NEW_LINE> if not self.factory.detecttype(Bracket, pos): <NEW_LINE> <INDENT> Trace.error('No parameter for ' + unicode... | A function where parameters are read as text. | 62598ff2ad47b63b2c5a80f1 |
class PreSimulation(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "object.pre_simulation" <NEW_LINE> bl_label = "Floating Pre-Simulation" <NEW_LINE> bl_options = {'REGISTER'} <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> return context.active_object is not None <NEW_LINE> <DEDENT... | Execute Pre-Simulation | 62598ff215fb5d323ce7f5e5 |
class ClustExANM(ClustENM): <NEW_LINE> <INDENT> def _buildANM(self, ca): <NEW_LINE> <INDENT> anm = exANM() <NEW_LINE> anm.buildHessian(ca, cutoff=self._cutoff, gamma=self._gamma, R=self._R, Ri=self._Ri, r=self._r, h=self._h, exr=self._exr, gamma_memb=self._gamma_memb, hull=self._hull, lat=self._lat, center=self._center... | Experimental. | 62598ff24c3428357761ab4a |
class OtherPackage(View): <NEW_LINE> <INDENT> def get(self, request): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> json_data = request.GET.get('data') <NEW_LINE> data = json.loads(json_data) <NEW_LINE> <DEDENT> except Exception: <NEW_LINE> <INDENT> return JsonError("解析失败") <NEW_LINE> <DEDENT> if data: <NEW_LINE> <INDEN... | "添加其他包装 | 62598ff226238365f5fad400 |
class UnsafeThreadingError(PipedError): <NEW_LINE> <INDENT> pass | Used when we are using possible dangerous threading without specifying
that we really want to. | 62598ff2ad47b63b2c5a80f3 |
class ScanPoliciesManager(v2.ScanPoliciesManager): <NEW_LINE> <INDENT> def __init__( self, exclude_dir_regexes: Iterable[Union[str, regex_class]] = tuple(), exclude_file_regexes: Iterable[Union[str, regex_class]] = tuple(), include_file_regexes: Iterable[Union[str, regex_class]] = tuple(), exclude_all_symlinks: bool = ... | Policy object used when scanning folders for syncing, used to decide
which files to include in the list of files to be synced.
Code that scans through files should at least use should_exclude_file()
to decide whether each file should be included; it will check include/exclude
patterns for file names, as well as patter... | 62598ff2091ae356687054bf |
class BayesMonty(BayesBasic): <NEW_LINE> <INDENT> def likelihood(self, inData): <NEW_LINE> <INDENT> lh = np.zeros(len(self.hypotheses)) <NEW_LINE> if len(lh) != 3: <NEW_LINE> <INDENT> sys.exit("Not correct number of hypotheses (3) for Monty Hall problem!") <NEW_LINE> <DEDENT> lh[0] = 1/2 <NEW_LINE> lh[1] = 0 <NEW_LINE>... | Likelihood function for Monty Hall problem.
Quite unique and unlikely to be used in other applications. | 62598ff2c4546d3d9def76d7 |
class PresetPersistorTestDeprecated(support.ResultTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.base = support.MockBase("main") <NEW_LINE> self.base.read_mock_comps() <NEW_LINE> self.base.init_sack() <NEW_LINE> <DEDENT> def test_group_install(self): <NEW_LINE> <INDENT> prst = self.base.group_... | Test group operations with some data in the persistor. | 62598ff2ad47b63b2c5a80f5 |
@ddt.ddt <NEW_LINE> class MachPromotionDispatch(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> log.info('******************************** -- 测试开始 -- ********************************************') <NEW_LINE> <DEDENT> @ddt.data(*flow_not_change_Promotion) <NEW_LINE> def test_flow_promotion(s... | 活动记账测试用例: <br>
1>>活动金额记账正常流程测试 test_flow_promotion | 62598ff23cc13d1c6d465ff9 |
class Equals(Criteria): <NEW_LINE> <INDENT> def __init__(self, param1, param2, lookback=1): <NEW_LINE> <INDENT> Criteria.__init__(self) <NEW_LINE> if isinstance(param1, TechnicalIndicator): <NEW_LINE> <INDENT> param1 = param1.value <NEW_LINE> <DEDENT> if isinstance(param2, TechnicalIndicator): <NEW_LINE> <INDENT> param... | Criteria used to determine if a technical indicator or symbol OHLCV is
currently equal to another technical indicator, symbol OHLCV, or value. | 62598ff2091ae356687054c7 |
class Tags(BasePackageElement): <NEW_LINE> <INDENT> DEFAULT_TAGS = { 'Root': { 'TagColor': 'LightBlue' } } <NEW_LINE> @property <NEW_LINE> def filename(self): <NEW_LINE> <INDENT> return 'XML/Tags.xml' <NEW_LINE> <DEDENT> def _build_etree(self): <NEW_LINE> <INDENT> self._etree = etree.Element( etree.QName(self.XMLNS_IDP... | As Adobe's idml specification explains:
``
The Tags.xml file contains the XML tag de nitions stored in the InDesign document,
including unused tags.
`` | 62598ff2627d3e7fe0e0774f |
class SetOversizedDMXBlockAddress(OptionalParameterTestFixture): <NEW_LINE> <INDENT> CATEGORY = TestCategory.ERROR_CONDITIONS <NEW_LINE> PID = 'DMX_BLOCK_ADDRESS' <NEW_LINE> DEPS = [SetDMXBlockAddress] <NEW_LINE> def Test(self): <NEW_LINE> <INDENT> self.AddIfSetSupported(self.NackSetResult(RDMNack.NR_DATA_OUT_OF_RANGE)... | Set DMX_BLOCK_ADDRESS to 513. | 62598ff2091ae356687054ca |
class ActionCreateFormat(DeviceAction): <NEW_LINE> <INDENT> type = ACTION_TYPE_CREATE <NEW_LINE> obj = ACTION_OBJECT_FORMAT <NEW_LINE> def __init__(self, device, format=None): <NEW_LINE> <INDENT> DeviceAction.__init__(self, device) <NEW_LINE> if format: <NEW_LINE> <INDENT> self.origFormat = device.format <NEW_LINE> if ... | An action representing creation of a new filesystem. | 62598ff24c3428357761ab58 |
class svn_delta_path_driver_cb_func_t: <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> __setattr__ = lambda self, name, value: _swig_setattr(self, svn_delta_path_driver_cb_func_t, name, value) <NEW_LINE> __swig_getmethods__ = {} <NEW_LINE> __getattr__ = lambda self, name: _swig_getattr(self, svn_delta_path_driv... | Proxy of C svn_delta_path_driver_cb_func_t struct | 62598ff226238365f5fad40f |
@python_2_unicode_compatible <NEW_LINE> class Plan(StripeObject): <NEW_LINE> <INDENT> name = models.CharField(max_length=100, null=False) <NEW_LINE> currency = models.CharField( choices=CURRENCIES, max_length=10, null=False) <NEW_LINE> interval = models.CharField( max_length=10, choices=INTERVALS, verbose_name="Interva... | A Stripe Plan. | 62598ff2627d3e7fe0e07757 |
class BinarySensorEntity(Entity): <NEW_LINE> <INDENT> entity_description: BinarySensorEntityDescription <NEW_LINE> _attr_device_class: BinarySensorDeviceClass | str | None <NEW_LINE> _attr_is_on: bool | None = None <NEW_LINE> _attr_state: None = None <NEW_LINE> @property <NEW_LINE> def device_class(self) -> BinarySenso... | Represent a binary sensor. | 62598ff2091ae356687054d0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.