code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class TraySlot(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swagger_types = { 'tray': 'int', 'slot': 'int' } <NEW_LINE> self.attribute_map = { 'tray': 'tray', 'slot': 'slot' } <NEW_LINE> self._tray = None <NEW_LINE> self._slot = None <NEW_LINE> <DEDENT> @property <NEW_LINE> def tray(self): ...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fad498bea3a75a57afc
class ListOfCourses: <NEW_LINE> <INDENT> __slots__ = 'course_data' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.course_data = [] <NEW_LINE> <DEDENT> def get_course_data(self): <NEW_LINE> <INDENT> return self.course_data <NEW_LINE> <DEDENT> def set_course_data(self, course): <NEW_LINE> <INDENT> self.course_da...
A class that stores a list of Course objects
62598fad16aa5153ce4004e0
class Job(models.Model): <NEW_LINE> <INDENT> job_id = models.AutoField(primary_key=True) <NEW_LINE> owner = models.ForeignKey(User, related_name='jobs') <NEW_LINE> submitted = models.DateTimeField(auto_now_add=True) <NEW_LINE> completed = models.DateTimeField(blank=True, null=True) <NEW_LINE> max_depth = models.Positiv...
The Job model contains information about created Word Scraper jobs.
62598fada05bb46b3848a84a
class MusicalWorkContributorRole (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): <NEW_LINE> <INDENT> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'MusicalWorkContributorRole') <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('http://ddex.net/xml/20120214/ddex.xsd', 2558, 3) <NEW_LI...
A role played by a ddex:Contributor in relation to a ddex:MusicalWork.
62598fad38b623060ffa9078
class MyTranslateAdminForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = models.translate <NEW_LINE> fields = "__all__" <NEW_LINE> <DEDENT> def clean(self): <NEW_LINE> <INDENT> super(MyTranslateAdminForm, self).clean() <NEW_LINE> blub = models.translate.objects.filter(fromeditype=self.cl...
customs form for translations to check if entry exists (unique_together not validated right (because of null values in partner fields))
62598fadf9cc0f698b1c52b8
class TimeAggregator: <NEW_LINE> <INDENT> def __init__(self, **kwds): <NEW_LINE> <INDENT> self._first = kwds.get('first') <NEW_LINE> self._last = kwds.get('last') <NEW_LINE> self._requestDates = requestDates(**kwds) <NEW_LINE> self._periodicity = kwds.get('periodicity') <NEW_LINE> <DEDENT> @property <NEW_LINE> def requ...
Time aggregator knows how to aggregate time series depending on the metric and the query time params.
62598fad26068e7796d4c933
class DeleteProposalSet(DeleteView): <NEW_LINE> <INDENT> def dispatch(self, request, *args, **kwargs): <NEW_LINE> <INDENT> space = get_object_or_404(Space, url=kwargs['space_url']) <NEW_LINE> if (request.user.has_perm('admin_space', space) or request.user.has_perm('mod_space', space)): <NEW_LINE> <INDENT> return super(...
Delete a proposal set. .. versionadded: 0.1.5 :rtype: Confirmation :context: get_place
62598fad5fdd1c0f98e5df6b
class Division(AbstractStructureElement): <NEW_LINE> <INDENT> def head(self): <NEW_LINE> <INDENT> for e in self.data: <NEW_LINE> <INDENT> if isinstance(e, Head): <NEW_LINE> <INDENT> return e <NEW_LINE> <DEDENT> <DEDENT> raise NoSuchAnnotation()
Structure element representing some kind of division. Divisions may be nested at will, and may include almost all kinds of other structure elements.
62598fad99fddb7c1ca62dd8
class SinOsc(PureUGen): <NEW_LINE> <INDENT> _ordered_input_names = collections.OrderedDict( [("frequency", 440.0), ("phase", 0.0)] ) <NEW_LINE> _valid_calculation_rates = (CalculationRate.AUDIO, CalculationRate.CONTROL)
A sinusoid oscillator unit generator. :: >>> supriya.ugens.SinOsc.ar() SinOsc.ar() :: >>> print(_) synthdef: name: ... ugens: - SinOsc.ar: frequency: 440.0 phase: 0.0
62598fad21bff66bcd722c45
class SonarCommand(BackendCommand): <NEW_LINE> <INDENT> BACKEND = Sonar <NEW_LINE> @classmethod <NEW_LINE> def setup_cmd_parser(cls): <NEW_LINE> <INDENT> parser = BackendCommandArgumentParser(cls.BACKEND.CATEGORIES, from_date=True, archive=True) <NEW_LINE> group = parser.parser.add_argument_group('Sonarqube arguments')...
Class to run Sonaqube backend from the command line.
62598fad627d3e7fe0e06e8c
class Entry(models.Model): <NEW_LINE> <INDENT> topic = models.ForeignKey(Topic, on_delete=None) <NEW_LINE> text = models.TextField() <NEW_LINE> date_added = models.DateTimeField(auto_now_add=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> verbose_name_plural = 'entries' <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE...
Something specific learned about a topic
62598fad76e4537e8c3ef58c
class GithubOrgsView(ProjectMixin, ListView): <NEW_LINE> <INDENT> context_object_name = 'project' <NEW_LINE> def dispatch(self, request, *args, **kwargs): <NEW_LINE> <INDENT> if not request.is_ajax(): <NEW_LINE> <INDENT> raise Http404("This is an ajax view, friend.") <NEW_LINE> <DEDENT> return super(GithubOrgsView, sel...
List organization for the user
62598fad01c39578d7f12d5e
class TextField(BaseField): <NEW_LINE> <INDENT> def __init__( self, name, size=None, value=None ): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.size = int( size or 10 ) <NEW_LINE> self.value = value or "" <NEW_LINE> <DEDENT> def get_html( self, prefix="", disabled=False ): <NEW_LINE> <INDENT> value = self.value...
A standard text input box. >>> print TextField( "foo" ).get_html() <input type="text" name="foo" size="10" value=""> >>> print TextField( "bins", size=4, value="default" ).get_html() <input type="text" name="bins" size="4" value="default">
62598fadcc40096d6161a1ca
class FlortDjCsppTelemeteredDriver(SimpleDatasetDriver): <NEW_LINE> <INDENT> def _build_parser(self, stream_handle): <NEW_LINE> <INDENT> parser_config = { DataSetDriverConfigKeys.PARTICLE_CLASS: None, DataSetDriverConfigKeys.PARTICLE_CLASSES_DICT: { METADATA_PARTICLE_CLASS_KEY: FlortDjCsppMetadataTelemeteredDataParticl...
Derived flort_dj_cspp driver class All this needs to do is create a concrete _build_parser method
62598fad55399d3f05626503
class Test(object): <NEW_LINE> <INDENT> def __init__(self, *args): <NEW_LINE> <INDENT> self.experiences = args <NEW_LINE> self.data = {} <NEW_LINE> for x in self.experiences: <NEW_LINE> <INDENT> self.data[x.name] = [] <NEW_LINE> <DEDENT> <DEDENT> def get_random(self): <NEW_LINE> <INDENT> return np.random.randint(1, 100...
Represents a test
62598fad5166f23b2e2433b8
class CustomerStatus(Customer): <NEW_LINE> <INDENT> xml_fields = Customer.xml_fields + ( 'amount', 'currency', 'account', 'phone1', 'phone2', 'countryname' ) <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.amount = kwargs.pop('amount') <NEW_LINE> self.currency = kwargs.pop('currency') <NEW_LINE...
A customer with additional fields.
62598fade1aae11d1e7ce813
class Market: <NEW_LINE> <INDENT> def __init__(self, symbols, alpaca_key_id, alpaca_secret_key, date = None): <NEW_LINE> <INDENT> self._api = alpaca.REST(key_id = alpaca_key_id, secret_key = alpaca_secret_key, base_url = 'https://paper-api.alpaca.markets') <NEW_LINE> self.symbols = symbols <NEW_LINE> self.load_day(date...
This class automatically downloads the data for the provided symbols from Alpaca, and simulates the pass of time during a day by providing 1 minute barsets with its method next_barset().
62598fad4e4d562566372405
class EventTracer(AbstractOverlay): <NEW_LINE> <INDENT> x = Float <NEW_LINE> y = Float <NEW_LINE> color = ColorTrait("red") <NEW_LINE> size = Float(5) <NEW_LINE> angle = Float(0.0) <NEW_LINE> def normal_mouse_move(self, event): <NEW_LINE> <INDENT> self.x = event.x <NEW_LINE> self.y = event.y <NEW_LINE> self.component.r...
Draws a marker under the mouse cursor where an event is occurring.
62598fad85dfad0860cbfa63
class Clause(BaseDDL): <NEW_LINE> <INDENT> __slots__ = ['name', 'params'] <NEW_LINE> def __init__(self, name, *params): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.params = params <NEW_LINE> <DEDENT> def __call__(self, *args): <NEW_LINE> <INDENT> return Clause(self.name, *args)
A single or compound clause, for example ``CREATE TABLE`` -- in some cases clauses make take parameters, e.g. ``VARCHAR(255)``
62598fad66673b3332c303ab
class TransactionError(Error): <NEW_LINE> <INDENT> pass
Transaction failed.
62598fad5fdd1c0f98e5df6c
class ConfigSource(object): <NEW_LINE> <INDENT> def __init__(self, conf, *args): <NEW_LINE> <INDENT> self._conf = conf <NEW_LINE> <DEDENT> def get(self, key): <NEW_LINE> <INDENT> raise NotImplementedError
Base configuration source class. Used for fetching configuration keys from external sources.
62598fada219f33f346c67f6
class SignatureValidator(RequestValidator): <NEW_LINE> <INDENT> nonce_length = 20, 45 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(SignatureValidator, self).__init__() <NEW_LINE> self.endpoint = SignatureOnlyEndpoint(self) <NEW_LINE> self.lti_consumer = None <NEW_LINE> self.cache = cache <NEW_LINE> <DEDENT>...
Helper class that verifies the OAuth signature on a request. The pattern required by the oauthlib library mandates that subclasses of RequestValidator contain instance methods that can be called back into in order to fetch the consumer secret or to check that fields conform to application-specific requirements.
62598faddd821e528d6d8f15
class CertificatePackageWarranty(CertificatePackage): <NEW_LINE> <INDENT> name = 'certificate package warranty' <NEW_LINE> def _get_choices(self, gandi): <NEW_LINE> <INDENT> packages = super(CertificatePackageWarranty, self)._get_choices(gandi) <NEW_LINE> return list(set([pack.split('_')[3] for pack in packages])) <NEW...
Choice parameter to select an available certificate warranty.
62598fad32920d7e50bc6034
class CommandJobTemplateExport: <NEW_LINE> <INDENT> def GetResources(self): <NEW_LINE> <INDENT> return {'Pixmap': 'Path-ExportTemplate', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Job", "Export Template"), 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Job", "Exports Path Job as a template to be used for other jobs")} <NEW_...
Command to export a template of a given job. Opens a dialog to select the file to store the template in. If the template is stored in Path's file path (see preferences) and named in accordance with job_*.json it will automatically be found on Job creation and be available for selection.
62598fadbe383301e02537d9
class AIMHarness(component): <NEW_LINE> <INDENT> Inboxes = {"inbox" : "tuple-based commands for ChatManager", "control" : "NOT USED", "internal inbox" : "links to various child components", "internal control" : "links to signal outbox of various child components", } <NEW_LINE> Outboxes = {"outbox" : "tuple-based notifi...
AIMHarness() -> new AIMHarness component Send ("message", recipient, message) commands to its "inbox" to send instant messages. It will output ("buddy online", {name: buddyname}) and ("message", sender, message) tuples whenever a buddy comes online or a new message arrives for you.
62598fad7b180e01f3e49040
class SetAuthenticationRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.ListenerId = None <NEW_LINE> self.Domain = None <NEW_LINE> self.BasicAuth = None <NEW_LINE> self.GaapAuth = None <NEW_LINE> self.RealServerAuth = None <NEW_LINE> self.BasicAuthConfId = None <NEW_LINE> self.Ga...
SetAuthentication请求参数结构体
62598fadbaa26c4b54d4f293
class cdhit_result(object): <NEW_LINE> <INDENT> def __init__(self, name=None, data=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> if data: <NEW_LINE> <INDENT> self.data = data <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.data = [] <NEW_LINE> <DEDENT> <DEDENT> def to_json(self): <NEW_LINE> <INDENT> return ...
represents whole cd-hit file with all clusters as list
62598fad4e4d562566372406
class IsInPolyAuthorPublicationConvoluteValue(HasLinkToValue): <NEW_LINE> <INDENT> def __init__(self, argument): <NEW_LINE> <INDENT> super().__init__(argument) <NEW_LINE> self._namespace = "http://www.knora.org/ontology/kuno-raeber" <NEW_LINE> self._name = "isInPolyAuthorPublicationConvoluteValue"
Relating a publication poem by Kuno Raeber to a reification statement of the relation between the poem and a poly-author publication it is in.
62598fad3539df3088ecc292
@pytest.mark.skipif( paths.AUTHSELECT is None, reason="Authselect is only available in fedora-like distributions") <NEW_LINE> class TestServerInstallation(IntegrationTest): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def install(cls, mh): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_install(self): <NEW_LINE> <...
Tests the server installation with authselect profile. When the system is a fresh installation, authselect tool is available and the default profile 'sssd' without any option is set by default. But when the system has been upgraded from older version, even though authselect tool is available, no profile is set (authse...
62598fad7047854f4633f3ba
class IndicatorActionsForm(forms.Form): <NEW_LINE> <INDENT> error_css_class = 'error' <NEW_LINE> required_css_class = 'required' <NEW_LINE> action_type = forms.ChoiceField(required=True, widget=forms.Select) <NEW_LINE> begin_date = forms.DateTimeField(required=False, widget=CalWidget(format='%Y-%m-%d %H:%M:%S', attrs={...
Django form for adding actions.
62598fad21bff66bcd722c47
class GribFile(object): <NEW_LINE> <INDENT> def __init__(self, file_object, multi_field=True, lon_offset=True): <NEW_LINE> <INDENT> self.file_object = file_object <NEW_LINE> self.lon_offset = lon_offset <NEW_LINE> if multi_field: <NEW_LINE> <INDENT> gribapi.grib_multi_support_on() <NEW_LINE> <DEDENT> else: <NEW_LINE> <...
Interface for selecting message(s) from grib files using key/value matching.
62598fad4527f215b58e9ec1
@pulumi.output_type <NEW_LINE> class GetCpCodeResult: <NEW_LINE> <INDENT> def __init__(__self__, contract=None, contract_id=None, group=None, group_id=None, id=None, name=None, product_ids=None): <NEW_LINE> <INDENT> if contract and not isinstance(contract, str): <NEW_LINE> <INDENT> raise TypeError("Expected argument 'c...
A collection of values returned by getCpCode.
62598fad1b99ca400228f520
class TestSetRandomKey(TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpTestData(cls): <NEW_LINE> <INDENT> cls.new_user = User.objects.create( username="new-tester", email="new-tester@example.com", password="password" ) <NEW_LINE> <DEDENT> @patch("tcms.auth.models.datetime") <NEW_LINE> @patch("tcms.auth....
Test case for UserActivateKey.set_random_key_for_user
62598fad0c0af96317c56363
class Prox(object): <NEW_LINE> <INDENT> def prox(self, x, eta): <NEW_LINE> <INDENT> raise NotImplementedError("Prox function not implemented")
A function that implements the prox operator prox_{eta}(x) = argmin_{y} eta f(y) + (1/2) ||y-x||_2^2
62598fada79ad1619776a047
class User : <NEW_LINE> <INDENT> user_list = [] <NEW_LINE> def __init__(self, username, account,password): <NEW_LINE> <INDENT> self.username = username <NEW_LINE> self.account = account <NEW_LINE> self.password=password <NEW_LINE> <DEDENT> def save_user(self): <NEW_LINE> <INDENT> User.user_list.append(self) <NEW_LINE> ...
Class that generates new instances of a User
62598fad4f6381625f1994af
class DBAPIError(LunaticError): <NEW_LINE> <INDENT> pass
DBAPI Error.
62598fad01c39578d7f12d60
class itkInPlaceImageFilterIUC3ID3(itkImageToImageFilterAPython.itkImageToImageFilterIUC3ID3): <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_L...
Proxy of C++ itkInPlaceImageFilterIUC3ID3 class
62598fad63d6d428bbee278c
class _EventDictionary(dict, EventSource): <NEW_LINE> <INDENT> changed = False <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(_EventDictionary, self).__init__(*args, **kwargs) <NEW_LINE> EventSource.__init__(self, *args, **kwargs) <NEW_LINE> <DEDENT> def __setitem__(self, key, value): <NEW_LI...
This dictionary allows to be notified if its content is changed.
62598fadadb09d7d5dc0a56b
class SubDiagonalTensor(DiagonalTensor): <NEW_LINE> <INDENT> handled_functions = HANDLED_FUNCTIONS_SUB_DIAGONAL <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return "SubDiagonalTensor(N={}, value={})".format(self._N, self._i)
A subclass of ``DiagonalTensor`` to test custom dispatch This class tests semantics for defining ``__torch_function__`` on a subclass of another class that defines ``__torch_function__``. The only difference compared with the superclass is that this class provides a slightly different repr as well as custom implementa...
62598fad4e4d562566372407
@singleton <NEW_LINE> @blueprint <NEW_LINE> class FXCMPy(APIRateLimitMixin, fxcmpyapi): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self._create(*args, **kwargs) <NEW_LINE> <DEDENT> def _create(self, *args, **kwargs): <NEW_LINE> <INDENT> access_token = kwargs.pop('access_token',None) <N...
kiteconnect modified to force a singleton (and to print pretty).
62598fad3317a56b869be53b
class TestFile(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.file = tempfile.TemporaryFile() <NEW_LINE> self.data = bytes() <NEW_LINE> <DEDENT> def add_segment(self, metadata, data, toc=None, incomplete=False): <NEW_LINE> <INDENT> metadata = self.to_bytes(metadata) <NEW_LINE> data = self.to_...
Generate a TDMS file for testing
62598fad57b8e32f5250810c
class CURegionField(Field): <NEW_LINE> <INDENT> default_error_messages = { 'invalid': _('Enter a Cuban region.'), } <NEW_LINE> def clean(self, value): <NEW_LINE> <INDENT> super(CURegionField, self).clean(value) <NEW_LINE> if value in self.empty_values: <NEW_LINE> <INDENT> return '' <NEW_LINE> <DEDENT> try: <NEW_LINE> <...
A form field for a Cuban region. The input is validated against a dictionary which includes names and abbreviations. It normalizes the input to the standard abbreviation for the given region. .. versionadded:: 1.6
62598fad283ffb24f3cf386e
class _EmissionManager(_interfaces.EmissionManager): <NEW_LINE> <INDENT> def __init__( self, lock, failure_outcome, termination_manager, transmission_manager): <NEW_LINE> <INDENT> self._lock = lock <NEW_LINE> self._failure_outcome = failure_outcome <NEW_LINE> self._termination_manager = termination_manager <NEW_LINE> s...
An implementation of _interfaces.EmissionManager.
62598fad76e4537e8c3ef58f
class PJsuaAccount(object): <NEW_LINE> <INDENT> def __init__(self, account, pj_lib): <NEW_LINE> <INDENT> self.account = account <NEW_LINE> self.buddies = {} <NEW_LINE> self.pj_lib = pj_lib <NEW_LINE> <DEDENT> def add_buddies(self, buddy_cfg): <NEW_LINE> <INDENT> for buddy in buddy_cfg: <NEW_LINE> <INDENT> name = buddy....
Wrapper for pj.Account object This object contains a reference to a pj.Account and a dictionary of the account's buddies, keyed by buddy name
62598fade76e3b2f99fd8a18
class UsageExpectation: <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def of(cls, obj): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return obj.__usage_expectation <NEW_LINE> <DEDENT> except AttributeError: <NEW_LINE> <INDENT> ua = cls(type(obj)) <NEW_LINE> obj.__usage_expectation = ua <NEW_LINE> return ua <NEW_LINE> <DE...
Class representing API usage expectation at any given time. Expectations help formalize the way developers are expected to use some set of classes, methods and other instruments. Technically, they also encode the expectations and can raise :class:`DeveloperError`. :attr allowed_calls: A dictionary mapping from bo...
62598fad4428ac0f6e658506
class MinusStrandAlgebra(StrandAlgebra): <NEW_LINE> <INDENT> def __init__(self, ring, pmc): <NEW_LINE> <INDENT> StrandAlgebra.__init__(self, ring, pmc, pmc.genus, mult_one = True) <NEW_LINE> <DEDENT> @memorize <NEW_LINE> def getGenerators(self): <NEW_LINE> <INDENT> assert self.pmc == splitPMC(1) <NEW_LINE> n = 4 <NEW_L...
The corresponding Strands class for the strand algebra in the minus theory.
62598fadeab8aa0e5d30bd6e
class Cloudfiles(object): <NEW_LINE> <INDENT> def __init__(self, region, identity_client, servicenet=True, endpoint=None, timeout=10, retries=1, keepalive=True, proxy=None, rest_client_class=None, debug_level=0): <NEW_LINE> <INDENT> self.identity_client = identity_client <NEW_LINE> if endpoint is None: <NEW_LINE> <INDE...
Cloudfiles Client
62598fad7b25080760ed7491
class ElectricCar(Car): <NEW_LINE> <INDENT> def __init__(self, make, model, year): <NEW_LINE> <INDENT> super().__init__(make, model, year) <NEW_LINE> self.battery = Battery() <NEW_LINE> <DEDENT> def describe_battery(self): <NEW_LINE> <INDENT> print(f"This car has a {self.battery_size}-kWh battery.") <NEW_LINE> <DEDENT>...
Represents aspects of a car specific to electric vehicles.
62598fad67a9b606de545fae
class GetAccountInfo(Choreography): <NEW_LINE> <INDENT> def __init__(self, temboo_session): <NEW_LINE> <INDENT> Choreography.__init__(self, temboo_session, '/Library/Google/Documents/GetAccountInfo') <NEW_LINE> <DEDENT> def new_input_set(self): <NEW_LINE> <INDENT> return GetAccountInfoInputSet() <NEW_LINE> <DEDENT> def...
Create a new instance of the GetAccountInfo Choreography. A TembooSession object, containing a valid set of Temboo credentials, must be supplied.
62598fad5fcc89381b26613d
class TimerWriteLockRef: <NEW_LINE> <INDENT> def __init__(self, ptr): <NEW_LINE> <INDENT> self.ptr = ptr
A Timer Write Lock allows temporary write access to a timer. Dispose this to release the write lock.
62598fad090684286d5936cd
class IsDataEntryAdmin(BasePermission): <NEW_LINE> <INDENT> message = "You don't have enough privileges to access this API." <NEW_LINE> def has_permission(self, request, view): <NEW_LINE> <INDENT> if not request.user: <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> if DataEntryAdmin.objects.filter(user=request.use...
Permission defined for checking the authenticated user is data entry admin or not
62598fad851cf427c66b829e
class NodeMeta(type): <NEW_LINE> <INDENT> def __new__(meta, name, bases, dct): <NEW_LINE> <INDENT> return super(NodeMeta, meta).__new__(meta, name, bases, dct) <NEW_LINE> <DEDENT> def __init__(cls, name, bases, dct): <NEW_LINE> <INDENT> super(NodeMeta, cls).__init__(name, bases, dct) <NEW_LINE> node_registry[name.lower...
Node metaclass used to keep a registry of Node classes
62598fada219f33f346c67f8
class write_response4(BaseObj): <NEW_LINE> <INDENT> _strfmt1 = "{0:?stid\:{0} }len:{1:umax64} verf:{3} {2}" <NEW_LINE> _attrlist = ("stateid", "count", "committed", "verifier") <NEW_LINE> def __init__(self, unpack): <NEW_LINE> <INDENT> self.stateid = unpack.unpack_conditional(stateid4) <NEW_LINE> self.count = le...
struct write_response4 { stateid4 stateid<1>; length4 count; stable_how4 committed; verifier4 verifier; };
62598faddd821e528d6d8f17
class Change(Computation): <NEW_LINE> <INDENT> def __init__(self, before_column_name, after_column_name): <NEW_LINE> <INDENT> self._before_column_name = before_column_name <NEW_LINE> self._after_column_name = after_column_name <NEW_LINE> <DEDENT> def _validate(self, table): <NEW_LINE> <INDENT> before_column = table.col...
Computes change between two columns.
62598fad32920d7e50bc6036
class CLI(argparse.ArgumentParser): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.add_platform_arg() <NEW_LINE> self.add_recipients_arg() <NEW_LINE> self.add_content_arg() <NEW_LINE> self.add_sender_arg() <NEW_LINE> <DEDENT> def add_platform_arg(self): <NEW_LINE> <INDENT...
The main utility for a command line interface for generalized mass-messaging, capable of fully processing all external resources used by the script.
62598fade5267d203ee6b8ec
class Recording(object): <NEW_LINE> <INDENT> def __init__(self, channel_id, date, start_time, duration, file, is_episode): <NEW_LINE> <INDENT> date_pattern = "%Y-%m-%d" <NEW_LINE> self.channel_id = channel_id <NEW_LINE> self.date = date <NEW_LINE> self.start_time = start_time <NEW_LINE> self.duration = duration <NEW_LI...
Describes an instance of a channels recording.
62598fad99cbb53fe6830eba
class TwitterClient(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.auth = OAuthHandler(consumer_key, consumer_secret) <NEW_LINE> self.auth.set_access_token(access_token, access_token_secret) <NEW_LINE> self.api = tweepy.API(self.auth) <NEW_LINE> <DEDENT> except: <NEW_...
Generic Twitter Class for sentiment analysis.
62598fad32920d7e50bc6037
class RMarkdownCellReader(MarkdownCellReader): <NEW_LINE> <INDENT> comment = '' <NEW_LINE> start_code_re = re.compile(r"^```{(.*)}\s*$") <NEW_LINE> default_language = 'R' <NEW_LINE> default_comment_magics = True <NEW_LINE> def options_to_metadata(self, options): <NEW_LINE> <INDENT> return rmd_options_to_metadata(option...
Read notebook cells from R Markdown notebooks
62598fadd486a94d0ba2bfb1
class IMiPagoAdapter(Interface): <NEW_LINE> <INDENT> pass
Adapter for payments with MiPago
62598fad7c178a314d78d47f
class BackendMock(GeolocationBackend): <NEW_LINE> <INDENT> def geolocate(self): <NEW_LINE> <INDENT> self._raw_data = { "continent": "Europe", "country_code": "49", "name": "Germany", "geo": { "latitude": 51.165691, "longitude": 10.451526 }, "currency_code": "EUR" } <NEW_LINE> <DEDENT> def _parse(self): <NEW_LINE> <INDE...
BackendMock backend implementation.
62598fad2c8b7c6e89bd37a8
class TestUrl(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def testUrl(self): <NEW_LINE> <INDENT> pass
Url unit test stubs
62598fad3d592f4c4edbaeae
class ImportCSV(Operator, ImportHelper): <NEW_LINE> <INDENT> bl_idname = "import_scene.csv" <NEW_LINE> bl_label = "Import Statistical Data" <NEW_LINE> filename_ext = {".csv", ".tsv"} <NEW_LINE> filter_glob = StringProperty( default="*.csv;*.tsv", options={'HIDDEN'}, ) <NEW_LINE> _parent = None <NEW_LINE> def execute(se...
Imports statistical data (.csv) to visualize as graphs.
62598fad4527f215b58e9ec4
class RedisQu: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> import redis <NEW_LINE> pool = redis.ConnectionPool(**config.REDIS_CONF) <NEW_LINE> self.r = redis.StrictRedis(connection_pool=pool) <NEW_LINE> <DEDENT> def get(self, qu_name): <NEW_LINE> <INDENT> while 1: <NEW_LINE> <INDENT> rev = self.r.brpop(...
redis queue 封装
62598fad3539df3088ecc295
class ECQTestCase(PloneTestCase): <NEW_LINE> <INDENT> def createEmptyQuiz(self): <NEW_LINE> <INDENT> portal = self.portal <NEW_LINE> dummy = createObject(self.portal, 'ECQuiz', 'dummy') <NEW_LINE> portal.dummy = dummy <NEW_LINE> setProps(dummy, (('instantFeedback', False), ('allowRepetition', False), ('onePerPage', Fal...
Base class for integration tests for the 'ECQuiz' product. This may provide specific set-up and tear-down operations, or provide convenience methods.
62598fad2ae34c7f260ab0c4
class IpPort: <NEW_LINE> <INDENT> QUALNAME = "pyrogram.raw.base.IpPort" <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> raise TypeError("Base types can only be used for type checking purposes: " "you tried to use a base type instance as argument, " "but you need to instantiate one of its constructors instead. " "Mor...
This base type has 2 constructors available. Constructors: .. hlist:: :columns: 2 - :obj:`IpPort <pyrogram.raw.types.IpPort>` - :obj:`IpPortSecret <pyrogram.raw.types.IpPortSecret>`
62598fadcc40096d6161a1cc
class HueyRedisProc(ClientProc): <NEW_LINE> <INDENT> name = None <NEW_LINE> queues = [] <NEW_LINE> blocking = True <NEW_LINE> connection_params = {} <NEW_LINE> def __init__(self, connection_params=None, blocking=None, *args, **kwargs): <NEW_LINE> <INDENT> super(HueyRedisProc, self).__init__(*args, **kwargs) <NEW_LINE> ...
A proc class for the redis backend of the `Huey <http://huey.readthedocs.org/>`_ library. :param name: the name of the proc (required) :param queues: list of queue names to check (required) :param blocking: whether to use the blocking or non-blocking client (optional) :param connection_params: the con...
62598fad97e22403b383aef0
class DDL(DDLElement): <NEW_LINE> <INDENT> __visit_name__ = "ddl" <NEW_LINE> @util.deprecated_params( bind=( "2.0", "The :paramref:`_ddl.DDL.bind` argument is deprecated and " "will be removed in SQLAlchemy 2.0.", ), ) <NEW_LINE> def __init__(self, statement, context=None, bind=None): <NEW_LINE> <INDENT> if not isinsta...
A literal DDL statement. Specifies literal SQL DDL to be executed by the database. DDL objects function as DDL event listeners, and can be subscribed to those events listed in :class:`.DDLEvents`, using either :class:`_schema.Table` or :class:`_schema.MetaData` objects as targets. Basic templating support allows a si...
62598fad8da39b475be031c8
class Sequence(models.Model): <NEW_LINE> <INDENT> pre = models.CharField(max_length=1, blank=True) <NEW_LINE> digest = models.CharField(max_length=5, blank=True) <NEW_LINE> seq = models.CharField(max_length=6, unique=True, blank=True) <NEW_LINE> in_time = models.DateTimeField(auto_now_add=True)
序列库
62598fad167d2b6e312b6f55
class PDBeChemlink(object): <NEW_LINE> <INDENT> def __init__(self, local = None): <NEW_LINE> <INDENT> self._local = os.path.abspath(local) <NEW_LINE> self.__name__ = 'databases.PDBeChemlink' <NEW_LINE> <DEDENT> """ATTRIBUTES""" <NEW_LINE> @property <NEW_LINE> def local(self): return self._local <NEW_LINE> @lo...
The PDBeChemlink class controls the download and parsing of PDBeChem database
62598fad55399d3f05626507
class Lag(Filter): <NEW_LINE> <INDENT> __documentation_section__ = 'Filter UGens' <NEW_LINE> __slots__ = () <NEW_LINE> _ordered_input_names = ( 'source', 'lag_time', ) <NEW_LINE> _valid_rates = ( CalculationRate.AUDIO, CalculationRate.CONTROL, ) <NEW_LINE> def __init__( self, lag_time=0.1, calculation_rate=None, source...
A lag generator. :: >>> source = ugentools.In.kr(bus=0) >>> ugentools.Lag.kr( ... lag_time=0.5, ... source=source, ... ) Lag.kr()
62598fadd7e4931a7ef3c079
class TG2(GovernorBase): <NEW_LINE> <INDENT> def __init__(self, system, name): <NEW_LINE> <INDENT> super(TG2, self).__init__(system, name) <NEW_LINE> self._name = 'TG2' <NEW_LINE> self._data.update({ 'T1': 0.2, 'T2': 10.0, }) <NEW_LINE> self._descr.update({ 'T1': 'Transient gain time constant', 'T2': 'Governor time con...
Simplified governor model
62598fad236d856c2adc942f
class Network: <NEW_LINE> <INDENT> def __init__(self, *exclude): <NEW_LINE> <INDENT> stat = None <NEW_LINE> with open('/proc/net/dev', 'rb') as file: <NEW_LINE> <INDENT> stat = file.read() <NEW_LINE> <DEDENT> stat = stat.decode('utf-8', 'replace') <NEW_LINE> stat = stat.replace('|', ' | ').replace(':', ' ') <NEW_LINE> ...
Retrieve network statistics @variable devices:dict<str, dict<str, int>> Map from device name, to data name, to data value Data names for receive: @key rx_bytes Bytes received @key rx_packets Packets received @key rx_errs Errors @key rx_drop Dropped @key rx_fifo FIFO @key rx_fra...
62598fad10dbd63aa1c70b97
class PolybiusSquare(object): <NEW_LINE> <INDENT> def __init__(self, alphabet=None, char_map=('j','i')): <NEW_LINE> <INDENT> if alphabet is None: <NEW_LINE> <INDENT> self.alphabet = string.ascii_lowercase <NEW_LINE> self.tableau_alphabet = ''.join(sorted(list(set(self.alphabet) - set(char_map[0])))) <NEW_LINE> <DEDENT>...
Tableau for the Bifid cipher
62598fad66673b3332c303af
class DepartmentID(Field): <NEW_LINE> <INDENT> logger.info('A custom field for the department class.') <NEW_LINE> logger.info('The field forces DepartmentID to be 4 characters long.') <NEW_LINE> logger.info('The field forces DepartmentID to start with an alpha') <NEW_LINE> def db_value(self, value): <NEW_LINE> <INDENT>...
This class defines a custom Department ID field. The first character must be a letter, and the DepartmentID must be 4 characters long.
62598fad99cbb53fe6830ebb
class PrimaryXml(XmlFileParser, PackageXmlMixIn): <NEW_LINE> <INDENT> def _registerTypes(self): <NEW_LINE> <INDENT> PackageXmlMixIn._registerTypes(self) <NEW_LINE> self._databinder.registerType(_Metadata, name='metadata')
Handle registering all types for parsing primary.xml.gz.
62598fad56b00c62f0fb2898
class I_cp_w_l8(Instruction_w_l8_B): <NEW_LINE> <INDENT> name = 'cp' <NEW_LINE> mask = 0xFF8060 <NEW_LINE> code = 0xE10060 <NEW_LINE> feat = idaapi.CF_USE1
CP{.B} f
62598fad57b8e32f5250810d
class ServerUsage(extensions.V3APIExtensionBase): <NEW_LINE> <INDENT> name = "ServerUsage" <NEW_LINE> alias = ALIAS <NEW_LINE> namespace = ("http://docs.openstack.org/compute/ext/" "os-server-usage/api/v3") <NEW_LINE> version = 1 <NEW_LINE> def get_controller_extensions(self): <NEW_LINE> <INDENT> controller = ServerUsa...
Adds launched_at and terminated_at on Servers.
62598fad4f88993c371f04fc
class IFollowable(Interface): <NEW_LINE> <INDENT> pass
A content we can follow
62598fad851cf427c66b829f
class ScatteringSolver(metaclass = ABCMeta): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def make_solver_call(self, sensor): <NEW_LINE> <INDENT> pass
Abstract base class that defines the scattering solver interface.
62598fad91f36d47f2230e98
@dataclass <NEW_LINE> class DataTrainingArguments: <NEW_LINE> <INDENT> task_name: Optional[str] = field( default=None, metadata={"help": "The name of the task to train on: " + ", ".join(task_to_keys.keys())}, ) <NEW_LINE> max_seq_length: int = field( default=128, metadata={ "help": "The maximum total input sequence len...
Arguments pertaining to what data we are going to input our model for training and eval. Using `HfArgumentParser` we can turn this class into argparse arguments to be able to specify them on the command line.
62598fad7b180e01f3e49042
class Cupcake(db.Model): <NEW_LINE> <INDENT> __tablename__ = "cupcake" <NEW_LINE> id = db.Column(db.Integer, primary_key=True, autoincrement=True) <NEW_LINE> flavor = db.Column(db.Text, nullable=False) <NEW_LINE> size = db.Column(db.Text, nullable=False) <NEW_LINE> rating = db.Column(db.Float, nullable=False) <NEW_LINE...
Cupcake information
62598fad16aa5153ce4004e6
class FileUpdatedSubject(Subject): <NEW_LINE> <INDENT> def notify(self, *args, **kwargs): <NEW_LINE> <INDENT> file_list = kwargs['file_list'] <NEW_LINE> for observer in self.observers: <NEW_LINE> <INDENT> local_file_list = file_list[:] <NEW_LINE> observer.notify(file_list=local_file_list)
Broadcast a list of updated files
62598fad38b623060ffa907e
class Loader(yaml.Loader): <NEW_LINE> <INDENT> def __init__(self, stream): <NEW_LINE> <INDENT> yaml.add_constructor('!include', self.construct_include) <NEW_LINE> """Initialise Loader.""" <NEW_LINE> try: <NEW_LINE> <INDENT> self._root = os.path.split(stream.name)[0] <NEW_LINE> <DEDENT> except AttributeError: <NEW_LINE>...
YAML Loader with `!include` constructor.
62598fad4e4d56256637240a
class KLqp(VariationalInference): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(KLqp, self).__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def initialize(self, n_samples=1, kl_scaling=None, *args, **kwargs): <NEW_LINE> <INDENT> if kl_scaling is None: <NEW_LINE> <INDENT> kl_scaling = ...
Variational inference with the KL divergence $\text{KL}( q(z; \lambda) \| p(z \mid x) ).$ This class minimizes the objective by automatically selecting from a variety of black box inference techniques. #### Notes `KLqp` also optimizes any model parameters $p(z \mid x; \theta)$. It does this by variational EM, minim...
62598fadd486a94d0ba2bfb2
class JoueursPossibles(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.pions = {} <NEW_LINE> <DEDENT> def lire_joueurspossibles(self, nomFic): <NEW_LINE> <INDENT> with open(nomFic, 'r') as fichier: <NEW_LINE> <INDENT> for ligne in fichier: <NEW_LINE> <INDENT> nom, representation = ligne.split(...
# Cette structure de données gère les noms et les représentations des joueurs # le nom permet de connaitre le nom du fichier qui contient l'image représentant le # joueur en mode graphique et le caractère représentant le joueur sur la grille # Cette fonction retourne une nouvelle liste de joueurs vide dont les joueurs ...
62598fada05bb46b3848a850
class Athlete(Base): <NEW_LINE> <INDENT> __tablename__ = "athelete" <NEW_LINE> id = sa.Column(sa.INTEGER, primary_key=True) <NEW_LINE> age = sa.Column(sa.INTEGER) <NEW_LINE> birthdate = sa.Column(sa.TEXT) <NEW_LINE> gender = sa.Column(sa.TEXT) <NEW_LINE> height = sa.Column(sa.REAL) <NEW_LINE> name = sa.Column(sa.TEXT) ...
описание таблицы атлетов
62598fad5fdd1c0f98e5df71
class TooManyRequests(HTTPWarning): <NEW_LINE> <INDENT> pass
raised when receiving a 429 response from the api. **this shouldn't happen.**
62598fad7047854f4633f3bf
class TaskInlineFormset(TaskFormsetMixin, BaseInlineFormSet): <NEW_LINE> <INDENT> pass
InlineFormset for editing tasks that all share a foreign key to a single TaskType.
62598fad97e22403b383aef2
class Processor(DiffEngine.Processor): <NEW_LINE> <INDENT> def __init__(self, tokenizer=None, segmenter=None, last_text=None, last_tokens=None, last_segments=None): <NEW_LINE> <INDENT> self.tokenizer = tokenizer or TOKENIZER <NEW_LINE> self.segmenter = segmenter or SEGMENTER <NEW_LINE> self.update(last_text, last_token...
A processor used by the SegmentMatcher difference engine to track the history of a single text.
62598fadd7e4931a7ef3c07b
class BankAccount: <NEW_LINE> <INDENT> def __init__(self, accountName="Current Account", balance=200): <NEW_LINE> <INDENT> self.__accountName = accountName <NEW_LINE> self.__balance = balance <NEW_LINE> <DEDENT> def getBalance(self): <NEW_LINE> <INDENT> return self.__balance
This is a bank account class
62598fad66673b3332c303b1
class PolygonBySegmentBufferDialogTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_icon_png(self): <NEW_LINE> <INDENT> path = ':/plugins/PolygonBySegmentBuffer/icon.png' <NEW_LINE> icon = ...
Test rerources work.
62598faddd821e528d6d8f1a
class RequestSigner: <NEW_LINE> <INDENT> def __init__(self, service_name, region, algorithm=0, signature_type=0): <NEW_LINE> <INDENT> self.service_name: str = service_name <NEW_LINE> self.region: str = region <NEW_LINE> self.algorithm: int = algorithm <NEW_LINE> self.signature_type: int = signature_type <NEW_LINE> <DED...
General implementation for Request signing
62598fad57b8e32f5250810e
class ContentEncoding( Enum["7bit 8bit binary quoted-printable base64".split()], _NoInit, _NoTitle ): <NEW_LINE> <INDENT> pass
Content encodings for a string. .. Json schema media: https://json-schema.org/understanding-json-schema/reference/non_json_data.html
62598fad283ffb24f3cf3872
class ServerInterface (object): <NEW_LINE> <INDENT> def check_channel_request(self, kind, chanid): <NEW_LINE> <INDENT> return OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED <NEW_LINE> <DEDENT> def get_allowed_auths(self, username): <NEW_LINE> <INDENT> return b'password' <NEW_LINE> <DEDENT> def check_auth_none(self, username):...
This class defines an interface for controlling the behavior of paramiko in server mode. Methods on this class are called from paramiko's primary thread, so you shouldn't do too much work in them. (Certainly nothing that blocks or sleeps.)
62598fadbd1bec0571e150b6
class Brewery(_Endpoint): <NEW_LINE> <INDENT> endpoint_base = 'brewery' <NEW_LINE> get_endpoints = ('info', 'checkins')
Brewery endpoint class
62598fad091ae35668704c04
class Fig62Game(Game): <NEW_LINE> <INDENT> succs = {'A': [('a1', 'B'), ('a2', 'C'), ('a3', 'D')], 'B': [('b1', 'B1'), ('b2', 'B2'), ('b3', 'B3')], 'C': [('c1', 'C1'), ('c2', 'C2'), ('c3', 'C3')], 'D': [('d1', 'D1'), ('d2', 'D2'), ('d3', 'D3')]} <NEW_LINE> utils = Dict(B1=3, B2=12, B3=8, C1=2, C2=4, C3=6, D1=14, D2=5, D...
The game represented in [Fig. 6.2]. Serves as a simple test case. Ex: g = Fig62Game(); minimax_decision('A', g) ==> 'a1' alphabeta_full_search('A', g) ==> 'a1' alphabeta_search('A', g) ==> 'a1'
62598fade76e3b2f99fd8a1c
@plugin('remind') <NEW_LINE> class Remind(RemindBase): <NEW_LINE> <INDENT> def init(self, jarvis): <NEW_LINE> <INDENT> self.first_time_init(jarvis) <NEW_LINE> <DEDENT> def __call__(self, jarvis, s): <NEW_LINE> <INDENT> jarvis.say("## {} ##\n".format(self.timestamp_to_string(time.time()))) <NEW_LINE> self.do_print(jarvi...
List all scheduled reminders
62598fad76e4537e8c3ef593
class UnicodeCSVReader: <NEW_LINE> <INDENT> def __init__(self, f, dialect=csv.excel, encoding="utf-8", **kwds): <NEW_LINE> <INDENT> f = UTF8Recoder(f, encoding) <NEW_LINE> self.reader = csv.reader(f, dialect=dialect, **kwds) <NEW_LINE> <DEDENT> def next(self): <NEW_LINE> <INDENT> row = self.reader.next() <NEW_LINE> ret...
A CSV reader which will iterate over lines in the CSV file "f", which is encoded in the given encoding.
62598fad8e7ae83300ee9087
class Action7(Action): <NEW_LINE> <INDENT> def execute(self, instance): <NEW_LINE> <INDENT> value = self.evaluate_expression(self.get_parameter(0)) <NEW_LINE> index = self.evaluate_expression(self.get_parameter(1)) <NEW_LINE> try: <NEW_LINE> <INDENT> instance.objectPlayer.delimiters[index] = value <NEW_LINE> <DEDENT> e...
List Tokenizing->Delimiters->Set delimiter Parameters: 0: Set delimiter (EXPSTRING, ExpressionParameter) 1: Set delimiter (EXPRESSION, ExpressionParameter)
62598fad5fdd1c0f98e5df72
class Primitive(Circuit): <NEW_LINE> <INDENT> def __init__(self, fpga, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.fpga = fpga <NEW_LINE> self.fpga.primitives.append(self) <NEW_LINE> self.off()
A primitive on an FPGA.
62598fad796e427e5384e779