code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class UniversalFuzzyScale(FuzzyScale): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._name = 'FuzzyScale' <NEW_LINE> self._levels = [{'name': 'Min', 'fSet': FuzzySet(membershipFunction=MFunction('hyperbolic', **{'a': 8, 'b': 20, 'c': 0}), supportSet=(0., 0.23), linguisti...
Iniversal fuzzy scale S_f = {Min, Low, Med, High, Max}. Example view: FuzzyScale = {Min, Low, Med, High, Max} Min = <Hyperbolic(x, {"a": 8, "b": 20, "c": 0}), [0.0, 0.23]> Low = <Bell(x, {"a": 0.17, "b": 0.23, "c": 0.34}), [0.17, 0.4]> Med = <Bell(x, {"a": 0.34, "b": 0.4, "c": 0.6}), [0.34, 0.66]> High ...
62598ff7627d3e7fe0e077e5
class CargaBD_b006(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.enabled = True <NEW_LINE> self.checked = False <NEW_LINE> <DEDENT> def onClick(self): <NEW_LINE> <INDENT> pythonaddins.GPToolDialog(r'\\192.168.201.115\cpv2017\SegmentacionRural_Procesamiento\TBX\ToolbarSegmRuralV3.tbx', 'Carga...
Implementation for CargaBD_b006.button (Button)
62598ff74c3428357761abee
class OligoSampleLookup(SampleLookupBase): <NEW_LINE> <INDENT> model = M.OligoSample <NEW_LINE> search_fields = ('container__displayId__startswith', 'displayId__startswith', 'oligo__displayId__startswith')
For selectable auto-completion field in Sequencing form
62598ff74c3428357761abf0
class EditDistance(_StringDistance): <NEW_LINE> <INDENT> def _distance(self, s1, s2, same): <NEW_LINE> <INDENT> return _levenshtein_like_or_border_cases(s1, s2, same, _levenshtein)
<dl> <dt>'EditDistance[$a$, $b$]' <dd>returns the Levenshtein distance of $a$ and $b$, which is defined as the minimum number of insertions, deletions and substitutions on the constituents of $a$ and $b$ needed to transform one into the other. </dl> >> EditDistance["kitten", "kitchen"] = 2 >> EditDistanc...
62598ff7627d3e7fe0e077eb
class MoveFolderRequest(object): <NEW_LINE> <INDENT> def __init__(self, src_path, dest_path, src_storage_name=None, dest_storage_name=None): <NEW_LINE> <INDENT> self.src_path = src_path <NEW_LINE> self.dest_path = dest_path <NEW_LINE> self.src_storage_name = src_storage_name <NEW_LINE> self.dest_storage_name = dest_sto...
Request model for move_folder operation. :param src_path Folder path to move e.g. '/folder' :param dest_path Destination folder path to move to e.g '/dst' :param src_storage_name Source storage name :param dest_storage_name Destination storage name
62598ff7ad47b63b2c5a819a
class CheckerError(CheckerException): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__(CheckerStatus.FAILED)
Internal error in checker.
62598ff726238365f5fad4a8
class ParseError(Error): <NEW_LINE> <INDENT> _MESSAGE = "Parse error in %(filename)r, line %(lineno)s" <NEW_LINE> def __init__(self, filename, lineno): <NEW_LINE> <INDENT> Error.__init__(self, filename, lineno) <NEW_LINE> self.filename = filename <NEW_LINE> self.lineno = lineno <NEW_LINE> <DEDENT> def __str__(self): <N...
Parse error :CVariables: - `_MESSAGE`: The message format string :IVariables: - `filename`: The name of the file where the error occured - `lineno`: The line number of the error :Types: - `_MESSAGE`: ``str`` - `filename`: ``basestring`` - `lineno`: ``int``
62598ff70a366e3fb87dd33e
class TableSpaceAddTestCase(BaseTestGenerator): <NEW_LINE> <INDENT> scenarios = [ ('Check Tablespace Node', dict(url='/browser/tablespace/obj/')) ] <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.tablespace_name = '' <NEW_LINE> if not self.server['tablespace_path'] or self.server['tablespace_path'] ...
This class will add tablespace node under server
62598ff7c4546d3d9def772c
class ListMeasurementProtocolSecretsResponse(proto.Message): <NEW_LINE> <INDENT> @property <NEW_LINE> def raw_page(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> measurement_protocol_secrets = proto.RepeatedField( proto.MESSAGE, number=1, message=resources.MeasurementProtocolSecret, ) <NEW_LINE> next_page_t...
Response message for ListMeasurementProtocolSecret RPC Attributes: measurement_protocol_secrets (Sequence[google.analytics.admin_v1alpha.types.MeasurementProtocolSecret]): A list of secrets for the parent stream specified in the request. next_page_token (str): A token, which can be sent...
62598ff74c3428357761abf6
class Thunk(LambdaProcedure): <NEW_LINE> <INDENT> def get_actual_value(self): <NEW_LINE> <INDENT> value, env = self.apply(nil, self.env) <NEW_LINE> return scheme_eval(value, self.env)
A by-name value that is to be called as a parameterless function when its value is fetched to be used.
62598ff7c4546d3d9def772d
class BindingState(): <NEW_LINE> <INDENT> def __init__(self, is_64): <NEW_LINE> <INDENT> self.index = 0 <NEW_LINE> self.done = False <NEW_LINE> self.lib_ord = 0 <NEW_LINE> self.sym_name = "" <NEW_LINE> self.sym_flags = 0 <NEW_LINE> self.binding_type = 0 <NEW_LINE> self.addend = 0 <NEW_LINE> self.segment_index = 0 <NEW_...
State object
62598ff7ad47b63b2c5a81a0
class RemoteEcont(object): <NEW_LINE> <INDENT> def __init__(self, service_url, parcel_url, username, password, transfer_class): <NEW_LINE> <INDENT> self._service_url = service_url <NEW_LINE> self._parcel_url = parcel_url <NEW_LINE> self._username = username <NEW_LINE> self._password = password <NEW_LINE> self._transfer...
Simple interface for communication with Econt services.
62598ff7627d3e7fe0e077f1
class YubiKeyCapabilities(object): <NEW_LINE> <INDENT> model = 'Unknown' <NEW_LINE> version = (0, 0, 0,) <NEW_LINE> version_num = 0x0 <NEW_LINE> default_answer = True <NEW_LINE> def __init__(self, model = None, version = None, default_answer = None): <NEW_LINE> <INDENT> self.model = model <NEW_LINE> if default_answer i...
Class expressing the functionality of a YubiKey. This base class should be the superset of all sub-classes. In this base class, we lie and say 'yes' to all capabilities. If the base class is used (such as when creating a YubiKeyConfig() before getting a YubiKey()), errors must be handled at runtime (or later, when t...
62598ff70a366e3fb87dd342
class ReSTFormatter(Formatter): <NEW_LINE> <INDENT> def escape(self, text): <NEW_LINE> <INDENT> return text <NEW_LINE> <DEDENT> def title(self, text): <NEW_LINE> <INDENT> self.print(text) <NEW_LINE> self.print('=' * len(text)) <NEW_LINE> self.print() <NEW_LINE> <DEDENT> def begin_module_section(self, modname): <NEW_LIN...
Formatter that output ReSTructured text format for Sphinx docs.
62598ff7627d3e7fe0e077f3
class Decodable(Struct): <NEW_LINE> <INDENT> _decode_map: typing.List[ typing.Tuple[ typing.Dict[str, typing.Any], typing.Type['Decodable'] ] ] = [] <NEW_LINE> def __init_subclass__(cls, **kwargs: typing.Any): <NEW_LINE> <INDENT> super().__init_subclass__(**kwargs) <NEW_LINE> if cls._initial: <NEW_LINE> <INDENT> cls._d...
Decoding facility added Struct
62598ff70a366e3fb87dd346
class DPT(Polio): <NEW_LINE> <INDENT> max_doses = 5
Diphtheria,Pertussis and Whooping Cough vaccine
62598ff7187af65679d2a0a3
class ParticipantsPasswordsPDF(PDFView): <NEW_LINE> <INDENT> permission_required = 'participant.can_manage_participant' <NEW_LINE> filename = ugettext_lazy("Participant-access-data") <NEW_LINE> top_space = 0 <NEW_LINE> def build_document(self, pdf_document, story): <NEW_LINE> <INDENT> pdf_document.build(story) <NEW_LIN...
Generate the access data welcome paper for all participants as PDF.
62598ff7ad47b63b2c5a81a8
class UriStyleGenerator(SimpleGenerator): <NEW_LINE> <INDENT> def __init__(self, uris, headers, loop_limit=0, http_ver='1.1'): <NEW_LINE> <INDENT> self.ammo_number = 0 <NEW_LINE> self.loop_limit = loop_limit <NEW_LINE> self.uri_count = len(uris) <NEW_LINE> self.missiles = cycle([(HttpAmmo(uri, headers, http_ver).to_s()...
Generates GET ammo based on given URI list
62598ff7627d3e7fe0e077f9
class TestSettingsManager(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._original_settings = {} <NEW_LINE> <DEDENT> def set(self, **kwargs): <NEW_LINE> <INDENT> for k,v in kwargs.iteritems(): <NEW_LINE> <INDENT> self._original_settings.setdefault(k, getattr(settings, k, NO_SETTING)) <NEW_LIN...
A class which can modify some Django settings temporarily for a test and then revert them to their original values later. Automatically handles resyncing the DB if INSTALLED_APPS is modified.
62598ff73cc13d1c6d4660a6
class State(BaseModel): <NEW_LINE> <INDENT> name = ""
Represents a state
62598ff70a366e3fb87dd34c
class ContextualInternalServerError(InternalServerError): <NEW_LINE> <INDENT> def __init__(self, *a, **kw): <NEW_LINE> <INDENT> self.request = kw.get('request') <NEW_LINE> self.hide_internal_frames = kw.pop('hide_internal_frames', True) <NEW_LINE> super(ContextualInternalServerError, self).__init__(*a, **kw) <NEW_LINE>...
An Internal Server Error with a full contextual view of the exception, mostly for development (non-production) purposes. # NOTE: The dict returned by to_dict is not JSON-encodable with the default encoder. It relies on the ClasticJSONEncoder currently used in the InternalServerError class.
62598ff8627d3e7fe0e077fb
class _DispycosJob_(object): <NEW_LINE> <INDENT> __slots__ = ('request', 'client', 'name', 'where', 'cpu', 'code', 'args', 'kwargs', 'done') <NEW_LINE> def __init__(self, request, client, name, where, cpu, code, args=None, kwargs=None): <NEW_LINE> <INDENT> self.request = request <NEW_LINE> self.client = client <NEW_LIN...
Internal use only.
62598ff8187af65679d2a0a5
class ProgressBar(Widget): <NEW_LINE> <INDENT> pass
Tk no prograss bar support
62598ff84c3428357761ac04
class GwDbValidatorsPattern(GwSqlPattern, GwValidatorsPattern): <NEW_LINE> <INDENT> def __init__(self, app, **kwargs): <NEW_LINE> <INDENT> super(GwDbValidatorsPattern, self).__init__(app, **kwargs) <NEW_LINE> self.app = app <NEW_LINE> self.validators.db = DbValidatorsPlugin(self) <NEW_LINE> if not hasattr(self.app.vali...
Allows the validation of database model requests. Builds automatically hashes of table rows/model instances and validates these hashes, if a request is made on these rows.
62598ff8187af65679d2a0a6
class Reals(DeclarativeBase): <NEW_LINE> <INDENT> __tablename__ = 'reals' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> title = Column('title', String) <NEW_LINE> link = Column('link', String, nullable=True)
SQLAlchemy Reals Model
62598ff80a366e3fb87dd350
class CouponStatus(object): <NEW_LINE> <INDENT> NEW = 1 <NEW_LINE> CANCELLED = 2 <NEW_LINE> _VALUES_TO_NAMES = { 1: "NEW", 2: "CANCELLED", } <NEW_LINE> _NAMES_TO_VALUES = { "NEW": 1, "CANCELLED": 2, }
CouponStatus Перечисление статусов талончика на прием к врачу
62598ff80a366e3fb87dd352
class VolumeRenderingSpecialEffectsTest(ScriptedLoadableModuleTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> slicer.mrmlScene.Clear(0) <NEW_LINE> <DEDENT> def runTest(self): <NEW_LINE> <INDENT> self.setUp() <NEW_LINE> self.test_VolumeRenderingSpecialEffects1() <NEW_LINE> <DEDENT> def test_VolumeRenderi...
This is the test case for your scripted module. Uses ScriptedLoadableModuleTest base class, available at: https://github.com/Slicer/Slicer/blob/master/Base/Python/slicer/ScriptedLoadableModule.py
62598ff8ad47b63b2c5a81b2
class ICollectiveJqxgridPagesLayer(IDefaultBrowserLayer): <NEW_LINE> <INDENT> pass
Marker interface that defines a browser layer.
62598ff8c4546d3d9def7736
class RegistrationForm(forms.Form): <NEW_LINE> <INDENT> username = forms.CharField(max_length=30, widget=forms.TextInput(attrs=attrs_reqd), label=_(u'Username')) <NEW_LINE> email = forms.EmailField(widget=forms.TextInput(attrs=dict(attrs_reqd, maxlength=75) ), label=_(u'Your Email Address')) <NEW_LINE> password1 = form...
Form for registering a new user account. Validates that the request username is not already in use, and requires the password to be entered twice to catch typos. Subclasses should feel free to add any additional validation they need, but should either preserve the base ``save()`` or implement a ``save()`` which accep...
62598ff826238365f5fad4c0
class UseCaseParams(EmbeddedDocument): <NEW_LINE> <INDENT> key = StringField() <NEW_LINE> value = StringField() <NEW_LINE> description = StringField()
请求参数
62598ff8ad47b63b2c5a81b4
class AudioPauseCb(ctypes.c_void_p): <NEW_LINE> <INDENT> pass
Callback prototype for audio pause. ote The pause callback is never called if the audio is already paused. \param data data pointer as passed to L{libvlc_audio_set_callbacks}() [IN] \param pts time stamp of the pause request (should be elapsed already)
62598ff815fb5d323ce7f6a5
class CustomUserManager(BaseUserManager): <NEW_LINE> <INDENT> def create_user(self, email, password=None, **kwargs): <NEW_LINE> <INDENT> if not email: <NEW_LINE> <INDENT> raise ValueError('Email field is required') <NEW_LINE> <DEDENT> email = self.normalize_email(email) <NEW_LINE> user = self.model(email=email, **kwarg...
Overriding BaseUserManager in order to allow users to register and authenticate by using email instead of username.
62598ff8c4546d3d9def7737
class MinHeap(): <NEW_LINE> <INDENT> def __init__(self, items = None): <NEW_LINE> <INDENT> if not items: <NEW_LINE> <INDENT> self.heap = [] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.heap = items[:] <NEW_LINE> <DEDENT> heapq.heapify(self.heap) <NEW_LINE> <DEDENT> def push(self, item): <NEW_LINE> <INDENT> heapq....
A minimum heap. This is kind of cheating since I use the built-in heap implementation
62598ff80a366e3fb87dd356
class FacebookManager(models.Manager): <NEW_LINE> <INDENT> def create_facebook_profile( self, facebook_id, first_name, last_name, birthday, relationship, hometown, current_city, facebook_email, gender, profile_picture_url, friends_count, link, age_range, last_updated, auth_token, devices ): <NEW_LINE> <INDENT> facebook...
Manager for the FacebookProfile Model
62598ff8ad47b63b2c5a81b6
class RelayExtraInfoDescriptor(ExtraInfoDescriptor): <NEW_LINE> <INDENT> TYPE_ANNOTATION_NAME = 'extra-info' <NEW_LINE> ATTRIBUTES = dict(ExtraInfoDescriptor.ATTRIBUTES, **{ 'ed25519_certificate': (None, _parse_identity_ed25519_line), 'ed25519_signature': (None, _parse_router_sig_ed25519_line), 'signature': (None, _par...
Relay extra-info descriptor, constructed from data such as that provided by 'GETINFO extra-info/digest/\*', cached descriptors, and metrics (`specification <https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt>`_). :var ed25519_certificate str: base64 encoded ed25519 certificate :var ed25519_signature str: sign...
62598ff8c4546d3d9def7738
class Sensor(object): <NEW_LINE> <INDENT> def __init__(self, channel=0, volts=2.0): <NEW_LINE> <INDENT> self.channel = channel <NEW_LINE> self.volts = volts <NEW_LINE> self.spi = spidev.SpiDev() <NEW_LINE> self.spi.open(0, 0) <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> d...
Sensor for Wind Direction. 0-360 degrees 0.4v = 0 degrees north 16 directions Specification: http://chinaplccenter.com/support/pdf/Sensor/QS-FX-en.pdf
62598ff8627d3e7fe0e07808
class Loc(object): <NEW_LINE> <INDENT> def __init__(self, filename, line, col=None): <NEW_LINE> <INDENT> self.filename = filename <NEW_LINE> self.line = line <NEW_LINE> self.col = col <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_function_id(cls, func_id): <NEW_LINE> <INDENT> return cls(func_id.filename, func_id...
Source location
62598ff826238365f5fad4c4
class Movie(): <NEW_LINE> <INDENT> def __init__(self, movie_title, movie_storyline, poster_image, release_date, starring, trailer_youtube): <NEW_LINE> <INDENT> self.title = movie_title <NEW_LINE> self.storyline = movie_storyline <NEW_LINE> self.poster_image_url = poster_image <NEW_LINE> self.release_date = release_date...
Create a class Movie with title, storyline, image, release date, cast, and youtube trailer attributes
62598ff815fb5d323ce7f6a9
class TestKeyedItem(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 testKeyedItem(self): <NEW_LINE> <INDENT> pass
KeyedItem unit test stubs
62598ff84c3428357761ac10
class OverrideWaffleFlagTests(TestCase): <NEW_LINE> <INDENT> NAMESPACE_NAME = "test_namespace" <NEW_LINE> FLAG_NAME = "test_flag" <NEW_LINE> NAMESPACED_FLAG_NAME = NAMESPACE_NAME + "." + FLAG_NAME <NEW_LINE> TEST_COURSE_KEY = CourseKey.from_string("edX/DemoX/Demo_Course") <NEW_LINE> TEST_NAMESPACE = WaffleFlagNamespace...
Tests for the override_waffle_flag decorator/context manager.
62598ff8ad47b63b2c5a81ba
class Containers(ResourceCollection): <NEW_LINE> <INDENT> resource_class = Container
Containers collection API methods.
62598ff8c4546d3d9def773a
class ComputeGlobalForwardingRulesListRequest(messages.Message): <NEW_LINE> <INDENT> filter = messages.StringField(1) <NEW_LINE> maxResults = messages.IntegerField(2, variant=messages.Variant.UINT32, default=500) <NEW_LINE> pageToken = messages.StringField(3) <NEW_LINE> project = messages.StringField(4, required=True)
A ComputeGlobalForwardingRulesListRequest object. Fields: filter: Optional. Filter expression for filtering listed resources. maxResults: Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500. pageToken: Optional. Tag returned by a previous list request truncated by...
62598ff8c4546d3d9def773b
class PinentryTests(unittest.SynchronousTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.pinentry = _impl.Pinentry(name="pinentry") <NEW_LINE> <DEDENT> def test_argvRaisesWhenNotFound(self): <NEW_LINE> <INDENT> self.assertRaises( _impl.PinentryNotFound, self.pinentry.argv, _which=lambda arg: [],...
Tests for L{_impl.Pinentry}.
62598ff8187af65679d2a0ae
class modelParams(object): <NEW_LINE> <INDENT> def __init__(self, learn_rate = 0.001, replay_size = 32, max_memory = 2000, num_epochs = 2, hidden_size = 16): <NEW_LINE> <INDENT> self.learn_rate = float(learn_rate) <NEW_LINE> self.replay_size = int(replay_size) <NEW_LINE> self.max_memory = int(max_memory) <NEW_LINE> sel...
Parameters of the model
62598ff8c4546d3d9def773d
class DiminishedSeventhSimultaneityPrevalence(featuresModule.FeatureExtractor): <NEW_LINE> <INDENT> id = 'CS10' <NEW_LINE> def __init__(self, dataOrStream=None, *arguments, **keywords): <NEW_LINE> <INDENT> featuresModule.FeatureExtractor.__init__(self, dataOrStream=dataOrStream, *arguments, **keywords) <NEW_LINE> self...
Percentage of all simultaneities that are diminished seventh chords. >>> s = corpus.parse('bwv66.6') >>> fe = features.native.DiminishedSeventhSimultaneityPrevalence(s) >>> fe.extract().vector [0.0]
62598ff8627d3e7fe0e07812
class ClaimProjectsForm(forms.Form): <NEW_LINE> <INDENT> def __init__(self, slug, *args, **kwargs): <NEW_LINE> <INDENT> super(ClaimProjectsForm, self).__init__(*args, **kwargs) <NEW_LINE> course = Course.objects.get(slug=slug) <NEW_LINE> course_projects = course.projects.all() <NEW_LINE> if len(course_projects) > 1: <N...
Form used for TA's to select their projects
62598ff83cc13d1c6d4660be
@ut.skip("external dataset option not supported") <NEW_LINE> class TestExternal(BaseDataset): <NEW_LINE> <INDENT> def test_contents(self): <NEW_LINE> <INDENT> shape = (6, 100) <NEW_LINE> testdata = np.random.random(shape) <NEW_LINE> ext_file = self.mktemp() <NEW_LINE> external = [(ext_file, 0, h5f.UNLIMITED)] <NEW_LINE...
Feature: Datasets with the external storage property TBD: external option not supported in HSDS. Use external link instead
62598ff8ad47b63b2c5a81c2
class OrgDetailCourse(View): <NEW_LINE> <INDENT> def get(self, request, org_id): <NEW_LINE> <INDENT> current_page = 'course' <NEW_LINE> detail_org = get_object_or_404(CourseOrg, pk=int(org_id)) <NEW_LINE> all_course = detail_org.course_set.all() <NEW_LINE> has_fav = False <NEW_LINE> if request.user.is_authenticated: <N...
课程机构课程
62598ff8187af65679d2a0b1
class TestPlotMultiCctfs(unittest.TestCase): <NEW_LINE> <INDENT> def test_plot_multi_cctfs(self): <NEW_LINE> <INDENT> figure, axes = plot_multi_cctfs(["ITU-R BT.709", "sRGB"]) <NEW_LINE> self.assertIsInstance(figure, Figure) <NEW_LINE> self.assertIsInstance(axes, Axes)
Define :func:`colour.plotting.models.plot_multi_cctfs` definition unit tests methods.
62598ff8ad47b63b2c5a81c4
class Square(): <NEW_LINE> <INDENT> def __init__(self, size=0): <NEW_LINE> <INDENT> self.size = size <NEW_LINE> <DEDENT> def area(self): <NEW_LINE> <INDENT> return self.__size ** 2 <NEW_LINE> <DEDENT> @property <NEW_LINE> def size(self): <NEW_LINE> <INDENT> return self.__size <NEW_LINE> <DEDENT> @size.setter <NEW_LINE>...
A square class.
62598ff80a366e3fb87dd365
class TestSchoolUser(TestCase): <NEW_LINE> <INDENT> token = None <NEW_LINE> ip_addr = None <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.token, self.ip_addr = Initialization.start_session(self) <NEW_LINE> Initialization.register(self, 'testuser', 'Test666', '11011011011') <NEW_LINE> Initialization.login(self, 't...
Test Program User
62598ff8c4546d3d9def773f
class MailTemplate(SimpleLogingInformations, Base): <NEW_LINE> <INDENT> name = Column('name', Unicode(255, collation='utf8_unicode_ci'), nullable=False) <NEW_LINE> body = Column('body', UnicodeText(collation='utf8_unicode_ci'), nullable=False) <NEW_LINE> subject = Column('subject', Unicode(255, collation='utf8_unicode_...
This is a container class for the Mails table.
62598ff8627d3e7fe0e0781a
class MatchCondition(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'match_variables': {'required': True}, 'operator': {'required': True}, 'match_values': {'required': True}, } <NEW_LINE> _attribute_map = { 'match_variables': {'key': 'matchVariables', 'type': '[MatchVariable]'}, 'operator': {'key': 'o...
Define match conditions. All required parameters must be populated in order to send to Azure. :param match_variables: Required. List of match variables. :type match_variables: list[~azure.mgmt.network.v2019_09_01.models.MatchVariable] :param operator: Required. Describes operator to be matched. Possible values includ...
62598ff84c3428357761ac21
class DistrictManipulator(ManipulatorBase[District]): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def getCacheKeysAndQueries( cls, affected_refs: TAffectedReferences ) -> List[get_affected_queries.TCacheKeyAndQuery]: <NEW_LINE> <INDENT> return get_affected_queries.district_updated(affected_refs) <NEW_LINE> <DEDENT> @cl...
Handles District database writes
62598ff8ad47b63b2c5a81ca
class BusInfoOnRoad(BaseDataRequest): <NEW_LINE> <INDENT> def __init__(self, line_name, from_station): <NEW_LINE> <INDENT> BaseDataRequest.__init__(self, 'GetBusListOnRoad') <NEW_LINE> self.set_param({ 'lineName': line_name, 'fromStation': from_station })
获取指定线路路上巴士的信息
62598ff80a366e3fb87dd36b
class UploadDefaultTranscriptHandlerTests(VideoXBlockTestBase): <NEW_LINE> <INDENT> @patch('video_xblock.video_xblock.create_reference_name') <NEW_LINE> def test_upload_handler_default_transcript_not_in_vtt_case(self, create_reference_name_mock): <NEW_LINE> <INDENT> request_body = """{"label": "test_label","lang": "tes...
Test cases for `VideoXBlock.upload_default_transcript_handler`.
62598ff815fb5d323ce7f6bb
class Topic(models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=100) <NEW_LINE> date_added = models.DateTimeField(auto_now_add=True) <NEW_LINE> owner = models.ForeignKey(User) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.title
Basic model for a Topic Return: title (str): The title of the topic.
62598ff94c3428357761ac23
class Configure(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def read_config(self, conf_name, section, option): <NEW_LINE> <INDENT> value = "" <NEW_LINE> try: <NEW_LINE> <INDENT> cf = configparser.ConfigParser() <NEW_LINE> cf.read(conf_name) <NEW_LINE> value = cf.get(section, ...
读取配置文件
62598ff93cc13d1c6d4660ca
class SigningKey(Key): <NEW_LINE> <INDENT> def sign(self, data): <NEW_LINE> <INDENT> if not self.has_private(): <NEW_LINE> <INDENT> raise TypeError('Private key not available in this object') <NEW_LINE> <DEDENT> return self._sign(data) <NEW_LINE> <DEDENT> def verify(self, data, sig): <NEW_LINE> <INDENT> return self._ve...
Base class for signing keys.
62598ff926238365f5fad4da
class ListZoneOperationsResultSet(ResultSet): <NEW_LINE> <INDENT> def getJSONFromString(self, str): <NEW_LINE> <INDENT> return json.loads(str) <NEW_LINE> <DEDENT> def get_Response(self): <NEW_LINE> <INDENT> return self._output.get('Response', None) <NEW_LINE> <DEDENT> def get_NewAccessToken(self): <NEW_LINE> <INDENT> r...
A ResultSet with methods tailored to the values returned by the ListZoneOperations Choreo. The ResultSet object is used to retrieve the results of a Choreo execution.
62598ff9c4546d3d9def7745
class Peaklist(object): <NEW_LINE> <INDENT> def __init__(self, infn): <NEW_LINE> <INDENT> with open(infn, "r") as infile: <NEW_LINE> <INDENT> self.firstline = infile.readline().split("\012")[0] <NEW_LINE> self.axislabels = infile.readline().split("\012")[0] <NEW_LINE> self.dataset = infile.readline().split("\012")[0] <...
Provide access to header lines and data from a nmrview xpk file. Header file lines and file data are available as attributes. Parameters ---------- infn : str The input nmrview filename. Attributes ---------- firstline : str The first line in the header. axislabels : str The axis labels. dataset : st...
62598ff9ad47b63b2c5a81d2
class Student(): <NEW_LINE> <INDENT> def __init__(self, first_name, last_name, age): <NEW_LINE> <INDENT> self.first_name = first_name <NEW_LINE> self.last_name = last_name <NEW_LINE> self.age = age <NEW_LINE> <DEDENT> def to_json(self): <NEW_LINE> <INDENT> return(self.__dict__)
class that defines studen
62598ff9c4546d3d9def7747
class User(Interface): <NEW_LINE> <INDENT> score = 1 <NEW_LINE> display_score = 2020 <NEW_LINE> @classmethod <NEW_LINE> def to_python(cls, data, **kwargs): <NEW_LINE> <INDENT> data = data.copy() <NEW_LINE> for key in ("id", "email", "username", "ip_address", "name", "geo", "data"): <NEW_LINE> <INDENT> data.setdefault(k...
An interface which describes the authenticated User for a request. You should provide **at least** either an `id` (a unique identifier for an authenticated user) or `ip_address` (their IP address). All other attributes are optional. >>> { >>> "id": "unique_id", >>> "username": "my_user", >>> "email": "fo...
62598ff9ad47b63b2c5a81d4
class SimpleXMLRPCServer(socketserver.TCPServer, SimpleXMLRPCDispatcher): <NEW_LINE> <INDENT> allow_reuse_address = True <NEW_LINE> _send_traceback_header = False <NEW_LINE> def __init__(self, addr, requestHandler=SimpleXMLRPCRequestHandler, logRequests=True, allow_none=False, encoding=None, bind_and_activate=True): <N...
Simple XML-RPC server. Simple XML-RPC server that allows functions and a single instance to be installed to handle requests. The default implementation attempts to dispatch XML-RPC calls to the functions or instance installed in the server. Override the _dispatch method inherited from SimpleXMLRPCDispatcher to change ...
62598ff94c3428357761ac2b
class GAN(nn.Module, ABC): <NEW_LINE> <INDENT> def __init__(self, res): <NEW_LINE> <INDENT> super(GAN, self).__init__() <NEW_LINE> self._res = res <NEW_LINE> <DEDENT> def most_parameters(self, recurse=True, excluded_params: list = []): <NEW_LINE> <INDENT> for name, params in self.named_parameters(recurse=recurse): <NEW...
Base GANs architechture for ResNet
62598ff93cc13d1c6d4660d3
class PropertyViewFilterSet(FilterSet): <NEW_LINE> <INDENT> address_line_1 = CharFilter(name="state__address_line_1", lookup_expr='contains') <NEW_LINE> analysis_state = CharFilter(method='analysis_state_filter') <NEW_LINE> identifier = CharFilter(method='identifier_filter') <NEW_LINE> cycle_start = DateFilter(name='cy...
Advanced filtering for PropertyView sets version 2.1.
62598ff90a366e3fb87dd377
class InvalidSwitchToTargetException(Exception): <NEW_LINE> <INDENT> def __init__(self, msg=None): <NEW_LINE> <INDENT> Exception.__init__(self, msg)
The frame or window target to be switched doesn't exist.
62598ff915fb5d323ce7f6c7
class ajax_error_wrapper(object): <NEW_LINE> <INDENT> def __init__(self, f): <NEW_LINE> <INDENT> self.f = f <NEW_LINE> <DEDENT> def __call__(self, request): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> if request.method != 'POST': <NEW_LINE> <INDENT> return ajax_error('POST method must be used.') <NEW_LINE> <DEDENT> if...
Used as decorator to trap/display errors in the ajax calls
62598ff94c3428357761ac2f
class SPFTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def _make_dummy_suspect(self, senderdomain, clientip, helo='foo.example.com'): <NEW_LINE> <INDENT> s = Suspect('sender@%s' % senderdomain, 'recipient@example.com', '/dev/null') <NEW_LINE> s.clientinfo = (helo, unicode(clientip), 'ptr.example.com') <NEW_LINE> ret...
SPF Check Tests
62598ff915fb5d323ce7f6c9
class GalaxyLogin(object): <NEW_LINE> <INDENT> GITHUB_AUTH = 'https://api.github.com/authorizations' <NEW_LINE> def __init__(self, galaxy, github_token=None): <NEW_LINE> <INDENT> self.galaxy = galaxy <NEW_LINE> self.github_username = None <NEW_LINE> self.github_password = None <NEW_LINE> if github_token is None: <NEW_L...
Class to handle authenticating user with Galaxy API prior to performing CUD operations
62598ff9ad47b63b2c5a81da
class FlowTimeout(base_tests.SimpleDataPlane): <NEW_LINE> <INDENT> def runTest(self): <NEW_LINE> <INDENT> logging.info("Running Flow_Timeout test ") <NEW_LINE> of_ports = config["port_map"].keys() <NEW_LINE> of_ports.sort() <NEW_LINE> self.assertTrue(len(of_ports) > 1, "Not enough ports for test") <NEW_LINE> rc = delet...
Verify that Flow removed messages are generated as expected Flow removed messages being generated when flag is set, is already tested in the above tests So here, we test the vice-versa condition
62598ff926238365f5fad4e6
class ExpressRouteCircuitAuthorization(SubResource): <NEW_LINE> <INDENT> _validation = { 'etag': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', '...
Authorization in an ExpressRouteCircuit resource. Variables are only populated by the server, and will be ignored when sending a request. :param id: Resource ID. :type id: str :param name: The name of the resource that is unique within a resource group. This name can be used to access the resource. :type name: str :...
62598ff94c3428357761ac33
class UpdateModelMixinWithNone(object): <NEW_LINE> <INDENT> def update(self, request, *args, **kwargs): <NEW_LINE> <INDENT> serializer = self.get_serializer(self.kwargs, data=request.data, partial=False) <NEW_LINE> serializer.is_valid(raise_exception=True) <NEW_LINE> return Response(serializer.save()) <NEW_LINE> <DEDEN...
Update a model instance. do not return data to response
62598ff93cc13d1c6d4660da
class PurgeUrlsCacheRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Urls = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Urls = params.get("Urls")
PurgeUrlsCache请求参数结构体
62598ff9627d3e7fe0e0782e
class dotdict(dict): <NEW_LINE> <INDENT> __getattr__ = dict.get <NEW_LINE> __setattr__ = dict.__setitem__ <NEW_LINE> __delattr__ = dict.__delitem__ <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> for key, value in dict(*args, **kwargs).items(): <NEW_LINE> <INDENT> if hasattr(value, 'keys'): value = ...
``dotdict`` wrapper class to allow dot-operator access to ``dict`` values. See: https://stackoverflow.com/a/23689767 And: https://stackoverflow.com/a/13520518
62598ff94c3428357761ac37
class Level(object): <NEW_LINE> <INDENT> wall_list = None <NEW_LINE> num_list = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.wall_list = pygame.sprite.Group() <NEW_LINE> self.num_list = pygame.sprite.Group() <NEW_LINE> <DEDENT> def update(self): <NEW_LINE> <INDENT> self.wall_list.update() <NEW_LINE> sel...
Each level has a set of walls, nos. and enemies
62598ff9c4546d3d9def774e
class View(Model): <NEW_LINE> <INDENT> _inherit = 'ir.ui.view' <NEW_LINE> def render(self, cr, uid, id_or_xml_id, values=None, engine='ir.qweb', context=None): <NEW_LINE> <INDENT> if values is None: <NEW_LINE> <INDENT> values = dict() <NEW_LINE> <DEDENT> if 'website' not in values: <NEW_LINE> <INDENT> w_obj = self.pool...
View class.
62598ff94c3428357761ac39
class SGSEmbedding(SGSBase): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__(derivatives=EmbeddingDerivatives(), params=["weight"])
SGS extension for Embedding.
62598ff915fb5d323ce7f6d5
class HStoreDict(UnicodeMixin, dict): <NEW_LINE> <INDENT> def __init__(self, value=None, field=None, instance=None, connection=None, **params): <NEW_LINE> <INDENT> if isinstance(value, six.string_types): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> value = json.loads(value) <NEW_LINE> <DEDENT> except ValueError as e: <...
A dictionary subclass which implements hstore support.
62598ff94c3428357761ac3b
class Observables(entities.EntityList): <NEW_LINE> <INDENT> _binding = core_binding <NEW_LINE> _binding_class = _binding.ObservablesType <NEW_LINE> _namespace = 'http://cybox.mitre.org/cybox-2' <NEW_LINE> cybox_major_version = fields.TypedField("cybox_major_version") <NEW_LINE> cybox_minor_version = fields.TypedField("...
The root CybOX Observables object.
62598ff926238365f5fad4f0
class ILayer(Interface): <NEW_LINE> <INDENT> pass
A layer specific to this product. Is registered using browserlayer.xml
62598ff9c4546d3d9def7751
class PipelinesResponse(object): <NEW_LINE> <INDENT> swagger_types = { 'items': 'list[Pipeline]', 'links': 'Links', 'meta': 'Meta' } <NEW_LINE> attribute_map = { 'items': 'items', 'links': 'links', 'meta': 'meta' } <NEW_LINE> def __init__(self, items=None, links=None, meta=None): <NEW_LINE> <INDENT> self._items = None ...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598ff90a366e3fb87dd38a
class ExtensionPreferences: <NEW_LINE> <INDENT> manifest = None <NEW_LINE> @classmethod <NEW_LINE> @lru_cache(maxsize=1000) <NEW_LINE> def create_instance(cls, ext_id): <NEW_LINE> <INDENT> return cls(ext_id, ExtensionManifest.open(ext_id)) <NEW_LINE> <DEDENT> def __init__(self, ext_id: str, manifest: ExtensionManifest,...
Manages extension preferences. Stores them in pickled file in cache directory
62598ff9c4546d3d9def7753
class ProcessProtocol(protocol.ProcessProtocol): <NEW_LINE> <INDENT> def __init__(self, processName, processHandler): <NEW_LINE> <INDENT> self.processName = processName <NEW_LINE> self.processHandler = processHandler <NEW_LINE> self.stdOut = [] <NEW_LINE> self.errOut = [] <NEW_LINE> <DEDENT> def outReceived(self, data)...
@summary: Protocol class for job processes
62598ff93cc13d1c6d4660e9
class Tiles: <NEW_LINE> <INDENT> def __init__(self, size, covered_colour=(255,255,255), uncovered_colour=(125,125,125), text_colour=(0,38,255), transparency=255, font = None): <NEW_LINE> <INDENT> self.font = font <NEW_LINE> self.size = size <NEW_LINE> if font == None: <NEW_LINE> <INDENT> pygame.font.init() <NEW_LINE> s...
This class provides squares to blit onto the main pygame surface; there is an initial. type is an int from 0-11 where type: 0-8 correspond to tiles with numbers 0-8 on them 9 is a flagged tiles 10 is a mine 11 is an covered tile size is the dimensions of each tile in pixels covoured_colour is the colour of the coloure...
62598ffa0a366e3fb87dd394
class Actor(models.Model): <NEW_LINE> <INDENT> name = models.CharField(verbose_name="Имя", max_length=100) <NEW_LINE> age = models.PositiveSmallIntegerField(verbose_name="Возраст", default=0) <NEW_LINE> description = models.TextField(verbose_name="Описание") <NEW_LINE> image = models.ImageField(verbose_name="Изображени...
Актёры и режессёры
62598ffa627d3e7fe0e07846
@logger.init('gui', 'DEBUG') <NEW_LINE> class SpreadsheetSettings(QtGui.QTabWidget): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> super(SpreadsheetSettings, self).__init__(parent) <NEW_LINE> self.addTab(ReportPane(self), "Reports") <NEW_LINE> self.addTab(ColumnPane(self), "Columns") <NEW_LINE> se...
Definitions for spreadsheet settings
62598ffa0a366e3fb87dd398
class ConversionMap(object): <NEW_LINE> <INDENT> def __init__(self, recursive, nocompile_decorators, partial_types): <NEW_LINE> <INDENT> self.recursive = recursive <NEW_LINE> self.nocompile_decorators = nocompile_decorators <NEW_LINE> self.partial_types = partial_types if partial_types else () <NEW_LINE> self.dependenc...
ConversionMaps keep track of converting function hierarchies. Attributes: recursive: Whether to recusrively convert any functions that the decorator function may call. nocompile_decorators: tuple of decorator functions that toggle compilation off. dependency_cache: dict[object]: ast; maps original ob...
62598ffaad47b63b2c5a81fa
class Arbol: <NEW_LINE> <INDENT> def __init__(self, contenido): <NEW_LINE> <INDENT> self.contenido = contenido <NEW_LINE> self.enlaces = [] <NEW_LINE> <DEDENT> def setenlaces(self, enlaces): <NEW_LINE> <INDENT> for enlace in enlaces: <NEW_LINE> <INDENT> if not isinstance(enlace, Arbol): <NEW_LINE> <INDENT> raise TypeEr...
Un arbol n-ario. Sirve para representar la jerarquia de categorias de operaciones
62598ffac4546d3d9def775a
class AssignName(mixins.NoChildrenMixin, LookupMixIn, mixins.ParentAssignTypeMixin, NodeNG): <NEW_LINE> <INDENT> _other_fields = ('name',) <NEW_LINE> def __init__(self, name=None, lineno=None, col_offset=None, parent=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> super(AssignName, self).__init__(lineno, col_off...
Variation of :class:`ast.Assign` representing assignment to a name. An :class:`AssignName` is the name of something that is assigned to. This includes variables defined in a function signature or in a loop. >>> node = astroid.extract_node('variable = range(10)') >>> node <Assign l.1 at 0x7effe1db8550> >>> list(node.g...
62598ffaad47b63b2c5a81fc
class GetPseudoIPv4SettingRequest(JDCloudRequest): <NEW_LINE> <INDENT> def __init__(self, parameters, header=None, version="v1"): <NEW_LINE> <INDENT> super(GetPseudoIPv4SettingRequest, self).__init__( '/zones/{zone_identifier}/settings$$pseudo_ipv4', 'GET', header, version) <NEW_LINE> self.parameters = parameters
获取Pseudo IPv4(IPv6到IPv4的转换服务)的设置
62598ffaad47b63b2c5a8200
class AclsFun(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def acls_auth(auth='sys'): <NEW_LINE> <INDENT> acls_info = acls(auth,debug = False) <NEW_LINE> return acls_info <NEW_LINE> <DEDENT> @click.group() <NEW_LINE> def Acls(): <NEW_LINE> <INDENT> pas...
Funciton for Acls CLI
62598ffa187af65679d2a0d0
class ln_access_to_workplace_from_residences(Variable): <NEW_LINE> <INDENT> gc_ln_access_to_workplace_from_residences = "gc_ln_access_to_workplace_from_residences" <NEW_LINE> hh_grid_id = "grid_id" <NEW_LINE> def dependencies(self): <NEW_LINE> <INDENT> return [attribute_label("gridcell", self.gc_ln_access_to_workplace_...
(SUM(Jobs(i) * exp(logsum_DDD(i to this_zone)), for i=zone_1...zone_n), for the income type (DDD) of this house) / number_of_DDD_types Although, the above fomula is really calculated in zones and passed through gridcell to household.
62598ffa3cc13d1c6d4660ff
class GemSet: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.gems = {} <NEW_LINE> <DEDENT> def add(self, gem, count): <NEW_LINE> <INDENT> new_count = self.gems.get(gem, 0) + count <NEW_LINE> assert new_count >= 0 <NEW_LINE> self.gems[gem] = new_count <NEW_LINE> <DEDENT> def get(self, gem): <NEW_LINE> ...
Set of gems with count (or price) each
62598ffa4c3428357761ac59
class Client: <NEW_LINE> <INDENT> def __init__(self, name, company, email, position, uid=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.company = company <NEW_LINE> self.email = email <NEW_LINE> self.position = position <NEW_LINE> self.uid = uid or uuid.uuid4() <NEW_LINE> <DEDENT> def to_dict(self): <NEW_L...
docstring for Client
62598ffa15fb5d323ce7f6f6
@admin.register(Person) <NEW_LINE> class PersonAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('name', 'email', 'responsible_for_lab') <NEW_LINE> search_fields = ('name', 'email', 'responsible_for_lab__name') <NEW_LINE> ordering = ('name', )
ModelAdmin for Person model
62598ffa187af65679d2a0d3
class IssueConfig(AppConfig): <NEW_LINE> <INDENT> name = 'issue'
config for Issue
62598ffaad47b63b2c5a8208
class Galaxy(object): <NEW_LINE> <INDENT> def __init__(self, options): <NEW_LINE> <INDENT> self.options = options <NEW_LINE> roles_path = getattr(self.options, 'roles_path', []) <NEW_LINE> self.roles_paths = roles_path <NEW_LINE> self.roles = {} <NEW_LINE> this_dir, this_filename = os.path.split(__file__) <NEW_LINE> s...
Keeps global galaxy info
62598ffa4c3428357761ac5f
class BaseViewTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(BaseViewTests, self).setUp() <NEW_LINE> self._real_render_to_response = shortcuts.render_to_response <NEW_LINE> shortcuts.render_to_response = fake_render_to_response <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT>...
Base class for view based unit tests.
62598ffaad47b63b2c5a820a
class FileManager: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read_file(filename): <NEW_LINE> <INDENT> file = open(filename, 'r') <NEW_LINE> lines = file.readlines() <NEW_LINE> file.close() <NEW_LINE> return lines <NEW_LINE> <DEDENT> @staticmethod <...
This class allows to manage the files part of the part with some static method. Cette classe permet de gérer les fichiers du projet avec quelques methodes statique. Author: Kierian Tirlemont
62598ffa0a366e3fb87dd3aa