code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class ABPWrapper(GraphState): <NEW_LINE> <INDENT> def __init__(self, nodes=[]): <NEW_LINE> <INDENT> abp.DETERMINISTIC = True <NEW_LINE> super(ABPWrapper, self).__init__(nodes, vop="hadamard") <NEW_LINE> <DEDENT> def print_stabilizer(self): <NEW_LINE> <INDENT> print(self.to_stabilizer()) <NEW_LINE> <DEDENT> def __eq__(s...
A wrapper for abp, just to ensure determinism
62598f5c462c4b4f79dbafa4
class TestBitCoinSymbol(TestCase): <NEW_LINE> <INDENT> def test_bitcoin_symbol(self): <NEW_LINE> <INDENT> self.assertEqual(get_btc_symbol(), "\u0E3F")
Bit Coin symbol
62598f5c8c3a8732951f5af3
class Playlist(db.Model): <NEW_LINE> <INDENT> __tablename__= "playlists" <NEW_LINE> id = db.Column(db.Integer, primary_key=True, autoincrement=True) <NEW_LINE> name = db.Column(db.String(100), nullable=False) <NEW_LINE> play_song_xref = db.relationship('PlaylistSong', backref='playlists', passive_deletes=True) <NEW_LIN...
Playlist.
62598f5cbe8e80087fbbe5fa
class SqliteReader(MessageReader): <NEW_LINE> <INDENT> def __init__(self, file: StringPathLike, table_name: str = "messages") -> None: <NEW_LINE> <INDENT> super().__init__(file=None) <NEW_LINE> self._conn = sqlite3.connect(file) <NEW_LINE> self._cursor = self._conn.cursor() <NEW_LINE> self.table_name = table_name <NEW_...
Reads recorded CAN messages from a simple SQL database. This class can be iterated over or used to fetch all messages in the database with :meth:`~SqliteReader.read_all`. Calling :func:`~builtin.len` on this object might not run in constant time. :attr str table_name: the name of the database table used for storing ...
62598f5c66673b3332c2f95a
class NGramModel(object): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> __repr__ = _swig_repr <NEW_LINE> def fromIter(itor): <NEW_LINE> <INDENT> return _sphinxbase.NGramModel_fromIter(itor) <NEW_LINE> <DEDENT> fromIter = staticmeth...
Proxy of C NGramModel struct.
62598f5cd164cc6175820518
class ShowPlatformSoftwareFedQosPolicyTargetSchema(MetaParser): <NEW_LINE> <INDENT> schema = { 'tcg_sum_for_policy': { Any(): { 'interface': { Any(): { 'loc': str, 'iif_id': str, 'direction': str, 'tccg': int, 'child': int, 'mpq': str, 'state_cfg': str, 'state_opr': str, 'address': str }, } }, } }
search for * show platform software fed active qos policy target brief
62598f5c91af0d3eaad393aa
class TestFlagType(unittest.TestCase): <NEW_LINE> <INDENT> def test_happy_path(self): <NEW_LINE> <INDENT> tested = FlagType("A Type") <NEW_LINE> tested.codelist_oid = "ANOID" <NEW_LINE> t = obj_to_doc(tested) <NEW_LINE> self.assertEqual("FlagType", t.tag) <NEW_LINE> self.assertEqual("ANOID", t.attrib["CodeListOID"]) <N...
Test FlagType classes
62598f5cac7a0e7691f71ab2
class hhpoor_lnprice(Variable): <NEW_LINE> <INDENT> def dependencies(self): <NEW_LINE> <INDENT> return [attribute_label("neighborhood", "ln_price"), attribute_label("household", "poor")] <NEW_LINE> <DEDENT> def compute(self, dataset_pool): <NEW_LINE> <INDENT> return self.get_dataset().multiply("poor", "ln_price")
Test variable for the interaction of neighborhoods and households. Computes household.poor * neighborhood.ln_price.
62598f5c9b70327d1c57e348
class GESClientFactory(Factory): <NEW_LINE> <INDENT> def __init__(self, endpoint, timeout=10, keepalive=True, rest_client_class=None): <NEW_LINE> <INDENT> self.endpoint = endpoint <NEW_LINE> self.timeout = timeout <NEW_LINE> self.keepalive = keepalive <NEW_LINE> self.rest_client_class = rest_client_class <NEW_LINE> <DE...
Factory for creating GESClient objects.
62598f5c711fe17d825dfc98
class LoginForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = User <NEW_LINE> fields = ['phone', 'password'] <NEW_LINE> error_messages = { 'phone': { 'required': '手机号不能为空!' }, 'password': { 'required': '密码不能为空!' } } <NEW_LINE> <DEDENT> def clean(self): <NEW_LINE> <INDENT> phone = self.cl...
用户登录验证
62598f5cac7a0e7691f71ab4
class rawAppend_args(object): <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRUCT, 'evt', (RawEvent, RawEvent.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, evt=None,): <NEW_LINE> <INDENT> self.evt = evt <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBinaryProtocol....
Attributes: - evt
62598f5c462c4b4f79dbafa8
class UnfetchableRemote(GetFetcherError): <NEW_LINE> <INDENT> pass
Indicates no Fetcher claims the given remote import path.
62598f5c6fece00bbaccaf36
class Runner(RunnerClient): <NEW_LINE> <INDENT> def _print_docs(self): <NEW_LINE> <INDENT> ret = super(Runner, self).get_docs() <NEW_LINE> for fun, doc in ret.items(): <NEW_LINE> <INDENT> print("{0}:\n{1}\n".format(fun, doc)) <NEW_LINE> <DEDENT> <DEDENT> def run(self): <NEW_LINE> <INDENT> if self.opts.get('doc', False)...
Execute the salt runner interface
62598f5c66673b3332c2f95e
class SolverLengthFirst(SolverBase): <NEW_LINE> <INDENT> solver_type = "length" <NEW_LINE> def __init__( self, load, bins ): <NEW_LINE> <INDENT> super(SolverLengthFirst, self).__init__( load=load, bins=bins ) <NEW_LINE> <DEDENT> def solve(self): <NEW_LINE> <INDENT> n = 0 <NEW_LINE> while True: <NEW_LINE> <INDENT> n += ...
Solver focusing on finding the shortest bin-combination. This class solves the defined problem by finding the shortest bin-combination that can accommodate the defined load. Note: The solution(s) may yield to over-capacity.
62598f5c8c3a8732951f5af8
class System(ResolvedFile): <NEW_LINE> <INDENT> pass
Imports that are resolved by python.
62598f5c76d4e153a661c1b6
class GameTypeSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = GameType <NEW_LINE> fields = ('id', 'label')
JSON serializer for game types Arguments: serializers
62598f5cac7a0e7691f71ab6
class TrafficSelector(A10BaseClass): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.ERROR_MSG = "" <NEW_LINE> self.b_key = "traffic-selector" <NEW_LINE> self.DeviceProxy = "" <NEW_LINE> self.ipv4 = {} <NEW_LINE> for keys, value in kwargs.items(): <NEW_LINE> <INDENT> setattr(self,keys, value)
This class does not support CRUD Operations please use parent. :param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py`
62598f5c507cdc57c63a4343
class SubjectViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> serializer_class = SubjectSerializer <NEW_LINE> queryset = Subject.objects.all()
A viewset for viewing and editing subject instances.
62598f5c167d2b6e312b6523
class GPRSDB(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.connection = psycopg2.connect(host='localhost', database='endaga', user=PG_USER, password=PG_PASSWORD) <NEW_LINE> self.table_name = 'gprs_records' <NEW_LINE> with self.connection.cursor() as cursor: <NEW_LINE> <INDENT> command = ("CR...
Manages connections to the GPRS DB. Convention is to close all cursors after opening and immediately commit transactions, even if the query is just a 'select.'
62598f5c9b70327d1c57e34c
class Dummy(object): <NEW_LINE> <INDENT> def __init__(self, site_shape=None): <NEW_LINE> <INDENT> self.vul_function_titles = {} <NEW_LINE> self.vulnerability_sets = {} <NEW_LINE> self.exposure_att = {} <NEW_LINE> self.site_shape = site_shape <NEW_LINE> <DEDENT> def get_site_shape(self): <NEW_LINE> <INDENT> return self....
Dummy class for testing
62598f5cbe8e80087fbbe600
class CartIncludeTaxModifier(BaseCartModifier): <NEW_LINE> <INDENT> taxes = settings.VALUE_ADDED_TAX / 100 <NEW_LINE> def add_extra_cart_row(self, cart, request): <NEW_LINE> <INDENT> amount = cart.subtotal * self.taxes <NEW_LINE> instance = { 'label': _("+ {}% V.A.T").format(settings.VALUE_ADDED_TAX), 'amount': amount,...
This tax calculator presumes that unit prices are net prices, hence also the subtotal, and that the tax is added globally to the carts total. By placing this modifier after the shipping modifiers, one can add tax to the shipping costs. Otherwise shipping cost are considered tax free.
62598f5c21a7993f00c6551d
class SpeakerDetailNotFound(TestCase): <NEW_LINE> <INDENT> def test_not_found(self): <NEW_LINE> <INDENT> url = r('core:speaker_detail', kwargs={'slug': 'john-doe'}) <NEW_LINE> response = self.client.get(url) <NEW_LINE> self.assertEqual(404, response.status_code)
Test class.
62598f5c63f4b57ef0085843
class Record(object): <NEW_LINE> <INDENT> def __init__(self,i,fname,lname,gender,age,email,salary): <NEW_LINE> <INDENT> self.id = i <NEW_LINE> self.fname = fname <NEW_LINE> self.lname = lname <NEW_LINE> self.gender = gender <NEW_LINE> self.age = age <NEW_LINE> self.email = email <NEW_LINE> self.salary = salary <NEW_LIN...
Helper class that holds the Data. just like Sessions.
62598f5c796e427e5384dd3b
class CloudPersistor(Persistor): <NEW_LINE> <INDENT> def __init__(self, data_dir, aws_region, bucket_name, endpoint_url): <NEW_LINE> <INDENT> Persistor.__init__(self) <NEW_LINE> self.data_dir = data_dir <NEW_LINE> self.s3 = boto3.resource('s3', region_name=aws_region, endpoint_url=endpoint_url) <NEW_LINE> self.bucket_n...
Store models on cloud and fetch them when needed instead of storing them on the local disk.
62598f5c167d2b6e312b6525
class Skins(Resource, IDsLookupMixin): <NEW_LINE> <INDENT> api_class = 'skins'
Returns information about skins
62598f5c0383005118f6ccae
class Pipeline(LifecycleModelMixin, models.Model): <NEW_LINE> <INDENT> TYPES = definitions.FileType <NEW_LINE> name = models.SlugField(max_length=20, validators=[validators.PipelineNameValidator]) <NEW_LINE> is_enabled = models.BooleanField(default=True, db_index=True) <NEW_LINE> target_type = models.CharField( choices...
Model to store pipeline for folder, purpose of pipeline is to enable running multiple transformations on the same file as a _pipeline_ and outputting a file as a result
62598f5c1d351010ab8f30fa
class Operations: <NEW_LINE> <INDENT> models = _models <NEW_LINE> def __init__(self, client, config, serializer, deserializer) -> None: <NEW_LINE> <INDENT> self._client = client <NEW_LINE> self._serialize = serializer <NEW_LINE> self._deserialize = deserializer <NEW_LINE> self._config = config <NEW_LINE> <DEDENT> def l...
Operations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. :type models: ~azure.mgmt.network.v2018_02_01.models :param client:...
62598f5cd164cc6175820520
class MPxGeometryIterator(object): <NEW_LINE> <INDENT> def __init__(*args, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def component(*args, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def geometry(*args, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def hasNormals(*args, **kwargs): <NE...
Base class for user defined geometry iterators.
62598f5c167d2b6e312b6527
class RegistrationModelTests(RegistrationTestCase): <NEW_LINE> <INDENT> def test_registration_profile_created(self): <NEW_LINE> <INDENT> self.assertEqual(User.objects.count(), 2) <NEW_LINE> self.assertEqual(self.sample_user.username, 'alice') <NEW_LINE> self.assertEqual(self.sample_user.first_name, 'a') <NEW_LINE> self...
Tests for the model-oriented functionality of django-registration, including ``RegistrationProfile`` and its custom manager.
62598f5c4d74a7450cd589ad
class DeviceTypes(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._device_types = {} <NEW_LINE> self._device_types_iter = None <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> self._device_types_iter = sorted(list(self._device_types.values()), key=lambda dev_type: dev_type.name()) <...
Container class for the registered device types.
62598f5c287bf620b6271162
class VisionPrivacy: <NEW_LINE> <INDENT> PRIVATE = 0 <NEW_LINE> PUBLIC = 1 <NEW_LINE> INVALID = 2
Enum for vision privacy policies
62598f5c462c4b4f79dbafae
class BaseObfuscationBackend(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> settings = self.validate_settings() <NEW_LINE> for key, value in six.iteritems(settings): <NEW_LINE> <INDENT> setattr(self, key, value) <NEW_LINE> <DEDENT> <DEDENT> def validate_settings(self): <NEW_LINE> <INDENT> return s...
Base object for describing the API for obfuscating publicly visible values. This is used for: - in unsubscription URLs for a specific Subscriber - in unsubscription URLs for a Subscriber-Newsletter pair - in web view URLs of Newsletters - tracker image URLs that are used for tracking email views
62598f5ca8ecb033258707ad
class AnswerManager(models.Manager): <NEW_LINE> <INDENT> def get_query_set(self): <NEW_LINE> <INDENT> return super(AnswerManager, self).get_query_set().filter(status='A')
Default Answer manager that only retrieves Active ones
62598f5cbf627c535bcb0a29
class _ListStream: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.data = [] <NEW_LINE> <DEDENT> def write(self, s): <NEW_LINE> <INDENT> self.data.append(s)
Custom stdout to print into list of string.
62598f5c6fece00bbaccaf3d
class MiningSchema(PmmlBinding): <NEW_LINE> <INDENT> def toPFA(self, options, context): <NEW_LINE> <INDENT> raise NotImplementedError
Represents a <MiningSchema> tag and provides methods to convert to PFA.
62598f5cd164cc6175820522
class Cannon(Piece): <NEW_LINE> <INDENT> def __init__(self, color, abbreviation="CA"): <NEW_LINE> <INDENT> super().__init__(color, abbreviation) <NEW_LINE> <DEDENT> def legal_move(self, from_piece, row_from_num, row_to_num, col_from_num, col_to_num, current_board): <NEW_LINE> <INDENT> direction_row = get_direction_row(...
Represents a game piece, legal moves describes in legal_move function
62598f5c8c3a8732951f5afe
class RecoveryTransferStatusForm(RepTransferReplyForm): <NEW_LINE> <INDENT> message_name = forms.ChoiceField( choices=_format_choices(['recovery-transfer-status']))
Handles DPN Recovery Transfer Status Message Body https://wiki.duraspace.org/display/DPN/Content+Recovery+Message+4
62598f5c796e427e5384dd3f
class Solution: <NEW_LINE> <INDENT> ans=False <NEW_LINE> def isSubtree(self, s, t): <NEW_LINE> <INDENT> if t is None: <NEW_LINE> <INDENT> if s is None: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> return False <NEW_LINE> <DEDENT> self.recur(s , t) <NEW_LINE> return self.ans <NEW_LINE> <DEDENT> def recur(self , s...
@param s: the s' root @param t: the t' root @return: whether tree t has exactly the same structure and node values with a subtree of s
62598f5c76d4e153a661c1bc
class FilesystemClosed(FSError): <NEW_LINE> <INDENT> default_message = "attempt to use closed filesystem"
Attempt to use a closed filesystem.
62598f5c0383005118f6ccb2
class NullHandler(logging.Handler): <NEW_LINE> <INDENT> def emit(self, record): <NEW_LINE> <INDENT> pass
A Logging handler to prevent library errors.
62598f5cbe8e80087fbbe606
class DescribeHostsResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TotalCount = None <NEW_LINE> self.HostSet = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.TotalCount = params.get("TotalCount") <NEW_LINE> if ...
DescribeHosts返回参数结构体
62598f5d925a0f43d25e75e2
class QueryDatasetConfiguration(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'columns': {'key': 'columns', 'type': '[str]'}, } <NEW_LINE> def __init__( self, *, columns: Optional[List[str]] = None, **kwargs ): <NEW_LINE> <INDENT> super(QueryDatasetConfiguration, self).__init__(**kwargs) <NEW_LINE...
The configuration of dataset in the query. :param columns: Array of column names to be included in the query. Any valid query column name is allowed. If not provided, then query includes all columns. :type columns: list[str]
62598f5d711fe17d825dfca4
class AlgoMiniMax(Player): <NEW_LINE> <INDENT> def __init__(self,identifier,depth): <NEW_LINE> <INDENT> self.identifier = identifier <NEW_LINE> self.depth = depth <NEW_LINE> <DEDENT> def all_next_moves(self,board): <NEW_LINE> <INDENT> in_play = board.in_play <NEW_LINE> next_piece = board.next_piece <NEW_LINE> pieces_av...
Minimax strategy, with depth specified.
62598f5d462c4b4f79dbafb2
class ActionServeSurvey(tests.OnTaskTestCase): <NEW_LINE> <INDENT> fixtures = ['simple_workflow_two_actions'] <NEW_LINE> filename = os.path.join( settings.ONTASK_FIXTURE_DIR, 'simple_workflow_two_actions.sql') <NEW_LINE> user_email = 'student01@bogus.com' <NEW_LINE> user_pwd = 'boguspwd' <NEW_LINE> workflow_name = 'wfl...
Test the view to serve a survey.
62598f5dbe8e80087fbbe608
class StoredPlaylistsController(object): <NEW_LINE> <INDENT> pykka_traversable = True <NEW_LINE> def __init__(self, backend, core): <NEW_LINE> <INDENT> self.backend = backend <NEW_LINE> self.core = core <NEW_LINE> <DEDENT> @property <NEW_LINE> def playlists(self): <NEW_LINE> <INDENT> return self.backend.stored_playlist...
:param backend: backend the controller is a part of :type backend: :class:`mopidy.backends.base.Backend` :param provider: provider the controller should use :type provider: instance of :class:`BaseStoredPlaylistsProvider`
62598f5dd18da76e235b6c0d
class CanvasSetAssetNode(ArmLogicTreeNode): <NEW_LINE> <INDENT> bl_idname = 'LNCanvasSetAssetNode' <NEW_LINE> bl_label = 'Set Canvas Asset' <NEW_LINE> arm_version = 1 <NEW_LINE> def arm_init(self, context): <NEW_LINE> <INDENT> self.add_input('ArmNodeSocketAction', 'In') <NEW_LINE> self.add_input('ArmStringSocket', 'Ele...
Sets the asset of the given UI element.
62598f5d8c3a8732951f5b02
class Current_state: <NEW_LINE> <INDENT> def __init__(self, my_settings, screen): <NEW_LINE> <INDENT> self.screen = screen <NEW_LINE> self.x = my_settings.current_state_location_x <NEW_LINE> self.y = my_settings.current_state_location_y <NEW_LINE> self.text_color = my_settings.current_state_textcolor <NEW_LINE> self.fo...
显示当前状态框的类
62598f5d76d4e153a661c1c0
class Integer(Formatter): <NEW_LINE> <INDENT> def __call__(self, val): <NEW_LINE> <INDENT> if val is None: <NEW_LINE> <INDENT> return '' <NEW_LINE> <DEDENT> return '%d' % val
Cast number to integer
62598f5d0383005118f6ccb6
class Collection(IndexableCollection, SelectorPlugin): <NEW_LINE> <INDENT> def __init__( self, name: str, selector: Union[Selector, str, Iterable[Element]] = None, indexBy: Optional[str] = "_filename", metadata: dict = None, **kwargs, ): <NEW_LINE> <INDENT> IndexableCollection.__init__(self, name, indexBy) <NEW_LINE> S...
Collections =========== Groups Elements into an iterable collection. This plugin gathers Elements, generally according to their path, and then allows to iterate on them. The criteria for selecting the Elements is provided by a path pattern string in `selection` argument. It may also be any Selector object. Example ...
62598f5d711fe17d825dfca6
class SwappedResidualGenomeNode(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_channels, out_channels, stride=1, kernel_size=3, padding=1, bias=False): <NEW_LINE> <INDENT> super(SwappedResidualGenomeNode, self).__init__() <NEW_LINE> self.model = nn.Sequential( nn.BatchNorm2d(in_channels), nn.ReLU(inplace=True), ...
Basic computation unit. Does batchnorm, relu, and convolution (in this order).
62598f5d462c4b4f79dbafb4
class Sedimentor(Component): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.wall_thickness = 15.0 * u.cm <NEW_LINE> self.tank = SedimentationTank() <NEW_LINE> self.chan = SedimentationChannel() <NEW_LINE> self.subcomponents = [self.tank, self.chan] <NEW_LINE> super().__init__(**kwargs) <NEW_...
Design an AguaClara sedimentor. The ``Sedimentor`` class designs the sedimentation tank and channel in tandem. For more information on those classes, see :class:`aguaclara.design.sed_tank.SedimentationTank` and :class:`aguaclara.design.sed_chan.SedimentationChannel`. Design inputs: - ``q (float * u.L / u.s)``: Fl...
62598f5dbf627c535bcb0a2f
class vWeekday(compat.unicode_type): <NEW_LINE> <INDENT> week_days = CaselessDict({ "SU": 0, "MO": 1, "TU": 2, "WE": 3, "TH": 4, "FR": 5, "SA": 6, }) <NEW_LINE> def __new__(cls, value, encoding=DEFAULT_ENCODING): <NEW_LINE> <INDENT> value = to_unicode(value, encoding=encoding) <NEW_LINE> self = super(vWeekday, cls).__n...
This returns an unquoted weekday abbrevation.
62598f5d5e10d32532ce33c0
class IndividualEnrollmentRegistrationState(DeviceRegistrationState): <NEW_LINE> <INDENT> _validation = { 'registration_id': {'readonly': True}, 'created_date_time_utc': {'readonly': True}, 'assigned_hub': {'readonly': True}, 'device_id': {'readonly': True}, 'status': {'readonly': True}, 'substatus': {'readonly': True}...
Current registration status. Variables are only populated by the server, and will be ignored when sending a request. :ivar registration_id: The registration ID is alphanumeric, lowercase, and may contain hyphens. :vartype registration_id: str :ivar created_date_time_utc: Registration create date time (in UTC). :vart...
62598f5d4d74a7450cd589b1
class RovibPartitionFunction(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass
General class from which all partition function calculators derive. Parameters ---------- electronic_state: :class:`~radis.db.classes.ElectronicState` an :class:`~radis.db.classes.ElectronicState` object, which is defined in RADIS molecule database and contains spectroscopic data Notes ----- Implementation: ...
62598f5d0383005118f6ccb8
class DeviceDeletionException(nex.NovaException): <NEW_LINE> <INDENT> msg_fmt = _("Device %(devpath)s is still present on the management " "partition after attempting to delete it. Polled %(polls)d " "times over %(timeout)d seconds.")
Expected to delete a disk, but the disk is still present afterward.
62598f5dbe8e80087fbbe60c
class DivideFromAction(IndexRangeValueAction): <NEW_LINE> <INDENT> cmd = DivideFromCommand <NEW_LINE> accelerator = 'Shift+Ctrl+/'
Divides the data from the user specified value (that is to say: dividing the user specified value by the data), ignoring the remainder. Note the difference between this and `Divide By`_
62598f5dbf627c535bcb0a31
class AnsibleEnvironment(Environment): <NEW_LINE> <INDENT> context_class = AnsibleContext <NEW_LINE> template_class = AnsibleJ2Template <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(AnsibleEnvironment, self).__init__(*args, **kwargs) <NEW_LINE> self.filters = JinjaPluginIntercept(self.filter...
Our custom environment, which simply allows us to override the class-level values for the Template and Context classes used by jinja2 internally.
62598f5d925a0f43d25e75e8
class ConstRunIterator(AbstractRunIterator): <NEW_LINE> <INDENT> def __init__(self, length, value): <NEW_LINE> <INDENT> self.length = length <NEW_LINE> self.end = length <NEW_LINE> self.value = value <NEW_LINE> <DEDENT> def __next__(self): <NEW_LINE> <INDENT> yield 0, self.length, self.value <NEW_LINE> <DEDENT> def ran...
Iterate over a constant value without creating a RunList.
62598f5d167d2b6e312b6531
class GIL_672: <NEW_LINE> <INDENT> pass
Spectral Cutlass
62598f5d0383005118f6ccba
class UserManager(BaseUserManager): <NEW_LINE> <INDENT> use_in_migrations = True <NEW_LINE> def _create_user(self, phone, password, **extra_fields): <NEW_LINE> <INDENT> if not phone: <NEW_LINE> <INDENT> raise ValueError('User must have phone number') <NEW_LINE> <DEDENT> phone = phone <NEW_LINE> user = self.model(phone=...
Define a model manager for User model with no username field.
62598f5d9b70327d1c57e35a
class NullField(Field): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__(None) <NEW_LINE> <DEDENT> def parse(self, stream, context): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return '{}()'.format(self.__class__.__name__) <NEW_LINE> <DEDENT> def si...
A null field do not consumes binary stream nor yield any value
62598f5dbf627c535bcb0a33
class Clock(object): <NEW_LINE> <INDENT> def __init__(self,hour=0,minute=0,second=0): <NEW_LINE> <INDENT> self._hour = hour <NEW_LINE> self._minute = minute <NEW_LINE> self._second = second <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def now(cls): <NEW_LINE> <INDENT> ctime = localtime(time()) <NEW_LINE> return cls(ctim...
Number Clock
62598f5d5166f23b2e242990
class Task: <NEW_LINE> <INDENT> def __init__(self, best_case, most_likely_case, worst_case): <NEW_LINE> <INDENT> self.best_case = best_case <NEW_LINE> self.most_likely_case = most_likely_case <NEW_LINE> self.worst_case = worst_case <NEW_LINE> <DEDENT> def get_task_estimate(self) -> float: <NEW_LINE> <INDENT> return rou...
For each single task of project these values are used to calculate an E value for the estimate and the standard deviation (SD).
62598f5d711fe17d825dfcac
class SToggleButton(__SToggleMixin, SButton): <NEW_LINE> <INDENT> pass
A ShapedButton Toggle Button.
62598f5d66673b3332c2f970
class UserListView(ListView): <NEW_LINE> <INDENT> model = User <NEW_LINE> template_name = 'accounts/list_users.html' <NEW_LINE> context_object_name = 'users'
Отображение списка пользователей
62598f5d63f4b57ef008584b
class TokenExpiredError(RuntimeError): <NEW_LINE> <INDENT> pass
Raised when token expires while using pyUSIrest
62598f5d8c3a8732951f5b0a
class SetBasesPage(PageletEditForm): <NEW_LINE> <INDENT> fields = Fields(IComponentsBases) <NEW_LINE> label = _(u'Components registry') <NEW_LINE> def getContent(self): <NEW_LINE> <INDENT> site = getSite().getSiteManager() <NEW_LINE> bases = [sm for sm in site.__bases__ if not ILocalSiteManager.providedBy(sm)] <NEW_LIN...
A page to set the bases of a local site manager
62598f5d796e427e5384dd4b
class AutoAddUpdates(object): <NEW_LINE> <INDENT> def __init__(self, layer, inputs): <NEW_LINE> <INDENT> self.layer = layer <NEW_LINE> self.inputs = inputs <NEW_LINE> self.outputs = [] <NEW_LINE> <DEDENT> def set_outputs(self, outputs): <NEW_LINE> <INDENT> if self.outputs: <NEW_LINE> <INDENT> raise RuntimeError('`set_o...
Automatically track stateful ops with `add_update`. This context manager is used to automatically add stateful ops to a Layer or Model's `.updates`. This ensures that stateful ops are run in the Keras training loop. It also allows for these stateful ops to be disabled by setting `trainable=False`. Example: ``` with ...
62598f5dac7a0e7691f71ac8
class RenderFragmentMixin(object): <NEW_LINE> <INDENT> def render_fragment(self, name): <NEW_LINE> <INDENT> def renderer(ctx, data): <NEW_LINE> <INDENT> if '.' in name: <NEW_LINE> <INDENT> fragment = skin.loader(name, ignoreDocType=True) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> fragment = getattr(self, 'fragment_%...
Resource mixin that locates and includes a fragment, replacing the element with the render="fragment ..." attribute. The fragment render method expects a single argument - the name of the fragment to include. If the name looks like a filename then skin.loader is invoked to find an XHTML template. Otherwise a method i...
62598f5d4d74a7450cd589b4
class Meta: <NEW_LINE> <INDENT> model = AppOrders <NEW_LINE> fields = "__all__"
Meta class for Orders Detail serializer class.
62598f5d8c3a8732951f5b0b
@dataclass <NEW_LINE> class ConcatInput(Parameter): <NEW_LINE> <INDENT> strings: List[List[str]] <NEW_LINE> def validate(self) -> ParameterValidationResult: <NEW_LINE> <INDENT> if self.strings is None: <NEW_LINE> <INDENT> return ParameterValidationResult( False, ["Parameter ConcatInput.strings cannot be null"] ) <NEW_L...
ConcatInput is the input parameter of the Concat algorithm
62598f5d5166f23b2e242994
class HUNER_CHEMICAL_CHEBI(HunerDataset): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def split_url() -> str: <NEW_LINE> <INDENT> return "https://raw.githubusercontent.com/hu-ner/huner/master/ner_scripts/spli...
HUNER version of the CHEBI corpus containing chemical annotations.
62598f5d0383005118f6ccc0
class ConnectionInfo(object): <NEW_LINE> <INDENT> def __init__(self, ip, cookies, arguments, headers, path): <NEW_LINE> <INDENT> self.ip = ip <NEW_LINE> self.cookies = cookies <NEW_LINE> self.arguments = arguments <NEW_LINE> self.headers = headers <NEW_LINE> self.path = path <NEW_LINE> <DEDENT> def get_argument(self, n...
Connection information object. Will be passed to the ``on_open`` handler of your connection class. Has few properties: `ip` Caller IP address `cookies` Collection of cookies `arguments` Collection of the query string arguments `headers` Collection of headers sent by the browser that established this ...
62598f5d56b00c62f0fb1e70
class Player(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = models.Player <NEW_LINE> fields = ('id', 'trainer_profile', 'player_name', 'team', 'team_id','user_age',) <NEW_LINE> extra_kwargs = {'trainer_profile': {'read_only': True}}
a serializer table for working with the player
62598f5d1d351010ab8f310c
@register() <NEW_LINE> class trustdomain(LDAPObject): <NEW_LINE> <INDENT> parent_object = 'trust' <NEW_LINE> trust_type_idx = {'2':u'ad'} <NEW_LINE> object_name = _('trust domain') <NEW_LINE> object_name_plural = _('trust domains') <NEW_LINE> object_class = ['ipaNTTrustedDomain'] <NEW_LINE> default_attributes = ['cn', ...
Object representing a domain of the AD trust.
62598f5d5e10d32532ce33c5
class CheckBankCard4EVerificationRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Caller = None <NEW_LINE> self.BankCard = None <NEW_LINE> self.Name = None <NEW_LINE> self.IdCardNumber = None <NEW_LINE> self.Mobile = None <NEW_LINE> self.IdCardType = None <NEW_LINE> <DEDENT> def ...
CheckBankCard4EVerification请求参数结构体
62598f5d925a0f43d25e75f1
class Game(Base): <NEW_LINE> <INDENT> __tablename__ = "games" <NEW_LINE> game_id = Column(Integer(), primary_key=True) <NEW_LINE> round_id = Column(Integer(), ForeignKey("rounds.round_id"), nullable=False) <NEW_LINE> game_type = Column(String(32), nullable=False) <NEW_LINE> dict_data = Column(Text, default="{}") <NEW_L...
Games played in a round.
62598f5dd18da76e235b6c14
class Body12(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swagger_types = { } <NEW_LINE> self.attribute_map = { } <NEW_LINE> <DEDENT> def to_dict(self): <NEW_LINE> <INDENT> result = {} <NEW_LINE> for attr, _ in iteritems(self.swagger_types): <NEW_LINE> <INDENT> value = getattr(self, attr) <...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f5d76d4e153a661c1ce
class TransformsType (pyxb.binding.basis.complexTypeDefinition): <NEW_LINE> <INDENT> _TypeDefinition = None <NEW_LINE> _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY <NEW_LINE> _Abstract = False <NEW_LINE> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'TransformsType') <NEW_LINE> _...
Complex type {http://www.w3.org/2001/04/xmlenc#}TransformsType with content type ELEMENT_ONLY
62598f5d4d74a7450cd589b7
class SQLApp(App): <NEW_LINE> <INDENT> def __init__(self, metadata, *args, **kwargs): <NEW_LINE> <INDENT> super(SQLApp, self).__init__(*args, **kwargs) <NEW_LINE> self._metadata = metadata
App that provides management commands to create and reset SQLAlchemy tables. SQLApp provides a :class:`SQLEnvironment` to its views.
62598f5d56b00c62f0fb1e74
class Member(models.Model): <NEW_LINE> <INDENT> computer_choices = ( (1, '博莹'), (2, '信产所'), ) <NEW_LINE> nid = models.BigAutoField(primary_key=True) <NEW_LINE> username = models.CharField(verbose_name='姓名', max_length=32, unique=True) <NEW_LINE> computer = models.IntegerField('类型', choices=computer_choices) <NEW_LINE> ...
用户表
62598f5dd164cc6175820535
class EtcdUnauthorized(EtcdException): <NEW_LINE> <INDENT> pass
Error EcodeUnauthorized (http code 110)
62598f5d66673b3332c2f978
class PartsCatalog(object): <NEW_LINE> <INDENT> _instance = None <NEW_LINE> def __new__(cls, sketch): <NEW_LINE> <INDENT> if cls._instance is None: <NEW_LINE> <INDENT> inst = super(PartsCatalog, cls).__new__(cls) <NEW_LINE> inst.parts = [] <NEW_LINE> inst.folder_name = "parts" <NEW_LINE> folderpath = utils.app_data_pat...
Encapsulate a catalog of parts.
62598f5d76d4e153a661c1d0
class _GetError(object): <NEW_LINE> <INDENT> def __call__(self, field_name, form_errors): <NEW_LINE> <INDENT> tmpl = """<span class="error_msg">%s</span>""" <NEW_LINE> if form_errors and form_errors.has_key(field_name): <NEW_LINE> <INDENT> return literal(tmpl % form_errors.get(field_name))
Get error from form_errors, and represent it as span wrapped error message :param field_name: field to fetch errors for :param form_errors: form errors dict
62598f5d1d351010ab8f3112
class ANSIFormatter(BaseFormatter): <NEW_LINE> <INDENT> ANSI_CODES = { 'red': '\033[1;31m', 'yellow': '\033[1;33m', 'cyan': '\033[1;36m', 'white': '\033[1;37m', 'bgred': '\033[1;41m', 'bggrey': '\033[1;100m', 'reset': '\033[0;m'} <NEW_LINE> LEVEL_COLORS = { 'INFO': 'cyan', 'WARNING': 'yellow', 'ERROR': 'red', 'CRITICAL...
A log formatter that use ANSI colors.
62598f5d8c3a8732951f5b14
class ProcessUaMidware(): <NEW_LINE> <INDENT> def process_request(self, request, spider): <NEW_LINE> <INDENT> ua = random.choice(settings.get('USER_AGENT_LIST')) <NEW_LINE> spider.logger.info(msg='now entring download midware') <NEW_LINE> if ua: <NEW_LINE> <INDENT> request.headers['User-Agent']= ua <NEW_LINE> spider.lo...
process request add request info
62598f5dac7a0e7691f71ad2
class StrOpt(Opt): <NEW_LINE> <INDENT> def __init__(self, name, choices=None, **kwargs): <NEW_LINE> <INDENT> self.choices = choices <NEW_LINE> super(StrOpt, self).__init__(name, **kwargs) <NEW_LINE> <DEDENT> def _get_argparse_kwargs(self, group, **kwargs): <NEW_LINE> <INDENT> return super(StrOpt, self)._get_argparse_kw...
String options. String opts do not have their values transformed and are returned as str objects. In addition to the parameters in the base class Opt, StrOpt has an additional parameter. :param choices: Optional sequence of valid values.
62598f5d56b00c62f0fb1e78
class RegistroC141(Registro): <NEW_LINE> <INDENT> campos = [ CampoFixo(1, 'REG', 'C141'), Campo(2, 'NUM_PARC'), Campo(3, 'DT_VCTO'), Campo(4, 'VL_PARC'), ]
VENCIMENTO DA FATURA (CÓDIGO 01)
62598f5d711fe17d825dfcb8
class Grader(db.Entity): <NEW_LINE> <INDENT> name = Required(str) <NEW_LINE> graded_solutions = Set('Solution')
Graders can be created by any user at any time, but are immutable once they are created
62598f5dd164cc6175820539
class DataFrameStatFunctions: <NEW_LINE> <INDENT> def __init__(self, df: DataFrame): <NEW_LINE> <INDENT> self.df = df <NEW_LINE> <DEDENT> @overload <NEW_LINE> def approxQuantile( self, col: str, probabilities: Union[List[float], Tuple[float]], relativeError: float, ) -> List[float]: <NEW_LINE> <INDENT> ... <NEW_LINE> <...
Functionality for statistic functions with :class:`DataFrame`. .. versionadded:: 1.4
62598f5dff9c53063f519c13
class InputFeatures(object): <NEW_LINE> <INDENT> def __init__(self, input_ids, input_mask, segment_ids, masked_lm_positions=None, masked_lm_ids=None, masked_lm_weights=None, next_sentence_labels=None, label_id=None, valid_ids=None, label_mask=None): <NEW_LINE> <INDENT> self.input_ids = input_ids <NEW_LINE> self.input_m...
A single set of features of data.
62598f5d6fece00bbaccaf55
class ItemNode(object): <NEW_LINE> <INDENT> def __init__(self, item_id, parent=None): <NEW_LINE> <INDENT> self.item_id = item_id <NEW_LINE> self.children = [] <NEW_LINE> self.parent = parent
This is used to represent an item (requirement, test or use case...) in a tree-like data structure with parents an children. These objects are used as internal data structures for ItemModels.
62598f5dbf627c535bcb0a41
class Microplates(object): <NEW_LINE> <INDENT> def __init__(self, json_data): <NEW_LINE> <INDENT> self.microplates = _process(json_data) <NEW_LINE> <DEDENT> def get(self, iteration, spreadsheet): <NEW_LINE> <INDENT> if iteration is not None: <NEW_LINE> <INDENT> if spreadsheet is not None: <NEW_LINE> <INDENT> microplate...
Helper class for handling microplates' names.
62598f5d8c3a8732951f5b16
class Search_Tags(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'search_tags' <NEW_LINE> id = db.Column(db.Integer,primary_key=True,nullable=False,autoincrement=True) <NEW_LINE> tag = db.Column(db.String(100),nullable=False,unique=True)
搜索记录
62598f5d0383005118f6ccca
class FrequencyDayAdd(AttributeAdd): <NEW_LINE> <INDENT> def __init__(self, filename, directory): <NEW_LINE> <INDENT> super().__init__(filename, directory) <NEW_LINE> self.attribute_name = 'frequency' <NEW_LINE> self.attribute_visibility = 'global' <NEW_LINE> self.attribute_type = 'c' <NEW_LINE> <DEDENT> def _calculate...
Add a global attribute `frequency` with a value of `day`. This is done in overwrite mode and so will work irrespective of whether there is an existing standard_name attribute.
62598f5dbe8e80087fbbe61e
class E3Chrono: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__LastTimestamp = None <NEW_LINE> self.start() <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <INDENT> self.__LastTimestamp = time.time() <NEW_LINE> <DEDENT> def stop(self): <NEW_LINE> <INDENT> if self.__LastTimestamp is None: <NEW_LINE> ...
Small utility class to benchmark applications.
62598f5dff9c53063f519c15
class BzrDirFormat4(BzrDirFormat): <NEW_LINE> <INDENT> _lock_class = lockable_files.TransportLock <NEW_LINE> def __eq__(self, other): <NEW_LINE> <INDENT> return type(self) == type(other) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def get_format_string(cls): <NEW_LINE> <INDENT> return "Bazaar-NG branch, format 0.0.4\n"...
Bzr dir format 4. This format is a combined format for working tree, branch and repository. It has: - Format 1 working trees [always] - Format 4 branches [always] - Format 4 repositories [always] This format is deprecated: it indexes texts using a text it which is removed in format 5; write support for this format...
62598f5d8c3a8732951f5b17
class DHTMLSelect(Select): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def _log(meth, val=None): <NEW_LINE> <INDENT> if val: <NEW_LINE> <INDENT> val_string = " with value %s" % val <NEW_LINE> <DEDENT> logger.debug('Filling in DHTMLSelect using (%s)%s' % (meth, val_string)) <NEW_LINE> <DEDENT> def _get_select_name(self...
A special Select object for CFME's icon enhanced DHTMLx Select elements. Args: loc: A locator. Returns a :py:class:`cfme.web_ui.DHTMLSelect` object.
62598f5d1d351010ab8f3116
class ModelManagerBase(object): <NEW_LINE> <INDENT> model_dictionary = None <NEW_LINE> standard_models = None <NEW_LINE> plugin_models = None <NEW_LINE> last_time_dir_modified = 0 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.model_dictionary = {} <NEW_LINE> self.standard_models = {model.name: model for model...
Base class for the model manager
62598f5d76d4e153a661c1d6
class TimeTracker(object): <NEW_LINE> <INDENT> def __init__(self, print_start = False): <NEW_LINE> <INDENT> self.start_time = time.time() <NEW_LINE> if print_start: <NEW_LINE> <INDENT> self.started() <NEW_LINE> <DEDENT> <DEDENT> def started(self): <NEW_LINE> <INDENT> print('start time: {0}'.format(self.start_time)); sy...
Object to track time in the program Examples -------- Example usage:: time_tracker = TimeTracker() time_tracker.elapsed()
62598f5d8c3a8732951f5b18