code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class UserAuth(models.Model): <NEW_LINE> <INDENT> TYPE_CHOICES = [ ("email", "Email"), ("twitter", "Twitter"), ("facebook", "Facebook"), ("google", "Google"), ] <NEW_LINE> user = models.ForeignKey(User, related_name="auths") <NEW_LINE> type = models.CharField(max_length=30, choices=TYPE_CHOICES) <NEW_LINE> identifier =...
A way of authenticating a user. Generally either a third-party verifiable identity using OAuth or similar, or an identity token the user can provide themselves like an email address that will be combined with the password field on User. Each identity backend should have a single "identifier" field that can be looked u...
625990917cff6e4e811b772b
class PepConstructingUserClass( PepValue, PepTypeMatcher ): <NEW_LINE> <INDENT> def __init__( self, userclass ): <NEW_LINE> <INDENT> PepValue.__init__( self ) <NEW_LINE> self.userclass = userclass <NEW_LINE> <DEDENT> def construction_args( self ): <NEW_LINE> <INDENT> return ( self.userclass, ) <NEW_LINE> <DEDENT> def m...
A wrapper around a class that specifies that it is still being constructed. At the moment this wrapper is automatically applied (in cpprenderer.py!) but I think at some point you will have to declare it explicitly with something like: def_init( constructing(MyClass) self )
62599091ad47b63b2c5a953a
class MainApp(App): <NEW_LINE> <INDENT> title = 'Simple painter' <NEW_LINE> def build(self): <NEW_LINE> <INDENT> return MainWindow()
Класс приложения
62599091091ae3566870691e
class DirShouldNotHaveFiles(PhotolibDirLinter): <NEW_LINE> <INDENT> def __call__(self, abspath: str, workspace_relpath: str, dirnames: typing.List[str], filenames: typing.List[str], files_ignored: bool): <NEW_LINE> <INDENT> del files_ignored <NEW_LINE> if common.PHOTOLIB_LEAF_DIR_RE.match(workspace_relpath): <NEW_LINE>...
Checks whether a non-leaf directory contains files.
62599091ad47b63b2c5a953c
class ListEntityTypesRequest(proto.Message): <NEW_LINE> <INDENT> parent = proto.Field(proto.STRING, number=1,) <NEW_LINE> language_code = proto.Field(proto.STRING, number=2,) <NEW_LINE> page_size = proto.Field(proto.INT32, number=3,) <NEW_LINE> page_token = proto.Field(proto.STRING, number=4,)
The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypes]. Attributes: parent (str): Required. The agent to list all entity types from. Supported formats: - ``projects/<Project ID>/agent`` - ``projects/<Project ID>/location...
62599091099cdd3c6367626f
class ProfileCommand(Command): <NEW_LINE> <INDENT> description = 'Run profile from setup' <NEW_LINE> user_options = [ ('abc', None, 'abc')] <NEW_LINE> def initialize_options(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def finalize_options(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def run(self): <NEW_L...
Run profile from setup.
625990913617ad0b5ee07e3c
class ServiceState(Enum): <NEW_LINE> <INDENT> REQUIRED = 0 <NEW_LINE> OPTIONAL = 1 <NEW_LINE> CONFLICTED = 2
Service interaction states
6259909150812a4eaa621a3c
@expand_message_class <NEW_LINE> class PresGetMatchingCredentials(AdminHolderMessage): <NEW_LINE> <INDENT> message_type = "presentation-get-matching-credentials" <NEW_LINE> class Fields: <NEW_LINE> <INDENT> presentation_exchange_id = fields.Str( required=True, description="Presentation to match credentials to.", exampl...
Retrieve matching credentials for a presentation request.
6259909160cbc95b06365bde
class ExposedAttachHandler(Vulnerability, Event): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Vulnerability.__init__(self, Kubelet, "Exposed Attaching To Container", category=RemoteCodeExec)
Opens a websocket that could enable an attacker to attach to a running container
625990913617ad0b5ee07e3e
class _DataStats(NamedTuple): <NEW_LINE> <INDENT> x_min: float <NEW_LINE> y_min: float <NEW_LINE> x_max: float <NEW_LINE> y_max: float <NEW_LINE> y_median: float <NEW_LINE> x_bins: float <NEW_LINE> x_bin_size: float <NEW_LINE> y_bins: float <NEW_LINE> y_bin_size: float <NEW_LINE> x_delta: float <NEW_LINE> y_delta: floa...
Internal class for storing values computed from the data. .. attribute:: x_min, x_max: Minimum and maximum x-axis datapoints. .. attribute:: y_min, y_max: Minimum and maximum y-axis datapoints. .. attribute:: y_median: Median y-axis datapoint, for calculating scaling of y-axis. .. attribute:: x_bins, x_bin...
625990918a349b6b43687f4d
class EndActionStatement(Statement): <NEW_LINE> <INDENT> def convertToFDL(self): <NEW_LINE> <INDENT> return str.format(customize.endActionTemplate, **self.attributes) <NEW_LINE> <DEDENT> def entityList(self): <NEW_LINE> <INDENT> return [('object','any')] <NEW_LINE> <DEDENT> def bookmarkAttribute(self): <NEW_LINE> <INDE...
Represents the action end FDL statement.
62599091656771135c48aea8
@provider.configure(name="VirshProvider") <NEW_LINE> class VirshProvider(provider.ProviderFactory): <NEW_LINE> <INDENT> CONFIG_SCHEMA = { "type": "object", "properties": { "type": { "type": "string" }, "connection": { "type": "string", "pattern": "^.+@.+$" }, "template_name": { "type": "string" }, "template_user": { "t...
Create VMs from prebuilt templates. Sample configuration: { "type": "VirshProvider", "connection": "alex@performance-01", # ssh connection to vms host "template_name": "stack-01-devstack-template", # vm image template "template_user": "ubuntu", # vm user to launch devstack ...
62599091ad47b63b2c5a9540
class File(TelegramObject): <NEW_LINE> <INDENT> def __init__(self, file_id, **kwargs): <NEW_LINE> <INDENT> self.file_id = str(file_id) <NEW_LINE> self.file_size = int(kwargs.get('file_size', 0)) <NEW_LINE> self.file_path = str(kwargs.get('file_path', '')) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def de_json(data): ...
This object represents a Telegram File. Attributes: file_id (str): file_size (str): file_path (str): Args: file_id (str): **kwargs: Arbitrary keyword arguments. Keyword Args: file_size (Optional[int]): file_path (Optional[str]):
62599091091ae35668706924
class Erdos_Renyi(AbstractGenerator): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def _get_default_params(cls) -> Dict: <NEW_LINE> <INDENT> return {'p': .1, 'self_loop': False} <NEW_LINE> <DEDENT> def _generate_structure(self) -> np.ndarray: <NEW_LINE> <INDENT> mat: np.ndarray = np.random.choice([1,0], size=(self.n, se...
Erdos-Renyi graph generator. Uses G(n,p) model. ###TODO: G(n,p) may be unsatisfactory for small n. exchange models based on n? # TODO: documentation in Generator.py For method documentation see AbstractGenerator.py Parameters p: probability of given edge connection. default .1 self_loop: whether or not to...
62599091d8ef3951e32c8cd5
class DellBooleanFalseOk(DellBoolean): <NEW_LINE> <INDENT> okStates = ('False')
The DellBooleanFalseOk class inherits from the DellBoolean class with the only difference being that DellBooleanFalseOk adds the okStates attribute.
62599091283ffb24f3cf5591
class UserNotFoundException(APIException): <NEW_LINE> <INDENT> status_code = 404 <NEW_LINE> detail = "You are not apparently part of the system."
The user is not part of the system.
6259909155399d3f05628208
class SheetsSupport(SheetsABC): <NEW_LINE> <INDENT> def __init__(self, sheet_id, spreadsheet_id): <NEW_LINE> <INDENT> self.sheet_id = sheet_id <NEW_LINE> self.spreadsheet_id = spreadsheet_id <NEW_LINE> self.sheet_service = get_sheet_service().spreadsheets() <NEW_LINE> <DEDENT> def get_sheet_data(self): <NEW_LINE> <INDE...
Generic functions for interaction with the Google Sheets API.
625990913617ad0b5ee07e46
class SimpleDigestStorage(object): <NEW_LINE> <INDENT> implements(IDigestStorage) <NEW_LINE> def __init__(self, context): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> annot = IAnnotations(context) <NEW_LINE> listen_annot = annot.setdefault(PROJECTNAME, OOBTree()) <NEW_LINE> self.digest = listen_annot.setdefaul...
Create our stubs: >>> import email >>> from Products.listen.content.tests import DummyAnnotableList >>> from Products.listen.content.digest import SimpleDigestStorage >>> mlist = DummyAnnotableList() >>> digest_store = SimpleDigestStorage(mlist) >>> msg1 = email.message_from_string('message one') >>> msg2 = email.messa...
62599091f9cc0f698b1c6146
class AugustusExonLoss(AbstractAugustusClassifier): <NEW_LINE> <INDENT> @property <NEW_LINE> def rgb(self): <NEW_LINE> <INDENT> return self.colors["alignment"] <NEW_LINE> <DEDENT> def run(self, shortIntronSize=30): <NEW_LINE> <INDENT> self.getAugustusTranscriptDict() <NEW_LINE> self.getTranscriptDict() <NEW_LINE> class...
Does the augustus version of this transcript lose an exon? This is calculated by looking at the exon boundary intervals between the genePreds
6259909255399d3f0562820a
class CTD_ANON_27 (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 = None <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('/mnt/work/Bl...
Complex type [anonymous] with content type ELEMENT_ONLY
62599092d8ef3951e32c8cd8
class ListVirtualHubRouteTableV2SResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[VirtualHubRouteTableV2]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(ListVirtualHubRouteTableV2SRe...
List of VirtualHubRouteTableV2s and a URL nextLink to get the next set of results. :param value: List of VirtualHubRouteTableV2s. :type value: list[~azure.mgmt.network.v2021_02_01.models.VirtualHubRouteTableV2] :param next_link: URL to get the next set of operation list results if there are any. :type next_link: str
62599092099cdd3c63676275
class CustomerProfile(models.Model): <NEW_LINE> <INDENT> user = models.OneToOneField( "users.User", on_delete=models.CASCADE, related_name="customerprofile_user", ) <NEW_LINE> mobile_number = models.CharField(max_length=20,) <NEW_LINE> photo = models.URLField() <NEW_LINE> timestamp_created = models.DateTimeField(auto_n...
Generated Model
625990923617ad0b5ee07e4a
class DockerConfig(object): <NEW_LINE> <INDENT> ENV = args.ENV <NEW_LINE> MODE = args.MODE <NEW_LINE> DEBUG = args.DEBUG <NEW_LINE> POSTGRES_MASQUERADER_READ_WRITE = args.POSTGRES_MASQUERADER_READ_WRITE <NEW_LINE> MASQUERADER_LOCAL = args.MASQUERADER_LOCAL <NEW_LINE> POSTGRES_TEST_DSN = args.POSTGRES_TEST_DSN <NEW_LINE...
The main config part.
6259909255399d3f0562820e
class DefaultMethodController(object): <NEW_LINE> <INDENT> def options(self, req, allowed_methods, *args, **kwargs): <NEW_LINE> <INDENT> raise webob.exc.HTTPNoContent(headers=[('Allow', allowed_methods)]) <NEW_LINE> <DEDENT> def reject(self, req, allowed_methods, *args, **kwargs): <NEW_LINE> <INDENT> raise webob.exc.HT...
A default controller for handling requests. This controller handles the OPTIONS request method and any of the HTTP methods that are not explicitly implemented by the application.
62599092283ffb24f3cf559c
class Derivative: <NEW_LINE> <INDENT> def __init__(self, polynom): <NEW_LINE> <INDENT> self.polynom = polynom <NEW_LINE> self.operator = {"+": operator.add, "-": operator.sub, "*": operator.mul, "/": operator.div} <NEW_LINE> self.result = [] <NEW_LINE> <DEDENT> def __make_monom(self): <NEW_LINE> <INDENT> monoms = re.sp...
docstring for Derivative
62599092dc8b845886d552b5
class LBFGSParameter(ct.Structure): <NEW_LINE> <INDENT> _fields_ = [ ('m', ct.c_int), ('epsilon', ct.c_double), ('past', ct.c_int), ('delta', ct.c_double), ('max_iterations', ct.c_int), ('linesearch', ct.c_int), ('max_linesearch', ct.c_int), ('min_step', ct.c_double), ('max_step', ct.c_double), ('ftol', ct.c_double), (...
LBFGS parameters. See http://www.chokkan.org/software/liblbfgs/structlbfgs__parameter__t.html for documentation.
625990927cff6e4e811b7740
class FiniteSetsOrderedByInclusion(UniqueRepresentation, Parent): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Parent.__init__(self, category = Posets()) <NEW_LINE> <DEDENT> def _repr_(self): <NEW_LINE> <INDENT> return "An example of a poset: sets ordered by inclusion" <NEW_LINE> <DEDENT> def le(self, x,...
An example of a poset: finite sets ordered by inclusion This class provides a minimal implementation of a poset EXAMPLES:: sage: P = Posets().example(); P An example of a poset: sets ordered by inclusion We conclude by running systematic tests on this poset:: sage: TestSuite(P).run(verbose = True) ...
62599092099cdd3c63676279
class RelationDataContent(LazyMapping, MutableMapping): <NEW_LINE> <INDENT> def __init__(self, relation, entity, backend): <NEW_LINE> <INDENT> self.relation = relation <NEW_LINE> self._entity = entity <NEW_LINE> self._backend = backend <NEW_LINE> self._is_app = isinstance(entity, Application) <NEW_LINE> <DEDENT> def _l...
Data content of a unit or application in a relation.
62599092d8ef3951e32c8cdc
@six.add_metaclass(DomainObjectMetaclass) <NEW_LINE> class DomainObject(AbstractDomainObject): <NEW_LINE> <INDENT> pass
Base class for heirarchies with the default metaclass.
6259909297e22403b383cbf7
class Hset(RedisProtocol): <NEW_LINE> <INDENT> def __call__(self, hash_name, field, value, *args, **kwargs): <NEW_LINE> <INDENT> def output(): <NEW_LINE> <INDENT> self.setup_output(4) <NEW_LINE> self.write("HMSET") <NEW_LINE> self.write(hash_name) <NEW_LINE> self.write(field) <NEW_LINE> self.write(value) <NEW_LINE> <DE...
from pyredbulk import hset # HSET myhash field1 "Hello" with hset("/tmp/test.txt") as redis_insert: redis_insert(myhash, field1, "Hello") #
62599092f9cc0f698b1c614b
class Screen(Plane): <NEW_LINE> <INDENT> def __init__(self, width = 0.5184, height = 0.324, diagonal_size = 0.61, pixel_pitch = 0.270, resolution = (1920,1200), aspect_ratio = (16,10), curvature_radius=4.0): <NEW_LINE> <INDENT> self.width = width <NEW_LINE> self.height = height <NEW_LINE> self.diagonal_size = diagonal_...
Class for representing a 3D LCD screen
6259909255399d3f05628214
class QuestionModel: <NEW_LINE> <INDENT> v2 = Namespace('Questions', description = 'Questions Routes') <NEW_LINE> questions = v2.model('Question', { 'title': fields.String(required=True, description='This is the title of the question'), 'body': fields.String(required=True, description='This is the body of the question'...
Meetups input data
62599092d8ef3951e32c8cdd
class OptionsFile(SplittedFile): <NEW_LINE> <INDENT> @property <NEW_LINE> def options(self) -> List[str]: <NEW_LINE> <INDENT> return [self._strip_selected(value) for value in self.parse()] <NEW_LINE> <DEDENT> def _strip_selected(self, value: str) -> str: <NEW_LINE> <INDENT> return value[1:-1] if value.startswith("[") e...
File listing a set of options. It returns available options for a file, including the selected one, if present. For example, for a file containing:: foo [bar] baz :meth:`options` returns:: ['foo', 'bar', 'baz']
625990928a349b6b43687f61
class TestDataSetAPI: <NEW_LINE> <INDENT> def test_dset_illegal_dim(self, backend, iterset): <NEW_LINE> <INDENT> with pytest.raises(TypeError): <NEW_LINE> <INDENT> op2.DataSet(iterset, 'illegaldim') <NEW_LINE> <DEDENT> <DEDENT> def test_dset_illegal_dim_tuple(self, backend, iterset): <NEW_LINE> <INDENT> with pytest.rai...
DataSet API unit tests
6259909297e22403b383cbf9
class Factory: <NEW_LINE> <INDENT> def __init__(self, entity: t.Type[Entity], fields: t.Collection[str] = None): <NEW_LINE> <INDENT> self.entity = entity <NEW_LINE> self.mapped_fields = fields <NEW_LINE> <DEDENT> def construct(self, dto: Dto) -> Entity: <NEW_LINE> <INDENT> entity = self.entity(**dto) <NEW_LINE> entity....
A prototype serialization/validation class, designed to: * support dataclasses as entities * deconstruct specified fields (all dataclass fields by default)
6259909255399d3f05628216
class corosync(Plugin, RedHatPlugin): <NEW_LINE> <INDENT> files = ('corosync',) <NEW_LINE> packages = ('corosync',) <NEW_LINE> def setup(self): <NEW_LINE> <INDENT> self.add_copy_specs([ "/etc/corosync", "/var/lib/corosync/fdata", "/var/log/cluster/corosync.log"]) <NEW_LINE> self.add_cmd_output("corosync-quorumtool -l")...
corosync information
62599092d8ef3951e32c8cde
class ColumnSchema (object): <NEW_LINE> <INDENT> def __init__ (self, name, datatype, isNullable, extra): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.datatype = datatype <NEW_LINE> if isNullable == 'YES': <NEW_LINE> <INDENT> self.isNullableVal = True <NEW_LINE> <DEDENT> elif isNullable == 'NO': <NEW_LINE> <INDE...
An abstract representation of a column in a database table.
62599092f9cc0f698b1c614d
class ConceptMap_DependsOnSchema: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_schema( max_nesting_depth: Optional[int] = 6, nesting_depth: int = 0, nesting_list: List[str] = [], max_recursion_limit: Optional[int] = 2, include_extension: Optional[bool] = False, extension_fields: Optional[List[str]] = [ "valueBo...
A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models.
62599092283ffb24f3cf55a4
class blender_render(blender.blender): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> blender.blender.__init__(self) <NEW_LINE> <DEDENT> def do(self, i_args): <NEW_LINE> <INDENT> data = i_args['data'] <NEW_LINE> lines = data.split('\n') <NEW_LINE> need_calc = False <NEW_LINE> for line in lines: <NEW_LINE> ...
Blender Render
6259909255399d3f05628218
class AmenityViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = models.Amenity.objects.all() <NEW_LINE> serializer_class = serializers.AmenitySerializer <NEW_LINE> filter_backends = (filters.OrderingFilter,) <NEW_LINE> ordering_fields = '__all__'
API endpoint for Amenity object
625990925fdd1c0f98e5fc7b
class CRC_14_GSM(CRC_POLY): <NEW_LINE> <INDENT> POLY = 0x202D <NEW_LINE> WIDTH = 14
Used in mobile networks
62599092dc8b845886d552bd
class MovingStandardDevWindow(EventWindow): <NEW_LINE> <INDENT> def __init__(self, market_aware=True, window_length=None, delta=None): <NEW_LINE> <INDENT> EventWindow.__init__(self, market_aware, window_length, delta) <NEW_LINE> self.sum = 0.0 <NEW_LINE> self.sum_sqr = 0.0 <NEW_LINE> <DEDENT> def handle_add(self, event...
Iteratively calculates standard deviation for a particular sid over a given time window. The expected functionality of this class is to be instantiated inside a MovingStandardDev.
62599092099cdd3c6367627c
class BillingAgreementDetails(object): <NEW_LINE> <INDENT> deserialized_types = { 'billing_agreement_id': 'str', 'creation_timestamp': 'datetime', 'destination': 'ask_sdk_model.interfaces.amazonpay.model.v1.destination.Destination', 'checkout_language': 'str', 'release_environment': 'ask_sdk_model.interfaces.amazonpay....
The result attributes from successful SetupAmazonPay call. # noqa: E501 NOTE: This class is auto generated. Do not edit the class manually. :param billing_agreement_id: Billing agreement id which can be used for one time and recurring purchases # noqa: E501 :type billing_agreement_id: (optional) str :param creation...
62599092091ae35668706938
class BoolAttribute(BaseAttribute): <NEW_LINE> <INDENT> _config_items = {"default": [str, None], "mutate_rate": [float, None], "rate_to_true_add": [float, 0.0], "rate_to_false_add": [float, 0.0]} <NEW_LINE> def init_value(self, config): <NEW_LINE> <INDENT> default = str(getattr(config, self.default_name)).lower() <NEW_...
Class for boolean attributes such as whether a connection is enabled or not.
625990928a349b6b43687f65
@tvm._ffi.register_object("transform.ModulePass") <NEW_LINE> class ModulePass(Pass): <NEW_LINE> <INDENT> pass
A pass that works on tvm.IRModule. Users don't need to interact with this class directly. Instead, a module pass should be created through `module_pass`, because the design of the `module_pass` API is flexible enough to handle the creation of a module pass in different manners. In addition, all members of a module pass...
62599092be7bc26dc9252cd8
class AWSVPNGatewayDefinition(nixops.resources.ResourceDefinition): <NEW_LINE> <INDENT> config: AwsVpnGatewayOptions <NEW_LINE> @classmethod <NEW_LINE> def get_type(cls): <NEW_LINE> <INDENT> return "aws-vpn-gateway" <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def get_resource_type(cls): <NEW_LINE> <INDENT> return "awsV...
Definition of an AWS VPN gateway.
62599092d8ef3951e32c8ce0
class FusionLoadSequence(api.Loader): <NEW_LINE> <INDENT> families = ["colorbleed.imagesequence"] <NEW_LINE> representations = ["*"] <NEW_LINE> label = "Load sequence" <NEW_LINE> order = -10 <NEW_LINE> icon = "code-fork" <NEW_LINE> color = "orange" <NEW_LINE> def load(self, context, name, namespace, data): <NEW_LINE> <...
Load image sequence into Fusion
62599092adb09d7d5dc0c261
class AddPhase(tk.Toplevel): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self._callback = kwargs.pop("callback", None) <NEW_LINE> tk.Toplevel.__init__(self, *args, **kwargs) <NEW_LINE> self.title("GSF Strategy Planner: Add new phase") <NEW_LINE> self._entry = ttk.Entry(self, width=30) <...
Toplevel to show widgets for entering the data required to create a new Phase.
625990923617ad0b5ee07e59
class DeleteImageProcessingTemplateRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Definition = None <NEW_LINE> self.SubAppId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Definition = params.get("Definition") <NEW_LINE> self.SubAppId = para...
DeleteImageProcessingTemplate请求参数结构体
62599092be7bc26dc9252cd9
class Output: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.dim = 0 <NEW_LINE> self.array = [] <NEW_LINE> <DEDENT> def __eq__(self,other): <NEW_LINE> <INDENT> return self.dim == other.dim and sorted(self.array) == sorted(other.array) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <IN...
Represents an output of all max black subsquares. Attributes: dim: An int. The dimension of the subsquares. array: A list of tuples representing the upper-left corners.
62599092f9cc0f698b1c614f
class SchemaValidationError(SchemaValidatorError): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> message = message.split('\n')[0] <NEW_LINE> super().__init__(message)
Raised during validate if the given object is not valid for the given schema.
6259909255399d3f0562821c
@admin.register(ListParam) <NEW_LINE> class ListParamAdmin(AParamAdmin): <NEW_LINE> <INDENT> base_model = ListParam <NEW_LINE> show_in_index = False <NEW_LINE> extra_fieldset_title = 'List params' <NEW_LINE> formfield_overrides = { models.TextField: {'widget': forms.Textarea(attrs={'rows': 2, 'cols': 50, 'class': 'span...
ListParam subclass Admin
625990927cff6e4e811b774c
@python_2_unicode_compatible <NEW_LINE> class FilerStatusTypesCd(CalAccessBaseModel): <NEW_LINE> <INDENT> status_type = fields.CharField( max_length=11, db_column='STATUS_TYPE', help_text='This field is undocumented' ) <NEW_LINE> status_desc = fields.CharField( max_length=11, db_column='STATUS_DESC', help_text='This fi...
This is an undocumented model.
62599092091ae3566870693c
class Entry_intel_vga(Entry_blob_ext): <NEW_LINE> <INDENT> def __init__(self, section, etype, node): <NEW_LINE> <INDENT> super().__init__(section, etype, node)
Intel Video Graphics Adaptor (VGA) file Properties / Entry arguments: - filename: Filename of file to read into entry This file contains code that sets up the integrated graphics subsystem on some Intel SoCs. U-Boot executes this when the display is started up. This is similar to the VBT file but in a different ...
62599092be7bc26dc9252cda
class ReplicasListResponse(_messages.Message): <NEW_LINE> <INDENT> nextPageToken = _messages.StringField(1) <NEW_LINE> resources = _messages.MessageField('Replica', 2, repeated=True)
A ReplicasListResponse object. Fields: nextPageToken: A string attribute. resources: A Replica attribute.
6259909250812a4eaa621a4b
class VotableEditVote(EditVote): <NEW_LINE> <INDENT> def get_action_permission(self, ar, obj, state): <NEW_LINE> <INDENT> if not super(VotableEditVote, self).get_action_permission(ar, obj, state): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> vote = obj.get_favourite(ar.get_user()) <NEW_LINE> return vote is not ...
Edit your vote about this object.
62599092adb09d7d5dc0c266
class PostListSerializer(ModelSerializer): <NEW_LINE> <INDENT> url = HyperlinkedIdentityField(view_name="post:detail") <NEW_LINE> user = HyperlinkedRelatedField( view_name="userprofile:detail", read_only=True ) <NEW_LINE> created = TimestampField(read_only=True) <NEW_LINE> updated = TimestampField(read_only=True) <NEW_...
Post列表
62599092d8ef3951e32c8ce2
class TestAppointment(TestCase): <NEW_LINE> <INDENT> def test_due_today(self): <NEW_LINE> <INDENT> appointment = Appointment() <NEW_LINE> appointment.appointment_date = time.localtime() <NEW_LINE> self.assertEqual(appointment.due_today(), True) <NEW_LINE> <DEDENT> def test_not_due_today_after(self): <NEW_LINE> <INDENT>...
Tests functions of appointments.
625990928a349b6b43687f6b
class TriRefiner(object): <NEW_LINE> <INDENT> def __init__(self, triangulation): <NEW_LINE> <INDENT> if not isinstance(triangulation, Triangulation): <NEW_LINE> <INDENT> raise ValueError("Expected a Triangulation object") <NEW_LINE> <DEDENT> self._triangulation = triangulation
Abstract base class for classes implementing mesh refinement. A TriRefiner encapsulates a Triangulation object and provides tools for mesh refinement and interpolation. Derived classes must implements: - ``refine_triangulation(return_tri_index=False, **kwargs)`` , where the optional keyword arguments *kwar...
62599092091ae35668706940
class left_not_right (Pred.Condition) : <NEW_LINE> <INDENT> kind = Pred.Object <NEW_LINE> assertion = "left != right" <NEW_LINE> attributes = ("left", "right")
`left` and `right` must be different objects!
6259909255399d3f05628221
class CustomProcessor(Processor): <NEW_LINE> <INDENT> def process_state_batch(self, batch): <NEW_LINE> <INDENT> return np.squeeze(batch, axis=1) <NEW_LINE> <DEDENT> def process_info(self, info): <NEW_LINE> <INDENT> processed_info = info['player_data'] <NEW_LINE> if 'stack' in processed_info: <NEW_LINE> <INDENT> process...
The agent and the environment
62599092ad47b63b2c5a955e
class S3Extractor(Extractor): <NEW_LINE> <INDENT> def __init__(self, settings: S3SourceSettings): <NEW_LINE> <INDENT> super().__init__(settings) <NEW_LINE> self._settings = settings <NEW_LINE> self._s3_util = None <NEW_LINE> <DEDENT> def _get_s3_util(self) -> S3Util: <NEW_LINE> <INDENT> if self._s3_util is None: <NEW_L...
Base class for all types of S3 Extractors which handles connection to s3 Args: settings (S3SourceSettings): settings to connect to the source s3 bucket
6259909297e22403b383cc06
class Agent: <NEW_LINE> <INDENT> def __init__(self, params): <NEW_LINE> <INDENT> self.env = params.env <NEW_LINE> self.noise_stddev = params.noise_stddev if params.get("noisy_actions", False) else None <NEW_LINE> if isinstance(self.env, DotMap): <NEW_LINE> <INDENT> raise ValueError("Environment must be provided to the ...
An general class for RL agents.
6259909255399d3f05628223
class serveConsumer(AsyncWebsocketConsumer): <NEW_LINE> <INDENT> async def connect(self): <NEW_LINE> <INDENT> if self.scope["user"].is_anonymous: <NEW_LINE> <INDENT> await self.close() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> await self.channel_layer.group_add("serve", self.channel_name) <NEW_LINE> await self.acce...
Consumer to manage WebSocket connections for the Notification app, called when the websocket is handshaking as part of initial connection.
625990928a349b6b43687f6f
class GrainsTargetingTest(integration.ShellCase): <NEW_LINE> <INDENT> def test_grains_targeting_os_running(self): <NEW_LINE> <INDENT> test_ret = ['sub_minion:', ' True', 'minion:', ' True'] <NEW_LINE> os_grain = '' <NEW_LINE> for item in self.run_salt('minion grains.get os'): <NEW_LINE> <INDENT> if item != 'minio...
Integration tests for targeting with grains.
62599092be7bc26dc9252cdd
class account_fiscal_position(orm.Model): <NEW_LINE> <INDENT> _inherit = 'account.fiscal.position' <NEW_LINE> _columns = { 'intracommunity_operations': fields.boolean( 'Intra-Community operations'), }
Inheritance of Account fiscal position to add field 'include_in_mod349'. This fields let us map fiscal position, taxes and accounts to create an AEAT 349 Report
6259909255399d3f05628227
class MoneyField: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_amount_from_decimal(decimal_amount: Decimal) -> int: <NEW_LINE> <INDENT> return UnitConverter.to_minor_units(decimal_amount) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def get_vat_rate_from_decimal(decimal_vat_rate: Decimal) -> int: <NEW_LINE> <IN...
Represents the composite amount field for money values. Used by both events and commands. Avro will serialize it as follows: >>> {'amount': 1000, 'currency': 'SEK'} Examples: >>> from typing import Dict, NamedTuple >>> from eventsourcing_helpers.message import Event >>> >>> @Event >>> class Checkou...
62599092bf627c535bcb31e9
class TestLinkResponseEntity(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 testLinkResponseEntity(self): <NEW_LINE> <INDENT> pass
LinkResponseEntity unit test stubs
6259909260cbc95b06365bf2
class EDPluginISPyBSetImagesPositionsv1_4(EDPluginISPyBv1_4): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> EDPluginISPyBv1_4.__init__(self) <NEW_LINE> self.setXSDataInputClass(XSDataInputISPyBSetImagesPositions) <NEW_LINE> self.listImageCreation = [] <NEW_LINE> <DEDENT> def configure(self): <NEW_LINE> <I...
Plugin to store sample position (for grid scans)
62599092099cdd3c63676284
class DescribeClusterInstancesResponseContent(Model): <NEW_LINE> <INDENT> def __init__(self, instances=None, next_token=None): <NEW_LINE> <INDENT> self.openapi_types = {"instances": List[ClusterInstance], "next_token": str} <NEW_LINE> self.attribute_map = {"instances": "instances", "next_token": "nextToken"} <NEW_LINE>...
NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually.
62599092f9cc0f698b1c6156
class PathsNormalizer(RewritingVisitor): <NEW_LINE> <INDENT> def __init__(self, project, toolset=None): <NEW_LINE> <INDENT> super(PathsNormalizer, self).__init__() <NEW_LINE> self.toolset = toolset <NEW_LINE> self.project = project <NEW_LINE> self.module = self.target = None <NEW_LINE> self.top_srcdir = os.path.abspath...
Normalizes relative paths so that they are absolute. Paths relative to @srcdir are rewritten in terms of @top_srcdir. Paths relative to @builddir are translated in toolset-specific way. This is needed so that cross-module variables and paths uses produce correct results. You must call :meth:`set_context()` to associat...
62599093bf627c535bcb31eb
class Ada(GtfsdbBase, Base): <NEW_LINE> <INDENT> datasource = config.DATASOURCE_DERIVED <NEW_LINE> __tablename__ = 'ada' <NEW_LINE> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.start_date = self.end_date = datetime.datetime.now() <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def post_pro...
The Americans with Disabilities Act (https://www.ada.gov) requires transit agencies to provide complementary paratransit service to destinations within 3/4 mile of all fixed routes. :see: https://en.wikipedia.org/wiki/Paratransit#Americans_with_Disabilities_Act_of_1990 This class will calculate and represent a Paratra...
62599093283ffb24f3cf55b7
class ThreadBackground(QThread): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> QThread.__init__(self) <NEW_LINE> <DEDENT> def __del__(self): <NEW_LINE> <INDENT> self.wait() <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> while(True): <NEW_LINE> <INDENT> schedule.run_pending() <NEW_LINE> self.sleep(...
Thread de ejecución continua para la realización de tareas de BackUp pendientes.
62599093be7bc26dc9252ce1
class DatabaseHost(models.Model): <NEW_LINE> <INDENT> hostname = models.CharField(max_length=255) <NEW_LINE> port = models.PositiveIntegerField() <NEW_LINE> username = models.CharField(max_length=255) <NEW_LINE> password = models.CharField(max_length=255) <NEW_LINE> dbms = models.CharField(max_length=16, choices=( ("po...
Represents a host for a collection of SQL databases. Attributes: hostname The host to connect to (ex: postgres1.csl.tjhsst.edu). port The port the database server is running on. username The administrator username for creating and managing databases. password The adminis...
62599093283ffb24f3cf55b8
class SpMV(Function): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def forward(ctx, row, col, val, vector, size): <NEW_LINE> <INDENT> ctx.save_for_backward(row, col, val, vector) <NEW_LINE> ctx.matrix_size = size <NEW_LINE> output = vector.new() <NEW_LINE> sparse.spmv( row, col, val, vector, output, size[0], size[1], F...
Sparse matrix-vector product.
62599093099cdd3c63676286
class ProjectFQName(object): <NEW_LINE> <INDENT> domain_name_key = 'domain' <NEW_LINE> name = 'project' <NEW_LINE> @classmethod <NEW_LINE> def project_fq_name_key(cls): <NEW_LINE> <INDENT> return [cls.domain_name_key, cls.project_name_key]
Defines the keywords and format of a Project FQName specification.
62599093adb09d7d5dc0c274
class CharacteristicsDetail(viewsets.ModelViewSet): <NEW_LINE> <INDENT> permission_classes=(GivingPermissions,) <NEW_LINE> authentication_classes = (SimpleAuthentication,) <NEW_LINE> serializer_class = CharacteristicSerializer <NEW_LINE> def get_characteristic(self,name): <NEW_LINE> <INDENT> characteristics = Character...
Verbs implementation for a specific characteristic, GET, PUT, DELETE
62599093dc8b845886d552d2
class FeedTheFoxAdapter(DefaultAccountAdapter): <NEW_LINE> <INDENT> def is_open_for_signup(self, request): <NEW_LINE> <INDENT> return False
Customize the default allauth account adapter.
62599093283ffb24f3cf55ba
class MessageViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Message.objects.all() <NEW_LINE> serializer_class = MessageSerializer <NEW_LINE> permission_classes = (permissions.IsAuthenticatedOrReadOnly,) <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> queryset = Message.objects.all() <NEW_LINE> se...
This viewset automatically provides `list`, `create`, `retrieve`, `update` and `destroy` actions.
6259909397e22403b383cc11
class EmailAuthBackend(backends.ModelBackend): <NEW_LINE> <INDENT> def authenticate(self, username=None, password=None): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> user = User.objects.get(email=username) <NEW_LINE> if user.check_password(password): <NEW_LINE> <INDENT> return user <NEW_LINE> <DEDENT> <DEDENT> except U...
Email Authentication Backend Allows a user to sign in using an email/password pair, then check a username/password pair if email failed
62599093283ffb24f3cf55bb
class Index(Generic[T]): <NEW_LINE> <INDENT> def __init__(self, column, index=None): <NEW_LINE> <INDENT> self.column = column <NEW_LINE> if index is None: <NEW_LINE> <INDENT> self.all = True <NEW_LINE> <DEDENT> elif isinstance(index, list): <NEW_LINE> <INDENT> self.index = tuple(index) <NEW_LINE> self.all = len(index) ...
Generic Index to use to select and rank data.
625990933617ad0b5ee07e6d
@pytest.mark.skipif(not HAVE_NP, reason='Numpy is not available') <NEW_LINE> class TestNumpy_NoRLEHandler: <NEW_LINE> <INDENT> def setup(self): <NEW_LINE> <INDENT> self.original_handlers = pydicom.config.pixel_data_handlers <NEW_LINE> pydicom.config.pixel_data_handlers = [] <NEW_LINE> <DEDENT> def teardown(self): <NEW_...
Tests for handling datasets with no handler.
62599093091ae3566870694e
class EventQueue(Thread): <NEW_LINE> <INDENT> def __init__(self, handler, name=None, preload=[]): <NEW_LINE> <INDENT> if not callable(handler): <NEW_LINE> <INDENT> raise TypeError("handler should be a callable") <NEW_LINE> <DEDENT> Thread.__init__(self, name=name or self.__class__.__name__) <NEW_LINE> self.setDaemon(Tr...
Simple event processing queue that processes one event at a time
6259909360cbc95b06365bf6
class ItemPedido(object): <NEW_LINE> <INDENT> qtd = Quantidade() <NEW_LINE> pr_unitario = Quantidade() <NEW_LINE> def __init__(self, descr, pr_unitario, qtd): <NEW_LINE> <INDENT> self.descr = descr <NEW_LINE> self.qtd = qtd <NEW_LINE> self.pr_unitario = pr_unitario
um item de um pedido
62599093f9cc0f698b1c615a
class SMIEyeOperator( EyeOperator ): <NEW_LINE> <INDENT> pass
Class for the analysis of SMI output. Input is assumed to be already-converted text files, containing a mixture of samples and messages.
62599093be7bc26dc9252ce4
class LogicalRouterSchema(base_schema_v2.BaseSchema): <NEW_LINE> <INDENT> table = (LogicalRouterEntrySchema,)
Schema class for Logical Routers >>> import pprint >>> py_dict = {'table': [{'lr_uuid': 'dc5d028a-0677-4f90-8bf2-846da02061', ... 'vdr_id': '1438272149', ... 'number_of_ports': '2', ... 'number_of_routes': '2', ... 'lr_state' : 'en...
6259909397e22403b383cc15
class Elementary: <NEW_LINE> <INDENT> def __add__(self, other): <NEW_LINE> <INDENT> if other == Zero: <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> if other == self: <NEW_LINE> <INDENT> return Mul(Integer(2), self) <NEW_LINE> <DEDENT> return Add(self, other) <NEW_LINE> <DEDENT> def __radd__(self, other): <NEW_LIN...
Base class for all types
6259909355399d3f05628233
class _WebDAVSearchMethodMock(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.counter = 0 <NEW_LINE> <DEDENT> def search(self, _, __): <NEW_LINE> <INDENT> if self.counter == 0: <NEW_LINE> <INDENT> self.counter += 1 <NEW_LINE> return _VALID_WEBDAV_GROUP_RESULT <NEW_LINE> <DEDENT> else: <NEW_LIN...
Mock of the search method.
62599093091ae35668706954
@command(server_cmds) <NEW_LINE> class server_wait(_CycladesInit, _ServerWait): <NEW_LINE> <INDENT> arguments = dict( timeout=IntArgument( 'Wait limit in seconds (default: 60)', '--timeout', default=60), server_status=StatusArgument( 'Status to wait for (%s, default: %s)' % ( ', '.join(server_states), server_states[0])...
Wait for server to change its status (default: BUILD)
6259909355399d3f05628235
class DysonCarbonFilterLifeSensor(DysonSensor): <NEW_LINE> <INDENT> _SENSOR_TYPE = "carbon_filter_life" <NEW_LINE> @property <NEW_LINE> def state(self) -> int: <NEW_LINE> <INDENT> return self._device.carbon_filter_life
Dyson carbon filter life sensor (in percentage) for Pure Cool.
62599093099cdd3c6367628b
class ReserveEA(models.Model): <NEW_LINE> <INDENT> reserve = models.ForeignKey('inventory.Reserve') <NEW_LINE> ea = models.ForeignKey('inventory.EA') <NEW_LINE> count = models.PositiveIntegerField()
Для хранения забронированного инвентаря с api
62599093656771135c48aec2
class Geolocation(BaseModel): <NEW_LINE> <INDENT> id: Optional[str] = None <NEW_LINE> latitude: Optional[float] = None <NEW_LINE> longitude: Optional[float] = None <NEW_LINE> zipcode: Optional[str] = None
Validation model for geolocation data to be uploaded. ## Fields * id: Optional[str] = None * latitude: Optional[float] = None * longitude: Optional[float] = None * zipcode: Optional[str] = None
62599093091ae35668706956
class control(_RemoteControl): <NEW_LINE> <INDENT> name = 'control' <NEW_LINE> choices = { 'enable_events': (1.0, 'tell worker(s) to enable events'), 'disable_events': (1.0, 'tell worker(s) to disable events'), 'add_consumer': (1.0, 'tell worker(s) to start consuming a queue'), 'cancel_consumer': (1.0, 'tell worker(s) ...
Workers remote control. Availability: RabbitMQ (amqp), Redis, and MongoDB transports. Examples:: celery control enable_events --timeout=5 celery control -d worker1@example.com enable_events celery control -d w1.e.com,w2.e.com enable_events celery control -d w1.e.com add_consumer queue_name celer...
625990938a349b6b43687f83
class ExampleModuleException(Exception): <NEW_LINE> <INDENT> pass
All exceptions raised by the library inherit from this exception
62599093be7bc26dc9252ce7
class LinkButton(Gtk.LinkButton): <NEW_LINE> <INDENT> def __init__(self, url, label): <NEW_LINE> <INDENT> Gtk.LinkButton.__init__(self, uri=url, label=label) <NEW_LINE> self.set_halign(Gtk.Align.START) <NEW_LINE> self.label = self.get_children()[0] <NEW_LINE> "If URI is too long reduce it for the label" <NEW_LINE> if l...
A link button
6259909397e22403b383cc1b
class WeightsPopup(Popup): <NEW_LINE> <INDENT> def __init__(self, parent_obj, text_list, **kwargs): <NEW_LINE> <INDENT> super(WeightsPopup, self).__init__(**kwargs) <NEW_LINE> self.parent_obj = parent_obj <NEW_LINE> self.pack(text_list) <NEW_LINE> <DEDENT> def pack(self, text_list): <NEW_LINE> <INDENT> spacing = 10. <N...
the popup called when weighting a die
62599093099cdd3c6367628c
class CpuProfileStatsHandler(RequestHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> request_id = self.request.get("request_id") <NEW_LINE> request_stats = RequestStats.get(request_id) <NEW_LINE> if not request_stats: <NEW_LINE> <INDENT> self.response.out.write( "Profiler stats no longer exist for this ...
Handler for retrieving the (sampling) profile in .cpuprofile format. This is compatible with Chrome's flamechart profile viewer.
62599093f9cc0f698b1c615f
class Order(models.Model): <NEW_LINE> <INDENT> order_number = models.ForeignKey(Order_Number, on_delete=models.CASCADE) <NEW_LINE> username = models.CharField(max_length=200, default='') <NEW_LINE> name = models.CharField(max_length=200, default='') <NEW_LINE> email = models.CharField(max_length=200, default='') <NEW_L...
Model representing the ordered items on the menu.
62599093283ffb24f3cf55c9
class ModelInitializerBase(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def load_data(self, args): <NEW_LINE> <INDENT> iterator = node_link_data_to_eden(args.input_file) <NEW_LINE> return iterator <NEW_LINE> <DEDENT> def load_positive_data(self, args): <NEW_LINE> <INDENT...
Subclass to generate your own EDeN model driver.
6259909355399d3f0562823d
class Gather(Goal): <NEW_LINE> <INDENT> def __init__(self, what, max_amount=1, distance=30): <NEW_LINE> <INDENT> Goal.__init__(self, "gather a thing", self.is_there_none_around, [SpotSomething(what), PickUpFocus(what)]) <NEW_LINE> if isinstance(what, str): <NEW_LINE> <INDENT> self.what = what <NEW_LINE> <DEDENT> else: ...
Base class for getting a freely available resource.
62599093f9cc0f698b1c6160