code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class APICommentListView(generics.ListCreateAPIView): <NEW_LINE> <INDENT> def get_document(self): <NEW_LINE> <INDENT> if self.request.method == 'GET': <NEW_LINE> <INDENT> permission_required = permission_document_comment_view <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> permission_required = permission_document_commen... | get: Returns a list of all the document comments.
post: Create a new document comment. | 62598fd5377c676e912f6ff0 |
class TimedProcTimeoutError(SaltException): <NEW_LINE> <INDENT> pass | Thrown when a timed subprocess does not terminate within the timeout,
or if the specified timeout is not an int or a float | 62598fd5ad47b63b2c5a7d3e |
class Point(): <NEW_LINE> <INDENT> def __init__(self, x=0, y=0): <NEW_LINE> <INDENT> self.x, self.y = x, y <NEW_LINE> <DEDENT> def __hash__(self): <NEW_LINE> <INDENT> return hash((self.x, self.y)) <NEW_LINE> <DEDENT> def __lt__(self, other): <NEW_LINE> <INDENT> if self.x != other.x: <NEW_LINE> <INDENT> return self.x < ... | Data and operations of 2D points | 62598fd526238365f5fad052 |
class AccountAndProjectData(fixtures.Fixture): <NEW_LINE> <INDENT> def __init__(self, dbconn, context, user_id, project_id, domain_id, level, owed=False, balance=0, frozen_balance=0, consumption=0, inviter=None, sales_id=None): <NEW_LINE> <INDENT> self.dbconn = dbconn <NEW_LINE> self.context = context <NEW_LINE> self.u... | A fixture for generating account and project data | 62598fd597e22403b383b3f7 |
class DashboardModel(models.Model): <NEW_LINE> <INDENT> created = models.DateTimeField(auto_now_add=True) <NEW_LINE> updated = models.DateTimeField(auto_now=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> <DEDENT> @property <NEW_LINE> def time_since_update(self): <NEW_LINE> <INDENT> update_d... | Abstract base model for things which will be displayed on the dashboard, adds in created and updated fields,
and provides a convenience method which provides a nicely formatted string of the time since update. | 62598fd5adb09d7d5dc0aa68 |
class CudaFnUfuncs(FnBaseUfuncs): <NEW_LINE> <INDENT> sin = _make_unary_fun('sin') <NEW_LINE> cos = _make_unary_fun('cos') <NEW_LINE> arcsin = _make_unary_fun('arcsin') <NEW_LINE> arccos = _make_unary_fun('arccos') <NEW_LINE> log = _make_unary_fun('log') <NEW_LINE> exp = _make_unary_fun('exp') <NEW_LINE> absolute = _ma... | Ufuncs for `CudaFnVector` objects.
Internal object, should not be created except in `CudaFnVector`. | 62598fd5099cdd3c63675656 |
class Constant_CT_Signal(CT_Signal): <NEW_LINE> <INDENT> def __init__(self, k): <NEW_LINE> <INDENT> assert is_number(k), 'k must be a number' <NEW_LINE> self.k = k <NEW_LINE> <DEDENT> def sample(self, t): <NEW_LINE> <INDENT> return self.k | Constant CT signal. | 62598fd5c4546d3d9def74fa |
class GeneQueryTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self._op = SetupHelper.createOrthoXMLParserFromSimpleEx() <NEW_LINE> self._tax = fa.TaxonomyFactory.newTaxonomy(self._op) <NEW_LINE> self._op.augmentTaxonomyInfo(self._tax) <NEW_LINE> self._input_query = fa.OrthoXMLQuery.ge... | tests the OrthoXMLQuery methods getInputGenes and getGroupedGenes,
with and without species filters | 62598fd58a349b6b43686730 |
class IndexState(object): <NEW_LINE> <INDENT> SUCCESS = 'SUCCESS' <NEW_LINE> RUNNING = 'RUNNING' <NEW_LINE> FAILURE = 'FAILURE' <NEW_LINE> PARTIAL_SUCCESS = 'PARTIAL_SUCCESS' <NEW_LINE> TIMEOUT = 'TIMEOUT' <NEW_LINE> CREATED = 'CREATED' | Possible states for the inventory/scanner index. | 62598fd5be7bc26dc92520cf |
class returnPyArgument( ReturnValues ): <NEW_LINE> <INDENT> argNames = ('name',) <NEW_LINE> indexLookups = [ ('index','name', 'pyArgIndex' ), ] <NEW_LINE> __slots__ = ( 'index', 'name' ) <NEW_LINE> def __call__( self, result, baseOperation, pyArgs, cArgs ): <NEW_LINE> <INDENT> return pyArgs[self.index] | ReturnValues returning the named pyArgs value | 62598fd5283ffb24f3cf3d71 |
class StubEtcd(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.request_queue = Queue() <NEW_LINE> self.response_queue = Queue() <NEW_LINE> self.headers = { "x-etcd-cluster-id": "abcdefg" } <NEW_LINE> self.lock = threading.Lock() <NEW_LINE> self.open_reqs = set() <NEW_LINE> <DEDENT> def request... | A fake connection to etcd. We hook the driver's _issue_etcd_request
method and block the relevant thread until the test calls one of the
respond_... methods. | 62598fd5adb09d7d5dc0aa6a |
class TestMovies(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 test_find_year_for_title(self): <NEW_LINE> <INDENT> harness = ( ("Starwars (1977)", "1977",), ("2001 A space odyssey 1968", "1968",)... | Test cases for the sorting of movie popularity by decade.
Given the following list in a string seperated by
characters.
Jaws (1975)
Starwars 1977
2001 A Space Odyssey ( 1968 )
Back to the future 1985.
Raiders of the lost ark 1981 .
jurassic park 1993
The Matri... | 62598fd560cbc95b0636482e |
class RequestLogging(wsgi.Middleware): <NEW_LINE> <INDENT> @webob.dec.wsgify(RequestClass=wsgi.Request) <NEW_LINE> def __call__(self, req): <NEW_LINE> <INDENT> start = timeutils.utcnow() <NEW_LINE> rv = req.get_response(self.application) <NEW_LINE> self.log_request_completion(rv, req, start) <NEW_LINE> return rv <NEW_L... | Access-Log akin logging for all EC2 API requests. | 62598fd5ad47b63b2c5a7d43 |
class PubSubModerationActionBanRequest(PubSubMessage): <NEW_LINE> <INDENT> __slots__ = "action", "args", "created_by", "message_id", "target" <NEW_LINE> def __init__(self, client: Client, topic: str, data: dict): <NEW_LINE> <INDENT> super().__init__(client, topic, data) <NEW_LINE> self.action: str = data["message"]["da... | A Ban/Unban event
Attributes
-----------
action: :class:`str`
The action taken.
args: List[:class:`str`]
The arguments given to the command.
created_by: :class:`twitchio.PartialUser`
The user that created the action.
target: :class:`twitchio.PartialUser`
The target of this action. | 62598fd550812a4eaa620e5c |
class Dipendente(models.Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> verbose_name = 'Dipendente' <NEW_LINE> verbose_name_plural = 'Dipendenti' <NEW_LINE> <DEDENT> nome = models.CharField(max_length=32) <NEW_LINE> cognome = models.CharField(max_length=32) <NEW_LINE> sesso = models.CharField(max_length=7, ... | La classe Dipendente identifica un dipendente all'interno di un'azienda.
Gli attributi di classe specificano le caratteristiche possedute da un dipendente. | 62598fd5656771135c489b64 |
class CourseSocialNetworkTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(CourseSocialNetworkTests, self).setUp() <NEW_LINE> self.network = factories.CourseRunSocialNetworkFactory() <NEW_LINE> self.course_run = factories.CourseRunFactory() <NEW_LINE> <DEDENT> def test_str(self): <NEW_LINE... | Tests of the CourseSocialNetwork model. | 62598fd5c4546d3d9def74fc |
class Solution: <NEW_LINE> <INDENT> def sortIntegers2(self, A): <NEW_LINE> <INDENT> if A is None or len(A) == 0: <NEW_LINE> <INDENT> return -1 <NEW_LINE> <DEDENT> self.quick_sort(A, 0, len(A) - 1) <NEW_LINE> return A <NEW_LINE> <DEDENT> def quick_sort(self, A, start, end): <NEW_LINE> <INDENT> if start >= end: <NEW_LINE... | @param A: an integer array
@return: nothing | 62598fd58a349b6b43686734 |
class Tags(object): <NEW_LINE> <INDENT> def __init__(self, patterns=TAGS_ANDROID, reverse=TAG_REVERSE_ANDROID): <NEW_LINE> <INDENT> self.tags = set() <NEW_LINE> self.patterns = patterns <NEW_LINE> self.reverse = TAG_REVERSE_ANDROID <NEW_LINE> for i in self.patterns: <NEW_LINE> <INDENT> self.patterns[i][1] = re.compile(... | Handle specific tags
:param patterns:
:params reverse: | 62598fd53d592f4c4edbb3a9 |
class SearchFacetsView(BrowserView, FacetMixin): <NEW_LINE> <INDENT> def __call__(self, *args, **kw): <NEW_LINE> <INDENT> self.args = args <NEW_LINE> self.kw = kw <NEW_LINE> return super(SearchFacetsView, self).__call__(*args, **kw) <NEW_LINE> <DEDENT> def facets(self): <NEW_LINE> <INDENT> results = self.kw.get('result... | view for displaying facetting info as provided by solr searches | 62598fd5be7bc26dc92520d1 |
class TimestampParam(Parameter): <NEW_LINE> <INDENT> def __init__(self, alias=None, required=False, default=None, validate=None): <NEW_LINE> <INDENT> Parameter.__init__(self, alias=alias, required=required, default=default, validate=validate) <NEW_LINE> <DEDENT> def convert(self, value): <NEW_LINE> <INDENT> try: <NEW_L... | Parameter for timestamp values | 62598fd5ec188e330fdf8d8a |
class CarePlanSymptomTemplateViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> serializer_class = CarePlanSymptomTemplateSerializer <NEW_LINE> permission_classes = ( permissions.IsAuthenticated, IsEmployeeOrPatientReadOnly, ) <NEW_LINE> filter_backends = (DjangoFilterBackend, ) <NEW_LINE> filterset_fields = ( 'plan',... | Viewset for :model:`tasks.CarePlanSymptomTemplate`
========
create:
Creates :model:`tasks.CarePlanSymptomTemplate` object.
Only admins and employees are allowed to perform this action.
update:
Updates :model:`tasks.CarePlanSymptomTemplate` object.
Only admins and employees who belong to the same care ... | 62598fd5956e5f7376df58f7 |
class TestBase(unittest.TestCase): <NEW_LINE> <INDENT> def are_lists_equal(self, list1, list2, equality_method=lambda x, y: x == y): <NEW_LINE> <INDENT> i = 0 <NEW_LINE> if len(list1) != len(list2): <NEW_LINE> <INDENT> raise AssertionError( "length of {} is not equal to length of {}\n {} != {}".format(list1, list2, len... | Testing base class | 62598fd50fa83653e46f53dc |
class Bind(Statement): <NEW_LINE> <INDENT> match = re.compile(r'bind\s*\(.*\)',re.I).match <NEW_LINE> def process_item(self): <NEW_LINE> <INDENT> line = self.item.line <NEW_LINE> self.specs, line = parse_bind(line, self.item) <NEW_LINE> if line.startswith('::'): <NEW_LINE> <INDENT> line = line[2:].lstrip() <NEW_LINE> <... | <language-binding-spec> [ :: ] <bind-entity-list>
<language-binding-spec> = BIND ( C [ , NAME = <scalar-char-initialization-expr> ] )
<bind-entity> = <entity-name> | / <common-block-name> / | 62598fd5377c676e912f6ff4 |
class MoveByCar(Movable): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._speed = 0.0001 <NEW_LINE> self._min_distance_radius = 10 | Движение на машине | 62598fd5c4546d3d9def74fd |
class FormatCBFFullPilatusDLS6MSN100(FormatCBFFullPilatus): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def understand(image_file): <NEW_LINE> <INDENT> header = FormatCBFFullPilatus.get_cbf_header(image_file) <NEW_LINE> for record in header.split("\n"): <NEW_LINE> <INDENT> if ( "# Detector" in record and "PILATUS" in ... | An image reading class for full CBF format images from Pilatus
detectors. | 62598fd5ab23a570cc2d4fe8 |
class Grp70No160(base_tests.SimpleDataPlane): <NEW_LINE> <INDENT> @wireshark_capture <NEW_LINE> def runTest(self): <NEW_LINE> <INDENT> logging = get_logger() <NEW_LINE> logging.info("Running Grp70No160 Strip vlan header test") <NEW_LINE> of_ports = config["port_map"].keys() <NEW_LINE> of_ports.sort() <NEW_LINE> self.as... | Strip vlan header | 62598fd550812a4eaa620e5e |
class Property: <NEW_LINE> <INDENT> def __init__(self, name: str, signature: str, access: PropertyAccess = PropertyAccess.READWRITE): <NEW_LINE> <INDENT> assert_member_name_valid(name) <NEW_LINE> if hasattr(signature, 'tree'): <NEW_LINE> <INDENT> signature = signature.tree.signature <NEW_LINE> <DEDENT> tree = Signature... | A class that represents a DBus property exposed on an
:class:`Interface`.
:ivar name: The name of this property.
:vartype name: str
:ivar signature: The signature string for this property. Must be a single complete type.
:vartype signature: str
:ivar access: Whether this property is readable and writable.
:vartype acc... | 62598fd53617ad0b5ee0663e |
class LibvirtNonblockingTestCase(test.NoDBTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(LibvirtNonblockingTestCase, self).setUp() <NEW_LINE> self.flags(connection_uri="test:///default", group='libvirt') <NEW_LINE> <DEDENT> def test_connection_to_primitive(self): <NEW_LINE> <INDENT> import no... | Test libvirtd calls are nonblocking. | 62598fd58a349b6b43686738 |
class MainMenu(Menu): <NEW_LINE> <INDENT> def __init__(self, master=None, **kwargs): <NEW_LINE> <INDENT> Menu.__init__(self, master, **kwargs) <NEW_LINE> file_menu = Menu(self, tearoff=0) <NEW_LINE> file_menu.add_command(label='Save Data', command=lambda: self.save_data) <NEW_LINE> file_menu.add_command(label='Exit', c... | Main menu for the Contoso App | 62598fd5099cdd3c6367565a |
class FieldFile(_FileProxyMixin): <NEW_LINE> <INDENT> def __init__(self, instance, field, file_id): <NEW_LINE> <INDENT> self.instance = instance <NEW_LINE> self.field = field <NEW_LINE> self.file_id = file_id <NEW_LINE> self.storage = field.storage <NEW_LINE> self._file = None <NEW_LINE> self._committed = True <NEW_LIN... | Type returned when accessing a :class:`~pymodm.fields.FileField`.
This type is just a thin wrapper around a :class:`~pymodm.files.File` and
can be treated as a file-like object in most places where a `file` is
expected. | 62598fd5d8ef3951e32c80d7 |
class UnexpectedTokenError(RuntimeError): <NEW_LINE> <INDENT> def __init__(self, line: int, line_index: int, token: str, message: str = ""): <NEW_LINE> <INDENT> self.__line = line <NEW_LINE> self.__line_index = line_index <NEW_LINE> self.__token = token <NEW_LINE> self.__message = f"Unexpected token {token} on line {li... | Error thrown when a token is not part of the MLP. | 62598fd5ad47b63b2c5a7d49 |
class InboundNatRuleListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'next_link': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[InboundNatRule]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE>... | Response for ListInboundNatRule API service call.
Variables are only populated by the server, and will be ignored when sending a request.
:param value: A list of inbound nat rules in a load balancer.
:type value: list[~azure.mgmt.network.v2020_04_01.models.InboundNatRule]
:ivar next_link: The URL to get the next set ... | 62598fd550812a4eaa620e5f |
class getAdUsersByCid_args: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.I32, 'creator_id', None, None, ), (2, TType.I32, 'account_status', None, None, ), ) <NEW_LINE> def __init__(self, creator_id=None, account_status=None,): <NEW_LINE> <INDENT> self.creator_id = creator_id <NEW_LINE> self.account_status = acco... | Attributes:
- creator_id
- account_status | 62598fd57cff6e4e811b5f23 |
class BugStatusUnknownError(Exception): <NEW_LINE> <INDENT> pass | We have encountered a bug whose status is unknown to us.
See :mod:`pulp_smash.selectors` for more information on how bug statuses
are used. | 62598fd560cbc95b06364837 |
class RetrieveWorksheetsResultSet(ResultSet): <NEW_LINE> <INDENT> def get_Response(self): <NEW_LINE> <INDENT> return self._output.get('Response', None) | Retrieve the value for the "Response" output from this choreography execution. ((XML) The response from Google) | 62598fd5ec188e330fdf8d90 |
class MAVLink_ping_message(MAVLink_message): <NEW_LINE> <INDENT> id = MAVLINK_MSG_ID_PING <NEW_LINE> name = 'PING' <NEW_LINE> fieldnames = ['time_usec', 'seq', 'target_system', 'target_component'] <NEW_LINE> ordered_fieldnames = [ 'time_usec', 'seq', 'target_system', 'target_component' ] <NEW_LINE> format = '<QIBB' <NE... | A ping message either requesting or responding to a ping. This
allows to measure the system latencies, including serial port,
radio modem and UDP connections. | 62598fd5be7bc26dc92520d4 |
class CacheHandler(urllib2.BaseHandler): <NEW_LINE> <INDENT> def __init__(self,cacheLocation): <NEW_LINE> <INDENT> self.cacheLocation = lazylibrarian.DATADIR + os.sep + cacheLocation <NEW_LINE> if not os.path.exists(self.cacheLocation): <NEW_LINE> <INDENT> os.mkdir(self.cacheLocation) <NEW_LINE> <DEDENT> <DEDENT> def d... | Stores responses in a persistant on-disk cache.
If a subsequent GET request is made for the same URL, the stored
response is returned, saving time, resources and bandwith | 62598fd5bf627c535bcb19aa |
class MismatchingBlockEnd(Exception): <NEW_LINE> <INDENT> pass | When an BlockEnd with a name not matching the current block is found | 62598fd5ad47b63b2c5a7d4c |
class CreateChartModel(Model): <NEW_LINE> <INDENT> _attribute_map = { 'name': {'key': 'Name', 'type': 'str'}, 'is_public': {'key': 'IsPublic', 'type': 'bool'}, } <NEW_LINE> def __init__(self, *, name: str=None, is_public: bool=None, **kwargs) -> None: <NEW_LINE> <INDENT> super(CreateChartModel, self).__init__(**kwargs)... | CreateChartModel.
:param name:
:type name: str
:param is_public:
:type is_public: bool | 62598fd550812a4eaa620e61 |
class XfconfProptype(Enum): <NEW_LINE> <INDENT> INT = "int" <NEW_LINE> UINT = "uint" <NEW_LINE> BOOL = "bool" <NEW_LINE> FLOAT = "float" <NEW_LINE> DOUBLE = "double" <NEW_LINE> STRING = "string" | Types of properties that can be stored in the xfconf database. | 62598fd5283ffb24f3cf3d7d |
class package(BaseNode): <NEW_LINE> <INDENT> def action(self): <NEW_LINE> <INDENT> with zipfile.ZipFile('layers_image.zip', 'w', zipfile.ZIP_DEFLATED) as tzip: <NEW_LINE> <INDENT> tzip.write("./scripter.py") <NEW_LINE> tzip.close() <NEW_LINE> <DEDENT> if not os.path.exists("./dist"): <NEW_LINE> <INDENT> os.mkdir("./dis... | package prject to release file (zip) | 62598fd5dc8b845886d53aba |
class GetSmartAccountListResponse(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... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598fd526238365f5fad062 |
class UnlockProtocol(protocol.Protocol): <NEW_LINE> <INDENT> name = 'unlock' <NEW_LINE> def on_interact(self): <NEW_LINE> <INDENT> if not self.args.unlock: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> formatting.print_title('Unlocking tests for {}'.format( self.assignment['name'])) <NEW_LINE> print('At each "{}",'.fo... | Unlocking protocol that wraps that mechanism. | 62598fd5656771135c489b70 |
class Object(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=10) <NEW_LINE> description = models.CharField(max_length=100) <NEW_LINE> num = models.IntegerField() <NEW_LINE> img = models.FileField(default='/static/img/default.png',upload_to = 'static/img/') <NEW_LINE> user = models.ForeignKey(User,... | 货物类 | 62598fd6ec188e330fdf8d96 |
class NewRemoteCommandWithArgs(_command.Command): <NEW_LINE> <INDENT> group_name = "test" <NEW_LINE> command_name = "remote_command_1" <NEW_LINE> def execute(self, arg_1, arg_2): <NEW_LINE> <INDENT> pass | New remote command that requires argument(s).
Detailed information on how to use the command. | 62598fd655399d3f05626a1a |
@dataclass <NEW_LINE> class ParameterDefinition(BaseDefinition): <NEW_LINE> <INDENT> parameterType: str = '' <NEW_LINE> defaultValue: str = '' | Defines a single parameter for a method | 62598fd6091ae3566870511b |
class InferenceDataset(Dataset): <NEW_LINE> <INDENT> def __init__(self, example_ids, data_dir, model_type='region_attention', spatial_feature_size=5, drop_num_regions=False, drop_bb_coords=False): <NEW_LINE> <INDENT> self.example_ids = example_ids <NEW_LINE> self.data_dir = data_dir <NEW_LINE> self.model_type = model_t... | Loads all the relevant data from disk and prepares it for collating.
Only the list of all example ids is permanently stored in memory.
Arguments:
example_ids (list): full list of examples in the form of image ids with the annotation number at the end
data_dir (string): directory where the data files are locate... | 62598fd6c4546d3d9def7503 |
class TestResursConnectorSettings(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 testResursConnectorSettings(self): <NEW_LINE> <INDENT> pass | ResursConnectorSettings unit test stubs | 62598fd6099cdd3c6367565f |
class PasswordKdfAlgoUnknown(Object): <NEW_LINE> <INDENT> ID = 0xd45ab096 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read(b: BytesIO, *args) -> "PasswordKdfAlgoUnknown": <NEW_LINE> <INDENT> return PasswordKdfAlgoUnknown() <NEW_LINE> <DEDENT> def write(self) ... | Attributes:
ID: ``0xd45ab096``
No parameters required. | 62598fd6a219f33f346c6d08 |
class QuantRiskResult(BaseObject): <NEW_LINE> <INDENT> volatility = None <NEW_LINE> Max_Drawdown = None <NEW_LINE> Max_Drawdown_recover_period = None <NEW_LINE> SharpRatio = None <NEW_LINE> SortinoRatio = None <NEW_LINE> DownsideRisk_LMPN = None <NEW_LINE> varHistory = None <NEW_LINE> Max_consecutive_up_days = None <NE... | 风险类量化指标结果类 | 62598fd660cbc95b0636483f |
class Warrior(Soldier): <NEW_LINE> <INDENT> def load_weapon(self): <NEW_LINE> <INDENT> print('The brave warrior unsheathe his sword') <NEW_LINE> <DEDENT> def combat_move(self): <NEW_LINE> <INDENT> print('Then, he falls it into his enemy') | The warrior class | 62598fd6be7bc26dc92520d8 |
class SharedCriterionServiceGrpcTransport(object): <NEW_LINE> <INDENT> _OAUTH_SCOPES = () <NEW_LINE> def __init__(self, channel=None, credentials=None, address='googleads.googleapis.com:443'): <NEW_LINE> <INDENT> if channel is not None and credentials is not None: <NEW_LINE> <INDENT> raise ValueError( 'The `channel` an... | gRPC transport class providing stubs for
google.ads.googleads.v1.services SharedCriterionService API.
The transport provides access to the raw gRPC stubs,
which can be used to take advantage of advanced
features of gRPC. | 62598fd6656771135c489b74 |
class ValueIterationAgent(ValueEstimationAgent): <NEW_LINE> <INDENT> def __init__(self, mdp, discount = 0.9, iterations = 100): <NEW_LINE> <INDENT> self.mdp = mdp <NEW_LINE> self.discount = discount <NEW_LINE> self.iterations = iterations <NEW_LINE> self.values = util.Counter() <NEW_LINE> "*** YOUR CODE HERE ***" <NEW_... | * Please read learningAgents.py before reading this.*
A ValueIterationAgent takes a Markov decision process
(see mdp.py) on initialization and runs value iteration
for a given number of iterations using the supplied
discount factor. | 62598fd63617ad0b5ee0664a |
class MsgTrackingIqDepB(SBP): <NEW_LINE> <INDENT> _parser = construct.Struct( 'channel' / construct.Int8ul, 'sid' / GnssSignal._parser, 'corrs' / construct.Array(3, construct.Byte),) <NEW_LINE> __slots__ = [ 'channel', 'sid', 'corrs', ] <NEW_LINE> def __init__(self, sbp=None, **kwargs): <NEW_LINE> <INDENT> if sbp: <NEW... | SBP class for message MSG_TRACKING_IQ_DEP_B (0x002C).
You can have MSG_TRACKING_IQ_DEP_B inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
When enabled, a tracking channel can output the correlations at each update
interval.
Parameters
----------
sbp : SBP
... | 62598fd6adb09d7d5dc0aa7c |
class ClientManager(object): <NEW_LINE> <INDENT> rm = ClientCache(rm_client.make_client) <NEW_LINE> def __init__(self, api_version=None, url=None, app_name=None ): <NEW_LINE> <INDENT> self._api_version = api_version <NEW_LINE> self._url = url <NEW_LINE> self._app_name = app_name <NEW_LINE> return <NEW_LINE> <DEDENT> de... | Manages access to API clients, including authentication.
| 62598fd6ab23a570cc2d4fef |
class Hyperparameter(object): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> self._parent = parent <NEW_LINE> <DEDENT> def __getattr__(self, name): <NEW_LINE> <INDENT> if '_parent' not in self.__dict__: <NEW_LINE> <INDENT> raise AttributeError('_parent is not set up yet') <NEW_LINE> <DEDENT> r... | Set of hyperparameter entries of an optimizer.
This is a utility class to provide a set of hyperparameter entries for
update rules and an optimizer. Each entry can be set as an attribute of a
hyperparameter object.
A hyperparameter object can hold a reference to its parent hyperparameter
object. When an attribute doe... | 62598fd660cbc95b06364841 |
class Token(object): <NEW_LINE> <INDENT> def __init__(self, auth_ref): <NEW_LINE> <INDENT> user = {} <NEW_LINE> user['id'] = auth_ref.user_id <NEW_LINE> user['name'] = auth_ref.username <NEW_LINE> self.user = user <NEW_LINE> self.user_domain_id = auth_ref.user_domain_id <NEW_LINE> self.id = auth_ref.auth_token <NEW_LIN... | Token object that encapsulates the auth_ref (AccessInfo)from keystone
client.
Added for maintaining backward compatibility with horizon that expects
Token object in the user object. | 62598fd60fa83653e46f53ec |
class Card(object): <NEW_LINE> <INDENT> SUITS = 'cdhs' <NEW_LINE> SUIT_NAMES = ['Clubs', 'Diamonds', 'Hearts', 'Spades'] <NEW_LINE> RANKS = range(1, 14) <NEW_LINE> RANK_NAMES = ['Ace', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten', 'Jack', 'Queen', 'King'] <NEW_LINE> def __init__(self, rank, su... | A simple playing card, characterized by two components:
rank: an interger value in the range 1 - 13, inclusing (Ace-King)
suit: a character in 'cdhs' for clubs, diamonds, hearts and spades. | 62598fd6091ae3566870511f |
class CB(nn.Module): <NEW_LINE> <INDENT> def __init__(self, nIn, nOut, kSize, stride=1): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> padding = int((kSize - 1) / 2) <NEW_LINE> self.conv = nn.Conv2d(nIn, nOut, (kSize, kSize), stride=stride, padding=(padding, padding), bias=False) <NEW_LINE> self.bn = nn.BatchNorm2d... | This class groups the convolution and batch normalization | 62598fd63617ad0b5ee0664c |
class InputFeatures: <NEW_LINE> <INDENT> def __init__( self, input_ids, attention_mask=None, token_type_ids=None, labels=None, sent_rep_token_ids=None, sent_lengths=None, source=None, target=None, ): <NEW_LINE> <INDENT> self.input_ids = input_ids <NEW_LINE> self.attention_mask = attention_mask <NEW_LINE> self.token_typ... | A single set of features of data.
Args:
input_ids: Indices of input sequence tokens in the vocabulary.
attention_mask: Mask to avoid performing attention on padding token indices.
Mask values selected in `[0, 1]`:
Usually `1` for tokens that are NOT MASKED, `0` for MASKED (padded) tokens.
... | 62598fd6adb09d7d5dc0aa7e |
class IVocabularyFactory(schema.interfaces.IVocabularyFactory): <NEW_LINE> <INDENT> pass | vocabulary factory | 62598fd6c4546d3d9def7505 |
class JobStatus(async_.PollResultBase): <NEW_LINE> <INDENT> complete = None <NEW_LINE> @classmethod <NEW_LINE> def failed(cls, val): <NEW_LINE> <INDENT> return cls('failed', val) <NEW_LINE> <DEDENT> def is_complete(self): <NEW_LINE> <INDENT> return self._tag == 'complete' <NEW_LINE> <DEDENT> def is_failed(self): <NEW_L... | This class acts as a tagged union. Only one of the ``is_*`` methods will
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.
:ivar sharing.JobStatus.complete: The asynchronous job has finished.
:ivar JobError JobStatus.failed: The asynchronous job returned an erro... | 62598fd655399d3f05626a20 |
class CacheIO: <NEW_LINE> <INDENT> DBCache = dbio('cache_database') <NEW_LINE> table_name = 'api_json_return_values' <NEW_LINE> result_ttl = 300 <NEW_LINE> def __init__(self, result_ttl=300): <NEW_LINE> <INDENT> self.result_ttl = result_ttl <NEW_LINE> self.DBCache.create_table(self.table_name, 'result_id integer PRIMAR... | this class should record the search term, get the date and time, and record the json to the sql handler
logic regarding how long to keep an object cached should operate here based on parameters passed into the class
this class should return an existing archive, or return "" if no previous entry exists based on sql sear... | 62598fd650812a4eaa620e66 |
class OrientationActuatorClass(morse.core.actuator.MorseActuatorClass): <NEW_LINE> <INDENT> def __init__(self, obj, parent=None): <NEW_LINE> <INDENT> print ('######## ORIENTATION CONTROL INITIALIZATION ########') <NEW_LINE> super(self.__class__,self).__init__(obj, parent) <NEW_LINE> self.local_data['rx'] = 0.0 <NEW_LIN... | Motion controller changing the robot orientation
This class will read angles as input from an external middleware,
and then change the robot orientation accordingly. | 62598fd6fbf16365ca7945c6 |
class ModuleLocalCommand(TemplerLocalTemplate): <NEW_LINE> <INDENT> use_cheetah = True <NEW_LINE> parent_templates = ['basic_namespace', ] <NEW_LINE> _template_dir = 'templates/module' <NEW_LINE> summary = "Add a module to your package" <NEW_LINE> vars = [ var('module_name', 'Module Name', default="mymodule"), ] | A bogus local command for use in testing | 62598fd6c4546d3d9def7507 |
class import_dsf (bpy.types.Operator): <NEW_LINE> <INDENT> bl_label = 'import dsf-geom' <NEW_LINE> bl_idname = 'mesh.dsf' <NEW_LINE> filepath = StringProperty (name = 'file path', description = 'file path for importing dsf-file.', maxlen = 1000, default = '') <NEW_LINE> filter_glob = StringProperty (default = '*.d... | Load a daz studio 4 dsf file. | 62598fd6ad47b63b2c5a7d5a |
class CheckKeys(object): <NEW_LINE> <INDENT> not_empty = True <NEW_LINE> string_validator_instance = None <NEW_LINE> key_names = None <NEW_LINE> refer_key_name = None <NEW_LINE> level = None <NEW_LINE> messages = dict( names='%(keyNames (type list of strings or string) is is required.', stores='%(stores (type dict) is ... | Determines the targetPath by removing <level>s from path.
Looks up store[keyName:keyTargetInstancePath] for all
keyNames and checks the dict if keyValue (element.value) is already
present (duplicate error). If not it adds the element.value as key
and element.path as value. | 62598fd6ad47b63b2c5a7d5b |
class AnalysisCostBreakdown(Resource): <NEW_LINE> <INDENT> storage = FloatField(read_only=True) <NEW_LINE> computation = FloatField(read_only=True) <NEW_LINE> data_transfer_in = FloatField(read_only=True) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return ( f'<AnalysisCostBreakdown: storage={self.storage}, ' f'co... | AnalysisCostBreakdown resource contains price breakdown by storage and
computation. | 62598fd6fbf16365ca7945c8 |
class Quintiles(Aggregation): <NEW_LINE> <INDENT> def get_cache_key(self): <NEW_LINE> <INDENT> return 'Quintiles' <NEW_LINE> <DEDENT> def run(self, column): <NEW_LINE> <INDENT> percentiles = column.aggregate(Percentiles()) <NEW_LINE> return Quantiles([percentiles[i] for i in range(0, 101, 20)]) | The quintiles of a column based on the 20th, 40th, 60th and 80th
percentiles.
"Zeroth" (min value) and "Fifth" (max value) quintiles are included for
reference and intuitive indexing.
See :class:`Percentiles` for implementation details.
This aggregation can not be applied to a :class:`.TableSet`. | 62598fd6956e5f7376df5902 |
class ProfileFeedItemSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model=models.ProfileFeedItem <NEW_LINE> fields=('id','user_profile','status_text','created_on') <NEW_LINE> extra_kwargs={'user_profile':{'read_only':True}} | serializer for profile feed | 62598fd626238365f5fad06e |
class Command: <NEW_LINE> <INDENT> def __init__(self, state, bool_func, effect, name='untitled'): <NEW_LINE> <INDENT> self.state = state <NEW_LINE> self.bool_func = bool_func <NEW_LINE> self.effect = effect <NEW_LINE> self.name = name <NEW_LINE> <DEDENT> def check_command(self, test): <NEW_LINE> <INDENT> if self.bool_f... | Binds an evaluation callback to an effect callback.
:param state: The state using this Command
:type state: class State
:param bool_func: A callback which returns True if the effect should be triggered
:type bool_func: Function
:param effect: A callback called when command should be executed
:type effect: Function
:pa... | 62598fd6283ffb24f3cf3d8b |
class FailoverConditionSettings(AWSProperty): <NEW_LINE> <INDENT> props: PropsDictType = { "AudioSilenceSettings": (AudioSilenceFailoverSettings, False), "InputLossSettings": (InputLossFailoverSettings, False), "VideoBlackSettings": (VideoBlackFailoverSettings, False), } | `FailoverConditionSettings <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-failoverconditionsettings.html>`__ | 62598fd6656771135c489b7c |
class OldFunctions: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def compute_turns_to_distance(EL:object, areas:list, desired_distance:float, minus_entrance:bool=True) -> dict: <NEW_LINE> <INDENT> area_query = [f"area == '{area}'" for area in areas] <NEW_LINE> area_query = " or ".join(area_query) <NEW_LINE> df = EL.get... | Groups together older methods | 62598fd6dc8b845886d53ac8 |
class Queue(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.vals = [] <NEW_LINE> <DEDENT> def insert(self, e): <NEW_LINE> <INDENT> self.vals.append(e) <NEW_LINE> <DEDENT> def remove(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return self.vals.pop(0) <NEW_LINE> <DEDENT> except: <NEW_LIN... | A Queue is a list of elements the follows the FIFO method of removing
elements | 62598fd6099cdd3c63675664 |
class Grp50No120b(base_tests.SimpleDataPlane): <NEW_LINE> <INDENT> def runTest(self): <NEW_LINE> <INDENT> logging.info("Running IcmpType test") <NEW_LINE> of_ports = config["port_map"].keys() <NEW_LINE> of_ports.sort() <NEW_LINE> self.assertTrue(len(of_ports) > 1, "Not enough ports for test") <NEW_LINE> rc = delete_all... | Verify match on Single header field --Match on Tcp Source Port/IcmpType | 62598fd6ec188e330fdf8da2 |
class LazySparseInputReader(_LazyInputReaderBase): <NEW_LINE> <INDENT> def __init__(self, indices, values, shape, node, input_alias=None, dynamic_axis=''): <NEW_LINE> <INDENT> super(LazySparseInputReader, self).__init__(node, input_alias, dynamic_axis) <NEW_LINE> if not indices or not values or not shape: <NEW_LINE> <I... | Lazy reader that takes an NumPy array and serializes it to disk only when
the complete graph is specified. This is necessary in case of multiple
inputs, because they have to reside in the same file.
Note:
All readers of this type need to have the exact same number of samples,
as they will be aligned by the fir... | 62598fd626238365f5fad070 |
class SSGRLClassifier(Model): <NEW_LINE> <INDENT> def __init__(self, backbone, coocurence_matrix, class_embeddings, d1=1024, d2=1024, time_steps=3, logit_fts=2048, use_si=True): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.num_classes = coocurence_matrix.shape[0] <NEW_LINE> if backbone == "resnext101": <NEW_L... | Implementation of the Semantic-Specific Graph Representation Learning framework from :
Tianshui Chen, Muxin Xu, Xiaolu Hui, Hefeng Wu, and Liang Lin. Learning semantic-specific graphrepresentation for multi-label image recognition
(http://openaccess.thecvf.com/content_ICCV_2019/papers/Chen_Learning_Semantic-Specific_Gr... | 62598fd6ad47b63b2c5a7d5e |
class LVQT(_LVQT): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(LVQT, self).__init__(**kwargs) <NEW_LINE> self.l2_pool = torch.nn.LPPool1d(norm_type=2, kernel_size=2, stride=2) <NEW_LINE> <DEDENT> def forward(self, audio): <NEW_LINE> <INDENT> real_feats = super(type(self).__bases__[0], se... | Implements an extension of the real-only LVQT variant. In this version, the imaginary
weights of the transform are inferred from the real weights by using the Hilbert transform. | 62598fd650812a4eaa620e6a |
class Account(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.statement = None <NEW_LINE> self.routing_number = '' <NEW_LINE> self.branch_id = '' <NEW_LINE> self.account_type = '' <NEW_LINE> self.institution = None <NEW_LINE> self.type = AccountType.unknown <NEW_LINE> self.desc = None <NEW_LIN... | An OFX account object. | 62598fd6adb09d7d5dc0aa88 |
class TournamentListView(SingleTableMixin, TemplateView): <NEW_LINE> <INDENT> table_class = TournamentTable <NEW_LINE> table_pagination = False <NEW_LINE> template_name = 'UGD/tournament_list.html' <NEW_LINE> def get_table_data(self): <NEW_LINE> <INDENT> return Tournament.objects.all().order_by('-date_begin') | Турніри | 62598fd6c4546d3d9def750a |
class TestNthOfTypeQuirks(TestNthOfType): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.purge() <NEW_LINE> self.quirks = True | Test `nth` of type selectors with quirks. | 62598fd6099cdd3c63675666 |
class MongodbConnParams(BaseHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> version = self.get_argument("ver", "3.4.0") <NEW_LINE> self.write(db_pymongo.mongodb_conn_by_mongoclient_params(version)) | :ver: 作为参数传入,区分版本号
:return: | 62598fd6ad47b63b2c5a7d61 |
class Command(metaclass=ABCMeta): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def execute(self) -> None: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def unexecute(self) -> None: <NEW_LINE> <INDENT> pass | Базовый класс для всех команд | 62598fd626238365f5fad074 |
class Lock: <NEW_LINE> <INDENT> def __init__(self, row): <NEW_LINE> <INDENT> self.locker = Doc.User(row.id, row.name, row.fullname) <NEW_LINE> self.locked = row.dt_out <NEW_LINE> if isinstance(self.locked, datetime.datetime): <NEW_LINE> <INDENT> self.locked = self.locked.replace(microsecond=0) <NEW_LINE> <DEDENT> <DEDE... | Who has the document checked out, beginning when | 62598fd6dc8b845886d53ace |
class TraitWXFont(TraitHandler): <NEW_LINE> <INDENT> def validate(self, object, name, value): <NEW_LINE> <INDENT> if value is None: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> try: <NEW_LINE> <INDENT> return create_traitsfont(value) <NEW_LINE> <DEDENT> except: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> raise ... | Ensures that values assigned to a trait attribute are valid font
descriptor strings; the value actually assigned is the corresponding
TraitsFont. | 62598fd6a219f33f346c6d18 |
class InvalidDateOffset(HL7apyException): <NEW_LINE> <INDENT> def __init__(self, offset): <NEW_LINE> <INDENT> self.offset = offset <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return 'Invalid date offset: {0}'.format(self.offset) | Raised when the offset for a :class:`TM` or :class:`hl7apy.base_datatypes.DTM` is not valid
>>> from hl7apy.v2_5 import DTM
>>> DTM(value='20131010', format="%Y%m%d", offset='+1300')
Traceback (most recent call last):
...
InvalidDateOffset: Invalid date offset: +1300 | 62598fd6656771135c489b84 |
class EvalPoint(object): <NEW_LINE> <INDENT> def __init__(self, field, n, use_omega_powers=False): <NEW_LINE> <INDENT> self.use_omega_powers = use_omega_powers <NEW_LINE> self.field = field <NEW_LINE> self.n = n <NEW_LINE> order = n <NEW_LINE> if use_omega_powers: <NEW_LINE> <INDENT> self.order = ( order if (order & (o... | Helper to generate evaluation points for polynomials between n parties
If FFT is being used:
omega is a root of unity s.t. order(omega) = (smallest power of 2 >= n)
i'th point (zero-indexed) = omega^(i)
Without FFT:
i'th point (zero-indexed) = i + 1 | 62598fd6283ffb24f3cf3d93 |
class ImportSource(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'source_image': {'required': True}, } <NEW_LINE> _attribute_map = { 'resource_id': {'key': 'resourceId', 'type': 'str'}, 'registry_uri': {'key': 'registryUri', 'type': 'str'}, 'credentials': {'key': 'credentials', 'type': 'ImportSourceC... | ImportSource.
All required parameters must be populated in order to send to Azure.
:ivar resource_id: The resource identifier of the source Azure Container Registry.
:vartype resource_id: str
:ivar registry_uri: The address of the source registry (e.g. 'mcr.microsoft.com').
:vartype registry_uri: str
:ivar credential... | 62598fd6099cdd3c63675668 |
class PointsHelper(object, metaclass=Singleton): <NEW_LINE> <INDENT> points = [] <NEW_LINE> def set(self, points: List[Point]) -> NoReturn: <NEW_LINE> <INDENT> self.points = points <NEW_LINE> <DEDENT> def get_point_by_id(self, asset_id: int): <NEW_LINE> <INDENT> result = None <NEW_LINE> if self.points: <NEW_LINE> <INDE... | Служит для хранения последних полученных курсов | 62598fd6d8ef3951e32c80e5 |
class DiscoverGeographicalCoverage(object): <NEW_LINE> <INDENT> implements(IDiscoverGeographicalCoverage) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self._key = '' <NEW_LINE> self._alchemy = None <NEW_LINE> <DEDENT> @property <NEW_LINE> def key(self): <NEW_LINE> <INDENT> return self._key <NEW_LINE> <DEDENT> @pr... | Discover geotags
| 62598fd650812a4eaa620e6d |
class ScalarField: <NEW_LINE> <INDENT> def __init__(self, values, dx, dy): <NEW_LINE> <INDENT> self.values = values <NEW_LINE> self.dx = dx <NEW_LINE> self.dy = dy <NEW_LINE> self.ddx = None <NEW_LINE> self.ddy = None <NEW_LINE> self.laplacian = None <NEW_LINE> <DEDENT> def get_ddx(self): <NEW_LINE> <INDENT> if self.dd... | Given a N dimensional numpy array, here's a class that will
ideally give us everything we could ever want. For derivatives.
DIMENSIONS: could be (time, plvl, lat, lon), (plvl, lat, lon), OR
(lat, lon). Who knows. | 62598fd63617ad0b5ee0665c |
class Flyable(): <NEW_LINE> <INDENT> pass | docstring for Flyable | 62598fd6c4546d3d9def750d |
class TestProductsApps(TestCase): <NEW_LINE> <INDENT> def test_apps(self): <NEW_LINE> <INDENT> self.assertEqual(ProductsConfig.name, 'products') <NEW_LINE> self.assertEqual(apps.get_app_config('products').name, 'products') | Testing the apps.py file | 62598fd68a349b6b43686755 |
@admin.register(models.CandidateContest) <NEW_LINE> class CandidateContestAdmin(base.ModelAdmin): <NEW_LINE> <INDENT> readonly_fields = ( 'id', 'created_at', 'updated_at', ) <NEW_LINE> raw_id_fields = ('division', 'runoff_for_contest', ) <NEW_LINE> fields = ( 'name', 'election', 'party', 'previous_term_unexpired', 'num... | Custom administrative panel for the CandidateContest model. | 62598fd6091ae35668705131 |
class FunctionAPI(ModelView): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> if 'q' not in request.args or not request.args.get('q'): <NEW_LINE> <INDENT> return dict(message='Empty query parameter'), 400 <NEW_LINE> <DEDENT> try: <NEW_LINE> <INDENT> data = json.loads(str(request.args.get('q'))) or {} <NEW_LINE> ... | Provides method-based dispatching for :http:method:`get` requests which
wish to apply SQL functions to all instances of a model.
.. versionadded:: 0.4 | 62598fd6956e5f7376df5908 |
class Grid(NanonisFile): <NEW_LINE> <INDENT> def __init__(self, fname): <NEW_LINE> <INDENT> _is_valid_file(fname, ext='3ds') <NEW_LINE> super(Grid,self).__init__(fname) <NEW_LINE> self.header = _parse_3ds_header(self.header_raw) <NEW_LINE> self.signals = self._load_data() <NEW_LINE> self.signals['sweep_signal'] = self.... | Nanonis grid file class.
Contains data loading method specific to Nanonis grid file. Nanonis
3ds files contain a header terminated by '
:HEADER_END:
'
line, after which big endian encoded binary data starts. A grid is
always recorded in an 'up' direction, and data is recorded
sequentially sta... | 62598fd6377c676e912f7005 |
class TestDistCTR(TestFleetBase): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> TestFleetBase.__init__(self, pservers=2, trainers=2) <NEW_LINE> self.single_cpu_data = [ 2.6925561, 2.692213, 2.4876955, 1.225985, 2.522475 ] <NEW_LINE> self._model_file = 'dist_fleet_ctr.py' <NEW_LINE> <DEDENT> def check_data... | Test dist save_persitable cases. | 62598fd6ad47b63b2c5a7d68 |
class PatternLookAhead(CompositePattern): <NEW_LINE> <INDENT> precedence = 5 <NEW_LINE> def __init__(self, pattern): <NEW_LINE> <INDENT> CompositePattern.__init__(self) <NEW_LINE> P.isValidValue(pattern) <NEW_LINE> self.patterns.append(P.asPattern(pattern)) <NEW_LINE> <DEDENT> @ConfigBackCaptureString4match <NEW_LINE> ... | Check whether the pattern matches the string that follows without consuming the
string | 62598fd697e22403b383b421 |
class ChoiceMatcher(CountMatcher, CompoundMatcher): <NEW_LINE> <INDENT> def __init__(self, comment=None, count=None): <NEW_LINE> <INDENT> super(ChoiceMatcher, self).__init__(comment, count) <NEW_LINE> <DEDENT> def validate(self, parents, rules_lookup, classes_lookup): <NEW_LINE> <INDENT> CompoundMatcher.validate(self, ... | Represent a list of alternative matchers.
Defined in
5.3.5. The choice Element | 62598fd6656771135c489b8a |
class PatchParams: <NEW_LINE> <INDENT> def __init__(self, patch_alias=None, select_all_from=False, orig_alias=None): <NEW_LINE> <INDENT> self.patch_alias = patch_alias <NEW_LINE> self.select_all_from = select_all_from <NEW_LINE> self.orig_alias = orig_alias or patch_alias | Parameters for controlling patch behavior | 62598fd6adb09d7d5dc0aa92 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.