code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Regex(object): <NEW_LINE> <INDENT> _type_marker = 11 <NEW_LINE> @classmethod <NEW_LINE> def from_native(cls, regex): <NEW_LINE> <INDENT> if not isinstance(regex, RE_TYPE): <NEW_LINE> <INDENT> raise TypeError( "regex must be a compiled regular expression, not %s" % type(regex)) <NEW_LINE> <DEDENT> return Regex(reg... | BSON regular expression data. | 62599074bf627c535bcb2ded |
class BitfieldParser(tpg.Parser, dict): <NEW_LINE> <INDENT> pass | set lexer = ContextSensitiveLexer
separator space '\s+';
token TOKEN_CONSTANT '[0-1]+\??' $ ConstantField
token TOKEN_VARIABLE '[A-Za-z_]+' ... | 6259907467a9b606de547734 |
class YumCleanAll(ActionProvider): <NEW_LINE> <INDENT> action_key = 'yum.clean_all' <NEW_LINE> def __init__(self, action_element, path_vars=None): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def get_commands(self): <NEW_LINE> <INDENT> if not FileUtilities.exe_exists('yum'): <NEW_LINE> <INDENT> raise StopIteration <NEW... | Action to run 'yum clean all' | 625990744e4d562566373d27 |
class PendingSponsorListView( LoginRequiredMixin, SponsorMixin, PaginationMixin, ListView): <NEW_LINE> <INDENT> context_object_name = 'sponsors' <NEW_LINE> template_name = 'sponsor/pending-list.html' <NEW_LINE> paginate_by = 10 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(PendingSponsorListView, self).__ini... | List view for pending Sponsor. | 625990748a43f66fc4bf3ab5 |
class FieldEndpoint(ListAPIMixin, CreateAPIMixin, BaseAPIView): <NEW_LINE> <INDENT> permission = 'orgs.org_surveyor' <NEW_LINE> model = ContactField <NEW_LINE> serializer_class = ContactFieldReadSerializer <NEW_LINE> write_serializer_class = ContactFieldWriteSerializer <NEW_LINE> def get_queryset(self): <NEW_LINE> <IND... | ## Listing Fields
A **GET** returns the list of fields for your organization.
* **key** - the unique key of this field (string) (filterable: ```key```)
* **label** - the display label of this field (string)
* **value_type** - one of the following strings:
T - Text
N - Decimal Number
D - Da... | 6259907460cbc95b063659fd |
@python_2_unicode_compatible <NEW_LINE> class Map(models.Model): <NEW_LINE> <INDENT> mapname = models.CharField(max_length=64, unique=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> db_table = 'mapnames' <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return '{0}'.format(self.mapname) | Map
Attributes:
mapname (str): Name of the map
Reverse lookup attributes:
matches (QuerySet): MatchResult objects for every match on the map | 6259907426068e7796d4e25d |
class GroupType(bb.Union): <NEW_LINE> <INDENT> _catch_all = 'other' <NEW_LINE> team = None <NEW_LINE> user_managed = None <NEW_LINE> other = None <NEW_LINE> def is_team(self): <NEW_LINE> <INDENT> return self._tag == 'team' <NEW_LINE> <DEDENT> def is_user_managed(self): <NEW_LINE> <INDENT> return self._tag == 'user_mana... | The group type determines how a group is created and managed.
This class acts as a tagged union. Only one of the ``is_*`` methods will
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.
:ivar team: A group to which team members are automatically added.
Appli... | 6259907499fddb7c1ca63a64 |
class LinearOperatorWithDetOne(tf.linalg.LinearOperatorFullMatrix): <NEW_LINE> <INDENT> def determinant(self): <NEW_LINE> <INDENT> return tf.convert_to_tensor(1, DTYPE) <NEW_LINE> <DEDENT> def _determinant(self): <NEW_LINE> <INDENT> return tf.convert_to_tensor(1, DTYPE) <NEW_LINE> <DEDENT> def log_abs_determinant(self)... | tf LinearOperator for rotations (U such that U U^T = U^T U = Id) | 625990743317a56b869bf1d5 |
class SyncListPermissionPage(Page): <NEW_LINE> <INDENT> def __init__(self, version, response, solution): <NEW_LINE> <INDENT> super(SyncListPermissionPage, self).__init__(version, response) <NEW_LINE> self._solution = solution <NEW_LINE> <DEDENT> def get_instance(self, payload): <NEW_LINE> <INDENT> return SyncListPermis... | PLEASE NOTE that this class contains beta products that are subject to
change. Use them with caution. | 62599074fff4ab517ebcf13b |
class HolidayUpdateView(BSModalUpdateView): <NEW_LINE> <INDENT> model = Holiday <NEW_LINE> template_name = 'holiday/update.html' <NEW_LINE> form_class = HolidayModelForm <NEW_LINE> success_message = 'Success: Holiday was deleted.' <NEW_LINE> def get_success_url(self): <NEW_LINE> <INDENT> return reverse_lazy('school:man... | module doc | 62599074adb09d7d5dc0be8b |
class affair_state(models.Model): <NEW_LINE> <INDENT> _name = 'affair.state' <NEW_LINE> _description = 'States for affair' <NEW_LINE> name = fields.Char('Name', required=True, translate=True) <NEW_LINE> sequence = fields.Integer(string='Sequence', default=0, required=False) <NEW_LINE> description = fields.Text(string='... | States for affair | 62599074ec188e330fdfa1c5 |
class MASKSET(object): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.empty() <NEW_LINE> self.name = name <NEW_LINE> <DEDENT> def empty(self): <NEW_LINE> <INDENT> self.mask = bytearray() <NEW_LINE> self.smask = bytearray() <NEW_LINE> self.tdi = bytearray() <NEW_LINE> self.tdo = bytearray() <NEW_... | Class MASKSET holds a set of bit vectors, all of which are related, will all
have the same length, and are associated with one of the seven shiftOps:
HIR, HDR, TIR, TDR, SIR, SDR, LSDR. One of these holds a mask, smask, tdi, tdo, and a
size. | 6259907438b623060ffaa4e5 |
class PublicMessage(UserWarning): <NEW_LINE> <INDENT> def __init__(self, format=None, message=None, **kw): <NEW_LINE> <INDENT> process_message_arguments(self, format, message, **kw) <NEW_LINE> super(PublicMessage, self).__init__(self.msg) <NEW_LINE> <DEDENT> errno = 10000 <NEW_LINE> format = None <NEW_LINE> def to_dict... | **10000** Base class for messages that can be forwarded in an RPC response. | 6259907463b5f9789fe86a85 |
class IHighlightBlock(Interface): <NEW_LINE> <INDENT> pass | Description of the Example Type | 6259907416aa5153ce401dfa |
class GameForm(messages.Message): <NEW_LINE> <INDENT> urlsafe_key = messages.StringField(1, required=True) <NEW_LINE> game_over = messages.BooleanField(2, required=True) <NEW_LINE> game_end_date = messages.StringField(3) <NEW_LINE> message = messages.StringField(4, required=True) <NEW_LINE> x_user_name = messages.Strin... | GameForm for outbound game state information | 62599074435de62698e9d728 |
class Monster(GameObject): <NEW_LINE> <INDENT> def __init__(self, position, character, color): <NEW_LINE> <INDENT> GameObject.__init__(self, position, character, color, True) <NEW_LINE> self.position = position <NEW_LINE> self.movement_direction = [] <NEW_LINE> for x in range(-1, 2, 1): <NEW_LINE> <INDENT> for y in ran... | Monster class. | 62599074796e427e5385009a |
class GameOverScreen(Screen): <NEW_LINE> <INDENT> pass | Mapping to the GameOverScreen declared in kv file
| 625990744e4d562566373d28 |
class Edit(dexterity.EditForm): <NEW_LINE> <INDENT> grok.context(IActa) | A standard edit form.
| 625990742ae34c7f260aca05 |
class Optimizer(BaseOptimizer): <NEW_LINE> <INDENT> def optimize_process(self): <NEW_LINE> <INDENT> for stage in self.ordered_stages: <NEW_LINE> <INDENT> if not self.process.predecessors(stage): <NEW_LINE> <INDENT> self.run_pso(stage) <NEW_LINE> <DEDENT> elif len(self.process.predecessors(stage)) == 1: <NEW_LINE> <INDE... | Optimizer is object which optimize process. | 625990744a966d76dd5f080b |
class SQLDateCompiler(compiler.SQLDateCompiler, GeoSQLCompiler): <NEW_LINE> <INDENT> def results_iter(self): <NEW_LINE> <INDENT> if self.connection.ops.oracle: <NEW_LINE> <INDENT> from django.db.models.fields import DateTimeField <NEW_LINE> fields = [DateTimeField()] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> needs_... | This is overridden for GeoDjango to properly cast date columns, since
`GeoQuery.resolve_columns` is used for spatial values.
See #14648, #16757. | 6259907497e22403b383c824 |
@register <NEW_LINE> class StepOutResponse(BaseSchema): <NEW_LINE> <INDENT> __props__ = { "seq": { "type": "integer", "description": "Sequence number." }, "type": { "type": "string", "enum": [ "response" ] }, "request_seq": { "type": "integer", "description": "Sequence number of the corresponding request." }, "success"... | Response to 'stepOut' request. This is just an acknowledgement, so no body field is required.
Note: automatically generated code. Do not edit manually. | 62599074be7bc26dc9252ae6 |
class IWSGIMiddlewareFactory(Protocol): <NEW_LINE> <INDENT> def __call__(self, app: IWSGIApp, config: Mapping = {}) -> IWSGIMiddleware: <NEW_LINE> <INDENT> ... | Defines a minimal WSGI middleware factory. | 6259907432920d7e50bc7969 |
class EmrTerminateJobFlowOperator(BaseOperator): <NEW_LINE> <INDENT> template_fields = ['job_flow_id'] <NEW_LINE> template_ext = () <NEW_LINE> ui_color = '#f9c915' <NEW_LINE> @apply_defaults <NEW_LINE> def __init__( self, job_flow_id, aws_conn_id='s3_default', *args, **kwargs): <NEW_LINE> <INDENT> super(EmrTerminateJob... | Operator to terminate EMR JobFlows.
:param job_flow_id: id of the JobFlow to terminate. (templated)
:type job_flow_id: str
:param aws_conn_id: aws connection to uses
:type aws_conn_id: str | 625990741f5feb6acb164515 |
class Notification(SoftDeletionModel): <NEW_LINE> <INDENT> __tablename__ = 'notifications' <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> user_id = db.Column(db.Integer, db.ForeignKey('users.id', ondelete='CASCADE')) <NEW_LINE> user = db.relationship('User', backref='notifications', foreign_keys=[us... | Model for storing user notifications. | 62599074b7558d5895464bc4 |
class FirstHeightGreaterThan: <NEW_LINE> <INDENT> def __init__(self, h): <NEW_LINE> <INDENT> self.h = h <NEW_LINE> <DEDENT> def __call__(self, p): <NEW_LINE> <INDENT> return p.height > self.h | Search criterium to a person with a height greater than h meters
as a functor. | 625990745fc7496912d48efa |
class ResultSet(object): <NEW_LINE> <INDENT> def __init__(self, model, url, json): <NEW_LINE> <INDENT> self.model = model <NEW_LINE> self.url = url <NEW_LINE> self.json = json <NEW_LINE> self.index = -1 <NEW_LINE> self.total_count = self.json['meta']['total_count'] <NEW_LINE> self.limit = self.json['meta']['limit'] <NE... | Abstraction to represent JSON returned by MyTardis API
which includes a list of records and some meta information
e.g. whether there are additional pages of records to
retrieve. | 62599074a8370b77170f1ced |
class ResyncState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): <NEW_LINE> <INDENT> NONE = "None" <NEW_LINE> PREPARED_FOR_RESYNCHRONIZATION = "PreparedForResynchronization" <NEW_LINE> STARTED_RESYNCHRONIZATION = "StartedResynchronization" | The resync state.
| 6259907499cbb53fe683280c |
class Selection(object): <NEW_LINE> <INDENT> def __init__(self, table, where=None, start=None, stop=None, **kwargs): <NEW_LINE> <INDENT> self.table = table <NEW_LINE> self.where = where <NEW_LINE> self.start = start <NEW_LINE> self.stop = stop <NEW_LINE> self.condition = None <NEW_LINE> self.filter = None <NEW_LINE> se... | Carries out a selection operation on a tables.Table object.
Parameters
----------
table : a Table object
where : list of Terms (or convertable to)
start, stop: indicies to start and/or stop selection | 625990748a43f66fc4bf3ab7 |
class Cloudpipe(extensions.ExtensionDescriptor): <NEW_LINE> <INDENT> name = "Cloudpipe" <NEW_LINE> alias = "os-cloudpipe" <NEW_LINE> namespace = "http://docs.openstack.org/compute/ext/cloudpipe/api/v1.1" <NEW_LINE> updated = "2011-12-16T00:00:00+00:00" <NEW_LINE> admin_only = True <NEW_LINE> def get_resources(self): <N... | Adds actions to create cloudpipe instances.
When running with the Vlan network mode, you need a mechanism to route
from the public Internet to your vlans. This mechanism is known as a
cloudpipe.
At the time of creating this class, only OpenVPN is supported. Support for
a SSH Bastion host is forthcoming. | 62599074f9cc0f698b1c5f5c |
class Response: <NEW_LINE> <INDENT> def __init__(self, response, request): <NEW_LINE> <INDENT> self.request = request <NEW_LINE> self.status = response.status <NEW_LINE> http_body = response.read() <NEW_LINE> self.body = None <NEW_LINE> self.__headers = response.headers <NEW_LINE> self.request_id = self.__headers.get("... | Class representing a response from Recurly | 625990745fdd1c0f98e5f8a0 |
class token_types(lexer_token_types): <NEW_LINE> <INDENT> pass | Token Types which are being used during
the parsing process. | 62599074460517430c432ce9 |
class ViewBuilder(object): <NEW_LINE> <INDENT> def __init__(self, base_url, project_id=""): <NEW_LINE> <INDENT> self.base_url = base_url <NEW_LINE> self.project_id = project_id <NEW_LINE> <DEDENT> def _format_dates(self, image): <NEW_LINE> <INDENT> for attr in ['created_at', 'updated_at', 'deleted_at']: <NEW_LINE> <IND... | Base class for generating responses to OpenStack API image requests. | 6259907499cbb53fe683280d |
class Bundle: <NEW_LINE> <INDENT> def __init__(self, n, rmax, m): <NEW_LINE> <INDENT> self.n = n <NEW_LINE> self.rmax = float(rmax) <NEW_LINE> self.m = m <NEW_LINE> self.rays = [] <NEW_LINE> <DEDENT> def rtuniform(self): <NEW_LINE> <INDENT> for i in range(0, self.n+1): <NEW_LINE> <INDENT> radius = (i * self.rmax)/self.... | A class which allows a collection of ray objects to be created with position and direction vectors | 625990744f6381625f19a13b |
class Schedule(object): <NEW_LINE> <INDENT> EMPTY_SCHEDULE = [] <NEW_LINE> def __init__(self, tasks): <NEW_LINE> <INDENT> self.tasks = sorted(tasks, key=lambda task: task.getScheduledTime()) <NEW_LINE> <DEDENT> def getScheduledTasksForInterval(self, intervalStart, intervalEnd): <NEW_LINE> <INDENT> return [task for task... | A schedule of tasks produced by a scheduler. Users can ask for all the tasks
that are scheduled in any interval. | 62599074796e427e5385009c |
class BaseDiscriminator(BaseModel): <NEW_LINE> <INDENT> def __init__(self, ndf, loss_type, **kwargs): <NEW_LINE> <INDENT> super().__init__(**kwargs) <NEW_LINE> self.ndf = ndf <NEW_LINE> self.loss_type = loss_type <NEW_LINE> <DEDENT> def _train_step_implementation( self, real_batch, netG=None, optD=None): <NEW_LINE> <IN... | Base class for a generic unconditional discriminator model.
Attributes:
ndf (int): Variable controlling discriminator feature map sizes.
loss_type (str): Name of loss to use for GAN loss. | 6259907491f36d47f2231b20 |
class DependencyMapper(CSECachingMapperMixin, Collector): <NEW_LINE> <INDENT> def __init__(self, include_subscripts=True, include_lookups=True, include_calls=True, include_cses=False, composite_leaves=None): <NEW_LINE> <INDENT> if composite_leaves is False: <NEW_LINE> <INDENT> include_subscripts = False <NEW_LINE> incl... | Maps an expression to the :class:`set` of expressions it
is based on. The ``include_*`` arguments to the constructor
determine which types of objects occur in this output set.
If all are *False*, only :class:`pymbolic.primitives.Variable`
instances are included. | 62599074e5267d203ee6d04f |
class Output: <NEW_LINE> <INDENT> def __init__(self, output): <NEW_LINE> <INDENT> self.beta = output[0] <NEW_LINE> self.sd_beta = output[1] <NEW_LINE> self.cov_beta = output[2] <NEW_LINE> if len(output) == 4: <NEW_LINE> <INDENT> self.__dict__.update(output[3]) <NEW_LINE> self.stopreason = _report_error(self.info) <NEW_... | The Output class stores the output of an ODR run.
Attributes
----------
beta : ndarray
Estimated parameter values, of shape (q,).
sd_beta : ndarray
Standard deviations of the estimated parameters, of shape (p,).
cov_beta : ndarray
Covariance matrix of the estimated parameters, of shape (p,p).
delta : ndarr... | 6259907471ff763f4b5e90cd |
class Resource(mongoengine.EmbeddedDocument): <NEW_LINE> <INDENT> meta = dict(allow_inheritance=True) <NEW_LINE> name = fields.StringField(required=True) | The image store file access abstraction. | 6259907466673b3332c31d22 |
class EditVehicleSubclass(View, LoginRequiredMixin): <NEW_LINE> <INDENT> template = 'vehicle/edit_vehicle_subclass.html' <NEW_LINE> context = {} <NEW_LINE> form_class = None <NEW_LINE> @staticmethod <NEW_LINE> def determine_subclass(listing, vehicle_type, new): <NEW_LINE> <INDENT> if new: <NEW_LINE> <INDENT> return Non... | This class based view will handle updating vehicle subclasses | 62599074d268445f2663a7ef |
class Probe(object): <NEW_LINE> <INDENT> level = None <NEW_LINE> name = None <NEW_LINE> last_measure = {} <NEW_LINE> last_measure_time = {} <NEW_LINE> home = None <NEW_LINE> def __init__(self, options): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def check(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def run(se... | Base class for all plugins. | 62599074627d3e7fe0e087ab |
class Error(Exception): <NEW_LINE> <INDENT> pass | general error exception | 625990747047854f46340cdc |
class IPQueue(object): <NEW_LINE> <INDENT> def __init__(self, maxlen=200, ttl=360): <NEW_LINE> <INDENT> self._ips = deque() <NEW_LINE> self._counter = dict() <NEW_LINE> self._last_update = dict() <NEW_LINE> self._maxlen = maxlen <NEW_LINE> self._ttl = float(ttl) <NEW_LINE> self._lock = threading.RLock() <NEW_LINE> <DED... | IP Queue that keeps a counter for each IP.
When an IP comes in, it's append in the left and the counter
initialized to 1.
If the IP is already in the queue, its counter is incremented,
and it's moved back to the left.
When the queue is full, the right element is discarded.
Elements that are too old gets discarded, ... | 625990747b25080760ed8976 |
class CategoryView(GenericAPIView): <NEW_LINE> <INDENT> queryset = GoodsCategory.objects.all() <NEW_LINE> def get(self, request, pk=None): <NEW_LINE> <INDENT> ret = { 'cat1': '', 'cat2': '', 'cat3': '', } <NEW_LINE> category = self.get_object() <NEW_LINE> if category.parent is None: <NEW_LINE> <INDENT> ret['cat1'] = Ch... | 商品列表页面包屑导航 | 62599074167d2b6e312b8222 |
class EnergyBand(): <NEW_LINE> <INDENT> def __init__(self, lo, hi, token): <NEW_LINE> <INDENT> self._lo = lo <NEW_LINE> self._hi = hi <NEW_LINE> self._token = token <NEW_LINE> <DEDENT> @property <NEW_LINE> def lo(self): <NEW_LINE> <INDENT> return self._lo <NEW_LINE> <DEDENT> @property <NEW_LINE> def hi(self): <NEW_LINE... | Something to hold all the energy band specific stuff
The energy band is defined by the low energy cutoff, high energy
cutoff, and a label to be use eg when plotting.
>>> broad = EnergyBand(0.5, 7.0, "B") | 625990744e4d562566373d2b |
@attr.s <NEW_LINE> class InstanceLocationConfig: <NEW_LINE> <INDENT> host = attr.ib(type=str) <NEW_LINE> port = attr.ib(type=int) | The host and port to talk to an instance via HTTP replication. | 6259907423849d37ff8529db |
class ConfigHelper: <NEW_LINE> <INDENT> def __init__(self, context): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> <DEDENT> def load(self, config_variable, config_file, suite): <NEW_LINE> <INDENT> config_data = os.environ.get(config_variable, None) <NEW_LINE> if not config_data: <NEW_LINE> <INDENT> log.info("Lo... | Parses config | 625990744f88993c371f11b3 |
class RemoveGroupTask(MinionCmdTask): <NEW_LINE> <INDENT> PARAMS = MinionCmdTask.PARAMS <NEW_LINE> def __init__(self, job): <NEW_LINE> <INDENT> super(RemoveGroupTask, self).__init__(job) <NEW_LINE> self.cmd = TaskTypes.TYPE_REMOVE_GROUP <NEW_LINE> self.type = TaskTypes.TYPE_REMOVE_GROUP <NEW_LINE> <DEDENT> def execute(... | Minion task to remove storage group
Current implementation just renames the backend base path
so that automatic configuration could skip backend when
the node is being started. | 6259907497e22403b383c828 |
class City(Base): <NEW_LINE> <INDENT> __tablename__ = 'cities' <NEW_LINE> id = Column(Integer, primary_key=True, autoincrement=True) <NEW_LINE> name = Column(String(128), nullable=False) <NEW_LINE> state_id = Column(Integer, ForeignKey('states.id'), nullable=False) | Represents a city | 62599074cc0a2c111447c763 |
class BreweryApiMixin(APIView): <NEW_LINE> <INDENT> serializer_class = serializers.BrewerySerializer <NEW_LINE> permission_classes = (IsAuthenticated, permissions.IsMemberOfBrewingCompany) <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> return models.Brewery.objects.filter( company__group__user=self.request.user... | Common REST API view information for ``Brewery`` model. | 625990743346ee7daa3382f2 |
class Pwd(Command): <NEW_LINE> <INDENT> def run(self, input_stream, env): <NEW_LINE> <INDENT> return CommandResult(env.get_cur_dir()) | команда pwd отображает текущую рабочую директорию
например, pwd | 625990744f6381625f19a13c |
class I18nBuilder(Builder): <NEW_LINE> <INDENT> name = 'i18n' <NEW_LINE> versioning_method = 'text' <NEW_LINE> versioning_compare = None <NEW_LINE> use_message_catalog = False <NEW_LINE> def init(self): <NEW_LINE> <INDENT> super().init() <NEW_LINE> self.env.set_versioning_method(self.versioning_method, self.env.config.... | General i18n builder. | 62599074435de62698e9d72c |
class TestStore(object): <NEW_LINE> <INDENT> def test_build_is_not_persistent(self, alchemy_store, alchemy_category_factory): <NEW_LINE> <INDENT> assert alchemy_store.session.query(AlchemyCategory).count() == 0 <NEW_LINE> alchemy_category_factory.build() <NEW_LINE> assert alchemy_store.session.query(AlchemyCategory).co... | Tests to make sure our store/test setup behaves as expected. | 62599074d486a94d0ba2d8dd |
class CommandOutput(object): <NEW_LINE> <INDENT> openapi_types = { 'status': 'ProcessingStatus', 'errors': 'list[Error]' } <NEW_LINE> attribute_map = { 'status': 'status', 'errors': 'errors' } <NEW_LINE> def __init__(self, status=None, errors=None, local_vars_configuration=None): <NEW_LINE> <INDENT> if local_vars_confi... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually. | 6259907471ff763f4b5e90cf |
class HstackDiag(nn.Module): <NEW_LINE> <INDENT> def __init__(self, size, deg=0, diag1=None, diag2=None): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.size = size <NEW_LINE> self.diag1 = diag1 or nn.Parameter(torch.randn(size, 2, 2, deg + 1)) <NEW_LINE> self.diag2 = diag2 or nn.Parameter(torch.randn(size, 2, ... | Horizontally stacked diagonal matrices of size n x 2n. Each entry in a 2x2
matrix of polynomials. | 625990742c8b7c6e89bd510d |
class GenreListView(ListView): <NEW_LINE> <INDENT> paginate_by = 5 <NEW_LINE> template_name = "refferences_db/genre_list_view.html" <NEW_LINE> model = Genre | displays a list of all Genre objects | 6259907492d797404e3897ee |
class MF_moMF_MB_dec(RL_agent): <NEW_LINE> <INDENT> def __init__(self, kernels = ['bs', 'ck', 'rb']): <NEW_LINE> <INDENT> self.name = 'MF_moMF_MB_dec' <NEW_LINE> self.param_names = ['alpQ', 'decQ','alpP', 'decP', 'lbd' , 'alpT', 'decT', 'G_td', 'G_tdm', 'G_mb'] <NEW_LINE> self.param_ranges = ['unit']*7 + ['pos']*3 <NE... | Mixture agent with forgetting and motor level model free, seperate learning rates
for motor and choice level model free. | 6259907421bff66bcd72458d |
class ShiftDetails(ModelSQL, ModelView): <NEW_LINE> <INDENT> __name__ = 'attendance.shiftdetails' <NEW_LINE> slot = fields.Char('Slot') <NEW_LINE> in_time = fields.Time('In Time') <NEW_LINE> out_time = fields.Time('Out Time') <NEW_LINE> monday = fields.Boolean('Monday') <NEW_LINE> tuesday = fields.Boolean('Tuesday') <N... | Shift Details | 625990747d43ff24874280a6 |
class ProcessedDataSave: <NEW_LINE> <INDENT> def __init__(self, universe_vigeo_df, saving_path): <NEW_LINE> <INDENT> self.universe_vigeo_df = universe_vigeo_df <NEW_LINE> self.saving_path = saving_path <NEW_LINE> <DEDENT> def save_file(self): <NEW_LINE> <INDENT> self._drop_column() <NEW_LINE> self.universe_vigeo_df.to_... | Save a DataFrame with vigeo keys merged values.
Attributes
----------
universe_vigeo_df: pandas.DataFrame
saving_path: str
Methods
-------
__init__
save_file | 625990744e4d562566373d2d |
class StaleBeamSearch(ExplorationPolicy): <NEW_LINE> <INDENT> def __init__(self, decoder, config, normalization, train): <NEW_LINE> <INDENT> if not train: <NEW_LINE> <INDENT> raise ValueError( "Stale Beam Search should only be used at train time") <NEW_LINE> <DEDENT> super(StaleBeamSearch, self).__init__( decoder, conf... | Performs beam search every max_age iterations.
On the other iterations, returns the stale beams.
NOTE: Does not recalculate scores
Args:
decoder (Decoder)
config (Config)
normalization (NormalizationOptions)
fresh_policy (ExplorationPolicy): the policy that runs to obtain
fresh beams
train ... | 62599074f548e778e596ceb5 |
class ObjectManager(AbstractManager): <NEW_LINE> <INDENT> name = 'object_manager' <NEW_LINE> type = 'common' <NEW_LINE> types = ('common',) <NEW_LINE> def __init__(self, object_configs=None, **kwargs): <NEW_LINE> <INDENT> super(ObjectManager, self).__init__(**kwargs) <NEW_LINE> self.config = context.app_config['contain... | Common Object manager. Object managers manage objects of a specific type. There should a be a different object
manager for each type ('system' and 'nginx' for now).
Object managers should have a run action that follows the following run pattern: discover, start objects, schedule
cloud commands. | 625990747b25080760ed8977 |
class LockedMachine(Machine): <NEW_LINE> <INDENT> event_cls = LockedEvent <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self._ident = IdentManager() <NEW_LINE> try: <NEW_LINE> <INDENT> self.machine_context = listify(kwargs.pop('machine_context')) <NEW_LINE> <DEDENT> except KeyError: <NEW_LINE> <IN... | Machine class which manages contexts. In it's default version the machine uses a `threading.Lock`
context to lock access to its methods and event triggers bound to model objects.
Attributes:
machine_context (dict): A dict of context managers to be entered whenever a machine method is
called or an event ... | 625990742c8b7c6e89bd510e |
class BoutonDessin(Bouton): <NEW_LINE> <INDENT> def __init__(self, parent=None, height=None, signal=None, dessin=None): <NEW_LINE> <INDENT> Bouton.__init__(self, parent=parent, height=height, signal=signal) <NEW_LINE> Bouton.config(image=dessin) | Classe dérivée de la classe Bouton, à laquelle on ajoute un dessin
| 62599074ad47b63b2c5a9174 |
class ExceptionHandler(object): <NEW_LINE> <INDENT> def render(self, request_error): <NEW_LINE> <INDENT> raise NotImplementedError() | Base class for exception handler. | 625990744f6381625f19a13d |
class DeletionProxy(CustomProxy): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(DeletionProxy, self).__init__(*args, **kwargs) <NEW_LINE> self._options["KO phenotype"] = self._filter_ko_phenotype <NEW_LINE> self._options["Partial phenotype"] = self._filter_partial_phenotype <NEW_LIN... | QSortFilterProxyModel to be used in deletion solution dialogs
This proxy model allows the user to filter for categories
relevant to deletion solutions. | 62599074097d151d1a2c299a |
class Router: <NEW_LINE> <INDENT> def __init__(self, table=None, policy=None, status=Status.uninitialized): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.table = None <NEW_LINE> self.policy = None <NEW_LINE> self.install_table(table) <NEW_LINE> self.install_policy(policy) <NEW_LINE> self.status = status <NEW_L... | This class model a generic router of the network | 625990748e7ae83300eea9b8 |
class ArgPlugin(InterfaceActionBase): <NEW_LINE> <INDENT> name = 'ARG Plugin' <NEW_LINE> description = 'A plugin to interact with ARG collections' <NEW_LINE> supported_platforms = ['windows', 'osx', 'linux'] <NEW_LINE> author = 'Alex Kosloff' <NEW_LINE> version = (1, 0, 0... | This class is a simple wrapper that provides information about the actual
plugin class. The actual interface plugin class is called InterfacePlugin
and is defined in the ui.py file, as specified in the actual_plugin field
below.
The reason for having two classes is that it allows the command line
calibre utilities to ... | 625990747047854f46340cdf |
class Money: <NEW_LINE> <INDENT> def __init__(self, amount, currency): <NEW_LINE> <INDENT> self.currency = currency <NEW_LINE> self.amount = amount <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> if self.currency.symbol: <NEW_LINE> <INDENT> return f"{self.currency.symbol}{self.amount:.{self.currency.digits}f... | Represents an amount of money. Requires an amount and a currency. | 62599074283ffb24f3cf51d1 |
class FREQuency(SCPINode, SCPIQuery, SCPISet): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> _cmd = "FREQuency" <NEW_LINE> args = ["1"] <NEW_LINE> class STEP(SCPINode): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> _cmd = "STEP" <NEW_LINE> args = [] <NEW_LINE> class INCRement(SCPINode, SCPIQuery, SCPISet): <NEW_LINE> <... | SOURce:MARKer:FREQuency
Arguments: 1 | 62599074e5267d203ee6d051 |
class _Mouse(threading.Thread): <NEW_LINE> <INDENT> BUTTON_1 = 1 << 1 <NEW_LINE> BUTTON_2 = 1 << 2 <NEW_LINE> BUTTONS = BUTTON_1 & BUTTON_2 <NEW_LINE> HEADER = 1 << 3 <NEW_LINE> XSIGN = 1 << 4 <NEW_LINE> YSIGN = 1 << 5 <NEW_LINE> INSTANCE = None <NEW_LINE> def __init__(self, mouse='mice', restrict=True, width=1920, hei... | holds Mouse object, see also (the preferred) events methods | 62599074091ae35668706560 |
class GazeboGroundTruth: <NEW_LINE> <INDENT> def __init__(self, model_name, model_new_name, publish_pose=True): <NEW_LINE> <INDENT> self.model_name = model_name <NEW_LINE> self.model_new_name = model_new_name <NEW_LINE> self.model_pose = PoseStamped() <NEW_LINE> self.br = tf2_ros.TransformBroadcaster() <NEW_LINE> if no... | This code publishes a transform from the model to map/world frame.
Use this tf to validate other sensor errors.
link_name: finds | 625990745fcc89381b266dec |
class TabuSearch(Optimizer): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> return None | Optimization Algorithms: Tabu Search | 625990745166f23b2e244cfc |
class ReportOrderableReferenceField(ExtensionField, ExtensionFieldMixin, ReferenceField): <NEW_LINE> <INDENT> pass | Archetypes SchemaExtender aware reference field | 6259907460cbc95b06365a01 |
class Field(object): <NEW_LINE> <INDENT> def __init__(self, name=None, value=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> if isinstance(value, str): <NEW_LINE> <INDENT> self.original_value = value <NEW_LINE> <DEDENT> elif value: <NEW_LINE> <INDENT> self.original_value = repr(value) <NEW_LINE> <DEDENT> else: <... | An ABOUT file field. The initial value is a string. Subclasses can and
will alter the value type as needed. | 625990744e4d562566373d2f |
class MCommand(click.MultiCommand): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.commands = commands(*args, **kwargs) <NEW_LINE> if kwargs and click_args: <NEW_LINE> <INDENT> kwargs.update(click_args) <NEW_LINE> <DEDENT> click.MultiCommand.__init__(self, *args, **kwargs) <NEW_LINE> ... | Treadmill CLI driver. | 6259907466673b3332c31d27 |
class ClientFuncsDict(MutableMapping): <NEW_LINE> <INDENT> def __init__(self, client): <NEW_LINE> <INDENT> self.client = client <NEW_LINE> <DEDENT> def __getattr__(self, attr): <NEW_LINE> <INDENT> return getattr(self.client.functions, attr) <NEW_LINE> <DEDENT> def __setitem__(self, key, val): <NEW_LINE> <INDENT> raise ... | Class to make a read-only dict for accessing runner funcs "directly" | 625990744527f215b58eb634 |
class TestPublicTrade(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 testPublicTrade(self): <NEW_LINE> <INDENT> pass | PublicTrade unit test stubs | 6259907463b5f9789fe86a8d |
class SubmitFile(models.Model): <NEW_LINE> <INDENT> project_name = models.CharField(u'项目名称', max_length=32) <NEW_LINE> profile = models.FileField(u'配置文件', upload_to='uploads/profile') <NEW_LINE> tech_template = models.ForeignKey(TechTemplate, verbose_name=u'技术方案模版',) <NEW_LINE> submit_time = models.DateTimeField(u'提交时间... | 提交表 | 625990743346ee7daa3382f4 |
class mydnnnetwork(): <NEW_LINE> <INDENT> def __init__(self,dataname,modeldir,flag): <NEW_LINE> <INDENT> self.trainsize=250000 <NEW_LINE> self.batchsize=10000 <NEW_LINE> self.validatesize=40000 <NEW_LINE> self.datadim=[9,1] <NEW_LINE> self.startlearningrate= 0.01 <NEW_LINE> self.classificationthreshold = 999 <NEW_LINE>... | define every specific network | 62599074baa26c4b54d50bd6 |
class BaseException(Exception): <NEW_LINE> <INDENT> pass | Base exception for steps. | 6259907492d797404e3897ef |
class BatchSequence(Sequence): <NEW_LINE> <INDENT> def __init__(self, input_dir, y, batch_size, session, desired_size=DESIRED_IMAGE_SIZE): <NEW_LINE> <INDENT> self.input_dir = input_dir <NEW_LINE> self.desired_size = desired_size <NEW_LINE> self.session = session <NEW_LINE> self.x = ['{}.jpg'.format(i+1) for i in range... | This class generates batches that can be provided to a neural network.
It can be used for validation only. For training use the BatchGenerator class.
Arguments:
Sequence {class} -- a sequence never repeats items. | 6259907455399d3f05627e41 |
@unittest.skipUnless(settings.RUN_BLOCKSTORE_TESTS, "Requires a running Blockstore server") <NEW_LINE> class BundleCacheClearTest(TestWithBundleMixin, unittest.TestCase): <NEW_LINE> <INDENT> def test_bundle_cache_clear(self): <NEW_LINE> <INDENT> cache = BundleCache(self.bundle.uuid) <NEW_LINE> key1 = ("some", "key", "1... | Tests for BundleCache's clear() method.
Requires MAX_BLOCKSTORE_CACHE_DELAY to be non-zero. This clear() method does
not actually clear the cache but rather just means "a new bundle/draft
version has been created, so immediately start reading/writing cache keys
using the new version number. | 6259907444b2445a339b75f2 |
class Seed(Command): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def register_arguments(parser): <NEW_LINE> <INDENT> parser.add_argument('users', type=int) <NEW_LINE> parser.add_argument('--max-bytes', type=int, default=DEFAULT_MAX_BYTES) <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> Log.info('Seeding %d user... | Seed the database | 62599074cc0a2c111447c765 |
class DoraemonListAPI(Resource): <NEW_LINE> <INDENT> __abstract__ = True <NEW_LINE> def __init__(self, obj, ignore=None, **kw): <NEW_LINE> <INDENT> super(DoraemonListAPI, self).__init__() <NEW_LINE> self.parser = reqparse.RequestParser() <NEW_LINE> self.parser.add_argument( 'page', type=inputs.positive, help='Page must... | Super DataList Restful API.
Supported By Eater.
Methods: GET (Readonly)
Pay attention pls:
Attributes 'parms' and 'obj' are asked during implementation.
'params': a list of retrievable arguments of 'obj', can be [] or ().
'obj': an instance of one of the models belonging to Eater. | 6259907499cbb53fe6832813 |
class CookiesTransport(xmlrpc.client.Transport): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._cookies = [] <NEW_LINE> <DEDENT> def send_headers(self, connection, headers): <NEW_LINE> <INDENT> if self._cookies: <NEW_LINE> <INDENT> connection.putheader("Cookie", "; ".joi... | Only used for the class tapatalk itself.
http://stackoverflow.com/a/25876504 | 6259907401c39578d7f143c9 |
class EndpointParseException(Ice.LocalException): <NEW_LINE> <INDENT> def __init__(self, str=''): <NEW_LINE> <INDENT> self.str = str <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return IcePy.stringifyException(self) <NEW_LINE> <DEDENT> __repr__ = __str__ <NEW_LINE> _ice_name = 'Ice::EndpointParseException... | This exception is raised if there was an error while parsing an
endpoint. | 6259907497e22403b383c82c |
class FpTree(Tree): <NEW_LINE> <INDENT> def __init__(self, transactions, supportThreshold): <NEW_LINE> <INDENT> super(FpTree, self).__init__(root=FpTreeNode(name='root', count=0, parent=None)) <NEW_LINE> self.supportThreshold = supportThreshold <NEW_LINE> self.items = [] <NEW_LINE> self.itemCounts = {} <NEW_LINE> self.... | FPTree树实现,继承自Tree | 625990745fc7496912d48efe |
class KwargsOrDoubleStarred: <NEW_LINE> <INDENT> pass | kwarg_or_double_starred:
| NAME '=' expression
| '**' expression
| 6259907416aa5153ce401e03 |
class Employee: <NEW_LINE> <INDENT> empCount = 0 <NEW_LINE> def __init__(self, name, salary): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.salary = salary <NEW_LINE> Employee.empCount += 1 <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def display_count(): <NEW_LINE> <INDENT> print("Total Employee %d" % Employee.... | Common base class for all employees | 6259907426068e7796d4e266 |
class ReleasingByMerge(ReleasingMixin): <NEW_LINE> <INDENT> def release_can_be_skipped(self, ticket): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def release_ticket(self, ticket): <NEW_LINE> <INDENT> from .q import Q <NEW_LINE> if not self.settings.RELEASE_BRANCH: <NEW_LINE> <INDENT> raise QError("Must set REL... | Simply merge the ticket to the master. | 62599074097d151d1a2c299d |
class NlpApiCaller(ApiCaller): <NEW_LINE> <INDENT> update_state = pyqtSignal(str, int, dict) <NEW_LINE> signal_indicator = pyqtSignal(str, str) <NEW_LINE> def __init__(self, text): <NEW_LINE> <INDENT> ApiCaller.__init__(self, text) <NEW_LINE> self.logger = logging.getLogger(type(self).__name__) <NEW_LINE> <DEDENT> def ... | API class for NLP API
https://github.com/suricats/surirobot-api-converse | 62599074dd821e528d6da617 |
class DPEncoder(FairseqEncoder): <NEW_LINE> <INDENT> def __init__(self, dictionary, embed_dim=256, max_positions=1024, pos="learned", num_layers=2, num_heads=8, filter_size=256, hidden_size=256, dropout=0.1, attention_dropout=0.1, relu_dropout=0.1, convolutions=4): <NEW_LINE> <INDENT> super().__init__(dictionary) <NEW_... | Transformer encoder. | 625990742ae34c7f260aca0f |
class ChanceEventSampler(object): <NEW_LINE> <INDENT> def __init__(self, seed=None): <NEW_LINE> <INDENT> self.seed(seed) <NEW_LINE> <DEDENT> def seed(self, seed=None): <NEW_LINE> <INDENT> self._rng = np.random.RandomState(seed) <NEW_LINE> <DEDENT> def __call__(self, state): <NEW_LINE> <INDENT> actions, probs = zip(*sta... | Default sampler for external chance events. | 62599074adb09d7d5dc0be95 |
class LoteImportacion12(RN3811): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(LoteImportacion12, self).__init__() <NEW_LINE> self.cuit_contribuyente = None <NEW_LINE> self.fecha_percepcion = None <NEW_LINE> self.tipo_comprobante = None <NEW_LINE> self.letra_comprobante = None <NEW_LINE> self.nro_su... | Registro de campos que conforman una alícuota de un comprobante.
Resolución Normativa Nº 038/11
1.2. Percepciones Act. 7 método Percibido (quincenal) | 6259907432920d7e50bc7972 |
class Muparser(Package): <NEW_LINE> <INDENT> homepage = "http://muparser.beltoforion.de/" <NEW_LINE> url = "https://github.com/beltoforion/muparser/archive/v2.2.5.tar.gz" <NEW_LINE> version('2.2.6.1', '410d29b4c58d1cdc2fc9ed1c1c7f67fe') <NEW_LINE> version('2.2.5', '02dae671aa5ad955fdcbcd3fee313fb7') <NEW_LINE> pat... | C++ math expression parser library. | 6259907491f36d47f2231b24 |
class SystemMode(enum.IntEnum): <NEW_LINE> <INDENT> OFF = 0x00 <NEW_LINE> HEAT_COOL = 0x01 <NEW_LINE> COOL = 0x03 <NEW_LINE> HEAT = 0x04 <NEW_LINE> AUX_HEAT = 0x05 <NEW_LINE> PRE_COOL = 0x06 <NEW_LINE> FAN_ONLY = 0x07 <NEW_LINE> DRY = 0x08 <NEW_LINE> SLEEP = 0x09 | ZCL System Mode attribute enum. | 6259907455399d3f05627e44 |
class _TimelimitThread(threading.Thread): <NEW_LINE> <INDENT> def __init__( self, cgroups, hardtimelimit, softtimelimit, walltimelimit, pid_to_kill, cores, callbackFn=lambda reason: None, ): <NEW_LINE> <INDENT> super(_TimelimitThread, self).__init__() <NEW_LINE> self.name = "TimelimitThread-" + self.name <NEW_LINE> sel... | Thread that periodically checks whether the given process has already
reached its timelimit. After this happens, the process is terminated. | 625990742c8b7c6e89bd5113 |
class Config(dict): <NEW_LINE> <INDENT> _defaults = {} <NEW_LINE> _aliases = {} <NEW_LINE> def __init__( self, path: str | Path | None = None, _loaded_from_file: bool = False, *args, **kwargs, ): <NEW_LINE> <INDENT> self.path = Path(path) if path is not None else None <NEW_LINE> self._loaded_from_file = _loaded_from_fi... | Simple over-ride of dict that adds a context manager.
Allows to specify extra config options, but ensures that all specified options
are defined. | 625990744f88993c371f11b6 |
class SplitFailed(Exception): <NEW_LINE> <INDENT> pass | One of the following situations may raise this error:
1. | 625990747cff6e4e811b736c |
class MGMSG_MOT_REQ_PMDMOTOROUTPUTPARAMS(MessageWithoutData): <NEW_LINE> <INDENT> message_id = 0x04DB <NEW_LINE> _params_names = ['message_id'] + ['chan_ident', None] + ['dest', 'source'] | See :class:`MGMSG_MOT_SET_PMDMOTOROUTPUTPARAMS`.
:param chan_ident: channel number (0x01, 0x02)
:type chan_ident: int | 62599074a8370b77170f1cf7 |
class Device(base.Device): <NEW_LINE> <INDENT> COMMAND_OFF = 0x00 <NEW_LINE> COMMAND_ON = 0x01 <NEW_LINE> def on(self, addr, src_ep, seq, disable_default_rsp): <NEW_LINE> <INDENT> from ....protocol.zigbee import command <NEW_LINE> self.zcl_command(addr, src_ep, CLUSTER_ID, self.COMMAND_ON, 1, command.Packet.ZCL_FRAME_C... | ZCL device class which supports on/off cluster | 62599074460517430c432cee |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.