code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class Actor(nn.Module): <NEW_LINE> <INDENT> def __init__(self, state_dim, action_dim, max_action): <NEW_LINE> <INDENT> super(Actor, self).__init__() <NEW_LINE> self.conv1 = nn.Conv3d(in_channels=1, out_channels=16, kernel_size=3) <NEW_LINE> self.bn1 = nn.BatchNorm3d(16) <NEW_LINE> self.conv2 = nn.Conv3d(in_channels=16,...
WARNING: the adaptiveMaxPool was added but its performance was not evaluated
62598ee8d486a94d0ba2a6aa
class TestApp: <NEW_LINE> <INDENT> def setup(self): <NEW_LINE> <INDENT> with app.app_context(): <NEW_LINE> <INDENT> db.create_all() <NEW_LINE> <DEDENT> self.client = app.test_client() <NEW_LINE> self.todo = {'name': 'Buy milk for kids'} <NEW_LINE> <DEDENT> def test_todo_creation(self): <NEW_LINE> <INDENT> with app.test...
This class represents the todo test case
62598ee8aad79263cf42cee6
class TableForm(Form, TableMixin): <NEW_LINE> <INDENT> template = "tw.forms.templates.table_form"
A form that renders it's fields in a table
62598ee8aad79263cf42cee7
class RevokeResource(Endpoint): <NEW_LINE> <INDENT> ENDPOINTS = [(Verbs.PUT, 'resources/{resourceUUID}/revoke')] <NEW_LINE> ALL_PARAMS = {'resourceUUID'} <NEW_LINE> REQUIRED_PARAMS = {'resourceUUID'} <NEW_LINE> OPTIONAL_PARAMS = set() <NEW_LINE> PARAMS_TYPES = {'resourceUUID': str} <NEW_LINE> ALL_DATA = {'exclude', 'pu...
FCO REST API revokeResource endpoint. This function will revoke the publication of an image/template to a Customer or Billing Entity. Parameters (type name (required): description): str resourceUUID (T): The UUID of the resource to revoke Data (type name (required): description): bool exclude (F): ...
62598ee8d6c5a102081e080d
class Parser(object): <NEW_LINE> <INDENT> default = None <NEW_LINE> items = () <NEW_LINE> def parse(self, text, pos): <NEW_LINE> <INDENT> return self.pattern.search(text, pos) <NEW_LINE> <DEDENT> def token(self, matchObj): <NEW_LINE> <INDENT> tokenClass = self.index[matchObj.lastindex] <NEW_LINE> return tokenClass(matc...
Abstract base class for Parsers. When creating Parser subclasses, you should set the 'items' attribute to a tuple of Token subclasses. Additionally, you may implement the updateState() method which is called by the default implementation of updateState() in Token.
62598ee87d847024c075aaaa
class IscDhcpLeases(object): <NEW_LINE> <INDENT> regex_leaseblock = re.compile(r"lease (?P<ip>\d+\.\d+\.\d+\.\d+) {(?P<config>[\s\S]+?)\n}") <NEW_LINE> regex_leaseblock6 = re.compile( r"ia-(?P<type>ta|na|pd) \"(?P<id>[^\"\\]*(?:\\.[^\"\\]*)*)\" {(?P<config>[\s\S]+?)\n}") <NEW_LINE> regex_iaaddr = re.compile(r"ia(addr|p...
Class to parse isc-dhcp-server lease files into lease objects
62598ee81f5feb6acb16132e
class QueryActivityAntiRushRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.AccountType = None <NEW_LINE> self.Uid = None <NEW_LINE> self.UserIp = None <NEW_LINE> self.PostTime = None <NEW_LINE> self.AppIdU = None <NEW_LINE> self.NickName = None <NEW_LINE> self.PhoneNumber = None...
QueryActivityAntiRush请求参数结构体
62598ee8a8370b77170eeac0
class DownloadBinary(Download): <NEW_LINE> <INDENT> __slots__ = ("uid", "data") <NEW_LINE> def __init__(self, data: Anod): <NEW_LINE> <INDENT> data_uid = data.uid.split(".") <NEW_LINE> data_uid[-1] = "download_bin" <NEW_LINE> uid = ".".join(data_uid) <NEW_LINE> super().__init__(uid=uid, data=data) <NEW_LINE> <DEDENT> d...
DownloadBinary Action. Download a binary package from the store.
62598ee830bbd72246468310
class Issue(Document): <NEW_LINE> <INDENT> paper = LinkDescriptor('paper', fetch_paper) <NEW_LINE> author = LinkDescriptor('author', fetch_person) <NEW_LINE> _attrHandler = dict( votes=SaveAttrList(IssueVote, insertNew=False), )
interface for a question raised about a paper
62598ee863b5f9789fe8383a
class GroupManagementMixin: <NEW_LINE> <INDENT> security = ClassSecurityInfo() <NEW_LINE> security.declarePrivate('addGroup') <NEW_LINE> def addGroup(self, id, **kw): <NEW_LINE> <INDENT> self.acl_users.manage_addGroup(id) <NEW_LINE> <DEDENT> security.declarePrivate('addPrincipalToGroup') <NEW_LINE> def addPrincipalToGr...
Implement Products.PlonePAS.interfaces.group.IGroupManagement
62598ee801c39578d7f11486
class Dummy(cache_model.CacheModel): <NEW_LINE> <INDENT> boolean_field = models.BooleanField(default=False) <NEW_LINE> integer_field = models.IntegerField(default=0) <NEW_LINE> text_field = models.CharField(max_length=255, null=True) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return "Dummy object"
Dummy model used for tests
62598ee8e64d504609df872d
class TargetSelectionNotImplemented(TargetSelectionError): <NEW_LINE> <INDENT> def __init__(self, message=None): <NEW_LINE> <INDENT> message = 'This feature is not implemented yet.' if not message else message <NEW_LINE> super(TargetSelectionNotImplemented, self).__init__(message)
A custom exception for not yet implemented features.
62598ee8baa26c4b54d4d9ab
class TestHolidaysWithoutJoursOuvrables(HolidaysComputeCommon): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(TestHolidaysWithoutJoursOuvrables, self).setUp() <NEW_LINE> for day in range(5): <NEW_LINE> <INDENT> self.calendar_attendance_model.create( { 'name': 'Attendance', 'dayofweek': str(day), 'hour_...
Test that leaves computation without the option still works
62598ee82ae34c7f260a97c4
class TrackViewSet( mixins.ListModelMixin, mixins.RetrieveModelMixin, mixins.DestroyModelMixin, viewsets.GenericViewSet): <NEW_LINE> <INDENT> queryset = Track.objects.all() <NEW_LINE> serializer_class = TrackSerializer <NEW_LINE> renderer_classes = (JSONRenderer, BrowsableAPIRenderer, SVGRenderer, )
API endpoint that allows tracks to be viewed or removed
62598ee856ac1b37e63008ca
class FilterModule(object): <NEW_LINE> <INDENT> def filters(self): <NEW_LINE> <INDENT> return { 'interface_split': interface_split, 'interface_range': interface_range, 'vlan_compress': vlan_compress, 'vlan_expand': vlan_expand }
Network interface filter
62598ee83c8af77a43b672a2
class flush_result: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRUCT, 'ouch1', (UnknownWriter, UnknownWriter.thrift_spec), None, ), (2, TType.STRUCT, 'ouch2', (MutationsRejectedException, MutationsRejectedException.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, ouch1=None, ouch2=None,): <NEW_LINE> <IN...
Attributes: - ouch1 - ouch2
62598ee821bff66bcd721330
class InvalidUserApiKey(ApiRequestError): <NEW_LINE> <INDENT> pass
6 - Raised when a given API for certain user is incorrect
62598ee88da39b475be01889
class getGroups_result(object): <NEW_LINE> <INDENT> def __init__(self, success=None, e=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> self.e = e <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and ...
Attributes: - success - e
62598ee83cc13d1c6d463e4c
class Produit(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=200) <NEW_LINE> url_name = models.SlugField(max_length=20) <NEW_LINE> description = models.TextField( help_text="Peut contenir du HTML pour la mise en forme. Ne sera pas vérifié lors de l'affichage (mark_safe)" ) <NEW_LINE> def __unicod...
Représente un type de produit
62598ee86fb2d068a7693193
class Config: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.input_image_h = 384 <NEW_LINE> self.input_image_w = 960 <NEW_LINE> self.input_image_c = 3 <NEW_LINE> if not os.path.exists('weights'): <NEW_LINE> <INDENT> os.makedirs('weights') <NEW_LINE> <DEDENT> if not os.pat...
Configuration file
62598ee87047854f4633dab1
class HomeSpec(unittest.TestCase, test.CustomAssertions): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.home = home.HomeHandler() <NEW_LINE> <DEDENT> def test_HomeHandler_instance(self): <NEW_LINE> <INDENT> self.assertIsInstance(self.home, home.HomeHandler) <NEW_LINE> <DEDENT> def test_template_existenc...
Test for the module that show a page with the default data.
62598ee845492302aabfab8b
class QueryRefundRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.UserId = None <NEW_LINE> self.RefundId = None <NEW_LINE> self.MidasAppId = None <NEW_LINE> self.MidasSecretId = None <NEW_LINE> self.MidasSignature = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LI...
QueryRefund请求参数结构体
62598ee867a9b606de5446ac
class AT_067: <NEW_LINE> <INDENT> events = Attack(SELF).on(CLEAVE)
Magnataur Alpha
62598ee82c8b7c6e89bd1e9e
class InvalidMultipleOptionError (InvalidOptionError): <NEW_LINE> <INDENT> pass
An option appears multiple times in a response or request when it must only appear once.
62598ee8aad79263cf42cee8
@dataclass <NEW_LINE> class BrokerTransaction: <NEW_LINE> <INDENT> date: datetime.date <NEW_LINE> action: ActionType <NEW_LINE> symbol: str | None <NEW_LINE> description: str <NEW_LINE> quantity: Decimal | None <NEW_LINE> price: Decimal | None <NEW_LINE> fees: Decimal <NEW_LINE> amount: Decimal | None <NEW_LINE> curren...
Broken transaction data.
62598ee8f9cc0f698b1c463d
class ExpressRouteConnectionList(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[ExpressRouteConnection]'}, } <NEW_LINE> def __init__( self, *, value: Optional[List["ExpressRouteConnection"]] = None, **kwargs ): <NEW_LINE> <INDENT> super(ExpressRouteConnectionList...
ExpressRouteConnection list. :param value: The list of ExpressRoute connections. :type value: list[~azure.mgmt.network.v2019_02_01.models.ExpressRouteConnection]
62598ee86aa9bd52df0d358f
class Colors(Enum): <NEW_LINE> <INDENT> RED = Color(255, 0, 0) <NEW_LINE> GREEN = Color(0, 255, 0) <NEW_LINE> BLUE = Color(0, 0, 255) <NEW_LINE> WHITE = Color(255, 255, 255) <NEW_LINE> BLACK = Color(0, 0, 0) <NEW_LINE> YELLOW = Color(255, 255, 0) <NEW_LINE> GREY = Color(200, 200, 200) <NEW_LINE> ORANGE = Color(200, 100...
Class storing colors.
62598ee87b25080760ed5b79
class GenericResource(ModelResource): <NEW_LINE> <INDENT> def __init__(self, resources, *args, **kwargs): <NEW_LINE> <INDENT> self.resource_mapping = dict((r._meta.resource_name, r) for r in resources) <NEW_LINE> return super(GenericResource, self).__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def get_via_uri(self, uri...
Provides a stand-in resource for GFK relations.
62598ee8435de62698e9a4b5
class CacheTest(TestCase): <NEW_LINE> <INDENT> def testCache(self): <NEW_LINE> <INDENT> c = ThumbnailCache(size=32) <NEW_LINE> for i in xrange(0, 64): <NEW_LINE> <INDENT> c[i] = i <NEW_LINE> <DEDENT> assert len(c.cache) == 32 <NEW_LINE> assert not 31 in c <NEW_LINE> assert 32 in c <NEW_LINE> c[32] <NEW_LINE> c[65] = 65...
Basic test to create the proper creation of the Pitivi object
62598ee863b5f9789fe8383c
class PackIdError(Exception): <NEW_LINE> <INDENT> pass
Raised when the BaseFileIn.pack_and_write() method recieves an unexpected packing ID string.
62598ee899cbb53fe682f590
class RCodeSnippet(CodeSnippet): <NEW_LINE> <INDENT> snippet_language = "R" <NEW_LINE> def is_function(self): <NEW_LINE> <INDENT> return re.match(r"\A.+? <- function\(.*?\)", self.code) is not None <NEW_LINE> <DEDENT> def is_import(self): <NEW_LINE> <INDENT> return re.match(r"\A(library|require)\(.*?\)", self.code) is ...
Code snippet for the R language
62598ee823849d37ff84f796
class RecipeNode(object): <NEW_LINE> <INDENT> def __init__(self, job_name, job_type_name, job_type_version): <NEW_LINE> <INDENT> self.node_name = job_name <NEW_LINE> self.job_type_name = job_type_name <NEW_LINE> self.job_type_version = job_type_version <NEW_LINE> self.parents = [] <NEW_LINE> self.children = [] <NEW_LIN...
Represents a node in a recipe
62598ee8d58c6744b42db625
class TestNSGroupExpressionList(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 testNSGroupExpressionList(self): <NEW_LINE> <INDENT> pass
NSGroupExpressionList unit test stubs
62598ee82ae34c7f260a97c6
class BunchSequences(MiniBatches): <NEW_LINE> <INDENT> def __init__(self, dataset, batch_size=20, fragment_length=5): <NEW_LINE> <INDENT> super(BunchSequences, self).__init__(dataset, batch_size=batch_size) <NEW_LINE> self.fragment_length = fragment_length <NEW_LINE> if self.fragment_length < 1: <NEW_LINE> <INDENT> rai...
Arrange sequences in bunch mode. See http://mi.eng.cam.ac.uk/~xc257/papers/RNNLMTrain_Interspeech2014.pdf .
62598ee8442bda511e95ab40
class Predicate(object): <NEW_LINE> <INDENT> def __init__(self, parts): <NEW_LINE> <INDENT> self.parts = parts <NEW_LINE> self.context = reduce( _descendant, (p.predicate_context() for p in parts)) <NEW_LINE> assert self.context, "Incompatible predicate parts" <NEW_LINE> self.predkey = None <NEW_LINE> <DEDENT> def __st...
Superclass for all computed predicates. Leaf predicates can have other types, such as `Setting`. :param parts: Tuple of components in the predicate expression.
62598ee8bd1bec0571e1443a
class Normalize(object): <NEW_LINE> <INDENT> def __init__(self, args): <NEW_LINE> <INDENT> self.nr_mean = args.nr_mean <NEW_LINE> self.nr_std = args.nr_std <NEW_LINE> self.ni_mean = args.ni_mean <NEW_LINE> self.ni_std = args.ni_std <NEW_LINE> <DEDENT> def __call__(self, sample): <NEW_LINE> <INDENT> new_sample = sample ...
Normalize Tensor to given mean and std
62598ee84428ac0f6e656c31
class EnterprisePortalCourseStructure(EnterprisePortalCourse): <NEW_LINE> <INDENT> def open_course_on_edx(self): <NEW_LINE> <INDENT> self.switch_to_new_iframe() <NEW_LINE> course_link_css = '.BodyText>a' <NEW_LINE> self.wait_for_element_visibility(course_link_css, 'wait for link') <NEW_LINE> self.q(css=course_link_css)...
This class handles the Enterprise portal course structure objects
62598ee80a50d4780f703a8b
class Solution(object): <NEW_LINE> <INDENT> def maxDepth(self, root): <NEW_LINE> <INDENT> count = 0 <NEW_LINE> if not root: <NEW_LINE> <INDENT> return count <NEW_LINE> <DEDENT> que, aux = [root], [] <NEW_LINE> while que: <NEW_LINE> <INDENT> node = que.pop() <NEW_LINE> if node.left: <NEW_LINE> <INDENT> aux.append(node.l...
输入一棵二叉树的根节点,求该树的深度。从根节点到叶节点依次经过的节点 (含根、叶节点)形成树的一条路径,最长路径的长度为树的深度。 给定二叉树 [3,9,20,null,null,15,7], 3 / 9 20 / 15 7 返回它的最大深度 3 。节点总数 <= 10000 注意:本题与主站 104 题相同:https://leetcode-cn.com/problems/maximum-depth-of-binary-tree/ 链接:https://leetcode-cn.com/problems/er-cha-shu-de-shen-du-lcof
62598ee88da39b475be0188b
class PGSRubric(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=20, verbose_name='Название') <NEW_LINE> description = models.TextField(verbose_name='Описание') <NEW_LINE> tags = ArrayField(base_field=models.CharField(max_length=20), verbose_name='Теги')
ArrayField Содержит список из элементов одного типа - size - размер списка, по умол.: None - не ограничен
62598ee84a966d76dd5ed5c3
class Production_config(Baseconfig): <NEW_LINE> <INDENT> DEBUG = False <NEW_LINE> SQLALCHEMY_ECHO = False
production class
62598ee892d797404e387eea
class VC4_Ofast_extra2_gcc(VC): <NEW_LINE> <INDENT> def __init__(self, model, dx, dt=None, align=None): <NEW_LINE> <INDENT> super(VC4_Ofast_extra2_gcc, self).__init__('libvc4_Ofast_extra2_gcc', model, dx, dt, align)
VC4 with -funsafe-loop-optimizations and -floop-block.
62598ee845492302aabfab8d
class Worker(QRunnable): <NEW_LINE> <INDENT> def __init__(self, fn, *args, **kwargs): <NEW_LINE> <INDENT> super(Worker, self).__init__() <NEW_LINE> self.fn = fn <NEW_LINE> self.args = args <NEW_LINE> self.kwargs = kwargs <NEW_LINE> <DEDENT> @pyqtSlot() <NEW_LINE> def run(self): <NEW_LINE> <INDENT> self.fn(*self.args, *...
Worker thread Inherits from QRunnable to handler worker thread setup, signals and wrap-up. :param callback: The function callback to run on this worker thread. Supplied args and kwargs will be passed through to the runner. :type callback: function :param args: Arguments to pass to the callback funct...
62598ee866673b3332c2ea87
class AnnualDemandSavingsCost(BSElement): <NEW_LINE> <INDENT> element_type = "xs:integer"
Cost savings per year due to reduction in peak electricity demand. ($/year)
62598ee832920d7e50bc470b
class UserGradesList(APIView): <NEW_LINE> <INDENT> authentication_classes = (TokenAuthentication,) <NEW_LINE> permission_classes = (permissions.IsAuthenticated,) <NEW_LINE> def get(self, request): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> comments = Comment.objects.filter(owner=request.user) <NEW_LINE> serializer = ...
Sends the User's Result for the indicated week
62598ee867a9b606de5446ae
class ReplaceUnknownsModel(Reprable): <NEW_LINE> <INDENT> def __init__(self, variable, model): <NEW_LINE> <INDENT> assert model.domain.class_var == variable <NEW_LINE> self.variable = variable <NEW_LINE> self.model = model <NEW_LINE> <DEDENT> def __call__(self, data): <NEW_LINE> <INDENT> if isinstance(data, Orange.data...
Replace unknown values with predicted values using a `Orange.base.Model` Parameters ---------- variable : Orange.data.Variable The target variable for the imputation. model : Orange.base.Model A fitted model predicting `variable`.
62598ee863d6d428bbee0ead
@adapter(ITask, Interface) <NEW_LINE> class TaskPostFactoryMenu(FilteredPostFactoryMenuWithWebactions): <NEW_LINE> <INDENT> def is_filtered(self, factory): <NEW_LINE> <INDENT> return factory['extra']['id'] == u'ftw-mail-mail' <NEW_LINE> <DEDENT> def __call__(self, factories): <NEW_LINE> <INDENT> factories = super(TaskP...
Change the name of a task that appears in the add menu of task to subtask.
62598ee8627d3e7fe0e05569
class AssistantActivity(Model): <NEW_LINE> <INDENT> __core__ = False <NEW_LINE> user = FlexibleForeignKey(settings.AUTH_USER_MODEL, null=False) <NEW_LINE> guide_id = BoundedPositiveIntegerField() <NEW_LINE> viewed_ts = models.DateTimeField(null=True) <NEW_LINE> dismissed_ts = models.DateTimeField(null=True) <NEW_LINE> ...
Records user interactions with the assistant guides.
62598ee838b623060ffa777a
class LookupTable: <NEW_LINE> <INDENT> def __init__(self, mapping, default=None): <NEW_LINE> <INDENT> mapping = ((int(item[0]), item[1]) for item in mapping) <NEW_LINE> self.mapping = dict(mapping) <NEW_LINE> self.mapping_inv = {v: k for k, v in self.mapping.items()} <NEW_LINE> self.default = default <NEW_LINE> <DEDENT...
Basic lookup table. An integer value is mapped to an integer or display string. Parameters ---------- mapping: iterable of 2-tuples (key, value) - keys can be either floats or ints (internaly converted to int) - values are either integers or strings. default: int or str returned if val...
62598ee8f9cc0f698b1c463e
class linux_proc_maps(linux_pslist.linux_pslist): <NEW_LINE> <INDENT> def calculate(self): <NEW_LINE> <INDENT> linux_common.set_plugin_members(self) <NEW_LINE> tasks = linux_pslist.linux_pslist.calculate(self) <NEW_LINE> for task in tasks: <NEW_LINE> <INDENT> if task.mm: <NEW_LINE> <INDENT> for vma in task.get_proc_map...
Gathers process memory maps
62598ee8cb5e8a47e493b4e9
class OrderResource(ResourceWithURI): <NEW_LINE> <INDENT> body = jose.Field('body', decoder=Order.from_json) <NEW_LINE> csr_pem = jose.Field('csr_pem', omitempty=True) <NEW_LINE> authorizations = jose.Field('authorizations') <NEW_LINE> fullchain_pem = jose.Field('fullchain_pem', omitempty=True)
Order Resource. :ivar acme.messages.Order body: :ivar str csr_pem: The CSR this Order will be finalized with. :ivar list of acme.messages.AuthorizationResource authorizations: Fully-fetched AuthorizationResource objects. :ivar str fullchain_pem: The fetched contents of the certificate URL produced once the ord...
62598ee8dd821e528d6d7625
class ResultInline(admin.TabularInline): <NEW_LINE> <INDENT> model = Result <NEW_LINE> exclude = ['service', 'payload'] <NEW_LINE> def get_queryset(self, request): <NEW_LINE> <INDENT> qs = super(ResultInline, self).get_queryset(request) <NEW_LINE> return qs.filter(category=Result.HUMAN)
ResultInline.
62598ee8435de62698e9a4b6
class ProviderOverview(ProviderContext, TemplateView): <NEW_LINE> <INDENT> template_name = 'superusertools/provider_overview.html' <NEW_LINE> def post(self, request, provider_id): <NEW_LINE> <INDENT> data = request.POST <NEW_LINE> context = self.get_context_data(provider_id) <NEW_LINE> provider = context.get('provider'...
Overview of a provider page.
62598ee8cc0a2c11144796e4
class INetworkAdapterChangedEvent(IEvent): <NEW_LINE> <INDENT> __uuid__ = '08889892-1EC6-4883-801D-77F56CFD0103' <NEW_LINE> __wsmap__ = 'managed' <NEW_LINE> id = VBoxEventType.on_network_adapter_changed <NEW_LINE> @property <NEW_LINE> def network_adapter(self): <NEW_LINE> <INDENT> ret = self._get_attr("networkAdapter")...
Notification when a property of one of the virtual :py:func:`IMachine.get_network_adapter` network adapters changes. Interested callees should use INetworkAdapter methods and attributes to find out what has changed.
62598ee857b8e32f52507475
class SAWGTest(EnvExperiment): <NEW_LINE> <INDENT> def build(self): <NEW_LINE> <INDENT> print(self.__doc__) <NEW_LINE> self.setattr_device("core") <NEW_LINE> self.setattr_device("led") <NEW_LINE> self.setattr_device("ttl_sma") <NEW_LINE> self.setattr_device("sawg0") <NEW_LINE> self.setattr_device("sawg1") <NEW_LINE> <D...
test_ap02 purpose: test absolute alignment of sawg0.frequency2 sawg1.frequency2 test: make sawg0 and sawg1 phase aligned expectation: no phase offset between sawg0 and sawg1 setup: scope single run, manually trigger acquisition; 10ns/div, 100mV/div
62598ee876e4537e8c3edc9a
class HandlerToHandlerAcceptBagCreateSet(CreateViewSet): <NEW_LINE> <INDENT> queryset = CustomerBag.objects.all() <NEW_LINE> serializer_class = HandlerToHandlerAcceptSerializer <NEW_LINE> def create(self, request, *args, **kwargs): <NEW_LINE> <INDENT> self.response = {} <NEW_LINE> self.response['result'] = [] <NEW_LINE...
Description: This class is used to create a Handler-Handler view set When Handler handover the bag to another handler for accept ( Handler->Handler => accept ) Author : Sakeer P Created At: 24th January 2018
62598ee83c8af77a43b672a4
class SampleApplication(Application): <NEW_LINE> <INDENT> def __init__(self, samplekey="SM", **kwargs): <NEW_LINE> <INDENT> super(SampleApplication, self).__init__(**kwargs) <NEW_LINE> def _annotate_fn_factory(iotarget, **kwargs): <NEW_LINE> <INDENT> def _annotate_fn(df, uri, **kwargs): <NEW_LINE> <INDENT> m = iotarget...
SampleApplication class Automagically adds annotation function that annotates data frames by sample unit.
62598ee84c342835776189c4
class FilterDefaultBrowser(TestCase): <NEW_LINE> <INDENT> def load_data(self): <NEW_LINE> <INDENT> console_log( 'FilterDefaultBrowser executed', extra_filter_expression='normandy.isDefaultBrowser==true' )
Matches if Firefox is the default browser. Logs to the console.
62598ee85fdd1c0f98e5c683
class Exam03(unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUp(cls): <NEW_LINE> <INDENT> cls.names = ["Tom", "Jerry", "Mike", "Tom"] <NEW_LINE> <DEDENT> def test1(self): <NEW_LINE> <INDENT> name_set = set() <NEW_LINE> duplicated_names = set() <NEW_LINE> for name in self.names: <NEW_LINE> <INDENT...
n 명의 주어진 이름들이 있을때, 동명이인인 이름을 찾는다.
62598ee8236d856c2adc8785
class ThemeUserCount(StatsSearchMixin, models.Model): <NEW_LINE> <INDENT> addon = models.ForeignKey('addons.Addon') <NEW_LINE> count = models.PositiveIntegerField() <NEW_LINE> date = models.DateField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> db_table = 'theme_user_counts' <NEW_LINE> index_together = ('date', 'addon'...
Theme popularity (weekly average of users). This is filled in by a cron job reading the popularity from the theme (Persona).
62598ee8e5267d203ee69fe7
class KoreanWord(AsianWord): <NEW_LINE> <INDENT> language = 'Korean' <NEW_LINE> def __init__(self, string='', etymology=None, meaning=None, compute_etymology=False): <NEW_LINE> <INDENT> self.check_init_parameters(string, etymology, meaning) <NEW_LINE> self.string = _u(string) <NEW_LINE> self.db_util = DbUtil() <NEW_LIN...
This class is used to manipulate Korean words.
62598ee8d7e4931a7ef3a781
class PacketCapture(Model): <NEW_LINE> <INDENT> _validation = { 'target': {'required': True}, 'storage_location': {'required': True}, } <NEW_LINE> _attribute_map = { 'target': {'key': 'properties.target', 'type': 'str'}, 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'int'}, 'total...
Parameters that define the create packet capture operation. All required parameters must be populated in order to send to Azure. :param target: Required. The ID of the targeted resource, only VM is currently supported. :type target: str :param bytes_to_capture_per_packet: Number of bytes captured per packet, the re...
62598ee8925a0f43d25e670f
class ObjectOriented(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.edges = [] <NEW_LINE> self.nodes = [] <NEW_LINE> <DEDENT> def adjacent(self, node_1, node_2): <NEW_LINE> <INDENT> if node_1 in self.nodes: <NEW_LINE> <INDENT> if node_2 in self.nodes: <NEW_LINE> <INDENT> for i in range(len(se...
ObjectOriented defines the edges and nodes as both list
62598ee84e4d562566370afa
class MenuItem(UserTestElementMixin): <NEW_LINE> <INDENT> title = 'Untitled menu item' <NEW_LINE> url = None <NEW_LINE> add_url = None <NEW_LINE> icon = None <NEW_LINE> css_classes = None <NEW_LINE> description = None <NEW_LINE> enabled = True <NEW_LINE> template = 'wpadmin/menu/item.html' <NEW_LINE> children = None <N...
This is the base class for custom menu items. A menu item can have the following properties: ``title`` String that contains the menu item title, make sure you use the django gettext functions if your application is multilingual. Default value: 'Untitled menu item'. ``url`` String that contains the men...
62598ee83cc13d1c6d463e50
class ReplicationUserJoinedLeftRoomRestServlet(ReplicationEndpoint): <NEW_LINE> <INDENT> NAME = "membership_change" <NEW_LINE> PATH_ARGS = ("room_id", "user_id", "change") <NEW_LINE> CACHE = False <NEW_LINE> def __init__(self, hs): <NEW_LINE> <INDENT> super().__init__(hs) <NEW_LINE> self.registeration_handler = hs.get_...
Notifies that a user has joined or left the room Request format: POST /_synapse/replication/membership_change/:room_id/:user_id/:change {}
62598ee892d797404e387eeb
class PhoneNumberModule(Module): <NEW_LINE> <INDENT> run_all_pages = True <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> <DEDENT> def handle_html_data(self, data): <NEW_LINE> <INDENT> self.__search_numbers(data) <NEW_LINE> <DEDENT> def __search_numbers(self, data): <NEW_LINE> <INDENT> ...
This class will search for phone numbers
62598ee866673b3332c2ea89
class ISubscriberRemoved(Interface): <NEW_LINE> <INDENT> email = TextLine()
Interface to indicate that a user has just recently become a non-subscriber
62598ee86e29344779afed14
class LocalPythonComponent(ApplicationInterfaceComponent): <NEW_LINE> <INDENT> def __init__(self, config): <NEW_LINE> <INDENT> self.application_package = config['application_package']; <NEW_LINE> package = __import__(self.application_package, fromlist = ['thywill_interface']); <NEW_LINE> self.app_interface_module = get...
Configuration and helpers for a thywill application that runs in this Python thread.
62598ee87047854f4633dab6
class RefreshPropertiesAttribute(Attribute,_Attribute): <NEW_LINE> <INDENT> def Equals(self,value): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def GetHashCode(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def IsDefaultAttribute(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __eq__(self,*args): <NEW_LIN...
Indicates that the property grid should refresh when the associated property value changes. This class cannot be inherited. RefreshPropertiesAttribute(refresh: RefreshProperties)
62598ee87c178a314d78bb73
class AbstractLoader: <NEW_LINE> <INDENT> def __init__(self, formatter, filepath): <NEW_LINE> <INDENT> self._formatter = formatter <NEW_LINE> self._filepath = filepath <NEW_LINE> <DEDENT> def _line_iter(self): <NEW_LINE> <INDENT> with open(self._filepath, 'r') as f: <NEW_LINE> <INDENT> yield from (self._formatter.forma...
Base class to load and tokenise sentences from a dataset. Arguments: formatter {formatter.Formatter} -- Formatter implementation filepath {str} -- path to a text file to load
62598ee801c39578d7f1148b
class MutableAttrInstanceState(InstanceState): <NEW_LINE> <INDENT> @util.memoized_property <NEW_LINE> def mutable_dict(self): <NEW_LINE> <INDENT> return {} <NEW_LINE> <DEDENT> def _get_modified(self, dict_=None): <NEW_LINE> <INDENT> if self.__dict__.get('modified', False): <NEW_LINE> <INDENT> return True <NEW_LINE> <DE...
InstanceState implementation for objects that reference 'mutable' attributes. Has a more involved "cleanup" handler that checks mutable attributes for changes upon dereference, resurrecting if needed.
62598ee88e7ae83300ee7771
@Packet(type='response') <NEW_LINE> class PacketEnvironVar(NamedTuple): <NEW_LINE> <INDENT> value: Optional[str]
This packet is used to return an environment variable.
62598ee897e22403b38395d2
class ODOrder(CommonInfo): <NEW_LINE> <INDENT> name = models.CharField(max_length=30) <NEW_LINE> email = models.CharField(max_length=50) <NEW_LINE> phone = models.CharField(max_length=30) <NEW_LINE> address = models.CharField(max_length=30) <NEW_LINE> images = models.ImageField(null=True, blank=True) <NEW_LINE> def __u...
Order details contain name, phone and amount of total price order
62598ee8dd821e528d6d7626
class last(TextOp): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def op(cls,text,*args,**kwargs): <NEW_LINE> <INDENT> last = '' <NEW_LINE> for line in cls._tolist(text): <NEW_LINE> <INDENT> last = line <NEW_LINE> <DEDENT> return last
Return the last line/item from the input text Returns: StrExt, ListExt or DictExt: the last line/item from the input text Examples: >>> 'a\nb\nc' | last() 'c' >>> ['a','b','c'] | last() 'c' >>> [('a',1),('b',2),('c',3)] | last() ('c', 3) >>> [['key1','val1','help1'],['key2','val2','hel...
62598ee83317a56b869bd8d7
class JobResultFuture(Future): <NEW_LINE> <INDENT> @interruptible <NEW_LINE> def get_dict(self): <NEW_LINE> <INDENT> result_str = ffi.new("char *[1]") <NEW_LINE> RAW.result_get(self.handle, result_str) <NEW_LINE> if result_str[0] == ffi.NULL: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> return json.loads(ffi.str...
Future fulfilled with a job "result" Supports methods to return the result as either a raw :obj:`dict` or :obj:`flux.job.info.JobInfo` object.
62598ee87d847024c075aab0
class RegistrationForm(Form): <NEW_LINE> <INDENT> email = StringField('Email', validators=[ InputRequired('Email field is required') ]) <NEW_LINE> password = PasswordField('Password', validators=[ InputRequired('Password field is required'), EqualTo('password_again', message='Passwords must match') ]) <NEW_LINE> passwo...
Register a new user.
62598ee823849d37ff84f79a
class Image(collections.UserDict): <NEW_LINE> <INDENT> def __init__(self, client, id, data): <NEW_LINE> <INDENT> super(Image, self).__init__(data) <NEW_LINE> for k, v in data.items(): <NEW_LINE> <INDENT> setattr(self, k, v) <NEW_LINE> <DEDENT> self._id = id <NEW_LINE> self._client = client <NEW_LINE> assert self._id ==...
Model for an Image.
62598ee8cc0a2c11144796e6
class RecursiveReferenceError(ScriptValidationError): <NEW_LINE> <INDENT> def __init__(self, source: ParsedLine, reference: str): <NEW_LINE> <INDENT> super().__init__(line_number=source.number) <NEW_LINE> self._source = source <NEW_LINE> self._reference = reference <NEW_LINE> <DEDENT> @property <NEW_LINE> def message(s...
Raised when a value is assigned that references itself. $value name = "{{name}}"
62598ee857b8e32f52507476
class Glib(Package): <NEW_LINE> <INDENT> homepage = "https://developer.gnome.org/glib/" <NEW_LINE> url = "http://ftp.gnome.org/pub/gnome/sources/glib/2.42/glib-2.42.1.tar.xz" <NEW_LINE> version('2.42.1', '89c4119e50e767d3532158605ee9121a') <NEW_LINE> depends_on("libffi") <NEW_LINE> def install(self, spec, prefix):...
The GLib package contains a low-level libraries useful for providing data structure handling for C, portability wrappers and interfaces for such runtime functionality as an event loop, threads, dynamic loading and an object system.
62598ee8fff4ab517ebcbeba
class Solution: <NEW_LINE> <INDENT> def minPathSum(self, grid: List[List[int]]) -> int: <NEW_LINE> <INDENT> m = len(grid) <NEW_LINE> n = len(grid[0]) <NEW_LINE> matrix = [[0]*n for _ in range(m)] <NEW_LINE> matrix[0][0] = grid[0][0] <NEW_LINE> for i in range(1, n): <NEW_LINE> <INDENT> print("i", i) <NEW_LINE> matrix[0]...
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move either down or right at any point in time. Example: Input: [ [1,3,1], [1,5,1], [4,2,1] ] Output: 7 Explanation: Because the path 1→3→1→1→1...
62598ee8e64d504609df8730
class NoConvergence(MultipleSuperpositionError): <NEW_LINE> <INDENT> pass
Refinement starts to diverge
62598ee84c342835776189c6
class TaurusDbServerModel(TaurusDbBaseModel): <NEW_LINE> <INDENT> ColumnNames = "Server", "Alive", "Host" <NEW_LINE> ColumnRoles = (ElemType.Server, ElemType.ServerName, ElemType.ServerInstance, ElemType.DeviceClass, ElemType.Device, ElemType.Attribute), ElemType.Exported, ElemType.Host <NEW_LINE> def setupModelData(se...
A Qt model that structures server elements in a tree organized as: - <Server name> - <Server instance> - <Class> - <Device> - <Attribute>
62598ee8baa26c4b54d4d9b1
class MockEnvironment(Environment): <NEW_LINE> <INDENT> def __init__(self, num_rounds: int, block_size: int) -> None: <NEW_LINE> <INDENT> self.num_rounds = num_rounds <NEW_LINE> self.block_size = block_size + 1 <NEW_LINE> self.round = 0 <NEW_LINE> <DEDENT> def reset(self) -> StateT: <NEW_LINE> <INDENT> return (self.rou...
Mock a block environment
62598ee8460517430c430b6b
class Archivo: <NEW_LINE> <INDENT> def __init__(self, nombre="", tam=0, bloques=[], color="", padre="", memoria="", listSubDir=[], direccion='', iid=''): <NEW_LINE> <INDENT> self.nombre = nombre <NEW_LINE> self.tam = tam <NEW_LINE> self.bloques = bloques <NEW_LINE> self.color = color <NEW_LINE> self.padre = padre <NEW_...
Crea un archivo
62598ee8bd1bec0571e1443c
class RenameEntityProperty(ModelCommand): <NEW_LINE> <INDENT> ARGS_NO = 3 <NEW_LINE> FULLID = 0 <NEW_LINE> OLDNAME = 1 <NEW_LINE> NEWNAME = 2 <NEW_LINE> def checkArgs( self ): <NEW_LINE> <INDENT> if not ModelCommand.checkArgs(self): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> self.__theID = self.theArgs[ self....
args:
62598ee87d847024c075aab1
class PFCAirspaceDialogTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.dialog = PFCAirspaceDialog(None) <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> self.dialog = None <NEW_LINE> <DEDENT> def test_dialog_ok(self): <NEW_LINE> <INDENT> button = self.dialog.button_box....
Test dialog works.
62598ee85fcc89381b265497
class MigrationMeta(mongoengine.Document): <NEW_LINE> <INDENT> key = mongoengine.StringField() <NEW_LINE> state = mongoengine.StringField(default=Migration.STATE_NEW) <NEW_LINE> processed_at = mongoengine.DateTimeField() <NEW_LINE> @classmethod <NEW_LINE> def find_or_create_by_key(cls, migration_key): <NEW_LINE> <INDEN...
Mongo Table to keep track of the status of migrations
62598ee86e29344779afed16
class DnsPtrRecord(A10BaseClass): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.ERROR_MSG = "" <NEW_LINE> self.required = [ "ptr_name"] <NEW_LINE> self.b_key = "dns-ptr-record" <NEW_LINE> self.a10_url="/axapi/v3/gslb/zone/{name}/service/{service_port}+{service_name}/dns-ptr-record/{ptr_name...
Class Description:: Statistics for the object dns-ptr-record. Class dns-ptr-record supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this module.` :param ptr_name: {"description": "Specify Domain Name", "format": "string", "minLength": 1, "oid": "1001", "optional...
62598ee891f36d47f2230215
class Callback: <NEW_LINE> <INDENT> def on_batch_begin(self, i: int, state: DotDict) -> None: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def on_batch_end(self, i: int, state: DotDict) -> None: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def on_epoch_begin(self, epoch: int, epochs: int, state: DotDict) -> None: <NEW_...
Abstract base class used to build new callbacks.
62598ee867a9b606de5446b2
class Article(BaseModel): <NEW_LINE> <INDENT> url = TextField(unique=True) <NEW_LINE> title = TextField() <NEW_LINE> authors = ArrayField(field_class=TextField, null=True) <NEW_LINE> publisher = TextField() <NEW_LINE> date_published = DateTimeField(null=True) <NEW_LINE> keywords = ArrayField(field_class=TextField, null...
ORM model for articles table.
62598ee87c178a314d78bb75
class Contract(Instrument, ABC): <NEW_LINE> <INDENT> __type__ = None <NEW_LINE> def __init__(self, underlying: Underlying): <NEW_LINE> <INDENT> self.underlying = underlying
合约
62598ee816aa5153ce3febe2
class Frame(object): <NEW_LINE> <INDENT> def __init__(self, code_obj, global_names, local_names, prev_frame): <NEW_LINE> <INDENT> self.code_obj = code_obj <NEW_LINE> self.global_names = global_names <NEW_LINE> self.local_names = local_names <NEW_LINE> self.prev_frame = prev_frame <NEW_LINE> self.stack = [] <NEW_LINE> i...
The Frame object is a collection of attributes with no methods.
62598ee88e7ae83300ee7773
class DelayedEvent(_messages.Message): <NEW_LINE> <INDENT> cause = _messages.StringField(1) <NEW_LINE> metrics = _messages.StringField(2, repeated=True)
This event is generated whenever a resource limitation or transient error delays execution of a pipeline that was otherwise ready to run. Fields: cause: A textual description of the cause of the delay. The string may change without notice since it is often generated by another service (such as Compute Engin...
62598ee8cc0a2c11144796e7
class Brisbane(DstTzInfo): <NEW_LINE> <INDENT> zone = 'Australia/Brisbane' <NEW_LINE> _utc_transition_times = [ d(1,1,1,0,0,0), d(1916,12,31,14,1,0), d(1917,3,24,15,0,0), d(1941,12,31,16,0,0), d(1942,3,28,15,0,0), d(1942,9,26,16,0,0), d(1943,3,27,15,0,0), d(1943,10,2,16,0,0), d(1944,3,25,15,0,0), d(1971,10,30,16,0,0), ...
Australia/Brisbane timezone definition. See datetime.tzinfo for details
62598ee85fdd1c0f98e5c686
class ExplicitEnum(Enum): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def _missing_(cls, value): <NEW_LINE> <INDENT> raise ValueError( f"{value} is not a valid {cls.__name__}, please select one of {list(cls._value2member_map_.keys())}" )
Enum with more explicit error message for missing values.
62598ee807f4c71912badb39
class time_exceeded (packet_base): <NEW_LINE> <INDENT> MIN_LEN = 4 <NEW_LINE> def __init__ (self, raw=None, prev=None, **kw): <NEW_LINE> <INDENT> packet_base.__init__(self) <NEW_LINE> self.prev = prev <NEW_LINE> self.unused = 0 <NEW_LINE> if raw is not None: <NEW_LINE> <INDENT> self.parse(raw) <NEW_LINE> <DEDENT> self....
ICMP time exceeded packet struct
62598ee8d486a94d0ba2a6b2
@attr.s(auto_attribs=True) <NEW_LINE> class _Context: <NEW_LINE> <INDENT> variables: Dict[str, Union[commands.VarValue, commands.Def]] = attr.Factory(dict)
The equivalent of a stack frame for the manager
62598ee8f9cc0f698b1c4640
class SpatialRelationStatement(Statement): <NEW_LINE> <INDENT> required_tags = Statement.required_tags + [{'spatial_relation': ['object', 'area']}, 'grounding'] <NEW_LINE> optional_tags = Statement.optional_tags + [] <NEW_LINE> def __init__(self, spatial_relation, grounding, *args, **kwargs): <NEW_LINE> <INDENT> super(...
docstring for SpatialRelationStatement
62598ee87d847024c075aab2
class CmdListVolumes(CmdBase): <NEW_LINE> <INDENT> names = ['listvolumes', 'lv'] <NEW_LINE> def addopts(self, parser): <NEW_LINE> <INDENT> parser.add_option("-d", "--show-deleted", dest="show_deleted", action="store_true", default=False, help="show volumes that are being deleted") <NEW_LINE> parser.add_option("-v", "--...
listvolumes List all EBS volumes
62598ee87b25080760ed5b7f
class flow_indexer(PluginBase): <NEW_LINE> <INDENT> name = "flow_indexer" <NEW_LINE> title = "Flow Indexer" <NEW_LINE> description = "Flow Indexer stats" <NEW_LINE> cache_timeout = 60*10 <NEW_LINE> types = ['ip','ip6','cidr','cidr6'] <NEW_LINE> def setup(self): <NEW_LINE> <INDENT> self.base_url = self.plugin_config['ba...
This plugin checks to see if the ip was seen at all in the netflow index
62598ee81f037a2d8b9e27ed
class Assignment(Base): <NEW_LINE> <INDENT> __tablename__ = 'assignment' <NEW_LINE> assignment_id = Column(Integer, primary_key = True, autoincrement=True) <NEW_LINE> assignment_start = Column(Date) <NEW_LINE> assignment_end = Column(Date) <NEW_LINE> person_id = Column(Integer, ForeignKey('person.person_id')) <NEW_LINE...
Table of assignments
62598ee876e4537e8c3edc9e