code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class UploadFileMixin: <NEW_LINE> <INDENT> @use_kwargs({'file': fields.Field(required=True)}, location='files') <NEW_LINE> def _process(self, file): <NEW_LINE> <INDENT> if not self.validate_file(file): <NEW_LINE> <INDENT> raise UnprocessableEntity <NEW_LINE> <DEDENT> return self._save_file(file, file.stream) <NEW_LINE>... | Mixin for RHs using the generic file upload system.
An RH using this mixin needs to override the ``get_file_context`` method
to specify how the file gets stored. | 62598f761f5feb6acb162520 |
class MonkeyModule(AnsibleModule): <NEW_LINE> <INDENT> def __init__(self, data, schema, name): <NEW_LINE> <INDENT> self._errors = None <NEW_LINE> self._valid = True <NEW_LINE> self._schema = schema <NEW_LINE> self.name = name <NEW_LINE> self.params = data <NEW_LINE> <DEDENT> def fail_json(self, msg): <NEW_LINE> <INDENT... | A derivative of the AnsibleModule used
to just validate the data (task.args) against
the schema(argspec) | 62598f7691af0d3eaad396f5 |
class LogROCCallback(object): <NEW_LINE> <INDENT> def __init__(self, logging_dir=None, prefix='val', roc_path=None, class_names=None): <NEW_LINE> <INDENT> self.prefix = prefix <NEW_LINE> self.roc_path = roc_path <NEW_LINE> self.class_names = class_names <NEW_LINE> try: <NEW_LINE> <INDENT> from tensorboard import Summar... | save roc graphs periodically in TensorBoard.
write TensorBoard event file, holding the roc graph for every epoch
logging_dir : str
this function can only be executed after 'eval_metric.py', since that function is responsible for the graph creation
where the tensorboard file will be created
roc_path : list[str]
... | 62598f76d99f1b3c44d04f97 |
class DeployLog(TimeStampedModel): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> verbose_name = verbose_name_plural = '发布日志' <NEW_LINE> <DEDENT> name = models.CharField(max_length=50, verbose_name='项目名称', help_text='项目名称') <NEW_LINE> git_branch = models.CharField(max_length=500, verbose_name='git分支', help_text='m... | 配置表 | 62598f760383005118f6cfeb |
class EuclideanFeatureNormalizationNode(BaseNode): <NEW_LINE> <INDENT> def __init__(self, dimension_scale = False, **kwargs): <NEW_LINE> <INDENT> super(EuclideanFeatureNormalizationNode, self).__init__(**kwargs) <NEW_LINE> self.set_permanent_attributes(dim = None, dimension_scale=dimension_scale, feature_names=[]) <NEW... | Normalize feature vectors to Euclidean norm with respect to dimensions
**Parameters**
:dimension_scale:
Scale the output to ||x|| * dim(x)
(to get bigger values)
(*optional, default: False*)
**Exemplary Call**
.. code-block:: yaml
-
node : Euclidian_Feature_Normalization
... | 62598f761f037a2d8b9e39d7 |
class QueueConnection(BaseConnection): <NEW_LINE> <INDENT> def __init__(self, name=None, mtu=4095): <NEW_LINE> <INDENT> BaseConnection.__init__(self, name) <NEW_LINE> self.fromuserqueue = queue.Queue() <NEW_LINE> self.touserqueue = queue.Queue() <NEW_LINE> self.opened = False <NEW_LINE> self.mtu = mtu <NEW_LINE> <DEDEN... | Sends and receives data using 2 Python native queues.
- ``MyConnection.fromuserqueue`` : Data read from this queue when ``wait_frame`` is called
- ``MyConnection.touserqueue`` : Data written to this queue when ``send`` is called
:param mtu: Optional maximum frame size. Messages will be truncated to this size
:type mt... | 62598f7623e79379d538bde3 |
class TaskInput(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.DataId = None <NEW_LINE> self.Name = None <NEW_LINE> self.Input = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.DataId = params.get("DataId") <NEW_LINE> self.Name = params.get("Name") <NE... | 音视频任务数据结构
| 62598f7682261d6c5272fb4b |
class FilenameUniqDict(dict): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._existing = set() <NEW_LINE> <DEDENT> def add_file(self, docname, newfile): <NEW_LINE> <INDENT> if newfile in self: <NEW_LINE> <INDENT> self[newfile][0].add(docname) <NEW_LINE> return self[newfile][1] <NEW_LINE> <DEDENT> uniq... | A dictionary that automatically generates unique names for its keys,
interpreted as filenames, and keeps track of a set of docnames they
appear in. Used for images and downloadable files in the environment. | 62598f7630dc7b766599f147 |
class NullProxyAuth(): <NEW_LINE> <INDENT> def __init__(self, password_manager): <NEW_LINE> <INDENT> self.password_manager = password_manager <NEW_LINE> self.username = "" <NEW_LINE> <DEDENT> def clean(self, headers): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def authenticate(self, headers): <NEW_LINE> <INDENT> retu... | No proxy auth at all (returns empty challange headers) | 62598f76d6c5a102081e1a30 |
class TestInlineResponse20011(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 testInlineResponse20011(self): <NEW_LINE> <INDENT> pass | InlineResponse20011 unit test stubs | 62598f7696565a6dacd2cbf0 |
class State(enum.IntEnum): <NEW_LINE> <INDENT> STATE_UNSPECIFIED = 0 <NEW_LINE> ACTIVE = 1 <NEW_LINE> INACTIVE = 2 | The state of the finding.
Attributes:
STATE_UNSPECIFIED (int): Unspecified state.
ACTIVE (int): The finding requires attention and has not been addressed yet.
INACTIVE (int): The finding has been fixed, triaged as a non-issue or otherwise addressed
and is no longer active. | 62598f7676d4e153a661c4ff |
class PonerArticulosPermission(Permission): <NEW_LINE> <INDENT> def __init__(self, board_name): <NEW_LINE> <INDENT> need = ItemNeed(PONER_CONTENIDO, board_name, 'board') <NEW_LINE> super().__init__(need, AdminRolNeed, PonerArticulosNeed) | Mover articulos a este board | 62598f7638b623060ffa8985 |
class GeoX(GeoSpatialUnOp): <NEW_LINE> <INDENT> output_type = rlz.shape_like('args', dt.float64) | Return the X coordinate of the point, or NULL if not available.
Input must be a point | 62598f7666656f66f7d59cdc |
class Environment: <NEW_LINE> <INDENT> climate_map = {"Desert": Desert(), "Tundra": Tundra(), "Shrubland": Shrubland(), "Grassland": Grassland(), "TemperateDeciduousForest": TemperateDeciduousForest(), "ConiferousForest": ConiferousForest(), "Rainforest": Rainforest()} <NEW_LINE> fungus_map = {"Phellinus robiniae" ... | Environment class for containing Climate, Grid, and Fungi. | 62598f76b57a9660fecd1369 |
class DummyEvent (NoEvent): <NEW_LINE> <INDENT> def get_pid(self): <NEW_LINE> <INDENT> return self._pid <NEW_LINE> <DEDENT> def get_tid(self): <NEW_LINE> <INDENT> return self._tid <NEW_LINE> <DEDENT> def get_process(self): <NEW_LINE> <INDENT> return self._process <NEW_LINE> <DEDENT> def get_thread(self): <NEW_LINE> <IN... | Dummy event object used internally by L{ConsoleDebugger}. | 62598f7607d97122c421658c |
class APISession: <NEW_LINE> <INDENT> def __init__(self, cfg, table): <NEW_LINE> <INDENT> self.cfg = cfg <NEW_LINE> self.table = table <NEW_LINE> self.session = requests.Session() <NEW_LINE> <DEDENT> def httpRequest(self, request_params={}) -> list: <NEW_LINE> <INDENT> def err_msg(): <NEW_LINE> <INDENT> sparams = "no p... | HTTP session to query Debts DB API | 62598f7671ff763f4b5e7058 |
class Stepper: <NEW_LINE> <INDENT> num_stages = None <NEW_LINE> expected_order = None <NEW_LINE> num_copies = None <NEW_LINE> def make_steps(self, MapKernel=ElementWiseMap, **kwargs): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def __init__(self, input, MapKernel=ElementWiseMap, **kwargs): <NEW_LI... | The base class for time steppers, with no implementation of a particular time
stepper.
:arg input: May be one of the following:
* a :class:`dict` whose values represent the right-hand side
of the ODEs to solve, i.e., `(key, value)` pairs corresponding to
:math:`(y, f)` such that
.. math::
... | 62598f76a8ecb03325870af4 |
class LatencyFloat(Benchmark): <NEW_LINE> <INDENT> def get_encode_data(self): <NEW_LINE> <INDENT> return 1.1 | Latency: Float to ascii | 62598f7666673b3332c2fcad |
class ProcessingError (Exception): <NEW_LINE> <INDENT> ERROR_CODE = 500 <NEW_LINE> def __init__(self, message, error_code=None): <NEW_LINE> <INDENT> Exception.__init__(self) <NEW_LINE> self.message = message <NEW_LINE> if error_code is not None: <NEW_LINE> <INDENT> self.error_code = error_code <NEW_LINE> <DEDENT> else:... | Base class for exceptions in this module. Overridden by more specific exceptions.
attributes:
message -- explanation of the error.
error_code -- optional integer identifying the exception type: all exception
types defined here have a default status/error code. | 62598f7615fb5d323ce7e614 |
class ShoppingListViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> permission_classes = [OwnerOnly] <NEW_LINE> serializer_class = ShoppingListSerializer <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> queryset = ShoppingList.objects.filter(created_by=self.request.user).all().order_by('-created_at') <NEW_LINE>... | API endpoint for viewing, creating and updating lists | 62598f761f5feb6acb162522 |
class IS( ROUTE ): <NEW_LINE> <INDENT> PROTO = "IS" <NEW_LINE> def bind( self ): <NEW_LINE> <INDENT> self._bind( self.source, self.sourceField ) <NEW_LINE> self._bind( self.destination, self.destinationField ) <NEW_LINE> <DEDENT> def forward( self, signal, sender, event=None, value=None, **arguments ): <NEW_LINE> <INDE... | An is-mapping for a field/event
Functionally, an instantiated IS is just a
multi-directional ROUTE (that is, it's a route
to and from a given field on the base node to
the sub-nodes. | 62598f7691af0d3eaad396f7 |
class CoursePage(models.Model): <NEW_LINE> <INDENT> last_updated = models.DateTimeField(auto_now=True, null=True) <NEW_LINE> full_description = models.TextField(verbose_name="Description", default="") <NEW_LINE> course_dept_num = models.CharField( max_length=255, verbose_name="Course Number", default="" ) <NEW_LINE> co... | Model designed for course detail pages. | 62598f768da39b475be02ace |
class DatastorerPlugin(SingletonPlugin): <NEW_LINE> <INDENT> implements(IDomainObjectModification, inherit=True) <NEW_LINE> implements(IResourceUrlChange) <NEW_LINE> def notify(self, entity, operation=None): <NEW_LINE> <INDENT> if not isinstance(entity, model.Resource): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> if... | Registers to be notified whenever CKAN resources are created or their
URLs change, and will create a new ckanext.datastorer celery task to
put the resource in the datastore. | 62598f761f037a2d8b9e39d9 |
class StubActionErrorForActionDirective(ActionDirective): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def name(cls): <NEW_LINE> <INDENT> return 'stub_action_error_for_action' <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def get_full_grammar(cls): <NEW_LINE> <INDENT> return ( super(StubActionErrorForActionDirective, cls)... | Use this directive to stub an action call to another service that your service calls and set an error that the
stubbed service action should return. This is mutually exclusive with stubbing a response body to be returned by
the stubbed service action. This follows the standard (full) error code/field/message syntax of ... | 62598f76d4950a0f3b110aac |
class Face(Entity): <NEW_LINE> <INDENT> def __init__(self, entityType, PDPointer, parCount, seqNumber, SURF, N, OF, LOOPList): <NEW_LINE> <INDENT> super().__init__(510, PDPointer, parCount, seqNumber) <NEW_LINE> self.SURF = SURF <NEW_LINE> self.N = N <NEW_LINE> self.OF = OF <NEW_LINE> self.LOOPList = LO... | # Class: Face.
# Description: This class represents data from Face entities. | 62598f76d10714528d69d7ba |
class MinimaxAgent(MultiAgentSearchAgent): <NEW_LINE> <INDENT> def getAction(self, gameState): <NEW_LINE> <INDENT> legalMoves=gameState.getLegalActions(0) <NEW_LINE> futureStates=[gameState.generateSuccessor(0,move) for move in legalMoves] <NEW_LINE> scores = [self.minimizer(0,state,1) for state in futureStates] <NEW_L... | Your minimax agent (question 2) | 62598f7696565a6dacd2cbf1 |
class JSContextBase: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.media = self.base_media <NEW_LINE> self.media_fragments = set([str(self.media)]) <NEW_LINE> <DEDENT> @property <NEW_LINE> def base_media(self): <NEW_LINE> <INDENT> return forms.Media(js=[self.telepath_js_path]) <NEW_LINE> <DEDENT> def... | Base class for JSContext classes obtained through AdapterRegistry.js_context_class.
Subclasses of this are assigned the following class attributes:
registry - points to the associated AdapterRegistry
telepath_js_path - path to telepath.js (as per standard Django staticfiles conventions)
A JSContext handles packing a s... | 62598f768e05c05ec3f6eabc |
class IsAuthorEntry(BasePermission): <NEW_LINE> <INDENT> def has_object_permission(self, request, view, obj): <NEW_LINE> <INDENT> return obj.author == request.user or obj.group.founder == request.user | Автор записи или администратор
| 62598f7638b623060ffa8987 |
class FpTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def assert_issue( self, error: OneOf[Issue, Any], message: str, ) -> Any: <NEW_LINE> <INDENT> self.assertTrue(error.is_bad, 'expecting issue') <NEW_LINE> err = cast(Issue, error.value) <NEW_LINE> self.assertEqual(err.message, message) <NEW_LINE> return err <NEW_L... | Utility class with fp friendly methods. | 62598f7673bcbd0ca4bc9b3b |
class TestNewRecord(IntegrationTestbase): <NEW_LINE> <INDENT> def test_filename_changes(self): <NEW_LINE> <INDENT> test_filename = "gst-test-{0}.data".format( random.randint(0, sys.maxsize)) <NEW_LINE> self.log.info("asserting recording-file are not aready existing" "(test_filename=%s)", test_filename) <NEW_LINE> asser... | Test new_record method
| 62598f7623e79379d538bde6 |
@override_settings( STATICFILES_FINDERS=['django.contrib.staticfiles.finders.FileSystemFinder'], STATICFILES_DIRS=[os.path.join(TEST_ROOT, 'project', 'documents')], ) <NEW_LINE> class TestMiscFinder(SimpleTestCase): <NEW_LINE> <INDENT> def test_get_finder(self): <NEW_LINE> <INDENT> self.assertIsInstance(finders.get_fin... | A few misc finder tests. | 62598f7666656f66f7d59cde |
@ddt.ddt <NEW_LINE> class TestInternalWeightedScore(TestCase): <NEW_LINE> <INDENT> @ddt.data( (0, 0, 1), (5, 0, 0), (10, 0, None), (0, 5, None), (5, 10, None), (10, 10, None), ) <NEW_LINE> @ddt.unpack <NEW_LINE> def test_cannot_compute(self, raw_earned, raw_possible, weight): <NEW_LINE> <INDENT> self.assertEquals( scor... | Tests the internal helper method: _weighted_score | 62598f768c3a8732951f5e3b |
class TestPropagate(BaseLoggingTest): <NEW_LINE> <INDENT> def test_propagate_true(self): <NEW_LINE> <INDENT> logging.config.dictConfig({ 'version': 1, 'handlers': { 'test': { 'class': 'logging_playground.utils.MockLoggingHandler', }, }, 'loggers': { 'my_module': { 'handlers': ['test'], }, 'my_module.child': { 'propagat... | How does the ``propagate`` value affect loggers? | 62598f76d164cc6175820862 |
@html_element('thead') <NEW_LINE> class TableHeading(BlockLevelNode,RowSequenceNode): <NEW_LINE> <INDENT> def render(self, section_index, widths, **kw): <NEW_LINE> <INDENT> text = [] <NEW_LINE> for i,node in enumerate(walk_tree(self, TableRow)): <NEW_LINE> <INDENT> text += node.render(section_index + i, widths, '=', **... | Block level node to represent tabular header data.
Maps to the HTML element ``<thead>``.
Renders all child rows using '=' for the line separator | 62598f7676d4e153a661c502 |
class overlap_predicate(object): <NEW_LINE> <INDENT> def __init__(self, centre, distance, getter = direct): <NEW_LINE> <INDENT> ( self.x, self.y, self.z ) = centre <NEW_LINE> self.distance_sq = distance ** 2 <NEW_LINE> self.getter = getter <NEW_LINE> <DEDENT> def __call__(self, obj): <NEW_LINE> <INDENT> ( x, y, z ) = s... | Simple predicate to evaluate actual distance | 62598f767c178a314d78cd94 |
class ComponentNicknamesInline(admin.TabularInline): <NEW_LINE> <INDENT> model = ComponentNickname <NEW_LINE> form = ComponentNicknameForm <NEW_LINE> max_num = 20 <NEW_LINE> extra = 1 | Inline admin for associating component nicknames with the underlying Component obejcts | 62598f76bde94217f37072dd |
class Choosy_Girl(Girl): <NEW_LINE> <INDENT> def __init__(self, name, attractiveness, intelligence, maintenance, committed, paired_to): <NEW_LINE> <INDENT> super().__init__(name, attractiveness, intelligence, maintenance, committed, paired_to) <NEW_LINE> self.type = "Choosy" <NEW_LINE> self.gift_appreciation = 0 <NEW_L... | Values luxury gifts more.
Luxury gift assigned twice the value.
Happiness is logarithmic function of attribute gift_appreciation
The choosy, whose happiness in a relationship is logarithmic of the total cost of gifts achieved over maintenance. However the luxury gifts are very previous and count double the normal valu... | 62598f76be8e80087fbbe94e |
class YahooGamesPage(TopPages): <NEW_LINE> <INDENT> def __init__(self, page_set, shared_page_state_class=shared_page_state.SharedPageState): <NEW_LINE> <INDENT> super(YahooGamesPage, self).__init__( url='http://games.yahoo.com', page_set=page_set, shared_page_state_class=shared_page_state_class) <NEW_LINE> <DEDENT> def... | Why: #1 games according to Alexa (with actual games in it) | 62598f766fece00bbaccb27a |
@enum.unique <NEW_LINE> class Mode(enum.Enum): <NEW_LINE> <INDENT> Native = '=' <NEW_LINE> Little = '<' <NEW_LINE> Big = '>' <NEW_LINE> Network = '!' | The NamedStruct modes match the modes supported by struct.pack/unpack. | 62598f76ac7a0e7691f71e06 |
class UploadOtaVersionRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.ProductId = None <NEW_LINE> self.OtaVersion = None <NEW_LINE> self.VersionUrl = None <NEW_LINE> self.FileSize = None <NEW_LINE> self.Md5 = None <NEW_LINE> self.Operator = None <NEW_LINE> <DEDENT> def _deserial... | UploadOtaVersion请求参数结构体
| 62598f7696565a6dacd2cbf2 |
class EPAdapter(object): <NEW_LINE> <INDENT> c_data = {} <NEW_LINE> def __enter__(self): <NEW_LINE> <INDENT> self.conn = self.get_DB_conn() <NEW_LINE> return self <NEW_LINE> <DEDENT> def __exit__(self, type, value, tb): <NEW_LINE> <INDENT> if type or value or tb: <NEW_LINE> <INDENT> log(50, 'XMLAdapter {} {} {}'.format... | class smooths over pushing and pulling xml form the database
and serializing it to objects | 62598f7676d4e153a661c503 |
class SortableNode(object): <NEW_LINE> <INDENT> def __init__(self, node_id, parent_ids): <NEW_LINE> <INDENT> self.node_id = node_id <NEW_LINE> self.parent_ids = parent_ids | Sortable node. | 62598f7630c21e258be980f4 |
class AttendanceStatus(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=20, null=False) <NEW_LINE> code = models.CharField(max_length=5, null=False) <NEW_LINE> description = models.TextField(max_length=250, null=False, help_text="Explanation of the status") <NEW_LINE> def __unicode__(self): <NEW_LI... | Define the commond status for the attendance
| 62598f76dc8b845886d52ea2 |
class SGD(object): <NEW_LINE> <INDENT> def __init__(self, learning_rate, batch_size): <NEW_LINE> <INDENT> self.learning_rate = float(learning_rate) <NEW_LINE> self.batch_size = batch_size <NEW_LINE> <DEDENT> def __has_parameters(self, layer): <NEW_LINE> <INDENT> return hasattr(layer, "W") <NEW_LINE> <DEDENT> def comput... | Mini-batch stochastic gradient descent.
Attributes:
learning_rate(float): the learning rate to use.
batch_size(int): the number of samples in a mini-batch. | 62598f767b25080760ed6d8e |
class NekoCommand(commands.Command, CommandMixin): <NEW_LINE> <INDENT> async def can_run(self, ctx): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return await super().can_run(ctx) <NEW_LINE> <DEDENT> except commands.CommandError: <NEW_LINE> <INDENT> return False | Implementation of a command. | 62598f7615baa7234946186e |
class UnexpectedStateException(Exception): <NEW_LINE> <INDENT> def __init__(self, expected_volume, desired_state, unexpected_state): <NEW_LINE> <INDENT> self.expected_volume = expected_volume <NEW_LINE> self.desired_state = desired_state <NEW_LINE> self.unexpected_state = unexpected_state <NEW_LINE> <DEDENT> def __str_... | An unexpected state was encountered by a volume as a result of operation. | 62598f76b57a9660fecd136d |
class Task(models.Model): <NEW_LINE> <INDENT> number = models.IntegerField(unique=True, db_index=True) <NEW_LINE> name = models.CharField(max_length=50) <NEW_LINE> desc = models.TextField(blank=True, null=True) <NEW_LINE> desc_image = models.ImageField(upload_to='task_images', blank=True, default=None, null=True) <NEW_... | Represents a Task | 62598f7607d97122c4216590 |
class UserProfile(AbstractUser): <NEW_LINE> <INDENT> GENDER_CHOICES = ( ("male", u"男"), ("female", u"女") ) <NEW_LINE> name = models.CharField(verbose_name="姓名", max_length=30, null=True, blank=True) <NEW_LINE> birthday = models.DateField(verbose_name="出生年月", null=True, blank=True) <NEW_LINE> gender = models.CharField(v... | 用户信息 | 62598f76c432627299fa28c7 |
class FlashCards(object): <NEW_LINE> <INDENT> def __init__(self, pause, *args): <NEW_LINE> <INDENT> self.pause = pause <NEW_LINE> self.pause_remaining = 0 <NEW_LINE> self.matrices = args <NEW_LINE> self.currentIdx = -1 <NEW_LINE> <DEDENT> def dataGenerator(self): <NEW_LINE> <INDENT> while True: <NEW_LINE> <INDENT> if s... | This is a state machine that takes a series of 2x2 matrices
on initialization and a number of steps to display each matrix.
After the pause (number of steps of dataGenerator calls),
FlashCards will update the matrix argument with the next
matrix in the series from the initializer. At the end of
the list of matrices,... | 62598f76711fe17d825dffd5 |
class Consumer(): <NEW_LINE> <INDENT> def __init__(self, url, topic, timeout=-1): <NEW_LINE> <INDENT> self.client = KafkaClient(hosts=url, use_greenlets=False) <NEW_LINE> self.topic = self.client.topics[topic] <NEW_LINE> self.consumer = self.topic.get_simple_consumer(consumer_timeout_ms=timeout) <NEW_LINE> <DEDENT> def... | Simple balanced kafka consumer. Accepts kafka url string and topic name byte-string. (Optional) Time in ms to stay active. | 62598f76a05bb46b3848a16d |
class Cryptor: <NEW_LINE> <INDENT> def __init__(self, *, key, mode='ECB'): <NEW_LINE> <INDENT> bs = AES.block_size <NEW_LINE> self.pad = lambda s: s + (bs - len(s) % bs) * chr(bs - len(s) % bs).encode('utf-8') <NEW_LINE> self.unpad = lambda s: s[0:-s[-1]] <NEW_LINE> iv = key[::-1] <NEW_LINE> if mode == 'ECB': <NEW_LINE... | 加密解密程序 | 62598f764e696a045264da76 |
class CreateNewPuppyTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.valid_payload = { 'name': 'Muffin', 'age': 4, 'breed': 'Pamerion', 'color': 'white' } <NEW_LINE> self.invalid_playload = { 'name': '', 'age': 4, 'breed': 'Pamerion', 'color': 'white' } <NEW_LINE> <DEDENT> def test_create_v... | Test module for inserting a new puppy | 62598f761f5feb6acb162526 |
class OAuthRedirect(SocialRegistration, View): <NEW_LINE> <INDENT> client = None <NEW_LINE> template_name = None <NEW_LINE> def post(self, request): <NEW_LINE> <INDENT> request.session['next'] = self.get_next(request) <NEW_LINE> client = self.get_client()() <NEW_LINE> request.session[self.get_client().get_session_key()... | Base class for both OAuth and OAuth2 redirects.
:param client: The API client class that should be used.
:param template_name: The error template. | 62598f76d10714528d69d7bd |
class DoorController(): <NEW_LINE> <INDENT> relay_1 = Relay('P8_16', 'P8_15') <NEW_LINE> relay_2 = Relay('P8_18', 'P8_17') <NEW_LINE> green_pin = 'P8_11' <NEW_LINE> red_pin = 'P8_9' <NEW_LINE> def __init__(self, GPIO): <NEW_LINE> <INDENT> self.GPIO = GPIO <NEW_LINE> self.GPIO.setup( self.relay_1.read, self.GPIO.IN, pul... | GPIO Pins used:
Relay_1: Read=46 & Engage=47
Relay_1: Read=P8_16 & Engage=P8_15
Relay_2: Read=65 & Engage=27
Relay_2: Read=P8_18 & Engage=P8_17
Green_LED: 45
Green_LED: P8_11
Read_LED: 69
Read_LED: P8_9 | 62598f7650485f2cf55da85f |
class EUVIMap(BaseMap): <NEW_LINE> <INDENT> def __new__(cls, data, header): <NEW_LINE> <INDENT> return BaseMap.__new__(cls, data) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def get_properties(cls, header): <NEW_LINE> <INDENT> date_format = "%Y-%m-%dT%H:%M:%S.%f" <NEW_LINE> properties = BaseMap.get_properties() <NEW_LI... | EUVI Image Map definition | 62598f7623e79379d538bde9 |
class SeqRecords: <NEW_LINE> <INDENT> def __init__(self, id_list=None, seq_list=None): <NEW_LINE> <INDENT> self.count = 0 if not id_list else len(seq_list) <NEW_LINE> self.id_list = id_list if id_list else [] <NEW_LINE> self.seq_list = [s.upper() for s in seq_list] if seq_list else [] <NEW_LINE> <DEDENT> def add(self, ... | Object representing an ordered collection of sequence records.
Attributes:
id_list (list) : List of sequence record identifiers
seq_list (list) : List of sequence strings
count (int) : Number of sequence records | 62598f76be8e80087fbbe950 |
class PacketEncodeError(PebbleError): <NEW_LINE> <INDENT> pass | Encoding a packet failed. | 62598f768a349b6b43685b32 |
class Recorder(object): <NEW_LINE> <INDENT> def __init__(self, channels=1, rate=48000, frames_per_buffer=1024): <NEW_LINE> <INDENT> self.channels = channels <NEW_LINE> self.rate = rate <NEW_LINE> self.frames_per_buffer = frames_per_buffer <NEW_LINE> <DEDENT> def open(self, fname): <NEW_LINE> <INDENT> return RecordingFi... | A recorder class for recording audio to a WAV file.
Records in mono by default. | 62598f76dc8b845886d52ea4 |
class TestDiscoveryConnection(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 testDiscoveryConnection(self): <NEW_LINE> <INDENT> pass | DiscoveryConnection unit test stubs | 62598f769b70327d1c57e6a0 |
class UsagesListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[Usage]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(UsagesListResult, self).__init__(**kwargs) <NEW_LINE> self.valu... | The list usages operation response.
:param value: The list network resource usages.
:type value: list[~azure.mgmt.network.v2019_04_01.models.Usage]
:param next_link: URL to get the next set of results.
:type next_link: str | 62598f76bde94217f37072df |
class RedoContent(Exception): <NEW_LINE> <INDENT> pass | The rendered content is stale and should be re-rendered.
| 62598f76a05bb46b3848a16f |
class MultiDimensionalArrayTest(StructureTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.array = MultiDimensionalArray(2,2,2) <NEW_LINE> <DEDENT> def test_data(self): <NEW_LINE> <INDENT> with self.assertRaises(IndexError): <NEW_LINE> <INDENT> self.array[4, 4, 4] <NEW_LINE> <DEDENT> for i in ran... | Tests the class of MultiDimensionalArray.
| 62598f76d99f1b3c44d04f9e |
class ConsultRecord(models.Model): <NEW_LINE> <INDENT> customer = models.ForeignKey(verbose_name="所咨询客户", to='Customer', on_delete=models.CASCADE) <NEW_LINE> consultant = models.ForeignKey(verbose_name="跟踪人", to='UserInfo', on_delete=models.CASCADE) <NEW_LINE> note = models.TextField(verbose_name="跟进内容") <NEW_LINE> dat... | 客户跟进记录表
客户id|销售id|跟进内容|跟进日期 | 62598f7616aa5153ce3ffdf0 |
class TestLineType(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 testLineType(self): <NEW_LINE> <INDENT> pass | LineType unit test stubs | 62598f7676d4e153a661c507 |
class IdentifyTerrainMassings(BaseTemplateRule): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.analysis_rule_obj_dict_list = [] <NEW_LINE> <DEDENT> @property <NEW_LINE> def for_topo_type(self): <NEW_LINE> <INDENT> return py3dmodel.fetch.get_topotype("shell") <NEW_LINE> <DEDENT> def get_analysis_rule_... | An implementation of the BaseTemplateRule class for identifying the massing of terrains (LOD1). | 62598f7696565a6dacd2cbf4 |
class GroupUpdateForm(GroupCreateForm): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(GroupUpdateForm, self).__init__(*args, **kwargs) <NEW_LINE> self.helper.form_action = reverse('group_edit', kwargs={'pk': kwargs['instance'].id}) <NEW_LINE> self.fields['leader'].widget.attrs = {} ... | View for updating group info. | 62598f76a4f1c619b294dedd |
class Container(Generic[T]): <NEW_LINE> <INDENT> def add(self, item: T) -> None: <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def remove(self) -> T: <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def is_empty(self) -> bool: <NEW_LINE> <INDENT> raise NotImplementedError | A container that holds objects.
This is an abstract class. Only child classes should be instantiated. | 62598f768e05c05ec3f6eabf |
class TemplateSerializer(DocumentSerializer): <NEW_LINE> <INDENT> dependencies_dict = CharField(write_only=True, required=False) <NEW_LINE> class Meta(object): <NEW_LINE> <INDENT> model = Template <NEW_LINE> fields = [ "id", "user", "filename", "content", "hash", "dependencies", "dependencies_dict", ] <NEW_LINE> read_o... | Template serializer | 62598f7666656f66f7d59ce4 |
class EventConsumerLoopError(MessageBrokerError): <NEW_LINE> <INDENT> error_msg = "The event_consumer failed to run properly due to an exception occurring" | An exception appeared in the running event_consumer loop running the workers | 62598f764d74a7450cd58b4f |
class Streamer: <NEW_LINE> <INDENT> def __init__(self, name, url, img_rate, resol): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.url = url.strip() <NEW_LINE> self.img_rate = img_rate <NEW_LINE> self.resolution = resol <NEW_LINE> self.resolution = resTextToTuple(self.resolution) <NEW_LINE> self.doResize = type(s... | The streamer uses ffmpeg to get imags from a video or a url
Here, each call to get_image will get the next frame in the given source | 62598f76c432627299fa28cb |
class ModelLine(ModelCurve,IDisposable): <NEW_LINE> <INDENT> def Dispose(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def getBoundingBox(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def ReleaseUnmanagedResources(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def setElementType(self,*args)... | Represents a ModelLine within Autodesk Revit. | 62598f7676d4e153a661c508 |
class BackgroundAugmenter(object): <NEW_LINE> <INDENT> def __init__(self, augseq, queue_source, nb_workers, queue_size=50, threaded=False): <NEW_LINE> <INDENT> assert 0 < queue_size <= 10000 <NEW_LINE> self.augseq = augseq <NEW_LINE> self.queue_source = queue_source <NEW_LINE> self.queue_result = multiprocessing.Queue(... | Class to augment batches in the background (while training on
the GPU). | 62598f76e76e3b2f99fd8324 |
class TestState(unittest.TestCase): <NEW_LINE> <INDENT> def test_valid_names(self): <NEW_LINE> <INDENT> valid_names = [ "get_number_of_packs", "get_number_of_players", "get_player_chips", "get_player_names", "get_player_bets", "get_player_action", "start_game", ] <NEW_LINE> for name in valid_names: <NEW_LINE> <INDENT> ... | A class which defines the various tests of the State class. | 62598f767c178a314d78cd9a |
class GooglePrivacyDlpV2Row(_messages.Message): <NEW_LINE> <INDENT> values = _messages.MessageField('GooglePrivacyDlpV2Value', 1, repeated=True) | A GooglePrivacyDlpV2Row object.
Fields:
values: A GooglePrivacyDlpV2Value attribute. | 62598f76d53ae8145f917d89 |
class TestConfigRequest: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def test_init(): <NEW_LINE> <INDENT> data = get_fixture('config_init_request') <NEW_LINE> req = ConfigRequest(data) <NEW_LINE> assert req.config_data_raw == data['configurationData'] <NEW_LINE> assert req.lifecycle == LIFECYCLE_CONFIG <NEW_LINE> asse... | Tests for the ConfigRequest class. | 62598f76d10714528d69d7c1 |
class CreateGroupInputSet(InputSet): <NEW_LINE> <INDENT> def set_Email(self, value): <NEW_LINE> <INDENT> super(CreateGroupInputSet, self)._set_input('Email', value) <NEW_LINE> <DEDENT> def set_GroupName(self, value): <NEW_LINE> <INDENT> super(CreateGroupInputSet, self)._set_input('GroupName', value) <NEW_LINE> <DEDENT>... | An InputSet with methods appropriate for specifying the inputs to the CreateGroup
Choreo. The InputSet object is used to specify input parameters when executing this Choreo. | 62598f761f5feb6acb16252a |
class Notifo: <NEW_LINE> <INDENT> apiusername = -1 <NEW_LINE> apikey = -1 <NEW_LINE> __apiroot = "api.notifo.com" <NEW_LINE> __apiver = "v1" <NEW_LINE> __api_subscribe_user = "subscribe_user" <NEW_LINE> __api_send_notification = "send_notification" <NEW_LINE> def __init__(self, user = -1, ak = -1): <NEW_LINE> <INDENT> ... | This class implements an interface to the Notifo public webservice.
See https://api.notifo.com/ for information on this service.
Keyword variables:
apiusername -- Defaults to -1. Must be set to the username of the Notifo user.
apikey -- Defaults to -1. Must be set to the API key of the Notifo user.
Author: James Sum... | 62598f76ec188e330fdf8194 |
class Relacion(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'Relacion' <NEW_LINE> itemOrigenId = db.Column(db.Integer, db.ForeignKey('Item.idItem'), primary_key=True) <NEW_LINE> itemDestinoId = db.Column(db.Integer, db.ForeignKey('Item.idItem'), primary_key=True) <NEW_LINE> tipoDeRelacion = db.Column(db.String(20), n... | Modelo de Relacion | 62598f765e10d32532ce3567 |
class PituitaryAdenomaCls(): <NEW_LINE> <INDENT> def __init__(self, index_path, split): <NEW_LINE> <INDENT> self.root = os.path.dirname(index_path) <NEW_LINE> self.split = split + '_patient' <NEW_LINE> self.examples = np.load(index_path, allow_pickle=True)[self.split] <NEW_LINE> self.is_train = True if split == 'train'... | Dataset for pituitary adenoma classification (2D)
Args:
index_path: str, path to file
split: str, 'train' or 'val' | 62598f7650485f2cf55da862 |
class Out_lan_smokeenc_bin(gst.Bin): <NEW_LINE> <INDENT> def __init__(self, ip): <NEW_LINE> <INDENT> gst.Bin.__init__(self) <NEW_LINE> self.set_name('out_lan_smokeenc_bin') <NEW_LINE> queue = gst.element_factory_make('queue', "queue") <NEW_LINE> queue.set_property("max-size-buffers", 1000) <NEW_LINE> queue.set_property... | Volcado de video a la red lan.
queue ! ffmpegcolorspace ! smokeenc ! udpsink host=192.168.1.1 port=5000 | 62598f761f037a2d8b9e39e1 |
class DAOObjectFactory(object): <NEW_LINE> <INDENT> _unique_int_counter = count(100000) <NEW_LINE> def get_unique_integer(self): <NEW_LINE> <INDENT> return DAOObjectFactory._unique_int_counter.next() <NEW_LINE> <DEDENT> def get_unique_unicode(self): <NEW_LINE> <INDENT> return u'unique-string-%d' % self.get_unique_integ... | An anonymous object factory that creates DAO objects. | 62598f76be8e80087fbbe954 |
class UnityTennisEnv: <NEW_LINE> <INDENT> def __init__(self, file_name='Tennis_Linux/Tennis.x86_64', no_graphics=True, normalize=False, remove_ball_velocity=True): <NEW_LINE> <INDENT> self.normalize = normalize <NEW_LINE> self.remove_ball_velocity = remove_ball_velocity <NEW_LINE> self.env = UnityEnvironment(file_name=... | Unity Environment Wrapper
| 62598f7616aa5153ce3ffdf2 |
class NeuralLinearTB(NeuralLinear): <NEW_LINE> <INDENT> def __init__(self, data, out_features=10, **kwargs): <NEW_LINE> <INDENT> super().__init__(data, linear=FullBayesianRegressionDense, out_features=out_features, **kwargs) <NEW_LINE> <DEDENT> def _compute_log_likelihood(self, y, y_pred): <NEW_LINE> <INDENT> pred_mean... | Neural Linear model (as above) but with hyper-priors on distribution of fnial layer
:param data: (Object) Data for model to trained / evaluated on
:param out_features: (int) Dimensionality of model targets
:param kwargs: (dict) Optional additional parameters for model | 62598f7663f4b57ef00859e9 |
class ex1(Substitution): <NEW_LINE> <INDENT> ArgInfo = makeArgInfo( arg1 = Simple('Argument 1 description', str), arg2 = Simple('Argument 2 description', int)) <NEW_LINE> TemplateFile = 'ex1.template' <NEW_LINE> Arguments = ['arg1', 'arg2'] | This is a simple template wrapper with no defaults | 62598f760fa83653e46f47e4 |
class DBColumnNotFoundException(DBException): <NEW_LINE> <INDENT> pass | Exception DBColumnNotFoundException.
| 62598f76dc8b845886d52ea8 |
class NMEAParser(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def validate(self,sentence): <NEW_LINE> <INDENT> if len(sentence) > 82: <NEW_LINE> <INDENT> return "" <NEW_LINE> <DEDENT> if sentence[0] != '$': <NEW_LINE> <INDENT> return "" <NEW_LINE> <DEDENT> sentence = sen... | NMEA Serial String Parser Object
NMEA-0183
Under the NMEA-0183 standard, all characters used are printable
ASCII text (plus carriage return and line feed). NMEA-0183 data
is sent at 4800 baud.
The data is transmitted in the form of "sentences". Each
sentence starts with a "$", a two letter "talker ID", a three
let... | 62598f7673bcbd0ca4bc9b43 |
class FapwsServer(ServerAdapter): <NEW_LINE> <INDENT> def run(self, handler): <NEW_LINE> <INDENT> import fapws._evwsgi as evwsgi <NEW_LINE> from fapws import base, config <NEW_LINE> port = self.port <NEW_LINE> if float(config.SERVER_IDENT[-2:]) > 0.4: <NEW_LINE> <INDENT> port = str(port) <NEW_LINE> <DEDENT> evwsgi.star... | Extremely fast webserver using libev. See http://www.fapws.org/ | 62598f7626238365f5fac468 |
class ApiHandler(tornado.web.RequestHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> pass | Empty handler. | 62598f76507cdc57c63a467f |
class _ControllerMiddleware(_Middleware): <NEW_LINE> <INDENT> def __init__(self, game_server=None): <NEW_LINE> <INDENT> _Middleware.__init__(self, game_server) <NEW_LINE> <DEDENT> def event_execute(self, cuuid, euuid, event_data): <NEW_LINE> <INDENT> if event_data == "KEYDOWN:down": <NEW_LINE> <INDENT> self.game_server... | This middleware will allow you to use the NeteriaServer as a basic
controller. When it receives KEYDOWN/KEYUP events, it will set the
corresponding dictionary key in "network_events" to true or false. In your
main game loop, you can then iterate through this dictionary and change
the game accordingly. | 62598f7623e79379d538bdee |
@MrtRecord.register_type(MrtRecord.TYPE_OSPFv2) <NEW_LINE> class Ospf2MrtRecord(MrtCommonRecord): <NEW_LINE> <INDENT> MESSAGE_CLS = Ospf2MrtMessage <NEW_LINE> def __init__(self, message, timestamp=None, type_=None, subtype=0, length=None): <NEW_LINE> <INDENT> super(Ospf2MrtRecord, self).__init__( message=message, times... | MRT Record for the OSPFv2 Type. | 62598f7615baa72349461874 |
class HyperbolicPolicy(Policy): <NEW_LINE> <INDENT> def compare(self, e1, e2, now): <NEW_LINE> <INDENT> e1_duration = max(0, (now - e1.value.insertion_time) / kMicrosInSecond) * float( e1.value.value_size ) <NEW_LINE> e2_duration = max(0, (now - e2.value.insertion_time) / kMicrosInSecond) * float( e2.value.value_size )... | An implementation of Hyperbolic caching.
Aaron Blankstein, Siddhartha Sen, and Michael J. Freedman. 2017.
Hyperbolic caching: flexible caching for web applications. In Proceedings
of the 2017 USENIX Conference on Usenix Annual Technical Conference
(USENIX ATC '17). USENIX Association, Berkeley, CA, USA, 499-511. | 62598f767c178a314d78cd9c |
class UpdateProfileResult(ProfileResult): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> super(UpdateProfileResult, self).__init__(data) <NEW_LINE> if self.root.tag == 'updateCustomerPaymentProfileResponse': <NEW_LINE> <INDENT> self.validation = None <NEW_LINE> validation = self.root.find('valid... | Represent a profile update result as an object. | 62598f76b830903b9686e0ed |
class AttrDict(object): <NEW_LINE> <INDENT> def __init__(self, mapping={}): <NEW_LINE> <INDENT> super().__setattr__('data', dict(mapping)) <NEW_LINE> <DEDENT> def __setattr__(self, attr, value): <NEW_LINE> <INDENT> self.data[attr] = value <NEW_LINE> <DEDENT> def __getattr__(self, attr): <NEW_LINE> <INDENT> if hasattr(s... | This class supports both . and [] operators.
Use . in most cases and only use [] when fetching data in large batch. | 62598f76e76e3b2f99fd8326 |
class MultiDDS(Accu): <NEW_LINE> <INDENT> def __init__(self, n, fwidth, xwidth, **kwargs): <NEW_LINE> <INDENT> self.i = [Record([ ("f", fwidth), ("p", xwidth), ("a", xwidth - 1), ("clr", 1)]) for i in range(n)] <NEW_LINE> self.o = Record(complex(xwidth), reset_less=True) <NEW_LINE> self.stb = Signal() <NEW_LINE> self.v... | Time division multiplexed oscillator.
Uses one CosSinGen and one (complex-real) multiplier.
Latencies are unmatched between parameters
and channels. Saturating summation. | 62598f764e696a045264da79 |
class PublishCommand(Command): <NEW_LINE> <INDENT> description = "copy distributable to Chevah cache folder" <NEW_LINE> user_options = [] <NEW_LINE> def initialize_options(self): <NEW_LINE> <INDENT> self.cwd = None <NEW_LINE> self.destination_base = '~/chevah/brink/cache/pypi/' <NEW_LINE> <DEDENT> def finalize_options(... | Publish the source distribution to local pypi cache and remote
Chevah PyPi server. | 62598f7666673b3332c2fcb7 |
class ProviderTitleSearchViewSet(HaystackViewSet): <NEW_LINE> <INDENT> index_models = [ProviderTitle] <NEW_LINE> serializer_class = ProviderTitleSearchSerializer <NEW_LINE> permission_classes = (permissions.IsAuthenticated, IsAdminOrEmployee) | Handles search feature for :model:`core.ProviderTitle`
Provider titles can be search by `name`.
Sample Call:
---
`GET /api/provider_titles/search/?q=<query-here>`
Sample Response:
---
[
...
{
"id": "78d5472b-32d4-4b15-8dd1-f14a65070da4",
"name": "Provider Title ... | 62598f76a8ecb03325870afe |
class CryptoOperationType(enum.Enum): <NEW_LINE> <INDENT> address = "address" <NEW_LINE> create_address = "create_address" <NEW_LINE> withdraw = "withdraw" <NEW_LINE> deposit = "deposit" <NEW_LINE> create_token = "create_token" <NEW_LINE> import_token = "import_token" <NEW_LINE> transaction = "transaction" | What different operations we support. | 62598f76d164cc617582086b |
class RectangleColliderPicker(object): <NEW_LINE> <INDENT> SMALL = 10 <NEW_LINE> MEDIUM = 100 <NEW_LINE> @staticmethod <NEW_LINE> def get_recommended_collider(size,number_of_rectangles): <NEW_LINE> <INDENT> (width,height) = size <NEW_LINE> if (number_of_rectangles<=RectangleColliderPicker.SMALL): <NEW_LINE> <INDENT> re... | This class helps the application to choose an appropriate rectangle collider | 62598f761d351010ab8f3434 |
class ExerciseImageEditView(WgerFormMixin, UpdateView, WgerPermissionMixin): <NEW_LINE> <INDENT> model = ExerciseImage <NEW_LINE> title = ugettext_lazy('Edit exercise image') <NEW_LINE> permission_required = 'exercises.change_exerciseimage' <NEW_LINE> form_class = ExerciseImageForm <NEW_LINE> def get_success_url(self):... | Generic view to update an existing exercise image | 62598f76d99f1b3c44d04fa2 |
class Chain(DynamicSelection): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> @property <NEW_LINE> def atomsel(self): <NEW_LINE> <INDENT> if self._atomsel is None: <NEW_LINE> <INDENT> self._atomsel = _atomsel('chain "%s"' % self.name, frame=self._frame, molid=self._molecule.molid) <NEW_LINE> <DEDENT> return self._atomse... | Chain representation.
This class is a proxy to a chain in molecule loaded into VMD.
The chain is identified by 'chain' value from VMD. | 62598f76cad5886f8bdc4c18 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.