code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class FileResponse(Response): <NEW_LINE> <INDENT> def __init__(self, path, request=None, cache_max_age=None, content_type=None, content_encoding=None): <NEW_LINE> <INDENT> if content_type is None: <NEW_LINE> <INDENT> content_type, content_encoding = _guess_type(path) <NEW_LINE> <DEDENT> super(FileResponse, self).__init...
A Response object that can be used to serve a static file from disk simply. ``path`` is a file path on disk. ``request`` must be a Pyramid :term:`request` object. Note that a request *must* be passed if the response is meant to attempt to use the ``wsgi.file_wrapper`` feature of the web server that you're using to s...
62598f7d4e696a045264dadf
class EmailSummarySerializer(ModelSerializer): <NEW_LINE> <INDENT> class Meta(object): <NEW_LINE> <INDENT> model = EmailSummary
A serializer for EmailSummary.
62598f7d30dc7b766599f217
class _searchbase(SearchDialogBase): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> import re <NEW_LINE> from idlelib import searchengine <NEW_LINE> self.root = parent <NEW_LINE> self.engine = searchengine.get(parent) <NEW_LINE> self.create_widgets() <NEW_LINE> print(parent.geometry()) <NEW_LINE> w...
Create auto-opening dialog with no text connection.
62598f7d73bcbd0ca4bc9c0e
class HomematicipPresenceDetector(HomematicipGenericDevice, BinarySensorDevice): <NEW_LINE> <INDENT> @property <NEW_LINE> def device_class(self) -> str: <NEW_LINE> <INDENT> return DEVICE_CLASS_PRESENCE <NEW_LINE> <DEDENT> @property <NEW_LINE> def is_on(self) -> bool: <NEW_LINE> <INDENT> return self._device.presenceDete...
Representation of a HomematicIP Cloud presence detector.
62598f7d596a89723612762f
class TestLsLock(unittest.TestCase): <NEW_LINE> <INDENT> TEST_TMP_DIR = "/tmp" <NEW_LINE> LOCK_FILE_PREFIX = "lslock-test" <NEW_LINE> LS_LOCK_EXEC = "bash ls_lock.sh" <NEW_LINE> def test_when_oneLockFileExist_then_printLockHoldBySubprocesses(self): <NEW_LINE> <INDENT> filename = self._get_lock_file_name("_t1") <NEW_LIN...
Integration-test of ls_lock
62598f7d8a349b6b43685c01
class IntegerField(Field): <NEW_LINE> <INDENT> def __init__(self, min_value=None, max_value=None, **kwargs): <NEW_LINE> <INDENT> super(IntegerField, self).__init__(**kwargs) <NEW_LINE> if min_value is not None and not isinstance(min_value, (int, long, float)): <NEW_LINE> <INDENT> raise TypeError("Argument 'min_value' s...
A int or long field.
62598f7de76e3b2f99fd83f1
class CsvDataset(Dataset): <NEW_LINE> <INDENT> JUNK_LABEL = "-1" <NEW_LINE> def __init__(self, csv_file, data_dir, loader_fn=pil_loader, transform=None, limit=None, make_dataset_func=make_dataset_default, rewrite=True): <NEW_LINE> <INDENT> self.data_dir = os.path.expanduser(data_dir) <NEW_LINE> if not os.path.exists(se...
Loads data from a csv file.
62598f7d15fb5d323ce7e6e8
class CosFace(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_features, out_features, device_id, s = 64.0, m = 0.35): <NEW_LINE> <INDENT> super(CosFace, self).__init__() <NEW_LINE> self.in_features = in_features <NEW_LINE> self.out_features = out_features <NEW_LINE> self.device_id = device_id <NEW_LINE> self.s = ...
Implement of CosFace (https://arxiv.org/pdf/1801.09414.pdf): Args: in_features: size of each input sample out_features: size of each output sample device_id: the ID of GPU where the model will be trained by model parallel. if device_id=None, it will be trained on CPU without model parall...
62598f7d26068e7796d4c319
class Movie(models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=50) <NEW_LINE> year = models.IntegerField(blank=True, null=True) <NEW_LINE> rated = models.CharField(max_length=5, blank=True, null=True) <NEW_LINE> released = models.CharField(max_length=20, blank=True, null=True) <NEW_LINE> runtime = m...
Model storing single entry of movie. Contains all the data that can be fetched from OMDB database, except for ratings, which have separate model.
62598f7da79ad16197769a1e
class itkSubtractConstantFromImageFilterICF3CFICF3(itkSubtractConstantFromImageFilterICF3CFICF3_Superclass): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> def __init__(self, *args, **kwargs): raise AttributeError("No constructor de...
Proxy of C++ itkSubtractConstantFromImageFilterICF3CFICF3 class
62598f7d8e05c05ec3f6eb26
class Usage(models.Model): <NEW_LINE> <INDENT> __package__ = 'UML.CommonStructure' <NEW_LINE> dependency = models.OneToOneField('Dependency', on_delete=models.CASCADE, primary_key=True)
A Usage is a Dependency in which the client Element requires the supplier Element (or set of Elements) for its full implementation or operation.
62598f7d507cdc57c63a474a
class TrackerThread(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, tracker): <NEW_LINE> <INDENT> super(TrackerThread, self).__init__() <NEW_LINE> self.tracker = tracker <NEW_LINE> <DEDENT> def log(self, *args): <NEW_LINE> <INDENT> logging.info(" ".join((str(x) for x in args + (self.tracker,)))) <NEW_LINE> <D...
Thread class for iterating over posts and using callbacks.
62598f7d29b78933be269dba
class Logger: <NEW_LINE> <INDENT> def _write(self, message): <NEW_LINE> <INDENT> logFile = open(self.fileName, "a", encoding ="utf-8") <NEW_LINE> logFile.write(message + "\n") <NEW_LINE> <DEDENT> def __init__(self, fileName, programName, terminal): <NEW_LINE> <INDENT> self.fileName = fileName <NEW_LINE> self.terminal =...
centralized log for the program
62598f7d63f4b57ef0085a4d
class Gazelle(BaseAnimal): <NEW_LINE> <INDENT> def __init__(self, name=None): <NEW_LINE> <INDENT> super().__init__(name) <NEW_LINE> self.species = self.__class__.__name__ <NEW_LINE> self.COMPETITION_MAP.update({'Gazelle': []})
Create a Gazelle.
62598f7d26238365f5fac52e
class TeacherDetailView(View): <NEW_LINE> <INDENT> def get(self, request, teacher_id): <NEW_LINE> <INDENT> teacher = Teacher.objects.get(id=int(teacher_id)) <NEW_LINE> teacher.click_nums += 1 <NEW_LINE> teacher.save() <NEW_LINE> all_courses = Course.objects.filter(teacher=teacher) <NEW_LINE> sorted_teachers = Teacher.o...
机构课程列表页
62598f7d38b623060ffa8a56
class PolesAndZeros(_object): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> __setattr__ = lambda self, name, value: _swig_setattr(self, PolesAndZeros, name, value) <NEW_LINE> __swig_getmethods__ = {} <NEW_LINE> __getattr__ = lambda self, name: _swig_getattr(self, PolesAndZeros, name) <NEW_LINE> __repr__ = _sw...
Proxy of C++ Seiscomp::Math::SeismometerResponse::PolesAndZeros class
62598f7d16aa5153ce3ffebe
class ProductDatabase(Database): <NEW_LINE> <INDENT> def parse(self, sheet): <NEW_LINE> <INDENT> for i in range(1, sheet.nrows): <NEW_LINE> <INDENT> prod = Product(sheet.row(i), i + 1) <NEW_LINE> self.append(prod) <NEW_LINE> <DEDENT> <DEDENT> def select_journal_pubs(self, quiet=False, **kwargs): <NEW_LINE> <INDENT> sel...
Utility class representing the full list of Product objects from the publication excel file.
62598f7d9b70327d1c57e764
class ServiceSpecification(Model): <NEW_LINE> <INDENT> _attribute_map = { 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, } <NEW_LINE> def __init__(self, *, metric_specifications=None, **kwargs) -> None: <NEW_LINE> <INDENT> super(ServiceSpecification, self).__init__(**kwargs) ...
One property of operation, include metric specifications. :param metric_specifications: Metric specifications of operation. :type metric_specifications: list[~azure.mgmt.storage.v2018_07_01.models.MetricSpecification]
62598f7d4e696a045264dae0
class TestPermissionActionEntityPagedMetadata(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 testPermissionActionEntityPagedMetadata(self): <NEW_LINE> <INDENT> model = billforward.models.permissio...
PermissionActionEntityPagedMetadata unit test stubs
62598f7d45492302aabfbe9e
class Node: <NEW_LINE> <INDENT> def __init__(self, name, indent_style): <NEW_LINE> <INDENT> self.is_leaf = False <NEW_LINE> self.name = name <NEW_LINE> self.indent_style = indent_style <NEW_LINE> self.children = [] <NEW_LINE> <DEDENT> def add_child(self, child): <NEW_LINE> <INDENT> if type(child) == Node or type(child)...
Node object class which represents a node in the equation tree. Params: - name (str) : The name of a node. - children (`list` of Nodes) : List of all children of a Node. - is_leaf (bool) : Flag for is a node is a leaf. True if leaf, False if not. - parent (TODO) : Not currently in use.
62598f7dd6c5a102081e1b07
class CStruct(AbstractCStruct): <NEW_LINE> <INDENT> __size__: int = 0 <NEW_LINE> def unpack_from(self, buffer: Optional[bytes], offset: int = 0) -> bool: <NEW_LINE> <INDENT> if buffer is None: <NEW_LINE> <INDENT> buffer = CHAR_ZERO * self.__size__ <NEW_LINE> <DEDENT> for field, field_type in self.__fields_types__.items...
Convert C struct definitions into Python classes. __struct__ = definition of the struct (or union) in C syntax __byte_order__ = (optional) byte order, valid values are LITTLE_ENDIAN, BIG_ENDIAN, NATIVE_ORDER __is_union__ = (optional) True for union definitions, False for struct definitions (default) The following fie...
62598f7d15baa7234946193f
class DummyException(Exception): <NEW_LINE> <INDENT> pass
Fake exception.
62598f7d711fe17d825e00a8
class CSSURLUpdater(Processor): <NEW_LINE> <INDENT> different_per_server = True <NEW_LINE> valid_extensions = (".css") <NEW_LINE> def run(self): <NEW_LINE> <INDENT> if self.document_root is None or self.base_path is None: <NEW_LINE> <INDENT> raise DocumentRootAndBasePathRequiredException <NEW_LINE> <DEDENT> parser = CS...
replaces URLs in .css files with their counterparts on the CDN
62598f7db5575c28eb7129a6
class RequestMapper(AbstractRequestMapper): <NEW_LINE> <INDENT> def __init__(self, request_handler_chains): <NEW_LINE> <INDENT> self.request_handler_chains = request_handler_chains <NEW_LINE> <DEDENT> @property <NEW_LINE> def request_handler_chains(self): <NEW_LINE> <INDENT> return self._request_handler_chains <NEW_LIN...
Implementation of :py:class:`AbstractRequestMapper` that registers :py:class:`RequestHandlerChain`. The class accepts request handler chains of type :py:class:`RequestHandlerChain` only. The ``get_request_handler_chain`` method returns the :py:class:`RequestHandlerChain` instance that can handle the request in the han...
62598f7da79ad16197769a20
class tddkgs(): <NEW_LINE> <INDENT> need_check_ziduan = [u'key', u'title', u'url', u'rawdata', u'date', u'retain1', u'retain2', u'bbd_dotime' ] <NEW_LINE> def check_key(self, indexstr, ustr): <NEW_LINE> <INDENT> ret = None <NEW_LINE> if ustr and len(ustr): <NEW_LINE> <INDENT> if u'null' == ustr: <NEW_LINE> <INDENT> ret...
土地市场-地块公示
62598f7d66656f66f7d59db3
class CharacterViewSet(ListModelMixin, RetrieveModelMixin, GenericViewSet): <NEW_LINE> <INDENT> serializer_class = CharacterSerializer <NEW_LINE> queryset = Character.objects.filter(active=True) <NEW_LINE> lookup_field = "slug" <NEW_LINE> search_fields = ["patronus", "name", "nick", "user"] <NEW_LINE> filter_backends =...
ViewSet to Characters
62598f7d507cdc57c63a474c
class AuthorView(IndexView): <NEW_LINE> <INDENT> def get_queryset(self): <NEW_LINE> <INDENT> queryset = super().get_context_data() <NEW_LINE> author_id = self.kwargs.get('owner_id') <NEW_LINE> return queryset.filter(owner_id=author_id)
作者页面
62598f7d8e05c05ec3f6eb27
class IkeaDataset(Dataset): <NEW_LINE> <INDENT> def __init__(self, root_dir, transform=None): <NEW_LINE> <INDENT> self.image_data = get_img_data(root_dir) <NEW_LINE> self.transform = transform <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> return len(self.image_data) <NEW_LINE> <DEDENT> def __getitem__(self...
Annotated Ikea Dataset.
62598f7d9b70327d1c57e766
class Input(object): <NEW_LINE> <INDENT> def __init__(self, name, shape): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.shape = np.zeros(shape).shape <NEW_LINE> self.synapses = None <NEW_LINE> self._connected_output = None <NEW_LINE> <DEDENT> @property <NEW_LINE> def connected(self): <NEW_LINE> <INDENT> return s...
An input connection with synapses. Inputs are identified by a name and set up their synapses when connected to an output.
62598f7d8e71fb1e983bb478
class KeyVaultManagementClientConfiguration(Configuration): <NEW_LINE> <INDENT> def __init__( self, credential, subscription_id, **kwargs ): <NEW_LINE> <INDENT> if credential is None: <NEW_LINE> <INDENT> raise ValueError("Parameter 'credential' must not be None.") <NEW_LINE> <DEDENT> if subscription_id is None: <NEW_LI...
Configuration for KeyVaultManagementClient. Note that all parameters used to create this instance are saved as instance attributes. :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: Subscription credentials which ...
62598f7d76d4e153a661c5d4
@manual.builddict(tags=["python"]) <NEW_LINE> class PythonThriftLibrary(PythonTarget): <NEW_LINE> <INDENT> def __init__(self, name, sources=None, resources=None, dependencies=None, provides=None, exclusives=None): <NEW_LINE> <INDENT> super(PythonThriftLibrary, self).__init__(name, sources, resources, dependencies, prov...
Generates a stub Python library from thrift IDL files.
62598f7d96565a6dacd2cc5a
class SysNibDirHandler(DirHandler): <NEW_LINE> <INDENT> def __init__(self, radio, a_dict): <NEW_LINE> <INDENT> super(SysNibDirHandler, self).__init__(a_dict) <NEW_LINE> self.radio = radio
System NIB Directory Handler class Performs NIB directory specific operations.
62598f7d6aa9bd52df0d489b
class Modulus(Node): <NEW_LINE> <INDENT> def __init__(self, left, right): <NEW_LINE> <INDENT> self.left = left <NEW_LINE> self.right = right <NEW_LINE> <DEDENT> def evaluate(self): <NEW_LINE> <INDENT> left = self.left.evaluate() <NEW_LINE> right = self.right.evaluate() <NEW_LINE> if not (isinstance(left, int) or isinst...
A node representing division.
62598f7d0a366e3fb87dc38d
class TapColumn: <NEW_LINE> <INDENT> def __init__(self, flags): <NEW_LINE> <INDENT> self.name = None <NEW_LINE> self.description = None <NEW_LINE> self.unit = None <NEW_LINE> self.ucd = None <NEW_LINE> self.utype = None <NEW_LINE> self.datatype = None <NEW_LINE> self.arraysize = None <NEW_LINE> self.flag = None <NEW_LI...
TAP column object
62598f7d1d351010ab8f3501
class CZA(Template): <NEW_LINE> <INDENT> description = "全調教師" <NEW_LINE> items = [ StringItem("調教師コード", 5, 0, "jrdb.Trainer.code"), DateItem("登録抹消年月日", 8, 6, "jrdb.Trainer.retired_on"), StringItem("調教師名", 12, 14, "jrdb.Trainer.name"), StringItem("調教師カナ", 30, 26, "jrdb.Trainer.name_kana"), StringItem("調教師名略称", 6, 56, "j...
http://www.jrdb.com/program/Cs/Cs_doc1.txt
62598f7d23849d37ff850a7e
@_tag <NEW_LINE> class H5(Heading): <NEW_LINE> <INDENT> pass
H5 heading.
62598f7d10dbd63aa1c70573
class BaseMappingHandler(FormSuccessHandler): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> <DEDENT> def get_mapping(self, request, form): <NEW_LINE> <INDENT> mapping = dict() <NEW_LINE> for child in self.get_children(): <NEW_LINE> <INDENT> child.update_mapping(mapping, form) <NEW_LINE>...
Abstract class for easily creating a form mapper. Inherit from this class if you want to create a mapper which upload the form data to a FTP server for example.
62598f7d15baa72349461941
class TableRow(list): <NEW_LINE> <INDENT> def __init__(self, row_data, css_class=''): <NEW_LINE> <INDENT> list.__init__(self, row_data) <NEW_LINE> self.css_class = css_class
A row in the table. Use this instead of a regular list if you need to add parameters like css to the <tr>.
62598f7d07d97122c4216664
class Text(Field): <NEW_LINE> <INDENT> _sphinx_field_name = None <NEW_LINE> _type = types.String
A Sphinx field (indexed but not stored)
62598f7d6e29344779b00024
class Array2D: <NEW_LINE> <INDENT> def __init__(self, num_rows, num_cols): <NEW_LINE> <INDENT> self.rows = Array(num_rows) <NEW_LINE> for i in range(num_rows): <NEW_LINE> <INDENT> self.rows[i] = Array(num_cols) <NEW_LINE> <DEDENT> <DEDENT> def num_rows(self): <NEW_LINE> <INDENT> return len(self.rows) <NEW_LINE> <DEDENT...
Implementation of the Array2D ADT using an array of arrays.
62598f7da4f1c619b294dfaf
class WinVaultKeyring(KeyringBackend): <NEW_LINE> <INDENT> @properties.ClassProperty <NEW_LINE> @classmethod <NEW_LINE> def priority(cls): <NEW_LINE> <INDENT> if not has_pywin32(): <NEW_LINE> <INDENT> raise RuntimeError("Requires Windows and pywin32") <NEW_LINE> <DEDENT> return 5 <NEW_LINE> <DEDENT> @staticmethod <NEW_...
WinVaultKeyring stores encrypted passwords using the Windows Credential Manager. Requires pywin32 This backend does some gymnastics to simulate multi-user support, which WinVault doesn't support natively. See https://bitbucket.org/kang/python-keyring-lib/issue/47/winvaultkeyring-only-ever-returns-last#comment-731977 ...
62598f7dd99f1b3c44d0506f
class IOHookPreRead(Builtin): <NEW_LINE> <INDENT> name = "$PreRead" <NEW_LINE> attributes = ("Unprotected",)
<dl> <dt>$PreRead <dt> is a global variable whose value, if set, is applied to the text or box form of every input expression before it is fed to the parser. <dt>(Not implemented yet) </dl>
62598f7d29b78933be269dbc
class IxnIntraAreaPrefixEmulation(IxnEmulationHost): <NEW_LINE> <INDENT> def __init__(self, ixnhttp): <NEW_LINE> <INDENT> super(IxnIntraAreaPrefixEmulation, self).__init__(ixnhttp) <NEW_LINE> <DEDENT> def find(self, vport_name=None, emulation_host=None, **filters): <NEW_LINE> <INDENT> return super(IxnIntraAreaPrefixEmu...
Generated NGPF intraAreaPrefix emulation host
62598f7da17c0f6771d5bc06
class Movie(): <NEW_LINE> <INDENT> def __init__(self, movie_title, movie_year, star_rating, movie_summary, actors_list, movie_poster, movie_trailer): <NEW_LINE> <INDENT> self.title = movie_title <NEW_LINE> self.stars = star_rating <NEW_LINE> self.year = movie_year <NEW_LINE> self.summary = movie_summary <NEW_LINE> self...
Defines movie class.
62598f7dcad5886f8bdc4ce7
class Jp2LoadOptions(ImageLoadOptions): <NEW_LINE> <INDENT> swagger_types = { } <NEW_LINE> attribute_map = { } <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> base = super(Jp2LoadOptions, self) <NEW_LINE> base.__init__(**kwargs) <NEW_LINE> self.swagger_types.update(base.swagger_types) <NEW_LINE> self.attri...
Jp2 load options
62598f7dd10714528d69d892
class Timing_Vals: <NEW_LINE> <INDENT> def __init__(self, type): <NEW_LINE> <INDENT> self.type = type <NEW_LINE> self.value = None <NEW_LINE> <DEDENT> def parse_next(self, info): <NEW_LINE> <INDENT> if info[-1][-1] == '}': <NEW_LINE> <INDENT> return 1 <NEW_LINE> <DEDENT> elif info[0] == 'values': <NEW_LINE> <INDENT> nu...
Class Timing_Vals represents timing values from a timing section. Values can be: cell_rise, cell_fall, fall_transition, rise_transition.
62598f7d7b25080760ed6e66
class Metric(object): <NEW_LINE> <INDENT> _orientation = 1 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def compute(self, state1, state2): <NEW_LINE> <INDENT> if state1.shape != state2.shape: <NEW_LINE> <INDENT> state1 = wxgen.util.resize(state1, state2.shape) <NEW_LINE> <DEDENT> return s...
Class to compute the similarity between two states
62598f7dac7a0e7691f71edc
class BlogAdditionError(ActionError): <NEW_LINE> <INDENT> pass
An error that occurred during the adding of sub-blogs to a blog.
62598f7d15fb5d323ce7e6ef
class Iris(Tools): <NEW_LINE> <INDENT> imstats = None <NEW_LINE> def __init__(self, image_path, force_refresh=False, daemon_port=None, **kwargs): <NEW_LINE> <INDENT> kwargs['config_file_name'] = 'config.sitelle.orb' <NEW_LINE> Tools.__init__(self, **kwargs) <NEW_LINE> self.imstats = ImageStats(image_path, force_refresh...
Interface class between the user and :py:class:`iris.stats.ImageStats` This class is called by **scripts/iris**
62598f7d96565a6dacd2cc5b
class ScoreOrder(enum.Enum): <NEW_LINE> <INDENT> ASCENDING = 'ASC' <NEW_LINE> DESCENDING = 'DESC'
Order types for scores.
62598f7d7c178a314d78ce6d
class StrandError(Error): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> self.message = message
Exception raised for errors in the strand information. Attributes: expression -- input expression in which the error occurred message -- explanation of the error
62598f7dbaa26c4b54d4ec76
class URLArgument(AbstractArgument): <NEW_LINE> <INDENT> def _parse_one(self, arg): <NEW_LINE> <INDENT> return get_transport(arg)
An argument that parses into bzrlib Transport objects.
62598f7d23e79379d538bebd
class Student(models.Model): <NEW_LINE> <INDENT> class Meta(object): <NEW_LINE> <INDENT> verbose_name = u"Студент" <NEW_LINE> verbose_name_plural = u"Студенти" <NEW_LINE> <DEDENT> first_name = models.CharField( max_length=256, blank=False, verbose_name=u"Ім’я") <NEW_LINE> last_name = models.CharField( max_length=256, b...
Student Model
62598f7d30c21e258be981cd
class StudentGroupIdsMultipleChoiceField(GroupIdsMultipleChoiceField): <NEW_LINE> <INDENT> groups_attr = 'student_in_groups'
Annotates each student with a list of group IDs.
62598f7d15baa72349461943
class Consumer(object): <NEW_LINE> <INDENT> def __init__(self, events_url=None, people_url=None, import_url=None, request_timeout=None): <NEW_LINE> <INDENT> self._endpoints = { 'events': events_url or 'https://api.mixpanel.com/track', 'people': people_url or 'https://api.mixpanel.com/engage', 'imports': import_url or '...
A consumer that sends an HTTP request directly to the Mixpanel service, one per call to :meth:`~.send`. :param str events_url: override the default events API endpoint :param str people_url: override the default people API endpoint :param str import_url: override the default import API endpoint :param int request_time...
62598f7d50485f2cf55da935
class spicyChickenBurger(Burger): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.name="spicy chicken burger" <NEW_LINE> self.price=15.0
香辣鸡汉堡
62598f7ddc8b845886d52f7a
class S3DataPath(S3Resource, SageMakerJavaWrapper): <NEW_LINE> <INDENT> _wrapped_class = "com.amazonaws.services.sagemaker.sparksdk.S3DataPath" <NEW_LINE> def __init__(self, bucket, objectPath): <NEW_LINE> <INDENT> self.bucket = bucket <NEW_LINE> self.objectPath = objectPath <NEW_LINE> self._java_obj = None <NEW_LINE> ...
Represents a location within an S3 Bucket. Args: bucket (str): An S3 Bucket Name. objectPath (str): An S3 key or key prefix.
62598f7d50485f2cf55da936
class DataBlob(rdf_structs.RDFProtoStruct): <NEW_LINE> <INDENT> protobuf = jobs_pb2.DataBlob <NEW_LINE> def SetValue(self, value, raise_on_error=True): <NEW_LINE> <INDENT> type_mappings = [(unicode, "string"), (str, "data"), (bool, "boolean"), (int, "integer"), (long, "integer"), (dict, "dict"), (float, "float")] <NEW_...
Wrapper class for DataBlob protobuf.
62598f7dd99f1b3c44d05071
class StaticLinearUntakenPolicy(StaticLinearPolicy): <NEW_LINE> <INDENT> def select_action(self, state, epsilon=0): <NEW_LINE> <INDENT> return self.select_untaken_action(state, epsilon)
As StaticLinearPolicy, but cannot repeat actions.
62598f7d91af0d3eaad397d0
class AuthenticationError(Exception): <NEW_LINE> <INDENT> pass
Raised when authentication fails (invalid credentials)
62598f7dd53ae8145f917e5d
class RandomShear(object): <NEW_LINE> <INDENT> def __init__(self, rang, p=0.5): <NEW_LINE> <INDENT> assert isinstance( p, (float)) <NEW_LINE> assert isinstance(rang, (float)) <NEW_LINE> self.p = p <NEW_LINE> self.rang = rang <NEW_LINE> <DEDENT> def __call__(self, sample): <NEW_LINE> <INDENT> image, label = sample[0], s...
Shear the Image of particular range
62598f7dac7a0e7691f71ede
class TestFiatDepDataResponse(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 testFiatDepDataResponse(self): <NEW_LINE> <INDENT> model = swagger_client.models.fiat_dep_data_response.FiatDepDataResp...
FiatDepDataResponse unit test stubs
62598f7d96565a6dacd2cc5c
class LiteTestResult(TestResult): <NEW_LINE> <INDENT> def startTest(self, test): <NEW_LINE> <INDENT> super(LiteTestResult, self).startTest(test) <NEW_LINE> self._case = {} <NEW_LINE> case_full_id = test.id() <NEW_LINE> self._case['case_id'] = case_full_id.split('.')[-1] <NEW_LINE> self._case['purpose'] = case_full_id <...
Python unittest result wrapper
62598f7d8a43f66fc4bf1b45
class Task(HacsTask): <NEW_LINE> <INDENT> stages = [HacsStage.SETUP] <NEW_LINE> async def async_execute(self) -> None: <NEW_LINE> <INDENT> self.hass.http.register_static_path(f"{URL_BASE}/themes", self.hass.config.path("themes")) <NEW_LINE> if self.hacs.configuration.frontend_repo_url: <NEW_LINE> <INDENT> self.log.warn...
Setup the HACS frontend.
62598f7de76e3b2f99fd83f9
class RpcError(Object): <NEW_LINE> <INDENT> ID = 0x2144ca19 <NEW_LINE> def __init__(self, error_code: int, error_message: str): <NEW_LINE> <INDENT> self.error_code = error_code <NEW_LINE> self.error_message = error_message <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read(b: BytesIO, *args) -> "RpcError": <NEW_LINE...
Attributes: ID: ``0x2144ca19`` Args: error_code: ``int`` ``32-bit`` error_message: ``str``
62598f7d23849d37ff850a82
class MBHConstrainExt(MBH): <NEW_LINE> <INDENT> def __init__(self, blocks, do_gradient_correction=True, svd_threshold=1e-5): <NEW_LINE> <INDENT> MBH.__init__(self,blocks) <NEW_LINE> <DEDENT> def compute_zeros(self, molecule, do_modes): <NEW_LINE> <INDENT> MBH.compute_zeros(self,molecule,do_modes) <NEW_LINE> <DEDENT> de...
The Mobile Block Hessian approach with the Eckart constraints imposed This method is completely similar to the MBH, except that first the global translations and rotations are first projected out of the Hessian before applying the block partitioning and projecting by the MBH. The contribution of the gradient is also a...
62598f7df8510a7c17d7de5b
@method_decorator(login_required, name='dispatch') <NEW_LINE> @method_decorator(is_health_professional, name='dispatch') <NEW_LINE> class CustomRecommendationDeleteView(View): <NEW_LINE> <INDENT> def post(self, pk): <NEW_LINE> <INDENT> custom_recommendation = CustomRecommendation.objects.get(pk=pk) <NEW_LINE> custom_re...
Inactive custom recommendation.
62598f7dd6c5a102081e1b0d
class Teacher(models.Model): <NEW_LINE> <INDENT> teac = models.OneToOneField(User, on_delete=models.CASCADE, primary_key=True, verbose_name='教室工号') <NEW_LINE> teac_name = models.CharField(max_length=30, verbose_name='教师姓名') <NEW_LINE> teac_credit = models.CharField(max_length=18, verbose_name='身份证号') <NEW_LINE> teac_se...
教室基本信息表 字段说明: teac_id - 工号(PK) teac_name - 姓名 teac_credit - 身份证号 teac_sex - 性别 teac_job - 教师职称 unit - 所在单位(FK) spec - 专业(FK)
62598f7d507cdc57c63a4752
@OFPMultipartReply.register_stats_type() <NEW_LINE> @_set_stats_type(ofproto.OFPMP_TABLE_STATS, OFPTableStats) <NEW_LINE> @_set_msg_type(ofproto.OFPT_MULTIPART_REPLY) <NEW_LINE> class OFPTableStatsReply(OFPMultipartReply): <NEW_LINE> <INDENT> def __init__(self, datapath, type_=None, **kwargs): <NEW_LINE> <INDENT> super...
Table statistics reply message The switch responds with this message to a table statistics request. ================ ====================================================== Attribute Description ================ ====================================================== body List of ``OFPTableStats`` in...
62598f7d8da39b475be02bab
class PlistTimeEvent(time_events.TimestampEvent): <NEW_LINE> <INDENT> DATA_TYPE = 'plist:key' <NEW_LINE> def __init__(self, root, key, timestamp, desc=None, host=None, user=None): <NEW_LINE> <INDENT> super(PlistTimeEvent, self).__init__( timestamp, eventdata.EventTimestamp.WRITTEN_TIME) <NEW_LINE> self.root = root <NEW...
Convenience class for a plist event that does not use datetime objects.
62598f7d4e696a045264dae3
class OrderedCounter(collections.Counter, collections.OrderedDict): <NEW_LINE> <INDENT> def __repr__(self): <NEW_LINE> <INDENT> format_str = '{type_name}({reduction!r})' if self else '{type_name}()' <NEW_LINE> return format_str.format(type=type(self).__name__, reduction=self._reduction()) <NEW_LINE> <DEDENT> def __redu...
Counter that remembers the order items are first encountered in.
62598f7db57a9660fecd1444
class LegendEnum(enum.Enum): <NEW_LINE> <INDENT> LINE = 'line' <NEW_LINE> PATCH = 'patch' <NEW_LINE> SCATTER = 'scatter'
Enum for different styles of legends
62598f7d63f4b57ef0085a51
class TestTask(BasePyTestCase): <NEW_LINE> <INDENT> @patch("bodhi.server.tasks.buildsys") <NEW_LINE> @patch("bodhi.server.tasks.initialize_db") <NEW_LINE> @patch("bodhi.server.tasks.config") <NEW_LINE> @patch("bodhi.server.tasks.tag_update_builds.main") <NEW_LINE> def test_task(self, main_function, config_mock, init_db...
Test the task in bodhi.server.tasks.
62598f7d38b623060ffa8a5e
class Runs(Lister): <NEW_LINE> <INDENT> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(Runs, self).get_parser(prog_name) <NEW_LINE> parser.add_argument('--id', '-i', type=str, required=True, help='ID of the file') <NEW_LINE> parser.add_argument('--order', '-o', choices=['id', 'status', 'created'], ...
Show List Of Runs for a given File.
62598f7dcad5886f8bdc4ceb
class I2CDevice: <NEW_LINE> <INDENT> def __init__(self, i2c, address, probe=True, scl=None, sda=None, frequency=None): <NEW_LINE> <INDENT> self.i2c = i2c <NEW_LINE> self.sda, self.scl = (scl, sda) <NEW_LINE> self.freq = frequency <NEW_LINE> self.device_address = address <NEW_LINE> if probe: <NEW_LINE> <INDENT> if not s...
Represents a single I2C device and manages initialization/deinitialization (psuedo-locking) the bus and the device's slave address. :param ~machine.I2 i2c: The I2C bus that the device is on. :param int address: The I2C device's address. This is a 7-bit integer. :param bool probe: if `True`, instantiation probes the I2...
62598f7dd53ae8145f917e5f
class Task02TestCase(unittest.TestCase): <NEW_LINE> <INDENT> def test_positional_value(self): <NEW_LINE> <INDENT> monkeys = 4 <NEW_LINE> hours = 100000 <NEW_LINE> bananas = 98 <NEW_LINE> banana_effect = bananas * hamlet.BANANA_MULTIPLIER <NEW_LINE> chance = (hours * ((monkeys / hamlet.SHIFTS) + banana_effect)) <NEW_LIN...
Test cases for Task 02.
62598f7db57a9660fecd1445
class QemuBinaryRunner(ZephyrBinaryRunner): <NEW_LINE> <INDENT> def __init__(self, debug=False): <NEW_LINE> <INDENT> super(QemuBinaryRunner, self).__init__(debug=debug) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def name(cls): <NEW_LINE> <INDENT> return 'qemu' <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def do_add_par...
Place-holder for QEMU runner customizations.
62598f7d8a349b6b43685c0b
class ToFrontPosServiceState(metaclass=abc.ABCMeta): <NEW_LINE> <INDENT> def __init__(self, isSubstate=False): <NEW_LINE> <INDENT> self._isSubstate = isSubstate <NEW_LINE> <DEDENT> @property <NEW_LINE> def isSubstate(self): <NEW_LINE> <INDENT> return self._isSubstate <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> d...
Abstract State class for a Pressing Service SM
62598f7d0383005118f6d0c9
class CustomFieldChoice(NautobotBaseModel): <NEW_LINE> <INDENT> _modelname = "customfieldchoice" <NEW_LINE> _identifiers = ("field", "value") <NEW_LINE> _attributes = ("weight",) <NEW_LINE> _nautobot_model = extras.CustomFieldChoice <NEW_LINE> field: CustomFieldRef <NEW_LINE> value: str <NEW_LINE> weight: int = 100
One of the valid options for a CustomField of type "select" or "multiselect".
62598f7d4e696a045264dae4
class _SetArg(CollectionArg[AbstractSet[ValueT], ValueT]): <NEW_LINE> <INDENT> def _createValue(self, items: Iterable[ValueT]) -> AbstractSet[ValueT]: <NEW_LINE> <INDENT> return frozenset(items) <NEW_LINE> <DEDENT> def parse(self, *strValues: str) -> AbstractSet[ValueT]: <NEW_LINE> <INDENT> values = super().parse(*strV...
Argument that keeps a set of values in no particular order; duplicates are removed. If no default value is specified, the set for this argument will be empty if the argument doesn't occur in the query. The default value can be set to 'mandatory' to refuse empty sets, or to a non-empty set to make that the default set. ...
62598f7d07d97122c421666a
class Collection(containers.Container): <NEW_LINE> <INDENT> put_schema = COLLECTION_PUT_SCHEMA <NEW_LINE> def __init__(self, request=None, response=None): <NEW_LINE> <INDENT> super(Collection, self).__init__(request, response) <NEW_LINE> self.dbc = self.app.db.collections <NEW_LINE> self.json_schema = COLLECTION_SCHEMA...
/collections/<cid>
62598f7d3eb6a72ae038a00a
class Colordiff(Package): <NEW_LINE> <INDENT> homepage = "https://www.colordiff.org" <NEW_LINE> url = "https://www.colordiff.org/archive/colordiff-1.0.18.tar.gz" <NEW_LINE> version('1.0.19', sha256='46e8c14d87f6c4b77a273cdd97020fda88d5b2be42cf015d5d84aca3dfff3b19') <NEW_LINE> version('1.0.18', sha256='29cfecd8854d...
Colorful diff utility.
62598f7d26238365f5fac538
class Car(): <NEW_LINE> <INDENT> def __init__(self, make, model, year): <NEW_LINE> <INDENT> self.make = make <NEW_LINE> self.model = model <NEW_LINE> self.year = year <NEW_LINE> self.odometer_reading = 0 <NEW_LINE> <DEDENT> def get_descriptive_name(self): <NEW_LINE> <INDENT> long_name = str(self.year) + ' ' + self.make...
一次模拟汽车的简单尝试
62598f7d9b70327d1c57e76d
class Hemline(BaseMetaDetail, TimeStampModel): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return self.name <NEW_LINE> <DEDENT> class Meta: <NEW_LINE> <INDENT> verbose_name = _("Hemline") <NEW_LINE> verbose_name_plural = _("Hemline")
62598f7d76d4e153a661c5db
class TransientTileAbsoluteURL(BaseTileAbsoluteURL): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> url = super(TransientTileAbsoluteURL, self).__str__() <NEW_LINE> manager = ITileDataManager(self.context) <NEW_LINE> transient = manager.storage == IAnnotations(self.request) <NEW_LINE> if self.context.id and...
Absolute URL for a transient tile. Includes the tile traverser and tile data encoded in the query string.
62598f7dac7a0e7691f71ee2
class KnowledgeBaseUninitializedError(Error): <NEW_LINE> <INDENT> pass
Attempt to process artifact without a valid Knowledge Base.
62598f7d21a7993f00c6593a
class _MpConnection(object): <NEW_LINE> <INDENT> def __init__(self, sock): <NEW_LINE> <INDENT> sock.setblocking(True) <NEW_LINE> self.sock = sock <NEW_LINE> <DEDENT> def fileno(self): <NEW_LINE> <INDENT> return self.sock.fileno() <NEW_LINE> <DEDENT> def send(self, obj): <NEW_LINE> <INDENT> pickle.dump(obj, self, protoc...
Highly limited multiprocessing.Connection alternative
62598f7d7c178a314d78ce73
class Trigger(Enum): <NEW_LINE> <INDENT> CH1 = 'CH1' <NEW_LINE> CH2 = 'CH2' <NEW_LINE> CH3 = 'CH3' <NEW_LINE> CH4 = 'CH4' <NEW_LINE> AUX = 'AUX' <NEW_LINE> LINE = 'LINE'
Available Trigger sources (AUX not Available on TDS520A/TDS540A)
62598f7dec188e330fdf8269
class UnpickleableError(Exception): <NEW_LINE> <INDENT> pass
An exception to raise when :py:func:`pybryt.utils.pickle_and_hash` fails.
62598f7d15fb5d323ce7e6f5
class NTLMSecurityHandler(LDAPSecurityHandler): <NEW_LINE> <INDENT> def __init__(self, org_url, username, password, proxy_url=None, proxy_port=None, referer_url=None): <NEW_LINE> <INDENT> self._login_username = username <NEW_LINE> self._password = password <NEW_LINE> self._proxy_url = proxy_url <NEW_LINE> self._proxy_p...
performs NTLM/Kerberos security handling
62598f7d82261d6c5272fbb8
class Cs(object): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.exe_order = [] <NEW_LINE> self.columns_in_set = args <NEW_LINE> self.expected_values = kwargs <NEW_LINE> self.error_msg = u'Values does not meet validation rules' <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT...
Column set.
62598f7da05bb46b3848a245
class Subscribers(models.Model): <NEW_LINE> <INDENT> index_key = models.AutoField(primary_key=True) <NEW_LINE> creation = models.DateTimeField(auto_now_add=True, blank=True) <NEW_LINE> first_name = models.CharField(max_length=35) <NEW_LINE> middle_name = models.CharField(max_length=35, null=True) <NEW_LINE> last_name =...
Mailing list subscribers
62598f7d8a43f66fc4bf1b49
class BaseInterface(object): <NEW_LINE> <INDENT> def __getattr_from_webdriver_or_webelement__(self, item): <NEW_LINE> <INDENT> raise NotImplementedError( 'Method "__getattr_from_webdriver_or_webelement__" does not implemented in "{}"'.format( self.__class__.__name__, ), ) <NEW_LINE> <DEDENT> def __setattr_to_webdriver_...
Base class to interface for proxy object
62598f7db830903b9686e156
class TrainData_firstTest(TrainDataDeepJetDomAda): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> TrainDataDeepJetDomAda.__init__(self) <NEW_LINE> self.addBranches(['jet_pt', 'jet_eta']) <NEW_LINE> self.addBranches(['track_pt'], 6) <NEW_LINE> self.addBranches(['track_releta', 'track_sip3D', 'track_sip2D'],...
same as TrainData_deepCSV but with 4 truth labels: B BB C UDSG
62598f7d9b70327d1c57e76e
class StatusPlaceholder: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.done = False <NEW_LINE> <DEDENT> def watch(self, _): <NEW_LINE> <INDENT> ...
Just enough to make ProgressBar happy. We will update manually.
62598f7d0383005118f6d0cc
class HighscoreList: <NEW_LINE> <INDENT> def __init__(self, places: int=10) -> None: <NEW_LINE> <INDENT> self.scores = [] <NEW_LINE> self.places = places <NEW_LINE> <DEDENT> def add(self, highscore: Highscore) -> None: <NEW_LINE> <INDENT> self.scores.append(highscore) <NEW_LINE> self.scores.sort() <NEW_LINE> self.score...
A sorted list of top scores
62598f7d91af0d3eaad397d6
class Laplace(StochasticParameter): <NEW_LINE> <INDENT> def __init__(self, loc, scale): <NEW_LINE> <INDENT> super(Laplace, self).__init__() <NEW_LINE> self.loc = handle_continuous_param(loc, "loc") <NEW_LINE> self.scale = handle_continuous_param(scale, "scale", value_range=(0, None)) <NEW_LINE> <DEDENT> def _draw_sampl...
Parameter that resembles a (continuous) laplace distribution. This is a wrapper around numpy's :func:`numpy.random.laplace`. Parameters ---------- loc : number or tuple of number or list of number or imgaug.parameters.StochasticParameter The position of the distribution peak, similar to the mean in normal distrib...
62598f7d23e79379d538bec4
class CoverArtProviderCaaReleaseGroup(CoverArtProviderCaa): <NEW_LINE> <INDENT> NAME = "CaaReleaseGroup" <NEW_LINE> TITLE = N_("Cover Art Archive: Release Group") <NEW_LINE> OPTIONS = None <NEW_LINE> ignore_json_not_found_error = True <NEW_LINE> coverartimage_class = CaaCoverArtImageRg <NEW_LINE> coverartimage_thumbnai...
Use cover art from album release group
62598f7dd10714528d69d899
class SearchNamesListTests(AuthenticatedUserTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(SearchNamesListTests, self).setUp() <NEW_LINE> self.link = '/api/users/?&name=' <NEW_LINE> <DEDENT> def test_empty_list(self): <NEW_LINE> <INDENT> response = self.client.get(self.link + 'this-user-is-fa...
tests for generic list (GET /users/) filtered by username
62598f7da17c0f6771d5bc0e
class BaseArray(Element,IDisposable): <NEW_LINE> <INDENT> def Dispose(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def getBoundingBox(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def GetCopiedMemberIds(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def GetOriginalMemberIds(self): <NEW_LINE> <IN...
An abstract base class that represents an array within the Revit project.
62598f7d16aa5153ce3ffeca