code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class TestLoad(TestCase): <NEW_LINE> <INDENT> def test_load_from_file(self): <NEW_LINE> <INDENT> path = os.path.dirname(os.path.realpath(__file__)) <NEW_LINE> filename = '{0}/data.txt'.format(path) <NEW_LINE> mapper = Mapper(filename=filename, model_class=TestModel) <NEW_LINE> mapper.load() <NEW_LINE> res = TestModel.o... | Tests data loading from file. | 62598f677c178a314d78cbb3 |
class recharge_result: <NEW_LINE> <INDENT> thrift_spec = ( (0, TType.STRING, 'success', None, None, ), ) <NEW_LINE> def __init__(self, success=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerate... | Attributes:
- success | 62598f678c3a8732951f5c62 |
class BioInfoUtils(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(BioInfoUtils, self).__init__() <NEW_LINE> self.algorithms = algorithms(self) <NEW_LINE> self.data = data(self) <NEW_LINE> self.io = io(self) | docstring for BioInfoUtils. | 62598f68c432627299fa26e6 |
class ErrorResponse(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'error': {'key': 'error', 'type': 'ErrorDetail'}, } <NEW_LINE> def __init__( self, *, error: Optional["ErrorDetail"] = None, **kwargs ): <NEW_LINE> <INDENT> super(ErrorResponse, self).__init__(**kwargs) <NEW_LINE> self.error = error | Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
:param error: The error object.
:type error: ~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetail | 62598f68925a0f43d25e774b |
class CourseFormShort(CourseFormDetail): <NEW_LINE> <INDENT> _model_class = Course <NEW_LINE> _include = [Course.price, Course.creation, Course.start_date, Course.name] | Form used to show entity short version, mainly for tables | 62598f688e05c05ec3f6e9d0 |
class EncDec(): <NEW_LINE> <INDENT> def __init__(self, key, size): <NEW_LINE> <INDENT> d = hashlib.sha256() <NEW_LINE> key = key.encode() <NEW_LINE> tempkey = key <NEW_LINE> while len(tempkey) < size: <NEW_LINE> <INDENT> d.update(tempkey) <NEW_LINE> key = d.digest() <NEW_LINE> tempkey += key <NEW_LINE> <DEDENT> self.ke... | Simple encoding/decoding function | 62598f686aa9bd52df0d45e3 |
class DownloadPathSuggestion(BaseType): <NEW_LINE> <INDENT> special = True <NEW_LINE> valid_values = ValidValues(('path', "Show only the download path."), ('filename', "Show only download filename."), ('both', "Show download path and filename.")) | How to format the question when downloading. | 62598f68a8ecb03325870918 |
class BaseDateTimeRange: <NEW_LINE> <INDENT> def __init__(self, start=None, end=None): <NEW_LINE> <INDENT> if start is not None and end is not None and start > end: <NEW_LINE> <INDENT> raise ValueError('start must be <= end') <NEW_LINE> <DEDENT> self.__start = start <NEW_LINE> self.__end = end <NEW_LINE> <DEDENT> def _... | Stores a range of dates or times for easy comparison | 62598f688c3a8732951f5c63 |
class PinBanks(object): <NEW_LINE> <INDENT> def __init__(self, registers): <NEW_LINE> <INDENT> self.registers = registers <NEW_LINE> self._banks = (PinBank(self, 0), PinBank(self, 1)) <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> return len(self._banks) <NEW_LINE> <DEDENT> def bank(self, n): <NEW_LINE> <IN... | The pin banks of an MCP23x17 chip. | 62598f68ff9c53063f519d69 |
class SoftwareRequirement(Requirement): <NEW_LINE> <INDENT> def __init__(self, packages=None): <NEW_LINE> <INDENT> Requirement.__init__(self, "SoftwareRequirement") <NEW_LINE> self.packages = packages or [] <NEW_LINE> <DEDENT> class SoftwarePackage(Serializable): <NEW_LINE> <INDENT> def __init__(self, package, version=... | A list of software packages that should be configured in the environment of the defined process.
Documentation: https://www.commonwl.org/v1.0/Workflow.html#SoftwareRequirement | 62598f686e29344779affd6e |
@injected <NEW_LINE> class ResourcePathEncoderHandler(HandlerProcessorProceed): <NEW_LINE> <INDENT> resourcesRootURI = None <NEW_LINE> converterPath = ConverterPath <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> assert self.resourcesRootURI is None or isinstance(self.resourcesRootURI, str), 'Invalid root URI... | Implementation for a processor that provides the resource path encoding. | 62598f687c178a314d78cbb5 |
class ClientServerProtocol(asyncio.Protocol): <NEW_LINE> <INDENT> storage = Storage() <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.transport = None <NEW_LINE> self.parser = Parser() <NEW_LINE> self.executor = Executor(self.storage) <NEW_LINE> self._buffer = b'' <NEW_LINE> <DEDENT> def connection_made(self, t... | Класс для асинхронной обработки запросов с помощью библиотеки asyncio | 62598f6826238365f5fac28a |
class PoolMotionTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> unittest.TestCase.setUp(self) <NEW_LINE> try: <NEW_LINE> <INDENT> from mock import Mock <NEW_LINE> <DEDENT> except ImportError: <NEW_LINE> <INDENT> self.skipTest("mock module is not available") <NEW_LINE> <DEDENT> pool... | Unittest of PoolMotion class | 62598f68796e427e5384dea9 |
class BatchStatus(object): <NEW_LINE> <INDENT> Submitted = 'SUBMITTED' <NEW_LINE> Pending = 'PENDING' <NEW_LINE> Runnable = 'RUNNABLE' <NEW_LINE> Starting = 'STARTING' <NEW_LINE> Running = 'RUNNING' <NEW_LINE> Succeeded = 'SUCCEEDED' <NEW_LINE> Failed = 'FAILED' | Constants for the statuses a Batch job can be in.
see: https://docs.aws.amazon.com/batch/latest/APIReference/API_JobDetail.html | 62598f6838b623060ffa87af |
class RRData_PTR(Record): <NEW_LINE> <INDENT> FIELDS = ['ptrdname'] <NEW_LINE> RECORD_TYPE = 12 | PTR Resource Record Type
Defined in: RFC1035 | 62598f68a8ecb0332587091a |
class ConfigDialog(ed_basewin.EdBaseFrame): <NEW_LINE> <INDENT> def __init__(self, parent, ftype=0): <NEW_LINE> <INDENT> super(ConfigDialog, self).__init__(parent, title=_("Launch Configuration")) <NEW_LINE> self.__DoLayout() <NEW_LINE> <DEDENT> def __DoLayout(self): <NEW_LINE> <INDENT> sizer = wx.BoxSizer(wx.VERTICAL)... | Configuration dialog for configuring what executables are available
for a filetype and what the preferred one is. | 62598f6866673b3332c2fad1 |
class LoginSerializer(TokenObtainPairSerializer): <NEW_LINE> <INDENT> def validate(self, attrs): <NEW_LINE> <INDENT> data = super().validate(attrs) <NEW_LINE> refresh = self.get_token(self.user) <NEW_LINE> data["refresh"] = str(refresh) <NEW_LINE> data["access"] = str(refresh.access_token) <NEW_LINE> data["user"] = Use... | Validates the user's credentials and returns the user and access/refresh tokens | 62598f680a366e3fb87dc0d8 |
class ImageFeatureExtractor(chainer.Chain): <NEW_LINE> <INDENT> def __init__(self, cnn, cnn_layer_name): <NEW_LINE> <INDENT> super(ImageFeatureExtractor, self).__init__() <NEW_LINE> with self.init_scope(): <NEW_LINE> <INDENT> self.cnn = cnn <NEW_LINE> <DEDENT> self.cnn_layer_name = cnn_layer_name <NEW_LINE> <DEDENT> de... | Image feature extractor.
Internally use VGG16 or similar CNNs to extract fixed-size features
from images. | 62598f6830c21e258be97f15 |
class ElementSelector(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def ByElementId(elementId,isRevitOwned=None): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def ByUniqueId(uniqueId,isRevitOwned): <NEW_LINE> <INDENT> pass | ElementSelector() | 62598f681d351010ab8f3259 |
class ai_Chase: <NEW_LINE> <INDENT> def take_turn(self): <NEW_LINE> <INDENT> monster = self.owner <NEW_LINE> if libtcodpy.map_is_in_fov(globalvars.FOV_MAP, monster.x, monster.y): <NEW_LINE> <INDENT> if monster.distance_to(globalvars.PLAYER) >= 2: <NEW_LINE> <INDENT> self.owner.move_towards(globalvars.PLAYER) <NEW_LINE>... | A basic monster ai which chases and harms player | 62598f68d18da76e235b6cc1 |
class AditiveBlue: <NEW_LINE> <INDENT> def __init__(self, src_image:str,dst_image): <NEW_LINE> <INDENT> self.src = src_image <NEW_LINE> self.dst = dst_image <NEW_LINE> IMAditiveColors(self.src, red=0,green=0,blue=50).save(self.dst) | Class responsible for applying filter aditive blue automatic.
:param src_image: Image to be applied to the filter.
:param dst_image: Image applicated filter. | 62598f681f5feb6acb16234f |
class GradesService: <NEW_LINE> <INDENT> def get_subsection_grade(self, user_id, course_key_or_id, usage_key_or_id): <NEW_LINE> <INDENT> return api.get_subsection_grade(user_id, course_key_or_id, usage_key_or_id) <NEW_LINE> <DEDENT> def get_subsection_grade_override(self, user_id, course_key_or_id, usage_key_or_id): <N... | Course grade service
Provides various functions related to getting, setting, and overriding user grades. | 62598f6815baa7234946169c |
@implementer(IStep) <NEW_LINE> @attributes(['lb_id', 'node_id', 'condition', 'weight', 'type']) <NEW_LINE> class ChangeCLBNode(object): <NEW_LINE> <INDENT> def as_effect(self): <NEW_LINE> <INDENT> return service_request( ServiceType.CLOUD_LOAD_BALANCERS, 'PUT', append_segments('loadbalancers', self.lb_id, 'nodes', self... | An existing port mapping on a load balancer must have its condition,
weight, or type modified. | 62598f68711fe17d825dfe01 |
class CanutilsLogWriter(Listener): <NEW_LINE> <INDENT> def __init__(self, filename, channel="vcan0"): <NEW_LINE> <INDENT> self.channel = channel <NEW_LINE> self.log_file = open(filename, 'w') <NEW_LINE> self.last_timestamp = None <NEW_LINE> <DEDENT> def stop(self): <NEW_LINE> <INDENT> if self.log_file is not None: <NEW... | Logs CAN data to an ASCII log file (.log).
This class is is compatible with "candump -L".
If a message has a timestamp smaller than the previous one (or 0 or None),
it gets assigned the timestamp that was written for the last message.
It the first message does not have a timestamp, it is set to zero. | 62598f686aa9bd52df0d45e7 |
class ConfigurationError(Exception): <NEW_LINE> <INDENT> pass | exception raised when a configuration problem
is encountered | 62598f681d351010ab8f325a |
class UnsupportedFileFormat(Exception): <NEW_LINE> <INDENT> def __init__(self, file_format): <NEW_LINE> <INDENT> self.file_format = file_format | Raised when the given file format is not
supported.
Argument:
format The offending format | 62598f683eb6a72ae0389d59 |
class KFold(_BaseKFold): <NEW_LINE> <INDENT> def __init__(self, n_splits='warn', shuffle=False, random_state=None): <NEW_LINE> <INDENT> if n_splits == 'warn': <NEW_LINE> <INDENT> warnings.warn(NSPLIT_WARNING, FutureWarning) <NEW_LINE> n_splits = 3 <NEW_LINE> <DEDENT> super(KFold, self).__init__(n_splits, shuffle, rando... | K-Folds cross-validator
Provides train/test indices to split data in train/test sets. Split
dataset into k consecutive folds (without shuffling by default).
Each fold is then used once as a validation while the k - 1 remaining
folds form the training set.
Read more in the :ref:`User Guide <cross_validation>`.
Param... | 62598f686e29344779affd72 |
class ForgotPasswordForm(FlaskForm): <NEW_LINE> <INDENT> email = StringField(_('Your email address'), validators=[ validators.DataRequired(_('Email address is required')), validators.Email(_('Invalid Email address')), ]) <NEW_LINE> submit = SubmitField(_('Send reset password email')) <NEW_LINE> def validate_email(form,... | Forgot password form. | 62598f68ac7a0e7691f71c2b |
class SqliteCPConnector(BaseDBConnector): <NEW_LINE> <INDENT> def create_dump(self): <NEW_LINE> <INDENT> path = self.connection.settings_dict['NAME'] <NEW_LINE> dump = BytesIO() <NEW_LINE> with open(path, 'rb') as db_file: <NEW_LINE> <INDENT> copyfileobj(db_file, dump) <NEW_LINE> <DEDENT> dump.seek(0) <NEW_LINE> return... | Create a dump by copy the binary data file.
Restore by simply copy to the good location. | 62598f68c432627299fa26ec |
class FatherBot(object, metaclass=ABCMeta): <NEW_LINE> <INDENT> def __init__(self, model, manufacture): <NEW_LINE> <INDENT> self.model = model <NEW_LINE> self.manufacture = manufacture <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return f'{self.__class__.__name__}("{self.model}", {self.manufacture})' <NE... | Базовый протокласс для всех роботов --> FatherBot | 62598f684d74a7450cd58a64 |
class crm_add_note(osv.osv_memory): <NEW_LINE> <INDENT> _name = 'purchase.add.note' <NEW_LINE> _description = "Add Internal Note" <NEW_LINE> _columns = { 'body': fields.text('Note Body', required=True), } <NEW_LINE> def action_add(self, cr, uid, ids, context=None): <NEW_LINE> <INDENT> if context is None: <NEW_LINE> <IN... | Adds a new note to the case. | 62598f68ff9c53063f519d6d |
class PositionEmbed(layers.Layer): <NEW_LINE> <INDENT> def __init__(self, axes, max_lengths=None, **kwargs): <NEW_LINE> <INDENT> super(PositionEmbed, self).__init__(**kwargs) <NEW_LINE> if not isinstance(axes, (list, tuple)): <NEW_LINE> <INDENT> axes = [axes] <NEW_LINE> <DEDENT> self.axes = axes <NEW_LINE> self.max_len... | Adds factorized positional embeddings for specified axes. | 62598f6838b623060ffa87b3 |
class LogicalOperator(bb.Union): <NEW_LINE> <INDENT> _catch_all = 'other' <NEW_LINE> or_operator = None <NEW_LINE> other = None <NEW_LINE> def is_or_operator(self): <NEW_LINE> <INDENT> return self._tag == 'or_operator' <NEW_LINE> <DEDENT> def is_other(self): <NEW_LINE> <INDENT> return self._tag == 'other' <NEW_LINE> <D... | Logical operator to join search queries together.
This class acts as a tagged union. Only one of the ``is_*`` methods will
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.
:ivar file_properties.LogicalOperator.or_operator: Append a query with an
"or" opera... | 62598f681f5feb6acb162351 |
class Image(models.Model): <NEW_LINE> <INDENT> image = models.ImageField(upload_to='gallery/') <NEW_LINE> image_url = models.TextField() <NEW_LINE> name = models.CharField(max_length=30) <NEW_LINE> description = models.TextField(max_length=100) <NEW_LINE> category = models.ManyToManyField(category) <NEW_LINE> post_date... | Image model | 62598f6873bcbd0ca4bc996c |
class ByteEntropyHistogram(FeatureType): <NEW_LINE> <INDENT> def __init__(self, step=1024, window=2048): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.dim = 256 <NEW_LINE> self.name = 'ByteEntropyHistogram' <NEW_LINE> self.window = window <NEW_LINE> self.step = step <NEW_LINE> <DEDENT> def _entropy_bin_counts(... | 2d byte/entropy histogram based roughly on (Saxe and Berlin, 2015).
This roughly approximates the joint probability of byte value and local entropy.
See Section 2.1.1 in https://arxiv.org/pdf/1508.03096.pdf for more info. | 62598f68167d2b6e312b6696 |
class ISOTime (pyxb.binding.datatypes.time): <NEW_LINE> <INDENT> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'ISOTime') <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('/home/toivotuo/Dropbox/Personal/Studies/UoH/tlbop/tapestry/tapestry/router/xsd/rocs.001.001.06.xsd', 90, 2) <NEW_LINE> _Documentation ... | An atomic simple type. | 62598f68d18da76e235b6cc3 |
class Respondent(object): <NEW_LINE> <INDENT> def __init__(self, id=None, email=None, first_name=None, last_name=None, last_login=None, modified=None, username=None): <NEW_LINE> <INDENT> self.swagger_types = { 'id': 'str', 'email': 'str', 'first_name': 'str', 'last_name': 'str', 'last_login': 'datetime', 'modified': 'd... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598f68a4f1c619b294dd0e |
class PRLinDuan(PR78): <NEW_LINE> <INDENT> __title__ = "SRK-Peneloux (1982)" <NEW_LINE> __status__ = "SRKPeneloux" <NEW_LINE> __doi__ = { "autor": "Lin, H., Duan, Y.-Y.", "title": "Empirical Correction to the Peng-Robinson Equation of " "State for the Saturated Region", "ref": "Fluid Phase Equilibria 233 (2005) 194-203... | Volume translation modification for Peng-Robinson equation of state by
Lin and Duan, [1]_, in this equation the volumen translation is
temperature-dependent
.. math::
\begin{array}[t]{l}
P = \frac{RT}{V+c-b}-\frac{a}{(V+c)^2 + 2b\left(V+c\right) - b}\\
a = 0.45724\frac{R^2T_c^2}{P_c}\alpha\\
b = 0.0778... | 62598f687c178a314d78cbbb |
class Pep257Test(FarcyTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.process = farcy.handlers.Pep257().process <NEW_LINE> <DEDENT> def test_perfect_file(self): <NEW_LINE> <INDENT> errors = self.process(self.path('no_issue.py')) <NEW_LINE> self.assertEqual({}, errors) <NEW_LINE> <DEDENT> def test_s... | Tests for the Pep257 Handler. | 62598f68d10714528d69d5e6 |
class TestRegisterView(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> print("# {} is running!".format(self.id())) <NEW_LINE> self.user = get_user_model().objects.create_user( username='admin', email='admin@example.com', password='pass') <NEW_LINE> <DEDENT> def test_get_success(self): <NEW_LINE> <IN... | RegisterViewのテスト | 62598f680383005118f6ce26 |
class ListView(BaseCartView): <NEW_LINE> <INDENT> def get(self, request, category_id, page_num): <NEW_LINE> <INDENT> sort = request.GET.get('sort') <NEW_LINE> categories = GoodsCategory.objects.all() <NEW_LINE> try: <NEW_LINE> <INDENT> category = GoodsCategory.objects.get(id=category_id) <NEW_LINE> <DEDENT> except Good... | 商品列表界面 | 62598f685166f23b2e242af6 |
class BruteSolver(Solver): <NEW_LINE> <INDENT> counter = 0 <NEW_LINE> def __init__(self, pegs, colors): <NEW_LINE> <INDENT> self.pegs = pegs <NEW_LINE> self.colors = colors <NEW_LINE> <DEDENT> def guess(self): <NEW_LINE> <INDENT> thisGuess = [] <NEW_LINE> for peg in xrange(0,self.pegs): <NEW_LINE> <INDENT> thisGuess.ap... | Solver for 4-peg, 6-color solutions | 62598f68be8e80087fbbe777 |
class exp(baseexp): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def initparser(cls, parser, env): <NEW_LINE> <INDENT> parser.add_argument('--npeaks', default=1, type=int, help='number of peaks') <NEW_LINE> parser.add_argument('--Emin', default=0, type=float, help='Minimal energy') <NEW_LINE> parser.add_argument('... | Example model: gaussian peak with flat background | 62598f6821bff66bcd722379 |
class AbstractXMLParser: <NEW_LINE> <INDENT> def __init__(self, node): <NEW_LINE> <INDENT> self.node = node <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def _dict_fetch(_dict, str_name): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> klass = _dict[str_name] <NEW_LINE> <DEDENT> except KeyError: <NEW_LINE> <INDENT> raise F... | Base class for Adiff XML node parsers
| 62598f68711fe17d825dfe06 |
class Switch(rsd_lib_base.ResourceBase): <NEW_LINE> <INDENT> switch_type = base.Field("SwitchType") <NEW_LINE> status = rsd_lib_base.StatusField("Status") <NEW_LINE> manufacturer = base.Field("Manufacturer") <NEW_LINE> model = base.Field("Model") <NEW_LINE> sku = base.Field("SKU") <NEW_LINE> serial_number = base.Field(... | Switch resource class
Switch contains properties describing a simple fabric switch. | 62598f68d164cc6175820696 |
class LazyObject(object): <NEW_LINE> <INDENT> _wrapped = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self._wrapped = empty <NEW_LINE> <DEDENT> __getattr__ = new_method_proxy(getattr) <NEW_LINE> def __setattr__(self, name, value): <NEW_LINE> <INDENT> if name == "_wrapped": <NEW_LINE> <INDENT> self.__dict__["... | A wrapper for another class that can be used to delay instantiation of the
wrapped class.
By subclassing, you have the opportunity to intercept and alter the
instantiation. If you don't need to do that, use SimpleLazyObject. | 62598f68a4f1c619b294dd10 |
class MakeJSON(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.header = dict() <NEW_LINE> self.result = dict() <NEW_LINE> self.total = dict() <NEW_LINE> <DEDENT> def __del__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> """make header dictionary""" <NEW_LINE> def setHeader(self, version,... | initialize dictionary | 62598f6873bcbd0ca4bc9970 |
class ActionValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> ACTION_UNSPECIFIED = 0 <NEW_LINE> ADD = 1 <NEW_LINE> REMOVE = 2 | The action that was performed on a Binding. Required
Values:
ACTION_UNSPECIFIED: Unspecified.
ADD: Addition of a Binding.
REMOVE: Removal of a Binding. | 62598f6850485f2cf55da68c |
class User(db.Model, UserMixin): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> username = db.Column(db.String(80), unique=True) <NEW_LINE> mailaddr = db.Column(db.String(120)) <NEW_LINE> password = db.Column(db.String(120)) <NEW_LINE> def __init__(self, username, mailaddr, password): <NEW_... | 一般ユーザー管理
Parameters
----------
username : str (max: 80)
mailaddr : str (max: 120)
password : str (max: 120)
ハッシュ化されたパスワード | 62598f6830c21e258be97f1d |
class PersistentQueue(object): <NEW_LINE> <INDENT> def __init__(self, table, dbfile="persistent_queue.db", max_in_memory=100, min_in_memory=50): <NEW_LINE> <INDENT> self.size = 0 <NEW_LINE> self.dbcon = None <NEW_LINE> self.dbcur = None <NEW_LINE> self.table = table <NEW_LINE> self.__prepare_db(dbfile) <NEW_LINE> self.... | a persistent queue with sqlite back-end designed for infinite queues | 62598f6838b623060ffa87ba |
class MNIST(dataset._DownloadedDataset): <NEW_LINE> <INDENT> def __init__(self, root=os.path.join(base.data_dir(), 'datasets', 'mnist'), train=True, transform=None): <NEW_LINE> <INDENT> self._train = train <NEW_LINE> self._train_data = ('train-images-idx3-ubyte.gz', '6c95f4b05d2bf285e1bfb0e7960c31bd3b3f8a7d') <NEW_LINE... | MNIST handwritten digits dataset from http://yann.lecun.com/exdb/mnist
Each sample is an image (in 3D NDArray) with shape (28, 28, 1).
Parameters
----------
root : str, default $MXNET_HOME/datasets/mnist
Path to temp folder for storing data.
train : bool, default True
Whether to load the training or testing s... | 62598f681f5feb6acb162358 |
class RBTorsionType(_ListItem, _ParameterType): <NEW_LINE> <INDENT> def __init__(self, c0, c1, c2, c3, c4, c5, scee=1.0, scnb=1.0, list=None): <NEW_LINE> <INDENT> _ParameterType.__init__(self) <NEW_LINE> self.c0 = _strip_units(c0, u.kilocalories_per_mole) <NEW_LINE> self.c1 = _strip_units(c1, u.kilocalories_per_mole) <... | A Ryckaert-Bellemans type with a set of dihedral parameters
Parameters (and Attributes)
---------------------------
c0 : float
The coefficient of the constant term in kcal/mol
c1 : float
The coefficient of the linear term in kcal/mol
c2 : float
The coefficient of the quadratic term in kcal/mol
c3 : float
... | 62598f680383005118f6ce2a |
class BookInstance(models.Model): <NEW_LINE> <INDENT> id = models.UUIDField(primary_key = True, default=uuid.uuid4 , help_text = "Unique ID for this specific copy of a book") <NEW_LINE> book = models.ForeignKey("Book", on_delete = models.SET_NULL, null=True) <NEW_LINE> imprint = models.CharField(max_length = 200) <NEW_... | Model representing a specific instance of a book | 62598f68167d2b6e312b669c |
class ReferenceMapper(models.Model): <NEW_LINE> <INDENT> payment_reference_used = models.CharField(max_length=128) <NEW_LINE> payment_reference_intended = models.CharField(max_length=10) <NEW_LINE> payment_origination_name = models.CharField(max_length=30) <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return un... | Where Payments have been made with the 'wrong' reference
(that is one which does not exist in an `AccountDebt` model
instance the `ReferenceMapper` object is used to map the
reference that was used to the reference that should have been
used | 62598f68d6c5a102081e1862 |
class ConnorsRSI(bt.Indicator): <NEW_LINE> <INDENT> lines = ('crsi',) <NEW_LINE> params = dict(prsi=3, pstreak=2, prank=100) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> rsi = bt.ind.RSI_Safe(self.data, period=self.p.prsi) <NEW_LINE> streak = Streak(self.data) <NEW_LINE> rsi_streak = bt.ind.RSI_Safe(streak, perio... | Calculates the ConnorsRSI as:
- (RSI(per_rsi) + RSI(Streak, per_streak) + PctRank(per_rank)) / 3 | 62598f686e29344779affd7a |
class MembersGetInfoError(bb.Union): <NEW_LINE> <INDENT> _catch_all = 'other' <NEW_LINE> other = None <NEW_LINE> def is_other(self): <NEW_LINE> <INDENT> return self._tag == 'other' <NEW_LINE> <DEDENT> def _process_custom_annotations(self, annotation_type, processor): <NEW_LINE> <INDENT> super(MembersGetInfoError, self)... | This class acts as a tagged union. Only one of the ``is_*`` methods will
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method. | 62598f6821bff66bcd72237d |
class Update(APIView): <NEW_LINE> <INDENT> url_name = 'update' <NEW_LINE> rel = 'http://confine-project.eu/rel/registry/do-update' <NEW_LINE> def post(self, request, *args, **kwargs): <NEW_LINE> <INDENT> if not request.DATA: <NEW_LINE> <INDENT> sliver = get_object_or_404(Sliver, pk=kwargs.get('pk')) <NEW_LINE> self.che... | **Relation type:** [`http://confine-project.eu/rel/registry/do-update`](
http://confine-project.eu/rel/registry/do-update)
Contains the function URI used to update this sliver.
POST data: `null` | 62598f685e10d32532ce347a |
class bitmap_8bpp_negativeypelspermeter(bitmap_8bpp): <NEW_LINE> <INDENT> def get_pixels_per_meter_y(self): <NEW_LINE> <INDENT> return -10000 | An 8 bpp bitmap with a negative 'biYPelsPerMeter' field.
Most bitmap processors ignore this field, but it is most likely used when
printing the image. | 62598f68796e427e5384deb5 |
class NormalizeSectionShangOperator(OperatorBase): <NEW_LINE> <INDENT> def __init__(self, nominalmin: float = None, nominalmax: float = None, clipvalues: bool = False, name: str = 'normalize-gray'): <NEW_LINE> <INDENT> super().__init__(name=name) <NEW_LINE> assert nominalmin < nominalmax <NEW_LINE> self.nominalmin = no... | Contrast Correction based on section min/max within the chunk,
Shang's method. | 62598f68bf627c535bcb0ba3 |
class Port(base.APIBase): <NEW_LINE> <INDENT> uuid = wtypes.text <NEW_LINE> address = wtypes.text <NEW_LINE> extra = {wtypes.text: api_utils.ValidTypes(wtypes.text, six.integer_types)} <NEW_LINE> node_id = api_utils.ValidTypes(wtypes.text, six.integer_types) <NEW_LINE> links = [link.Link] <NEW_LINE> def __init__(self, ... | API representation of a port.
This class enforces type checking and value constraints, and converts
between the internal object model and the API representation of a port. | 62598f6838b623060ffa87bc |
class Vertex(object): <NEW_LINE> <INDENT> def __init__(self, vid): <NEW_LINE> <INDENT> self.vid = vid | Class: Vertex
An abstract superclass, is subclassed by a Movie and Actor classes. | 62598f6815baa723494616a6 |
class Chimp(pygame.sprite.Sprite, load.Load): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pygame.sprite.Sprite.__init__(self) <NEW_LINE> self.image, self.rect = self.load_image('monkeysized.png', -1) <NEW_LINE> screen = pygame.display.get_surface() <NEW_LINE> self.area = screen.get_rect() <NEW_LINE> sel... | moves a monkey critter across the screen. It can spin the monkey
when it is punched. | 62598f68d99f1b3c44d04dd4 |
class SAEPEncryptionPadding: <NEW_LINE> <INDENT> def __init__(self, _hash_type ='sha384'): <NEW_LINE> <INDENT> self.name = "SAEPEncryptionPadding" <NEW_LINE> self.hashFn = hashFunc(_hash_type) <NEW_LINE> self.hashFnOutputBytes = len(hashlib.new(_hash_type).digest()) <NEW_LINE> <DEDENT> def encode(self, message, n, s0):... | :Authors: Christina Garman
SAEPEncryptionPadding | 62598f681d351010ab8f3264 |
class FriendshipsShowInputSet(InputSet): <NEW_LINE> <INDENT> def set_AccessTokenSecret(self, value): <NEW_LINE> <INDENT> InputSet._set_input(self, 'AccessTokenSecret', value) <NEW_LINE> <DEDENT> def set_AccessToken(self, value): <NEW_LINE> <INDENT> InputSet._set_input(self, 'AccessToken', value) <NEW_LINE> <DEDENT> def... | An InputSet with methods appropriate for specifying the inputs to the FriendshipsShow
Choreo. The InputSet object is used to specify input parameters when executing this Choreo. | 62598f680a366e3fb87dc0e4 |
class FakeProducer(object): <NEW_LINE> <INDENT> resumeProducing = stopProducing = pauseProducing = lambda s: None | A fake producer. | 62598f68287bf620b62712de |
class DummyFcpGetIterKeyTd(NetAppObject): <NEW_LINE> <INDENT> _key_3 = None <NEW_LINE> @property <NEW_LINE> def key_3(self): <NEW_LINE> <INDENT> return self._key_3 <NEW_LINE> <DEDENT> @key_3.setter <NEW_LINE> def key_3(self, val): <NEW_LINE> <INDENT> if val != None: <NEW_LINE> <INDENT> self.validate('key_3', val) <NEW_... | Key typedef for table dummy_fcp_initiator | 62598f686fece00bbaccb0b7 |
class UserInterface(object): <NEW_LINE> <INDENT> def __init__(self, screen, player): <NEW_LINE> <INDENT> self.screen = screen <NEW_LINE> self.player = player <NEW_LINE> <DEDENT> def draw(self): <NEW_LINE> <INDENT> lifeBar = pygame.Rect(self.screen.get_rect().width - 120, 10, self.player.life, 15) <NEW_LINE> pygame.draw... | Class representing the user interface of the game | 62598f686e29344779affd7c |
class QCVProblem(Problem): <NEW_LINE> <INDENT> def __init__(self, comp_class=QuadraticCompVectorized): <NEW_LINE> <INDENT> super(QCVProblem, self).__init__() <NEW_LINE> model = self.model <NEW_LINE> comp1 = model.add_subsystem('p', IndepVarComp()) <NEW_LINE> comp1.add_output('a', np.array([1.0, 2.0, 3.0])) <NEW_LINE> c... | A QuadraticCompVectorized problem with configurable component class. | 62598f68d164cc617582069d |
class HTTP_404_NOT_FOUND(Exception): <NEW_LINE> <INDENT> pass | 404 - Not Found:
The requested resource does not exist. | 62598f68ff9c53063f519d77 |
class EntryAttributes(object): <NEW_LINE> <INDENT> def __init__(self, attr_raw): <NEW_LINE> <INDENT> self.__attr_raw = attr_raw <NEW_LINE> <DEDENT> def __del__(self): <NEW_LINE> <INDENT> _sftp_attributes_free(self.__attr_raw) <NEW_LINE> <DEDENT> def __getattr__(self, key): <NEW_LINE> <INDENT> return getattr(self.__attr... | This wraps the raw attribute type, and frees it at destruction. | 62598f6821bff66bcd72237f |
class FilterList(ThemedElement): <NEW_LINE> <INDENT> jsClass = u'Methanal.Widgets.FilterList' <NEW_LINE> fragmentName = 'methanal-filter-list' <NEW_LINE> def __init__(self, form, resultWidget, title=None, **kw): <NEW_LINE> <INDENT> super(FilterList, self).__init__(**kw) <NEW_LINE> self.form = form <NEW_LINE> self.resul... | A filtering search widget.
Essentially just a form that results in a server-side call, on submission,
and a result widget.
One particularly common application is a search widget: A form containing
inputs representing fields to filter by, which, when submitted, results in
a server-side database query and a QueryList w... | 62598f68bf627c535bcb0ba5 |
class ZStormResourceManager(TestResourceManager): <NEW_LINE> <INDENT> force_delete = False <NEW_LINE> def __init__(self, databases): <NEW_LINE> <INDENT> super(ZStormResourceManager, self).__init__() <NEW_LINE> self._databases = databases <NEW_LINE> self._zstorm = None <NEW_LINE> self._schema_zstorm = None <NEW_LINE> se... | Provide a L{ZStorm} resource to be used in test cases.
The constructor is passed the details of the L{Store}s to be registered
in the provided L{ZStore} resource. Then the C{make} and C{clean} methods
make sure that such L{Store}s are properly setup and cleaned for each test.
@param databases: A C{list} of C{dict}s h... | 62598f6850485f2cf55da691 |
class MailchimpListIDForm(forms.Form): <NEW_LINE> <INDENT> list_id = forms.ChoiceField(required=True, choices=[]) <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self._api_key = None <NEW_LINE> if 'api_key' in kwargs: <NEW_LINE> <INDENT> self._api_key = kwargs.pop('api_key', None) <NEW_LINE> <DEDENT... | MailchimpListIDForm.
Second form of the wizard. Here users are supposed to choose the form
they want to import. | 62598f6876d4e153a661c33a |
class Internal_gtp_channel(Gtp_channel): <NEW_LINE> <INDENT> def __init__(self, engine): <NEW_LINE> <INDENT> Gtp_channel.__init__(self) <NEW_LINE> self.engine = engine <NEW_LINE> self.outstanding_commands = [] <NEW_LINE> self.session_is_ended = False <NEW_LINE> <DEDENT> def send_command_impl(self, command, arguments): ... | A GTP channel connected to an in-process Python GTP engine.
Instantiate with a Gtp_engine_protocol object.
This waits to invoke the engine's handler for each command until the
correponding response is requested. | 62598f68d10714528d69d5ef |
class QuestionForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Question <NEW_LINE> fields = ('string', 'quiz') <NEW_LINE> widgets = {'string': forms.TextInput(), 'quiz': forms.HiddenInput()} <NEW_LINE> <DEDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(QuestionForm... | Create a question associated with a quiz. | 62598f6850485f2cf55da692 |
class TestClientForSAN(TestClient): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.domain_alt_names = [ "blog.exampleSAN.com", "staging.exampleSAN.com", "www.exampleSAN.com", ] <NEW_LINE> with mock.patch("requests.post") as mock_requests_post, mock.patch( "requests.get" ) as mock_requests_get: <NEW_LINE>... | Test Acme client for SAN certificates. | 62598f687b25080760ed6bbd |
class ConstantPad1d(_ConstantPadNd): <NEW_LINE> <INDENT> def __init__(self, padding, value): <NEW_LINE> <INDENT> super(ConstantPad1d, self).__init__(value) <NEW_LINE> self.padding = _pair(padding) | Pads the input tensor boundaries with a constant value.
For `N`d-padding, use :func:`torch.nn.functional.pad()`.
Args:
padding (int, tuple): the size of the padding. If is `int`, uses the same
padding in both boundaries. If a 2-`tuple`, uses
(:math:`\text{padding\_left}`, :math:`\text{padding\_rig... | 62598f68c432627299fa26f8 |
class TestGlanceClientVersion(test.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(TestGlanceClientVersion, self).setUp() <NEW_LINE> def fake_get_model(self): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> self.stubs.Set(glanceclient_v2, '_get_image_model', fake_get_model) <NEW_LINE> try: <NEW... | Tests the version of the glance client generated. | 62598f684d74a7450cd58a6a |
class roi2d(recoBase): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(roi2d, self).__init__() <NEW_LINE> self._productName = 'roi2d' <NEW_LINE> self._product_id = 1 <NEW_LINE> larcv.load_pyutil() <NEW_LINE> <DEDENT> def drawObjects(self, view_manager, io_manager, meta): <NEW_LINE> <INDENT> event_roi2... | docstring for cluster | 62598f68bf627c535bcb0ba7 |
class StripeTokenApi(APIView): <NEW_LINE> <INDENT> def get(self, request, format=None): <NEW_LINE> <INDENT> tokens = stripe.Token.create( card={"name": 'Atlas', "number": '4242424242424242', "exp_month": '05', "exp_year": '2022', "cvc": '123'}) <NEW_LINE> return Response({ "data": tokens.id, "status": True, "code": 200... | Fetch stripe token APIView | 62598f68711fe17d825dfe0f |
class RationalNumber: <NEW_LINE> <INDENT> def __init__(self, numerator, denominator=1): <NEW_LINE> <INDENT> self.n = numerator <NEW_LINE> self.d = denominator <NEW_LINE> <DEDENT> def __add__(self, other): <NEW_LINE> <INDENT> if not isinstance(other, RationalNumber): <NEW_LINE> <INDENT> other = RationalNumber(other) <NE... | Rational Numbers with support for arthmetic operations.
>>> a = RationalNumber(1, 2)
>>> b = RationalNumber(1, 3)
>>> a + b
5/6
>>> a - b
1/6
>>> a * b
1/6
>>> a/b
3/2 | 62598f681d351010ab8f3268 |
class build_scripts_cmds(build_scripts): <NEW_LINE> <INDENT> def copy_scripts(self): <NEW_LINE> <INDENT> build_scripts.copy_scripts(self) <NEW_LINE> for script in self.scripts: <NEW_LINE> <INDENT> script_name = os.path.basename(script) <NEW_LINE> cmd_file = os.path.join(self.build_dir, script_name + '.cmd') <NEW_LINE> ... | Add <name>.cmd files so scripts work at the command line on Windows | 62598f685166f23b2e242b00 |
class FaultTo(EndpointReferenceType_): <NEW_LINE> <INDENT> c_tag = 'FaultTo' <NEW_LINE> c_namespace = NAMESPACE <NEW_LINE> c_children = EndpointReferenceType_.c_children.copy() <NEW_LINE> c_attributes = EndpointReferenceType_.c_attributes.copy() <NEW_LINE> c_child_order = EndpointReferenceType_.c_child_order[:] <NEW_LI... | The http://www.w3.org/2005/08/addressing:FaultTo element | 62598f68d6c5a102081e1868 |
class GoodSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = GoodsInfo <NEW_LINE> fields = [ 'id', 'type', 'order', 'name', 'weight', 'kits', 'number', 'length', 'width', 'height', 'volume', 'declared_price', 'sku_name', 'customs_code', ] <NEW_LINE> <DEDENT> def create(... | 货物序列化器 | 62598f68287bf620b62712e2 |
class PyfaceTimer(BaseTimer): <NEW_LINE> <INDENT> _timer = Instance(wx.Timer) <NEW_LINE> def _start(self): <NEW_LINE> <INDENT> self._timer.Start(int(self.interval * 1000)) <NEW_LINE> <DEDENT> def _stop(self): <NEW_LINE> <INDENT> self._timer.Stop() <NEW_LINE> <DEDENT> def __timer_default(self): <NEW_LINE> <INDENT> retur... | Abstract base class for Wx toolkit timers. | 62598f686fece00bbaccb0bb |
class NotFoundConsumer(WebsocketConsumer): <NEW_LINE> <INDENT> def connect(self, message, **kwargs): <NEW_LINE> <INDENT> super(self.__class__, self).connect(message, **kwargs) <NEW_LINE> message.reply_channel.send({ 'text': json.dumps({ 'detail': _('Not found.') }) }) <NEW_LINE> self.close() | Not found consumer | 62598f6830c21e258be97f25 |
class Protocol: <NEW_LINE> <INDENT> def __init__(self, protocolDescriptionPath): <NEW_LINE> <INDENT> self._cmds = {} <NEW_LINE> protocol = ET.parse(protocolDescriptionPath).getroot() <NEW_LINE> for child in protocol: <NEW_LINE> <INDENT> if child.tag == 'Cmd': <NEW_LINE> <INDENT> self._cmds[child.attrib['NAME']] = child... | Device protocol descrition/interface. | 62598f68d164cc61758206a0 |
class CertificateSwitchException(Exception): <NEW_LINE> <INDENT> pass | Certificates may be set only once. | 62598f6873bcbd0ca4bc997a |
class OperationListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'value': {'readonly': True}, 'next_link': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[Operation]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, **k... | A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: List of operations supported by the resource provider.
:vartype value: list[~open_energy_p... | 62598f68ff9c53063f519d7b |
class FileGridfs(MongoConnection): <NEW_LINE> <INDENT> def preparations_data(self, data): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.data = data <NEW_LINE> <DEDENT> except Exception as exc: <NEW_LINE> <INDENT> LOGGER.error('exception when processing: %r %r %r (%r)', self.dbm.currdb, self.dbm.currcoll, data, exc)... | This class is responsible for the different types of writing to mongo.
This class files and other binary format stores.
FileGridfs inherits from the MongoConnection. | 62598f684d74a7450cd58a6b |
class PartitionedView(object): <NEW_LINE> <INDENT> def __init__(self, view_key=None, view_class=None): <NEW_LINE> <INDENT> self.view_key = view_key <NEW_LINE> self.view_class = view_class <NEW_LINE> <DEDENT> def partition_keys(self): <NEW_LINE> <INDENT> return () <NEW_LINE> <DEDENT> def _get_view(self, key): <NEW_LINE>... | A Lazyboy view which is partitioned across rows. | 62598f68bf627c535bcb0ba9 |
class TopologiesHandler(BaseHandler): <NEW_LINE> <INDENT> def initialize(self, tracker): <NEW_LINE> <INDENT> self.tracker = tracker <NEW_LINE> <DEDENT> @tornado.gen.coroutine <NEW_LINE> def get(self): <NEW_LINE> <INDENT> clusters = self.get_arguments(constants.PARAM_CLUSTER) <NEW_LINE> environs = self.get_arguments(con... | URL - /topologies
Parameters:
- cluster (optional)
- tag (optional)
The response JSON is a dict with following format:
{
<cluster1>: {
<default>: [
topology1,
topology2,
...
],
<environ1>: [
topology1,
topology2,
...
],
<environ2>: [...],
...
},
<clus... | 62598f68a8ecb0332587092c |
class COutPoint(ImmutableSerializable): <NEW_LINE> <INDENT> __slots__ = ['hash', 'n'] <NEW_LINE> def __init__(self, hash=b'\x00'*32, n=0xffffffff): <NEW_LINE> <INDENT> if not len(hash) == 32: <NEW_LINE> <INDENT> raise ValueError('COutPoint: hash must be exactly 32 bytes; got %d bytes' % len(hash)) <NEW_LINE> <DEDENT> o... | The combination of a transaction hash and an index n into its vout | 62598f6830c21e258be97f26 |
class TownLights(object): <NEW_LINE> <INDENT> def __init__(self, xpos, ypos, xlen, ylen, max_town_lights=20): <NEW_LINE> <INDENT> self.lights = [] <NEW_LINE> light_count = int(random(max_town_lights)) <NEW_LINE> for i in range(light_count): <NEW_LINE> <INDENT> x = int(xpos+random(xlen)) <NEW_LINE> y = int(ypos+random(y... | A class to manage building lights for Python Mode Processing. | 62598f686e29344779affd82 |
class CameraApp(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(CameraApp, self).__init__() <NEW_LINE> self.camera = cv2.VideoCapture(2) <NEW_LINE> self.camera.set(3, 1280) <NEW_LINE> self.camera.set(4, 720) <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> while True: <NEW_LINE> <INDENT... | docstring for CameraApp | 62598f689b70327d1c57e4d1 |
class Vehicles(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__vehicles = [] <NEW_LINE> <DEDENT> def get_vehicle(self, vin): <NEW_LINE> <INDENT> for vehicle in self.__vehicles: <NEW_LINE> <INDENT> if vehicle.get_vin() == vin: <NEW_LINE> <INDENT> return vehicle <NEW_LINE> <DEDENT> <DEDENT> ra... | Aggregating class maintains a collection of Vehicle objects | 62598f6821bff66bcd722386 |
class OneIdentity(Predefined): <NEW_LINE> <INDENT> pass | 'OneIdentity' affects pattern matching:
>> SetAttributes[f, OneIdentity]
>> a /. f[args___] -> {args}
= {a}
It does not affect evaluation:
>> f[a]
= f[a] | 62598f68d10714528d69d5f4 |
class FontMiscMeltho(Package): <NEW_LINE> <INDENT> homepage = "http://cgit.freedesktop.org/xorg/font/misc-meltho" <NEW_LINE> url = "https://www.x.org/archive/individual/font/font-misc-meltho-1.0.3.tar.gz" <NEW_LINE> version('1.0.3', '8380696483478449c39b04612f20eea8') <NEW_LINE> depends_on('font-util') <NEW_LINE> ... | X.org misc-meltho font. | 62598f680383005118f6ce34 |
class FakeNetworkQosRule(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def create_one_qos_rule(attrs=None): <NEW_LINE> <INDENT> attrs = attrs or {} <NEW_LINE> type = attrs.get('type') or choice(VALID_QOS_RULES) <NEW_LINE> qos_rule_attrs = { 'id': 'qos-rule-id-' + uuid.uuid4().hex, 'qos_policy_id': 'qos-policy-i... | Fake one or more Network QoS rules. | 62598f686e29344779affd84 |
class IsContentOwner(permissions.BasePermission): <NEW_LINE> <INDENT> def has_object_permission(self, request, view, obj): <NEW_LINE> <INDENT> return request.user == obj | Permiso personalizado para solo permitir que el propio usuario vea sus borradores o contenidos eliminados. | 62598f6873bcbd0ca4bc997e |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.