code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Flatten(Layer): <NEW_LINE> <INDENT> def __init__(self, trainable=True, input_shape=None, input_dtype=None, batch_size=None, name=None): <NEW_LINE> <INDENT> super(Flatten, self).__init__(trainable, name, input_shape=input_shape, input_dtype=input_dtype, batch_size=batch_size) <NEW_LINE> <DEDENT> def _call(self, x)... | Flattens the input. Does not affect the batch size.
Example
-------
```python
model = Sequential()
model.add(Convolution2D(64, 3, 3, border_mode='same', input_shape=(3, 32, 32)))
# now: model.output_shape == (None, 64, 32, 32)
model.add(Flatten())
# now: model.output_shape == (None, 65536)
``` | 62598fc723849d37ff8513ce |
class HelloViewSet(viewsets.ViewSet): <NEW_LINE> <INDENT> serializer_class =serializers.HelloSerializer <NEW_LINE> def list(self,request): <NEW_LINE> <INDENT> a_viewset=[ 'Uses action(list, create,retrive, update,portial_update)', 'Automatically maps to URLS using Routers', 'Provides more functionality with less code',... | Test API ViewSet | 62598fc755399d3f05626835 |
class CourseInstructorFactory(DjangoModelFactory): <NEW_LINE> <INDENT> first_name = factory.Faker("name") <NEW_LINE> last_name = factory.Faker("name") <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = CourseInstructor | Factory for course instructors | 62598fc74527f215b58ea1ec |
@method_decorator(login_required, name='dispatch') <NEW_LINE> class ClienteListView(ListView): <NEW_LINE> <INDENT> model = Cliente | docstring for PhotoListView | 62598fc75fcc89381b2662db |
class Square(): <NEW_LINE> <INDENT> def __init__(self, side_length): <NEW_LINE> <INDENT> self.__side_length = side_length <NEW_LINE> self.__side_width = (int) <NEW_LINE> self.__center = [int,int] <NEW_LINE> self.__color = ("") <NEW_LINE> self.name = ("") <NEW_LINE> <DEDENT> ''' Destructor ''' <NEW_LINE> def __del__(sel... | Constructor | 62598fc7099cdd3c63675570 |
class ResortListSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> name = serializers.ReadOnlyField(source='resort_name') <NEW_LINE> latitude = serializers.ReadOnlyField(source='resort_location_latitude') <NEW_LINE> longitude = serializers.ReadOnlyField(source='resort_location_longitude') <NEW_LINE> websiteUr... | Create serialized Resort objects to serve from the API. This returns the minimal detail
expected for listing resort search results. | 62598fc7956e5f7376df580c |
class UseNode(object): <NEW_LINE> <INDENT> __slots__ = ['value','hkey','older','newer', 'sideEffects', 'size', 'strongref', '__weakref__'] <NEW_LINE> def __init__(self, value, hkey, older=None, newer=None): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> self.hkey = hkey <NEW_LINE> self.older = older <NEW_LINE> self.... | For linked list kept in most-recent .. least-recent *use* order | 62598fc7a05bb46b3848ab88 |
class Meta: <NEW_LINE> <INDENT> verbose_name = 'Post' <NEW_LINE> verbose_name_plural = 'Posts' | Meta definition for Post. | 62598fc7a8370b77170f06f8 |
class Options: <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> self.parse(sys.argv) <NEW_LINE> <DEDENT> def get_vncserver(self) -> command_mod.Command: <NEW_LINE> <INDENT> return self._vncserver <NEW_LINE> <DEDENT> def _config(self) -> None: <NEW_LINE> <INDENT> if not os.path.isfile( os.path.join(os... | Options class | 62598fc77d847024c075c6da |
class UnsupportedS3ArnError(BotoCoreError): <NEW_LINE> <INDENT> fmt = ( 'S3 ARN {arn} provided to "Bucket" parameter is invalid. Only ' 'ARNs for S3 access-points are supported.' ) | Error when S3 arn provided to Bucket parameter is not supported | 62598fc763b5f9789fe85492 |
class User(Base): <NEW_LINE> <INDENT> __tablename__ = 'users' <NEW_LINE> name = db.Column(db.String, nullable=False) <NEW_LINE> email = db.Column(db.String, nullable=False, unique=True) <NEW_LINE> _password_hash = db.Column(db.String) <NEW_LINE> @password <NEW_LINE> def password(self): <NEW_LINE> <INDENT> return 'Passw... | User Model | 62598fc73346ee7daa3377d7 |
class IsOwnerOrReadOnly(permissions.BasePermission): <NEW_LINE> <INDENT> def has_object_permission(self, request, view, obj): <NEW_LINE> <INDENT> if request.method in permissions.SAFE_METHODS: <NEW_LINE> <INDENT> return rules.test_rule('can_read_datasource', request.user, obj) <NEW_LINE> <DEDENT> return obj.owner == re... | Custom permission to only allow owners of an object to edit it. | 62598fc70fa83653e46f5204 |
class TestArticle(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.test_article = Article('', '', '', '', '', '', '') <NEW_LINE> <DEDENT> def test_instance(self): <NEW_LINE> <INDENT> self.assertTrue(isinstance(self.test_article, Article)) | tests that article class is functional | 62598fc7f9cc0f698b1c5461 |
class Types: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> for i in p_data.types: <NEW_LINE> <INDENT> setattr(self, i, PokeType(i, **p_data.types[i])) <NEW_LINE> <DEDENT> for i in p_data.sub_types: <NEW_LINE> <INDENT> setattr(self, i, PokeSubType(i)) | Class to organize PokeTypes
ARGS:
p_data: p_data module | 62598fc7091ae35668704f47 |
class UserCodeGroupViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = UserCodeGroup.objects.all() <NEW_LINE> serializer_class = UserCodeGroupSerializer <NEW_LINE> parser_classes = (MultiPartParser, FormParser,) <NEW_LINE> permission_classes = (permissions.IsAuthenticated,) <NEW_LINE> lookup_field = 'id' | API endpoint that allows users to be viewed or edited.
This viewset automatically provides `list`, `create`, `retrieve`,
`update` and `destroy` actions. | 62598fc73d592f4c4edbb1d0 |
class DonateDeviotCommand(sublime_plugin.WindowCommand): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> sublime.run_command('open_url', {'url': 'https://goo.gl/K0EpFU'}) | Show the Deviot github site.
Extends: sublime_plugin.WindowCommand | 62598fc77b180e01f3e491df |
class CreateArtificialDataset(Dataset): <NEW_LINE> <INDENT> def __init__(self, X_Mat, Y_Vec): <NEW_LINE> <INDENT> self.X_Mat = X_Mat <NEW_LINE> self.Y_Vec = Y_Vec <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> return self.X_Mat.size()[0] <NEW_LINE> <DEDENT> def __getitem__(self, idx): <NEW_LINE> <INDENT> re... | Face Landmarks dataset. | 62598fc7956e5f7376df580d |
class TestCartesianToCylindrical(unittest.TestCase): <NEW_LINE> <INDENT> def test_cartesian_to_cylindrical(self): <NEW_LINE> <INDENT> np.testing.assert_almost_equal( cartesian_to_cylindrical(np.array([3, 1, 6])), np.array([3.16227766, 0.32175055, 6.00000000]), decimal=7, ) <NEW_LINE> np.testing.assert_almost_equal( car... | Define :func:`colour.algebra.coordinates.transformations.cartesian_to_cylindrical` definition unit tests methods. | 62598fc72c8b7c6e89bd3ae3 |
class TaxonomyAttributeSinglecodeValue(TaxonomyAttributeValue): <NEW_LINE> <INDENT> def __init__(self, attribute): <NEW_LINE> <INDENT> TaxonomyAttributeValue.__init__(self, attribute) <NEW_LINE> self.__code = None <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> raise NotImplementedError("taxonomy specific im... | This class represent a valid taxonomy value that is composed
of a valid code | 62598fc7a05bb46b3848ab8a |
class tagRECT(obj.CType): <NEW_LINE> <INDENT> def get_tup(self): <NEW_LINE> <INDENT> return (self.left, self.top, self.right, self.bottom) | A class for window rects | 62598fc75fdd1c0f98e5e2ac |
class BlessingsStringFormatter(logbook.StringFormatter): <NEW_LINE> <INDENT> def __init__(self, format_string=None, colorizers=tuple()): <NEW_LINE> <INDENT> self.colorizers = colorizers <NEW_LINE> self.terminal = blessings.Terminal() <NEW_LINE> self.md5_cache = {} <NEW_LINE> if not format_string: <NEW_LINE> <INDENT> fo... | StringFormatter subclass that gives access to blessings.Terminal().
This class adds the `t` object in the formatting string, which is an
instance of blessings.Terminal(). It also provides helper functions to
colorize the log level and log channel. | 62598fc7a8370b77170f06fa |
class MuteManager(BaseModelManager[Mute]): <NEW_LINE> <INDENT> MODEL_CLASS = Mute <NEW_LINE> def mute(self, expiration: datetime) -> Result[None]: <NEW_LINE> <INDENT> return self._execute_command('mute', {'expiration': int(expiration.timestamp())}) <NEW_LINE> <DEDENT> def can_mute(self) -> Result[bool]: <NEW_LINE> <IND... | Mute manager. It allows manage chat mute. | 62598fc7fbf16365ca7943d7 |
class ParameterStringDirectory(ParameterString): <NEW_LINE> <INDENT> pass | This is parameter whose contents are the name of a directory. | 62598fc750812a4eaa620d74 |
class Queue(HashHelper): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.items = [] <NEW_LINE> super(Queue, self).__init__() <NEW_LINE> <DEDENT> def is_empty(self): <NEW_LINE> <INDENT> return self.items == [] <NEW_LINE> <DEDENT> def insert(self, item): <NEW_LINE> <INDENT> self.items.insert(0, item) <NE... | A queue class | 62598fc73346ee7daa3377d8 |
class LineNumber(QWidget): <NEW_LINE> <INDENT> def __init__(self, editor): <NEW_LINE> <INDENT> QWidget.__init__(self, editor) <NEW_LINE> self.editor = editor <NEW_LINE> self.editor.blockCountChanged.connect(self.updateAreaWidth) <NEW_LINE> self.editor.updateRequest.connect(self.updateLineNumber) <NEW_LINE> self._flaged... | Line Number widget for RstTextEdit component | 62598fc7377c676e912f6f05 |
class Tree(object): <NEW_LINE> <INDENT> def __init__(self, base_pipeline): <NEW_LINE> <INDENT> self.base_pipeline = base_pipeline <NEW_LINE> self.logger = logging.getLogger(__name__+'.Tree') <NEW_LINE> self.logger.info('This will be deprecated!') <NEW_LINE> self.failing = [] <NEW_LINE> self.stopped = [] <NEW_LINE> self... | This object contains a tree of pipelines, expanding out from a
base pipeline. | 62598fc7f9cc0f698b1c5462 |
class HTTPClient(object): <NEW_LINE> <INDENT> def __init__(self, endpoint_url, cert=None, key=None, cacert=None): <NEW_LINE> <INDENT> self.VERSION = 'v1' <NEW_LINE> self.endpoint_url = endpoint_url <NEW_LINE> self.cert = None <NEW_LINE> if cert is not None and key is not None: <NEW_LINE> <INDENT> self.cert = (cert, key... | Wrapper class for HTTP methods. | 62598fc7fff4ab517ebcdb08 |
class ParamTable(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._params = {} <NEW_LINE> <DEDENT> def add(self, param: Param): <NEW_LINE> <INDENT> if not isinstance(param, Param): <NEW_LINE> <INDENT> raise TypeError("Only accepts a Param instance.") <NEW_LINE> <DEDENT> if param.name in self._p... | Parameter table class.
Example:
>>> params = ParamTable()
>>> params.add(Param('ham', 'Parma Ham'))
>>> params.add(Param('egg', 'Over Easy'))
>>> params['ham']
'Parma Ham'
>>> params['egg']
'Over Easy'
>>> print(params)
ham Parma Ham
egg ... | 62598fc771ff763f4b5e7a9f |
class TestWSAEVENT(ObjectBaseTestCase): <NEW_LINE> <INDENT> OBJECT_CLASS = WSAEVENT <NEW_LINE> def cast_from_value(self, int_data): <NEW_LINE> <INDENT> ffi, _ = dist.load() <NEW_LINE> cdata = ffi.new(self.OBJECT_CLASS.C_TYPE) <NEW_LINE> cdata[0] = ffi.cast(self.OBJECT_CLASS.__name__, int_data) <NEW_LINE> return self.OB... | Tests for :class:`pywincffi.wintypes.WSAEVENT` | 62598fc7656771135c489990 |
class Douglas2013TestCaseSD010Q200K020(Douglas2013TestCaseSD001Q200K005): <NEW_LINE> <INDENT> GSIM_CLASS = dst.DouglasEtAl2013StochasticSD010Q200K020 <NEW_LINE> MEAN_FILE = 'DOUG2013/DOUGLAS_2013_STOCHASTIC_MEAN_SD010Q0200K020.csv' <NEW_LINE> STD_FILE = 'DOUG2013/DOUGLAS_2013_STOCHASTIC_STD_SD010Q0200K020.csv' <NEW_LIN... | Tests the Douglas et al (2013) stochastic GMPE.
SD = 010 Q = 200 K = 0.020 | 62598fc77c178a314d78d7c0 |
class TUI(UI): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.outputDst = TerminalOutput() <NEW_LINE> self.inputSrc = TerminalInput() <NEW_LINE> <DEDENT> def get_str(self) -> str: <NEW_LINE> <INDENT> return self.inputSrc.get() <NEW_LINE> <DEDENT> def get_num(self, any=Fal... | Implements a user interface (UI) in a terminal setting. | 62598fc74a966d76dd5ef1f6 |
class TestV1LaunchSecurity(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 testV1LaunchSecurity(self): <NEW_LINE> <INDENT> pass | V1LaunchSecurity unit test stubs | 62598fc7ab23a570cc2d4efe |
class Quadrant(object): <NEW_LINE> <INDENT> def __init__(self, x, f): <NEW_LINE> <INDENT> self.x = np.asarray(x) <NEW_LINE> self.f = np.asarray(f) <NEW_LINE> self.n = float(sum(self.x)) <NEW_LINE> self.m = float(sum(self.f)) <NEW_LINE> self.k = len(self.x) <NEW_LINE> self.var = self.variance() <NEW_LINE> self.mean = su... | Determine whether a random (Poisson) process has generated a
point pattern.
Requirements
------------
1. Randaom sample of points from a population.
2. Sample points are independently selected.
Null Hypthothesis
-----------------
VMR = 1 (point pattern is random)
Test Statistic
--------------
Chi-Square = VMR*(... | 62598fc75fdd1c0f98e5e2ae |
class TestAuthorizeRequest: <NEW_LINE> <INDENT> def test_calculated_length(self): <NEW_LINE> <INDENT> payload = AuthorizeRequest(key=12345678) <NEW_LINE> assert payload.calculated_length() == 5 <NEW_LINE> <DEDENT> def test_from_knx(self): <NEW_LINE> <INDENT> payload = AuthorizeRequest() <NEW_LINE> payload.from_knx(byte... | Test class for AuthorizeRequest objects. | 62598fc7d8ef3951e32c7fec |
class ModelDocument(Document, ToSonDocumentMixin): <NEW_LINE> <INDENT> __metaclass__ = ModelDocumentMetaclass <NEW_LINE> my_metaclass = None <NEW_LINE> meta = { 'abstract': True, 'queryset_class': ModelQuerySet, } <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> if self.label: <NEW_LINE> <... | A base class for all models.
This uses Flask-MongoEngine as a base, to provide extra convenience methods. | 62598fc7851cf427c66b85d6 |
class OccurrenceReplacer(object): <NEW_LINE> <INDENT> def __init__(self, persisted_occurrences): <NEW_LINE> <INDENT> lookup = [((occ.event, occ.original_start, occ.original_end), occ) for occ in persisted_occurrences] <NEW_LINE> self.lookup = dict(lookup) <NEW_LINE> <DEDENT> def get_occurrence(self, occ): <NEW_LINE> <I... | When getting a list of occurrences, the last thing that needs to be done
before passing it forward is to make sure all of the occurrences that
have been stored in the datebase replace, in the list you are returning,
the generated ones that are equivalent. This class makes this easier. | 62598fc7ad47b63b2c5a7b7b |
class Board: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.places = {} <NEW_LINE> self.white_pieces = [] <NEW_LINE> self.black_pieces = [] <NEW_LINE> self.reset_board() <NEW_LINE> <DEDENT> def reset_board(self): <NEW_LINE> <INDENT> self.places.clear() <NEW_LINE> self.white_pieces.clear() <NEW_LINE> s... | Board abstraction that contains a dictionary of 64 place objects along with 2 lists that contain
all white and black pieces that haven't been captured | 62598fc7ab23a570cc2d4eff |
class ChatSession(asynchat.async_chat): <NEW_LINE> <INDENT> def __init__(self, server, sock): <NEW_LINE> <INDENT> asynchat.async_chat.__init__(self, sock) <NEW_LINE> self.server = server <NEW_LINE> self.set_terminator('\r\n'.encode('utf-8')) <NEW_LINE> self.data = [] <NEW_LINE> self.usr_name = '' <NEW_LINE> self.entere... | 处理与单个用户的通信会话,将socket变为异步的
这个会话类型用于chat-style (command/response) protocols
因此文件协议需要另外的设计 | 62598fc7d8ef3951e32c7fed |
class testDA_visualize(unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> np.random.seed(0) <NEW_LINE> N = 150 <NEW_LINE> p = 2 <NEW_LINE> n_classes = 3 <NEW_LINE> X, y_cls = datasets.make_classification(n_samples=N, n_features=p, n_informative=p, n_redundant=0, n_c... | Some 2D classification visualizations | 62598fc750812a4eaa620d76 |
class TestMetaClasses: <NEW_LINE> <INDENT> def test_no_config_path(self): <NEW_LINE> <INDENT> class DummyApplication(p_cli.ProsperApplication): <NEW_LINE> <INDENT> PROGNAME = 'DUMMY' <NEW_LINE> VERSION = '0.0.0' <NEW_LINE> here_path = HERE <NEW_LINE> def main(self): <NEW_LINE> <INDENT> return 'yes' <NEW_LINE> <DEDENT> ... | validate expected errors from abc | 62598fc760cbc95b06364661 |
class DashboardPageExtended(DashboardPage): <NEW_LINE> <INDENT> url = LOGIN_BASE_URL + '/home' <NEW_LINE> def is_browser_on_page(self): <NEW_LINE> <INDENT> return self.q(css='.courses.courses-tab.active').visible <NEW_LINE> <DEDENT> def select_course(self, course_title): <NEW_LINE> <INDENT> query = self.q(xpath=f'//h3[... | This class is an extended class of Studio Dashboard Page,
where we add methods that are different or not used in DashboardPage | 62598fc70fa83653e46f520a |
class CanFdIsoMode(enum.Enum): <NEW_LINE> <INDENT> ISO = _cconsts.NX_CAN_FD_MODE_ISO <NEW_LINE> NON_ISO = _cconsts.NX_CAN_FD_MODE_NON_ISO <NEW_LINE> ISO_LEGACY = _cconsts.NX_CAN_FD_MODE_ISO_LEGACY | CAN FD ISO MODE.
Values:
ISO:
ISO CAN FD standard (ISO standard 11898-1:2015)
In ISO CAN FD mode, for every transmitted frame, you can specify in
the database or frame header whether a frame must be sent in CAN
2.0, CAN FD, or CAN FD+BRS mode. In the frame type field of the
... | 62598fc73346ee7daa3377da |
class TestError(Error): <NEW_LINE> <INDENT> params = 'items' <NEW_LINE> @property <NEW_LINE> def text(self): <NEW_LINE> <INDENT> return ''.join('\n\n* ' + item for item in self.env['items']) | Some error. | 62598fc7f9cc0f698b1c5464 |
class FileWrapper(FileLikeWrapper): <NEW_LINE> <INDENT> @deprecated_str_to_path(1, "source") <NEW_LINE> def __init__( self, source: PathOrFile, mode: ModeArg = "w", compression: CompressionArg = False, name: Union[str, PurePath] = None, close_fileobj: bool = True, memory_mapped: bool = False, **kwargs, ) -> None: <NEW_... | Wrapper around a file object.
Args:
source: Path or file object.
mode: File open mode.
compression: Compression type.
name: Use an alternative name for the file.
kwargs: Additional arguments to pass to xopen. | 62598fc74c3428357761a5e1 |
class MetaModel(object): <NEW_LINE> <INDENT> train_score = { 'r2_score': { 'name': 'r2_score', 'function': make_scorer( r2_score, greater_is_better=True)}, 'mae': { 'name': 'mean_absolute_error', 'function': make_scorer( mean_absolute_error, greater_is_better=False)}, 'hae': { 'name': 'harmonic_ average_error', 'functi... | This class serves as a superclass for all approximation models and
provides a common interface to be used by the Trainer and outside
of this module. It manages a chain of preprocessing steps and
provides the methods :meth:`fit` and :meth:`predict` to fit the
concrete model to the given training data and to predict outp... | 62598fc7656771135c489994 |
class Mesh(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.positions = bytes() <NEW_LINE> self.normals = bytes() <NEW_LINE> self.uvs = bytes() <NEW_LINE> self.numVerts = 0 <NEW_LINE> self.numIdx = 0 <NEW_LINE> self.idxBuff = bytes() <NEW_LINE> self.matNum = -1 <NEW_LINE> self.matName = "" <NEW... | A generic mesh object, for convenience | 62598fc73d592f4c4edbb1d6 |
class AccountOverview(generic.TemplateView): <NEW_LINE> <INDENT> template_name = 'profiles/account-overview.html' <NEW_LINE> def get_context_data(self,**kwargs): <NEW_LINE> <INDENT> context = super().get_context_data(**kwargs) <NEW_LINE> context['email'] = 'contact@mail.com' <NEW_LINE> return context | render customer profile details and support data | 62598fc7283ffb24f3cf3baa |
class Station(SurrogatePK, Model, CRUDMixin): <NEW_LINE> <INDENT> __tablename__ = 'stations' <NEW_LINE> name = Column(db.String(80), unique=True, nullable=False) <NEW_LINE> lat = Column(db.Float) <NEW_LINE> lon = Column(db.Float) <NEW_LINE> altitude = Column(db.Float) <NEW_LINE> def __init__(self, name, **kwargs): <NEW... | A weather station.
name: name of the station
lat: latitude of the station, float, degrees
lon: longitude of the station, float, degrees | 62598fc77cff6e4e811b5d4b |
class TestKmipClient(testtools.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(TestKmipClient, self).setUp() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> super(TestKmipClient, self).tearDown() <NEW_LINE> <DEDENT> def test_init(self): <NEW_LINE> <INDENT> DummyKmipClient() <NEW_LI... | Test suite for KmipClient.
Since KmipClient is an ABC abstract class, all tests are run against a
dummy subclass defined above, DummyKmipClient. | 62598fc74a966d76dd5ef1fa |
class ReservoirLinear(Reservoir): <NEW_LINE> <INDENT> def __init__(self, graph, system, environment): <NEW_LINE> <INDENT> super().__init__(graph, system, environment) <NEW_LINE> <DEDENT> def evaporation(self, state): <NEW_LINE> <INDENT> loc_e_t = 0.1 * state <NEW_LINE> return loc_e_t | Class that encodes a mnp reservoir scenario
:param graph: computation graph
:type graph: tf.Graph
:param reserv_dict: specific parameters of the problem
:type reserv_dict: dict | 62598fc7ec188e330fdf8bba |
class BankAccount: <NEW_LINE> <INDENT> def __init__(self, blz, account_number, pin, endpoint_url): <NEW_LINE> <INDENT> self.blz = blz <NEW_LINE> self.account_number = account_number <NEW_LINE> self.pin = pin <NEW_LINE> self.endpoint_url = endpoint_url <NEW_LINE> logging.basicConfig(level=logging.ERROR) <NEW_LINE> self.... | This class represents a bank account object | 62598fc72c8b7c6e89bd3ae9 |
class Admin(User): <NEW_LINE> <INDENT> def __init__(self, first_name, last_name, age, location): <NEW_LINE> <INDENT> self.first_name = first_name <NEW_LINE> self.last_name = last_name <NEW_LINE> self.name = first_name + ' ' + last_name <NEW_LINE> self.age = age <NEW_LINE> self.location = location <NEW_LINE> self.login_... | 定义一个管理员类名为Admin,继承User类 | 62598fc7be7bc26dc9251fee |
class FileCache(Cache): <NEW_LINE> <INDENT> fnprefix = 'suds' <NEW_LINE> fnsuffix = 'http' <NEW_LINE> units = ('months', 'weeks', 'days', 'hours', 'minutes', 'seconds') <NEW_LINE> def __init__(self, location=None, **duration): <NEW_LINE> <INDENT> if location is None: <NEW_LINE> <INDENT> location = os.path.join(tmp(), '... | A file-based URL cache.
@cvar fnprefix: The file name prefix.
@type fnprefix: str
@cvar fnsuffix: The file name suffix.
@type fnsuffix: str
@ivar duration: The cached file duration which defines how
long the file will be cached.
@type duration: (unit, value)
@ivar location: The directory for the cached files.
@type... | 62598fc7091ae35668704f4e |
class TestShouldClean(unittest.TestCase): <NEW_LINE> <INDENT> _temp_folder = '' <NEW_LINE> _old_clean_file = '' <NEW_LINE> _dirty_file = '' <NEW_LINE> _new_clean_file = '' <NEW_LINE> @classmethod <NEW_LINE> def create_temp_file(cls): <NEW_LINE> <INDENT> if cls._temp_folder == '': <NEW_LINE> <INDENT> cls._temp_folder = ... | These tests validate the should_clean method | 62598fc7f9cc0f698b1c5465 |
class VoucherManager(object): <NEW_LINE> <INDENT> def __init__(self, type): <NEW_LINE> <INDENT> super(VoucherManager, self).__init__() <NEW_LINE> self._type = type <NEW_LINE> <DEDENT> def saveVoucherInfo(self, voucherNo, customerName, voucherDate, remarks, paymentType, chequeNo, amount, cancelReason): <NEW_LINE> <INDEN... | Manager class for Voucher Database | 62598fc73617ad0b5ee0646d |
class CachetAPI: <NEW_LINE> <INDENT> def __init__(self, endpoint): <NEW_LINE> <INDENT> self.endpoint = endpoint <NEW_LINE> self._loaded = False <NEW_LINE> self._components = [] <NEW_LINE> <DEDENT> @property <NEW_LINE> def components(self): <NEW_LINE> <INDENT> if not self._loaded: <NEW_LINE> <INDENT> request = cachet.Co... | Provide interface to get Cachet components which status differs from a given list | 62598fc7ad47b63b2c5a7b7f |
class ApplicationManagerStub(object): <NEW_LINE> <INDENT> def __init__(self, channel): <NEW_LINE> <INDENT> self.RegisterApplication = channel.unary_unary( '/handler.ApplicationManager/RegisterApplication', request_serializer=ApplicationIdentifier.SerializeToString, response_deserializer=google_dot_protobuf_dot_empty__p... | ApplicationManager manages application and device registrations on the Handler
To protect our quality of service, you can make up to 5000 calls to the
ApplicationManager API per hour. Once you go over the rate limit, you will
receive an error response. | 62598fc72c8b7c6e89bd3aeb |
class RunSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> calorimeter = serializers.PrimaryKeyRelatedField(queryset=Calorimeter.objects.all(), validators=[]) <NEW_LINE> data_point_count = serializers.SerializerMethodField('count_data_points') <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Run <NEW_LINE>... | JSON representation of a calorimetry job. | 62598fc760cbc95b06364665 |
class GateParser: <NEW_LINE> <INDENT> def __init__(self, args): <NEW_LINE> <INDENT> self.current_play = None <NEW_LINE> self.previous_task = None <NEW_LINE> self.remove_play = args.remove_play <NEW_LINE> self.roles_only = args.roles_only <NEW_LINE> self.results = args.number <NEW_LINE> self.stats = {} <NEW_LINE> self.r... | Class for parsing timing data from OpenStack-Ansible job runs. | 62598fc70fa83653e46f520e |
class BahdanauAttentionV2(_BaseAttentionMechanismV2): <NEW_LINE> <INDENT> def __init__(self, units, normalize=False, probability_fn="softmax", dtype=None, name="BahdanauAttention", **kwargs): <NEW_LINE> <INDENT> self.probability_fn_name = probability_fn <NEW_LINE> probability_fn = self._process_probability_fn(self.prob... | Implements Bahdanau-style (additive) attention.
This attention has two forms. The first is Bahdanau attention,
as described in:
Dzmitry Bahdanau, Kyunghyun Cho, Yoshua Bengio.
"Neural Machine Translation by Jointly Learning to Align and Translate."
ICLR 2015. https://arxiv.org/abs/1409.0473
The second is the normal... | 62598fc766673b3332c306fe |
class OrderForSellerSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = OrderForSeller <NEW_LINE> fields = '__all__' | OrderForSeller serializer | 62598fc755399d3f05626841 |
class BaseSet(BaseCollection): <NEW_LINE> <INDENT> def add_all(self, a): <NEW_LINE> <INDENT> for x in a: <NEW_LINE> <INDENT> self.add(x) <NEW_LINE> <DEDENT> <DEDENT> def __in__(self, x): <NEW_LINE> <INDENT> return self.find(x) != None <NEW_LINE> <DEDENT> def __eq__(self, a): <NEW_LINE> <INDENT> if len(a) != len(self): ... | Base class for Set implementations | 62598fc74428ac0f6e65884e |
class BannedIPs(Base): <NEW_LINE> <INDENT> __tablename__ = 'bannedips' <NEW_LINE> id = Column(Integer, autoincrement=True, primary_key=True) <NEW_LINE> date = Column(DateTime) <NEW_LINE> ipaddr = Column(Integer, ForeignKey('ipaddr.id')) <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return '<BannedIP: {}>'.format(s... | The Banned IPs table, holds details about IP addresses that have been
banned by fail2ban. Details are the date it was banned and a link back
to the IP address table row for this IP address. | 62598fc7a219f33f346c6b30 |
class LegacyTestCompleteAborted(Base): <NEW_LINE> <INDENT> expected_title = "ci.pipeline.complete" <NEW_LINE> expected_subti = 'Commit "591b0d2f" of package rpms/vim was aborted on the Atomic CI pipeline on branch f26' <NEW_LINE> expected_link = "https://jenkins-continuous-infra.apps.ci.centos.org/job/ci-pipeline-f26/9... | These messages were published when an older version of the CI
pipeline announced having aborted a run of the pipeline on a
package. | 62598fc760cbc95b06364667 |
class MolDefBuilder: <NEW_LINE> <INDENT> def __init__(self, spec: Spec) -> None: <NEW_LINE> <INDENT> self.spec = spec <NEW_LINE> self.name = str(spec.to_non_struct_spec()) <NEW_LINE> self.site_defs = {} <NEW_LINE> <DEDENT> def build(self) -> MolDef: <NEW_LINE> <INDENT> return MolDef(self.name, self.site_defs) <NEW_LINE... | MolDefBuilder is used to iteratively collect the different states a molecule can have. | 62598fc7fff4ab517ebcdb12 |
class ShellBinaryCrashTest(base_test.BaseTestClass): <NEW_LINE> <INDENT> EXIT_CODE_CRASH = 133 <NEW_LINE> EXIT_CODE_SEGFAULT = 139 <NEW_LINE> def setUpClass(self): <NEW_LINE> <INDENT> self.run_as_vts_self_test = False <NEW_LINE> self.dut = self.android_devices[0] <NEW_LINE> <DEDENT> def testCrashBinary(self): <NEW_LINE... | A binary crash test case for the shell driver. | 62598fc7283ffb24f3cf3baf |
class BaseDatabaseTest(tempest.test.BaseTestCase): <NEW_LINE> <INDENT> _interface = 'json' <NEW_LINE> @classmethod <NEW_LINE> def resource_setup(cls): <NEW_LINE> <INDENT> super(BaseDatabaseTest, cls).resource_setup() <NEW_LINE> if not CONF.service_available.trove: <NEW_LINE> <INDENT> skip_msg = ("%s skipped as trove is... | Base test case class for all Database API tests. | 62598fc74527f215b58ea1fa |
class MathPower(MultiItem): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> MultiItem.__init__(self) <NEW_LINE> self.style = 'math-var', 1 <NEW_LINE> <DEDENT> def resizePDF(self, pdf, x = 0, y = 0): <NEW_LINE> <INDENT> if len(self.items) < 2 or not self.items[0] or not self.items[1]: <NEW_LINE> <INDENT> rai... | Container for inline maths | 62598fc73d592f4c4edbb1dc |
class DownSampling2dLayer(Layer): <NEW_LINE> <INDENT> def __init__( self, prev_layer, size, is_scale=True, method=0, align_corners=False, name='downsample2d_layer', ): <NEW_LINE> <INDENT> Layer.__init__(self, prev_layer=prev_layer, name=name) <NEW_LINE> self.inputs = prev_layer.outputs <NEW_LINE> if len(self.inputs.get... | The :class:`DownSampling2dLayer` class is down-sampling 2D layer, see `tf.image.resize_images <https://www.tensorflow.org/versions/master/api_docs/python/image/resizing#resize_images>`__.
Parameters
----------
layer : :class:`Layer`
Previous layer with 4-D Tensor in the shape of (batch, height, width, channels) or... | 62598fc7a05bb46b3848ab96 |
class GUIDToUUID(StdLibConverter): <NEW_LINE> <INDENT> _takes_stream = True <NEW_LINE> _takes_ctype = True <NEW_LINE> @classmethod <NEW_LINE> def from_stream(cls, stream, offset=None, byte_order=LITTLE_ENDIAN): <NEW_LINE> <INDENT> if offset is not None: <NEW_LINE> <INDENT> stream.seek(offset, SEEK_SET) <NEW_LINE> <DEDE... | Converts a GUID to a ``UUID``. | 62598fc7a8370b77170f0706 |
class RectangularExtrusion( Extrusion ): <NEW_LINE> <INDENT> pass | An extrusion of a Square | 62598fc797e22403b383b230 |
class Jin(): <NEW_LINE> <INDENT> style = '' | An empty class solely with the purpose of being an object which can
be instantiated. | 62598fc75fc7496912d48410 |
class CircularString(object): <NEW_LINE> <INDENT> def __init__(self, string): <NEW_LINE> <INDENT> self._string = string <NEW_LINE> self._circular = Circular(string) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> c = self.__class__.__name__ <NEW_LINE> return '{}({})'.format(c, self._string) <NEW_LINE> <DEDE... | >>> cs = CircularString('0123456789')
>>> cs[-1:12]
'9012345678901' | 62598fc7851cf427c66b85e0 |
class ModalCustomAttribute(object): <NEW_LINE> <INDENT> MODAL_TITLE = (By.CSS_SELECTOR, '.modal-header h2') <NEW_LINE> ATTRIBUTE_TITLE = (By.CSS_SELECTOR, '.modal-body div:nth-child(1)>label') <NEW_LINE> INLINE_HELP = (By.CSS_SELECTOR, '.modal-body div:nth-child(2)>label') <NEW_LINE> ATTRIBUTE_TYPE = (By.CSS_SELECTOR, ... | Locators for a generic custom attributes modal in admin dashboard | 62598fc79f28863672818a12 |
class DummyFTP(threading.Thread): <NEW_LINE> <INDENT> def set_params( self, addr=None, port=None, folder=None, user=None, password=None ): <NEW_LINE> <INDENT> self.addr = 'localhost' if not addr else addr <NEW_LINE> self.port = '22122' if not port else port <NEW_LINE> self.folder = os.path.join(os.curdir) if not folder... | DummyFTP server | 62598fc77c178a314d78d7cc |
class FormulaResult(models.Model): <NEW_LINE> <INDENT> symbol = models.CharField(max_length=20) <NEW_LINE> formula = models.ForeignKey(Formula) <NEW_LINE> date = models.DateField() <NEW_LINE> arguments = models.TextField(max_length=500) <NEW_LINE> length = models.IntegerField() <NEW_LINE> unique_together = (('symbol', ... | An algorithm contain different of variables test | 62598fc75fcc89381b2662e3 |
class FileExporter(StringExporter): <NEW_LINE> <INDENT> def __init__(self, handle, *, columns=80, headers=True, comments=True, variations=True): <NEW_LINE> <INDENT> super(FileExporter, self).__init__(columns=columns, headers=headers, comments=comments, variations=variations) <NEW_LINE> self.handle = handle <NEW_LINE> <... | Acts like a :class:`~chess.pgn.StringExporter`, but games are written
directly into a text file.
There will always be a blank line after each game. Handling encodings is up
to the caller.
>>> import chess.pgn
>>>
>>> game = chess.pgn.Game()
>>>
>>> new_pgn = open("/dev/null", "w", encoding="utf-8")
>>> exporter = che... | 62598fc77cff6e4e811b5d53 |
class QuestionForm(forms.ModelForm): <NEW_LINE> <INDENT> summary = forms.CharField(widget=forms.Textarea (attrs={'cols': 40, 'rows': 1})) <NEW_LINE> description = forms.CharField(widget=forms.Textarea (attrs={'cols': 40, 'rows': 1})) <NEW... | Creates a form to add or edit a Question.
It has the related fields and functions required. | 62598fc7956e5f7376df5814 |
class IECSServices(IResource, IMonitorable): <NEW_LINE> <INDENT> cluster = PacoReference( title='Cluster', required=True, str_ok=False, schema_constraint='IECSCluster' ) <NEW_LINE> disable_services = zope.schema.Bool( title="Disable all services and stop all tasks", default=False, required=False, ) <NEW_LINE> setting_g... | The ``ECSServices`` resource type creates one or more ECS Services and their TaskDefinitions
that can run in an `ECSCluster`_.
Services can launch tasks with a `launch_type` of `Fargate` or `EC2`. Capacity Providers allows
tasks to scale a cluster up/down instead. If using Capacity Providers, use the `capacity_provide... | 62598fc763b5f9789fe854a2 |
class ExtendedTabBar(QFrame): <NEW_LINE> <INDENT> RoundedNorth = QTabBar.RoundedNorth <NEW_LINE> RoundedSouth = QTabBar.RoundedSouth <NEW_LINE> RoundedWest = QTabBar.RoundedWest <NEW_LINE> RoundedEast = QTabBar.RoundedEast <NEW_LINE> TriangularNorth = QTabBar.TriangularNorth <NEW_LINE> TriangularSouth = QTabBar.Triangu... | A tab bar that has QToolBars to the left, right, and floating at the end of the tabs.
Note that although this class inherits from QFrame, __getattr__() trickery is used to "inherit"
the attributes of an internal object that inherits from QTabBar. This is done because it allows
the actual tab bar object to be placed in... | 62598fc7a05bb46b3848ab98 |
class NewFunction02(Benchmark): <NEW_LINE> <INDENT> def __init__(self, dimensions=2): <NEW_LINE> <INDENT> Benchmark.__init__(self, dimensions) <NEW_LINE> self._bounds = list(zip([-10.0] * self.N, [10.0] * self.N)) <NEW_LINE> self.global_optimum = [[-9.94114736324, -9.99997128772]] <NEW_LINE> self.fglob = -0.19940903009... | NewFunction02 objective function.
This class defines the NewFunction02 global optimization problem. This is a
multimodal minimization problem defined as follows:
.. math::
f_{\text{NewFunction02}}(x) = \left | {\sin\left(\sqrt{\lvert{x_{1}^{2}
+ x_{2}}\rvert}\right)} \right |^{0.5} + (x_{1} + x_{2})/100
with... | 62598fc760cbc95b0636466b |
class Node: <NEW_LINE> <INDENT> __slots__ = ('name', 'node_type', 'parent', 'depth', 'children', 'marked', 'alias') <NEW_LINE> def __init__(self, name, node_type, parent): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.node_type = node_type <NEW_LINE> self.parent = parent <NEW_LINE> if not self.parent and self.no... | Node in the import tree. This can be a directory, a file
or an object. | 62598fc7f9cc0f698b1c5469 |
class StaticIconFile(StaticFile): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(StaticIconFile, self).__init__(*args, **kwargs) <NEW_LINE> self.is_icon = True | A wrapper for static icons that is compatible to the FieldFile class, i.e.
you can use instances of this class in templates just like you use the value
of FileFields (e.g. `{{ my_static_file.url }}`) | 62598fc79f28863672818a13 |
class ProgressBarDialogTest(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 test_icon_png(self): <NEW_LINE> <INDENT> path = ':/plugins/ProgressBar/icon.png' <NEW_LINE> icon = QIcon(path) <NEW_LINE>... | Test rerources work. | 62598fc726068e7796d4cc8a |
class Reset(object): <NEW_LINE> <INDENT> url = "https://iforgot.apple.com/password/verify/appleid" <NEW_LINE> def __init__(self, apple_id, count=10, headless=False): <NEW_LINE> <INDENT> self.apple_id = apple_id <NEW_LINE> self.count = count <NEW_LINE> self.headless = headless <NEW_LINE> if self.headless == True: <NEW_L... | Request a password reset for Apple ID from Apple multiple times. | 62598fc7fbf16365ca7943e7 |
class H5TelstateSensorGetter(RecordSensorGetter): <NEW_LINE> <INDENT> def __init__(self, data, name=None): <NEW_LINE> <INDENT> super().__init__(data, name) <NEW_LINE> <DEDENT> def get(self): <NEW_LINE> <INDENT> timestamp = np.asarray(self._data['timestamp']) <NEW_LINE> values = [_h5_telstate_unpack(s) for s in self._da... | Raw (uninterpolated) sensor data in HDF5 TelescopeState recarray form.
This wraps the telstate sensors stored in recent HDF5 files. It differs
in two ways from the normal HDF5 sensors: no 'status' field and values
encoded by katsdptelstate.
TODO: This is a temporary fix to get at missing sensors in telstate and
shoul... | 62598fc755399d3f05626849 |
class CheckCmimToken(): <NEW_LINE> <INDENT> def __init__(self,dicdata): <NEW_LINE> <INDENT> self.dicdata=dicdata <NEW_LINE> self.config=pfAPI.getConfig(self.dicdata) <NEW_LINE> self.headers=self.config['headers'] <NEW_LINE> <DEDENT> def send_request(self, thirdPartyToken,corporationSerial="001"): <NEW_LINE> <INDENT> se... | 用户登录
Method:Get
URL:https://<base url>/user/v0/checkcmimToken?{checkcmimToken}
参数: 空 | 62598fc74c3428357761a5ed |
class SCXMLPropertiesContainer(b.SCXMLBase): <NEW_LINE> <INDENT> clsid= '' <NEW_LINE> progid= '' <NEW_LINE> def __init__(self,cId,clsid,progid): <NEW_LINE> <INDENT> super(SCXMLPropertiesContainer,self).__init__(cId,'') <NEW_LINE> self.clsid= clsid <NEW_LINE> self.progid= progid <NEW_LINE> <DEDENT> def populateXMLElemen... | SCIA XML properties container. | 62598fc7656771135c4899a0 |
class CredentialInstance(InstanceResource): <NEW_LINE> <INDENT> class PushService(object): <NEW_LINE> <INDENT> GCM = "gcm" <NEW_LINE> APN = "apn" <NEW_LINE> FCM = "fcm" <NEW_LINE> <DEDENT> def __init__(self, version, payload, sid=None): <NEW_LINE> <INDENT> super(CredentialInstance, self).__init__(version) <NEW_LINE> se... | PLEASE NOTE that this class contains beta products that are subject to
change. Use them with caution. | 62598fc77cff6e4e811b5d57 |
class IPv6UDPDst(MatchTest): <NEW_LINE> <INDENT> def runTest(self): <NEW_LINE> <INDENT> match = ofp.match([ ofp.oxm.eth_type(0x86dd), ofp.oxm.ip_proto(17), ofp.oxm.udp_dst(53), ]) <NEW_LINE> matching = { "udp dport=53": simple_udpv6_packet(udp_dport=53), } <NEW_LINE> nonmatching = { "udp dport=52": simple_udpv6_packet(... | Match on ipv4 udp destination port | 62598fc77047854f4633f703 |
class WbRepresentation(abc.ABC): <NEW_LINE> <INDENT> @abc.abstractmethod <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def toWikibase(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> @abc.ab... | Abstract class for Wikibase representations. | 62598fc760cbc95b0636466f |
class FileWritey(object): <NEW_LINE> <INDENT> def __init__(self, args, filename, binary=False): <NEW_LINE> <INDENT> self.args = args <NEW_LINE> self.filename = filename <NEW_LINE> self.trad_file = None <NEW_LINE> self.open_str = "wb" if binary else "w" <NEW_LINE> <DEDENT> def copy_to_bucket(self): <NEW_LINE> <INDENT> i... | Tries to write on traditional filesystem and Google Cloud storage | 62598fc7091ae35668704f5a |
class BzrGitError(brz_errors.BzrError): <NEW_LINE> <INDENT> pass | The base-level exception for bzr-git errors. | 62598fc7d486a94d0ba2c303 |
class HighlightsConfigureInfo(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Switch = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Switch = params.get("Switch") | 智能精彩片段任务控制参数
| 62598fc7bf627c535bcb17dc |
class DeleteEpisode(LoginRequiredMixin, RedirectView): <NEW_LINE> <INDENT> def get_redirect_url(self, *args, **kwargs): <NEW_LINE> <INDENT> return f'/#/patient/{self.kwargs["patient_pk"]}' <NEW_LINE> <DEDENT> def post(self, *args, **kwargs): <NEW_LINE> <INDENT> episode = get_object_or_404(Episode, pk=kwargs["episode_pk... | This view is for when an episode has been opened in error
it deletes and redirects to the patient detail page.
Note the way Odonto functions is that a patient
always has a new episode. So after it has deleted
it creates an episode of the same category with
the stage of new if it does not already exist | 62598fc77b180e01f3e491e9 |
class TemplateSystem(object): <NEW_LINE> <INDENT> name = "dummy templates" <NEW_LINE> def set_directories(self, directories, cache_folder): <NEW_LINE> <INDENT> raise Exception("Implement Me First") <NEW_LINE> <DEDENT> def template_deps(self, template_name): <NEW_LINE> <INDENT> raise Exception("Implement Me First") <NEW... | Plugins of this type wrap templating systems. | 62598fc7956e5f7376df5817 |
class UserCreationForm(forms.ModelForm): <NEW_LINE> <INDENT> error_messages = { 'password_mismatch': "Пароли не совпадают.", } <NEW_LINE> password1 = forms.CharField( label="Пароль", strip=False, widget=forms.PasswordInput, ) <NEW_LINE> password2 = forms.CharField( label="Повторите", widget=forms.PasswordInput, strip=F... | A form that creates a user, with no privileges, from the given email and
password. | 62598fc7ec188e330fdf8bc8 |
class CompositeMatcher(gluon.HybridBlock): <NEW_LINE> <INDENT> def __init__(self, matchers): <NEW_LINE> <INDENT> super(CompositeMatcher, self).__init__() <NEW_LINE> assert len(matchers) > 0, "At least one matcher required." <NEW_LINE> for matcher in matchers: <NEW_LINE> <INDENT> assert isinstance(matcher, (gluon.Block,... | A Matcher that combines multiple strategies.
Parameters
----------
matchers : list of Matcher
Matcher is a Block/HybridBlock used to match two groups of boxes | 62598fc771ff763f4b5e7ab3 |
class PortfolioFeed(gdata.GDataFeed): <NEW_LINE> <INDENT> _tag = 'feed' <NEW_LINE> _namespace = atom.ATOM_NAMESPACE <NEW_LINE> _children = gdata.GDataFeed._children.copy() <NEW_LINE> _children['{%s}entry' % atom.ATOM_NAMESPACE] = ('entry', [PortfolioEntry]) | A feed that lists all of the user's portfolios.
A portfolio is a collection of positions that the user holds in various
securities, plus metadata. The PortfolioFeed lists all of the user's
portfolios as a list of PortfolioEntries. | 62598fc77c178a314d78d7d4 |
class Discrete3DFunction(TabulatedFunction): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> for _s in [TabulatedFunction]: <NEW_LINE> <INDENT> __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) <NEW_LINE> <DEDENT> __setattr__ = lambda self, name, value: _swig_setattr(self, Discrete3DFunction, n... | This is a TabulatedFunction that computes a discrete three dimensional function f(x,y,z). To evaluate it, x, y, and z are each rounded to the nearest integer and the table element with those indices is returned. If any index is outside the range [0, size), the result is undefined. | 62598fc7adb09d7d5dc0a8af |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.