code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class UpdateServiceProfile(neutronV20.UpdateCommand): <NEW_LINE> <INDENT> resource = 'service_profile' <NEW_LINE> log = logging.getLogger(__name__ + '.UpdateServiceProfile') <NEW_LINE> def add_known_arguments(self, parser): <NEW_LINE> <INDENT> parser.add_argument( '--name', help=_('Name for the Service Profile.')) <NEW...
Update a given service profile.
62598f8a0a366e3fb87dc546
class AssetPermissionRemoveUserApi(RetrieveUpdateAPIView): <NEW_LINE> <INDENT> permission_classes = (IsSuperUser,) <NEW_LINE> serializer_class = serializers.AssetPermissionUpdateUserSerializer <NEW_LINE> queryset = AssetPermission.objects.all() <NEW_LINE> def update(self, request, *args, **kwargs): <NEW_LINE> <INDENT> ...
将用户从授权中移除,Detail页面会调用
62598f8a0c0af96317c55f01
class MovingAverage(object): <NEW_LINE> <INDENT> def __init__(self, windowSize, existingHistoricalValues=None): <NEW_LINE> <INDENT> if not isinstance(windowSize, numbers.Integral): <NEW_LINE> <INDENT> raise TypeError("MovingAverage - windowSize must be integer type") <NEW_LINE> <DEDENT> if windowSize <= 0: <NEW_LINE> ...
Helper class for computing moving average and sliding window
62598f8a435de62698e9b964
class FNMinimi(MachineGun, FullyImplemented): <NEW_LINE> <INDENT> Name: str = "FN Minimi" <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super().__init__(mountable=True, caliber=Caliber.MM_762, action=FiringAction.FullyAutomatic, capacity=100, range_falloff=.25, base_damage=13, name=self.Name, weightlb=15.1)
Based on the FN Minimi
62598f8a925a0f43d25e7bab
class QtWidgetFinder(object): <NEW_LINE> <INDENT> def find_qt_toplevel_widget(self, name): <NEW_LINE> <INDENT> all = QApplication.topLevelWidgets() <NEW_LINE> return [x for x in all if name.lower() in str(type(x)).lower()] <NEW_LINE> <DEDENT> def find_qt_widget_by_name(self, name): <NEW_LINE> <INDENT> a = QApplication....
This class provides common functions for finding widgets within all currently existing ones.
62598f8a8a43f66fc4bf1cfa
class ApplicationStore(ftrack_connect.application.ApplicationStore): <NEW_LINE> <INDENT> def _discoverApplications(self): <NEW_LINE> <INDENT> applications = [] <NEW_LINE> if sys.platform == "darwin": <NEW_LINE> <INDENT> prefix = ["/", "Applications"] <NEW_LINE> applications.extend(self._searchFilesystem( versionExpress...
Discover and store available applications on this host.
62598f8adc8b845886d5312e
class AttentionRNNState(namedtuple('AttentionRNNState', ['hs','cs','source_attn','insert_attn','delete_attn']), RNNState): <NEW_LINE> <INDENT> pass
Attributes: hs (list[Variable]): a list of the hidden states for each layer of a multi-layer RNN. Each Variable has shape (batch_size, hidden_dim). cs (list[Variable]): a list of the cell states for each layer of a multi-layer RNN Each Variable has shape (batch_size, hidden_dim). source_attn (AttentionOutput) i...
62598f8a45492302aabfc04a
class Teachers(models.Model): <NEW_LINE> <INDENT> _name = 'openacademy.teachers' <NEW_LINE> name = fields.Char() <NEW_LINE> biography = fields.Html()
Storing Teachers in Odoo Database
62598f8a009cb60464d010a1
@implements_iterator <NEW_LINE> class ClosingIterator(object): <NEW_LINE> <INDENT> def __init__(self, iterable, callbacks=None): <NEW_LINE> <INDENT> iterator = iter(iterable) <NEW_LINE> self._next = partial(next, iterator) <NEW_LINE> if callbacks is None: <NEW_LINE> <INDENT> callbacks = [] <NEW_LINE> <DEDENT> elif call...
The WSGI specification requires that all middlewares and gateways respect the `close` callback of an iterator. Because it is useful to add another close action to a returned iterator and adding a custom iterator is a boring task this class can be used for that:: return ClosingIterator(app(environ, start_resapp_sy...
62598f8a10dbd63aa1c7072d
class CertFiles(object): <NEW_LINE> <INDENT> CLIENT = 'client.crt' <NEW_LINE> def __init__(self, rootdir, repoid): <NEW_LINE> <INDENT> self.rootdir = os.path.join(rootdir, repoid) <NEW_LINE> self.clientcert = None <NEW_LINE> <DEDENT> def update(self, clientcert): <NEW_LINE> <INDENT> self.clientcert = clientcert <NEW_LI...
Manages the CA and client certificate files. :ivar rootdir: The root directory to write the certs. :type rootdir: str :ivar clientcert: The client key & certifiate PEM text. :type clientcert: str
62598f8a6fb2d068a7693bea
class BufferedIterator(Iterable[T]): <NEW_LINE> <INDENT> def __init__(self, original_iterator: Iterator[T], max_queue_size: int=3, enabled: bool=True): <NEW_LINE> <INDENT> self.__original_iterator = original_iterator <NEW_LINE> self.__is_enabled = enabled <NEW_LINE> if enabled: <NEW_LINE> <INDENT> self.__buffer = multi...
An iterator object that computes its elements in a parallel process, ready to be consumed. The iterator should *not* return None
62598f8ae64d504609df916d
@base.vectorize <NEW_LINE> class stmc(base.DirectMemoryWriteInstruction): <NEW_LINE> <INDENT> __slots__ = ["code"] <NEW_LINE> code = base.opcodes['STMC'] <NEW_LINE> arg_format = ['c', 'int']
STMC i n Sets memory C[n] to be the value in cint register c_i. This instruction is vectorizable
62598f8a435de62698e9b965
class Cache(object): <NEW_LINE> <INDENT> def __init__(self, cache_path): <NEW_LINE> <INDENT> self._cache_path = cache_path <NEW_LINE> self._data = None <NEW_LINE> <DEDENT> def check(self): <NEW_LINE> <INDENT> return os.path.exists(self._cache_path) <NEW_LINE> <DEDENT> def get(self): <NEW_LINE> <INDENT> if self._data is...
Utility class for managing cached data.
62598f8a8a349b6b43685dbc
class TestCase(object): <NEW_LINE> <INDENT> def __init__(self, classname, name): <NEW_LINE> <INDENT> self.classname = classname <NEW_LINE> self.name = name <NEW_LINE> self.failure = None <NEW_LINE> self.skipped = None <NEW_LINE> self.error = None <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> result = "" <N...
testcase = element testcase { attribute classname {text}, attribute name {text}, attribute time {text}, failure? }
62598f8ae76e3b2f99fd85a5
class Loader(object): <NEW_LINE> <INDENT> def __init__(self, http_client, request_headers=None): <NEW_LINE> <INDENT> self.http_client = http_client <NEW_LINE> self.request_headers = request_headers or {} <NEW_LINE> <DEDENT> def load_spec(self, spec_url, base_url=None): <NEW_LINE> <INDENT> response = request( self.http_...
Abstraction for loading Swagger API's. :param http_client: HTTP client interface. :type http_client: http_client.HttpClient :param request_headers: dict of request headers
62598f8a07d97122c421681e
class TestEotf_inverse_DCDM(unittest.TestCase): <NEW_LINE> <INDENT> def test_eotf_inverse_DCDM(self): <NEW_LINE> <INDENT> self.assertAlmostEqual(eotf_inverse_DCDM(0.0), 0.0, places=7) <NEW_LINE> self.assertAlmostEqual(eotf_inverse_DCDM(0.18), 0.11281861, places=7) <NEW_LINE> self.assertAlmostEqual(eotf_inverse_DCDM(1.0...
Define :func:`colour.models.rgb.transfer_functions.dcdm.eotf_inverse_DCDM` definition unit tests methods.
62598f8a0a50d4780f704f45
class IfElseTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> os.environ["EUPS_PATH"] = testEupsStack <NEW_LINE> self.tablefile = os.path.join(testEupsStack, "ifElse.table") <NEW_LINE> self.table = Table(self.tablefile) <NEW_LINE> self.eups = Eups() <NEW_LINE> <DEDENT> def testEmptyB...
Check that if ... else if ... else blocks work
62598f8a8e71fb1e983bb627
class covarFunc (covariance): <NEW_LINE> <INDENT> def __init__(self,**kwargs): <NEW_LINE> <INDENT> self._dict= {} <NEW_LINE> <DEDENT> def evaluate(self,x,xp): <NEW_LINE> <INDENT> return 0. <NEW_LINE> <DEDENT> def _list_params(self): <NEW_LINE> <INDENT> return self._dict.keys()
covarFunc zeroCovariance: zero covariance function
62598f8afb3f5b602db47f6c
class Charge_payment_types(extensions.ExtensionDescriptor): <NEW_LINE> <INDENT> name = "charge_payment_types" <NEW_LINE> alias = "thkcld-charge_payment_types" <NEW_LINE> namespace = "http://www.thinkcloud.com/ext/api/v1.0/thkcld-charge_payment_types" <NEW_LINE> updated = "2013-11-25T00:00:00+00:00" <NEW_LINE> def get_r...
Charge_payment_type Extension Descriptor implementation
62598f8afbf16365ca793c24
class BernoulliModel(DiscreteModel): <NEW_LINE> <INDENT> def __init__(self, num_vars, mean_prior = 0.5): <NEW_LINE> <INDENT> if num_vars <= 0: <NEW_LINE> <INDENT> raise ValueError('Must provide at least one variable to BetaBernoulliModel') <NEW_LINE> <DEDENT> self.num_vars_ = num_vars <NEW_LINE> self.mean_prior_ = mea...
Standard bernoulli model for predictions over a discrete set of candidates Attributes ---------- num_vars: :obj:`int` the number of variables to track prior_means: (float) prior on mean probabilty of success for candidates
62598f8a50485f2cf55daaec
class Settings(plams.core.settings.Settings, Storable): <NEW_LINE> <INDENT> def __getitem__(self, name): <NEW_LINE> <INDENT> return dict.__getitem__(self, name) <NEW_LINE> <DEDENT> def __setitem__(self, name, value): <NEW_LINE> <INDENT> if isinstance(value, dict): <NEW_LINE> <INDENT> value = Settings(value) <NEW_LINE> ...
This is a subclass of the :class:`plams.core.settings.Settings`. The difference with respect to plams' Settings are: - settings['a.b'] is equivalent to settings['a']['b'] = settings.a.b - in update(): settings.__block_replace = True results in removal of all existing key value pairs. __block_replace can be either in...
62598f8a656771135c4891f2
class AjaxRemoveHandler(BaseHandler): <NEW_LINE> <INDENT> @session <NEW_LINE> def post(self): <NEW_LINE> <INDENT> rly = Reply() <NEW_LINE> uid = self.SESSION['uid'] <NEW_LINE> rid = self.get_argument("id", None) <NEW_LINE> r = rly._api.remove(rid) <NEW_LINE> self.write(json.dumps('ok'))
ajax方式删除
62598f8a0a366e3fb87dc548
class _snsSlicer: <NEW_LINE> <INDENT> def __init__(self, seq): <NEW_LINE> <INDENT> self.seq = seq <NEW_LINE> <DEDENT> def __getitem__(self, item): <NEW_LINE> <INDENT> result = self.seq.index_as_cube[item] <NEW_LINE> if isinstance(item, tuple) and not isinstance(item[0], numbers.Integral): <NEW_LINE> <INDENT> result._se...
Helper class to make slicing in index_as_cube sliceable/indexable like a numpy array. Parameters ---------- seq : `ndcube.NDCubeSequence` Object of NDCubeSequence.
62598f8aa4f1c619b294e15e
class CaseRunner: <NEW_LINE> <INDENT> Outcome = namedtuple('Outcome', [ 'env', 'case', 'is_success', 'reason', ]) <NEW_LINE> def __init__(self, env_builder: VirtualEnvBuilder, logger, leaves_path=None): <NEW_LINE> <INDENT> self.env_builder = env_builder <NEW_LINE> self.logger = logger <NEW_LINE> self.leaves_path = leav...
CaseRunner is responsible for running particular test cases with different versions of libraries. After all cases the report can be generated by `report` method.
62598f8a3617ad0b5ee05cbb
class EventumError(Exception): <NEW_LINE> <INDENT> message = 'An error occurred.' <NEW_LINE> error_code = 0 <NEW_LINE> http_status_code = HTTP_INTERNAL_SERVER_ERROR <NEW_LINE> def __init__(self, *subs, **kwargs): <NEW_LINE> <INDENT> self.data = kwargs <NEW_LINE> self.error_type = self.__class__.__name__ <NEW_LINE> self...
The base error class for Eventum. All errors are subclasses of :class:`EventumError`.
62598f8ad6c5a102081e1cba
class Expression: <NEW_LINE> <INDENT> def __init__(self, impl, _expr, context=None): <NEW_LINE> <INDENT> self.impl = impl <NEW_LINE> self._expr = _expr <NEW_LINE> self.context = context <NEW_LINE> <DEDENT> def execute(self, context=None): <NEW_LINE> <INDENT> _seq = ffi.new('XQC_Sequence**') <NEW_LINE> if context is Non...
A prepared XQuery expression which can be executed
62598f8abe383301e0253374
class BatchUpdateEntitiesRequest(proto.Message): <NEW_LINE> <INDENT> parent = proto.Field(proto.STRING, number=1,) <NEW_LINE> entities = proto.RepeatedField( proto.MESSAGE, number=2, message="EntityType.Entity", ) <NEW_LINE> language_code = proto.Field(proto.STRING, number=3,) <NEW_LINE> update_mask = proto.Field( prot...
The request message for [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntities]. Attributes: parent (str): Required. The name of the entity type to update or create entities in. Format: ``projects/<Project ID>/agent/entityTypes/<Entity Type ID>``. e...
62598f8a23849d37ff850c36
class DotCollapsedDict(dict): <NEW_LINE> <INDENT> def __init__(self, d=None): <NEW_LINE> <INDENT> if d is None: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> if not isinstance(d, dict): <NEW_LINE> <INDENT> raise TypeError("Expected dictionary.") <NEW_LINE> <DEDENT> self._process_item(d) <NEW_LINE> <DEDENT> def _proces...
Collapses a multi-dimensional Python dictionary into a single dimension Python dictionary using dot notation for the keys. `` Example: {'x':1, 'a': {'b': {'c': 100}}, 'k': [1, 2, 3]} Result: {'x':1, 'a.b.c': 100, 'k[0]': 1, 'k[1]': 2, 'k[2]': 3} ``
62598f8a82261d6c5272fc91
class MissingKeySecretError(Error): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.message = message
Exception raised if the key or secret is missing for the Constellix API Attributes: message (str): explanation of the error
62598f8aa8ecb03325870d79
class SearchCallSetsRequest(_messages.Message): <NEW_LINE> <INDENT> name = _messages.StringField(1) <NEW_LINE> pageSize = _messages.IntegerField(2, variant=_messages.Variant.INT32) <NEW_LINE> pageToken = _messages.StringField(3) <NEW_LINE> variantSetIds = _messages.StringField(4, repeated=True)
The call set search request. Fields: name: Only return call sets for which a substring of the name matches this string. pageSize: The maximum number of call sets to return. If unspecified, defaults to 1000. pageToken: The continuation token, which is used to page through large result sets. To get the...
62598f8a0a50d4780f704f46
class SuffixFeature(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def convert_window(self, window): <NEW_LINE> <INDENT> result = [] <NEW_LINE> print("suff ...", end=" ") <NEW_LINE> for token in window.tokens: <NEW_LINE> <INDENT> suffix = re.sub(r"[^a-zA-ZäöüÄÖÜß\.\,\!\?]"...
Generates a feature that describes the suffix (the last three chars) of the word.
62598f8ab57a9660fecd15f4
class InputDialogPeer(TLObject): <NEW_LINE> <INDENT> __slots__: List[str] = ["peer"] <NEW_LINE> ID = 0xfcaafeb7 <NEW_LINE> QUALNAME = "types.InputDialogPeer" <NEW_LINE> def __init__(self, *, peer: "raw.base.InputPeer") -> None: <NEW_LINE> <INDENT> self.peer = peer <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read(d...
This object is a constructor of the base type :obj:`~pyrogram.raw.base.InputDialogPeer`. Details: - Layer: ``122`` - ID: ``0xfcaafeb7`` Parameters: peer: :obj:`InputPeer <pyrogram.raw.base.InputPeer>`
62598f8a004d5f362081edb5
class NotFound(HTTPError): <NEW_LINE> <INDENT> message = '{"message": "Not Found"}' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> status = "404 Not Found" <NEW_LINE> headers = {'Content-Type': 'application/json'} <NEW_LINE> HTTPError.__init__(self, status, headers, self.message)
`404 Not Found` error
62598f8a1f037a2d8b9e3c51
class get_table_descriptor_args(object): <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRING, 'session', 'UTF8', None, ), (2, TType.STRING, 'table_name', 'UTF8', None, ), ) <NEW_LINE> def __init__(self, session=None, table_name=None,): <NEW_LINE> <INDENT> self.session = session <NEW_LINE> self.table_name = table...
Attributes: - session - table_name
62598f8a21a7993f00c65aed
class SimpleLinearRegressor(MyRegressor): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> MyRegressor.__init__(self) <NEW_LINE> self.learning_type='training_based' <NEW_LINE> <DEDENT> def __sanitycheck(self,X,types): <NEW_LINE> <INDENT> if not isinstance(X, types): <NEW_LINE> <INDENT> raise ValueError("Obje...
Simple linear regression class To be used for testing the crossvalidation class
62598f8a009cb60464d010a3
class Variable_Method_Caller(object): <NEW_LINE> <INDENT> def __init__(self, variable, method): <NEW_LINE> <INDENT> self.variable = variable <NEW_LINE> self.method = method <NEW_LINE> <DEDENT> def __call__(self, *args, **kw): <NEW_LINE> <INDENT> try: 1//0 <NEW_LINE> except ZeroDivisionError: <NEW_LINE> <INDENT> frame =...
A class for finding a construction variable on the stack and calling one of its methods. We use this to support "construction variables" in our string eval()s that actually stand in for methods--specifically, use of "RDirs" in call to _concat that should actually execute the "TARGET.RDirs" method. (We used to support...
62598f8a4e696a045264dbc0
class BitrateFigure(Figure): <NEW_LINE> <INDENT> def __init__(self, model, title): <NEW_LINE> <INDENT> self.model = model <NEW_LINE> self.title = title <NEW_LINE> <DEDENT> def label(self): <NEW_LINE> <INDENT> return 'max-bitrate' <NEW_LINE> <DEDENT> def fname(self): <NEW_LINE> <INDENT> return 'max-bitrate.png' <NEW_LIN...
Max bitrate vs Elevation Figure This graph assumes normal operations and indicates the max available bitrate.
62598f8ae64d504609df916e
class EarlyStopping(): <NEW_LINE> <INDENT> def __init__(self, patience=0, verbose=0): <NEW_LINE> <INDENT> self._step = 0 <NEW_LINE> self._loss = float('inf') <NEW_LINE> self.patience = patience <NEW_LINE> self.verbose = verbose <NEW_LINE> <DEDENT> def validate(self, loss): <NEW_LINE> <INDENT> if self._loss < loss: <NEW...
This is taken from page 199 of book. Idea is to show False as soon as new loss is bigger than previous loss Class creates an object that tracks the loss of an optimization procedure. self._loss ... the lowest loss value observed until a certain point self.patience ... the number of steps the validate method should cont...
62598f8a442bda511e95bfd5
class OAuthCallback(Display): <NEW_LINE> <INDENT> link_info = Display.LinkInfo(lambda link: lambda: link, '/oauth/callback') <NEW_LINE> def __init__(self, application, consumerToken, consumerSecret, callbackLink): <NEW_LINE> <INDENT> Display.__init__(self, application, pageRoute=('/oauth/callback', None), webSocketMana...
Final stage of authorisation, twitter redirects here.
62598f8a38b623060ffa8c0e
class Projects(BaseRecipe): <NEW_LINE> <INDENT> def extract_name(self, url): <NEW_LINE> <INDENT> vcs = self.options.get('vcs', 'svn') <NEW_LINE> parts = url.split('/') <NEW_LINE> if vcs == 'svn': <NEW_LINE> <INDENT> if parts[-1] == 'trunk': <NEW_LINE> <INDENT> return parts[-2] <NEW_LINE> <DEDENT> elif parts[-2] in ('br...
Multiple project support within a single buildout section. All configuration options will be shared among the projects with the exception of the repository. For Subversion repositories it is possible to define separate branches/tags. For Git and other vcs that use the ``branch`` option the branch will be shared also.
62598f8ad53ae8145f918009
class CornersProblem(search.SearchProblem): <NEW_LINE> <INDENT> def __init__(self, startingGameState): <NEW_LINE> <INDENT> self.walls = startingGameState.getWalls() <NEW_LINE> self.startingPosition = startingGameState.getPacmanPosition() <NEW_LINE> top, right = self.walls.height-2, self.walls.width-2 <NEW_LINE> self.co...
This search problem finds paths through all four corners of a layout. You must select a suitable state space and successor function
62598f8af7d966606f747b57
class CExtensionImporter(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> for ext, mode, typ in imp.get_suffixes(): <NEW_LINE> <INDENT> if typ == imp.C_EXTENSION: <NEW_LINE> <INDENT> self._c_ext_tuple = (ext, mode, typ) <NEW_LINE> self._suffix = ext <NEW_LINE> break <NEW_LINE> <DEDENT> <DEDENT> file...
PEP-302 hook for sys.meta_path to load Python C extension modules. C extension modules are present on the sys.prefix as filenames: full.module.name.pyd full.module.name.so
62598f8a94891a1f408b94ab
class _iterator(six.Iterator): <NEW_LINE> <INDENT> def __init__(self, first_bucket, last_bucket, node_type, extractor): <NEW_LINE> <INDENT> self.bucket = first_bucket <NEW_LINE> self.last_bucket = last_bucket <NEW_LINE> self.node = self.bucket <NEW_LINE> self.node_type = node_type <NEW_LINE> self.value_type = self._val...
Iterator for Boost.Unordered types
62598f8a0a366e3fb87dc54a
class SchemeHomset_points_toric_base(SchemeHomset_points): <NEW_LINE> <INDENT> def is_finite(self): <NEW_LINE> <INDENT> variety = self.codomain() <NEW_LINE> return variety.dimension() == 0 or variety.base_ring().is_finite() <NEW_LINE> <DEDENT> def _naive_enumerator(self, ring=None): <NEW_LINE> <INDENT> from sage.scheme...
Base class for homsets with toric ambient spaces INPUT: - same as for :class:`SchemeHomset_points`. OUPUT: A scheme morphism of type :class:`SchemeHomset_points_toric_base`. EXAMPLES:: sage: P1xP1 = toric_varieties.P1xP1() sage: P1xP1(QQ) Set of rational points of 2-d CPR-Fano toric variety covere...
62598f8ad99f1b3c44d05222
class MinHeapException(Exception): <NEW_LINE> <INDENT> pass
Custom exception to be used by MinHeap class DO NOT CHANGE THIS CLASS IN ANY WAY
62598f8ad6c5a102081e1cbb
class CheckSnippet: <NEW_LINE> <INDENT> def __init__(self,name,snippet): <NEW_LINE> <INDENT> self.snippet=snippet <NEW_LINE> self.name=name <NEW_LINE> <DEDENT> def __call__(self,context): <NEW_LINE> <INDENT> context.Message('Checking snippet %s...' % (self.name,)) <NEW_LINE> result = context.TryLink(self.snippet,'.cxx'...
This just tries to compile and link a snippet of code.
62598f8a50485f2cf55daaef
@dataclass <NEW_LINE> class InMemoryHandler(StreamHandler): <NEW_LINE> <INDENT> resource: StringIO = None <NEW_LINE> def format(self, message: Message) -> str: <NEW_LINE> <INDENT> return f'{message.level.name}: {message.content}'
Messages written to in-memory `io.StringIO`.
62598f8a0383005118f6d274
class AnnAssign(mixins.AssignTypeMixin, Statement): <NEW_LINE> <INDENT> _astroid_fields = ("target", "annotation", "value") <NEW_LINE> _other_fields = ("simple",) <NEW_LINE> target = None <NEW_LINE> annotation = None <NEW_LINE> value = None <NEW_LINE> simple = None <NEW_LINE> def postinit(self, target, annotation, simp...
Class representing an :class:`ast.AnnAssign` node. An :class:`AnnAssign` is an assignment with a type annotation. >>> node = astroid.extract_node('variable: List[int] = range(10)') >>> node <AnnAssign l.1 at 0x7effe1d4c630>
62598f8ab57a9660fecd15f6
class Bunker(Sprite): <NEW_LINE> <INDENT> def __init__(self, ai_settings, screen): <NEW_LINE> <INDENT> super(Bunker, self).__init__() <NEW_LINE> self.screen = screen <NEW_LINE> self.ai_settings = ai_settings <NEW_LINE> self.bunker_frames = [] <NEW_LINE> bunker_sprite = SpriteSheet("images/SpriteSheet.png") <NEW_LINE> i...
A class to represent a single alien in the fleet.
62598f8a1f037a2d8b9e3c52
class LoadClient(locust.TaskSet, ArClient): <NEW_LINE> <INDENT> def on_start(self): <NEW_LINE> <INDENT> self.login()
Base client class for load testing purposes
62598f8a26068e7796d4c4d7
class TemplateColumn(Column): <NEW_LINE> <INDENT> empty_values = () <NEW_LINE> def __init__(self, template_code=None, template_name=None, **extra): <NEW_LINE> <INDENT> super(TemplateColumn, self).__init__(**extra) <NEW_LINE> self.template_code = template_code <NEW_LINE> self.template_name = template_name <NEW_LINE> if ...
A subclass of :class:`.Column` that renders some template code to use as the cell value. :type  template_code: `unicode` :param template_code: the template code to render :type  template_name: `unicode` :param template_name: the name of the template to render A :class:`django.templates.Template` object is created fro...
62598f8a379a373c97d98b8e
class EnumDecl: <NEW_LINE> <INDENT> def __init__(self, identifier, fields): <NEW_LINE> <INDENT> self.kind = KindEnum <NEW_LINE> self.identifier = identifier <NEW_LINE> self.fields = fields <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return 'enum %s {%s}' %(self.identifier, stringifyRange(self.fields))
introduces a new enumerated type
62598f8ab5575c28eb712a86
class DQNModel(chainer.Chain, chainerrl.q_function.StateQFunction): <NEW_LINE> <INDENT> def __init__(self, in_size, out_size, gpu_id): <NEW_LINE> <INDENT> unit_sizes = [in_size, 5, 5] <NEW_LINE> super(DQNModel, self).__init__( l_1=L.Linear(unit_sizes[0], unit_sizes[1]), l_2=L.Linear(unit_sizes[1], unit_sizes[2]), l_out...
1次元ベクトルからQ値を返すQ関数モデル。 Args: in_size: 入力される次元数 out_size: 出力される次元数 (actionの数) gpu_id (int): GPU 番号 (GPUを使わない場合は None にする)
62598f8a442bda511e95bfd7
class Lession(models.Model): <NEW_LINE> <INDENT> course = models.ForeignKey(Courseinfo, on_delete=models.CASCADE, verbose_name='课程') <NEW_LINE> name = models.CharField(verbose_name='章名', max_length=100) <NEW_LINE> add_time = models.DateTimeField(verbose_name='添加时间', default=datetime.now) <NEW_LINE> class Meta: <NEW_LIN...
章节信息,点击我要学习进入
62598f8a29b78933be269e98
class ML_FP_MultiElementFormat(ML_Compound_FP_Format): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def is_fp_multi_elt_format(format_object): <NEW_LINE> <INDENT> return isinstance(format_object, ML_FP_MultiElementFormat) <NEW_LINE> <DEDENT> def get_bit_size(self): <NEW_LINE> <INDENT> return sum([field.get_bit_size() f...
parent format for multi-precision format (single single, double double, triple double ...)
62598f8ad53ae8145f91800b
class NoNameError(Error): <NEW_LINE> <INDENT> pass
Raised when name is an empty string
62598f8a94891a1f408b94ac
class PinHandler(object): <NEW_LINE> <INDENT> def __init__(self, options=None): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def send(self, pin, serial, user, tokentype=None, logged_in_user=None, userdata=None, options=None): <NEW_LINE> <INDENT> log.info("handling pin %s for token %s of user %s" % (pin, serial, user)) ...
A PinHandler Class is responsible for handling the OTP PIN during enrollment. It receives the necessary data like * the PIN * the serial number of the token * the username * all other user data: * given name, surname * email address * telephone * mobile (if the module would deliver via SMS...
62598f8a07f4c71912baefbf
class GetUndefinedSlotDefinitionDescriptions(OptionalParameterTestFixture): <NEW_LINE> <INDENT> CATEGORY = TestCategory.DMX_SETUP <NEW_LINE> PID = 'SLOT_DESCRIPTION' <NEW_LINE> REQUIRES = ['undefined_definition_slots'] <NEW_LINE> def Test(self): <NEW_LINE> <INDENT> self.undef_slots = self.Property('undefined_definition...
Get the slot description for all slots with undefined definition.
62598f8a16aa5153ce40007e
class Feed(PostsCollection): <NEW_LINE> <INDENT> def __init__(self, posts, settings): <NEW_LINE> <INDENT> self._settings = settings <NEW_LINE> post_limit = settings['feeds']['number of posts'] <NEW_LINE> self.posts = sorted(posts, reverse=True)[:post_limit]
A generic feed for a blog
62598f8aa17c0f6771d5bdbe
class LOOM_OT_selected_makers_dialog(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "loom.render_selected_markers" <NEW_LINE> bl_label = "Render Selected Markers" <NEW_LINE> bl_options = {'REGISTER'} <NEW_LINE> all_markers: bpy.props.BoolProperty(options={'SKIP_SAVE'}) <NEW_LINE> def rangify_frames(self, frames):...
Render selected Markers in the Timeline or Dopesheet
62598f8a7cff6e4e811b558d
class ConnectMailerBackend(DefaultBackend): <NEW_LINE> <INDENT> def send_messages(self, email_messages): <NEW_LINE> <INDENT> final_messages = [] <NEW_LINE> for message in email_messages: <NEW_LINE> <INDENT> recipients = message.recipients() <NEW_LINE> for recipient in recipients: <NEW_LINE> <INDENT> name, address = ema...
Django mailer for Connect
62598f8add821e528d6d8ab7
class VisitOutcomesService(object): <NEW_LINE> <INDENT> def __init__(self, http_client): <NEW_LINE> <INDENT> self.__http_client = http_client <NEW_LINE> <DEDENT> @property <NEW_LINE> def http_client(self): <NEW_LINE> <INDENT> return self.__http_client <NEW_LINE> <DEDENT> def list(self, **params): <NEW_LINE> <INDENT> _,...
:class:`basecrm.VisitOutcomesService` is used by :class:`basecrm.Client` to make actions related to VisitOutcome resource. Normally you won't instantiate this class directly.
62598f8af8510a7c17d7df34
class cached_platform_architecture(object): <NEW_LINE> <INDENT> _arch_result = None <NEW_LINE> _orig_arch = None <NEW_LINE> _platform = None <NEW_LINE> def __enter__(self): <NEW_LINE> <INDENT> import platform <NEW_LINE> self._platform = platform <NEW_LINE> self._arch_result = platform.architecture() <NEW_LINE> self._or...
Context manager that caches ``platform.architecture``. Some things that load shared libraries (like Cryptodome, via dnspython) invoke ``platform.architecture()`` for each one. That in turn wants to fork and run commands , which in turn wants to call ``threading._after_fork`` if the GIL has been initialized. All of tha...
62598f8a50485f2cf55daaf1
class ModelsAGStat(object): <NEW_LINE> <INDENT> swagger_types = { 'group': 'str', 'stat': 'ModelsStat' } <NEW_LINE> attribute_map = { 'group': 'group', 'stat': 'stat' } <NEW_LINE> def __init__(self, group=None, stat=None): <NEW_LINE> <INDENT> self._group = None <NEW_LINE> self._stat = None <NEW_LINE> self.discriminator...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f8a82261d6c5272fc93
class Rectangle: <NEW_LINE> <INDENT> def __init__(self, width=0, height=0): <NEW_LINE> <INDENT> self.__width = width <NEW_LINE> self.__height = height <NEW_LINE> <DEDENT> @property <NEW_LINE> def width(self): <NEW_LINE> <INDENT> return self.__width <NEW_LINE> <DEDENT> @property <NEW_LINE> def height(self): <NEW_LINE> <...
Represents a Rectangle Attributes: width (int): rectangle width height (int): rectangle height
62598f8a507cdc57c63a490a
class HumanMaker(HumanPlayer, Codemaker): <NEW_LINE> <INDENT> def __init__(self, name, game): <NEW_LINE> <INDENT> super().__init__(name, game) <NEW_LINE> <DEDENT> def select_secret(self): <NEW_LINE> <INDENT> print(self.name + ", επίλεξε την μυστική κωδική λέξη.", end=" ") <NEW_LINE> print("Όταν είσαι έτοιμος/η, πάτα το...
Η κλάση των codemaker χρηστών. Η βασική λειτουργία των αντικειμένων αυτής της κλάσης είναι να αλληλεπιδρούν με τον χρήστη στο ρόλο του codemaker, δηλαδή να εισάγουν από το χρήστη την αποτίμηση των πιθανών κωδικών λέξεων που δοκιμάζει ο codebreaker σε κάθε προσπάθεια.
62598f8a26068e7796d4c4d9
class Vars(object): <NEW_LINE> <INDENT> version="1.0" <NEW_LINE> connStr = "DRIVER={{ODBC Driver 11 for SQL Server}}; SERVER={0}; DATABASE={1}; Trusted_Connection=yes;" <NEW_LINE> formatStr = "%(asctime)s - %(name)s - %(levelname)s - %(message)s" <NEW_LINE> dateFmtStr = "%Y%m%d-%H%M%S" <NEW_LINE> logFile="log\z-columnE...
Variables for the Application
62598f8aa79ad16197769be0
class Config(configparser.ConfigParser): <NEW_LINE> <INDENT> def __init__(self, configfile=None): <NEW_LINE> <INDENT> super(Config, self).__init__() <NEW_LINE> self.config_locations = [ "/etc/stormberry/config.ini", "/usr/local/etc/stormberry/config.ini", "config.ini", ] <NEW_LINE> if configfile is not None: <NEW_LINE>...
Configuration class for Weather Station
62598f8a435de62698e9b96b
class TaeminLOTD(plugin.TaeminPlugin): <NEW_LINE> <INDENT> helper = {} <NEW_LINE> def __init__(self, taemin): <NEW_LINE> <INDENT> super().__init__(taemin) <NEW_LINE> self.conf = taemin.conf.get("lotd", {}) <NEW_LINE> self.chans = self.conf.get("chans", []) <NEW_LINE> if not self.chans: <NEW_LINE> <INDENT> self.chans = ...
Taemin plugin to send new word every day
62598f8a3c8af77a43b67cf4
class BiOpExpr(Expr): <NEW_LINE> <INDENT> def __init__(self, op, left_expr, right_expr): <NEW_LINE> <INDENT> self._op = op <NEW_LINE> self._leftExpr = left_expr <NEW_LINE> self._rightExpr = right_expr <NEW_LINE> <DEDENT> def evaluate(self): <NEW_LINE> <INDENT> return self._op.execute(self._leftExpr, self._rightExpr)
Fields: _leftExpr (Expr), _rightExpr (Expr), _op (Op),
62598f8a96565a6dacd2cd36
@typing.final <NEW_LINE> class GameMode(int, Enum): <NEW_LINE> <INDENT> NONE = 0 <NEW_LINE> STORY = 2 <NEW_LINE> STRIKE = 3 <NEW_LINE> RAID = 4 <NEW_LINE> ALLPVP = 5 <NEW_LINE> PATROL = 6 <NEW_LINE> ALLPVE = 7 <NEW_LINE> RESERVED9 = 9 <NEW_LINE> CONTROL = 10 <NEW_LINE> RESERVED11 = 11 <NEW_LINE> CLASH = 12 <NEW_LINE> R...
An Enum for all available gamemodes in Destiny 2.
62598f8a94891a1f408b94ad
class ResponseCacheKey(object): <NEW_LINE> <INDENT> ALL_ITEMS_RESPONSE = 'getAllItemsResp' <NEW_LINE> SPECIFIC_ITEM_RESPONSE = 'getSpecificItemResp'
Enum like Class to Define the corresponding Keys
62598f8aa05bb46b3848a3f7
class WgElPortTaperLinear(WgElTaperLinear, __WgElPortTaper__): <NEW_LINE> <INDENT> start_process = ProcessProperty(allow_none = True, doc = "To overrule the start process, if the processes of the windows of the waveguide definition at the start port should not be used") <NEW_LINE> def define_elements(self, elems): <NEW...
Linear taper starting from ipkiss.plugins.photonics.port between two waveguide definitions of the same class
62598f8afb3f5b602db47f6f
class CmdDebugPanel(DebugPanel): <NEW_LINE> <INDENT> name = 'Cmd' <NEW_LINE> has_content = True <NEW_LINE> cmds = hasattr(settings, 'DEBUG_CMD_FUNCTIONS') and settings.DEBUG_CMD_FUNCTIONS.values() or None <NEW_LINE> def title(self): <NEW_LINE> <INDENT> return _('Cmd Debug') <NEW_LINE> <DEDENT> def...
settings.py: from debug_toolbar.utils.debug_cmd import DebugCmd ... import some callable actions ... DEBUG_CMD_FUNCTIONS = ( DebugCmd('name/id', 'verbose_name', callable[, params]) # params not implemented right ) # left it for easier function search DEBUG_CMD_FUNCTIONS = dict(((debug_cmd.name, debug_cmd) for deb...
62598f8add821e528d6d8ab9
class ISitesAdminConfig(Interface): <NEW_LINE> <INDENT> productsNotToList = schema.Text(title=u"Enter Products Id Here, One Line for Each Product", required=True)
configuration properties for sites admin. it will save properties and provides some utility services.
62598f8a8da39b475be02d60
class ExternalIFramePlugin(BasePlugin): <NEW_LINE> <INDENT> service_url = models.URLField(max_length=255) <NEW_LINE> width = models.IntegerField() <NEW_LINE> height = models.IntegerField() <NEW_LINE> def get_renderer_class(self): <NEW_LINE> <INDENT> return ExternalIFramePluginRenderer
An ExternalIFramePlugin gets its content from an external url resource through an iframe which has the content_url as its src, possibly with additional url parameters. ExternalIFramePlugin uses ExternalIFramePluginRenderer for rendering. Refer to its documentation for more information about the available url parameter...
62598f8abe383301e025337a
class SaveEvaluationPredictionHook(tf.train.SessionRunHook): <NEW_LINE> <INDENT> def __init__(self, model, output_file, post_evaluation_fn=None): <NEW_LINE> <INDENT> self._model = model <NEW_LINE> self._output_file = output_file <NEW_LINE> self._post_evaluation_fn = post_evaluation_fn <NEW_LINE> <DEDENT> def begin(self...
Hook that saves the evaluation predictions.
62598f8ac432627299fa2b49
class BounceDomain: <NEW_LINE> <INDENT> implements(IDomain) <NEW_LINE> def exists(self, user): <NEW_LINE> <INDENT> raise smtp.SMTPBadRcpt(user) <NEW_LINE> <DEDENT> def willRelay(self, user, protocol): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def addUser(self, user, password): <NEW_LINE> <INDENT> pass <NEW_L...
A domain in which no user exists. This can be used to block off certain domains.
62598f8a30dc7b766599f3d6
class Chain: <NEW_LINE> <INDENT> def __init__(self, chainID): <NEW_LINE> <INDENT> self.chainID = chainID <NEW_LINE> self.residues = [] <NEW_LINE> <DEDENT> def get(self, name): <NEW_LINE> <INDENT> if name == "atoms": self.getAtoms() <NEW_LINE> else: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> item = getattr(self, name)...
Chain class The chain class contains information about each chain within a given Protein object.
62598f8a8a43f66fc4bf1d02
class CursorManager(object): <NEW_LINE> <INDENT> def __init__(self, client): <NEW_LINE> <INDENT> warnings.warn( "Cursor managers are deprecated.", DeprecationWarning, stacklevel=2) <NEW_LINE> self.__client = weakref.ref(client) <NEW_LINE> <DEDENT> def close(self, cursor_id, address): <NEW_LINE> <INDENT> if not isinstan...
DEPRECATED - The cursor manager base class.
62598f8adc8b845886d53136
class UserList(MutableSequence): <NEW_LINE> <INDENT> def __init__(self, initlist=None): <NEW_LINE> <INDENT> self.data = [] <NEW_LINE> if initlist is not None: <NEW_LINE> <INDENT> if type(initlist) == type(self.data): <NEW_LINE> <INDENT> self.data[:] = initlist <NEW_LINE> <DEDENT> elif isinstance(initlist, UserList): <N...
A more or less complete user-defined wrapper around list objects.
62598f8a91af0d3eaad3997c
class Source(MemoizedObject, FilteredObject): <NEW_LINE> <INDENT> memoization_keys = ('attendee', 'resource') <NEW_LINE> propagate_memoization_keys = True <NEW_LINE> @classmethod <NEW_LINE> def transform_memoization_keys(cls, attendee, resource): <NEW_LINE> <INDENT> if isinstance(attendee, basestring): <NEW_LINE> <INDE...
Represents a project to build.
62598f8a3cc13d1c6d4652e5
class Selection(AtomSubset): <NEW_LINE> <INDENT> __slots__ = ['_ag', '_indices', '_acsi', '_selstr'] <NEW_LINE> def __init__(self, ag, indices, selstr, acsi=None, **kwargs): <NEW_LINE> <INDENT> kwargs['selstr'] = selstr <NEW_LINE> AtomSubset.__init__(self, ag, indices, acsi, **kwargs) <NEW_LINE> <DEDENT> def __repr__(s...
A class for accessing and manipulating attributes of selection of atoms in an :class:`~.AtomGroup` instance. Instances can be generated using :meth:`~.AtomGroup.select` method. Following built-in functions are customized for this class: * :func:`len` returns the number of selected atoms * :func:`iter` yields :clas...
62598f8a63d6d428bbee2337
class WebAlertHTMLToTextTest(InvenioTestCase): <NEW_LINE> <INDENT> def test_your_alerts_pages_availability(self): <NEW_LINE> <INDENT> get_as_text = lazy_import('invenio.legacy.webalert.htmlparser:get_as_text') <NEW_LINE> out = get_as_text(5) <NEW_LINE> self.assertIn("High energy cosmic rays striking atoms at the top of...
Check that HTML is properly converted to text.
62598f8a6aa9bd52df0d4a52
class DiscPolicy(nn.Module): <NEW_LINE> <INDENT> def __init__(self, state_dim, action_dim, init, hidden_sizes=HIDDEN_SIZES, time_in_state=False, share_weights=False): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.activation = ACTIVATION() <NEW_LINE> self.time_in_state = time_in_state <NEW_LINE> self.discrete =...
A discrete policy using a fully connected neural network. The parameterizing tensor is a categorical distribution over actions
62598f8a6fb2d068a7693bee
@util.export <NEW_LINE> class Plugin(plugin.PluginBase): <NEW_LINE> <INDENT> def __init__(self, context): <NEW_LINE> <INDENT> super(Plugin, self).__init__(context=context) <NEW_LINE> self._enabled = False <NEW_LINE> <DEDENT> @plugin.event( stage=plugin.Stages.STAGE_MISC, after=( oclcons.Stages.DB_CL_SCHEMA, ), conditio...
Cinderlib Misc plugin.
62598f8a8c0ade5d55dc344a
class Detrend: <NEW_LINE> <INDENT> def __init__(self, type: str = "linear"): <NEW_LINE> <INDENT> self.type = type <NEW_LINE> <DEDENT> @profile <NEW_LINE> def process(self, data : ndarray) -> ndarray: <NEW_LINE> <INDENT> return signal.detrend(data=data, type=self.type)
This class removes the mean value or linear trend from a N-dimensional array, usually for FFT processing. The algorithm computes the least-squares fit of a straight line (or composite line for piecewise linear trends) to the data and subtracts the resulting function from the data.
62598f8a38b623060ffa8c14
class TreeNode: <NEW_LINE> <INDENT> def __init__(self, depth): <NEW_LINE> <INDENT> self.depth = depth <NEW_LINE> self.parent = None <NEW_LINE> self.adj = [] <NEW_LINE> if depth-1 > 0: <NEW_LINE> <INDENT> for child_idx in range(2): <NEW_LINE> <INDENT> child = type(self)(depth-1) <NEW_LINE> child.parent = self <NEW_L...
Binary tree for testing Simple binary tree for testing graph algorithms TreeNode(max_depth) -> graph-vertex Nodes are created at depths [max_depth, 1] depth == 0 is empty, this makes the subtree_size formula work
62598f8b0a50d4780f704f4d
class ProjectXL(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.postgres_connection = OGeoDB()
This Class prepare a XL project session owned by and customized for the local user - Build an appropriate File Tree - Shelve custom metatada for project persitence, allow to start/end/reload a project session - Start a QGIS project serving allowed data out of the SIG40 DB
62598f8b0a366e3fb87dc550
class PolynomialLR(_LRScheduler): <NEW_LINE> <INDENT> def __init__(self, optimizer, T_max, power, last_epoch=-1): <NEW_LINE> <INDENT> self.T_max = T_max <NEW_LINE> self.power = power <NEW_LINE> super(PolynomialLR, self).__init__(optimizer, last_epoch) <NEW_LINE> <DEDENT> def get_lr(self): <NEW_LINE> <INDENT> return [ b...
Set the learning rate for each parameter group using a polynomial defined as: lr = base_lr * (1 - T_cur/T_max) ^ (power), where T_cur is the current epoch and T_max is the maximum number of epochs. Args: optimizer (Optimizer): Wrapped optimizer. T_max (int): Maximum number of epochs power (int): Degree of ...
62598f8bbde94217f3707426
class landed_cost_distribution_type(orm.Model): <NEW_LINE> <INDENT> _inherit = "landed.cost.distribution.type" <NEW_LINE> _columns = { 'landed_cost_type': fields.selection( [('value', 'Value'), ('per_unit', 'Quantity'), ('volume', 'Volume'), ('weight', 'Weight')], 'Product Landed Cost Type', help="Refer to the product ...
This is a model to give how we should distribute the amount given for a landed costs. At the begining we use a selection field, but it was impossible to filter it depending on the context (in a line or on order). So we replaced it by this object, adding is_* method to deal with. Base distribution are defined in YML fil...
62598f8b435de62698e9b96e
class QuestionNumber(RunestoneDirective): <NEW_LINE> <INDENT> required_arguments = 0 <NEW_LINE> optional_arguments = 3 <NEW_LINE> has_content = False <NEW_LINE> option_spec = { "prefix": directives.unchanged, "suffix": directives.unchanged, "start": directives.positive_int, } <NEW_LINE> def run(self): <NEW_LINE> <INDEN...
Set Parameters for Question Numbering: .. code-block:: rst :linenos: .. qnum:: 'prefix': character prefix before the number 'suffix': character prefix after the number 'start': start numbering with this value For example: .. code-block:: rst :linenos: .. qnum:: :pref...
62598f8b15baa72349461aff
class _RetrievableText(TextInput): <NEW_LINE> <INDENT> def __init__(self,isList,autoNewline=False,**kwargs): <NEW_LINE> <INDENT> super(_RetrievableText,self).__init__(**kwargs) <NEW_LINE> self.isList=isList <NEW_LINE> if autoNewline: <NEW_LINE> <INDENT> def insert_text(substring,from_undo=False): <NEW_LINE> <INDENT> if...
TextInput that has a getValue function to, well, get its value. Inputs that should be lists must be separated by commas without spaces.
62598f8bb57a9660fecd15fc
class ATPeriodCriteria(ATBaseCriterion): <NEW_LINE> <INDENT> implements(IATPeriodCriteria) <NEW_LINE> security = ClassSecurityInfo() <NEW_LINE> schema = PeriodCriteriaSchema <NEW_LINE> meta_type = 'ATPeriodCriteria' <NEW_LINE> archetype_name = 'Period Date Criteria' <NEW_LINE> shortDesc = _(u'Pe...
A relative date criterion
62598f8b45492302aabfc055
class PunctuationRemovalFilter(TextFilter): <NEW_LINE> <INDENT> def _filter(self, stim): <NEW_LINE> <INDENT> pattern = '[%s]' % re.escape(string.punctuation) <NEW_LINE> text = re.sub(pattern, '', stim.text) <NEW_LINE> return TextStim(stim.filename, text)
Removes punctuation from a TextStim.
62598f8b63d6d428bbee2338
class User(object): <NEW_LINE> <INDENT> def get_id(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return text_type(self.id) <NEW_LINE> <DEDENT> except AttributeError: <NEW_LINE> <INDENT> raise NotImplementedError('No `id` attribute - override `get_id`') <NEW_LINE> <DEDENT> <DEDENT> def __eq__(self, other): <NEW_LI...
This provides implementations for the methods that Flask-Login expects user objects to have.
62598f8bb57a9660fecd15fd
class cd: <NEW_LINE> <INDENT> def __init__(self, newPath): <NEW_LINE> <INDENT> self.newPath = newPath if len(newPath) > 0 else "." <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> self.savedPath = os.getcwd() <NEW_LINE> os.chdir(self.newPath) <NEW_LINE> <DEDENT> def __exit__(self, etype, value, traceback): ...
Context manager for changing the current working directory
62598f8b8a349b6b43685dc6
class Namelist_GROUPS(VariableTree): <NEW_LINE> <INDENT> usefle = Bool(False, desc='True - Use grid timing information in grdwghts.restart for MPI load balancing, if available. (Equivalent to GRDWTS in $GLOBAL.)\n' 'False - Use normal load-balancing algorithm.') <NEW_LINE> maxnb = Int(0, desc='0 - Use automatic splitti...
VariableTree for the GROUPS namelist. Contains load balance input (OVERFLOW-D only.)
62598f8bb5575c28eb712a89
class TextWidget(Widget): <NEW_LINE> <INDENT> def _parse(self, request): <NEW_LINE> <INDENT> Widget._parse(self, request) <NEW_LINE> if self.value and self.value.find("\r\n") >= 0: <NEW_LINE> <INDENT> self.value = self.value.replace("\r\n", "\n") <NEW_LINE> <DEDENT> <DEDENT> def render_content(self): <NEW_LINE> <INDENT...
Widget for entering a long, multi-line string; corresponds to the HTML "<textarea>" tag. Instance attributes: value : string
62598f8b38b623060ffa8c16
class AllPermissionsList: <NEW_LINE> <INDENT> def __iter__(self): <NEW_LINE> <INDENT> return iter(()) <NEW_LINE> <DEDENT> def __contains__(self, other): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return isinstance(other, self.__class__)
Stand in 'permission list' to represent all permissions
62598f8b23e79379d538c07e