code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class MixedPrecisionWrapper(object): <NEW_LINE> <INDENT> def __init__(self, optimizer, scale=None, auto_scale=True, inc_factor=2.0, dec_factor=0.5, num_iters_be_stable=500): <NEW_LINE> <INDENT> if not isinstance(optimizer, torch.optim.Optimizer): <NEW_LINE> <INDENT> raise ValueError("must provide a torch.optim.Optimize... | mixed precision optimizer wrapper.
Arguments:
optimizer (torch.optim.Optimizer): an instance of
:class:`torch.optim.Optimizer`
scale: (float): a scalar for grad scale.
auto_scale: (bool): whether enable auto scale.
The algorihm of auto scale is discribled in
http://docs.nvidia.com/... | 62598fabf9cc0f698b1c5290 |
class Graph(object): <NEW_LINE> <INDENT> def __init__(self, variables): <NEW_LINE> <INDENT> self.output = {} <NEW_LINE> self.gradients = {} <NEW_LINE> self.nodes = [] <NEW_LINE> for node in variables: <NEW_LINE> <INDENT> self.add(node) <NEW_LINE> <DEDENT> <DEDENT> def get_nodes(self): <NEW_LINE> <INDENT> return self.no... | A graph that keeps track of the computations performed by a neural network
in order to implement back-propagation.
Each evaluation of the neural network (during both training and test-time)
will create a new Graph. The computation will add nodes to the graph, where
each node is either a DataNode or a FunctionNode.
A ... | 62598fabcb5e8a47e493c140 |
class SlbSetBackendServer(Aliyunsdk): <NEW_LINE> <INDENT> def __init__(self,slbip,ecsip,resultFormat=resultFormat): <NEW_LINE> <INDENT> Aliyunsdk.__init__(self) <NEW_LINE> self.resultFormat = resultFormat <NEW_LINE> self.slbip = slbip <NEW_LINE> self.ecsip = ecsip <NEW_LINE> rel = GetSlbInfo(slbip) <NEW_LINE> rel.run()... | 为构造函数提供SLB IP和ECS IP,生成一个实例
调用run方法,设置后端服务器 | 62598fab7c178a314d78d42c |
class Unit(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=250, verbose_name=_('unit name'), help_text=_("Example: cup")) <NEW_LINE> plural = models.CharField(max_length=250, blank=True, verbose_name=_('plural form'), help_text=_("Example: cups (comma separated " "if language has more" " 2 plural ... | Model of meashure unit | 62598fab67a9b606de545f5b |
class SingleMigrationRateChange(SingleParamChange): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> for _s in [SingleParamChange]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) <NEW_LINE> __setattr__ = lambda self, name, value: _swig_setattr(self, SingleMigrationRateChange, name, value) <NEW_... | Proxy of C++ egglib::SingleMigrationRateChange class | 62598fab99fddb7c1ca62db0 |
class TranslatorParameters(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.entity_oracle = None <NEW_LINE> self.relation_oracle = None <NEW_LINE> self.restrict_answer_type = True <NEW_LINE> self.require_relation_match = True | A class that holds parameters for the translator. | 62598fab21bff66bcd722bf6 |
class SHA512Obfuscator(DataObfuscator): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(SHA512Obfuscator, self).__init__() <NEW_LINE> <DEDENT> def obfuscate(self, data): <NEW_LINE> <INDENT> hashable_representation = self._hashable_representation(data) <NEW_LINE> hasher = hashlib.sha512() <NEW_LINE> ha... | DataObfuscator that uses the SHA512 hashing mechanism.
| 62598fab6aa9bd52df0d4e58 |
class TtyRecWriter(object): <NEW_LINE> <INDENT> def __init__(self, f): <NEW_LINE> <INDENT> if isinstance(f, io.IOBase): <NEW_LINE> <INDENT> self.file = f <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.file = open(f, 'wb') <NEW_LINE> <DEDENT> <DEDENT> def write_frame(self, seconds, useconds, payload): <NEW_LINE> <IN... | A class to write ttyrecs | 62598fab32920d7e50bc5fe4 |
class CommandType(Enum): <NEW_LINE> <INDENT> NUM_TYPES = 4 <NEW_LINE> COMMANDS, SUB_COMMANDS, GLOBAL_OPTIONS, RESOURCE_OPTIONS = range(NUM_TYPES) | Enum specifying the command type.
Attributes:
* AWS_COMMAND: A string representing the 'aws' command.
* AWS_CONFIGURE: A string representing the 'configure' command.
* AWS_HELP: A string representing the 'help' command.
* AWS_DOCS: A string representing the 'docs' command.
* COMMANDS: An int repres... | 62598fab4f6381625f199486 |
class itkExtractImageFilterID3ID2(itkImageToImageFilterBPython.itkImageToImageFilterID3ID2): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") <NEW_LIN... | Proxy of C++ itkExtractImageFilterID3ID2 class | 62598fab56ac1b37e630217b |
class BlockTagNode(ExpressionMixin, Node): <NEW_LINE> <INDENT> @property <NEW_LINE> def function(self): <NEW_LINE> <INDENT> return self.token.contents["function"] | Node which presents block tag token.
Block tag example: ``{% if something %}``. This, with ``{%`` stuff.
This is one-to-one representation of
:py:class:`curly.lexer.StartBlockToken` token. | 62598fab71ff763f4b5e76fe |
class BamProfiler: <NEW_LINE> <INDENT> def __init__(self, bamFile, useSuppAlignments=False, useSecondaryAlignments=False ): <NEW_LINE> <INDENT> self.bamFile = bamFile <NEW_LINE> if useSuppAlignments: <NEW_LINE> <INDENT> self.ignoreSuppAlignments = 0 <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.ignoreSuppAlignment... | Class used to manage profiling reads from a BAM file | 62598fab63d6d428bbee273b |
class AccountViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> permission_classes = [IsAuthenticated, DjangoModelPermissions, ] <NEW_LINE> http_method_names = ["get", "post", "put", "delete"] <NEW_LINE> def get_serializer_class(self): <NEW_LINE> <INDENT> action_dict = { "list": serializers.AccountSerializer, "retrive... | ViewSet for User/Mailbox. | 62598fab4428ac0f6e6584b4 |
class ASSET_OT_tag_remove(AssetBrowserMetadataOperator, Operator): <NEW_LINE> <INDENT> bl_idname = "asset.tag_remove" <NEW_LINE> bl_label = "Remove Asset Tag" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> if not super().poll(context): <NEW_LI... | Remove an existing keyword tag from the active asset | 62598fabd58c6744b42dc29e |
class InquiryResponseAPI(BaseAPI): <NEW_LINE> <INDENT> model = ActionExecutionDB <NEW_LINE> schema = { "title": "Inquiry", "description": "Record of an Inquiry", "type": "object", "properties": { "id": { "type": "string", "required": True }, "route": { "type": "string", "default": "", "required": True }, "ttl": { "type... | A more pruned Inquiry model, containing only the fields needed for an API response
| 62598fab67a9b606de545f5c |
class PyPMEnvironment(object): <NEW_LINE> <INDENT> def __init__(self, pyenv, repository_list, **options): <NEW_LINE> <INDENT> self.pyenv = pyenv <NEW_LINE> self.repository_list = repository_list <NEW_LINE> self.options = DEFAULT_OPTIONS.copy() <NEW_LINE> self.options.update(options) <NEW_LINE> self.pypm_dir = join(self... | A PyPM environment that is tied to
- one `PythonEnvironment`
- one or more `RemoteRepository`
Packages can, thus, be searched and installed from any number of remote
repositories (although usually it is the main respository) but can only be
installed to the specified Python environment | 62598fab16aa5153ce400492 |
class CloseFormResponse(HttpResponseRedirect): <NEW_LINE> <INDENT> def __init__(self, request, redirect_to=None): <NEW_LINE> <INDENT> if 'popup_form' in request.session: <NEW_LINE> <INDENT> del request.session['popup_form'] <NEW_LINE> <DEDENT> if redirect_to is None: <NEW_LINE> <INDENT> redirect_to = request.META.get('... | Redirects back to the referer, closing the popup form | 62598fab2c8b7c6e89bd3756 |
class EOF(Symbol): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(EOF, self).__init__("$EOF") <NEW_LINE> <DEDENT> def first(self, visited=None): <NEW_LINE> <INDENT> return set([self]) | The EOF symbol. | 62598fab9c8ee82313040139 |
class Statement: <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def try_parse(cls, tokens): <NEW_LINE> <INDENT> raise NotImplementedError('Must be implemented in deriving classes') | Parser for a statement
Attributes:
start_token (tokenize.TokenInfo): The first token of the statement. | 62598fabd486a94d0ba2bf5e |
class SiteNotFoundException(SiteException): <NEW_LINE> <INDENT> pass | Raised when the site is not found and it's expected to exists. | 62598fab1b99ca400228f4f8 |
class Xt(librarypackage.LibraryPackage): <NEW_LINE> <INDENT> def __init__(self, system): <NEW_LINE> <INDENT> super(Xt, self).__init__("Xt", system, "Install Xt-dev on this system.", "Xt", ["X11/Intrinsic.h"]) | Package for the Xt library. | 62598fabfff4ab517ebcd775 |
class AdaptiveRemeshing: <NEW_LINE> <INDENT> def __init__(self,model_part,domain_size,solver,do_swap=True): <NEW_LINE> <INDENT> self.model_part = model_part <NEW_LINE> self.domain_size = domain_size <NEW_LINE> self.fluid_solver = solver <NEW_LINE> self.do_swap = do_swap <NEW_LINE> self.refinement_utilities = Refinement... | This class allows refining the problem mesh at run time.
It will split all elements where some error estimate surpasses a given
threshold. In 2D, some edge swapping will be performed to improve the
quality of the refined mesh. The current version of this class is
intended to work with VMS2D and VMS3D elements (by call... | 62598fab63b5f9789fe850f6 |
class OrderError(Exception): <NEW_LINE> <INDENT> pass | 订单错误 | 62598fab7047854f4633f36a |
class TestingConfig(Config): <NEW_LINE> <INDENT> TESTING = True <NEW_LINE> SQLALCHEMY_DATABASE_URI = DatabaseConfig.get_dev_config().get_uri() <NEW_LINE> DEBUG = True | Configurations for Testing, with a separate test database. | 62598fab99cbb53fe6830e68 |
class MovieDataApi(ApiUrl): <NEW_LINE> <INDENT> SCHEME = 'https' <NEW_LINE> HOST = 'omdbapi.com' <NEW_LINE> def get_movie_data(self, movie=None, imdb_id=None): <NEW_LINE> <INDENT> payload = { 'tomatoes': False, } <NEW_LINE> if movie: <NEW_LINE> <INDENT> payload['t'] = movie <NEW_LINE> <DEDENT> elif imdb_id: <NEW_LINE> ... | Provides a class to fetch movie data from the omdb API | 62598fab7047854f4633f36b |
class DataSource: <NEW_LINE> <INDENT> def __init__(self, data_source_type, data_source_id, collection_id=None, name=None, service_url=None): <NEW_LINE> <INDENT> self.type = data_source_type <NEW_LINE> self.id = int(data_source_id) <NEW_LINE> self.collection_id = collection_id <NEW_LINE> self.name = name <NEW_LINE> self... | Stores info about a Sentinel Hub data source
| 62598fab4f6381625f199487 |
class KMedoids(object): <NEW_LINE> <INDENT> def __init__(self, n_clusters=2, distance='euclidean', n_trials=10, max_iter=100, tol=0.001): <NEW_LINE> <INDENT> self.n_clusters = n_clusters <NEW_LINE> self.n_trials = n_trials <NEW_LINE> self.max_iter = max_iter <NEW_LINE> self.tol = tol <NEW_LINE> self.distance = distance... | KMedoids Clustering
K-medoids clustering take the cluster centroid as the medoid of the data points,
as opposed to the average of data points in a cluster. As a result, K-medoids
gaurantees that the cluster centroid is among the cluster members.
The medoid is defined as the point that minimizes the total within-cl... | 62598fab6aa9bd52df0d4e5a |
class DocumentViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Document.objects.all() <NEW_LINE> serializer_class = DocumentSerializer <NEW_LINE> http_method_names = ['get', 'head', 'options',] <NEW_LINE> def retrieve(self, request, pk=None): <NEW_LINE> <INDENT> document = Document.objects.get(pk=pk) <NEW... | API endpoint for listing documents out of context. | 62598fab8e7ae83300ee9034 |
class NoticesViewlet(grok.Viewlet): <NEW_LINE> <INDENT> grok.name('collective.notices') <NEW_LINE> grok.context(Interface) <NEW_LINE> grok.require('zope2.View') <NEW_LINE> grok.viewletmanager(IPortalTop) <NEW_LINE> def update(self): <NEW_LINE> <INDENT> cookie_name = 'hidden-notices-' + self.cookieSuffix() <NEW_LINE> hi... | Displays notices.
| 62598fabbe383301e025378b |
class UserError(Exception): <NEW_LINE> <INDENT> pass | Exception for obvious user errors that should be corrected.
Raised if the user made an obvious error that should be corrected
(e.g. invalid scanner name, missing required value, ).
Contains a message describing the error. | 62598fab5fcc89381b266115 |
class _InitHook(object): <NEW_LINE> <INDENT> pass | Dummy class to ensure that callable is really an init hook. | 62598fab167d2b6e312b6f03 |
class RouteTable(Resource): <NEW_LINE> <INDENT> _validation = { 'name': {'readonly': True}, 'type': {'readonly': True}, 'subnets': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': '... | Route table resource.
Variables are only populated by the server, and will be ignored when sending a request.
:param id: Resource ID.
:type id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param location: Resource location.
:type location: str
:param tags: A set of ... | 62598fab92d797404e388b2d |
class Argument: <NEW_LINE> <INDENT> class ArgumentType: <NEW_LINE> <INDENT> VALUE, POINTER, REFERENCE = range(3) <NEW_LINE> <DEDENT> def __init__(self, aLanguageObject, name = None, argType = ArgumentType.VALUE, isConst = False): <NEW_LINE> <INDENT> assert aLanguageObject <NEW_LINE> self.languageObject_ = aLanguageObje... | Represents a function argument. | 62598fab3539df3088ecc245 |
class Position(object): <NEW_LINE> <INDENT> def __init__(self, mark_generation, position, fragment_offset): <NEW_LINE> <INDENT> self.mark_offset = position <NEW_LINE> self.mark_generation = mark_generation <NEW_LINE> self.fragment_offset = fragment_offset <NEW_LINE> <DEDENT> def get_offset_into_buffer(self): <NEW_LINE>... | Represents a position in the iterator. | 62598fab30bbd72246469941 |
class MyFrame(tkinter.Frame): <NEW_LINE> <INDENT> def __init__(self, controller): <NEW_LINE> <INDENT> tkinter.Frame.__init__(self) <NEW_LINE> self.pack() <NEW_LINE> self.controller = controller <NEW_LINE> self.userEntryF = tkinter.Entry() <NEW_LINE> self.userEntryF.insert(0, "") <NEW_LINE> self.userEntryF.pack({"side":... | The class MyFrame is the View for a simple program that exemplifies the Model/View/Controller
architecture. This View class is a tkinter.Frame that contains three Buttons, a user-entry field,
and a label and a Label. Two buttons notify the Controller when they are pressed, and the other
Button quits the app. The label ... | 62598fab66673b3332c3035d |
class Store(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def initialize(): <NEW_LINE> <INDENT> for keys in _nexus_dict.keys(): <NEW_LINE> <INDENT> if keys[1] == const.USERNAME: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> cdb.add_credential(TENANT, keys[0], _nexus_dict[keys[0], const.USERNAME], _nexus_dict[key... | Credential Store. | 62598fab5166f23b2e24336a |
class UnpolarisedFFTTelescope(FFTTelescope, UnpolarisedFourierTransformTelescope): <NEW_LINE> <INDENT> pass | A base for a unpolarised Fast Fourier transform telescope.
| 62598fab26068e7796d4c8e6 |
class OverflowError(ArithmeticError): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def __new__(S, *more): <NEW_LINE> <INDENT> pass | Result too large to be represented. | 62598fab32920d7e50bc5fe7 |
class Resposta: <NEW_LINE> <INDENT> qtd_docs_por_pagina = 50 <NEW_LINE> def __init__(self, conteudo): <NEW_LINE> <INDENT> self._conteudo = conteudo <NEW_LINE> self._dados = None <NEW_LINE> <DEDENT> @property <NEW_LINE> def conteudo(self): <NEW_LINE> <INDENT> return self._conteudo <NEW_LINE> <DEDENT> @property <NEW_LINE... | Conteúdo de página em formato JSON | 62598fab236d856c2adc9406 |
class LinuxConfig(OSConfig): <NEW_LINE> <INDENT> @property <NEW_LINE> def mktxp_user_dir_path(self): <NEW_LINE> <INDENT> return FSHelper.full_path('~/mktxp') | Linux-related config
| 62598fab851cf427c66b824f |
class ReflexAgent(Agent): <NEW_LINE> <INDENT> def getAction(self, gameState): <NEW_LINE> <INDENT> legalMoves = gameState.getLegalActions() <NEW_LINE> scores = [self.evaluationFunction(gameState, action) for action in legalMoves] <NEW_LINE> bestScore = max(scores) <NEW_LINE> bestIndices = [index for index in range(len(s... | A reflex agent chooses an action at each choice point by examining
its alternatives via a state evaluation function.
The code below is provided as a guide. You are welcome to change
it in any way you see fit, so long as you don't touch our method
headers. | 62598fabfff4ab517ebcd777 |
class Market(object): <NEW_LINE> <INDENT> def current_stats(self): <NEW_LINE> <INDENT> url = 'https://api.coinmarketcap.com/v1/global/?convert=EUR' <NEW_LINE> r = requests.get(url) <NEW_LINE> data = r.json() <NEW_LINE> data['date']=datetime.date.today() <NEW_LINE> return data <NEW_LINE> <DEDENT> def current_ticker(self... | based on coinmarketcap.com api | 62598fab0a50d4780f705370 |
class IO: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def print_menu(): <NEW_LINE> <INDENT> print('Menu\n\n[l] load Inventory from file\n[a] Add CD\n[i] Display Current Inventory') <NEW_LINE> print('[d] delete CD from Inventory\n[s] Save Inventory to file\n[x] exit\n') <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def ... | Handling Input / Output | 62598fab55399d3f056264b6 |
class TinyYoloFeature(BaseFeatureExtractor): <NEW_LINE> <INDENT> def __init__(self, input_size): <NEW_LINE> <INDENT> input_image = Input(shape=input_size) <NEW_LINE> x = Conv2D(16, (3, 3), strides=(1, 1), padding='same', name='conv_1', use_bias=False)(input_image) <NEW_LINE> x = BatchNormalization(name='norm_1')(x) <NE... | docstring for ClassName | 62598fab7d847024c075c356 |
class SoftmaxLayer(object): <NEW_LINE> <INDENT> def __init__(self, input, n_out, y): <NEW_LINE> <INDENT> n_in = input.get_shape()[1].value <NEW_LINE> self.input = input <NEW_LINE> r = 4*np.sqrt(6.0/(n_in + n_out)) <NEW_LINE> w = tf.Variable(tf.random_uniform([n_in, n_out], minval=-r, maxval=r)) <NEW_LINE> b = tf.Variab... | Softmax layer for classification
Parameters
----------
input: Tensor
The output from the last layer
n_out: int
Number of labels
y: numpy array
True label for the data | 62598fab7c178a314d78d430 |
class WeatherAPI(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.days = 4 <NEW_LINE> self.url = '{0}?q={1}&format=json&num_of_days={2}&key={3}'.format( settings.WEATHER_API_URL, settings.WEATHER_CITY, self.days, settings.WEATHER_API_KEY) <NEW_LINE> <DEDENT> def _api_response(self): <NEW_LINE> ... | Weather proxy | 62598fab67a9b606de545f5f |
class HasObjectState(object): <NEW_LINE> <INDENT> _publish_attrs = [ PublishOnly('os_state'), ] <NEW_LINE> _fulltext_attrs = ["os_state"] <NEW_LINE> _aliases = { "os_state": { "display_name": "Review State", "mandatory": False } } <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self._skip_os_state_u... | Has Object State Mixin | 62598fab7047854f4633f36c |
class ValidationOpinionListView(LoginRequiredMixin, PermissionRequiredMixin, ListView): <NEW_LINE> <INDENT> permissions = ["tutorialv2.change_validation"] <NEW_LINE> template_name = "tutorialv2/validation/opinions.html" <NEW_LINE> context_object_name = "contents" <NEW_LINE> subcategory = None <NEW_LINE> def get_queryse... | List the validations, with possibilities of filters | 62598fab442bda511e95c3ea |
class LptsPifibEnum(Enum): <NEW_LINE> <INDENT> isis = 0 <NEW_LINE> ipv4_frag = 1 <NEW_LINE> ipv4_echo = 2 <NEW_LINE> ipv4_any = 3 <NEW_LINE> ipv6_frag = 4 <NEW_LINE> ipv6_echo = 5 <NEW_LINE> ipv6_nd = 6 <NEW_LINE> ipv6_any = 7 <NEW_LINE> bfd_any = 8 <NEW_LINE> all = 9 <NEW_LINE> @staticmethod <NEW_LINE> def _meta_info(... | LptsPifibEnum
Lpts pifib
.. data:: isis = 0
ISIS packets
.. data:: ipv4_frag = 1
IPv4 fragmented packets
.. data:: ipv4_echo = 2
IPv4 ICMP Echo packets
.. data:: ipv4_any = 3
All IPv4 packets
.. data:: ipv6_frag = 4
IPv6 fragmented packets
.. data:: ipv6_echo = 5
IPv6 ICMP Echo pack... | 62598fabadb09d7d5dc0a51e |
class MyMplCanvas(FigureCanvas): <NEW_LINE> <INDENT> def __init__(self,q_list,logi_list, parent=None, width=7, height=7, dpi=100): <NEW_LINE> <INDENT> fig = Figure(figsize=(width, height), dpi=dpi) <NEW_LINE> self.axes = fig.add_subplot(111) <NEW_LINE> FigureCanvas.__init__(self, fig) <NEW_LINE> self.q_list = q_list <N... | Ultimately, this is a QWidget (as well as a FigureCanvasAgg, etc.). | 62598fab2ae34c7f260ab075 |
class ImagePanelBasic(wx.Panel): <NEW_LINE> <INDENT> __bitmapCache = {} <NEW_LINE> def __init__(self, tile, *args, **kw): <NEW_LINE> <INDENT> self.backgroundColour = wx.WHITE <NEW_LINE> from Tribler.Main.vwxGUI.GuiUtility import GUIUtility <NEW_LINE> self.guiUtility = GUIUtility.getInstance() <NEW_LINE> self.xpos = sel... | Panel with automatic backgroundimage control. | 62598fab4f6381625f199488 |
class IDatabaseOpenedEvent(interface.Interface): <NEW_LINE> <INDENT> database = interface.Attribute("The main database.") | The main database has been opened. | 62598fab0a50d4780f705371 |
class GetPrivEscSvcInfo(Step): <NEW_LINE> <INDENT> attack_mapping = [('T1007', 'Discovery'), ('T1106', 'Execution')] <NEW_LINE> display_name = "privilege_escalation(service)" <NEW_LINE> summary = "Use PowerUp to find potential service-based privilege escalation vectors" <NEW_LINE> preconditions = [("rat", OPRat({"eleva... | Description:
This step utilises the PowerUp powershell script to identify potential service-based privilege
escalation opportunities on a target machine.
Requirements:
Requires an non-elevated RAT. This step identifies unquoted service paths, modifiable service targets,
and modifiable services for privi... | 62598fab796e427e5384e727 |
class OrgHomeView(View): <NEW_LINE> <INDENT> def get(self, request, org_id, *args, **kwargs): <NEW_LINE> <INDENT> course_org = CourseOrg.objects.get(id=int(org_id)) <NEW_LINE> course_org.click_nums += 1 <NEW_LINE> course_org.save() <NEW_LINE> current_page = "home" <NEW_LINE> all_courses = course_org.course_set.all()[:3... | 显示机构的详细页面 | 62598fabe1aae11d1e7ce7ed |
class SegmentMasks(col.defaultdict): <NEW_LINE> <INDENT> def __init__(self, seg): <NEW_LINE> <INDENT> self.seg = seg <NEW_LINE> col.defaultdict.__init__(self, None) <NEW_LINE> <DEDENT> def __missing__(self, label): <NEW_LINE> <INDENT> if label != 0: <NEW_LINE> <INDENT> self.seg.check_label(label) <NEW_LINE> <DEDENT> re... | Container for segment masks | 62598fab4c3428357761a24d |
class Pet(Animal): <NEW_LINE> <INDENT> _validation = { 'name': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'ani_type': {'key': 'aniType', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(Pet, self).__init__(**kwargs) <NEW_LINE> self.n... | Pet.
Variables are only populated by the server, and will be ignored when sending a request.
:param ani_type:
:type ani_type: str
:ivar name: Gets the Pet by id.
:vartype name: str | 62598faba8ecb033258711a4 |
class InterBoundaryIter(object): <NEW_LINE> <INDENT> def __init__(self, stream, boundary): <NEW_LINE> <INDENT> self._stream = stream <NEW_LINE> self._boundary = boundary <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def next(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDEN... | A Producer that will iterate over boundaries. | 62598fabbd1bec0571e1508d |
class Option(Action): <NEW_LINE> <INDENT> body = u'<option tal:attributes="%(attributes)s">${content}</option>' <NEW_LINE> def update(self): <NEW_LINE> <INDENT> if 'value' not in self.attrs: <NEW_LINE> <INDENT> self.attrs['value'] = self.rcontext.get('value', None) | An action rendered as a select option::
>>> from webob import Request
>>> request = Request.blank('/')
>>> action = Option('myaction',
... value='request.application_url',
... content=_('Click here'))
Rendering::
>>> action.render(request)
u'<option id="m... | 62598fab2c8b7c6e89bd3759 |
class GenerateArgyleTokenView(APIView): <NEW_LINE> <INDENT> permission_classes = (AllowAny,) <NEW_LINE> def post(self, request, uuid): <NEW_LINE> <INDENT> user_link = UserLink.objects.get(uuid=uuid) <NEW_LINE> params = {'user': str(user_link.argyle_uuid)} <NEW_LINE> token = generate_argyle_token(params) <NEW_LINE> if t... | Generates an argyle token for the UserLink instance.
- - - - - - - - - -
Expected URL format: ((API_URL))/generator/argyle-token//((userUUID))/
Method: POST
- - - - - - - - - -
Example of returned data:
Data: {
'token': 'eyK1eXAiOiJKV1QiLCJhSjciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjA5NTI5Mjc5LCJqdG... | 62598fab66673b3332c3035f |
class FailedEpisodes(tf_metric.TFStepMetric): <NEW_LINE> <INDENT> def __init__(self, failure_function, name='FailedEpisodes', prefix='Metrics', dtype=tf.int64): <NEW_LINE> <INDENT> super(FailedEpisodes, self).__init__(name=name, prefix=prefix) <NEW_LINE> self.dtype = dtype <NEW_LINE> self._failure_function = failure_fu... | Counts the number of episodes ending in failure / requiring human intervention. | 62598faba17c0f6771d5c1c9 |
class Animal: <NEW_LINE> <INDENT> def __init__(self, name, weight, location="Earth", diet_type="Food", poisonous="False"): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.weight = weight <NEW_LINE> self.location = location <NEW_LINE> self.diet_type = diet_type <NEW_LINE> self.poisonous = poisonous <NEW_LINE> <DEDE... | General Representation of Animals | 62598fab5fc7496912d4824c |
class Axis(): <NEW_LINE> <INDENT> def __init__(self, lo, hi): <NEW_LINE> <INDENT> self.lo = np.asarray(lo) if lo is not None else None <NEW_LINE> self.hi = np.asarray(hi) if hi is not None else None <NEW_LINE> <DEDENT> @property <NEW_LINE> def is_empty(self): <NEW_LINE> <INDENT> return self.lo is None or not self.lo.si... | Represent the axes of a N-D object.
This supports both "integrated" and "non-integrated" (point)
datasets.
Parameters
----------
lo : array_like or None
The starting point of the axis. If `lo` is `None` or empty
then the data axis is said to be empty. The axis can be in
ascending or descending order.
hi ... | 62598fab3d592f4c4edbae60 |
class BeamError(Exception): <NEW_LINE> <INDENT> pass | Base class for all Beam errors. | 62598fab7b25080760ed7442 |
class TestConfig: <NEW_LINE> <INDENT> @mock.patch('twod.twod._Data') <NEW_LINE> def test_config_valid(self, mock_data, capsys, monkeypatch, valid_config_path): <NEW_LINE> <INDENT> cls = Twod(valid_config_path) <NEW_LINE> assert cls.interval == 9000 <NEW_LINE> <DEDENT> @mock.patch('twod.twod._Data') <NEW_LINE> def test_... | Test config parsing. | 62598fab9c8ee8231304013b |
class TestRegress(RegressionTestCase): <NEW_LINE> <INDENT> def test_linearRegress(self): <NEW_LINE> <INDENT> data = Series(self.sc.parallelize([(1, array([1.5, 2.3, 6.2, 5.1, 3.4, 2.1]))])) <NEW_LINE> x = array([ array([1, 0, 0, 0, 0, 0]), array([0, 1, 0, 0, 0, 0]) ]) <NEW_LINE> model = RegressionModel.load(x, "linear"... | Test accuracy of linear and bilinear regression
models by building small design matrices and testing
on small data against ground truth
(ground truth derived by doing the algebra in MATLAB) | 62598fab01c39578d7f12d14 |
class HTCondorJobStatus(enum.IntEnum): <NEW_LINE> <INDENT> idle = 1 <NEW_LINE> running = 2 <NEW_LINE> removed = 3 <NEW_LINE> completed = 4 <NEW_LINE> held = 5 <NEW_LINE> transferring_output = 6 <NEW_LINE> suspended = 7 <NEW_LINE> failed = 999 | See https://htcondor.readthedocs.io/en/latest/classad-attributes/job-classad-attributes.html | 62598fab0c0af96317c56317 |
class AnalyticsDosviscommonGeneratereport( AnalyticsDosviscommonGeneratereportSchema ): <NEW_LINE> <INDENT> cli_command = "/mgmt/tm/analytics/dos-vis-common/generate-report" <NEW_LINE> def rest(self): <NEW_LINE> <INDENT> response = self.device.get(self.cli_command) <NEW_LINE> response_json = response.json() <NEW_LINE> ... | To F5 resource for /mgmt/tm/analytics/dos-vis-common/generate-report
| 62598fab7cff6e4e811b59c0 |
@registry.register_problem <NEW_LINE> class TranslateEnfrWmtMulti64kPacked1k(TranslateEnfrWmtMulti64k): <NEW_LINE> <INDENT> @property <NEW_LINE> def packed_length(self): <NEW_LINE> <INDENT> return 1024 <NEW_LINE> <DEDENT> @property <NEW_LINE> def num_training_examples(self): <NEW_LINE> <INDENT> return 1760600 <NEW_LINE... | Translation with muli-lingual vocabulary. | 62598fab7d847024c075c358 |
class ResourceSkuRestrictions(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'type': {'readonly': True}, 'values': {'readonly': True}, 'restriction_info': {'readonly': True}, 'reason_code': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'values': {'key': 'v... | Describes scaling information of a SKU.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar type: The type of restrictions. Possible values include: "Location", "Zone".
:vartype type: str or ~storage_pool_management.models.ResourceSkuRestrictionsType
:ivar values: The value o... | 62598fab8da39b475be03179 |
class SetCorpFlag: <NEW_LINE> <INDENT> def __call__(self, sample): <NEW_LINE> <INDENT> sample['corpflag'] = True <NEW_LINE> return sample | Adds a deterministic flag to the sample such that subsequent transforms
use a fixed random seed where applicable. Used for test | 62598fab3346ee7daa337614 |
class ThreeNeighbors: <NEW_LINE> <INDENT> def __init__(self, A, B, C): <NEW_LINE> <INDENT> if not (isinstance(A, PartPoint) or (isinstance(A, FixedPoint))) and (isinstance(B, PartPoint) or (isinstance(B, FixedPoint))) and (isinstance(C, PartPoint) or (isinstance(C, FixedPoint))): <NEW_LINE... | Represents three best spatially distributed neighbors of a point in a mesh. | 62598fabaad79263cf42e768 |
class SessionWizardView(WizardView): <NEW_LINE> <INDENT> storage_name = 'formtools.wizard.storage.session.SessionStorage' | A WizardView with pre-configured SessionStorage backend. | 62598fab7047854f4633f36e |
class Adagrad(Optimizer): <NEW_LINE> <INDENT> def __init__(self, lr=0.01, epsilon=1e-8, decay=0., **kwargs): <NEW_LINE> <INDENT> super(Adagrad, self).__init__(**kwargs) <NEW_LINE> with K.name_scope(self.__class__.__name__): <NEW_LINE> <INDENT> self.lr = K.variable(lr, name='lr') <NEW_LINE> self.decay = K.variable(decay... | Adagrad optimizer.
It is recommended to leave the parameters of this optimizer
at their default values.
# Arguments
lr: float >= 0. Learning rate.
epsilon: float >= 0.
decay: float >= 0. Learning rate decay over each update.
# References
- [Adaptive Subgradient Methods for Online Learning and Stochas... | 62598fab7d847024c075c359 |
class ListResources(Method): <NEW_LINE> <INDENT> interfaces = ['aggregate', 'slicemgr'] <NEW_LINE> accepts = [ Mixed(Parameter(str, "Credential string"), Parameter(type([str]), "List of credentials")), Parameter(dict, "Options") ] <NEW_LINE> returns = Parameter(str, "List of resources") <NEW_LINE> def call(self, creds,... | Returns information about available resources
@param credential list
@param options dictionary
@return string | 62598fab7047854f4633f36f |
class FilterDepartamentTfmForm(forms.Form): <NEW_LINE> <INDENT> search_text = forms.CharField(required=False, widget=forms.TextInput( attrs={'class': 'form-control', 'placeholder': 'Título'} )) <NEW_LINE> formation_project = forms.ModelChoiceField( queryset=Masters.objects.all(), empty_label="Masters", required=False, ... | Filtros para el listado de TFMs para departamentos.
Atributos:
search_text(forms.CharField): Input tipo Text para el titulo dle TFM.
formation_project(forms.ModelChoiceField): Selector para la elección de la titulación.
area(forms.ModelChoiceField): Selector para elección del area del tutor que
... | 62598fab6aa9bd52df0d4e5e |
class DataDirectoryFilter(load.DirectoryFilter): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def filter_directories(dirs: List[str]) -> List[str]: <NEW_LINE> <INDENT> return dirs | Represents a data directory filter.
The filter is used to | 62598fab656771135c489617 |
class dpp_base(base_ownProcess): <NEW_LINE> <INDENT> def _start_plugin_base(self): <NEW_LINE> <INDENT> return self.cb_initialize_plugin() <NEW_LINE> <DEDENT> def cb_initialize_plugin(self): <NEW_LINE> <INDENT> raise NotImplementedError("Please Implement this method") <NEW_LINE> <DEDENT> def _get_configuration_base(self... | This kind of plugin is to process data provided by other plugins. | 62598fabd58c6744b42dc2a1 |
class DlRtmp(Downloader): <NEW_LINE> <INDENT> rtmpdumpEx='rtmpdump' <NEW_LINE> def __init__(self, lienRtmp, swfPlayerUrl, outDir, codeProgramme, timeStamp, navigateur, stopDownloadEvent, progressFnct): <NEW_LINE> <INDENT> self.lienRtmp = lienRtmp <NEW_LINE> self.swfPlayerUrl = swfPlayerUrl <NEW_LINE> super(DlRtmp, self... | Téléchargement des liens rtmp | 62598fabbe8e80087fbbeff9 |
class DetailPostAPIView(RetrieveUpdateDestroyAPIView): <NEW_LINE> <INDENT> queryset = Post.objects.all() <NEW_LINE> lookup_field = "slug" <NEW_LINE> serializer_class = PostDetailSerializer <NEW_LINE> permission_classes = [IsAuthenticatedOrReadOnly, IsOwnerOrReadOnly] | get:
Returns the details of a post instance. Searches post using slug field.
put:
Updates an existing post. Returns updated post data
parameters: [slug, title, body, description, image]
delete:
Delete an existing post
parameters = [slug] | 62598fab56b00c62f0fb284a |
class b2JointDef(object): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> __repr__ = _swig_repr <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> _Box2D.b2JointDef_swiginit(self,_Box2D.new_b2JointDef()) <NEW_LINE> _init_kw... | Joint definitions are used to construct joints. | 62598fabdd821e528d6d8ecb |
class Field(field): <NEW_LINE> <INDENT> def __init__(self, name, default=NOT_PROVIDED, filters=None, required=True): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.default = default <NEW_LINE> self.filters = filters or [] <NEW_LINE> self.required = required <NEW_LINE> <DEDENT> def __get__(self, instance, cls=None... | class V(DataMapper):
foo = Field('bar', default=1) | 62598fabd268445f26639b4e |
class Category(Base): <NEW_LINE> <INDENT> __tablename__ = 'category' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> name = Column(String(250), nullable=False) <NEW_LINE> @property <NEW_LINE> def serialize(self): <NEW_LINE> <INDENT> return { 'name': self.name, 'id': self.id, } | Category class has following properties
id : Integer
name : String | 62598fab4428ac0f6e6584ba |
class DerivableSetValueError(Exception): <NEW_LINE> <INDENT> pass | Raises when trying to set value for Derivable Field. | 62598fab92d797404e388b2f |
class ReadSageNB(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.tmp = tempfile.mkdtemp(prefix='sagenb_export_') <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> shutil.rmtree(self.tmp, ignore_errors=True) <NEW_LINE> <DEDENT> def tmp_filename(self, name): <NEW_LINE> <INDENT>... | Test various sample notebooks | 62598fab3539df3088ecc248 |
class V1beta1ControllerRevisionList(object): <NEW_LINE> <INDENT> swagger_types = { 'api_version': 'str', 'items': 'list[V1beta1ControllerRevision]', 'kind': 'str', 'metadata': 'V1ListMeta' } <NEW_LINE> attribute_map = { 'api_version': 'apiVersion', 'items': 'items', 'kind': 'kind', 'metadata': 'metadata' } <NEW_LINE> d... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598faba8ecb033258711a6 |
@autoinitsingleton('windows', 'msys') <NEW_LINE> class WindowsToMsysPathConverter(Singleton, PathConverter): <NEW_LINE> <INDENT> def convert(self, source_path): <NEW_LINE> <INDENT> return get_path_converter( 'windows_alt', 'msys').convert( get_path_converter( 'windows', 'windows_alt').convert(source_path)) | Windows path to msys path converter. | 62598fab45492302aabfc467 |
class PerfDataSourcesV1(RestController): <NEW_LINE> <INDENT> apiver = 1 <NEW_LINE> @with_trailing_slash <NEW_LINE> @expose("api/pds-all.xml", content_type="application/xml; charset=utf-8") <NEW_LINE> @expose("json") <NEW_LINE> def get_all(self): <NEW_LINE> <INDENT> idhost = get_parent_id("hosts") <NEW_LINE> if idhost i... | Controlleur d'accès aux données de performances d'un hôte. Ne peut être
monté qu'après un hôte dans l'arborescence. Techniquement on pourrait aussi
le monter à la racine, mais il faudrait alors limiter le nombre de
résultats pour éviter de saturer la machine. On fera s'il y a besoin. | 62598fab26068e7796d4c8ea |
class Database: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.database = SqliteDatabase('linklys.db') <NEW_LINE> self.load() <NEW_LINE> <DEDENT> def load(self): <NEW_LINE> <INDENT> self.database.connect() <NEW_LINE> self.database.create_tables( [ Article, Playlist, PlaylistArticles ], safe=True ) | manages the database | 62598fab7b25080760ed7444 |
class PathTransform(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.path_file = None <NEW_LINE> <DEDENT> def relativeToAbsolute(self, path_file): <NEW_LINE> <INDENT> assert self.path_file is not None <NEW_LINE> path = join(self.path_file, path_file) <NEW_LINE> return normpath(path) | classe per trasformare il path di un file da relativo ad assoluto, questo
per recuperare file che si trovano in una directory diversa da quella
dell'editor. La classe mette a disposizione una variabile globale
g_ptransform per implemetare il template singleton.
Nel momento che si cambia il path del file .rooms su cui s... | 62598fab3d592f4c4edbae62 |
class DefaultEventFormatterTest(test_lib.EventFormatterTestCase): <NEW_LINE> <INDENT> def testInitialization(self): <NEW_LINE> <INDENT> event_formatter = default.DefaultEventFormatter() <NEW_LINE> self.assertIsNotNone(event_formatter) <NEW_LINE> <DEDENT> def testGetFormatStringAttributeNames(self): <NEW_LINE> <INDENT> ... | Tests for the default event formatter. | 62598fab44b2445a339b693b |
class GattError(LinkError): <NEW_LINE> <INDENT> pass | An operation could not be completed because of an invalid GATT state.
The message will provide more information on what the issue was. | 62598fab8a43f66fc4bf2112 |
class Dereference(object): <NEW_LINE> <INDENT> implements(IDereference) <NEW_LINE> __slots__ = ("refid", ) <NEW_LINE> def __init__(self, refid): <NEW_LINE> <INDENT> self.refid = refid <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "<Dereference %s>" % self.refid <NEW_LINE> <DEDENT> def __hash__(self... | Used by TreeSerializer to encapsulate a dereference to a previous
referenced value. Can be compared for equality and hashed.
Implements L{IDereference}. | 62598fabf7d966606f747f7b |
@utils.ModuleSettings( options=[ utils.UtilOption(constants.OPTION_USERHOME, required=False, docstring="home directory"), utils.UtilOption(constants.OPTION_USERSHELL, required=False, docstring="login shell") ], required_transaction=storage.PasswdTransaction ) <NEW_LINE> class UserItem(utils.HardeningUtil): <NEW_LINE> <... | creates a user. If the user already exists, it will be modified. | 62598fabfff4ab517ebcd77c |
class ConstVelocityMP(MotionPrior): <NEW_LINE> <INDENT> def __init__(self, n_steps): <NEW_LINE> <INDENT> self.n_steps = n_steps <NEW_LINE> <DEDENT> def __call__(self, x_t, history): <NEW_LINE> <INDENT> if len(history) >= self.n_steps: <NEW_LINE> <INDENT> new_history = list(history[1:]) <NEW_LINE> <DEDENT> else: <NEW_LI... | Constant velocity motion prior | 62598fabf548e778e596b53b |
class LogParabola(RegriddableModel1D): <NEW_LINE> <INDENT> def __init__(self, name='logparabola'): <NEW_LINE> <INDENT> self.ref = Parameter(name, 'ref', 1, alwaysfrozen=True) <NEW_LINE> self.c1 = Parameter(name, 'c1', 1) <NEW_LINE> self.c2 = Parameter(name, 'c2', 1) <NEW_LINE> self.ampl = Parameter(name, 'ampl', 1, 0) ... | One-dimensional log-parabolic function.
Attributes
----------
ref
The reference point for the normalization.
c1
The power-law index (gamma).
c2
The curvature of the parabola (beta).
ampl
The amplitude of the model.
See Also
--------
Exp, Exp10, Log, Log10, Sqrt
Notes
-----
The functional form of the ... | 62598fab4a966d76dd5eee78 |
class BTermMonoid(TermWithCoefficientMonoid): <NEW_LINE> <INDENT> __init__ = experimental(trac_number=31922)(GenericTermMonoid.__init__) <NEW_LINE> Element = BTerm <NEW_LINE> def _repr_(self): <NEW_LINE> <INDENT> return (f'B-Term Monoid {self.growth_group._repr_short_()} with ' f'coefficients in {self.coefficient_ring}... | Parent for asymptotic B-terms.
INPUT:
- ``growth_group`` -- a growth group
- ``coefficient_ring`` -- the ring which contains the
coefficients of the elements
- ``category`` -- The category of the parent can be specified
in order to broaden the base structure. It has to be a subcategory
of ``Join of Category o... | 62598fab7c178a314d78d434 |
class FleschReadingEase(BaseReadability): <NEW_LINE> <INDENT> name = 'Flesch reading ease' <NEW_LINE> slug = 'flesch_reading_ease' <NEW_LINE> def calc(self, text: str) -> ReadingLevel: <NEW_LINE> <INDENT> if not text: <NEW_LINE> <INDENT> return ReadingLevel(self.name) <NEW_LINE> <DEDENT> text_info = self._text_analyser... | In the Flesch reading-ease test, higher scores indicate material that is easier to read;
lower numbers mark passages that are more difficult to read.
100.00-90.00 5th grade Very easy to read. Easily understood by an average 11-year-old student.
90.0–80.0 6th grade Easy to read. Conversatio... | 62598fab7047854f4633f370 |
class BaseTaskTypeCreate( UserFormViewMixin, TaskTypeFormViewMixin, DisableUserSelectFormViewMixin, LoginRequiredMixin, CreateView, ): <NEW_LINE> <INDENT> model = None <NEW_LINE> fields = "__all__" <NEW_LINE> template_name = None <NEW_LINE> def get_success_url(self): <NEW_LINE> <INDENT> raise NotImplementedError | A base view for creating a task type. | 62598fabadb09d7d5dc0a522 |
class Rectangle: <NEW_LINE> <INDENT> number_of_instances = 0 <NEW_LINE> print_symbol = "#" <NEW_LINE> def __init__(self, width=0, height=0): <NEW_LINE> <INDENT> self.width = width <NEW_LINE> self.height = height <NEW_LINE> type(self).number_of_instances += 1 <NEW_LINE> <DEDENT> @property <NEW_LINE> def width(self): <NE... | Rectange Class | 62598fab4428ac0f6e6584bb |
class WDateEditPlugin(QtDesigner.QPyDesignerCustomWidgetPlugin): <NEW_LINE> <INDENT> _module = 'wic.widgets.date_edit' <NEW_LINE> _class = 'DateEdit' <NEW_LINE> _icon = ':/icons/fugue/calendar-blue.png' <NEW_LINE> def __init__(self, parent = None): <NEW_LINE> <INDENT> super().__init__(parent) <NEW_LINE> self.initialize... | Designer plugin for WDateEdit.
Also serves as base class for other custom widget plugins: | 62598fab8e7ae83300ee903a |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.