code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class SequencePoolingLayer(Layer): <NEW_LINE> <INDENT> def __init__(self, mode='mean', supports_masking=False, **kwargs): <NEW_LINE> <INDENT> if mode not in ['sum', 'mean', 'max']: <NEW_LINE> <INDENT> raise ValueError("mode must be sum or mean") <NEW_LINE> <DEDENT> self.mode = mode <NEW_LINE> self.eps = 1e-8 <NEW_LINE>... | The SequencePoolingLayer is used to apply pooling operation(sum,mean,max) on variable-length sequence feature/multi-value feature.
Input shape
- A list of two tensor [seq_value,seq_len]
- seq_value is a 3D tensor with shape: ``(batch_size, T, embedding_size)``
- seq_len is a 2D tensor with shape : ``(batch_si... | 62598efa0fa83653e46f37fb |
class ResetPasswordKeyForm(allauth.ResetPasswordKeyForm): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self.helper = FormHelper() <NEW_LINE> self.helper.layout = Layout( Field("password1", type="password", css_class="_cls-passwordInput"), Fiel... | Customize the reset password key form layout | 62598efa23849d37ff84f9d9 |
class StepThird(Block): <NEW_LINE> <INDENT> name_block = 'third' <NEW_LINE> name_queue = '' <NEW_LINE> def process(self, message: Message) -> None: <NEW_LINE> <INDENT> print(self.name_block) <NEW_LINE> print(message) | third block | 62598efa7b180e01f3e484d4 |
class DRCException(Exception): <NEW_LINE> <INDENT> pass | general class for exceptions | 62598efaaad79263cf42d12a |
class CreateTag(BaseComponent): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.user_center_url = kwargs['user_center_url'] <NEW_LINE> self.site_id = kwargs['site_id'] <NEW_LINE> self.title = "6.创建个性化功能" <NEW_LINE> <DEDENT> def process(self): <NEW_LINE> <INDENT> self.exists_url = f"{se... | 6.创建默认标签 | 62598efa379a373c97d97914 |
class Server(object): <NEW_LINE> <INDENT> def __init__(self, name=None, cores=None, ram=None, availability_zone=None, boot_volume_id=None, boot_cdrom=None, cpu_family=None, create_volumes=None, attach_volumes=None, nics=None): <NEW_LINE> <INDENT> if create_volumes is None: <NEW_LINE> <INDENT> create_volumes = [] <NEW_L... | This is the main class for managing server resources. | 62598efa57b8e32f52507590 |
class GetTerritoriesResultSet(ResultSet): <NEW_LINE> <INDENT> def get_Response(self): <NEW_LINE> <INDENT> return self._output.get('Response', None) | Retrieve the value for the "Response" output from this choreography execution. ((json) The response from Genability.) | 62598efaff9c53063f518f7c |
class StatikViewSimplePath(StatikViewPath): <NEW_LINE> <INDENT> def __init__(self, path, **kwargs): <NEW_LINE> <INDENT> super(StatikViewSimplePath, self).__init__(path, **kwargs) <NEW_LINE> output_ext = get_url_file_ext(self.path) <NEW_LINE> if output_ext: <NEW_LINE> <INDENT> self.output_own_subfolder = False <NEW_LINE... | A simple path, whose output only renders to a single file. | 62598efa91f36d47f2230331 |
class SwitcherItem(object): <NEW_LINE> <INDENT> def __init__(self, item=None): <NEW_LINE> <INDENT> self._id = 0 <NEW_LINE> self._isGroup = False <NEW_LINE> self._breakColumn = False <NEW_LINE> self._rowPos = 0 <NEW_LINE> self._colPos = 0 <NEW_LINE> self._window = None <NEW_LINE> self._description = "" <NEW_LINE> self._... | An object containing information about one item. | 62598efad268445f2663901d |
class IServiceOffer(Interface): <NEW_LINE> <INDENT> pass | Marker interface for the ServiceOffer | 62598efa656771135c487fa5 |
class TranslationsQuery(Query): <NEW_LINE> <INDENT> def __init__(self, projectId): <NEW_LINE> <INDENT> super(TranslationsQuery, self).__init__() <NEW_LINE> self.projectId = projectId <NEW_LINE> <DEDENT> def doQuery(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> url = SERVER + self.projectId + "/api/translations/zi... | generated source for class TranslationsQuery | 62598efa3617ad0b5ee04a44 |
class Comment(BaseObject): <NEW_LINE> <INDENT> post_id = Column(Integer, ForeignKey('post.id'), nullable=False) <NEW_LINE> content = Column(Unicode(255), nullable=False) | Comment definition | 62598efa9f28863672817110 |
class HelloApiView(APIView): <NEW_LINE> <INDENT> serializer_class = serializers.HelloSerializer <NEW_LINE> def get(self, request, format=True): <NEW_LINE> <INDENT> an_apiview = [ 'User HTTp methos as function', 'Gives control over your logic', 'Is mapped normally to URLs' ] <NEW_LINE> return Response({"message":"Hello!... | Teste api | 62598efadc8b845886d51ee2 |
class BlogAdminPageTests(test_utils.GenericTestBase): <NEW_LINE> <INDENT> def test_blog_admin_page_access_without_logging_in(self): <NEW_LINE> <INDENT> self.get_html_response('/blog-admin', expected_status_int=302) <NEW_LINE> <DEDENT> def test_blog_admin_page_acess_without_being_blog_admin(self): <NEW_LINE> <INDENT> se... | Checks the access to the blog admin page and its rendering. | 62598efa4c34283577618c02 |
class AccumulationMode(object): <NEW_LINE> <INDENT> DISCARDING = beam_runner_api_pb2.AccumulationMode.DISCARDING <NEW_LINE> ACCUMULATING = beam_runner_api_pb2.AccumulationMode.ACCUMULATING | Controls what to do with data when a trigger fires multiple times. | 62598efa67a9b606de5448ec |
class DeletePolicyRequest(object): <NEW_LINE> <INDENT> swagger_types = { 'auto_scaling_group_name': 'str', 'policy_name': 'str' } <NEW_LINE> attribute_map = { 'auto_scaling_group_name': 'autoScalingGroupName', 'policy_name': 'policyName' } <NEW_LINE> def __init__(self, auto_scaling_group_name=None, policy_name=None): <... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598efaa219f33f346c514a |
class Military204(Ship): <NEW_LINE> <INDENT> cost = (3000, 1000, 0) <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self._meta.get_field('name').default = 'Light Fighter' <NEW_LINE> Ship.__init__(self, *args, **kwargs) <NEW_LINE> <DEDENT> class Meta: <NEW_LINE> <INDENT> app_label = 'oweb' | Ship **Light Fighter** | 62598efad486a94d0ba2a8e5 |
@weak_module <NEW_LINE> class ZeroPad2d(ConstantPad2d): <NEW_LINE> <INDENT> def __init__(self, padding): <NEW_LINE> <INDENT> super(ZeroPad2d, self).__init__(padding, 0.) | Pads the input tensor boundaries with zero.
For `N`-dimensional padding, use :func:`torch.nn.functional.pad()`.
Args:
padding (int, tuple): the size of the padding. If is `int`, uses the same
padding in all boundaries. If a 4-`tuple`, uses (:math:`\text{padding\_left}`,
:math:`\text{padding\_right... | 62598efa50812a4eaa620078 |
class TestOauthLoginManger(DefaultOAuthSiteTestCase): <NEW_LINE> <INDENT> def _get_login_manager(self): <NEW_LINE> <INDENT> login_manager = OauthLoginManager(password=self.consumer_token[1], site=self.site, user=self.consumer_token[0]) <NEW_LINE> login_manager._access_token = self.access_token <NEW_LINE> return login_m... | Test OAuth login manager. | 62598efa9f28863672817111 |
class EndSponsoringFutureReservesResultCode(IntEnum): <NEW_LINE> <INDENT> END_SPONSORING_FUTURE_RESERVES_SUCCESS = 0 <NEW_LINE> END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED = -1 <NEW_LINE> def pack(self, packer: Packer) -> None: <NEW_LINE> <INDENT> packer.pack_int(self.value) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE>... | XDR Source Code
----------------------------------------------------------------
enum EndSponsoringFutureReservesResultCode
{
// codes considered as "success" for the operation
END_SPONSORING_FUTURE_RESERVES_SUCCESS = 0,
// codes considered as "failure" for the operation
END_SPONSORING_FUTURE_RESERVES_... | 62598efa44b2445a339b5dfd |
class ExportW3D(bpy.types.Operator, ExportHelper): <NEW_LINE> <INDENT> bl_idname = 'export_mesh.westwood_w3d' <NEW_LINE> bl_label = 'Export W3D' <NEW_LINE> bl_options = {'UNDO'} <NEW_LINE> filename_ext = '.w3d' <NEW_LINE> filter_glob = StringProperty(default='*.w3d', options={'HIDDEN'}) <NEW_LINE> EXPORT_MODE = EnumPro... | Export from Westwood 3D file format (.w3d) | 62598efaa05bb46b38489193 |
class AgeModelFactory(NamedModelFactory): <NEW_LINE> <INDENT> name = "age < 12" <NEW_LINE> class Meta(object): <NEW_LINE> <INDENT> model = models.Age | Age model factory class.
| 62598efa4a966d76dd5ed7f2 |
class TkViewAndInput(object): <NEW_LINE> <INDENT> def __init__(self, client): <NEW_LINE> <INDENT> self.client = client <NEW_LINE> self.running = False <NEW_LINE> self.tkWindowMainLoop = TkWindowMainLoop(self.client) <NEW_LINE> self.window = self.tkWindowMainLoop.getWindow() <NEW_LINE> while self.window is None: <NEW_LI... | class to handle the drawing and input processing using tk infrastructure | 62598efa10dbd63aa1c6f49b |
class Task(models.Model): <NEW_LINE> <INDENT> todolist = models.ForeignKey(TodoList, on_delete=models.CASCADE) <NEW_LINE> text = models.CharField(max_length=200) <NEW_LINE> is_completed = models.BooleanField(default=False) <NEW_LINE> due_date = models.DateField('Due Date', blank=True, null=True) <NEW_LINE> completed_da... | Defines the attributes of a task from a todo list | 62598efa009cb60464cffe6d |
class HashedFile(object): <NEW_LINE> <INDENT> def __init__(self, filename, size, md5sum, sha1sum, sha256sum, section=None, priority=None): <NEW_LINE> <INDENT> self.filename = filename <NEW_LINE> self.size = size <NEW_LINE> self.md5sum = md5sum <NEW_LINE> self.sha1sum = sha1sum <NEW_LINE> self.sha256sum = sha256sum <NEW... | file with checksums
| 62598efa4c34283577618c04 |
class ConnectionCache: <NEW_LINE> <INDENT> def __init__(self, no_current_msg='No open connection'): <NEW_LINE> <INDENT> self.current = self._no_current = _NoConnection(no_current_msg) <NEW_LINE> self.current_index = None <NEW_LINE> self._connections = [] <NEW_LINE> self._aliases = NormalizedDict() <NEW_LINE> self._no_c... | Connection cache for different Robot test libraries that use connections.
This cache stores connections and allows switching between them using
generated indexes or user given aliases. Can be used for example by web
testing libraries where there's need for multiple concurrent connections.
Note that in most cases ther... | 62598efa3d592f4c4edb980c |
class NodeMode(object): <NEW_LINE> <INDENT> swagger_types = { 'mode_id': 'str' } <NEW_LINE> attribute_map = { 'mode_id': 'mode_id' } <NEW_LINE> def __init__(self, mode_id=None): <NEW_LINE> <INDENT> self._mode_id = None <NEW_LINE> self.discriminator = None <NEW_LINE> self.mode_id = mode_id <NEW_LINE> <DEDENT> @property ... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598efa167d2b6e312b58bb |
class OptionListTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> option1 = Option('option_name1', 'option_value1', 'option_group', 'option_tool', 'option_subgroup1') <NEW_LINE> option2 = Option('option_name2', 'option_value2', 'option_group', 'option_tool', 'option_subgroup1') <NEW_LINE... | This classe contain unittests for OptionList. | 62598efa1f5feb6acb161574 |
class Region(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'region' <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> parent_id = db.Column(db.Integer) <NEW_LINE> name = db.Column(db.String(100)) <NEW_LINE> type = db.Column(db.Integer) <NEW_LINE> agency_id = db.Column(db.Integer) <NEW_LINE> def __unic... | 系统用户 | 62598efa442bda511e95ad80 |
class RandomWord: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def generate_random_word(words): <NEW_LINE> <INDENT> numOfWords = len(words) <NEW_LINE> index = random.randint(0, numOfWords-1) <NEW_LINE> return words[index] | The class for the random word selection.
| 62598efa7047854f4633dce6 |
class Main(Thread): <NEW_LINE> <INDENT> def __init__(self, player, stop, pause, resume): <NEW_LINE> <INDENT> self.player = player <NEW_LINE> self.stop = stop <NEW_LINE> self.pause = pause <NEW_LINE> self.resume = resume <NEW_LINE> Thread.__init__(self) <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> self.player.... | this thread is created to listen to user input | 62598efa379a373c97d97918 |
class JnEncryption: <NEW_LINE> <INDENT> def __init__(self, key, e_type): <NEW_LINE> <INDENT> if e_type == 1: <NEW_LINE> <INDENT> self.encryption_imp = Rijndael(key) <NEW_LINE> self.block_size = 16 <NEW_LINE> <DEDENT> elif e_type == 2: <NEW_LINE> <INDENT> self.encryption_imp = Blowfish.new(key) <NEW_LINE> self.block_siz... | "A generic class for all the encryption implementations and future ones. | 62598efa2ae34c7f260a9a02 |
class AuthorizationEndpoint(BaseEndpoint): <NEW_LINE> <INDENT> def __init__(self, default_response_type, default_token_type, response_types): <NEW_LINE> <INDENT> BaseEndpoint.__init__(self) <NEW_LINE> self._response_types = response_types <NEW_LINE> self._default_response_type = default_response_type <NEW_LINE> self._d... | Authorization endpoint - used by the client to obtain authorization
from the resource owner via user-agent redirection.
The authorization endpoint is used to interact with the resource
owner and obtain an authorization grant. The authorization server
MUST first verify the identity of the resource owner. The way in
w... | 62598efaf548e778e5969eab |
class Caretaker(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Context().init() <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <INDENT> self.startWebServer() <NEW_LINE> <DEDENT> def startWebServer(self): <NEW_LINE> <INDENT> MBLogger.info('Starting Server ...') <NEW_LINE> web.webapi.notfound = Not... | 整个系统的掌管者 | 62598efa4428ac0f6e656e6c |
class AlreadyExists(Exception): <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.TBinaryPro... | An AlreadyExists exceptions signals that a table with the specified
name already exists
Attributes:
- message | 62598efaec188e330fdf71ca |
class Base(Configuration): <NEW_LINE> <INDENT> async def base_get_request(self, method: str, *args, **kwargs) -> dict: <NEW_LINE> <INDENT> data = await client.get(method, headers=self._headers(), *args, **kwargs) <NEW_LINE> return data <NEW_LINE> <DEDENT> async def base_post_request(self, method: str, *args, **kwargs) ... | Base class for processing requests | 62598efa91f36d47f2230333 |
class DeleteColumnsAction(QAction): <NEW_LINE> <INDENT> def __init__(self, table): <NEW_LINE> <INDENT> if not isinstance(table, QTableView): <NEW_LINE> <INDENT> raise ValueError('DeleteColumnsAction must be initialised ' + 'with a QTableWidget.') <NEW_LINE> <DEDENT> super().__init__(table) <NEW_LINE> self.setText(_DELE... | QAction to delete columns of cells.
:param table: :class:`QTableView` to which this action belongs. | 62598efaadb09d7d5dc08ed6 |
class pdtLocale_es(pdtLocale_base): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super( pdtLocale_es, self ).__init__() <NEW_LINE> self.localeID = 'es' <NEW_LINE> self.dateSep = [ '/' ] <NEW_LINE> self.usesMeridian = False <NEW_LINE> self.uses24 = True <NEW_LINE> self.Weekdays = [ 'lu... | es Locale
Note that I don't speak Spanish so many of the items below are still in English | 62598efaa8370b77170eed04 |
class CNNModel(models.BaseModel): <NEW_LINE> <INDENT> def create_model(self, model_input, vocab_size, l2_penalty=1e-8, **unused_params): <NEW_LINE> <INDENT> print("Model used: CNN model") <NEW_LINE> video,audio = tf.split(model_input,[1024,128],axis=1) <NEW_LINE> vdNN = slim.fully_connected(video, 32, activation_fn=tf.... | Convolutional neural network model with structure:
videoNN audioNN
\ /
matmul
|
CNN1
|
avg_pool
|
CNN2
|
flatten
|
output softmax | 62598efadc8b845886d51ee6 |
class GroupViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Group.objects.all() <NEW_LINE> serializer_class = GroupSerializer | allow cat and edit user's API endpoint | 62598efa377c676e912f61f3 |
class Singleton(type): <NEW_LINE> <INDENT> def __call__(cls, *args, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def singleton_exists(cls): <NEW_LINE> <INDENT> pass | Helper for defining a singleton class in Python. You define it by starting
your class as follows:
from maya.common.utils import Singleton
class MyClass(object):
__metaclass__ = Singleton
... rest of implementation ...
Then you can do things like this:
a = MyClass()
a.var = 12
b = ... | 62598efa009cb60464cffe6f |
class Category(models.Model): <NEW_LINE> <INDENT> name = models.CharField('类别', max_length=20) <NEW_LINE> created_time = models.DateTimeField('创建时间', auto_now_add=True) <NEW_LINE> last_modified_time = models.DateTimeField('修改时间', auto_now=True) <NEW_LINE> description = models.CharField('说明', max_length=200, null=True) ... | DB model of article category. | 62598efa60cbc95b06362c50 |
class BuildLayersSpaceTests(unittest.TestCase): <NEW_LINE> <INDENT> def test_n_layers(self): <NEW_LINE> <INDENT> n_layers = [1, 3, 6] <NEW_LINE> for space_name in ACCEPTABLE_SPACES: <NEW_LINE> <INDENT> for n in n_layers: <NEW_LINE> <INDENT> space = _build_layers_space(space_name, n) <NEW_LINE> sampled_space = sample(sp... | tests for `_build_layers_space` method.
| 62598efa8a349b6b43684b62 |
class FleeTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.new_monster = Monster("Cookie") <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> del self.new_monster <NEW_LINE> <DEDENT> @patch('builtins.input', return_value='Y') <NEW_LINE> def test_flee_y_upper(self, input_va... | Test the functionality of the Monster class flee function. | 62598efacc40096d61619669 |
class OfficeManager(models.Manager): <NEW_LINE> <INDENT> def valid_offices(self): <NEW_LINE> <INDENT> return self.filter(is_a_proposal=False).filter(is_valid=True) | A manager for offices | 62598efa0fa83653e46f3802 |
class dds_fpga(object): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") <NEW_LINE> __repr__ = _swig_repr <NEW_LINE> def make(): <NEW_LINE> <INDENT> r... | Proxy of C++ gr::test1::dds_fpga class | 62598efa7047854f4633dce8 |
class _CppTypeArray(_CppTypeDelegating): <NEW_LINE> <INDENT> def get_storage_type(self): <NEW_LINE> <INDENT> return _qualify_array_type(self._base.get_storage_type()) <NEW_LINE> <DEDENT> def get_getter_setter_type(self): <NEW_LINE> <INDENT> return _qualify_array_type(self._base.get_getter_setter_type()) <NEW_LINE> <DED... | C++ Array type for wrapping a base C++ Type information. | 62598efaf548e778e5969ead |
class AbsGraphBlock(nn.Module): <NEW_LINE> <INDENT> def __init__(self, n_v:int, n_fpv:int, do:float=0, bn:bool=False, act:str='relu', lookup_init:Callable[[str,Optional[int],Optional[int]],Callable[[Tensor],None]]=lookup_normal_init, lookup_act:Callable[[str],Any]=lookup_act, bn_class:Callable[[int],nn.Module]=nn.Batch... | Abstract class for implementing graph neural-network layers and blocks
Arguments:
n_v: number of vertices per data point to expect
n_fpv: number of features per vertex to expect
do: dropout rate to be applied to hidden layers in the NNs
bn: whether batch normalisation should be applied to hidden layers... | 62598efa97e22403b3839812 |
class AttrDict(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.data = {} <NEW_LINE> <DEDENT> def __getitem__(self, keyname): <NEW_LINE> <INDENT> return self.data[keyname] | demos __getitem__, getattr precedence | 62598efa3539df3088ecabcd |
class Endpoint(object): <NEW_LINE> <INDENT> def __init__(self, task_cls): <NEW_LINE> <INDENT> self._task_cls = task_cls <NEW_LINE> self._task_cls_name = reflection.get_class_name(task_cls) <NEW_LINE> self._executor = executor.SerialTaskExecutor() <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self._t... | Represents a single task with execute/revert methods. | 62598efa2c8b7c6e89bd20e3 |
class FileProcessor: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def read_data_from_file(file_name): <NEW_LINE> <INDENT> product_objects.clear() <NEW_LINE> file = open(file_name, "r") <NEW_LINE> for line in file: <NEW_LINE> <INDENT> name, price = line.split(",") <NEW_LINE> product = Product(name, format(float(price), ... | Performs Processing tasks | 62598efabf627c535bcafd94 |
class ApplyVDM(SPMCommand): <NEW_LINE> <INDENT> input_spec = ApplyVDMInputSpec <NEW_LINE> output_spec = ApplyVDMOutputSpec <NEW_LINE> _jobtype = "tools" <NEW_LINE> _jobname = "fieldmap" <NEW_LINE> def _format_arg(self, opt, spec, val): <NEW_LINE> <INDENT> if opt in ["in_files", "vdmfile"]: <NEW_LINE> <INDENT> return sc... | Use the fieldmap toolbox from spm to apply the voxel displacement map (VDM) to some epi files.
http://www.fil.ion.ucl.ac.uk/spm/doc/manual.pdf#page=173
.. important::
This interface does not deal with real/imag magnitude images nor
with the two phase files case. | 62598efa3317a56b869bd9f5 |
class IndexView(tables.MultiTableView): <NEW_LINE> <INDENT> table_classes = (datasources_tables.DataSourcesTablesTable, datasources_tables.PoliciesTablesTable,) <NEW_LINE> template_name = 'admin/datasources/index.html' <NEW_LINE> def get_datasources_tables_data(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> dataso... | List service and policy defined data. | 62598efafff4ab517ebcc0f3 |
class DataPoint: <NEW_LINE> <INDENT> def __init__(self, block): <NEW_LINE> <INDENT> self.position_in_block = block.get_current_position() <NEW_LINE> self.focal_image_id = block.get_current_focal_image_id() <NEW_LINE> self.prime_image_path = block.get_current_prime_image_path() <NEW_LINE> self.prime_image_id = re.split(... | A class used to store data about a trial. Passed in to the experiment class to be saved. | 62598efa56ac1b37e6300b0e |
class lineChart(NVD3Chart): <NEW_LINE> <INDENT> def __init__(self, height=450, width=None, date=False, **kwargs): <NEW_LINE> <INDENT> NVD3Chart.__init__(self, **kwargs) <NEW_LINE> if date: <NEW_LINE> <INDENT> self.create_x_axis('xAxis', format='%d %b %Y', date=True) <NEW_LINE> self.set_custom_tooltip_flag(True) <NEW_LI... | A line chart or line graph is a type of chart which displays information
as a series of data points connected by straight line segments.
.. image:: ../_static/screenshot/lineChart.png
Python example::
from nvd3 import lineChart
chart = lineChart(name='lineChart', height=400, width=400, date=True)
xdata =... | 62598efa377c676e912f61f4 |
class BookItem(models.Model): <NEW_LINE> <INDENT> edition = models.ForeignKey(BookEdition) <NEW_LINE> catalogue_numb = models.CharField(max_length=30) <NEW_LINE> hard = 'Hard' <NEW_LINE> soft = 'Soft' <NEW_LINE> COVER_TYPES = ( ('soft', 'Soft'), ('hard', 'Hard'), ) <NEW_LINE> cover_type = models.CharField( max_length=4... | egzemnplarz | 62598efa99cbb53fe682f7d1 |
class DialogFrame ( BaseFrame ): <NEW_LINE> <INDENT> def __init__(self,parent,x,y,height,width,lborder=False): <NEW_LINE> <INDENT> BaseFrame.__init__( self, parent,x,y,height,width, lborder ) <NEW_LINE> self.dialog = None <NEW_LINE> <DEDENT> def __del__(self): <NEW_LINE> <INDENT> BaseFrame.__del__(self) <NEW_LINE> self... | Each frame keeps track of an editor instance in a subwindow | 62598efa796e427e5384d0bc |
class ChangeUserInfosForm(RegistrationForm): <NEW_LINE> <INDENT> email = None | Extends the basic registration form but exclude the password and email fields | 62598efacc0a2c1114479923 |
class ModelDataDiffer: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__nested_fields = {} <NEW_LINE> self.__original_values = {} <NEW_LINE> <DEDENT> def save_state(self, model: db.Model): <NEW_LINE> <INDENT> self.__initial_enumerate_nested_fields(model) <NEW_LINE> self.__original_values = {} <NEW_LIN... | Tool for checking changes of the specified fields | 62598efa956e5f7376df4b0b |
class Controller(object): <NEW_LINE> <INDENT> def __init__(self, sensor, pump, decider): <NEW_LINE> <INDENT> self.sensor = sensor <NEW_LINE> self.pump = pump <NEW_LINE> self.decider = decider <NEW_LINE> self.actions = { 'PUMP_IN': pump.PUMP_IN, 'PUMP_OUT': pump.PUMP_OUT, 'PUMP_OFF': pump.PUMP_OFF, } <NEW_LINE> <DEDENT>... | Encapsulates command and coordination for the water-regulation module | 62598efa7d43ff248742688c |
class TestDisplayAnalysis(unittest.TestCase): <NEW_LINE> <INDENT> pass | Receives tuples with values to be displayed | 62598efa76e4537e8c3ededd |
class Liking(models.Model): <NEW_LINE> <INDENT> photo = models.ForeignKey(Photo) <NEW_LINE> user = models.ForeignKey(FlickrUser) <NEW_LINE> date_faved = models.DateTimeField(null=True) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return "%s -> %s" % (self.user, self.photo.id) | Model which keep date/time of user's likes:
| date_faved - datetime in readable Date/time | 62598efa627d3e7fe0e057b0 |
class WordCloudWordAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = [ 'word', 'text', 'entity', ] | Word Cloud Word add/change admin panel | 62598efa3346ee7daa336af8 |
class BlobStore(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Read(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): <NEW_LINE> <INDENT> return grpc.experimental.unary_stream(request, target, '/s... | Missing associated documentation comment in .proto file. | 62598efa67a9b606de5448f3 |
class CardShowRenderer(ObjectClassShowRenderer): <NEW_LINE> <INDENT> def __init__(self, service, commit): <NEW_LINE> <INDENT> self.service = service <NEW_LINE> self.commit = commit <NEW_LINE> self.name_generator = toucanlib.cli.names.NameGenerator() <NEW_LINE> <DEDENT> def render(self, stream, objects): <NEW_LINE> <IND... | Render information about a card. | 62598efaec188e330fdf71ce |
class VirtualMachineScaleSetSku(Model): <NEW_LINE> <INDENT> _validation = { 'resource_type': {'readonly': True}, 'sku': {'readonly': True}, 'capacity': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'resource_type': {'key': 'resourceType', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'Sku'}, 'capacity': {'key': '... | Describes an available virtual machine scale set sku.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar resource_type: The type of resource the sku applies to.
:vartype resource_type: str
:ivar sku: The Sku.
:vartype sku: ~azure.mgmt.compute.v2016_04_30_preview.models.Sku
:... | 62598efabf627c535bcafd96 |
class IsolateDBInstanceResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.AsyncRequestId = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.AsyncRequestId = params.get("AsyncRequestId") <NEW_LINE> self.RequestId = p... | IsolateDBInstance返回参数结构体
| 62598efad268445f26639021 |
class TestApplicationStage(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 testApplicationStage(self): <NEW_LINE> <INDENT> model = smartrecruiters_python_client.models.application_stage.Application... | ApplicationStage unit test stubs | 62598efa5166f23b2e241cff |
class TriggerInfo(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Enable = None <NEW_LINE> self.Qualifier = None <NEW_LINE> self.TriggerName = None <NEW_LINE> self.Type = None <NEW_LINE> self.TriggerDesc = None <NEW_LINE> self.AvailableStatus = None <NEW_LINE> self.CustomArgument = None... | 触发器信息
| 62598efa44b2445a339b5e00 |
class SimpleContainer(Container): <NEW_LINE> <INDENT> windowAttributes = [] <NEW_LINE> genericStyles = genericExStyles = [] <NEW_LINE> isTestable = False | Container without window attributes and styles. | 62598efa796e427e5384d0be |
class LosAngelesClippers(NBA_Team): <NEW_LINE> <INDENT> full_name = "Los Angeles Clippers" <NEW_LINE> name = "Clippers" <NEW_LINE> team_id = 1610612746 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super().__init__() | NBA Los Angeles Clippers Static Information | 62598efa66656f66f7d58d09 |
class Responses(List): <NEW_LINE> <INDENT> pass | Manages reviews in a list | 62598efa091ae3566870353e |
class GuidedOfflineEditingPluginDialogTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.dialog = GuidedOfflineEditingPluginDialog(None) <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> self.dialog = None <NEW_LINE> <DEDENT> def test_dialog_go(self): <NEW_LINE> <INDENT> bu... | Test dialog works. | 62598efa50812a4eaa62007c |
class RemoveMods(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "artist_paint.remove_modifiers" <NEW_LINE> bl_label = "" <NEW_LINE> bl_options = { 'REGISTER','UNDO' } <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> context = bpy.context <NEW_LINE> scene = context.scene <NEW_LINE> obj = context.object <... | Remove Modifiers | 62598efabe383301e0252105 |
class StateObserver(object): <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> @abstractmethod <NEW_LINE> def get_current_state(self): <NEW_LINE> <INDENT> pass | This is where you are told which state it is | 62598efaff9c53063f518f87 |
class Transform( object ): <NEW_LINE> <INDENT> def export_data( self, buffer: BytesReadType, parent: Optional["Block"] = None ) -> TransformResult: <NEW_LINE> <INDENT> logger.warning( f"{self}: export_data not implemented!" ) <NEW_LINE> return TransformResult() <NEW_LINE> <DEDENT> def import_data( self, buffer: BytesRe... | Base class for defining transformations. | 62598efa3d592f4c4edb9813 |
class Router(object): <NEW_LINE> <INDENT> def __init__(self, outputType=None): <NEW_LINE> <INDENT> self._out = Out() <NEW_LINE> self._outputType = outputType <NEW_LINE> @implementer(IDrain) <NEW_LINE> class NullDrain(object): <NEW_LINE> <INDENT> inputType = outputType <NEW_LINE> fount = None <NEW_LINE> def flowingFrom(... | A drain with multiple founts that consumes L{Routed}C{(IX)} from its input
and produces C{IX} to its outputs.
@ivar _out: A fan-out that consumes L{Routed}C{(X)} and produces C{X}.
@type _out: L{Out}
@ivar drain: The input to this L{Router}.
@type drain: L{IDrain} | 62598efa442bda511e95ad86 |
class JsonCaseBallot(JsonableMixin): <NEW_LINE> <INDENT> data_attrs = (Attribute('choices'), Attribute('weight')) <NEW_LINE> @classmethod <NEW_LINE> def model_to_kwargs(cls, model_obj): <NEW_LINE> <INDENT> weight, choices = model_obj <NEW_LINE> return {'weight': weight, 'choices': choices} <NEW_LINE> <DEDENT> def __ini... | The serialization format is a space-delimited string of integers of
the form: "WEIGHT CHOICE1 CHOICE2 CHOICE3 ...". | 62598efaf548e778e5969eb1 |
class _DefaultOptsStack(_DefaultStack): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(_DefaultOptsStack, self).__init__() <NEW_LINE> self._global_default_opts = None <NEW_LINE> <DEDENT> def get_default(self): <NEW_LINE> <INDENT> ret = super(_DefaultOptsStack, self).get_default() <NEW_LINE> return re... | A thread-local stack of objects for providing an implicit default graph. | 62598efa460517430c430dae |
class MetaUniversalRecipe(type): <NEW_LINE> <INDENT> def __init__(cls, name, bases, ns): <NEW_LINE> <INDENT> step_func = ns.get('_do_step') <NEW_LINE> for _, step in BuildSteps(): <NEW_LINE> <INDENT> setattr(cls, step, lambda self, name=step: step_func(self, name)) | Wraps all the build steps for the universal recipe to be called for each
one of the child recipes. | 62598efa66673b3332c2ecd5 |
class Person(EmbyObject): <NEW_LINE> <INDENT> def __init__(self, object_dict, connector): <NEW_LINE> <INDENT> super().__init__(object_dict, connector) <NEW_LINE> <DEDENT> @property <NEW_LINE> def role(self): <NEW_LINE> <INDENT> return self.object_dict.get('Role', '') <NEW_LINE> <DEDENT> @role.setter <NEW_LINE> def role... | Class representing emby people objects
Parameters
----------
object_dict : dict
same as for `EmbyObject`
connector : embypy.utils.connector.Connector
same as for `EmbyObject` | 62598efabf627c535bcafd98 |
class GetHosts(EntityConnectionField): <NEW_LINE> <INDENT> entity_type = Host <NEW_LINE> @staticmethod <NEW_LINE> @require_authentication <NEW_LINE> def resolve_entities( _root, info: ResolveInfo, filter_string: FilterString = None, after: str = None, before: str = None, first: int = None, last: int = None, ) -> Entiti... | Gets a list of hosts with pagination
Args:
filter_string (str, optional): Optional filter string to be
used with query.
Example:
.. code-block::
query {
hosts (filterString: "name~Foo rows=2") {
nodes {
id
name
... | 62598efaa8370b77170eed09 |
class TimeSeries(AlphaVantageRequest): <NEW_LINE> <INDENT> def _set_parameters(self, function, symbol, output_size): <NEW_LINE> <INDENT> self._api_params['function'] = function <NEW_LINE> self._api_params['symbol'] = symbol <NEW_LINE> self._api_params['outputsize'] = output_size <NEW_LINE> self._api_params['apikey'] = ... | object to access global stock data from the AlphaVantage API | 62598efa71ff763f4b5e6086 |
@unittest.skipUnless(running_extended_tests, "part of extended tests") <NEW_LINE> class ReenableFP(MethodHolder): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> super(ReenableFP, cls).setUpClass() <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def tearDownClass(cls): <NEW_LINE> <INDEN... | Re-enable Flowprobe feature | 62598efa9f2886367281711a |
class BlobsRenderer(renderer.Renderer): <NEW_LINE> <INDENT> UNIT_CIRCLE = [(math.sin(math.radians(a)), math.cos(math.radians(a))) for a in range(0, 360, 10)] <NEW_LINE> PARTICLE_RATIO = 1.0/10.0 <NEW_LINE> PARTICLE_SIZE_FACTOR = 4.5/3.0 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> renderer.Renderer.__init__(self)... | Renders blobs. | 62598efa283ffb24f3cf21d0 |
class Links(pointandclick.Links): <NEW_LINE> <INDENT> def cursor(self, link, load=False): <NEW_LINE> <INDENT> import popplerqt5 <NEW_LINE> if not isinstance(link, popplerqt5.Poppler.LinkBrowse) or not link.url(): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> t = textedit.link(link.url()) <NEW_LINE> if t: <NEW_LINE> <I... | Stores all the links of a Poppler document sorted by URL and text position.
Only textedit:// urls are stored. | 62598efa99fddb7c1ca62295 |
class DeviceRequest_RequesterSchema: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_schema( max_nesting_depth: Optional[int] = 6, nesting_depth: int = 0, nesting_list: List[str] = [], max_recursion_limit: Optional[int] = 2, include_extension: Optional[bool] = False, extension_fields: Optional[List[str]] = [ "valu... | Represents a request for a patient to employ a medical device. The device may
be an implantable device, or an external assistive device, such as a walker. | 62598efa99cbb53fe682f7d5 |
class TrailDBMultiCursor(object): <NEW_LINE> <INDENT> def __init__(self, parsetime, rawitems, only_timestamp): <NEW_LINE> <INDENT> self.parsetime = parsetime <NEW_LINE> self.rawitems = rawitems <NEW_LINE> self.only_timestamp = only_timestamp <NEW_LINE> self.multicursor = None <NEW_LINE> self._ready = False <NEW_LINE> <... | TrailDBMultiCursor iterates over the events of multiple trails,
merged together into a single trail with events sorted in the ascending
time order. The trails can be from different traildbs.
To use, initialize and then set the cursors using the set_cursors method.
To reuse a multicursor, set new trails on the underlyi... | 62598efae1aae11d1e7cdcd5 |
class SlaveRep(object): <NEW_LINE> <INDENT> def __init__(self, lag_time=1, conn="Connection Instance"): <NEW_LINE> <INDENT> self.lag_time = lag_time <NEW_LINE> self.conn = conn <NEW_LINE> <DEDENT> def get_time(self): <NEW_LINE> <INDENT> return self.lag_time <NEW_LINE> <DEDENT> def upd_slv_time(self): <NEW_LINE> <INDENT... | Class: SlaveRep
Description: Class stub holder for mysql_class.SlaveRep class.
Methods:
__init__
get_time
upd_slv_time | 62598efa851cf427c66b6bed |
class JupyterTensorboardApp(extensions.BaseExtensionApp): <NEW_LINE> <INDENT> name = 'jupyter tensorboard' <NEW_LINE> version = __version__ <NEW_LINE> description = ( 'Enable or disable ' 'the jupyter_tensorboard extension') <NEW_LINE> subcommands = dict( enable=( EnableJupyterTensorboardApp, 'Enable the jupyter_tensor... | Root level jupyter_nbextensions_configurator app. | 62598efa4c34283577618c0c |
class LexerPostScript(Lexer, QsciLexerPostScript): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> QsciLexerPostScript.__init__(self, parent) <NEW_LINE> Lexer.__init__(self) <NEW_LINE> self.commentString = "%" <NEW_LINE> <DEDENT> def initProperties(self): <NEW_LINE> <INDENT> self.setTokenize(Pr... | Subclass to implement some additional lexer dependant methods. | 62598efa4a966d76dd5ed7fa |
class Backends(object): <NEW_LINE> <INDENT> backends: List[SqreenWebhookManagerInterface] = list() <NEW_LINE> def __init__(self, *args: SqreenWebhookManagerInterface): <NEW_LINE> <INDENT> for b in args: <NEW_LINE> <INDENT> if not isinstance(b, SqreenWebhookManagerInterface): <NEW_LINE> <INDENT> raise TypeError( type(b)... | create a list of backends
all of the backend object must implement the SqreenWebhookManagerInterface | 62598efaa05bb46b3848919b |
class ActionOperation(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=64) <NEW_LINE> step = models.SmallIntegerField(u'第n次告警',default=1,help_text='当trigger触发次数小于这个值时就执行这条记录里报警方式') <NEW_LINE> action_type_choices = (('email','Email'),('sms','SMS'),('script','SCRIPT')) <NEW_LINE> action_type = models... | 报警动作 | 62598efa091ae35668703540 |
class Variable: <NEW_LINE> <INDENT> def __init__(self, name, datatype, position): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.datatype = datatype <NEW_LINE> self.position = position <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> if self.name == other.name and self.datatype == other.datatype a... | This holds a global variables defined in the specificaiton | 62598efabe383301e0252107 |
class loginViewSet(views.APIView): <NEW_LINE> <INDENT> authentication_classes = () <NEW_LINE> permission_classes = () <NEW_LINE> def post(self, request,*args, **kwargs): <NEW_LINE> <INDENT> username = request.data.get('username') <NEW_LINE> password = request.data.get('password') <NEW_LINE> codeid = request.data.get('c... | 登录接口 | 62598efa5fc7496912d47705 |
class SelectFromModel(BaseEstimator, SelectorMixin, MetaEstimatorMixin): <NEW_LINE> <INDENT> def __init__(self, estimator, threshold=None, prefit=False, norm_order=1): <NEW_LINE> <INDENT> self.estimator = estimator <NEW_LINE> self.threshold = threshold <NEW_LINE> self.prefit = prefit <NEW_LINE> self.norm_order = norm_o... | Meta-transformer for selecting features based on importance weights.
.. versionadded:: 0.17
Parameters
----------
estimator : object
The base estimator from which the transformer is built.
This can be both a fitted (if ``prefit`` is set to True)
or a non-fitted estimator. The estimator must have either a
... | 62598efa627d3e7fe0e057b5 |
class CS_netlist_IDL(object): <NEW_LINE> <INDENT> thrift_spec = (None, (1, TType.I32, 'count', None, None), (2, TType.LIST, 'netip', (TType.STRUCT, (CS_netip_IDL, CS_netip_IDL.thrift_spec)), None)) <NEW_LINE> def __init__(self, count = None, netip = None): <NEW_LINE> <INDENT> self.count = count <NEW_LINE> self.netip = ... | Attributes:
- count
- netip | 62598efa3d592f4c4edb9815 |
class BindNetworkModel(object): <NEW_LINE> <INDENT> _names = { "config_template_id":'configTemplateId', "auto_bind":'autoBind' } <NEW_LINE> def __init__(self, config_template_id=None, auto_bind=None): <NEW_LINE> <INDENT> self.config_template_id = config_template_id <NEW_LINE> self.auto_bind = auto_bind <NEW_LINE> <DEDE... | Implementation of the 'bindNetwork' model.
TODO: type model description here.
Attributes:
config_template_id (string): The ID of the template to which the
network should be bound.
auto_bind (bool): Optional boolean indicating whether the network's
switches should automatically bind to profiles... | 62598efaf548e778e5969eb3 |
class GeneralisedExponentialKernel(Kernel): <NEW_LINE> <INDENT> def __init__(self, alpha): <NEW_LINE> <INDENT> super(GeneralisedExponentialKernel, self).__init__(alpha) <NEW_LINE> <DEDENT> def _covariance(self, dx): <NEW_LINE> <INDENT> alpha = self.hyperparams <NEW_LINE> return alpha[0] ** 2 * np.exp(-(0.5 * np.abs(dx)... | A class implementing the squared exponential kernel.
:param array-like alpha: (3,) The parameter vector (amplitude,
lengthscale, exponent). | 62598efabf627c535bcafd9a |
class VirtualMachineScaleSetSkuCapacity(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'minimum': {'readonly': True}, 'maximum': {'readonly': True}, 'default_capacity': {'readonly': True}, 'scale_type': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'minimum': {'key': 'minimum', 'type': 'long'}, ... | Describes scaling information of a sku.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar minimum: The minimum capacity.
:vartype minimum: long
:ivar maximum: The maximum capacity that can be set.
:vartype maximum: long
:ivar default_capacity: The default capacity.
:vartype... | 62598efa283ffb24f3cf21d3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.