code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class Driver(VISA_Driver): <NEW_LINE> <INDENT> def performOpen(self, options={}): <NEW_LINE> <INDENT> VISA_Driver.performOpen(self, options=options) <NEW_LINE> self.detectedOptions = self.getOptions() <NEW_LINE> <DEDENT> def performGetValue(self, quant, options={}): <NEW_LINE> <INDENT> if quant.name in ('Bx', 'By', 'Bz...
This class implements the Oxford Mercury iPS driver
62598f64a4f1c619b294dc8f
class Search(models.Model): <NEW_LINE> <INDENT> search = models.CharField(max_length=500) <NEW_LINE> created = models.DateTimeField(auto_now=True) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return '{}'.format(self.search) <NEW_LINE> <DEDENT> class Meta: <NEW_LINE> <INDENT> verbose_name_plural ='Searches'
search app
62598f64d10714528d69d568
class DSX: <NEW_LINE> <INDENT> def __init__(self, options): <NEW_LINE> <INDENT> self._options = options <NEW_LINE> <DEDENT> def _before_solution(self, problem): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def _after_iteration(self, problem, x, f, c): <NEW_LINE> <INDENT> raise NotImplementedError <...
Design space exploration block.
62598f6463f4b57ef00858bd
class ExampleClass: <NEW_LINE> <INDENT> def __init__(self, param1, param2, param3): <NEW_LINE> <INDENT> self.attr1 = param1 <NEW_LINE> self.attr2 = param2 <NEW_LINE> self.attr3 = param3 <NEW_LINE> self.attr4 = ["attr4"] <NEW_LINE> self.attr5 = None <NEW_LINE> <DEDENT> @property <NEW_LINE> def readonly_property(self): <...
The summary line for a class docstring should fit on one line. If the class has public attributes, they may be documented here in an ``Attributes`` section and follow the same formatting as a function's ``Args`` section. Alternatively, attributes may be documented inline with the attribute's declaration (see __init__ ...
62598f64796e427e5384de2f
class DeserializationError(Error): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return "Deserialization error: {0}".format( super(DeserializationError, self).__str__())
JSON deserialization error.
62598f647c178a314d78cb3b
class BaseBox(object): <NEW_LINE> <INDENT> def __init__(self, characteristic): <NEW_LINE> <INDENT> self._characteristic = characteristic <NEW_LINE> self.exclude_unknown = set() <NEW_LINE> self.index = defaultdict(self.exclude_unknown.copy) <NEW_LINE> <DEDENT> def add(self, indexed_object): <NEW_LINE> <INDENT> raise Not...
BaseBox is base class for constructing Box encapsulating code.
62598f6430c21e258be97e9a
class SolveProblemTests(TestCase): <NEW_LINE> <INDENT> def test_standard_inputs(self): <NEW_LINE> <INDENT> standard_inputs = [ { "DM_capacity": 20, "DE_capacity": 8, "data_centers": [ {"name": "Paris", "servers": 20}, {"name": "Stockholm", "servers": 62} ] }, { "DM_capacity": 6, "DE_capacity": 10, "data_centers": [ {"n...
Tests the solve_problem function from views with standard inputs and outputs. Verifies the logic.
62598f640383005118f6cda6
class Session(Model): <NEW_LINE> <INDENT> def __init__(self, id: str=None, creation_date: str=None, expiration_date: str=None, account_id: str=None, endpoint_id: str=None, role: str=None): <NEW_LINE> <INDENT> self.swagger_types = { 'id': str, 'creation_date': str, 'expiration_date': str, 'account_id': str, 'endpoint_id...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f641d351010ab8f31e0
class FakeResponse: <NEW_LINE> <INDENT> def __init__(self, body): <NEW_LINE> <INDENT> self.body = body <NEW_LINE> self.first_read = True <NEW_LINE> <DEDENT> def read(self, bytes=1024): <NEW_LINE> <INDENT> if self.first_read: <NEW_LINE> <INDENT> result = self.body <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> result = b...
Object meant to simulate a Response object as returned by urllib.open
62598f643eb6a72ae0389cde
class SkipList(object): <NEW_LINE> <INDENT> MAX_LEVEL = 50 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> random.seed(43) <NEW_LINE> self._size = 0 <NEW_LINE> self._head = Node(-np.inf, None) <NEW_LINE> self._tail = Node(np.inf, None) <NEW_LINE> self._level = 1 <NEW_LINE> <DEDENT> def search(self, key): <NEW_LINE> ...
Unlike the paper the levels are 0 indexed. MAX_LEVEL chosen for this implementation is 50, which means this data structure can contain up to 2^50 elements. In general, since MAX_LEVEL is the number of expected nodes at that level, the data structure expects on average (1/p)^MAX_LEVEL number of elements
62598f6421a7993f00c65616
class JSTemplateFilter(Filter): <NEW_LINE> <INDENT> def setup(self): <NEW_LINE> <INDENT> super(JSTemplateFilter, self).setup() <NEW_LINE> self.templates = [] <NEW_LINE> <DEDENT> def _find_base_path(self, paths): <NEW_LINE> <INDENT> if len(paths) == 1: <NEW_LINE> <INDENT> return os.path.dirname(paths[0]) <NEW_LINE> <DED...
Common base class for the JST and Handlebars filters, and possibly other Javascript templating systems in the future.
62598f64925a0f43d25e76d5
class TestTotalNumRequestsAfterReload(RequestPolicyTestCase): <NEW_LINE> <INDENT> TEST_URL = "http://www.maindomain.test/img_1.html" <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> super(TestTotalNumRequestsAfterReload, self).setUp() <NEW_LINE> self.locationbar = self.browser.navbar.locationbar <NEW_LINE> <DEDENT> def ...
Reloading a Tab should reset the request counter.
62598f649b70327d1c57e444
class WileyAccessRule(AccessRule): <NEW_LINE> <INDENT> def __call__(self, text, qtext): <NEW_LINE> <INDENT> return not bool(qtext('div.section'))
Custom black-list rule for Wiley HTML documents.
62598f64507cdc57c63a443a
@compat.python_2_unicode_compatible <NEW_LINE> class CrossValidationProbDist( ProbDistI ): <NEW_LINE> <INDENT> SUM_TO_ONE = False <NEW_LINE> def __init__( self, freqdists, bins, **kwargs ): <NEW_LINE> <INDENT> self._freqdists = freqdists <NEW_LINE> self._heldout_probdists = [ ] <NEW_LINE> for fdist1 in freqdists: <NEW_...
The cross-validation estimate for the probability distribution of the experiment used to generate a set of frequency distribution. The "cross-validation estimate" for the probability of a sample is found by averaging the held-out estimates for the sample in each pair of frequency distributions.
62598f648c3a8732951f5bef
class Future(async_old.Future): <NEW_LINE> <INDENT> def __iter__(self): <NEW_LINE> <INDENT> while not self.done(): <NEW_LINE> <INDENT> self._blocking = True <NEW_LINE> yield self <NEW_LINE> <DEDENT> if self.cancelled(): <NEW_LINE> <INDENT> raise errors.RuntimeError("Future canceled") <NEW_LINE> <DEDENT> if self.excepti...
Specialized Future class that supports the async/await syntax to be used in a future, so that it becomes compliant with the basic Python asyncio strategy for futures. Using this future it should be possible to ``await Future()` for a simpler usage.
62598f64bf627c535bcb0b1e
class Linear1D(Fittable1DModel): <NEW_LINE> <INDENT> slope = Parameter(default=1) <NEW_LINE> intercept = Parameter(default=0) <NEW_LINE> linear = True <NEW_LINE> @staticmethod <NEW_LINE> def evaluate(x, slope, intercept): <NEW_LINE> <INDENT> return slope * x + intercept <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def ...
One dimensional Line model. Parameters ---------- slope : float Slope of the straight line intercept : float Intercept of the straight line See Also -------- Const1D Notes ----- Model formula: .. math:: f(x) = a x + b
62598f64287bf620b6271259
class TestSetup(unittest.TestCase): <NEW_LINE> <INDENT> layer = CPSKIN_DEMO_INTEGRATION_TESTING <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.portal = self.layer['portal'] <NEW_LINE> self.installer = api.portal.get_tool('portal_quickinstaller') <NEW_LINE> <DEDENT> def test_product_installed(self): <NEW_LINE> <IN...
Test that cpskin.demo is properly installed.
62598f641f037a2d8b9e378f
class SchoolMember: <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> age_description = 'minor' <NEW_LINE> def __init__(self, name, age): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.age = age <NEW_LINE> <DEDENT> def detail(self): <NEW_LINE> <INDENT> return 'Member Type: {}'.format(self.member_type()), 'Na...
Represents any school member.
62598f6476d4e153a661c2b3
class CodeEditor(QtWidgets.QPlainTextEdit): <NEW_LINE> <INDENT> def __init__(self, show_line_numbers, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self.show_line_numbers = show_line_numbers <NEW_LINE> self.line_number_area = LineNumberArea(self) <NEW_LINE> self.blockCountChanged.co...
Translated from https://doc.qt.io/qt-5/qtwidgets-widgets-codeeditor-example.html
62598f645e10d32532ce3438
class SoftmaxLayer(nn.Module): <NEW_LINE> <INDENT> def __init__(self, num_classes): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.num_classes = num_classes <NEW_LINE> self.log_softmax = nn.LogSoftmax(dim=1) <NEW_LINE> self.nll_loss = nn.NLLLoss() <NEW_LINE> <DEDENT> def forward(self, x, targets=None): <NEW_LIN...
Classification layer. Input x is the linear output, then passed into LogSoftmax and finally NLLLoss.
62598f640383005118f6cda8
class LearningAgent(Agent): <NEW_LINE> <INDENT> def __init__(self, env, learning=False, epsilon=1.0, alpha=0.5): <NEW_LINE> <INDENT> super(LearningAgent, self).__init__(env) <NEW_LINE> self.planner = RoutePlanner(self.env, self) <NEW_LINE> self.valid_actions = self.env.valid_actions <NEW_LINE> self.learning = learning ...
An agent that learns to drive in the Smartcab world. This is the object you will be modifying.
62598f64be8e80087fbbe6f9
class Neg(UnOp): <NEW_LINE> <INDENT> def __init__(self, left: Expr): <NEW_LINE> <INDENT> super().__init__(left) <NEW_LINE> self.opsym = "~" <NEW_LINE> <DEDENT> def _apply(self, left: int) -> int: <NEW_LINE> <INDENT> return 0 - left <NEW_LINE> <DEDENT> def gen(self, context: Context, target: str) -> str: <NEW_LINE> <IND...
~left
62598f6466673b3332c2fa5b
class VelocityCanvas(BaseHistogramCanvas): <NEW_LINE> <INDENT> def __init__(self, parent, logger, binning=(0., 30, 25)): <NEW_LINE> <INDENT> BaseHistogramCanvas.__init__( self, parent, logger, np.linspace(binning[0], binning[1], binning[2]), xmin=0., xmax=30, ymin=0, ymax=2, ylabel="Events", xlabel="Flight Time (ns)") ...
A simple histogram for the use with mu velocity measurement :param parent: parent widget :param logger: logger object :type logger: logging.Logger :param binning: the binning to use for this canvas :type binning: list or tuple or numpy.ndarray
62598f649b70327d1c57e446
class BarsInPeriodProvider(object): <NEW_LINE> <INDENT> def __init__(self, influxdb_cache: InfluxDBOHLCRequest, bgn_prd: datetime.datetime, delta: relativedelta, symbol: typing.Union[list, str] = None, ascend: bool = True, overlap: relativedelta = None): <NEW_LINE> <INDENT> self._periods = slice_periods(bgn_prd=bgn_prd...
OHLCV Bars in period provider
62598f64ac7a0e7691f71bb1
class HTTPServiceUnavailable(ClientException): <NEW_LINE> <INDENT> http_status = 503 <NEW_LINE> message = "Service Unavailable"
HTTP 503 - The server is currently unavailable
62598f64d18da76e235b6c86
class Session(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def serialize(obj): <NEW_LINE> <INDENT> return pickle.dumps(obj) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def deserialize(data): <NEW_LINE> <INDENT> return pickle.loads(data)
High-level session
62598f640383005118f6cdaa
class UserManager(BaseUserManager): <NEW_LINE> <INDENT> use_in_migrations = True <NEW_LINE> def _create_user(self, username, password, **extra_fields): <NEW_LINE> <INDENT> user = self.model(username=username, **extra_fields) <NEW_LINE> user.set_password(password) <NEW_LINE> user.save(using=self._db) <NEW_LINE> return u...
用户管理者
62598f643eb6a72ae0389ce2
class Tag(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=255) <NEW_LINE> user = models.ForeignKey( settings.AUTH_USER_MODEL, on_delete=models.CASCADE, ) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.name
Tag to be used for a recipe
62598f64d10714528d69d56e
class SNACExchanger(component): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(SNACExchanger, self).__init__() <NEW_LINE> debugSections = {"SNACExchanger.recvSnac" : 0, "SNACExchanger.sendSnac" : 0, } <NEW_LINE> self.debugger.addDebug(**debugSections) <NEW_LINE> <DEDENT> def sendSnac(self, fam, sub, ...
SNACExchanger() -> component that has methods specialized for sending and receiving FLAPs over Channel 2 (FLAPs whose payloads are SNACs). For a more thorough discussion on SNACs, see module level docs.
62598f647c178a314d78cb41
class ReactTemplate(object): <NEW_LINE> <INDENT> def __init__(self, template, template_args, path): <NEW_LINE> <INDENT> self.template = template <NEW_LINE> self.args = template_args <NEW_LINE> self.path = path <NEW_LINE> <DEDENT> def write_to_file(self, s): <NEW_LINE> <INDENT> f = open(self.path, 'w') <NEW_LINE> f.writ...
Base React class. This class handles the basic transformation of the React jsx code. It takes a dictionary of options, renders the template, and writes the transformed javascript file. Args: template (str): jinja2 template for the react jsx code. template_args (dict): options to be populated in the template. ...
62598f640383005118f6cdac
class Admin(models.Model): <NEW_LINE> <INDENT> id = models.AutoField(primary_key=True) <NEW_LINE> hospitalID = models.ForeignKey('Hospital', to_field='id') <NEW_LINE> personID = models.ForeignKey('Person', to_field='id')
@class: Admin @description: Admin role for application, has high level permissions @Primary Key: Id, auto-generated. @Relationships: - hospitalID - the Admin works at a Hospital - personID - Admin is a Person
62598f64be8e80087fbbe6fd
class FullTimeContactManager(ContactManager): <NEW_LINE> <INDENT> def __init__(self, sim, uids, layer): <NEW_LINE> <INDENT> super().__init__(uids, layer) <NEW_LINE> self.schedule = { 'Monday': 'all', 'Tuesday': 'all', 'Wednesday': 'all', 'Thursday': 'all', 'Friday': 'all', 'Saturday': 'weekend', 'Sunday': ...
Contact manager for regular 5-day-per-week school
62598f64a4f1c619b294dc97
class DataWarehouseUserActivities(ProxyResource): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'active_queries_count': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, ...
User activities of a data warehouse. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceNa...
62598f64507cdc57c63a4440
class FixedProbabilityConnector(MapConnector): <NEW_LINE> <INDENT> parameter_names = ('allow_self_connections', 'p_connect') <NEW_LINE> def __init__(self, p_connect, allow_self_connections=True, rng=None, safe=True, callback=None): <NEW_LINE> <INDENT> Connector.__init__(self, safe, callback) <NEW_LINE> assert isinstanc...
For each pair of pre-post cells, the connection probability is constant. Takes any of the standard :class:`Connector` optional arguments and, in addition: `p_connect`: a float between zero and one. Each potential connection is created with this probability. `allow_self_connections`: if...
62598f64c432627299fa2676
class DirectedWeightedGraph(DirectedGraph): <NEW_LINE> <INDENT> def __init__(self, size): <NEW_LINE> <INDENT> super(DirectedWeightedGraph, self).__init__(size) <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> if isinstance(other, DirectedWeightedGraph): <NEW_LINE> <INDENT> return self.is_equal(other) <N...
The interface of a directed weighted graph data structure.
62598f648c3a8732951f5bf5
class FakeDns(object): <NEW_LINE> <INDENT> _FAKE_DNS_PATH = constants.TEST_EXECUTABLE_DIR + '/fake_dns' <NEW_LINE> def __init__(self, adb): <NEW_LINE> <INDENT> self._adb = adb <NEW_LINE> self._fake_dns = None <NEW_LINE> self._original_dns = None <NEW_LINE> <DEDENT> def _PushAndStartFakeDns(self): <NEW_LINE> <INDENT> se...
Wrapper class for the fake_dns tool.
62598f64ff9c53063f519cf7
class ImportDataStore(Link): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> Link.__init__(self, kwargs.pop('name', 'ImportDataStore')) <NEW_LINE> self._process_kwargs(kwargs, path='', update=False, import_at_initialize=True) <NEW_LINE> self.check_extra_kwargs(kwargs) <NEW_LINE> <DEDENT> def initi...
Link to import datastore from external pickle file. Import can happen at initialize() or execute(). Default is initialize()
62598f64a8ecb033258708a9
class NonmarkType(Base, TableTop): <NEW_LINE> <INDENT> __tablename__ = 'nonmark_type' <NEW_LINE> NonmarkTypeIndex = Column(Integer, nullable=False, primary_key=True) <NEW_LINE> NonmarkTypeName = Column('NonmarkType', Unicode(50), nullable=False) <NEW_LINE> DepartmentIndex = Column(Integer, ForeignKey('department.Depart...
This class contains an auto-incrementing primary key, a mandatory description, and an optional applicable department
62598f64d10714528d69d571
class InstructionsContainer(InstructionBase): <NEW_LINE> <INDENT> def __init__(self, element, dag): <NEW_LINE> <INDENT> InstructionBase.__init__(self, element) <NEW_LINE> self.instructions = [] <NEW_LINE> for item in list(element): <NEW_LINE> <INDENT> instruction = _get_element_from_xml(item, dag) <NEW_LINE> self.instr...
Base class for container type instructions: seq or par
62598f6463f4b57ef00858c2
class NodeVisitor(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def visit(self, node): <NEW_LINE> <INDENT> method_name = "visit_" + type(node).__name__ <NEW_LINE> visit_method = getattr(self, method_name, self.no_visit) <NEW_LINE> return visit_method(node) <NEW_LINE> <DED...
Implement the Visitor pattern for the interpreter
62598f648c3a8732951f5bf7
class BasicImpl(object): <NEW_LINE> <INDENT> idx_arr_type = int <NEW_LINE> @staticmethod <NEW_LINE> def world_comm(): <NEW_LINE> <INDENT> return FakeComm() <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def create_src_vecwrapper(sysdata, probdata, comm): <NEW_LINE> <INDENT> return SrcVecWrapper(sysdata, probdata, comm) <...
Basic vector and data transfer implementation factory.
62598f6426238365f5fac21c
class Discriminator(nn.Module): <NEW_LINE> <INDENT> def __init__(self, z_dim): <NEW_LINE> <INDENT> super(Discriminator, self).__init__() <NEW_LINE> self.z_dim = z_dim <NEW_LINE> self.net = nn.Sequential( nn.Linear(z_dim, 1000), nn.LeakyReLU(0.2, True), nn.Linear(1000, 1000), nn.LeakyReLU(0.2, True), nn.Linear(1000, 10...
returns (n x 2): Let D1 = 1st column, D2 = 2nd column, then the meaning is D(z) (\in [0,1]) = exp(D1) / ( exp(D1) + exp(D2) ) so, it follows: log( D(z) / (1-D(z)) ) = D1 - D2
62598f64ff9c53063f519cf9
class LeadEnrichmentApi(object): <NEW_LINE> <INDENT> def __init__(self, api_client=None): <NEW_LINE> <INDENT> if api_client is None: <NEW_LINE> <INDENT> api_client = ApiClient() <NEW_LINE> <DEDENT> self.api_client = api_client <NEW_LINE> <DEDENT> def lead_enrichment_enrich_lead(self, request, **kwargs): <NEW_LINE> <IND...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen
62598f6421a7993f00c65620
class TopologicalSort: <NEW_LINE> <INDENT> def __init__(self, G): <NEW_LINE> <INDENT> self.G = G <NEW_LINE> self.current_label = G.num_vertices() <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> self.dfs_loop() <NEW_LINE> <DEDENT> def dfs_loop(self): <NEW_LINE> <INDENT> for v in self.G.vertices(): <NEW_LINE> <IND...
Methods for creating a topological ordering of given DAG G Assumes for now that G is in fact acyclic (no checks on this)
62598f643eb6a72ae0389ce8
class SendMessageRecordVideoAction(TLObject): <NEW_LINE> <INDENT> __slots__: List[str] = [] <NEW_LINE> ID = 0xa187d66f <NEW_LINE> QUALNAME = "types.SendMessageRecordVideoAction" <NEW_LINE> def __init__(self) -> None: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read(data: BytesIO, *args: An...
This object is a constructor of the base type :obj:`~pyrogram.raw.base.SendMessageAction`. Details: - Layer: ``122`` - ID: ``0xa187d66f`` **No parameters required.**
62598f648c3a8732951f5bf9
class ReplayMemory(object): <NEW_LINE> <INDENT> def __init__(self, capacity): <NEW_LINE> <INDENT> self.capacity = capacity <NEW_LINE> self.memory = [] <NEW_LINE> self.position = 0 <NEW_LINE> self.freq = {} <NEW_LINE> <DEDENT> def _push_one(self, state, action, reward, next_state=None, done=None): <NEW_LINE> <INDENT> if...
Replay memory buffer
62598f6473bcbd0ca4bc98fb
class Receive(Task): <NEW_LINE> <INDENT> def __init__(self, name="STDOUT", numlines=1): <NEW_LINE> <INDENT> super(Receive, self).__init__() <NEW_LINE> self.name = name <NEW_LINE> self.numlines = numlines <NEW_LINE> <DEDENT> def run(self, env): <NEW_LINE> <INDENT> if "SOCKET" not in env: <NEW_LINE> <INDENT> logging.erro...
Receives a message over sockets.
62598f64d18da76e235b6c8a
class MessageChatJoinByLink(Object): <NEW_LINE> <INDENT> ID = "messageChatJoinByLink" <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read(q: dict, *args) -> "MessageChatJoinByLink": <NEW_LINE> <INDENT> return MessageChatJoinByLink()
A new member joined the chat by invite link Attributes: ID (:obj:`str`): ``MessageChatJoinByLink`` No parameters required. Returns: MessageContent Raises: :class:`telegram.Error`
62598f64be8e80087fbbe703
class MockFixture(object): <NEW_LINE> <INDENT> def __init__(self, config): <NEW_LINE> <INDENT> self._patches = [] <NEW_LINE> self._mocks = [] <NEW_LINE> self.mock_module = mock_module = _get_mock_module(config) <NEW_LINE> self.patch = self._Patcher(self._patches, self._mocks, mock_module) <NEW_LINE> self.Mock = mock_mo...
Fixture that provides the same interface to functions in the mock module, ensuring that they are uninstalled at the end of each test.
62598f649b70327d1c57e450
class SoundCloud(_MediaHost): <NEW_LINE> <INDENT> HOSTS = [ 'soundcloud.com', 'www.soundcloud.com', ] <NEW_LINE> PTN = re.compile('"streamUrl":"(.+?)"') <NEW_LINE> @classmethod <NEW_LINE> def from_url(cls, url): <NEW_LINE> <INDENT> resp = requests.get(url).text <NEW_LINE> match = cls.PTN.search(resp) <NEW_LINE> if not ...
Resolves SouncCloud browser URLs to playable mp3 URLs.
62598f64d99f1b3c44d04d5d
class Index(object): <NEW_LINE> <INDENT> def __init__(self, filename): <NEW_LINE> <INDENT> self._filename = filename <NEW_LINE> self.clear() <NEW_LINE> self.read() <NEW_LINE> <DEDENT> @property <NEW_LINE> def path(self): <NEW_LINE> <INDENT> return self._filename <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDEN...
A Git Index file.
62598f64d10714528d69d576
class Level(Slider): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(Level, self).__init__(**kwargs) <NEW_LINE> Slider(min=0, max=100, value=0, orientation='vertical')
A Level class for controlling sound levels
62598f6456b00c62f0fb1f5e
class HelloViewSet(viewsets.ViewSet): <NEW_LINE> <INDENT> serializer_class = serializers.HelloSerializer <NEW_LINE> def list(self, request): <NEW_LINE> <INDENT> a_viewset = [ "Uses actions (list, create, retrieve, update, partial_update)", "Automatically maps to URLs using Routers", "Provides more functionality with le...
Test API ViewSet
62598f6491af0d3eaad394b3
class ARIMA: <NEW_LINE> <INDENT> def __init__(self, data, order, **kwargs): <NEW_LINE> <INDENT> self.order = order <NEW_LINE> self.data = data.copy() <NEW_LINE> self.model = arima_model.ARIMA(endog=data, order=order, **kwargs) <NEW_LINE> self._fitted = None <NEW_LINE> <DEDENT> def fit(self, **kwargs): <NEW_LINE> <INDEN...
ARIMA model. Parameters ---------- data order kwargs
62598f641f5feb6acb1622e4
class Cipher(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> import pyimod00_crypto_key <NEW_LINE> key = pyimod00_crypto_key.key <NEW_LINE> assert type(key) is str <NEW_LINE> if len(key) > CRYPT_BLOCK_SIZE: <NEW_LINE> <INDENT> self.key = key[0:CRYPT_BLOCK_SIZE] <NEW_LINE> <DEDENT> else: <NEW_LINE> ...
This class is used only to decrypt Python modules.
62598f64287bf620b6271265
class BaseFile(object): <NEW_LINE> <INDENT> def __init__(self, filename, mode='rb'): <NEW_LINE> <INDENT> self.name = filename <NEW_LINE> self.mode = mode <NEW_LINE> dir = os.path.dirname(filename) <NEW_LINE> if dir and not os.path.exists(dir): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> os.makedirs(dir) <NEW_LINE> <DE...
Base class for PyNN File classes.
62598f64ff9c53063f519cfd
@registerElement <NEW_LINE> @registerElementClass <NEW_LINE> class PropertyStatus (WebDAVElement): <NEW_LINE> <INDENT> name = "propstat" <NEW_LINE> allowed_children = { (dav_namespace, "prop"): (1, 1), (dav_namespace, "status"): (1, 1), (dav_namespace, "error"): (0, 1), (dav_namespace, "responsedescription"): (0, 1), }
Groups together a Property and Status element that is associated with a particular DAV:href element. (RFC 2518, section 12.9.1.1)
62598f646aa9bd52df0d457a
class Bracketed(object): <NEW_LINE> <INDENT> def __init__(self, stop_loss, take_profit, trailling): <NEW_LINE> <INDENT> self.sl = stop_loss <NEW_LINE> self.tp = take_profit <NEW_LINE> self.trailling = trailling <NEW_LINE> <DEDENT> def get_tp(self, _is_buy): <NEW_LINE> <INDENT> return self.tp <NEW_LINE> <DEDENT> def get...
Mixin for the bracketted order behaviour
62598f64d164cc6175820624
class DummyDatasetRecord(object): <NEW_LINE> <INDENT> def __init__(self, collection, dataset): <NEW_LINE> <INDENT> self.collection = collection <NEW_LINE> self.dataset_id = DATASET_DICT[dataset.dataset_path] <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "[DatasetRecord %s]" % self.dataset_id <NEW_LI...
Dummy dataset record class for testing.
62598f6438b623060ffa8748
class Uniform(Uncertainty): <NEW_LINE> <INDENT> def __init__(self, pref, **kwargs): <NEW_LINE> <INDENT> super(Uniform, self).__init__(pref, **kwargs) <NEW_LINE> self.distribution = 'Uniform' <NEW_LINE> if kwargs['lower_bound']: <NEW_LINE> <INDENT> self.lower_bound = kwargs['lower_bound'] <NEW_LINE> <DEDENT> else: <NEW_...
Uniformly distributed random variate
62598f646fece00bbaccb03f
class Circuit(object): <NEW_LINE> <INDENT> def __init__(self, circuit_id, goal_hops=0, first_hop=None, proxy=None, ctype=CIRCUIT_TYPE_DATA, callback=None, required_exit=None): <NEW_LINE> <INDENT> from Tribler.community.tunnel.community import TunnelCommunity <NEW_LINE> assert isinstance(circuit_id, long) <NEW_LINE> ass...
Circuit data structure storing the id, state and hops
62598f6421a7993f00c65624
class ConnectionMonitor(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'source': {'required': True}, 'destination': {'required': True}, } <NEW_LINE> _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'source': {'key': 'properties.source', 'type...
Parameters that define the operation to create a connection monitor. All required parameters must be populated in order to send to Azure. :param location: Connection monitor location. :type location: str :param tags: A set of tags. Connection monitor tags. :type tags: dict[str, str] :param source: Required. Describes...
62598f64d99f1b3c44d04d5f
class RefererAgg(models.Model): <NEW_LINE> <INDENT> agg_month = models.DateField() <NEW_LINE> referer = models.ForeignKey(RefererDictionary, on_delete=models.CASCADE) <NEW_LINE> amount = models.IntegerField() <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return '{0}, {1}, {2}'.format(self.agg_month, self.referer, s...
агрегация по откуда пришли
62598f643eb6a72ae0389cec
class ResNeStABlock(Chain): <NEW_LINE> <INDENT> def __init__(self, in_channels, out_channels, stride, use_bias=False, use_bn=True, **kwargs): <NEW_LINE> <INDENT> super(ResNeStABlock, self).__init__(**kwargs) <NEW_LINE> self.resize = (stride > 1) <NEW_LINE> with self.init_scope(): <NEW_LINE> <INDENT> self.conv1 = conv3x...
Simple ResNeSt(A) block for residual path in ResNeSt(A) unit. Parameters: ---------- in_channels : int Number of input channels. out_channels : int Number of output channels. stride : int or tuple/list of 2 int Stride of the convolution. use_bias : bool, default False Whether the layer uses a bias vect...
62598f64711fe17d825dfd97
class Configuration(object): <NEW_LINE> <INDENT> DEFAULTS = { 'generate_merge': {}, 'ignore_dirs': [], 'locales': ['en'], 'segment': {}, 'source_locale': 'en', } <NEW_LINE> def __init__(self, filename): <NEW_LINE> <INDENT> self._filename = filename <NEW_LINE> self._config = self.read_config(filename) <NEW_LINE> <DEDENT...
Reads localization configuration in json format.
62598f6456b00c62f0fb1f60
class Circle(Shape): <NEW_LINE> <INDENT> def __init__(self, body, radius, offset = (0,0)): <NEW_LINE> <INDENT> self._body = body <NEW_LINE> self._shape = cp.cpCircleShapeNew(body._body, radius, offset) <NEW_LINE> self._shapecontents = self._shape.contents <NEW_LINE> <DEDENT> def _set_radius(self, r): <NEW_LINE> <INDENT...
A circle shape defined by a radius
62598f6463f4b57ef00858c5
class GenEquiv(RotatingMachine): <NEW_LINE> <INDENT> xp = Reactance
An equivalent representation of a synchronous generator as a constant internal voltage behind an impedance Ra plus Xp.
62598f641f5feb6acb1622e6
class SpoofCore(CoreInterface): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> start_new_thread(self.__spoof_thread, ()) <NEW_LINE> <DEDENT> def get_ultra_data(self, n=1): <NEW_LINE> <INDENT> return DATA[-n:] <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def __spoof_thread(): <NEW_LINE> <INDENT> idx = 0 <NE...
Bare bones CoreInterface implementation with no other functionality that returning set values with get_ultra_data
62598f64711fe17d825dfd98
class HarborAuthorizer(DummyAuthorizer): <NEW_LINE> <INDENT> def validate_authentication(self, user_name, password, handler): <NEW_LINE> <INDENT> flag, perm, msg = FtpHarborManager().ftp_authenticate(user_name, password) <NEW_LINE> if not flag: <NEW_LINE> <INDENT> raise AuthenticationFailed(msg) <NEW_LINE> <DEDENT> per...
继承DummyAuthorizer 主要修改pyftpdlib的认证模块的一些函数 修改pyftpdlib的认证函数 修改pyftpdlib的获得根目录的函数 修改pyftpdlib的成功登陆提示函数 修改pyftpdlib的判断是否有权限函数 修改pyftpdlib的获得权限函数
62598f64ff9c53063f519cff
class Task(BaseModel): <NEW_LINE> <INDENT> n1: float <NEW_LINE> n: int <NEW_LINE> d: float <NEW_LINE> value: Optional[float] = None <NEW_LINE> interval: float <NEW_LINE> queue_position: int = 0 <NEW_LINE> start_date: Optional[date] = None <NEW_LINE> status: Status = Status.queue.value <NEW_LINE> class Config: <NEW_LINE...
Model for tasks.
62598f640383005118f6cdb6
class PartGroup(MusicXMLComponent, MusicXMLContainer): <NEW_LINE> <INDENT> def __init__(self, parts: Sequence[Part] = None, has_bracket: bool = True, has_group_bar_line: bool = True): <NEW_LINE> <INDENT> super().__init__(contents=parts, allowed_types=(Part,)) <NEW_LINE> self.has_bracket = has_bracket <NEW_LINE> self.ha...
Represents a part group (a group of related parts, possible connected by a bracket) :param parts: list of parts contained in this group :param has_bracket: whether or not to place a bracket around the group in the score :param has_group_bar_line: whether or not to have bar lines cut through the entire group
62598f6438b623060ffa874a
class TestTearDownEndedEvent(TestPhaseEndedEvent): <NEW_LINE> <INDENT> event_type = EventType.TEST_TEARDOWN_ENDED
Triggered when a test's tear down phase has concluded
62598f649b70327d1c57e454
class FileSystemCreator(ABC): <NEW_LINE> <INDENT> def __call__(self, dataset: Dataset, base_dir: Path, daemon=True): <NEW_LINE> <INDENT> root_dir = self.create(dataset, base_dir) <NEW_LINE> setup_as_filesystem(root_dir, base_dir, daemon) <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def create(self, dataset: Dataset, ...
The FileSystemCreator class is meant to transform a dataset into an actual filesystem. This could be useful to test new algorithms without actually copying and transforming your original dataset.
62598f6456b00c62f0fb1f62
class HandleWFS(): <NEW_LINE> <INDENT> def __init__(self, url, version="1.0.0"): <NEW_LINE> <INDENT> self.wfs = WebFeatureService(url, version=version) <NEW_LINE> self.type = self.wfs.identification.type <NEW_LINE> self.version = self.wfs.identification.version <NEW_LINE> self.title = self.wfs.identification.title <NEW...
Processor for WFS resources. Requires a getCapabilities URL for the WFS and a WFS version passed in as a string. Default version is '1.0.0'; other supported versions are '1.1.0' and '2.0.0'
62598f646aa9bd52df0d457e
class MaxPool(base.AbstractModule): <NEW_LINE> <INDENT> def __init__(self, kernel_shape, stride=1, padding=SAME, name="max_pool"): <NEW_LINE> <INDENT> super(MaxPool,self).__init__(name=name) <NEW_LINE> try: <NEW_LINE> <INDENT> self._kernel_shape = (1,) + _fill_shape(kernel_shape,2) + (1,) <NEW_LINE> <DEDENT> except Typ...
Spatial max-pooling module
62598f646e29344779affd08
class PaymentMethod(models.Model): <NEW_LINE> <INDENT> name_cn = models.CharField('中文名称', max_length=30, blank=True, null=True) <NEW_LINE> pay_type = models.IntegerField('支付类型', choices=PAY_TYPE_CHOICES) <NEW_LINE> logo = models.CharField('LOGO', max_length=100, blank=True, null=True) <NEW_LINE> order_no = models.Integ...
支付方式
62598f6430c21e258be97eac
class GoToJailCard(Card): <NEW_LINE> <INDENT> def play(self, game, current_player): <NEW_LINE> <INDENT> game.send_player_to_jail(current_player)
Go to Jail. Go directly to jail. Do not pass Go. Do not collect £200.
62598f64d164cc6175820628
class SimpleAuthMixin(object): <NEW_LINE> <INDENT> def _raise_auth_required(self): <NEW_LINE> <INDENT> from tornado import web <NEW_LINE> self.set_status(401) <NEW_LINE> self.write("Authentication required") <NEW_LINE> self.set_header("WWW-Authenticate", "PseudoAuth") <NEW_LINE> raise web.Finish() <NEW_LINE> <DEDENT> d...
A ``tornado.web.RequestHandler`` mixin for authenticating using Hadoop's "simple" protocol. In Hadoop, "simple" authentication uses a URL query parameter to specify the user, and isn't secure at all. This mixin class exists for parity with Hadoop, but kerberos authentication is advised instead. Examples -------- A si...
62598f64ac7a0e7691f71bc1
class RouterConfigurationAdmin(KeyedConfigurationModelAdmin): <NEW_LINE> <INDENT> history_list_display = ('status') <NEW_LINE> change_form_template = 'admin/router_conf_change_form.html' <NEW_LINE> def get_displayable_field_names(self): <NEW_LINE> <INDENT> return ['backend_name', 'enabled', 'route_url', 'configurations...
Admin model class for RouterConfiguration model.
62598f6430c21e258be97ead
class TrafficParser(object): <NEW_LINE> <INDENT> def __init__(self, xml_data, timestamp_scalar=1000): <NEW_LINE> <INDENT> self.xml = xml_data <NEW_LINE> self.timestamp_scalar = timestamp_scalar <NEW_LINE> self.begin = None <NEW_LINE> self.end = None <NEW_LINE> self.frequency = None <NEW_LINE> self.filters = None <NEW_L...
Parse an Arbor traffic response into a list of Pond TimeSeries :param xml_data: The ElementTree of the data from the Arbor server. :param timestamp_scalar: Used to convert the timestamp. The default is 1000 to convert from unix timestamps to the JavaScript convention o...
62598f6473bcbd0ca4bc9903
class SyntheticSimpleObjectVector(object): <NEW_LINE> <INDENT> def num_children(self): <NEW_LINE> <INDENT> return self.element_count <NEW_LINE> <DEDENT> def get_child_index(self, name): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return int(name.lstrip('[').rstrip(']')) <NEW_LINE> <DEDENT> except: <NEW_LINE> <INDENT> ...
A synthetic for representing a <simple-object-vector>.
62598f6476d4e153a661c2c5
class CellLinkIn(object): <NEW_LINE> <INDENT> def __init__(self, sheetId, rowId, columnId, status): <NEW_LINE> <INDENT> if not CellLinkStatus.isValid(status): <NEW_LINE> <INDENT> raise BadCellData("CellLinkIn status: %r not valid status code." % status) <NEW_LINE> <DEDENT> self.sheetId = sheetId <NEW_LINE> self.rowId =...
A link from a Cell to a Cell in a different Sheet.
62598f646aa9bd52df0d4580
class recipe: <NEW_LINE> <INDENT> def __init__(self, filedesc, entrypath): <NEW_LINE> <INDENT> self.file = filedesc <NEW_LINE> self.entry = entrypath <NEW_LINE> self.title = "NXcitation information" <NEW_LINE> <DEDENT> def process(self): <NEW_LINE> <INDENT> citation_manager = NXciteVisitor().get_citation_manager(self.f...
This recipe recursively finds all NXcite classes in the entry and captures the information in them By using this feature you can programmatically gather suggested refereneces for the publication of the data of the NeXus file (entry) in question. This can give credit to the instrument, special devices, algorithms, cali...
62598f64d18da76e235b6c8e
class State(object): <NEW_LINE> <INDENT> def defaultenterfunction(self): <NEW_LINE> <INDENT> Automate.log("Entering:" + str(self.name)) <NEW_LINE> <DEDENT> def defaultleavefunction(self): <NEW_LINE> <INDENT> Automate.log("Leaving:" + str(self.name)) <NEW_LINE> <DEDENT> def __init__(self, name): <NEW_LINE> <INDENT> self...
A defined state in the life cycle of a program. Could have a enter and a leaving function defined. *Example:* .. code-block:: python StartState = State("StartState") FinishFromState = Transition("FinishFromState", "End", None) StartState.addTransition(FinishFromState) :param name: the name of the state...
62598f641f037a2d8b9e37a1
class Monitor(object): <NEW_LINE> <INDENT> def onAbortRequested(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def onDatabaseUpdated(self, database): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def onScreensaverActivated(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def onScreensaverDeactivated(self): <NEW_...
Monitor class. Creates a new Monitor to notify addon about changes.
62598f64d10714528d69d57d
class UserProfileApp(Application): <NEW_LINE> <INDENT> __version__ = version.__version__ <NEW_LINE> tool_label = 'Profile' <NEW_LINE> max_instances = 0 <NEW_LINE> has_notifications = False <NEW_LINE> icons = { 24: 'images/home_24.png', 32: 'images/home_32.png', 48: 'images/home_48.png' } <NEW_LINE> def __init__(self, u...
This is the Profile tool, which is automatically installed as the default (first) tool on any user project.
62598f653eb6a72ae0389cf2
class RRprojroot(RPackage): <NEW_LINE> <INDENT> homepage = "https://cran.r-project.org/package=rprojroot" <NEW_LINE> url = "https://cran.rstudio.com/src/contrib/rprojroot_1.2.tar.gz" <NEW_LINE> list_url = "https://cran.rstudio.com/src/contrib/Archive/rprojroot" <NEW_LINE> version('1.2', 'c1a0574aaac2a43a72f804abba...
Robust, reliable and flexible paths to files below a project root. The 'root' of a project is defined as a directory that matches a certain criterion, e.g., it contains a certain regular file.
62598f65d10714528d69d57e
class VectorPrinter: <NEW_LINE> <INDENT> Iterator = object <NEW_LINE> class _iterator(Iterator): <NEW_LINE> <INDENT> def __init__(self, start, finish_or_size, bits_per_word, bitvec): <NEW_LINE> <INDENT> self.bitvec = bitvec <NEW_LINE> if bitvec: <NEW_LINE> <INDENT> self.item = start <NEW_LINE> self.so = 0 <NEW_LINE> se...
Print a std::vector
62598f650a366e3fb87dc073
@whitelist_for_serdes <NEW_LINE> class ResolvedFromDynamicStepHandle( NamedTuple( "_ResolvedFromDynamicStepHandle", [("solid_handle", NodeHandle), ("mapping_key", str), ("key", str)], ) ): <NEW_LINE> <INDENT> def __new__(cls, solid_handle: NodeHandle, mapping_key: str, key: Optional[str] = None): <NEW_LINE> <INDENT> re...
A reference to an ExecutionStep that came from resolving an UnresolvedMappedExecutionStep (and associated UnresolvedStepHandle) downstream of a dynamic output after it has completed successfully.
62598f656e29344779affd0c
class TestCompareXLSXFiles(ExcelComparisonTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.set_filename('textbox10.xlsx') <NEW_LINE> <DEDENT> def test_create_file(self): <NEW_LINE> <INDENT> workbook = Workbook(self.got_filename) <NEW_LINE> worksheet = workbook.add_worksheet() <NEW_LINE> worksheet.in...
Test file created by XlsxWriter against a file created by Excel.
62598f65711fe17d825dfd9f
class Param(object): <NEW_LINE> <INDENT> __slots__ = ['_allow_negative', '_default_value', 'der1', 'der2', 'ptype', 'range', 'step' ,'value'] <NEW_LINE> def __init__(self, ptype, value): <NEW_LINE> <INDENT> self._allow_negative = None <NEW_LINE> self._default_value = None <NEW_LINE> self.der1 = None <NEW_LINE> self.der...
Class for a single parameter. der1 - float - 1st derivative with respect to objective function. der2 - float - 2nd derivative with respect to objective function. ptype - string - In-house label for parameter type. range - list - Actually, I haven't implemented this yet. step - float - Default step size. value - float ...
62598f65c432627299fa2686
class Microbe(Sample): <NEW_LINE> <INDENT> __tablename__ = 'microbe' <NEW_LINE> id = Column(Integer, ForeignKey('sample.id'), primary_key=True) <NEW_LINE> strain = Column(String) <NEW_LINE> isolate = Column(String) <NEW_LINE> host = Column(String) <NEW_LINE> isolation_source = Column(String) <NEW_LINE> sample_type = Co...
Inheritence example. For this simple single-table case, no additional id is required
62598f65d164cc617582062d
class ObjectR(object): <NEW_LINE> <INDENT> def __init__(self, key, resp, backend, metadata=None): <NEW_LINE> <INDENT> self.key = key <NEW_LINE> self.resp = resp <NEW_LINE> self.md5_checked = False <NEW_LINE> self.backend = backend <NEW_LINE> self.metadata = metadata <NEW_LINE> self.md5 = hashlib.md5() <NEW_LINE> <DEDEN...
An S3 object open for reading
62598f657c178a314d78cb53
class YamlConfigurationFile(AbstractConfigurationFile): <NEW_LINE> <INDENT> def reload(self): <NEW_LINE> <INDENT> with open(self.path, 'r') as stream: <NEW_LINE> <INDENT> self.data = yaml.load(stream)
This class exposes the contents of a configuration file in YAML format. It handles loading of the configuration file and fetching the values of variables.
62598f65d18da76e235b6c90
class QuerySetJob(Job): <NEW_LINE> <INDENT> def __init__(self, model, lifetime=None, fetch_on_miss=None): <NEW_LINE> <INDENT> self.model = model <NEW_LINE> if lifetime is not None: <NEW_LINE> <INDENT> self.lifetime = lifetime <NEW_LINE> <DEDENT> if fetch_on_miss is not None: <NEW_LINE> <INDENT> self.fetch_on_miss = fet...
Helper class for wrapping ORM reads
62598f651d351010ab8f31f8
class ImHistoryRequest(ChannelsHistoryRequest): <NEW_LINE> <INDENT> pass
Request for :meth:`~aioslackbot.ImModule.history`.
62598f65925a0f43d25e76ed
class PyMethodDef(PyFunctionDef): <NEW_LINE> <INDENT> def __init__(self, klass, name, argsString, body, doc=None, **kw): <NEW_LINE> <INDENT> super(PyMethodDef, self).__init__(name, argsString, body, doc) <NEW_LINE> self.klass = klass <NEW_LINE> self.protection = 'public' <NEW_LINE> self.__dict__.update(kw)
A PyMethodDef can be used to define Python class methods that will then be monkey-patched in to the extension module Types as if they belonged there.
62598f651d351010ab8f31f9
class TestDashboardPODTemplate(IntegrationTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(TestDashboardPODTemplate, self).setUp() <NEW_LINE> self.dashboardtemplate = api.content.create(id='dashboardtemplate', type='DashboardPODTemplate', title='Dashboard template', container=self.folder) <NEW_...
The part that changed is the fact that we use another condition based on the 'dashboard_collections' field, so test this. Call same tests than in collective.documentgenerator TestConfigurablePODTemplateIntegration.
62598f65d164cc617582062f
class CollectionQuery(Query): <NEW_LINE> <INDENT> def __init__(self, subqueries = ()): <NEW_LINE> <INDENT> self.subqueries = subqueries <NEW_LINE> <DEDENT> def __len__(self): return len(self.subqueries) <NEW_LINE> def __getitem__(self, key): return self.subqueries[key] <NEW_LINE> def __iter__(self): iter(self.subquerie...
An abstract query class that aggregates other queries. Can be indexed like a list to access the sub-queries.
62598f6576d4e153a661c2cb
class InvMetaType(models.Model): <NEW_LINE> <INDENT> type = models.ForeignKey(InvType, unique=True, primary_key=True, related_name='inventorymetatype_type_set') <NEW_LINE> parent_type = models.ForeignKey(InvType, related_name='inventorymetatype_parent_type_set') <NEW_LINE> meta_group = models.ForeignKey(InvMetaGroup) <...
Relation between different variants of item (i.e. Tech-I, Faction, Tech-II). These are not "meta-levels" of items used for calculate invention success. For that information see Attribute metaLevel (attributeID=633) in table dgmTypeAttributes linked with type in question. CCP Table: invMetaTypes CCP Primary key: "typeI...
62598f656aa9bd52df0d4586