code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class CliPrinter(object): <NEW_LINE> <INDENT> _prntr = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> if not CliPrinter._prntr: <NEW_LINE> <INDENT> CliPrinter.init() <NEW_LINE> <DEDENT> <DEDENT> def __getattribute__(self, name): <NEW_LINE> <INDENT> return getattr(CliPrinter._prntr, name) <NEW_LINE> <DEDENT> de...
Singleton-style factory class The python magic methods below forward dir/get/set calls onto the underlying _prntr object (as Python's Logger class).
62598faae5267d203ee6b887
class DomesticMelonOrder(AbstractMelonOrder): <NEW_LINE> <INDENT> def __init__(self, species, qty, tax=0.08): <NEW_LINE> <INDENT> self.tax = tax <NEW_LINE> return super(DomesticMelonOrder, self).__init__(species, qty, 'domestic')
A melon order within the USA.
62598faae5267d203ee6b888
class IncidentReportJSONType(Enum): <NEW_LINE> <INDENT> event = Event <NEW_LINE> number = int <NEW_LINE> created = DateTime <NEW_LINE> summary = Optional[str] <NEW_LINE> incidentNumber = Optional[int] <NEW_LINE> reportEntries = list[ReportEntry]
Incident report attribute types
62598faa435de62698e9bd74
class FreeSpiritPresentation(WithSpecialProps): <NEW_LINE> <INDENT> presenter = StrProp('Name of presenter') <NEW_LINE> favorite_color = ColorProp('Favorite color of presenter') <NEW_LINE> def summarize(self): <NEW_LINE> <INDENT> print('{name} loves {topic}.'.format( name=self.presenter, topic=self.favorite_color ))
class FreeSpiritPresentation This class contains info about basic free-spirit presentations
62598faa796e427e5384e711
class NoProjectConfigurationError(FailFastError, ExpectedError): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__("No project configuration file found. " "Please create a ddb.yml file in your project directory. " "It can be empty.") <NEW_LINE> <DEDENT> def log_error(self): <NEW_LINE> <INDENT...
Error that should be raised when a project configuration file is required for the command.
62598faa656771135c4895ff
class MaterialNode(ArmLogicVariableNodeMixin, ArmLogicTreeNode): <NEW_LINE> <INDENT> bl_idname = 'LNMaterialNode' <NEW_LINE> bl_label = 'Material' <NEW_LINE> arm_version = 1 <NEW_LINE> @property <NEW_LINE> def property0_get(self): <NEW_LINE> <INDENT> if self.property0 == None: <NEW_LINE> <INDENT> return '' <NEW_LINE> <...
Stores the given material as a variable.
62598faa851cf427c66b823b
class HarmonicRestraintBondForce(HarmonicRestraintForceMixIn, RadiallySymmetricBondRestraintForce): <NEW_LINE> <INDENT> pass
Impose a single harmonic restraint between two atoms. This is a version of ``HarmonicRestraintForce`` that can be used with OpenCL 32-bit platforms. It supports atom groups with only a single atom. Parameters ---------- spring_constant : openmm.unit.Quantity The spring constant K (see energy expression above) in ...
62598faa5fdd1c0f98e5df14
class User(): <NEW_LINE> <INDENT> def __init__(self, first, last, dob, address): <NEW_LINE> <INDENT> self.first = first <NEW_LINE> self.last = last <NEW_LINE> self.dob = dob <NEW_LINE> self.address = address <NEW_LINE> self.uid = uid_gen() <NEW_LINE> self.fpass = passwordgen() <NEW_LINE> self.password = '' <NEW_LINE> i...
The User Class instantiates an object for each user that is created.
62598faa1f037a2d8b9e406b
class CodeRedirectsTest(APITestCase): <NEW_LINE> <INDENT> def testBouwblokCode(self): <NEW_LINE> <INDENT> bbk = factories.BouwblokFactory.create(code='AN34') <NEW_LINE> res = self.client.get('/gebieden/bouwblok/AN34/') <NEW_LINE> bb_id = res.data['bouwblokidentificatie'] <NEW_LINE> self.assertEqual(bb_id, bbk.id) <NEW_...
Use code to find object
62598faad7e4931a7ef3c013
class SimpleRenderer: <NEW_LINE> <INDENT> def __init__(self, composer, show_bounds: bool = False): <NEW_LINE> <INDENT> self.dataset = QuickDrawDataset.words() <NEW_LINE> self.composer = composer <NEW_LINE> self.show_bounds = show_bounds <NEW_LINE> <DEDENT> def render(self, scene: 'drawtomat.model.scenegraph.Scene', sho...
A simple image renderer. Renders the scene using Pillow. Attributes ---------- composer composer which will be used during the rendering. show_bounds : bool if true, a bounding box will be rendered around each object.
62598faa4428ac0f6e6584a2
class Operation(object): <NEW_LINE> <INDENT> def __init__(self, uri, operation, http_client, models): <NEW_LINE> <INDENT> self._uri = uri <NEW_LINE> self._json = operation <NEW_LINE> self._http_client = http_client <NEW_LINE> self._models = models <NEW_LINE> self.__doc__ = create_operation_docstring(operation) <NEW_LIN...
Perform a request by taking the kwargs passed to the call and constructing an HTTP request.
62598faabaa26c4b54d4f230
class CustomThumbnailNode(ThumbnailNode): <NEW_LINE> <INDENT> error_message = ('Please enter sizes defined in settings') <NEW_LINE> def __init__(self, parser, token): <NEW_LINE> <INDENT> ThumbnailNode.__init__(self, parser, token) <NEW_LINE> bits = token.split_contents() <NEW_LINE> if len(bits) < 5 or bits[-2] != 'as':...
Extends ThumbnailNode to use thumbnail sizes from settings
62598faa2c8b7c6e89bd3744
class BaseDummyConverter(Converter): <NEW_LINE> <INDENT> TABLE = {} <NEW_LINE> def inner_convert_string(self, string): <NEW_LINE> <INDENT> for old, new in self.TABLE.items(): <NEW_LINE> <INDENT> string = string.replace(old, new) <NEW_LINE> <DEDENT> return self.pad(string) <NEW_LINE> <DEDENT> def pad(self, string): <NEW...
Base class for dummy converters. String conversion goes through a character map, then gets padded.
62598faa1b99ca400228f4ef
class Processor: <NEW_LINE> <INDENT> def __init__(self, text): <NEW_LINE> <INDENT> if type(text) is not str: <NEW_LINE> <INDENT> raise TextProcError("Processors require strings") <NEW_LINE> <DEDENT> self.text = text <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> return len(self.text) <NEW_LINE> <DEDENT> def...
Class for Processing Strings
62598faad6c5a102081e20c6
class GoodsImage(BaseModel): <NEW_LINE> <INDENT> sku = models.ForeignKey('GoodsSKU', on_delete=models.CASCADE, verbose_name='商品') <NEW_LINE> image = models.ImageField(upload_to='goods', verbose_name='图片路径') <NEW_LINE> class Meta: <NEW_LINE> <INDENT> db_table = 'df_goods_image' <NEW_LINE> verbose_name = '商品图片' <NEW_LINE...
商品图片模型
62598faa01c39578d7f12cfe
class EditSubForm(FlaskForm): <NEW_LINE> <INDENT> title = StringField(_l('Title'), validators=[DataRequired(), Length(min=2, max=128)]) <NEW_LINE> nsfw = BooleanField(_l('Sub is NSFW')) <NEW_LINE> restricted = BooleanField(_l('Only mods can post')) <NEW_LINE> usercanflair = BooleanField(_l('Allow users to flair their o...
Edit sub form.
62598faa0a50d4780f70535c
class AppEngineInstance(resource_class_factory('appengine_instance', 'name', hash_key=True)): <NEW_LINE> <INDENT> pass
The Resource implementation for AppEngine Instance.
62598faa44b2445a339b692f
class GetSampleInfo(object): <NEW_LINE> <INDENT> def on_post(self, req, resp): <NEW_LINE> <INDENT> data = req.params <NEW_LINE> samplename = data["sampleName"] <NEW_LINE> db = Mysql(table_name="GLORIA_MYSQL") <NEW_LINE> sql = """select * from sample_mx where S_MCODE = \"%s\";""" % samplename <NEW_LINE> data = db.fetch_...
根据样本的编写获得样本的其他信息
62598faa7d847024c075c342
class TaskOrderError(DependencyError): <NEW_LINE> <INDENT> pass
Indicates a task depends on data produced by another task in the same phase that is scheduled to runs after it.
62598faa97e22403b383ae8b
class Boolean(SchemaType): <NEW_LINE> <INDENT> def serialize(self, node, appstruct): <NEW_LINE> <INDENT> if appstruct is null: <NEW_LINE> <INDENT> return null <NEW_LINE> <DEDENT> return appstruct and 'true' or 'false' <NEW_LINE> <DEDENT> def deserialize(self, node, cstruct): <NEW_LINE> <INDENT> if cstruct is null: <NEW...
A type representing a boolean object. During deserialization, a value in the set (``false``, ``0``) will be considered ``False``. Anything else is considered ``True``. Case is ignored. Serialization will produce ``true`` or ``false`` based on the value. If the :attr:`colander.null` value is passed to the serialize ...
62598faaaad79263cf42e752
class CpwvcmplsexpbitsmodeEnum(Enum): <NEW_LINE> <INDENT> outerTunnel = 1 <NEW_LINE> specifiedValue = 2 <NEW_LINE> serviceDependant = 3 <NEW_LINE> @staticmethod <NEW_LINE> def _meta_info(): <NEW_LINE> <INDENT> from ydk.models.cisco_ios_xe._meta import _CISCO_IETF_PW_MPLS_MIB as meta <NEW_LINE> return meta._meta_table['...
CpwvcmplsexpbitsmodeEnum Set by the operator to indicate the way the VC shim label EXP bits are to be determined. The value of outerTunnel(1) is used where there is an outer tunnel \- cpwVcMplsMplsType is mplsTe or mplsNonTe. Note that in this case there is no need to mark the VC label with the EXP bits since...
62598faa38b623060ffa9017
@add_slots <NEW_LINE> @dataclass(frozen=True) <NEW_LINE> class Divide(BaseBinaryOp, _BaseOneTokenOp): <NEW_LINE> <INDENT> whitespace_before: BaseParenthesizableWhitespace = SimpleWhitespace.field(" ") <NEW_LINE> whitespace_after: BaseParenthesizableWhitespace = SimpleWhitespace.field(" ") <NEW_LINE> def _get_token(self...
A binary operator that can be used in a :class:`BinaryOperation` expression.
62598faa236d856c2adc93fc
class Rotation(models.Model): <NEW_LINE> <INDENT> name = models.CharField( unique=True, max_length=255, help_text='The rotation\'s name.' ) <NEW_LINE> description = models.TextField( help_text='A description of the rotation\'s purpose.' ) <NEW_LINE> message = models.TextField( help_text='A reminder message sent to memb...
Representation of a rotation.
62598faaeab8aa0e5d30bd0a
class Meta: <NEW_LINE> <INDENT> model = Subject <NEW_LINE> fields = ('id', 'title', 'slug')
Klasa Meta pozwala na wskazanie modelu przeznaczonego do serializacji, a także kolumn, które mają być uwzględnione w trakcie tego procesu.
62598faa5fc7496912d48242
class Schedule(models.Model): <NEW_LINE> <INDENT> summary = models.CharField('練習', max_length=1, default= '入力してください' ) <NEW_LINE> description = models.TextField('詳細な説明', blank=True) <NEW_LINE> start_time = models.TimeField('開始時間', default=datetime.time(7, 0, 0)) <NEW_LINE> end_time = models.TimeField('終了時間', default=da...
スケジュール
62598faa7047854f4633f358
class Vocabulary(object): <NEW_LINE> <INDENT> def __init__(self, fname): <NEW_LINE> <INDENT> with open(fname) as f: <NEW_LINE> <INDENT> lines = f.readlines() <NEW_LINE> <DEDENT> self._set = set() <NEW_LINE> self._list = ['' for i in range(len(lines))] <NEW_LINE> for l in lines: <NEW_LINE> <INDENT> if l: <NEW_LINE> <IND...
Vocabulary.
62598faa32920d7e50bc5fd4
class TicketServicePayload(object): <NEW_LINE> <INDENT> def update_ticket_payload(self, ticket_status="Accepted", update_description="Required one"): <NEW_LINE> <INDENT> payload = { "ticket_status": ticket_status, "update_description": update_description } <NEW_LINE> return payload
Class for Ticket Service Payloads
62598faae5267d203ee6b889
class CcDateDelegate(QStyledItemDelegate, UpdateEditorGeometry): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> QStyledItemDelegate.__init__(self, parent) <NEW_LINE> self.table_widget = parent <NEW_LINE> <DEDENT> def set_format(self, format): <NEW_LINE> <INDENT> if not format: <NEW_LINE> <INDENT> s...
Delegate for custom columns dates. Because this delegate stores the format as an instance variable, a new instance must be created for each column. This differs from all the other delegates.
62598faa7d847024c075c343
class JoinStrands_GraphicsMode( BreakOrJoinstrands_GraphicsMode ): <NEW_LINE> <INDENT> exit_command_on_leftUp = False <NEW_LINE> def leftDouble(self, event): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def leftUp(self, event): <NEW_LINE> <INDENT> _superclass_for_GM.leftUp(self, event) <NEW_LINE> if self.exit_command_o...
Graphics mode for Join strands command
62598faa435de62698e9bd75
class cancelActivityApply_args: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.I32, 'postId', None, None, ), ) <NEW_LINE> def __init__(self, postId=None,): <NEW_LINE> <INDENT> self.postId = postId <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAc...
Attributes: - postId
62598faaadb09d7d5dc0a50a
class TwiMasterSend(Request): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def compile(cls, addr, data, stop): <NEW_LINE> <INDENT> cls.assert_true(addr >= 0 and addr < 128, "slave address value must be in range [0..127]") <NEW_LINE> cls.assert_true(len(data) < 250, "data length can't be greater than 250 bytes") <NEW_LIN...
@brief TWI Master Send request packet compiler @see PATO_BRIDGE_CMD_TWI_MASTER_SEND
62598faa56b00c62f0fb2834
class MultiSchemaStorageManagerPg(multischema.MultiSchemaStorageManagerDB): <NEW_LINE> <INDENT> databaseclass = pypgsql.PyPgDatabase <NEW_LINE> def __init__(self, allOptions={}): <NEW_LINE> <INDENT> for atom in allOptions['connections.Connect'].split(" "): <NEW_LINE> <INDENT> k, v = atom.split("=", 1) <NEW_LINE> if k =...
StoreManager to save and retrieve multiple schemas via pyPgSQL.
62598faaa79ad16197769fe5
class Grid(object): <NEW_LINE> <INDENT> def __str__(self, *args, **kwargs): <NEW_LINE> <INDENT> retVal = "" <NEW_LINE> for row in range(1,10): <NEW_LINE> <INDENT> for column in range(1,10): <NEW_LINE> <INDENT> cell = self.getCell(row, column) <NEW_LINE> retVal = retVal + str(cell) + " : " <NEW_LINE> <DEDENT> retVal = r...
classdocs
62598faa6e29344779b005dc
class FrontToBackPacket( collections.namedtuple( 'FrontToBackPacket', ['operation_id', 'sequence_number', 'kind', 'name', 'subscription', 'trace_id', 'payload', 'timeout'])): <NEW_LINE> <INDENT> @enum.unique <NEW_LINE> class Kind(enum.Enum): <NEW_LINE> <INDENT> COMMENCEMENT = 'commencement' <NEW_LINE> CONTINUATION = 'c...
A sum type for all values sent from a front to a back. Attributes: operation_id: A unique-with-respect-to-equality hashable object identifying a particular operation. sequence_number: A zero-indexed integer sequence number identifying the packet's place among all the packets sent from front to back for thi...
62598faadd821e528d6d8eb5
class Projectile(Arme): <NEW_LINE> <INDENT> nom_type = "projectile" <NEW_LINE> def __init__(self, cle=""): <NEW_LINE> <INDENT> Arme.__init__(self, cle) <NEW_LINE> self.peut_depecer = False <NEW_LINE> self.emplacement = "" <NEW_LINE> self.positions = () <NEW_LINE> <DEDENT> def etendre_script(self): <NEW_LINE> <INDENT> e...
Type d'objet: projectile.
62598faa26068e7796d4c8d4
class ExampleSprite(RewardSprite): <NEW_LINE> <INDENT> def __init__(self, corner, position, character, index, n_unique): <NEW_LINE> <INDENT> super(ExampleEnvironment.ExampleSprite, self).__init__(corner, position, character, index, n_unique) <NEW_LINE> <DEDENT> def update(self, actions, board, layers, backdrop, things,...
Sprite representing player for Pycolab
62598faabaa26c4b54d4f232
class Solution: <NEW_LINE> <INDENT> def numDistinct(self, S, T): <NEW_LINE> <INDENT> nums_pre = [1 for x in range(len(S) + 1)] <NEW_LINE> nums = nums_pre.copy() <NEW_LINE> nums[0] = 0 <NEW_LINE> for i in range(len(T)): <NEW_LINE> <INDENT> for j in range(len(S)): <NEW_LINE> <INDENT> if T[i] == S[j]: <NEW_LINE> <INDENT> ...
@param: : A string @param: : A string @return: Count the number of distinct subsequences
62598faa67a9b606de545f4c
class XfieldNotFoundError(Exception): <NEW_LINE> <INDENT> pass
raise when xfield is not defined
62598faa090684286d59369c
class TaggedContentAdminMixin(object): <NEW_LINE> <INDENT> form = TaggedContentItemForm
When this is the first in the list of base classes for the admin class of a model that has tags it will ensure your 'tags' are filtered.
62598faa32920d7e50bc5fd5
class CollectionError(Exception): <NEW_LINE> <INDENT> def __init__(self,msg): <NEW_LINE> <INDENT> Exception.__init__(self,msg)
exception when Collection does not exist
62598faa097d151d1a2c0fa9
class FixedClass(type): <NEW_LINE> <INDENT> def __setattr__(cls, key, value): <NEW_LINE> <INDENT> if cls.fixed: <NEW_LINE> <INDENT> for line in traceback.format_stack()[:-2]: <NEW_LINE> <INDENT> print(line, end='') <NEW_LINE> <DEDENT> raise SystemExit('{cls}.{key} may not be changed'.format(cls=cls.__name__, key=key)) ...
Metaclass: after the class variable fixed is set to True, all class variables become immutable
62598faa0c0af96317c56303
class IBNResNeXtBottleneck(nn.Layer): <NEW_LINE> <INDENT> def __init__(self, in_channels, out_channels, strides, cardinality, bottleneck_width, conv1_ibn, data_format="channels_last", **kwargs): <NEW_LINE> <INDENT> super(IBNResNeXtBottleneck, self).__init__(**kwargs) <NEW_LINE> mid_channels = out_channels // 4 <NEW_LIN...
IBN-ResNeXt bottleneck block for residual path in IBN-ResNeXt unit. Parameters: ---------- in_channels : int Number of input channels. out_channels : int Number of output channels. strides : int or tuple/list of 2 int Strides of the convolution. cardinality: int Number of groups. bottleneck_width: int ...
62598faa76e4537e8c3ef52d
class AESCipher: <NEW_LINE> <INDENT> def __init__(self, key): <NEW_LINE> <INDENT> self.key = key <NEW_LINE> <DEDENT> def encrypt(self, raw, iv): <NEW_LINE> <INDENT> raw = pad(raw) <NEW_LINE> cipher = AES.new(self.key, AES.MODE_CBC, iv) <NEW_LINE> return cipher.encrypt(raw) <NEW_LINE> <DEDENT> def decrypt(self, enc, iv)...
Usage: c = AESCipher('password').encrypt('message') m = AESCipher('password').decrypt(c) Tested under Python 3 and PyCrypto 2.6.1.
62598faa627d3e7fe0e06e2d
class Node(object): <NEW_LINE> <INDENT> default = 'DEFAULT' <NEW_LINE> def __init__(self, children=None, connector=None, negated=False): <NEW_LINE> <INDENT> self.children = children and children[:] or [] <NEW_LINE> self.connector = connector or self.default <NEW_LINE> self.negated = negated <NEW_LINE> <DEDENT> def _new...
A single internal node in the tree graph. A Node should be viewed as a connection (the root) with the children being either leaf nodes or other Node instances.
62598faafff4ab517ebcd765
class Shape(): <NEW_LINE> <INDENT> ERASED = 0 <NEW_LINE> DRAWN = 1 <NEW_LINE> def __init__(self, xpos = 0, ypos = 0, ): <NEW_LINE> <INDENT> self.set_xpos(xpos) <NEW_LINE> self.set_ypos(ypos) <NEW_LINE> self._gstate = Shape.ERASED <NEW_LINE> <DEDENT> def draw(self): <NEW_LINE> <INDENT> if self._gstate != Shape.DRAWN: <N...
Shape base class for simulation framework The visualization of the simulation uses shapes moving about on the canvas panel. Each shape is a collection of artifacts on the graphics canvas that are manipulated as a whole. The canvas has the coordinate system of the top right quadrant of the Cartesian plane. (0,0) is t...
62598faa4e4d5625663723a6
class ParameterBehaviour(Function.Param.Behaviour): <NEW_LINE> <INDENT> class ParameterUsageInfo: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.params_used: List[Function.Param] = [] <NEW_LINE> self.pre_decl_scopes: List = [] <NEW_LINE> self.post_decl_scopes: List = [] <NEW_LINE> self.pools = [] <NEW...
Trigger for a function parameter NOTE: unlike regular behaviours, this behaviour returns a ParameterUsageInfo. ParameterBehaviour object should not be used as a regular behaviour, since ParameterUsageInfo is not a Swimporting.
62598faa236d856c2adc93fd
class Runner(RunnerClient): <NEW_LINE> <INDENT> def _print_docs(self): <NEW_LINE> <INDENT> ret = super(Runner, self).get_docs() <NEW_LINE> for fun in sorted(ret): <NEW_LINE> <INDENT> print("{0}:\n{1}\n".format(fun, ret[fun])) <NEW_LINE> <DEDENT> <DEDENT> def run(self): <NEW_LINE> <INDENT> if self.opts.get('doc', False)...
Execute the salt runner interface
62598faa7b25080760ed742e
class TheHiveSearchCaseObservableRequestCallback(TheHiveApiRequestCallback): <NEW_LINE> <INDENT> def on_request(self, request): <NEW_LINE> <INDENT> super(TheHiveSearchCaseObservableRequestCallback, self).on_request(request) <NEW_LINE> self._thehive_client.post(request, "/api/case/artifact/_search")
Request callback used to invoke TheHive REST API for case/observable/search DXL requests.
62598faae76e3b2f99fd89b7
class AlexaEntity: <NEW_LINE> <INDENT> def __init__(self, hass, config, entity): <NEW_LINE> <INDENT> self.hass = hass <NEW_LINE> self.config = config <NEW_LINE> self.entity = entity <NEW_LINE> self.entity_conf = config.entity_config.get(entity.entity_id, {}) <NEW_LINE> <DEDENT> @property <NEW_LINE> def entity_id(self):...
An adaptation of an entity, expressed in Alexa's terms. The API handlers should manipulate entities only through this interface.
62598faa4428ac0f6e6584a5
class SVN(source.SVN): <NEW_LINE> <INDENT> def __init__(self, reponame, allow_patch=True, *args, **kwargs): <NEW_LINE> <INDENT> source.SVN.__init__(self, *args, **kwargs) <NEW_LINE> self.reponame = reponame <NEW_LINE> self.allow_patch = allow_patch <NEW_LINE> <DEDENT> def describe(self, done=False): <NEW_LINE> <INDENT>...
An SVN source that ties changes directory with the configured repository name for use with RepoChangeScheduler and our SVNPoller.
62598faa5fc7496912d48243
class InotifyDiskCollectorThread(ExceptionalThread, FileSystemEventHandler): <NEW_LINE> <INDENT> INTERESTING_EVENTS = (FileCreatedEvent, FileDeletedEvent, FileModifiedEvent, FileMovedEvent) <NEW_LINE> COLLECTION_INTERVAL = Amount(5, Time.SECONDS) <NEW_LINE> def __init__(self, path): <NEW_LINE> <INDENT> self._path = pat...
Thread to calculate aggregate disk usage under a given path Note that while this thread uses inotify (through the watchdog module) to monitor disk events in "real time", the actual processing of events is only performed periodically (configured via COLLECTION_INTERVAL)
62598faacb5e8a47e493c139
class unique(GeneralFunction): <NEW_LINE> <INDENT> def __init__(self,col): <NEW_LINE> <INDENT> self.fargs = [col]
Return only the unique values from a scalar.
62598faa7c178a314d78d41e
class PortConnectionError(Exception): <NEW_LINE> <INDENT> pass
Raised in case of attemp of connecting two output ports
62598faa3317a56b869be50b
class SufficientError(Exception): <NEW_LINE> <INDENT> pass
Stop when we've reached the test point
62598faa4f6381625f19947f
class View: <NEW_LINE> <INDENT> def __init__(self, controller): <NEW_LINE> <INDENT> self._controller = controller <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> raise NotImplementedError()
Abstract class representing the view of a puzzle game. Responsible for displaying state to the user and interpreting user input.
62598faae5267d203ee6b88c
class LogGaussian(Prior): <NEW_LINE> <INDENT> def __init__(self, mean: ndarray, cov: ndarray): <NEW_LINE> <INDENT> self.mean = mean <NEW_LINE> self.covariance = cov <NEW_LINE> self.precision = np.linalg.inv(cov) <NEW_LINE> self._dimensions = np.size(mean) <NEW_LINE> self._multivariate_normal = scipy.stats.multivariate_...
Multivariate Log-Gaussian Prior Addition by Xingchen Wan | 2018
62598faa7d847024c075c345
class ISpeciesFolder(IIngestableFolder): <NEW_LINE> <INDENT> pass
Folder containing species.
62598faa435de62698e9bd77
class WTimeoutError(TimeoutError): <NEW_LINE> <INDENT> pass
Raised when a database operation times out (i.e. wtimeout expires) before replication completes. With newer versions of MongoDB the `error_document` attribute may include write concern fields like 'n', 'updatedExisting', or 'writtenTo'. .. versionadded:: 2.7
62598faa5fdd1c0f98e5df18
class FuncionesVitalesForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = FuncionesVitales <NEW_LINE> exclude = ('consulta',) <NEW_LINE> widgets = { 'frecuencia_cardiaca': forms.TextInput(attrs={'class': 'form-control', 'required':'true', 'placeholder': 'Ingrese frecuencia cardiaca'}), 'f...
Class FuncionesVitalesForm.
62598faa91af0d3eaad39d92
class HelixProtocol: <NEW_LINE> <INDENT> def __init__(self, con, user, password): <NEW_LINE> <INDENT> self.con = con <NEW_LINE> self.user = user <NEW_LINE> self.password = password <NEW_LINE> self.state = None <NEW_LINE> self.state = HandshakeAwaitingState(None, self) <NEW_LINE> <DEDENT> def on_receive(self, msg): <NEW...
Simple state machine for protocol to IoT Control Center adapter. States and messages: handshake_awaiting =================================================== <-- connection_request handshake_responded =================================================== --> connection_response <-- connection_verified handshake_verifie...
62598faaa79ad16197769fe7
class V1HTTPGetAction(object): <NEW_LINE> <INDENT> def __init__(self, path=None, http_headers=None, host=None, scheme=None, port=None): <NEW_LINE> <INDENT> self.swagger_types = { 'path': 'str', 'http_headers': 'list[V1HTTPHeader]', 'host': 'str', 'scheme': 'str', 'port': 'str' } <NEW_LINE> self.attribute_map = { 'path'...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598faabe383301e025377b
class RecipeSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> ingredients = serializers.PrimaryKeyRelatedField( many=True, queryset=Ingredient.objects.all() ) <NEW_LINE> tags = serializers.PrimaryKeyRelatedField( many=True, queryset=Tag.objects.all() ) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Recip...
"Serialize a recipe
62598faa1f037a2d8b9e406f
class FileSystemTarget(Target): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> <DEDENT> @abc.abstractproperty <NEW_LINE> def fs(self): <NEW_LINE> <INDENT> raise <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def open(self, mode): <NEW_LINE> <INDENT> pass <NEW_LINE> <DE...
Base class for FileSystem Targets like :class:`~luigi.file.LocalTarget` and :class:`~luigi.hdfs.HdfsTarget`. A FileSystemTarget has an associated :py:class:`FileSystem` to which certain operations can be delegated. By default, :py:meth:`exists` and :py:meth:`remove` are delegated to the :py:class:`FileSystem`, which i...
62598faab7558d58954635ab
class LinuxARMThumbStack(LinuxARMThumb): <NEW_LINE> <INDENT> data_finalizer = _stack_data_finalizer
An environment that targets a 32-bit Linux ARM machine using the Thumb instruction set that allocates the required data on the stack.
62598faabaa26c4b54d4f234
class AgentEvent(BaseEnum): <NEW_LINE> <INDENT> GO_POWER_UP = 'AGENT_EVENT_GO_POWER_DOWN' <NEW_LINE> GO_POWER_DOWN = 'AGENT_EVENT_GO_POWER_UP' <NEW_LINE> INITIALIZE = 'AGENT_EVENT_INITIALIZE' <NEW_LINE> RESET = 'AGENT_EVENT_RESET' <NEW_LINE> GO_ACTIVE = 'AGENT_EVENT_GO_ACTIVE' <NEW_LINE> GO_INACTIVE = 'AGENT_EVENT_GO_I...
Common agent event enum.
62598faaa8370b77170f035d
class RegistrationManager(models.Manager): <NEW_LINE> <INDENT> def activate_user(self, activation_key): <NEW_LINE> <INDENT> if SHA1_RE.search(activation_key): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> profile = self.get(activation_key=activation_key) <NEW_LINE> <DEDENT> except self.model.DoesNotExist: <NEW_LINE> <IN...
Custom manager for the ``RegistrationProfile`` model. The methods defined here provide shortcuts for account creation and activation (including generation and emailing of activation keys), and for cleaning out expired inactive accounts.
62598faa57b8e32f525080dc
class CustomerCertificateParameters(SecretParameters): <NEW_LINE> <INDENT> _validation = { 'type': {'required': True}, 'secret_source': {'required': True}, } <NEW_LINE> _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'secret_source': {'key': 'secretSource', 'type': 'ResourceReference'}, 'secret_version': {'k...
Customer Certificate used for https. All required parameters must be populated in order to send to Azure. :param type: Required. The type of the Secret to create.Constant filled by server. Possible values include: "UrlSigningKey", "CustomerCertificate", "ManagedCertificate". :type type: str or ~azure.mgmt.cdn.model...
62598faa5166f23b2e24335a
class Value(models.Model): <NEW_LINE> <INDENT> attribute = models.ForeignKey( Attribute, related_name='values', db_index=True, on_delete=models.PROTECT ) <NEW_LINE> value = models.CharField( max_length=255, null=False, blank=True, db_index=True ) <NEW_LINE> resource = models.ForeignKey( 'Resource', related_name='attrib...
Represents a value for an attribute attached to a Resource.
62598faa01c39578d7f12d02
class WorkspaceLookupError(ProKnowError): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> super(WorkspaceLookupError, self).__init__(message) <NEW_LINE> self.message = message <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return 'WorkspaceLookupError({!r})'.format(self.message) <NEW_L...
Indicates that there was a problem looking up the workspace by the given identifier. Attributes: message (str): An explanation of the error.
62598faa627d3e7fe0e06e2f
class LSTMSequenceEncoder(PyTextSeq2SeqModule): <NEW_LINE> <INDENT> class Config(ConfigBase): <NEW_LINE> <INDENT> embed_dim: int = 512 <NEW_LINE> hidden_dim: int = 512 <NEW_LINE> num_layers: int = 1 <NEW_LINE> dropout_in: float = 0.1 <NEW_LINE> dropout_out: float = 0.1 <NEW_LINE> bidirectional: bool = False <NEW_LINE> ...
RNN encoder using nn.LSTM for cuDNN support / ONNX exportability.
62598faafff4ab517ebcd767
class Resource(Model): <NEW_LINE> <INDENT> def __init__(self, resource_id, project_id, first_sample_timestamp, last_sample_timestamp, source, user_id, metadata, meter): <NEW_LINE> <INDENT> Model.__init__(self, resource_id=resource_id, first_sample_timestamp=first_sample_timestamp, last_sample_timestamp=last_sample_time...
Something for which sample data has been collected.
62598faa379a373c97d98f95
class GameObject(ABC): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._pos_x = 0 <NEW_LINE> self._pos_y = 0 <NEW_LINE> self._width = 1 <NEW_LINE> self._height = 1 <NEW_LINE> self.housekeeping = GameObjectHouseKeeping() <NEW_LINE> <DEDENT> @property <NEW_LINE> def size(self): <NEW_LINE> <INDENT> return...
Represents one "thing" in a game.
62598faa92d797404e388b26
class OpportunityViewSet(viewsets.ReadOnlyModelViewSet): <NEW_LINE> <INDENT> renderer_classes = ( rest_framework.renderers.JSONRenderer, rest_framework.renderers.BrowsableAPIRenderer, PaginatedCSVRenderer, ) <NEW_LINE> pagination_class = LargeResultsSetPagination <NEW_LINE> queryset = Opportunity.objects.all().filter(p...
API endpoint that allows users to be viewed or edited.
62598faad486a94d0ba2bf51
class PISOutr(models.AbstractModel): <NEW_LINE> <INDENT> _description = textwrap.dedent(" %s" % (__doc__,)) <NEW_LINE> _name = 'nfe.40.pisoutr' <NEW_LINE> _inherit = 'spec.mixin.nfe' <NEW_LINE> _generateds_type = 'PISOutrType' <NEW_LINE> _concrete_rec_name = 'nfe40_CST' <NEW_LINE> nfe40_choice13 = fields.Selection([...
Código de Situação Tributária do PIS. 99 - Outras Operações.
62598faa460517430c43201e
class MountPoint(NamedObject): <NEW_LINE> <INDENT> def __init__(self, parent, name): <NEW_LINE> <INDENT> super().__init__(parent, FwObt.MountPoint, name) <NEW_LINE> <DEDENT> def pathsep(self): <NEW_LINE> <INDENT> return '/'
Mount point object
62598faaaad79263cf42e757
class RetinaNetLoss(tf.losses.Loss): <NEW_LINE> <INDENT> def __init__(self, num_classes=80, alpha=0.25, gamma=2.0, delta=1.0): <NEW_LINE> <INDENT> super(RetinaNetLoss, self).__init__(reduction="auto", name="RetinaNetLoss") <NEW_LINE> self._clf_loss = RetinaNetClassificationLoss(alpha, gamma) <NEW_LINE> self._box_loss =...
Wrapper to combine both the losses
62598faa2ae34c7f260ab065
class MultipartWriter(object): <NEW_LINE> <INDENT> part_writer_cls = BodyPartWriter <NEW_LINE> def __init__(self, subtype='mixed', boundary=None): <NEW_LINE> <INDENT> boundary = boundary if boundary is not None else uuid.uuid4().hex <NEW_LINE> try: <NEW_LINE> <INDENT> boundary.encode('us-ascii') <NEW_LINE> <DEDENT> exc...
Multipart body writer.
62598faa21bff66bcd722bea
@register_task("nli-alt", rel_path="NLI-Prob/") <NEW_LINE> class NLITypeProbingAltTask(NLITypeProbingTask): <NEW_LINE> <INDENT> def __init__(self, path, max_seq_len, name, probe_path="", **kw): <NEW_LINE> <INDENT> super(NLITypeProbingAltTask, self).__init__( name=name, path=path, max_seq_len=max_seq_len, **kw ) <NEW_LI...
Task class for Alt Probing Task (NLI-type), NLITypeProbingTask with different indices
62598faae5267d203ee6b88e
class ProtoService(ProtoNode): <NEW_LINE> <INDENT> def __init__(self, name: str): <NEW_LINE> <INDENT> super().__init__(name) <NEW_LINE> self._methods: List['ProtoServiceMethod'] = [] <NEW_LINE> <DEDENT> def type(self) -> ProtoNode.Type: <NEW_LINE> <INDENT> return ProtoNode.Type.SERVICE <NEW_LINE> <DEDENT> def methods(s...
Representation of a service in a .proto file.
62598faaadb09d7d5dc0a50e
class Params(object): <NEW_LINE> <INDENT> def __init__(self, params): <NEW_LINE> <INDENT> if isinstance(params, dict): <NEW_LINE> <INDENT> params = [params] <NEW_LINE> <DEDENT> self.params = params <NEW_LINE> <DEDENT> def names(self): <NEW_LINE> <INDENT> return [p['name'].encode('ascii') for p in self.params] <NEW_LINE...
Store simple parameters or lists of parameters. Assumes parameters are either a dictionary or a list of dictionaries, where each dictionary has a "name" field with a string, a "value" field, and potentially other optional fields. Attributes ---------- params : list of dicts List of dictionaries each containing a ...
62598faa7d847024c075c347
class ServiceTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def test_service_trait_type(self): <NEW_LINE> <INDENT> class Foo(HasTraits): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> class PluginA(Plugin): <NEW_LINE> <INDENT> id = "A" <NEW_LINE> foo = Instance(Foo, (), service=True) <NEW_LINE> <DEDENT> class PluginB(P...
Tests for the 'Service' trait type.
62598faa435de62698e9bd7a
class RocAucEvaluation(Callback): <NEW_LINE> <INDENT> def __init__(self, validation_data=(), interval=1, model_path=None, config_path=None, frozen=False, was_frozen=True, get_embeddings=None, do_prime=False): <NEW_LINE> <INDENT> super(Callback, self).__init__() <NEW_LINE> print('validation_data=%s interval=%s, model_pa...
ROC AUC for CV in Keras see for details: https://gist.github.com/smly/d29d079100f8d81b905e
62598faa851cf427c66b8240
class Card_infos(): <NEW_LINE> <INDENT> def __init__(self, name, family, description, type, effect, image_path): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.family = family <NEW_LINE> self.description = description <NEW_LINE> self.type = type <NEW_LINE> self.effect = effect <NEW_LINE> self.image_path = image_p...
Standard of basic informations about a card.
62598faa85dfad0860cbfa36
class fio(test.test): <NEW_LINE> <INDENT> version = 3 <NEW_LINE> def initialize(self): <NEW_LINE> <INDENT> self.job.require_gcc() <NEW_LINE> <DEDENT> def setup(self, tarball='fio-2.99.tar.bz2'): <NEW_LINE> <INDENT> tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) <NEW_LINE> utils.extract_tarball_to_dir(tarb...
fio is an I/O tool mean for benchmark and stress/hardware verification. @see: http://freecode.com/projects/fio
62598faa4428ac0f6e6584a8
class IsCreator(permissions.BasePermission): <NEW_LINE> <INDENT> def has_object_permission(self, request, view, object): <NEW_LINE> <INDENT> return request.user.pk == object.creator.pk
Object-level permission fo only allow creators of an object to operate on it.
62598faa45492302aabfc455
class BDDDescriptor(object): <NEW_LINE> <INDENT> def __init__(self, wrapped): <NEW_LINE> <INDENT> self.wrapped = wrapped <NEW_LINE> <DEDENT> def __get__(self, instance, owner): <NEW_LINE> <INDENT> if not instance: <NEW_LINE> <INDENT> return self.__class__ <NEW_LINE> <DEDENT> self.instance = instance <NEW_LINE> self.own...
base for @given, @when, @then, @should, and any other stages of testing
62598faa167d2b6e312b6ef5
class FileStorage(): <NEW_LINE> <INDENT> __file_path = "file.json" <NEW_LINE> __objects = {} <NEW_LINE> def all(self): <NEW_LINE> <INDENT> return (self.__objects) <NEW_LINE> <DEDENT> def new(self, obj): <NEW_LINE> <INDENT> if obj: <NEW_LINE> <INDENT> var_id = "{}.{}".format(type(obj).__name__, obj.id) <NEW_LINE> self._...
FileStorage Class
62598faad268445f26639b45
class GeographicViewServiceStub(object): <NEW_LINE> <INDENT> def __init__(self, channel): <NEW_LINE> <INDENT> self.GetGeographicView = channel.unary_unary( '/google.ads.googleads.v2.services.GeographicViewService/GetGeographicView', request_serializer=google_dot_ads_dot_googleads__v2_dot_proto_dot_services_dot_geograph...
Proto file describing the GeographicViewService. Service to manage geographic views.
62598faa10dbd63aa1c70b37
class ServerError(ReppyException): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.status = kwargs.get('status') <NEW_LINE> if self.status is None and len(args) >= 2: <NEW_LINE> <INDENT> self.status = args[1] <NEW_LINE> <DEDENT> ReppyException.__init__(self, *args, **kwargs)
When the remote server returns an error
62598faa66673b3332c3034f
class RegressionConvergenceRate(GlobalConvergenceRate): <NEW_LINE> <INDENT> label = "{var}: p={slope:4.3f}, cor={rvalue:4.3f}" <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(RegressionConvergenceRate, self).__init__(*args, **kwargs) <NEW_LINE> self.fits = {} <NEW_LINE> for varname in self.nor...
A class which performs a convergence analysis using linear regression. When initialized with a :class:`Study` instance, the :class:`RegressionConvergenceRate` performs a convergence analysis based on the error ansatz .. math:: \epsilon = A h^p by applying linear regression to the logarithm of the errors and delta...
62598faa7d847024c075c348
class MultipleSession(Unauthorized): <NEW_LINE> <INDENT> pass
[401] Unauthorized (ut) - multiple session.
62598faa379a373c97d98f97
class TrayPower(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swagger_types = { 'tray_id': 'int', 'number_of_power_supplies': 'int', 'input_power': 'list[int]' } <NEW_LINE> self.attribute_map = { 'tray_id': 'trayID', 'number_of_power_supplies': 'numberOfPowerSupplies', 'input_power': 'inputP...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598faaaad79263cf42e758
class WeblinkCheckerRobot(SingleSiteBot, ExistingPageBot): <NEW_LINE> <INDENT> killing = False <NEW_LINE> def __init__(self, generator, HTTPignore=None, day=7, site=True): <NEW_LINE> <INDENT> super(WeblinkCheckerRobot, self).__init__( generator=generator, site=site) <NEW_LINE> if config.report_dead_links_on_talk: <NEW_...
Bot which will search for dead weblinks. It uses several LinkCheckThreads at once to process pages from generator.
62598faa236d856c2adc93ff
class MessageTypes(object): <NEW_LINE> <INDENT> RCON_AUTHENTICATE = 3 <NEW_LINE> RCON_AUTH_RESPONSE = 2 <NEW_LINE> RCON_EXEC_COMMAND = 2 <NEW_LINE> RCON_EXEC_RESPONSE = 0
Message types used by the RCON API. Only used when sending data at the moment, but could be used to verify the types of incoming data.
62598faa4e4d5625663723aa
class CustomUser(AbstractBaseUser, PermissionsMixin): <NEW_LINE> <INDENT> username = models.CharField(_('username'), max_length=254, unique=True) <NEW_LINE> email = models.EmailField(_('email field'), max_length=254) <NEW_LINE> first_name = models.CharField(_('first name'), max_length=30, blank=True) <NEW_LINE> last_na...
A fully featured User model with admin-compliant permissions that uses a full-length email field as the username. Email and password are required. Other fields are optional.
62598faacc0a2c111447af95
class Group(object): <NEW_LINE> <INDENT> def __init__(self, name, alias=DEFAULT_CHANNEL_BACKEND, channel_backend=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> if channel_backend: <NEW_LINE> <INDENT> self.channel_backend = channel_backend <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.channel_backend = chan...
A group of channels that can be messaged at once, and that expire out of the group after an expiry time (keep re-adding to keep them in).
62598faae76e3b2f99fd89bb
class TestUpdateUserRequest(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 testUpdateUserRequest(self): <NEW_LINE> <INDENT> pass
UpdateUserRequest unit test stubs
62598faa4428ac0f6e6584a9
@parsleyfy <NEW_LINE> class MessageCreation(models.ModelForm): <NEW_LINE> <INDENT> model = Message <NEW_LINE> title = fields.CharField(min_length=1) <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(MessageCreation, self).__init__(*args, **kwargs) <NEW_LINE> self.helper = FormHelper() <NEW_LINE>...
Name: MessageCreation Message Creation form based on the model Message
62598faacb5e8a47e493c13b
class RemoteFunctionCallError(Exception): <NEW_LINE> <INDENT> def __init__(self, message, child_exception=None): <NEW_LINE> <INDENT> super().__init__(message) <NEW_LINE> if child_exception is not None: <NEW_LINE> <INDENT> if issubclass(child_exception.__class__, Exception): <NEW_LINE> <INDENT> from ._function import ex...
This exception is called if there is a remote function call error that could not be auto-converted to anything else. If a child exception occurred remotely, then this is packaged safely into this exception
62598faa8e71fb1e983bba38
class Comparison(models.Model): <NEW_LINE> <INDENT> submission_a = models.ForeignKey(Submission, on_delete=models.CASCADE, related_name="+") <NEW_LINE> submission_b = models.ForeignKey(Submission, on_delete=models.CASCADE, related_name="+", blank=True, null=True) <NEW_LINE> similarity = models.FloatField(default=None, ...
Comparison of two submissions, with a resulting similarity score. When submission_b is null, the Comparison contains the result from comparison submission_a to an exercise template.
62598faa7047854f4633f35f