code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class ItemPetFood(Structure): <NEW_LINE> <INDENT> fields = Skeleton( IDField(), LocalizedField("name"), )
ItemPetFood.dbc Hunter pet food categories
62598edf2c8b7c6e89bd1d6e
class Tempdir(object): <NEW_LINE> <INDENT> def __init__(self, cwd=False): <NEW_LINE> <INDENT> self.cwd = cwd <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> self.tempdir = tempfile.mkdtemp() <NEW_LINE> if self.cwd: <NEW_LINE> <INDENT> self.pwd = os.getcwd() <NEW_LINE> os.chdir(self.tempdir) <NEW_LINE> <DED...
Manage a tempoarary directory >>> with Tempdir() as tempdir: ... os.mkdir(os.path.join(tempdir, 'blabla'))
62598edf56ac1b37e630079b
class TableViewDelegate: <NEW_LINE> <INDENT> def tableview_did_select(self, tableview, section, row): <NEW_LINE> <INDENT> tableview.superview['search_field'].end_editing() <NEW_LINE> if tableview.editing: <NEW_LINE> <INDENT> tableview.superview['editbar']['delete'].enabled = True <NEW_LINE> tableview.superview['editbar...
The delegate class to handle the vocabulary table.
62598edf596a89723612620f
class ComponentSync(widgets.Widget): <NEW_LINE> <INDENT> _model_name = Unicode('ComponentSync').tag(sync=True) <NEW_LINE> _model_module = Unicode('jupyter_geppetto').tag(sync=True) <NEW_LINE> _model_module_version = Unicode('~1.0.0') <NEW_LINE> componentType = Unicode('componentType').tag(sync=True) <NEW_LINE> model = ...
Defines the synchronization widget
62598edf009cb60464cffafe
class AzureObjMock(object): <NEW_LINE> <INDENT> args = None <NEW_LINE> kwargs = None <NEW_LINE> def __init__(self, args, kwargs, return_value=None): <NEW_LINE> <INDENT> self.args = args <NEW_LINE> self.kwargs = kwargs <NEW_LINE> self.__return_value = return_value <NEW_LINE> <DEDENT> def __getattr__(self, item): <NEW_LI...
mock azure object for as_dict calls
62598edf97e22403b383949f
@pytest.mark.skip( reason="These tests are performing actual failing network calls. They " "need to be cleaned up before they are re-enabled. They're frequently " "failing in Travis.") <NEW_LINE> class TestTelnetConnection(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.connection = Te...
Testing TelnetConnection.
62598edf3539df3088eca861
class TimeSlotNameGenerator(grok.Adapter): <NEW_LINE> <INDENT> grok.context(ITimeSlot) <NEW_LINE> grok.provides(INameFromTitle) <NEW_LINE> def __init__(self, context): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> <DEDENT> @property <NEW_LINE> def title(self): <NEW_LINE> <INDENT> return unicode(self.context.sta...
Generates the id for a day that matches the date of the appointment day
62598edf45492302aabfaa62
class KNearestNeighbor: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def train(self, X, y): <NEW_LINE> <INDENT> self.X_train = X <NEW_LINE> self.y_train = y <NEW_LINE> <DEDENT> def predict(self, X, k=1, num_loops=0): <NEW_LINE> <INDENT> if num_loops == 0: <NEW_LINE> <INDENT> dist...
a kNN classifier with L2 distance
62598edf32920d7e50bc45dd
class EndBlockData(EndStatement): <NEW_LINE> <INDENT> match = re.compile(r'end(\s*block\s*data\s*\w*|)\Z', re.I).match <NEW_LINE> blocktype = 'blockdata'
END [BLOCK DATA [<block-data-name>]]
62598edfa79ad161977685cc
class UserProfileManager(BaseUserManager): <NEW_LINE> <INDENT> def create_user(self, email, name, password=None): <NEW_LINE> <INDENT> if not email: <NEW_LINE> <INDENT> raise ValueError('User must have an email address.') <NEW_LINE> <DEDENT> email = self.normalize_email(email) <NEW_LINE> user = self.model(email=email, n...
Help Django work with our custom user model
62598edf2ae34c7f260a9697
class Logger(object): <NEW_LINE> <INDENT> def __init__(self, log_dir, graph=None): <NEW_LINE> <INDENT> self.writer = tf.summary.FileWriter(log_dir, graph=graph) <NEW_LINE> <DEDENT> def log_scalar(self, tag, value, step): <NEW_LINE> <INDENT> summary = tf.Summary(value=[tf.Summary.Value(tag=tag, simple_value=value)]) <NE...
Logging in tensorboard without tensorflow ops.
62598edf23849d37ff84f66a
class TaskStatisticsPage(Page): <NEW_LINE> <INDENT> def __init__(self, version, response, solution): <NEW_LINE> <INDENT> super(TaskStatisticsPage, self).__init__(version, response) <NEW_LINE> self._solution = solution <NEW_LINE> <DEDENT> def get_instance(self, payload): <NEW_LINE> <INDENT> return TaskStatisticsInstance...
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
62598edfd7e4931a7ef3a64d
class DBEntryAleadyExist(ZenException): <NEW_LINE> <INDENT> msg_fmt = "data already exist in database: %(reason)s" <NEW_LINE> error_code = ErrCode.DB_ENTRY_ALREADY_EXIST
the data already exist in database, like admin already exist
62598edf498bea3a75a560e7
class LiveOSSourceInterfaceTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.module = LiveOSSourceModule() <NEW_LINE> self.interface = LiveOSSourceInterface(self.module) <NEW_LINE> <DEDENT> def test_type(self): <NEW_LINE> <INDENT> assert self.interface.Type == SOURCE_TYPE_LIVE_O...
Test the DBus interface of the Live OS source.
62598edfa79ad161977685cd
class MassReconcileOptions(models.AbstractModel): <NEW_LINE> <INDENT> _name = 'mass.reconcile.options' <NEW_LINE> @api.model <NEW_LINE> def _get_rec_base_date(self): <NEW_LINE> <INDENT> return [ ('newest', 'Most recent move line'), ('actual', 'Today'), ] <NEW_LINE> <DEDENT> write_off = fields.Float('Write off allowed',...
Options of a reconciliation profile Columns shared by the configuration of methods and by the reconciliation wizards. This allows decoupling of the methods and the wizards and allows to launch the wizards alone
62598edfbaa26c4b54d4d881
class Meta(DjangoUserCreationForm.Meta): <NEW_LINE> <INDENT> model = models.User <NEW_LINE> fields = ("email",) <NEW_LINE> field_classes = {"email": UsernameField}
This inner Meta class needs to be overriden when there is a custom User model implemented (quote).
62598edf01c39578d7f11358
class Dag: <NEW_LINE> <INDENT> def __init__(self, root): <NEW_LINE> <INDENT> self.root = root <NEW_LINE> self._nodes = [] <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_nodes(cls, nodes): <NEW_LINE> <INDENT> node_names = list(nodes.keys()) <NEW_LINE> root = nodes[node_names[0]] <NEW_LINE> for node in nodes.values...
Directed Acyclic Graph.
62598edf2eb69b55b15a0661
class City(object): <NEW_LINE> <INDENT> swagger_types = { 'id': 'int', 'name': 'str', 'state': 'int' } <NEW_LINE> attribute_map = { 'id': 'id', 'name': 'name', 'state': 'state' } <NEW_LINE> def __init__(self, id=None, name=None, state=None): <NEW_LINE> <INDENT> self._id = None <NEW_LINE> self._name = None <NEW_LINE> se...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598edfac7a0e7691f70ac4
class IndexedFile: <NEW_LINE> <INDENT> def __init__(self,filen=None,fp=None,first_line_is_header=False): <NEW_LINE> <INDENT> self.__header = None <NEW_LINE> self.__keys = [] <NEW_LINE> self.__content = {} <NEW_LINE> if fp is None: <NEW_LINE> <INDENT> fp = io.open(filen,'rt') <NEW_LINE> close_fp = True <NEW_LINE> <DEDEN...
Read a file into memory and index for fast retrieval of lines
62598edf66673b3332c2e957
class EmailOutputPluginTest(test_lib.FlowTestsBaseclass): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(EmailOutputPluginTest, self).setUp() <NEW_LINE> self.client_id = self.SetupClients(1)[0] <NEW_LINE> self.hostname = aff4.FACTORY.Open(self.client_id, token=self.token).Get( aff4.VFSGRRClient.SchemaCl...
Tests email output plugin.
62598edf0a50d4780f703959
class Loss(object): <NEW_LINE> <INDENT> def calc_loss(self, y, y_pred): <NEW_LINE> <INDENT> return NotImplementedError() <NEW_LINE> <DEDENT> def calc_gradient(self, y, y_pred): <NEW_LINE> <INDENT> return NotImplementedError()
损失函数基类
62598edf8e7ae83300ee7640
class TestManagementPlaneApiLogicalRoutingAndServicesLogicalRouterPortsApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = api.management_plane_api_logical_routing_and_services_logical_router_ports_api.ManagementPlaneApiLogicalRoutingAndServicesLogicalRouterPortsApi() <NEW_LINE> ...
ManagementPlaneApiLogicalRoutingAndServicesLogicalRouterPortsApi unit test stubs
62598edf99cbb53fe682f463
class RepositoryDelegate (ControlBlocks.ListDelegate): <NEW_LINE> <INDENT> def GetElementParent(self, element): <NEW_LINE> <INDENT> return element.itsParent <NEW_LINE> <DEDENT> def GetElementChildren(self, element): <NEW_LINE> <INDENT> if element is None: <NEW_LINE> <INDENT> return [wx.GetApp().UIRepositoryView] <NEW_L...
Used by the tree in the repository view
62598edfa219f33f346c4de9
class VolatilityReport(TextFile): <NEW_LINE> <INDENT> pass
Volatility output file data.
62598edf0c0af96317c5494f
class SceneOperation(Hook): <NEW_LINE> <INDENT> def execute(self, operation, file_path, **kwargs): <NEW_LINE> <INDENT> adobe = self.parent.engine.adobe <NEW_LINE> doc = adobe.get_active_document() <NEW_LINE> if not doc: <NEW_LINE> <INDENT> raise TankError("There is no active document!") <NEW_LINE> <DEDENT> if operation...
Hook called to perform an operation with the current scene
62598edf1b99ca400228e7e5
class VPP_POINT_EVAL_GWVD(VelocityPostProcessingAlgorithmBase): <NEW_LINE> <INDENT> from .cpostprocessing import getElementLDGvelocityValuesLagrangeRep <NEW_LINE> def __init__(self,vectorTransport=None,vtComponents=[0]): <NEW_LINE> <INDENT> VelocityPostProcessingAlgorithmBase.__init__(self,postProcessingType='point-eva...
Velocity calculation for evaluating coarse grid velocity solution at fine grid quadrature points; assumes that the coarse velocity degrees of freedom from the LDG solution are known Currently only working for P=1 and P=2
62598edf435de62698e9a387
class ERRMSG(dict): <NEW_LINE> <INDENT> def __init__(self, msg, **kwargs): <NEW_LINE> <INDENT> super(ERRMSG, self).__init__(**kwargs) <NEW_LINE> self.msg = msg <NEW_LINE> <DEDENT> def __getitem__(self, item): <NEW_LINE> <INDENT> field, attr = item.split('.') <NEW_LINE> if field in self.msg: <NEW_LINE> <INDENT> field = ...
获取错误提示 查找顺序: 1.自定义每个属性的提示 2.字段默认提示(_default) 3.全局默认提示
62598edf442bda511e95aa18
class AlipayPTNForm(AlipayBaseForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = AlipayPTN <NEW_LINE> fields = '__all__'
Alipay Partner Trade Notify Form
62598edf596a897236126211
class PseudoTreeNode(ComputationNode): <NEW_LINE> <INDENT> def __init__( self, variable: Variable, constraints: Iterable[Constraint], links: Iterable[PseudoTreeLink], name: str = None, ) -> None: <NEW_LINE> <INDENT> name = name if name is not None else variable.name <NEW_LINE> super().__init__(name, "PseudoTreeComputat...
ComputationNode for Pseudo-tree computation graph. Parameters ---------- variable: Variable The variable this computation is responsible for. constraints: iterable of constraints-like objects The constraints the variable depends on. links: iterable of PseudoTreeLink The links are mandatory because we canno...
62598edfe5267d203ee69eb5
class Continuize(Preprocessor): <NEW_LINE> <INDENT> __new__ = _orange__new__(Preprocessor) <NEW_LINE> __reduce__ = _orange__reduce__ <NEW_LINE> def __init__(self, zeroBased=True, multinomialTreatment=DomainContinuizer.NValues, continuousTreatment=DomainContinuizer.Leave, classTreatment=DomainContinuizer.Ignore, **kwarg...
A preprocessor that continuizes a discrete domain (and optionally normalizes it). See :obj:`Orange.data.continuization.DomainContinuizer` for list of accepted arguments.
62598edfbe383301e0251d88
class FileTOD(object): <NEW_LINE> <INDENT> __slots__ = ('flags', 'records_xfr', 'records_total', 'start', 'end', 'sid') <NEW_LINE> struct_parser = struct.Struct('!B B h h h l l q') <NEW_LINE> size = struct_parser.size <NEW_LINE> def __init__(self, flags: int, records_xfr: int, records_total: int, start: int, end: int, ...
``XrdXrootdMonFileTOD`` identifying the sender and time range :param flags: indicator for fields present :param records_xfr: number of :py:class:`FileXFR` records in the packet :param records_total: number of :py:class:`FileRecord` records in the packet :param start: timestamp of the first record :param end: timestamp...
62598edfcc0a2c11144795b3
class RandomAgent: <NEW_LINE> <INDENT> def __init__(self, max_eps): <NEW_LINE> <INDENT> self.max_q_size = 50 <NEW_LINE> self.traffic_map = Map(self.max_q_size) <NEW_LINE> self.env = self.traffic_map <NEW_LINE> self.max_episodes = max_eps <NEW_LINE> self.global_moving_average_reward = 0 <NEW_LINE> self.res_queue = Queue...
Random Agent that will control the traffic lights Arguments: max_eps: Maximum number of episodes to run agent for.
62598edf60cbc95b063628ed
class EventDetailView(DetailView): <NEW_LINE> <INDENT> model = Event
View to return information of an event.
62598edf3cc13d1c6d463d1c
class QryExchangeMarginRateAdjustField(Base): <NEW_LINE> <INDENT> _fields_ = [ ('BrokerID', ctypes.c_char * 11), ('InstrumentID', ctypes.c_char * 31), ('HedgeFlag', ctypes.c_char), ] <NEW_LINE> def __init__(self, BrokerID='', InstrumentID='', HedgeFlag=''): <NEW_LINE> <INDENT> super(QryExchangeMarginRateAdjustField, se...
查询交易所调整保证金率
62598edf21bff66bcd721204
class Acorazado(Barco): <NEW_LINE> <INDENT> default_size = 4 <NEW_LINE> tipo_e = 'AC' <NEW_LINE> congelado = models.BooleanField(editable = False, default = False) <NEW_LINE> def enfriamiento(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __unicode__(self): <NEW_LINE> <INDENT> return "Acorazado"
Clase Barco.Acorazado @Congelado = Indica si el acorazado está en su enfriamiento
62598edfcc0a2c11144795b4
class Alignment(object): <NEW_LINE> <INDENT> def __init__(self, reference, sequence): <NEW_LINE> <INDENT> self._reference = reference <NEW_LINE> self._sequence = sequence <NEW_LINE> self.alignment = None <NEW_LINE> self.correlations = {} <NEW_LINE> <DEDENT> def __call__(self): <NEW_LINE> <INDENT> if self.alignment: <NE...
A generic Alignment object. This object serves as a way to align a reference sequence and a target sequence. This will also generate the correlations between the names of positions in the reference and the target. If no names are given then we use the indexes.
62598edf4527f215b58e84b6
class Frame(ttk.Frame): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> super(Frame, self).__init__(parent, padding=8)
A tab containing the welcome screen.
62598edf2ae34c7f260a9699
@attributes(slots=True) <NEW_LINE> class Factory(object): <NEW_LINE> <INDENT> factory = attr()
Stores a factory callable. If passed as the default value to :func:`attr.ib`, the factory is used to generate a new value.
62598edf090684286d5929b8
class Solution: <NEW_LINE> <INDENT> def minMeetingRooms(self, intervals): <NEW_LINE> <INDENT> heap = [] <NEW_LINE> intervals.sort(key=lambda x:x.start) <NEW_LINE> for x in intervals: <NEW_LINE> <INDENT> if heap and heap[0][1].end <= x.start: <NEW_LINE> <INDENT> heap[0] = (x.end, x) <NEW_LINE> heapq.heapify(heap) <NEW_L...
@param intervals: an array of meeting time intervals @return: the minimum number of conference rooms required
62598edf3c8af77a43b6720b
class IABIndexParser(Publisher): <NEW_LINE> <INDENT> def __init__(self, ieee_file): <NEW_LINE> <INDENT> super(IABIndexParser, self).__init__() <NEW_LINE> if hasattr(ieee_file, 'readline') and hasattr(ieee_file, 'tell'): <NEW_LINE> <INDENT> self.fh = ieee_file <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.fh = open...
A concrete Publisher that parses IAB (Individual Address Block) records from IEEE text-based registration files It notifies registered Subscribers as each record is encountered, passing on the record's position relative to the start of the file (offset) and the size of the record (in bytes). The file processed by thi...
62598edf498bea3a75a560e9
class MultiPoint(BaseMultipartGeometry): <NEW_LINE> <INDENT> def __init__(self, points=None): <NEW_LINE> <INDENT> super(MultiPoint, self).__init__() <NEW_LINE> if points is None: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self._geom, self._ndim = geos_multipoint_from_py(points) <NEW_LINE> <D...
A collection of one or more points A MultiPoint has zero area and zero length. Attributes ---------- geoms : sequence A sequence of Points
62598edf30bbd722464681eb
class DmForwardMessageView(BaseDmView): <NEW_LINE> <INDENT> def get_queryset(self): <NEW_LINE> <INDENT> return DmMessage.objects.all() <NEW_LINE> <DEDENT> def post(self, request, *args, **kwargs): <NEW_LINE> <INDENT> return self.forward(request, *args, **kwargs) <NEW_LINE> <DEDENT> def forward(self, request, *args, **k...
Class for forwarding message.
62598edf4428ac0f6e656b04
class RandomForestRegressor: <NEW_LINE> <INDENT> def __init__(self, n_estimators=100, n_samples=-1, max_features=-1, min_samples_split=2, min_impurity_decrease=1e-7, max_depth=-1, random_state=0): <NEW_LINE> <INDENT> self.n_estimators = n_estimators <NEW_LINE> self.n_samples = n_samples <NEW_LINE> self.max_features = m...
train n_estimators regression trees. each regression tree would be trained by a subset of the whole trainset (sampling with replacement, the size of the subset is equal to the size of the trainset). while nodes of decision trees are being split, only max_features features (selected randomly) would be considered. while ...
62598edf45492302aabfaa65
class ClientAccountInstanceManager: <NEW_LINE> <INDENT> def __init__(self, instance): <NEW_LINE> <INDENT> self.instance = instance <NEW_LINE> <DEDENT> def set_cash(self, cash: float): <NEW_LINE> <INDENT> self.instance.cash += cash <NEW_LINE> self.instance.save() <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def list_is_...
Manager for client account. Make special processes with client account like business logic hear.
62598edf656771135c487c43
class AuctionBanView(View): <NEW_LINE> <INDENT> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> if not request.user.is_superuser: <NEW_LINE> <INDENT> raise Http404() <NEW_LINE> <DEDENT> auction_id = kwargs['pk'] <NEW_LINE> try: <NEW_LINE> <INDENT> obj = Item.objects.get(pk=auction_id) <NEW_LINE> <DEDENT> e...
A view that is used by admins to ban auctions.
62598edf6e29344779afebe0
class BackgroundJetScalarPtDensity(FunctionOfPseudoJetDouble): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> for _s in [FunctionOfPseudoJetDouble]: <NEW_LINE> <INDENT> __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) <NEW_LINE> <DEDENT> __setattr__ = lambda self, name, value: _swig_setattr(s...
Class that implements (scalar pt sum of jet)/(scalar area of jet) for background estimation *(this is a preliminary class)*. Optionally it can return a quantity based on the sum of pt^n, e.g. for use in subtracting fragementation function moments. C++ includes: fastjet/tools/JetMedianBackgroundEstimator.hh
62598edf097d151d1a2bf5d1
class Image: <NEW_LINE> <INDENT> def __init__(self, image: dict, *, type_: str): <NEW_LINE> <INDENT> assert type_ in ["backdrop", "poster", "logo", "profile", "still"] <NEW_LINE> self._type = type_ <NEW_LINE> self._configs_data = {} <NEW_LINE> for key in image.keys() - {"vote_average", "vote_count"}: <NEW_LINE> <INDENT...
Represents an image.
62598edf66673b3332c2e959
class RetrieveSupportedApps(RetrieveApps): <NEW_LINE> <INDENT> def __init__(self, username, customer_name, uri=None, method=None, count=30, offset=0, sort='asc', sort_key=SupportedAppsKey.Name, show_hidden=NO): <NEW_LINE> <INDENT> self.count = count <NEW_LINE> self.offset = offset <NEW_LINE> self.customer_name = custom...
This class is used to get agent data from within the Packages Page
62598edfe76e3b2f99fd6fec
class Model(_user_module.ModelMixin, Package): <NEW_LINE> <INDENT> viewpoint = EAttribute(eType=String, derived=False, changeable=True) <NEW_LINE> def __init__(self, viewpoint=None, **kwargs): <NEW_LINE> <INDENT> super(Model, self).__init__(**kwargs) <NEW_LINE> if viewpoint is not None: <NEW_LINE> <INDENT> self.viewpoi...
A model captures a view of a physical system. It is an abstraction of the physical system, with a certain purpose. This purpose determines what is to be included in the model and what is irrelevant. Thus the model completely describes those aspects of the physical system that are relevant to the purpose of the model, a...
62598edf9c8ee8231303f431
class TestFaultWrapper(test.NoDBTestCase): <NEW_LINE> <INDENT> @mock.patch('oslo.i18n.translate') <NEW_LINE> @mock.patch('nova.i18n.get_available_languages') <NEW_LINE> def test_safe_exception_translated(self, mock_languages, mock_translate): <NEW_LINE> <INDENT> def fake_translate(value, locale): <NEW_LINE> <INDENT> re...
Tests covering `nova.api.openstack:FaultWrapper` class.
62598edfd53ae8145f916a3e
class DiskElectrode(Electrode): <NEW_LINE> <INDENT> __slots__ = ('r',) <NEW_LINE> def __init__(self, x, y, z, r, name=None, activated=True): <NEW_LINE> <INDENT> super(DiskElectrode, self).__init__(x, y, z, name, activated=activated) <NEW_LINE> if isinstance(r, (Sequence, np.ndarray)): <NEW_LINE> <INDENT> raise TypeErro...
Circular disk electrode Parameters ---------- x/y/z : double 3D location of the electrode. The coordinate system is centered over the fovea. Positive ``x`` values move the electrode into the nasal retina. Positive ``y`` values move the electrode into the superior retina. Positive ``z`` values move ...
62598edfd6c5a102081e06e3
class KNXFan(KnxEntity, FanEntity): <NEW_LINE> <INDENT> def __init__(self, xknx: XKNX, config: ConfigType) -> None: <NEW_LINE> <INDENT> self._device: XknxFan <NEW_LINE> max_step = config.get(FanSchema.CONF_MAX_STEP) <NEW_LINE> super().__init__( device=XknxFan( xknx, name=config[CONF_NAME], group_address_speed=config.ge...
Representation of a KNX fan.
62598edfadb09d7d5dc08b7a
class TestNodeCLI(): <NEW_LINE> <INDENT> def __init__(self, binary, datadir): <NEW_LINE> <INDENT> self.args = [] <NEW_LINE> self.binary = binary <NEW_LINE> self.datadir = datadir <NEW_LINE> self.input = None <NEW_LINE> <DEDENT> def __call__(self, *args, input=None): <NEW_LINE> <INDENT> self.args = [str(arg) for arg in ...
Interface to alchimia-cli for an individual node
62598edf3eb6a72ae0388bf4
class GetEC2InstancesTests(unittest.TestCase): <NEW_LINE> <INDENT> def test_get_without_pages(self): <NEW_LINE> <INDENT> test_cases = [ [], [{'instance-id': 'an instance'}] ] <NEW_LINE> for instance_page in test_cases: <NEW_LINE> <INDENT> client = MockEC2Client([instance_page]) <NEW_LINE> instances = ec2_resources.get_...
Tests for the get_ec2_instances method
62598edf8c0ade5d55dc295d
class Square: <NEW_LINE> <INDENT> def __init__(self, size): <NEW_LINE> <INDENT> self.__size = size
Class with private attribute size
62598edfa219f33f346c4deb
class Telex(dict): <NEW_LINE> <INDENT> def __init__(self, data=None, other_dict={}): <NEW_LINE> <INDENT> self.update(other_dict) <NEW_LINE> if data: <NEW_LINE> <INDENT> self.update(json.loads(data)) <NEW_LINE> <DEDENT> <DEDENT> def to(self, to): <NEW_LINE> <INDENT> if isinstance(to, tuple): <NEW_LINE> <INDENT> self['_t...
TODO: Write docs for Telex
62598edf3d592f4c4edb94a7
class EventQueue: <NEW_LINE> <INDENT> def __init__(self, display: Display) -> None: <NEW_LINE> <INDENT> if display._ptr is None or display._ptr == ffi.NULL: <NEW_LINE> <INDENT> raise ValueError("Display object not connected") <NEW_LINE> <DEDENT> ptr = lib.wl_display_create_queue(display._ptr) <NEW_LINE> destructor = fu...
A queue for wl_proxy object events. Event queues allows the events on a display to be handled in a thread-safe manner. See :class:`~pywayland.client.Display` for details. :param display: The display object that the event queue is connected to. :type display: :class:`~pywayland.client.Display`
62598edf56b00c62f0fb0e83
class SamParser(object): <NEW_LINE> <INDENT> def __init__(self, handle_or_fileStr): <NEW_LINE> <INDENT> self.handle = handle_or_fileStr <NEW_LINE> <DEDENT> def _lines(self): <NEW_LINE> <INDENT> if not hasattr(self.handle, "read"): <NEW_LINE> <INDENT> handle = open(self.handle, "r") <NEW_LINE> <DEDENT> else: <NEW_LINE> ...
class to parse the segemehl SAM record from a open file handle
62598edfe5267d203ee69eb6
class ListViewTest(TestCase): <NEW_LINE> <INDENT> def test_uses_list_template(self): <NEW_LINE> <INDENT> new_list = List.objects.create() <NEW_LINE> response = self.client.get(f'/lists/{new_list.id}/') <NEW_LINE> self.assertTemplateUsed(response, 'list.html') <NEW_LINE> <DEDENT> def test_passes_correct_list_to_template...
Testing list and it's corresponding items and template.
62598edf7cff6e4e811b3fa1
class HTTPTransport(object): <NEW_LINE> <INDENT> def __init__(self, hostname, server_verification_cert=None, x509_cert=None, cipher=None): <NEW_LINE> <INDENT> self._hostname = hostname <NEW_LINE> self._server_verification_cert = server_verification_cert <NEW_LINE> self._x509_cert = x509_cert <NEW_LINE> self._cipher = c...
A wrapper class that provides an implementation-agnostic HTTP interface.
62598edf6aa9bd52df0d3461
class ConfigNoticeParser(object): <NEW_LINE> <INDENT> _SUPPORTED_MESSAGE_TYPE = [ 'ConfigurationHistoryDeliveryCompleted', 'ConfigurationSnapshotDeliveryCompleted', ] <NEW_LINE> _UNSUPPORTED_MESSAGE_TYPE = [ 'ConfigurationItemChangeNotification', 'ConfigurationSnapshotDeliveryStarted', 'ComplianceChangeNotification', '...
Wrapper class for easy accessing config dict based notifications.
62598edf1f037a2d8b9e26b9
class SingletonPipeline(object): <NEW_LINE> <INDENT> def __new__(cls, *args, **kwargs): <NEW_LINE> <INDENT> if not hasattr(cls, '_instance'): <NEW_LINE> <INDENT> cls._instance = super().__new__(cls) <NEW_LINE> print('return instance by created') <NEW_LINE> return cls._instance <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDE...
单例模式流水线基类
62598edf009cb60464cffb02
class TransScalarProductMatrix(cpp.TransScalarProductMatrix): <NEW_LINE> <INDENT> pass
The class represents a transposed matrix that is used to compute the nodewise scalar product with a given vector.
62598edf4a966d76dd5ed497
class RoofCondition(EquipmentCondition): <NEW_LINE> <INDENT> pass
Description of the roof's condition.
62598edf3539df3088eca865
class HyperlinkedModelSerializerOptions(ModelSerializerOptions): <NEW_LINE> <INDENT> def __init__(self, meta): <NEW_LINE> <INDENT> super(HyperlinkedModelSerializerOptions, self).__init__(meta) <NEW_LINE> self.view_name = getattr(meta, 'view_name', None) <NEW_LINE> self.lookup_field = getattr(meta, 'lookup_field', None)
Options for HyperlinkedModelSerializer
62598edf7d847024c075a982
class FakeSeaMicroDriver(base.BaseDriver): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> if not importutils.try_import('seamicroclient'): <NEW_LINE> <INDENT> raise exception.DriverNotFound('FakeSeaMicroDriver') <NEW_LINE> <DEDENT> self.power = seamicro.Power() <NEW_LINE> self.deploy = fake.FakeDeploy() <N...
Fake SeaMicro driver.
62598edf24f1403a92684b7e
class Library(_BaseObject): <NEW_LINE> <INDENT> user = None <NEW_LINE> __hash__ = _BaseObject.__hash__ <NEW_LINE> def __init__(self, user, network): <NEW_LINE> <INDENT> _BaseObject.__init__(self, network, "library") <NEW_LINE> if isinstance(user, User): <NEW_LINE> <INDENT> self.user = user <NEW_LINE> <DEDENT> else: <NE...
A user's Last.fm library.
62598edf16aa5153ce3feaaf
class LoggerGeneric: <NEW_LINE> <INDENT> def __init__(self, logdir=None, filename=None, write_to_file=True): <NEW_LINE> <INDENT> self.logdir = logdir <NEW_LINE> self.filename = filename <NEW_LINE> self.write_to_file = write_to_file <NEW_LINE> self.verbose = 'INFO' <NEW_LINE> self.header_space = ...
This class holds the generic logger. From this logger, the loggers for all the following phases will be built
62598edf92d797404e387e55
class DviFont(object): <NEW_LINE> <INDENT> __slots__ = ('texname', 'size', 'widths', '_scale', '_vf', '_tfm') <NEW_LINE> def __init__(self, scale, tfm, texname, vf): <NEW_LINE> <INDENT> if sys.version_info[0] >= 3 and isinstance(texname, bytes): <NEW_LINE> <INDENT> texname = texname.decode('ascii') <NEW_LINE> <DEDENT> ...
Object that holds a font's texname and size, supports comparison, and knows the widths of glyphs in the same units as the AFM file. There are also internal attributes (for use by dviread.py) that are *not* used for comparison. The size is in Adobe points (converted from TeX points). .. attribute:: texname Name of...
62598edf4527f215b58e84b8
@deprecated('flow.scenarios.base', 'flow.networks.base.Network') <NEW_LINE> class Scenario(Network): <NEW_LINE> <INDENT> pass
See parent class.
62598edfa79ad161977685d0
class ObjectLinkWidget(forms.Widget): <NEW_LINE> <INDENT> def render(self, name, value, attrs=None): <NEW_LINE> <INDENT> if not value: <NEW_LINE> <INDENT> return '' <NEW_LINE> <DEDENT> hidden = forms.HiddenInput(attrs) <NEW_LINE> mf_object = MfSystemObject.objects.get(pk=value) <NEW_LINE> if mf_object.created_class == ...
Виджет отображения ссылки на редактирование
62598edfcb5e8a47e493b453
class TextNodeType(NodeType): <NEW_LINE> <INDENT> def __init__(self, tag, **kwargs): <NEW_LINE> <INDENT> NodeType.__init__(self, tag, **kwargs) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return 'TextNodeType("%s")' % self.tag <NEW_LINE> <DEDENT> def Unmarshall(self, node): <NEW_LINE> <INDENT> return nod...
A type for simple nodes that just have a tag and some text content. Unmarshalls nodes to strings. Args: tag: The name of XML tag for this type of node.
62598edf7d847024c075a983
class _Symbols(nimp.command.Command): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(_Symbols, self).__init__() <NEW_LINE> <DEDENT> def configure_arguments(self, env, parser): <NEW_LINE> <INDENT> nimp.command.add_common_arguments(parser, 'platform', 'target', 'revision') <NEW_LINE> parser.add_argumen...
Uploads build symbols (and binaries!) to a symbol server
62598edf67a9b606de544582
class GeometryVid(GeometryMixin, NewVid): <NEW_LINE> <INDENT> pass
Vid which contains methods for distance and position
62598edf379a373c97d975ae
class Command(Job): <NEW_LINE> <INDENT> def __init__(self, executable, args): <NEW_LINE> <INDENT> assert Util.all_true(args, lambda x: isinstance(x, str)) <NEW_LINE> self.executable = executable <NEW_LINE> self.args = args <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return Util.prefixAndPPrint(self.__cl...
Command - Represent the information needed to execute a single process. This currently assumes that the executable will always be the first argument.
62598edf1f5feb6acb161205
class BooleanEditorDemo ( HasFacets ): <NEW_LINE> <INDENT> boolean_facet = Bool <NEW_LINE> bool_group = Group( Item( 'boolean_facet', style = 'simple', label = 'Simple' ), Item( '_' ), Item( 'boolean_facet', style = 'custom', label = 'Custom' ), Item( '_' ), Item( 'boolean_facet', style = 'text', label = 'Text'...
Defines the main BooleanEditor demo class.
62598edf5fdd1c0f98e5c562
class Errors(Exception): <NEW_LINE> <INDENT> pass
Base class for exceptions in this module.
62598edf99fddb7c1ca620e0
class Literal(Expression): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> super(Literal, self).__init__(value) <NEW_LINE> self.value = value <NEW_LINE> self.validate() <NEW_LINE> <DEDENT> def validate(self): <NEW_LINE> <INDENT> if self.value is None or self.value is True or self.value is False: <NEW...
A literal, such as a boolean value, null, or a fixed string value. We have to be extra careful with string literals -- for ease of escaping, we use json.dumps() to represent strings. However, we must then manually escape '$' characters as they trigger string interpolation in Groovy/Gremlin. http://docs.groovy-lang...
62598edf30bbd722464681ed
class UserTotalScoreForm(messages.Message): <NEW_LINE> <INDENT> user_name = messages.StringField(1, required=True) <NEW_LINE> total_score = messages.IntegerField(2, required=True)
It will list username, the total scores of all the played games
62598edf8e7ae83300ee7644
class VersionKey(object): <NEW_LINE> <INDENT> def __init__(self, vstring): <NEW_LINE> <INDENT> self.vstring = vstring <NEW_LINE> self.vlist = re.findall("([0-9]+|[a-zA-Z]+)", vstring) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "%s ('%s')" % (self.__class__.__name__, self.vstring) <NEW_LINE> <DED...
Sorting key of a version string
62598edf9b70327d1c57d36f
class CIFAR10(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.name = 'cifar10' <NEW_LINE> self.n_classes = 10 <NEW_LINE> self.n_test = 10000 <NEW_LINE> self.n_train = 50000 <NEW_LINE> self.img_shape = (3, 32, 32) <NEW_LINE> self.data_dir = os.path.join(dataset_home, self.name) <NEW_LINE> self....
The CIFAR-10 dataset [1] http://www.cs.toronto.edu/~kriz/cifar.html References: [1]: Learning Multiple Layers of Features from Tiny Images, Alex Krizhevsky, 2009.
62598edfa8370b77170ee9a4
class FreeSearchForm(FilterForm): <NEW_LINE> <INDENT> searchx = forms.CharField(max_length=100, required=False, label="Free-form search", help_text="Use 'or' to search for multiple names") <NEW_LINE> def filter(self, request, queryset): <NEW_LINE> <INDENT> searchx = self.cleaned_data['searchx'].strip() <NEW_LINE> if se...
concrete implementation of filter form TO DO: add ability to search for multiple search terms separated by 'or'
62598edf0a50d4780f70395e
class Correction(object): <NEW_LINE> <INDENT> __metaclass__ = abc.ABCMeta <NEW_LINE> @abc.abstractmethod <NEW_LINE> def correct_entry(self, entry): <NEW_LINE> <INDENT> return
A Correction class is a pre-defined scheme for correction a computed entry based on the type and chemistry of the structure and the calculation parameters. All Correction classes must implement a correct_entry method.
62598edfc432627299fa156b
class Cluster(ABC): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def allocate_nodes(self, nodes: int = 1, cores: int = 1, memory_per_node: Union[str, bitmath.Byte] = None, walltime: Union[str, Walltime] = None, native_args: Optional[Dict[str, Optional[ str]]] = None) -> Nodes: <NEW_LINE> <INDENT> pass <NEW_LINE> <DED...
Remote cluster interface.
62598edfe5267d203ee69eb8
class Node: <NEW_LINE> <INDENT> def __init__(self, key, data=None): <NEW_LINE> <INDENT> self.key = key <NEW_LINE> self.data = data <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return str(self.key) <NEW_LINE> <DEDENT> def __gt__(self, node): <NEW_LINE> <INDENT> if self.key > node: <NEW_LINE> <INDENT> retur...
represents a node in a tree
62598edf4428ac0f6e656b07
class Node(Base): <NEW_LINE> <INDENT> __slots__ = ('node_tag', 'ast_node') <NEW_LINE> def _init(self, details, parent=None, name=None): <NEW_LINE> <INDENT> if not isinstance(details, ast.Node): <NEW_LINE> <INDENT> raise ValueError("Unexpected value for 'details', must be a ast.Node") <NEW_LINE> <DEDENT> super()._init(p...
Represent a single entry in a *parse tree*. :type details: :class:`.ast.Node` :param details: the *parse tree* of the node :type parent: ``None`` or :class:`Node` instance :param parent: ``None`` to indicate that the node is the *root* of the parse tree, otherwise it is the immediate parent of the new n...
62598edf236d856c2adc86ee
class ModelParameters: <NEW_LINE> <INDENT> def __init__(self, family, noise_var, data_seed=None): <NEW_LINE> <INDENT> if data_seed == None: <NEW_LINE> <INDENT> data_seed = np.random.rand() <NEW_LINE> <DEDENT> self.cov_func, self.ml_grad, self.noise_var, self.data_seed = add_noise(family.covariance_function, ...
class, containing the hyper-parameters of the model prior distribution
62598edff7d966606f7465a6
class Encounter(domainresource.DomainResource): <NEW_LINE> <INDENT> resource_name = "Encounter" <NEW_LINE> def __init__(self, jsondict=None): <NEW_LINE> <INDENT> self.appointment = None <NEW_LINE> self.class_fhir = None <NEW_LINE> self.episodeOfCare = None <NEW_LINE> self.hospitalization = None <NEW_LINE> self.identifi...
An interaction during which services are provided to the patient. An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.
62598edf2c8b7c6e89bd1d75
@unique <NEW_LINE> class ActionTypes(str, Enum): <NEW_LINE> <INDENT> conv_create = 'conv:create' <NEW_LINE> conv_publish = 'conv:publish' <NEW_LINE> subject_modify = 'subject:modify' <NEW_LINE> subject_lock = 'subject:lock' <NEW_LINE> subject_release = 'subject:release' <NEW_LINE> seen = 'seen' <NEW_LINE> expiry_modify...
Action types (component and verb), used for both urls and in db ENUM see models.sql
62598edf57b8e32f525073e1
class SineData(torch.utils.data.Dataset): <NEW_LINE> <INDENT> def __init__(self, amplitude_range=(-1., 1.), shift_range=(-.5, .5), num_samples=1000, num_points=100): <NEW_LINE> <INDENT> self.amplitude_range = amplitude_range <NEW_LINE> self.shift_range = shift_range <NEW_LINE> self.num_samples = num_samples <NEW_LINE> ...
Dataset of functions f(x) = a * sin(x - b) where a and b are randomly sampled. The function is evaluated from -pi to pi. Parameters ---------- amplitude_range : tuple of float Defines the range from which the amplitude (i.e. a) of the sine function is sampled. shift_range : tuple of float Defines the rang...
62598edfa79ad161977685d2
class XegerPattern(object): <NEW_LINE> <INDENT> def __init__(self, regex, max_random=10): <NEW_LINE> <INDENT> self._max_random = max_random <NEW_LINE> self._parse_expressions(regex) <NEW_LINE> <DEDENT> def _parse_expressions(self, regex): <NEW_LINE> <INDENT> self._expressions = [] <NEW_LINE> regex_list = list(regex) <N...
Parses a given pattern into a list of XegerExpressions This generates a list of top-level expressions that can be used to generate the contents of a file.
62598edf7d847024c075a985
class TraderConfig: <NEW_LINE> <INDENT> symbol: str = "mock" <NEW_LINE> feeder_type: str = MarketDataFeederType.MOCK_DATA <NEW_LINE> env: str = "test" <NEW_LINE> market_data_pull_interval_sec: int = 5 <NEW_LINE> market_data_interval: str = "1min" <NEW_LINE> trader_address: str = "localhost" <NEW_LINE> startdate_days_ag...
needs to be merged with trader class or maybe become part of the trader class configures how data will be pulled and what kind of data will be used
62598edf8e71fb1e983ba027
class AddressView(LoginRequiredMixin): <NEW_LINE> <INDENT> def get(self, request): <NEW_LINE> <INDENT> user = request.user <NEW_LINE> address = Address.objects.get_default_address(user) <NEW_LINE> return render(request, 'user_center_site.html', {'page': 'address', 'address': address}) <NEW_LINE> <DEDENT> def post(self,...
用户中心-信息页
62598edf45492302aabfaa69
class SchemaXImage: <NEW_LINE> <INDENT> def __init__(self, dictionary, default): <NEW_LINE> <INDENT> self._split_by_colon = None <NEW_LINE> self._split_to_registry_repo_tag = None <NEW_LINE> if not default: <NEW_LINE> <INDENT> raise InvalidSchema('default image value must be specified') <NEW_LINE> <DEDENT> if not defau...
Accesses IMAGE and DEPLOYER_IMAGE properties.
62598edf2eb69b55b15a0664
class HomematicipBaseActionSensor(HomematicipGenericEntity, BinarySensorEntity): <NEW_LINE> <INDENT> @property <NEW_LINE> def device_class(self) -> str: <NEW_LINE> <INDENT> return DEVICE_CLASS_MOVING <NEW_LINE> <DEDENT> @property <NEW_LINE> def is_on(self) -> bool: <NEW_LINE> <INDENT> return self._device.accelerationSe...
Representation of the HomematicIP base action sensor.
62598edf55399d3f05624ae6
class Plugin(PluginBase): <NEW_LINE> <INDENT> def after_load(self): <NEW_LINE> <INDENT> conn = Connection(settings.RABBTMQ_DSN) <NEW_LINE> worker = Worker(conn) <NEW_LINE> self._worker_thread = Thread(target=worker.run) <NEW_LINE> self._worker_thread.daemon = True <NEW_LINE> self._worker_thread.start()
This plugin connects to the camera and captures one image per second. The raw image will be sent to the master RabbitMQ.
62598edf498bea3a75a560ed
class ListCardsDocument(BaseDocument): <NEW_LINE> <INDENT> __collection__ = "listCards" <NEW_LINE> __lazy__ = False <NEW_LINE> title = StringField(required=True) <NEW_LINE> position = IntField(required=True) <NEW_LINE> board = ReferenceField(BoardDocument) <NEW_LINE> async def check_permission(self, document_user: User...
Список с карточками. :type title: str Заголовок списка; :type cards: list Набор карточек актуальных для списка; :type position: int Порядковый номер позиции в ряде списков;
62598edfd6c5a102081e06e7
class TwoNPort(NPortBase): <NEW_LINE> <INDENT> matrix_cls = TwoNPortMatrix <NEW_LINE> def __new__(cls, freqs, matrices, type, z0=None): <NEW_LINE> <INDENT> matrices = np.asarray(matrices, dtype=complex) <NEW_LINE> obj = NPortBase.__new__(cls, freqs, matrices, type, z0) <NEW_LINE> if len(obj[0].shape) != 4: <NEW_LINE> <...
Class representing a 2n-port across a list of frequencies :param matrices: list of matrix elements :type matrix: list of 2 by 2 arrays in which each element is an *n* by *n* array :param type: matrix type :type type: :data:`Z`, :data:`Y`, :data:`S`, :data:`T` or :data:`ABCD` :param z0: normalizing impeda...
62598edf4f6381625f198798
class ChecksViewTest(ViewTestCase): <NEW_LINE> <INDENT> def test_browse(self): <NEW_LINE> <INDENT> response = self.client.get(reverse('checks')) <NEW_LINE> self.assertContains(response, '/same/') <NEW_LINE> response = self.client.get( reverse('show_check', kwargs={'name': 'same'}) ) <NEW_LINE> self.assertContains(respo...
Testing of check views.
62598edf7cff6e4e811b3fa4
class ToArray: <NEW_LINE> <INDENT> def fit(self, X, params=None): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def transform(self, X): <NEW_LINE> <INDENT> ans = X['sparse'] <NEW_LINE> for name in X['dense']: <NEW_LINE> <INDENT> m2 = coo_matrix(np.array(X['dense'].loc[:,name]).reshape(ans.shape[0], -1)) <NEW_LINE...
converts dense feature matrix to sparse and stacks them together
62598edfbd1bec0571e143a7