code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class Comment(models.Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> app_label = "hyperion" <NEW_LINE> <DEDENT> COMMENT_CONTENT_TYPE_CHOICE = (("text/plain", "text/plain"), ("text/markdown", "text/markdown")) <NEW_LINE> content_type = models.CharField( max_length=20, choices=COMMENT_CONTENT_TYPE_CHOICE, def...
author: UserProfile create_date: date post: Post id: UUID
62598f98b7558d589546336d
class EigenValueVectorPair: <NEW_LINE> <INDENT> def __init__(self, eig_val, eig_vec): <NEW_LINE> <INDENT> self.val = eig_val <NEW_LINE> self.vec = eig_vec <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return 'EigenValueVectorPair(%s, %s)'%(repr(self.val), repr(self.vec))
A simple data structure holding a single eigenvalue and its corresponding eigenvector.
62598f981f037a2d8b9e3e22
class pminvar(ParametricSpectrum): <NEW_LINE> <INDENT> def __init__(self, data, order, NFFT=None, sampling=1.): <NEW_LINE> <INDENT> super(pminvar, self).__init__(data, ar_order=order, sampling=sampling, NFFT=NFFT) <NEW_LINE> <DEDENT> def __call__(self): <NEW_LINE> <INDENT> res = minvar(self.data, self.ar_order, samplin...
Class to create PSD based on the Minimum variance spectral estimation See :func:`minvar` for description. .. plot:: :width: 80% :include-source: from spectrum import * p = pminvar(marple_data, 15, NFFT=4096) p() p.plot(sides='centerdc')
62598f98bd1bec0571e14f63
class Network(object): <NEW_LINE> <INDENT> def __init__(self, inputs, network_creator, var_scope, name_scope=None, reuse=False): <NEW_LINE> <INDENT> self._var_scope, self._f_creator, self._inputs = var_scope, network_creator, inputs <NEW_LINE> self._abs_var_scope = Utils.abs_var_scope(var_scope) <NEW_LINE> with tf.vari...
tensorflow network.
62598f98d7e4931a7ef3bdd6
class CannotCreate(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def remote_create(cls, *args, **kwargs): <NEW_LINE> <INDENT> raise TypeError('Cannot create object of type %s.' % cls.__name__)
An instance of CannotCreate will raise a TypeError when calling remote_create().
62598f98d486a94d0ba2bd13
class DTSmartAsm(DTOperation): <NEW_LINE> <INDENT> def needs_key(self): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def needs_second_key(self): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def needs_IV(self): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def transform(self, dt_input, dt_key1=Non...
Smart Assembly Resource Decryptor The only input needed is dt_input containing an encrypted .NET resource This class will decrypt and decompress the resource using DES & deflate respectively and return output
62598f988e7ae83300ee8ddb
class RRSIGBadLengthEd25519(RRSIGBadLengthEdDSA): <NEW_LINE> <INDENT> curve = 'Ed25519' <NEW_LINE> algorithm = 15 <NEW_LINE> correct_length = 512 <NEW_LINE> _abstract = False <NEW_LINE> code = 'RRSIG_BAD_LENGTH_ED25519'
>>> e = RRSIGBadLengthEd25519(length=500) >>> e.description 'The length of the signature is 500 bits, but an Ed25519 signature (DNSSEC algorithm 15) must be 512 bits long.'
62598f9816aa5153ce40023b
class PartyLeadershipMustExist(base.ValidReferenceRule): <NEW_LINE> <INDENT> def __init__(self, election_tree, schema_tree): <NEW_LINE> <INDENT> super(PartyLeadershipMustExist, self).__init__(election_tree, schema_tree, "Person") <NEW_LINE> <DEDENT> def _gather_reference_values(self): <NEW_LINE> <INDENT> root = self.el...
Each party leader or party chair should refer to a person in the feed.
62598f9871ff763f4b5e74b7
class StatusLike(Protocol): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def of_server(cls: Type['_SL'], server: Server) -> '_SL': <NEW_LINE> <INDENT> raise NotImplementedError()
A snapshot of server's metrics. Basically a data class alike.
62598f9891af0d3eaad39b47
class Bint: <NEW_LINE> <INDENT> def __init__(self, filename): <NEW_LINE> <INDENT> self.variables = {} <NEW_LINE> logging.info('About to parse %s', filename) <NEW_LINE> self.program = parser.BintParser(filename).parse() <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> for statement in self.program: <NEW_LINE> <IND...
This class interprets and runs a small segment of basic.
62598f98eab8aa0e5d30bac2
class Designation_History(models.Model): <NEW_LINE> <INDENT> employee = models.ForeignKey(Employee, blank = True, null = True ) <NEW_LINE> designation = models.ForeignKey('company.Designation', blank = True, null = True ) <NEW_LINE> date = models.DateField() <NEW_LINE> def publish(self): <NEW_LINE> <INDENT> self.save()...
Designation_History model records designation_history for particular employee
62598f9876e4537e8c3ef2f3
class Main(Module): <NEW_LINE> <INDENT> pattern = Module._any <NEW_LINE> terminate = False <NEW_LINE> help = make_help(WIKIS) <NEW_LINE> match_fmt = r'^\s*(?:%s)(?:\s+(.+?))?\s*$' <NEW_LINE> def init(self): <NEW_LINE> <INDENT> self.wikis = {} <NEW_LINE> for wiki, opts in WIKIS.iteritems(): <NEW_LINE> <INDENT> match_re ...
Autoloaded by Madcow
62598f98462c4b4f79dbb748
class Image(object): <NEW_LINE> <INDENT> def __init__(self, name, folder=None, path=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> if folder and not path: <NEW_LINE> <INDENT> path = join(folder, name) <NEW_LINE> <DEDENT> if path: <NEW_LINE> <INDENT> self.image = PIL.Image.open(path) <NEW_LINE> self.cv_image = c...
A single picture
62598f98be383301e025353b
class WebDAVTextElement (WebDAVElement): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def fromString(clazz, string): <NEW_LINE> <INDENT> if string is None: <NEW_LINE> <INDENT> return clazz() <NEW_LINE> <DEDENT> elif isinstance(string, (unicode, str)): <NEW_LINE> <INDENT> return clazz(PCDATAElement(string)) <NEW_LINE> <D...
WebDAV element containing PCDATA.
62598f980c0af96317c560c2
class TechnicalLeader(models.Model): <NEW_LINE> <INDENT> member = models.OneToOneField( 'Member', on_delete=models.SET_NULL, null=True, related_name='techLeader', verbose_name='technical leader', ) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> verbose_name = "technical leader" <NEW_LINE> verbose_name_plural = verbose_name...
Technical leader of the whole team
62598f98379a373c97d98d52
class MySlowLogisticRegression(): <NEW_LINE> <INDENT> def __init__(self, eta=0.01, n_iter=100): <NEW_LINE> <INDENT> self.eta = eta <NEW_LINE> self.n_iter = n_iter <NEW_LINE> <DEDENT> def fit(self, X, y): <NEW_LINE> <INDENT> self.w_ = {} <NEW_LINE> for class_ in np.unique(y): <NEW_LINE> <INDENT> self.w_[class_] = np.zer...
The slow logistic regression classifier (implemented heavily by list)
62598f9863d6d428bbee24fc
class Platform(DeclEnum): <NEW_LINE> <INDENT> linux = "linux", "Linux" <NEW_LINE> windows = "windows", "Windows" <NEW_LINE> mac = "mac", "Mac" <NEW_LINE> bsd = "bsd", "BSD"
Enum for platform data.
62598f98be8e80087fbbed9d
class Glabella_pt(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "object.glabella_pt" <NEW_LINE> bl_label = "Glabella" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> found = 'Glabella' in bpy.data.objects <NEW_LINE> if found == False: <N...
Tooltip
62598f987d847024c075c111
class DefaultHandler(Handler): <NEW_LINE> <INDENT> _immutable_ = True <NEW_LINE> def handle(self, effect, k): <NEW_LINE> <INDENT> if isinstance(effect, Answer): <NEW_LINE> <INDENT> return DefaultHandlerFn(k, effect.val())
Defines a handler that calls the continuation when the effect is an Answer
62598f9830bbd72246469815
class InequalityFilterBackend(BaseFilterBackend): <NEW_LINE> <INDENT> def filter_queryset(self, request, queryset, view): <NEW_LINE> <INDENT> filter_fields = getattr(view, 'filter_fields', []) <NEW_LINE> for key, value in request.query_params.items(): <NEW_LINE> <INDENT> splits = key.split('__') <NEW_LINE> if len(split...
A filter backend that allows for field__gt style filtering.
62598f98507cdc57c63a4ad4
@api.route("/system") <NEW_LINE> class System(Resource): <NEW_LINE> <INDENT> @api.doc( model=[model_system_data], params={ "startts": "Start of a time interval", "endts": "End of a time interval", "precision": "Length of the aggregation interval", }, ) <NEW_LINE> def get(self) -> Union[int, List]: <NEW_LINE> <INDENT> p...
System data information of all databases.
62598f9807f4c71912baf18b
@ClassFactory.register(ClassType.NETWORK) <NEW_LINE> class Transpose(nn.Cell, OperatorSerializable): <NEW_LINE> <INDENT> def __init__(self, dim1=0, dim2=1): <NEW_LINE> <INDENT> super(Transpose, self).__init__() <NEW_LINE> self.dim1, self.dim2 = dim1, dim2 <NEW_LINE> self.transpose = P.Transpose() <NEW_LINE> self.shape ...
Class of Transpose.
62598f98d58c6744b42dc170
@unique <NEW_LINE> class TemplateScriptFile(str, Enum): <NEW_LINE> <INDENT> CUST = 'cust.sh' <NEW_LINE> INIT = 'init.sh' <NEW_LINE> NFSD = 'nfsd.sh' <NEW_LINE> DOCKER_UPGRADE = 'cluster-upgrade/docker-upgrade.sh' <NEW_LINE> CONTROL_PLANE_CNI_APPLY = 'cluster-upgrade/control-plane-cni-apply.sh' <NEW_LINE> CONTROL_PLANE_...
Types of script for vApp template customizations in CSE.
62598f983eb6a72ae038a37d
class ParentMissingError(Exception): <NEW_LINE> <INDENT> pass
The parent of a path is missing. Exception raised if an attempt is made to add a path to the repository mirror but the parent's path doesn't exist in the youngest revision of the repository.
62598f98d7e4931a7ef3bdd7
class FinancialInsightsView(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.client = APIClient() <NEW_LINE> <DEDENT> def test_accessing_financial_insights_view(self): <NEW_LINE> <INDENT> response = self.client.get(FINANCIAL_INSIGHTS_URL) <NEW_LINE> self.assertEqual(response.status_code, status....
Test Financial Insight view
62598f98adb09d7d5dc0a2c8
class Node(object): <NEW_LINE> <INDENT> def __init__(self, val, next=None): <NEW_LINE> <INDENT> self.val = val <NEW_LINE> self.next = next
Defining Node Class. __init__() adds a val property and an optional next property
62598f988da39b475be02f23
class QListener(StoppableQThread): <NEW_LINE> <INDENT> def __init__(self, port, topic='', timeout=0.01): <NEW_LINE> <INDENT> self.port = port <NEW_LINE> self.topic = topic <NEW_LINE> self.context = zmq.Context() <NEW_LINE> log.debug("%s has ZMQ Context: %r" % (self.__class__.__name__, self.context)) <NEW_LINE> self.sub...
Base class for QThreads that need to listen for messages on a ZMQ TCP port and can be stopped by a thread- and process-safe method call
62598f988a43f66fc4bf1ebc
class StretchParam(object): <NEW_LINE> <INDENT> def __init__(self, type0, type1, k, r): <NEW_LINE> <INDENT> self.type0 = type0 <NEW_LINE> self.type1 = type1 <NEW_LINE> self.k = k <NEW_LINE> self.r = r <NEW_LINE> self._header = "HrmStr1" <NEW_LINE> self._type0_f = "{:<3s}" <NEW_LINE> self._type1_f = "{:<3s}" <NEW_LINE> ...
Stretching Parameter for Amber calcutions type0: Amber type of Atom 0 type1: Amber type of Atom 1 k: Force constant r: Equilibrium distance
62598f980a50d4780f705118
class Config: <NEW_LINE> <INDENT> def __init__(self, prototype, fileName = None): <NEW_LINE> <INDENT> self.prototype = prototype <NEW_LINE> self.config = ConfigParser() <NEW_LINE> if fileName: <NEW_LINE> <INDENT> if not os.path.isfile(fileName): <NEW_LINE> <INDENT> path = Resource.getWritableResourcePath() <NEW_LINE> f...
A configuration registry.
62598f98fbf16365ca793df7
class HandshakeFailed(SendError): <NEW_LINE> <INDENT> pass
Exception raised when the RTS/CTS handshake fails
62598f98d486a94d0ba2bd15
class TestProcProducer(TestProc): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> super(TestProcProducer, self).__init__() <NEW_LINE> self._name = name <NEW_LINE> <DEDENT> def next_test(self, test): <NEW_LINE> <INDENT> self._next_test(test) <NEW_LINE> <DEDENT> def result_for(self, subtest, result): <N...
Processor for creating subtests.
62598f98435de62698e9bb34
class ModifyAssistantCidrRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.VpcId = None <NEW_LINE> self.NewCidrBlocks = None <NEW_LINE> self.OldCidrBlocks = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.VpcId = params.get("VpcId") <NEW_LINE> sel...
ModifyAssistantCidr请求参数结构体
62598f98627d3e7fe0e06bea
class tick_schedule(schedule): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(tick_schedule, self).__init__(timedelta(**kwargs)) <NEW_LINE> self.__first_run = True <NEW_LINE> <DEDENT> def is_due(self, last_run_at): <NEW_LINE> <INDENT> if self.__first_run: <NEW_LINE> <INDENT> self.__first_ru...
Celery scheduler that always runs on startup with no delay. Arguments are the same as for datetime.timedelta.
62598f98d53ae8145f9181cd
class Only(Directive): <NEW_LINE> <INDENT> has_content = True <NEW_LINE> required_arguments = 1 <NEW_LINE> optional_arguments = 0 <NEW_LINE> final_argument_whitespace = True <NEW_LINE> option_spec = {} <NEW_LINE> def run(self): <NEW_LINE> <INDENT> node = addnodes.only() <NEW_LINE> node.document = self.state.document <N...
Directive to only include text if the given tag(s) are enabled.
62598f98be383301e025353c
class Game(ndb.Model): <NEW_LINE> <INDENT> user = ndb.KeyProperty(required=True, kind='User') <NEW_LINE> attempts = ndb.IntegerProperty(required=True, default=0) <NEW_LINE> matched = ndb.IntegerProperty(required=True, default=0) <NEW_LINE> game_over = ndb.BooleanProperty(required=True, default=False) <NEW_LINE> @classm...
Game object
62598f9891f36d47f2230d3f
class MouseBearComedy(GenericComicNotWorking): <NEW_LINE> <INDENT> name = "mousebear" <NEW_LINE> long_name = "Mouse Bear Comedy" <NEW_LINE> url = "http://www.mousebearcomedy.com/category/comics/"
Class to retrieve Mouse Bear Comedy comics.
62598f980fa83653e46f4c2a
class Collapsible(base.BaseRichTextComponent): <NEW_LINE> <INDENT> name = 'Collapsible' <NEW_LINE> category = 'Basic Input' <NEW_LINE> description = 'A collapsible block of HTML.' <NEW_LINE> frontend_name = 'collapsible' <NEW_LINE> tooltip = 'Insert collapsible block' <NEW_LINE> is_complex = True <NEW_LINE> _customizat...
A rich-text component representing a collapsible block.
62598f983539df3088ecbff6
class notification(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass
docstring for ClassName
62598f984e4d562566372163
class SapCloudForCustomerSource(CopySource): <NEW_LINE> <INDENT> _validation = { 'type': {'required': True}, } <NEW_LINE> _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, 'source_retry_count': {'key': 'sourceRetryCount', 'type': 'object'}, 'source_retry_wait': {'key': 'sourceRetryWait', 'typ...
A copy activity source for SAP Cloud for Customer source. :param additional_properties: Unmatched properties from the message are deserialized this collection :type additional_properties: dict[str, object] :param source_retry_count: Source retry count. Type: integer (or Expression with resultType integer). :type sou...
62598f98379a373c97d98d54
class JobPropertiesConstraints(Model): <NEW_LINE> <INDENT> _attribute_map = { 'max_wall_clock_time': {'key': 'maxWallClockTime', 'type': 'duration'}, } <NEW_LINE> def __init__(self, max_wall_clock_time="7.00:00:00"): <NEW_LINE> <INDENT> self.max_wall_clock_time = max_wall_clock_time
Constraints associated with the Job. :param max_wall_clock_time: Max time the job can run. Default Value = 1 week. Default value: "7.00:00:00" . :type max_wall_clock_time: timedelta
62598f9863d6d428bbee24fe
class HistoricalScheduler(VirtualTimeScheduler): <NEW_LINE> <INDENT> def __init__(self, initial_clock=None, comparer=None): <NEW_LINE> <INDENT> def compare_datetimes(a, b): <NEW_LINE> <INDENT> return (a > b) - (a < b) <NEW_LINE> <DEDENT> clock = initial_clock or datetime.fromtimestamp(0) <NEW_LINE> comparer = comparer ...
Provides a virtual time scheduler that uses datetime for absolute time and timedelta for relative time.
62598f98656771135c4893c1
class IdentityMatrix(DiagonalMatrix): <NEW_LINE> <INDENT> def __init__(self, n): <NEW_LINE> <INDENT> DiagonalMatrix.__init__(self, n) <NEW_LINE> for count in range(n): <NEW_LINE> <INDENT> self.set_item(count, 1) <NEW_LINE> <DEDENT> <DEDENT> def set_val(self, i, j, new_val): <NEW_LINE> <INDENT> if new_val == 1: <NEW_LIN...
A matrix with 1s on the diagonal and 0s everywhere else
62598f98442bda511e95c1a6
class SettingsPage(toolkit_emulators.UbuntuUIToolkitEmulatorBase): <NEW_LINE> <INDENT> def get_mms_enabled(self): <NEW_LINE> <INDENT> return self.wait_select_single(objectName="mmsEnabled") <NEW_LINE> <DEDENT> def toggle_mms_enabled(self): <NEW_LINE> <INDENT> self.pointing_device.click_object(self.get_mms_enabled())
Autopilot helper for the settings page
62598f9807f4c71912baf18c
class Registration(models.Model): <NEW_LINE> <INDENT> phone = models.CharField(max_length=40, unique=True) <NEW_LINE> verification_code = models.CharField(max_length=4) <NEW_LINE> type = models.CharField(max_length=6, choices=RegistrationType.CHOICES) <NEW_LINE> expires = models.DateTimeField() <NEW_LINE> def __str__(s...
A temporary class that represents application login/registration process
62598f9894891a1f408b9591
@implementer(IUploadScheduler) <NEW_LINE> class NullUploadScheduler(object): <NEW_LINE> <INDENT> def scheduleUpload(self, objectId, backend): <NEW_LINE> <INDENT> pass
Upload scheduler that does nothing.
62598f982ae34c7f260aae21
class PfsIngestCalibsConfig(IngestCalibsConfig): <NEW_LINE> <INDENT> def setDefaults(self): <NEW_LINE> <INDENT> super().setDefaults() <NEW_LINE> self.register.retarget(PfsCalibsRegisterTask)
Configuration for PfsIngestCalibsTask
62598f98a17c0f6771d5bf7c
class CookieJar(RAMCookieJar): <NEW_LINE> <INDENT> def __init__(self, parent=None, *, line_parser=None): <NEW_LINE> <INDENT> super().__init__(parent) <NEW_LINE> if line_parser: <NEW_LINE> <INDENT> self._lineparser = line_parser <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self._lineparser = lineparser.LineParser( stan...
A cookie jar saving cookies to disk. Attributes: _lineparser: The LineParser managing the cookies file.
62598f9830dc7b766599f58e
class TechnicolorFormatter(logging.Formatter): <NEW_LINE> <INDENT> BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8) <NEW_LINE> RESET = "\033[0m" <NEW_LINE> COLOUR_BASE = "\033[1;{:d}m" <NEW_LINE> BOLD = "\033[1m" <NEW_LINE> LEVEL_COLOURS = { logging.DEBUG: BLUE, logging.INFO: WHITE, logging.WARNI...
Prepend level name to any message not level logging.INFO. Also, colour!
62598f98cb5e8a47e493c014
class Exclusion(Meta): <NEW_LINE> <INDENT> pass
Validates that a value does not fall within a given set of values args: - value - {mixed} - value to be checked kwargs: - failureMessage (optional) - {String} - message to be used upon validation failure (DEFAULT: "Must not be included in the list!") - within - {Array} - an array of values that the give...
62598f98ac7a0e7691f7224d
class LexicalNormalizerName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): <NEW_LINE> <INDENT> ASCII_FOLDING = "asciifolding" <NEW_LINE> ELISION = "elision" <NEW_LINE> LOWERCASE = "lowercase" <NEW_LINE> STANDARD = "standard" <NEW_LINE> UPPERCASE = "uppercase"
Defines the names of all text normalizers supported by Azure Cognitive Search.
62598f98925a0f43d25e7d7d
class StoreQuoteDispatcher: <NEW_LINE> <INDENT> required_quote_fields = [ 'id', 'title', 'content', 'link' ] <NEW_LINE> def __init__(self, db): <NEW_LINE> <INDENT> self.db = db <NEW_LINE> <DEDENT> @falcon.before(api_utils.check_for_json_body) <NEW_LINE> def on_post(self, req, resp): <NEW_LINE> <INDENT> body = req.media...
Dispatches requests to database wrapper to store quotes.
62598f9963b5f9789fe84eb8
class Meta(object): <NEW_LINE> <INDENT> pass
Options object for a Schema. Example usage: :: class Meta: fields = ("id", "email", "date_created") exclude = ("password", "secret_attribute") Available options: - ``fields``: Tuple or list of fields to include in the serialized result. - ``additional``: Tuple or list of fields to include *in ad...
62598f994428ac0f6e65826d
class ImageUploadField(FieldType): <NEW_LINE> <INDENT> label = "Image Upload" <NEW_LINE> form_field_class = form_fields.ImageField <NEW_LINE> model_field_class = ImageField
A field for collecting image uploads.
62598f991b99ca400228f3cd
class DatabaseOperations(base.DatabaseOperations): <NEW_LINE> <INDENT> def last_executed_query(self, cursor, sql, params): <NEW_LINE> <INDENT> return operations.BaseDatabaseOperations.last_executed_query( self, cursor, sql, params)
DatabaseOperations for use with rdbms.
62598f99dd821e528d6d8c76
class TagStripper(HTMLParser): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> HTMLParser.__init__(self) <NEW_LINE> self.page_text = [] <NEW_LINE> <DEDENT> def handle_data(self, data): <NEW_LINE> <INDENT> self.page_text.append(data) <NEW_LINE> <DEDENT> def handle_comment(self, data): <NEW_LINE> <INDENT> sel...
Strips the HTML tags from HTTP responses.
62598f99b7558d5895463371
class ChannelSocketException(Exception): <NEW_LINE> <INDENT> def run(self, message): <NEW_LINE> <INDENT> raise NotImplementedError
Base Exception is intended to run some action ('run' method) when it is raised at a consumer body
62598f99d7e4931a7ef3bdda
class NameTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def test_city_country(self): <NEW_LINE> <INDENT> city_name = city_functions('santiago', 'chile') <NEW_LINE> self.assertEquals(city_name, 'Santiago Chile') <NEW_LINE> <DEDENT> def test_city_country_population(self): <NEW_LINE> <INDENT> city_name_population = cit...
Tests for city_functions.py
62598f99bd1bec0571e14f65
class TimeFrameNotAvailable(BaseError): <NEW_LINE> <INDENT> pass
The data channel does not have data for this time frame
62598f997047854f4633f123
class ThreadedStream(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def push(): <NEW_LINE> <INDENT> if not isinstance(sys.stdout, ThreadedStream): <NEW_LINE> <INDENT> sys.stdout = ThreadedStream() <NEW_LINE> <DEDENT> _local.stream = HTMLStringO() <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def fetch(): <NEW_LIN...
Thread-local wrapper for sys.stdout for the interactive console.
62598f9916aa5153ce40023f
class FilterList(list): <NEW_LINE> <INDENT> def __contains__old(self, item): <NEW_LINE> <INDENT> return len([k for k in self if k == item or k.endswith('*') and item.startswith(k[0:-1])]) > 0 <NEW_LINE> <DEDENT> def __contains__(self, item): <NEW_LINE> <INDENT> for my_item in self: <NEW_LINE> <INDENT> if my_item == ite...
TODO
62598f9991f36d47f2230d40
class Calibrate(base_single.BaseSingle) : <NEW_LINE> <INDENT> prefix = 'cl_' <NEW_LINE> params_init = { 'cal_temperature_files' : ('some_file_name.fits',) } <NEW_LINE> def __init__(self, parameter_file_or_dict=None, feedback=2): <NEW_LINE> <INDENT> base_single.BaseSingle.__init__(self, parameter_file_or_dict, feedback)...
Pipeline module converts data from units of cal temperture to Kelvins. This module reads the calibrator temperture from a fits file (as a function of polarization and frequency) and multiplies it by the time stream data. If the time stream data was in units of calibrator temperture, it will end up in units of acctual ...
62598f990c0af96317c560c5
class Tests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.sshd_config = FilePath(self.mktemp()) <NEW_LINE> self.server = create_ssh_server(self.sshd_config) <NEW_LINE> self.addCleanup(self.server.restore) <NEW_LINE> self.agent = create_ssh_agent(self.server.key_path) <NEW_LINE> self.addCleanu...
Tests for conch implementation of ``flocker.provision._ssh.RunRemotely``.
62598f999b70327d1c57eae4
class External_tools_download_thread(QtCore.QThread): <NEW_LINE> <INDENT> update_progressbar = QtCore.pyqtSignal(int) <NEW_LINE> get_current_size = QtCore.pyqtSignal(int, str) <NEW_LINE> get_total_size = QtCore.pyqtSignal(int) <NEW_LINE> emit_exception = QtCore.pyqtSignal(Exception) <NEW_LINE> signal_start_install = Qt...
Runs a download thread to download PyMod components.
62598f9991af0d3eaad39b4b
@urls.register <NEW_LINE> class QoSPolicies(generic.View): <NEW_LINE> <INDENT> url_regex = r'neutron/qos_policies/$' <NEW_LINE> @rest_utils.ajax() <NEW_LINE> def get(self, request): <NEW_LINE> <INDENT> result = api.neutron.policy_list(request, tenant_id=request.user.project_id) <NEW_LINE> return {'items': [p.to_dict() ...
API for QoS Policy.
62598f9932920d7e50bc5d99
class RowScoringFunction(scoring.ScoringFunctionBase): <NEW_LINE> <INDENT> def __init__(self, function_id, cmrun): <NEW_LINE> <INDENT> scoring.ScoringFunctionBase.__init__(self, function_id, cmrun) <NEW_LINE> self.run_log = scoring.RunLog(function_id, cmrun.dbsession(), cmrun.config_params) <NEW_LINE> <DEDENT> def do_c...
Scoring algorithm for microarray data based on genes
62598f99097d151d1a2c0d66
class ReporterResource(base.ATCTContent): <NEW_LINE> <INDENT> implements(IReporterResource) <NEW_LINE> meta_type = "ReporterResource" <NEW_LINE> schema = ReporterResourceSchema <NEW_LINE> title = atapi.ATFieldProperty('title') <NEW_LINE> description = atapi.ATFieldProperty('description')
Reporter Resource
62598f999c8ee82313040010
class CellData(object): <NEW_LINE> <INDENT> default_align = 'LEFT' <NEW_LINE> value = None <NEW_LINE> _pos = None <NEW_LINE> align= None <NEW_LINE> font = None <NEW_LINE> font_size = None <NEW_LINE> background_color = None <NEW_LINE> def __init__(self, value): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> self._pos...
a cell of the table do not use it directly, call SimpleRowsTableData.add_cell() instead
62598f99596a8972361279c2
class GPS(App): <NEW_LINE> <INDENT> def __init__(self,BS,**karg): <NEW_LINE> <INDENT> self.BS=BS
Grand potential surface.
62598f9923849d37ff850e09
class LoginForm(FlaskForm): <NEW_LINE> <INDENT> name = StringField('User name', validators=[DataRequired(), Length(min=3, max=32)]) <NEW_LINE> password = PasswordField('Password', validators=[DataRequired(), Length(min=8, max=128)]) <NEW_LINE> submit = SubmitField('Login')
User login form.
62598f99be383301e025353f
class AgentBase(object): <NEW_LINE> <INDENT> def begin_episode(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def act(self, observation, reward): <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> def end_episode(self): <NEW_LINE> <INDENT> pass
Represents an intelligent agent for the Rubik's environment.
62598f9945492302aabfc21b
class CANLIBError(CanError): <NEW_LINE> <INDENT> def __init__(self, function, error_code, arguments): <NEW_LINE> <INDENT> super(CANLIBError, self).__init__() <NEW_LINE> self.error_code = error_code <NEW_LINE> self.function = function <NEW_LINE> self.arguments = arguments <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE...
Try to display errors that occur within the wrapped C library nicely.
62598f9910dbd63aa1c708f9
class Config: <NEW_LINE> <INDENT> DEBUG = False <NEW_LINE> TESTING = False <NEW_LINE> MONGODB_DB = os.environ.get('MONGODB_DB') <NEW_LINE> MONGODB_HOST = os.environ.get('MONGODB_HOST') <NEW_LINE> MONGODB_PORT = int(os.environ.get('MONGODB_PORT')) <NEW_LINE> MONGODB_USERNAME = os.environ.get('MONGODB_USERNAME') <NEW_LIN...
Class containing the default settings for all environments. Constants: --------- SQLALCHEMY_TRACK_MODIFICATIONS (boolean): signals to get notified before and after changes are committed to the database.
62598f99656771135c4893c3
@python_2_unicode_compatible <NEW_LINE> class Phone(models.Model): <NEW_LINE> <INDENT> number = models.CharField(max_length=80) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> verbose_name = _(u'Phone') <NEW_LINE> verbose_name_plural = _(u'Phones') <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.numbe...
Phone Model. Represents a phone. No special checks are done for user input
62598f997d847024c075c115
class Participant(SDPUser): <NEW_LINE> <INDENT> def enroll(self, course): <NEW_LINE> <INDENT> self.currentenrollment = CurrentEnrollment() <NEW_LINE> self.currentenrollment.course = course <NEW_LINE> self.currentenrollment.participant = self <NEW_LINE> self.currentenrollment.progress = 0 <NEW_LINE> self.currentenrollme...
A Participant is an SDPUser that can enroll, view, drop, retake courses.
62598f99fff4ab517ebcd530
class ICell8Read1: <NEW_LINE> <INDENT> def __init__(self,fastq_read): <NEW_LINE> <INDENT> self._read = fastq_read <NEW_LINE> <DEDENT> @property <NEW_LINE> def read(self): <NEW_LINE> <INDENT> return self._read <NEW_LINE> <DEDENT> @property <NEW_LINE> def barcode(self): <NEW_LINE> <INDENT> return self._read.sequence[0:IN...
Class representing an ICELL8 R1 read
62598f9999cbb53fe6830c14
class OperationListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[Operation]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(OperationListResult, self).__init__(**kwargs) <NEW_LINE>...
Result of the request to list Network operations. It contains a list of operations and a URL link to get the next set of results. :param value: List of Network operations supported by the Network resource provider. :type value: list[~azure.mgmt.network.v2019_08_01.models.Operation] :param next_link: URL to get the nex...
62598f9945492302aabfc21c
class InvalidUpdateException(Exception): <NEW_LINE> <INDENT> pass
Exception when an Update op is malformed
62598f99ac7a0e7691f7224f
class ParserError(Exception): <NEW_LINE> <INDENT> def __init__(self, string, pos): <NEW_LINE> <INDENT> self.string = string <NEW_LINE> self.pos = pos <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return 'Parser Error: \n\n{}\n{}^\n'.format(self.string, ' '*self.pos)
A class to represent parser errors.
62598f99cc0a2c111447ad4f
class BLENDYN_OT_component_add(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "blendyn.add_component" <NEW_LINE> bl_label = "Add an MBDyn component" <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> mbs = context.scene.mbdyn <NEW_LINE> comp = mbs.components.add() <NEW_LINE> comp.name = 'component_' + str...
Sets the adding_component flag to True
62598f993cc13d1c6d4654af
class Justice: <NEW_LINE> <INDENT> def __init__(self, a: str = ''): <NEW_LINE> <INDENT> self.a = a
Some object.
62598f994428ac0f6e65826f
class ClickwrapScheduledReacceptance(object): <NEW_LINE> <INDENT> swagger_types = { 'recurrence_interval': 'int', 'recurrence_interval_type': 'str', 'start_date_time': 'object' } <NEW_LINE> attribute_map = { 'recurrence_interval': 'recurrenceInterval', 'recurrence_interval_type': 'recurrenceIntervalType', 'start_date_t...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f99c432627299fa2d19
class CustomSortableListWidgetItem(QtWidgets.QListWidgetItem): <NEW_LINE> <INDENT> sortKey = 0 <NEW_LINE> def __lt__(self, other): <NEW_LINE> <INDENT> if hasattr(self, 'sortKey') and hasattr(other, 'sortKey'): <NEW_LINE> <INDENT> return self.sortKey < other.sortKey <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> return F...
ListWidgetItem subclass that allows sorting by arbitrary key
62598f998da39b475be02f27
class HardwareModel(ModelExtension): <NEW_LINE> <INDENT> vendor = models.ForeignKey(Company, related_name='hardware', on_delete=models.CASCADE) <NEW_LINE> name = models.CharField(max_length=255, unique=True) <NEW_LINE> vendorcode = models.CharField(max_length=255, blank=True, null=True, unique=True, help_text='example:...
This model is being used to specify some extra information about a specific type (model) of hardware.
62598f99dd821e528d6d8c78
class User(models.Model): <NEW_LINE> <INDENT> nickname = models.CharField('昵称', max_length=32, unique=True) <NEW_LINE> email = models.CharField('邮箱', max_length=64, unique=True) <NEW_LINE> password = models.CharField('密码', max_length=256) <NEW_LINE> head_pic = models.ImageField('头像', max_length=128) <NEW_LINE> is_admin...
用户
62598f99bd1bec0571e14f66
class SharedQueries(object): <NEW_LINE> <INDENT> def is_public(self): <NEW_LINE> <INDENT> return self.filter(is_public=True) <NEW_LINE> <DEDENT> def on_site(self): <NEW_LINE> <INDENT> return self.filter(sites__id=settings.SITE_ID) <NEW_LINE> <DEDENT> def canonical_on_site(self): <NEW_LINE> <INDENT> return self.filter(c...
Some queries that are identical for Gallery and Photo.
62598f99d486a94d0ba2bd19
class NodeState(enum.IntEnum): <NEW_LINE> <INDENT> NODE_STATE_UNSPECIFIED = 0 <NEW_LINE> BLOCKED = 1 <NEW_LINE> RUNNABLE = 2 <NEW_LINE> RUNNING = 3 <NEW_LINE> COMPLETED = 4 <NEW_LINE> FAILED = 5
The workflow node state. Attributes: NODE_STATE_UNSPECIFIED (int): State is unspecified. BLOCKED (int): The node is awaiting prerequisite node to finish. RUNNABLE (int): The node is runnable but not running. RUNNING (int): The node is running. COMPLETED (int): The node completed successfully. FAILED (int):...
62598f9916aa5153ce400241
class World(object): <NEW_LINE> <INDENT> def __init__(self, size=(255, 255, 255)): <NEW_LINE> <INDENT> self.size = np.array(size) <NEW_LINE> self.d = len(size) <NEW_LINE> self.objects = set() <NEW_LINE> <DEDENT> def world_step(self, dt): <NEW_LINE> <INDENT> for object in self.objects: <NEW_LINE> <INDENT> object.step(dt...
An nth-dimensional prism in which objects may be handled Input: size - an array-like of dimensions (examples:) (200, 400) : a 2d rectangle (100, 100, 100) : a 3d cube (50, 50, 50, 50) : a 4d hypercube
62598f99498bea3a75a57864
class redirect_output: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.screen = "" <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.screen <NEW_LINE> <DEDENT> def __nonzero__(self): <NEW_LINE> <INDENT> return bool(self.screen) <NEW_LINE> <DEDENT> def write(self, string): <NEW_LINE...
Screen output is redirected to this class whenever set_screen is called.
62598f99097d151d1a2c0d68
class RewardChoiceField(forms.models.ModelChoiceField): <NEW_LINE> <INDENT> def _get_choices(self): <NEW_LINE> <INDENT> return RewardChoiceIterator(self) <NEW_LINE> <DEDENT> def to_python(self, value): <NEW_LINE> <INDENT> if value == u'none': <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> elif value in EMPTY_VALUE...
Nullable but required ModelChoiceField
62598f997b25080760ed71e7
class DataSet(object): <NEW_LINE> <INDENT> def __init__(self, root_dir, dataset, sub_set, batch_size, n_label, data_aug=False, shuffle=True): <NEW_LINE> <INDENT> np.random.seed(0) <NEW_LINE> self.data_dir = os.path.join(root_dir, dataset, sub_set) <NEW_LINE> self.batch_size = batch_size <NEW_LINE> self.n_label = n_labe...
Args: data_aug: False for valid/testing. shuffle: true for training, False for valid/test.
62598f992c8b7c6e89bd3514
class SslSocketPlugin(colony.base.system.Plugin): <NEW_LINE> <INDENT> id = "pt.hive.colony.plugins.service.ssl_socket" <NEW_LINE> name = "Ssl Socket" <NEW_LINE> description = "The plugin that offers the ssl socket" <NEW_LINE> version = "1.0.0" <NEW_LINE> author = "Hive Solutions Lda. <development@hive.pt>" <NEW_LINE> p...
The main class for the Ssl Socket plugin.
62598f997cff6e4e811b5764
class TestStreamingEXTR2(PartialFitTests, unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> cls.n_samples = 1000 <NEW_LINE> cls.x, cls.y = sklearn.datasets.make_regression(n_samples=int(2e4), random_state=0, n_features=400) <NEW_LINE> cls.mod = StreamingEXTR(n_esti...
Test SEXT with single estimator per chunk with "random forest style" max features. ie, subset. Total models limited to 39.
62598f9944b2445a339b680e
class S3CkptItem(object): <NEW_LINE> <INDENT> def __init__(self, ckpt_name, ckpt_dir): <NEW_LINE> <INDENT> ckpt_file_idx, ckpt_file_key = map( ckpt_file, [ckpt_name+'.'+S3CkptPool.CKPT_MEM_IDX, ckpt_name+'.'+S3CkptPool.CKPT_MEM_KEY], [ckpt_dir] * 2, ) <NEW_LINE> self.idx_ckpt = LocalKVStore.open_always(ckpt_file_idx) <...
S3 data input checkpoint item. :param ckpt_name: checkpoint name, data input name :param ckpt_dir: checkpoint storing directory Properties:: >>> ckpt_item = S3CkptPool.S3CkptItem('ckpt_name', 'ckpt_dir') >>> ckpt_item.idx_ckpt # checkpoint for index >>> ckpt_item.key_ckpt # checkpoint for key
62598f997d847024c075c117
class ContinuousMarkovChain(ContinuousTimeStochasticProcess, MarkovProcess): <NEW_LINE> <INDENT> index_set = S.Reals <NEW_LINE> def __new__(cls, sym, state_space=S.Reals, gen_mat=None): <NEW_LINE> <INDENT> sym = _symbol_converter(sym) <NEW_LINE> state_space = _set_converter(state_space) <NEW_LINE> if gen_mat != None: <...
Represents continuous time Markov chain. Parameters ========== sym: Symbol/string_types state_space: Set Optional, by default, S.Reals gen_mat: Matrix/ImmutableMatrix/MatrixSymbol Optional, by default, None Examples ======== >>> from sympy.stats import ContinuousMarkovChain >>> from sympy import Matrix, S, ...
62598f99435de62698e9bb39
class Listing(object): <NEW_LINE> <INDENT> def __init__(self, flavors_controller, pools_controller, validate): <NEW_LINE> <INDENT> self._ctrl = flavors_controller <NEW_LINE> self._pools_ctrl = pools_controller <NEW_LINE> self._validate = validate <NEW_LINE> <DEDENT> @decorators.TransportLog("Flavors collection") <NEW_L...
A resource to list registered flavors :param flavors_controller: means to interact with storage
62598f99507cdc57c63a4ada
class PandasTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def assertFrameEqual(self, first, second, msg=None, **kwargs): <NEW_LINE> <INDENT> if isinstance(first, Series): <NEW_LINE> <INDENT> assert_func = assert_series_equal <NEW_LINE> <DEDENT> elif isinstance(first, DataFrame): <NEW_LINE> <INDENT> assert_func = ass...
For test case with assertion involving Pandas NDFrame objects
62598f99a17c0f6771d5bf80
class FileFinder(Finder): <NEW_LINE> <INDENT> def __init__(self, roots): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._roots = list(roots) <NEW_LINE> self._cache = {} <NEW_LINE> <DEDENT> @property <NEW_LINE> def roots(self): <NEW_LINE> <INDENT> return self._roots <NEW_LINE> <DEDENT> def find(self, name, valid...
A finder that maps module names to file system paths to *.spek files.
62598f99009cb60464d0126a
class MirrorsConfigServiceContext(OSContextGenerator): <NEW_LINE> <INDENT> interfaces = ['simplestreams-image-service'] <NEW_LINE> def __call__(self): <NEW_LINE> <INDENT> hookenv.log("Generating template ctxt for simplestreams-image-service") <NEW_LINE> config = hookenv.config() <NEW_LINE> modify_hook_scripts = [] <NEW...
Context for mirrors.yaml template. Uses image-modifier relation if available to set modify_hook_scripts config value.
62598f9945492302aabfc21e
class Postgresql(Base): <NEW_LINE> <INDENT> DEFAULT_KILL_TIMEOUT = 30.0 <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.preferred_versions = kwargs.pop('preferred_versions', []) <NEW_LINE> super().__init__(*args, **kwargs) <NEW_LINE> self.snapshots = [] <NEW_LINE> <DEDENT> def initialize(self):...
Adds snapshot support to the testing postgresql.
62598f99d7e4931a7ef3bddd
class _Value(object): <NEW_LINE> <INDENT> def __init__(self, name, value=None): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> self._value = value if value is not None else name <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self._name <NEW_LINE> <DEDENT> def __int__(self): <NEW_LINE> <INDENT> retu...
Helper class for creating objects that can behave as named constants that (optionally) convertable to an integer.
62598f99ac7a0e7691f72251