code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class URLOnlyValidator(BasicValidator): <NEW_LINE> <INDENT> ALLOWED_TYPES = { 'html', 'aspx', 'php', 'htm', } <NEW_LINE> def _validate(self, link): <NEW_LINE> <INDENT> if not link: <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> try: <NEW_LINE> <INDENT> pathSplit = [i for i in (urllib .parse .urlparse(link)[2] .sp... | Does not permit crawling of text files, documents, etc.
i.e. only crawls links. | 6259904423e79379d538d815 |
class Normalize(dataprocessor.DataProcessor): <NEW_LINE> <INDENT> def __init__(self, ord=None): <NEW_LINE> <INDENT> self.ord = ord <NEW_LINE> <DEDENT> def process_frame(self, frame): <NEW_LINE> <INDENT> return frame / (np.linalg.norm(frame, self.ord) + 1e-16) | Normalize each frame using a norm of the given order.
Attributes
----------
ord : see numpy.linalg.norm
Order of the norm.
See Also
--------
numpy.linalg.norm | 62599044d53ae8145f919775 |
class handshake_begin: <NEW_LINE> <INDENT> def POST(self): <NEW_LINE> <INDENT> clean_sessions() <NEW_LINE> postdata = web.data() <NEW_LINE> request = json.loads(postdata) <NEW_LINE> server_secret, gotpub, challenge, challenge_plain = null_proto.server_handshake_begin(PRIVKEY, request) <NEW_LINE> session = Session() <NE... | null protocol handshake begin | 625990444e696a045264e7ac |
class EnOceanWindowHandle(EnOceanSensor): <NEW_LINE> <INDENT> def value_changed(self, packet): <NEW_LINE> <INDENT> action = (packet.data[1] & 0x70) >> 4 <NEW_LINE> if action == 0x07: <NEW_LINE> <INDENT> self._attr_native_value = STATE_CLOSED <NEW_LINE> <DEDENT> if action in (0x04, 0x06): <NEW_LINE> <INDENT> self._attr_... | Representation of an EnOcean window handle device.
EEPs (EnOcean Equipment Profiles):
- F6-10-00 (Mechanical handle / Hoppe AG) | 62599044be383301e0254b2f |
class DataContent(BaseContent): <NEW_LINE> <INDENT> associated = models.OneToOneField( "spider_base.AssignedContent", on_delete=models.CASCADE, null=True ) <NEW_LINE> quota_data = JSONField(default=dict, blank=True) <NEW_LINE> free_data = JSONField(default=dict, blank=True) <NEW_LINE> objects = DataContentManager() <NE... | inherit from it with proxy objects when possible
speedier than BaseContent by beeing prefetched | 6259904424f1403a92686258 |
class OutputText(gtk.ScrolledWindow): <NEW_LINE> <INDENT> NAME = 'Adium Output' <NEW_LINE> DESCRIPTION = _('A widget to display conversation messages using adium style') <NEW_LINE> AUTHOR = 'Mariano Guerra' <NEW_LINE> WEBSITE = 'www.emesene.org' <NEW_LINE> def __init__(self, config, add_emoticon_cb): <NEW_LINE> <INDENT... | a text box inside a scroll that provides methods to get and set the
text in the widget | 62599044ec188e330fdf9bb2 |
class RemoveSpace(AbstractSearchSpace): <NEW_LINE> <INDENT> def __init__(self, columns=[], set_sizes=[]): <NEW_LINE> <INDENT> if columns and not set_sizes: <NEW_LINE> <INDENT> raise SpaceException("No subset size specified.") <NEW_LINE> <DEDENT> for size in set_sizes: <NEW_LINE> <INDENT> if size > (len(columns)): <NEW_... | Describes the search space of removing columns from the data file. | 62599044462c4b4f79dbcd15 |
class BASE64(PoundSeparatedCommand): <NEW_LINE> <INDENT> pass | Base64 encode/decode in/out of a socket. | 6259904407d97122c4217fb8 |
class FunctionNegativeTripletSelector(object): <NEW_LINE> <INDENT> def __init__(self, margin, negative_selection_fn, cpu=True): <NEW_LINE> <INDENT> self.cpu = cpu <NEW_LINE> self.margin = margin <NEW_LINE> self.negative_selection_fn = negative_selection_fn <NEW_LINE> <DEDENT> def get_triplets(self, embeddings, labels):... | for each positive pair, takes the hardest negative sample (with the greatest triplet loss value) to create a triplet
Margin should match the margin used in triplet loss.
negative_selection_fn should take array of loss_values for a given anchor-positive pair and all negative samples
and return a negative index for that ... | 625990446fece00bbacccccb |
class CmdTime(COMMAND_DEFAULT_CLASS): <NEW_LINE> <INDENT> key = "@time" <NEW_LINE> aliases = "@uptime" <NEW_LINE> locks = "cmd:perm(time) or perm(Player)" <NEW_LINE> help_category = "System" <NEW_LINE> def func(self): <NEW_LINE> <INDENT> table1 = EvTable("|wServer time", "", align="l", width=78) <NEW_LINE> table1.add_r... | show server time statistics
Usage:
@time
List Server time statistics such as uptime
and the current time stamp. | 625990440a366e3fb87ddcfd |
class FontDialog(QtGui.QFontDialog): <NEW_LINE> <INDENT> def __init__(self, store, parent): <NEW_LINE> <INDENT> super(FontDialog, self).__init__(parent) <NEW_LINE> self.__hide() <NEW_LINE> font = QtGui.QFont() <NEW_LINE> font.fromString(store.data[store.key]) <NEW_LINE> self.setCurrentFont(font) <NEW_LINE> <DEDENT> def... | Custom QFontDialog which hides effects and system type for defaults | 6259904410dbd63aa1c71ef1 |
class Meta: <NEW_LINE> <INDENT> ordering = ['-created'] <NEW_LINE> verbose_name = "subcategoria" <NEW_LINE> verbose_name_plural = "subcategorias" <NEW_LINE> unique_together = ('category', 'name') | Meta class. | 62599044d4950a0f3b1117cd |
class StandardOrMethodType: <NEW_LINE> <INDENT> MAX="MAX" <NEW_LINE> PROBOR="PROBOR" <NEW_LINE> BSUM="BSUM" <NEW_LINE> DRS="DRS" <NEW_LINE> ESUM="ESUM" <NEW_LINE> HSUM="HSUM" <NEW_LINE> NILMAX="NILMAX" | Python class for StandardOrMethodType | 62599044d53ae8145f919776 |
class BaseProcedure: <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def procedure(self, stack: Any) -> Any: <NEW_LINE> <INDENT> pass | Interface of procedure object. Used in execute_chain. | 625990443617ad0b5ee07452 |
class GetRunnerRaise(CookbookBase): <NEW_LINE> <INDENT> def get_runner(self, args): <NEW_LINE> <INDENT> raise RuntimeError("get_runner raise") | Class API get_runner raise cookbook. | 625990441d351010ab8f4e37 |
class GclientUtilsUnittest(GclientUtilBase): <NEW_LINE> <INDENT> def testMembersChanged(self): <NEW_LINE> <INDENT> members = [ 'Annotated', 'AutoFlush', 'CheckCallAndFilter', 'CheckCallAndFilterAndHeader', 'Error', 'ExecutionQueue', 'FileRead', 'FileWrite', 'FindFileUpwards', 'FindGclientRoot', 'GetGClientRootAndEntrie... | General gclient_utils.py tests. | 62599044c432627299fa428e |
class reload_result: <NEW_LINE> <INDENT> thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), ) <NEW_LINE> def __init__(self, success=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated an... | Attributes:
- success | 62599044507cdc57c63a60b5 |
class MBIEAgent(BaseAgent): <NEW_LINE> <INDENT> def __init__(self, observation_space, action_space, name="MBIE Agent", params={}, starting_policy=None): <NEW_LINE> <INDENT> BaseAgent.__init__(self, observation_space, action_space, name, params=dict(MBIE_DEFAULTS, **params)) <NEW_LINE> if starting_policy: <NEW_LINE> <IN... | Implementation for an R-Max Agent [Strehl, Li and Littman 2009] | 6259904416aa5153ce401806 |
class FileType(Field): <NEW_LINE> <INDENT> length = 1 <NEW_LINE> valid_values = ('7') <NEW_LINE> def __init__(self, file_id='7'): <NEW_LINE> <INDENT> self.value = file_id | Mandatory field.
Default value = 7
7 = Direct Credit type
Field Format N(1) | 62599044d7e4931a7ef3d38f |
class CRUDFormRequestManager(object): <NEW_LINE> <INDENT> def __init__(self, request, form_class, form_template, doc_id=None, delete=False): <NEW_LINE> <INDENT> if not issubclass(form_class, BaseCRUDForm): <NEW_LINE> <INDENT> raise CRUDActionError("form_class must be a subclass of BaseCRUDForm to complete this action")... | How to handle the form post/get in a django view. | 62599044004d5f362081f972 |
class DFHolder(object): <NEW_LINE> <INDENT> def __init__(self, df_lines, shotswrapper, bswrapper): <NEW_LINE> <INDENT> self.lines = df_lines <NEW_LINE> self.shots = shotswrapper <NEW_LINE> self.boxscores = bswrapper | DFHolder: Class that wraps around a collection of dataframes for easier
access.
Attributes:
- lines: a dataframe from the OU data file
- shots: Wrapper of xefg dataframes, accessible by shots.players,
shots.teams, and shots.globals
- boxscores: Same as shots but for boxscore dataframes | 6259904407d97122c4217fb9 |
class DatapointExtractor(Subject, Observer): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Subject.__init__(self) <NEW_LINE> Observer.__init__(self) <NEW_LINE> <DEDENT> def update(self, message): <NEW_LINE> <INDENT> self.process_xml(message) <NEW_LINE> <DEDENT> def process_xml(self, message): <NEW_LINE> <... | Receive an XML fragment of the form:
<InstantaneousDemand>
<DeviceMacId>0x00158d00001ab152</DeviceMacId>
<MeterMacId>0x000781000028c07d</MeterMacId>
<TimeStamp>0x1918513b</TimeStamp>
<Demand>0x0000be</Demand>
<Multiplier>0x00000001</Multiplier>
<Divisor>0x000003e8</Divisor>
<DigitsRight>0x03</DigitsRight... | 625990441f5feb6acb163f0d |
class DeviceDataUpdateCoordinator(DataUpdateCoordinator): <NEW_LINE> <INDENT> def __init__( self, hass: HomeAssistant, logger: logging.Logger, api: AbstractGateApi, *, name: str, update_interval: timedelta, update_method: Callable[[], Awaitable] | None = None, request_refresh_debouncer: Debouncer | None = None, ) -> No... | Manages polling for state changes from the device. | 62599044a4f1c619b294f814 |
class Database(object): <NEW_LINE> <INDENT> def __init__(self, configure, name, echo=False, pool_size=10, pool_recycle=1800, poolclass=None, thread=True): <NEW_LINE> <INDENT> self.configure = configure <NEW_LINE> extend_args = {'pool_size': pool_size} <NEW_LINE> if poolclass == NullPool: <NEW_LINE> <INDENT> extend_args... | Database Manager Object | 625990448e71fb1e983bcde8 |
class RevolutionAngle(Array): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super().__init__(args=[EVALARGS], shape=[], dtype=float) <NEW_LINE> <DEDENT> def evalf(self, evalargs): <NEW_LINE> <INDENT> raise Exception('RevolutionAngle should not be evaluated') <NEW_LINE> <DEDENT> d... | Pseudo coordinates of a :class:`nutils.topology.RevolutionTopology`. | 62599044462c4b4f79dbcd17 |
class RecordStream(object): <NEW_LINE> <INDENT> def __init__(self, graph, response): <NEW_LINE> <INDENT> self.graph = graph <NEW_LINE> self.__response = response <NEW_LINE> self.__response_item = self.__response_iterator() <NEW_LINE> self.columns = next(self.__response_item) <NEW_LINE> log.info("stream %r", self.column... | An accessor for a sequence of records yielded by a streamed Cypher statement.
::
for record in graph.cypher.stream("START n=node(*) RETURN n LIMIT 10")
print record[0]
Each record returned is cast into a :py:class:`namedtuple` with names
derived from the resulting column names.
.. note ::
Results ar... | 62599044d10714528d69f019 |
class BusStage: <NEW_LINE> <INDENT> mode = "bus" <NEW_LINE> def __init__( self, boarding, ): <NEW_LINE> <INDENT> self.boarding = boarding <NEW_LINE> self.entry_ts = boarding.timestamp <NEW_LINE> self.entry_stop = BusSchedule().get_stop(boarding.stop_id) <NEW_LINE> self.route = self.route_from_transaction(boarding) <NEW... | Represents a bus stage | 62599044711fe17d825e162a |
class TabList(FrontendMessage): <NEW_LINE> <INDENT> def __init__(self, typ): <NEW_LINE> <INDENT> self.type = typ <NEW_LINE> self.toplevels = [] <NEW_LINE> self.folder_children = {} <NEW_LINE> self.expanded_folders = set() <NEW_LINE> self.root_expanded = None <NEW_LINE> <DEDENT> def append(self, info): <NEW_LINE> <INDEN... | Sends the frontend the current list of channels and playlists
This is sent at startup and when the changes to the list of
channels/playlists is too complex to describe with a TabsChanged message.
:param type: ``feed`` or ``playlist``
:param toplevels: the list of ChannelInfo/PlaylistInfo objects
wit... | 62599044097d151d1a2c2383 |
class Scored_Pattern(): <NEW_LINE> <INDENT> def __init__(self, pattern, score=3, flags=0): <NEW_LINE> <INDENT> self.score = score <NEW_LINE> self.pattern = pattern <NEW_LINE> self.re_obj = re.compile(pattern, flags) | A pattern with a score attatched to it | 625990440a366e3fb87ddcff |
class Card: <NEW_LINE> <INDENT> uid = None <NEW_LINE> name = None <NEW_LINE> stats = None <NEW_LINE> count = 1 <NEW_LINE> def __init__(self, name_or_id): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.uid = int(name_or_id) <NEW_LINE> self.name = db.find_card_with_id(self.uid)["name"] <NEW_LINE> <DEDENT> except Value... | Represents a card class.
Goes through each class defined in card_logic and loads them as needed in order to
get card value. | 6259904445492302aabfd7f5 |
class Proposal(object): <NEW_LINE> <INDENT> def _generate(self, pop, ref_pop, weights=None): <NEW_LINE> <INDENT> raise NotImplemented("You must define this method in a subclass.") <NEW_LINE> <DEDENT> def generate(self, pop, ref_pop=None, weights=None, fixed=None): <NEW_LINE> <INDENT> if fixed is None: <NEW_LINE> <INDEN... | Generate a new proposal population based on the current population
and their weights. | 62599044d4950a0f3b1117ce |
class Arrow(Patch): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return "Arrow()" <NEW_LINE> <DEDENT> _path = Path([ [0.0, 0.1], [0.0, -0.1], [0.8, -0.1], [0.8, -0.3], [1.0, 0.0], [0.8, 0.3], [0.8, 0.1], [0.0, 0.1]], closed=True) <NEW_LINE> @docstring.dedent_interpd <NEW_LINE> def __init__(self, x, y... | An arrow patch. | 6259904430c21e258be99b21 |
class ShellHelperTest(CmdLineTest): <NEW_LINE> <INDENT> COMMAND: Optional[str] = None <NEW_LINE> EXPECTED: Optional[Union[str, List[str], Set[str]]] = None <NEW_LINE> def _assert(self, out: str) -> None: <NEW_LINE> <INDENT> if isinstance(self.EXPECTED, list): <NEW_LINE> <INDENT> assert out.split() == self.EXPECTED <NEW... | A base class for some common shell helper unit tests. | 62599044baa26c4b54d505c3 |
class TourSerializers(serializers.ModelSerializer): <NEW_LINE> <INDENT> images = TourImageSerializer(many=True) <NEW_LINE> creator = UserSerializers() <NEW_LINE> travel_agent_id = TravelAgentSerializer() <NEW_LINE> average_review = serializers.SerializerMethodField() <NEW_LINE> type_of_tour = TypeOfTourSerializer(many=... | Serializer for Tour model | 6259904476d4e153a661dc02 |
class Function(object): <NEW_LINE> <INDENT> def __init__(self, fun, samples=100, range=None): <NEW_LINE> <INDENT> self._fun = fun <NEW_LINE> self._samples = samples <NEW_LINE> self.range = range <NEW_LINE> self._x0 = None <NEW_LINE> self._x1 = None <NEW_LINE> self._dx = None <NEW_LINE> self._i = None <NEW_LINE> <DEDENT... | Data generator for python functions
Args:
fun (function): python function
samples (int): number of sampled points
range (tuple): range of the data | 62599044b830903b9686ee07 |
class DdosProtection(A10BaseClass): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.ERROR_MSG = "" <NEW_LINE> self.required=[] <NEW_LINE> self.b_key = "ddos-protection" <NEW_LINE> self.a10_url="/axapi/v3/cgnv6/ddos-protection" <NEW_LINE> self.DeviceProxy = "" <NEW_LINE> self.packets_per_secon... | :param toggle: {"description": "'enable': Enable CGNV6 NAT pool DDoS protection (default); 'disable': Disable CGNV6 NAT pool DDoS protection; ", "format": "enum", "default": "enable", "type": "string", "enum": ["enable", "disable"], "optional": true}
:param uuid: {"description": "uuid of the object", "format": "str... | 62599044a8ecb0332587252b |
class ListVpnSiteLinkConnectionsResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[VpnSiteLinkConnection]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(ListVpnSiteLinkConnectionsResul... | Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
:param value: List of VpnSiteLinkConnections.
:type value: list[~azure.mgmt.network.v2019_09_01.models.VpnSiteLinkConnection]
:param next_link: URL to... | 6259904416aa5153ce401808 |
class OrientationReader( object ): <NEW_LINE> <INDENT> def __init__( self, f ): <NEW_LINE> <INDENT> if f.endswith('.m1') or f.endswith('.m4') or f.endswith('.m5'): <NEW_LINE> <INDENT> self.orientations = _parse_orientation( f ) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> msg = 'Invalid Orientation format (M1, M4, M5 ... | A Class for parsing the orientation of reads from a Blasr alignment | 6259904423e79379d538d818 |
class LikeComment(APIView): <NEW_LINE> <INDENT> serializer_class = CommentSerializer <NEW_LINE> permission_classes = (IsAuthenticatedOrReadOnly,) <NEW_LINE> renderer_classes = (CommentJSONRenderer,) <NEW_LINE> def put(self, request, **kwargs): <NEW_LINE> <INDENT> slug = self.kwargs['slug'] <NEW_LINE> pk = self.kwargs['... | Like a comment | 62599044a79ad1619776b39a |
class ScalingUpExecuteWebhookTest(AutoscaleFixture): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(ScalingUpExecuteWebhookTest, self).setUp() <NEW_LINE> self.create_group_response = self.autoscale_behaviors.create_scaling_group_given( gc_min_entities=self.gc_min_entities_alt) <NEW_LINE> self... | System tests to verify execute scaling policies scenarios | 625990448a349b6b43687565 |
class IWordProcessor: <NEW_LINE> <INDENT> def connect(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def disconnect(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def is_connected(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def cite(self, keys): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def fetch(s... | Interface a WordProcessor object should provide | 625990448a43f66fc4bf34ae |
class Ray(object): <NEW_LINE> <INDENT> def __init__(self, origin, direction): <NEW_LINE> <INDENT> self.origin = origin <NEW_LINE> self.direction = direction.normalized() <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return 'Ray(%s, %s' % (repr(self.origin), repr(self.direction)) <NEW_LINE> <DEDENT> def po... | Defines a ray | 625990448e05c05ec3f6f7e8 |
class OAuthSiteTestCase(TestCase): <NEW_LINE> <INDENT> oauth = True <NEW_LINE> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> super(OAuthSiteTestCase, cls).setUpClass() <NEW_LINE> if isinstance(mwoauth, ImportError): <NEW_LINE> <INDENT> raise unittest.SkipTest('mwoauth not installed') <NEW_LINE> <DEDE... | Run tests related to OAuth authentication. | 62599044097d151d1a2c2385 |
class EnvironHeaders(ImmutableHeadersMixin, Headers): <NEW_LINE> <INDENT> def __init__(self, environ): <NEW_LINE> <INDENT> self.environ = environ <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return self.environ is other.environ <NEW_LINE> <DEDENT> def __getitem__(self, key, _get_mode=False): <NEW_LI... | Read only version of the headers from a WSGI environment. This
provides the same interface as `Headers` and is constructed from
a WSGI environment.
From Werkzeug 0.3 onwards, the `KeyError` raised by this class is also a
subclass of the :exc:`~exceptions.BadRequest` HTTP exception and will
render a page for a ``400 B... | 62599044d10714528d69f01a |
class DeleteSSIDResponse(object): <NEW_LINE> <INDENT> openapi_types = { 'is_error': 'bool', 'failure_reason': 'str', 'success_message': 'str' } <NEW_LINE> attribute_map = { 'is_error': 'isError', 'failure_reason': 'failureReason', 'success_message': 'successMessage' } <NEW_LINE> def __init__(self, is_error=None, failur... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually. | 62599044462c4b4f79dbcd19 |
class TransformedPDEntry(PDEntry): <NEW_LINE> <INDENT> def __init__(self, comp, original_entry): <NEW_LINE> <INDENT> super(TransformedPDEntry, self).__init__(comp, original_entry.energy) <NEW_LINE> self.original_entry = original_entry <NEW_LINE> self.name = original_entry.name <NEW_LINE> <DEDENT> def __getattr__(self, ... | This class repesents a TransformedPDEntry, which allows for a PDEntry to be
transformed to a different composition coordinate space. It is used in the
construction of phase diagrams that do not have elements as the terminal
compositions.
Args:
comp (Composition): Transformed composition as a Composition.
origi... | 6259904407d97122c4217fbc |
class CentralRuleD1 (CentralRule) : <NEW_LINE> <INDENT> def __init__ ( self , I = 2 , with_error = False , max_step = -1 ) : <NEW_LINE> <INDENT> CentralRule.__init__ ( self , 1 , I , with_error = with_error , max_step = max_step ) | Central rule for the 1st derivative | 62599044baa26c4b54d505c5 |
class Command(Runserver): <NEW_LINE> <INDENT> def get_handler(self, *args, **options): <NEW_LINE> <INDENT> handler = super(Command, self).get_handler(*args, **options) <NEW_LINE> if settings.DEBUG: <NEW_LINE> <INDENT> return MezzStaticFilesHandler(handler) <NEW_LINE> <DEDENT> return handler | Overrides runserver so that we can serve uploaded files
during development, and not require every single developer on
every single one of their projects to have to set up multiple
web server aliases for serving static content.
See https://code.djangoproject.com/ticket/15199 | 62599044b5575c28eb713657 |
class FailureDetail(_messages.Message): <NEW_LINE> <INDENT> crashed = _messages.BooleanField(1) <NEW_LINE> notInstalled = _messages.BooleanField(2) <NEW_LINE> timedOut = _messages.BooleanField(3) | A FailureDetail object.
Fields:
crashed: If the failure was severe because the system under test crashed.
notInstalled: If an app is not installed and thus no test can be run with
the app. This might be caused by trying to run a test on an unsupported
platform.
timedOut: If the test overran some time lim... | 6259904421a7993f00c67285 |
class ResPartnerExtended(models.Model): <NEW_LINE> <INDENT> _inherit = 'res.partner' <NEW_LINE> d_id = fields.Char(string='ID-Card', size=64) <NEW_LINE> is_driver = fields.Boolean(string='Is Driver') <NEW_LINE> insurance = fields.Boolean(string='Insurance') | Model res partner extended. | 6259904482261d6c52730853 |
class VideoCoder(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._sess = tf.Session() <NEW_LINE> self._video_path = tf.placeholder(dtype=tf.string) <NEW_LINE> self._decode_video = decode_video(self._video_path) <NEW_LINE> self._raw_frame = tf.placeholder(dtype=tf.uint8, shape=[None, None, 3]) ... | Helper class providing TensorFlow image coding utilities | 62599044596a897236128f3d |
class ExcludedUsersUpdateArg(bb.Struct): <NEW_LINE> <INDENT> __slots__ = [ '_users_value', '_users_present', ] <NEW_LINE> _has_required_fields = False <NEW_LINE> def __init__(self, users=None): <NEW_LINE> <INDENT> self._users_value = None <NEW_LINE> self._users_present = False <NEW_LINE> if users is not None: <NEW_LINE... | Argument of excluded users update operation. Should include a list of users
to add/remove (according to endpoint), Maximum size of the list is 1000
users.
:ivar team.ExcludedUsersUpdateArg.users: List of users to be added/removed. | 62599044e64d504609df9d5f |
class IngredientSearcher(six.with_metaclass(abc.ABCMeta, object)): <NEW_LINE> <INDENT> def __init__(self, dish_ids): <NEW_LINE> <INDENT> self.dish_ids = list(dish_ids) <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def get_ingredients(self): <NEW_LINE> <INDENT> raise NotImplementedError("Please implement this funct... | General class that provides API for querying ingredients databases, APIs, or cached ingredients. | 625990448a43f66fc4bf34b0 |
class WorkaroundForTls12ForCipherSuites: <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def requires_legacy_openssl(cls, openssl_cipher_name: str) -> bool: <NEW_LINE> <INDENT> legacy_client = LegacySslClient(ssl_version=OpenSslVersionEnum.TLSV1_2, ssl_verify=OpenSslVerifyEnum.NONE) <NEW_LINE> legacy_client.set_cipher_list... | Helper to figure out which version of OpenSSL to use for a given TLS 1.2 cipher suite.
The nassl module supports using either a legacy or a modern version of OpenSSL. When using TLS 1.2, specific cipher
suites are only supported by one of the two implementation. | 62599044e76e3b2f99fd9d29 |
class Central(object): <NEW_LINE> <INDENT> def __init__(self, mass=1.0, radius=1.0, flux=1.0, q1=None, q2=None, mu1=None, mu2=None): <NEW_LINE> <INDENT> self.mass = mass <NEW_LINE> self.radius = radius <NEW_LINE> self.flux = flux <NEW_LINE> if mu1 is not None and mu2 is not None: <NEW_LINE> <INDENT> if q1 is not None o... | The "central"---in this context---is the massive central body in a
:class:`System`.
:param mass:
The mass of the body measured in Solar masses. (default: ``1.0``)
:param radius:
The radius of the body measured in Solar radii. (default: ``1.0``)
:param flux:
The un-occulted flux measured in whatever units... | 6259904463b5f9789fe86489 |
class DSMREntity(Entity): <NEW_LINE> <INDENT> def __init__(self, name, obis): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> self._obis = obis <NEW_LINE> self.telegram = {} <NEW_LINE> <DEDENT> def get_dsmr_object_attr(self, attribute): <NEW_LINE> <INDENT> if self._obis not in self.telegram: <NEW_LINE> <INDENT> return... | Entity reading values from DSMR telegram. | 625990440a366e3fb87ddd03 |
class _ConstraintSectionPrint(CommandManager): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(_ConstraintSectionPrint, self).__init__() <NEW_LINE> self.menuetext = "Constraint sectionprint" <NEW_LINE> self.tooltip = "Creates a FEM constraint sectionprint" <NEW_LINE> self.is_active = "with_analysis" <... | The FEM_ConstraintSectionPrint command definition | 6259904445492302aabfd7f9 |
class ProductionRule: <NEW_LINE> <INDENT> def __init__(self, head, body, raw_definition): <NEW_LINE> <INDENT> self.head = head <NEW_LINE> self.body = body <NEW_LINE> self.raw_definition = raw_definition <NEW_LINE> self.head.rules.append(self) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.raw_de... | A production rule in a generative grammar.
Attributes:
head:
A NonterminalSymbol object, being the head of this production rule.
body:
A list of NonterminalSymbol objects and strings (i.e., terminal symbols).
raw_definition:
The raw definition of this production rule, as found in th... | 6259904450485f2cf55dc2a4 |
class DeleteServerCreatedPatientView(DeleteView): <NEW_LINE> <INDENT> form_class = DeleteServerCreatedPatientForm <NEW_LINE> object_class = Patient <NEW_LINE> pk_param = ViewParam.SERVER_PK <NEW_LINE> server_pk_name = "_pk" <NEW_LINE> template_name = TEMPLATE_GENERIC_FORM <NEW_LINE> def get_object(self) -> Any: <NEW_LI... | View to delete a patient that had been created on the server. | 6259904496565a6dacd2d919 |
class DialogNodeOutputOptionsElement(): <NEW_LINE> <INDENT> def __init__(self, label, value): <NEW_LINE> <INDENT> self.label = label <NEW_LINE> self.value = value <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def _from_dict(cls, _dict): <NEW_LINE> <INDENT> args = {} <NEW_LINE> valid_keys = ['label', 'value'] <NEW_LINE> b... | DialogNodeOutputOptionsElement.
:attr str label: The user-facing label for the option.
:attr DialogNodeOutputOptionsElementValue value: An object defining the message
input to be sent to the Watson Assistant service if the user selects the
corresponding option. | 6259904491af0d3eaad3b143 |
class ConversionFunctionHandler(CurlyBraceBlockHandler): <NEW_LINE> <INDENT> def checkIndentation(self): <NEW_LINE> <INDENT> self.checkStartColumn() <NEW_LINE> self.checkCurlyBraces(self.config.brace_positions_function_declaration) <NEW_LINE> <DEDENT> def additionalIndentLevels(self): <NEW_LINE> <INDENT> i1 = int(self.... | Handler for ConversionFunction nodes. | 62599044004d5f362081f975 |
class ColoredSprite(pyglet.sprite.Sprite): <NEW_LINE> <INDENT> def __init__(self, image, mask, color, batch=None, group=None): <NEW_LINE> <INDENT> super(ColoredSprite, self).__init__( self.__generate_image(image, mask, color), batch=batch, group=group) <NEW_LINE> <DEDENT> def __alpha_blend(self, src, dst, alpha): <NEW_... | Sprite that replaces a color based on a color mask image | 625990448a349b6b43687569 |
class SourcefileSet(): <NEW_LINE> <INDENT> def __init__(self, name, index, runs): <NEW_LINE> <INDENT> self.real_name = name <NEW_LINE> self.name = name or str(index) <NEW_LINE> self.runs = runs | A SourcefileSet contains a list of runs and a name. | 62599044498bea3a75a58e3c |
class PeopleGroup(models.Model): <NEW_LINE> <INDENT> id: 'models.AutoField[int, int]' <NEW_LINE> objects: 'models.Manager[PeopleGroup]' <NEW_LINE> name: 'models.CharField[str, str]' = models.CharField( 'nombre', max_length=120, unique=True ) <NEW_LINE> members: 'models.ManyToManyField[None, RelatedManager[User]]' = mod... | Groups of relevant people.
| 62599044be383301e0254b37 |
class Checkin(db.Model): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> time = db.Column(db.DateTime) <NEW_LINE> availability = db.Column(db.Boolean, default=False) <NEW_LINE> location_id = db.Column(db.Integer, db.ForeignKey('location.id')) <NEW_LINE> user_id = db.Column(db.Integer, db.For... | Checkin model | 62599044a4f1c619b294f817 |
class MissingHeaderError(Exception): <NEW_LINE> <INDENT> pass | Header file included that is not pre-processed or available locally | 62599044b57a9660fecd2d9b |
class NotFoundException(errors.BasicException): <NEW_LINE> <INDENT> pass | configuration file not found | 6259904429b78933be26aa52 |
class PtzMove(object): <NEW_LINE> <INDENT> def __init__(self, cam_id, auto_release_delay=10): <NEW_LINE> <INDENT> self.logger = logging.getLogger(self.__class__.__name__ + "@" + cam_id) <NEW_LINE> self.cam_id = cam_id <NEW_LINE> self.auto_release_delay = auto_release_delay <NEW_LINE> self.locked = False <NEW_LINE> self... | Run PTZ action using query params | 62599044287bf620b6272f07 |
class TestExport: <NEW_LINE> <INDENT> VALID_EXPORT_FORMATS = {"yaml"} <NEW_LINE> @pytest.mark.parametrize("format", VALID_EXPORT_FORMATS) <NEW_LINE> def test_valid_export_methods_produce_a_result(self, format): <NEW_LINE> <INDENT> data = ZeroAttributeObject() <NEW_LINE> output = data.export(format) <NEW_LINE> assert ou... | Verify behaviour of the export method | 6259904494891a1f408ba086 |
class TestText(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 testText(self): <NEW_LINE> <INDENT> pass | Text unit test stubs | 6259904407f4c71912bb0752 |
class Page(object): <NEW_LINE> <INDENT> login_url ='http://www.126.com' <NEW_LINE> def __init__(self,selenium_driver,base_url=login_url): <NEW_LINE> <INDENT> self.base_url=base_url <NEW_LINE> self.driver=selenium_driver <NEW_LINE> self.timeout=30 <NEW_LINE> <DEDENT> def on_page(self): <NEW_LINE> <INDENT> return self.dr... | 基础类,用于页面对象类的继承 | 6259904423e79379d538d81e |
class EyePactPage(Page): <NEW_LINE> <INDENT> section = SECTIONS[1] <NEW_LINE> @cherrypy.expose <NEW_LINE> def index(self): <NEW_LINE> <INDENT> self.subsection = 'EyePactOver' <NEW_LINE> return self.get_flatpage() <NEW_LINE> <DEDENT> @cherrypy.expose <NEW_LINE> def songs(self, song=''): <NEW_LINE> <INDENT> self.subsecti... | Class voor Pagina's in de Muziek met Anderen: The Eye Pact subsectie
| 62599044004d5f362081f976 |
class TTSmileySad( TT ): <NEW_LINE> <INDENT> pluginname = ':-(' <NEW_LINE> template = u'<span class="etttag sad">%s</span>' <NEW_LINE> def generate( self, node, igen, *args, **kwargs ): <NEW_LINE> <INDENT> igen.puttext( self.template % '☹' ) <NEW_LINE> <DEDENT> example = u'[<:-(>]' | A simple smiley, a sad one. | 6259904450485f2cf55dc2a7 |
class LazyProperty(object): <NEW_LINE> <INDENT> _type = type(None) <NEW_LINE> _default_name = '(anonymous)' <NEW_LINE> def __init__(self, name=None, default=None, required=False, not_none=False, exclude_if_none=True): <NEW_LINE> <INDENT> if required and default is not None: <NEW_LINE> <INDENT> raise LazyContractError('... | Base class for descriptors used as properties in a LazyContract.
Create a sub-class of this to define your own (de-)serialization. | 6259904407d97122c4217fc1 |
class RemTitlebar(ShapeNode, MyDispatch): <NEW_LINE> <INDENT> def __init__(self, size, *args, **kwargs): <NEW_LINE> <INDENT> path = ui.Path.rect(0, 0, size.w, cfg.titlebar.height) <NEW_LINE> ShapeNode.__init__(self, path, fill_color=cfg.titlebar.color, *args, **kwargs) <NEW_LINE> self.position = (size.w / 2, size.h - c... | Title bar with power off button | 625990443c8af77a43b688cd |
class TestAPIProgramTermination(unittest.TestCase): <NEW_LINE> <INDENT> _PTP_TEST_NAME = "PTPJointValid" <NEW_LINE> _WAIT_TIME_FOR_MOTION_DETECTION_SEC = 8.0 <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> rospy.loginfo("SetUp called...") <NEW_LINE> self.test_data = XmlTestdataLoader(_TEST_DATA_FILE_NAME) <NEW_LINE> se... | Test the API behaviour when the python program is terminated. | 62599044097d151d1a2c238b |
class TranslationHandler(handlers.MemoryHandler): <NEW_LINE> <INDENT> def __init__(self, locale=None, target=None): <NEW_LINE> <INDENT> handlers.MemoryHandler.__init__(self, capacity=0, target=target) <NEW_LINE> self.locale = locale <NEW_LINE> <DEDENT> def setFormatter(self, fmt): <NEW_LINE> <INDENT> self.target.setFor... | Handler that translates records before logging them.
The TranslationHandler takes a locale and a target logging.Handler object
to forward LogRecord objects to after translating them. This handler
depends on Message objects being logged, instead of regular strings.
The handler can be configured declaratively in the lo... | 6259904463b5f9789fe8648d |
class Site_Reports(models.Model): <NEW_LINE> <INDENT> reportID = models.AutoField(primary_key=True, verbose_name='Report ID') <NEW_LINE> patientCount = models.IntegerField(verbose_name='Patient Count') <NEW_LINE> projExec = models.ForeignKey(Proj_Exec_TimeStmp, db_column='exec_ID', verbose_name='TimeStamp ID') <NEW_LIN... | Model for Site_Reports table. | 62599044d6c5a102081e343d |
class ProcessMedia(celery.Task): <NEW_LINE> <INDENT> def run(self, media_id, feed_url, reprocess_action, reprocess_info=None): <NEW_LINE> <INDENT> reprocess_info = reprocess_info or {} <NEW_LINE> entry, manager = get_entry_and_processing_manager(media_id) <NEW_LINE> try: <NEW_LINE> <INDENT> processor_class = manager.ge... | Pass this entry off for processing. | 625990440a366e3fb87ddd07 |
class base_authentication_handler: <NEW_LINE> <INDENT> __author__ = 'built' <NEW_LINE> def authenticate_credential(self, username, password): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def add_credential(self, username, password): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDE... | This is the base_authentication_handler that define all the required
bound methods.
:param __author__: Defines who the author is. This is used for accounting
purposes. | 6259904445492302aabfd7fd |
class DNSDataMismatch(DNSError): <NEW_LINE> <INDENT> errno = 4212 <NEW_LINE> format = _('DNS check failed: Expected {%(expected)s} got {%(got)s}') | **4212** Raised when an DNS query didn't return expected answer
in a configured time limit.
For example:
>>> raise DNSDataMismatch(expected="zone3.test. 86400 IN A 192.0.2.1", got="zone3.test. 86400 IN A 192.168.1.1")
Traceback (most recent call last):
...
DNSDataMismatch: DNS check fa... | 6259904410dbd63aa1c71efb |
class JSONObject: <NEW_LINE> <INDENT> __slots__ = ('type') <NEW_LINE> def __init__(self, type): <NEW_LINE> <INDENT> self.type = type <NEW_LINE> <DEDENT> def format(self, file, obj, prefix, indent): <NEW_LINE> <INDENT> pass | Base class of additional output formatting types.
To register a new formatter use the module-level
:py:meth:`json_registry.register` function.
.. py:attribute:: type
The type or types supported by this formatter. Any object that is
a valid second argument to :py:func:`isinstance` is accepted. | 6259904450485f2cf55dc2a8 |
class layer(): <NEW_LINE> <INDENT> def __init__(self,borders,thickness,mesh): <NEW_LINE> <INDENT> self.borders = borders <NEW_LINE> self.thickness = thickness <NEW_LINE> self.mesh = mesh <NEW_LINE> self.domain = sp.array([self.mesh.region[0][0:2],self.mesh.region[1][0:2]]) <NEW_LINE> self.extrusions = [] <NEW_LINE> sel... | Layer object created by mesh.chop function, and acted on by lots of stuff.
Thickness is the vertical thickness of the layer.
Mesh is the mesh which the layer was created from.
Borders is the output of mesh.chop. | 62599044b830903b9686ee0b |
class BaseError(Exception): <NEW_LINE> <INDENT> def __init__(self, message=None): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.message = message <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.message <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return self.message | Class that represents base error. | 6259904482261d6c52730856 |
class RandomBot: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> return | It plays completely random, without any regard for
victory conditions, or loosing. | 62599044a79ad1619776b3a2 |
@attr.s(frozen=True) <NEW_LINE> class ScheduleItemData: <NEW_LINE> <INDENT> usage_key = attr.ib(type=UsageKey) <NEW_LINE> start = attr.ib(type=Optional[datetime]) <NEW_LINE> effective_start = attr.ib(type=Optional[datetime]) <NEW_LINE> due = attr.ib(type=Optional[datetime]) | Scheduling specific data (start/end/due dates) for a single item. | 62599044d53ae8145f919781 |
class ListForms(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = List <NEW_LINE> fields = ('name',) | List forms | 625990448e71fb1e983bcdf2 |
class ScanSceneHook(Hook): <NEW_LINE> <INDENT> def execute(self, **kwargs): <NEW_LINE> <INDENT> items = [] <NEW_LINE> if not mari.projects.current(): <NEW_LINE> <INDENT> raise TankError("You must be in an open Mari project to be able to publish!") <NEW_LINE> <DEDENT> items.append({"type":"work_file", "name":None}) <NEW... | Hook to scan scene for items to publish | 625990440fa83653e46f61fe |
class UniqueNameTracker(data_structures.TrackableDataStructure): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(UniqueNameTracker, self).__init__() <NEW_LINE> self._maybe_initialize_trackable() <NEW_LINE> self._name_counts = {} <NEW_LINE> <DEDENT> @property <NEW_LINE> def _values(self): <NEW_LINE> <I... | Adds dependencies on trackable objects with name hints.
Useful for creating dependencies with locally unique names.
Example usage:
```python
class SlotManager(tf.contrib.checkpoint.Checkpointable):
def __init__(self):
# Create a dependency named "slotdeps" on the container.
self.slotdeps = tf.contrib.check... | 62599044097d151d1a2c238d |
class ModelVersion: <NEW_LINE> <INDENT> def __init__(self, model_name, version): <NEW_LINE> <INDENT> self.model_name = model_name <NEW_LINE> self.version = version <NEW_LINE> <DEDENT> def bump(self, artifacts_path): <NEW_LINE> <INDENT> new_ver = self.version + 1 <NEW_LINE> dst_directory = os.path.join(self.model_name, ... | Naive model versioning implementation | 6259904407f4c71912bb0755 |
class SwitchTopology(Topology): <NEW_LINE> <INDENT> _mnist_params: DatasetMNISTParams = DatasetMNISTParams(class_filter=[1, 2], one_hot_labels=False) <NEW_LINE> _noise_params: RandomNoiseParams = RandomNoiseParams(torch.Size((28, 28)), distribution='Normal', amplitude=.3) <NEW_LINE> def __init__(self): <NEW_LINE> <INDE... | Topology for testing the SwitchNode.
The topology connects the MNIST label (1 or 2, to pick input), MNIST digits, and noise as inputs to the
SwitchNode. The node's output will be a MNIST '1' digit or noise depending on the input label. | 6259904491af0d3eaad3b148 |
class CollectionMetadata(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'collections_metadata' <NEW_LINE> """Collection identifier.""" <NEW_LINE> collection_id = db.Column( db.Integer, db.ForeignKey(Collection.id), primary_key=True, nullable=False, ) <NEW_LINE> infos = db.Column( JSONType().with_variant( postgresql.JSO... | Represent a collection metadata inside the SQL database.
| 62599044d53ae8145f919782 |
class Controller(wsgi.Controller): <NEW_LINE> <INDENT> _view_builder_class = flavors_view.ViewBuilder <NEW_LINE> @wsgi.serializers(xml=MinimalFlavorsTemplate) <NEW_LINE> def index(self, req): <NEW_LINE> <INDENT> limited_flavors = self._get_flavors(req) <NEW_LINE> return self._view_builder.index(req, limited_flavors) <N... | Flavor controller for the OpenStack API. | 625990440a366e3fb87ddd09 |
class ListUnsubscribeInputSet(InputSet): <NEW_LINE> <INDENT> def set_APIKey(self, value): <NEW_LINE> <INDENT> InputSet._set_input(self, 'APIKey', value) <NEW_LINE> <DEDENT> def set_DeleteMember(self, value): <NEW_LINE> <INDENT> InputSet._set_input(self, 'DeleteMember', value) <NEW_LINE> <DEDENT> def set_EmailAddress(se... | An InputSet with methods appropriate for specifying the inputs to the ListUnsubscribe
Choreo. The InputSet object is used to specify input parameters when executing this Choreo. | 62599044b57a9660fecd2da0 |
class VolumeDetachTask(object): <NEW_LINE> <INDENT> def __init__(self, stack, server_id, volume_id): <NEW_LINE> <INDENT> self.clients = stack.clients <NEW_LINE> self.server_id = server_id <NEW_LINE> self.volume_id = volume_id <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return 'Detaching Volume %s from In... | A task for detaching a volume from a Nova server. | 62599044b830903b9686ee0c |
class RuntimeconfigProjectsConfigsWaitersCreateRequest(_messages.Message): <NEW_LINE> <INDENT> parent = _messages.StringField(1, required=True) <NEW_LINE> requestId = _messages.StringField(2) <NEW_LINE> waiter = _messages.MessageField('Waiter', 3) | A RuntimeconfigProjectsConfigsWaitersCreateRequest object.
Fields:
parent: The path to the configuration that will own the waiter. The
configuration must exist beforehand; the path must by in the format:
`projects/[PROJECT_ID]/configs/[CONFIG_NAME]`.
requestId: An optional but recommended unique `request_i... | 6259904494891a1f408ba088 |
class RSpecParsingException(Exception): <NEW_LINE> <INDENT> pass | Raised when there is a problem parsing the RSpec. | 6259904430c21e258be99b2a |
class DescribeAddressTemplateGroupsResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TotalCount = None <NEW_LINE> self.AddressTemplateGroupSet = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.TotalCount = params.... | DescribeAddressTemplateGroups返回参数结构体
| 62599044a8ecb03325872535 |
class InvalidParamsError(Error): <NEW_LINE> <INDENT> def __init__(self, id_=None, code=-32602, message='Invalid method parameter(s).', data=None): <NEW_LINE> <INDENT> Error.__init__(self, id_=id_, code=code, message=message, data=data) | 无效的JSON-RPC请求参数 | 62599044d53ae8145f919783 |
class Solution(object): <NEW_LINE> <INDENT> def addDigits(self, num): <NEW_LINE> <INDENT> while num >= 10: <NEW_LINE> <INDENT> num = self.sumDigits(num) <NEW_LINE> <DEDENT> return num <NEW_LINE> <DEDENT> def sumDigits(self, num): <NEW_LINE> <INDENT> s = 0 <NEW_LINE> while True: <NEW_LINE> <INDENT> s += num % 10 <NEW_LI... | :type num: int
:rtype: int | 62599044596a897236128f41 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.