code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class RelationMapper(BaseDjangoFieldMapper): <NEW_LINE> <INDENT> def __init__(self, django_model_mapper): <NEW_LINE> <INDENT> self.django_model_mapper = django_model_mapper <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def is_field_nullable(field, **kwargs): <NEW_LINE> <INDENT> optional_relations = kwargs.get('optional_... | Mapper for relation fields (ForeignKey, OneToOneField). | 62598eefa17c0f6771d5aa0b |
class HorizontalBarPitchSpaceOffset(HorizontalBar): <NEW_LINE> <INDENT> def __init__(self, streamObj=None, *args, **keywords): <NEW_LINE> <INDENT> super().__init__(streamObj, *args, **keywords) <NEW_LINE> if 'figureSize' not in keywords: <NEW_LINE> <INDENT> self.figureSize = (10, 6) <NEW_LINE> <DEDENT> if 'title' not i... | A graph of events, sorted by pitch space, over time
>>> s = corpus.parse('bach/bwv324.xml') #_DOCS_HIDE
>>> p = graph.plot.HorizontalBarPitchSpaceOffset(s, doneAction=None) #_DOCS_HIDE
>>> #_DOCS_SHOW s = corpus.parse('bach/bwv57.8')
>>> #_DOCS_SHOW p = graph.plot.HorizontalBarPitchSpaceOffset(s)
>>> p.run() # with ... | 62598eef66656f66f7d58b99 |
class Solution: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.nums = [] <NEW_LINE> self.sorted_nums = [] <NEW_LINE> self.odd = False <NEW_LINE> self.mindex = 0 <NEW_LINE> self.medians = [] <NEW_LINE> <DEDENT> def slide(self, drop, pick): <NEW_LINE> <INDENT> self.nums.remove(drop) <NEW_LINE> bisect.in... | 1,5,2,9,3,0
1,5,2, 9, 3,0 | 62598eef30bbd722464683ec |
class AuthenticationCodeType(Object): <NEW_LINE> <INDENT> ID = "authenticationCodeType" <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read(q: dict, *args) -> "AuthenticationCodeTypeTelegramMessage or AuthenticationCodeTypeFlashCall or AuthenticationCo... | Provides information about the method by which an authentication code is delivered to the user
No parameters required. | 62598eef4c34283577618a9b |
class CacheByInstancePersistentUniformModel(PersistentUniformModel): <NEW_LINE> <INDENT> @method_cache(by="instance", method="run") <NEW_LINE> def produce_number(self) -> float: <NEW_LINE> <INDENT> return self._x | TODO | 62598eef2c8b7c6e89bd1f79 |
class FastQAPyTorchModelModule(PyTorchModelModule): <NEW_LINE> <INDENT> _input_ports = [XQAPorts.emb_question, XQAPorts.question_length, XQAPorts.emb_support, XQAPorts.support_length, XQAPorts.word_chars, XQAPorts.word_char_length, XQAPorts.question_batch_words, XQAPorts.support_batch_words, XQAPorts.word_in_question, ... | PyTorch implementation of FastQA. | 62598eefd58c6744b42db691 |
class TbExercisepreferrecords(models.Model): <NEW_LINE> <INDENT> exercisepreferenceid = models.AutoField(primary_key=True) <NEW_LINE> exercisetype = models.CharField(max_length=20, blank=True) <NEW_LINE> exercisename = models.CharField(max_length=20, blank=True) <NEW_LINE> exercisedescribe = models.CharField(max_length... | 运动偏好记录表 | 62598eef8da39b475be01964 |
class ProductUnitSerializer(serializers.Serializer): <NEW_LINE> <INDENT> name = serializers.CharField(required=True, max_length=50) <NEW_LINE> value = serializers.DecimalField(max_digits=10, decimal_places=3, required=True) <NEW_LINE> discount = serializers.DecimalField(max_digits=10, decimal_places=3, required=False) ... | A serializer to additional units. | 62598eef21bff66bcd72140d |
class Type(object): <NEW_LINE> <INDENT> def load(self,filename=None): <NEW_LINE> <INDENT> pass | An abstract class representing a type of binary asset that can be loaded. | 62598eefcc0a2c11144797bd |
class IPAddress: <NEW_LINE> <INDENT> def __set__(self, instance, value): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> if value == str(ipaddress.ip_address(value)): <NEW_LINE> <INDENT> instance.__dict__[self.name] = value <NEW_LINE> <DEDENT> <DEDENT> except ValueError: <NEW_LINE> <INDENT> server_log.critical(f'{value} н... | The descriptor for the IP address: Validating the IP address | 62598eef851cf427c66b6a7e |
class BattleEditRefForm(wtforms.Form): <NEW_LINE> <INDENT> ref = asb.forms.TrainerField() <NEW_LINE> current = wtforms.BooleanField() <NEW_LINE> emergency = wtforms.BooleanField() <NEW_LINE> def validate_ref(form, field): <NEW_LINE> <INDENT> if field.data and field.trainer is None: <NEW_LINE> <INDENT> raise wtforms.val... | A single row for a ref in a BattleEditForm. | 62598eeff548e778e5969d43 |
class MapMdDialogTest(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/MapMd/icon.png' <NEW_LINE> icon = QIcon(path) <NEW_LINE> self.assert... | Test rerources work. | 62598eef9c8ee8231303f536 |
class InlineResponse2007Embedded(object): <NEW_LINE> <INDENT> openapi_types = { 'endpoint_list': 'list[InlineResponse2007EmbeddedEndpointList]' } <NEW_LINE> attribute_map = { 'endpoint_list': 'endpointList' } <NEW_LINE> def __init__(self, endpoint_list=None, local_vars_configuration=None): <NEW_LINE> <INDENT> if local_... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually. | 62598eef32920d7e50bc47e5 |
class IPATCH(IAPIRequest): <NEW_LINE> <INDENT> pass | Patch method
| 62598eef3346ee7daa336a43 |
class LikePostView(LoginRequiredMixin, JSONResponseMixin, AjaxResponseMixin, TemplateView): <NEW_LINE> <INDENT> login_url = reverse_lazy('login') <NEW_LINE> def get_ajax(self, request, *args, **kwargs): <NEW_LINE> <INDENT> post = Post.objects.get(pk=kwargs.get('pk')) <NEW_LINE> print('get_ajax', post.id, ' USer : ', re... | When Like button clicked, one request sent and like counter should one pluse and then return total count of Likes,
May be it's not true but i'll try it . | 62598eef460517430c430c40 |
class Xsd11Group(XsdGroup): <NEW_LINE> <INDENT> pass | A class for XSD 'group', 'choice', 'sequence' definitions and
XSD 1.1 'all' definitions.
<all
id = ID
maxOccurs = (0 | 1) : 1
minOccurs = (0 | 1) : 1
{any attributes with non-schema namespace . . .}>
Content: (annotation?, (element | any | group)*)
</all> | 62598eefcb5e8a47e493b555 |
class UserFindPass(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'user_find_pass' <NEW_LINE> id = db.Column(db.Integer, primary_key=True, autoincrement=True) <NEW_LINE> email = db.Column(db.String(100)) <NEW_LINE> verifycode = db.Column(db.String(128), unique=True) <NEW_LINE> password = db.Column(db.String(64)) <NEW_L... | 邮件找回密码表 | 62598eef3539df3088ecaa6b |
class FilerTeaserPlugin(CMSPluginBase): <NEW_LINE> <INDENT> module = 'Filer' <NEW_LINE> model = models.FilerTeaser <NEW_LINE> name = _("Teaser") <NEW_LINE> render_template = "cmsplugin_filer_teaser/teaser.html" <NEW_LINE> def _get_thumbnail_options(self, context, instance): <NEW_LINE> <INDENT> width, height = None, Non... | TODO: this plugin is becoming very similar to the image plugin... code
should be re-used somehow. | 62598eef91f36d47f2230280 |
class UnionType(ProperType): <NEW_LINE> <INDENT> __slots__ = ('items',) <NEW_LINE> def __init__(self, items: Sequence[Type], line: int = -1, column: int = -1) -> None: <NEW_LINE> <INDENT> super().__init__(line, column) <NEW_LINE> self.items = flatten_nested_unions(items) <NEW_LINE> self.can_be_true = any(item.can_be_tr... | The union type Union[T1, ..., Tn] (at least one type argument). | 62598eef442bda511e95ac1b |
class Sortable(models.Model): <NEW_LINE> <INDENT> order = models.PositiveIntegerField(editable=False, default=1, db_index=True) <NEW_LINE> is_sortable = False <NEW_LINE> sorting_filters = () <NEW_LINE> sortable_by = None <NEW_LINE> class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> ordering = ['order'] <NEW_LIN... | `is_sortable` determines whether or not the Model is sortable by
determining if the last value of `order` is greater than the default
of 1, which should be present if there is only one object.
`model_type_id` returns the ContentType.id for the Model that
inherits Sortable
`save` the override of save increments the la... | 62598eefa8370b77170eeb9d |
class RegistrationForm(FlaskForm): <NEW_LINE> <INDENT> name = StringField("Name", validators=[DataRequired()]) <NEW_LINE> last_name = StringField("Last Name") <NEW_LINE> email = StringField("Email", validators=[DataRequired(), Email()]) <NEW_LINE> password = PasswordField("Password", validators=[DataRequired(), EqualTo... | Form for registering | 62598eef379a373c97d977af |
class SelectableSerializerMixin(serializers.Serializer): <NEW_LINE> <INDENT> label = serializers.SerializerMethodField() <NEW_LINE> value = serializers.SerializerMethodField() <NEW_LINE> mixin_fields = ['label', 'value'] <NEW_LINE> def get_label(self, obj): <NEW_LINE> <INDENT> return str(obj) <NEW_LINE> <DEDENT> def ge... | Mixin que le agrega campos label y value para ser usado en vaadin-combobox. | 62598eefa17c0f6771d5aa0d |
class TwitterDownloaderMiddleware(object): <NEW_LINE> <INDENT> def __init__(self, consumer_key: str, consumer_secret: str, access_token_key: str, access_token_secret: str) -> None: <NEW_LINE> <INDENT> self.auth = tweepy.OAuthHandler(consumer_key, consumer_secret) <NEW_LINE> self.auth.secure = True <NEW_LINE> self.auth.... | Middleware for Twitter requests | 62598eef7d847024c075ab87 |
@tf_export(v1=["ragged.RaggedTensorValue"]) <NEW_LINE> class RaggedTensorValue(object): <NEW_LINE> <INDENT> def __init__(self, values, row_splits): <NEW_LINE> <INDENT> if not (isinstance(row_splits, (np.ndarray, np.generic)) and row_splits.dtype == np.int64 and row_splits.ndim == 1): <NEW_LINE> <INDENT> raise TypeError... | Represents the value of a `RaggedTensor`.
Warning: `RaggedTensorValue` should only be used in graph mode; in
eager mode, the `tf.RaggedTensor` class contains its value directly.
See `tf.RaggedTensor` for a description of ragged tensors. | 62598eef097d151d1a2bf7d7 |
class SaveAsBookmarDialog(QtGui.QDialog): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(SaveAsBookmarDialog, self).__init__(*args, **kwargs) <NEW_LINE> self.initUI() <NEW_LINE> <DEDENT> def initUI(self): <NEW_LINE> <INDENT> self.uiNameEdit = QtGui.QLineEdit(self) <NEW_LINE> self.uiI... | The bookmark "Save As" dialog | 62598eef5fc7496912d4764e |
class Riposte(Maneuver): <NEW_LINE> <INDENT> name = "Riposte" | When a creature misses you with a melee attack, you can use your reaction
and expend one superiority die to make a melee weapon attack against the
creature. If you hit, you add the superiority die to the attack's damage
roll | 62598eef99cbb53fe682f667 |
class AwsCloudEnvironment(CloudEnvironment): <NEW_LINE> <INDENT> def get_environment_config(self): <NEW_LINE> <INDENT> parser = ConfigParser() <NEW_LINE> parser.read(self.config_path) <NEW_LINE> ansible_vars = dict( resource_prefix=self.resource_prefix, ) <NEW_LINE> ansible_vars.update(dict(parser.items('default'))) <N... | AWS cloud environment plugin. Updates integration test environment after delegation. | 62598eef5fcc89381b265504 |
class InIncludeDirsRule(object): <NEW_LINE> <INDENT> def __init__(self, include_dirs, exclude_dirs, source_files): <NEW_LINE> <INDENT> self.include_dirs = [os.path.abspath(x) for x in include_dirs] <NEW_LINE> self.source_files = [os.path.abspath(x) for x in source_files] <NEW_LINE> self.exclude_dirs = [os.path.abspath(... | Rule to block visiting and recursion outside include dirs. | 62598eef4527f215b58e86b8 |
class CreateLoadBalancer(neutronV20.CreateCommand): <NEW_LINE> <INDENT> resource = 'loadbalancer' <NEW_LINE> def add_known_arguments(self, parser): <NEW_LINE> <INDENT> _add_common_args(parser) <NEW_LINE> parser.add_argument( '--admin-state-down', dest='admin_state', action='store_false', help=_('Set admin state up to f... | LBaaS v2 Create a loadbalancer. | 62598eeff548e778e5969d45 |
class MatchType(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=10,unique=True) <NEW_LINE> description = models.TextField(null=True) <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return self.name | Table that lists names of match and base types | 62598eef956e5f7376df4a55 |
class MovieDetailViewAPI(generics.RetrieveAPIView): <NEW_LINE> <INDENT> queryset = Movie.objects.filter(draft=False) <NEW_LINE> serializer_class = MovieDetailSerializer | Полная информация по фильму | 62598eef60cbc95b06362af9 |
class ExtjsExtractor(Extractor): <NEW_LINE> <INDENT> extensions = ['.js'] <NEW_LINE> def __call__(self, filename, options, fileobj=None, lineno=0): <NEW_LINE> <INDENT> factories = list() <NEW_LINE> trim = lambda x: x[1:-1] <NEW_LINE> with open(filename, 'r+') as f: <NEW_LINE> <INDENT> data = f.read() <NEW_LINE> <DEDENT... | Extjs sources | 62598eef091ae356687033d2 |
class CloudFilesConnection(OpenStackBaseConnection): <NEW_LINE> <INDENT> responseCls = CloudFilesResponse <NEW_LINE> rawResponseCls = CloudFilesRawResponse <NEW_LINE> def __init__(self, user_id, key, secure=True, auth_url=AUTH_URL_US, **kwargs): <NEW_LINE> <INDENT> super(CloudFilesConnection, self).__init__(user_id, ke... | Base connection class for the Cloudfiles driver. | 62598eef2c8b7c6e89bd1f7c |
class Solution: <NEW_LINE> <INDENT> def largestNumber(self, nums) -> str: <NEW_LINE> <INDENT> self.nums = nums <NEW_LINE> pt = 0 <NEW_LINE> pi = len(nums)-1 <NEW_LINE> self.QS(pt,pi) <NEW_LINE> ans = list(map(str,nums)) <NEW_LINE> if ans[0]=="0": <NEW_LINE> <INDENT> return "0" <NEW_LINE> <DEDENT> return ''.join(ans) <N... | 179번
https://leetcode.com/problems/largest-number/submissions/ | 62598eefaad79263cf42cfc7 |
class Tile: <NEW_LINE> <INDENT> def __init__(self, occupied_with=0, kind=None): <NEW_LINE> <INDENT> self.occupied_with = occupied_with <NEW_LINE> self.kind = kind <NEW_LINE> return | Board tile:
The board tile, unlike the gamePiece, does not represent the pieces of the game.
Instead, it is simply just a container representing the spaces on the board. This is
necessary for now since we need to know what coordiantes of the special squares.
occupiedWith: the player number of the piece that the boar... | 62598eef8e7ae83300ee784a |
class cSocketInfoStorage(cMonitorInfoStorage): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> cMonitorInfoStorage.__init__(self, 'hash',name) <NEW_LINE> self.data = {} <NEW_LINE> <DEDENT> def calcIndx(self, info): <NEW_LINE> <INDENT> sockAtt = str(info['srcIp'])+str(info['srcPort'])+str(info['dstIp']... | classdocs | 62598eefbaa26c4b54d4da87 |
class PI(AcquisitionFunctionBaseClass): <NEW_LINE> <INDENT> def __init__(self, epsilon: float, for_minimization: bool = False): <NEW_LINE> <INDENT> super(PI, self).__init__() <NEW_LINE> self.epsilon = epsilon <NEW_LINE> self.for_minimization = for_minimization <NEW_LINE> logger.debug("PI Acquisition Function Initialize... | Probability of Improvement acquisition function. | 62598eef236d856c2adc87f3 |
class Meta(DatabaseExecutorPlugin.Meta): <NEW_LINE> <INDENT> content_type = 'application/x-sqlite3' <NEW_LINE> extension = [ 'db', 'sqlite' ] <NEW_LINE> scheme = [ 'apsw', 'sqlite' ] | APSW executor metadata. | 62598eef85dfad0860cbee44 |
class shr(SPUExt): <NEW_LINE> <INDENT> def block(self, d, a, b): <NEW_LINE> <INDENT> code = self.get_active_code() <NEW_LINE> temp = code.prgm.acquire_register() <NEW_LINE> spu.sfi(temp, b, 0) <NEW_LINE> spu.rotm(d, a, temp) <NEW_LINE> code.prgm.release_register(temp) <NEW_LINE> return | Shift-right word.
Shift the value in register a to the right by the number of bits
specified by the value in register b. Store the result in register
d. | 62598eef16aa5153ce3fecba |
class Test1Spider(scrapy.Spider): <NEW_LINE> <INDENT> name = "test1" <NEW_LINE> allowed_domains = ["tencent.com"] <NEW_LINE> url = "http://hr.tencent.com/position.php?&start=" <NEW_LINE> offset = 0 <NEW_LINE> start_urls = [url + str(offset)] <NEW_LINE> def parse(self, response): <NEW_LINE> <INDENT> print('1---1-----1--... | 功能:爬取腾讯社招信息 | 62598eef7b25080760ed5c55 |
class Content: <NEW_LINE> <INDENT> def __init__(self, html_page): <NEW_LINE> <INDENT> self._soup = BeautifulSoup(html_page) | Basic class used to act as an interface for the web pages
retrived from the Derytelecom extranet. It should be subclassed
instead of being used directly. | 62598eefa219f33f346c4ff7 |
class Process(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> raise RuntimeError('This class should not be instantiated.') <NEW_LINE> <DEDENT> checkProcess = None | Process class | 62598eef379a373c97d977b1 |
class MetaFH(FH): <NEW_LINE> <INDENT> def __init__(self, fh, record, path, record_buf): <NEW_LINE> <INDENT> super(MetaFH, self).__init__(fh, record) <NEW_LINE> self._path = path <NEW_LINE> self._record_buf = record_buf <NEW_LINE> <DEDENT> def get_data(self): <NEW_LINE> <INDENT> return get_meta_for_file(self._record, se... | A class used to represent a virtual file containing metadata
for a regular file. | 62598eef63d6d428bbee0f88 |
class billowConfig(object): <NEW_LINE> <INDENT> blockdevmap = { 'c1.medium': 1, 'c1.xlarge': 1, 'c3.2xlarge': 2, 'c3.4xlarge': 2, 'c3.8xlarge': 2, 'c3.large': 2, 'c3.xlarge': 2, 'c4.2xlarge': 0, 'c4.4xlarge': 0, 'c4.8xlarge': 0, 'c4.large': 0, 'c4.xlarge': 0, 'cc2.8xlarge': 4, 'cg1.4xlarge': 2, 'cr1.8xlarge': 2, 'g2.2x... | Group Config
LaunchConfig on Amazon | 62598eef283ffb24f3cf206c |
class Node: <NEW_LINE> <INDENT> def __init__(self, item): <NEW_LINE> <INDENT> self.item = item <NEW_LINE> self.next = None <NEW_LINE> self.prev = None | Node for use with doubly-linked list | 62598eef1b99ca400228e8eb |
class GameSettingInline(admin.TabularInline): <NEW_LINE> <INDENT> model = GameSetting <NEW_LINE> fields = ['widget', 'enabled', ] <NEW_LINE> extra = 0 | PageSettingInline admin. | 62598eef4f88993c371ef8c6 |
class TestSearchResultOfGroupV2Card(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 testSearchResultOfGroupV2Card(self): <NEW_LINE> <INDENT> pass | SearchResultOfGroupV2Card unit test stubs | 62598eef167d2b6e312b5755 |
class VMStressBinding(VMStress): <NEW_LINE> <INDENT> def __init__(self, vm, params, stress_args=""): <NEW_LINE> <INDENT> super(VMStressBinding, self).__init__(vm, "stress", params, stress_args=stress_args) <NEW_LINE> self.install() <NEW_LINE> <DEDENT> def load_stress_tool(self, cpu_id): <NEW_LINE> <INDENT> cmd = "setsi... | Run stress tool on VMs, and bind the process to the specified cpu | 62598eef30dc7b766599e045 |
class Bullet(pygame.sprite.Sprite): <NEW_LINE> <INDENT> def __init__(self, x, y, speed, image_value): <NEW_LINE> <INDENT> pygame.sprite.Sprite.__init__(self) <NEW_LINE> if image_value: <NEW_LINE> <INDENT> self.image = pygame.Surface((5, 15)) <NEW_LINE> self.image.fill((255,255,255)) <NEW_LINE> self.image.convert() <NE... | This is the bullet class | 62598eefe5267d203ee6a0c3 |
class SWAN_ModuleConfigurationError(SWAN_DNS_Exception): <NEW_LINE> <INDENT> pass | An exception which indicates that a module configuration is invalid | 62598eef091ae356687033d4 |
class DescribeResourcesByTagsRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TagFilters = None <NEW_LINE> self.CreateUin = None <NEW_LINE> self.Offset = None <NEW_LINE> self.Limit = None <NEW_LINE> self.ResourcePrefix = None <NEW_LINE> self.ResourceId = None <NEW_LINE> self.Reso... | DescribeResourcesByTags request structure.
| 62598eefaad79263cf42cfc9 |
@as_declarative() <NEW_LINE> class ORMBase(object): <NEW_LINE> <INDENT> __table_args__ = dict(mysql_charset="utf8", ) <NEW_LINE> @declared_attr <NEW_LINE> def __tablename__(cls): <NEW_LINE> <INDENT> return "kanjian_{}".format(_camel_case_2_snake_case(cls.__name__)) | Reference:
https://github.com/zzzeek/sqlalchemy/blob/master/lib/sqlalchemy/ext/declarative/api.py#L336 | 62598eef8e7ae83300ee784c |
class CT_PPr(BaseOxmlElement): <NEW_LINE> <INDENT> __child_sequence__ = ( 'w:pStyle', 'w:keepNext', 'w:keepLines', 'w:pageBreakBefore', 'w:framePr', 'w:widowControl', 'w:numPr', 'w:suppressLineNumbers', 'w:pBdr', 'w:shd', 'w:tabs', 'w:suppressAutoHyphens', 'w:kinsoku', 'w:wordWrap', 'w:overflowPunct', 'w:topLinePunct',... | ``<w:pPr>`` element, containing the properties for a paragraph. | 62598eeffff4ab517ebcbf94 |
class PluginDetail(generics.RetrieveDestroyAPIView): <NEW_LINE> <INDENT> http_method_names = ['get', 'delete'] <NEW_LINE> serializer_class = PluginSerializer <NEW_LINE> queryset = Plugin.objects.all() <NEW_LINE> permission_classes = (IsObjMetaOwnerOrReadOnly,) <NEW_LINE> def perform_destroy(self, instance): <NEW_LINE> ... | A plugin view. | 62598eef7c178a314d78bc51 |
class ListBoxRow(Gtk.ListBoxRow): <NEW_LINE> <INDENT> def __init__(self, description=None, label='', marked=False): <NEW_LINE> <INDENT> Gtk.ListBoxRow.__init__(self) <NEW_LINE> self.label = label <NEW_LINE> self.description = description <NEW_LINE> self.marked = marked | Extended Gtk.ListBoxRow.
Include label, description and mark properties. | 62598eef3539df3088ecaa6f |
class ExpressRouteServiceProviderPaged(Paged): <NEW_LINE> <INDENT> _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, 'current_page': {'key': 'value', 'type': '[ExpressRouteServiceProvider]'} } <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(ExpressRouteServiceProviderPaged, s... | A paging container for iterating over a list of :class:`ExpressRouteServiceProvider <azure.mgmt.network.v2016_12_01.models.ExpressRouteServiceProvider>` object | 62598eefa8370b77170eeba1 |
class MultiNormal(): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> if type(data) is not np.ndarray: <NEW_LINE> <INDENT> raise TypeError("data must be a 2D numpy.ndarray") <NEW_LINE> <DEDENT> if len(data.shape) != 2: <NEW_LINE> <INDENT> raise TypeError("data must be a 2D numpy.ndarray") <NEW_LINE> <D... | MultiNormal Class | 62598eeff9cc0f698b1c46ad |
class AccountDialog(QDialog, Ui_AccountDialog): <NEW_LINE> <INDENT> def __init__(self, parent = None): <NEW_LINE> <INDENT> QDialog.__init__(self, parent) <NEW_LINE> self.setupUi(self) <NEW_LINE> self.refreshAccounts() <NEW_LINE> <DEDENT> @pyqtSignature("") <NEW_LINE> def on_pushButton_add_clicked(self): <NEW_LINE> <IND... | Class documentation goes here. | 62598eef63d6d428bbee0f8a |
class ResourceMapping(BASE): <NEW_LINE> <INDENT> __tablename__ = 'resource_mapping' <NEW_LINE> id = sql.Column(sql.Integer, primary_key=True) <NEW_LINE> resource_type = sql.Column(sql.String(60), nullable=False) <NEW_LINE> resource_id = sql.Column(sql.String(255), nullable=False) <NEW_LINE> resource_sp = sql.Column(sql... | The location of a particular resource. | 62598eef097d151d1a2bf7db |
@infer <NEW_LINE> class PairFirst(AbstractTemplate): <NEW_LINE> <INDENT> key = "pair_first" <NEW_LINE> def generic(self, args, kws): <NEW_LINE> <INDENT> assert not kws <NEW_LINE> [pair] = args <NEW_LINE> if isinstance(pair, types.Pair): <NEW_LINE> <INDENT> return signature(pair.first_type, pair) | Given a heterogeneous pair, return the first element. | 62598eef26068e7796d4b11a |
class inmueble(models.Model): <NEW_LINE> <INDENT> tipo = models.CharField(max_length=50) <NEW_LINE> subtipo = models.CharField(max_length=50) <NEW_LINE> gen = models.ForeignKey(general, on_delete = 'CASCADE') <NEW_LINE> inte = models.ForeignKey(interior, on_delete = 'CASCADE') <NEW_LINE> ext = models.ForeignKey(exterio... | Informacion completa del inmueble | 62598eef4f6381625f19889a |
class RealDictRow(dict): <NEW_LINE> <INDENT> __slots__ = ('_column_mapping',) <NEW_LINE> def __init__(self, cursor): <NEW_LINE> <INDENT> dict.__init__(self) <NEW_LINE> if cursor.description and not cursor.column_mapping: <NEW_LINE> <INDENT> cursor._build_index() <NEW_LINE> <DEDENT> self._column_mapping = cursor.column_... | A `!dict` subclass representing a data record. | 62598eef2c8b7c6e89bd1f7f |
class InstanceNorm(HybridBlock): <NEW_LINE> <INDENT> def __init__(self, in_channels, num_styles, batch_size, epsilon=1e-5, center=True, scale=True, beta_initializer='zeros', gamma_initializer='ones', **kwargs): <NEW_LINE> <INDENT> super(InstanceNorm, self).__init__(**kwargs) <NEW_LINE> self._kwargs = {'eps': epsilon} <... | Conditional Instance Norm | 62598eef4f88993c371ef8c7 |
class EntityExistsException(Exception): <NEW_LINE> <INDENT> def __init__(self, entity_id, table): <NEW_LINE> <INDENT> self.entity_id = entity_id <NEW_LINE> self.table = table <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return repr("Entity already exists in database (ID '{id}', table '{table}')".format(id... | Indicates the existence of an entity with same ID in the database. | 62598eefd486a94d0ba2a78a |
class NextHopResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': 'str'}, 'route_table_id': {'key': 'routeTableId', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, next_hop_type: ... | The information about next hop from the specified VM.
:param next_hop_type: Next hop type. Possible values include: "Internet", "VirtualAppliance",
"VirtualNetworkGateway", "VnetLocal", "HyperNetGateway", "None".
:type next_hop_type: str or ~azure.mgmt.network.v2020_06_01.models.NextHopType
:param next_hop_ip_address... | 62598eefb7558d5895461e03 |
class MakoTemplate(object): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> logging.info('Parsing template %s', path) <NEW_LINE> with open(path, 'rb') as fh: <NEW_LINE> <INDENT> self._string = fh.read() <NEW_LINE> <DEDENT> lookup = mako_lookup.TemplateLookup() <NEW_LINE> se... | An API to interact with a mako template file on disk. | 62598eef10dbd63aa1c6f335 |
class _DisregardYourWearingIt(object): <NEW_LINE> <INDENT> implements(iimaginary.IElectromagneticMedium) <NEW_LINE> def isOpaque(self): <NEW_LINE> <INDENT> return True | This is an annotation, produced by L{Wearer} for containment relationships
between people (who are containers) and the clothing that they're wearing.
A hopefully temporary workaround for the fact that clothing is rendered in
its own way and therefor shouldn't show up in the list of a person's
contents. | 62598eefe5267d203ee6a0c5 |
class FileBasedCacheTests(unittest.TestCase, BaseCacheTests): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.dirname = tempfile.mkdtemp() <NEW_LINE> self.cache = get_cache('file://%s' % self.dirname) <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> shutil.rmtree(self.dirname) <NEW_LINE> <DEDEN... | Specific test cases for the file-based cache. | 62598eefbe7bc26dc9251241 |
class AISystem(System): <NEW_LINE> <INDENT> def __init__(self, ai_table): <NEW_LINE> <INDENT> self.ai_table = ai_table <NEW_LINE> <DEDENT> def update(self, input_value): <NEW_LINE> <INDENT> ai_components = self.ai_table.all_components() <NEW_LINE> for c in ai_components: <NEW_LINE> <INDENT> c.receive(c.next_action(inpu... | System to decide actions of anything with intelligence | 62598eef3346ee7daa336a46 |
class FloodOperator(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "dynto.retopo" <NEW_LINE> bl_label = "Sculpt Dynto Flood" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> return context.active_object is not None <NEW_LINE> <DEDENT> def ... | dynto flood fill a sculpt | 62598eefbd1bec0571e144a9 |
class TacacsAuthorizationReply(Packet): <NEW_LINE> <INDENT> name = 'Tacacs Authorization Reply Body' <NEW_LINE> fields_desc = [ByteEnumField('status', 0, TACACSAUTHORSTATUS), FieldLenField('arg_cnt', None, fmt='!B', count_of='arg_len_list'), FieldLenField('server_msg_len', None, fmt='!H', length_of='server_msg'), Field... | Tacacs authorization reply body from section 5.2
https://tools.ietf.org/html/draft-ietf-opsawg-tacacs-06#section-5.2 | 62598eef85dfad0860cbee46 |
class CommandParser(object): <NEW_LINE> <INDENT> def parse(self, command_text, user=None, world=None): <NEW_LINE> <INDENT> if command_text.startswith("/"): <NEW_LINE> <INDENT> stripped = command_text[1:].strip() <NEW_LINE> for command_type in Command.__subclasses__(): <NEW_LINE> <INDENT> if not hasattr(command_type, "c... | Entry point for parsing and executing game commands. | 62598eefd268445f26638f6e |
class MyGuiApp(wx.App): <NEW_LINE> <INDENT> def OnInit(self): <NEW_LINE> <INDENT> self.MyHG = MyHelpGUI(None,"helper window") <NEW_LINE> self.MyHG.Show() <NEW_LINE> return True | master subclass | 62598eef91f36d47f2230283 |
class TestEINTRSysCall(BaseZMQTestCase): <NEW_LINE> <INDENT> signal_delay = 0.1 <NEW_LINE> timeout = 0.25 <NEW_LINE> timeout_ms = int(timeout * 1e3) <NEW_LINE> def alarm(self, t=None): <NEW_LINE> <INDENT> if not hasattr(signal, 'setitimer'): <NEW_LINE> <INDENT> raise SkipTest('EINTR tests require setitimer') <NEW_LINE>... | Base class for EINTR tests. | 62598eefa8370b77170eeba3 |
class HostSendSequencedData(EIEIOCommandMessage): <NEW_LINE> <INDENT> def __init__(self, region_id, sequence_no, eieio_data_message): <NEW_LINE> <INDENT> EIEIOCommandMessage.__init__( self, EIEIOCommandHeader( constants.EIEIO_COMMAND_IDS.HOST_SEND_SEQUENCED_DATA.value)) <NEW_LINE> self._region_id = region_id <NEW_LINE>... | Packet sent from the host to the SpiNNaker system in the context of buffering input mechanism to identify packet which needs to be stored in memory for future use
| 62598eef442bda511e95ac21 |
class Country(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=50) <NEW_LINE> iana_code = models.CharField(max_length=2) | class that stores countries and their codes | 62598eefa05bb46b3848902f |
class APIMessageConversion(BinaryConversion): <NEW_LINE> <INDENT> def __init__(self, community): <NEW_LINE> <INDENT> super(APIMessageConversion, self).__init__(community, "\x16") <NEW_LINE> self.define_meta_message(chr(16), community.get_meta_message(API_MESSAGE_NAME), self.encode_payload, self.decode_payload) <NEW_LIN... | mesage | 62598eef379a373c97d977b5 |
class InputError(Exception): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> self.message = message | Raise InputError. | 62598eef57b8e32f525074e3 |
class Action (CacheClearingModel, TimeStampedModel): <NEW_LINE> <INDENT> action = models.CharField(max_length=16, default='create') <NEW_LINE> thing = models.ForeignKey(SubmittedThing, db_column='data_id', related_name='actions') <NEW_LINE> source = models.TextField(blank=True, null=True) <NEW_LINE> cache = cache.Actio... | Metadata about SubmittedThings:
what happened when. | 62598eef63d6d428bbee0f8c |
class OutOfPlanePattern(CustomPattern): <NEW_LINE> <INDENT> def __init__(self, criteria_sets=None, vertex_tags=None): <NEW_LINE> <INDENT> if vertex_tags is None: <NEW_LINE> <INDENT> vertex_tags = {} <NEW_LINE> <DEDENT> pattern_graph = Graph([(0, 1), (0, 2), (0, 3)]) <NEW_LINE> CustomPattern.__init__(self, pattern_graph... | Pattern for a central vertex connected to three other vertices | 62598eefdd821e528d6d76fe |
class WebPage(QDialog): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> super(WebPage, self).__init__(parent) <NEW_LINE> self.contentWeb = QWebView() <NEW_LINE> self.cancelButton = QPushButton(self.tr("返回")) <NEW_LINE> self.connect(self.cancelButton, SIGNAL("clicked()"), self, SLOT("close()")) ... | docstring for WebPage | 62598eef56ac1b37e63009ab |
class TooManyMatchesError(ValueError): <NEW_LINE> <INDENT> pass | Raised when a regex matches a string more times than expected. | 62598eef3d592f4c4edb96ad |
class CGExeNotExistError(AnalyzeError): <NEW_LINE> <INDENT> pass | No errors in CG boot. | 62598eef2ae34c7f260a98a6 |
class PlotStackedStack_SG(ScatterGather): <NEW_LINE> <INDENT> appname = 'stack-plot-stacked-stack-sg' <NEW_LINE> usage = "%s [options]" % (appname) <NEW_LINE> description = "Make castro plots for set of targets" <NEW_LINE> clientclass = PlotStack <NEW_LINE> job_time = 60 <NEW_LINE> default_options = dict(ttype=defaults... | Small class to generate configurations for `PlotStack`
This does a triple loop over rosters, j-factor priors and specs | 62598eef76e4537e8c3edd74 |
class Note(models.Model): <NEW_LINE> <INDENT> tag = models.SlugField(max_length=50, db_index=True) <NEW_LINE> content_type = models.ForeignKey(ContentType) <NEW_LINE> object_id = models.CharField(max_length=36, db_index=True) <NEW_LINE> content_object = GenericForeignKey('content_type', 'object_id') <NEW_LINE> text = m... | A note linked to a document or project | 62598eef009cb60464cffd0e |
class LoadoutPreset(Preset): <NEW_LINE> <INDENT> def __init__(self, name, file_path=None): <NEW_LINE> <INDENT> super().__init__(create_looks_configurations(), file_path, name) <NEW_LINE> <DEDENT> def get_required_sections(self): <NEW_LINE> <INDENT> return ['Bot Loadout'] | A class extending Preset to handle a LoadoutPreset, which is based on the looks configurations file | 62598eef2ae34c7f260a98a7 |
class Graph: <NEW_LINE> <INDENT> def __init__(self, dict=None, directed=True): <NEW_LINE> <INDENT> self.dict = dict or {} <NEW_LINE> self.directed = directed <NEW_LINE> if not directed: <NEW_LINE> <INDENT> self.make_undirected() <NEW_LINE> <DEDENT> <DEDENT> def make_undirected(self): <NEW_LINE> <INDENT> for a in self.d... | A graph connects nodes (vertices) by edges (links). Each edge can also
have a length associated with it. The constructor call is something like:
g = Graph({'A': {'B': 1, 'C': 2})
this makes a graph with 3 nodes, A, B, and C, with an edge of length 1 from
A to B, and an edge of length 2 from A to C. You can also... | 62598eef7047854f4633db91 |
class InvoiceSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> client = serializers.SlugRelatedField(slug_field='email', queryset=Client.objects.all()) <NEW_LINE> services = InvoiceItemSerializer(many=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Invoice <NEW_LINE> fields = ('id', 'client', 'due_d... | Invoice Serializer | 62598eef44b2445a339b5d4b |
class MissingRequiredFieldError(ToflerDBException): <NEW_LINE> <INDENT> pass | return this when any required field is missing | 62598eef9c8ee8231303f53a |
class DialogMedia(widgets.Media): <NEW_LINE> <INDENT> js = ( 'js/jquery-ui/js/jquery.min.js', 'js/jquery-ui/js/jquery-ui.min.js', ) <NEW_LINE> css = { 'all': ( 'js/jquery-ui/css/cupertino/jquery-ui.custom.css', ) } | Medios para el diálgo de jQuery | 62598eefbe383301e0251f9a |
class InventoryTransaction(models.Model): <NEW_LINE> <INDENT> inventory = models.ForeignKey('inventory.Inventory', on_delete=models.CASCADE) <NEW_LINE> quantity = models.IntegerField(default=0) <NEW_LINE> timestamp = models.DateTimeField(auto_now_add=True) <NEW_LINE> user = models.ForeignKey('directory.MerchandiseUser'... | Change in inventory. | 62598eef460517430c430c48 |
class JobException(Exception): <NEW_LINE> <INDENT> def __init__(self, event): <NEW_LINE> <INDENT> self.timestamp = event.timestamp <NEW_LINE> self.type = event.context["type"] <NEW_LINE> self.note = event.context.get("note", "no explanation given") <NEW_LINE> self.severity = event.context["severity"] <NEW_LINE> super()... | Represents an 'exception' event occurring to a job.
Instances expose a few public attributes.
:var timestamp: the timestamp of the 'exception' event.
:var type: A string identifying the type of job exception.
:var note: Brief human-readable explanation of the exception.
:var severity: the severity of the exception. E... | 62598eef32920d7e50bc47ed |
class TestSeq(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(TestSeq, self).setUp() <NEW_LINE> self.current_dir = os.path.dirname(os.path.abspath(__file__)) <NEW_LINE> <DEDENT> def test_one_hot_simple(self): <NEW_LINE> <INDENT> sequences = np.array(["ACGT", "GATA", "CGCG"]) <NEW_LINE... | Tests sequence handling utilities. | 62598eefa8370b77170eeba5 |
class UploadCommand(Command): <NEW_LINE> <INDENT> description = "Build and publish the package." <NEW_LINE> user_options = [] <NEW_LINE> @staticmethod <NEW_LINE> def status(s): <NEW_LINE> <INDENT> print(f"\033[1m{s}\033[0m") <NEW_LINE> <DEDENT> def initialize_options(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> ... | Support setup.py upload. | 62598eef283ffb24f3cf2072 |
class ScopedTFFunction(object): <NEW_LINE> <INDENT> __slots__ = ["func", "deleter"] <NEW_LINE> def __init__(self, func): <NEW_LINE> <INDENT> self.func = func <NEW_LINE> self.deleter = c_api.TF_DeleteFunction <NEW_LINE> <DEDENT> def __del__(self): <NEW_LINE> <INDENT> if self.func is not None: <NEW_LINE> <INDENT> self.de... | Wrapper around TF_Function that handles deletion. | 62598eef097d151d1a2bf7df |
class Oauthrequest(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.uri = unicode("") <NEW_LINE> self.http_method = unicode("") <NEW_LINE> self.params = unicode("") <NEW_LINE> self.signature = unicode("") | A mock object to pass to the OAuth library | 62598eefbe8e80087fbbd811 |
class Subnet(SubResource): <NEW_LINE> <INDENT> _validation = { 'ip_configurations': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}... | Subnet in a virtual network resource.
Variables are only populated by the server, and will be ignored when sending a request.
:param id: Resource ID.
:type id: str
:param name: The name of the resource that is unique within a resource group. This name can be
used to access the resource.
:type name: str
:param etag: ... | 62598eef63d6d428bbee0f8e |
class SvdCpu(SvdElement): <NEW_LINE> <INDENT> props = [ "name", "revision", "endian", "mpuPresent", "fpuPresent", "fpuDP", "icachePresent", "dcachePresent", "itcmPresent", "dtcmPresent", "vtorPresent", "nvicPrioBits", "vendorSystickConfig", "deviceNumInterrupts" ] <NEW_LINE> props_to_boolean = [ "mpuPresent", "fpuPrese... | SVD CPU section | 62598eef4f6381625f19889c |
class AbstractROS(AbstractDatastream): <NEW_LINE> <INDENT> ros_class = Header <NEW_LINE> @classproperty <NEW_LINE> def _type_name(cls): <NEW_LINE> <INDENT> return "%s/%s"%(cls.ros_class.__module__.split('.')[0], cls.ros_class.__name__) <NEW_LINE> <DEDENT> @classproperty <NEW_LINE> def _type_url(cls): <NEW_LINE> <INDENT... | Base class for all ROS Publishers and Subscribers | 62598eefcc40096d616195b9 |
class Match(Object): <NEW_LINE> <INDENT> def __init__(self, val): <NEW_LINE> <INDENT> self.__type__ = type(val) <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> return self.__type__ <NEW_LINE> <DEDENT> def __exit__(self, exc_type, exc_value, exc_traceback): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @prop... | Match class | 62598eef5fcc89381b265508 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.