code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class ResourceNavigationLink(SubResource): <NEW_LINE> <INDENT> _validation = { 'etag': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'st...
ResourceNavigationLink resource. Variables are only populated by the server, and will be ignored when sending a request. :param id: Resource ID. :type id: str :param name: Name of the resource that is unique within a resource group. This name can be used to access the resource. :type name: str :ivar etag: A unique r...
62599040c432627299fa424b
class DefaultQAConceptProvider(object): <NEW_LINE> <INDENT> def __init__(self, data_provider): <NEW_LINE> <INDENT> self.qa_concepts = self.__expand_qa_concepts(data_provider) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def __expand_qa_concepts(data_provider): <NEW_LINE> <INDENT> concepts = [] <NEW_LINE> for entity_cla...
QA concept provider backed by a knowledge data provider.
625990401d351010ab8f4db1
class Env: <NEW_LINE> <INDENT> def __init__(self, outerenv=None): <NEW_LINE> <INDENT> self.env = dict() <NEW_LINE> self.outerenv = outerenv <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def empty(cls): <NEW_LINE> <INDENT> return cls() <NEW_LINE> <DEDENT> def extend(self, variable, value): <NEW_LINE> <INDENT> self.env[var...
Absfun: the dicionary {k1:v1, k2:v2,...} represents the environment binding k1 to v1 and k2 to v2. There are no duplicates. The keys k must be strings, and the values v must be legitimate values in our environment. The empty dictionary represents the empty environment. Repinv: Newer bindings replace older bindings i...
62599040379a373c97d9a2bd
class Problem(object): <NEW_LINE> <INDENT> def __init__(self, solver_instance=None): <NEW_LINE> <INDENT> if solver_instance is None: <NEW_LINE> <INDENT> solver_instance = DefaultSolver() <NEW_LINE> <DEDENT> self._solver_instance = solver_instance <NEW_LINE> self.reset() <NEW_LINE> <DEDENT> @property <NEW_LINE> def solu...
Represents a problem space that needs solutions. Optionally, solver_instance can be set to provide a more customized solver.
625990403c8af77a43b68886
class FrontToBackPacket( collections.namedtuple( 'FrontToBackPacket', ['operation_id', 'sequence_number', 'kind', 'name', 'subscription', 'trace_id', 'payload', 'timeout'])): <NEW_LINE> <INDENT> pass
A sum type for all values sent from a front to a back. Attributes: operation_id: A unique-with-respect-to-equality hashable object identifying a particular operation. sequence_number: A zero-indexed integer sequence number identifying the packet's place among all the packets sent from front to back for thi...
6259904071ff763f4b5e8a33
class CableShieldMaterialKind(str): <NEW_LINE> <INDENT> pass
Values are: other, lead, steel, aluminum, copper
625990401d351010ab8f4db2
class Changelog: <NEW_LINE> <INDENT> RAW_CHANGELOG_URL = 'https://raw.githubusercontent.com/kyb3r/modmail/master/CHANGELOG.md' <NEW_LINE> CHANGELOG_URL = 'https://github.com/kyb3r/modmail/blob/master/CHANGELOG.md' <NEW_LINE> VERSION_REGEX = re.compile(r'# (v\d+\.\d+\.\d+)([\S\s]*?(?=# v|$))') <NEW_LINE> def __init__(se...
This class represents the complete changelog of Modmail. Parameters ---------- bot : Bot The Modmail bot. text : str The complete changelog text. Attributes ---------- bot : Bot The Modmail bot. text : str The complete changelog text. versions : List[Version] A list of `Version`'s within the chang...
6259904030c21e258be99aa1
@ROI_BOX_HEAD_REGISTRY.register() <NEW_LINE> class FastRCNNConvFCHead(nn.Sequential): <NEW_LINE> <INDENT> @configurable <NEW_LINE> def __init__( self, input_shape: ShapeSpec, *, conv_dims: List[int], fc_dims: List[int], conv_norm="" ): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> assert len(conv_dims) + len(fc_dim...
A head with several 3x3 conv layers (each followed by norm & relu) and then several fc layers (each followed by relu).
6259904024f1403a92686217
class SigV2Auth(BaseSigner): <NEW_LINE> <INDENT> def __init__(self, credentials): <NEW_LINE> <INDENT> self.credentials = credentials <NEW_LINE> <DEDENT> def calc_signature(self, request, params): <NEW_LINE> <INDENT> logger.debug("Calculating signature using v2 auth.") <NEW_LINE> split = urlsplit(request.url) <NEW_LINE>...
Sign a request with Signature V2.
62599040b830903b9686edc4
class LameAttrDict(dict): <NEW_LINE> <INDENT> def __getattribute__(self, name): <NEW_LINE> <INDENT> if name.startswith('__'): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return dict.__getattribute__(self, name) <NEW_LINE> <DEDENT> except AttributeError: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return dict.__getatt...
A `dict` subclass that lets you access keys as using attribute notation. To access built-in dict attributes and methods prefix the name with '__'. WARNING: this probably won't work well with code expecting an dict because calling normal `dict` methods won't work. For example: >>> d = LameAttrDict(foo=1, update=2, c...
6259904066673b3332c3168e
class Error(Exception): <NEW_LINE> <INDENT> pass
Base class for all exceptions in skime
6259904007d97122c4217f35
class MockDatabaseTest(AppTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(MockDatabaseTest, self).setUp() <NEW_LINE> self.db = MockSession() <NEW_LINE> self.object_session_patcher = mock.patch( 'atmcraft.model.account.object_session') <NEW_LINE> self.object_session = self.object_session_patcher.st...
Run tests against a mock query system.
6259904050485f2cf55dc21a
class LedgerEntryType(IntEnum): <NEW_LINE> <INDENT> ACCOUNT = 0 <NEW_LINE> TRUSTLINE = 1 <NEW_LINE> OFFER = 2 <NEW_LINE> DATA = 3 <NEW_LINE> CLAIMABLE_BALANCE = 4 <NEW_LINE> def pack(self, packer: Packer) -> None: <NEW_LINE> <INDENT> packer.pack_int(self.value) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def unpack(cls...
XDR Source Code ---------------------------------------------------------------- enum LedgerEntryType { ACCOUNT = 0, TRUSTLINE = 1, OFFER = 2, DATA = 3, CLAIMABLE_BALANCE = 4 }; ----------------------------------------------------------------
625990406fece00bbacccc46
class EmptySet(Set): <NEW_LINE> <INDENT> __metaclass__ = Singleton <NEW_LINE> is_EmptySet = True <NEW_LINE> def _intersect(self, other): <NEW_LINE> <INDENT> return S.EmptySet <NEW_LINE> <DEDENT> @property <NEW_LINE> def _complement(self): <NEW_LINE> <INDENT> return S.UniversalSet <NEW_LINE> <DEDENT> @property <NEW_LINE...
Represents the empty set. The empty set is available as a singleton as S.EmptySet. Examples ======== >>> from sympy import S, Interval >>> S.EmptySet EmptySet() >>> Interval(1, 2).intersect(S.EmptySet) EmptySet() See Also ======== UniversalSet References ========== .. [1] http://en.wikipedia....
62599040d10714528d69efd7
@myaml.register <NEW_LINE> @connection.register <NEW_LINE> class OutputParameter(Parameter): <NEW_LINE> <INDENT> pass
output parameter
62599040d4950a0f3b11178b
class Role(models.Model): <NEW_LINE> <INDENT> title = models.CharField(verbose_name='角色名称',max_length=32) <NEW_LINE> permissions = models.ManyToManyField(verbose_name='具有的所有权限',to='Permission',blank=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> verbose_name_plural = "角色表" <NEW_LINE> <DEDENT> def __str__(self): <NEW_...
角色表
6259904029b78933be26aa0e
class IdentityTool(cherrypy.Tool): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> log.debug("Identity Tool initialized") <NEW_LINE> return super(IdentityTool, self).__init__("before_handler", self.before_handler, priority=30) <NEW_LINE> <DEDENT> def start_extension(self): <NEW_LINE> <INDENT> if not config....
A TurboGears identity tool
62599040d53ae8145f9196f3
class UserAdd(PMCommand): <NEW_LINE> <INDENT> logger = logging.getLogger(__name__) <NEW_LINE> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(UserAdd, self).get_parser(prog_name) <NEW_LINE> parser.add_argument('identity') <NEW_LINE> return parser <NEW_LINE> <DEDENT> def take_action(self, parsed_args...
Add a user
625990400fa83653e46f6170
class TestCodingStandards(unittest.TestCase): <NEW_LINE> <INDENT> def test_PythonFiles_HaveLicenseText(self): <NEW_LINE> <INDENT> pyfiles = find_python_files() <NEW_LINE> files_missing_license = [] <NEW_LINE> for filename in pyfiles: <NEW_LINE> <INDENT> file_basename = os.path.basename(filename) <NEW_LINE> if license_m...
test coding standards: check for license
6259904021a7993f00c67204
class InvalidParameters(ParameterError): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.reasons = dict(kwargs.pop("params", {})) <NEW_LINE> kwargs["params"] = self.reasons.keys() <NEW_LINE> kwargs["error_type"] = ErrorTypes.invalid_parameters <NEW_LINE> ParameterError.__init__(self, *...
Raised when some parameters failed validation. @ivar reasons: reasons of the validation failure indexed by parameter name. @type reasons: {str: str}
6259904050485f2cf55dc21b
class CommonDataForm(CommonProperties): <NEW_LINE> <INDENT> residence = MySelectField( label=_(u'Населённый пункт'), choices=[(str(R.id), R.name) for R in models.Residence.all()], blank_text=_(u'Выберите населённый пункт'), allow_blank=True ) <NEW_LINE> dateFrom = MFDateField(_(u'с'), [validators.InputRequired(_(u'Вы н...
Главная форма на странице /show_common_data
6259904021bff66bcd723f01
class AdbLogcat(object): <NEW_LINE> <INDENT> def __init__(self, process, filename, logger): <NEW_LINE> <INDENT> self.logger = logger <NEW_LINE> self.p = process <NEW_LINE> self.name = filename <NEW_LINE> if self.p.stderr: <NEW_LINE> <INDENT> self.p.stderr.close() <NEW_LINE> <DEDENT> self.logger.info("Adblogcat({}): sta...
AdbLogcat, offer easy handle for adb logcat process It should be created by AdbWrapper.logcat Offer below function: isalive() join() close() filename()
6259904023e79379d538d796
class OrganizationListView(generics.ListCreateAPIView): <NEW_LINE> <INDENT> authentication_classes = (TokenAuthentication,) <NEW_LINE> permission_classes = (IsAuthenticated,) <NEW_LINE> queryset = Organization.objects.all() <NEW_LINE> serializer_class = OrganizationSerializer <NEW_LINE> def get_queryset(self): <NEW_LIN...
Returns a list of all organizations.
62599040ec188e330fdf9b31
class ShowInterface(QuantumInterfaceCommand, show.ShowOne): <NEW_LINE> <INDENT> api = 'network' <NEW_LINE> log = logging.getLogger(__name__ + '.ShowInterface') <NEW_LINE> def get_data(self, parsed_args): <NEW_LINE> <INDENT> self.log.debug('get_data(%s)' % parsed_args) <NEW_LINE> quantum_client = self.app.client_manager...
Show interface on a given port
6259904015baa72349463229
class MissingResolutionError(OpencastError): <NEW_LINE> <INDENT> def __init__(self, resolution): <NEW_LINE> <INDENT> self.resolution = resolution <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "Resolution not support {0}.".format(self.resolution)
Error for invalid resolutions.
62599040097d151d1a2c22ff
class PixelShuffle(HybridBlock): <NEW_LINE> <INDENT> def __init__(self, channels, scale_factor, in_size, fixed_size, **kwargs): <NEW_LINE> <INDENT> super(PixelShuffle, self).__init__(**kwargs) <NEW_LINE> assert (channels % scale_factor % scale_factor == 0) <NEW_LINE> self.channels = channels <NEW_LINE> self.scale_facto...
Pixel-shuffle operation from 'Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network,' https://arxiv.org/abs/1609.05158. Parameters: ---------- scale_factor : int Multiplier for spatial size. in_size : tuple of 2 int Spatial size of the input heatmap tensor....
625990401d351010ab8f4db6
class LaboratoryForm(ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = LaboratoryProfile
Form class 'Laboratory'
62599040e64d504609df9d1d
class Conf(_config.ConfigNamespace): <NEW_LINE> <INDENT> timeout = _config.ConfigItem(60, "Timeout in seconds.") <NEW_LINE> archive_url = _config.ConfigItem( _url_list, 'The ALMA Archive mirror to use.') <NEW_LINE> auth_url = _config.ConfigItem( auth_urls, 'ALMA Central Authentication Service URLs' ) <NEW_LINE> usernam...
Configuration parameters for `astroquery.alma`.
62599040dc8b845886d5484f
class QcInput(MSONable): <NEW_LINE> <INDENT> def __init__(self, jobs): <NEW_LINE> <INDENT> jobs = jobs if isinstance(jobs, list) else [jobs] <NEW_LINE> for j in jobs: <NEW_LINE> <INDENT> if not isinstance(j, QcTask): <NEW_LINE> <INDENT> raise ValueError("jobs must be a list QcInput object") <NEW_LINE> <DEDENT> self.job...
An object representing a multiple step QChem input file.
6259904015baa7234946322a
class TestTwoingTwoClasses(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.criterion = criteria.Twoing <NEW_LINE> self.config = dataset.load_config(os.path.join( '.', 'data', 'train_dataset1')) <NEW_LINE> self.data = dataset.Dataset(self.config["filepath"], self.config["key attrib inde...
Tests Twoing criterion using dataset with two classes.
6259904021bff66bcd723f03
class TokenSession(requests.Session): <NEW_LINE> <INDENT> def __init__(self, capacity, fill_rate): <NEW_LINE> <INDENT> requests.Session.__init__(self) <NEW_LINE> self.capacity = float(capacity) <NEW_LINE> self._tokens = float(capacity) <NEW_LINE> self.consumed_tokens = 0 <NEW_LINE> self.fill_rate = float(fill_rate) <NE...
Allow rate-limiting requests to a site
62599040b830903b9686edc6
class PowNode(BinaryNode): <NEW_LINE> <INDENT> def __init__(self, lhs, rhs): <NEW_LINE> <INDENT> super(PowNode, self).__init__(lhs, rhs, '**', 4, 'right', Constant(1)) <NEW_LINE> <DEDENT> def simplify_specific(self): <NEW_LINE> <INDENT> left=self.lhs <NEW_LINE> right=self.rhs <NEW_LINE> if right==Constant(0): <NEW_LINE...
Represents the power operator
625990403eb6a72ae038b904
class MyList(list): <NEW_LINE> <INDENT> def print_sorted(self): <NEW_LINE> <INDENT> print(sorted(self))
myList - This class inherits from list Args: list: the list superclass
62599040711fe17d825e15e9
class DeleteWorkResponse(BaseOrcidClientResponse): <NEW_LINE> <INDENT> specific_exceptions = (exceptions.OrcidNotFoundException, exceptions.PutcodeNotFoundDeleteException, exceptions.TokenWithWrongPermissionException,)
An empty dict-like object.
6259904045492302aabfd775
class HTTPLoopDetected(HTTPServerError): <NEW_LINE> <INDENT> status_code = 508
HTTP/508 - Loop Detected
62599040d53ae8145f9196f7
class Base: <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.id_ = create_id() <NEW_LINE> self.name = name <NEW_LINE> <DEDENT> def save(self): <NEW_LINE> <INDENT> file_path = r'%s/%s' % (self.save_path, self.id_) <NEW_LINE> with open(file_path, 'wb') as f: <NEW_LINE> <INDENT> pickle.dump(self, f) ...
基类,用户继承属性
6259904030c21e258be99aa8
class Params(object): <NEW_LINE> <INDENT> def __init__(self, param_file=None): <NEW_LINE> <INDENT> self.param_file = param_file <NEW_LINE> if param_file == None: return <NEW_LINE> self.yaml = YAML() <NEW_LINE> self.params = None <NEW_LINE> try: <NEW_LINE> <INDENT> self.params = self.yaml.load(pathlib.Path(self.param_fi...
Parameters are stored as YAML files, of the following format: hostname_or_host: actor_name: component_name: param_name: param_value
62599040b57a9660fecd2d16
class WeekDay(VbaLibraryFunc): <NEW_LINE> <INDENT> def eval(self, context, params=None): <NEW_LINE> <INDENT> context = context <NEW_LINE> if ((params is None) or (len(params) == 0)): <NEW_LINE> <INDENT> return 1 <NEW_LINE> <DEDENT> date_str = utils.safe_str_convert(params[0]).replace("#", "") <NEW_LINE> date_obj = None...
Emulate VBA WeekDay function.
625990408da39b475be0448a
class Update(BaseQuery): <NEW_LINE> <INDENT> def __init__(self, table, mapping): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._table = table <NEW_LINE> self._mapping = mapping <NEW_LINE> <DEDENT> def set_mapping(self, mapping): <NEW_LINE> <INDENT> self._mapping = mapping <NEW_LINE> <DEDENT> def __str__(self):...
Update Query
625990401f5feb6acb163e8f
class Element: <NEW_LINE> <INDENT> tag = 'html' <NEW_LINE> indent = '\t' <NEW_LINE> def __init__(self, content=None, **kwargs): <NEW_LINE> <INDENT> if content is None: <NEW_LINE> <INDENT> self.content = [] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.content = [content] <NEW_LINE> <DEDENT> if kwargs is not None: ...
class attribute to store html tags
6259904094891a1f408ba044
class GradeEntry: <NEW_LINE> <INDENT> course_identifier: str <NEW_LINE> course_weight: float <NEW_LINE> course_grade: str <NEW_LINE> def __init__(self, course_identifier: str, course_weight: float, course_grade: str) -> None: <NEW_LINE> <INDENT> self.course_identifier = course_identifier <NEW_LINE> self.course_grade = ...
a grade system for students course_identifier - which course course_weight - credit course_grade - grade for this course
6259904023e79379d538d79a
class SetupApplication(npyscreen.NPSAppManaged): <NEW_LINE> <INDENT> def onStart(self): <NEW_LINE> <INDENT> self.addForm('MAIN', MainMenuForm, name='dtk-tools v0.3.5') <NEW_LINE> self.addForm('EDIT', ConfigEditionForm, name='Block creation/edition form') <NEW_LINE> <DEDENT> def change_form(self, name): <NEW_LINE> <INDE...
Main application for the dtk setup command. Forms available: - MAIN: Display the menu - DEFAULT_SELECTION: Form to select the default blocks - EDIT: Form to edit/create a block
62599040b830903b9686edc7
class Meta: <NEW_LINE> <INDENT> verbose_name = 'Rating' <NEW_LINE> verbose_name_plural = 'Ratings'
Meta definition for Rating.
6259904073bcbd0ca4bcb526
class OSBreakDown(AbstractClientStatsCronFlow): <NEW_LINE> <INDENT> def BeginProcessing(self): <NEW_LINE> <INDENT> self.counters = [ _ActiveCounter(self.stats.Schema.OS_HISTOGRAM), _ActiveCounter(self.stats.Schema.VERSION_HISTOGRAM), _ActiveCounter(self.stats.Schema.RELEASE_HISTOGRAM), ] <NEW_LINE> <DEDENT> def FinishP...
Records relative ratios of OS versions in 7 day actives.
6259904015baa7234946322d
class notify_remove4(BaseObj): <NEW_LINE> <INDENT> _attrlist = ("entry", "cookie") <NEW_LINE> def __init__(self, unpack): <NEW_LINE> <INDENT> self.entry = notify_entry4(unpack) <NEW_LINE> self.cookie = nfs_cookie4(unpack)
struct notify_remove4 { notify_entry4 entry; nfs_cookie4 cookie; };
62599040b5575c28eb713617
class DPShowConfig(DP.get_sub(), QuickAppBase): <NEW_LINE> <INDENT> cmd = 'config' <NEW_LINE> def define_program_options(self, params): <NEW_LINE> <INDENT> params.add_flag('verbose') <NEW_LINE> params.add_string('type', help="Show only type t objects.", default='*') <NEW_LINE> <DEDENT> def go(self): <NEW_LINE> <INDENT>...
Shows the configuration
62599040d53ae8145f9196f9
class QuestionNotificationTestCase(TestCaseWithFactory): <NEW_LINE> <INDENT> layer = DatabaseFunctionalLayer <NEW_LINE> def makeQuestion(self): <NEW_LINE> <INDENT> asker = self.factory.makePerson() <NEW_LINE> product = self.factory.makeProduct() <NEW_LINE> naked_question_set = removeSecurityProxy(getUtility(IQuestionSe...
Test common question notification behavior.
62599040dc8b845886d54853
class ptMarkerMarkerNameChangedMsg(ptMarkerMsg): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def getGameCli(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def getMarkerMsgType(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def getType(self): <NEW_LINE> <INDENT> pass <N...
Marker message received when the name of a marker is changed
625990403eb6a72ae038b908
@pydantic.dataclasses.dataclass(config=Config) <NEW_LINE> class Canvas: <NEW_LINE> <INDENT> objs: typing.Dict[str, Dashboard] <NEW_LINE> def __post_init_post_parse__(self): <NEW_LINE> <INDENT> tabs = [(item, dash.view) for item, dash in self.objs.items()] <NEW_LINE> self._canvas = pn.Tabs(*tabs, tabs_location='above') ...
A Canvas is a collection of Dashboards.
6259904010dbd63aa1c71e75
class disable(ChromeCommand): <NEW_LINE> <INDENT> def __init__(self): pass
Disables log domain, prevents further log entries from being reported to the client.
6259904073bcbd0ca4bcb528
class Number(Expression): <NEW_LINE> <INDENT> def __init__(self, head, attributes=None): <NEW_LINE> <INDENT> if attributes is None: <NEW_LINE> <INDENT> attributes = [Attribute.Numeric, Attribute.Constant] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> attributes += [Attribute.Numeric] <NEW_LINE> <DEDENT> super().__init_...
Base class for every number expression.
62599040baa26c4b54d50546
class AakashCenter(models.Model): <NEW_LINE> <INDENT> ac_id = models.IntegerField(max_length=6, unique=True) <NEW_LINE> quantity = models.IntegerField(max_length=7, default=0) <NEW_LINE> name = models.CharField(max_length=200, blank=True) <NEW_LINE> city = models.CharField(max_length=200, blank=True) <NEW_LINE> state =...
Aakash centers.
6259904073bcbd0ca4bcb529
@python_2_unicode_compatible <NEW_LINE> class Room(models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=255) <NEW_LINE> staff_only = models.BooleanField(default=False) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.title <NEW_LINE> <DEDENT> @property <NEW_LINE> def websocket_group(self)...
A room for people to chat
6259904023849d37ff852358
class ServerInfo(DStruct): <NEW_LINE> <INDENT> pass
Information object returned by :func:`~dogecoinrpc.connection.DogecoinConnection.getinfo`. - *errors* -- Number of errors. - *blocks* -- Number of blocks. - *paytxfee* -- Amount of transaction fee to pay. - *keypoololdest* -- Oldest key in keypool. - *genproclimit* -- Processor limit for generation. - *connection...
625990403c8af77a43b6888b
class DosFsLabel(FSLabelApp): <NEW_LINE> <INDENT> name = "dosfslabel" <NEW_LINE> reads = True <NEW_LINE> _label_regex = r'(?P<label>.*)' <NEW_LINE> def _writeLabelArgs(self, fs): <NEW_LINE> <INDENT> return [fs.device, fs.label] <NEW_LINE> <DEDENT> def _readLabelArgs(self, fs): <NEW_LINE> <INDENT> return [fs.device]
Application used by FATFS.
6259904030c21e258be99aab
class DexUnit(LogUnit): <NEW_LINE> <INDENT> @property <NEW_LINE> def _default_function_unit(self): <NEW_LINE> <INDENT> return dex <NEW_LINE> <DEDENT> @property <NEW_LINE> def _quantity_class(self): <NEW_LINE> <INDENT> return Dex
Logarithmic physical units expressed in magnitudes Parameters ---------- physical_unit : `~astropy.units.Unit` or `string` Unit that is encapsulated within the magnitude function unit. If not given, dimensionless. function_unit : `~astropy.units.Unit` or `string` By default, this is ``dex`, but this allo...
62599040dc8b845886d54855
class TestSyncServiceApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = isi_sdk_9_0_0.api.sync_service_api.SyncServiceApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_create_policies_policy_reset_item(self): <NEW_LINE> <INDENT> ...
SyncServiceApi unit test stubs
6259904030c21e258be99aac
class ImgTextCompositionBase(torch.nn.Module): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(ImgTextCompositionBase, self).__init__() <NEW_LINE> self.normalization_layer = torch_functions.NormalizationLayer( normalize_scale=4.0, learn_scale=True) <NEW_LINE> self.soft_triplet_loss = torch_functions.T...
Base class for image + text composition.
6259904007f4c71912bb06d0
class Parser(ConfigParser): <NEW_LINE> <INDENT> def get(self, section, option, default=None, cls=uni_cls, delimiter=','): <NEW_LINE> <INDENT> default = None if default is None else str(default) <NEW_LINE> try: <NEW_LINE> <INDENT> value = ConfigParser.get(self, section, option).strip() <NEW_LINE> <DEDENT> except NoSecti...
Wrapper to ConfigParser class, with better get method.
62599040be383301e0254ab7
class AuthorizationListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[ExpressRouteCircuitAuthorization]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(AuthorizationListResult, self...
Response for ListAuthorizations API service call retrieves all authorizations that belongs to an ExpressRouteCircuit. :param value: The authorizations in an ExpressRoute Circuit. :type value: list[~azure.mgmt.network.v2018_04_01.models.ExpressRouteCircuitAuthorization] :param next_link: The URL to get the next set of ...
62599040d6c5a102081e33c5
class botflags(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.GREEN = (0,175,0) <NEW_LINE> self.RED = (175,0,0) <NEW_LINE> self.BLACK = (255,255,255)
classdocs
6259904007d97122c4217f3e
class EntityCategory(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): <NEW_LINE> <INDENT> LOCATION = "location" <NEW_LINE> ORGANIZATION = "organization" <NEW_LINE> PERSON = "person" <NEW_LINE> QUANTITY = "quantity" <NEW_LINE> DATETIME = "datetime" <NEW_LINE> URL = "url" <NEW_LINE> EMAIL = "email"
A string indicating what entity categories to return.
62599040d99f1b3c44d0693c
class Comment(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'comments' <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> body = db.Column(db.Text) <NEW_LINE> body_html = db.Column(db.Text) <NEW_LINE> timestamp = db.Column(db.DateTime, index=True, default=datetime.utcnow) <NEW_LINE> disabled = db.Colum...
评论类
6259904050485f2cf55dc224
class XmlNs0SymbolData(object): <NEW_LINE> <INDENT> swagger_types = { } <NEW_LINE> attribute_map = { } <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.discriminator = None <NEW_LINE> <DEDENT> def to_dict(self): <NEW_LINE> <INDENT> result = {} <NEW_LINE> for attr, _ in six.iteritems(self.swagger_types): <NEW_LIN...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62599040d99f1b3c44d0693d
class YDirectionType(Serializable): <NEW_LINE> <INDENT> _fields = ('UVectECF', 'SampleSpacing', 'NumSamples', 'FirstSample') <NEW_LINE> _required = _fields <NEW_LINE> _numeric_format = {'SampleSpacing': FLOAT_FORMAT, } <NEW_LINE> UVectECF = UnitVectorDescriptor( 'UVectECF', XYZType, _required, strict=DEFAULT_STRICT, do...
The Y direction of the collect
62599040b5575c28eb713619
class PasswordResetTests(ManifestTestCase): <NEW_LINE> <INDENT> def test_password_reset_view(self): <NEW_LINE> <INDENT> response = self.client.get(reverse("password_reset")) <NEW_LINE> self.assertEqual(response.status_code, 200) <NEW_LINE> self.assertTemplateUsed(response, "manifest/password_reset_form.html") <NEW_LINE...
Tests for :class:`PasswordResetView <manifest.views.PasswordResetView>`.
6259904063b5f9789fe8640b
class RPCInvalidRPC(RPCFault): <NEW_LINE> <INDENT> def __init__(self, error_data=None): <NEW_LINE> <INDENT> RPCFault.__init__(self, INVALID_REQUEST, ERROR_MESSAGE[INVALID_REQUEST], error_data)
Invalid rpc-package. (INVALID_REQUEST)
6259904023849d37ff85235a
class Failure(Try): <NEW_LINE> <INDENT> def __init__(self, exc): <NEW_LINE> <INDENT> self.failure = exc <NEW_LINE> <DEDENT> def __nonzero__(self): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def map(self, func): <NEW_LINE> <INDENT> return Failure(self.failure) <NEW_LINE> <DEDENT> def get_or_raise(self): <NEW_L...
Represents the failed case of a computation that could fail with an Exception. In this case, the instances value hold the exception was raised during failure
6259904007d97122c4217f3f
class SRPClient(object): <NEW_LINE> <INDENT> def __init__(self, email, password, g=ck.DH_G, N=ck.DH_P, k=3): <NEW_LINE> <INDENT> self.email = email <NEW_LINE> self.password = password <NEW_LINE> self.g, self.N, self.k = g, N, k <NEW_LINE> self.server = None <NEW_LINE> self.session_key = None <NEW_LINE> self.salt = None...
Mock up a client for Secure Remote Password authentication.
62599040507cdc57c63a603c
class ChangePasswordSuccessView(LoginRequiredViewMixin, TemplateView): <NEW_LINE> <INDENT> template_name = 'umanage/change_password/change_password_success.html'
View for when a password has successfully been changed.
62599040d53ae8145f9196fd
class NoParent(exception.DNSException): <NEW_LINE> <INDENT> pass
An attempt was made to get the parent of the root name or the empty name.
6259904026068e7796d4dbe7
class MoonPhase: <NEW_LINE> <INDENT> def __init__(self, date=datetime.now()): <NEW_LINE> <INDENT> if not isinstance(date, datetime): <NEW_LINE> <INDENT> self.date = datetime.strptime(date, '%Y-%m-%d') <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.date = date <NEW_LINE> <DEDENT> self.__dict__.update(phase(self.date...
I describe the phase of the moon. I have the following properties: date - a datetime instance phase - my phase, in the range 0.0 .. 1.0 phase_text - a string describing my phase illuminated - the percentage of the face of the moon illuminated angular_diameter - as seen from Earth, in degrees. s...
6259904076d4e153a661dbc4
class Stack(DataStruct): <NEW_LINE> <INDENT> def push(self, item, priority=None): <NEW_LINE> <INDENT> self.list.append(item)
Implements a simple Stack data structure. A stack uses the First-in-Last-out paradigm
6259904007f4c71912bb06d2
class Handler(BaseHTTPRequestHandler): <NEW_LINE> <INDENT> def do_GET(self): <NEW_LINE> <INDENT> self.server.obst_counter += 1 <NEW_LINE> if self.path[:13] == '/status_code=': <NEW_LINE> <INDENT> status = int(self.path[13:]) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> status = 404 <NEW_LINE> <DEDENT> self.send_respon...
Router for the HTTP server
62599040a79ad1619776b320
class BitEnum(Enum): <NEW_LINE> <INDENT> def __and__(self, other): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> val = other.value <NEW_LINE> <DEDENT> except AttributeError: <NEW_LINE> <INDENT> val = int(other) <NEW_LINE> <DEDENT> res = self.value & val <NEW_LINE> <DEDENT> except (ValueError, Ty...
A type of enum that supports certain binary operations between its instances, namely & (bitwise-and) and | (bitwise-or). It also defines a bool-conversion where the member with value 0 will evaluate False, while all other values evaluate True. For this to work properly, the underlying type of the members should be int...
6259904021bff66bcd723f0b
class AdderServicer(object): <NEW_LINE> <INDENT> def AddNumbers(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!')
The greeting service definition.
625990408da39b475be0448f
class TestDataLoaderBase(unittest.TestCase): <NEW_LINE> <INDENT> def __init__(self, methodName='test_preprocessor', config=None, groundtruth=None, log=None): <NEW_LINE> <INDENT> super(TestDataLoaderBase, self).__init__(methodName) <NEW_LINE> self.config = config <NEW_LINE> self.groundtruth = groundtruth <NEW_LINE> self...
Base class for Test Data Loader to supply parameters to Unit Test Class
6259904023e79379d538d7a0
class CannotSaveException(IoException): <NEW_LINE> <INDENT> formatstring = "You tried to save a file with fileformat '{0}', but this format is not supported for writing files"
Raised when the given format cannot save data (only reading of data is supported for the format)
6259904066673b3332c3169a
class Application(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=255, unique=True) <NEW_LINE> verbose_name = models.CharField(max_length=255, blank=True, default='') <NEW_LINE> description = models.TextField(blank=True, default='') <NEW_LINE> repository = models.CharField(max_length=255, blank=Tr...
The Software/Application
625990404e696a045264e772
class UserDetails(LoginRequiredMixin, View): <NEW_LINE> <INDENT> def get(self, request): <NEW_LINE> <INDENT> user = MyUser.objects.get(pk=request.user.id) <NEW_LINE> user_photos = user.photos.all().order_by('-creation_date') <NEW_LINE> result = make_photo_pages(request, user_photos) <NEW_LINE> ctx = { 'user_photos': re...
User page displaying all his photos
6259904073bcbd0ca4bcb52c
class RouterHandler(BaseHandler): <NEW_LINE> <INDENT> def put(self, uaid): <NEW_LINE> <INDENT> client = self.application.clients.get(uaid) <NEW_LINE> if not client: <NEW_LINE> <INDENT> self.set_status(404, reason=None) <NEW_LINE> self.write("Client not connected.") <NEW_LINE> return <NEW_LINE> <DEDENT> if client.paused...
Router Handler Handles routing a notification to a connected client from an endpoint.
62599040baa26c4b54d5054a
class SpriteCollectionMixin(object): <NEW_LINE> <INDENT> def load_atlas(self, atlas_file): <NEW_LINE> <INDENT> raise NotImplemented <NEW_LINE> <DEDENT> def paint_regions(self, surface, regions): <NEW_LINE> <INDENT> for region in regions: <NEW_LINE> <INDENT> self.tile_group.repaint_rect(self.surface, region) <NEW_LINE> ...
Mixin to hold logic for a collection of sprites (tiles, units, etc)
62599040c432627299fa4252
class TemplateDirSwitcher(object): <NEW_LINE> <INDENT> def process_request(self, request): <NEW_LINE> <INDENT> device_families = importlib.import_module(getattr(settings, 'DEVICE_FAMILIES', 'templateswitcher.device_families')) <NEW_LINE> device_obj = getattr(request, 'device', None) <NEW_LINE> device_cache_key = hash(r...
Template Switching Middleware. Switches template dirs by using preset conditions and device families according to the devices capabilities. Returns the device object in the request object and resets the TEMPLATE_DIRS attr in the project settings.
625990406fece00bbacccc52
class dbEngine(object): <NEW_LINE> <INDENT> dbengine = None <NEW_LINE> @staticmethod <NEW_LINE> def get(): <NEW_LINE> <INDENT> if not dbEngine.dbengine: <NEW_LINE> <INDENT> dbEngine.dbengine = create_engine('postgresql://basudebpuragrodb:password@localhost:5432/basudebpuragrodb', echo=True) <NEW_LINE> <DEDENT> return d...
singletone class to access db engine
625990401d351010ab8f4dbf
class Sinus(Node): <NEW_LINE> <INDENT> def __init__(self, amplitude=1, rate=1, name="sinus"): <NEW_LINE> <INDENT> self._amplitude = amplitude <NEW_LINE> self._rate = rate <NEW_LINE> self._name = name <NEW_LINE> self._start = None <NEW_LINE> <DEDENT> def update(self): <NEW_LINE> <INDENT> timestamp = now() <NEW_LINE> flo...
Return a sinusoidal signal sampled to registry rate. This node generates a sinusoidal signal of chosen frequency and amplitude. Note that at each update, the node generate one row, so its sampling rate equals the graph parsing rate (given by the Registry). Attributes: o (Port): Default output, provides DataFrame....
625990403c8af77a43b6888d
class EdgeNotFound(Exception): <NEW_LINE> <INDENT> pass
Raised in case Edge not found
625990401d351010ab8f4dc0
class TimelineView(BrowserView): <NEW_LINE> <INDENT> implements(ITimelineView) <NEW_LINE> def __init__(self, context, request): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> self.request = request <NEW_LINE> <DEDENT> @property <NEW_LINE> def portal_catalog(self): <NEW_LINE> <INDENT> return getToolByName(self.co...
Timeline browser view
6259904030c21e258be99aaf
class Figure(Element): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._filename = "" <NEW_LINE> self._caption = "" <NEW_LINE> <DEDENT> @property <NEW_LINE> def caption(self): <NEW_LINE> <INDENT> return self._caption <NEW_LINE> <DEDENT> @caption.setter <NEW_LINE> def capti...
Represents a figure.
62599040dc8b845886d54859
class LineWatcher(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.start_time = 0.0 <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <INDENT> self.start_time = time.time() <NEW_LINE> <DEDENT> def stop(self): <NEW_LINE> <INDENT> if self.start_time: <NEW_LINE> <INDENT> diff = time.time() - self.st...
Class that implements a basic timer. Notes ----- * Register the `start` and `stop` methods with the IPython events API.
62599040e76e3b2f99fd9cad
class IncorrectPreviousVersionException(BaseException): <NEW_LINE> <INDENT> pass
The specified previous version did not match the actual previous version.
625990408e71fb1e983bcd70
class EntityResourceGeneratorPagination(EntityResource): <NEW_LINE> <INDENT> def __unicode__(self): <NEW_LINE> <INDENT> return u'Page %s of %s with %s items per page. Total: %s' % (self.page, self.pages, self.per_page, self.items)
Base class for a paginator of a EntityResourceGenerator. A list of EntityResources may have pages, and this class has the correspond properties of a paginator such as: page: the page number, pages: total number of pages, items: total items, per_page: number of items per page (default is 50) urls: a ...
6259904023e79379d538d7a2
class MGMSG_MOT_REQ_MFF_OPERPARAMS(Message): <NEW_LINE> <INDENT> id = 0x511 <NEW_LINE> parameters = [('chan_ident', 'B'), (None, 'B')]
See :class:`MGMSG_MOT_SET_MFF_OPERPARAMS`. :param chan_ident: channel number (0x01, 0x02) :type chan_ident: int
625990403eb6a72ae038b90e
class City(models.Model): <NEW_LINE> <INDENT> city = models.CharField('城市名称', max_length=40, db_index=True) <NEW_LINE> district = models.CharField('市区信息', max_length=40) <NEW_LINE> user_id = models.IntegerField('创建者') <NEW_LINE> status = models.IntegerField('数据状态', default=1) <NEW_LINE> created = models.DateTimeField(d...
城市信息
62599040d164cc617582221a
class SessionManager: <NEW_LINE> <INDENT> _SESSION_COOKIE_KEY_FOR_CODENAME = "codename" <NEW_LINE> _SESSION_COOKIE_KEY_FOR_EXPIRATION_DATE = "expires" <NEW_LINE> @classmethod <NEW_LINE> def log_user_in( cls, db_session: sqlalchemy.orm.Session, supplied_passphrase: "DicewarePassphrase" ) -> SourceUser: <NEW_LINE> <INDEN...
Helper to manage the user's session cookie accessible via flask.session.
6259904126238365f5faddfc
class GoldbachTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_one(self): <NEW_LINE> <INDENT> self.assertEqual([(2, 2)], goldbach(4)) <NEW_LINE> <DEDENT> def test_two(self): <NEW_LINE> <INDENT> self.assertEqual([(3, 3)], goldbach(6)) <NEW_LINE> <DEDENT> def test_three(self): <NEW_LINE> <INDENT> self.assertEqual([(...
docstring for GoldbachTest
62599041c432627299fa4253
class TestTrieRouter(unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> super(TestTrieRouter, cls).setUpClass() <NEW_LINE> cls.router = Router(nd256_classroom.pop('root_handler()')) <NEW_LINE> for page in nd256_classroom.keys(): <NEW_LINE> <INDENT> cls.router.add_ha...
docstring for TestTrieRouter
625990418c3a8732951f77fd
class AssessmentTakenQueryRecord(abc_assessment_records.AssessmentTakenQueryRecord, osid_records.OsidRecord): <NEW_LINE> <INDENT> pass
A record for an ``AssessmentTakenQuery``. The methods specified by the record type are available through the underlying object.
625990413c8af77a43b6888e
class DecibelSPL(NonLinearConverter): <NEW_LINE> <INDENT> def __call__(self,meas,inv=False): <NEW_LINE> <INDENT> F0 = 1e-12 <NEW_LINE> if not inv: return 10**(-meas)*F0 <NEW_LINE> else: return log10(meas/F0)
Convert a Decibel to intensity W/m2 and back. This is only valid for Decibels as a sound Pressure level
625990416e29344779b018f6
class BaseNetworkTest(tempest.test.BaseTestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> os = clients.Manager() <NEW_LINE> cls.network_cfg = os.config.network <NEW_LINE> if not cls.network_cfg.quantum_available: <NEW_LINE> <INDENT> raise cls.skipException("Quantum support i...
Base class for the Quantum tests that use the Tempest Quantum REST client Per the Quantum API Guide, API v1.x was removed from the source code tree (docs.openstack.org/api/openstack-network/2.0/content/Overview-d1e71.html) Therefore, v2.x of the Quantum API is assumed. It is also assumed that the following options are...
62599041507cdc57c63a6040
class WorkflowOperation(HasStrictTraits): <NEW_LINE> <INDENT> do_estimate = Event <NEW_LINE> changed = Event(apply = True, estimate = True) <NEW_LINE> def should_apply(self, changed, payload): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> def should_clear_estimate(self, changed, payload): <NEW_LINE> <INDENT> retu...
A default implementation of `IWorkflowOperation`
625990418e05c05ec3f6f7ad