code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class Solution(object): <NEW_LINE> <INDENT> def getIntersectionNode(self, headA, headB): <NEW_LINE> <INDENT> p1, p2 = headA, headB <NEW_LINE> while p1 != p2: <NEW_LINE> <INDENT> p1 = p1.next if p1 else headB <NEW_LINE> p2 = p2.next if p2 else headA <NEW_LINE> <DEDENT> return p1
输入两个链表,找出它们的第一个公共节点。 输入:intersectVal = 8, listA = [4,1,8,4,5], listB = [5,0,1,8,4,5], skipA = 2, skipB = 3 输出:Reference of the node with value = 8 输入解释:相交节点的值为 8 (注意,如果两个列表相交则不能为 0)。 从各自的表头开始算起,链表 A 为 [4,1,8,4,5],链表 B 为 [5,0,1,8,4,5]。 在 A 中,相交节点前有 2 个节点;在 B 中,相交节点前有 3 个节点。 输入:intersectVal = 2, listA = [0,9,1,2,4], li...
62599039c432627299fa41b3
class OutOfResourceException(Exception): <NEW_LINE> <INDENT> pass
The implementation has run out of operating system resources, such as buffers, main memory, or disk space.
62599039d164cc617582212f
class CalEvent(DeclarativeBase): <NEW_LINE> <INDENT> __tablename__ = 'CalEvent' <NEW_LINE> uid = Column(Integer, primary_key=True, nullable=False, autoincrement=True) <NEW_LINE> employee_uid = Column(Integer, ForeignKey('Employee.uid', ondelete='CASCADE', onupdate='CASCADE'), nullable=True, index=True) <NEW_LINE> order...
Calendar event. :see: http://arshaw.com/fullcalendar/docs/event_data/Event_Object/
62599039711fe17d825e1579
class TestSequence(unittest.TestCase): <NEW_LINE> <INDENT> def runTest(self): <NEW_LINE> <INDENT> test_string = ("{RACK,66}{IO_BLADE,57}") <NEW_LINE> bigbuf=oh_big_textbuffer() <NEW_LINE> ep=SaHpiEntityPathT() <NEW_LINE> err = oh_encode_entitypath(test_string, ep) <NEW_LINE> self.assertEqual (err!=None,True) <NEW_LINE>...
main: epathstr -> epath test Test if an entity path string is converted properly into an entity path.
625990390a366e3fb87ddba0
class JSONWebSocket: <NEW_LINE> <INDENT> def __init__(self, ws): <NEW_LINE> <INDENT> self.ws = ws <NEW_LINE> self.rlock = threading.RLock() <NEW_LINE> self.wlock = threading.RLock() <NEW_LINE> <DEDENT> def _recv_raw(self): <NEW_LINE> <INDENT> with self.rlock: <NEW_LINE> <INDENT> while 1: <NEW_LINE> <INDENT> message = s...
JSONWebSocketWrapper(ws) -> new instance JSON-reading/writing WebSocket wrapper. Provides recv()/send() methods that transparently encode/decode JSON. Reads and writes are serialized with independent locks; the reading lock is to be acquired "outside" the write lock.
6259903907d97122c4217e58
class ConfigTypeError(ConfigError, TypeError): <NEW_LINE> <INDENT> pass
:exc:`TypeError` specific for configuration.
625990393c8af77a43b68819
class VanillaLstm_LHUC(LstmBase_LHUC): <NEW_LINE> <INDENT> def __init__(self, rng, x, n_in, n_h, p=0.0, training=0): <NEW_LINE> <INDENT> LstmBase_LHUC.__init__(self, rng, x, n_in, n_h, p, training) <NEW_LINE> self.params = [self.W_xi, self.W_hi, self.w_ci, self.W_xf, self.W_hf, self.w_cf, self.W_xo, self.W_ho, self.w_c...
This class implements the standard LSTM block, inheriting the genetic class :class:`layers.gating.LstmBase`.
62599039be383301e02549d2
class MetaClass(meta): <NEW_LINE> <INDENT> def __new__(cls, name, this_bases, attribs): <NEW_LINE> <INDENT> return meta(name, bases, attribs)
Indirection for the provided metaclass.
6259903915baa72349463156
class CopyDummyTravelDataWithModWPA(CopyDummyTravelData): <NEW_LINE> <INDENT> def run(self, config, year): <NEW_LINE> <INDENT> logger.start_block("Starting CopyDummyTravelData.run(...)") <NEW_LINE> self.config = config <NEW_LINE> self.travel_model_configuration = config['travel_model_configuration'] <NEW_LINE> self.bas...
Copies dummy travel data for testing reasons into opus home tmp directory to replace the travel data in urbansim data set.
6259903971ff763f4b5e8956
class ChunkParser: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._buf = b'' <NEW_LINE> <DEDENT> def get_chunks(self, new_data_bytes): <NEW_LINE> <INDENT> self._buf += new_data_bytes <NEW_LINE> while True: <NEW_LINE> <INDENT> buf_decoded = _best_effort_decode(self._buf) <NEW_LINE> buf_utf16 = buf_deco...
Parse data from the backward channel into chunks. Responses from the backward channel consist of a sequence of chunks which are streamed to the client. Each chunk is prefixed with its length, followed by a newline. The length allows the client to identify when the entire chunk has been received.
6259903916aa5153ce4016a9
class WindowsChunkedWriter: <NEW_LINE> <INDENT> def __init__(self, wrapped): <NEW_LINE> <INDENT> self.__wrapped = wrapped <NEW_LINE> <DEDENT> def __getattr__(self, name): <NEW_LINE> <INDENT> return getattr(self.__wrapped, name) <NEW_LINE> <DEDENT> def write(self, text): <NEW_LINE> <INDENT> total_to_write = len(text) <N...
Wraps a stream (such as stdout), acting as a transparent proxy for all attribute access apart from method 'write()' which we wrap to write in limited chunks due to a Windows limitation on binary console streams.
6259903923e79379d538d6bc
class TagAnnotation(mm.Schema): <NEW_LINE> <INDENT> tag = mm.fields.Str(required=True, description="tag to attach to annoation")
a simple tagged annotation
625990398a349b6b43687400
class BasePolicy(tf.keras.Model): <NEW_LINE> <INDENT> def __init__(self, state_dim, action_dim, action_spec, hidden_dims = (256, 256), eps = 1e-6): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> relu_gain = tf.math.sqrt(2.0) <NEW_LINE> relu_orthogonal = tf.keras.initializers.Orthogonal(relu_gain) <NEW_LINE> near_zer...
Base class for policies.
625990398a43f66fc4bf334a
class LensCorrection(NonLinearCoordinateTransform): <NEW_LINE> <INDENT> className = 'lenscorrection.NonLinearTransform'
a placeholder for the lenscorrection transform, same as NonLinearTransform for now
6259903923e79379d538d6bd
class ModifyAccessPeriodResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RequestId = params.get("RequestId")
ModifyAccessPeriod返回参数结构体
625990393c8af77a43b6881a
class Meta: <NEW_LINE> <INDENT> model = JobConnectionResult <NEW_LINE> fields = ['results'] <NEW_LINE> qpc_allow_empty_fields = ['results']
Metadata for serialzer.
625990391d351010ab8f4cd8
class ActivityCounter(object): <NEW_LINE> <INDENT> def __init__(self, activity: str, n_total: int = None, report_every: int = 1000, loglevel: int = logging.DEBUG) -> None: <NEW_LINE> <INDENT> self.activity = activity <NEW_LINE> self.count = 0 <NEW_LINE> self.n_total = n_total <NEW_LINE> self.report_every = report_every...
Simple class to report progress in a repetitive activity.
62599039a8ecb033258723dc
class ExtendTool(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "curve.extend_tool" <NEW_LINE> bl_label = "Extend" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> ob = context.active_object <NEW_LINE> return ((ob is not None) and (ob.type...
Curve Extend Tool
6259903907d97122c4217e5b
class WebDriver(_messages.Message): <NEW_LINE> <INDENT> androidDevice = _messages.MessageField('AndroidDevice', 1) <NEW_LINE> browserId = _messages.StringField(2) <NEW_LINE> endpoint = _messages.StringField(3) <NEW_LINE> id = _messages.StringField(4) <NEW_LINE> linuxMachine = _messages.MessageField('LinuxMachine', 5) <...
A WebDriver environment. Fields: androidDevice: An Android device. browserId: The id of the browser to be used. Use the EnvironmentDiscoveryService to get supported values. Required endpoint: The endpoint in host:port format where the target running the specified browser accepts WebDriver protocol comman...
6259903921bff66bcd723e26
class Experiments(Model): <NEW_LINE> <INDENT> _attribute_map = { 'ramp_up_rules': {'key': 'rampUpRules', 'type': '[RampUpRule]'}, } <NEW_LINE> def __init__(self, ramp_up_rules=None): <NEW_LINE> <INDENT> self.ramp_up_rules = ramp_up_rules
Routing rules in production experiments. :param ramp_up_rules: List of ramp-up rules. :type ramp_up_rules: list[~azure.mgmt.web.models.RampUpRule]
6259903923e79379d538d6be
class TriggerHandle(object): <NEW_LINE> <INDENT> def __init__(self, tid, callback, state): <NEW_LINE> <INDENT> self.tid = tid <NEW_LINE> self.callback = callback <NEW_LINE> self.state = state <NEW_LINE> <DEDENT> def __call__(self): <NEW_LINE> <INDENT> return self.callback(tid=self.tid) <NEW_LINE> <DEDENT> def destroy(s...
Wraps management routines for inspecting a state trigger.
6259903916aa5153ce4016ab
class DbCommands(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @args('version', nargs='?', default=None, help='Database version') <NEW_LINE> def sync(self, version=None): <NEW_LINE> <INDENT> return db_migration.db_sync(version) <NEW_LINE> <DEDENT> def version(self): <NEW_...
Class for managing the database.
6259903a66673b3332c315b4
class TestModule(ExtTestCase): <NEW_LINE> <INDENT> def test_check(self): <NEW_LINE> <INDENT> check() <NEW_LINE> _setup_hook()
Test style.
6259903ab57a9660fecd2c39
class CreateTicketNewRequester(Choreography): <NEW_LINE> <INDENT> def __init__(self, temboo_session): <NEW_LINE> <INDENT> Choreography.__init__(self, temboo_session, '/Library/Zendesk/Tickets/CreateTicketNewRequester') <NEW_LINE> <DEDENT> def new_input_set(self): <NEW_LINE> <INDENT> return CreateTicketNewRequesterInput...
Create a new instance of the CreateTicketNewRequester Choreography. A TembooSession object, containing a valid set of Temboo credentials, must be supplied.
6259903a8e05c05ec3f6f73a
class TestSetup(object): <NEW_LINE> <INDENT> def __init__(self, test, args): <NEW_LINE> <INDENT> self.test = test <NEW_LINE> self.args = args <NEW_LINE> self.logger = logging.getLogger('RUNNER.TestSetup') <NEW_LINE> self.test_kind = args.kind <NEW_LINE> self.test_version = test.get('version', None) <NEW_LINE> <DEDENT> ...
Create directories required, then copy files needed to these directories.
6259903aa4f1c619b294f766
class ConstrainedValue: <NEW_LINE> <INDENT> def __init__(self, constraint_set_class): <NEW_LINE> <INDENT> self._constraint_set_class = constraint_set_class <NEW_LINE> <DEDENT> def __set_name__(self, owner, name): <NEW_LINE> <INDENT> self.public_name = name <NEW_LINE> self.private_name = f"_{name}" <NEW_LINE> try: <NEW_...
An object which can be passed around to represent a value.
6259903a30c21e258be999cc
class Comment(models.Model): <NEW_LINE> <INDENT> blog = models.ForeignKey(Blog,verbose_name='博客') <NEW_LINE> name = models.CharField('称呼',max_length=16) <NEW_LINE> email = models.EmailField('邮箱') <NEW_LINE> content = models.CharField('内容',max_length=240) <NEW_LINE> created = models.DateTimeField('发布时间',auto_now_add=Tru...
评论
6259903a50485f2cf55dc13f
class NABackboneTorsionReport(_AdvancedBaseReport): <NEW_LINE> <INDENT> def __init__(self, report: dict = None): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._update({ 'Model ID': '', 'Chain ID': '', 'Residue Num': 0, 'Residue Name': '', "O3'-P-O5'-C5": 0, "P-O5'-C5'-C4'": 0, "O5'-C5'-C4'-C3'": 0, "C5'-C4'-C3...
Class for refinement data search report extending _AdvancedBaseReport
6259903ad6c5a102081e32e5
class TestModel_VersionResponse(): <NEW_LINE> <INDENT> def test_version_response_serialization(self): <NEW_LINE> <INDENT> version_response_model_json = {} <NEW_LINE> version_response_model_json['builddate'] = 'testString' <NEW_LINE> version_response_model_json['buildno'] = 'testString' <NEW_LINE> version_response_model...
Test Class for VersionResponse
6259903abaa26c4b54d50467
class WireModule(ConnectionModule): <NEW_LINE> <INDENT> def __init__(self, id, name, voltage, linked_module): <NEW_LINE> <INDENT> super(WireModule, self).__init__(id, name, voltage, linked_module) <NEW_LINE> self.index = 0 <NEW_LINE> <DEDENT> def set_table_section(self, table): <NEW_LINE> <INDENT> super(WireModule, sel...
Transformer module, is linked with another transformer module
6259903a4e696a045264e701
class _StateManagerImpl(StateManager): <NEW_LINE> <INDENT> def __init__(self, layer, trainable): <NEW_LINE> <INDENT> self._trainable = trainable <NEW_LINE> self._layer = layer <NEW_LINE> self._cols_to_vars_map = collections.defaultdict(lambda: {}) <NEW_LINE> <DEDENT> def create_variable(self, feature_column, name, shap...
Manages the state of DenseFeatures and LinearLayer.
6259903a3eb6a72ae038b828
class ProvenanceEntity(backboneelement.BackboneElement): <NEW_LINE> <INDENT> resource_type = "ProvenanceEntity" <NEW_LINE> def __init__(self, jsondict=None, strict=True): <NEW_LINE> <INDENT> self.agent = None <NEW_LINE> self.role = None <NEW_LINE> self.what = None <NEW_LINE> super(ProvenanceEntity, self).__init__(jsond...
An entity used in this activity.
6259903a21bff66bcd723e28
class Home(BaseHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> svnCatalog = None <NEW_LINE> try: <NEW_LINE> <INDENT> conf = load_config('config.json') <NEW_LINE> repo = conf['repo_location'] <NEW_LINE> svnCatalog = comm.to_HTML(git.git_get(repo)) <NEW_LINE> <DEDENT> except Exception as e: <NEW_LINE> <I...
index page
6259903a23e79379d538d6c0
class GroupKFold(_BaseKFold): <NEW_LINE> <INDENT> def __init__(self, n_splits=5): <NEW_LINE> <INDENT> super().__init__(n_splits, shuffle=False, random_state=None) <NEW_LINE> <DEDENT> def _iter_test_indices(self, X, y, groups): <NEW_LINE> <INDENT> if groups is None: <NEW_LINE> <INDENT> raise ValueError("The 'groups' par...
K-fold iterator variant with non-overlapping groups. The same group will not appear in two different folds (the number of distinct groups has to be at least equal to the number of folds). The folds are approximately balanced in the sense that the number of distinct groups is approximately the same in each fold. Read...
6259903a94891a1f408b9fd7
class UserProfilePictureOneOffJob(jobs.BaseMapReduceJobManager): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def entity_classes_to_map_over(cls): <NEW_LINE> <INDENT> return [user_models.UserSettingsModel] <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def map(item): <NEW_LINE> <INDENT> if item.deleted or item.profile_pic...
One-off job that updates profile pictures for users which do not currently have them. Users who already have profile pictures are unaffected.
6259903a30dc7b76659a09f3
class Mechanism(Interface): <NEW_LINE> <INDENT> path = 'mechanism' <NEW_LINE> @classmethod <NEW_LINE> def to_python(cls, data): <NEW_LINE> <INDENT> data = upgrade_legacy_mechanism(data) <NEW_LINE> is_valid, errors = validate_and_default_interface(data, cls.path) <NEW_LINE> if not is_valid: <NEW_LINE> <INDENT> raise Int...
an optional field residing in the exception interface. It carries additional information about the way the exception was created on the target system. This includes general exception values obtained from operating system or runtime APIs, as well as mechanism-specific values. >>> { >>> "type": "mach", >>> "desc...
6259903a50485f2cf55dc142
class WaitUntilHealthy(ELBBaseActor): <NEW_LINE> <INDENT> def _get_expected_count(self, count, total_count): <NEW_LINE> <INDENT> if '%' in str(count): <NEW_LINE> <INDENT> expected_count = math.ceil(total_count * p2f(count)) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> expected_count = int(count) <NEW_LINE> <DEDENT> re...
Wait indefinitely until a specified ELB is considered "healthy". This actor will loop infinitely until a healthy threshold of the ELB is met. The threshold can be reached when the ``count`` as specified in the options is less than or equal to the number of InService instances in the ELB. Another situation is for ``c...
6259903a30c21e258be999cf
class SyncStepDetailInfo(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.StepNo = None <NEW_LINE> self.StepName = None <NEW_LINE> self.CanStop = None <NEW_LINE> self.StepId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.StepNo = params.get("StepNo") ...
同步任务进度
6259903a6e29344779b01813
class ListaMaterialEntregue(models.Model): <NEW_LINE> <INDENT> entregue = models.BooleanField(default=False) <NEW_LINE> ordem_de_servico = models.ForeignKey('programacao.OrdemDeServico', blank=True, null=True) <NEW_LINE> entregue_por = models.ForeignKey("rh.Funcionario", blank=False, null=False, related_name="entregue_...
Lista Consolidada De materiais Entregues
6259903aac7a0e7691f736aa
class ImagFormatter(RealFormatter): <NEW_LINE> <INDENT> def __call__(self, x, pos=None): <NEW_LINE> <INDENT> if x < -self._axes._near_inf: <NEW_LINE> <INDENT> return "" <NEW_LINE> <DEDENT> elif x > self._axes._near_inf: <NEW_LINE> <INDENT> return self._axes._get_key("symbol.infinity") <NEW_LINE> <DEDENT> elif abs(x) < ...
Formatter for the imaginary axis of a SmithAxes. Prints the numbers as float and removes trailing zeros and commata. Special returns: - '' for minus infinity - 'symbol.infinity' from scParams for plus infinity - '0' for value near zero (prevents -0) Keyword arguments: *axes*: Parent axe...
6259903ab57a9660fecd2c3d
class LiveDBTestRunner(DiscoverRunner): <NEW_LINE> <INDENT> def setup_databases(self, *args, **kwargs): <NEW_LINE> <INDENT> print('WARNING: using LIVE database = {}' .format(DATABASES['archive']['HOST'])) <NEW_LINE> pass <NEW_LINE> <DEDENT> def teardown_databases(self, *args, **kwargs): <NEW_LINE> <INDENT> pass
THIS IS DANGEROUS. Do NOT create new database. Use live DB (for metadata DB). Done as stop-gap until we have build a clone of metadata DB on test server. It should contain a small subset of full metadata content.
6259903ad99f1b3c44d06868
class Account: <NEW_LINE> <INDENT> prefix = 'GIRO' <NEW_LINE> def __init__(self, newname, balance=0): <NEW_LINE> <INDENT> self.name = newname <NEW_LINE> self.balance = balance <NEW_LINE> <DEDENT> def deposit(self, amt): <NEW_LINE> <INDENT> self.balance += amt <NEW_LINE> <DEDENT> def withdraw(self, amt): <NEW_LINE> <IND...
Account for a bank client.
6259903a8a43f66fc4bf3350
class UIGraphicsItem(GraphicsObject): <NEW_LINE> <INDENT> def __init__(self, bounds=None, parent=None): <NEW_LINE> <INDENT> GraphicsObject.__init__(self, parent) <NEW_LINE> self.setFlag(self.ItemSendsScenePositionChanges) <NEW_LINE> if bounds is None: <NEW_LINE> <INDENT> self._bounds = QtCore.QRectF(0, 0, 1, 1) <NEW_LI...
Base class for graphics items with boundaries relative to a GraphicsView or ViewBox. The purpose of this class is to allow the creation of GraphicsItems which live inside a scalable view, but whose boundaries will always stay fixed relative to the view's boundaries. For example: GridItem, InfiniteLine The view can be...
6259903a287bf620b6272dad
class BootstrapGalaxyApplication(object): <NEW_LINE> <INDENT> def __init__(self, config): <NEW_LINE> <INDENT> self.config = config <NEW_LINE> if not self.config.database_connection: <NEW_LINE> <INDENT> self.config.database_connection = "sqlite:///%s?isolation_level=IMMEDIATE" % str(config.database) <NEW_...
Creates a basic Tool Shed application in order to discover the database connection and use SQL to create a user and API key.
6259903a8da39b475be043b1
class InquirerLexKeyGroup(KeyGroup): <NEW_LINE> <INDENT> def __init__(self, lexicon): <NEW_LINE> <INDENT> self.lexicon = lexicon <NEW_LINE> description = "Inquirer features" <NEW_LINE> super(InquirerLexKeyGroup, self).__init__(description, self.mk_fields()) <NEW_LINE> <DEDENT> def mk_field(self, entry): <NEW_LINE> <IND...
One feature per Inquirer lexicon class
6259903a711fe17d825e157d
class TCPClient(CustomClient): <NEW_LINE> <INDENT> __serverName = None <NEW_LINE> __serverPort = None <NEW_LINE> __csocket = None <NEW_LINE> __serverResponse = [] <NEW_LINE> def __init__(self, serverName, serverPort): <NEW_LINE> <INDENT> self.__serverName = serverName <NEW_LINE> self.__serverPort = serverPort <NEW_LINE...
A TCP client. The client class is able to send and receive data without closing the connection. Attributes: __serverName: The C&C's IP or domain __serverPort: The C&C's port __csocket: Server connection socket. __serverResponse: The last response coming from the server
6259903a1d351010ab8f4cde
class ComparisonFrame(awx.Frame): <NEW_LINE> <INDENT> def __init__(self, parent, dirpaths=None, filepaths=None, wildcard=None, **kwargs): <NEW_LINE> <INDENT> super(ComparisonFrame, self).__init__(parent, -1, **kwargs) <NEW_LINE> main_sizer = wx.BoxSizer(wx.VERTICAL) <NEW_LINE> hsizer = wx.BoxSizer(wx.HORIZONTAL) <NEW_L...
This frame allows the user to select/deselect a list of files and to produce plots for all the files selected. Useful for convergence studies.
6259903ab5575c28eb7135ab
class TeeBytesIO(BytesIO): <NEW_LINE> <INDENT> def __init__(self, tee_fh): <NEW_LINE> <INDENT> self.tee_fh = tee_fh <NEW_LINE> super(TeeBytesIO, self).__init__() <NEW_LINE> <DEDENT> def write(self, s): <NEW_LINE> <INDENT> self.tee_fh.write(s) <NEW_LINE> BytesIO.write(self, s)
duplicate each write command to an additional file object
6259903a71ff763f4b5e895e
class LocalSMTPServer(smtp.ESMTP, LEAPInitMixin): <NEW_LINE> <INDENT> def __init__(self, outgoings, soledads, encrypted_only=False): <NEW_LINE> <INDENT> LEAPInitMixin.__init__(self, outgoings, soledads, encrypted_only) <NEW_LINE> smtp.ESMTP.__init__(self)
The Production ESMTP Server: Authentication Needed. Authenticates against SMTP Token stored in Local Soledad instance. The Realm will produce a Delivery Object that handles encryption/signing.
6259903a0fa83653e46f609e
class SatelliteViewSet(DefaultsMixin, viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Satellite.objects.order_by('norad_number') <NEW_LINE> serializer_class = SatelliteSerializer <NEW_LINE> filter_class = SatelliteFilter <NEW_LINE> search_fields = ('isactive' ) <NEW_LINE> ordering_fields = ('norad_number',)
API endpoint for listing and creating Satellites.
6259903ae76e3b2f99fd9bd0
class BikeSubtype(MobikeDbModel): <NEW_LINE> <INDENT> __tablename__ = "bike_subtypes" <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> name = Column(Text) <NEW_LINE> type_id = Column(Integer, ForeignKey('bike_types.id')) <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return "<Mobike subtype (name = {:s}...
Mobike subtypes: Categorical table Subtype is used directly to express bike type.
6259903a6fece00bbacccb71
class RelayData: <NEW_LINE> <INDENT> def __init__(self, given_ip, provided_socket, derived_key, ec_privkey, given_rsa_key, given_port): <NEW_LINE> <INDENT> self.ip_addr = given_ip <NEW_LINE> self.sock = provided_socket <NEW_LINE> self.key = derived_key <NEW_LINE> self.ec_key_ = ec_privkey <NEW_LINE> self.rsa_key = give...
Relay data class
6259903a76d4e153a661db55
class AcceptForm(Form): <NEW_LINE> <INDENT> user_origin = HiddenField('Origin User ID', validators=[InputRequired(message='Error: user may not exist'), accept_form_validate]) <NEW_LINE> group_id = HiddenField('Group ID', validators=[InputRequired(message='Group does not exist')])
Creates an accept request form when called
6259903a50485f2cf55dc146
class GwasGeneList(tls.Unicode, TypeMeta): <NEW_LINE> <INDENT> info_text = "KBaseGwasData.GwasGeneList" <NEW_LINE> class v1_0(tls.Unicode, TypeMeta): <NEW_LINE> <INDENT> info_text = "KBaseGwasData.GwasGeneList-1.0"
GwasGeneList type
6259903a8da39b475be043b3
class Din9021Washer (Washer): <NEW_LINE> <INDENT> def __init__(self, metric, axis_h, pos_h, tol = 0, pos = V0, model_type = 0, name = ''): <NEW_LINE> <INDENT> self.metric = metric <NEW_LINE> default_name = 'din9021_washer_m' + str(self.metric) <NEW_LINE> self.set_name (name, default_name, change = 0) <NEW_LINE> washer_...
Din 9021 Washer, this is the larger washer Parameters ----------- metric : int (maybe float: 2.5) axis_h : FreeCAD.Vector Vector along the cylinder height pos_h : int Location of pos along axis_h (0,1) * 0: the cylinder pos is at its base * 1: the cylinder pos is centered along its height...
6259903a8a43f66fc4bf3352
class ForwardCheckingInference(object): <NEW_LINE> <INDENT> def __init__(self):pass <NEW_LINE> def doInference(self,inferenceInfo,csp,variable,value): <NEW_LINE> <INDENT> assignment = assignment.Assignment() <NEW_LINE> assignment.addVariableToAssignment(variable, value) <NEW_LINE> for con in csp.getConstraints(variable...
classdocs
6259903abe383301e02549db
class StepError(logme.LoggingException): <NEW_LINE> <INDENT> pass
Failed to build the command.
6259903a3c8af77a43b6881e
class AverageNoneZeroTripletsMetric(Metric): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.values = [] <NEW_LINE> <DEDENT> def __call__(self, outputs, target, loss): <NEW_LINE> <INDENT> self.values.append(loss[1]) <NEW_LINE> return self.value() <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT>...
Counts average number of nonzero triplets found in minibatches
6259903aa8ecb033258723e4
class Neural(Agent): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def train(self, mini_batch, discount): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def clear_model(model): <NEW_LINE> <INDENT> session = K.get_session() <NEW_LINE> for layer in model.layers: <NEW_LINE> <INDENT> if isinstance(l...
An abstract class to represent an instance of a deep network architecture to represent an instance of the Q-value function.
6259903ad10714528d69ef6e
class HostTestPluginCopyMethod_Silabs(HostTestPluginBase): <NEW_LINE> <INDENT> name = "HostTestPluginCopyMethod_Silabs" <NEW_LINE> type = "CopyMethod" <NEW_LINE> capabilities = ["eACommander", "eACommander-usb"] <NEW_LINE> required_parameters = ["image_path", "destination_disk"] <NEW_LINE> stable = True <NEW_LINE> def ...
Plugin interface adapter for eACommander.exe.
6259903ae76e3b2f99fd9bd2
class VoIPPlan(Model): <NEW_LINE> <INDENT> name = models.CharField(unique=True, max_length=255, verbose_name=_('name'), help_text=_("enter plan name")) <NEW_LINE> pubname = models.CharField(max_length=255, verbose_name=_('publish name'), help_text=_("enter publish name")) <NEW_LINE> lcrtype = models.IntegerField(choice...
VoIPPlan VoIPPlans are associated to your clients, this defines the rate at which the VoIP calls are sold to your clients. An VoIPPlan is a collection of VoIPRetailPlans, you can have 1 or more VoIPRetailPlans associated to the VoIPPlan A client has a single VoIPPlan, VoIPPlan has many VoIPRetailPlans. VoIPRetailPlan...
6259903a07d97122c4217e63
class FastaWriter(SequentialSequenceWriter): <NEW_LINE> <INDENT> def __init__(self, handle, wrap=60, record2title=None): <NEW_LINE> <INDENT> SequentialSequenceWriter.__init__(self, handle) <NEW_LINE> self.wrap = None <NEW_LINE> if wrap: <NEW_LINE> <INDENT> if wrap < 1: <NEW_LINE> <INDENT> raise ValueError <NEW_LINE> <D...
Class to write Fasta format files.
6259903ad99f1b3c44d0686c
class ChatRoom(models.Model): <NEW_LINE> <INDENT> _name = "chat.room" <NEW_LINE> _description = "Chat Room" <NEW_LINE> def _default_name(self, objname='room'): <NEW_LINE> <INDENT> return "odoo-%s-%s" % (objname, str(uuid4())[:8]) <NEW_LINE> <DEDENT> name = fields.Char( "Room Name", required=True, copy=False, default=la...
Store all useful information to manage chat room (currently limited to Jitsi). This model embeds all information about the chat room. We do not store them in the related mixin (see chat.room.mixin) to avoid to add too many fields on the models which want to use the chat room mixin as the behavior can be optional in tho...
6259903a8a349b6b4368740a
class AnityaException(Exception): <NEW_LINE> <INDENT> pass
Generic class covering all the exceptions generated by anitya.
6259903a07d97122c4217e64
class SearchRegion(BasePage): <NEW_LINE> <INDENT> _search_box_locator = 'q' <NEW_LINE> def __int__(self, driver): <NEW_LINE> <INDENT> super(SearchRegion, self).__init__(driver) <NEW_LINE> <DEDENT> def searchFor(self, term): <NEW_LINE> <INDENT> self.search_field = self.driver.find_element_by_name( self._search_box_locat...
SearchRegion Handel application search feature.
6259903a23e79379d538d6c7
class LossPanel(QWidget): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> pass
a panel to add neutral losses
6259903a15baa72349463162
class Mol2_Reader(BaseReader): <NEW_LINE> <INDENT> def __init__(self,fnm): <NEW_LINE> <INDENT> super(Mol2_Reader,self).__init__(fnm) <NEW_LINE> self.pdict = mol2_pdict <NEW_LINE> self.atom = [] <NEW_LINE> self.atomnames = [] <NEW_LINE> self.section = None <NEW_LINE> self.mol = None <NEW_LINE> <DEDENT> def feed(self,...
Finite state machine for parsing Mol2 force field file. (just for parameterizing the charges)
6259903abe383301e02549de
class DBRunnerTests(unittest.TestCase): <NEW_LINE> <INDENT> def test_parse_dbrunner_args(self): <NEW_LINE> <INDENT> options = DBRunner.parse_args([ '-m', 'foo.sqlite', '-s', '20180101', '5']) <NEW_LINE> self.assertEqual( '5', options.process_id) <NEW_LINE> self.assertEqual( 'foo.sqlite', options.mission) <NEW_LINE> sel...
DBRunner tests
6259903a1d351010ab8f4ce2
class Component(Resource): <NEW_LINE> <INDENT> def __init__(self, type: str, value: str): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.type = Resource.init_param(type) <NEW_LINE> self.value = Resource.init_param(value)
Represent the components configuration for the ImageBuilder.
6259903a3c8af77a43b6881f
class GetHandlers(Resource): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> return server.get_handlers()
Class responsible of sending the differents handlers.
6259903a63f4b57ef0086657
class Bitfinex(models.Exchange): <NEW_LINE> <INDENT> _markets_map = {'btc_usd': 'btcusd', 'ltc_usd': 'ltcusd', 'ltc_btc': 'ltcbtc'} <NEW_LINE> def __init__(self, market="btc_usd"): <NEW_LINE> <INDENT> self.market = market <NEW_LINE> <DEDENT> def depth(self): <NEW_LINE> <INDENT> url = "/".join([base_url, 'book', self._s...
Docstring for Bitstamp
6259903a1f5feb6acb163dba
class ManageUserView(generics.RetrieveUpdateAPIView): <NEW_LINE> <INDENT> serializer_class = UserSerializer <NEW_LINE> authentication_classes = [authentication.TokenAuthentication, ] <NEW_LINE> permission_classes = [permissions.IsAuthenticated, ] <NEW_LINE> def get_object(self): <NEW_LINE> <INDENT> return self.request....
Manage authenticated users.
6259903a16aa5153ce4016b5
class FileRecorder(): <NEW_LINE> <INDENT> def __init__(self, record_dir, max_record_pre_file = 1000): <NEW_LINE> <INDENT> if not os.path.exists(record_dir): <NEW_LINE> <INDENT> os.makedirs(record_dir) <NEW_LINE> print('Successfully creating directory {0}'.format(record_dir)) <NEW_LINE> <DEDENT> self.record_dir = record...
write records in a file on disk Attributes: curr_id (int): id of the current record to write on disk latest_file (str): path of the record file max_record (int): maximum records allowed to store in a file record_dir (str): directory containing the record files
6259903aec188e330fdf9a60
class ImportOSM(bpy.types.Operator, ImportHelper): <NEW_LINE> <INDENT> bl_idname = "import_osm.xml" <NEW_LINE> bl_label = "Import OSM XML" <NEW_LINE> filepath = bpy.props.StringProperty(name="File Path", default= "") <NEW_LINE> filename_ext = ".osm" <NEW_LINE> filter_glob = bpy.props.StringProperty(default="*.osm", opt...
Load a OSM XML file
6259903ad4950a0f3b111724
class MyView(View): <NEW_LINE> <INDENT> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> return TemplateResponse(request, self.get_template_name(), self.get_context_data()) <NEW_LINE> <DEDENT> def get_template_name(self): <NEW_LINE> <INDENT> return "blog/blogpost_detail.html" <NEW_LINE> <DEDENT> def get_con...
Displays the details of a BlogPost
6259903a15baa72349463164
class NewSetupMotor: <NEW_LINE> <INDENT> def __init__( self, filename, which_motor, phase_offset=0, optical_element='Polarizer'): <NEW_LINE> <INDENT> self.experiment_start_datetime = None <NEW_LINE> self.filename = filename <NEW_LINE> self.phase_offset = ph...
This class represents either of the two motors in the new setup. For both, emission and excitation motor, this class should be used. There are only two reasons we have separate motor classes for the old setup: i) because the data generated by labview is a separate, differently formatted file for the excitation motor, a...
6259903abe383301e02549e0
class Assignment(base.Assignment): <NEW_LINE> <INDENT> implements(ILatestNITFPortlet) <NEW_LINE> limit = 10 <NEW_LINE> pretty_date = True <NEW_LINE> anonymous_only = True <NEW_LINE> def __init__(self, limit = 10, pretty_date=True, anonymous_only=True): <NEW_LINE> <INDENT> self.limit = limit <NEW_LINE> self.pretty_date ...
Portlet assignment. This is what is actually managed through the portlets UI and associated with columns.
6259903a3c8af77a43b68820
class SentenceSelectionInstance(TextInstance): <NEW_LINE> <INDENT> def __init__(self, question_text: str, sentences: List[str], label: int, index: int=None): <NEW_LINE> <INDENT> super(SentenceSelectionInstance, self).__init__(label, index) <NEW_LINE> self.question_text = question_text <NEW_LINE> self.sentences = senten...
A SentenceSelectionInstance is an instance for the sentence selection task. A SentenceSelectionInstance stores a question as a string, and a set of sentences as a list of strings. The labels is a single int, indicating the index of the sentence that contains the answer to the question.
6259903a23849d37ff852281
class CategoricalEncoder(BaseEstimator, TransformerMixin): <NEW_LINE> <INDENT> def __init__(self, variables=None): <NEW_LINE> <INDENT> if not isinstance(variables, list): <NEW_LINE> <INDENT> self.variables = [variables] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.variables = variables <NEW_LINE> <DEDENT> <DEDENT...
String to numbers categorical encoder
6259903ab5575c28eb7135ae
class TextArea(_ATextInput): <NEW_LINE> <INDENT> def __init__(self, parent, *args, **kwargs): <NEW_LINE> <INDENT> wrap_style = _wx.TE_DONTWRAP if not kwargs.pop('do_wrap', True) else 0 <NEW_LINE> super(TextArea, self).__init__(parent, *args, style=wrap_style, **kwargs)
A multi-line text edit widget. See the documentation for _ATextInput for a list of the events this component offers.
6259903a287bf620b6272db4
class PredatorPreyMapData(object): <NEW_LINE> <INDENT> field = [] <NEW_LINE> def __init__(self, map_path): <NEW_LINE> <INDENT> tiled_data = pygame_renderer.TiledData(map_path) <NEW_LINE> tiled_data.load() <NEW_LINE> tile_pos = tiled_data.get_tile_positions() <NEW_LINE> self.field = tile_pos['ground']['FIELD']
The map data as the geographical info.
6259903ad10714528d69ef70
class EventObjectFilter(interface.FilterObject): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(EventObjectFilter, self).__init__() <NEW_LINE> self._event_filter = None <NEW_LINE> self._filter_expression = None <NEW_LINE> <DEDENT> def CompileFilter(self, filter_expression): <NEW_LINE> <INDENT> parser...
Event filter.
6259903a6e29344779b0181c
class TransactionCreateView(generic.CreateView): <NEW_LINE> <INDENT> model = Transaction <NEW_LINE> template_name = 'financial/create_transaction.html' <NEW_LINE> fields = ['date', 'description', 'acc_from', 'acc_to', 'value'] <NEW_LINE> success_url = 'create'
Esta classe eh utilizada para criar entradas na base de dados.
6259903a16aa5153ce4016b7
class CityAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> raw_id_fields = ["subregion", "region"] <NEW_LINE> list_display = ( 'name', 'subregion', 'region', 'country', 'geoname_id', 'timezone' ) <NEW_LINE> search_fields = ( 'search_names', 'geoname_id', 'timezone' ) <NEW_LINE> list_filter = ( 'country__continent', 'countr...
ModelAdmin for City.
6259903a07d97122c4217e67
class LruDictR(LruDict): <NEW_LINE> <INDENT> def __init__(self, cap): <NEW_LINE> <INDENT> super(LruDictR, self).__init__(cap) <NEW_LINE> self._lock = threading.Lock() <NEW_LINE> <DEDENT> def __setitem__(self, key, value): <NEW_LINE> <INDENT> with self._lock: <NEW_LINE> <INDENT> return super(LruDictR, self).__setitem__(...
Thread safe version
6259903abaa26c4b54d50472
class LibcxxPrettyPrinter(object): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> super(LibcxxPrettyPrinter, self).__init__() <NEW_LINE> self.name = name <NEW_LINE> self.enabled = True <NEW_LINE> self.lookup = { "basic_string": StdStringPrinter, "string": StdStringPrinter, "string_view": StdStringVie...
PrettyPrinter object so gdb-commands like 'info pretty-printers' work.
6259903a76d4e153a661db58
class Square: <NEW_LINE> <INDENT> def __init__(self, size=0, position=(0, 0)): <NEW_LINE> <INDENT> self.size = size <NEW_LINE> self.position = position <NEW_LINE> <DEDENT> @property <NEW_LINE> def size(self): <NEW_LINE> <INDENT> return(self.__size) <NEW_LINE> <DEDENT> @property <NEW_LINE> def position(self): <NEW_LINE>...
Class Square that defines a square Attributes: __size (int): size of a size of the square __position (tuple): position of the square in 2D
6259903ad53ae8145f919630
class EdxNotesPage(CoursePage): <NEW_LINE> <INDENT> url_path = "edxnotes/" <NEW_LINE> MAPPING = { "recent": RecentActivityView, "structure": CourseStructureView, "search": SearchResultsView, } <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(EdxNotesPage, self).__init__(*args, **kwargs) <NEW_LI...
EdxNotes page.
6259903a82261d6c527307aa
class JRPCAutomatedBookingTest(test.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.__verbose_testing = False <NEW_LINE> if not self.__verbose_testing: <NEW_LINE> <INDENT> logging.getLogger('common').setLevel(level=logging.CRITICAL) <NEW_LINE> logging.getLogger('configuration').setLevel(level=l...
JRPC Automated Booking test. The tests included in this class validate the booking process that involves the usage of fully automated GroundStation channels.
6259903a4e696a045264e707
class TripleSign(_SingularSign): <NEW_LINE> <INDENT> def __init__(self, pos: int): <NEW_LINE> <INDENT> _SingularSign.__init__(self, -1, 3, pos)
Sign representing pitch composed from one prime ** 3. 'pos' argument declares which of the three present primes (d, l or b) shall be used.
6259903a30c21e258be999d9
class Signature(Definition): <NEW_LINE> <INDENT> def __init__(self, inference_state, signature): <NEW_LINE> <INDENT> super(Signature, self).__init__(inference_state, signature.name) <NEW_LINE> self._signature = signature <NEW_LINE> <DEDENT> @property <NEW_LINE> def params(self): <NEW_LINE> <INDENT> return [ParamDefinit...
`Signature` objects is the return value of `Script.function_definition`. It knows what functions you are currently in. e.g. `isinstance(` would return the `isinstance` function. without `(` it would return nothing.
6259903a1f5feb6acb163dbe
class EpisodeNameNotFound(DataRetrievalError): <NEW_LINE> <INDENT> pass
Raised when the name of the episode cannot be found
6259903acad5886f8bdc5962
class SerialServerError(Exception): <NEW_LINE> <INDENT> pass
Exception class for serial server.
6259903a30c21e258be999da
class GoddardKneller(Ref): <NEW_LINE> <INDENT> author = "Goddard, T.D. and Kneller, D.G." <NEW_LINE> author2 = [["Tom", "Goddard", "T.", "D."], ["Donald", "Kneller", "D.", "G."]] <NEW_LINE> journal = "University of California, San Francisco." <NEW_LINE> title = "Sparky 3." <NEW_LINE> ...
Bibliography container.
6259903a73bcbd0ca4bcb455
class MinimaxAgent(MultiAgentSearchAgent): <NEW_LINE> <INDENT> def getAction(self, gameState): <NEW_LINE> <INDENT> def maxValue(state,depth): <NEW_LINE> <INDENT> if depth == self.depth or state.isWin() or state.isLose(): <NEW_LINE> <INDENT> return self.evaluationFunction(state) <NEW_LINE> <DEDENT> v=-999999 <NEW_LINE> ...
Your minimax agent (question 2)
6259903ad53ae8145f919632
class ElectricCar(Car): <NEW_LINE> <INDENT> def __init__(self, make, model, year): <NEW_LINE> <INDENT> super().__init__(make, model, year) <NEW_LINE> self.battery = Battery()
电动车的独特之处
6259903a4e696a045264e708
@tag(TestType='FVT', FeatureID='IOTOS-1156') <NEW_LINE> class solettaPWMApiTest(TestCaseInterface): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> sys.stdout.write('\nDownloading the repository of soletta...') <NEW_LINE> sys.stdout.flush() <NEW_LINE> soletta_url = 'https://github.com/solettaproject/soletta.gi...
@class solettaPWMApiTest Update suite.js for testing
6259903a3eb6a72ae038b836
class OrgFocus(db.Model): <NEW_LINE> <INDENT> __tablename__ = "orgfocus" <NEW_LINE> id=db.Column(db.Integer,db.ForeignKey("organisation.id"),primary_key=True) <NEW_LINE> focus_id=db.Column(db.Integer,db.ForeignKey("focus.id"),primary_key=True) <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return "<OrgFocus:%r:%r>"...
'UserFocus' relates users to their interests
6259903a23849d37ff852285
class InteractiveReplaceInput(app.editor.InteractiveFindInput): <NEW_LINE> <INDENT> def __init__(self, view): <NEW_LINE> <INDENT> app.editor.InteractiveFindInput.__init__(self, view) <NEW_LINE> <DEDENT> def focus(self): <NEW_LINE> <INDENT> self.view.parent.parent.textBuffer.set_message( "Press ctrl+g to replace and fin...
Find text within the current document.
6259903a71ff763f4b5e8968
class _Component: <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> for key in kwargs: <NEW_LINE> <INDENT> setattr(self, key, kwargs[key]) <NEW_LINE> <DEDENT> components.append(self) <NEW_LINE> <DEDENT> def get_predicate(self): <NEW_LINE> <INDENT> assert self.predicate and not isinstance(self.invali...
Base class for all components.
6259903ad10714528d69ef72