code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Issuer(NameID): <NEW_LINE> <INDENT> format = base.Attribute(types.String) | Represents the issuer of a SAML assertion or protocol
message [saml-core § 2.2.5]. | 62598faefff4ab517ebcd7e7 |
class Board(models.Model): <NEW_LINE> <INDENT> manufacturer = models.CharField('制造商', max_length=128) <NEW_LINE> model = models.CharField('样式', max_length=64) <NEW_LINE> sn = models.CharField('序列号',max_length=64) <NEW_LINE> server_obj = models.ForeignKey('Server', related_name='board',on_delete=models.CASCADE) <NEW_LIN... | 主板表 | 62598faecc40096d6161a1db |
class SnippetInstance(EditableTextObject): <NEW_LINE> <INDENT> def __init__(self, snippet, parent, initial_text, start, end, visual_content, last_re, globals): <NEW_LINE> <INDENT> if start is None: <NEW_LINE> <INDENT> start = Position(0, 0) <NEW_LINE> <DEDENT> if end is None: <NEW_LINE> <INDENT> end = Position(0, 0) <N... | See module docstring. | 62598faed486a94d0ba2bfd1 |
class TextFeature(): <NEW_LINE> <INDENT> def __init__(self, input_ids, attention_mask, token_type_ids, label, input_len): <NEW_LINE> <INDENT> self.input_ids = input_ids <NEW_LINE> self.attention_mask = attention_mask <NEW_LINE> self.token_type_ids = token_type_ids <NEW_LINE> self.input_len = input_len <NEW_LINE> self.l... | A single set of features of text.
Args:
input_ids: Indices of input sequence tokens in the vocabulary.
attention_mask: Mask to avoid performing attention on padding token indices.
Mask values selected in ``[0, 1]``:
Usually ``1`` for tokens that are NOT MASKED, ``0`` for MASKED (padded) tokens... | 62598fae5166f23b2e2433db |
class Symbol: <NEW_LINE> <INDENT> def __init__(self, c: str, color: tuple[int, int, int] | None = (0, 0, 0), isGeneric: bool = False, ) -> None: <NEW_LINE> <INDENT> if len(c) > 3: <NEW_LINE> <INDENT> raise error(f"Symbol needs to be 3 chars or shorter, not \"{c}\" with length {len(c)}") <NEW_LINE> <DEDENT> self.c = c <... | The symbols automata read.
Symbols are identified by the attribute c, which is 3 or fewer chars long.
When rendered in a CA color will be displayed instead of c.
Generic Symbols are used as variables in transition functions. | 62598faef9cc0f698b1c52ca |
class ConfigurableMeta(type): <NEW_LINE> <INDENT> def __new__(cls, name, bases, attrs): <NEW_LINE> <INDENT> if bases: <NEW_LINE> <INDENT> class_params = attrs.get("_parameters", []) <NEW_LINE> class_param_groups = list(attrs.get("_param_groups", [])) <NEW_LINE> for base in bases: <NEW_LINE> <INDENT> if "_parameters" in... | Metaclass used to build the Configurable class and its childs.
This is used mainly for two reasons, and they both affect only subclasses of Configurable
not Configurable itself.:
- Make the class functions able to access settings through their arguments
(see the `_populate_with_settings` function in this same ... | 62598faea8370b77170f03de |
class VendorResource(CommonResource): <NEW_LINE> <INDENT> productundertests = ReverseManyIncludeURIField( 'oilserver.api.resources.ProductUnderTestResource', 'productundertests') <NEW_LINE> class Meta(CommonMeta): <NEW_LINE> <INDENT> queryset = models.Vendor.objects.all() <NEW_LINE> filtering = { 'uuid': ('exact',), 'n... | API Resource for 'Vendor' model. | 62598faed58c6744b42dc2d8 |
class Xdmf(PetscComponent, ModuleXdmf): <NEW_LINE> <INDENT> import pyre.inventory <NEW_LINE> filename = pyre.inventory.str("filename", default="output.h5") <NEW_LINE> filename.meta['tip'] = "Name of HDF5 file." <NEW_LINE> def __init__(self, name="xdmf"): <NEW_LINE> <INDENT> PetscComponent.__init__(self, name, facility=... | Python class for Xdmf metadata file associated with an HDF5 file.
Properties
@li filename Name of HDF5 file.
Facilities
@li None | 62598fae7c178a314d78d49f |
class PowerNorm(Normalize): <NEW_LINE> <INDENT> def __init__(self, gamma, vmin=None, vmax=None, clip=False): <NEW_LINE> <INDENT> Normalize.__init__(self, vmin, vmax, clip) <NEW_LINE> self.gamma = gamma <NEW_LINE> <DEDENT> def __call__(self, value, clip=None): <NEW_LINE> <INDENT> if clip is None: <NEW_LINE> <INDENT> cli... | Normalize a given value to the ``[0, 1]`` interval with a power-law
scaling. This will clip any negative data points to 0. | 62598faee5267d203ee6b90c |
class FBObjectPoseOptionsFlag (Enumeration): <NEW_LINE> <INDENT> kFBObjectPoseOptionsNoFlag=property(doc=" ") <NEW_LINE> kFBObjectPoseOptionsTranslationX=property(doc=" ") <NEW_LINE> kFBObjectPoseOptionsTranslationY=property(doc=" ") <NEW_LINE> kFBObjectPoseOptionsTranslationZ=property(doc=" ... | ObjectPoseOptions flags.
| 62598faeff9c53063f51a650 |
class Pairing(GitEntry): <NEW_LINE> <INDENT> required_fields = [u'Player 1', u'Player 2', u'Group'] <NEW_LINE> def __init__(self, repo, params=None, index=None, *args, **kwargs): <NEW_LINE> <INDENT> self.repo = repo <NEW_LINE> if params: <NEW_LINE> <INDENT> for field in Pairing.required_fields: <NEW_LINE> <INDENT> if f... | Class to manage a pairing between two teams. | 62598fae2c8b7c6e89bd37c8 |
class InPlay(object): <NEW_LINE> <INDENT> def __init__(self, tetriminos, width, height): <NEW_LINE> <INDENT> self.tetrimino = tetriminos[randrange(len(tetriminos))] <NEW_LINE> self.rotation = randrange(1) <NEW_LINE> self.x = width/2 <NEW_LINE> self.y = height <NEW_LINE> <DEDENT> def rotateClock(self): <NEW_LINE> <INDEN... | This is the piece in play, and it takes direction from the game | 62598faecc0a2c111447b014 |
@actions.register('snapshot') <NEW_LINE> class Snapshot(BaseAction): <NEW_LINE> <INDENT> schema = type_schema('snapshot') <NEW_LINE> permissions = ('rds:CreateDBSnapshot',) <NEW_LINE> def process(self, dbs): <NEW_LINE> <INDENT> with self.executor_factory(max_workers=3) as w: <NEW_LINE> <INDENT> futures = [] <NEW_LINE> ... | Creates a manual snapshot of a RDS instance
:example:
.. code-block: yaml
policies:
- name: rds-snapshot
resource: rds
actions:
- snapshot | 62598fae4e4d562566372429 |
class UnBindingPolicyObjectRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Module = None <NEW_LINE> self.GroupId = None <NEW_LINE> self.UniqueId = None <NEW_LINE> self.InstanceGroupId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Module = pa... | UnBindingPolicyObject request structure.
| 62598fae167d2b6e312b6f75 |
class PredictForm2(Form): <NEW_LINE> <INDENT> review = fields.TextAreaField('Review:', validators=[Required()]) <NEW_LINE> submit = fields.SubmitField('Submit') | Fields for Predict | 62598faef548e778e596b5a7 |
class itkMaskNegatedImageFilterIUC2IUS2IUC2(itkMaskNegatedImageFilterIUC2IUS2IUC2_Superclass): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") <NEW_L... | Proxy of C++ itkMaskNegatedImageFilterIUC2IUS2IUC2 class | 62598fae7b25080760ed74b3 |
class WikiPageIterator(WikiPageIteratorAll): <NEW_LINE> <INDENT> def next(self): <NEW_LINE> <INDENT> if self.current > self.high: <NEW_LINE> <INDENT> raise StopIteration <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> good_doc_status = False <NEW_LINE> while not good_doc_status: <NEW_LINE> <INDENT> self.current += 1 <NEW... | Performs same function as 'WikiPageIteratorAll', but
filters out pages deemed to be not of interest. | 62598fae4428ac0f6e658528 |
class Database(DependencyDescriptor): <NEW_LINE> <INDENT> scope = 'operation' <NEW_LINE> def __init__(self, config): <NEW_LINE> <INDENT> self.config = config <NEW_LINE> <DEDENT> @property <NEW_LINE> def key(self): <NEW_LINE> <INDENT> return (self.config,) <NEW_LINE> <DEDENT> def instanciate(self, op): <NEW_LINE> <INDEN... | A database dependency descriptor gives access to a specific database
backend instanciated for the current operation. | 62598faed7e4931a7ef3c099 |
class MetricModel: <NEW_LINE> <INDENT> def __init__(self, modelversion: 'ModelVersion', threshold: float, comparator: ThresholdCmpOp) -> 'MetricModel': <NEW_LINE> <INDENT> self.modelversion = modelversion <NEW_LINE> self.threshold = threshold <NEW_LINE> self.comparator = comparator | Model having extra metric fields | 62598faed486a94d0ba2bfd2 |
class TestSamConverter(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self._backend = backend.FileSystemBackend("tests/data") <NEW_LINE> self._client = client.LocalClient(self._backend) <NEW_LINE> <DEDENT> def verifySamRecordsEqual(self, sourceReads, convertedReads): <NEW_LINE> <INDENT> se... | Tests for the GA4GH reads API -> SAM conversion. | 62598fae57b8e32f5250811d |
class AWSAccountAlias(models.Model): <NEW_LINE> <INDENT> account_id = models.CharField(max_length=50, null=False, unique=True) <NEW_LINE> account_alias = models.CharField(max_length=63, null=True) | The alias table for AWS accounts. | 62598fae498bea3a75a57b23 |
class TestUserInfoToUser(TestCase): <NEW_LINE> <INDENT> def test_empty(self): <NEW_LINE> <INDENT> with self.assertRaises(ValueError): <NEW_LINE> <INDENT> userInfo_to_user(None) <NEW_LINE> <DEDENT> <DEDENT> def test_is_user_info(self): <NEW_LINE> <INDENT> userInfo = MagicMock() <NEW_LINE> userInfo.user = 'This is not a ... | Test the ``userInfo_to_user`` function | 62598fae851cf427c66b82bf |
class Disk(_messages.Message): <NEW_LINE> <INDENT> class TypeValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> TYPE_UNSPECIFIED = 0 <NEW_LINE> PERSISTENT_HDD = 1 <NEW_LINE> PERSISTENT_SSD = 2 <NEW_LINE> LOCAL_SSD = 3 <NEW_LINE> <DEDENT> autoDelete = _messages.BooleanField(1) <NEW_LINE> mountPoint = _messages.StringF... | A Google Compute Engine disk resource specification.
Enums:
TypeValueValuesEnum: Required. The type of the disk to create.
Fields:
autoDelete: Specifies whether or not to delete the disk when the pipeline
completes. This field is applicable only for newly created disks. See ht
tps://cloud.google.com/compu... | 62598fae7d847024c075c3c7 |
class dataFrameCursor(): <NEW_LINE> <INDENT> def __init__(self, dataframes, table_names ): <NEW_LINE> <INDENT> self.tables = {} <NEW_LINE> for df, name in zip(dataframes,table_names): <NEW_LINE> <INDENT> self.tables[name] = df <NEW_LINE> <DEDENT> <DEDENT> def dictionary_iterator(self, table_name): <NEW_LINE> <INDENT> ... | wrapper for dataframe to use same API as DictCursor for databases | 62598fae66656f66f7d5a3f4 |
class DBSessionTask(celery.Task): <NEW_LINE> <INDENT> def after_return(self, status, retval, task_id, args, kwargs, einfo): <NEW_LINE> <INDENT> db_session.remove() | A Celery Task that ensures that the connection the the
database is closed when the task is done
The db_session is scoped, therefore thread-local | 62598faebe8e80087fbbf068 |
class PluginLoader(object): <NEW_LINE> <INDENT> def __init__(self, class_name, package, config, subdir, aliases={}): <NEW_LINE> <INDENT> self.class_name = class_name <NEW_LINE> self.package = package <NEW_LINE> self.config = config <NEW_LINE> self.subdir = subdir <NEW_LINE> self.aliases = aliases <NEW_LINE> self._modul... | PluginLoader loads plugins from the best source
It searches for plugins by iterating through the combined list of
play basedirs, configured paths, and the installed package directory.
The first match is used. | 62598faef9cc0f698b1c52cb |
class NumDiff(Func): <NEW_LINE> <INDENT> __h = 0.001 <NEW_LINE> def __init__(self, f=None, h=0.001): <NEW_LINE> <INDENT> if f is not None: <NEW_LINE> <INDENT> self.f = f <NEW_LINE> <DEDENT> self.__h = h <NEW_LINE> <DEDENT> def d(self, x, dx): <NEW_LINE> <INDENT> x = asarray(x) <NEW_LINE> dx = asarray(dx) <NEW_LINE> d =... | Implements |.fprime| method by numerical differentiation | 62598faebe383301e02537fd |
class StaticCompositor(object): <NEW_LINE> <INDENT> def __init__(self, dryrun, verbose): <NEW_LINE> <INDENT> self.dryrun = dryrun <NEW_LINE> self.verbose = verbose <NEW_LINE> self.source_dir = '' <NEW_LINE> self.timestamp_helper = TimestampCompositorHelper(dryrun, verbose) <NEW_LINE> self.pages = {} <NEW_LINE> <DEDENT>... | A singleton page compositor.
A compositor to handle static pages that have no automated
relationship between each other. | 62598faeac7a0e7691f7250d |
class FadeToplevel(tk.Toplevel): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> tk.Toplevel.__init__(self, *args, **kwargs) <NEW_LINE> self.attributes("-alpha", 0.0) <NEW_LINE> <DEDENT> def fade_in(self): <NEW_LINE> <INDENT> alpha = self.attributes("-alpha") <NEW_LINE> alpha = min(alpha + ... | A toplevel widget with the ability to fade in | 62598fae23849d37ff8510b8 |
class PathParser(): <NEW_LINE> <INDENT> def __init__(self, filepath, *args, **kwargs): <NEW_LINE> <INDENT> self._path = filepath if isinstance(filepath, str) else '' <NEW_LINE> <DEDENT> def get_path_and_filename(self): <NEW_LINE> <INDENT> fullpath = self._path <NEW_LINE> if not fullpath: <NEW_LINE> <INDENT> return ('',... | 路径字符串解析 | 62598fae7b180e01f3e49052 |
class AttrDict(dict): <NEW_LINE> <INDENT> def _convert_fun_(x): <NEW_LINE> <INDENT> if hasattr(x, "__call__"): <NEW_LINE> <INDENT> return x.__name__ <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> return x <NEW_LINE> <DEDENT> <DEDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(AttrDict, self).__init__... | A dictionary allowing to retrieve values by class attribute syntax
additionally supports `to_yaml()` serialization and `md5` hashing | 62598fae99fddb7c1ca62deb |
class ETF(Asset, IndexConstituentProvider): <NEW_LINE> <INDENT> def __init__(self, id_: str, asset_class: AssetClass, name: str, exchange=None): <NEW_LINE> <INDENT> Asset.__init__(self, id_, asset_class, name, exchange) <NEW_LINE> IndexConstituentProvider.__init__(self, id_) <NEW_LINE> <DEDENT> def get_type(self) -> As... | ETF Asset
ETF which tracks an evolving portfolio of securities, and can be traded on exchange | 62598faeaad79263cf42e7d8 |
class ContestWebServer(WebService): <NEW_LINE> <INDENT> def __init__(self, shard, contest_id=None): <NEW_LINE> <INDENT> parameters = { "static_files": [("cms.server", "static"), ("cms.server.contest", "static")], "cookie_secret": hex_to_bin(config.secret_key), "debug": config.tornado_debug, "is_proxy_used": config.is_p... | Service that runs the web server serving the contestants.
| 62598fae63b5f9789fe8516c |
class AyxPlugin: <NEW_LINE> <INDENT> def __init__(self, n_tool_id: int, alteryx_engine: object, output_anchor_mgr: object): <NEW_LINE> <INDENT> self.n_tool_id = n_tool_id <NEW_LINE> self.alteryx_engine = alteryx_engine <NEW_LINE> self.output_anchor_mgr = output_anchor_mgr <NEW_LINE> self.is_initialized = True <NEW_LINE... | Implements the plugin interface methods, to be utilized by the Alteryx engine to communicate with this plugin.
Prefixed with "pi", the Alteryx engine will expect the below five interface methods to be defined. | 62598fae379a373c97d99018 |
class DistributiveMagmasAndAdditiveMagmas(CategoryWithAxiom): <NEW_LINE> <INDENT> class AdditiveAssociative(CategoryWithAxiom): <NEW_LINE> <INDENT> class AdditiveCommutative(CategoryWithAxiom): <NEW_LINE> <INDENT> class AdditiveUnital(CategoryWithAxiom): <NEW_LINE> <INDENT> class Associative(CategoryWithAxiom): <NEW_LI... | The category of sets `(S,+,*)` with `*` distributing on `+`.
This is similar to a ring, but `+` and `*` are only required to be
(additive) magmas.
EXAMPLES::
sage: from sage.categories.distributive_magmas_and_additive_magmas import DistributiveMagmasAndAdditiveMagmas
sage: C = DistributiveMagmasAndAdditiveMa... | 62598fae5fc7496912d48283 |
class ApplicationHandler(BaseHandler): <NEW_LINE> <INDENT> def get(self,application_id = ''): <NEW_LINE> <INDENT> if application_id == '': <NEW_LINE> <INDENT> respon_json = application.db_get_application_list() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> respon_json = application.db_get_application_id(application_id)... | 处理application表的handle | 62598fae01c39578d7f12d84 |
class Any(Content): <NEW_LINE> <INDENT> def __init__(self, schema, root): <NEW_LINE> <INDENT> Content.__init__(self, schema, root) <NEW_LINE> self.min = root.get('minOccurs', default='0') <NEW_LINE> self.max = root.get('maxOccurs', default='1') <NEW_LINE> <DEDENT> def get_child(self, name): <NEW_LINE> <INDENT> root = s... | Represents an (xsd) <any/> node | 62598fae4527f215b58e9edb |
class PythonParameters(CallbackServerParameters): <NEW_LINE> <INDENT> def __init__( self, address=DEFAULT_ADDRESS, port=DEFAULT_PYTHON_PROXY_PORT, daemonize=False, daemonize_connections=False, eager_load=True, ssl_context=None, auto_gc=False, accept_timeout=DEFAULT_ACCEPT_TIMEOUT_PLACEHOLDER, read_timeout=None,): <NEW_... | Wrapper class that contains all parameters that can be passed to
configure a `ClientServer` | 62598fae56b00c62f0fb28bb |
class Tnode(object): <NEW_LINE> <INDENT> name = None <NEW_LINE> children = None <NEW_LINE> parent = None <NEW_LINE> type = None <NEW_LINE> status = None <NEW_LINE> def __init__(self, name, doc, **kwargs): <NEW_LINE> <INDENT> self._doc = doc <NEW_LINE> self.name = name <NEW_LINE> self.children = [] <NEW_LINE> self.statu... | Abstract class for Root, Vdev and Dev | 62598faecc0a2c111447b017 |
class WeightedPooling1D(_Pooling1D): <NEW_LINE> <INDENT> def __init__(self, pool_length=2, stride=None, border_mode='valid', init="one", **kwargs): <NEW_LINE> <INDENT> super(AveragePooling1D, self).__init__(pool_length, stride, border_mode, **kwargs) <NEW_LINE> self.init = initializations.get(init) <NEW_LINE> assert st... | Weighted pooling for temporal data with Softmax & learned temperature parameter
# Input shape
3D tensor with shape: `(samples, steps, features)`.
# Output shape
3D tensor with shape: `(samples, downsampled_steps, features)`.
# Arguments
pool_length: factor by which to downscale. 2 will halve the input.
... | 62598fae38b623060ffa90a0 |
class IntelligentGameRound(models.Model): <NEW_LINE> <INDENT> _name = "og.igame.round" <NEW_LINE> _description = "iGame Round" <NEW_LINE> _rec_name = 'number' <NEW_LINE> _order = 'number' <NEW_LINE> igame_id = fields.Many2one('og.igame','Game') <NEW_LINE> name = fields.Char('Name',related='igame_id.name') <NEW_LINE> nu... | # Only for Team Match | 62598fae97e22403b383af13 |
class LabelWidget(Widget): <NEW_LINE> <INDENT> template_name = 'dynamic_forms/widgets/label.html' <NEW_LINE> def get_context(self, name, value, attrs): <NEW_LINE> <INDENT> context = super().get_context(name, value, attrs) <NEW_LINE> attrs = context['widget']['attrs'] <NEW_LINE> if 'class' in attrs: <NEW_LINE> <INDENT> ... | Widget for LabelField | 62598fae8da39b475be031ea |
class NotJSONifiableError(DokomoError): <NEW_LINE> <INDENT> pass | The jsonify function encountered a strange object. | 62598fae56ac1b37e63021f1 |
class EndpointsAuthTest(test_case.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(EndpointsAuthTest, self).setUp() <NEW_LINE> self.mock(endpoints_support.logging, 'error', lambda *_args: None) <NEW_LINE> <DEDENT> def call(self, remote_address, email, headers=None): <NEW_LINE> <INDENT> class Us... | Tests for auth.endpoints_support.initialize_request_auth function. | 62598fae0c0af96317c56388 |
class AvailableEntitlementsCache(CacheManager): <NEW_LINE> <INDENT> BETA = 2.0 <NEW_LINE> LBOUND = 5.0 <NEW_LINE> UBOUND = 10.0 <NEW_LINE> CACHE_FILE = "/var/lib/rhsm/cache/available_entitlements.json" <NEW_LINE> def __init__(self, available_entitlements=None): <NEW_LINE> <INDENT> self.available_entitlements = availabl... | Cache of available entitlements | 62598faebaa26c4b54d4f2b9 |
class Post(models.Model): <NEW_LINE> <INDENT> class Meta(): <NEW_LINE> <INDENT> db_table = 'post' <NEW_LINE> <DEDENT> author = models.ForeignKey('auth.User') <NEW_LINE> title = models.CharField(max_length=200) <NEW_LINE> text = models.TextField() <NEW_LINE> created_date = models.DateTimeField(default=timezone.now) <NEW... | Класс создания модели для БД | 62598faebd1bec0571e150c6 |
class StockComment(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=20) <NEW_LINE> comment = models.TextField() <NEW_LINE> permit = models.ForeignKey(Permit,on_delete=models.CASCADE) <NEW_LINE> department = models.ForeignKey(Department,on_delete=models.CASCADE) <NEW_LINE> default = models.BooleanFi... | Frequently used comments for reviewers. | 62598fae7d847024c075c3c8 |
class MockGymEnvironment(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.observation_space = 'observation_space' <NEW_LINE> self.action_space = 'action_space' <NEW_LINE> self.reward_range = 'reward_range' <NEW_LINE> self.metadata = 'metadata' <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <IN... | Mock environment for testing. | 62598faeb7558d5895463630 |
class TestMessageFromString(unittest.TestCase): <NEW_LINE> <INDENT> def test(self): <NEW_LINE> <INDENT> m = email.mime.text.MIMEText(u'This is some text', 'plain', 'utf-8') <NEW_LINE> m['Subject'] = 'test' <NEW_LINE> m['From'] = 'me' <NEW_LINE> m['To'] = 'Nobody' <NEW_LINE> message = utils.decrypted_message_from_string... | Tests for decrypted_message_from_string.
Because the implementation is that this is a wrapper around
decrypted_message_from_file, it's not important to have a large swath of
tests, just enough to show that things are being passed correctly. | 62598fae009cb60464d01526 |
class TwitterTimeline(object): <NEW_LINE> <INDENT> def __init__(self, consumer_key, consumer_secret, access_token_key, access_token_secret): <NEW_LINE> <INDENT> self.consumer_key = consumer_key <NEW_LINE> self.consumer_secret = consumer_secret <NEW_LINE> self.access_token_key = access_token_key <NEW_LINE> self.access_t... | docstring | 62598fae851cf427c66b82c2 |
class PersistentTemporaryFile(object): <NEW_LINE> <INDENT> _file = None <NEW_LINE> def __init__(self, suffix="", prefix="", dir=None, mode='w+b'): <NEW_LINE> <INDENT> if prefix == None: <NEW_LINE> <INDENT> prefix = "" <NEW_LINE> <DEDENT> if dir is None: <NEW_LINE> <INDENT> dir = base_dir() <NEW_LINE> <DEDENT> fd, name ... | A file-like object that is a temporary file that is available even after being closed on
all platforms. It is automatically deleted on normal program termination. | 62598fae8a43f66fc4bf2180 |
class ContactUsForm(FlaskForm): <NEW_LINE> <INDENT> name = TextField('Name', [Required(message='Name missing')]) <NEW_LINE> email = TextField('Email Address', [Email(), Required(message='Email address missing')]) <NEW_LINE> phone = IntegerField('Phone Number') <NEW_LINE> subject = TextField('Subject', [Required(message... | Form for sending messages
| 62598faefff4ab517ebcd7eb |
class WandererClass(PlayerClass): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self.Name = "Wanderer" | Default player class with nothing special. | 62598faed58c6744b42dc2da |
class SimpleFeatWriter(object): <NEW_LINE> <INDENT> def __init__(self, pathForOutput, maxRanking, include_verification=False): <NEW_LINE> <INDENT> self.path = pathForOutput <NEW_LINE> self.maxRanking = maxRanking <NEW_LINE> self.use_verification = include_verification <NEW_LINE> <DEDENT> def writeFeatures(self, seqObje... | This class receives a seqRecord object and write a simple, one line per feature. Include verification should
only be used when the new annotation scheme is used. | 62598fae097d151d1a2c1030 |
class TestGui(object): <NEW_LINE> <INDENT> def test_init(self): <NEW_LINE> <INDENT> display = gui.Gui() <NEW_LINE> assert display <NEW_LINE> <DEDENT> def test_cell_listener(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_next_step_button_listener(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test... | Tests the Gui object. | 62598faeac7a0e7691f7250f |
class AccountsViewsTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.user1 = User.objects.create(**user_data_1) <NEW_LINE> self.user1.set_password('XGEyPfoMRNYTo7A#yWLnKEht') <NEW_LINE> self.user1.save() <NEW_LINE> self.client = Client() <NEW_LINE> <DEDENT> def login(self): <NEW_LINE> <INDEN... | test of our views | 62598faecc40096d6161a1dd |
class Endpoint: <NEW_LINE> <INDENT> __uri__ = '/' <NEW_LINE> logger = logging.getLogger(__name__) <NEW_LINE> def __init__(self, server, allowed_origin=None): <NEW_LINE> <INDENT> self.server = server <NEW_LINE> self._allowed_methods = set([ mthd.upper() for mthd in HTTP_METHODS if asyncio.iscoroutinefunction(getattr(sel... | Represents an endpoint to which requests can be made in order to manage
a REST resource. | 62598fae4f6381625f1994c2 |
class RobertaEmbedderModule(HuggingfaceTransformersEmbedderModule): <NEW_LINE> <INDENT> def __init__(self, args): <NEW_LINE> <INDENT> super(RobertaEmbedderModule, self).__init__(args) <NEW_LINE> self.model = transformers.RobertaModel.from_pretrained( args.input_module, cache_dir=self.cache_dir, output_hidden_states=Tru... | Wrapper for RoBERTa module to fit into jiant APIs.
Check HuggingfaceTransformersEmbedderModule for function definitions | 62598fae1b99ca400228f533 |
class FileCreateAction(Action): <NEW_LINE> <INDENT> def __init__(self, *_, **__): <NEW_LINE> <INDENT> self.path = "" <NEW_LINE> <DEDENT> def execute(self, action, path, data, binary=False): <NEW_LINE> <INDENT> with open(path, "wb" if binary else "w") as handle: <NEW_LINE> <INDENT> self.path = path <NEW_LINE> handle.wri... | Create a file and write data | 62598fae63d6d428bbee27b2 |
class GoogleAppEngineOAuth2(GoogleOAuth2): <NEW_LINE> <INDENT> AUTH_BACKEND = GoogleAppEngineOAuth2Backend <NEW_LINE> SETTINGS_KEY_NAME = 'GOOGLE_APPENGINE_CLIENT_ID' <NEW_LINE> SETTINGS_SECRET_NAME = 'GOOGLE_APPENGINE_CLIENT_SECRET' <NEW_LINE> def user_data(self, access_token, *args, **kwargs): <NEW_LINE> <INDENT> ret... | Google App Engine OAuth2 authentication backend | 62598fae2c8b7c6e89bd37cc |
class AuthRequired(Exception): <NEW_LINE> <INDENT> def __init__(self, msg = ""): <NEW_LINE> <INDENT> self.msg = msg <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "Authorization Required: " + self.msg | Raised on 401 - Authentication Required error. Service requires authentication, pass user credentials in CLAMClient constructor. | 62598fae56ac1b37e63021f2 |
class AntennaList(Obit.AntennaList): <NEW_LINE> <INDENT> def __init__(self, name, inUV, subA, err): <NEW_LINE> <INDENT> super(AntennaList, self).__init__() <NEW_LINE> Obit.CreateAntennaList(self.this, name, inUV.me, subA, err.me) <NEW_LINE> <DEDENT> def __del__(self, DeleteAntennaList=_Obit.DeleteAntennaList): <NEW_LIN... | Python Obit AntennaList class
| 62598fae3d592f4c4edbaec9 |
class TestSuccessfulCMSBuild_case3(PathTestCase): <NEW_LINE> <INDENT> _testCasePath = Path('tests/case3') <NEW_LINE> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> cls._touch_file( cls._testCasePath.joinpath( 'intermediate', 'Debug', 'project3.tlog', 'project3.lastbuildstate', ), ) <NEW_LINE> time.sle... | Testcase for testing the successful C MSBuild, where this
testcase uses the file in the tests\case3\ subdirectory which
reflects an successful build for the 'Release' and the
'Debug' buildtype.
However the lastbuildstate of the Release is more recent then
the file. The lastbuildstate of the Debug is older then the file... | 62598fae4527f215b58e9edd |
class UndirectedGraphCochain(GraphCochain, UndirectedGraphVector): <NEW_LINE> <INDENT> def bracket(self, other): <NEW_LINE> <INDENT> return sum((sum(self.homogeneous_part(v,e).insertion(i, other) for i in range(v)) for (v,e) in self.gradings()), self._parent.zero()) + sum(((1 if e % 2 == 1 and f % 2 == 1 else -1)*sum(o... | Cochain of an :class:`UndirectedGraphComplex_`. | 62598fae4e4d56256637242d |
class KeyMaterialFactory: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def create(cipher: BlockCipher, seed=None): <NEW_LINE> <INDENT> key = KeyMaterialFactory.create_key(cipher, seed) <NEW_LINE> nonce = KeyMaterialFactory.create_nonce(cipher, seed) <NEW_LINE> return key, nonce <NEW_LINE> <DEDENT> @staticmethod <NEW_LI... | Factory for random numbers.
| 62598fae44b2445a339b6974 |
class AlreadyDoneHelper: <NEW_LINE> <INDENT> @retry(stop_max_attempt_number=6, wait_fixed=3000) <NEW_LINE> def __init__(self, logger=None): <NEW_LINE> <INDENT> query = AlreadyDoneModel.delete().where((time.time() - AlreadyDoneModel.timestamp) > 604800) <NEW_LINE> num = query.execute() <NEW_LINE> if num: <NEW_LINE> <IND... | Utility class for easy management of Reddit items or posts that have already been checked | 62598fae7cff6e4e811b5a34 |
class HighwayEncoder(object): <NEW_LINE> <INDENT> def __init__(self, num_layers, keep_prob, l2_lambda=3e-7): <NEW_LINE> <INDENT> self.num_layers = num_layers <NEW_LINE> self.keep_prob = keep_prob <NEW_LINE> self.l2_lambda = l2_lambda <NEW_LINE> <DEDENT> def build_graph(self, inputs, scope="HighwayEncoder", reuse=None):... | Encode an input sequence using a highway network.
Based on the paper "Highway Networks" by Srivastava et al.
(https://arxiv.org/pdf/1505.00387.pdf). | 62598fae0c0af96317c5638a |
class IdNumber(object): <NEW_LINE> <INDENT> openapi_types = { 'type': 'str', 'value': 'str', 'state_code': 'str' } <NEW_LINE> attribute_map = { 'type': 'type', 'value': 'value', 'state_code': 'state_code' } <NEW_LINE> def __init__(self, type=None, value=None, state_code=None): <NEW_LINE> <INDENT> self._type = None <NEW... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually. | 62598fae3346ee7daa33764b |
class BatchNormalization(Layer): <NEW_LINE> <INDENT> def __init__(self, momentum=0.99): <NEW_LINE> <INDENT> self.momentum = momentum <NEW_LINE> self.trainable = True <NEW_LINE> self.eps = 0.01 <NEW_LINE> self.running_mean = None <NEW_LINE> self.running_var = None <NEW_LINE> <DEDENT> def initialize(self, optimizer): <NE... | Batch normalization. | 62598faef7d966606f747fed |
class KMSBase(AWSResourceBase): <NEW_LINE> <INDENT> def __init__(self, ctx_node, resource_id=None, client=None, logger=None): <NEW_LINE> <INDENT> AWSResourceBase.__init__( self, client or Boto3Connection(ctx_node).client('kms'), resource_id=resource_id, logger=logger) <NEW_LINE> <DEDENT> @property <NEW_LINE> def proper... | AWS KMS base interface | 62598faebe8e80087fbbf06c |
class BR(RegisterBranch): <NEW_LINE> <INDENT> BITV = "0001 0000 0000 AAAA" <NEW_LINE> @staticmethod <NEW_LINE> def should(vm): <NEW_LINE> <INDENT> return True | BR(label)
Jump unconditionally to the given label.
Run `doc branch` for a detailed explanation of branching instructions. | 62598faea8370b77170f03e3 |
class CallUnits(unittest.TestCase): <NEW_LINE> <INDENT> def testCase010(self): <NEW_LINE> <INDENT> self.maxDiff = None <NEW_LINE> resX = [ tdata + '/b/c/c.pl', tdata + '/b/c/c.pm', tdata + '/b/c/c.pod', tdata + '/b/c/c.py', ] <NEW_LINE> from filesysobjects import V3K <NEW_LINE> if os.path.exists(tdata + '/b/c/c.pyc'): ... | Sets the specific data array and required parameters for test case.
| 62598fae60cbc95b06364357 |
class User(TimestampMixin, models.Model): <NEW_LINE> <INDENT> uuid = models.UUIDField(default=uuid.uuid4) <NEW_LINE> first_name = models.CharField(max_length=100, blank=True, null=True) <NEW_LINE> last_name = models.CharField(max_length=100, blank=True, null=True) <NEW_LINE> nick = models.CharField(max_length=200, blan... | Users allowed to rate applications. | 62598fae66656f66f7d5a3f8 |
class MultiEpochSampler(torch.utils.data.Sampler): <NEW_LINE> <INDENT> def __init__(self, data_source, num_epochs, start_itr=0, batch_size=128): <NEW_LINE> <INDENT> self.data_source = data_source <NEW_LINE> self.num_samples = len(self.data_source) <NEW_LINE> self.num_epochs = num_epochs <NEW_LINE> self.start_itr = star... | Samples elements randomly over multiple epochs
Arguments:
data_source (Dataset): dataset to sample from
num_epochs (int) : Number of times to loop over the dataset
start_itr (int) : which iteration to begin from | 62598faea219f33f346c681e |
class Element(metaclass=InheritDocstrings): <NEW_LINE> <INDENT> _element_name = '' <NEW_LINE> _attr_list = [] <NEW_LINE> def _add_unknown_tag(self, iterator, tag, data, config, pos): <NEW_LINE> <INDENT> warn_or_raise(W10, W10, tag, config, pos) <NEW_LINE> <DEDENT> def _ignore_add(self, iterator, tag, data, config, pos)... | A base class for all classes that represent XML elements in the
VOTABLE file. | 62598fae32920d7e50bc605c |
class CaperBridge(object): <NEW_LINE> <INDENT> def __init__(self, caper_map, genome_db, reads_db): <NEW_LINE> <INDENT> self.map = caper_map <NEW_LINE> self.genome_db = genome_db <NEW_LINE> self.reads_db = reads_db <NEW_LINE> <DEDENT> def __getitem__(self, ival): <NEW_LINE> <INDENT> seq_id, start, stop = ival.id, ival.s... | Mimic a pygr.cnestedlist.NLMSA with a caper database. | 62598fae4f6381625f1994c3 |
class ManagerUtilsManager(ManagerUtilsMixin, Manager): <NEW_LINE> <INDENT> pass | A class that can be used as a manager. It already inherits the Django Manager class and adds
the mixin. | 62598fae0c0af96317c5638b |
class AircraftViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> serializer_class = s.AircraftSerializer <NEW_LINE> queryset = am.Aircraft.objects.all() <NEW_LINE> permission_classes = (p.IsReadOnlyOrAdmin,) <NEW_LINE> filter_backends = (filters.SearchFilter,) <NEW_LINE> search_fields = ('name',) | CRUD for Aircraft. | 62598fae4c3428357761a2c1 |
class DOMHTMLNewsParser(DOMParserBase): <NEW_LINE> <INDENT> _defGetRefs = True <NEW_LINE> extractors = [ Extractor( label='news', path="//h2", attrs=Attribute( key='news', multi=True, path={ 'title': "./text()", 'fromdate': "../following-sibling::p[1]/small//text()", 'body': "../following-sibling::p[2]//text()", 'link'... | Parser for the "news" page of a given movie or person.
The page should be provided as a string, as taken from
the akas.imdb.com server. The final result will be a
dictionary, with a key for every relevant section.
Example:
nwparser = DOMHTMLNewsParser()
result = nwparser.parse(news_html_string) | 62598fae26068e7796d4c95e |
class _IterRTPSubsectionLines: <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> self.parent = parent <NEW_LINE> self.lines = parent.lines <NEW_LINE> self.running = True <NEW_LINE> <DEDENT> def __next__(self): <NEW_LINE> <INDENT> if not self.running: <NEW_LINE> <INDENT> raise StopIteration <NEW_LINE> ... | Iterate over the lines of an RTP file within a subsection. | 62598fae9c8ee82313040176 |
class GroupFolder(Comparer): <NEW_LINE> <INDENT> def __init__( self, id=None, mount_point=None, groups=None, quota=None, size=None, **kwargs ): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.mount_point = mount_point <NEW_LINE> self.groups = [x for x in groups] if groups else [] <NEW_LINE> self.quota = quota <NEW_LIN... | GroupFolder class | 62598fae44b2445a339b6975 |
class Action_Energy_Dataset(Dataset): <NEW_LINE> <INDENT> def __init__(self, file_path, split = 'train'): <NEW_LINE> <INDENT> if(split not in ['train','valid','dummy_test']): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> if(not os.path.exists(file_path)): <NEW_LINE> <INDENT> raise ValueError('File n... | This is a torch dataset class for the new_action_energy_data directory in the repo.
Note the new_action_energy_data directory contains a reformatted version of the data
from before in order to make it easier to parse. | 62598fae7b25080760ed74b9 |
class ChapelLexer(RegexLexer): <NEW_LINE> <INDENT> name = 'Chapel' <NEW_LINE> filenames = ['*.chpl'] <NEW_LINE> aliases = ['chapel', 'chpl'] <NEW_LINE> tokens = { 'root': [ (r'\n', Text), (r'\s+', Text), (r'\\\n', Text), (r'//(.*?)\n', Comment.Single), (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline), (r'(config|... | For `Chapel <http://chapel.cray.com/>`_ source.
.. versionadded:: 2.0 | 62598fae1f5feb6acb162c28 |
class Achievement(models.Model): <NEW_LINE> <INDENT> creation_date = models.DateTimeField(verbose_name="Date d'obtention du badge", auto_now_add=True) <NEW_LINE> user = models.ForeignKey(get_user_model(), verbose_name="Utilisateur", on_delete=models.CASCADE) <NEW_LINE> badge = models.CharField(verbose_name="Badge obten... | Represent a use achievement. | 62598fae76e4537e8c3ef5b7 |
class WildcardNotCoveredNSEC(WildcardNotCovered): <NEW_LINE> <INDENT> _abstract = False <NEW_LINE> references = ['RFC 4035, Sec. 3.1.3.2'] <NEW_LINE> nsec_type = 'NSEC' | >>> e = WildcardNotCoveredNSEC(wildcard='*.foo.baz.')
>>> e.description
'No NSEC RR covers the wildcard (*.foo.baz.).' | 62598faed486a94d0ba2bfd8 |
class Job(IdEqualityMixin): <NEW_LINE> <INDENT> def __init__(self, jid, server): <NEW_LINE> <INDENT> self.id = jid <NEW_LINE> self.server = server <NEW_LINE> <DEDENT> def info(self): <NEW_LINE> <INDENT> return self.server.call('get', '/job/' + self.id) <NEW_LINE> <DEDENT> def stop(self): <NEW_LINE> <INDENT> return self... | Representation of a running Nutch job, use JobClient to get a list of running jobs or to create one | 62598faed486a94d0ba2bfd9 |
class ChangeModelPlugin(Plugin): <NEW_LINE> <INDENT> def activate(self): <NEW_LINE> <INDENT> global Backups <NEW_LINE> self.log.info("Replace Backups") <NEW_LINE> Backups = MyBackups | A basic plugin implementation. | 62598fae851cf427c66b82c5 |
class signalonce(object): <NEW_LINE> <INDENT> __messages = [] <NEW_LINE> def __init__(self, f): <NEW_LINE> <INDENT> self.__f = f <NEW_LINE> self.__f.reset = signalonce.reset <NEW_LINE> <DEDENT> def __call__(self, messageIdString, *args, **kwargs): <NEW_LINE> <INDENT> if not messageIdString in self.__messages: <NEW_LINE... | A decorator class that records the messages sent by the sendSignal function.
The decorated function's first argument is expected to be a message Id string. | 62598faebe8e80087fbbf06e |
class ISODateTimeConverter(FancyValidator): <NEW_LINE> <INDENT> datetime_module = None <NEW_LINE> messages = dict( invalidFormat=_('The must enter your date & time in the format YYYY-MM-DDTHH:MM:SS'),) <NEW_LINE> def _convert_to_python(self, value, state): <NEW_LINE> <INDENT> dt_mod = import_datetime(self.datetime_modu... | Converts fields which contain both date and time, in the
ISO 8601 standard format YYYY-MM-DDTHH:MM:SS.
Stores in a datetime.datetime object.
Examples::
>>> tim = ISODateTimeConverter()
>>> tim.to_python('2012-06-25T05:30:25')
datetime.datetime(2012, 6, 25, 5, 30, 25)
>>> tim.to_python('1999-12-01T12:... | 62598fae21bff66bcd722c71 |
class Neoplasm(_CaseInsensitiveEnum): <NEW_LINE> <INDENT> primary = 'Primary' <NEW_LINE> metastatic = 'Metastatic' <NEW_LINE> unknown = 'Unknown' | Type of malignant neoplasm detected | 62598fae7c178a314d78d4a6 |
class RegistroD309(Registro): <NEW_LINE> <INDENT> campos = [ CampoFixo(1, 'REG', 'D309'), Campo(2, 'NUM_PROC', obrigatorio=True), Campo(3, 'IND_PROC', obrigatorio=True), ] <NEW_LINE> nivel = 4 | Processo Referenciado | 62598fae4e4d562566372430 |
class KillRequestManager(models.Manager): <NEW_LINE> <INDENT> def killable(self): <NEW_LINE> <INDENT> qs = self.get_query_set() <NEW_LINE> return qs.filter( schedule_dts__lte=timezone.now(), enqueue_dts__isnull=True, execute_dts__isnull=True, run__pid__isnull=False, run__start_dts__isnull=False, run__return_dts__isnull... | Custom manager for the KillRequest model. | 62598fae99fddb7c1ca62dee |
class QueryArrayWidget(BaseCSVWidget, forms.TextInput): <NEW_LINE> <INDENT> def value_from_datadict(self, data, files, name): <NEW_LINE> <INDENT> if not isinstance(data, MultiValueDict): <NEW_LINE> <INDENT> for key, value in data.items(): <NEW_LINE> <INDENT> if isinstance(value, string_types): <NEW_LINE> <INDENT> data[... | Enables request query array notation that might be consumed by MultipleChoiceFilter
1. Values can be provided as csv string: ?foo=bar,baz
2. Values can be provided as query array: ?foo[]=bar&foo[]=baz
3. Values can be provided as query array: ?foo=bar&foo=baz
Note: Duplicate and empty values are skipped from results | 62598faefff4ab517ebcd7ef |
class Screen: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.message = '' <NEW_LINE> self.dict_ref = {} <NEW_LINE> self.list_item = [] <NEW_LINE> self.choice = 0 <NEW_LINE> self.dbf = DbFetcher() <NEW_LINE> self.dbw = DbWriter() <NEW_LINE> <DEDENT> def fill_references(self, m_query): <NEW_LINE> <INDEN... | Mother Class for displaying.
Class variables :
---------------
message : string message that will appear in terminal
dict_ref : dict to link order of appearance to item's id
list_item : list for formatted items for screen
dbf : initialize class for database's fetching
dbw : initializ... | 62598fae10dbd63aa1c70bbd |
class BackendInfo(object): <NEW_LINE> <INDENT> @service_method <NEW_LINE> def get_time_zone(self): <NEW_LINE> <INDENT> return str(settings.TIME_ZONE) <NEW_LINE> <DEDENT> @service_method <NEW_LINE> def get_current_timestamp(self): <NEW_LINE> <INDENT> return datetime.datetime.now(local_timezone).isoformat() <NEW_LINE> <D... | This class provides information about the backend software revision and
date/time settings. Implements #280 and #1850. | 62598fae2c8b7c6e89bd37cf |
class ChromeColeta(ColetarRegistros): <NEW_LINE> <INDENT> def __init__(self, url, usuario, senha): <NEW_LINE> <INDENT> options = ChromeOptions() <NEW_LINE> preferecias = { "download.default_directory": DIRETORIO, "safebrowsing.enabled": "false", } <NEW_LINE> options.add_experimental_option("prefs", preferecias) <NEW_LI... | Classe que usa o webdrive do Chrome, defenindo as configurações necessarias, responsavel por coletar os registros.
Utilizando os metodos da Classe pai ColetarRegistros. | 62598faeac7a0e7691f72513 |
class wmoving(gr.sync_block): <NEW_LINE> <INDENT> def __init__(self, alpha=0.5, samples=False): <NEW_LINE> <INDENT> if samples: <NEW_LINE> <INDENT> self.set_samples(samples) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.set_alpha(alpha) <NEW_LINE> <DEDENT> self._first = True <NEW_LINE> gr.sync_block.__init__(self,... | weighted moving average | 62598faefff4ab517ebcd7f0 |
class Column: <NEW_LINE> <INDENT> @class_common_init(re_column_url) <NEW_LINE> def __init__(self, url, name=None, follower_num=None, post_num=None, session=None): <NEW_LINE> <INDENT> self._in_name = re_column_url.match(url).group(1) <NEW_LINE> self.url = url <NEW_LINE> self._session = session <NEW_LINE> self._name = na... | 专栏类,请使用``ZhihuClient.column``方法构造对象. | 62598faecc40096d6161a1df |
class RecollectWasteException(Exception): <NEW_LINE> <INDENT> pass | Recollect Waste error. | 62598faf63d6d428bbee27b6 |
class Camera(object): <NEW_LINE> <INDENT> def __init__(self, focalpoint=None, distance=None, azimuth=None, elevation=None, roll=None): <NEW_LINE> <INDENT> self.focalpoint = focalpoint or 'auto' <NEW_LINE> self.distance = distance or 'auto' <NEW_LINE> self.azimuth = azimuth or 0 <NEW_LINE> self.elevation = elevation or ... | Class that wraps some of the mlab functions that manipulate the camera.
A camera instance is automatically created by the animation. | 62598fafadb09d7d5dc0a595 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.