code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class WeightedEdge(): <NEW_LINE> <INDENT> def __init__(self, end_node, weight): <NEW_LINE> <INDENT> self.end_node = end_node <NEW_LINE> self.weight = weight
This represents the relationship between two nodes and the strength of the relationship
62598fbc4527f215b58ea08e
class RunningAverage(): <NEW_LINE> <INDENT> def __init__(self, arrLength, averageNumber): <NEW_LINE> <INDENT> self.historyArray = numpy.zeros((averageNumber,arrLength)) <NEW_LINE> self.averageNumber = averageNumber <NEW_LINE> self.counter = 0 <NEW_LINE> self.filled = False <NEW_LINE> <DEDENT> def add(self, addition): <...
Allows for smoothing of input data by taking a running average
62598fbc3317a56b869be62b
class TcpClient(LinkClient): <NEW_LINE> <INDENT> def _runLinkClient(self): <NEW_LINE> <INDENT> while not self.isfini: <NEW_LINE> <INDENT> sock = self._runConnLoop() <NEW_LINE> if sock == None: <NEW_LINE> <INDENT> break <NEW_LINE> <DEDENT> self.fire('link:sock:init',sock=sock) <NEW_LINE> for mesg in sock: <NEW_LINE> <IN...
Implements a TCP client synapse LinkRelay.
62598fbc3d592f4c4edbb078
class Orderable(with_metaclass(OrderableBase, models.Model)): <NEW_LINE> <INDENT> _order = models.IntegerField(_("Order"), null=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> <DEDENT> def with_respect_to(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> name = self.order_with_respect_to <...
Abstract model that provides a custom ordering integer field similar to using Meta's ``order_with_respect_to``, since to date (Django 1.2) this doesn't work with ``ForeignKey("self")``, or with Generic Relations. We may also want this feature for models that aren't ordered with respect to a particular field.
62598fbc26068e7796d4cb14
class Bootstrap4CardInnerPlugin(CMSPluginBase): <NEW_LINE> <INDENT> model = Bootstrap4CardInner <NEW_LINE> name = _('Card inner') <NEW_LINE> module = _('Bootstrap 4') <NEW_LINE> render_template = 'djangocms_bootstrap4/card.html' <NEW_LINE> change_form_template = 'djangocms_bootstrap4/admin/card.html' <NEW_LINE> allow_c...
Components > "Card - Inner" Plugin (Header, Footer, Body) https://getbootstrap.com/docs/4.0/components/card/
62598fbca219f33f346c69bf
class UpdateBotInlineQuery(TLObject): <NEW_LINE> <INDENT> __slots__ = ["query_id", "user_id", "query", "offset", "geo"] <NEW_LINE> ID = 0x54826690 <NEW_LINE> QUALNAME = "types.UpdateBotInlineQuery" <NEW_LINE> def __init__(self, *, query_id: int, user_id: int, query: str, offset: str, geo=None): <NEW_LINE> <INDENT> self...
Attributes: LAYER: ``112`` Attributes: ID: ``0x54826690`` Parameters: query_id: ``int`` ``64-bit`` user_id: ``int`` ``32-bit`` query: ``str`` offset: ``str`` geo (optional): Either :obj:`GeoPointEmpty <pyrogram.api.types.GeoPointEmpty>` or :obj:`GeoPoint <pyrogram.api.types.GeoPoint>`
62598fbc796e427e5384e94f
class UnderMapDialogTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.dialog = UnderMapDialog(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.button...
Test dialog works.
62598fbc7c178a314d78d659
class Pushover(object): <NEW_LINE> <INDENT> base_uri = 'https://api.pushover.net' <NEW_LINE> def __init__(self, module, user, token): <NEW_LINE> <INDENT> self.module = module <NEW_LINE> self.user = user <NEW_LINE> self.token = token <NEW_LINE> <DEDENT> def run(self, priority, msg): <NEW_LINE> <INDENT> url = '%s/1/messa...
Instantiates a pushover object, use it to send notifications
62598fbc7b180e01f3e4912c
class TriangleTyper: <NEW_LINE> <INDENT> epsilon = 1e-6 <NEW_LINE> @staticmethod <NEW_LINE> @list_unfolder <NEW_LINE> def compute_type(a, b, c): <NEW_LINE> <INDENT> assert(isinstance(a, numbers.Real)) <NEW_LINE> assert(isinstance(b, numbers.Real)) <NEW_LINE> assert(isinstance(c, numbers.Real)) <NEW_LINE> assert(a >= 0)...
Helper class to decide a triangle type: Equilateral, Isocele or Scalene
62598fbc167d2b6e312b7130
class ForceDefaultLanguageMiddleware(object): <NEW_LINE> <INDENT> def process_request(self, request): <NEW_LINE> <INDENT> request.META.pop('HTTP_ACCEPT_LANGUAGE', None)
Ignore Accept-Language HTTP headers This will force the I18N machinery to always choose settings.LANGUAGE_CODE as the default initial language, unless another one is set via sessions or cookies Should be installed *before* any middleware that checks request.META['HTTP_ACCEPT_LANGUAGE'], namely django.middleware.local...
62598fbc7d43ff24874274e1
class _WalkerEvent(Event): <NEW_LINE> <INDENT> def __init__(self, walker, queue, row): <NEW_LINE> <INDENT> Event.__init__(self, queue, row) <NEW_LINE> self._walker = walker <NEW_LINE> <DEDENT> def tag_done(self): <NEW_LINE> <INDENT> self._walker.tag_event_done(self) <NEW_LINE> <DEDENT> def tag_retry(self, retry_time = ...
Redirects status flags to BatchWalker. That way event data can gc-d immidiately and tag_done() events dont need to be remembered.
62598fbcec188e330fdf8a4c
class InformationObject(BaseModel): <NEW_LINE> <INDENT> def raise_for_json_error(self, json_response, request_url): <NEW_LINE> <INDENT> if 'message' in json_response: <NEW_LINE> <INDENT> if 'information object not found' in json_response['message'].lower(): <NEW_LINE> <INDENT> raise ConnectionError(f'No information obj...
Browse for or read information objects. Browsing involves searching for information objects, while reading involves fetching the metadata for a single object.
62598fbc01c39578d7f12f35
@parser(Specs.keystone_log) <NEW_LINE> class KeystoneLog(LogFileOutput): <NEW_LINE> <INDENT> pass
Class for parsing ``/var/log/keystone/keystone.log`` file. .. note:: Please refer to its super-class :class:`insights.core.LogFileOutput`
62598fbc851cf427c66b8470
class RCNonSimplyLacedElement(RiggedConfigurationElement): <NEW_LINE> <INDENT> def to_virtual_configuration(self): <NEW_LINE> <INDENT> return self.parent().to_virtual(self) <NEW_LINE> <DEDENT> def e(self, a): <NEW_LINE> <INDENT> vct = self.parent()._folded_ct <NEW_LINE> L = [] <NEW_LINE> gamma = vct.scaling_factors() <...
Rigged configuration elements for non-simply-laced types. TESTS:: sage: RC = RiggedConfigurations(['C',2,1], [[1,2],[1,1],[2,1]]) sage: elt = RC(partition_list=[[3],[2]]); elt <BLANKLINE> 0[ ][ ][ ]0 <BLANKLINE> 0[ ][ ]0 sage: TestSuite(elt).run()
62598fbc377c676e912f6e4e
class CategoricalColumn(FeatureColumn): <NEW_LINE> <INDENT> IdWeightPair = collections.namedtuple( 'IdWeightPair', ('id_tensor', 'weight_tensor')) <NEW_LINE> @abc.abstractproperty <NEW_LINE> def num_buckets(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def get_sparse_tensors(self, t...
Represents a categorical feature. A categorical feature typically handled with a `tf.sparse.SparseTensor` of IDs.
62598fbc4527f215b58ea08f
class vtclinearEquation(myObject): <NEW_LINE> <INDENT> def __init__(self, c, ySpan): <NEW_LINE> <INDENT> typeTest([Num.constum, mSpan], c, ySpan) <NEW_LINE> self.args = (c, ySpan) <NEW_LINE> self.c = c <NEW_LINE> self.ySpan = ySpan
x = c for y in ySpan
62598fbc67a9b606de546187
class RevocationCheckError(OperationalError): <NEW_LINE> <INDENT> def exception_telemetry(self, msg, cursor, connection): <NEW_LINE> <INDENT> pass
Exception for errors during certificate revocation check.
62598fbc26068e7796d4cb16
class GetResourceTests(unittest.TestCase): <NEW_LINE> <INDENT> def test_get_resource(self): <NEW_LINE> <INDENT> for res in ('credential', 'group', 'host', 'inventory', 'job_template', 'job', 'organization', 'project', 'team', 'user'): <NEW_LINE> <INDENT> tower_cli.get_resource(res)
Establish that the `tower_cli.get_resource` method works in the way that it should.
62598fbc7c178a314d78d65b
class Splitters(pasoFunction): <NEW_LINE> <INDENT> @pasoDecorators.InitWrap() <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.inplace = False <NEW_LINE> return self <NEW_LINE> <DEDENT> @pasoDecorators.TTWrapXy(array=False) <NEW_LINE> def transform(self, X, y, **kwargs): <...
Input returns dataset. Tne metadata is the instance attibutesof Inputer prperties. Note: Warning:
62598fbc7cff6e4e811b5bde
class GetBoost: <NEW_LINE> <INDENT> MINIMUM_BOOST_LEVEL = 90 <NEW_LINE> BOOST_MAP = { 'blue': [3, 4], 'red': [29, 30], 'mid': [15, 18], 'any': [3, 4, 15, 18, 29, 30] } <NEW_LINE> def __init__(self, which_boost: str = 'any'): <NEW_LINE> <INDENT> self.which_boost = which_boost <NEW_LINE> self.agent: Optional[GoslingAgent...
Drives towards the nearest active boost in the specified area. If no active boost is found, waits on the nearest pad. Only considers large boost pads. :param which_boost: Which region of the map to drive to. Either blue, red, mid, any :type which_boost: str
62598fbc091ae35668704ddf
class OneOfEach(TBase): <NEW_LINE> <INDENT> def __init__(self, im_true=None, im_false=None, a_bite=127, integer16=32767, integer32=None, integer64=10000000000, double_precision=None, some_characters=None, zomg_unicode=None, what_who=None, base64=None, byte_list=[ 1, 2, 3, ], i16_list=[ 1, 2, 3, ], i64_list=[ 1, 2, 3, ]...
Attributes: - im_true - im_false - a_bite - integer16 - integer32 - integer64 - double_precision - some_characters - zomg_unicode - what_who - base64 - byte_list - i16_list - i64_list
62598fbc97e22403b383b0c3
class SyntaxData(syndata.SyntaxDataBase): <NEW_LINE> <INDENT> def __init__(self, langid): <NEW_LINE> <INDENT> super(SyntaxData, self).__init__(langid) <NEW_LINE> self.SetLexer(stc.STC_LEX_PASCAL) <NEW_LINE> <DEDENT> def GetKeywords(self): <NEW_LINE> <INDENT> return [PAS_KEYWORDS, PAS_CLASSWORDS] <NEW_LINE> <DEDENT> def...
SyntaxData object for Pascal
62598fbca8370b77170f059c
@python_2_unicode_compatible <NEW_LINE> class FilersCd(CalAccessBaseModel): <NEW_LINE> <INDENT> UNIQUE_KEY = "FILER_ID" <NEW_LINE> filer_id = fields.IntegerField( verbose_name='filer ID', db_column='FILER_ID', null=True, db_index=True, help_text="Filer's unique identification number", ) <NEW_LINE> class Meta: <NEW_LINE...
This table is the parent table from which all links and associations to a filer are derived.
62598fbc167d2b6e312b7132
class authenticated(object): <NEW_LINE> <INDENT> error = _("Only valid users may access this function") <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return "authenticated" <NEW_LINE> <DEDENT> def __init__(self): <NEW_LINE> <INDENT> self.instance = None <NEW_LINE> self.function = None <NEW_LINE> self.f_args = None ...
A condition class to be used with the @require decorator that returns True if the user is authenticated. .. note:: Only meant to be used with WebSockets. `tornado.web.RequestHandler` instances can use `@tornado.web.authenticated`
62598fbc9f28863672818959
class Propagator(object): <NEW_LINE> <INDENT> def __init__(self, num_error=10**(-18), regime='SIL'): <NEW_LINE> <INDENT> self.num_error=num_error <NEW_LINE> self.regime=regime <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def propagate_wave_function(wf_init, hamilt, NK=10, dt=1., maxel=None, num_error=10**(-18), regime=...
docstring for Propagator
62598fbc5fc7496912d48359
class LoanApplicationObject(Model): <NEW_LINE> <INDENT> def __init__(self, loan_application: LoanApplication=None): <NEW_LINE> <INDENT> self.swagger_types = { 'loan_application': LoanApplication } <NEW_LINE> self.attribute_map = { 'loan_application': 'loanApplication' } <NEW_LINE> self._loan_application = loan_applicat...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fbc377c676e912f6e4f
class NDEx: <NEW_LINE> <INDENT> def __init__(self, uri="http://public.ndexbio.org"): <NEW_LINE> <INDENT> ndex_creds = os.path.expanduser("~/.ndex") <NEW_LINE> if os.path.exists (ndex_creds): <NEW_LINE> <INDENT> with open(ndex_creds, "r") as stream: <NEW_LINE> <INDENT> ndex_creds_obj = json.loads (stream.read ()) <NEW_L...
An interface to the NDEx network catalog.
62598fbce1aae11d1e7ce903
class MatchesScoreVote(models.Model): <NEW_LINE> <INDENT> tourney = models.ForeignKey('Tournament') <NEW_LINE> match = models.ForeignKey('Match') <NEW_LINE> user = models.ForeignKey(settings.AUTH_USER_MODEL) <NEW_LINE> entry_id = models.ForeignKey('MatchesTeam') <NEW_LINE> entry_val = models.IntegerField()
"tournament_matches_score_votes" => "id BIGINT NOT NULL auto_increment, tourneyid BIGINT NOT NULL, matchid BIGINT NOT NULL, userid BIGINT NOT NULL, entry_id BIGINT NOT NULL, entry_val int(10) NOT NULL, PRIMARY KEY (id)",
62598fbc956e5f7376df575c
class DataForm(object): <NEW_LINE> <INDENT> def __init__(self, name: str): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.fields = {}
a top-level variable holding persistent state
62598fbcbe7bc26dc9251f3a
class FunctionBlock(Block): <NEW_LINE> <INDENT> def __init__(self, func_type, name, args, contents=None, sticky_front=None, sticky_end=None, before=None, after=None, variables=None): <NEW_LINE> <INDENT> super(FunctionBlock, self).__init__( contents=contents, sticky_front=sticky_front, sticky_end=sticky_end, before=befo...
Block for functions. func_type: Data type to be returned by the func. (int, float, etc.) name: Function name args: List of tuples containing CArguments. contents: List of blocks to fill this block with.
62598fbc56ac1b37e63023aa
class Student(Base): <NEW_LINE> <INDENT> __tablename__ = "students" <NEW_LINE> id = Column(Integer, primary_key=True, index=True) <NEW_LINE> name = Column(String) <NEW_LINE> address = Column(String) <NEW_LINE> neighbour = Column(String) <NEW_LINE> city = Column(String) <NEW_LINE> state = Column(String) <NEW_LINE> posta...
Modelo de dados para persistir as informações dos estudantes.
62598fbc99fddb7c1ca62eca
class AdminOnlyAuthenticationMiddleware(AuthenticationMiddleware): <NEW_LINE> <INDENT> def process_request(self, request): <NEW_LINE> <INDENT> if request.path.startswith(reverse('admin:index')): <NEW_LINE> <INDENT> super(AdminOnlyAuthenticationMiddleware, self).process_request(request)
Only do the session authentication stuff for admin urls. The frontend relies on auth tokens so we clear the user.
62598fbc283ffb24f3cf3a40
class login(): <NEW_LINE> <INDENT> def user_login(self,driver,username,password): <NEW_LINE> <INDENT> driver.find_element_by_xpath('//*[@id="app"]/div[3]/a[1]').click() <NEW_LINE> driver.find_element_by_xpath('//*[@id="app"]/div[3]/input[1]').clear() <NEW_LINE> driver.find_element_by_xpath('//*[@id="app"]/div[3]/input[...
登录
62598fbc1f5feb6acb162ddd
class TimerDict(dict): <NEW_LINE> <INDENT> def stopTimer(self, k, v=None): <NEW_LINE> <INDENT> v = v or self.get(k) <NEW_LINE> if v and hasattr(v, "stop"): <NEW_LINE> <INDENT> v.stop() <NEW_LINE> <DEDENT> return bool(v) <NEW_LINE> <DEDENT> def setdefault(self, k, d=None): <NEW_LINE> <INDENT> self.stopTimer(k) <NEW_LINE...
全局定时器字典 {name: timer} 重载部分方法和操作符,防止timer内存泄漏
62598fbc3617ad0b5ee06303
class DiagonalConnection(Connection): <NEW_LINE> <INDENT> def __init__(self, connectionMetaData, columnLengthFactor, beamLengthFactor, gussetLengthFactor, beamsShearEfficiency, boltedPlateTemplate, intermediateJoint): <NEW_LINE> <INDENT> super(DiagonalConnection,self).__init__(connectionMetaData, columnLengthFactor, be...
Connection that has one or more diagonals.
62598fbc4428ac0f6e6586e1
class CountingScheduler: <NEW_LINE> <INDENT> def __init__(self, max_computes=0): <NEW_LINE> <INDENT> self.total_computes = 0 <NEW_LINE> self.max_computes = max_computes <NEW_LINE> <DEDENT> def __call__(self, dsk, keys, **kwargs): <NEW_LINE> <INDENT> self.total_computes += 1 <NEW_LINE> if self.total_computes > self.max_...
Simple dask scheduler counting the number of computes. Reference: https://stackoverflow.com/questions/53289286/
62598fbc4c3428357761a479
class NoExtensionException(Exception): <NEW_LINE> <INDENT> pass
Raise if extension wasn't found.
62598fbc4f88993c371f05e7
class Http11TestCase(HttpTestCase): <NEW_LINE> <INDENT> download_handler_cls = HTTP11DownloadHandler <NEW_LINE> def test_download_without_maxsize_limit(self): <NEW_LINE> <INDENT> request = Request(self.getURL('file')) <NEW_LINE> d = self.download_request(request, Spider('foo')) <NEW_LINE> d.addCallback(lambda r: r.body...
HTTP 1.1 test case
62598fbc50812a4eaa620cca
class nlpruError(Exception): <NEW_LINE> <INDENT> def __init__(self, reason): <NEW_LINE> <INDENT> Exception.__init__(self, reason)
The main exception handler for nlpru
62598fbc442bda511e95c61a
class MedicinalProductManufactured(domainresource.DomainResource): <NEW_LINE> <INDENT> resource_type = "MedicinalProductManufactured" <NEW_LINE> def __init__(self, jsondict=None, strict=True, **kwargs): <NEW_LINE> <INDENT> self.ingredient = None <NEW_LINE> self.manufacturedDoseForm = None <NEW_LINE> self.manufacturer =...
The manufactured item as contained in the packaged medicinal product.
62598fbc7b180e01f3e4912e
class LoginAPI(generics.GenericAPIView): <NEW_LINE> <INDENT> serializer_class = LoginSerializer <NEW_LINE> def post(self, request, *args, **kwargs): <NEW_LINE> <INDENT> serializer = self.get_serializer(data=request.data) <NEW_LINE> serializer.is_valid(raise_exception=True) <NEW_LINE> user = serializer.validated_data <N...
API for Login. Takes email and password
62598fbc099cdd3c636754c1
class ActiveInstance(ExtendTable): <NEW_LINE> <INDENT> __tablename__ = 'active_instance' <NEW_LINE> __schema__ = [ Column('dummy_key', Integer, primary_key=True), Column('identity', pg.BYTEA(16)), Column('last_ping', DateTime), ]
Table to organize multiple orchestrator instances.
62598fbcad47b63b2c5a7a13
class Inverter(SensorEntity): <NEW_LINE> <INDENT> def __init__( self, uid, serial, key, unit, state_class=None, device_class=None, ): <NEW_LINE> <INDENT> self.uid = uid <NEW_LINE> self.serial = serial <NEW_LINE> self.key = key <NEW_LINE> self.value = None <NEW_LINE> self.unit = unit <NEW_LINE> self._attr_state_class = ...
Class for a sensor.
62598fbc956e5f7376df575d
class SignupForm(AllAuthSignupForm): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(SignupForm, self).__init__(*args, **kwargs) <NEW_LINE> self.helper = FormHelper() <NEW_LINE> self.helper.form_id = 'signup-form' <NEW_LINE> self.helper.form_class = 'form-horizontal' <NEW_LINE> self.h...
Shouldn't rewrite any functionality from allauth.accounts.forms.SignUpForm, just plug crispy forms in
62598fbc55399d3f056266d3
class Comment(models.Model): <NEW_LINE> <INDENT> author = models.ForeignKey(User, verbose_name='Автор комментария') <NEW_LINE> blank = models.ForeignKey(Blank, verbose_name='Название бланка') <NEW_LINE> date_added = models.DateTimeField('Дата добавления', auto_now_add=True) <NEW_LINE> body = models.TextField('Текст') <...
Комментарии текущего бланка
62598fbc56ac1b37e63023ac
class Image(ImmutableObject): <NEW_LINE> <INDENT> uri = None <NEW_LINE> width = None <NEW_LINE> height = None
:param string uri: URI of the image :param int width: Optional width of image or :class:`None` :param int height: Optional height of image or :class:`None`
62598fbc0fa83653e46f50a3
class FileCache(BaseCache): <NEW_LINE> <INDENT> def __init__(self, path, timeout=settings.FILE_CACHE_TIMEOUT): <NEW_LINE> <INDENT> self._dir = path <NEW_LINE> self._default_timeout = timeout <NEW_LINE> <DEDENT> def _key_to_filename(self, key): <NEW_LINE> <INDENT> digest = md5hex(key) <NEW_LINE> return os.path.join(self...
A file cache which fixes bugs and misdesign in django default one. Uses mtimes in the future to designate expire time. This makes unnecessary reading stale files.
62598fbc283ffb24f3cf3a42
class LeadSentenceSelector(BaseContentSelector): <NEW_LINE> <INDENT> def select_content(self, documents, args): <NEW_LINE> <INDENT> selected_content = [] <NEW_LINE> for doc in documents: <NEW_LINE> <INDENT> lead_sentence = doc.get_sen_bypos(0) <NEW_LINE> lead_sentence.order_by = int(doc.date + doc.art_id) <NEW_LINE> se...
Functions to summarize documents
62598fbc4a966d76dd5ef092
class GetTimeEstimatesInputSet(InputSet): <NEW_LINE> <INDENT> def set_CustomerID(self, value): <NEW_LINE> <INDENT> super(GetTimeEstimatesInputSet, self)._set_input('CustomerID', value) <NEW_LINE> <DEDENT> def set_ProductID(self, value): <NEW_LINE> <INDENT> super(GetTimeEstimatesInputSet, self)._set_input('ProductID', v...
An InputSet with methods appropriate for specifying the inputs to the GetTimeEstimates Choreo. The InputSet object is used to specify input parameters when executing this Choreo.
62598fbc44b2445a339b6a55
class CopyToTable(luigi.task.MixinNaiveBulkComplete, luigi.Task): <NEW_LINE> <INDENT> @abc.abstractproperty <NEW_LINE> def host(self): <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> @abc.abstractproperty <NEW_LINE> def database(self): <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> @abc.abstractproperty <NEW_L...
An abstract task for inserting a data set into RDBMS. Usage: Subclass and override the following attributes: * `host`, * `database`, * `user`, * `password`, * `table` * `columns`
62598fbc3d592f4c4edbb07d
class MirraApp(main.App): <NEW_LINE> <INDENT> def setUp(self) : <NEW_LINE> <INDENT> self.env = 'qt' <NEW_LINE> self.caption = "mirra QT example" <NEW_LINE> self.size = 800, 600 <NEW_LINE> self.pos = 100,100 <NEW_LINE> self.fullScreen = 0 <NEW_LINE> self.frameRate = 15 <NEW_LINE> <DEDENT> def start(self) : <NEW_LINE> <I...
main appplication class, handles window contains events and graphics manager. Subclasses main.App and extends its public methods
62598fbc3d592f4c4edbb07e
class NewSparkJobForm(BaseSparkJobForm): <NEW_LINE> <INDENT> prefix = "new" <NEW_LINE> emr_release = EMRReleaseChoiceField() <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self.fields["identifier"].widget.attrs.update( { "data-parsley-remote": ( reverse(...
A :class:`~BaseSparkJobForm` subclass used for creating new jobs.
62598fbc7047854f4633f595
class GenericScene: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.next_scene = self <NEW_LINE> <DEDENT> def handle_event(self, event): <NEW_LINE> <INDENT> print("Info - handle_events in GenericScene has not been overridden.") <NEW_LINE> <DEDENT> def update(self, dt): <NEW_LINE> <INDENT> print("Info -...
A generic base class. All other scenes are children of this.
62598fbc60cbc95b063644fe
class DStruct(object): <NEW_LINE> <INDENT> _fields = [] <NEW_LINE> _defaults = {} <NEW_LINE> def __init__(self, *args_t, **args_d): <NEW_LINE> <INDENT> if len(args_t) > len(self._fields): <NEW_LINE> <INDENT> raise TypeError("Number of arguments is larger than of predefined fields") <NEW_LINE> <DEDENT> for (k,v) in self...
Simple dynamic structure, like :const:`collections.namedtuple` but more flexible (and less memory-efficient)
62598fbc57b8e32f525081fc
class CommandError(ClientException): <NEW_LINE> <INDENT> pass
Error in CLI tool.
62598fbc4f88993c371f05e8
class Article(Content): <NEW_LINE> <INDENT> article_content = tinymce_models.HTMLField() <NEW_LINE> year = models.ManyToManyField('job_ready.Year', null=True, related_name='articles') <NEW_LINE> class Meta: <NEW_LINE> <INDENT> ordering = ('title',)
Model for article content.
62598fbca8370b77170f059f
class TautulliSensor(CoordinatorEntity, SensorEntity): <NEW_LINE> <INDENT> coordinator: TautulliDataUpdateCoordinator <NEW_LINE> def __init__( self, coordinator: TautulliDataUpdateCoordinator, name: str, monitored_conditions: list[str], usernames: list[str], ) -> None: <NEW_LINE> <INDENT> super().__init__(coordinator) ...
Representation of a Tautulli sensor.
62598fbcf9cc0f698b1c53ae
class ValidObjectsManager(ModelWithInvalidManager): <NEW_LINE> <INDENT> def get_query_set(self): <NEW_LINE> <INDENT> queryset = super(ValidObjectsManager, self).get_query_set() <NEW_LINE> return queryset.filter(invalid=False)
Manager returning only objects with invalid=False.
62598fbc7d847024c075c57c
class PlayerStatsPlayer(tk.Frame,PlayerStats): <NEW_LINE> <INDENT> def __init__(self, parent, controller): <NEW_LINE> <INDENT> tk.Frame.__init__(self, parent) <NEW_LINE> self.controller = controller <NEW_LINE> """ Widget Declearations """ <NEW_LINE> self.Title=tk.Label(self,text="Players Stats",font=controller.title_fo...
Methods: __init__ Variables: controller Title - Title Label Widget lblTeamNumber -Team Number Label widget txtTeamNumber - Team Number Entry Widget GetPlayersButton - Get Player Button Widget BackButton - Back Button Label Widget
62598fbc97e22403b383b0c7
class AddSubfieldCommand(BaseSubfieldCommand): <NEW_LINE> <INDENT> def _perform_on_all_matching_subfields_add_subfield(self, record, tag, field_number, callback): <NEW_LINE> <INDENT> if tag not in record.keys(): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> subfield_exists = False <NEW_LINE> for field in record[tag]: ...
Add subfield to a given field
62598fbc5fc7496912d4835b
class NengoObject(with_metaclass(NetworkMember)): <NEW_LINE> <INDENT> def _str(self, include_id): <NEW_LINE> <INDENT> return "<%s%s%s>" % ( self.__class__.__name__, "" if not hasattr(self, 'label') else " (unlabeled)" if self.label is None else ' "%s"' % self.label, " at 0x%x" % id(self) if include_id else "") <NEW_LIN...
A base class for Nengo objects. This defines some functions that the Network requires for correct operation. In particular, list membership and object comparison require each object to have a unique ID.
62598fbcaad79263cf42e995
class TB_CoOp_Mechazod2(TB_CoOp_Mechazod): <NEW_LINE> <INDENT> pass
Overloaded Mechazod
62598fbc01c39578d7f12f3b
class BlackjackException(UnbelievableException): <NEW_LINE> <INDENT> pass
Blackjack related exceptions inherit from this
62598fbccc40096d6161a2b9
class UpdateNodePoolRequest(_messages.Message): <NEW_LINE> <INDENT> clusterId = _messages.StringField(1) <NEW_LINE> image = _messages.StringField(2) <NEW_LINE> imageProject = _messages.StringField(3) <NEW_LINE> imageType = _messages.StringField(4) <NEW_LINE> locations = _messages.StringField(5, repeated=True) <NEW_LINE...
SetNodePoolVersionRequest updates the version of a node pool. Fields: clusterId: Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. image: The desired name of the image name to use for this node. This is used to create clusters using a custom imag...
62598fbc56ac1b37e63023ae
class TestCompareXLSXFiles(ExcelComparisonTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.set_filename('print_area05.xlsx') <NEW_LINE> self.ignore_files = ['xl/printerSettings/printerSettings1.bin', 'xl/worksheets/_rels/sheet1.xml.rels'] <NEW_LINE> self.ignore_elements = {'[Content_Types].xml': ['<...
Test file created by XlsxWriter against a file created by Excel.
62598fbc4527f215b58ea095
class SwapDownloader(IDownloader): <NEW_LINE> <INDENT> def __init__(self, kwargs): <NEW_LINE> <INDENT> IDownloader.__init__(self, kwargs) <NEW_LINE> self.kwargs['download_file_gz'] = os.path.join( kwargs['download_path'], kwargs['site'] + '.' + kwargs['country'] + '.gz') <NEW_LINE> <DEDENT> def download(self): <NEW_LIN...
Swap downloader
62598fbc283ffb24f3cf3a44
class Chromosome: <NEW_LINE> <INDENT> def __init__(self, number, kind, bases, genes): <NEW_LINE> <INDENT> self.cid = number <NEW_LINE> self.ctype = kind <NEW_LINE> self.base_pairs = bases <NEW_LINE> self.genes = genes <NEW_LINE> <DEDENT> def get_gene_density(self): <NEW_LINE> <INDENT> return self.base_pairs / self.gene...
Stores basic data about a chromosome.
62598fbc5fcc89381b26622d
@dataclass <NEW_LINE> class _DataChunkIHDR(_DataChunkBase): <NEW_LINE> <INDENT> width: int = field(init=False) <NEW_LINE> height: int = field(init=False) <NEW_LINE> def __post_init__(self): <NEW_LINE> <INDENT> super().__post_init__() <NEW_LINE> self.width, self.height = struct.unpack(">II", self.pure_data[0:8]) <NEW_LI...
Data class of ``IHDR`` chunk.
62598fbc44b2445a339b6a56
class EchoTask(BaseTask): <NEW_LINE> <INDENT> def __init__(self, base, min_length=1, max_length=5): <NEW_LINE> <INDENT> super(type(self), self).__init__() <NEW_LINE> self.base = base <NEW_LINE> self.eos = 0 <NEW_LINE> self.min_length = min_length <NEW_LINE> self.max_length = max_length <NEW_LINE> self._io_pairs = self....
Echo string coding task. Code needs to pipe input to putput (without any modifications).
62598fbc4428ac0f6e6586e4
class General(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.name = "No Name" <NEW_LINE> <DEDENT> def Init(self, parent): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def NotifyTabChanged(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def NotifyDocumentOpened(self): <NEW_LINE> <INDENT> p...
Gadget Plugins of this class are notified at each event listed below. The plugin then takes its action when notified.
62598fbc3d592f4c4edbb080
class FillTableMonumentsValidation(unittest.TestCase, CustomAssertions): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> datasets = fill_table.get_all_dataset_sql() <NEW_LINE> self.text = fill_table.MonumentsAllSql(datasets).get_sql() <NEW_LINE> self.data = isolate_dataset_entries(self.text) <NEW_LINE> <DEDENT...
Validate fill_table_monuments_all.sql.
62598fbcd7e4931a7ef3c256
class Car: <NEW_LINE> <INDENT> wheels = 4 <NEW_LINE> def __init__(self, make, model): <NEW_LINE> <INDENT> self.make = make <NEW_LINE> self.model = model <NEW_LINE> <DEDENT> def info(self): <NEW_LINE> <INDENT> print('Make of the car is '+self.make) <NEW_LINE> print('Model of the car is '+self.model)
This is used to describe the class
62598fbc8a349b6b436863fe
class ChannelShuffle(HybridBlock): <NEW_LINE> <INDENT> def __init__(self, channels, groups, **kwargs): <NEW_LINE> <INDENT> super(ChannelShuffle, self).__init__(**kwargs) <NEW_LINE> assert (channels % groups == 0) <NEW_LINE> self.groups = groups <NEW_LINE> <DEDENT> def hybrid_forward(self, F, x): <NEW_LINE> <INDENT> ret...
Channel shuffle layer. This is a wrapper over the same operation. It is designed to save the number of groups. Parameters: ---------- channels : int Number of channels. groups : int Number of groups.
62598fbc656771135c489830
class ColumnDefinition: <NEW_LINE> <INDENT> column_types = ("text", "number") <NEW_LINE> def __init__(self, column_name, column_type="text", not_null=False): <NEW_LINE> <INDENT> if column_name is not None and column_type in ColumnDefinition.column_types: <NEW_LINE> <INDENT> self.column_name = column_name; <NEW_LINE> se...
Represents a column definition in the CSV Catalog.
62598fbc167d2b6e312b7138
@attr.s(auto_attribs=True, frozen=True, slots=True) <NEW_LINE> class TraceRequestRedirectParams: <NEW_LINE> <INDENT> method: str <NEW_LINE> url: URL <NEW_LINE> headers: "CIMultiDict[str]" <NEW_LINE> response: ClientResponse
Parameters sent by the `on_request_redirect` signal
62598fbc97e22403b383b0ca
class Summary(object): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.description = '' <NEW_LINE> self.duration = 0.0 <NEW_LINE> self.run = 0 <NEW_LINE> self.passed = 0 <NEW_LINE> self.skipped = 0 <NEW_LINE> self.error = 0 <NEW_LINE> self.fail = 0 <NEW_LINE> self.rate...
Base class of representation classes
62598fbcaad79263cf42e997
class ContentBase(mixins.AuthorsMixin, mixins.PublicationMixin, models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=255) <NEW_LINE> summary = models.TextField() <NEW_LINE> slug = models.SlugField() <NEW_LINE> sections = models.ManyToManyField(Section, null=True, blank=True, related_name="%(app_label)...
The base class providing the basic "armstrong" behavior for a model. This is provided as a way to handle cross-model querying. For example, you can use this to query across Article and Video models assuming they both extend from a concrete implementation of this class. This is *not* a concrete implementation. This ...
62598fbcad47b63b2c5a7a17
class UnsupportedMapperError(Exception): <NEW_LINE> <INDENT> def __init__(self, value="No message specified."): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return repr(self.value)
Exception raised when the ROM has an unsupported mapper.
62598fbc55399d3f056266d7
class StudentViewTransformer(BlockStructureTransformer): <NEW_LINE> <INDENT> WRITE_VERSION = 1 <NEW_LINE> READ_VERSION = 1 <NEW_LINE> STUDENT_VIEW_DATA = 'student_view_data' <NEW_LINE> STUDENT_VIEW_MULTI_DEVICE = 'student_view_multi_device' <NEW_LINE> def __init__(self, requested_student_view_data=None): <NEW_LINE> <IN...
Only show information that is appropriate for a learner
62598fbc66656f66f7d5a5b5
class Monster(Combat): <NEW_LINE> <INDENT> min_hit_points = 1 <NEW_LINE> max_hit_points = 1 <NEW_LINE> min_experience = 1 <NEW_LINE> max_experience = 1 <NEW_LINE> attack_strength = 1 <NEW_LINE> attack_defense = 1 <NEW_LINE> weapon = 'sword' <NEW_LINE> sound = 'roar!' <NEW_LINE> location = (0, 0) <NEW_LINE> def __init__...
Basic monster class attributes
62598fbcbf627c535bcb1668
class Vehiculo: <NEW_LINE> <INDENT> def __init__(self,variable_id=None, latitud=None, longitud=None, gasolina=100, ruta=None): <NEW_LINE> <INDENT> self._ruta = list(Ruta.select().where(Ruta.ruta == ruta)) <NEW_LINE> self._indice_ruta = 0 <NEW_LINE> self._variable_id = variable_id <NEW_LINE> self._url = 'variables/'+ se...
Clase de los objetos vehiculo.
62598fbc4527f215b58ea096
class catalog_055(models.Model): <NEW_LINE> <INDENT> id = models.IntegerField(primary_key=True) <NEW_LINE> src_word = models.CharField(max_length=50) <NEW_LINE> tar_word = models.CharField(max_length=50) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.src_word + "-->" + self.tar_word
Create a table which contains catalog id and word pair. The number of this catalog table is 055 It contains three columns: id int type catalog id src_word char type the source word which needs to be subsitute tar_word char type the word that is translated from the source word
62598fbc283ffb24f3cf3a46
class Solution: <NEW_LINE> <INDENT> def lastPosition(self, nums, target): <NEW_LINE> <INDENT> if not nums: <NEW_LINE> <INDENT> return -1 <NEW_LINE> <DEDENT> start, end = 0, len(nums) - 1 <NEW_LINE> while start + 1 < end: <NEW_LINE> <INDENT> mid = (start + end)//2 <NEW_LINE> if nums[mid] < target: <NEW_LINE> <INDENT> st...
@param nums: An integer array sorted in ascending order @param target: An integer @return: An integer
62598fbc67a9b606de54618f
class MDP(gym.Env): <NEW_LINE> <INDENT> action_map = {} <NEW_LINE> observation_map = {} <NEW_LINE> discount_factor = 0.95 <NEW_LINE> def transition(self, observation, action): <NEW_LINE> <INDENT> raise NotImplementedError
Extension of OpenAI gym to Markov Decision Process (MDP)
62598fbc2c8b7c6e89bd3989
class _OneLike: <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return "1"
object that looks similar to the int 1
62598fbca219f33f346c69ca
class Processor(AwardProcessor): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> AwardProcessor.__init__(self, 'Dead Weight', 'Most Losses', [PLAYER_COL, Column('Losses', Column.NUMBER, Column.DESC)]) <NEW_LINE> <DEDENT> def on_loss(self, e): <NEW_LINE> <INDENT> for player in model_mgr.get_players(True): <N...
Overview This processor is awarded to the player with the most losses. Implementation Use the losses value from core player stats when a loss event occurs. Notes None.
62598fbca8370b77170f05a3
class Camellia(CMakePackage): <NEW_LINE> <INDENT> homepage = "https://bitbucket.org/nateroberts/Camellia" <NEW_LINE> url = "https://bitbucket.org/nateroberts/camellia.git" <NEW_LINE> maintainers = ['CamelliaDPG'] <NEW_LINE> version('master', git='https://bitbucket.org/nateroberts/camellia.git', branch='master') <N...
Camellia: user-friendly MPI-parallel adaptive finite element package, with support for DPG and other hybrid methods, built atop Trilinos.
62598fbc50812a4eaa620ccd
class ConcatDataset(Dataset): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def cumsum(sequence): <NEW_LINE> <INDENT> r, s = [], 0 <NEW_LINE> for e in sequence: <NEW_LINE> <INDENT> l = len(e) <NEW_LINE> r.append(l + s) <NEW_LINE> s += l <NEW_LINE> <DEDENT> return r <NEW_LINE> <DEDENT> def __init__(self, datasets): <NEW_...
Dataset to concatenate multiple datasets. Purpose: useful to assemble different existing datasets, possibly large-scale datasets as the concatenation operation is done in an on-the-fly manner. Arguments: datasets (iterable): List of datasets to be concatenated
62598fbce5267d203ee6bac3
class Agent: <NEW_LINE> <INDENT> def __init__(self, q_net, t_net, memory, batch_size=128, gamma=0.999, eps_start=1.0, eps_end=0.1, eps_decay=1000000, target_update=3, learning_rate=0.01): <NEW_LINE> <INDENT> self.q_net = q_net <NEW_LINE> self.t_net = t_net <NEW_LINE> self.memory = memory <NEW_LINE> self.batch_size = ba...
The agent for the RL environment
62598fbc7b180e01f3e49131
class ValidateNoErrors(pyblish.api.InstancePlugin): <NEW_LINE> <INDENT> order = colorbleed.api.ValidateContentsOrder <NEW_LINE> hosts = ['houdini'] <NEW_LINE> label = 'Validate no errors' <NEW_LINE> def process(self, instance): <NEW_LINE> <INDENT> validate_nodes = [] <NEW_LINE> if len(instance) > 0: <NEW_LINE> <INDENT>...
Validate the Instance has no current cooking errors.
62598fbc5fdd1c0f98e5e155
class TestGenericCsvParserBot(test.BotTestCase, unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def set_bot(cls): <NEW_LINE> <INDENT> cls.bot_reference = GenericCsvParserBot <NEW_LINE> cls.default_input_message = EXAMPLE_REPORT <NEW_LINE> cls.sysconfig = {"columns": [ "source.ip|source.network", "source...
A TestCase for a GenericCsvParserBot with extra, column_regex_search and windows_nt time format.
62598fbc091ae35668704de7
class S3MainMenu(default.S3MainMenu): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def menu_modules(cls): <NEW_LINE> <INDENT> logged_in = current.auth.is_logged_in() <NEW_LINE> return [ MM("Home", c="default", f="index"), MM("News", c="cms", f="newsfeed", args="datalist"), MM("Map", c="gis", f="index"), MM("Disease Trac...
Custom Application Main Menu
62598fbcadb09d7d5dc0a741
class DeleteTemplateStatus(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.DeleteStatus = None <NEW_LINE> self.DeleteTime = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.DeleteStatus = params.get("DeleteStatus") <NEW_LINE> self.DeleteTime = params.get...
删除模板响应
62598fbc3346ee7daa33772a
class Option(karesansui.db.model.Model): <NEW_LINE> <INDENT> def __init__(self, created_user, modified_user, key, value=None): <NEW_LINE> <INDENT> self.created_user = created_user <NEW_LINE> self.modified_user = modified_user <NEW_LINE> self.key = key <NEW_LINE> self.value = value <NEW_LINE> <DEDENT> def get_json(self,...
<comment-ja> Optionテーブルモデルクラス </comment-ja> <comment-en> TODO: English Comment </comment-en>
62598fbc851cf427c66b847a
class b2ContactManager(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): <NEW_LINE> <INDENT> _Box2D.b2ContactManager_swiginit(self,_Box2D.new_b2ContactManager()) <NEW_LINE> ...
Proxy of C++ b2ContactManager class
62598fbc92d797404e388c45
class Redis(GenericCommandsMixin, StringCommandsMixin, HyperLogLogCommandsMixin, SetCommandsMixin, HashCommandsMixin, TransactionsCommandsMixin, SortedSetCommandsMixin, ListCommandsMixin, ScriptingCommandsMixin, ServerCommandsMixin, PubSubCommandsMixin): <NEW_LINE> <INDENT> def __init__(self, connection): <NEW_LINE> <I...
High-level Redis interface. Gathers in one place Redis commands implemented in mixins. For commands details see: http://redis.io/commands/#connection
62598fbc56b00c62f0fb2a80
class CreateVNFFG(tackerV10.CreateCommand): <NEW_LINE> <INDENT> resource = _VNFFG <NEW_LINE> remove_output_fields = ["attributes"] <NEW_LINE> def add_known_arguments(self, parser): <NEW_LINE> <INDENT> parser.add_argument( 'name', metavar='NAME', help=_('Set a name for the VNFFG')) <NEW_LINE> vnffgd_group = parser.add_m...
Create a VNFFG.
62598fbc283ffb24f3cf3a48
class FirstBPEliminationDrawGenerator(BaseBPEliminationDrawGenerator): <NEW_LINE> <INDENT> def make_pairings(self): <NEW_LINE> <INDENT> nteams = len(self.teams) <NEW_LINE> if nteams % 4 != 0 or not ispow2(nteams // 4): <NEW_LINE> <INDENT> raise DrawFatalError("Tried to do a first elimination draw with invalid break siz...
For the first elimination round where the break size is 4*2^n.
62598fbc76e4537e8c3ef76b
class ShortChannelIDType(IntegerType): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> super().__init__(name, 8, '>Q') <NEW_LINE> <DEDENT> def val_to_str(self, v: int, otherfields: Dict[str, Any]) -> str: <NEW_LINE> <INDENT> return "{}x{}x{}".format(v >> 40, (v >> 16) & 0xFFFFFF, v & 0xFFFF) <NEW_LINE...
short_channel_id has a special string representation, but is basically a u64.
62598fbc4527f215b58ea097
class Registration(ResourceBody): <NEW_LINE> <INDENT> key = jose.Field('key', omitempty=True, decoder=jose.JWK.from_json) <NEW_LINE> contact = jose.Field('contact', omitempty=True, default=()) <NEW_LINE> agreement = jose.Field('agreement', omitempty=True) <NEW_LINE> status = jose.Field('status', omitempty=True) <NEW_LI...
Registration Resource Body. :ivar josepy.jwk.JWK key: Public key. :ivar tuple contact: Contact information following ACME spec, `tuple` of `unicode`. :ivar unicode agreement:
62598fbc8a349b6b43686402