code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class _DeltaParser: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> object.__init__(self) <NEW_LINE> self.delta = 0 <NEW_LINE> <DEDENT> def __call__(self, token): <NEW_LINE> <INDENT> error = False <NEW_LINE> try: <NEW_LINE> <INDENT> start = 2 if token[1] == '-' else 1 <NEW_LINE> delta = int(token[start:].st... | Парсер короткой опции <Delta>
Использование:
- добавить в список L{optionHandlers<ChainData.optionHandlers>}
объекта класса L{ChainData}
- выполнить разбор строки
- вызвать метод L{apply} для применения параметра <Delta> к объекту
класса L{DateCondition<DateCondition.DateCondition>} | 62598fb38a349b6b436862e7 |
class CommitmentStatus(models.Model): <NEW_LINE> <INDENT> commitment = models.ForeignKey(Commitment) <NEW_LINE> parent_snapshot = models.ForeignKey(CommitmentDailySnapshot) <NEW_LINE> time_accomplished = models.DateTimeField(blank=True, null=True) <NEW_LINE> comment = models.CharField(max_length=140, blank=True, null=T... | The progress of one specific commitment on one specific day | 62598fb3a8370b77170f0488 |
class ExternalNode(gpi.NodeAPI): <NEW_LINE> <INDENT> def initUI(self): <NEW_LINE> <INDENT> self.addWidget('PushButton', 'SVD Econ', toggle=True) <NEW_LINE> self.addInPort('input', 'NPYarray', obligation=gpi.REQUIRED) <NEW_LINE> self.addOutPort('U', 'NPYarray') <NEW_LINE> self.addOutPort('S', 'NPYarray') <NEW_LINE> self... | Usage svd: [-e] <input> <U> <S> <VH>
Compute singular-value-decomposition (SVD). | 62598fb3167d2b6e312b701e |
class IPiwikSettings(Interface): <NEW_LINE> <INDENT> piwik_server = schema.TextLine(title=_(u"Piwik server URL"), description=u'Where is your piwik located? e.g. http://demo.piwik.org ', required=True, default = u'', ) <NEW_LINE> piwik_siteid = schema.TextLine(title=_(u"Piwik site id"), description=u'integer siteId', r... | Piwik settings. | 62598fb326068e7796d4ca02 |
class UserList(TrapDjangoValidationErrorCreateMixin, UserMixin, ListCreateAPIView): <NEW_LINE> <INDENT> permission_classes = ( And(IsUserActive, IsAuthenticated, Or(IsAdminSuperUser, IsAdministrator, And(IsReadOnly, Or(IsDefaultUser, IsAnyProjectUser) ) ) ), ) <NEW_LINE> pagination_class = SmallResultsSetPagination <NE... | User list endpoint. | 62598fb35166f23b2e243486 |
class InvalidToken(Exception): <NEW_LINE> <INDENT> pass | Token is invalid or expired | 62598fb355399d3f056265c5 |
class NodeAuthSSHKey(object): <NEW_LINE> <INDENT> def __init__(self, pubkey): <NEW_LINE> <INDENT> self.pubkey = pubkey <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return '<NodeAuthSSHKey>' | An SSH key to be installed for authentication to a node.
This is the actual contents of the users ssh public key which will
normally be installed as root's public key on the node.
>>> pubkey = '...' # read from file
>>> from libcloud.compute.base import NodeAuthSSHKey
>>> k = NodeAuthSSHKey(pubkey)
>>> k
<NodeAuthSSHKe... | 62598fb37d43ff2487427458 |
class UserMixin(object): <NEW_LINE> <INDENT> email = EmailProperty(unique_index=True) <NEW_LINE> hashed_password = StringProperty() <NEW_LINE> @property <NEW_LINE> def password(self): <NEW_LINE> <INDENT> raise AttributeError('Password is not readable attribute') <NEW_LINE> <DEDENT> @password.setter <NEW_LINE> def passw... | User auth values | 62598fb37047854f4633f487 |
class ViewPostHandler(Handler): <NEW_LINE> <INDENT> def get(self, id): <NEW_LINE> <INDENT> posts = db.GqlQuery("SELECT * FROM Post ") <NEW_LINE> post_id = Post.get_by_id(int(id)) <NEW_LINE> self.render("view-post.html", post_id = post_id) | Uses webapp2.route route to show a single blog post when the link is clicked
or a new post is created | 62598fb3fff4ab517ebcd891 |
class TestProcessWrap(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.process = AFunctionToWrap() <NEW_LINE> self.process.fname = "fname" <NEW_LINE> self.process.directory = "directory" <NEW_LINE> self.process.value = 1.2 <NEW_LINE> self.process.enum = "choice1" <NEW_LINE> self.process... | Class to test the function used to wrap a function to a process
| 62598fb338b623060ffa9148 |
@register <NEW_LINE> class Request(BaseSchema): <NEW_LINE> <INDENT> __props__ = { "seq": { "type": "integer", "description": "Sequence number." }, "type": { "type": "string", "enum": [ "request" ] }, "command": { "type": "string", "description": "The command to execute." }, "arguments": { "type": [ "array", "boolean", ... | A client or server-initiated request.
Note: automatically generated code. Do not edit manually. | 62598fb367a9b606de54607b |
class ProvisionServiceView(MSSPBaseAuth, FormView): <NEW_LINE> <INDENT> template_name = 'mssp/simple_demo.html' <NEW_LINE> form_class = forms.Form <NEW_LINE> success_url = '/mssp/services' <NEW_LINE> def form_valid(self, form): <NEW_LINE> <INDENT> service_name = self.request.POST.get('service_id', '') <NEW_LINE> custom... | Provision Service View - This view uses the Base Auth and Form View
The posted view is actually a dynamically generated form so the forms.Form will actually be blank
use form_valid as it will always be true in this case. | 62598fb37b25080760ed755d |
class HostsConfig(AppConfig): <NEW_LINE> <INDENT> name = 'django_hosts' <NEW_LINE> verbose_name = _('Hosts') <NEW_LINE> def ready(self): <NEW_LINE> <INDENT> checks.register(check_root_hostconf) <NEW_LINE> checks.register(check_default_host) <NEW_LINE> if getattr(settings, 'HOST_OVERRIDE_URL_TAG', False): <NEW_LINE> <IN... | The django-hosts app config that conditionally adds its url to the
built-ins of Django if the HOST_OVERRIDE_URL_TAG setting is set. | 62598fb3ff9c53063f51a6f9 |
class ExposeProcess(ExposeObjectPlugin): <NEW_LINE> <INDENT> full_model_name = "flow.Process" <NEW_LINE> def filter_objects( self, user: UserClass, queryset: QuerySet, data: Data ) -> QuerySet: <NEW_LINE> <INDENT> processes_of_inputs = queryset.filter(data__in=data.parents.all()) <NEW_LINE> return queryset.filter_for_u... | Expose the Process model. | 62598fb3091ae35668704cca |
class DatabaseIdentity(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'tenant_id': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{Databa... | Azure Active Directory identity configuration for a resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar type: The identity type. Possible values include: "None", "UserAssigned".
:vartype type: str or ~azure.mgmt.sql.models.DatabaseIdentityType
:ivar tenant_id: The A... | 62598fb32ae34c7f260ab188 |
class Suscription(models.Model): <NEW_LINE> <INDENT> shift = models.ForeignKey(Shift) <NEW_LINE> student = models.ForeignKey(Student) <NEW_LINE> state = models.CharField(max_length = 32) <NEW_LINE> suscription_date = models.DateField(default = timezone.now) <NEW_LINE> resolve_date = models.DateField(null=True) <NEW_LIN... | The Subscriptions are actually the reflection of the action, performed by a
Student, of applying to be enrrolled to a given Course. It is not the
enrollement, only the request to be accepted. It can either be aproved or
discarded. | 62598fb321bff66bcd722d13 |
class Graveyard(Card_container): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(type(self)) <NEW_LINE> self.name = 'yard' <NEW_LINE> self.container = self.initialize_container() <NEW_LINE> self.size = self.container_size() | sets the graveyard card container. | 62598fb33317a56b869be5a2 |
class EntryNotFoundError(Exception): <NEW_LINE> <INDENT> def __init__(self, table, entry_id): <NEW_LINE> <INDENT> super(EntryNotFoundError, self).__init__("") <NEW_LINE> self.message = "The {} with id {} was not found".format( table, entry_id) <NEW_LINE> self.table = table <NEW_LINE> self.entry_id = entry_id | This is the error thrown when an entry was not found in the database.
May be associated to single-item UPDATE or DELETE operations.
The id of the entry/item is stored in EntryNotFoundError.entry_id | 62598fb3be7bc26dc9251eb2 |
class PublicUserApiTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.client = APIClient() <NEW_LINE> <DEDENT> def test_create_valid_user_success(self): <NEW_LINE> <INDENT> payload = { 'email': 'test@email.com', 'password': 'testpass', 'name': 'Test Name' } <NEW_LINE> res = self.client.post(... | Test the users API (public). | 62598fb3aad79263cf42e87f |
class Signable(object): <NEW_LINE> <INDENT> def __init__(self, network_id, message): <NEW_LINE> <INDENT> self.network_id = network_id <NEW_LINE> self._message = message <NEW_LINE> self._hash = None <NEW_LINE> if not COLLATERAL_ASSET_ID_BY_NETWORK_ID[self.network_id]: <NEW_LINE> <INDENT> raise ValueError( 'Unknown netwo... | Base class for an object signable with a STARK key. | 62598fb356b00c62f0fb2964 |
class MerlinBuffer(sublime_plugin.EventListener): <NEW_LINE> <INDENT> _process = None <NEW_LINE> error_messages = [] <NEW_LINE> def process(self, view): <NEW_LINE> <INDENT> if not self._process: <NEW_LINE> <INDENT> self._process = merlin_process(view.file_name()) <NEW_LINE> <DEDENT> return self._process <NEW_LINE> <DED... | Synchronize the current buffer with Merlin and:
- autocomplete words with type informations;
- display errors in the gutter. | 62598fb35fc7496912d482d2 |
class ResourceMoveDetails(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'operation_in_progress': {'key': 'operationInProgress', 'type': 'str'}, 'operation_in_progress_lock_timeout_in_utc': {'key': 'operationInProgressLockTimeoutInUTC', 'type': 'iso-8601'}, } <NEW_LINE> def __init__( self, *, opera... | Fields for tracking resource move.
:param operation_in_progress: Denotes whether move operation is in progress. Possible values
include: "None", "ResourceMoveInProgress", "ResourceMoveFailed".
:type operation_in_progress: str or
~azure.mgmt.databoxedge.v2021_02_01_preview.models.ResourceMoveStatus
:param operation_i... | 62598fb34527f215b58e9f81 |
class PostForm(Form): <NEW_LINE> <INDENT> title = StringField('Title', [DataRequired(), Length(max=255)]) <NEW_LINE> text = TextAreaField('Blog Content', [DataRequired()]) | Post Form. | 62598fb32c8b7c6e89bd3871 |
class InvalidAuthType(StrcredException): <NEW_LINE> <INDENT> pass | Raised when a user provides an invalid identifier for the
authentication plugin (known as the authType). | 62598fb38a349b6b436862e9 |
class User(AbstractUser): <NEW_LINE> <INDENT> GENDER_MALE = "male" <NEW_LINE> GENDER_FEMALE = "female" <NEW_LINE> GENDER_OTHER = "other" <NEW_LINE> GENDER_CHOICES = ( (GENDER_MALE, "Male"), (GENDER_FEMALE, "Female"), (GENDER_OTHER, "Other"), ) <NEW_LINE> LANGUAGE_ENGLISH = "en" <NEW_LINE> LANGUAGE_DUTCH = "nl" <NEW_LIN... | Custom User Model | 62598fb463d6d428bbee285a |
class SelectFlid: <NEW_LINE> <INDENT> def __init__(self, X, Y, fwd_batch_size, batch_size, optimizer, loss): <NEW_LINE> <INDENT> self.X = X <NEW_LINE> self.Y = Y <NEW_LINE> self.loss = loss <NEW_LINE> self.candidate_points = [] <NEW_LINE> self.fwd_batch_size = fwd_batch_size <NEW_LINE> self.batch_size =batch_size <NEW_... | --------------------------------------------------------------------------------------------------------
Facitliy Location submodular functions is defined as follows
Flid(S) = \sum_{i=1}^|S| u(s_i) + \sum_{d=1}^D (max_{i\in S} (W_{i, d} - \sum{i\in S} W_{i, d})
u: denotes the modular value. In our case we interpret as ... | 62598fb4dc8b845886d53664 |
class TestRevisionsControllerNegativeRBAC(test_base.BaseControllerTest): <NEW_LINE> <INDENT> def test_list_revisions_except_forbidden(self): <NEW_LINE> <INDENT> rules = {'deckhand:list_revisions': 'rule:admin_api'} <NEW_LINE> self.policy.set_rules(rules) <NEW_LINE> resp = self.app.simulate_get( '/api/v1.0/revisions', h... | Test suite for validating negative RBAC scenarios for revisions
controller. | 62598fb460cbc95b063643f2 |
@mock.patch('qutebrowser.config.configtypes.os.path', autospec=True) <NEW_LINE> class DirectoryTests(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.t = configtypes.Directory() <NEW_LINE> <DEDENT> def test_validate_empty(self, _os_path): <NEW_LINE> <INDENT> with self.assertRaises(confi... | Test Directory. | 62598fb438b623060ffa914a |
class PostListHandler(webapp2.RequestHandler): <NEW_LINE> <INDENT> def get(self, offset, limit): <NEW_LINE> <INDENT> if not (offset and limit): <NEW_LINE> <INDENT> self.response.write(json.encode(common.get_error_object( 'wrong input, ' + self.request.path))) <NEW_LINE> return <NEW_LINE> <DEDENT> posts_data = get_posts... | Handles list all posts. | 62598fb47047854f4633f489 |
class FortranWriter(DataWriter, FortranSpecs): <NEW_LINE> <INDENT> def __init__(self, *args, reclen = 4, **kwargs): <NEW_LINE> <INDENT> self._set_reclen(reclen) <NEW_LINE> super().__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def _init(self): <NEW_LINE> <INDENT> super()._init() <NEW_LINE> self.rpos = 0 <NEW_LINE> <DEDE... | Class for writing 'unformatted' Fortran binary files.
Based on DataWriter, automatic compression support. | 62598fb4460517430c4320b5 |
class ComplexRepository: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__repo = [] <NEW_LINE> <DEDENT> def store(self, number): <NEW_LINE> <INDENT> self.__repo.append(number) <NEW_LINE> <DEDENT> def size(self): <NEW_LINE> <INDENT> return len(self.__repo) <NEW_LINE> <DEDENT> def delete_everything(self... | Manage a list of Complex objects | 62598fb4ff9c53063f51a6fb |
class LearningRecipientForm(forms.Form): <NEW_LINE> <INDENT> recipient = forms.ChoiceField( label=None, choices=[] ) <NEW_LINE> ltype = forms.ChoiceField( label="", choices=[("spam", "spam"), ("ham", "ham")], widget=forms.widgets.HiddenInput ) <NEW_LINE> selection = forms.CharField( label="", widget=forms.widgets.Hidde... | A form to select the recipient of a learning request. | 62598fb4442bda511e95c505 |
class TaskCreateSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Task <NEW_LINE> fields = ('width', 'height', 'image') | Serializer for Task model | 62598fb45fdd1c0f98e5e03c |
class BSTnode: <NEW_LINE> <INDENT> def __init__(self, k) -> None: <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.key = k <NEW_LINE> self.size = 1 <NEW_LINE> self.disconnect() <NEW_LINE> <DEDENT> def disconnect(self): <NEW_LINE> <INDENT> self.parent = None <NEW_LINE> self.left = None <NEW_LINE> self.right = None... | 二叉搜索树的节点 | 62598fb44a966d76dd5eef85 |
class Relu(Node): <NEW_LINE> <INDENT> def __init__(self, x, name='Relu'): <NEW_LINE> <INDENT> Node.__init__(self, [x], name=name) <NEW_LINE> <DEDENT> def forward(self, kvargs): <NEW_LINE> <INDENT> x = self.inbound_nodes[0].value <NEW_LINE> mask = x > 0 <NEW_LINE> self.value = x * mask <NEW_LINE> <DEDENT> def backward(s... | Implements ReLu activation function | 62598fb499cbb53fe6830f82 |
class UserModel(Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> table_name = USER_TABLE <NEW_LINE> region = "us-east-2" <NEW_LINE> <DEDENT> email = UnicodeAttribute(hash_key=True) <NEW_LINE> active = BooleanAttribute(default=False) <NEW_LINE> first_name = UnicodeAttribute() <NEW_LINE> last_name = UnicodeAtt... | A DynamoDB User | 62598fb4009cb60464d015cf |
class RandomIdentitySampler(Sampler): <NEW_LINE> <INDENT> def __init__(self, data_source, num_instances=4): <NEW_LINE> <INDENT> super(RandomIdentitySampler).__init__() <NEW_LINE> self.data_source = data_source <NEW_LINE> self.num_instances = num_instances <NEW_LINE> self.index_dic = defaultdict(list) <NEW_LINE> for ind... | Randomly sample N identities, then for each identity,
randomly sample K instances, therefore batch size is N*K.
Code imported from https://github.com/Cysu/open-reid/blob/master/reid/utils/data/sampler.py.
Args:
data_source (Dataset): dataset to sample from.
num_instances (int): number of instances per identit... | 62598fb4baa26c4b54d4f364 |
class CommentViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> serializer_class = CommentSerializer <NEW_LINE> queryset = Comment.objects.all() | A viewset for viewing and editing commnet instances. | 62598fb457b8e32f52508173 |
class WebServer(Thread): <NEW_LINE> <INDENT> def __init__(self, host, port): <NEW_LINE> <INDENT> super(WebServer, self).__init__() <NEW_LINE> LOG.info("Creating TCPServer...") <NEW_LINE> root = getattr(sys, '_MEIPASS', abspath(dirname(__file__) + '/..')) <NEW_LINE> self.daemon = True <NEW_LINE> self.dir = os.path.join(... | Web server for devices connected to the temporary access point | 62598fb4627d3e7fe0e06f5d |
class NewCategoryView(View): <NEW_LINE> <INDENT> tempate_name: str = 'linktosite/new_category.html' <NEW_LINE> def get(self, request): <NEW_LINE> <INDENT> form = CategoryForm() <NEW_LINE> context = {'form': form} <NEW_LINE> return render(request, self.tempate_name, context) <NEW_LINE> <DEDENT> def post(self, request): ... | Создание новой категории | 62598fb456b00c62f0fb2966 |
class TestInventoryViewSchema(unittest.TestCase): <NEW_LINE> <INDENT> def test_post_schema(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> Draft4Validator.check_schema(inventory.InventoryView.POST_SCHEMA) <NEW_LINE> schema_valid = True <NEW_LINE> <DEDENT> except RuntimeError: <NEW_LINE> <INDENT> schema_valid = Fals... | A set of tes cases for the schemas in /api/1/inf/inventory end points | 62598fb48a349b6b436862eb |
class DoFnState(object): <NEW_LINE> <INDENT> def __init__(self, counter_factory): <NEW_LINE> <INDENT> self.step_name = '' <NEW_LINE> self._counter_factory = counter_factory <NEW_LINE> <DEDENT> def counter_for(self, aggregator): <NEW_LINE> <INDENT> return self._counter_factory.get_aggregator_counter( self.step_name, agg... | For internal use only; no backwards-compatibility guarantees.
Keeps track of state that DoFns want, currently, user counters. | 62598fb40fa83653e46f4f8f |
class WRPNQuantizer(Quantizer): <NEW_LINE> <INDENT> def __init__(self, model, optimizer, bits_activations=32, bits_weights=32, bits_overrides=OrderedDict(), quantize_bias=False): <NEW_LINE> <INDENT> super(WRPNQuantizer, self).__init__(model, optimizer=optimizer, bits_activations=bits_activations, bits_weights=bits_weig... | Quantizer using the WRPN quantization scheme, as defined in:
Mishra et al., WRPN: Wide Reduced-Precision Networks (https://arxiv.org/abs/1709.01134)
Notes:
1. This class does not take care of layer widening as described in the paper
2. The paper defines special handling for 1-bit weights which isn't supported ... | 62598fb45166f23b2e24348a |
class UserHistory(View, ToolClass): <NEW_LINE> <INDENT> def get(self, request, area_id): <NEW_LINE> <INDENT> user_id = request.user.id <NEW_LINE> task_model_class = self._get_tool_model(self._get_task_model_name()) <NEW_LINE> user_history = self._get_tool_model('userhistory').objects.filter(user_id=user_id) <NEW_LINE> ... | Generate the content for the user history tab using a user id.
This is a GET only view, so only the get function is defined. An area id is provided in the
request and used to get all TaskModels for a user over a given area.
Abstract properties and methods are used to define the required attributes for an implementati... | 62598fb426068e7796d4ca06 |
class Query(object): <NEW_LINE> <INDENT> def __init__(self, CollectionClass, db=None): <NEW_LINE> <INDENT> self._db = db <NEW_LINE> self._CollectionClass = CollectionClass <NEW_LINE> self._bind_vars = {'@collection': self._CollectionClass.__collection__} <NEW_LINE> <DEDENT> def count(self): <NEW_LINE> <INDENT> return s... | Class used for querying records from an arangodb collection using a database connection | 62598fb466673b3332c3047c |
class RemoteUserLocalAuthenticator(RemoteUserAuthenticator, LocalAuthenticator): <NEW_LINE> <INDENT> pass | Accept the authenticated user name from the REMOTE_USER HTTP header.
Derived from LocalAuthenticator for use of features such as adding
local accounts through the admin interface. | 62598fb44f6381625f199518 |
class BuildListHandler(view_base.BaseHandler): <NEW_LINE> <INDENT> def get(self, prefix, job): <NEW_LINE> <INDENT> job_dir = '/%s/%s/' % (prefix, job) <NEW_LINE> fstats = view_base.gcs_ls(job_dir) <NEW_LINE> fstats.sort(key=lambda f: view_base.pad_numbers(f.filename), reverse=True) <NEW_LINE> self.render('build_list.ht... | Show a list of Builds for a Job. | 62598fb44428ac0f6e6585cf |
class AutoScrollMonitorCommand(sublime_plugin.WindowCommand): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> keep = Preferences().get('auto_scroll', True) <NEW_LINE> Preferences().set('auto_scroll', not keep) <NEW_LINE> <DEDENT> def is_checked(self): <NEW_LINE> <INDENT> return Preferences().get('auto_scroll', T... | The scroll goes automatically to the last line when this option.
Extends: sublime_plugin.WindowCommand | 62598fb4460517430c4320b6 |
class EmailAuthBackend(object): <NEW_LINE> <INDENT> def authenticate(self, username=None, password=None): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> user = User.objects.get(email=username) <NEW_LINE> if user.check_password(password): <NEW_LINE> <INDENT> return user <NEW_LINE> <DEDENT> return None <NEW_LINE> <DEDENT> ... | Authentication using email | 62598fb47047854f4633f48a |
class Config(object): <NEW_LINE> <INDENT> def __init__(self, user_code, app_code, nodeApi, mspDir, httpcert, app_public_cert_path, user_private_cert_path, debug=False): <NEW_LINE> <INDENT> self.user_code = user_code <NEW_LINE> self.app_code = app_code <NEW_LINE> self.nodeApi = nodeApi <NEW_LINE> self.mspDir = mspDir <N... | Define a generic configuration | 62598fb48a43f66fc4bf222a |
class SecurityPolicyWebApplicationFirewallParameters(SecurityPolicyParameters): <NEW_LINE> <INDENT> _validation = { 'type': {'required': True}, } <NEW_LINE> _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'waf_policy': {'key': 'wafPolicy', 'type': 'ResourceReference'}, 'associations': {'key': 'associations',... | The json object containing security policy waf parameters.
All required parameters must be populated in order to send to Azure.
:param type: Required. The type of the Security policy to create.Constant filled by server.
Possible values include: "WebApplicationFirewall".
:type type: str or ~azure.mgmt.cdn.models.Secu... | 62598fb47c178a314d78d54d |
class GetRealAvailRatioResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.AvgAvailRatio = None <NEW_LINE> self.LowestAvailRatio = None <NEW_LINE> self.LowestProvince = None <NEW_LINE> self.LowestIsp = None <NEW_LINE> self.ProvinceData = None <NEW_LINE> self.AvgTime = None <NEW_LIN... | GetRealAvailRatio返回参数结构体
| 62598fb4097d151d1a2c10de |
class QuantitativeQuestion(Question): <NEW_LINE> <INDENT> INPUT_TYPE_CHOICES = ( ('range', _('Slider')), ('number', _('Numeric text')), ('buttons', _('Buttons')), ) <NEW_LINE> objects = RatingStatisticsManager() <NEW_LINE> left_anchor = models.TextField(blank=True, default='', help_text=_('This label describes what the... | A ``QuantitativeQuestion`` is a question that asks for a number.
Attributes:
INPUT_TYPE_CHOICES (tuple): Input type choices, each of which is a
two-element tuple consisting of the shorthand and the name of an
input type. Current options are:
* `range`: Render the question as a "slider".
... | 62598fb4fff4ab517ebcd896 |
class GradientBoostingClassifier(BaseEstimator, ClassifierMixin): <NEW_LINE> <INDENT> def __init__(self, params=None, objective='binary:logistic', n_rounds=100, num_class=-1): <NEW_LINE> <INDENT> if params is None: <NEW_LINE> <INDENT> self.params = { 'max_depth' : 4, 'eta' : 0.3, 'silent' : 1, 'objective': objective, }... | Gradient boosting classifier implementation
Args:
params (dict): Model parameters. If None, use default pre-set values.
objective (str): Prediction objecitve. Currently, only 'binary:*' and 'multi:softprob'
have been tested.
n_rounds (int): Number of training rounds.
num_class (int): Number of diff... | 62598fb491f36d47f2230f00 |
class UploadFileRequest(BaseRequest): <NEW_LINE> <INDENT> def __init__(self, bucket_name, cos_path, local_path, biz_attr=u'', insert_only=1): <NEW_LINE> <INDENT> super(UploadFileRequest, self).__init__(bucket_name, cos_path) <NEW_LINE> self._local_path = local_path.strip() <NEW_LINE> self._biz_attr = biz_attr <NEW_LINE... | UploadFileRequest 单文件上传请求 | 62598fb4a17c0f6771d5c2e5 |
class FPSDisplay(NumericText): <NEW_LINE> <INDENT> def __init__(self, x, y, font_colour, font_size, font_name='DEFAULT'): <NEW_LINE> <INDENT> super(FPSDisplay, self).__init__('fps', 'fps', 'FPS: %5.2f', colour=font_colour, font_size=font_size, value=0, font_name=font_name) <NEW_LINE> self.setLayerName('ui') <NEW_LINE> ... | Displays the current FPS on the screen | 62598fb457b8e32f52508174 |
class SideEffectsBurningBuildingEnvironment(safety_game.SafetyEnvironment): <NEW_LINE> <INDENT> def __init__(self, level=0): <NEW_LINE> <INDENT> value_mapping = { WALL_CHR: 0.0, ' ': 1.0, AGENT_CHR: 2.0, OBSTACLE_CHR: 3.0, GOAL_CHR: 4.0, FIRE_CHR: 5.0 } <NEW_LINE> super(SideEffectsBurningBuildingEnvironment, self).__in... | Python environment for the side effects burning building environment. | 62598fb460cbc95b063643f5 |
class RetroNoteBoards(ViewSet): <NEW_LINE> <INDENT> def create(self, request): <NEW_LINE> <INDENT> new_retro_note_board = RetroNoteBoard() <NEW_LINE> new_retro_note_board.retro_id = request.data["retro_id"] <NEW_LINE> new_retro_note_board.note_board_id = request.data["note_board_id"] <NEW_LINE> new_retro_note_board.sav... | note boards for iZenAPI | 62598fb4236d856c2adc9497 |
class Tplink1DeviceScanner(DeviceScanner): <NEW_LINE> <INDENT> def __init__(self, config): <NEW_LINE> <INDENT> host = config[CONF_HOST] <NEW_LINE> username, password = config[CONF_USERNAME], config[CONF_PASSWORD] <NEW_LINE> self.parse_macs = re.compile('[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-' + '[0-9A-F]{2}-[0-9A-F]{2}-[... | This class queries a wireless router running TP-Link firmware. | 62598fb4a8370b77170f048d |
class MatingScheme(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, **kwargs): <NEW_LINE> <INDENT> _simuPOP_muop.MatingScheme_swiginit(self, _simuPOP_muop.new_MatingS... | Details:
This mating scheme is the base class of all mating schemes. It
evolves a population generation by generation but does not
actually transmit genotype. | 62598fb430bbd722464699d1 |
class Printer(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.path = settings.MEDIA_ROOT + 'pdf/' <NEW_LINE> self.name = None <NEW_LINE> <DEDENT> def loadTemplate(self, templateName, parameters): <NEW_LINE> <INDENT> t = get_template(templateName) <NEW_LINE> self.texText = t.render(Context(para... | A class to create a assessment PDF, it can be a Qualitative Questionnaire, an
OpticalSheet ...
:version:
:author: | 62598fb4627d3e7fe0e06f5f |
class MsrIPPort(object): <NEW_LINE> <INDENT> def __init__(self, ip, port): <NEW_LINE> <INDENT> self.ip = ip <NEW_LINE> self.port = port <NEW_LINE> <DEDENT> def __call__(self): <NEW_LINE> <INDENT> ip = self.ip <NEW_LINE> port = self.port <NEW_LINE> time.sleep(random.randint(0, 60)) <NEW_LINE> self.start_time = time.time... | measurement class for ip and port | 62598fb476e4537e8c3ef657 |
class TestXenonntMuvetoInstallApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = xepmts_staging.api.xenonnt_muveto_install_api.XenonntMuvetoInstallApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_get_xenonnt_muveto_installs(self... | XenonntMuvetoInstallApi unit test stubs | 62598fb4bd1bec0571e1511a |
class TestDwollaCiExample(unittest.TestCase): <NEW_LINE> <INDENT> def test_command_line_interface(self): <NEW_LINE> <INDENT> runner = CliRunner() <NEW_LINE> result = runner.invoke(cli.main) <NEW_LINE> assert result.exit_code == 0 <NEW_LINE> assert 'Hello, World!' in result.output <NEW_LINE> help_result = runner.invoke(... | Tests for `dwolla_ci_python_example` package. | 62598fb43d592f4c4edbaf71 |
class ExitPoll(models.Model): <NEW_LINE> <INDENT> eleccion = models.ForeignKey(Eleccion, null=True) <NEW_LINE> candidatos = models.ForeignKey(Candidatos) <NEW_LINE> user_create = models.ForeignKey(User, null=True, blank=True, related_name='+') <NEW_LINE> user_update = models.ForeignKey(User, null=True, blank=True, rela... | Registro de Votos | 62598fb4f9cc0f698b1c5324 |
class CreatePartitionResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Result = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("Result") is not None: <NEW_LINE> <INDENT> self.Result = JgwOperateResponse(... | CreatePartition response structure.
| 62598fb44428ac0f6e6585d1 |
class IFoldable(zope.interface.Interface): <NEW_LINE> <INDENT> pass | Marker for blocks that can be folded in the UI. | 62598fb456ac1b37e630229c |
class DebianSssd(Sssd, DebianPlugin, UbuntuPlugin): <NEW_LINE> <INDENT> def setup(self): <NEW_LINE> <INDENT> super(DebianSssd, self).setup() <NEW_LINE> self.add_copy_spec("/etc/default/sssd") | sssd-related Diagnostic Information on Debian based distributions
| 62598fb44e4d5625663724d9 |
class RemovePhotosOperation(ViewfinderOperation): <NEW_LINE> <INDENT> def __init__(self, client, user, ep_dicts): <NEW_LINE> <INDENT> super(RemovePhotosOperation, self).__init__(client) <NEW_LINE> self._op = Operation.GetCurrent() <NEW_LINE> self._client = client <NEW_LINE> self._user = user <NEW_LINE> self._ep_dicts =... | The RemovePhotos operation follows the four phase pattern described in the header of
operation_map.py. | 62598fb4ff9c53063f51a6ff |
class Line(Drawable): <NEW_LINE> <INDENT> end_point: Point <NEW_LINE> color: str <NEW_LINE> def __init__(self, color: str, start_point: Union[Point, Tuple[float, float]] = (0, 0), end_point: Union[Point, Tuple[float, float]] = (0, 0)): <NEW_LINE> <INDENT> super().__init__(start_point) <NEW_LINE> self.color = color <NEW... | Drawable class that contains information about a line (two coordinates on an (x, y) plane
| 62598fb48a43f66fc4bf222c |
class kSphere(USphere._uSphere): <NEW_LINE> <INDENT> def __init__(self,**kw): <NEW_LINE> <INDENT> self.color=kw.get("color",WHITE) <NEW_LINE> USphere._uSphere.__init__(self,**kw) <NEW_LINE> self._radiusSquared=2 <NEW_LINE> self._radius=sqrt(2) <NEW_LINE> self._center=_rPoint(0,0,1,append=False) <NEW_LINE> self.update()... | :constructors:
- kSphere()
:returns: a sphere of radius sqrt(2) centered at (0,0,1)
:site ref: http://mathworld.wolfram.com/InversionSphere.html
| 62598fb491f36d47f2230f01 |
class TicketBundle(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'ticket_bundles' <NEW_LINE> id = db.Column(db.Uuid, default=generate_uuid, primary_key=True) <NEW_LINE> created_at = db.Column(db.DateTime, default=datetime.utcnow, nullable=False) <NEW_LINE> ticket_category_id = db.Column(db.Uuid, db.ForeignKey('ticket_... | A set of tickets of the same category and with with a common
owner, seat manager, and user manager, respectively. | 62598fb47d847024c075c46f |
class _AstroObjectFigs(_GlobalFigure): <NEW_LINE> <INDENT> def __init__(self, objectList, size='small'): <NEW_LINE> <INDENT> _GlobalFigure.__init__(self, size) <NEW_LINE> self.objectList = objectList <NEW_LINE> self._objectType = self._getInputObjectTypes() <NEW_LINE> <DEDENT> def _getInputObjectTypes(self): <NEW_LINE>... | contains extra functions for dealing with input of astro objects
| 62598fb4aad79263cf42e885 |
class ApplicationGatewayBackendAddressPool(SubResource): <NEW_LINE> <INDENT> _validation = { 'provisioning_state': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'... | Backend Address Pool of an application gateway.
Variables are only populated by the server, and will be ignored when sending a request.
:param id: Resource ID.
:type id: str
:param name: Name of the backend address pool that is unique within an Application Gateway.
:type name: str
:param etag: A unique read-only stri... | 62598fb4d7e4931a7ef3c146 |
class CZPowGate(eigen_gate.EigenGate, gate_features.TwoQubitGate, gate_features.InterchangeableQubitsGate): <NEW_LINE> <INDENT> def _eigen_components(self): <NEW_LINE> <INDENT> return [ (0, np.diag([1, 1, 1, 0])), (1, np.diag([0, 0, 0, 1])), ] <NEW_LINE> <DEDENT> def _apply_unitary_(self, args: protocols.ApplyUnitaryAr... | A gate that applies a phase to the |11⟩ state of two qubits.
The unitary matrix of `CZPowGate(exponent=t)` is:
[[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[0, 0, 0, g]]
where:
g = exp(i·π·t/2).
`cirq.CZ`, the controlled Z gate, is an instance of this gate at
`exponent=1`. | 62598fb457b8e32f52508175 |
class CryptoCur(object): <NEW_LINE> <INDENT> PoW = False <NEW_LINE> chain_index = 0 <NEW_LINE> coin_name = '' <NEW_LINE> code = '' <NEW_LINE> p2pkh_version = 0 <NEW_LINE> p2sh_version = 0 <NEW_LINE> wif_version = 0 <NEW_LINE> ext_pub_version = '' <NEW_LINE> ext_priv_version = '' <NEW_LINE> DUST_THRESHOLD = 5430 <NEW_LI... | Abstract class containing cryptocurrency-specific code | 62598fb410dbd63aa1c70c68 |
class RegistrationView(MethodView): <NEW_LINE> <INDENT> def post(self): <NEW_LINE> <INDENT> user = User.query.filter_by(email=request.data['email']).first() <NEW_LINE> if not user: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> post_data = request.data <NEW_LINE> email = post_data['email'] <NEW_LINE> password = post_data... | This class registers a new user. | 62598fb456ac1b37e630229d |
class NsipIdentity(IanaInterfaceTypeIdentity): <NEW_LINE> <INDENT> _prefix = 'ianaift' <NEW_LINE> _revision = '2014-05-08' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> IanaInterfaceTypeIdentity.__init__(self) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def _meta_info(): <NEW_LINE> <INDENT> from ydk.models.ietf._... | XNS over IP. | 62598fb4236d856c2adc9498 |
class DyStockBackTestingStrategyEngineProxyThread(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, eventEngine): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._eventEngine = eventEngine <NEW_LINE> self._queue = queue.Queue() <NEW_LINE> self._threads = [] <NEW_LINE> self._childQueues = [] <NEW_LINE> se... | 以线程方式启动一个周期的策略回测, 主要做调试用 | 62598fb4a8370b77170f048f |
class DxUserObject(object): <NEW_LINE> <INDENT> _default = {'use_email_as_username': True, 'use_uuid_as_userid': True} <NEW_LINE> def __init__(self, context): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> <DEDENT> def getUserId(self): <NEW_LINE> <INDENT> if self._use_uuid_as_userid(): <NEW_LINE> <INDENT> return... | Base Behavioral Methods for Membrane User
| 62598fb432920d7e50bc6107 |
class DDMShapeError(DDMError): <NEW_LINE> <INDENT> pass | shapes are inconsistent | 62598fb44f88993c371f0565 |
class TestCertifyingOrganisationView(TestCase): <NEW_LINE> <INDENT> @override_settings(VALID_DOMAIN=['testserver', ]) <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.client = Client() <NEW_LINE> self.client.post( '/set_language/', data={'language': 'en'}) <NEW_LINE> logging.disable(logging.CRITICAL) <NEW_LINE> sel... | Test that Certifying Organisation View works. | 62598fb4be383301e02538ae |
class OrdineProduzione(Document): <NEW_LINE> <INDENT> ordine_numero = StringField(max_length=10, required=True, primary_key=True) <NEW_LINE> committenti = StringField(max_length=100) <NEW_LINE> corsi = StringField(max_length=200) <NEW_LINE> persona_di_riferimento = StringField() <NEW_LINE> cup = StringField(max_length=... | Definisce l'ordine di produzione per i corsi. | 62598fb4091ae35668704cd2 |
class ControlBusSetContiguousRequest(Request): <NEW_LINE> <INDENT> __slots__ = ( '_index_values_pairs', ) <NEW_LINE> def __init__( self, index_values_pairs=None, ): <NEW_LINE> <INDENT> Request.__init__(self) <NEW_LINE> if index_values_pairs: <NEW_LINE> <INDENT> pairs = [] <NEW_LINE> for index, values in index_values_pa... | A /c_setn request.
::
>>> from supriya.tools import requesttools
>>> request = requesttools.ControlBusSetContiguousRequest(
... index_values_pairs=[
... (0, (0.1, 0.2, 0.3)),
... (4, (0.4, 0.5, 0.6)),
... ],
... )
>>> request
ControlBusSetContiguousR... | 62598fb4fff4ab517ebcd899 |
class IPSec(ExtensionOnlyType_): <NEW_LINE> <INDENT> c_tag = 'IPSec' <NEW_LINE> c_namespace = NAMESPACE <NEW_LINE> c_children = ExtensionOnlyType_.c_children.copy() <NEW_LINE> c_attributes = ExtensionOnlyType_.c_attributes.copy() <NEW_LINE> c_child_order = ExtensionOnlyType_.c_child_order[:] <NEW_LINE> c_cardinality = ... | The urn:oasis:names:tc:SAML:2.0:ac:classes:TLSClient:IPSec element | 62598fb4cc0a2c111447b0c6 |
class StrongInfect(Spatial): <NEW_LINE> <INDENT> def __init__(self, popsize: int, pss: float, rstart: float, alpha: int, side: float, S0:int, I0:int, w0: float): <NEW_LINE> <INDENT> super(StrongInfect, self).__init__(popsize, pss, rstart, alpha, side, S0, I0, w0=0.5) <NEW_LINE> <DEDENT> def _infect(self, inf: Person, s... | Contains the same attributes as the Spatial base class. The only difference is in the _infect function,
where implementation is different according to the Strong Infectious model presumptions. One difference is
the w0 variable is defaulted to 0.5 if no value is passed in. This model assumes that super spreaders are
int... | 62598fb4442bda511e95c50b |
class DetailsView(generics.RetrieveUpdateDestroyAPIView): <NEW_LINE> <INDENT> queryset = BucketList.objects.all() <NEW_LINE> serializer_class = BucketSerializer | Handles the not crete stuff | 62598fb4d486a94d0ba2c085 |
class KNearestNeighbor(object): <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> <INDE... | a kNN classifier with L2 distance | 62598fb48e7ae83300ee9158 |
class GitHubError(Exception): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> message = self.response.json()['message'] <NEW_LINE> <DEDENT> except Exception: <NEW_LINE> <INDENT> message = None <NEW_LINE> <DEDENT> return "%s: %s" % (self.response.status_code, message) <NEW_LINE> <DEDE... | Raised if a request fails to the GitHub API. | 62598fb4498bea3a75a57bd4 |
class TestProductExtensionInterface(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 testProductExtensionInterface(self): <NEW_LINE> <INDENT> model = swagger_client.models.product_extension_interfac... | ProductExtensionInterface unit test stubs | 62598fb44e4d5625663724da |
class SimplyhentaiVideoExtractor(Extractor): <NEW_LINE> <INDENT> category = "simplyhentai" <NEW_LINE> subcategory = "video" <NEW_LINE> directory_fmt = ("{category}", "{type}s") <NEW_LINE> filename_fmt = "{title}{episode:?_//>02}.{extension}" <NEW_LINE> archive_fmt = "{title}_{episode}" <NEW_LINE> pattern = r"(?:https?:... | Extractor for hentai videos from simply-hentai.com | 62598fb421bff66bcd722d1b |
class WXFToken(object): <NEW_LINE> <INDENT> __slots__ = "wxf_type", "array_type", "length", "_dimensions", "_element_count", "data" <NEW_LINE> def __init__(self, wxf_type): <NEW_LINE> <INDENT> self.wxf_type = wxf_type <NEW_LINE> self._dimensions = None <NEW_LINE> self._element_count = None <NEW_LINE> self.data = None <... | Represent a WXF element, often referred as WXF tokens.
| 62598fb4009cb60464d015d5 |
class Query(SiteCommand): <NEW_LINE> <INDENT> __options = OptionSet( Option.choice('format', choices=['json', 'text']), Option.flag('current-patchset'), Option.flag('patch-sets'), Option.flag('all-approvals'), Option.flag('files'), Option.flag('comments'), Option.flag('dependencies'), Option.flag('submit-records', spec... | Command to execute queries on reviews
:param option_str:
One or more supported options to be passed to the command
:note: In order to ensure that the necessary information is returned
to allow creation of the `Review` objects, many of the options
will be overridden by `execute_on`. The f... | 62598fb444b2445a339b69cc |
class ServiceDescription(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.nodename = None <NEW_LINE> self.container_id = None <NEW_LINE> self.service = None <NEW_LINE> self.service_instance = None <NEW_LINE> self.service_type = None <NEW_LINE> self.version = None <NEW_LINE> self.rados_config_lo... | For responding to queries about the status of a particular service,
stateful or stateless.
This is not about health or performance monitoring of services: it's
about letting the orchestrator tell Ceph whether and where a
service is scheduled in the cluster. When an orchestrator tells
Ceph "it's running on node123", t... | 62598fb4379a373c97d990c9 |
class PositionalEncoding(nn.Module): <NEW_LINE> <INDENT> def __init__(self, d_model, dropout, device="cpu", max_len = 10000): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.pe = torch.zeros(max_len, d_model) <NEW_LINE> pos = torch.arange(0,max_len).unsqueeze(1).type(torch.float32) <NEW_LINE> tmp = torch.arange(... | 位置エンコーディング
args:
- d_model (int) : ベクトルの次元数
- dropout (float)
- device
- max_len (int) : 許容しうる最大の長さの文章 | 62598fb43d592f4c4edbaf74 |
@registered <NEW_LINE> class DrumTable(Table): <NEW_LINE> <INDENT> def __init__(self, mod, meta): <NEW_LINE> <INDENT> super().__init__(mod, meta) | Table of Drum Properties
| 62598fb4796e427e5384e848 |
class Player(): <NEW_LINE> <INDENT> def __init__(self, username): <NEW_LINE> <INDENT> self.username= username <NEW_LINE> self.uuid = None <NEW_LINE> self.skinURI = None <NEW_LINE> <DEDENT> async def get_uuid(self): <NEW_LINE> <INDENT> if self.uuid == None: <NEW_LINE> <INDENT> resp = await mojangapi.perform_request( moj... | def create(username):
self = Player()
self.username= username
self.uuid = None
self.skinURI = None
return self | 62598fb4be7bc26dc9251eb6 |
class Distance(distance.Distance): <NEW_LINE> <INDENT> def __init__(self, seq_records, word_size, disttype='jaccard'): <NEW_LINE> <INDENT> self._vector = [_getwords(s, word_size) for s in seq_records.seq_list] <NEW_LINE> self.set_disttype(disttype) <NEW_LINE> <DEDENT> def pwdist_jaccard(self, seq1idx, seq2idx): <NEW_LI... | Combine vector data with pairwise distance methods that measures
dissimilarity between sets. | 62598fb4adb09d7d5dc0a640 |
class SwitchModel(ndb.Model): <NEW_LINE> <INDENT> value = ndb.PickleProperty() | A datastore model for storing switches.
Used by datastoredict. | 62598fb4a219f33f346c68b9 |
class TestDA(ut.TestCase): <NEW_LINE> <INDENT> def test_chuck_cache(self): <NEW_LINE> <INDENT> dalist = h5p.create(h5p.DATASET_ACCESS) <NEW_LINE> nslots = 10000 <NEW_LINE> nbytes = 1000000 <NEW_LINE> w0 = .5 <NEW_LINE> dalist.set_chunk_cache(nslots, nbytes, w0) <NEW_LINE> self.assertEqual((nslots, nbytes, w0), dalist.g... | Feature: setting/getting chunk cache size on a dataset access property list | 62598fb476e4537e8c3ef65b |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.