code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class _EndpointDiscoveryRetryPolicy(object): <NEW_LINE> <INDENT> Max_retry_attempt_count = 120 <NEW_LINE> Retry_after_in_milliseconds = 1000 <NEW_LINE> FORBIDDEN_STATUS_CODE = 403 <NEW_LINE> WRITE_FORBIDDEN_SUB_STATUS_CODE = 3 <NEW_LINE> def __init__(self, global_endpoint_manager): <NEW_LINE> <INDENT> self.global_endpo...
The endpoint discovery retry policy class used for geo-replicated database accounts to handle the write forbidden exceptions due to writable/readable location changes (say, after a failover).
62598fdb3617ad0b5ee066ff
class XenPlatformAccountType(Enum): <NEW_LINE> <INDENT> MANAGED = "MANAGED" <NEW_LINE> OWNED = "OWNED"
Account type for xenPlatform
62598fdb099cdd3c636756ba
class MastodonFollowingExtractor(MastodonExtractor): <NEW_LINE> <INDENT> subcategory = "following" <NEW_LINE> pattern = BASE_PATTERN + r"/users/([^/?#]+)/following" <NEW_LINE> test = ( ("https://mastodon.social/users/0x4f/following", { "extractor": False, "count": ">= 20", }), ("https://mastodon.social/users/id:10843/f...
Extractor for followed mastodon users
62598fdb656771135c489c2a
class RecordThread(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, pad_object): <NEW_LINE> <INDENT> threading.Thread.__init__(self) <NEW_LINE> self.pad = pad_object <NEW_LINE> self.name = "Pad {} RecordThread".format(self.pad.number) <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> frames = [] <NEW_LINE...
Spawns a new thread to open an input stream and saves input to Pad.file Runs until pad.armed is set to False Records by to a pad by opening the Pad's pyAdudio port and saving to Pad.file
62598fdb26238365f5fad11d
class MyFavOrgView(LoginRequiredMixin,View): <NEW_LINE> <INDENT> def get(self,request): <NEW_LINE> <INDENT> user = request.user <NEW_LINE> fav_orgs = UserFavorite.objects.filter(user=user,fav_type=2) <NEW_LINE> org_list = [] <NEW_LINE> for fav_org in fav_orgs: <NEW_LINE> <INDENT> fav_id = fav_org.fav_id <NEW_LINE> org...
个人中心:我的收藏,收藏机构
62598fdbad47b63b2c5a7e0e
class SiteBasedHelpdeskUserPermissionsJson(object): <NEW_LINE> <INDENT> swagger_types = { 'permissions': 'list[SiteBasedHelpdeskUserPermissionJson]', 'group_not_found': 'bool', 'naming_error': 'bool' } <NEW_LINE> attribute_map = { 'permissions': 'permissions', 'group_not_found': 'groupNotFound', 'naming_error': 'naming...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fdb187af65679d29ed1
class DataProcessor(object): <NEW_LINE> <INDENT> def __init__(self, use_spm, do_lower_case): <NEW_LINE> <INDENT> super(DataProcessor, self).__init__() <NEW_LINE> self.use_spm = use_spm <NEW_LINE> self.do_lower_case = do_lower_case <NEW_LINE> <DEDENT> def get_train_examples(self, data_dir): <NEW_LINE> <INDENT> raise Not...
Base class for data converters for sequence classification data sets.
62598fdbc4546d3d9def7561
class AsyncInit(type): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> async def init(obj, *args, **kwargs): <NEW_LINE> <INDENT> await obj.__ainit__(*args, **kwargs) <NEW_LINE> return obj <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def new(mcs, cls, *args, **kwargs): <NEW_LINE> <INDENT> obj = cls.__cnew__(cls) <NEW_LINE> ...
Metaclass to support asynchronous __init__ (replaced with __ainit__)
62598fdb3617ad0b5ee06703
class BaseFairseqModel(nn.Module): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._is_generation_fast = False <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def add_args(parser): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def build_model(cls, args,...
Base class for fairseq models.
62598fdb656771135c489c2e
class Casa(): <NEW_LINE> <INDENT> def __init__(self, tabuleiro, posicao): <NEW_LINE> <INDENT> self.tabuleiro, self.posicao = tabuleiro, posicao <NEW_LINE> self.pino = None <NEW_LINE> <DEDENT> def joga(self, tipo): <NEW_LINE> <INDENT> self.pino = Pino(tipo, self) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDEN...
Local onde se pode colocar um pino. :param tabuleiro: a referencia do tabuleiro. :param posicao: Uma tupla com a ordem da coluna e da linha.
62598fdbab23a570cc2d504c
class somsc: <NEW_LINE> <INDENT> def __init__(self, data, amount_clusters, epouch = 100, ccore = True): <NEW_LINE> <INDENT> self.__data_pointer = data; <NEW_LINE> self.__amount_clusters = amount_clusters; <NEW_LINE> self.__epouch = epouch; <NEW_LINE> self.__ccore = ccore; <NEW_LINE> self.__network = None; <NEW_LINE> <D...
! @brief Class represents simple clustering algorithm based on self-organized feature map. @details This algorithm uses amount of clusters that should be allocated as a size of SOM map. Captured objects by neurons are clusters. Algorithm is able to process data with Gaussian distribution that has spherical fo...
62598fdbab23a570cc2d504d
class QubesNoSuchPropertyError(QubesException, AttributeError): <NEW_LINE> <INDENT> def __init__(self, holder, prop_name, msg=None): <NEW_LINE> <INDENT> super(QubesNoSuchPropertyError, self).__init__( msg or 'Invalid property {!r} of {!s}'.format( prop_name, holder)) <NEW_LINE> self.holder = holder <NEW_LINE> self.prop...
Requested property does not exist
62598fdbfbf16365ca79467f
@dataclass(frozen=True) <NEW_LINE> class Tag(Base): <NEW_LINE> <INDENT> label: str <NEW_LINE> id: int
User-applied metadata. Attribute of Series.
62598fdbad47b63b2c5a7e13
class BindPluginRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.PluginInstanceList = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("PluginInstanceList") is not None: <NEW_LINE> <INDENT> self.PluginInstanceList = [] <NEW_LINE> for item...
BindPlugin请求参数结构体
62598fdbab23a570cc2d504e
class Receiver(ABC): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def receive(self, transportable): <NEW_LINE> <INDENT> pass
Anything that can receive a transportable object e.g. a pipe
62598fdbd8ef3951e32c813c
@ns.response(200, "Success") <NEW_LINE> @ns.response(401, "Not logged in") <NEW_LINE> @ns.response(403, "Not authorized") <NEW_LINE> @ns.response(404, "User not found") <NEW_LINE> @ns.route("/<string:user_id>/export") <NEW_LINE> class UserDataExport(Resource): <NEW_LINE> <INDENT> @require_admin <NEW_LINE> def get(self,...
Export all data of a given user.
62598fdbc4546d3d9def7564
class ResPartnerBank(orm.Model, BankCommon): <NEW_LINE> <INDENT> _inherit = 'res.partner.bank' <NEW_LINE> _columns = { 'name': fields.char('Description', size=128, required=True), 'bvr_adherent_num': fields.char('Bank BVR adherent number', size=11, help=("Your Bank adherent number to be printed in references of your BV...
Inherit res.partner.bank class in order to add swiss specific fields and state controls
62598fdb4c3428357761a86f
class TestFunction2(TestFunction): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.y0 = 1 <NEW_LINE> <DEDENT> def evaluate(self, t, y): <NEW_LINE> <INDENT> return y + t <NEW_LINE> <DEDENT> def exact(self, t): <NEW_LINE> <INDENT> return -1 + 2*np.exp(t) - t
y' = y + t y(0) = 1 y(t) = -1 + 2 e^t - t
62598fdbab23a570cc2d504f
class RPLidarProcessor(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, rplidar): <NEW_LINE> <INDENT> logging.debug("Initializing rplidar_processor thread.") <NEW_LINE> threading.Thread.__init__(self) <NEW_LINE> self.name = "rplidar_processor" <NEW_LINE> self.rplidar = rplidar <NEW_LINE> self.serial_port = rpl...
A thread for processing data from rplidar_monitor
62598fdc283ffb24f3cf3e47
class IsAdminUser(BasePermission): <NEW_LINE> <INDENT> def has_permission(self, request): <NEW_LINE> <INDENT> return request.user and request.user.is_staff
Allows access only to admin users.
62598fdc091ae356687051e2
class SubRows(object): <NEW_LINE> <INDENT> def __init__(self, numCols): <NEW_LINE> <INDENT> self.numCols = numCols <NEW_LINE> self.rows = [] <NEW_LINE> <DEDENT> def addRow(self, row): <NEW_LINE> <INDENT> assert(len(row) == self.numCols) <NEW_LINE> self.rows.append(row) <NEW_LINE> <DEDENT> def getNumRows(self): <NEW_LIN...
Object used to specify a set of sub-rows. Indicates number of columns occupied, which is need for laying out.
62598fdc4c3428357761a873
class c12(nn.Module): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(c12, self).__init__() <NEW_LINE> self.conv1 = nn.Conv2d(3, 64, 3, padding=1) <NEW_LINE> self.conv2 = nn.Conv2d(64, 64, 3, padding=1) <NEW_LINE> self.conv3 = nn.Conv2d(64, 128, 3, padding=1) <NEW_LINE> self.conv4 = nn.Conv2d(128, 128...
The 8-layer conv net model used in: https://github.com/YisenWang/dynamic_adv_training/blob/master/models.py. BN removed
62598fdc656771135c489c38
class CSSSlimmer(Slimmer): <NEW_LINE> <INDENT> name = 'css_slimmer' <NEW_LINE> def output(self, _in, out, **kw): <NEW_LINE> <INDENT> out.write(self.slimmer.css_slimmer(_in.read()))
Minifies CSS by removing whitespace, comments etc., using the Python `slimmer <http://pypi.python.org/pypi/slimmer/>`_ library.
62598fdc187af65679d29ed7
class ZeroOperator(LinearOperator): <NEW_LINE> <INDENT> def __init__(self, nargin, nargout, **kwargs): <NEW_LINE> <INDENT> if "matvec" in kwargs: <NEW_LINE> <INDENT> kwargs.pop("matvec") <NEW_LINE> <DEDENT> if "matvec_transp" in kwargs: <NEW_LINE> <INDENT> kwargs.pop("matvec_transp") <NEW_LINE> <DEDENT> def matvec(x): ...
The zero linear operator of shape `nargout`-by-`nargin`.
62598fdc26238365f5fad12b
class Certificate(BaseCertificate): <NEW_LINE> <INDENT> def load_context(self, cert_string=None, cert_file=None, key_string=None, key_file=None, passphrase=None, context_method=OpenSSL.SSL.TLSv1_METHOD): <NEW_LINE> <INDENT> context = OpenSSL.SSL.Context(context_method) <NEW_LINE> if passphrase is not None and not isins...
pyOpenSSL certificate implementation.
62598fdcad47b63b2c5a7e1c
class Print(object): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def print_weak(self) -> None: <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def print_strong(self) -> None: <NEW_LINE> <INDENT> raise NotImplementedError
Interface
62598fdc099cdd3c636756c2
class UploadForm(FlaskForm): <NEW_LINE> <INDENT> sample = FileField('Sample image file', validators=[ FileRequired(), FileAllowed( app.samples_set, 'Not supported type : jpeg only.') ]) <NEW_LINE> smear_type = RadioField('Blood smear type', choices=[ ('thick', 'Thick'), ('thin', 'Thin') ], validators=[Required()] ) <...
Form for image upload.
62598fdc656771135c489c3a
class BookFormRegister(Form): <NEW_LINE> <INDENT> titulo = StringField('titulo', [validators.DataRequired()]) <NEW_LINE> editorial = StringField('Editorial', [validators.DataRequired()]) <NEW_LINE> numeroPaginas = IntegerField('numero de paginas', [validators.DataRequired()]) <NEW_LINE> precio = FloatField('precio', [...
docstring for BookFormRegister
62598fdc091ae356687051e6
class Tunel(Sala): <NEW_LINE> <INDENT> def monta_ambiente(self, nome): <NEW_LINE> <INDENT> self.camara = self.cria_sala(nome=TUNEL % str(self.nome), cave=CAVEY) <NEW_LINE> self.saida = [self.cria_saida(saida, CAMARA, "50%") for saida in CAMARAS if saida in nome]
Um tunel ligando duas camaras da caverna. :ref:`tunel`
62598fdcad47b63b2c5a7e1e
class PluginsManager(object): <NEW_LINE> <INDENT> def __init__(self, pluginsPath="/usr/share/whia/plugins/"): <NEW_LINE> <INDENT> self.path = pluginsPath <NEW_LINE> self.extensions = {} <NEW_LINE> for confFile in os.listdir(self.path): <NEW_LINE> <INDENT> self.__parseConf(confFile) <NEW_LINE> <DEDENT> <DEDENT> def __ad...
Allows discovery of available plugins through a simple query language
62598fdc956e5f7376df5962
class OperationResultInfoBaseResource(OperationWorkerResponse): <NEW_LINE> <INDENT> _attribute_map = { 'status_code': {'key': 'statusCode', 'type': 'str'}, 'headers': {'key': 'headers', 'type': '{[str]}'}, 'operation': {'key': 'operation', 'type': 'OperationResultInfoBase'}, } <NEW_LINE> def __init__( self, *, status_c...
Base class for operation result info. :ivar status_code: HTTP Status Code of the operation. Possible values include: "Continue", "SwitchingProtocols", "OK", "Created", "Accepted", "NonAuthoritativeInformation", "NoContent", "ResetContent", "PartialContent", "MultipleChoices", "Ambiguous", "MovedPermanently", "Moved"...
62598fdcab23a570cc2d5053
class CoreDefinitionVersion(AWSObject): <NEW_LINE> <INDENT> resource_type = "AWS::Greengrass::CoreDefinitionVersion" <NEW_LINE> props: PropsDictType = { "CoreDefinitionId": (str, True), "Cores": ([Core], True), }
`CoreDefinitionVersion <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-coredefinitionversion.html>`__
62598fdc187af65679d29eda
class DeviceTokenNotForTopic(APNsException): <NEW_LINE> <INDENT> pass
The device token does not match the specified topic.
62598fdc283ffb24f3cf3e4f
class FakeIO(object): <NEW_LINE> <INDENT> def __init__(self, path=None, callStack=None): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> self.writeContent = [] <NEW_LINE> self.writeCount = 0 <NEW_LINE> self.lastWrite = '' <NEW_LINE> self.readCount = 0 <NEW_LINE> self.callStack = callStack <NEW_LINE> self.wasCleared = F...
A Mock IO object to use for testing purposes
62598fdc091ae356687051ea
class NetworkEquipmentViewset(mixins.ListModelMixin, mixins.RetrieveModelMixin, mixins.CreateModelMixin, mixins.UpdateModelMixin, mixins.DestroyModelMixin, viewsets.GenericViewSet): <NEW_LINE> <INDENT> queryset = NetworkEquipment.objects.all() <NEW_LINE> serializer_class = NetworkEquipmentSerializer <NEW_LINE> authenti...
网络设备,交换机、路由器等
62598fdcfbf16365ca79468d
class TrafficSynchTest(BaseRepeatTest): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(TrafficSynchTest, self).__init__( test_name="Traffic intersection synch problem test", test_cmds=["sys161 kernel 'sp3 1 150 1 1 0;q'", "sys161 kernel 'sp3 5 100 10 1 0;q'", "sys161 kernel 'sp3 2 300 0 1 1;q'", "sys...
Test for A1 Traffic intersection synch problem Runs traffic_synch.c and checks the output
62598fdcad47b63b2c5a7e22
class InputDialog(GenericDialog): <NEW_LINE> <INDENT> @decorate_constructor_parameter_types([str, str, str]) <NEW_LINE> def __init__(self, title='Title', message='Message', initial_value='', *args, **kwargs): <NEW_LINE> <INDENT> super(InputDialog, self).__init__(title, message, *args, **kwargs) <NEW_LINE> self.inputTex...
Input Dialog widget. It can be used to query simple and short textual input to the user. The user can confirm or dismiss the dialog with the common buttons Cancel/Ok. The Ok button click or the ENTER key pression emits the 'confirm_dialog' event. Register the listener to it with set_on_confirm_dialog_listener. The Canc...
62598fdc656771135c489c40
class RingData(object): <NEW_LINE> <INDENT> def __init__(self, replica2part2dev_id, devs, part_shift): <NEW_LINE> <INDENT> self.devs = devs <NEW_LINE> self._replica2part2dev_id = replica2part2dev_id <NEW_LINE> self._part_shift = part_shift <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def deserialize_v1(cls, gz_file): <N...
Partitioned consistent hashing ring data (used for serialization).
62598fdcab23a570cc2d5055
class Add(Instruction): <NEW_LINE> <INDENT> def __init__(self, *operands, machine): <NEW_LINE> <INDENT> super().__init__('add', *operands, machine=machine) <NEW_LINE> <DEDENT> def exec(self): <NEW_LINE> <INDENT> logexec(self) <NEW_LINE> self.pc += 1 <NEW_LINE> self.machine.registers[self.operands[0]] += self.rm1
`add X Y` increases register X by the value of Y.
62598fdcab23a570cc2d5056
class Poem(db.Model): <NEW_LINE> <INDENT> title = db.TextProperty(default="Untitled") <NEW_LINE> poet = db.StringProperty(default="Unknown") <NEW_LINE> poem = db.TextProperty(required=True) <NEW_LINE> created = db.DateTimeProperty(auto_now_add=True)
DB model class for an individual poetry post
62598fdcadb09d7d5dc0ab49
class RegistrationForm(forms.Form): <NEW_LINE> <INDENT> username = forms.RegexField(regex=r'^[\w.@+-]+$', max_length=30, widget=forms.TextInput(attrs=attrs_dict), label=_("Username"), error_messages={ 'invalid': _("This value must contain " "only letters, numbers and " "underscores.") }) <NEW_LINE> email1 = forms.Email...
Form for registration a user account. Validates that the requested username is not already in use, and requires the email to be entered twice to catch typos. Subclasses should feel free to add any additional validation they need, but should avoid defining a ``save()`` method -- the actual saving of collected user da...
62598fdc26238365f5fad135
class TimeSeriesDataType(models.Model): <NEW_LINE> <INDENT> foods = 0 <NEW_LINE> activities = 1 <NEW_LINE> sleep = 2 <NEW_LINE> body = 3 <NEW_LINE> CATEGORY_CHOICES = ( (foods, 'foods'), (activities, 'activities'), (sleep, 'sleep'), (body, 'body'), ) <NEW_LINE> intraday_support = models.BooleanField(default=False) <NEW...
This model is intended to store information about Fitbit's time series resources, documentation for which can be found here: https://dev.fitbit.com/docs/food-logging/#food-or-water-time-series https://dev.fitbit.com/docs/activity/#activity-time-series https://dev.fitbit.com/docs/sleep/#sleep-time-series https://dev.fit...
62598fdcc4546d3d9def756d
class JavaProtobufContext(object): <NEW_LINE> <INDENT> def __init__(self, classpath, build_response, java_main): <NEW_LINE> <INDENT> self.classpath = resolve_classpath(classpath) <NEW_LINE> self.build_response = build_response <NEW_LINE> self.java_main = java_main <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <IN...
A generic context for sending requests to a java program using protobufs in a subprocess
62598fdc656771135c489c48
class AlarmSensor(SmartyBinarySensor): <NEW_LINE> <INDENT> def __init__(self, name, smarty): <NEW_LINE> <INDENT> super().__init__(name=f"{name} Alarm", device_class="problem", smarty=smarty) <NEW_LINE> <DEDENT> def update(self) -> None: <NEW_LINE> <INDENT> _LOGGER.debug("Updating sensor %s", self._name) <NEW_LINE> self...
Alarm Binary Sensor.
62598fdc187af65679d29edf
class MultiFunction(object): <NEW_LINE> <INDENT> _handlers_cache = {} <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> algorithm_class = type(self) <NEW_LINE> cache_data = MultiFunction._handlers_cache.get(algorithm_class) <NEW_LINE> if not cache_data: <NEW_LINE> <INDENT> handler_names = [None] * len(Expr._ufl_all_cl...
Base class for collections of non-recursive expression node handlers. Subclass this (remember to call the ``__init__`` method of this class), and implement handler functions for each ``Expr`` type, using the lower case handler name of the type (``exprtype._ufl_handler_name_``). This class is optimized for efficient t...
62598fdc3617ad0b5ee0671f
class BackgroundDirective(Directive): <NEW_LINE> <INDENT> required_arguments = 1 <NEW_LINE> optional_arguments = 0 <NEW_LINE> final_argument_whitespace = True <NEW_LINE> option_spec = { 'size': directives.unchanged_required, 'position': directives.unchanged_required, 'repeat': validate_boolean} <NEW_LINE> image_extensi...
Handle reveal.js data-background-* attributes in section tag.
62598fdcad47b63b2c5a7e2c
class RedisSessionInterface(SessionInterface): <NEW_LINE> <INDENT> serializer = pickle <NEW_LINE> session_class = RedisSession <NEW_LINE> def __init__(self, redis, key_prefix, use_signer=False, permanent=True): <NEW_LINE> <INDENT> if redis is None: <NEW_LINE> <INDENT> from redis import Redis <NEW_LINE> redis = Redis() ...
Uses the Redis key-value store as a session backend. .. versionadded:: 0.2 The `use_signer` parameter was added. :param redis: A ``redis.Redis`` instance. :param key_prefix: A prefix that is added to all Redis store keys. :param use_signer: Whether to sign the session id cookie or not. :param permanent: Whether t...
62598fdc656771135c489c4c
class CustomPowerConfigurationCluster(PowerConfigurationCluster): <NEW_LINE> <INDENT> cluster_id = PowerConfiguration.cluster_id <NEW_LINE> MIN_VOLTS = 2.1 <NEW_LINE> MAX_VOLTS = 3.0
Custom PowerConfigurationCluster.
62598fdc187af65679d29ee1
class GlobalPrivacySettings(TLObject): <NEW_LINE> <INDENT> __slots__: List[str] = ["archive_and_mute_new_noncontact_peers"] <NEW_LINE> ID = 0xbea2f424 <NEW_LINE> QUALNAME = "types.GlobalPrivacySettings" <NEW_LINE> def __init__(self, *, archive_and_mute_new_noncontact_peers: Union[None, bool] = None) -> None: <NEW_LINE>...
This object is a constructor of the base type :obj:`~pyrogram.raw.base.GlobalPrivacySettings`. Details: - Layer: ``122`` - ID: ``0xbea2f424`` Parameters: archive_and_mute_new_noncontact_peers (optional): ``bool`` See Also: This object can be returned by 2 methods: .. hlist:: :columns: 2 ...
62598fdc091ae356687051f7
class ACNUMJUS(TipoRegistroAC): <NEW_LINE> <INDENT> mnemonico = "NUMJUS" <NEW_LINE> def __init__(self, linha: str): <NEW_LINE> <INDENT> super().__init__(linha) <NEW_LINE> self._dados = 0 <NEW_LINE> <DEDENT> def le(self): <NEW_LINE> <INDENT> reg_usi = RegistroIn(5) <NEW_LINE> self._dados = reg_usi.le_registro(self._linh...
Registro AC específico para alteração na usina de jusante.
62598fdc099cdd3c636756cb
class _LocalNameIndex(Model): <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> def namespace_uri(self): <NEW_LINE> <INDENT> return self._get_config_property('namespace-uri') <NEW_LINE> <DEDENT> def set_namespace_uri(self, namespace_uri): <NEW_LINE> <INDENT> self._config['namespace-uri'] = namespace_uri <NEW_LINE>...
A mixin for indexes that have local names. This is an abstract class.
62598fdcad47b63b2c5a7e2f
class LeafletMapView(BrowserView): <NEW_LINE> <INDENT> interface.implements(ILeafletMapView) <NEW_LINE> template = ViewPageTemplateFile('map.pt') <NEW_LINE> def __call__(self, **params): <NEW_LINE> <INDENT> params = {} <NEW_LINE> return self.template(**params)
XCGUtils an image after being edited on a webservice
62598fdcad47b63b2c5a7e30
class IsSuperUser(permissions.BasePermission): <NEW_LINE> <INDENT> def has_permission(self, request, view): <NEW_LINE> <INDENT> return request.user and request.user.is_superuser
Allows access only to super-users.
62598fdc3617ad0b5ee06723
class AssetBubbleDetection(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def SortingFunction(AB): <NEW_LINE> <INDENT> interpolatedDerivative = AB.FlorenZmirou.CubicInterpolatedSigma.derivative(AB.FlorenZmirou.Stock.maxPrice) <NEW_LINE> extrapolatedDerivative = AB.fExtrapolatedSpline.derivative(AB.FlorenZmirou.S...
This class performs asset bubble detection over a variety of asset bubble objects Bubble Detection Strategy 2) Suppose we know alpha = (1+m)/2, and have a floren zmirou object, FZ: assetBubbleList = list() for m = 1,...,9 for n = 1,2,3 assetBubbleList.append(AssetBubble(FZ,m,n)) 3) From the assetBubbleLis...
62598fdc26238365f5fad13f
class TOAHModel: <NEW_LINE> <INDENT> def __init__(self, number_of_stools): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def get_move_seq(self): <NEW_LINE> <INDENT> return self._move_seq <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def _cheese_at(self, stool_index, stool_heig...
Model a game of Tour Of Anne Hoy. Model stools holding stacks of cheese, enforcing the constraint that a larger cheese may not be placed on a smaller one.
62598fdc099cdd3c636756cc
class Rectangle: <NEW_LINE> <INDENT> def __init__(self, width=0, height=0): <NEW_LINE> <INDENT> if type(height) != int: <NEW_LINE> <INDENT> raise TypeError("height must be an integer") <NEW_LINE> <DEDENT> if height < 0: <NEW_LINE> <INDENT> raise ValueError("height must be >= 0") <NEW_LINE> <DEDENT> if type(width) != in...
Initializing the Rectangle class
62598fdcad47b63b2c5a7e32
class Solution: <NEW_LINE> <INDENT> def jump(self, A): <NEW_LINE> <INDENT> if A is None or len(A) == 0: <NEW_LINE> <INDENT> return -1 <NEW_LINE> <DEDENT> step = [sys.maxsize for i in range(len(A))] <NEW_LINE> step[0] = 0 <NEW_LINE> for i in range(1, len(A)): <NEW_LINE> <INDENT> for j in range(i): <NEW_LINE> <INDENT> if...
@param A: A list of integers @return: An integer
62598fdc656771135c489c50
class ProgressBar(DisplayObject): <NEW_LINE> <INDENT> def __init__(self, total): <NEW_LINE> <INDENT> self.total = total <NEW_LINE> self._progress = 0 <NEW_LINE> self.html_width = '60ex' <NEW_LINE> self.text_width = 60 <NEW_LINE> self._display_id = hexlify(os.urandom(8)).decode('ascii') <NEW_LINE> <DEDENT> def __repr__(...
Progressbar supports displaying a progressbar like element
62598fdc099cdd3c636756cd
class TestAmenity(unittest.TestCase): <NEW_LINE> <INDENT> def test_docstrings(self): <NEW_LINE> <INDENT> self.assertGreater(len(amenity.__doc__), 1) <NEW_LINE> self.assertGreater(len(Amenity.__doc__), 1) <NEW_LINE> <DEDENT> def test_pep8(self): <NEW_LINE> <INDENT> pep8_val = pep8.StyleGuide(quiet=True) <NEW_LINE> ameni...
Class for testing with unit test the Amenity class
62598fdcad47b63b2c5a7e33
class CkanInternationalizationExtension(ext.InternationalizationExtension): <NEW_LINE> <INDENT> def parse(self, parser): <NEW_LINE> <INDENT> node = ext.InternationalizationExtension.parse(self, parser) <NEW_LINE> args = getattr(node.nodes[0], 'args', None) <NEW_LINE> if args: <NEW_LINE> <INDENT> for arg in args: <NEW_L...
Custom translation to allow cleaned up html
62598fdcd8ef3951e32c814b
class PluginBuilder: <NEW_LINE> <INDENT> def __init__(self, context: 'core.context.Context'): <NEW_LINE> <INDENT> self._context = context <NEW_LINE> <DEDENT> def build(self, config) -> AbstractPlugin: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> plugin = self._context.getPluginByName(config["name"], config["type"]) <NE...
Builds a plugin from a configuration item.
62598fdc283ffb24f3cf3e65
class SCSDisplayMethods(_ToolShelfBlDefs, Panel): <NEW_LINE> <INDENT> bl_context = "objectmode" <NEW_LINE> bl_label = "Display Methods" <NEW_LINE> def draw(self, context): <NEW_LINE> <INDENT> layout = self.layout <NEW_LINE> scene = context.scene <NEW_LINE> if scene: <NEW_LINE> <INDENT> col = layout.column(align=True) <...
Creates a Display Methods panel in the SCS Tools tab.
62598fdc099cdd3c636756cf
class dim_red: <NEW_LINE> <INDENT> def __init__(self, X, Ntraj, expects_sampled, name, obs_indices=None): <NEW_LINE> <INDENT> self.X = X <NEW_LINE> self.Ntraj = Ntraj <NEW_LINE> self.expects_sampled = np.concatenate(expects_sampled, axis = 0) <NEW_LINE> if obs_indices is None: <NEW_LINE> <INDENT> self.obs_indices = ran...
Minimal container for dimensionality reduction.
62598fddc4546d3d9def7576
class NavButton(Styled): <NEW_LINE> <INDENT> _style = "plain" <NEW_LINE> def __init__(self, title, dest, sr_path=True, nocname=False, aliases=None, target="", use_params=False, css_class=''): <NEW_LINE> <INDENT> aliases = aliases or [] <NEW_LINE> aliases = set(_force_unicode(a.rstrip('/')) for a in aliases) <NEW_LINE> ...
Smallest unit of site navigation. A button once constructed must also have its build() method called with the current path to set self.path. This step is done automatically if the button is passed to a NavMenu instance upon its construction.
62598fdd3617ad0b5ee0672d
class LineArrowheadStyle(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swaggerTypes = { } <NEW_LINE> self.attributeMap = { }
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fdd656771135c489c58
class ScoreWarForms(messages.Message): <NEW_LINE> <INDENT> items = messages.MessageField(ScoreWarForm, 1, repeated=True)
Return multiple ScoreWarForms
62598fdd187af65679d29ee9
class Template(BaseUI): <NEW_LINE> <INDENT> def create_template(self, name, template_path, custom_really, temp_type, snippet, os_list=None): <NEW_LINE> <INDENT> name = name or generate_name(6) <NEW_LINE> temp_type = temp_type <NEW_LINE> self.navigator.go_to_provisioning_templates() <NEW_LINE> self.template.create(name,...
Implements Provisioning Template tests from UI
62598fdd3617ad0b5ee06731
class SubtractSquare: <NEW_LINE> <INDENT> current_state: SubtractSquareState <NEW_LINE> def __init__(self, is_p1_turn: bool) -> None: <NEW_LINE> <INDENT> self.current_state = SubtractSquareState(is_p1_turn) <NEW_LINE> <DEDENT> def __eq__(self, other: Any) -> bool: <NEW_LINE> <INDENT> return (type(self) == type(other) a...
class game SubtractSquare
62598fddd8ef3951e32c8151
class WordCount(Experiment): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def setup(self): <NEW_LINE> <INDENT> self.wordcount_in = "%s/text" % get_hdfs_address() <NEW_LINE> self.wordcount_out = "%s/tmp/wc_out" % get_hdfs_address() <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <IN...
params: <text path> <result path>
62598fdd26238365f5fad14f
class ProgressService(object): <NEW_LINE> <INDENT> def __init__(self, target_instance): <NEW_LINE> <INDENT> self.target_instance = target_instance <NEW_LINE> <DEDENT> def get_pages_daily_target(self): <NEW_LINE> <INDENT> end_date = self.target_instance.end_date <NEW_LINE> today_date = datetime.datetime.today().date() <...
Logic to calculate common operation for target's progress
62598fdd4c3428357761a899
class FlavorsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> super(FlavorsAdminNegativeTestJSON, cls).setUpClass() <NEW_LINE> if not test.is_extension_enabled('FlavorExtraData', 'compute'): <NEW_LINE> <INDENT> msg = "FlavorExtraDat...
Tests Flavors API Create and Delete that require admin privileges
62598fddadb09d7d5dc0ab65
class ConductorWireLink(Base): <NEW_LINE> <INDENT> __tablename__ = 'conductor_wire_links' <NEW_LINE> conductor_id = Column(Integer, ForeignKey('conductors.id'), primary_key = True) <NEW_LINE> wire_id = Column(Integer, ForeignKey('wires.id'), primary_key = True) <NEW_LINE> conductor = relationship('Conductor', back_popu...
A join table for conductor-wire association.
62598fddc4546d3d9def757b
class DataBoxDiskJobSecrets(JobSecrets): <NEW_LINE> <INDENT> _validation = { 'job_secrets_type': {'required': True}, 'dc_access_security_code': {'readonly': True}, 'error': {'readonly': True}, 'disk_secrets': {'readonly': True}, 'pass_key': {'readonly': True}, 'is_passkey_user_defined': {'readonly': True}, } <NEW_LINE>...
The secrets related to disk job. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :param job_secrets_type: Required. Used to indicate what type of job secrets object.Constant filled by server. Possible value...
62598fddad47b63b2c5a7e44
class CloudBaseRunImageSecretInfo(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RegistryServer = None <NEW_LINE> self.UserName = None <NEW_LINE> self.Password = None <NEW_LINE> self.Email = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RegistryServe...
ImageSecretInfo的信息
62598fdd26238365f5fad153
class Poisson_s( Prior_s ): <NEW_LINE> <INDENT> _hyperparameter_names_s = [] <NEW_LINE> _bounds_s = [] <NEW_LINE> _default_theta_s0 = [] <NEW_LINE> @cached <NEW_LINE> def Lsi( T ): <NEW_LINE> <INDENT> raise TypeError('should not get to this point') <NEW_LINE> <DEDENT> @cached <NEW_LINE> def dLsi_dtheta(): <NEW_LINE> <I...
No gain.
62598fdd4c3428357761a89d
class ConnectivityCheckResponse(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'hops': {'readonly': True}, 'connection_status': {'readonly': True}, 'avg_latency_in_ms': {'readonly': True}, 'min_latency_in_ms': {'readonly': True}, 'max_latency_in_ms': {'readonly': True}, 'probes_sent': {'readonly': Tru...
Information on the connectivity status. Variables are only populated by the server, and will be ignored when sending a request. :ivar hops: List of hops between the source and the destination. :vartype hops: list[~api_management_client.models.ConnectivityHop] :ivar connection_status: The connection status. Possible v...
62598fddab23a570cc2d5066
class NoJunitHtmlReport(JUnitHtmlReportInterface): <NEW_LINE> <INDENT> def report(self, output_dir): <NEW_LINE> <INDENT> return None
JUnit html reporter that never produces a report.
62598fdd50812a4eaa620ed9
class LiveTestBambooAPI: <NEW_LINE> <INDENT> def __init__( self, server_url: str = None, username: str = None, password: str = None, verbose: bool = False ) -> None: <NEW_LINE> <INDENT> self.__bamboo_api_client = BambooAPIClient( server_url=server_url, username=username, password=password, verbose=verbose ) <NEW_LINE> ...
Test the API against a live Bamboo server.
62598fdd099cdd3c636756d6
class ThisClassSharedPtrParameter(CppClassSharedPtrParameter): <NEW_LINE> <INDENT> CTYPES = [] <NEW_LINE> cpp_class = self
Register this C++ class as pass-by-pointer parameter
62598fddd8ef3951e32c8154
class UserProfile(models.Model): <NEW_LINE> <INDENT> user = models.OneToOneField(User) <NEW_LINE> name = models.CharField(max_length=64) <NEW_LINE> brief = models.CharField(max_length=140, blank=True, null=True) <NEW_LINE> sex_type = ((1, 'Male'), (0, 'Female')) <NEW_LINE> sex = models.IntegerField(choices=sex_type, de...
用户信息
62598fdd091ae3566870520f
class Admin(object): <NEW_LINE> <INDENT> def __init__(self, company_name, ceo, email, password, contact, gst_no, _id=None): <NEW_LINE> <INDENT> self.company_name = company_name <NEW_LINE> self.ceo = ceo <NEW_LINE> self.email = email <NEW_LINE> self.password = password <NEW_LINE> self.contact = contact <NEW_LINE> self.g...
Class to perform admin specific functionality
62598fdd656771135c489c64
class HighCard(WinPattern): <NEW_LINE> <INDENT> def __init__(self, hand): <NEW_LINE> <INDENT> super().__init__(hand) <NEW_LINE> <DEDENT> def criterion(self): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> def values(self): <NEW_LINE> <INDENT> return self.cards[0] <NEW_LINE> <DEDENT> def trumps(self, other): <NEW_L...
The highest-ranking card in a hand.
62598fddab23a570cc2d5067
class InstructionBase(object): <NEW_LINE> <INDENT> global_frame = GlobalFrame() <NEW_LINE> local_frame = LocalFrame() <NEW_LINE> temp_frame = TemporaryFrame() <NEW_LINE> instr_counter = -1 <NEW_LINE> instr_pointer = 1 <NEW_LINE> call_stack = [] <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> InstructionBase.instr_co...
Base class for every instruction
62598fddab23a570cc2d5068
class Node(object): <NEW_LINE> <INDENT> def __init__(self, item, **kwargs): <NEW_LINE> <INDENT> self.item = item <NEW_LINE> self.parent = None <NEW_LINE> self.metadata = dict(kwargs) <NEW_LINE> self._children = [] <NEW_LINE> self._frozen = False <NEW_LINE> <DEDENT> def _frozen_add(self, child): <NEW_LINE> <INDENT> rais...
A n-ary node class that can be used to create tree structures.
62598fdd3617ad0b5ee0673d
class icontains(ColumnOperator): <NEW_LINE> <INDENT> def compare(self, value): <NEW_LINE> <INDENT> return self.column.ilike('%{0}%'.format(value))
Return ``icontains`` filter function using ORM column field.
62598fddad47b63b2c5a7e4b
class ValueSetComposeIncludeFilter(backboneelement.BackboneElement): <NEW_LINE> <INDENT> resource_name = "ValueSetComposeIncludeFilter" <NEW_LINE> def __init__(self, jsondict=None, strict=True): <NEW_LINE> <INDENT> self.op = None <NEW_LINE> self.property = None <NEW_LINE> self.value = None <NEW_LINE> super(ValueSetComp...
Select codes/concepts by their properties (including relationships). Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.
62598fdd3617ad0b5ee0673f
class RemoveEmptyInlines(Stage): <NEW_LINE> <INDENT> def __call__(self, context): <NEW_LINE> <INDENT> nodes = 'a b i sup sub'.split() <NEW_LINE> xpath = ' | '.join(f'//{n}' for n in nodes) <NEW_LINE> for node in context.html.xpath(xpath): <NEW_LINE> <INDENT> if not list(node) and (not node.text or not node.text.strip()...
Remove inline elements that are empty (no children, no text or just whitespace). Reads: context.html Writes: context.html
62598fddab23a570cc2d506a
class RegisterCallbackResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RequestId = params.get("RequestId")
RegisterCallback返回参数结构体
62598fdd50812a4eaa620edd
class SessionClient(TensorFlowClient): <NEW_LINE> <INDENT> def __init__(self, session, signature_map): <NEW_LINE> <INDENT> self._session = session <NEW_LINE> super(SessionClient, self).__init__(signature_map) <NEW_LINE> <DEDENT> def predict(self, inputs, stats=None, signature_name=None, **unused_kwargs): <NEW_LINE> <IN...
A client for Prediction that uses Session.run.
62598fdd187af65679d29ef1
class AirQualityTarget(Enum): <NEW_LINE> <INDENT> GOOD = "0004" <NEW_LINE> SENSITIVE = "0003" <NEW_LINE> DEFAULT = "0002" <NEW_LINE> VERY_SENSITIVE = "0001"
Air Quality Target.
62598fdd26238365f5fad15d
class CT_Orientation(BaseOxmlElement): <NEW_LINE> <INDENT> val = OptionalAttribute("val", ST_Orientation, default=ST_Orientation.MIN_MAX)
`c:xAx/c:scaling/c:orientation` element, defining category order. Used to reverse the order categories appear in on a bar chart so they start at the top rather than the bottom. Because we read top-to-bottom, the default way looks odd to many and perhaps most folks. Also applicable to value and date axes.
62598fddab23a570cc2d506b
class JSONField(JSONFieldBase, models.TextField): <NEW_LINE> <INDENT> def dumps_for_display(self, value): <NEW_LINE> <INDENT> kwargs = {"indent": 2} <NEW_LINE> kwargs.update(self.dump_kwargs) <NEW_LINE> return json.dumps(value, **kwargs)
JSONField is a generic textfield that serializes/deserializes JSON objects
62598fddc4546d3d9def7581
class includedRiskFactorProp(SchemaProperty): <NEW_LINE> <INDENT> _prop_schema = 'includedRiskFactor' <NEW_LINE> _expected_schema = 'MedicalRiskFactor' <NEW_LINE> _enum = False <NEW_LINE> _format_as = "ForeignKey"
SchemaField for includedRiskFactor Usage: Include in SchemaObject SchemaFields as your_django_field = includedRiskFactorProp() schema.org description:A modifiable or non-modifiable risk factor included in the calculation, e.g. age, coexisting condition. prop_schema returns just the property without url# format_as is...
62598fdd656771135c489c6e
class Office(Room): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.type = "office" <NEW_LINE> self.maximum_people = 6 <NEW_LINE> self.occupants = []
Creates Offices for the Dojo Facility
62598fdd50812a4eaa620edf
@description("Detach a device from the boot pool") <NEW_LINE> class BootPoolDetachDiskCommand(Command): <NEW_LINE> <INDENT> def run(self, context, args, kwargs, opargs): <NEW_LINE> <INDENT> if not args: <NEW_LINE> <INDENT> raise CommandException('Not enough arguments provided') <NEW_LINE> <DEDENT> disk = args.pop(0) <N...
Usage: detach_disk <disk> Example: detach_disk ada1p2 Detach the specified device(s) from the boot pool, reducing the number of devices in the N-way mirror. If only one device remains, it has no redundancy. At least one device must remain in the pool. See 'show_disks' for a list of disks that can be detached from the...
62598fdd3617ad0b5ee06744
class TokenLexer: <NEW_LINE> <INDENT> def __init__(self, page): <NEW_LINE> <INDENT> if not isinstance(page, Page): <NEW_LINE> <INDENT> raise TypeError('The specified page must be an instance of Page') <NEW_LINE> <DEDENT> self.__page = page <NEW_LINE> <DEDENT> def tokens(self): <NEW_LINE> <INDENT> tokens = self.__get_to...
Split a given page into a sequence of normalized tokens. and omit stop words.
62598fdd26238365f5fad161
class ConnectHandler(webapp2.RequestHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> redirect_uri = self.request.get('redirect_uri') <NEW_LINE> if redirect_uri and redirect_uri != 'deleted': <NEW_LINE> <INDENT> self.response.headers['Set-Cookie'] = 'redirect_uri=' + redirect_uri <NEW_LINE> <DEDENT> url ...
Initiate the Last.fm authentication dance
62598fdd4c3428357761a8ad
class RequestsHttpSignatureException(RequestException): <NEW_LINE> <INDENT> pass
An error occurred while constructing the HTTP Signature for your request.
62598fddab23a570cc2d506e
class TestTeamsApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = opendota_client.api.teams_api.TeamsApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_teams_get(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_teams_t...
TeamsApi unit test stubs
62598fdd099cdd3c636756de
class ItemFactory(factory.Factory): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Item <NEW_LINE> <DEDENT> name = factory.Faker( 'word', ext_word_list=random_wordlist(max_length=40, prefix='Item_') ) <NEW_LINE> quantity = factory.Faker('random_int', min=1, max=10000) <NEW_LINE> weight = factory.Faker('ran...
Definition of item factory.
62598fdd4c3428357761a8af