code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class BgpPeerStatus(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'local_address': {'readonly': True}, 'neighbor': {'readonly': True}, 'asn': {'readonly': True}, 'state': {'readonly': True}, 'connected_duration': {'readonly': True}, 'routes_received': {'readonly': True}, 'messages_sent': {'readonly':...
BGP peer status details. Variables are only populated by the server, and will be ignored when sending a request. :ivar local_address: The virtual network gateway's local address. :vartype local_address: str :ivar neighbor: The remote BGP peer. :vartype neighbor: str :ivar asn: The autonomous system number of the remo...
6259904a3c8af77a43b68923
class LoginForm(Form): <NEW_LINE> <INDENT> email = StringField("email", [ validators.DataRequired(), validators.Email(), ]) <NEW_LINE> password = PasswordField("password", [validators.DataRequired()])
This is the old (v1) login form and is now depracated
6259904a76d4e153a661dc5c
@register_command <NEW_LINE> class MemoryWatchResetCommand(GenericCommand): <NEW_LINE> <INDENT> _cmdline_ = "memory reset" <NEW_LINE> _syntax_ = f"{_cmdline_}" <NEW_LINE> @only_if_gdb_running <NEW_LINE> def do_invoke(self, _: List[str]) -> None: <NEW_LINE> <INDENT> gef.ui.watches.clear() <NEW_LINE> ok("Memory watches ...
Removes all watchpoints.
6259904a91af0d3eaad3b1f1
class OrganizationMixin(CheckOrganizationsEnabled): <NEW_LINE> <INDENT> org_url_field = 'slug' <NEW_LINE> admin_only = True <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> return self.get_organization_queryset() <NEW_LINE> <DEDENT> def get_organization_queryset(self): <NEW_LINE> <INDENT> if self.admin_only: <NEW...
Mixin class that provides organization sublevel objects. This mixin uses several class level variables org_url_field The URL kwarg name for the organization slug admin_only Boolean the dictacts access for organization owners only or just member access
6259904ab5575c28eb7136af
class SceneOperation(Hook): <NEW_LINE> <INDENT> def execute(self, operation, file_path, **kwargs): <NEW_LINE> <INDENT> if operation == "current_path": <NEW_LINE> <INDENT> scene_filepath = Application.ActiveProject.ActiveScene.filename.value <NEW_LINE> scene_name = Application.ActiveProject.ActiveScene.Name <NEW_LINE> i...
Hook called to perform an operation with the current scene
6259904ad7e4931a7ef3d443
class Device(MongoDB): <NEW_LINE> <INDENT> __collectionname__ = 'devices' <NEW_LINE> rid = AnyField() <NEW_LINE> report = AnyField() <NEW_LINE> report_data_source = AnyField() <NEW_LINE> device_id = AnyField() <NEW_LINE> report_subject = AnyField() <NEW_LINE> account_id = AnyField() <NEW_LINE> aggregator_id = AnyField(...
An openadr Metadata_report device
6259904a07d97122c421806f
class TokenMetadataTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_token(self): <NEW_LINE> <INDENT> expected_node_count = len(get_cluster().nodes) <NEW_LINE> cluster = Cluster(protocol_version=PROTOCOL_VERSION) <NEW_LINE> cluster.connect() <NEW_LINE> tmap = cluster.metadata.token_map <NEW_LINE> self.assertTrue(is...
Test of TokenMap creation and other behavior.
6259904a7cff6e4e811b6e07
class Baker (ChaosGenerator) : <NEW_LINE> <INDENT> def __init__ (self, oshape, mu=0.49999, cascade=True, comp=0, gens=2) : <NEW_LINE> <INDENT> super().__init__ (oshape, oshape+(2,), cascade, gens) <NEW_LINE> self.mu = mu <NEW_LINE> self.comp = comp <NEW_LINE> <DEDENT> def evolve (self, gind) : <NEW_LINE> <INDENT> ret =...
Baker map --> (2x, y/2) if 0 <= x < 1/2 (2-2x, 1-y/2) 1/2 <= x < 1
6259904ae76e3b2f99fd9dd8
class TestCoLangCommand(unittest.TestCase): <NEW_LINE> <INDENT> def test_backend_class(self): <NEW_LINE> <INDENT> self.assertIs(CoLangCommand.BACKEND, CoLang) <NEW_LINE> <DEDENT> def test_setup_cmd_parser(self): <NEW_LINE> <INDENT> parser = CoLangCommand.setup_cmd_parser() <NEW_LINE> self.assertIsInstance(parser, Graal...
CoLangCommand tests
6259904ab830903b9686ee61
class Context: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass
Class used to trace assumes, asserts and dumps.
6259904a63d6d428bbee3b97
class NVMeoFQueueStatistics(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swagger_types = { 'successful_connect_requests': 'int', 'connection_failures': 'int', 'disconnects': 'int', 'commands_good_status': 'int', 'commands_error_status': 'int' } <NEW_LINE> self.attribute_map = { 'successful_...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
6259904ab57a9660fecd2e4a
class DeleteWantsToWatchInputSet(InputSet): <NEW_LINE> <INDENT> def set_AccessToken(self, value): <NEW_LINE> <INDENT> InputSet._set_input(self, 'AccessToken', value) <NEW_LINE> <DEDENT> def set_ActionID(self, value): <NEW_LINE> <INDENT> InputSet._set_input(self, 'ActionID', value)
An InputSet with methods appropriate for specifying the inputs to the DeleteWantsToWatch Choreo. The InputSet object is used to specify input parameters when executing this Choreo.
6259904a3c8af77a43b68924
class PickupLocation(TimeStampedModel): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> verbose_name = "Ophaallocatie" <NEW_LINE> <DEDENT> name = models.CharField(max_length=100, unique=True) <NEW_LINE> description = models.CharField(max_length=255) <NEW_LINE> address = models.ForeignKey(Address, null=True, blank=T...
Pickup Location for an order round
6259904a15baa7234946335f
class DerivedComponent(Component): <NEW_LINE> <INDENT> def __init__(self, data, link, units=None): <NEW_LINE> <INDENT> super(DerivedComponent, self).__init__(data, units=units) <NEW_LINE> self._link = link <NEW_LINE> <DEDENT> def set_parent(self, data): <NEW_LINE> <INDENT> self._data = data <NEW_LINE> <DEDENT> @propert...
A component which derives its data from a function
6259904adc8b845886d54989
class EasyCheckbutton(Tkinter.Checkbutton): <NEW_LINE> <INDENT> def __init__(self, parent, text, command): <NEW_LINE> <INDENT> self._variable = Tkinter.IntVar() <NEW_LINE> Tkinter.Checkbutton.__init__(self, parent, text = text, variable = self._variable, command = command) <NEW_LINE> <DEDENT> def isChecked(self): <NEW_...
Represents a check button.
6259904a4e696a045264e807
class passwordLengthTest(TestCase): <NEW_LINE> <INDENT> @override_settings(PASSWORD_MIN_LENGTH=1) <NEW_LINE> @override_settings(PASSWORD_MAX_LENGTH=5) <NEW_LINE> def test_validate_password_min_length(self): <NEW_LINE> <INDENT> self.password = '' <NEW_LINE> with self.assertRaisesRegexp(ValidationError,"[u'Invalid Length...
test validate password length
6259904a29b78933be26aaa9
class Trigger(object): <NEW_LINE> <INDENT> def __init__(self, trace, template, filters, value, pivot): <NEW_LINE> <INDENT> self.template = template <NEW_LINE> self._filters = filters <NEW_LINE> self._value = value <NEW_LINE> self._pivot = pivot <NEW_LINE> self.trace = trace <NEW_LINE> <DEDENT> def generate(self, pivot_...
Trigger is an event-value relationship which accepts a trace object to "generate" qualified data :param trace: A trappy FTrace object :type trace: :mod:`trappy.trace.FTrace` :param template: A trappy Event to act as a trigger :type template: trappy.Base :param filters: Key value filter pairs :type filters: dict The...
6259904a45492302aabfd8a1
class CourseInfoView(LoginRequiredMixin, View): <NEW_LINE> <INDENT> def get(self, request, course_id): <NEW_LINE> <INDENT> course = Course.objects.get(id=int(course_id)) <NEW_LINE> course.students += 1 <NEW_LINE> course.save() <NEW_LINE> user_cousers = UserCourse.objects.filter(user=request.user, course=course) <NEW_LI...
章节信息
6259904a63b5f9789fe8653b
class RGBAColor(RGBColor): <NEW_LINE> <INDENT> def __init__(self, colorset): <NEW_LINE> <INDENT> super(RGBAColor, self).__init__(colorset) <NEW_LINE> if not(0 <= float(colorset[3]) <= 1): <NEW_LINE> <INDENT> raise ValueError("an alpha must be in valid range(0 to 1.0), " "passed " + repr(int(colorset[3]))) <NEW_LINE> <D...
A set of red, green, blue, alpha colorset.
6259904a30c21e258be99bd4
class UMKLKNN(UMKLKNN_): <NEW_LINE> <INDENT> def fit(self, X, y=None): <NEW_LINE> <INDENT> if issubclass(type(X), np.ndarray): <NEW_LINE> <INDENT> X = force_to_column_major_and_double_precision(X) <NEW_LINE> <DEDENT> elif is_sequence(X): <NEW_LINE> <INDENT> X = [ force_to_column_major_and_double_precision(a_kernel) for...
Wrapping UMKLKNN_.
6259904ab5575c28eb7136b0
class Exchange(models.Model, DictMixin): <NEW_LINE> <INDENT> cusotmer = models.ForeignKey(Customer, null=True, on_delete=models.SET_NULL) <NEW_LINE> create_at = models.DateTimeField(auto_now=True) <NEW_LINE> remark = models.CharField(max_length=100, null=True, blank=True) <NEW_LINE> money = models.DecimalField(default=...
退换货
6259904a6fece00bbacccd86
class PaymentRequiredResponse(Response): <NEW_LINE> <INDENT> status_code = status.HTTP_402_PAYMENT_REQUIRED <NEW_LINE> data = 'Payment Required' <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(PaymentRequiredResponse.data, *args, **kwargs)
Payment required response.
6259904a15baa72349463360
class CommandInterface(object): <NEW_LINE> <INDENT> def __init__(self, obj): <NEW_LINE> <INDENT> self._obj = obj <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> raise NotImplementedError
The command interface
6259904a76d4e153a661dc5e
class BCNN(torch.nn.Module): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> torch.nn.Module.__init__(self) <NEW_LINE> self.features = torchvision.models.vgg19(pretrained=True).features <NEW_LINE> self.features = torch.nn.Sequential(*list(self.features.children()) [:-1]) <NEW_LINE> self.fc = torch.nn.Linear...
B-CNN. The B-CNN model is illustrated as follows. conv1^2 (64) -> pool1 -> conv2^2 (128) -> pool2 -> conv3^3 (256) -> pool3 -> conv4^3 (512) -> pool4 -> conv5^3 (512) -> bilinear pooling -> sqrt-normalize -> L2-normalize -> fc (200). The network accepts a 3*448*448 input, and the pool5 activation has shape 512*28*28 s...
6259904a287bf620b6272fb8
class Settings(models.Model): <NEW_LINE> <INDENT> passcode = models.CharField(max_length=45) <NEW_LINE> theme = models.CharField(max_length=45) <NEW_LINE> user = models.ForeignKey(User)
docstring for Settings
6259904a711fe17d825e1685
class SignupForm(forms.Form): <NEW_LINE> <INDENT> username = forms.CharField( label='아이디', widget=forms.TextInput( attrs={ 'class': 'form-control', } ) ) <NEW_LINE> email = forms.EmailField( label='이메일', widget=forms.TextInput( attrs={ 'class': 'form-control', } ) ) <NEW_LINE> password = forms.CharField( label='비밀번호', ...
회원가입을 작성하는 form(회원가입 화면 형태)
6259904a30c21e258be99bd6
class Area(object): <NEW_LINE> <INDENT> __slots__ = 'top', 'right', 'bottom', 'left' <NEW_LINE> def __init__(self, top, right, bottom, left): <NEW_LINE> <INDENT> self.top = top <NEW_LINE> self.right = right <NEW_LINE> self.bottom = bottom <NEW_LINE> self.left = left <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <I...
Area related to diagram item like item margins or padding information.
6259904a71ff763f4b5e8b75
class comparator(object): <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): <NEW_LINE> <INDENT> raise AttributeError("No constructor defined") <NEW_LINE> <DEDENT> __repr__ = _swig_repr <NEW_LINE> de...
<+description of block+> Constructor Specific Documentation: Return a shared_ptr to a new instance of phyauth::comparator. To avoid accidental use of raw pointers, phyauth::comparator's constructor is in a private implementation class. phyauth::comparator::make is the public interface for creating new instances.
6259904a16aa5153ce4018bd
class RNNLockedDropout(Module): <NEW_LINE> <INDENT> def __init__(self, dropout, use_mc_dropout): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> assert 0.0 <= dropout <= 1.0, 'Dropout has to be in range <0.0, 1.0>' <NEW_LINE> self.use_mc_dropout = use_mc_dropout <NEW_LINE> self.dropout = dropout <NEW_LINE> <DEDENT> d...
We want to use the same dropout mask for all timepoints. Using this layer we will be able to do so. Dropout masks will be different for different examples within the minibatch but will not change in timesteps.
6259904a96565a6dacd2d971
class ChangeHistoryEvent(proto.Message): <NEW_LINE> <INDENT> id = proto.Field( proto.STRING, number=1, ) <NEW_LINE> change_time = proto.Field( proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp, ) <NEW_LINE> actor_type = proto.Field( proto.ENUM, number=3, enum="ActorType", ) <NEW_LINE> user_actor_email = proto.Fi...
A set of changes within a Google Analytics account or its child properties that resulted from the same cause. Common causes would be updates made in the Google Analytics UI, changes from customer support, or automatic Google Analytics system changes. Attributes: id (str): ID of this change history event. T...
6259904a8a349b6b4368761d
class BasicPostTestsMixin(BasicTestsMixin): <NEW_LINE> <INDENT> basic_post_fixtures = [] <NEW_LINE> basic_post_use_admin = False <NEW_LINE> def setup_basic_post_test(self, user, with_local_site, local_site_name, post_valid_data): <NEW_LINE> <INDENT> raise NotImplementedError("%s doesn't implement setup_basic_post_test"...
Mixin to add basic HTTP POST unit tests. The subclass must implement ``setup_basic_post_test`` and ``check_post_result``. It may also set ``basic_post_fixtures`` to a list of additional fixture names to import, and ``basic_post_use_admin`` to ``True`` if it wants to run the test as an administrator user.
6259904a30dc7b76659a0c04
class TestFindIt(unittest.TestCase): <NEW_LINE> <INDENT> def test_find_it(self): <NEW_LINE> <INDENT> self.assertEqual(find_outlier([2, 4, 6, 8, 10, 3]), 3) <NEW_LINE> self.assertEqual(find_outlier([2, 4, 0, 100, 4, 11, 2602, 36]), 11) <NEW_LINE> self.assertEqual(find_outlier([160, 3, 1719, 19, 11, 13, -21]), 160)
Class to test 'find_it' function
6259904a82261d6c527308ae
class Page13(ToughSchedulingCasesPage): <NEW_LINE> <INDENT> def __init__(self, page_set): <NEW_LINE> <INDENT> super(Page13, self).__init__( url='file://tough_scheduling_cases/raf.html?medium_handler', page_set=page_set) <NEW_LINE> self.synthetic_delays = { 'cc.RasterRequiredForActivation': {'target_duration': 0.004}, '...
Why: Test a moderately heavy requestAnimationFrame handler
6259904a0fa83653e46f62af
class ConvertDatatypeDict(dict): <NEW_LINE> <INDENT> decs = [] <NEW_LINE> hexs = [] <NEW_LINE> def convert_datatypes(self): <NEW_LINE> <INDENT> self._convert2int(self.decs, 10) <NEW_LINE> self._convert2int(self.hexs, 16) <NEW_LINE> <DEDENT> def _convert2int(self, keys, base=10, err_val=-1): <NEW_LINE> <INDENT> for k in...
A dict that converts values for certain keys. The keys for which the corresponding value should be converted can be specified via the attributes self.decs and self.hexs. The conversion must be done explicitly via convert_datatypes(self) self.decs: A list of keys for which the values are interpreted as *decimal* int...
6259904a287bf620b6272fba
class RefCountedPointer(ABC): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(RefCountedPointer, self).__init__() <NEW_LINE> self._ptr = ffi.new(self.cdecl+'*') <NEW_LINE> <DEDENT> def __del__(self): <NEW_LINE> <INDENT> if self.ptr: <NEW_LINE> <INDENT> self.unref(self.ptr) <NEW_LINE> <DEDENT> <DEDENT>...
Internal wrapper class for signal-protocol-c pointers. signal-protocol-c uses its own memory management system based on an internal ref count mechanism. It provides the following macros for that: * SIGNAL_REF * SIGNAL UNREF As we can't call macros directly, we use the underlying functions: * signal_type_ref() * sig...
6259904a07f4c71912bb0804
class SplashMeshNode(SplashBaseNode): <NEW_LINE> <INDENT> bl_idname = 'SplashMeshNodeType' <NEW_LINE> bl_label = 'Mesh' <NEW_LINE> sp_acceptedLinks = [] <NEW_LINE> def update_mesh_type(self, context): <NEW_LINE> <INDENT> if self.sp_meshTypeProperty == "mesh_shmdata": <NEW_LINE> <INDENT> self.inputs['File'].enabled = Tr...
Splash Mesh node
6259904a45492302aabfd8a4
class MapBytes16TimestampUuid(_types._Bytes16TimestampKeysMixin, _types._UuidValuesMixin, PersistentMap): <NEW_LINE> <INDENT> def __init__(self, slot=None, compress=None): <NEW_LINE> <INDENT> PersistentMap.__init__(self, slot=slot, compress=compress)
Persistent map with (Bytes20, Timestamp) keys and UUID values.
6259904ad53ae8145f919831
class x_cpmd_section_scf(MSection): <NEW_LINE> <INDENT> m_def = Section(validate=False, a_legacy=LegacyDefinition(name='x_cpmd_section_scf')) <NEW_LINE> x_cpmd_section_scf_iteration = SubSection( sub_section=SectionProxy('x_cpmd_section_scf_iteration'), repeats=True, a_legacy=LegacyDefinition(name='x_cpmd_section_scf_i...
Contains information about self-consistent field calculation
6259904ad53ae8145f919832
class AnotherWindow(QWidget): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> layout = QVBoxLayout() <NEW_LINE> self.label = QLabel("Another Window") <NEW_LINE> layout.addWidget(self.label) <NEW_LINE> self.setLayout(layout)
This "window" is a QWidget. If it has no parent, it will appear as a free-floating window.
6259904a0a366e3fb87dddb7
class SavedQueryList(APIView): <NEW_LINE> <INDENT> permission_classes = (IsAuthenticated,) <NEW_LINE> def get(self, request): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> saved_query_list = saved_query_api.get_all() <NEW_LINE> user_id = self.request.query_params.get("user_id", None) <NEW_LINE> if user_id is not None: <...
Get all SavedQuery
6259904a23e79379d538d8d0
class DwmVersionResponse(DwmResponse): <NEW_LINE> <INDENT> def __init__(self, message: bytes): <NEW_LINE> <INDENT> super().__init__(message) <NEW_LINE> <DEDENT> def get_firmware_version(self) -> str: <NEW_LINE> <INDENT> return '{}.{}.{}.{}'.format(self.message[5], self.message[6], self.message[7], self.message[8] & 0x0...
Returned by a dwm_ver_get request
6259904a63b5f9789fe8653e
class PrivateDataset(BaseDataset): <NEW_LINE> <INDENT> group_column = 'Device' <NEW_LINE> def __init__(self, root_dir='.', transform=None, data=None, split=None): <NEW_LINE> <INDENT> super().__init__(root_dir, transform, data, split) <NEW_LINE> self.signals = pd.read_pickle(path.join(datasets_dir(self.root_dir), self.n...
The private ECG dataset.
6259904a0a50d4780f7067a6
class ClassRegistry(object): <NEW_LINE> <INDENT> class RegistryError(Exception): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> class AlreadyRegistered(RegistryError): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> class NotRegistered(RegistryError): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __init__(self): <NEW_LIN...
Collects classes and allows to list them.
6259904a8e71fb1e983bce97
class ResourceHealthMetadataCollection(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'value': {'required': True}, 'next_link': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[ResourceHealthMetadata]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LIN...
Collection of resource health metadata. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :ivar value: Required. Collection of resources. :vartype value: list[~azure.mgmt.web.v2020_09_01.models.ResourceHealthMe...
6259904ab5575c28eb7136b2
class ViewSet(ApiGenericMixin, viewsets.ViewSet): <NEW_LINE> <INDENT> pass
按需改造DRF默认的ViewSet类
6259904a498bea3a75a58ef1
class InvalidScopeName(CException): <NEW_LINE> <INDENT> pass
Invalid scope name. This exception might be thrown when a request was made to set a breakpoint to an unknown scope.
6259904a462c4b4f79dbcdd2
class SensorMode(AbstractMode): <NEW_LINE> <INDENT> def __init__(self, parent, updateMs, label): <NEW_LINE> <INDENT> super(SensorMode, self).__init__(parent, updateMs) <NEW_LINE> self.label = label <NEW_LINE> self.previousState = None <NEW_LINE> <DEDENT> def update(self): <NEW_LINE> <INDENT> waterDetected = water_detec...
Object representing the sensor mode of the UI. Uses the water sensor for opening/closing the valve.
6259904ad10714528d69f077
class TestWigner(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.frequency = -2017.96 <NEW_LINE> self.tunneling = Wigner( frequency = (self.frequency,"cm^-1"), ) <NEW_LINE> <DEDENT> def test_frequency(self): <NEW_LINE> <INDENT> self.assertAlmostEqual(self.tunneling.frequency.value_si, ...
Contains unit tests of the :class:`Wigner` class.
6259904aa8ecb033258725e4
class _Parser(object): <NEW_LINE> <INDENT> def __init__(self, lexer, handler): <NEW_LINE> <INDENT> self.lexer = lexer <NEW_LINE> self.handler = handler <NEW_LINE> <DEDENT> def parse(self): <NEW_LINE> <INDENT> result = None <NEW_LINE> if self.lexer.peek_token(tokens.LParen): <NEW_LINE> <INDENT> result = self.parse_node(...
State of the parser during parsing. Should not be used directly by users of this package.
6259904a50485f2cf55dc35c
class Stdout(Report): <NEW_LINE> <INDENT> def send_message(self, report_text): <NEW_LINE> <INDENT> report_text = "Druptest {0}".format(report_text) <NEW_LINE> print(report_text)
Print plugin to screen.
6259904ad99f1b3c44d06a6e
class ModeratorProfile(models.Model): <NEW_LINE> <INDENT> user = models.OneToOneField(User, related_name='moderator_profile', primary_key=True) <NEW_LINE> language = models.CharField(max_length=6, blank=True, help_text="The language which this contact prefers to communicate " "in, as a W3C language tag. If this field i...
A profile for a user that uses the moderation interface.
6259904ab57a9660fecd2e4f
class SubgraphIndex(object): <NEW_LINE> <INDENT> def __init__(self, graph, parent, induced_nodes, induced_edges): <NEW_LINE> <INDENT> self.graph = graph <NEW_LINE> self.parent = parent <NEW_LINE> self.induced_nodes = induced_nodes <NEW_LINE> self.induced_edges = induced_edges <NEW_LINE> <DEDENT> def __getstate__(self):...
Internal subgraph data structure. Parameters ---------- graph : GraphIndex The graph structure of this subgraph. parent : GraphIndex The parent graph index. induced_nodes : utils.Index The parent node ids in this subgraph. induced_edges : utils.Index The parent edge ids in this subgraph.
6259904a287bf620b6272fbc
class StyleError(Error): <NEW_LINE> <INDENT> def __init__(self, line_nums, lines, message): <NEW_LINE> <INDENT> super().__init__(message) <NEW_LINE> self.line_nums = line_nums <NEW_LINE> self.lines = lines <NEW_LINE> self.message = message <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> error_lines = '' <NEW...
Exception raised when a Style rule is broken. Attributes: line_nums: the line numbers the rule as broken on lines: lines where the style rule was broken message: explanation of why error was thrown
6259904a23e79379d538d8d1
class AssertionBuilder(DynamicMixin, ExceptionMixin, SnapshotMixin, ExtractingMixin, FileMixin, DateMixin, DictMixin, CollectionMixin, StringMixin, NumericMixin, ContainsMixin, HelpersMixin, BaseMixin, object): <NEW_LINE> <INDENT> def __init__(self, val, description='', kind=None, expected=None, logger=None): <NEW_LINE...
Assertion builder.
6259904ab57a9660fecd2e50
class NotFoundError(Exception): <NEW_LINE> <INDENT> pass
Raised when Gitiles gives a HTTP 404 error.
6259904a3617ad0b5ee07511
class Insights(pulumi.CustomResource): <NEW_LINE> <INDENT> def __init__(__self__, __name__, __opts__=None, application_type=None, location=None, name=None, resource_group_name=None, tags=None): <NEW_LINE> <INDENT> if not __name__: <NEW_LINE> <INDENT> raise TypeError('Missing resource name argument (for URN creation)') ...
Manage an Application Insights component.
6259904a8e71fb1e983bce98
class NoRootSOA(exception.DNSException): <NEW_LINE> <INDENT> pass
There is no SOA RR at the DNS root name. This should never happen!
6259904a15baa72349463365
class DescribeSecurityGroupResourceResponseSchema(schema.ResponseSchema): <NEW_LINE> <INDENT> fields = { "Infos": fields.List( models.SGResourceInfoSchema(), required=True, load_from="Infos" ), "Message": fields.Str(required=True, load_from="Message"), "TotalCount": fields.Int(required=True, load_from="TotalCount"), }
DescribeSecurityGroupResource - 查询安全组绑定的资源信息
6259904a7cff6e4e811b6e0d
class ValueFunction(nn.Module): <NEW_LINE> <INDENT> def __init__(self, params): <NEW_LINE> <INDENT> super(ValueFunction, self).__init__() <NEW_LINE> self.bn1 = nn.BatchNorm1d(params['l1'][0]) <NEW_LINE> self.fc1 = nn.Linear(params['l1'][0], params['l1'][1]) <NEW_LINE> nn.init.xavier_uniform_(self.fc1.weight) <NEW_LINE>...
Value Function (Critic) Model.
6259904a0a50d4780f7067a7
class TagReferenceSchema(YetiSchema): <NEW_LINE> <INDENT> name = fields.String(required=True) <NEW_LINE> expiration = fields.DateTime(required=True) <NEW_LINE> fresh = fields.Boolean() <NEW_LINE> first_seen = fields.DateTime(default=datetime.utcnow) <NEW_LINE> last_seen = fields.DateTime(default=datetime.utcnow) <NEW_L...
(De)serialization marshmallow.Schema for Tag objects.
6259904a8a349b6b43687621
class PortChainShow(extension.ClientExtensionShow, PortChain): <NEW_LINE> <INDENT> shell_command = 'port-chain-show'
Show information of a given Port Chain.
6259904a3eb6a72ae038ba2f
class MinibatchData(MinibatchBase): <NEW_LINE> <INDENT> def __init__(self, array, minibatch, shuffle_index=None): <NEW_LINE> <INDENT> xp = get_array_module(array) <NEW_LINE> assertion.assert_shapes('array', array, 'shuffle_index', shuffle_index, axes=[0]) <NEW_LINE> if shuffle_index is not None: <NEW_LINE> <INDENT> arr...
Data for minibatching.
6259904aec188e330fdf9c71
class Message_Get(GetWithIDandSlot): <NEW_LINE> <INDENT> no = 18
The Message_Get packet consists of: * A UInt32, board to get the message from. * a list of, * A SInt32, message slots
6259904ae64d504609df9dba
class InputError(Exception): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> self.message = message
Exception raised for errors in the input.
6259904a23e79379d538d8d3
class MP4(FileType): <NEW_LINE> <INDENT> MP4Tags = MP4Tags <NEW_LINE> _mimes = ["audio/mp4", "audio/x-m4a", "audio/mpeg4", "audio/aac"] <NEW_LINE> def load(self, filename): <NEW_LINE> <INDENT> self.filename = filename <NEW_LINE> with open(filename, "rb") as fileobj: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> atoms = ...
An MPEG-4 audio file, probably containing AAC. If more than one track is present in the file, the first is used. Only audio ('soun') tracks will be read. :ivar info: :class:`MP4Info` :ivar tags: :class:`MP4Tags`
6259904a379a373c97d9a400
class SingletonDecorator: <NEW_LINE> <INDENT> def __init__(self, klass): <NEW_LINE> <INDENT> self.klass = klass <NEW_LINE> self.instance = None <NEW_LINE> <DEDENT> def __call__(self, *args, **kwds): <NEW_LINE> <INDENT> if self.instance is None: <NEW_LINE> <INDENT> self.instance = self.klass(*args, **kwds) <NEW_LINE> <D...
A Singleton decorator for a class `klass`.
6259904ad6c5a102081e34f2
class PatchElement: <NEW_LINE> <INDENT> names = ('game', 'client') <NEW_LINE> def __init__(self, name, version: PatchVersion): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> assert name in self.names <NEW_LINE> self.version = version <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return f"<{self.__class__...
Element of a patch (game or client) This base class must not be instantiated directly. In methods parameters, `langs` is used to filter language-specific files and can have the following values: False -- language-independent True -- all languages lang -- single given language [lang, ...] -- list of given lang...
6259904a15baa72349463367
class FileWrapper(object): <NEW_LINE> <INDENT> def __init__(self, file, buffer_size=8192): <NEW_LINE> <INDENT> self.file = file <NEW_LINE> self.buffer_size = buffer_size <NEW_LINE> <DEDENT> def close(self): <NEW_LINE> <INDENT> if hasattr(self.file, 'close'): <NEW_LINE> <INDENT> self.file.close() <NEW_LINE> <DEDENT> <DE...
This class can be used to convert a :class:`file`-like object into an iterable. It yields `buffer_size` blocks until the file is fully read. You should not use this class directly but rather use the :func:`wrap_file` function that uses the WSGI server's file wrapper support if it's available. .. versionadded:: 0.5 ...
6259904a23e79379d538d8d4
class RubyMineIDETests(IdeaIDETests): <NEW_LINE> <INDENT> TIMEOUT_INSTALL_PROGRESS = 120 <NEW_LINE> TIMEOUT_START = 60 <NEW_LINE> TIMEOUT_STOP = 60 <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> super().setUp() <NEW_LINE> self.installed_path = os.path.join(self.install_base_path, "ide", "rubymine") <NEW_LINE> self.des...
RubyMine from the IDE collection.
6259904a1f5feb6acb163fcb
class RequestLayer(object): <NEW_LINE> <INDENT> def __init__(self, server): <NEW_LINE> <INDENT> self._server = server <NEW_LINE> <DEDENT> def receive_request(self, transaction): <NEW_LINE> <INDENT> method = transaction.request.code <NEW_LINE> if method == defines.Codes.GET.number: <NEW_LINE> <INDENT> transaction = self...
Class to handle the Request/Response layer
6259904a7cff6e4e811b6e0f
class Cost(namedtuple('Cost', COST_LIST)): <NEW_LINE> <INDENT> def __new__(cls, *args, **kwargs): <NEW_LINE> <INDENT> ntp = super(Cost, cls).__new__(cls, *args, **kwargs) <NEW_LINE> if hasattr(ntp.mac_op, '__len__'): <NEW_LINE> <INDENT> raise TypeError('Cost: mac_op must be a scalar') <NEW_LINE> <DEDENT> if not isinsta...
Cost specification, including MAC operation cost, memory hierarchy cost, NoC hop cost, and unit-time static cost.
6259904a8a349b6b43687623
class AddSaltNPepper(DataIterator): <NEW_LINE> <INDENT> def __init__(self, iter, prob_dict, ratio_dict=None): <NEW_LINE> <INDENT> DataIterator.__init__(self, iter.data_shapes, iter.length) <NEW_LINE> ratio_keys = set() if ratio_dict is None else set(ratio_dict.keys()) <NEW_LINE> prob_keys = set(prob_dict.keys()) <NEW_L...
Adds Salt&Pepper noise to data generated by another iterator, which must provide named data items (such as Online, Minibatches, Undivided). Only Numpy data is supported, Supports usage of different amounts and ratios of salt VS pepper for different named data items.
6259904a4e696a045264e80b
@enum.unique <NEW_LINE> class ButtonMode(enum.IntEnum): <NEW_LINE> <INDENT> default = 0x00 <NEW_LINE> inverted = 0x01
Microbot supports few behaviours for the case when user touches button on the device itself. This enum represents those states.
6259904a96565a6dacd2d974
class OrganizationConfigSettings(AbstractOrganizationConfigSettings): <NEW_LINE> <INDENT> class Meta(AbstractOrganizationConfigSettings.Meta): <NEW_LINE> <INDENT> abstract = False <NEW_LINE> swappable = swapper.swappable_setting('config', 'OrganizationConfigSettings')
Configuration management settings specific to each organization
6259904a498bea3a75a58ef5
class IntIndexer(ShapedIntIndexer): <NEW_LINE> <INDENT> def shaped_instance(self): <NEW_LINE> <INDENT> if self._shaped_inst is not None: <NEW_LINE> <INDENT> return self._shaped_inst <NEW_LINE> <DEDENT> if self._src_shape is None: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> if self._idx < 0: <NEW_LINE> <INDENT> ...
Int indexing class that may or may not be 'shaped'. Parameters ---------- idx : int The index. flat_src : bool or None If True, treat source as flat.
6259904a10dbd63aa1c71fb2
class constraint_kinematic_wave(flux_connection): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> __repr__ = _swig_repr <NEW_LINE> residencetime = _swig_property(_cmf_core.constraint_kinematic_wave_residencetime_get, _cmf_core.constr...
Calculates flux out of a storage as a linear function of its volume to a power, constraint by the volume stored in the target storage. Deprecated Will be replaced by ConstraintLinearStorageConnection, without beta and gamma. .. math:: q = \frac 1 {t_r} {\left(\frac{V_{l} - V_{residual}}{V_0} \right)^\beta}...
6259904a6fece00bbacccd8e
class Wall(GameObject): <NEW_LINE> <INDENT> def __init__(self, *sprite_groups, **kwargs): <NEW_LINE> <INDENT> GameObject.__init__(self, sprite_groups, kwargs)
Class for all impassable objects.
6259904a462c4b4f79dbcdd6
class XLWriter(BookWriter): <NEW_LINE> <INDENT> def __init__(self, file, **keywords): <NEW_LINE> <INDENT> BookWriter.__init__(self, file, **keywords) <NEW_LINE> self.wb = Workbook() <NEW_LINE> <DEDENT> def create_sheet(self, name): <NEW_LINE> <INDENT> return XLSheetWriter(self.wb, None, name) <NEW_LINE> <DEDENT> def cl...
xls, xlsx and xlsm writer
6259904a73bcbd0ca4bcb664
class RouterSessionFactory(FutureMixin, protocol.RouterSessionFactory): <NEW_LINE> <INDENT> session = RouterSession
WAMP router session factory for asyncio-based applications.
6259904a097d151d1a2c2444
class SignError(Exception): <NEW_LINE> <INDENT> pass
Docstring for SignError.
6259904aa8ecb033258725e8
class Manager(object): <NEW_LINE> <INDENT> def get_peers(self, switch): <NEW_LINE> <INDENT> hotes = Hote.objects.filter(valid=True) <NEW_LINE> peers = [] <NEW_LINE> for hote in hotes: <NEW_LINE> <INDENT> peer = Peer() <NEW_LINE> peer.idPeer = hote.idhote <NEW_LINE> peer.Name = hote.nomhote <NEW_LINE> peer.Mac = hote.ma...
Main class for managing the core of Generate_rues app
6259904ae64d504609df9dbb
class URLContext(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.base_path = '/' <NEW_LINE> <DEDENT> def set_current_url(self, current_url): <NEW_LINE> <INDENT> self.base_path = posixpath.dirname(current_url) <NEW_LINE> <DEDENT> def make_relative(self, url): <NEW_LINE> <INDENT> suffix = '/' if...
The URLContext is used to ensure that we can generate the appropriate relative URLs to other pages from any given page in the site. We use relative URLs so that static sites can be deployed to any location without having to specify what the path component on the host will be if the documentation is not hosted at the r...
6259904a45492302aabfd8aa
class FIFODict: <NEW_LINE> <INDENT> def __init__(self, size, finalizer=None): <NEW_LINE> <INDENT> if not type(size) == type(0): <NEW_LINE> <INDENT> raise TypeError("size must be an int") <NEW_LINE> <DEDENT> if not size > 0: <NEW_LINE> <INDENT> raise ValueError("size must be positive") <NEW_LINE> <DEDENT> if finalizer i...
A simple FIFO mapping between keys and values. When the max. capacity is reached, the key/value pair that has been in the dict the longest time is removed.
6259904a0a366e3fb87dddbd
class Auth(): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def generate_token(user_id): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> payload = { 'exp': datetime.datetime.utcnow() + datetime.timedelta(days=1), 'iat': datetime.datetime.utcnow(), 'sub': user_id } <NEW_LINE> return jwt.encode( payload, os.getenv('JWT_SECRE...
Auth Class
6259904a379a373c97d9a402
class UploadSuccess(JSONException): <NEW_LINE> <INDENT> code = 200
A successful upload response.
6259904a8a43f66fc4bf356d
class Node(object): <NEW_LINE> <INDENT> def __init__(self, ip, port, node_id, last_seen=None): <NEW_LINE> <INDENT> self.ip = ip <NEW_LINE> self.port = port <NEW_LINE> self.node_id = node_id <NEW_LINE> self.last_seen = last_seen <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return self.node_id == othe...
Class that holds the contact information for a node in the Kademlia network. Instances of this class are stored in the k-buckets.
6259904a4e696a045264e80c
class Ec2SnapshotDeleteError(Ec2Error): <NEW_LINE> <INDENT> pass
Raised when there was an error while deleting an ec2 snapshot
6259904ab5575c28eb7136b5
class PcaModelSelect(Pipeline): <NEW_LINE> <INDENT> def __init__(self, score='bic', tol=1e-3, verbose=False, max_iter=None, alpha=1.0): <NEW_LINE> <INDENT> self.score = score <NEW_LINE> self.tol = tol <NEW_LINE> self.verbose = verbose <NEW_LINE> self.max_iter = max_iter <NEW_LINE> self.alpha = alpha <NEW_LINE> super()....
Principal component analysis (PCA) wheras the number of components by simple backtracking line search and model selection criteria Parameters ---------- score : str (Default: 'bic') The model selection criteria to minimze - 'bic' (default) - 'aic' - 'prsquared' tol : float (Default: 1e-3) Required...
6259904ab57a9660fecd2e55
@dataclass <NEW_LINE> class ChatPhoto(Base): <NEW_LINE> <INDENT> small_file_id: str <NEW_LINE> big_file_id: str
This object represents a chat photo.
6259904a8e71fb1e983bce9e
class TwoPCPhase1(object): <NEW_LINE> <INDENT> def __init__(self, txn_id, where_list): <NEW_LINE> <INDENT> self.txn_id = txn_id <NEW_LINE> self.where_list = where_list <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "TwoPCPhase1(txn_id={!r},where_list={!r})".format(self.txn_id, self.where_list) <NEW_L...
TwoPCPhase1(txn_id: String, where_list: [(stream_id: U64, start_por: U64, end_por: U64)])
6259904a7cff6e4e811b6e13
class VenueParser: <NEW_LINE> <INDENT> def parse(self, document): <NEW_LINE> <INDENT> soup = BeautifulSoup(document, features="html.parser") <NEW_LINE> venues = [] <NEW_LINE> conference_name = soup.find("h1").text <NEW_LINE> h2 = soup.find("h2") <NEW_LINE> if h2 is not None: <NEW_LINE> <INDENT> venues.append(self.get_v...
Naming convention: venue: It represents a conference instance. ex: NIPS/2017 proceeding: It represents different events in that instance like workshops, conferences. ex: ViGIL, ML4H, etc.
6259904abaa26c4b54d50684
@skipIf(NO_MOCK, NO_MOCK_REASON) <NEW_LINE> class DevMapTestCase(TestCase, LoaderModuleMockMixin): <NEW_LINE> <INDENT> def setup_loader_modules(self): <NEW_LINE> <INDENT> return {devmap: {}} <NEW_LINE> <DEDENT> def test_multipath_list(self): <NEW_LINE> <INDENT> mock = MagicMock(return_value='A') <NEW_LINE> with patch.d...
Test cases for salt.modules.devmap
6259904a8a349b6b43687627
class CandidateFormView(View): <NEW_LINE> <INDENT> model = Candidate <NEW_LINE> form_class=CandidateForm <NEW_LINE> template_name='homepage/candidate.html' <NEW_LINE> def get(self,request): <NEW_LINE> <INDENT> form=self.form_class() <NEW_LINE> return render(request,self.template_name,{'form':form}) <NEW_LINE> <DEDENT> ...
view for candidate form in homepage of app
6259904a91af0d3eaad3b1ff
class GeneratePointView(TemplateView): <NEW_LINE> <INDENT> template_name = 'map/generate_point.html' <NEW_LINE> redirect_field_name = 'map/map_clusters.html' <NEW_LINE> model = Point
Class used to automatically generate points
6259904abe383301e0254bf4
class MobileMessage(models.Model): <NEW_LINE> <INDENT> mobile = models.ForeignKey(Mobile, on_delete=models.CASCADE) <NEW_LINE> reception_time = models.DateTimeField(default=timezone.now) <NEW_LINE> message_text = models.CharField(max_length=50) <NEW_LINE> lat = models.FloatField(default=-1, blank=True, null=True) <NEW_...
携帯端末からサーバへのメッセージのモデル
6259904a96565a6dacd2d976
class Recovery: <NEW_LINE> <INDENT> def __init__(self, loss_upper_bound: float, checkpoint_manager: tf.train.CheckpointManager, recovery_begin_steps: int = 0, recovery_max_trials: int = 3): <NEW_LINE> <INDENT> self.recover_counter = 0 <NEW_LINE> self.recovery_begin_steps = recovery_begin_steps <NEW_LINE> self.recovery_...
Built-in model blowup recovery module. Checks the loss value by the given threshold. If applicable, recover the model by reading the checkpoint on disk.
6259904aec188e330fdf9c77
class GenieAmbientGroup(GenieGameEntityGroup): <NEW_LINE> <INDENT> def contains_unit(self, ambient_id: int) -> bool: <NEW_LINE> <INDENT> return self.contains_entity(ambient_id) <NEW_LINE> <DEDENT> def is_creatable(self, civ_id: int = -1) -> bool: <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def is_gatherer(self...
One Genie unit that is an ambient scenery object. Mostly for resources, specifically trees. For these objects every frame in their graphics file is a variant. Example: Trees, Gold mines, Sign
6259904ab5575c28eb7136b6
@widgets.register <NEW_LINE> class PicSureLogin(widgets.DOMWidget): <NEW_LINE> <INDENT> _view_name = Unicode('LoginView').tag(sync=True) <NEW_LINE> _model_name = Unicode('LoginModel').tag(sync=True) <NEW_LINE> _view_module = Unicode('pic-sure-jupyter-widgets').tag(sync=True) <NEW_LINE> _model_module = Unicode('pic-sure...
An example widget.
6259904acb5e8a47e493cb74
class ResultsView(generic.DetailView): <NEW_LINE> <INDENT> model = Question <NEW_LINE> template_name = 'polls/results.html'
显示投票问题详细页
6259904a15baa7234946336c
class SetProcessContextMixin(object): <NEW_LINE> <INDENT> name = "cc" <NEW_LINE> interactive = True <NEW_LINE> def __enter__(self): <NEW_LINE> <INDENT> self.process_context = self.session.GetParameter("process_context") <NEW_LINE> return self <NEW_LINE> <DEDENT> def __exit__(self, unused_type, unused_value, unused_trac...
Set the current process context. The basic functionality of all platforms' cc plugin.
6259904a009cb60464d02910