code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class HtmlPattern(Pattern): <NEW_LINE> <INDENT> def handleMatch(self, m): <NEW_LINE> <INDENT> rawhtml = self.unescape(m.group(2)) <NEW_LINE> place_holder = self.markdown.htmlStash.store(rawhtml) <NEW_LINE> return place_holder <NEW_LINE> <DEDENT> def unescape(self, text): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> sta...
Store raw inline html and return a placeholder.
6259905b76e4537e8c3f0b96
class ItemSample(pg.GraphicsWidget): <NEW_LINE> <INDENT> def __init__(self, item): <NEW_LINE> <INDENT> pg.GraphicsWidget.__init__(self) <NEW_LINE> self.item = item <NEW_LINE> <DEDENT> def boundingRect(self): <NEW_LINE> <INDENT> return QtCore.QRectF(0, 0, 20, 20) <NEW_LINE> <DEDENT> def paint(self, p, *args): <NEW_LINE>...
Class responsible for drawing a single item in a LegendItem (sans label).
6259905ba17c0f6771d5d6a7
class Meta(object): <NEW_LINE> <INDENT> db_table = "zd_zookeeper"
表配置信息
6259905b55399d3f05627b29
class MemberViews(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Member.objects.all() <NEW_LINE> serializer_class = MemberSerializer
Dynamic View for the model Arguments: viewsets {[type]} -- [description]
6259905b56ac1b37e63037ec
class Meta: <NEW_LINE> <INDENT> model = Contact <NEW_LINE> fields = ('name','email','message')
Meta definition for MODELNAMEform.
6259905b4a966d76dd5f04fc
class OpenStackSyncStep(SyncStep): <NEW_LINE> <INDENT> def __init__(self, **args): <NEW_LINE> <INDENT> SyncStep.__init__(self, **args) <NEW_LINE> return <NEW_LINE> <DEDENT> def __call__(self, **args): <NEW_LINE> <INDENT> return self.call(**args)
PlanetStack Sync step for copying data to OpenStack
6259905ba79ad1619776b5c2
class VesselType(object): <NEW_LINE> <INDENT> def __init__(self, id, panda): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.panda = panda
VesselType.py is a
6259905ba8ecb03325872821
class RequiredError(Exception): <NEW_LINE> <INDENT> pass
Raised when a required named argument is not passed.
6259905b004d5f362081faf3
class set_ugi_result: <NEW_LINE> <INDENT> thrift_spec = ( (0, TType.LIST, 'success', (TType.STRING,None), None, ), (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, success=None, o1=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> self.o1 = o1 <NEW...
Attributes: - success - o1
6259905b4e4d562566373a12
class BindEipAclsRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.EipIdAclIdList = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("EipIdAclIdList") is not None: <NEW_LINE> <INDENT> self.EipIdAclIdList = [] <NEW_LINE> for item in params....
BindEipAcls请求参数结构体
6259905b009cb60464d02b40
class Solution: <NEW_LINE> <INDENT> def isMatch(self, s: str, p: str) -> bool: <NEW_LINE> <INDENT> self.s, self.p, self.cache = s, p, {} <NEW_LINE> return self.matching(0, 0) <NEW_LINE> <DEDENT> def matching(self, i, j): <NEW_LINE> <INDENT> if (i, j) not in self.cache: <NEW_LINE> <INDENT> if j == len(self.p): <NEW_LINE...
Given an input string (s) and a pattern (p), implement regular expression matching with support for '.' and '*' where: '.' Matches any single character.​​​​ '*' Matches zero or more of the preceding element. The matching should cover the entire input string (not partial).
6259905b32920d7e50bc7651
class DataTrainer(): <NEW_LINE> <INDENT> @property <NEW_LINE> def data(self): <NEW_LINE> <INDENT> return self._data <NEW_LINE> <DEDENT> @data.setter <NEW_LINE> def data(self, value): <NEW_LINE> <INDENT> if value is not None and not isinstance(value, data.TimedPoints): <NEW_LINE> <INDENT> raise TypeError("data should be...
Base class for most "trainers": classes which take data and "train" themselves (fit a statistical model, etc.) to the data. Can also be used as a base for classes which can directly return a "prediction".
6259905b01c39578d7f1423c
class CTMDiagnosticInfo(object): <NEW_LINE> <INDENT> def __init__(self, diaginfo_file='', tracerinfo_file=''): <NEW_LINE> <INDENT> self.categories = RecordList([], key_attr='name', ref_classes=CTMCategory) <NEW_LINE> self.diagnostics = RecordList([], key_attr='number', ref_classes=CTMDiagnostic) <NEW_LINE> if diaginfo_...
Define all the diagnostics (and its metadata) that one can archive with GEOS-Chem. An instance of this class is commonly related to a couple of diaginfo.dat and tracerinfo.dat files. The class provides methods to read/write information from/to these files. Parameters ---------- diaginfo_file : string or None path...
6259905badb09d7d5dc0bb75
class StatExtFlagsLinux(rdfvalue.RDFInteger): <NEW_LINE> <INDENT> data_store_type = "unsigned_integer_32"
Extended file attributes as reported by `lsattr`.
6259905b2ae34c7f260ac6f2
class TransitionEnd(Baseevents): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Baseevents.__init__(self) <NEW_LINE> self.name = 'TransitionEnd' <NEW_LINE> self.datain['name'] = None <NEW_LINE> self.datain['type'] = None <NEW_LINE> self.datain['duration'] = None <NEW_LINE> self.datain['to-scene'] = None <N...
A transition (other than "cut") has ended. Please note that the `from-scene` field is not available in TransitionEnd. :Returns: *name* type: String Transition name. *type* type: String Transition type. *duration* type: int ...
6259905b3617ad0b5ee07756
class QuietReporter(base): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self.verbosity = 0 <NEW_LINE> self.showlongtestinfo = False <NEW_LINE> self.showfspath = False
A py.test reporter that only shows dots when running tests.
6259905b30dc7b76659a0d86
class Artifact(SkeleYaml): <NEW_LINE> <INDENT> schema = Schema({ 'name': And(str, error='Artifact \'name\' must be a String'), 'file': And(str, error='Artifact \'file\' must be a String'), }, ignore_extra_keys=True) <NEW_LINE> name = None <NEW_LINE> file = None <NEW_LINE> def __init__(self, name, file): <NEW_LINE> <IND...
Artifact Class Object contained within a list of the artifactory configuration in order to specify the artifact files and artifact names
6259905b004d5f362081faf4
class CorsAffordanceSetMap(_coll.HereditaryWebResourcePathMapping): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(CorsAffordanceSetMap, self).__init__(*args, valuetype=CorsAffordanceSet, **kwargs)
A cross-origin resource sharing affordances map This is a mapping from resource locations to specifications of their cross-origin request sharing affordances. In addition to the basic mutable mapping functionality, it also * accepts path patterns in the form of strings or regular expressions and * ensures t...
6259905b32920d7e50bc7652
class CodeUnit(object): <NEW_LINE> <INDENT> def __init__(self, morf, file_locator): <NEW_LINE> <INDENT> self.file_locator = file_locator <NEW_LINE> if hasattr(morf, '__file__'): <NEW_LINE> <INDENT> f = morf.__file__ <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> f = morf <NEW_LINE> <DEDENT> if f.endswith('.pyc'): <NEW_L...
Code unit: a filename or module. Instance attributes: `name` is a human-readable name for this code unit. `filename` is the os path from which we can read the source. `relative` is a boolean.
6259905b8a43f66fc4bf379a
class Links(object): <NEW_LINE> <INDENT> deserialized_types = { 'object_self': 'ask_smapi_model.v1.link.Link' } <NEW_LINE> attribute_map = { 'object_self': 'self' } <NEW_LINE> supports_multiple_types = False <NEW_LINE> def __init__(self, object_self=None): <NEW_LINE> <INDENT> self.__discriminator_value = None <NEW_LINE...
:param object_self: :type object_self: (optional) ask_smapi_model.v1.link.Link
6259905be5267d203ee6cec6
class RegressionResults(LikelihoodModelResults): <NEW_LINE> <INDENT> def __init__(self, theta, Y, model, wY, wresid, cov=None, dispersion=1., nuisance=None): <NEW_LINE> <INDENT> LikelihoodModelResults.__init__(self, theta, Y, model, cov, dispersion, nuisance) <NEW_LINE> self.wY = wY <NEW_LINE> self.wresid = wresid <NEW...
This class summarizes the fit of a linear regression model. It handles the output of contrasts, estimates of covariance, etc.
6259905b91f36d47f2231995
class incorrectDeviation(Error): <NEW_LINE> <INDENT> pass
Raised when the input value is too large
6259905be64d504609df9ed5
class OneToThree(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def transform(self, scale, note): <NEW_LINE> <INDENT> new_note = copy.deepcopy(note) <NEW_LINE> if new_note.isRest: <NEW_LINE> <INDENT> new_stream = music21.stream.Stream() <NEW_LINE> new_stream.append(new_not...
transformation that randomly transforms one note into three notes * total duration is kept * first note and last note equal the original note * middle note is the neighbour note
6259905ba219f33f346c7e12
class ClientCredentials(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.client_users = {} <NEW_LINE> <DEDENT> def InitializeFromConfig(self): <NEW_LINE> <INDENT> usernames = config_lib.CONFIG.Get("Dataserver.client_credentials") <NEW_LINE> self.client_users = {} <NEW_LINE> for user_spec in use...
Holds information about client usernames and passwords.
6259905b442bda511e95d860
class LogDevicePlugin(PluginInterface): <NEW_LINE> <INDENT> def create_context(self): <NEW_LINE> <INDENT> return Context() <NEW_LINE> <DEDENT> def validate_args(self, args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def get_commands(self): <NEW_LINE> <INDENT> commands = [Connect(), SelectCommand()] <NEW_LINE> return...
The PluginInterface class is a way to customize ldshell for every customer use case. It allowes custom argument validation, control over command loading, custom context objects, and much more.
6259905b460517430c432b59
class NetworkManagerMerger(BaseMerger): <NEW_LINE> <INDENT> KEY_NAME = "uuid"
Network manager setting merger class Policy: Overwrite same key with new value, create new keys
6259905b15baa7234946359f
class EstimateSurface: <NEW_LINE> <INDENT> def __init__(self, training_points, training_dists, gamma, noise_sd): <NEW_LINE> <INDENT> self.K11_ = self.Covariance(training_points, gamma, noise_sd) <NEW_LINE> self.K11_inv_ = np.linalg.inv(self.K11_) <NEW_LINE> self.mu_training_ = np.asarray(training_dists) <NEW_LINE> self...
Generate covariance matrices and compute conditional expectation and covariance for signed distance function.
6259905b10dbd63aa1c72181
class PlayStrategyException(Exception): <NEW_LINE> <INDENT> pass
Base exception.
6259905bcc0a2c111447c5d5
class InitTest(unittest.TestCase): <NEW_LINE> <INDENT> def testForBooleanType(self): <NEW_LINE> <INDENT> richBool = rich_bool.RichBool(True) <NEW_LINE> self.assertEqual(richBool.value, True) <NEW_LINE> richBool = rich_bool.RichBool(False) <NEW_LINE> self.assertEqual(richBool.value, False) <NEW_LINE> <DEDENT> def testFo...
Unit tests for the constructor of RichBool class.
6259905be76e3b2f99fda00c
@override_settings(MODULESTORE=TEST_DATA_MIXED_MODULESTORE, TIME_ZONE_DISPLAYED_FOR_DEADLINES="UTC") <NEW_LINE> class BaseDueDateTests(ModuleStoreTestCase): <NEW_LINE> <INDENT> __test__ = False <NEW_LINE> def get_text(self, course): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def set_up_course(sel...
Base class that verifies that due dates are rendered correctly on a page
6259905b2ae34c7f260ac6f4
class Error(Exception): <NEW_LINE> <INDENT> pass
Base class for fallback of all exceptions
6259905b16aa5153ce401af1
class GcamError(PygcamException): <NEW_LINE> <INDENT> pass
The gcamWrapper detected and error and terminated the model run.
6259905b24f1403a926863d5
class Events(Service): <NEW_LINE> <INDENT> def list_by_issue(self, number, user=None, repo=None): <NEW_LINE> <INDENT> request = self.make_request('issues.events.list_by_issue', user=user, repo=repo, number=number) <NEW_LINE> return self._get_result(request) <NEW_LINE> <DEDENT> def list_by_repo(self, user=None, repo=Non...
Consume `Events API <http://developer.github.com/v3/issues/events>`_
6259905bbaa26c4b54d508b3
class EnvironmentFile(Exception): <NEW_LINE> <INDENT> def __init__(self, msg): <NEW_LINE> <INDENT> Exception.__init__(self, msg)
Exception raised when the Alignak environment file is missing or corrupted
6259905b3eb6a72ae038bc6d
class DefaultView(View): <NEW_LINE> <INDENT> def get(self, request): <NEW_LINE> <INDENT> if request.user.is_authenticated(): <NEW_LINE> <INDENT> return redirect('/home') <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> return redirect('/login')
Default view for error conditions of GET /
6259905b45492302aabfdae6
class Labeling: <NEW_LINE> <INDENT> def __init__(self, dist, threshold): <NEW_LINE> <INDENT> self.dist = dist <NEW_LINE> self.threshold = threshold <NEW_LINE> <DEDENT> def is_true(self, x, y): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return np.array([self.dist.pdf(ix, iy) > self.threshold for ix, iy in zip(x, y)], ...
Noisy labeling function
6259905b99cbb53fe68324ee
class BaseFederationRow: <NEW_LINE> <INDENT> TypeId = "" <NEW_LINE> @staticmethod <NEW_LINE> def from_data(data: JsonDict) -> "BaseFederationRow": <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def to_data(self) -> JsonDict: <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def ad...
Base class for rows to be sent in the federation stream. Specifies how to identify, serialize and deserialize the different types.
6259905bb5575c28eb7137d3
class ChallengeUser(Player): <NEW_LINE> <INDENT> last_launched = models.DateTimeField(blank=True, null=True) <NEW_LINE> def is_eligible(self): <NEW_LINE> <INDENT> return God.user_is_eligible(self, ChallengeGame) <NEW_LINE> <DEDENT> def can_launch(self): <NEW_LINE> <INDENT> now = datetime.now() <NEW_LINE> today_start = ...
Extension of the userprofile, customized for challenge
6259905bd99f1b3c44d06caf
class LoginUserView(generic.View): <NEW_LINE> <INDENT> def get(self, request): <NEW_LINE> <INDENT> collect_provider_data() <NEW_LINE> continuation_url = request.GET.get("continuation_url", "/no-login-continuation/") <NEW_LINE> login_post_url = request.session.get("login_post_url", None) <NEW_LINE> login_done_...
View class to present login form to gather user id and other login information. The login page solicits a user id and an identity provider The login page supports the following request parameters: continuation_url={uri} - a URL for a page that is displayed when the login process is complete.
6259905b4e4d562566373a15
class MonitorTask(Task): <NEW_LINE> <INDENT> def __init__(self, name, topic, msg_type, msg_cb, wait_for_message=True, timeout=5): <NEW_LINE> <INDENT> super(MonitorTask, self).__init__(name) <NEW_LINE> self.topic = topic <NEW_LINE> self.msg_type = msg_type <NEW_LINE> self.timeout = timeout <NEW_LINE> self.msg_cb = msg_c...
Turn a ROS subscriber into a Task.
6259905b32920d7e50bc7654
class MedianFilter(MovingWindowFilter): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> MovingWindowFilter.__init__(self, **kwargs) <NEW_LINE> <DEDENT> def filteredValue(self): <NEW_LINE> <INDENT> return np.median(self._filtering_buffer.getElements())
Returns the median value of the moving window. Length must be odd.
6259905b4e4d562566373a16
@macro <NEW_LINE> class AScan(SoftwareScan): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.motors = [] <NEW_LINE> self.limits = [] <NEW_LINE> try: <NEW_LINE> <INDENT> exposuretime = float(args[-1]) <NEW_LINE> self.intervals = int(args[-2]) <NEW_LINE> super(AScan, self).__init__(expos...
Software scan one or more motors in parallel. :: ascan <motor1> <start> <stop> ... <intervals> <exp_time>
6259905be5267d203ee6cec7
class HomeView(LoginRequiredMixin, TemplateView): <NEW_LINE> <INDENT> template_name = "coding/coding.html" <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super(HomeView, self).get_context_data(**kwargs) <NEW_LINE> return context
Home view.
6259905b379a373c97d9a633
class Email(object): <NEW_LINE> <INDENT> EMAIL_HOST = values.Value('localhost') <NEW_LINE> EMAIL_PORT = values.IntegerValue(25) <NEW_LINE> EMAIL_USE_TLS = values.BooleanValue(True) <NEW_LINE> EMAIL_HOST_USER = values.Value('{{ cookiecutter.email }}') <NEW_LINE> EMAIL_HOST_PASSWORD = values.SecretValue()
Email settings for public projects.
6259905b8da39b475be047f5
class ArithmeticExpression(poc_tree.Tree): <NEW_LINE> <INDENT> def __init__(self, value, children, parent=None): <NEW_LINE> <INDENT> poc_tree.Tree.__init__(self, value, children) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> if len(self.children) == 0: <NEW_LINE> <INDENT> return str(self.value) <NEW_LINE> ...
Basic operations on arithmetic expressions
6259905b097d151d1a2c267c
class CrouzeixRaviart(finite_element.CiarletElement): <NEW_LINE> <INDENT> def __init__(self, cell, degree): <NEW_LINE> <INDENT> if not (degree == 1): <NEW_LINE> <INDENT> raise Exception("Crouzeix-Raviart only defined for degree 1") <NEW_LINE> <DEDENT> space = polynomial_set.ONPolynomialSet(cell, 1) <NEW_LINE> dual = Cr...
The Crouzeix-Raviart finite element: K: Triangle/Tetrahedron Polynomial space: P_1 Dual basis: Evaluation at facet midpoints
6259905b38b623060ffaa356
class SpotSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> image = Base64ImageField() <NEW_LINE> plan_id = serializers.PrimaryKeyRelatedField(queryset=Plan.objects.all(), read_only=False) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Spot <NEW_LINE> fields = ("pk", "name", "order", "lat", "lon", "note"...
単一のSpotを処理するSerializer
6259905bbaa26c4b54d508b4
class Database: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def connect_dbs(): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> cnn = mysql.connector.connect( user='root', password='utpadmin', host='localhost', database='utpWallet_Prod') <NEW_LINE> print("\nSYSTEM MESSAGE : MYSQL DATABASE CONNECTED\n") <NEW_LINE> return c...
This class is used to initialize the connection to the MySQL Database
6259905bd6c5a102081e3730
class Module(MixedModule): <NEW_LINE> <INDENT> interpleveldefs = { 'calcsize': 'interp_struct.calcsize', 'pack': 'interp_struct.pack', 'unpack': 'interp_struct.unpack', } <NEW_LINE> appleveldefs = { 'error': 'app_struct.error', 'pack_into': 'app_struct.pack_into', 'unpack_from': 'app_struct.unpack_from', 'Struct': 'app...
Functions to convert between Python values and C structs. Python strings are used to hold the data representing the C struct and also as format strings to describe the layout of data in the C struct. The optional first format char indicates byte order, size and alignment: @: native order, size & alignment (default) ...
6259905b99cbb53fe68324ef
class Equalize(BaseOperation): <NEW_LINE> <INDENT> def apply_numpy(self, x: np.ndarray, value: float) -> np.ndarray: <NEW_LINE> <INDENT> return np.stack( [cv2.equalizeHist(x[:, :, i]) for i in range(x.shape[-1])], axis=-1 ) <NEW_LINE> <DEDENT> def apply_tensor(self, x: torch.Tensor, value: torch.Tensor) -> torch.Tensor...
Equalize the image histogram. +---------------+-------------+-----------+ | | Input Image | Magnitude | +===============+=============+===========+ | Equalize | ✔ | ✘ | +---------------+-------------+-----------+ This class equalize the image histogram. It makes the histogram unif...
6259905b10dbd63aa1c72182
class LowLevelCommands(object): <NEW_LINE> <INDENT> dpkg_repack = "/usr/bin/dpkg-repack" <NEW_LINE> def install_debs(self, debfiles, targetdir): <NEW_LINE> <INDENT> if not debfiles: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> install_cmd = ["dpkg", "-i"] <NEW_LINE> if targetdir != "/": <NEW_LINE> <INDENT> insta...
calls to the lowlevel operations to install debs or repack a deb
6259905badb09d7d5dc0bb79
class SimPyException(Exception): <NEW_LINE> <INDENT> pass
Base class for all SimPy specific exceptions.
6259905b3617ad0b5ee0775a
class PSpace(object): <NEW_LINE> <INDENT> class _NoValue: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> __slots__ = ['_store_', '_address_'] <NEW_LINE> def __init__(self, store, address): <NEW_LINE> <INDENT> object.__setattr__(self, '_store_', store) <NEW_LINE> object.__setattr__(self, '_address_', str(address)) <NEW_LI...
Provide scoped access to property data given a base address. To avoid conflicts with property pseudo-attribute names there are no public attributes or methods. The only methods are the overloaded "[]", ".", "()", and iteration operators.
6259905b21a7993f00c6757c
class UnixSocketTooLong(Exception): <NEW_LINE> <INDENT> pass
Exception raised when unixsocket path is too long.
6259905b7047854f463409cf
class Averager: <NEW_LINE> <INDENT> def __init__(self, columns): <NEW_LINE> <INDENT> self.number = 0 <NEW_LINE> self.columns = columns <NEW_LINE> self.total = [0 for i in range(self.columns)] <NEW_LINE> <DEDENT> def record_point(self, values): <NEW_LINE> <INDENT> self.number += 1 <NEW_LINE> for i in range(self.columns)...
For each couple (receiver, sender) we gather a number of measurement points that must be averaged this is done through an instance of this Averager class all measurement points will contain one, two or three values depending on the number of antennas each measurement point is recorded, and at the end averages returns...
6259905ba17c0f6771d5d6aa
class Spatial(BaseSimuran): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.timestamps = None <NEW_LINE> self.position = None <NEW_LINE> self.sampling_rate = None <NEW_LINE> self.speed = None <NEW_LINE> self.direction = None <NEW_LINE> self.source_file = "<unknown>" <NEW_L...
Hold spatial information. Attributes ---------- timestamps : array style object The timestamps of the spatial sampling positions : tuple of array style object The value of the spatial at sample points. Stored as (x_array, y_array) in cm units speed : array style object The speed in cm / s for each time...
6259905b4a966d76dd5f0502
class CheckboxTextProblemTypeTest(ChoiceTextProbelmTypeTestBase, ProblemTypeTestMixin): <NEW_LINE> <INDENT> problem_name = 'CHECKBOX TEXT TEST PROBLEM' <NEW_LINE> problem_type = 'checkbox_text' <NEW_LINE> choice_type = 'checkbox' <NEW_LINE> factory = ChoiceTextResponseXMLFactory() <NEW_LINE> factory_kwargs = { 'questio...
TestCase Class for Checkbox Text Problem Type
6259905b30dc7b76659a0d88
class itkMeanReciprocalSquareDifferenceImageToImageMetricIF2IF2(itkImageToImageMetricPython.itkImageToImageMetricIF2IF2): <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 c...
Proxy of C++ itkMeanReciprocalSquareDifferenceImageToImageMetricIF2IF2 class
6259905b2ae34c7f260ac6f7
class ProductionConfig(BaseConfig): <NEW_LINE> <INDENT> pass
生产环境
6259905b32920d7e50bc7656
class RequirementsNotFound(OpenPeerPowerError): <NEW_LINE> <INDENT> def __init__(self, domain: str, requirements: List) -> None: <NEW_LINE> <INDENT> super().__init__(f"Requirements for {domain} not found: {requirements}.") <NEW_LINE> self.domain = domain <NEW_LINE> self.requirements = requirements
Raised when a component is not found.
6259905bb57a9660fecd308b
class QuestAction(DialogueAction): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> DialogueAction.__init__(self, *args, **kwargs) <NEW_LINE> self.quest_id = kwargs['quest'] if 'quest' in kwargs else args[0]
Abstract base class for quest-related L{DialogueActions<DialogueAction>}.
6259905b91f36d47f2231997
class ExceptionStackContext(object): <NEW_LINE> <INDENT> def __init__(self, exception_handler, delay_warning=False): <NEW_LINE> <INDENT> self.delay_warning = delay_warning <NEW_LINE> if not self.delay_warning: <NEW_LINE> <INDENT> warnings.warn( "StackContext is deprecated and will be removed in Tornado 6.0", Deprecatio...
Specialization of StackContext for exception handling. The supplied ``exception_handler`` function will be called in the event of an uncaught exception in this context. The semantics are similar to a try/finally clause, and intended use cases are to log an error, close a socket, or similar cleanup actions. The ``exc...
6259905b8da39b475be047f7
class BeamSearch(object): <NEW_LINE> <INDENT> def __init__(self, model, beam_size, start_token, end_token, max_steps): <NEW_LINE> <INDENT> self._model = model <NEW_LINE> self._beam_size = beam_size <NEW_LINE> self._start_token = start_token <NEW_LINE> self._end_token = end_token <NEW_LINE> self._max_steps = max_steps <...
Beam search.
6259905c498bea3a75a59105
class PulseCounter(GEMSensor): <NEW_LINE> <INDENT> def __init__( self, monitor_serial_number, number, name, counted_quantity, time_unit, counted_quantity_per_pulse, ): <NEW_LINE> <INDENT> super().__init__(monitor_serial_number, name, "pulse", number) <NEW_LINE> self._counted_quantity = counted_quantity <NEW_LINE> self....
Entity showing rate of change in one pulse counter of the monitor.
6259905c8e7ae83300eea69e
class CapsType(object): <NEW_LINE> <INDENT> CAPSTYPE_GENERAL = 0x0001 <NEW_LINE> CAPSTYPE_BITMAP = 0x0002 <NEW_LINE> CAPSTYPE_ORDER = 0x0003 <NEW_LINE> CAPSTYPE_BITMAPCACHE = 0x0004 <NEW_LINE> CAPSTYPE_CONTROL = 0x0005 <NEW_LINE> CAPSTYPE_ACTIVATION = 0x0007 <NEW_LINE> CAPSTYPE_POINTER = 0x0008 <NEW_LINE> CAPSTYPE_SHAR...
Different type of capabilities @see: http://msdn.microsoft.com/en-us/library/cc240486.aspx
6259905c01c39578d7f1423f
class TestTerminal(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> print("Preparando contexto para " + self.__class__.__name__) <NEW_LINE> self.terminal = Terminal() <NEW_LINE> self.sesion_tec = Sesion("10025580R", "TecnicoCalidad") <NEW_LINE> self.sesion_doc = Sesion("49251223B", "Docente") <NEW_LI...
Esta clase corresponde al caso de prueba de src.Terminal. En ella solo se prueban aquellos métodos que no requieren de la interaccion del usuario.
6259905cd6c5a102081e3732
class SparseGPRegression(SparseGP_MPI): <NEW_LINE> <INDENT> def __init__(self, X, Y, kernel=None, Z=None, num_inducing=10, X_variance=None, mean_function=None, normalizer=None, mpi_comm=None, name='sparse_gp'): <NEW_LINE> <INDENT> num_data, input_dim = X.shape <NEW_LINE> if kernel is None: <NEW_LINE> <INDENT> kernel = ...
Gaussian Process model for regression This is a thin wrapper around the SparseGP class, with a set of sensible defalts :param X: input observations :param X_variance: input uncertainties, one per input X :param Y: observed values :param kernel: a GPy kernel, defaults to rbf+white :param Z: inducing inputs (optional, ...
6259905c99cbb53fe68324f1
class Batch(BaseClient): <NEW_LINE> <INDENT> def __init__(self, transport, namespace): <NEW_LINE> <INDENT> self.transport = BufferedTransport(transport) <NEW_LINE> self.namespace = namespace <NEW_LINE> self.counters = {} <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def __...
A batch of metrics to send to statsd. The batch also supports the `context manager protocol`_, for use with Python's ``with`` statement. When the context is exited, the batch will automatically :py:meth:`flush`. .. _context manager protocol: https://docs.python.org/3/reference/datamodel.html#context-managers
6259905cd268445f2663a665
class State(DashDependency): <NEW_LINE> <INDENT> allowed_wildcards = (MATCH, ALL, ALLSMALLER)
Use the value of a State in a callback but don't trigger updates.
6259905c1f037a2d8b9e5374
class DiskIndependenceMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): <NEW_LINE> <INDENT> PERSISTENT = "persistent" <NEW_LINE> INDEPENDENT_PERSISTENT = "independent_persistent" <NEW_LINE> INDEPENDENT_NONPERSISTENT = "independent_nonpersistent"
Disk's independence mode type
6259905ca8ecb03325872829
class BiosVfLegacyUSBSupport(ManagedObject): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> ManagedObject.__init__(self, "BiosVfLegacyUSBSupport") <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def class_id(): <NEW_LINE> <INDENT> return "biosVfLegacyUSBSupport" <NEW_LINE> <DEDENT> DN = "Dn" <NEW_LINE> RN = "...
This class contains the relevant properties and constant supported by this MO.
6259905cdd821e528d6da489
class BrokerRabbitMQ: <NEW_LINE> <INDENT> def __init__(self, app=None): <NEW_LINE> <INDENT> self.app = app <NEW_LINE> self.connection_handler = None <NEW_LINE> self.producer = None <NEW_LINE> self.url = None <NEW_LINE> self.exchange_name = None <NEW_LINE> self.application_id = None <NEW_LINE> self.delivery_mode = None ...
Message Broker based on RabbitMQ middleware
6259905c0c0af96317c57868
class FunctionClassMember: <NEW_LINE> <INDENT> def __init__(self, type, name, attribute=None, default_value=None): <NEW_LINE> <INDENT> self.type = type <NEW_LINE> self.name = name <NEW_LINE> self.attribute = attribute <NEW_LINE> self.default_value = default_value <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDEN...
AST node representing getter function in a class definition. Can optionally have a version attribute and a default value specified. Getter functions should be used whenever it's needed to access private members of a class.
6259905cfff4ab517ebcee37
class Region(Base): <NEW_LINE> <INDENT> name = models.CharField(max_length=200, db_index=True) <NEW_LINE> display_name = models.CharField(max_length=200) <NEW_LINE> geoname_code = models.CharField(max_length=50, null=True, blank=True, db_index=True) <NEW_LINE> country = models.ForeignKey(Country) <NEW_LINE> class Meta(...
Region/State model.
6259905c379a373c97d9a637
class Household(HouseholdIdentifierModelMixin, SearchSlugModelMixin, BaseUuidModel): <NEW_LINE> <INDENT> plot = models.ForeignKey(Plot, on_delete=models.PROTECT) <NEW_LINE> report_datetime = models.DateTimeField( verbose_name='Report Date/Time', default=get_utcnow) <NEW_LINE> comment = EncryptedTextField( max_length=25...
A system model that represents the household asset. See also HouseholdStructure.
6259905c0fa83653e46f64f8
class ParsedMembership(TimestampMixin, BaseParsedModel): <NEW_LINE> <INDENT> person = models.ForeignKey(ParsedPerson, related_name='memberships') <NEW_LINE> start_date = models.DateField(null=False) <NEW_LINE> end_date = models.DateField(null=True) <NEW_LINE> method_obtained = models.CharField(max_length=255) <NEW_LINE...
Model for each position and term that a person holds. The UID for this should be something like '{member_uid}.m{start_date}.{position_slug}', however it is conceivable that a person may begin to hold multiple offices at the same time. Currently, this is the case for only one record, which appears to be erroneous, but...
6259905ca219f33f346c7e18
class BINDServerRunner(fixtures.Fixture): <NEW_LINE> <INDENT> RNDC_PATH = "/usr/sbin/rndc" <NEW_LINE> def __init__(self, config): <NEW_LINE> <INDENT> super(BINDServerRunner, self).__init__() <NEW_LINE> self.config = config <NEW_LINE> self.process = None <NEW_LINE> <DEDENT> def setUp(self): <NEW_LINE> <INDENT> super(BIN...
Run a BIND server.
6259905c8e7ae83300eea6a0
class DocentesBolsones(models.Model): <NEW_LINE> <INDENT> _name = 'docentes.bolsones' <NEW_LINE> _order = 'nivel' <NEW_LINE> _description = 'Modelo para la entrega de bolsones a afiliados' <NEW_LINE> solicitud = fields.Many2one('docentes.solicitudes', string='Solicitud', ondelete='cascade') <NEW_LINE> menor = fields.Ma...
Gestión de bolsones escolares y por nacimiento para hijos de afiliades
6259905c3539df3088ecd8af
class DrgAttachmentFactsHelperGen(OCIResourceFactsHelperBase): <NEW_LINE> <INDENT> def get_required_params_for_get(self): <NEW_LINE> <INDENT> return ["drg_attachment_id"] <NEW_LINE> <DEDENT> def get_required_params_for_list(self): <NEW_LINE> <INDENT> return ["compartment_id"] <NEW_LINE> <DEDENT> def get_resource(self):...
Supported operations: get, list
6259905c99cbb53fe68324f3
class FuncallOp(loom.LoomOp): <NEW_LINE> <INDENT> def __init__(self, tf_fn, input_type, output_type): <NEW_LINE> <INDENT> self.tf_fn = tf_fn <NEW_LINE> in_ts = _get_typeshapes(input_type.terminal_types()) <NEW_LINE> out_ts = _get_typeshapes(output_type.terminal_types()) <NEW_LINE> super(FuncallOp, self).__init__(in_ts,...
Loom Op that wraps a Function.
6259905c15baa723494635a5
class Comprobante(models.Model): <NEW_LINE> <INDENT> codigo = models.PositiveSmallIntegerField() <NEW_LINE> nombre = models.CharField(max_length=16) <NEW_LINE> descripcion = models.CharField(max_length=512) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.nombre <NEW_LINE> <DEDENT> class Meta: <NEW_LINE> <...
Codificacion aprobada por SUNAT
6259905c0a50d4780f7068c8
class Pages(db.EmbeddedDocument): <NEW_LINE> <INDENT> page = db.IntField() <NEW_LINE> sentences = db.ListField(db.StringField())
Scenes and their component sentences
6259905c379a373c97d9a638
class Move: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.move_valide = False <NEW_LINE> <DEDENT> def move_up(self, ply_pos, wall_list, passages): <NEW_LINE> <INDENT> self.predict_player_pos = (ply_pos[0], ply_pos[1]-40) <NEW_LINE> if self.predict_player_pos not in wall_list: <NEW_LINE> <INDENT> if s...
This class manages the player’s movements
6259905ca8ecb0332587282b
class Exhaust(prop.ideal_gas): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Exhaust, self).__init__() <NEW_LINE> self.enh_lib = enhancement <NEW_LINE> self.enh = None <NEW_LINE> self.T_ref = 300. <NEW_LINE> self.P = 101. <NEW_LINE> self.height = 1.5e-2 <NEW_LINE> self.ducts = 1 <NEW_LINE> self.side...
Class for engine exhaust in heat exchanger. Methods: __init__ set_fluid_props
6259905c4a966d76dd5f0506
class motorCaseCheckOffset(motorCaseBase): <NEW_LINE> <INDENT> def runTest(self): <NEW_LINE> <INDENT> for motor in self.getMotors(): <NEW_LINE> <INDENT> self.diagnostic("motorCaseCheckOffset for motor " + str(motor) + "...", self.getDiag()) <NEW_LINE> pv_rbv = self.getPVBase() + motor + ".RBV" <NEW_LINE> pv_off = self....
Class to check the use of offset. It checks that soft limits and user coordinates are offset correctly when setting an offset.
6259905cb5575c28eb7137d6
class ModelConfigs: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def dump(model_config, output_dir): <NEW_LINE> <INDENT> model_config_filename = os.path.join(output_dir, Constants.MODEL_CONFIG_YAML_FILENAME) <NEW_LINE> if not gfile.Exists(output_dir): <NEW_LINE> <INDENT> gfile.MakeDirs(output_dir) <NEW_LINE> <DEDENT> w...
A class for dumping and loading model configurations.
6259905cd7e4931a7ef3d68e
class TextureFile(): <NEW_LINE> <INDENT> def __init__(self, path, filename): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> self.filename = filename <NEW_LINE> self.mesh = '' <NEW_LINE> self.texture_set = '' <NEW_LINE> self.channel = '' <NEW_LINE> self.ext = '' <NEW_LINE> self.udim = '<UDIM>' <NEW_LINE> try: <NEW_LINE...
$mesh_Diffuse.$textureSet.$ext
6259905ca79ad1619776b5c7
@register_reply('transfer_customer_service') <NEW_LINE> class TransferCustomerServiceReply(BaseReply): <NEW_LINE> <INDENT> type = 'transfer_customer_service'
将消息转发到多客服 详情请参阅 http://mp.weixin.qq.com/wiki/5/ae230189c9bd07a6b221f48619aeef35.html
6259905ce5267d203ee6ceca
class SoVolumeRender(coin.SoShape): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> __repr__ = _swig_repr <NEW_LINE> def getClassTypeId(): <NEW_LINE> <INDENT> return _simvoleon.SoVolumeRender_getClassTypeId() <NEW_LINE> <DEDENT> getC...
Proxy of C++ SoVolumeRender class
6259905c379a373c97d9a639
class IPickleable(ITransformable): <NEW_LINE> <INDENT> pass
Pickle-able marker-interface.
6259905ca8370b77170f19e2
@LuxRenderAddon.addon_register_class <NEW_LINE> class luxrender_TC_tex1_socket(bpy.types.NodeSocket): <NEW_LINE> <INDENT> bl_idname = 'luxrender_TC_tex1_socket' <NEW_LINE> bl_label = 'Texture 1 socket' <NEW_LINE> tex1 = bpy.props.FloatVectorProperty(name='Color 1', subtype='COLOR', min=0.0, soft_max=1.0) <NEW_LINE> def...
Texture 1 socket
6259905ce64d504609df9ed9
class TestIPAddressInterface(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 testIPAddressInterface(self): <NEW_LINE> <INDENT> pass
IPAddressInterface unit test stubs
6259905c7d43ff2487427f1a
class Manager(AbstractManager, BELNamespaceManagerMixin, FlaskMixin): <NEW_LINE> <INDENT> module_name = MODULE_NAME <NEW_LINE> namespace_model = Antibody <NEW_LINE> flask_admin_models = [Antibody] <NEW_LINE> _base = Base <NEW_LINE> def is_populated(self) -> bool: <NEW_LINE> <INDENT> return 0 < self.count_antibodies() <...
Manages the Bio2BEL Antibody Registry database.
6259905c07f4c71912bb0a51
class TestPalindrome(unittest.TestCase): <NEW_LINE> <INDENT> def test_if_palindrome(self): <NEW_LINE> <INDENT> self.assertEqual(ash.if_palindrome("bob"), True) <NEW_LINE> self.assertEqual(ash.if_palindrome("Allah"), True) <NEW_LINE> self.assertEqual(ash.if_palindrome("to"), False) <NEW_LINE> self.assertEqual(ash.if_pal...
Test for if_palindrom function. I made a few simple test for checking all possiblity of function behavior. I used some normal words , empty string, string with numbers and strings with random letters.
6259905c462c4b4f79dbd01a
class ResponseCookieHandler(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.cookie_headers = [] <NEW_LINE> <DEDENT> def add_cookie(self, key, value, expires=None, path=None, sign=True): <NEW_LINE> <INDENT> if path is None: <NEW_LINE> <INDENT> path = settings.SITE_ROOT or '/' <NEW_LINE> <DEDENT...
Handle cookie adding to request.
6259905c3c8af77a43b68a4b
class SimpleResult(Result): <NEW_LINE> <INDENT> def toDict(self): <NEW_LINE> <INDENT> toReturn = {} <NEW_LINE> toReturn["data_version"] = Config.DATA_VERSION <NEW_LINE> if not self.data: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.data = [hit['_source'] for hit in self.res['hits']['hits']] <NEW_LINE> <DEDENT> exc...
just need data to be passed and it will be returned as dict
6259905c2c8b7c6e89bd4e03
class Characteristic(dbus.service.Object): <NEW_LINE> <INDENT> def __init__(self, bus, index, uuid, flags, service): <NEW_LINE> <INDENT> self.path = service.path + '/char' + str(index) <NEW_LINE> self.bus = bus <NEW_LINE> if isinstance(uuid, int): <NEW_LINE> <INDENT> uuid = '0x%x' % uuid <NEW_LINE> <DEDENT> self.uuid =...
org.bluez.GattCharacteristic1 interface implementation
6259905c7b25080760ed87ea
class KthLargest: <NEW_LINE> <INDENT> def __init__(self, k: int, nums: List[int]): <NEW_LINE> <INDENT> self.k = k <NEW_LINE> self.heap = sorted(nums, reverse=True)[:self.k] <NEW_LINE> <DEDENT> def add(self, val: int) -> int: <NEW_LINE> <INDENT> if len(self.heap) <= self.k: <NEW_LINE> <INDENT> self.heap += [val] <NEW_LI...
Time O(N) Space O(2N)
6259905c3539df3088ecd8b1
class Selector(object): <NEW_LINE> <INDENT> def __init__(self, tree, pseudo_element=None): <NEW_LINE> <INDENT> self.parsed_tree = tree <NEW_LINE> if pseudo_element is not None and not isinstance( pseudo_element, FunctionalPseudoElement): <NEW_LINE> <INDENT> pseudo_element = ascii_lower(pseudo_element) <NEW_LINE> <DEDEN...
Represents a parsed selector. :meth:`~GenericTranslator.selector_to_xpath` accepts this object, but ignores :attr:`pseudo_element`. It is the user’s responsibility to account for pseudo-elements and reject selectors with unknown or unsupported pseudo-elements.
6259905c67a9b606de5475ac
class Regime(Behavioral): <NEW_LINE> <INDENT> def __init__(self, name, parent_behavioral, initial=False): <NEW_LINE> <INDENT> Behavioral.__init__(self) <NEW_LINE> self.name = name <NEW_LINE> self.parent_behavioral = parent_behavioral <NEW_LINE> self.initial = initial
Stores a single behavioral regime for a component type.
6259905c3eb6a72ae038bc76