code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Dipole(BaseRx): <NEW_LINE> <INDENT> def __init__(self, locsM, locsN, times, rxType='phi', **kwargs): <NEW_LINE> <INDENT> assert locsM.shape == locsN.shape, ( 'locsM and locsN need to be the same size' ) <NEW_LINE> locs = [np.atleast_2d(locsM), np.atleast_2d(locsN)] <NEW_LINE> BaseRx.__init__(self, locs, times, rx... | Dipole receiver | 6259905e4e4d562566373a76 |
class FixMariadbHealthCheck(Migrate.Step): <NEW_LINE> <INDENT> version = Migrate.Version(5,2,0) <NEW_LINE> def cutover(self, dmd): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> ctx = sm.ServiceContext() <NEW_LINE> <DEDENT> except sm.ServiceMigrationError: <NEW_LINE> <INDENT> log.info("Couldn't generate service context, ... | Use different curl request to prevent `authentication failed` spam in audit.log | 6259905e8e7ae83300eea6fd |
class prop_logicTest(unittest.TestCase): <NEW_LINE> <INDENT> P = Expr('P') <NEW_LINE> def test_pl_true_P_true(self): <NEW_LINE> <INDENT> self.assertEqual(pl_true(self.P, {self.P: True}), True) <NEW_LINE> <DEDENT> def test_pl_true_P_false(self): <NEW_LINE> <INDENT> self.assertEqual(pl_true(self.P, {self.P: False}), Fals... | Testing basic propositional logic functionality | 6259905e15baa72349463602 |
class Parameters(object): <NEW_LINE> <INDENT> def __init__(self, parameters_etree=None, defaults=None): <NEW_LINE> <INDENT> if defaults is not None: <NEW_LINE> <INDENT> self._defaults = defaults <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self._defaults = { 'Energy': 300, 'EnergyModel': 'energy_model.default_energy_m... | Simple wrapper to provide a smarter method to get experiment parameters than the raw XML API.
| 6259905eac7a0e7691f73b53 |
class PriceViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Price.objects.all() <NEW_LINE> serializer_class = PriceSerializer <NEW_LINE> filter_backends = [DjangoFilterBackend, filters.SearchFilter, filters.OrderingFilter] <NEW_LINE> filterset_fields = ['user__username', 'code', 'label'] <NEW_LINE> search... | Ce viewset fournit automatiquement les actions `list`, `create`, `retrieve`,
`update` et `destroy` pour les prix | 6259905e6e29344779b01cbe |
class AbstractItem(QtWidgets.QGraphicsItemGroup): <NEW_LINE> <INDENT> def __init__(self, rect: QtCore.QRectF, parent=None): <NEW_LINE> <INDENT> QtWidgets.QGraphicsItemGroup.__init__(self, parent=parent) <NEW_LINE> self.shape = None <NEW_LINE> self.penwidth = None <NEW_LINE> self.prepShape(rect) <NEW_LINE> <DEDENT> def ... | Item in the shape of an ellipse | 6259905e99cbb53fe6832551 |
class SasDefinitionCreateParameters(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'parameters': {'required': True}, } <NEW_LINE> _attribute_map = { 'parameters': {'key': 'parameters', 'type': '{str}'}, 'sas_definition_attributes': {'key': 'attributes', 'type': 'SasDefinitionAttributes'}, 'tags': {'ke... | The SAS definition create parameters.
All required parameters must be populated in order to send to Azure.
:ivar parameters: Required. Sas definition creation metadata in the form of key-value pairs.
:vartype parameters: dict[str, str]
:ivar sas_definition_attributes: The attributes of the SAS definition.
:vartype sa... | 6259905e91af0d3eaad3b498 |
class ResouceSearch(MyUnitTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.login_manage() <NEW_LINE> self.url = "http://10.16.3.26:8067/edu/resources" <NEW_LINE> self.center_url='http://10.16.3.26:8067/edu/user-center/home' <NEW_LINE> self.search_key_word="sss" <NEW_LINE> <DEDENT> def test_page_... | 教育网页-资源中心页面测试 | 6259905e379a373c97d9a695 |
class MabContainerExtendedInfo(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'last_refreshed_at': {'key': 'lastRefreshedAt', 'type': 'iso-8601'}, 'backup_item_type': {'key': 'backupItemType', 'type': 'str'}, 'backup_items': {'key': 'backupItems', 'type': '[str]'}, 'policy_name': {'key': 'policyNam... | Additional information of the container.
:ivar last_refreshed_at: Time stamp when this container was refreshed.
:vartype last_refreshed_at: ~datetime.datetime
:ivar backup_item_type: Type of backup items associated with this container. Possible values
include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Ex... | 6259905e7047854f46340a2d |
class WeakBoundMethod(object): <NEW_LINE> <INDENT> def __init__(self, bound_method, ignore_emptiness=False): <NEW_LINE> <INDENT> self._free_method = bound_method.im_func <NEW_LINE> self._weak_instance = weakref.ref(bound_method.im_self) <NEW_LINE> self._ignore_emptiness = ignore_emptiness <NEW_LINE> <DEDENT> def __call... | Used to create a proxy method of a bound method, which weakly references
the method's binding instance.
Assuming the following simple class:
>>> class Example(object):
... def print_num(self, a_number):
... print "%d" % a_number
We can create an example instance and create a weak reference t... | 6259905e498bea3a75a59136 |
class BaseFileModifier(object): <NEW_LINE> <INDENT> field = '' <NEW_LINE> implements(ISurfResourceModifier) <NEW_LINE> def __init__(self, context): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> <DEDENT> def run(self, resource, *args, **kwds): <NEW_LINE> <INDENT> item = getattr(self.context, self.field) <NEW_LIN... | Adds dcterms:format
| 6259905e8e7ae83300eea6fe |
class InstrumentedRequestHandler(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.calls = [] <NEW_LINE> self.finished_reading = False <NEW_LINE> <DEDENT> def no_body_received(self): <NEW_LINE> <INDENT> self.calls.append(('no_body_received',)) <NEW_LINE> <DEDENT> def end_received(self): <NEW_LIN... | Test Double of SmartServerRequestHandler. | 6259905e4f6381625f199fdb |
class SigningKeyResponse(object): <NEW_LINE> <INDENT> openapi_types = { 'data': 'SigningKey' } <NEW_LINE> attribute_map = { 'data': 'data' } <NEW_LINE> def __init__(self, data=None, local_vars_configuration=None): <NEW_LINE> <INDENT> if local_vars_configuration is None: <NEW_LINE> <INDENT> local_vars_configuration = Co... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually. | 6259905e460517430c432b8b |
class OracleParam(object): <NEW_LINE> <INDENT> def __init__(self, param, cursor, strings_only=False): <NEW_LINE> <INDENT> if settings.USE_TZ and (isinstance(param, datetime.datetime) and not isinstance(param, Oracle_datetime)): <NEW_LINE> <INDENT> if timezone.is_aware(param): <NEW_LINE> <INDENT> warnings.warn( "The Ora... | Wrapper object for formatting parameters for Oracle. If the string
representation of the value is large enough (greater than 4000 characters)
the input size needs to be set as CLOB. Alternatively, if the parameter
has an `input_size` attribute, then the value of the `input_size` attribute
will be used instead. Otherwis... | 6259905e8da39b475be04858 |
class Club(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.name = '' <NEW_LINE> self.money = '' <NEW_LINE> self.league = '' | club | 6259905ed6c5a102081e3794 |
class Mathopd(HTTPProcess): <NEW_LINE> <INDENT> protocol = 'HTTP' <NEW_LINE> subprotocol = 'HEADER' <NEW_LINE> re_expr = re.compile("^mathopd/?(?P<version>[\dp\.]+)?", re.IGNORECASE) <NEW_LINE> def process(self, data, metadata): <NEW_LINE> <INDENT> server = self.get_header_field(data, 'server') <NEW_LINE> if server: <N... | http://www.mathopd.org/ | 6259905ee64d504609df9f07 |
class TestDefaultController(BaseTestCase): <NEW_LINE> <INDENT> def test_add_student(self): <NEW_LINE> <INDENT> body = Student(first_name=str(uuid.uuid4()), last_name='beratna', grades={"subject_example": 8}) <NEW_LINE> response = self.client.open( '/service-api/student', method='POST', data=json.dumps(body), content_ty... | DefaultController integration test stubs | 6259905e67a9b606de5475da |
class TokenSchema(Schema): <NEW_LINE> <INDENT> email = fields.String( required=True, load_from='sub', validate=must_not_be_blank, error_messages={ 'invalid': 'atributo no válido.', 'required': 'Atributo obligatorio.' } ) <NEW_LINE> exp = fields.Integer( required=False, load_only=True, validate=must_not_be_blank, error_... | Estructura del Token del tipo Schema. | 6259905e99cbb53fe6832552 |
class TagDetailView(SearchableViewMixin, DetailView): <NEW_LINE> <INDENT> model = Tag <NEW_LINE> paginate_by = 10 <NEW_LINE> paginate_orphans = 2 <NEW_LINE> template_name = "bdr/tags/detail.html" | This view displays the datasets, files and revisions associated with a
given tag. | 6259905efff4ab517ebcee97 |
class PaginationError(LastfmAPIError): <NEW_LINE> <INDENT> def __init__(self, msg): <NEW_LINE> <INDENT> self.msg = msg <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return repr(self.msg) | Exception class for issues with paginated requests. | 6259905ea8370b77170f1a3f |
@deconstructible <NEW_LINE> class FencedCodeExtension(Extension): <NEW_LINE> <INDENT> def extendMarkdown(self, md, md_globals): <NEW_LINE> <INDENT> md.registerExtension(self) <NEW_LINE> md.preprocessors.add('fenced_code_block', FencedBlockPreprocessor(md), ">normalize_whitespace") | Adds fenced code blocks
E.g.:
```python
class FencedCodeExtension(Extension):
pass
``` | 6259905ebaa26c4b54d50912 |
class AttentionVRPCritic(object): <NEW_LINE> <INDENT> def __init__(self, dim, use_tanh=False, C=10,_name='Attention',_scope=''): <NEW_LINE> <INDENT> self.use_tanh = use_tanh <NEW_LINE> self._scope = _scope <NEW_LINE> with tf.variable_scope(_scope+_name): <NEW_LINE> <INDENT> self.v = tf.get_variable('v',[1,dim], initial... | A generic attention module for the attention in vrp model | 6259905e379a373c97d9a696 |
class Ner(): <NEW_LINE> <INDENT> def __init__(self, config): <NEW_LINE> <INDENT> self.config = config <NEW_LINE> self.home = self.config.get('General', 'home') <NEW_LINE> <DEDENT> def process(self, files): <NEW_LINE> <INDENT> print('process: NER') <NEW_LINE> logging.info('started NER: '+str(datetime.now())) <NEW_LINE> ... | Perform named entity recognition using Stanford NER
Input: (word) tokenised sentences
Output: named entity tagged sentences | 6259905e1f037a2d8b9e53a4 |
class IntellectMoneyForm(_BasePaymentForm): <NEW_LINE> <INDENT> PREFERENCE_CHOICES = [ ('inner', 'IntellectMoney'), ('bankCard', 'Visa/MasterCard'), ('exchangers', u'Internet Exchangers'), ('terminals', u'Terminals'), ('transfers', u'Transfers'), ('sms', 'SMS'), ('bank', u'Bank'), ('yandex', u'Яндекс.Деньги'), ('inner,... | Payment request form. | 6259905e1f5feb6acb16425c |
class Info(object): <NEW_LINE> <INDENT> results = dict() <NEW_LINE> def __init__(self, app, machine=False): <NEW_LINE> <INDENT> self.app = app <NEW_LINE> self.machine = machine <NEW_LINE> self._fetch_information() <NEW_LINE> <DEDENT> def _fetch_information(self): <NEW_LINE> <INDENT> self._get_bootloader_info() <NEW_LIN... | Fetches and displays some information about the running node:
Bootloader information
Layout information | 6259905e97e22403b383c57f |
class ConfigurationIdentity(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'principal_id': {'key': 'principalId', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, 'type': {'key': 'type'... | Identity for the managed cluster.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar principal_id: The principal id of the system assigned identity which is used by the
configuration.
:vartype principal_id: str
:ivar tenant_id: The tenant id of the system assigned identity ... | 6259905f097d151d1a2c26e1 |
class GaussianWeightedDistanceCalculator(DistanceCalculator): <NEW_LINE> <INDENT> def __init__(self, centre=30, variance=20): <NEW_LINE> <INDENT> self.centre = centre <NEW_LINE> self.variance = variance <NEW_LINE> <DEDENT> def calculate_distance(self, sequence1, sequence2): <NEW_LINE> <INDENT> self._check_same_length(s... | Gives more weight to nucleotides around the boundary. | 6259905f21bff66bcd7242d8 |
class PyRATTask(QgsTask): <NEW_LINE> <INDENT> def __init__(self, pyratTool, para_backup): <NEW_LINE> <INDENT> QgsTask.__init__(self) <NEW_LINE> self.pyratTool = pyratTool <NEW_LINE> self.para_backup = para_backup <NEW_LINE> self.failed = False <NEW_LINE> self.guionly = False <NEW_LINE> self.layer = None <NEW_LINE> self... | This class handles the async execution of a PyRAT-Tool | 6259905fd6c5a102081e3796 |
class PandasModel(QtCore.QAbstractTableModel): <NEW_LINE> <INDENT> def __init__(self, data, parent=None, editable=False, editable_min_idx=-1): <NEW_LINE> <INDENT> QtCore.QAbstractTableModel.__init__(self, parent) <NEW_LINE> self.data = np.array(data.values) <NEW_LINE> self._cols = data.columns <NEW_LINE> self.index = d... | Class to populate a Qt table view with a pandas data frame | 6259905f4e4d562566373a7a |
class SortOptions(object): <NEW_LINE> <INDENT> def __init__(self, expressions=None, match_scorer=None, limit=1000): <NEW_LINE> <INDENT> self._match_scorer = match_scorer <NEW_LINE> self._expressions = _GetList(expressions) <NEW_LINE> for expression in self._expressions: <NEW_LINE> <INDENT> if not isinstance(expression,... | Represents a mulit-dimensional sort of Documents.
The following code shows how to sort documents based on product rating
in descending order and then cheapest product within similarly rated
products, sorting at most 1000 documents:
SortOptions(expressions=[
SortExpression(expression='rating',
direct... | 6259905f38b623060ffaa389 |
class PublicIPAddressSku(Model): <NEW_LINE> <INDENT> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, } <NEW_LINE> def __init__(self, name=None): <NEW_LINE> <INDENT> self.name = name | SKU of a public IP address.
:param name: Name of a public IP address SKU. Possible values include:
'Basic', 'Standard'
:type name: str or
~azure.mgmt.network.v2017_09_01.models.PublicIPAddressSkuName | 6259905f15baa72349463606 |
class WL13335(tests.MySQLConnectorTests): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.config = tests.get_mysql_config() <NEW_LINE> cnx = connection.MySQLConnection(**self.config) <NEW_LINE> self.user = "expired_pw_user" <NEW_LINE> self.passw = "i+QEqGkFr8h5" <NEW_LINE> self.hosts = ["localhost", "127.... | WL#13335: Avoid set config values with flag CAN_HANDLE_EXPIRED_PASSWORDS
| 6259905f442bda511e95d893 |
class GenericData(object): <NEW_LINE> <INDENT> def __init__(self, label='', data=None, uncertainty=None, species=None, reaction=None, units=None, index=None): <NEW_LINE> <INDENT> self.label = str(label) if label else None <NEW_LINE> if isinstance(data, list): <NEW_LINE> <INDENT> self.data = np.array(data) <NEW_LINE> <D... | A generic data class for the purpose of plotting.
======================= ============================================================================================
Attribute Description
======================= ============================================================================================
... | 6259905f3539df3088ecd90f |
class EulerMaruyama(OverDampedLangevinIntegrator): <NEW_LINE> <INDENT> def __init__(self,model, stepsize, inverse_temperature): <NEW_LINE> <INDENT> if model.p is not None: <NEW_LINE> <INDENT> raise ValueError('EulerMaruyama is only first Order Dynamics!') <NEW_LINE> <DEDENT> super(EulerMaruyama, self).__init__(model, s... | Class which implements the Euler-Maruyama method
which is a first order dynamics integrator | 6259905f009cb60464d02baa |
class StatEntry(structs.RDFProtoStruct): <NEW_LINE> <INDENT> protobuf = jobs_pb2.StatEntry | Represent an extended stat response. | 6259905fcb5e8a47e493ccbf |
class ProjectModel(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'projects' <NEW_LINE> pid = db.Column(db.Integer, primary_key=True) <NEW_LINE> pname = db.Column(db.String()) <NEW_LINE> owner_id = db.Column(db.Integer, db.ForeignKey('users.id')) <NEW_LINE> description = db.Column(db.String()) <NEW_LINE> owner = db.rel... | docstring for ProjectModel | 6259905f435de62698e9d479 |
class DownloadBceGLONASS(DownloadBCE): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> DownloadBCE.__init__(self, 'g') | download GPS broadcast ephemeris from CDDIS FTP | 6259905f23e79379d538db6f |
class CapitalDatabase(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> file_path = os.path.dirname(__file__) <NEW_LINE> if file_path != "": <NEW_LINE> <INDENT> os.chdir(file_path) <NEW_LINE> <DEDENT> try: <NEW_LINE> <INDENT> self.Towers = self.loadDict("gameconfig/towers.csv") <NEW_LINE> self.Radios = sel... | Tests:
>>> Data = CapitalDatabase()
>>> a = Data.GetTower(0)
>>> a.name
'Titan T200'
>>> not Data.Towers == None
True
>>> not Data.Radios == None
True | 6259905ffff4ab517ebcee99 |
class QParamInspector(QtGui.QWidget): <NEW_LINE> <INDENT> def __init__(self, v1Name='', v2Name='', parent=None, f=QtCore.Qt.WindowFlags()): <NEW_LINE> <INDENT> QtGui.QWidget.__init__(self, parent, f | QtCore.Qt.Tool) <NEW_LINE> self.setWindowTitle('Parameter Inspector - None') <NEW_LINE> self.firstTime = True <NEW_LINE... | QParamInspector is a widget acting as an inspector vistrail modules
in diff mode. It consists of a function inspector and annotation
inspector | 6259905f45492302aabfdb4d |
class OrderAdminTest(AdminTestMixin, TestCase): <NEW_LINE> <INDENT> fixtures = ['dump.json'] <NEW_LINE> model = Order <NEW_LINE> object_id = 1 | Tests for Order admin. | 6259905fac7a0e7691f73b57 |
class Activity(EmbeddedDocument): <NEW_LINE> <INDENT> activity_uid = fields.StringField() <NEW_LINE> content = fields.StringField() <NEW_LINE> author = fields.StringField() <NEW_LINE> created_at = fields.DateTimeField() | Activity model with following attribute
activity_uid = String
content = String
author = String
created_at = DateTime | 6259905f32920d7e50bc76bb |
class _ZList: <NEW_LINE> <INDENT> def _zlistCirc(self, time): <NEW_LINE> <INDENT> self._zlist = numpy.empty(len(time)) <NEW_LINE> self._zlist[:] = numpy.NAN <NEW_LINE> w = 2.0 * numpy.pi / self["per"] <NEW_LINE> alpha = (90.0 - self["i"]) / 180.0 * numpy.pi <NEW_LINE> phase = time / self["per"] <NEW_LINE> phase -= nump... | Calculate the projected distance between the centers of star and planet.
The resulting values will be stored in the `_zlist` attribute. Additionally,
the indices belonging to in-transit points will be saved in the `_intrans`
attribute. These can be used as input to calculate the transit light-curve.
Parameters
------... | 6259905fd7e4931a7ef3d6be |
class ArticleViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Article.objects.all() <NEW_LINE> queryset = queryset.annotate(total_votes=Count('votes__vote')) <NEW_LINE> queryset = queryset.prefetch_related("author") <NEW_LINE> queryset = queryset.prefetch_related("category") <NEW_LINE> queryset = queryset... | API endpoint that allows Articles to be viewed or edited. | 6259905f004d5f362081fb29 |
class Table(Element): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Table, self).__init__() <NEW_LINE> self.rows = [] <NEW_LINE> <DEDENT> def value(self): <NEW_LINE> <INDENT> return self.rows | Represents table element. | 6259905f1f037a2d8b9e53a5 |
class ClipTimer(wx.Timer): <NEW_LINE> <INDENT> def Notify(self): <NEW_LINE> <INDENT> if wx.TheClipboard.Open(): <NEW_LINE> <INDENT> wx.TheClipboard.Clear() <NEW_LINE> wx.TheClipboard.Close() | Description: Clip Board timer that clears the content
copied to clip board | 6259905f379a373c97d9a699 |
class ServiceGuarantee(Document): <NEW_LINE> <INDENT> def __init__(self, automaticPay=False, payAmount=0.0, serviceRequirement='', applicationPeriod=None, *args, **kw_args): <NEW_LINE> <INDENT> self.automaticPay = automaticPay <NEW_LINE> self.payAmount = payAmount <NEW_LINE> self.serviceRequirement = serviceRequirement... | A service guarantee, often imposed by a regulator, defines conditions that, if not satisfied, will result in the utility making a monetary payment to the customer. Note that guarantee's identifier is in the 'name' attribute and the status of the guarantee is in the 'Status.status' attribute. Example service requirement... | 6259905f63d6d428bbee3dc2 |
class TestBatch(unittest.TestCase): <NEW_LINE> <INDENT> def test_batch(self): <NEW_LINE> <INDENT> self.assertListEqual( list(batch(tuple(range(10)))), [(0, 1, 2), (3, 4, 5), (6, 7, 8), (9,)]) <NEW_LINE> self.assertListEqual( list(batch(tuple(range(10)), 5)), [(0, 1, 2, 3, 4), (5, 6, 7, 8, 9)]) <NEW_LINE> self.assertLis... | Defines :func:`colour.utilities.common.batch` definition unit tests
methods. | 6259905f498bea3a75a59138 |
class OrderDetail(APIView): <NEW_LINE> <INDENT> def get(self, request, pk): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> snippet = Order.objects.get(pk=pk) <NEW_LINE> <DEDENT> except Order.DoesNotExist: <NEW_LINE> <INDENT> return HttpResponse(status=404) <NEW_LINE> <DEDENT> serializer = OrderSerializer(snippet) <NEW_LI... | Retrieve, update or delete a code snippet. | 6259905f76e4537e8c3f0c01 |
class RadioButton(Field): <NEW_LINE> <INDENT> def __init__(self, id, value): <NEW_LINE> <INDENT> super(RadioButton, self).__init__(id, value) <NEW_LINE> <DEDENT> def set_value(self, value, **kw): <NEW_LINE> <INDENT> self.html_selected = value and value.lower() == 'true' and 'checked' or '' <NEW_LINE> self.html_class = ... | Радиокнопка: input type="radio" | 6259905fbe8e80087fbc06fa |
class CarliniWagnerLoss(nn.Module): <NEW_LINE> <INDENT> def __init__(self, conf=50., reduction="sum"): <NEW_LINE> <INDENT> super(CarliniWagnerLoss, self).__init__() <NEW_LINE> self.conf = conf <NEW_LINE> self.reduction = reduction <NEW_LINE> <DEDENT> def forward(self, input, target): <NEW_LINE> <INDENT> num_classes = i... | Carlini-Wagner Loss: objective function #6.
Paper: https://arxiv.org/pdf/1608.04644.pdf | 6259905fd268445f2663a697 |
class StubMetadata: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.information = [1, 2, 3] | stub metadata class to test serialization of hiding technique metadata | 6259905f0fa83653e46f655c |
class CompleteMultipartUploadTask(Task): <NEW_LINE> <INDENT> def _main(self, client, bucket, key, upload_id, parts): <NEW_LINE> <INDENT> client.complete_multipart_upload( Bucket=bucket, Key=key, UploadId=upload_id, MultipartUpload={'Parts': parts}) | Task to complete a multipart upload | 6259905fd53ae8145f919ad7 |
class ptGameCliPlayerJoinedMsg(ptGameCliMsg): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def getGameCli(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def getType(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def playerID(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <D... | Game client message when a player joined message is received | 6259905f3d592f4c4edbc551 |
class Images(models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=50) <NEW_LINE> caption = models.CharField(max_length=150,blank=True) <NEW_LINE> image = models.ImageField(upload_to='uploads') <NEW_LINE> content_type = models.ForeignKey(ContentType) <NEW_LINE> object_id = models.PositiveIntegerField()... | Stores images used in all parts of the application. Depends on generic foreign key relations
https://docs.djangoproject.com/en/1.3/ref/contrib/contenttypes/#generic-relations | 6259905f8e7ae83300eea703 |
class LikePostHandler(BaseHandler): <NEW_LINE> <INDENT> def get(self, post_id): <NEW_LINE> <INDENT> Post.add_like(int(post_id), self.user.get_id()) <NEW_LINE> self.redirect('/blog') | Responsible for adding a like to a single post. | 6259905fa8ecb0332587288d |
class Request: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.headers = {} <NEW_LINE> self.method = None <NEW_LINE> self.protocol = None <NEW_LINE> self.resource = None <NEW_LINE> self.path = None <NEW_LINE> self.params = {} <NEW_LINE> self.origin = None <NEW_LINE> <DEDENT> def parse(self, conn): <NEW... | http request data. | 6259905fa17c0f6771d5d6de |
class ObservationEncoder(object): <NEW_LINE> <INDENT> def __init__(self, game, enc_type=ObservationEncoderType.CANONICAL): <NEW_LINE> <INDENT> self._game = game.c_game <NEW_LINE> self._encoder = ffi.new("pyhanabi_observation_encoder_t*") <NEW_LINE> lib.NewObservationEncoder(self._encoder, self._game, enc_type) <NEW_LIN... | ObservationEncoder class.
The canonical observations wrap an underlying C++ class. To make custom
observation encoders, create a subclass of this base class and override
the shape and encode methods. | 6259905ffff4ab517ebcee9c |
class UnsafeSessionAuthentication(BaseAuthentication): <NEW_LINE> <INDENT> def authenticate(self, request): <NEW_LINE> <INDENT> request = request._request <NEW_LINE> user = getattr(request, 'user', None) <NEW_LINE> if not user or not user.is_active: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> return (user, None... | Use Django's session framework for authentication. | 6259905fac7a0e7691f73b59 |
class MeanReducer(LambdaReducer): <NEW_LINE> <INDENT> def __init__(self, name: str, *, value: str = "output", size: str = "size",) -> None: <NEW_LINE> <INDENT> super().__init__(name, lambda x, y: x + y, value=value) <NEW_LINE> self._size = size <NEW_LINE> <DEDENT> @property <NEW_LINE> def _total_size(self) -> str: <NEW... | An attachment to compute a mean over batch statistics.
This attachment gets the value from each batch and compute their mean at the end of
every epoch.
Example:
>>> from rnnr import Event, Runner
>>> from rnnr.attachments import MeanReducer
>>> runner = Runner()
>>> MeanReducer('mean').attach_on(runn... | 6259905f4e4d562566373a7d |
class TestAutoContentTypeAndAcceptHeaders: <NEW_LINE> <INDENT> def test_GET_no_data_no_auto_headers(self, httpbin): <NEW_LINE> <INDENT> r = http('GET', httpbin.url + '/headers') <NEW_LINE> assert HTTP_OK in r <NEW_LINE> assert r.json['headers']['Accept'] == '*/*' <NEW_LINE> assert 'Content-Type' not in r.json['headers'... | Test that Accept and Content-Type correctly defaults to JSON,
but can still be overridden. The same with Content-Type when --form
-f is used. | 6259905f99cbb53fe6832557 |
class ServerAndClientSSHTransportBaseCase: <NEW_LINE> <INDENT> def checkDisconnected(self, kind=None): <NEW_LINE> <INDENT> if kind is None: <NEW_LINE> <INDENT> kind = transport.DISCONNECT_PROTOCOL_ERROR <NEW_LINE> <DEDENT> self.assertEqual(self.packets[-1][0], transport.MSG_DISCONNECT) <NEW_LINE> self.assertEqual(self.... | Tests that need to be run on both the server and the client. | 6259905f1b99ca4002290071 |
class Collisive(PerformanceScenario): <NEW_LINE> <INDENT> def __init__(self, kernel, factors, time_step=0.01, integrator=None, reaction_scheduler=None): <NEW_LINE> <INDENT> super(Collisive, self).__init__(kernel, time_step, integrator, reaction_scheduler) <NEW_LINE> box_length = 7. * factors["box_length"] <NEW_LINE> se... | Scenario with uniformly distributed particles that repulse each other | 6259905f379a373c97d9a69b |
class FancyArgumentParser(argparse.ArgumentParser): <NEW_LINE> <INDENT> def __init__(self, **kwargs) -> None: <NEW_LINE> <INDENT> formatter_class = kwargs.pop("formatter_class", WideHelpFormatter) <NEW_LINE> fromfile_prefix_chars = kwargs.pop("fromfile_prefix_chars", "@") <NEW_LINE> super().__init__( formatter_class=fo... | Fancier version of the argument parser supporting `@file` to fetch additional arguments.
Add feature to read command line arguments from files and support:
- One argument per line (whitespace is trimmed)
- Comments or empty lines (either are ignored)
This enables direct use of output from show_downstream_dependents ... | 6259905f7d847024c075da49 |
class LatexConfig(Configurable): <NEW_LINE> <INDENT> latex_command = Unicode('xelatex', config=True, help='The LaTeX command to use when compiling ".tex" files.') <NEW_LINE> bib_command = Unicode('bibtex', config=True, help='The BibTeX command to use when compiling ".tex" files.') <NEW_LINE> synctex_command = Unicode('... | A Configurable that declares the configuration options
for the LatexHandler. | 6259905f3c8af77a43b68a7c |
class BaseRecognizer(nn.Module,metaclass=ABCMeta): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(BaseRecognizer,self).__init__() <NEW_LINE> <DEDENT> def init_weights(self, pretrained=None): <NEW_LINE> <INDENT> if pretrained is not None: <NEW_LINE> <INDENT> print_log('load model from: {}'.format(pret... | Base class for text Recognizer | 6259905f24f1403a92686409 |
class MirroredVariable(DistributedVariable, Mirrored): <NEW_LINE> <INDENT> def _update_replica(self, update_fn, value, **kwargs): <NEW_LINE> <INDENT> return _on_write_update_replica(self, update_fn, value, **kwargs) <NEW_LINE> <DEDENT> def scatter_min(self, *args, **kwargs): <NEW_LINE> <INDENT> if values_util.is_saving... | Holds a map from replica to variables whose values are kept in sync. | 6259905f63d6d428bbee3dc3 |
class FilterMixin(object): <NEW_LINE> <INDENT> @verbose <NEW_LINE> def savgol_filter(self, h_freq, verbose=None): <NEW_LINE> <INDENT> _check_preload(self, 'inst.savgol_filter') <NEW_LINE> h_freq = float(h_freq) <NEW_LINE> if h_freq >= self.info['sfreq'] / 2.: <NEW_LINE> <INDENT> raise ValueError('h_freq must be less th... | Object for Epoch/Evoked filtering. | 6259905f8a43f66fc4bf3805 |
class BroadcastServerProtocol(WebSocketServerProtocol): <NEW_LINE> <INDENT> def onOpen(self): <NEW_LINE> <INDENT> super(BroadcastServerProtocol, self).onOpen() <NEW_LINE> self.factory.register(self) <NEW_LINE> <DEDENT> def connectionLost(self, reason): <NEW_LINE> <INDENT> super(BroadcastServerProtocol, self).connection... | "Protocol for a Websocket server which broadcasts messages to clients | 6259905f097d151d1a2c26e6 |
class TestUVIS20Single(BaseWFC3): <NEW_LINE> <INDENT> detector = 'uvis' <NEW_LINE> def _single_raw_calib(self, rootname): <NEW_LINE> <INDENT> raw_file = '{}_raw.fits'.format(rootname) <NEW_LINE> self.get_input_file(raw_file) <NEW_LINE> subprocess.call(['calwf3.e', raw_file, '-vt']) <NEW_LINE> outputs = [('{}_flt.fits'.... | Test pos UVIS2 Messier-83 data | 6259905f8da39b475be0485e |
class OrcBasicApi(Resource): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Resource.__init__(self) <NEW_LINE> self._resource = None <NEW_LINE> proc_name = OrcNameStr().from_module_name(self.__class__.__name__).process_name() <NEW_LINE> try: <NEW_LINE> <INDENT> self._resource = __import__("process.%s" % pr... | Support Post
Using parameter func as function | 6259905fd486a94d0ba2d63f |
@attr_add_asblack <NEW_LINE> @attr_class_pickle <NEW_LINE> @attr_class_to_from_dict_no_recurse <NEW_LINE> @attr.s( kw_only=True, frozen=True, auto_attribs=True, repr_ns="fwdpy11.demographic_models" ) <NEW_LINE> class DemographicModelDetails(object): <NEW_LINE> <INDENT> model: object <NEW_LINE> name: str <NEW_LINE> sour... | Stores rich information about a demographic model.
Instances of this class get returned by functions
generating pre-calculated models.
This class has the following attributes, whose names
are also ``kwargs`` for intitialization. The attribute names
also determine the order of positional arguments:
:param model: The ... | 6259905f2c8b7c6e89bd4e66 |
class DeveloperprojectsV1SetIamPolicyRequest(messages.Message): <NEW_LINE> <INDENT> resource = messages.StringField(1, required=True) <NEW_LINE> setPolicyRequest = messages.MessageField('SetPolicyRequest', 2) | A DeveloperprojectsV1SetIamPolicyRequest object.
Fields:
resource: REQUIRED: The resource for which policy is being specified.
Usually some path like projects/{$project}/zones/{$zone}/disks/{$disk}.
setPolicyRequest: A SetPolicyRequest resource to be passed as the request
body. | 6259905f15baa7234946360a |
class Std13KeypointProfile3D(KeypointProfile3D): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Std13KeypointProfile3D, self).__init__( name='3DSTD13', keypoint_names=[('HEAD', LeftRightType.CENTRAL), ('LEFT_SHOULDER', LeftRightType.LEFT), ('RIGHT_SHOULDER', LeftRightType.RIGHT), ('LEFT_ELBOW', LeftR... | Standard 3D 13-keypoint profile. | 6259905f0fa83653e46f655e |
class VideoList: <NEW_LINE> <INDENT> def __init__(self, path_response, list_id=None): <NEW_LINE> <INDENT> self.perpetual_range_selector = path_response.get('_perpetual_range_selector') <NEW_LINE> self.data = path_response <NEW_LINE> has_data = bool(path_response.get('lists')) <NEW_LINE> self.videos = OrderedDict() <NEW... | A video list | 6259905f8e7ae83300eea705 |
class Job(Document): <NEW_LINE> <INDENT> def __init__(self, job): <NEW_LINE> <INDENT> super(Job, self).__init__( data=job, base={ 'type': 'job', 'hostname': '', 'start': 0, 'done': 0, 'queue': 0, 'method': '', 'archive': 0, }) <NEW_LINE> if self.id is None: <NEW_LINE> <INDENT> raise ValueError('Job ID must be set') <NE... | Class to manage a CouchDB job entry. | 6259905fcb5e8a47e493ccc1 |
class CODepartmentSelect(Select): <NEW_LINE> <INDENT> def __init__(self, attrs=None): <NEW_LINE> <INDENT> super(CODepartmentSelect, self).__init__(attrs, choices=DEPARTMENT_CHOICES) | A Select widget that uses a list of Colombian states as its choices. | 6259905f55399d3f05627b97 |
class SyncEvent: <NEW_LINE> <INDENT> def __init__(self, initial: bool = False): <NEW_LINE> <INDENT> self.lock = Condition() <NEW_LINE> self.future = CFuture() <NEW_LINE> if initial: self.future.set_result(True) <NEW_LINE> <DEDENT> def clear(self): <NEW_LINE> <INDENT> with self.lock: <NEW_LINE> <INDENT> self.future = CF... | A union of `threading.Event` and `asyncio.Event` using `concurrent.futures.Future` and `asyncio.wrap_future`.
Waiting for the event in threadland uses the `wait([timeout])` method while waiting for the event in asyncio-land
uses `await event`.
Note that the extra overhead of thread synchronization is likely less effi... | 6259905f23e79379d538db73 |
class Post(models.Model): <NEW_LINE> <INDENT> title = models.CharField( verbose_name = (u'Title'), help_text = (u' '), max_length = 255 ) <NEW_LINE> slug = models.SlugField( verbose_name = (u'Slug'), help_text = (u'Uri identifier.'), max_length = 255, unique = True ) <NEW_LINE> content_markdown = models.TextField( verb... | Post Model | 6259905f9c8ee82313040cc6 |
class Admin(User): <NEW_LINE> <INDENT> def __init__(self,first_name, last_name, age, gender): <NEW_LINE> <INDENT> super().__init__(first_name, last_name, age, gender) <NEW_LINE> self.privileges1 = Privileges() | Inherited class of User | 6259905f004d5f362081fb2b |
class SignAugmenter(BA.BaseAugmenter): <NEW_LINE> <INDENT> def __init__(self, image, label, class_id, placement_id=None): <NEW_LINE> <INDENT> self.rows, self.cols, _ = image.shape <NEW_LINE> self.horizon_line = int(self.rows * 0.4) <NEW_LINE> self.max_height = int(self.rows * 0.4) <NEW_LINE> super(SignAugmenter, self).... | Test class for augmentation | 6259905f379a373c97d9a69d |
class S3FKWrappersTests(unittest.TestCase): <NEW_LINE> <INDENT> def testHasForeignKey(self): <NEW_LINE> <INDENT> ptable = current.s3db.pr_person <NEW_LINE> self.assertFalse(s3_has_foreign_key(ptable.first_name)) <NEW_LINE> self.assertTrue(s3_has_foreign_key(ptable.pe_id)) <NEW_LINE> htable = current.s3db.hrm_human_reso... | Test has_foreign_key and get_foreign_key | 6259905f24f1403a9268640a |
class New(EndPoint): <NEW_LINE> <INDENT> argparse_noflag = "name" <NEW_LINE> schema = { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "name": { "type": "string", "description": "proto文件名,也是package名" }, "pb_include": { "type": "string", "title": "t", "description": "protobufer文件... | 创建Grpc定义文件. | 6259905f63b5f9789fe867eb |
class GamepadAxis(IntEnum): <NEW_LINE> <INDENT> AXIS_UNKNOWN = 0 <NEW_LINE> AXIS_LEFT_X = auto() <NEW_LINE> AXIS_LEFT_Y = auto() <NEW_LINE> AXIS_RIGHT_X = auto() <NEW_LINE> AXIS_RIGHT_Y = auto() <NEW_LINE> AXIS_LEFT_TRIGGER = auto() <NEW_LINE> AXIS_RIGHT_TRIGGER = auto() | Gamepad Buttons | 6259905ff548e778e596cc01 |
class HttpsUrl (httpurl.HttpUrl): <NEW_LINE> <INDENT> def local_check (self): <NEW_LINE> <INDENT> if httpurl.supportHttps: <NEW_LINE> <INDENT> super(HttpsUrl, self).local_check() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.add_info(_("%s URL ignored.") % self.scheme.capitalize()) <NEW_LINE> <DEDENT> <DEDENT> def... | Url link with https scheme. | 6259905fd99f1b3c44d06d1b |
class ICommentsListUtility(Interface): <NEW_LINE> <INDENT> pass | A marker interface for comments Utility | 6259905f4f6381625f199fdf |
class CORT_Event_Location(folder.ATFolder): <NEW_LINE> <INDENT> implements(ICORT_Event_Location) <NEW_LINE> meta_type = "CORT_Event_Location" <NEW_LINE> schema = CORT_Event_LocationSchema <NEW_LINE> title = atapi.ATFieldProperty('title') <NEW_LINE> description = atapi.ATFieldProperty('description') | Description of the Example Type | 6259905ff7d966606f7493f5 |
class MockConnection(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.received = [] <NEW_LINE> self.to_be_sent = [] <NEW_LINE> self.closed = False <NEW_LINE> <DEDENT> def send(self, message): <NEW_LINE> <INDENT> if self.closed: <NEW_LINE> <INDENT> raise SelenolWebSocketClosedException() <NEW_LI... | mock backend connection for logging messages. | 6259905f7d847024c075da4c |
class SysFont(Font): <NEW_LINE> <INDENT> def __init__(self, name, size, bold=False, italic=False): <NEW_LINE> <INDENT> self._style = JFont.PLAIN <NEW_LINE> if bold: <NEW_LINE> <INDENT> self._style |= JFont.BOLD <NEW_LINE> <DEDENT> if italic: <NEW_LINE> <INDENT> self._style |= JFont.ITALIC <NEW_LINE> <DEDENT> Font.__ini... | **pyj2d.font.SysFont**
* Font subclass | 6259905f462c4b4f79dbd07e |
class LRwPRObjetiveType4Mixin(LRwPR): <NEW_LINE> <INDENT> def loss(self, coef_, X, y, s): <NEW_LINE> <INDENT> coef = coef_.reshape(self.n_sfv_, self.n_features_) <NEW_LINE> p = np.array([sigmoid(X[i, :], coef[s[i], :]) for i in xrange(self.n_samples_)]) <NEW_LINE> q = np.array([np.sum(p[s == si]) for si in xrange(self.... | objective function of logistic regression with prejudice remover
Loss Function type 4: Weights for logistic regression are prepared for each
value of S. Penalty for enhancing is defined as mutual information between
Y and S. | 6259905fd486a94d0ba2d641 |
class SleepIQSensor(Entity): <NEW_LINE> <INDENT> def __init__(self, sleepiq_data, bed_id, side): <NEW_LINE> <INDENT> self._bed_id = bed_id <NEW_LINE> self._side = side <NEW_LINE> self.sleepiq_data = sleepiq_data <NEW_LINE> self.side = None <NEW_LINE> self.bed = None <NEW_LINE> self._name = None <NEW_LINE> self.type = N... | Implementation of a SleepIQ sensor. | 6259905f56ac1b37e6303823 |
class DataConfigManager(object): <NEW_LINE> <INDENT> CONFIG_FILE_PATH = os.path.join(os.getcwd(), ".chdata") <NEW_LINE> @classmethod <NEW_LINE> def set_config(cls, data_config): <NEW_LINE> <INDENT> logger.debug("Setting {} in the file {}".format(data_config.to_dict(), cls.CONFIG_FILE_PATH)) <NEW_LINE> with open(cls.CON... | Manages .russelldata file in the current directory | 6259905fd53ae8145f919adb |
class Solution: <NEW_LINE> <INDENT> def findMedianSortedArrays(self, nums1, nums2): <NEW_LINE> <INDENT> total_len = len(nums1) + len(nums2) <NEW_LINE> mid_ind = total_len / 2 <NEW_LINE> ind_1 = ind_2 = 0 <NEW_LINE> if len(nums1) == 0 and len(nums2) == 1: <NEW_LINE> <INDENT> return nums2[0] <NEW_LINE> <DEDENT> elif len(... | Idea:
- merge sort idea, compare both curr_ind for nums1 & nums2 and iterate | 6259905fac7a0e7691f73b5d |
class FileImportError(LoRaException): <NEW_LINE> <INDENT> pass | Error during file import | 6259905f99cbb53fe683255b |
class AzureAttestationRestClient(object): <NEW_LINE> <INDENT> def __init__( self, credential: "AsyncTokenCredential", instance_url: str, **kwargs: Any ) -> None: <NEW_LINE> <INDENT> base_url = '{instanceUrl}' <NEW_LINE> self._config = AzureAttestationRestClientConfiguration(credential, instance_url, **kwargs) <NEW_LINE... | Describes the interface for the per-tenant enclave service.
:ivar policy: PolicyOperations operations
:vartype policy: azure.security.attestation._generated.aio.operations.PolicyOperations
:ivar policy_certificates: PolicyCertificatesOperations operations
:vartype policy_certificates: azure.security.attestation._gener... | 6259905f29b78933be26ac01 |
class MonitorProtocol(RedisProtocol): <NEW_LINE> <INDENT> def messageReceived(self, message): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def replyReceived(self, reply): <NEW_LINE> <INDENT> self.messageReceived(reply) <NEW_LINE> <DEDENT> def monitor(self): <NEW_LINE> <INDENT> return self.execute_command("MONITOR") <NE... | monitor has the same behavior as subscribe: hold the connection until
something happens.
take care with the performance impact: http://redis.io/commands/monitor | 6259905f379a373c97d9a69e |
class PfizerFragmenter(FragmenterBase): <NEW_LINE> <INDENT> type: Literal["PfizerFragmenter"] = "PfizerFragmenter" <NEW_LINE> @classmethod <NEW_LINE> def description(cls) -> str: <NEW_LINE> <INDENT> return "Fragment a molecule across all rotatable bonds using the Pfizer fragmentation scheme." <NEW_LINE> <DEDENT> def _a... | The openff.fragmenter implementation of the Pfizer fragmenation method as described here
(doi: 10.1021/acs.jcim.9b00373) | 6259905f1f037a2d8b9e53a8 |
@implementer(ICredentialsChecker) <NEW_LINE> class InMemoryUsernamePasswordDatabaseDontUse(object): <NEW_LINE> <INDENT> credentialInterfaces = (credentials.IUsernamePassword, credentials.IUsernameHashedPassword) <NEW_LINE> def __init__(self, **users): <NEW_LINE> <INDENT> self.users = users <NEW_LINE> <DEDENT> def addUs... | An extremely simple credentials checker.
This is only of use in one-off test programs or examples which don't
want to focus too much on how credentials are verified.
You really don't want to use this for anything else. It is, at best, a
toy. If you need a simple credentials checker for a real application,
see L{Fil... | 6259905f1f5feb6acb164264 |
class ApiTeamDetails(MainApiHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> team_key = self.request.get('team') <NEW_LINE> year = self.request.get('year') <NEW_LINE> response_json = dict() <NEW_LINE> try: <NEW_LINE> <INDENT> response_json = ApiHelper.getTeamInfo(team_key) <NEW_LINE> if self.request.get... | Information about a Team in a particular year, including full Event and Match objects | 6259905fd99f1b3c44d06d1d |
class Post(Base): <NEW_LINE> <INDENT> __tablename__ = 'posts' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> title = Column(Unicode(150), nullable=False) <NEW_LINE> timestamp = Column(DateTime, default=datetime.utcnow) <NEW_LINE> body = Column(UnicodeText, nullable=False) <NEW_LINE> view_count = Column(In... | Holds blog posts | 6259905f3cc13d1c6d466dbc |
class APIv2(image_v1.APIv1): <NEW_LINE> <INDENT> _endpoint_suffix = '/v2' <NEW_LINE> def _munge_url(self): <NEW_LINE> <INDENT> if not self.endpoint.endswith(self._endpoint_suffix): <NEW_LINE> <INDENT> self.endpoint = self.endpoint + self._endpoint_suffix <NEW_LINE> <DEDENT> <DEDENT> def image_list( self, detailed=False... | Image v2 API | 6259905f4f6381625f199fe0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.