code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class DistinguishedFolderId(FolderId): <NEW_LINE> <INDENT> ELEMENT_NAME = "DistinguishedFolderId" <NEW_LINE> mailbox = MailboxField() <NEW_LINE> def clean(self, version=None): <NEW_LINE> <INDENT> from .folders import PublicFoldersRoot <NEW_LINE> super().clean(version=version) <NEW_LINE> if self.id == PublicFoldersRoot.... | MSDN: https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/distinguishedfolderid | 62598fa2dd821e528d6d8dac |
@six.add_metaclass(AsdfTypeMeta) <NEW_LINE> @six.add_metaclass(InheritDocstrings) <NEW_LINE> class AsdfType(object): <NEW_LINE> <INDENT> name = None <NEW_LINE> organization = 'stsci.edu' <NEW_LINE> standard = 'asdf' <NEW_LINE> version = (0, 1, 0) <NEW_LINE> types = [] <NEW_LINE> @classmethod <NEW_LINE> def make_yaml_ta... | The base class of all custom types in the tree.
Besides the attributes defined below, most subclasses will also
override `to_tree` and `from_tree`.
To customize how the type's schema is located, override `get_schema_path`.
Attributes
----------
name : str
The name of the type.
organization : str
The organiz... | 62598fa2435de62698e9bc6b |
class SmtpServerResponse(object): <NEW_LINE> <INDENT> swagger_types = { 'items': 'list[SmtpServer]' } <NEW_LINE> attribute_map = { 'items': 'items' } <NEW_LINE> required_args = { } <NEW_LINE> def __init__( self, items=None, ): <NEW_LINE> <INDENT> if items is not None: <NEW_LINE> <INDENT> self.items = items <NEW_LINE> <... | Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition. | 62598fa267a9b606de545e42 |
class FmtStr(object): <NEW_LINE> <INDENT> def __init__(self, execute_fmt, offset = None, padlen = 0, numbwritten = 0): <NEW_LINE> <INDENT> self.execute_fmt = execute_fmt <NEW_LINE> self.offset = offset <NEW_LINE> self.padlen = padlen <NEW_LINE> self.numbwritten = numbwritten <NEW_LINE> if self.offset == None: <NEW_LINE... | Provides an automated format string exploitation.
It takes a function which is called every time the automated
process want to communicate with the vulnerable process. this
function takes a parameter with the payload that you have to
send to the vulnerable process and must return the process
returns.
If the `offset` ... | 62598fa22ae34c7f260aaf58 |
class ClassBalancedSampler(Sampler): <NEW_LINE> <INDENT> def __init__(self, num_per_class, num_cl, num_inst, shuffle=True): <NEW_LINE> <INDENT> self.num_per_class = num_per_class <NEW_LINE> self.num_cl = num_cl <NEW_LINE> self.num_inst = num_inst <NEW_LINE> self.shuffle = shuffle <NEW_LINE> <DEDENT> def __iter__(self):... | Samples 'num_inst' examples each from 'num_cl' pools
of examples of size 'num_per_class' | 62598fa21f5feb6acb162a9a |
class Rb2PyError: <NEW_LINE> <INDENT> pass | Custom marker for thrown exceptions | 62598fa2d58c6744b42dc20f |
class Membership(ModelBase): <NEW_LINE> <INDENT> __tablename__ = "membership" <NEW_LINE> __table_args__ = (UniqueConstraint("user_id", "lexicon_id"),) <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> user_id = Column(Integer, ForeignKey("user.id"), nullable=False) <NEW_LINE> lexicon_id = Column(Integer, For... | Represents a user's participation in a Lexicon game. | 62598fa27d43ff248742733e |
class TableReference(proto.Message): <NEW_LINE> <INDENT> project_id = proto.Field( proto.STRING, number=1, ) <NEW_LINE> dataset_id = proto.Field( proto.STRING, number=2, ) <NEW_LINE> table_id = proto.Field( proto.STRING, number=3, ) <NEW_LINE> project_id_alternative = proto.RepeatedField( proto.STRING, number=4, ) <NEW... | Attributes:
project_id (str):
Required. The ID of the project containing
this table.
dataset_id (str):
Required. The ID of the dataset containing
this table.
table_id (str):
Required. The ID of the table. The ID must contain only
letters (a-z, A-Z), numbers (0... | 62598fa28e7ae83300ee8f18 |
class Registration(Artifact): <NEW_LINE> <INDENT> __tablename__ = 'registration' <NEW_LINE> id = Column(Integer, ForeignKey('artifact.id'), primary_key=True) <NEW_LINE> __mapper_args__ = {"polymorphic_identity": "registration"} | Unused in our version of the system. | 62598fa26e29344779b004d4 |
class Home(RequestHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> services = teams = [] <NEW_LINE> pending_count = 0 <NEW_LINE> if self.current_user: <NEW_LINE> <INDENT> services = [self.get_service(n) for n in self.current_user['services']] <NEW_LINE> teams = [self.get_team(n) for n in self.current_us... | Home page: Form to login or link to create new account. | 62598fa20a50d4780f705253 |
class IoK8sApiCoreV1DownwardAPIProjection(object): <NEW_LINE> <INDENT> swagger_types = { 'items': 'list[IoK8sApiCoreV1DownwardAPIVolumeFile]' } <NEW_LINE> attribute_map = { 'items': 'items' } <NEW_LINE> def __init__(self, items=None): <NEW_LINE> <INDENT> self._items = None <NEW_LINE> self.discriminator = None <NEW_LINE... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598fa20a50d4780f705254 |
class DescribeDeviceClassRequest(AbstractModel): <NEW_LINE> <INDENT> pass | DescribeDeviceClass请求参数结构体
| 62598fa21f037a2d8b9e3f62 |
class CalculateNumberOfBands: <NEW_LINE> <INDENT> def __init__(self, filePath): <NEW_LINE> <INDENT> self.text = open(filePath, 'r').readlines() <NEW_LINE> self.parser = b_PyParse.MainSCFParser(self.text) <NEW_LINE> self.parser.parse() <NEW_LINE> <DEDENT> def getNumberOfBands(self, spCalc, soCalc, orbCalc, wCalc): <NEW_... | Used to calculate the number of bands within the *.scf file to
determine the input for the write_w2win function.
You pass a file path to the *.scf in order to carry out this
calculation | 62598fa291af0d3eaad39c85 |
class BaseLoggingObj(object): <NEW_LINE> <INDENT> def __init__(self, config=Config): <NEW_LINE> <INDENT> logging.basicConfig(level=config.logging_level, format='%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s', datefmt='%a, %d %b %Y %H:%M:%S', filename=config.logging_file, filemode='a') <NEW_LINE> s... | config的默认参数是com.Config 可通过构造修改 | 62598fa2d268445f26639abf |
class Integer(Number): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return str(self.value) <NEW_LINE> <DEDENT> def eval(self): <NEW_LINE> <INDENT> return self | An atom that holds an integer number.
| 62598fa2e5267d203ee6b786 |
class MakeBlastDb(object): <NEW_LINE> <INDENT> def __init__(self, fasta, out_name=None): <NEW_LINE> <INDENT> self.__fasta = fasta <NEW_LINE> self.__out_name = out_name <NEW_LINE> <DEDENT> def launch(self): <NEW_LINE> <INDENT> options = ['makeblastdb', '-in', self.__fasta, '-dbtype', 'nucl'] <NEW_LINE> if self.__out_nam... | The class implements a wrapper to launch makeblastdb from the
NCBI BLAST+ package. | 62598fa2462c4b4f79dbb885 |
class DeadConnection(Exception): <NEW_LINE> <INDENT> pass | Raised when the connection is lost. | 62598fa2be8e80087fbbeed9 |
class TestAccountDataApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = swagger_client.apis.account_data_api.AccountDataApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_v1exchangebanksummary(self): <NEW_LINE> <INDENT> pass <NEW_... | AccountDataApi unit test stubs | 62598fa2bd1bec0571e15000 |
class Database(object): <NEW_LINE> <INDENT> pass | Real database access. | 62598fa26aa9bd52df0d4d43 |
class JogoMarcela: <NEW_LINE> <INDENT> def __init__(self, legendas=LEGENDAS, momentos=MOMENTOS): <NEW_LINE> <INDENT> self.quadros = momentos <NEW_LINE> telas = {nome: ACTIV.format(quadro, momento) for nome, (quadro, momento) in zip(legendas, momentos)} <NEW_LINE> print({te: ur[-18:] for te, ur in telas.items()}) <NEW_L... | Constroi o jogo completo da Marcela.
:param legendas: lista contendo nomes das cenas *[<nome da cena>, ...]*
:param momentos: lista de tuplas indicando o quadro e o momento *[(<q0>, <m0>), ... ]* | 62598fa201c39578d7f12bf8 |
class NodeStatus(Enum): <NEW_LINE> <INDENT> ACTIVE = 0 <NEW_LINE> LEAVING = 1 <NEW_LINE> FROZEN = 2 <NEW_LINE> IN_MAINTENANCE = 3 <NEW_LINE> LEFT = 4 <NEW_LINE> NOT_CREATED = 5 | This class contains possible node statuses | 62598fa2cb5e8a47e493c0b3 |
class GTFFeature(object): <NEW_LINE> <INDENT> def __init__(self, chrom=None, source=None, featuretype=None, start=None, end=None, score=None, strand=None, phase=None, attributes=None): <NEW_LINE> <INDENT> self._chrom = chrom <NEW_LINE> self._source = source <NEW_LINE> self._featuretype = featuretype <NEW_LINE> self._st... | Retrieve line from GFFfile class, and return information line by line. | 62598fa2a8ecb03325871088 |
class DetailProduct(DetailView): <NEW_LINE> <INDENT> context_object_name = "product" <NEW_LINE> model = Product <NEW_LINE> template_name = "products/detail_product.html" | This generic view renders detail_product template wich shows informations about a product | 62598fa2796e427e5384e60d |
class I0(UnaryScalarOp): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def st_impl(x): <NEW_LINE> <INDENT> return scipy.special.i0(x) <NEW_LINE> <DEDENT> def impl(self, x): <NEW_LINE> <INDENT> if imported_scipy_special: <NEW_LINE> <INDENT> return self.st_impl(x) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> super(I0, se... | Modified Bessel function of order 0. | 62598fa230bbd722464698b4 |
class WrappedFile: <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> self.file = open(path, "r") <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> return self.file.__iter__() <NEW_LINE> <DEDENT> def readline(self): <NEW_LINE> <INDENT> return self.file.readline().lstrip() | File object that returns all lines striped on the left. | 62598fa23cc13d1c6d4655e6 |
class BreadthFirst: <NEW_LINE> <INDENT> k = 0 <NEW_LINE> @classmethod <NEW_LINE> def g(cls, parentnode: Node, action, childnode: Node): <NEW_LINE> <INDENT> return len(childnode.path()) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def h(cls, state): <NEW_LINE> <INDENT> return cls.k | BredthFirst - breadthfirst search | 62598fa2d7e4931a7ef3bf14 |
class CronosException(Exception): <NEW_LINE> <INDENT> pass | General parsing errors. | 62598fa2adb09d7d5dc0a404 |
class RegisteredServerArray(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[RegisteredServer]'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(RegisteredServerArray, self).__init__(**kwargs) <NEW_LINE> self.value = kwargs.get('value', None... | Array of RegisteredServer.
:param value: Collection of Registered Server.
:type value: list[~azure.mgmt.storagesync.models.RegisteredServer] | 62598fa2fbf16365ca793f35 |
class leoCompare (baseLeoCompare): <NEW_LINE> <INDENT> pass | A class containing Leo's compare code. | 62598fa2baa26c4b54d4f12a |
class Role(ChangeLoggedModel): <NEW_LINE> <INDENT> name = models.CharField( max_length=100, unique=True ) <NEW_LINE> slug = models.SlugField( max_length=100, unique=True ) <NEW_LINE> weight = models.PositiveSmallIntegerField( default=1000 ) <NEW_LINE> description = models.CharField( max_length=200, blank=True, ) <NEW_L... | A Role represents the functional role of a Prefix or VLAN; for example, "Customer," "Infrastructure," or
"Management." | 62598fa238b623060ffa8f0e |
class ServiceError(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'possible_causes': {'key': 'possibleCauses', 'type': 'str'}, 'recommended_action': {'key': 'recommendedAction', 'type': 'str'}, 'activity_id': {'ke... | ASR error model.
:param code: Error code.
:type code: str
:param message: Error message.
:type message: str
:param possible_causes: Possible causes of error.
:type possible_causes: str
:param recommended_action: Recommended action to resolve error.
:type recommended_action: str
:param activity_id: Activity Id.
:type a... | 62598fa24f88993c371f0447 |
class RespPublicKeys: <NEW_LINE> <INDENT> def __init__(self, rsa_pub_key, paillier_pub_key): <NEW_LINE> <INDENT> self.rsa_pub_key = rsa_pub_key <NEW_LINE> self.paillier_pub_key = paillier_pub_key <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_dictionary(cls, params): <NEW_LINE> <INDENT> rsa_pub_key = RSA.importKe... | response contain public keys | 62598fa256b00c62f0fb272c |
class DBContext: <NEW_LINE> <INDENT> def __init__(self, sql_server): <NEW_LINE> <INDENT> self.sql_server = sql_server <NEW_LINE> self.db_engine = None <NEW_LINE> self.db_session = None <NEW_LINE> self.db_connection = None <NEW_LINE> self.db_error = None <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> self.... | Simple helper class to setup and sql engine, a database session
and a connection.
NOTE: The error property should be always checked inside the
with statement to verify that the engine/connection/session
setup was successful. | 62598fa2090684286d593618 |
class TimerLog(list): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._entire_formatted_log = '' <NEW_LINE> super(TimerLog, self).__init__() <NEW_LINE> <DEDENT> def addTimer(self, loggedTimer=None, name='undefined', startedAt=None, endedAt=None): <NEW_LINE> <INDENT> loggedTimer = {'name': name} <NEW_LI... | Persistent log of used Timers. | 62598fa263d6d428bbee262c |
class ModelException(Exception): <NEW_LINE> <INDENT> def __init__(self, msg, *args): <NEW_LINE> <INDENT> if args: <NEW_LINE> <INDENT> msg = msg % args <NEW_LINE> <DEDENT> self.msg = msg <NEW_LINE> Exception.__init__(self, msg) | Base Exception. | 62598fa299cbb53fe6830d4e |
class OrgTeacherView(View): <NEW_LINE> <INDENT> def get(self, request, org_id): <NEW_LINE> <INDENT> current_page = "teacher" <NEW_LINE> course_org = CourseOrg.objects.get(id=int(org_id)) <NEW_LINE> has_fav = False <NEW_LINE> if request.user.is_authenticated(): <NEW_LINE> <INDENT> if UserFavorite.objects.filter(user=req... | 机构教师 | 62598fa2d53ae8145f918307 |
class BanUserForm(forms.Form): <NEW_LINE> <INDENT> username = forms.TextField(lazy_gettext(u'Username'), required=True) <NEW_LINE> def validate_username(self, value): <NEW_LINE> <INDENT> user = User.query.filter_by(username=value).first() <NEW_LINE> if user is None: <NEW_LINE> <INDENT> raise forms.ValidationError(_(u'N... | Used to ban new users. | 62598fa299fddb7c1ca62d25 |
class TtsApiForm(NanoTtsForm): <NEW_LINE> <INDENT> response_type = StringField( default='audio_content', widget=HiddenInput(), description="Defines if the API should return the audio file itself" + "or its address.") <NEW_LINE> def validate_response_type(form, field): <NEW_LINE> <INDENT> response_types = [x[0] for x in... | Gives access to NanoTtsForm fields plus more advanced API related fields. | 62598fa2d268445f26639ac0 |
class TestExceptionConsistency(unittest.TestCase): <NEW_LINE> <INDENT> def _getExceptionClasses(self): <NEW_LINE> <INDENT> classes = inspect.getmembers( exceptions, isClassAndBaseServerExceptionSubclass) <NEW_LINE> return [class_ for _, class_ in classes] <NEW_LINE> <DEDENT> def testCodeInvariants(self): <NEW_LINE> <IN... | Ensure invariants of exceptions:
- every exception has a non-None error code
- every exception has a unique error code
- every exception has an error code in the range [0, 2**31-1]
- every exception can be instantiated successfully | 62598fa255399d3f0562639d |
class CloudresourcemanagerFoldersTestIamPermissionsRequest(_messages.Message): <NEW_LINE> <INDENT> foldersId = _messages.StringField(1, required=True) <NEW_LINE> testIamPermissionsRequest = _messages.MessageField('TestIamPermissionsRequest', 2) | A CloudresourcemanagerFoldersTestIamPermissionsRequest object.
Fields:
foldersId: Part of `resource`. REQUIRED: The resource for which the policy
detail is being requested. `resource` is usually specified as a path.
For example, a Project resource is specified as `projects/{project}`.
testIamPermissionsReq... | 62598fa28a43f66fc4bf1ff7 |
class MdnManager(models.Manager): <NEW_LINE> <INDENT> def create_from_as2mdn(self, as2mdn, message, status, return_url=None): <NEW_LINE> <INDENT> signed = bool(as2mdn.digest_alg) <NEW_LINE> if as2mdn.message_id is None: <NEW_LINE> <INDENT> message_id = as2mdn.orig_message_id <NEW_LINE> logger.warning( f"Received MDN re... | Custom model manager for the AS2 MDN model. | 62598fa2e5267d203ee6b788 |
class TwoWayIterator: <NEW_LINE> <INDENT> def __init__(self, list_of_stuff): <NEW_LINE> <INDENT> self.items = list_of_stuff <NEW_LINE> self.index = 0 <NEW_LINE> <DEDENT> def next(self): <NEW_LINE> <INDENT> if self.index == len(self.items) - 1: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> self.index += 1 <NEW_LIN... | Two way iterator class that is used as the backend for paging | 62598fa2be8e80087fbbeedb |
class BronchialLobe(_CaseInsensitiveEnum): <NEW_LINE> <INDENT> upper_lobe = 'Upper lobe' <NEW_LINE> middle_lobe = 'Middle lobe' <NEW_LINE> lower_lobe = 'Lower lobe' <NEW_LINE> stump = 'Stump' <NEW_LINE> bronchus = 'Bronchus' <NEW_LINE> unknown = 'Unknown' <NEW_LINE> not_reported = 'Not reported' | The named location of a portion of a lung or bronchus. | 62598fa244b2445a339b68ab |
class IAvatar(icrux.IAvatar): <NEW_LINE> <INDENT> pass | Tub-specific avatar interface. | 62598fa201c39578d7f12bfa |
class ParseAcceptLanguageTests(unittest.TestCase): <NEW_LINE> <INDENT> def test_parses_well_formatted_strings(self): <NEW_LINE> <INDENT> well_formatted_strings_with_expectations = ( ('en-US', [('en_US', 1.0)]), ('en-US,el-GR,fr', [('en_US', 1.0), ('el_GR', 1.0), ('fr', 1.0)]), ('en-US,el;q=0.8', [('en_US', 1.0), ('el',... | Unit tests for parsing of Accept-Language HTTP header. | 62598fa2cb5e8a47e493c0b4 |
class RegisterView(MethodView): <NEW_LINE> <INDENT> decorators = [user_already_authenticated] <NEW_LINE> post_args = { 'email': fields.Email(required=True, validate=[unique_user_email]), 'password': fields.String( required=True, validate=[validate.Length(min=6, max=128)]) } <NEW_LINE> def login_user(self, user): <NEW_L... | View to register a new user. | 62598fa2b7558d58954634a9 |
class Section(ndb.Model): <NEW_LINE> <INDENT> term = ndb.KeyProperty(kind=Term) <NEW_LINE> hour = ndb.StringProperty() <NEW_LINE> title = ndb.StringProperty() <NEW_LINE> instructor = ndb.KeyProperty(kind=Instructor, repeated=True) <NEW_LINE> location = ndb.StringProperty() <NEW_LINE> section = ndb.StringProperty() <NEW... | A section of a class that is being offered during a term. | 62598fa27d847024c075c241 |
class LearningAgent(Agent): <NEW_LINE> <INDENT> def __init__(self, env, alphaBetaGamma=(0.8, 0.1, 0.005)): <NEW_LINE> <INDENT> super(LearningAgent, self).__init__(env) <NEW_LINE> self.color = 'red' <NEW_LINE> self.planner = RoutePlanner(self.env, self) <NEW_LINE> self.penalty = 0 <NEW_LINE> self.reward = 0 <NEW_LINE> s... | An agent that learns to drive in the smartcab world. | 62598fa207f4c71912baf2be |
class ZhaoEtAl2006SSlabNSHMP2014(ZhaoEtAl2006SSlab): <NEW_LINE> <INDENT> def get_mean_and_stddevs(self, sites, rup, dists, imt, stddev_types): <NEW_LINE> <INDENT> C = self.COEFFS_ASC[imt] <NEW_LINE> C_SSLAB = self.COEFFS_SSLAB[imt] <NEW_LINE> d = dists.rrup <NEW_LINE> d[d == 0.0] = 0.1 <NEW_LINE> if rup.mag > 7.8: <NEW... | For the 2014 US National Seismic Hazard Maps the magnitude of Zhao et al.
(2006) for the subduction inslab events is capped at magnitude Mw 7.8 | 62598fa26aa9bd52df0d4d45 |
class ConfigFilterLinesEnvironmentMixin( ConfigEnvironmentMixin, FilterLinesEnvironmentMixin, ): <NEW_LINE> <INDENT> def __init__(self, config, **kw): <NEW_LINE> <INDENT> strict_utf8 = config.get_bool('emailstrictutf8', default=None) <NEW_LINE> if strict_utf8 is not None: <NEW_LINE> <INDENT> kw['strict_utf8'] = strict_... | Handle encoding and maximum line length based on config. | 62598fa232920d7e50bc5ed1 |
class GateArg(IntEnum): <NEW_LINE> <INDENT> gtp1 = 1 <NEW_LINE> gtp2 = 2 <NEW_LINE> gtp3 = 3 | Possible gates for all ticked note commands.
Gate is an optional argument appended to the end of a ticked note command
which adds 1-3 ticks to the note's length, allowing for finer control. | 62598fa299cbb53fe6830d4f |
class NaiveBayesModelTreeClassifier(DecisionTreeClassifier): <NEW_LINE> <INDENT> def __init__(self, criterion="gini", splitter="best", max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0., max_features=None, random_state=None, max_leaf_nodes=None, min_impurity_decrease=0., min_impurity_s... | Decision tree that uses a Naive Bayes model in the leaves.
This tree will be used as a base_estimator for the Random Forest Classifier. | 62598fa2a8ecb0332587108a |
class Services: <NEW_LINE> <INDENT> loop = None <NEW_LINE> logger = None <NEW_LINE> daemon = None <NEW_LINE> aiodocker = None | These needs to be injected from the plugin init code | 62598fa2009cb60464d013a1 |
class PersonTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(PersonTests, self).setUp() <NEW_LINE> self.person = factories.PersonFactory() <NEW_LINE> <DEDENT> def test_full_name(self): <NEW_LINE> <INDENT> expected = self.person.given_name + ' ' + self.person.family_name <NEW_LINE> self.as... | Tests for the `Person` model. | 62598fa201c39578d7f12bfb |
class Encoder(Transcoder): <NEW_LINE> <INDENT> def __init__(self, filetype, command): <NEW_LINE> <INDENT> Transcoder.__init__(self) <NEW_LINE> self.filetype = filetype <NEW_LINE> self.mimetype = MIMETYPES[filetype] <NEW_LINE> self.command = command <NEW_LINE> <DEDENT> def encode(self, decoder_process, bitrate): <NEW_LI... | encoder | 62598fa22c8b7c6e89bd3642 |
class SetUUIDWithMkFs(SetUUID): <NEW_LINE> <INDENT> @skipIf(sys.version_info < (3, 4), "assertLogs is not supported") <NEW_LINE> def test_set_invalid_uuid(self): <NEW_LINE> <INDENT> an_fs = self._fs_class(device=self.loop_devices[0], uuid=self._invalid_uuid) <NEW_LINE> if self._fs_class._type == "swap": <NEW_LINE> <IND... | Tests various aspects of setting an UUID for a filesystem where the
native mkfs tool can set the UUID. | 62598fa2e1aae11d1e7ce761 |
class HashiCorpVaultSecretProvider(SecretProviderBase): <NEW_LINE> <INDENT> name = 'SecretInVault' <NEW_LINE> def checkConfig(self, vaultServer=None, vaultToken=None, secretsmount=None): <NEW_LINE> <INDENT> if not isinstance(vaultServer, str): <NEW_LINE> <INDENT> config.error("vaultServer must be a string while it is %... | basic provider where each secret is stored in Vault | 62598fa238b623060ffa8f10 |
class tetgen(PyMesh.tetgen): <NEW_LINE> <INDENT> @property <NEW_LINE> def mesh(self): <NEW_LINE> <INDENT> return form_mesh(self.vertices, self.faces, self.voxels); <NEW_LINE> <DEDENT> def __setattr__(self, key, value): <NEW_LINE> <INDENT> if not hasattr(self, key): <NEW_LINE> <INDENT> raise AttributeError( "Attribute '... | Wrapper around Si's `TetGen <http://wias-berlin.de/software/tetgen/>`_.
All attributes, except ``vertices``, ``faces``, ``voxels`` and ``mesh``,
are either input geometry or configuration parameters.
Attributes:
points (:class:`numpy.ndarray`): n by 3 list of points to be
tetrahedralized.
triangles (... | 62598fa2eab8aa0e5d30bc04 |
class Preview( object ) : <NEW_LINE> <INDENT> pass | Preview class simulating a database model class, for translating wiki
text to html | 62598fa230dc7b766599f6ca |
class TextReplaceListRequest(object): <NEW_LINE> <INDENT> swagger_types = { 'text_replaces': 'list[TextReplace]', 'default_font': 'str', 'start_index': 'int', 'count_replace': 'int' } <NEW_LINE> attribute_map = { 'text_replaces': 'TextReplaces', 'default_font': 'DefaultFont', 'start_index': 'StartIndex', 'count_replace... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598fa28e7ae83300ee8f1d |
@pytest.mark.skipif( LooseVersion(pytest.config.getoption('--release')) < LooseVersion('14.0.0'), reason='This collection is fully implemented on 14.0.0 or greater.' ) <NEW_LINE> class TestLearningSuggestions(object): <NEW_LINE> <INDENT> def test_learning_suggestion(self, mgmt_root): <NEW_LINE> <INDENT> kind = 'tm:secu... | TestLearningSuggestions functional tests | 62598fa2498bea3a75a5799f |
class TestHeketiVolume(BaseClass): <NEW_LINE> <INDENT> def _find_bricks(self, brick_paths, present): <NEW_LINE> <INDENT> oc_node = self.ocp_master_node[0] <NEW_LINE> cmd = ( 'bash -c "' 'if [ -d "%s" ]; then echo present; else echo absent; fi"') <NEW_LINE> g_hosts = list(g.config.get("gluster_servers", {}).keys()) <NEW... | Check volume bricks presence in fstab files on Gluster PODs. | 62598fa23539df3088ecc131 |
@keys.assign(seq=seqs.GT, modes=_MODES_ACTION) <NEW_LINE> class ViActivateNextTab(ViOperatorDef): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> ViOperatorDef.__init__(self, *args, **kwargs) <NEW_LINE> self.scroll_into_view = True <NEW_LINE> <DEDENT> def translate(self, state): <NEW_LINE> ... | Vim: `gt` | 62598fa210dbd63aa1c70a2c |
class test_regular_partition_uniform_distribution_rectangle_domain_int_01D(data_01D, regular_partition_uniform_distribution_rectangle_domain_int): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(test_regular_partition_uniform_distribution_rectangle_domain_int_01D, self).createData() <NEW_LINE> super( tes... | Tests :meth:`bet.calculateP.simpleFunP.regular_partition_uniform_distribution_rectangle_domain` on 01D data domain. | 62598fa216aa5153ce40037e |
class MyUserCreateSerializer(serializers.UserCreateSerializer): <NEW_LINE> <INDENT> class Meta(serializers.UserCreateSerializer.Meta): <NEW_LINE> <INDENT> fields = serializers.UserCreateSerializer.Meta.fields + ('first_name',) | Расширяет базовый сериализатор UserCreateSerializer | 62598fa27047854f4633f255 |
class UserProfileView(ExtendableModelMixin, generics.RetrieveUpdateAPIView): <NEW_LINE> <INDENT> def extend_response_data(self, data): <NEW_LINE> <INDENT> extend_users_response(data, self.request) <NEW_LINE> <DEDENT> queryset = User.objects.all() <NEW_LINE> permission_classes = (permissions.IsAuthenticated,) <NEW_LINE>... | ---
PATCH:
parameters:
- name: website
description: user website
- name: gender
description: 0 - female, 1 - male.
- name: avatar
required: false
type: file
PUT:
parameters:
- name: website
description: user website
- name... | 62598fa255399d3f0562639f |
class ScannerSetup(KSetting): <NEW_LINE> <INDENT> K_CODE = b'K504' <NEW_LINE> K_PATTERN = ( b'^<%s,([\d]{2,3})?,([0-2])?,([\d]{2,3})?,([\d]{2,3})?>$' % K_CODE) <NEW_LINE> def __init__( self, gain_level=350, agc_sampling_mode=AGCSamplingMode.Continuous, agc_min=70, agc_max=245): <NEW_LINE> <INDENT> self.gain_level = gai... | See page 4-17 of Microscan MS3 manual for reference
Note that the user manual groups the "Scan Speed" setting under the
"Scanner Setup" heading. This library treats it as separate setting because
it is stored with a distinct K-code `K500` while all other Scanner Setup
settings are stored with a K-code of `K504`. | 62598fa2462c4b4f79dbb889 |
class Centerline(MultiLineString): <NEW_LINE> <INDENT> def __init__(self, input_geom, interpolation_dist=5.1, **attributes): <NEW_LINE> <INDENT> if not isinstance(input_geom, Polygon): <NEW_LINE> <INDENT> raise ValueError( 'Input geometry must be of type shapely.geometry.Polygon!' ) <NEW_LINE> <DEDENT> self._input_geom... | The polygon's skeleton.
The polygon's attributes are copied and set as the centerline's
attributes. The rest of the attributes are inherited from the
MultiLineString class.
Attributes:
geoms (shapely.geometry.base.GeometrySequence): A sequence of
LineStrings
Extends:
shapely.geometry.MultiLineString | 62598fa26fb2d068a7693d73 |
class ChannelDispatchOperation(dbus.service.Object): <NEW_LINE> <INDENT> @dbus.service.method('org.freedesktop.Telepathy.ChannelDispatchOperation', in_signature='s', out_signature='') <NEW_LINE> def HandleWith(self, Handler): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> @dbus.service.method('org.fr... | A channel dispatch operation is an object in the ChannelDispatcher
representing a batch of unrequested channels being announced to
client
Approver
processes.
These objects can result from new incoming channels or channels
which are automatically created for some reason, but cannot result
from outgoing requ... | 62598fa263d6d428bbee262f |
class Tag(models.Model): <NEW_LINE> <INDENT> hash_id = models.CharField( db_index=True, max_length=32, blank=False, null=False, unique=True ) <NEW_LINE> added_by = models.ForeignKey(User, editable=False) <NEW_LINE> added_on = models.DateTimeField( db_index=True, auto_now_add=True, editable=False ) <NEW_LINE> objects = ... | This is probably a pretty desperate attempt at trying not to replicate
the sentences table and api. This table anchors all tags that are directly
related, allowing for localizations to be accessed from a common point.
This design allows for fast access and normalization but quickly
complicates things when users don't r... | 62598fa24428ac0f6e6583a8 |
class HcmdCoreError(Exception): <NEW_LINE> <INDENT> fmt = 'An unspecified error occurred' <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> msg = self.fmt.format(**kwargs) <NEW_LINE> Exception.__init__(self, msg) <NEW_LINE> self.kwargs = kwargs | The base exception class for obscmd exceptions.
:ivar msg: The descriptive message associated with the error. | 62598fa292d797404e388aa4 |
class RoomDetail(DetailView): <NEW_LINE> <INDENT> model = models.Room | 방 조회 정의 | 62598fa21f5feb6acb162aa0 |
class DiskEncryptionSettings(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, 'enabled': {'key': 'enabled', 'type': 'bool'}, } <NE... | Describes a Encryption Settings for a Disk.
:ivar disk_encryption_key: Specifies the location of the disk encryption key, which is a Key
Vault Secret.
:vartype disk_encryption_key: ~azure.mgmt.compute.v2018_06_01.models.KeyVaultSecretReference
:ivar key_encryption_key: Specifies the location of the key encryption key... | 62598fa297e22403b383ad89 |
class BadDate(SimpleGenerator): <NEW_LINE> <INDENT> _strings = [ '1/1/1', '0/0/0', '0-0-0', '00-00-00', '-1/-1/-1', 'XX/XX/XX', '-1-1-1-1-1-1-1-1-1-1-1-', 'Jun 39th 1999', 'June -1th 1999', '2000', '1997', '0000', '0001', '9999', '0000-00', '0000-01', '0000-99', '0000-13', '0001-00', '0001-01', '0001-99', '0001-13', '9... | [BETA] Generates a lot of funky date's. This Generator is still missing
a lot of test cases.
- Invalid month, year, day
- Mixed up stuff
- Crazy odd date formats | 62598fa256ac1b37e6302069 |
class AllyBinarySensor(AllyDeviceEntity, BinarySensorEntity): <NEW_LINE> <INDENT> def __init__(self, ally, name, device_id, device_type): <NEW_LINE> <INDENT> self._ally = ally <NEW_LINE> self._device = ally.devices[device_id] <NEW_LINE> self._device_id = device_id <NEW_LINE> self._type = device_type <NEW_LINE> super().... | Representation of an Ally binary_sensor. | 62598fa299cbb53fe6830d51 |
class Entry(Base): <NEW_LINE> <INDENT> __tablename__ = 'entries' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> title = Column(Unicode) <NEW_LINE> body = Column(Unicode) <NEW_LINE> creation_date = Column(DateTime) <NEW_LINE> def __init__(self, creation_date=None, *args, **kwargs): <NEW_LINE> <INDENT> supe... | Create a table for journal entries. | 62598fa2851cf427c66b8146 |
class DenonCommand(object): <NEW_LINE> <INDENT> def __init__(self, host, port, timeout=1.0, max_bytes=1024): <NEW_LINE> <INDENT> self.host = host <NEW_LINE> self.port = port <NEW_LINE> self.timeout = timeout <NEW_LINE> self.max_bytes = max_bytes <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> try: <NEW_LIN... | Run a single command.
Example:
with DenonCommand(<host>) as d:
d.send(<command>)
print(d.recieve()) | 62598fa2a8ecb0332587108c |
class BaseWorker(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.available_port = None <NEW_LINE> self.reconnecting = False <NEW_LINE> self.green_light = True <NEW_LINE> self.last_error = None <NEW_LINE> self.process = None <NEW_LINE> self.client = None <NEW_LINE> <DEDENT> @property <NEW_LINE>... | Base class for different worker interfaces
| 62598fa2fbf16365ca793f39 |
class TriggerSpec(Model): <NEW_LINE> <INDENT> def __init__(self, name=None, description=None, state=None, superceded_by=None, parameters=None): <NEW_LINE> <INDENT> self.swagger_types = { 'name': str, 'description': str, 'state': str, 'superceded_by': str, 'parameters': List[TriggerParamSpec] } <NEW_LINE> self.attribute... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598fa2baa26c4b54d4f12e |
class IPv6AccountIdentiferTestCase(test.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(IPv6AccountIdentiferTestCase, self).setUp() <NEW_LINE> self.flags(ipv6_backend='account_identifier') <NEW_LINE> ipv6.reset_backend() <NEW_LINE> <DEDENT> def test_to_global(self): <NEW_LINE> <INDENT> addr = ... | Unit tests for IPv6 account_identifier backend operations. | 62598fa2a8370b77170f0259 |
class AuditLog(CritsDocument, CritsSchemaDocument, Document): <NEW_LINE> <INDENT> meta = { "allow_inheritance": False, "crits_type": "AuditLog", "collection": settings.COL_AUDIT_LOG, "latest_schema_version": 1, "schema_doc": { 'value': 'Value of the audit log entry', 'user': 'User the entry is about.', 'date': 'Date of... | Audit Log Class | 62598fa2eab8aa0e5d30bc06 |
class PackageManager(Enum): <NEW_LINE> <INDENT> BREW = auto() <NEW_LINE> YUM = auto() <NEW_LINE> APT = auto() <NEW_LINE> @staticmethod <NEW_LINE> def from_label(label): <NEW_LINE> <INDENT> if label is None: <NEW_LINE> <INDENT> raise KeyError("Enum: No package manager was passed in") <NEW_LINE> <DEDENT> return PackageMa... | Represents a system package manager | 62598fa2d6c5a102081e1fc5 |
class SOAPException(Exception): <NEW_LINE> <INDENT> pass | SOAP exception | 62598fa276e4537e8c3ef42b |
class CodecError(TException): <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRING, 'message', None, None, ), ) <NEW_LINE> def __init__(self, message=None,): <NEW_LINE> <INDENT> self.message = message <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBinaryProtocol.TBinaryProto... | Attributes:
- message | 62598fa25f7d997b871f931f |
class ContainedOnlyBy(Overlaps): <NEW_LINE> <INDENT> def matches(self, value): <NEW_LINE> <INDENT> raise NotImplementedError() | Check if an IP address is inside a network and no other network
is in between | 62598fa24f6381625f1993fc |
class SearchResponse(colander.MappingSchema): <NEW_LINE> <INDENT> success = colander.SchemaNode(colander.Boolean(), missing=colander.drop) <NEW_LINE> error = colander.SchemaNode(colander.Boolean(), missing=colander.drop) <NEW_LINE> results = MultiRants() | :class:`colander.MappingSchema` for SearchResponse objects. | 62598fa299cbb53fe6830d52 |
class VolumeDetails(Volume): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(VolumeDetails, self).__init__() <NEW_LINE> self.axrn = None <NEW_LINE> self.name = None <NEW_LINE> self.details = {} <NEW_LINE> fields = { "name": None, "axrn": None, "details": None } <NEW_LINE> self.set_fields(fields) | This class has additional details passed between argo
microservices that are not part of yaml specification | 62598fa230dc7b766599f6cc |
class ChannelEndState(object): <NEW_LINE> <INDENT> def __init__(self, participant_address, participant_balance, get_block_number): <NEW_LINE> <INDENT> if not isinstance(participant_balance, (int, long)): <NEW_LINE> <INDENT> raise ValueError('participant_balance must be an integer.') <NEW_LINE> <DEDENT> self.contract_ba... | Tracks the state of one of the participants in a channel. | 62598fa20a50d4780f705259 |
class ModifyDDoSLevelResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Id = None <NEW_LINE> self.DDoSLevel = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Id = params.get("Id") <NEW_LINE> self.DDoSLevel = params... | ModifyDDoSLevel response structure.
| 62598fa28e7ae83300ee8f1f |
class tabs(WordprocessingMLElement): <NEW_LINE> <INDENT> pass | This element specifies a sequence of custom tab stops which shall be used for any tab characters in the current paragraph.
If this element is omitted on a given paragraph, its value is determined by the setting previously set at any level of
the style hierarchy (i.e. that previous setting remains unchanged). If this se... | 62598fa2dd821e528d6d8db3 |
class DummyStateStore(object): <NEW_LINE> <INDENT> def get_state(self): <NEW_LINE> <INDENT> return defer.succeed(None) <NEW_LINE> <DEDENT> def save_state(self, state): <NEW_LINE> <INDENT> return defer.succeed(None) | Fake state store that doesn't actually store the state. | 62598fa2498bea3a75a579a1 |
@attr.s(repr=False, cmp=False) <NEW_LINE> class BooleanElement(IntegerElement): <NEW_LINE> <INDENT> value = attr.ib(default=False, type=bool, converter=bool) <NEW_LINE> @classmethod <NEW_LINE> def read(cls, fp, **kwargs): <NEW_LINE> <INDENT> return cls(read_fmt('?3x', fp)[0]) <NEW_LINE> <DEDENT> def write(self, fp, **k... | Single bool value element that has a `value` attribute.
Use with `@attr.s(repr=False)` decorator. | 62598fa2d268445f26639ac2 |
class Actor(Base): <NEW_LINE> <INDENT> __tablename__ = 'actor' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> name = Column(Text) <NEW_LINE> wiki_page = Column(Text, unique=True) <NEW_LINE> age = Column(Integer) <NEW_LINE> total_gross = Column(Float) <NEW_LINE> movies = relationship("Edge", back_populates... | The represent the actor nodes in the graph
(SQLAlchemy model: actor) | 62598fa22ae34c7f260aaf60 |
class ExceptionHandler(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass | Used to handle the exceptions during the convertion progress | 62598fa2ac7a0e7691f7238a |
class CustomItemModel(BaseItemModel): <NEW_LINE> <INDENT> def __init__(self, columns, parent): <NEW_LINE> <INDENT> self._row_data = [] <NEW_LINE> self._sort_column1 = 0 <NEW_LINE> self._sort_column2 = 0 <NEW_LINE> self._sort_order = QtCore.Qt.AscendingOrder <NEW_LINE> super(CustomItemModel, self).__init__(columns, pare... | The main reason for this subclass is to give custom column alignment. | 62598fa2656771135c489503 |
@format_docstring(get_user_info_request, response_example=get_devices_response, post_request_example=post_devices_request, post_response_example=post_devices_response) <NEW_LINE> class DeviceList(mixins.ListModelMixin, mixins.CreateModelMixin, generics.GenericAPIView): <NEW_LINE> <INDENT> permission_classes = (IsAuthen... | Device List
가능 메소드 : [ GET, Post ]
[ GET ]
Request: {}
Response: {response_example}
[ POST ]
Request: {post_request_example}
Response: {post_response_example} | 62598fa2b7558d58954634ad |
class ImageBuilder(AWSObject): <NEW_LINE> <INDENT> resource_type = "AWS::AppStream::ImageBuilder" <NEW_LINE> props: PropsDictType = { "AccessEndpoints": ([AccessEndpoint], False), "AppstreamAgentVersion": (str, False), "Description": (str, False), "DisplayName": (str, False), "DomainJoinInfo": (DomainJoinInfo, False), ... | `ImageBuilder <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-imagebuilder.html>`__ | 62598fa2627d3e7fe0e06d2b |
class AzureSQLConnectionStringCredentialPatch(DataSourceCredentialPatch): <NEW_LINE> <INDENT> _validation = { 'data_source_credential_type': {'required': True}, } <NEW_LINE> _attribute_map = { 'data_source_credential_type': {'key': 'dataSourceCredentialType', 'type': 'str'}, 'data_source_credential_name': {'key': 'data... | AzureSQLConnectionStringCredentialPatch.
All required parameters must be populated in order to send to Azure.
:param data_source_credential_type: Required. Type of data source credential.Constant filled by
server. Possible values include: "AzureSQLConnectionString", "DataLakeGen2SharedKey",
"ServicePrincipal", "Se... | 62598fa2442bda511e95c2da |
@dataclass <NEW_LINE> class RoomContextError(_ErrorWithRoomId): <NEW_LINE> <INDENT> pass | Response representing a unsuccessful room context request. | 62598fa2b7558d58954634ae |
class _ParseExampleDataset(dataset_ops.UnaryDataset): <NEW_LINE> <INDENT> def __init__(self, input_dataset, features, num_parallel_calls): <NEW_LINE> <INDENT> self._input_dataset = input_dataset <NEW_LINE> if not input_dataset._element_structure.is_compatible_with( structure.TensorStructure(dtypes.string, [None])): <NE... | A `Dataset` that parses `example` dataset into a `dict` dataset. | 62598fa207f4c71912baf2c3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.