code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class BaseCommit(GitHubCore): <NEW_LINE> <INDENT> def __init__(self, commit, session): <NEW_LINE> <INDENT> super(BaseCommit, self).__init__(commit, session) <NEW_LINE> self._api = commit.get('url', '') <NEW_LINE> self.sha = commit.get('sha') <NEW_LINE> self.message = commit.get('message') <NEW_LINE> self.parents = comm... | The :class:`BaseCommit <BaseCommit>` object. This serves as the base for
the various types of commit objects returned by the API. | 62598f8645492302aabfbfc3 |
class ContactPhotoMixin(object): <NEW_LINE> <INDENT> queryset = models.ContactPhoto.objects.all() <NEW_LINE> serializer_class = serializers.ContactPhotoSerializer | ContactPhoto mixin class. | 62598f86656771135c489160 |
class EQI1(parametertools.SingleParameter): <NEW_LINE> <INDENT> NDIM, TYPE, TIME, SPAN = 0, float, None, (0., None) <NEW_LINE> def trim(self, lower=None, upper=None): <NEW_LINE> <INDENT> if lower is None: <NEW_LINE> <INDENT> lower = self.subpars.eqi2 <NEW_LINE> <DEDENT> if upper is None: <NEW_LINE> <INDENT> upper = sel... | Kalibrierfaktor für die "untere" Zwischenabflusskonzentration
(factor for adjusting the concentration time of the first interflow
component) [-]. | 62598f8650485f2cf55daa59 |
class LibraryFilter(NamedTuple('LibraryFilter', [ ('tag', str), ('description', str), ('is_file', bool), ('paths_func', PathsFunctionType), ('extraction_func', Optional[ExtractionFunctionType]), ('filter_func', Optional[Callable[["Library"], bool]]), ('sort_func', Optional[Callable[["Library"], Union[Number, str, tuple... | "Library" filter containing a filtering function, identifier tag, and a short
human-readable description. | 62598f8610dbd63aa1c70699 |
class TestParser(interface.BaseParser): <NEW_LINE> <INDENT> NAME = 'test_parser' <NEW_LINE> DESCRIPTION = u'Test parser.' <NEW_LINE> def Parse(self, unused_parser_context, unused_file_entry, parser_chain=None): <NEW_LINE> <INDENT> return | Test parser. | 62598f8623e79379d538bfe1 |
class Collect(mongoengine.Document): <NEW_LINE> <INDENT> meta = { 'indexes':[ 'hiddenService' ] } <NEW_LINE> date_check = mongoengine.DateTimeField(default=datetime.datetime.utcnow, required=True) <NEW_LINE> dateScanned = mongoengine.StringField() <NEW_LINE> hiddenService = mongoengine.StringField(required=True, unique... | This class contain all onions of our TOR scan | 62598f867b25080760ed6f8d |
class FragmentInserter(object): <NEW_LINE> <INDENT> def prepare_fragment(self, fragment, model): <NEW_LINE> <INDENT> fragment.superimpose() <NEW_LINE> fragment.prepare_anchor_residues() <NEW_LINE> fragment.renumber(model) <NEW_LINE> fragment.apply_seq() <NEW_LINE> <DEDENT> def insert_fragment(self, fragment, model): <N... | Inserts fragments into models. | 62598f86a4f1c619b294e0d3 |
class TestNamedNode(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def testNamedNode(self): <NEW_LINE> <INDENT> pass | NamedNode unit test stubs | 62598f866e29344779b0014b |
class AutoGuidMixin(object): <NEW_LINE> <INDENT> id = column( GUID, meta=ColumnMeta( label='ID', target=Target( guaranteed=True, calculated=True ) ), default=lambda: uuid.uuid4(), primary_key=True ) | This mixin includes an `id` column. | 62598f8615fb5d323ce7e811 |
class SQLiteCursorContextManager: <NEW_LINE> <INDENT> def __init__(self, conn): <NEW_LINE> <INDENT> self.conn = conn <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> return self.conn.cursor() <NEW_LINE> <DEDENT> def __exit__(self, exc_type, exc_val, exc_tb): <NEW_LINE> <INDENT> self.conn.commit() | class SQLiteCursorContextManager to create the cursor object within a context
USAGE:
SQLiteCursorContextManager(conn=SQLite.connection) | 62598f86bde94217f37073d9 |
class AuthenticationFailure(ConnectionError): <NEW_LINE> <INDENT> pass | When the log in credentials of the emlid are wrong, this error is
encountered | 62598f86d10714528d69d9b7 |
class SqDataset(Dataset): <NEW_LINE> <INDENT> def __init__(self, args=Dataset.DEFAULT_ARGS, name="sq_dataset"): <NEW_LINE> <INDENT> Dataset.__init__(self, args=args, name=name) <NEW_LINE> <DEDENT> def _get(self, idx): <NEW_LINE> <INDENT> return np.square(self._data[idx]) | Dataset returns the square of the index.
| 62598f86462c4b4f79dbb4ea |
class LinkRt(sea.LimitedCmd): <NEW_LINE> <INDENT> def __init__ (self, quiet=False): <NEW_LINE> <INDENT> super (LinkRt, self).__init__('linkrt', 'Link sea-rt library', allow_extra=True) <NEW_LINE> self.clangCmd = None <NEW_LINE> <DEDENT> def mk_arg_parser (self, ap): <NEW_LINE> <INDENT> ap = super (LinkRt, self).mk_arg_... | Create an executable by linking with sea-rt library | 62598f8621bff66bcd722752 |
class Constants(object): <NEW_LINE> <INDENT> c_kms = 299792.458 <NEW_LINE> c = 29979245800 <NEW_LINE> LIGHT_SPEED = c <NEW_LINE> h = 6.62606885e-27 <NEW_LINE> PLANCK = h <NEW_LINE> hbar = h/2./np.pi <NEW_LINE> sigma_sb = 5.670367e-5 <NEW_LINE> STEFAN_BOLTZMANN = sigma_sb <NEW_LINE> k_b = 1.38064852e-16 <NEW_LINE> BOLTZ... | Contains the physical constants definitions in cgs units. | 62598f86507cdc57c63a4874 |
class Model(): <NEW_LINE> <INDENT> db = pymongo.MongoClient()['Qfang2Shou'] <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> name = self.__class__.__name__ <NEW_LINE> properties = ('{}=({})'.format(k, v) for k, v in self.__dict__.items()) <NEW_LINE> s = '\n<{} \n {}>'.format(name, '\n '.join(properties)) <NEW_LINE>... | 基类, 用来显示类的信息 | 62598f8607f4c71912baef2b |
class FusionAlertRule(AlertRule): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'description': {'readonly': True}, 'display_name': {'readonly': True}, 'last_modified_utc': {'readonly': True}, 'severity': {'readonly': Tru... | Represents Fusion alert rule.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: Azure resource Id.
:vartype id: str
:ivar name: Azure resource name.
:vartype name: str
:ivar type: Azure resource type.... | 62598f8666656f66f7d59edd |
class ViewLogs(ShootingPanel): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def run(win, event, values): <NEW_LINE> <INDENT> win.Hide() <NEW_LINE> layout = ViewLogLayout() <NEW_LINE> win2 = sg.Window("Logs", layout=layout.main_layout(), size=(layout.width, layout.height), finalize=True, keep_on_top=True) <NEW_LINE> pre... | brings up Logs associated with the currently selected
Pass that is connected to a specific job. | 62598f8623e79379d538bfe2 |
class DsObjectDeleter(Link): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> Link.__init__(self, kwargs.pop('name', 'DsObjectDeleter')) <NEW_LINE> self._process_kwargs(kwargs, deletion_keys=[], deletion_classes=[], keep_only=[], clear_all=True) <NEW_LINE> self.check_extra_kwargs(kwargs) <NEW_LINE>... | Delete objects from the datastore.
Delete objects from the DataStore by the key they are under, or keeps
only the data by the specified keys. | 62598f8623e79379d538bfe3 |
class PwznRelayStatus(DeviceStatus): <NEW_LINE> <INDENT> def __init__(self, data: Dict[str, Any]) -> None: <NEW_LINE> <INDENT> self.data = data <NEW_LINE> <DEDENT> @property <NEW_LINE> def relay_state(self) -> Optional[int]: <NEW_LINE> <INDENT> if "relay_status" in self.data: <NEW_LINE> <INDENT> return self.data["relay... | Container for status reports from the plug. | 62598f865f7d997b871f914c |
class Visualizer(object): <NEW_LINE> <INDENT> def __init__(self, env='default', **kwargs): <NEW_LINE> <INDENT> self.vis = visdom.Visdom(env=env, use_incoming_socket=False, **kwargs) <NEW_LINE> self._vis_kw = kwargs <NEW_LINE> self.index = {} <NEW_LINE> self.log_text = '' <NEW_LINE> <DEDENT> def reinit(self, env='defaul... | wrapper for visdom
you can still access naive visdom function by
self.line, self.scater,self._send,etc.
due to the implementation of `__getattr__` | 62598f86442bda511e95bf43 |
class ReconnectingAsyncioModbusTlsClient(ReconnectingAsyncioModbusTcpClient): <NEW_LINE> <INDENT> def __init__(self, protocol_class=None, loop=None, framer=None, **kwargs): <NEW_LINE> <INDENT> self.framer = framer <NEW_LINE> ReconnectingAsyncioModbusTcpClient.__init__(self, protocol_class, loop, **kwargs) <NEW_LINE> <D... | Client to connect to modbus device repeatedly over TLS." | 62598f867b25080760ed6f8f |
class JplusOp(SpinOpBase, Operator): <NEW_LINE> <INDENT> _coord = '+' <NEW_LINE> basis = 'Jz' <NEW_LINE> def _eval_commutator_JminusOp(self, other): <NEW_LINE> <INDENT> return 2*hbar*JzOp(self.name) <NEW_LINE> <DEDENT> def _apply_operator_JzKet(self, ket, **options): <NEW_LINE> <INDENT> j = ket.j <NEW_LINE> m = ket.m <... | The J+ operator. | 62598f8676d4e153a661c6fc |
class Entry(AbstractModule): <NEW_LINE> <INDENT> _level = 0 | A level 0 module, often obtained from the official toolkits plamisds.
Entries are assembled from products into a standard vector suitable for
selection and storage. | 62598f86bde94217f37073da |
class BoundingEllipse(BoundingBox): <NEW_LINE> <INDENT> __slots__ = [] <NEW_LINE> def contains(self, x, y): <NEW_LINE> <INDENT> left, bottom, right, top = self.aarect().lbrt() <NEW_LINE> xr = (right - left) / 2.0 <NEW_LINE> yr = (top - bottom) / 2.0 <NEW_LINE> xc = left + xr <NEW_LINE> yc = bottom + yr <NEW_LINE> xd = ... | Similar to BoundingBox, but the region is the ellipse
inscribed within the rectangle. | 62598f86d99f1b3c44d05197 |
class InverseSIP(Model): <NEW_LINE> <INDENT> n_inputs = 2 <NEW_LINE> n_outputs = 2 <NEW_LINE> def __init__(self, ap_order, bp_order, ap_coeff={}, bp_coeff={}, param_dim=1): <NEW_LINE> <INDENT> self._ap_order = ap_order <NEW_LINE> self._bp_order = bp_order <NEW_LINE> self._ap_coeff = ap_coeff <NEW_LINE> self._bp_coeff =... | Inverse Simple Imaging Polynomial
Parameters
----------
ap_order : int
order for the inverse transformation (AP coefficients)
bp_order : int
order for the inverse transformation (BP coefficients)
ap_coeff : dict
coefficients for the inverse transform
bp_coeff : dict
coefficients for the inverse transfo... | 62598f86462c4b4f79dbb4ec |
class State(BaseModel): <NEW_LINE> <INDENT> name = "" | Summary: Definning the State class that inherits from BaseModel
Public class attributes:
name string - empty string | 62598f8621bff66bcd722754 |
class MonthInput(Input): <NEW_LINE> <INDENT> input_type = 'month' | Renders an input with type "month". | 62598f86f7d966606f747ad1 |
class Nnf: <NEW_LINE> <INDENT> def __init__(self, env: 'unified_planning.environment.Environment'): <NEW_LINE> <INDENT> self.env = env <NEW_LINE> self.manager = env.expression_manager <NEW_LINE> <DEDENT> def get_nnf_expression(self, expression: FNode) -> FNode: <NEW_LINE> <INDENT> stack: List[Tuple[bool, FNode, bool]] ... | Class used to transform a logic expression into the equivalent
Negation Normal Form expression.
This is done first by removing all the Implications and Equalities,
then by pushing all the not to the leaves of the Tree representing the expression. | 62598f86dc8b845886d5309f |
class HandshakeType(TLSEnum): <NEW_LINE> <INDENT> hello_request = 0 <NEW_LINE> client_hello = 1 <NEW_LINE> server_hello = 2 <NEW_LINE> certificate = 11 <NEW_LINE> server_key_exchange = 12 <NEW_LINE> certificate_request = 13 <NEW_LINE> server_hello_done = 14 <NEW_LINE> certificate_verify = 15 <NEW_LINE> client_key_excha... | Message types in TLS Handshake protocol | 62598f8682261d6c5272fc49 |
class ClientExternal(Client): <NEW_LINE> <INDENT> TIMEOUT = 90 <NEW_LINE> def __init__(self, name: str, node: Node, executor: Executor, **kwargs): <NEW_LINE> <INDENT> super(ClientExternal, self).__init__(name, node, executor, **kwargs) <NEW_LINE> self.execution = None <NEW_LINE> self._command = None <NEW_LINE> self._ur... | Represents messaging clients that are executed externally as command line applications. | 62598f8663b5f9789fe84c5a |
class Solution: <NEW_LINE> <INDENT> def increasingBST(self, root): <NEW_LINE> <INDENT> self.prev = None <NEW_LINE> self.dfs(root) <NEW_LINE> return self.prev <NEW_LINE> <DEDENT> def dfs(self, node): <NEW_LINE> <INDENT> if node == None: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> l, r = node.left, node.right <NE... | @param root: a binary search tree
@return: Root of a tree | 62598f8623849d37ff850ba7 |
class T_in(Variable): <NEW_LINE> <INDENT> unit = kelvin <NEW_LINE> latex_name = 'T_{in}' | Temperature of incoming air | 62598f86596a89723612775c |
class TestPlugin(ManoBasePlugin): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(self.__class__, self).__init__(version="1.0-dev") | This is the most simple plugin. It does nothing (except of registration etc.). | 62598f86b57a9660fecd1566 |
class CLIP_MT_tracking_settings_presets(Menu): <NEW_LINE> <INDENT> bl_label = "Tracking Presets" <NEW_LINE> preset_subdir = "tracking_settings" <NEW_LINE> preset_operator = "script.execute_preset" <NEW_LINE> draw = bpy.types.Menu.draw_preset | Predefined tracking settings | 62598f8691af0d3eaad398e6 |
class CreateDestroyBookmarksView(APIView): <NEW_LINE> <INDENT> permission_classes = [IsAuthenticated] <NEW_LINE> def post(self, request, *args, **kwargs): <NEW_LINE> <INDENT> current_user = request.user <NEW_LINE> slug = kwargs["slug"] <NEW_LINE> try: <NEW_LINE> <INDENT> article = get_object_or_404(Article, slug=slug) ... | post:
Bookmark or unbookmark an article | 62598f86fbf16365ca793b94 |
class NLprinter: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.depth = 0 <NEW_LINE> <DEDENT> def __call__(self,lst,pos='',**kw): <NEW_LINE> <INDENT> kw.setdefault('indent',' ') <NEW_LINE> kw.setdefault('sep',': ') <NEW_LINE> kw.setdefault('start',0) <NEW_LINE> kw.setdefault('stop',len(lst)) <NEW_LINE... | Print an arbitrarily nested list, indicating index numbers.
An instance of this class called nlprint is available and callable as a
function.
nlprint(list,indent=' ',sep=': ') -> prints indenting each level by 'indent'
and using 'sep' to separate the index from the value. | 62598f86a4f1c619b294e0d7 |
class AbcMultipleFormatsFilter(SubprocessFilter): <NEW_LINE> <INDENT> aliases = ['abcm'] <NEW_LINE> _settings = { 'input-extensions' : ['.abc'], 'output-extensions' : ['.json'], 'executable' : 'abcm2ps', 'tags' : ['music'], 'add-new-files' : False } <NEW_LINE> def command_string(self, ext): <NEW_LINE> <INDENT> clargs =... | Runs `abcm2ps` on .abc music files, generating all output formats. | 62598f8676d4e153a661c6fe |
class GoodsBrandsViewSet(ModelViewSet): <NEW_LINE> <INDENT> permission_classes = [IsAdminUser] <NEW_LINE> queryset = Brand.objects.all() <NEW_LINE> serializer_class = GoodsBrandsSerializer <NEW_LINE> lookup_value_regex = '\d+' | 商品品牌视图集 | 62598f86baa26c4b54d4ed9c |
class ResnetEncoderDepth(nn.Module): <NEW_LINE> <INDENT> def __init__(self, num_layers, pretrained, num_input_images=1): <NEW_LINE> <INDENT> super(ResnetEncoderDepth, self).__init__() <NEW_LINE> self.num_ch_enc = np.array([64, 64, 128, 256, 512]) <NEW_LINE> resnets = {18: models.resnet18, 34: models.resnet34, 50: model... | Pytorch module for a resnet encoder
| 62598f8615fb5d323ce7e815 |
class ThreeLayerConvNet(object): <NEW_LINE> <INDENT> def __init__(self, input_dim=(3, 32, 32), num_filters=32, filter_size=7, hidden_dim=100, num_classes=10, weight_scale=1e-3, reg=0.0, dtype=np.float32): <NEW_LINE> <INDENT> self.params = {} <NEW_LINE> self.reg = reg <NEW_LINE> self.dtype = dtype <NEW_LINE> self.params... | A three-layer convolutional network with the following architecture:
conv - relu - 2x2 max pool - affine - relu - affine - softmax
The network operates on minibatches of data that have shape (N, C, H, W)
consisting of N images, each with height H and width W and with C input
channels. | 62598f8607f4c71912baef2e |
class OrganizingCollection(ResourceBase): <NEW_LINE> <INDENT> def get_collection(self, **kwargs): <NEW_LINE> <INDENT> self.refresh(**kwargs) <NEW_LINE> return self.items | Base class for objects that collect resources under them.
``OrganizingCollection`` objects fulfill the following functions:
* represent a uri path fragment immediately 'below' /mgmt/tm
* provide a list of dictionaries that contain uri's to other
resources on the device. | 62598f860383005118f6d1e5 |
class ValidateEngine(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.d = DockerClient() <NEW_LINE> <DEDENT> def validate_cookbook(self, cookbook, recipe, image, request): <NEW_LINE> <INDENT> if hasattr(CONF, 'clients_docker') and hasattr(CONF.clients_docker, 'url') ... | Engine for validations | 62598f866fece00bbaccb473 |
class ReceiverOptionsTests(SenderReceiverTestCase): <NEW_LINE> <INDENT> def test_message_reply_to(self): <NEW_LINE> <INDENT> send_opts = self.get_sender_opts() <NEW_LINE> send_opts.msg_reply_to = 'examples' <NEW_LINE> recv_opts = self.get_receiver_opts() <NEW_LINE> recv_opts.process_reply_to = True <NEW_LINE> sent_mess... | receiver options test group | 62598f86a4f1c619b294e0d8 |
class PinnableItem(sgqlc.types.Union): <NEW_LINE> <INDENT> __schema__ = github_schema <NEW_LINE> __types__ = (Gist, Repository) | Types that can be pinned to a profile page. | 62598f8638b623060ffa8b81 |
class CNN: <NEW_LINE> <INDENT> def __init__(self, sentence_length, vocab_size, embedding_size, filter_sizes, num_filters, num_labels=1, l2_reg_lambda=0.0): <NEW_LINE> <INDENT> self.num_sampled = 64 <NEW_LINE> self.batch = tf.placeholder(tf.int32, [None, sentence_length], name='batch') <NEW_LINE> self.labels = tf.placeh... | a CNN model to get representations of tokens
--input: sentences, aka. sequences of words
--embedding layer
--multi conv layer
--pooling
--full connection
--manually drop-out
--negative-sampling | 62598f86c432627299fa2abb |
class GroceryItemTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> GroceryItem.objects.create( name='milk', amount=2, msg='for cake') <NEW_LINE> GroceryItem.objects.create( name='egg', amount=12, msg='for cake') <NEW_LINE> <DEDENT> def test_grocery_item(self): <NEW_LINE> <INDENT> grocery_item_mil... | Test module for GroceryItem model | 62598f8696565a6dacd2cced |
class SingleRNN(nn.Module): <NEW_LINE> <INDENT> def __init__( self, rnn_type, input_size, hidden_size, dropout=0, bidirectional=False ): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> rnn_type = rnn_type.upper() <NEW_LINE> assert rnn_type in [ "RNN", "LSTM", "GRU", ], f"Only support 'RNN', 'LSTM' and 'GRU', current ... | Container module for a single RNN layer.
args:
rnn_type: string, select from 'RNN', 'LSTM' and 'GRU'.
input_size: int, dimension of the input feature. The input should have shape
(batch, seq_len, input_size).
hidden_size: int, dimension of the hidden state.
dropout: float, dropout ratio... | 62598f86507cdc57c63a4878 |
class Khinchin(Constant): <NEW_LINE> <INDENT> def __init__(self, name='khinchin'): <NEW_LINE> <INDENT> conversions = dict(maxima='khinchin', mathematica='Khinchin', pynac='Khinchin') <NEW_LINE> Constant.__init__(self, name, conversions=conversions, domain='positive') <NEW_LINE> <DEDENT> def _mpfr_(self, R): <NEW_LINE> ... | The geometric mean of the continued fraction expansion of any
(almost any) real number.
EXAMPLES::
sage: float(khinchin)
2.6854520010653062
sage: khinchin.n(digits=60)
2.68545200106530644530971483548179569382038229399446295305115
sage: m = mathematica(khinchin); m # optional - mathemat... | 62598f86ec188e330fdf8389 |
class OneOf(BaseCompose): <NEW_LINE> <INDENT> def __init__(self, transforms, p=0.5): <NEW_LINE> <INDENT> super(OneOf, self).__init__(transforms, p) <NEW_LINE> transforms_ps = [t.p for t in transforms] <NEW_LINE> s = sum(transforms_ps) <NEW_LINE> self.transforms_ps = [t / s for t in transforms_ps] <NEW_LINE> <DEDENT> de... | Select one of transforms to apply
Args:
transforms (list): list of transformations to compose.
p (float): probability of applying selected transform. Default: 0.5. | 62598f86dc8b845886d530a1 |
class InlineArithmatexPattern(InlineProcessor): <NEW_LINE> <INDENT> ESCAPED_BSLASH = '%s%s%s' % (md_util.STX, ord('\\'), md_util.ETX) <NEW_LINE> def __init__(self, pattern, config): <NEW_LINE> <INDENT> self.generic = config.get('generic', False) <NEW_LINE> wrap = config.get('tex_inline_wrap', ["\\(", "\\)"]) <NEW_LINE>... | Arithmatex inline pattern handler. | 62598f8626238365f5fac659 |
class BankInitiatedReturnRisk(ModelNormal): <NEW_LINE> <INDENT> allowed_values = { } <NEW_LINE> validations = { } <NEW_LINE> additional_properties_type = None <NEW_LINE> _nullable = False <NEW_LINE> @cached_property <NEW_LINE> def openapi_types(): <NEW_LINE> <INDENT> lazy_import() <NEW_LINE> return { 'score': (SignalSc... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the a... | 62598f8629b78933be269e50 |
class ConceptItemsResource(Resource): <NEW_LINE> <INDENT> schema = { 'name': { 'type': 'string', 'required': True, 'empty': False }, 'code': Resource.rel( resource='concept_items', required=False, embeddable=False ), 'definition': { 'type': 'string', 'required': True, 'empty': False }, 'language': { 'type': 'string', '... | Concept item schema | 62598f863eb6a72ae038a11c |
class OpenShiftCLIConfig(object): <NEW_LINE> <INDENT> def __init__(self, rname, namespace, kubeconfig, options): <NEW_LINE> <INDENT> self.kubeconfig = kubeconfig <NEW_LINE> self.name = rname <NEW_LINE> self.namespace = namespace <NEW_LINE> self._options = options <NEW_LINE> <DEDENT> @property <NEW_LINE> def config_opti... | Generic Config | 62598f86bde94217f37073dc |
class LoginMixin(object): <NEW_LINE> <INDENT> def login(self): <NEW_LINE> <INDENT> username = self.request_input_data('username') <NEW_LINE> password = self.request_input_data('password') <NEW_LINE> self._authenticated_user = self.authenticate(username, password) <NEW_LINE> return self._authenticated_user <NEW_LINE> <D... | Basic login mixin.
This mixin will provide the mechanisms to authenticate a user. But it
doesn't provide authentication by itself.
It relies in the `authentication` method from other
Authentication services (like the one shown below).
You can plug any authentication service that you like, as long
as it keeps its inte... | 62598f868da39b475be02cd2 |
class PasswordGen(object): <NEW_LINE> <INDENT> def __init__(self, flags): <NEW_LINE> <INDENT> self._randSource = RandomWord(flags) <NEW_LINE> self._wordCount = flags.w <NEW_LINE> self._delimiter = flags.s <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def next(self): <NEW_LI... | Iterator that returns one password per iteration.
| 62598f86d99f1b3c44d0519a |
class TornadioRouter(object): <NEW_LINE> <INDENT> def __init__(self, connection, user_settings=dict(), namespace='socket.io', io_loop=None): <NEW_LINE> <INDENT> if version_info[0] < 2: <NEW_LINE> <INDENT> raise Exception('TornadIO2 requires Tornado 2.0 or higher.') <NEW_LINE> <DEDENT> self._connection = connection <NEW... | TornadIO2 router implementation | 62598f86b7558d589546311f |
class DataPriority(int): <NEW_LINE> <INDENT> SYSTEM = 0 <NEW_LINE> MODULE = 1 <NEW_LINE> MESSAGE = 2 | The object to indicate the priority of data for ModuleData | 62598f860fa83653e46f49db |
class OperationsService(base_api.BaseApiService): <NEW_LINE> <INDENT> _NAME = u'operations' <NEW_LINE> def __init__(self, client): <NEW_LINE> <INDENT> super(EdgemlV1beta1.OperationsService, self).__init__(client) <NEW_LINE> self._upload_configs = { } <NEW_LINE> <DEDENT> def Get(self, request, global_params=None): <NEW_... | Service class for the operations resource. | 62598f86596a89723612775f |
class State(object): <NEW_LINE> <INDENT> def __init__(self, start_state, transitions=None): <NEW_LINE> <INDENT> self.current_state = start_state <NEW_LINE> self.transitions = collections.defaultdict(list) <NEW_LINE> if transitions is not None: <NEW_LINE> <INDENT> for start, check, action, end in transitions: <NEW_LINE>... | State Machine Class.
Initializes to start_state, and optionally an iterator of states, or
an iterator of (start_state, end_state) transitions.
Errors: ValueError is raised if a transition is not allowed. | 62598f868e71fb1e983bb59e |
class Professor(CastleKilmereMember): <NEW_LINE> <INDENT> def __init__(self, name:str, birthyear:int, sex:str, subject:str, house: str = None): <NEW_LINE> <INDENT> super().__init__(name, birthyear, sex) <NEW_LINE> self.subject = subject <NEW_LINE> if house is not None: <NEW_LINE> <INDENT> self.house = house <NEW_LINE> ... | Creates a Castle Kilmere professor | 62598f8650485f2cf55daa60 |
class MultiAgentDialogWorld(World): <NEW_LINE> <INDENT> def __init__(self, opt, agents, shared=None): <NEW_LINE> <INDENT> super().__init__(opt) <NEW_LINE> if shared: <NEW_LINE> <INDENT> self.agents = create_agents_from_shared(shared['agents']) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.agents = agents <NEW_LINE... | Basic world where each agent gets a turn in a round-robin fashion.
Each agent receives as input the actions of all other agents since its last `act()`. | 62598f86b5575c28eb712a3e |
class ZipContentAddForm(base.AddForm): <NEW_LINE> <INDENT> form_fields = sco_form_fields <NEW_LINE> label = _(u"Add ZipContent") <NEW_LINE> form_name = _(u"Add ZipContent") <NEW_LINE> def create(self, data): <NEW_LINE> <INDENT> sco = createObject(u"eduintelligent.zipcontent.ZipContent") <NEW_LINE> form.applyChanges(sco... | Add form for projects
| 62598f8626238365f5fac65b |
class truncexpon_gen(rv_continuous): <NEW_LINE> <INDENT> def _argcheck(self, b): <NEW_LINE> <INDENT> self.b = b <NEW_LINE> return (b > 0) <NEW_LINE> <DEDENT> def _pdf(self, x, b): <NEW_LINE> <INDENT> return exp(-x)/(1-exp(-b)) <NEW_LINE> <DEDENT> def _logpdf(self, x, b): <NEW_LINE> <INDENT> return -x - log(1-exp(-b)) <... | A truncated exponential continuous random variable.
%(before_notes)s
Notes
-----
The probability density function for `truncexpon` is::
truncexpon.pdf(x, b) = exp(-x) / (1-exp(-b))
for ``0 < x < b``.
%(example)s | 62598f86a79ad16197769b4f |
class IDomainObjectModification(Interface): <NEW_LINE> <INDENT> u <NEW_LINE> def notify(self, entity, operation): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def notify_after_commit(self, entity, operation): <NEW_LINE> <INDENT> pass | Receives notification of new, changed and deleted datasets. | 62598f86fb3f5b602db47f27 |
class Pool(object): <NEW_LINE> <INDENT> def __init__(self, size=None, timeout=15): <NEW_LINE> <INDENT> self.size = size or cpu_count() <NEW_LINE> self.timeout = timeout <NEW_LINE> self.pool = [] <NEW_LINE> self._counter = 1 <NEW_LINE> self._q = Queue() <NEW_LINE> <DEDENT> def map(self, func, it): <NEW_LINE> <INDENT> wh... | Very basic process pool with timeout. | 62598f86009cb60464d01019 |
@method_decorator(csrf_exempt, name="dispatch") <NEW_LINE> class WebHook(View): <NEW_LINE> <INDENT> def post(self, request, *args, **kwargs): <NEW_LINE> <INDENT> body = smart_str(request.body) <NEW_LINE> data = json.loads(body) <NEW_LINE> if data['id'] == TEST_EVENT_ID: <NEW_LINE> <INDENT> logger.info("Test webhook rec... | A view used to handle webhooks. | 62598f86a8ecb03325870ced |
class NSURLSessionDownloadTaskSyntheticProvider(NSURLSessionTask.NSURLSessionTaskSyntheticProvider): <NEW_LINE> <INDENT> def __init__(self, value_obj, internal_dict): <NEW_LINE> <INDENT> super(NSURLSessionDownloadTaskSyntheticProvider, self).__init__(value_obj, internal_dict) <NEW_LINE> self.type_name = "NSURLSessionDo... | Class representing NSURLSessionDownloadTask. | 62598f86711fe17d825e01d8 |
class UserForm(forms.ModelForm): <NEW_LINE> <INDENT> name = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control s-form-v4__input', 'placeholder': '* João da Silva '})) <NEW_LINE> date_of_birth = FormattedDateField(widget=forms.DateInput(attrs={'class': 'form-control s-form-v4__input', 'placeholder': '*... | Define fields in user form. | 62598f86d4950a0f3b110bac |
class WeblateTranslation(WeblateBase): <NEW_LINE> <INDENT> name = 'Weblate' <NEW_LINE> def download_translations(self, language, text, unit, user): <NEW_LINE> <INDENT> matching_units = Unit.objects.same_source(unit) <NEW_LINE> return [ format_unit_match(munit, 100) for munit in matching_units if munit.has_acl(user) ] | Translation service using strings already translated in Weblate. | 62598f86d10714528d69d9be |
class AugustCivicHolidayMixin(Calendar): <NEW_LINE> <INDENT> def get_civic_holiday(self, year, label="Civic Holiday"): <NEW_LINE> <INDENT> return (self.get_nth_weekday_in_month(year, 8, MON), label) | 1st Monday of August; different names depending on location | 62598f86462c4b4f79dbb4f2 |
class HtmlMarkup(BaseMarkup): <NEW_LINE> <INDENT> codemirror_mode = 'text/html' <NEW_LINE> title = _("HTML") | Markup pseudo-transformer for HTML content.
This does not transform anything and thus is potentially harmful.
Use with care. | 62598f868a43f66fc4bf1c71 |
class DistributedLoad(AttrDisplay): <NEW_LINE> <INDENT> def __init__(self, parent, load_pattern, frame, fx=None, fy=None, fz=None): <NEW_LINE> <INDENT> self._parent = parent <NEW_LINE> self.load_pattern = load_pattern <NEW_LINE> self.frame = frame <NEW_LINE> self.system = 'local' <NEW_LINE> self.fx = fx <NEW_LINE> self... | Distributed load at frame.
Attributes
----------
load_pattern : str
Load pattern name.
frame : str
Frame name.
system: str
Coordinate system ('local' by default).
fx : float
Distributed force along x-axis.
fy : float
Distributed force along y-axis.
fz : float
Distributed force along z-axis.
Me... | 62598f860fa83653e46f49dd |
@python_2_unicode_compatible <NEW_LINE> class Build(models.Model): <NEW_LINE> <INDENT> project = models.ForeignKey(Project, verbose_name=_('Project'), related_name='builds') <NEW_LINE> version = models.ForeignKey(Version, verbose_name=_('Version'), null=True, related_name='builds') <NEW_LINE> type = models.CharField(_(... | Build data. | 62598f86ec188e330fdf838d |
class InvalidBSON(BSONError): <NEW_LINE> <INDENT> pass | Raised when trying to create a BSON object from invalid data. | 62598f86b5575c28eb712a3f |
class SuggestionCommandTest(RepoTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(SuggestionCommandTest, self).setUp() <NEW_LINE> self.component = self.create_component() <NEW_LINE> <DEDENT> def test_add_suggestions(self): <NEW_LINE> <INDENT> user = create_test_user() <NEW_LINE> call_command( 'a... | Test suggestion addding. | 62598f86d99f1b3c44d0519d |
class check_user_password_life_time(): <NEW_LINE> <INDENT> TITLE = 'Password Life Time' <NEW_LINE> CATEGORY = 'User' <NEW_LINE> TYPE = 'sql' <NEW_LINE> SQL = "SELECT profile, resource_name, limit FROM sys.dba_profiles WHERE resource_name='PASSWORD_LOCK_TIME' AND (limit='DEFAULT' OR limit='UNLIMITED' OR l... | check_user_password_life_time:
The password_life_time setting determines how long a password may be used
before the user is required to be change it. | 62598f8615baa72349461a6d |
class Initializer: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def initialize(self, shape): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def __call__(self, shape): <NEW_LINE> <INDENT> return self.initialize(shape) | Base-class for an Initializer, specifying a strategy for parameter
initialization. | 62598f868a349b6b43685d34 |
class LogFilter: <NEW_LINE> <INDENT> def __init__(self, logger_name): <NEW_LINE> <INDENT> self.logger_name = logger_name <NEW_LINE> <DEDENT> def filter(self, record): <NEW_LINE> <INDENT> return record.name == self.logger_name | Filters log messages not created by the provided logger name. | 62598f8682261d6c5272fc4c |
class ICategoryAxis(IAxis): <NEW_LINE> <INDENT> occurence.containing( occurence.ZeroOrOne('categoryNames', ICategoryNames), *IAxis.queryTaggedValue('directives', ()) ) <NEW_LINE> categoryNames = attr.Sequence( title='Category Names', description='A simple list of category names.', value_type=attr.Text(), required=False... | An axis displaying categories (instead of numerical values). | 62598f86a4f1c619b294e0dd |
class KerberosAuth(GatewayAuth): <NEW_LINE> <INDENT> auth_regex = re.compile(r"(?:.*,)*\s*Negotiate\s*([^,]*),?", re.I) <NEW_LINE> def pre_request(self, resp): <NEW_LINE> <INDENT> import kerberos <NEW_LINE> _, context = kerberos.authGSSClientInit( "HTTP@%s" % resp.url.host, gssflags=kerberos.GSS_C_MUTUAL_FLAG | kerbero... | Authenticate with kerberos | 62598f86bde94217f37073de |
class CovariateParameterMappings: <NEW_LINE> <INDENT> INTERCEPT_COL = "Intercept" <NEW_LINE> def __init__(self, seed_mapping: Dict, df: pd.DataFrame, force_intercept: bool = False, force_no_intercept: bool = False): <NEW_LINE> <INDENT> self.mappings = {} <NEW_LINE> self.force_intercept = force_intercept <NEW_LINE> self... | This class controls the mapping, possible trivial, between covariates and parameters. User, or lifelines, create
a seed mapping, and this class takes over and creates logic and pieces to make the transformation simple.
Ideally all transformation of datasets to parameters handled by this class.
Parameters
-----------
... | 62598f86c432627299fa2ac0 |
class Area(models.Model): <NEW_LINE> <INDENT> objects = AreaManager() <NEW_LINE> japanese_name = models.CharField(max_length=255, blank=True) <NEW_LINE> roman_name = models.CharField(max_length=255, unique=True) <NEW_LINE> modern_name = models.ForeignKey('ModernArea', blank=True, null=True) <NEW_LINE> x_coordinate = m... | Name of 18th/19th century Japanese area | 62598f8621a7993f00c65a64 |
class ExecDocumentCommand(sublime_plugin.TextCommand): <NEW_LINE> <INDENT> def run(self, edit): <NEW_LINE> <INDENT> an.attach(self.view, edit) <NEW_LINE> an.exec_(an.text(self.view)) | 执行当前文件内的语句 | 62598f86a05bb46b3848a36b |
class NotFoundError(ArdoqClientException): <NEW_LINE> <INDENT> pass | Specified room or user not found. | 62598f868a43f66fc4bf1c73 |
class ControlListerUI(QtWidgets.QWidget): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> super(ControlListerUI, self).__init__(parent) <NEW_LINE> self.model = None <NEW_LINE> self.modelControls = [] <NEW_LINE> self.namespace = None <NEW_LINE> self.gui() <NEW_LINE> self.connectSignals() <NEW_LI... | widget for listing all controls under a namespace | 62598f866fece00bbaccb479 |
class User(AbstractUser): <NEW_LINE> <INDENT> pass | 用户 | 62598f8673bcbd0ca4bc9d43 |
class RACFLoginMixin: <NEW_LINE> <INDENT> racf_app_row = 3 <NEW_LINE> racf_app_column = 15 <NEW_LINE> def login(self): <NEW_LINE> <INDENT> self.term_emulator.wait_for_field() <NEW_LINE> if self.racf_app_row is not None: <NEW_LINE> <INDENT> self.term_emulator.move_to(self.racf_app_row, self.racf_app_column) <NEW_LINE> <... | RACF Login Session to a 3270 Terminal
This mixin adds the RACF login process to a Session3270 class. | 62598f86f8510a7c17d7deef |
class BulkCampaignNegativeLocationTarget(_BulkNegativeLocationTarget, _BulkSubTargetCampaignMixin): <NEW_LINE> <INDENT> def __init__(self, city_target=None, metro_area_target=None, state_target=None, country_target=None, postal_code_target=None, status=None, target_id=None, campaign_id=None, campaign_name=None, ): <NEW... | Represents a negative geographical location target that is associated with a campaign.
This class exposes the :attr:`city_target`, :attr:`metro_area_target`, :attr:`state_target`,
:attr:`country_target`, and :attr:`postal_code_target`.
Each sub type can be read and written as fields of the Campaign Location Target rec... | 62598f86f7d966606f747ad9 |
class Header(models.Model): <NEW_LINE> <INDENT> created_at = models.DateTimeField(auto_now_add=True, verbose_name=_("Created at")) <NEW_LINE> updated_at = models.DateTimeField(auto_now=True, verbose_name=_("Updated at")) <NEW_LINE> identifier = models.TextField(unique=True, verbose_name=_("Identifier")) <NEW_LINE> time... | Header ORM Model. | 62598f86ec188e330fdf838f |
class SupportTicket(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=100) <NEW_LINE> phone_number = PhoneNumberField( help_text='Must include international prefix - e.g. +1 555 555 55555' ) <NEW_LINE> description = models.TextField(help_text='A description of your problem') <NEW_LINE> timestamp = m... | A support ticket submitted by an unsatisfied customer :( | 62598f86d53ae8145f917f80 |
class Field: <NEW_LINE> <INDENT> _blacklist = [ "_blacklist", "construct", "label", "name", "sanitize", "type", "validate", ] <NEW_LINE> def __get__(self, instance, owner): <NEW_LINE> <INDENT> if instance is None: <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> if hasattr(self, "callback"): <NEW_LINE> <INDENT> retu... | Basic field descriptor
The idea of fields is to use them as class attributes when coding,
but they should also contain useful information for web display.
As an example, a field ``equation`` should only be manipulated
as a (SymPy) mathematical equation, but when exported, it should
contain additional information (meta... | 62598f866aa9bd52df0d49ce |
class StreamingDistributionConfig(AWSProperty): <NEW_LINE> <INDENT> props: PropsDictType = { "Aliases": ([str], False), "Comment": (str, True), "Enabled": (boolean, True), "Logging": (StreamingDistributioniLogging, False), "PriceClass": (priceclass_type, False), "S3Origin": (S3Origin, True), "TrustedSigners": (TrustedS... | `StreamingDistributionConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-streamingdistribution-streamingdistributionconfig.html>`__ | 62598f8623e79379d538bfed |
class ExpressionStatement(object): <NEW_LINE> <INDENT> openapi_types = { 'type': 'str', 'expression': 'Expression' } <NEW_LINE> attribute_map = { 'type': 'type', 'expression': 'expression' } <NEW_LINE> def __init__(self, type=None, expression=None): <NEW_LINE> <INDENT> self._type = None <NEW_LINE> self._expression = No... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually. | 62598f86a79ad16197769b53 |
class BhKeyCommand(sublime_plugin.WindowCommand): <NEW_LINE> <INDENT> def run( self, threshold=True, lines=False, adjacent=False, no_outside_adj=False, no_block_mode=False, ignore=None, plugin=None ): <NEW_LINE> <INDENT> if ignore is None: <NEW_LINE> <INDENT> ignore = {} <NEW_LINE> <DEDENT> if plugin is None: <NEW_LINE... | Command to process shortcuts, menu calls, and command palette calls.
This is how BhCore is called with different options. | 62598f860a366e3fb87dc4bf |
class NoteBook(db.Model): <NEW_LINE> <INDENT> user_nickname=db.StringProperty() <NEW_LINE> user_name=db.StringProperty() <NEW_LINE> user_network=db.StringProperty() <NEW_LINE> user_id=db.StringProperty() <NEW_LINE> user_name_network_id=db.StringProperty() <NEW_LINE> notebook_name=db.StringProperty() <NEW_LINE> access=d... | Entity for Notebook | 62598f8671ff763f4b5e7260 |
class AppleFeedbackConnection(AppleConnection): <NEW_LINE> <INDENT> def establish(self): <NEW_LINE> <INDENT> self.lib.call('feedback_connect', [self.ctx_handle]) <NEW_LINE> self._established = True <NEW_LINE> <DEDENT> def get_stale_recipients(self): <NEW_LINE> <INDENT> if not self.is_established(): <NEW_LINE> <INDENT> ... | Used to connect to Apple Feedback service. | 62598f8645492302aabfbfd0 |
class ArRatioInputKeydrive(object): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> __repr__ = _swig_repr <NEW_LINE> def __init__(self, *args): <NEW_LINE> <INDENT> this = _AriaPy.new_ArRatioInputKeydrive(*args) <NEW_LINE> try: self.t... | Proxy of C++ ArRatioInputKeydrive class | 62598f86d99f1b3c44d0519f |
class ExtensionOpsMixin(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def _add_arithmetic_ops(cls): <NEW_LINE> <INDENT> cls.__add__ = cls._create_arithmetic_method(operator.add) <NEW_LINE> cls.__radd__ = cls._create_arithmetic_method(ops.radd) <NEW_LINE> cls.__sub__ = cls._create_arithmetic_method(operator.sub) ... | A base class for linking the operators to their dunder names | 62598f8610dbd63aa1c706a5 |
class BaseSchema(base_schema.ObjType, MappingSchema): <NEW_LINE> <INDENT> output_zero_step = SchemaNode(Bool()) <NEW_LINE> output_last_step = SchemaNode(Bool()) <NEW_LINE> output_timestep = SchemaNode(extend_colander.TimeDelta(), missing=drop) | Base schema for all outputters - they all contain the following | 62598f86596a897236127764 |
class CMFFileAdapter(CMFContentAdapter): <NEW_LINE> <INDENT> adapts(IFile) <NEW_LINE> def addSearchableTextField(self, icc): <NEW_LINE> <INDENT> title = self._c(self.context.Title()) <NEW_LINE> icc.addContent('SearchableText', title, self.language) <NEW_LINE> description = self._c(self.context.Description()) <NEW_LINE>... | An adapter for CMFDefault files.
| 62598f8650485f2cf55daa65 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.