code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class AutoscalerZoneOperationsGetRequest(messages.Message): <NEW_LINE> <INDENT> operation = messages.StringField(1, required=True) <NEW_LINE> project = messages.StringField(2, required=True) <NEW_LINE> zone = messages.StringField(3, required=True)
A AutoscalerZoneOperationsGetRequest object. Fields: operation: A string attribute. project: A string attribute. zone: A string attribute.
6259906c442bda511e95d96e
class _BaseMonotonicAttentionMechanism(_BaseAttentionMechanism): <NEW_LINE> <INDENT> def initial_alignments(self, batch_size, dtype): <NEW_LINE> <INDENT> max_time = self._alignments_size <NEW_LINE> return array_ops.one_hot( array_ops.zeros((batch_size,), dtype=dtypes.int32), max_time, dtype=dtype)
Base attention mechanism for monotonic attention. Simply overrides the initial_alignments function to provide a dirac distribution,which is needed in order for the monotonic attention distributions to have the correct behavior.
6259906c4527f215b58eb5b6
class GetWorkflowResult(object): <NEW_LINE> <INDENT> def __init__(__self__, access_endpoint=None, location=None, parameters=None, tags=None, workflow_schema=None, workflow_version=None, id=None): <NEW_LINE> <INDENT> if access_endpoint and not isinstance(access_endpoint, str): <NEW_LINE> <INDENT> raise TypeError('Expect...
A collection of values returned by getWorkflow.
6259906cdd821e528d6da597
class PeekingIterator(object): <NEW_LINE> <INDENT> def __init__(self, iterator): <NEW_LINE> <INDENT> self.iter = iterator <NEW_LINE> self.temp = self.iter.next() if self.iter.hasNext() else None <NEW_LINE> <DEDENT> def peek(self): <NEW_LINE> <INDENT> return self.temp <NEW_LINE> <DEDENT> def next(self): <NEW_LINE> <INDE...
This solution caches the next element This problem can also be solved by instantiating a queue
6259906c379a373c97d9a84c
class SubmissionParticipant(db.Model): <NEW_LINE> <INDENT> __tablename__ = "submissionparticipant" <NEW_LINE> id = db.Column(db.Integer, primary_key=True, nullable=False, autoincrement=True) <NEW_LINE> publication_recid = db.Column(db.Integer) <NEW_LINE> full_name = db.Column(db.String(128)) <NEW_LINE> email = db.Colum...
This table stores information about the reviewers and uploaders of a HEPData submission.
6259906c8a43f66fc4bf39c0
class IpDetails(ACLMixin, generics.RetrieveUpdateDestroyAPIView): <NEW_LINE> <INDENT> authentication_classes = (authentication.SessionAuthentication,) <NEW_LINE> permission_classes = (IsOwnerOrReadOnly,) <NEW_LINE> queryset = Ip.objects.all() <NEW_LINE> serializer_class = IpDetailSerializer
Retrieve details of specified ip address. ### DELETE Delete specified ip address. Must be authenticated as owner or admin. ### PUT & PATCH Edit ip address. Must be authenticated as owner or admin.
6259906c97e22403b383c73a
class ResourcePresetServiceServicer(object): <NEW_LINE> <INDENT> def Get(self, request, context): <NEW_LINE> <INDENT> context.set_code(grpc.StatusCode.UNIMPLEMENTED) <NEW_LINE> context.set_details('Method not implemented!') <NEW_LINE> raise NotImplementedError('Method not implemented!') <NEW_LINE> <DEDENT> def List(sel...
Missing associated documentation comment in .proto file.
6259906ca219f33f346c8035
@implementer(IFlockerAPIV1Client) <NEW_LINE> class FakeFlockerClient(object): <NEW_LINE> <INDENT> _NOW = datetime.fromtimestamp(0, UTC) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self._configured_datasets = pmap() <NEW_LINE> self._leases = LeasesModel() <NEW_LINE> self.synchronize_state() <NEW_LINE> <DEDENT> de...
Fake in-memory implementation of ``IFlockerAPIV1Client``.
6259906c7047854f46340be3
class PlayerEndpoint(Endpoint): <NEW_LINE> <INDENT> def __init__(self, session_id, elem_id, pipeline_class): <NEW_LINE> <INDENT> super().__init__(session_id, elem_id, pipeline_class) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return f"PlayerEndpoint ID: {self.elem_id} Session ID: {self.session_id}\n" <N...
An input endpoint that retrieves content from file system, HTTP URL or RTSP URL and injects it into the media pipeline.
6259906c4f6381625f19a0be
class RasterbucketService(BaseModel): <NEW_LINE> <INDENT> done = models.BooleanField(default=False) <NEW_LINE> owner = models.ForeignKey(User) <NEW_LINE> rasterbucket = models.ForeignKey( Rasterbucket, on_delete=models.CASCADE, related_name='services') <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return 'Rasterbuc...
A model of the Rasterbucket service table Attributes: done (TYPE): Description owner (TYPE): Description rasterbucket (TYPE): Description
6259906c796e427e5384ffa4
class InvalidRelease(Exception): <NEW_LINE> <INDENT> pass
Raised when the stored release is missing data or has an invalid format.
6259906c097d151d1a2c289d
class dictGraphFB(dictGraph): <NEW_LINE> <INDENT> def __init__(self,**kwargs): <NEW_LINE> <INDENT> dictGraph.__init__(self,**kwargs) <NEW_LINE> self._inverse=self.dictClass() <NEW_LINE> <DEDENT> __invert__ = classutil.standard_invert <NEW_LINE> def __delitem__(self,node): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> fr...
Graph that saves both forward and backward edges
6259906ce1aae11d1e7cf424
class insert_carriage_return_after_token_if_it_is_not_followed_by_a_comment_and_not_on_same_line_as_token(structure.Rule): <NEW_LINE> <INDENT> def __init__(self, name, identifier, token, oSameLineToken): <NEW_LINE> <INDENT> structure.Rule.__init__(self, name=name, identifier=identifier) <NEW_LINE> self.token = token <N...
Checks function parameters are on their own line except if they are all on the same line. Parameters ---------- name : string The group the rule belongs to. identifier : string unique identifier. Usually in the form of 00N.
6259906c76e4537e8c3f0db1
class UrlAddressSerializer(ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = UrlAddress <NEW_LINE> fields = [ 'original_url', 'short_url' ]
Serializer class
6259906c4e4d562566373c34
class NameValueView(QtGui.QWidget): <NEW_LINE> <INDENT> def __init__(self, orig_table, dummy=None, parent=None): <NEW_LINE> <INDENT> QtGui.QWidget.__init__(self, parent) <NEW_LINE> assert len(orig_table) == 1, len(orig_table) <NEW_LINE> orig_record = orig_table[0] <NEW_LINE> fieldnames = orig_record.__class__.fieldname...
Wrapper around a table with a single record
6259906c67a9b606de5476b9
class RecipeViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Recipe.objects.all() <NEW_LINE> serializer_class = serializers.RecipeSerializer <NEW_LINE> authentication_classes = (TokenAuthentication,) <NEW_LINE> permission_classes = (IsAuthenticated,) <NEW_LINE> def _params_to_ints(self, qs): <NEW_LINE> <I...
Manage recipes in database
6259906c26068e7796d4e167
class WeatherUndergroundAPIForecast(object): <NEW_LINE> <INDENT> BASE_URL = 'https://api.weather.com/v3/wx/forecast/daily' <NEW_LINE> def __init__(self, api_key): <NEW_LINE> <INDENT> self.api_key = api_key <NEW_LINE> <DEDENT> def forecast_request(self, locator, location, forecast='5day', units='m', language='en-GB', fo...
Obtain a forecast from the Weather Underground API. The WU API is accessed by calling one or more features. These features can be grouped into two groups, WunderMap layers and data features. This class supports access to the API data features only. WeatherUndergroundAPI constructor parameters: api_key: WeatherUn...
6259906c7d847024c075dc09
@dataclass <NEW_LINE> class MedicinalProductIngredientSpecifiedSubstance(BackboneElement): <NEW_LINE> <INDENT> resource_type: ClassVar[str] = "MedicinalProductIngredientSpecifiedSubstance" <NEW_LINE> code: CodeableConcept = None <NEW_LINE> group: CodeableConcept = None <NEW_LINE> confidentiality: Optional[CodeableConce...
A specified substance that comprises this ingredient.
6259906c5fc7496912d48e7f
class WrappedException(Exception): <NEW_LINE> <INDENT> def __init__(self, exc_info, source, sanitize=True): <NEW_LINE> <INDENT> self.exc_info = exc_info <NEW_LINE> self.sanitize = sanitize <NEW_LINE> self.source = source <NEW_LINE> <DEDENT> def extract_tb(self): <NEW_LINE> <INDENT> tb = traceback.extract_tb(self.exc_in...
Wrap an exception which would propagate out of the library. The original exception can be specially formatted to hide library implementation details from the user, while still enabling the exception location to be disclosed.
6259906cd486a94d0ba2d7ed
class MatchedFilter(LinearTransform): <NEW_LINE> <INDENT> def __init__(self, background, target): <NEW_LINE> <INDENT> self.background = background <NEW_LINE> self.u_b = background.mean <NEW_LINE> self.u_t = target <NEW_LINE> self._whitening_transform = None <NEW_LINE> d_tb = (target - self.u_b) <NEW_LINE> self.d_tb = d...
A callable linear matched filter. Given target/background means and a common covariance matrix, the matched filter response is given by: .. math:: y=\frac{(\mu_t-\mu_b)^T\Sigma^{-1}(x-\mu_b)}{(\mu_t-\mu_b)^T\Sigma^{-1}(\mu_t-\mu_b)} where :math:`\mu_t` is the target mean, :math:`\mu_b` is the background mean, a...
6259906c2ae34c7f260ac916
class JoinUVs(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "object.join_uvs" <NEW_LINE> bl_label = "Join as UVs" <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> obj = context.active_object <NEW_LINE> return (obj and obj.type == 'MESH') <NEW_LINE> <DEDENT> def _main(self, context):...
Copy UV Layout to objects with matching geometry
6259906c4a966d76dd5f0718
class OpMean(OpKeepdims): <NEW_LINE> <INDENT> def __init__(self, x: Operation, axis: Optional[Union[int, Sequence[int]]] = None, keepdims: bool = False, **kwargs): <NEW_LINE> <INDENT> super(OpMean, self).__init__(self.__class__, x, axis, keepdims, **kwargs) <NEW_LINE> <DEDENT> def _forward(self, feed_dict: Mapping[Unio...
Calculate the mean of elements.
6259906c442bda511e95d96f
class CAPJSONSerializer(JSONSerializer): <NEW_LINE> <INDENT> def preprocess_search_hit(self, pid, record_hit, links_factory=None): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> pid = PersistentIdentifier.get(pid_type=pid.pid_type, pid_value=pid.pid_value) <NEW_LINE> result = super().preprocess_search_hit( pid, record_hi...
Serializer for records v1 in JSON.
6259906c3d592f4c4edbc70e
class CropSize(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=100, help_text="Something generic e.g. 'Small square'") <NEW_LINE> width = models.IntegerField() <NEW_LINE> height = models.IntegerField() <NEW_LINE> enabled = models.BooleanField(default=True) <NEW_LINE> @property <NEW_LINE> def dimen...
A crop size for editors to crop upon uploading a new image. Instances of a Crop object will be created for each enabled CropType
6259906ce5267d203ee6cfd5
@admin.register(models.User) <NEW_LINE> class CustomUserAdmin(UserAdmin): <NEW_LINE> <INDENT> fieldsets = UserAdmin.fieldsets + ( ( "Custom Profile", { "fields": ( "avatar", "gender", "bio", "birthdate", "langauge", "currency", "superhost" ) } ), ) <NEW_LINE> list_filter = UserAdmin.list_filter + ("superhost", ) <NEW_...
Custom User Admin
6259906c0c0af96317c57976
class TestGroupMemberDataEx(TestGroupMemberData): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> TestGroupMemberData.__init__(self) <NEW_LINE> self.oTestCase = None; <NEW_LINE> <DEDENT> def initFromDbRowEx(self, aoRow, oDb, tsNow=None): <NEW_LINE> <INDENT> TestGroupMemberData.initFromDbRow(self, aoRow); <N...
Extended representation of a test group member.
6259906cac7a0e7691f73d16
class Subcycle(SuiteObject): <NEW_LINE> <INDENT> def __init__(self, sub_xml, context, parent, run_env): <NEW_LINE> <INDENT> name = sub_xml.get('name', None) <NEW_LINE> loop_extent = sub_xml.get('loop', "1") <NEW_LINE> try: <NEW_LINE> <INDENT> loop_int = int(loop_extent) <NEW_LINE> self._loop = loop_extent <NEW_LINE> se...
Class to represent a subcycled group of schemes or scheme collections
6259906c167d2b6e312b81a5
class Meta: <NEW_LINE> <INDENT> model = CrossAccountRequest <NEW_LINE> fields = ("request_id", "target_account", "user_id", "start_date", "end_date", "created", "status")
Metadata for the serializer.
6259906cf548e778e596cdbc
@python_2_unicode_compatible <NEW_LINE> class Region(MPTTModel): <NEW_LINE> <INDENT> parent = TreeForeignKey( 'self', null=True, blank=True, related_name='children', db_index=True, on_delete=models.CASCADE ) <NEW_LINE> name = models.CharField(max_length=50, unique=True) <NEW_LINE> slug = models.SlugField(unique=True) <...
Sites can be grouped within geographic Regions.
6259906c21bff66bcd724496
class Pickler(StockPickler): <NEW_LINE> <INDENT> dispatch = MetaCatchingDict(StockPickler.dispatch.copy()) <NEW_LINE> _session = False <NEW_LINE> from .settings import settings <NEW_LINE> def __init__(self, *args, **kwds): <NEW_LINE> <INDENT> settings = Pickler.settings <NEW_LINE> _byref = kwds.pop('byref', None) <NEW_...
python's Pickler extended to interpreter sessions
6259906c76e4537e8c3f0db2
class UnalignedDataset: <NEW_LINE> <INDENT> def __init__(self, dataset_path, phase, max_dataset_size=float("inf"), shuffle=True): <NEW_LINE> <INDENT> self.dir_A = os.path.join(dataset_path, phase + 'A') <NEW_LINE> self.dir_B = os.path.join(dataset_path, phase + 'B') <NEW_LINE> self.A_paths = sorted(generate_image_list(...
This dataset class can load unaligned/unpaired datasets. Args: dataset_path (str): The path of images (should have subfolders trainA, trainB, testA, testB, etc). phase (str): Train or test. It requires two directories in dataset_path, like trainA and trainB to. host training images from domain A '{data...
6259906c4f6381625f19a0bf
class OpenSSHSubprocessVendor(SubprocessVendor): <NEW_LINE> <INDENT> executable_path = 'ssh' <NEW_LINE> def _get_vendor_specific_argv(self, username, host, port, subsystem=None, command=None): <NEW_LINE> <INDENT> args = [self.executable_path, '-oForwardX11=no', '-oForwardAgent=no', '-oClearAllForwardings=yes', '-oNoHos...
SSH vendor that uses the 'ssh' executable from OpenSSH.
6259906c796e427e5384ffa6
class TripletPrefetcher(Process): <NEW_LINE> <INDENT> def __init__(self, conn, labels, data, mean, resize, batch_size, sampling_type, **kwargs): <NEW_LINE> <INDENT> super(TripletPrefetcher, self).__init__() <NEW_LINE> self._conn = conn <NEW_LINE> self._labels = labels <NEW_LINE> self._data = data <NEW_LINE> if type(sel...
TripletPrefetcher: Use a separate process to sample triplets, following the same function implementations as TripletDataLayer
6259906c76e4537e8c3f0db3
class Indeed: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_record(card): <NEW_LINE> <INDENT> atag = card.h2.a <NEW_LINE> job_title = atag.get("title") <NEW_LINE> job_url = "https://ru.indeed.com" + atag.get("href") <NEW_LINE> company_name = card.find("span", "company").text.strip() <NEW_LINE> location = card.fi...
Extracts job's data from indeed.
6259906cbe8e80087fbc08bc
class retrieve_expanded_post_result(object): <NEW_LINE> <INDENT> def __init__(self, success=None, e1=None, e2=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> self.e1 = e1 <NEW_LINE> self.e2 = e2 <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot._fast_decode is not None and isinstance...
Attributes: - success - e1 - e2
6259906c5fc7496912d48e80
class BaseTestCase(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> logger.info("setting up database : %s"%app.config["SQLALCHEMY_DATABASE_URI"]) <NEW_LINE> db.create_all() <NEW_LINE> with self.client: <NEW_LINE> <INDENT> data = {"password" : "admin", "invite" : "invite", "email" : "ad@min.com"} <NEW...
A base test case.
6259906c3d592f4c4edbc710
class ExplicitObject(Object): <NEW_LINE> <INDENT> def __init__(self, properties: Dict[str, BaseType]=None, required: List[str]=None, min_properties: int=None, max_properties: int=None, dependencies: Dict[str, Union[List[str], Schema]]=None, pattern_properties: Dict[str, BaseType]=None, enum: List[any]=None, title: str=...
Object that has additional_properties set to False, so all properties must be declared.
6259906c8e71fb1e983bd2f8
class MetricsResultInfo(Model): <NEW_LINE> <INDENT> _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, 'start': {'key': 'start', 'type': 'iso-8601'}, 'end': {'key': 'end', 'type': 'iso-8601'}, 'interval': {'key': 'interval', 'type': 'duration'}, 'segments': {'key': 'segments', 'type': '[Metric...
A metric result data. :param additional_properties: Unmatched properties from the message are deserialized this collection :type additional_properties: dict[str, object] :param start: Start time of the metric. :type start: datetime :param end: Start time of the metric. :type end: datetime :param interval: The interva...
6259906c2c8b7c6e89bd5016
class IlluminatiAndStuffTweenFactory: <NEW_LINE> <INDENT> def __init__(self, handler, registry): <NEW_LINE> <INDENT> self.handler = handler <NEW_LINE> self.registry = registry <NEW_LINE> <DEDENT> def __call__(self, request): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return self.handler(request) <NEW_LINE> <DEDENT> e...
This tween prints out your 500 stack traces to the body of the response.
6259906c379a373c97d9a850
class VersionPermitView(SingleObjectMixin, QuestionView): <NEW_LINE> <INDENT> model = Motion <NEW_LINE> final_message = ugettext_lazy('Version successfully permitted.') <NEW_LINE> required_permission = 'motion.can_manage_motion' <NEW_LINE> question_url_name = 'motion_version_detail' <NEW_LINE> def get(self, *args, **kw...
View to permit a version of a motion.
6259906cd268445f2663a775
class Date: <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def date_from_str(cls, s): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> year = int(s[:4]) <NEW_LINE> month = int(s[4:6]) <NEW_LINE> day = int(s[6:8]) <NEW_LINE> s = s.split('T')[1] <NEW_LINE> hour = int(s[:2]) <NEW_LINE> minute = int(s[2:4]) <NEW_LINE> second = in...
A class to represent the time of an event
6259906c8a43f66fc4bf39c4
class shifter: <NEW_LINE> <INDENT> def __init__(self, sequence, idx_block_start, idx_block_end, idx_dest): <NEW_LINE> <INDENT> self.list = sequence <NEW_LINE> self._count = 1 + idx_block_end - idx_block_start <NEW_LINE> d_shift = idx_dest - idx_block_start <NEW_LINE> self._step = -(d_shift // abs(d_shift)) <NEW_LINE> e...
Get a callable object that shifts (in-place) part of a mutable sequence to different index in that sequence. The length of the sequence must not change so long as the shifter object is in use.
6259906c5fcc89381b266d6f
class Command(management.BaseCommand): <NEW_LINE> <INDENT> RENEWAL_WINDOW = datetime.timedelta(hours=1) <NEW_LINE> help = ( "Update the validity and expiration status of all Know Me premium " "subscriptions." ) <NEW_LINE> @staticmethod <NEW_LINE> def deactivate_orphan_subscriptions(): <NEW_LINE> <INDENT> return models....
Management command to update the status of all subscriptions.
6259906cf548e778e596cdbd
class DynamoDbBlockListManager(BlockListManager): <NEW_LINE> <INDENT> def __init__( self, root_dm: "DynamoDbManager", client: Any, resource: Any, table: str ): <NEW_LINE> <INDENT> self._root_dm = root_dm <NEW_LINE> self._client = client <NEW_LINE> self._table_name = table <NEW_LINE> self._table = resource.Table(table) ...
DynamoDB block list manager.
6259906c63d6d428bbee3ea2
class HorizPriceShock(EconShockScenario): <NEW_LINE> <INDENT> def apply(self, curve: Curve) -> Curve: <NEW_LINE> <INDENT> if isinstance(curve, SupplyCurve): <NEW_LINE> <INDENT> return SupplyCurve( [{'price': price + self.supply_shock, 'supply': quantity} for price, quantity in zip(curve._price, curve._quantity)]) <NEW_...
Horizontal price shocks (tranlations to supply/demand curves).
6259906c435de62698e9d636
class UserRegistrationForm(forms.Form): <NEW_LINE> <INDENT> username = forms.CharField( label='Username', max_length=100, min_length=5, widget=forms.TextInput(attrs={'Class': 'form-control'})) <NEW_LINE> email = forms.EmailField( widget=forms.TextInput(attrs={'Class': 'form-control'})) <NEW_LINE> password1 = forms.Char...
Registration Form.
6259906c1b99ca400229014e
class Node: <NEW_LINE> <INDENT> def __init__(self, elem, lchild=None, rchild=None): <NEW_LINE> <INDENT> self.elem = elem <NEW_LINE> self.lchild = lchild <NEW_LINE> self.rchild = rchild
节点类
6259906c8e7ae83300eea8c1
class Ephe(Structure): <NEW_LINE> <INDENT> _fields_ = [ ('<L', 'dwrd') ]
Ublox rxm_sfrbx Ephemeris NumWords fields
6259906c7d43ff248742802a
class CostModelProviderQueryException(APIException): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> self.status_code = status.HTTP_500_INTERNAL_SERVER_ERROR <NEW_LINE> self.detail = {'detail': force_text(message)}
Rate query custom internal error exception.
6259906caad79263cf42ffe7
class CreateNoteUpperForm(CreateNoteForm): <NEW_LINE> <INDENT> text = CharFieldUpper( widget=forms.Textarea(attrs={ 'class': 'form-control'}) )
The form for creating note object which will have only uppercase letters. We check note's length. It must be more than 9.
6259906c76e4537e8c3f0db5
class GroupDoesNotExist(EntryDoesNotExist): <NEW_LINE> <INDENT> pass
The requested group does not exist.
6259906c99cbb53fe6832719
class DETRawSampler: <NEW_LINE> <INDENT> def __init__( self, data_root: Path, allowed_class_ids: Set[str], allowed_class_ints: Set[int] ) -> None: <NEW_LINE> <INDENT> label_root = Path(data_root, "Annotations", "DET") <NEW_LINE> frame_root = Path(data_root, "Data", "DET") <NEW_LINE> self._rawinstances_by_cls = defaultd...
randomly samples raw instances (paths to images and labels) from DET train+val.
6259906c283ffb24f3cf50da
class MTobjects: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> class Objfile: <NEW_LINE> <INDENT> def __init__(self, obj): <NEW_LINE> <INDENT> self._obj = obj <NEW_LINE> self._debug = set() <NEW_LINE> <DEDENT> <DEDENT> class Progspace: <NEW_LINE> <INDENT> def __init__(self, progspace): <NEW_LINE> <INDENT>...
Find objects and relate their debug objects
6259906c56b00c62f0fb4101
class ProtocolBuffersResource(object): <NEW_LINE> <INDENT> def __init__(self, pb_class): <NEW_LINE> <INDENT> self.pb_class = pb_class <NEW_LINE> for http_method in falcon.HTTP_METHODS: <NEW_LINE> <INDENT> if hasattr(pb_class, http_method): <NEW_LINE> <INDENT> method = http_method.lower() <NEW_LINE> setattr(self, 'on_%s...
Protocol Buffers based resource.
6259906c2c8b7c6e89bd5018
class RegisterUser(BaseView): <NEW_LINE> <INDENT> def post(self): <NEW_LINE> <INDENT> if self.validate_json(): <NEW_LINE> <INDENT> return self.validate_json() <NEW_LINE> <DEDENT> data = request.get_json() <NEW_LINE> email = data.get('email') <NEW_LINE> username = data.get('username') <NEW_LINE> password = data.get('pas...
Method to Register a new user
6259906ce5267d203ee6cfd7
class CI_OnlineResource(object): <NEW_LINE> <INDENT> def __init__(self,md=None): <NEW_LINE> <INDENT> if md is None: <NEW_LINE> <INDENT> self.url = None <NEW_LINE> self.protocol = None <NEW_LINE> self.name = None <NEW_LINE> self.description = None <NEW_LINE> self.function = None <NEW_LINE> <DEDENT> else: <NEW_LINE> <IND...
process CI_OnlineResource
6259906cd268445f2663a776
class AdminDAO: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def get_admin(self, username): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> admin_account = admin.objects.get(username = username) <NEW_LINE> <DEDENT> except DoesNotExist: <NEW_LINE> <INDENT> return None <NEW_LINE> <DED...
Data access object for the Admin accounts.
6259906cf548e778e596cdbf
class CatalogException(base.ClientException): <NEW_LINE> <INDENT> pass
Something is rotten in Service Catalog.
6259906c21bff66bcd72449a
class WordStem(object): <NEW_LINE> <INDENT> def get_porter_stem(self, word): <NEW_LINE> <INDENT> stemmer = porter.PorterStemmer() <NEW_LINE> return stemmer.stem(word) <NEW_LINE> <DEDENT> def get_snowball_stem(self, word): <NEW_LINE> <INDENT> stemmer = snowball.SnowballStemmer("english") <NEW_LINE> return stemmer.stem(w...
Stemming methods as provided by NLTK library http://www.nltk.org/howto/stem.html
6259906c8e7ae83300eea8c2
class trip_weighted_travel_time_for_transit_walk(Variable): <NEW_LINE> <INDENT> zone_wtt_tw = "trip_weighted_travel_time_for_transit_walk" <NEW_LINE> def dependencies(self): <NEW_LINE> <INDENT> return [attribute_label("zone", self.zone_wtt_tw), my_attribute_label("zone_id")] <NEW_LINE> <DEDENT> def compute(self, datase...
The trip_weighted_travel_time_for_transit_walk value.
6259906c7047854f46340be9
class Image(base_classes.BaseNode): <NEW_LINE> <INDENT> def __init__(self, node, parent): <NEW_LINE> <INDENT> logger.debug("Image().__init__(%s)", node) <NEW_LINE> base_classes.BaseNode.__init__(self, node, parent, constants.IMAGE) <NEW_LINE> if(self.scene.options.get(constants.EMBED_TEXTURES, False)): <NEW_LINE> <INDE...
Class the wraps an image node. This is the node that represent that actual file on disk.
6259906c76e4537e8c3f0db6
class PersoonViewSet(rest.DatapuntViewSet): <NEW_LINE> <INDENT> queryset = models.Persoon.objects.all().order_by('id') <NEW_LINE> queryset_detail = (models.Persoon.objects .select_related('natuurlijkpersoon') .select_related('niet_natuurlijkpersoon') .all()) <NEW_LINE> serializer_detail_class = serializers.PersoonDetai...
Persoon (PRS) Een Persoon is een ieder die rechten en plichten kan hebben. Persoon wordt gebruikt als overkoepelend begrip (een verzamelnaam voor NatuurlijkPersoon, NietNatuurlijkPersoon en NaamPersoon) om er over te kunnen communiceren. Iedere in het handelsregister voorkomende Persoon heeft ofwel een Eigenaarschap e...
6259906c796e427e5384ffaa
class TestClosedLoopControlBase(): <NEW_LINE> <INDENT> pass
Base class for close loop control tests.
6259906ccc0a2c111447c6ea
class LandingParamsValidatorMixin(BaseParamsValidatorMixin): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def _ajax_validator(value, default): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return int(value) <NEW_LINE> <DEDENT> except BaseException as exc: <NEW_LINE> <INDENT> return default <NEW_LINE> <DEDENT> <DEDENT> @...
Mixin with validators for validate request parameters.
6259906c8e7ae83300eea8c3
class NDPosPlugin(AsynPort): <NEW_LINE> <INDENT> UniqueName = "PORT" <NEW_LINE> _SpecificTemplate = NDPosPluginTemplate <NEW_LINE> def __init__(self, PORT, NDARRAY_PORT, QUEUE = 2, BLOCK = 0, NDARRAY_ADDR = 0, PRIORITY = 0, STACKSIZE = 0, **args): <NEW_LINE> <INDENT> self.__super.__init__(PORT) <NEW_LINE> self.__dict__...
This plugin attaches position information to NDArrays
6259906cfff4ab517ebcf04e
class CheckFastqVersion(PipelineAction): <NEW_LINE> <INDENT> def __init__(self, output): <NEW_LINE> <INDENT> PipelineAction.__init__(self, 'CheckFastqVersion', output) <NEW_LINE> <DEDENT> def __call__(self, fastq_file, pipeline=None): <NEW_LINE> <INDENT> if not os.path.isfile(fastq_file[0]) and os.path.isfile(fastq_fil...
Check the version of fastq file in order to set proper option for ``bwa aln`` runs. File flow: Write option to output file, and set variable ``ALN_PARAM``. INPUT ====> OUTPUT Example: action=CheckFastqVersion(output='aln_param.txt') Note: Output result to a file to avoid re-checking the fastq files repe...
6259906c56ac1b37e63038fc
class LicenseAudioRequest(object): <NEW_LINE> <INDENT> swagger_types = { 'audio': 'list[LicenseAudio]' } <NEW_LINE> attribute_map = { 'audio': 'audio' } <NEW_LINE> def __init__(self, audio=None): <NEW_LINE> <INDENT> self._audio = None <NEW_LINE> self.discriminator = None <NEW_LINE> self.audio = audio <NEW_LINE> <DEDENT...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
6259906cbaa26c4b54d50adc
class Robot(Namespace): <NEW_LINE> <INDENT> def __init__(self, endpoint): <NEW_LINE> <INDENT> super(Robot, self).__init__(endpoint) <NEW_LINE> <DEDENT> def getWebsocketAddress(self): <NEW_LINE> <INDENT> return self._endpoint.getWebsocketAddress()
Representation of a namespace which has a websocket connection from a robot assigned and is part of the cloud engine internal communication.
6259906c7d43ff248742802b
class ScoreArea(tk.Frame): <NEW_LINE> <INDENT> def __init__(self, parent, players, eliminate_player): <NEW_LINE> <INDENT> tk.Frame.__init__(self, parent) <NEW_LINE> self.parent = parent <NEW_LINE> self.name = 'scorearea' <NEW_LINE> self.players = players <NEW_LINE> self.player_score_vars = [] <NEW_LINE> self.player_nam...
This class renders a score area.
6259906c99cbb53fe683271b
class PyramidPoolingMainBranch(Chain): <NEW_LINE> <INDENT> def __init__(self, in_channels, out_channels, scale_factor): <NEW_LINE> <INDENT> super(PyramidPoolingMainBranch, self).__init__() <NEW_LINE> with self.init_scope(): <NEW_LINE> <INDENT> self.att = AttentionRefinementBlock( in_channels=in_channels, out_channels=o...
Pyramid pooling main branch. Parameters: ---------- in_channels : int Number of input channels. out_channels : int Number of output channels. scale_factor : float Multiplier for spatial size.
6259906c7d847024c075dc0f
class LoginForm(FlaskForm): <NEW_LINE> <INDENT> username = StringField('Username', validators=[DataRequired()]) <NEW_LINE> password = PasswordField('Password', validators=[DataRequired()]) <NEW_LINE> twitter = StringField("Twitter") <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(LoginForm, se...
Login form.
6259906c4e4d562566373c3a
@pimms.immutable <NEW_LINE> class TanPotential(PotentialFunction): <NEW_LINE> <INDENT> def __init__(self): pass <NEW_LINE> def value(self, x): return tangent(x) <NEW_LINE> def jacobian(self, x, into=None): <NEW_LINE> <INDENT> x = flattest(x) <NEW_LINE> z = sps.diags(secant(x)**2) <NEW_LINE> return safe_into(into, z)
TanPotential is a potential function that represents tan(x).
6259906cadb09d7d5dc0bd9e
class SimpleBuildingBlockPass(microprobe.passes.Pass): <NEW_LINE> <INDENT> def __init__(self, bblsize, threshold=0.1): <NEW_LINE> <INDENT> super(SimpleBuildingBlockPass, self).__init__() <NEW_LINE> self._bblsize = bblsize <NEW_LINE> self._description = "Create a basic block with '%d' " "instr...
SimpleBuildingBlockPass Class. This :class:`~.Pass` adds a single building block of a given instruction size to the given building block. The pass fails if the buiding block size differs in ratio more than the threshold provided.
6259906c5166f23b2e244c07
class PriorProbabilityEstimator(BaseEstimator): <NEW_LINE> <INDENT> def fit(self, X, y, sample_weight=None): <NEW_LINE> <INDENT> if sample_weight is None: <NEW_LINE> <INDENT> sample_weight = np.ones_like(y, dtype=np.float64) <NEW_LINE> <DEDENT> class_counts = bincount(y, weights=sample_weight) <NEW_LINE> self.priors = ...
An estimator predicting the probability of each class in the training data.
6259906c32920d7e50bc787b
class FBApplication (FBComponent): <NEW_LINE> <INDENT> def FBApplication(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def ExecuteScript(self,pFilename): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def FBXFileAppend(self,pFilename,pImportingNamespace): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def FBXFileMerg...
Application class. Permits the manipulation of the application. It should be noted that the Event registration is instanced based. When a FBApplication object is destroyed, all the event callbacks are unregistered. If you want to have a tool to be notified of events, it needs to have a FBApplication data member. P...
6259906cd268445f2663a777
class TestLinearOrderRecordsResponseBase(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 testLinearOrderRecordsResponseBase(self): <NEW_LINE> <INDENT> pass
LinearOrderRecordsResponseBase unit test stubs
6259906c91f36d47f2231aa9
class InitialTagCreateRequest(object): <NEW_LINE> <INDENT> swagger_types = { 'name': 'TagName', 'creator': 'TagCreator', 'img_type': 'ImageType' } <NEW_LINE> attribute_map = { 'name': 'name', 'creator': 'creator', 'img_type': 'imgType' } <NEW_LINE> def __init__(self, name=None, creator=None, img_type=None, _configurati...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
6259906c38b623060ffaa46d
class Encoder(Configurable): <NEW_LINE> <INDENT> def __init__(self, params, mode, name=None, verbose=True): <NEW_LINE> <INDENT> super(Encoder, self).__init__( params=params, mode=mode, verbose=verbose, name=name or self.__class__.__name__) <NEW_LINE> self._encoder_output_tuple_type = namedtuple( "EncoderOutput", "outpu...
Base class for encoders.
6259906ca17c0f6771d5d7c3
class EvalCommand( CommandObject ): <NEW_LINE> <INDENT> NAME = "evaluate" <NEW_LINE> DESCRIPTION = "Evaluates the current selection as Python code." <NEW_LINE> def __init__( self, displayMessage=None, selection=None ): <NEW_LINE> <INDENT> super( EvalCommand, self ).__init__() <NEW_LINE> self.setDescription( self.DESCRI...
The 'evaluate' command.
6259906ca219f33f346c803d
class PreconfiguredChoices(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.xml = etree.Element("processingMCP") <NEW_LINE> self.choices = etree.SubElement(self.xml, "preconfiguredChoices") <NEW_LINE> <DEDENT> def add_choice(self, applies_to_text, go_to_chain_text, comment=None): <NEW_LINE> <IN...
Encode processing configuration XML documents and optionally write to disk.
6259906c4f6381625f19a0c2
class ExcludeTrivialImportBranchRule(StrategyRule): <NEW_LINE> <INDENT> def get_symbol(self, symbol, stats): <NEW_LINE> <INDENT> if isinstance(symbol, (Trunk, TypedSymbol)): <NEW_LINE> <INDENT> return symbol <NEW_LINE> <DEDENT> if stats.tag_create_count == 0 and stats.branch_create_count == stats.trivial_impor...
If a symbol is a trivial import branch, exclude it. A trivial import branch is defined to be a branch that only had a single import on it (no other kinds of commits) in every file in which it appeared. In most cases these branches are worthless.
6259906c091ae35668706469
class CourseComments(models.Model): <NEW_LINE> <INDENT> user = models.ForeignKey(UserProfile, verbose_name=u"用户") <NEW_LINE> course = models.ForeignKey(Couser, verbose_name=u"课程") <NEW_LINE> comments = models.CharField(max_length=200, verbose_name=u"评论") <NEW_LINE> add_time = models.DateTimeField(default=datetime.now, ...
课程评论
6259906c99cbb53fe683271d
class MedicalView(CoachPermissionRequiredMixin, ListView): <NEW_LINE> <INDENT> context_object_name = "athlete_list" <NEW_LINE> model = Athlete <NEW_LINE> ordering = "last_medical" <NEW_LINE> template_name = "team_manager/medical_view.html" <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = s...
View which shows an overview about the medical examiniations of the athlete
6259906c76e4537e8c3f0db9
class Multiple(tuple): <NEW_LINE> <INDENT> def __new__(cls, *elems): <NEW_LINE> <INDENT> return super().__new__(cls, elems) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> if not len(self): <NEW_LINE> <INDENT> return '%s()' % self.__class__.__name__ <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> global trace...
A Multiple holds multiple results, like what most stages of scansion generate.
6259906caad79263cf42ffeb
class SimpleRelatedProxy(SimpleRelated): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> proxy = True
Proxy to model with foreign key to Normal, shared only and regular translatable field
6259906c32920d7e50bc787c
class ComputerSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> stack = serializers.IntegerField(label='stack', write_only=True, help_text="Size of the computer's program stack.") <NEW_LINE> debug_data = serializers.DictField(read_only=True, source='debug') <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = ...
Serializer to manage `Computer` instances.
6259906c4e4d562566373c3c
class TestCsrRestIkeKeepaliveCreate(base.BaseTestCase): <NEW_LINE> <INDENT> def _save_dpd_info(self): <NEW_LINE> <INDENT> with httmock.HTTMock(csr_request.token, csr_request.normal_get): <NEW_LINE> <INDENT> details = self.csr.get_request('vpn-svc/ike/keepalive') <NEW_LINE> if self.csr.status == requests.codes.OK: <NEW_...
Test IKE keepalive REST requests. Note: On the Cisco CSR, the IKE keepalive for v1 is a global configuration that applies to all VPN tunnels to specify Dead Peer Detection information. As a result, this REST API is not used in the OpenStack device driver, and the keepalive will default to zero (disabled).
6259906caad79263cf42ffec
class DeleteFieldCommand(BaseFieldCommand): <NEW_LINE> <INDENT> def __init__(self, tag, ind1, ind2, subfield_commands, conditionSubfield="", condition="", condition_exact_match=True, _condition_does_not_exist=False): <NEW_LINE> <INDENT> BaseFieldCommand.__init__(self, tag, ind1, ind2, subfield_commands) <NEW_LINE> self...
Deletes given fields from a record
6259906c4428ac0f6e659d69
class SArrayBuilder(object): <NEW_LINE> <INDENT> def __init__(self, dtype, num_segments=1, history_size=10): <NEW_LINE> <INDENT> self._builder = UnitySArrayBuilderProxy() <NEW_LINE> self._builder.init(num_segments, history_size, dtype) <NEW_LINE> self._block_size = 1024 <NEW_LINE> <DEDENT> def append(self, data, segmen...
An interface to incrementally build an SArray element by element. Once closed, the SArray cannot be "reopened" using this interface. Parameters ---------- dtype : type The type of the elements in the SArray. num_segments : int, optional Number of segments that can be written in parallel. history_size : int,...
6259906cdd821e528d6da59c
class ListVirtualHubsResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[VirtualHub]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, value: Optional[List["VirtualHub"]] = None, next_link: Optional[str] = None, **kwargs ):...
Result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL nextLink to get the next set of results. :param value: List of VirtualHubs. :type value: list[~azure.mgmt.network.v2018_07_01.models.VirtualHub] :param next_link: URL to get the next set of operation list results if there are any. :...
6259906c01c39578d7f14350
class SquarePrivilegeCouponCases(TestCase): <NEW_LINE> <INDENT> def tearDown(self): <NEW_LINE> <INDENT> self.reset.clearData() <NEW_LINE> self.driver.quit() <NEW_LINE> <DEDENT> def setUp(self): <NEW_LINE> <INDENT> self.logger = Logger() <NEW_LINE> self.driver = AppiumDriver(None, None, IDC.platformName, IDC.platformVer...
作者 宋波 巡检checklist #Anonymous 自动化测试 #Anonymous 广场详情页点击优惠可以进入优惠券并可以成功领取优惠券在我的票券中显示
6259906c4527f215b58eb5bb
class OpenSSLSeeker(Seeker): <NEW_LINE> <INDENT> NAME = 'OpenSSL' <NEW_LINE> VERSION_STRING = " part of OpenSSL " <NEW_LINE> def searchLib(self, logger): <NEW_LINE> <INDENT> key_string = self.VERSION_STRING <NEW_LINE> ids = ['SHA1', 'SHA-256', 'SHA-512', 'SSLv3', 'TLSv1', 'ASN.1', 'EVP', 'RAND', 'RSA', 'Big Number'] <N...
Seeker (Identifier) for the OpenSSL open source library.
6259906c2c8b7c6e89bd501d
class InvalidInput(ValueError): <NEW_LINE> <INDENT> pass
Raised during interactive analysis, whenever the user input is invalis
6259906cac7a0e7691f73d1e
class HistoryIsNone(Exception): <NEW_LINE> <INDENT> pass
Raised if the ``_history`` property of the browser is set to None and one method using it is called
6259906c8e7ae83300eea8c6
class SudokuError(Exception): <NEW_LINE> <INDENT> pass
Ein anwendungsspezifischer Fehler
6259906c7047854f46340bed
class BusTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_reset(self): <NEW_LINE> <INDENT> bus = Bus() <NEW_LINE> bus.v_magnitude = 0.95 <NEW_LINE> bus.v_angle = 15.0 <NEW_LINE> bus.p_lmbda = 50.0 <NEW_LINE> bus.q_lmbda = 20.0 <NEW_LINE> bus.mu_vmin = 10.0 <NEW_LINE> bus.mu_vmax = 10.0 <NEW_LINE> bus.reset() <NEW_...
Test case for the Bus class.
6259906c4f88993c371f113b
class FunctionalTest(LiveServerTestCase): <NEW_LINE> <INDENT> fixtures = ["fedora_software_testing.json"] <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> settings.DEBUG = True <NEW_LINE> LOGGER.setLevel(logging.WARNING) <NEW_LINE> self.browser = webdriver.Firefox() <NEW_LINE> self.browser.implicitly_wait(3) <NEW_LINE> ...
Suite of Acceptance tests.
6259906c56ac1b37e63038fe
class WorkflowModel: <NEW_LINE> <INDENT> def __init__(self, *steps: StepModel): <NEW_LINE> <INDENT> self._steps = list(steps) <NEW_LINE> <DEDENT> @property <NEW_LINE> def steps(self) -> List[StepModel]: <NEW_LINE> <INDENT> return self._steps
A model of workflow. It is composed of a list of StepModel instances.
6259906c1f5feb6acb164427
class ConnectionTypeCreateOrUpdateParameters(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'name': {'required': True}, 'field_definitions': {'required': True}, } <NEW_LINE> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'is_global': {'key': 'properties.isGlobal', 'type': 'bool'}, 'field_d...
The parameters supplied to the create or update connection type operation. All required parameters must be populated in order to send to Azure. :param name: Required. Gets or sets the name of the connection type. :type name: str :param is_global: Gets or sets a Boolean value to indicate if the connection type is glob...
6259906cb7558d5895464b4d
class VirtualMachineExtensionHandlerInstanceView(Model): <NEW_LINE> <INDENT> _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'type_handler_version': {'key': 'typeHandlerVersion', 'type': 'str'}, 'status': {'key': 'status', 'type': 'InstanceViewStatus'}, } <NEW_LINE> def __init__(self, type=None, type_handler...
The instance view of a virtual machine extension handler. :param type: Full type of the extension handler which includes both publisher and type. :type type: str :param type_handler_version: The type version of the extension handler. :type type_handler_version: str :param status: The extension handler status. :type s...
6259906c7d43ff248742802d