code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class TestHistoryHandler: <NEW_LINE> <INDENT> @pytest.fixture(scope="module") <NEW_LINE> def now(self): <NEW_LINE> <INDENT> return int(time.time()) <NEW_LINE> <DEDENT> @pytest.fixture <NEW_LINE> def entries(self, now): <NEW_LINE> <INDENT> entry_count = 12 <NEW_LINE> interval = 6 * 60 * 60 <NEW_LINE> items = [] <NEW_LIN... | Test the qute://history endpoint. | 62598ee97b25080760ed5ba5 |
class TicketFilterAdapter(Component): <NEW_LINE> <INDENT> implements(ITicketManipulator) <NEW_LINE> def prepare_ticket(self, req, ticket, fields, actions): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def validate_ticket(self, req, ticket): <NEW_LINE> <INDENT> if 'TICKET_ADMIN' in req.perm: <NEW_LINE> <INDENT> return [... | Interface to check ticket changes for spam.
| 62598ee98da39b475be018b7 |
class GrapheneServer: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.storage_manager = StorageManager() <NEW_LINE> self.timer = CmdTimer() <NEW_LINE> colorama.init() <NEW_LINE> <DEDENT> def parseString(self, s): <NEW_LINE> <INDENT> istream = InputStream.InputStream(s) <NEW_LINE> lexer, parser = self.g... | This class handles execution of commands as the server. It uses the parser
and dispatches the execution of commands through those classes. | 62598ee963b5f9789fe83869 |
class ViolinFractionFeature(InstrumentFractionFeature): <NEW_LINE> <INDENT> id = 'I14' <NEW_LINE> def __init__(self, dataOrStream=None, *arguments, **keywords): <NEW_LINE> <INDENT> InstrumentFractionFeature.__init__(self, dataOrStream=dataOrStream, *arguments, **keywords) <NEW_LINE> self.name = 'Violin Fraction' <NEW_L... | >>> s1 = stream.Stream()
>>> s1.append(instrument.Violin())
>>> s1.repeatAppend(note.Note(), 2)
>>> s1.append(instrument.Tuba())
>>> s1.repeatAppend(note.Note(), 8)
>>> fe = features.jSymbolic.ViolinFractionFeature(s1)
>>> fe.extract().vector
[0.2...] | 62598ee97047854f4633dae0 |
class GermEval14(nlp.GeneratorBasedBuilder): <NEW_LINE> <INDENT> BUILDER_CONFIGS = [ GermEval14Config( name="germeval_14", version=nlp.Version("1.0.0"), description="GermEval 2014 NER Shared Task dataset" ), ] <NEW_LINE> def _info(self): <NEW_LINE> <INDENT> return nlp.DatasetInfo( description=_DESCRIPTION, features=nlp... | GermEval 2014 NER Shared Task dataset. | 62598ee9d486a94d0ba2a6d9 |
class Particle3D(object): <NEW_LINE> <INDENT> def __init__(self, pos, vel, mass, label): <NEW_LINE> <INDENT> self.position = pos <NEW_LINE> self.velocity = vel <NEW_LINE> self.mass = mass <NEW_LINE> self.label = label <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return str(self.label) + "x = " + str(self.... | Class to describe 3D particles.
Properties:
position(array) - position as an array (floats)
velocity(array) - velocity as an array (floats)
mass(float) - particle mass
Methods:
* formatted output
* kinetic energy
* first-order velocity update
* first- and second order position updates
* initialize particles from input ... | 62598ee9d486a94d0ba2a6da |
class SubscriptionDefinitionVersionProperty(AWSProperty): <NEW_LINE> <INDENT> props: PropsDictType = { "Subscriptions": ([Subscription], True), } | `SubscriptionDefinitionVersionProperty <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-subscriptiondefinition-subscriptiondefinitionversion.html>`__ | 62598eea57b8e32f5250748b |
class TaxaDumpParser(TaxaParser): <NEW_LINE> <INDENT> def __init__(self, nodes_file=None, names_file=None, **kwargs): <NEW_LINE> <INDENT> super().__init__(**kwargs) <NEW_LINE> self.nodes_file = nodes_file <NEW_LINE> self.names_file = names_file <NEW_LINE> <DEDENT> def taxdump(self, nodes_file=None, names_file=None): <N... | Main parser class for ncbi taxdump files
This class is used to parse NCBI taxonomy files found in taxdump.gz archive
Args:
nodes_file (:obj:`str`): Path to nodes.dmp file
names_file (:obj:`str`): Path to names.dmp file | 62598eea4527f215b58e8613 |
class MainHandler(BaseHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> logger.debug('rendering index.html file') <NEW_LINE> self.render('index.html') | Handle '/' endpoint (root server endpoint).
| 62598eea2eb69b55b15a0710 |
class QuotaHolderSerial(models.Model): <NEW_LINE> <INDENT> serial = models.BigIntegerField(null=False, primary_key=True, db_index=True) <NEW_LINE> pending = models.BooleanField(default=True, db_index=True) <NEW_LINE> accept = models.BooleanField(default=False) <NEW_LINE> resolved = models.BooleanField(default=False) <N... | Model representing a serial for a Quotaholder Commission.
serial: The serial that Quotaholder assigned to this commission
pending: Whether it has been decided to accept or reject this commission
accept: If pending is False, this attribute indicates whether to accept
or reject this commission
resolved: W... | 62598eea009cb60464cffc5b |
class Paper(Player): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__("X") <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def first_available(board): <NEW_LINE> <INDENT> for position in Board.positions: <NEW_LINE> <INDENT> if board.is_available(position): <NEW_LINE> <INDENT> return position <N... | Ένας παίκτης που παίζει (απαραιτήτως) πρώτος με τα Χ και επιλέγει τις
κινήσεις του σύμφωνα με τις οδηγίες του Έξυπνου Χαρτιού.
Links:
http://pythonies.mysch.gr/ipaper.pdf
http://pythonies.mysch.gr/ipaper-ext.pdf | 62598eea379a373c97d97702 |
class State(Base): <NEW_LINE> <INDENT> __tablename__ = 'states' <NEW_LINE> id = Column(Integer, primary_key=True, nullable=False) <NEW_LINE> name = Column(String(128), nullable=False) | states class | 62598eea8c0ade5d55dc2a08 |
class ExecutionSettings: <NEW_LINE> <INDENT> def __init__(self, digits = def_digits, counterstart = def_counterstart, dest_folder = def_folder, output_level = def_output_level, output_frequency = def_output_frequency, disabled_signatures = [], sourceFiles = [], signatures = None): <NEW_LINE> <INDENT> self.digits = digi... | Maintains the static information about an execution.
@ivar digits: Number of digits for the numerical part of file names for output files.
@ivar counterstart_global: Initial number for numerical part of file names for output files.
@ivar dest_folder: Folder for output files.
@ivar output_level: Indicator for amount of... | 62598eea1f037a2d8b9e2814 |
class TestUser: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.eval_user_path = EVAL_USER_PATH <NEW_LINE> self.evaluation_users = pandas.read_csv(self.eval_user_path)[:2] <NEW_LINE> self.test_apcnn_lstm_model = TestModel() <NEW_LINE> self.eval_user_data_path = EVAL_USER_DATA_PATH <NEW_LINE> <DEDENT> d... | class for uvaluate on classification users | 62598eea66656f66f7d58aee |
@final <NEW_LINE> class WrongNumberVisitor(base.BaseNodeVisitor): <NEW_LINE> <INDENT> _allowed_parents: ClassVar[AnyNodes] = ( *AssignNodesWithWalrus, *FunctionNodes, ast.arguments, ast.List, ast.Dict, ast.Set, ast.Tuple, ) <NEW_LINE> _non_magic_modulo: ClassVar[int] = 10 <NEW_LINE> def visit_Num(self, node: ast.Num) -... | Checks wrong numbers used in the code. | 62598eea851cf427c66b69dc |
class IncludeHandler(socketserver.StreamRequestHandler): <NEW_LINE> <INDENT> def handle(self): <NEW_LINE> <INDENT> statistics.StartTiming() <NEW_LINE> currdir = distcc_pump_c_extensions.RCwd(self.rfile.fileno()) <NEW_LINE> cmd = distcc_pump_c_extensions.RArgv(self.rfile.fileno()) <NEW_LINE> try: <NEW_LINE> <INDENT> try... | Define a handle() method that invokes the include closure algorithm . | 62598eeadd821e528d6d7651 |
class LxdNetworks(BaseModel): <NEW_LINE> <INDENT> name = TextField(help_text="Name of the network") <NEW_LINE> type = TextField(help_text="Type of network") <NEW_LINE> managed = IntegerField(help_text="1 if network created by LXD, 0 otherwise") <NEW_LINE> ipv4_address = TextField(help_text="IPv4 address") <NEW_LINE> ip... | LXD network information.
Examples:
select * from lxd_networks | 62598eeaa17c0f6771d5a960 |
class List(Raw): <NEW_LINE> <INDENT> def __init__(self, cls_or_instance, **kwargs): <NEW_LINE> <INDENT> super(List, self).__init__(**kwargs) <NEW_LINE> error_msg = ("The type of the list elements must be a subclass of " "flask_restful.fields.Raw") <NEW_LINE> if isinstance(cls_or_instance, type): <NEW_LINE> <INDENT> if ... | Field for marshalling lists of other fields.
See :ref:`list-field` for more information.
:param cls_or_instance: The field type the list will contain. | 62598eeae5267d203ee6a013 |
class Condition(object): <NEW_LINE> <INDENT> def __init__(self, value, field=None): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> self.field = field <NEW_LINE> <DEDENT> def get_filter(self, model, field=None): <NEW_LINE> <INDENT> return IMPL.condition_db_filter(model, self._get_field(field), self.value) <NEW_LINE> ... | Class for normal condition values for conditional_update. | 62598eeaf548e778e5969c98 |
class ApplicationGatewayFirewallRuleGroup(Model): <NEW_LINE> <INDENT> _validation = { 'rule_group_name': {'required': True}, 'rules': {'required': True}, } <NEW_LINE> _attribute_map = { 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'rules': {'key': 'ru... | A web application firewall rule group.
:param rule_group_name: The name of the web application firewall rule
group.
:type rule_group_name: str
:param description: The description of the web application firewall rule
group.
:type description: str
:param rules: The rules of the web application firewall rule group.
:ty... | 62598eea3cc13d1c6d463e7d |
class ListMyActivitiesResultSet(ResultSet): <NEW_LINE> <INDENT> def getJSONFromString(self, str): <NEW_LINE> <INDENT> return json.loads(str) <NEW_LINE> <DEDENT> def get_NewAccessToken(self): <NEW_LINE> <INDENT> return self._output.get('NewAccessToken', None) <NEW_LINE> <DEDENT> def get_Response(self): <NEW_LINE> <INDEN... | A ResultSet with methods tailored to the values returned by the ListMyActivities Choreo.
The ResultSet object is used to retrieve the results of a Choreo execution. | 62598eea0a50d4780f703ab3 |
class ReferrerPolicyMiddleware: <NEW_LINE> <INDENT> VALID_REFERRER_POLICIES = [ 'no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'same-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url', ] <NEW_LINE> def __init__(self, get_response): <NEW_LINE> <INDENT> self.get_... | A middleware implementing the Referrer-Policy header.
The value of the header will be read from the SECURE_REFERRER_POLICY setting.
Important:
In Django 3.x, this feature is built-in to the SecurityMiddleware.
After upgrading to Django3, this middleware should be removed.
https://docs.djangoproject.com/en... | 62598eeab7558d5895461d53 |
class FieldType(Enum): <NEW_LINE> <INDENT> String = 0 <NEW_LINE> Number = 1 <NEW_LINE> Radio = 2 | Field type | 62598eea99fddb7c1ca6218b |
class PracticerBehavior(ComponentBehavior): <NEW_LINE> <INDENT> def next_exercise(self, unused_graded_exercises, accumulated_feedback, feedbacked_exercises, used_graded_exercises): <NEW_LINE> <INDENT> raise NotImplementedError | Base class for all practicer behaviors. | 62598eea67a9b606de5446dc |
class GetBucketTaggingInputSet(InputSet): <NEW_LINE> <INDENT> def set_AWSAccessKeyId(self, value): <NEW_LINE> <INDENT> super(GetBucketTaggingInputSet, self)._set_input('AWSAccessKeyId', value) <NEW_LINE> <DEDENT> def set_AWSSecretKeyId(self, value): <NEW_LINE> <INDENT> super(GetBucketTaggingInputSet, self)._set_input('... | An InputSet with methods appropriate for specifying the inputs to the GetBucketTagging
Choreo. The InputSet object is used to specify input parameters when executing this Choreo. | 62598eea97e22403b38395fd |
class ColumnFormat(object): <NEW_LINE> <INDENT> LEFT_JUSTIFY = 0 <NEW_LINE> RIGHT_JUSTIFY = 1 <NEW_LINE> CENTER_JUSTIFY = 2 <NEW_LINE> def __init__(self, strFormat="%s", justify=LEFT_JUSTIFY, span=1): <NEW_LINE> <INDENT> self.format = strFormat <NEW_LINE> self.justify = justify <NEW_LINE> self.span = span | Defines the format string, justification and span for a column. | 62598eea8da39b475be018b9 |
class _RequestCookieAdapter(object): <NEW_LINE> <INDENT> def __init__(self, request): <NEW_LINE> <INDENT> self._request = request <NEW_LINE> <DEDENT> def is_unverifiable(self): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> @property <NEW_LINE> def unverifiable(self): <NEW_LINE> <INDENT> return True <NEW_LINE> <DE... | cookielib.CookieJar support for webob.Request | 62598eeacc40096d6161955e |
class SpreadSheet(object): <NEW_LINE> <INDENT> def __init__(self, url, ): <NEW_LINE> <INDENT> scope = ['https://spreadsheets.google.com/feeds'] <NEW_LINE> credentials = ServiceAccountCredentials.from_json_keyfile_dict(json, scope) <NEW_LINE> gc = gspread.authorize(credentials) <NEW_LINE> self.wks = gc.open_by_url(url) ... | Contains main spreadsheet object and methods required
for error handling and data processing | 62598eea5fc7496912d475f9 |
class HashedPassword(validators.FancyValidator): <NEW_LINE> <INDENT> def _to_python(self, value, state): <NEW_LINE> <INDENT> return hashlib.sha512(value).hexdigest() | Returns sha1 hash of value | 62598eea5fcc89381b2654ad |
class PowerProfileModel(object): <NEW_LINE> <INDENT> def _get_active_powersaving_profile(self): <NEW_LINE> <INDENT> tuned_cmd = ["tuned-adm", "active"] <NEW_LINE> output, error, returncode = run_command(tuned_cmd) <NEW_LINE> if returncode != 0: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> output = output.split()... | The model class to represent a single power saving profile. | 62598eea3d592f4c4edb9604 |
class Regex(Token): <NEW_LINE> <INDENT> compiledREtype = type(re.compile("[A-Z]")) <NEW_LINE> def __init__(self, pattern, flags=0): <NEW_LINE> <INDENT> super(Regex, self).__init__() <NEW_LINE> if isinstance(pattern, basestring): <NEW_LINE> <INDENT> if not pattern: <NEW_LINE> <INDENT> warnings.warn( "null string passed ... | Token for matching strings that match a given regular expression.
Defined with string specifying the regular expression in a form recognized
by the inbuilt Python re module. | 62598eeaa8ecb0332586f8f8 |
class Command(BaseCommand): <NEW_LINE> <INDENT> def add_arguments(self, parser): <NEW_LINE> <INDENT> parser.add_argument('app_name') <NEW_LINE> parser.add_argument("--filename", dest="filename", help="Output filename", default=None, ) <NEW_LINE> <DEDENT> def handle(self, *args, **options): <NEW_LINE> <INDENT> app_name ... | $ python manage.py generate_factories project.app | 62598eea4e4d562566370b28 |
class PartitionResponse(Part): <NEW_LINE> <INDENT> parts = ( ("partition_id", Int32), ("error_code", Int16), ("offsets", Array.of(Int64)), ) | ::
PartitionResponse =>
partition_id => Int32
error_code => Int16
offsets => [Int64] | 62598eead7e4931a7ef3a7af |
class Tcp(JsonObject): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.tcp_dst = kwargs.get("tcp_dst", None) <NEW_LINE> self.tcp_src = kwargs.get("tcp_src", None) | Tcp()
Una representación Pyhton de la cabecera TCP. | 62598eea44b2445a339b5cf0 |
class _Context(object): <NEW_LINE> <INDENT> ContextValue = namedtuple("ContextValue", ["value", "type"]) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self._scopes = [] <NEW_LINE> <DEDENT> def get(self, name: str, expected_type: _ContextType): <NEW_LINE> <INDENT> for scope in reversed(self._scopes): <NEW_LINE> <IN... | Manages scoped context for stored values.
Contexts are helpers for the workload parser. | 62598eea460517430c430b97 |
class SceneDescription(object): <NEW_LINE> <INDENT> def __init__(self, image): <NEW_LINE> <INDENT> self.vpestimator = JLinkageVanishingPointEstimator(image) <NEW_LINE> self.vpestimator.estimate() <NEW_LINE> self._camera_matrix = None <NEW_LINE> print("Detected vanishing points (x,y,z): %s" % self.get_vanishing_points()... | A general purpose scene description which contains all the (usually 3D) information we've able to infer
about the scene captured by the image | 62598eeaf9cc0f698b1c4655 |
class Analysis: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def plotAlleleFrequencies(traitData: list): <NEW_LINE> <INDENT> graphPoints = [[] for _ in range(len(traitData[0]))] <NEW_LINE> key = [traitName for traitName in traitData[0]] <NEW_LINE> for timepoint in traitData: <NEW_LINE> <INDENT> for i in range(len(timep... | A class for storing analytical functions in a convenient namespace. | 62598eea5fdd1c0f98e5c6b0 |
class DummyRoutesMapper: <NEW_LINE> <INDENT> raise_exc = None <NEW_LINE> def __init__(self, route=None, raise_exc=False): <NEW_LINE> <INDENT> self.route = route <NEW_LINE> <DEDENT> def get_route(self, route_name): <NEW_LINE> <INDENT> return self.route | Copied from pyramid.tests.test_url.DummyRoutesMapper | 62598eea56ac1b37e63008fb |
@cros_test_lib.NetworkTest() <NEW_LINE> class MetadataFetchTest(cros_test_lib.TestCase): <NEW_LINE> <INDENT> def testPaladinBuilder(self): <NEW_LINE> <INDENT> bot, version = ('x86-mario-paladin', '5611.0.0') <NEW_LINE> full_version = metadata_lib.FindLatestFullVersion(bot, version) <NEW_LINE> self.assertEqual(full_vers... | Test functions for fetching metadata from GS. | 62598eea85dfad0860cbedef |
class CheckCertificateRequest: <NEW_LINE> <INDENT> sensitive_list = [] <NEW_LINE> openapi_types = { 'instance_id': 'str', 'certificate_id': 'str', 'action_id': 'str', 'body': 'VerifyCertificateDTO' } <NEW_LINE> attribute_map = { 'instance_id': 'Instance-Id', 'certificate_id': 'certificate_id', 'action_id': 'action_id',... | Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition. | 62598eeaa8370b77170eeaf2 |
class TestVnfTag(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 testVnfTag(self): <NEW_LINE> <INDENT> pass | VnfTag unit test stubs | 62598eea4428ac0f6e656c61 |
class Handler: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._handler, self.__image_width, self.__image_height = _bsp_core.open() <NEW_LINE> <DEDENT> def capture(self, payload=None, purpose=PURPOSE_VERIFY, timeout=5): <NEW_LINE> <INDENT> if purpose not in (PURPOSE_VERIFY, PURPOSE_ENROLL): <NEW_LINE> ... | A Nitgen device handler
| 62598eea4f88993c371ef86e |
class Xfs(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): <NEW_LINE> <INDENT> plugin_name = 'xfs' <NEW_LINE> option_list = [("logprint", 'gathers the log information', 'slow', False)] <NEW_LINE> def setup(self): <NEW_LINE> <INDENT> mounts = '/proc/mounts' <NEW_LINE> ext_fs_regex = r"^(/dev/.+).+xfs\s+" <NEW_LINE> fo... | information on the XFS filesystem
| 62598eea4428ac0f6e656c62 |
class MidonetClient(net.NetworkClientMixin, l3.L3ClientMixin, sg.SecurityGroupClientMixin, lb.LoadBalancerClientMixin, bgp.BgpClientMixin, br.BridgeClientMixin, cr.ChainRuleClientMixin, dhcp.DhcpClientMixin, host.HostClientMixin, ipg.IpAddrGroupClientMixin, port.PortClientMixin, pg.PortGroupClientMixin, rtr.RouterClien... | Main MidoNet client class
The main class for MidoNet client. Instantiate this class to make API
calls to MidoNet API. | 62598eea63d6d428bbee0edc |
class Report(object): <NEW_LINE> <INDENT> def __init__(self, messages_df, sender): <NEW_LINE> <INDENT> self._messages_df = messages_df <NEW_LINE> self._sender = sender <NEW_LINE> self._messages = self.get_messages() <NEW_LINE> self._words = self.get_words() <NEW_LINE> <DEDENT> def get_name(self): <NEW_LINE> <INDENT> re... | Class to maintain messages dataframe of a person and report relevant statistics. | 62598eea1f037a2d8b9e2816 |
class SLOJSONRPCError(BaseException): <NEW_LINE> <INDENT> _default_messages = { -32600: 'Invalid Request', -32601: 'Method not found', -32602: 'Invalid params', -32603: 'Internal error', -32700: 'Parse error' } <NEW_LINE> def __init__(self, errorcode, message=None): <NEW_LINE> <INDENT> self.errorcode = errorcode <NEW_L... | Reprents an JSONRPC error code. | 62598eeaadb09d7d5dc08cd7 |
class ArcaneArcherLore(Feature): <NEW_LINE> <INDENT> name = "Arcane Archer Lore" <NEW_LINE> source = "Fighter (Arcane Archer)" | At 3rd level, you learn magical theory or some of the secrets of
nature—typical for practitioners of this elven martial tradition. You
choose to gain proficiency in ei— ther the Arcana or the Nature skill, and
you choose to learn either the prestidigr'tation or the drufdcraft cantrip | 62598eea796e427e5384cea7 |
class BleCommunicationNixFile(BleCommunicationNix): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def start(bt_device=''): <NEW_LINE> <INDENT> log.info("Start reading from file %s", bt_device) <NEW_LINE> handle = open(bt_device, 'rb') <NEW_LINE> return (None, handle) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def stop... | Emulate HCI communication through hcidump by reading hcidump
output from a file | 62598eea91f36d47f223022b |
class site: <NEW_LINE> <INDENT> def __init__(self,id): <NEW_LINE> <INDENT> self.id=id <NEW_LINE> self.lockTable=dict() <NEW_LINE> self.value=dict() <NEW_LINE> for i in range(2,21,2): <NEW_LINE> <INDENT> self.value['x'+str(i)]=10*i <NEW_LINE> <DEDENT> if id%2==0: <NEW_LINE> <INDENT> for i in range(1,20,2): <NEW_LINE> <I... | This class represents an individual site that contains records and lock table. | 62598eea67a9b606de5446de |
class UniqueCharString(String): <NEW_LINE> <INDENT> def to_py(self, value): <NEW_LINE> <INDENT> value = super().to_py(value) <NEW_LINE> if not value: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> if len(set(value)) != len(value): <NEW_LINE> <INDENT> raise configexc.ValidationError( value, "String contains duplica... | A string which may not contain duplicate chars. | 62598eea8da39b475be018bb |
class Post(models.Model): <NEW_LINE> <INDENT> creator = models.ForeignKey( User, related_name='posts', on_delete=models.SET_NULL, null=True, ) <NEW_LINE> creation_date = models.DateTimeField(auto_now_add=True) <NEW_LINE> url = models.URLField() <NEW_LINE> upvotes = models.ManyToManyField(User, through='Upvote') <NEW_LI... | - Post will be set to NULL if user is deleted.
- Post can be voted gte 1 | 62598eea5fcc89381b2654ae |
class Ingredient(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'ingredients' <NEW_LINE> ingredient_id = db.Column(db.Integer, primary_key=True) <NEW_LINE> ingredient_name = db.Column(db.String(100), nullable=False) <NEW_LINE> base_unit = db.Column(db.String(20), nullable=True) <NEW_LINE> ingredient_aisle = db.Column(d... | Ingredient data. | 62598eea4e4d562566370b2a |
class redirect_stderr(_RedirectStream): <NEW_LINE> <INDENT> _stream = "stderr" | Context manager for temporarily redirecting stderr to another file. | 62598eeaa8ecb0332586f8fa |
class Solution(object): <NEW_LINE> <INDENT> def majorityElement(self, nums): <NEW_LINE> <INDENT> count1 = 0 <NEW_LINE> count2 = 0 <NEW_LINE> candidate1 = None <NEW_LINE> candidate2 = None <NEW_LINE> for num in nums: <NEW_LINE> <INDENT> if candidate2 == num: <NEW_LINE> <INDENT> count2 += 1 <NEW_LINE> <DEDENT> elif count... | Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times.
The algorithm should run in linear time and in O(1) space. | 62598eea3317a56b869bd8ee |
class ScanInfo(object): <NEW_LINE> <INDENT> def __init__(self, xml): <NEW_LINE> <INDENT> self.id = int(xml.find('id').text) <NEW_LINE> self.name = xml.find('name').text <NEW_LINE> self.created = int(xml.find('created').text) <NEW_LINE> node = xml.find('finish') <NEW_LINE> self.finish = 0 if node is None else int(node.t... | Information about a scan
:param xml: XML element for a scan info | 62598eea2eb69b55b15a0712 |
class DeviceManager(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._hal_manager = None <NEW_LINE> if dbus: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self._hal_manager = _HALManager() <NEW_LINE> <DEDENT> except dbus.DBusException: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> <DEDENT> <DEDEN... | DeviceManager is responsible for interacting with hardware devices.
It optionally uses HAL to probe the system | 62598eea76e4537e8c3edcc9 |
class Stripe(Volume): <NEW_LINE> <INDENT> def __init__(self, size, volumes): <NEW_LINE> <INDENT> self.type = PNFS_BLOCK_VOLUME_STRIPE <NEW_LINE> self.id = getid(self) <NEW_LINE> self.stripe_unit = size <NEW_LINE> self.volumes = volumes <NEW_LINE> self._size = sum([v._size for v in volumes]) <NEW_LINE> <DEDENT> def get_... | Stripe of several volumes, all of the same size. | 62598eea26068e7796d4b06c |
class UnionFind2: <NEW_LINE> <INDENT> def __init__(self, n): <NEW_LINE> <INDENT> self.fa = [i for i in range(n)] <NEW_LINE> self.size = [1 for _ in range(n)] <NEW_LINE> <DEDENT> def find(self, x): <NEW_LINE> <INDENT> if self.fa[x] != x: <NEW_LINE> <INDENT> self.fa[x] = self.find(self.fa[x]) <NEW_LINE> <DEDENT> return s... | 带有"以某个节点为根节点的 节点数量统计 功能的并查集实现 | 62598eea4428ac0f6e656c63 |
class ProctoredExamStudentAttemptAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> readonly_fields = [ 'user', 'proctored_exam', 'started_at', 'completed_at', 'last_poll_timestamp', 'last_poll_ipaddr', 'attempt_code', 'external_id', 'allowed_time_limit_mins', 'taking_as_proctored', 'is_sample_attempt', 'student_name', 'revi... | Admin panel for Proctored Exam Attempts | 62598eeae64d504609df8747 |
class Deliberation(Act): <NEW_LINE> <INDENT> INITIATIVE_TYPES = Choices( ('COUNSELOR', 'counselor', _('Counselor')), ('PRESIDENT', 'president', _('President')), ('ASSESSOR', 'assessor', _('City Government Member')), ('GOVERNMENT', 'government', _('City Government')), ('MAYOR', 'mayor', _('Mayor')), ) <NEW_LINE> FINAL_S... | WRITEME | 62598eea167d2b6e312b56aa |
class _MultiIDRemapper: <NEW_LINE> <INDENT> def __init__(self, base_id, all_parents): <NEW_LINE> <INDENT> self._base_id = base_id <NEW_LINE> self._parents = all_parents <NEW_LINE> <DEDENT> def remap_id(self, feature_dict): <NEW_LINE> <INDENT> rstart, rend = feature_dict['location'] <NEW_LINE> for index, parent in enume... | Provide an ID remapping for cases where a parent has a non-unique ID.
Real life GFF3 cases have non-unique ID attributes, which we fix here
by using the unique sequence region to assign children to the right
parent. | 62598eea851cf427c66b69de |
class ldap_user: <NEW_LINE> <INDENT> def __init__(self, id, dn, cn, description, parent, childs, cached): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.dn = dn <NEW_LINE> self.cn= cn <NEW_LINE> self.description = description <NEW_LINE> self.parent = parent <NEW_LINE> self.childs = childs <NEW_LINE> self.cached = cac... | Defines a ldap_user. | 62598eea63d6d428bbee0ede |
class Thread(models.Model): <NEW_LINE> <INDENT> forum = models.ForeignKey(Forum) <NEW_LINE> title = models.CharField(max_length=100) <NEW_LINE> sticky = models.NullBooleanField(blank=True, null=True) <NEW_LINE> closed = models.NullBooleanField(blank=True, null=True) <NEW_LINE> posts = models.IntegerField(default=0) <NE... | A Thread belongs in a Forum, and is a collection of posts.
Threads can be closed or stickied which alter their behaviour
in the thread listings. Again, the posts & views fields are
automatically updated with saving a post or viewing the thread. | 62598eea7d847024c075aadf |
class IField(zope.interface.Interface): <NEW_LINE> <INDENT> __name__ = zope.interface.Attribute('internal field name') <NEW_LINE> interface = zope.interface.Attribute('interface the field belongs to') <NEW_LINE> type = zope.schema.Choice( title=_(u'type'), source=icemac.addressbook.sources.FieldTypeSource()) <NEW_LINE>... | User defined field. | 62598eea2c8b7c6e89bd1ed1 |
class PathAnalysis(object): <NEW_LINE> <INDENT> def __init__(self, system): <NEW_LINE> <INDENT> self._system = system <NEW_LINE> <DEDENT> def graph(self, objects=None): <NEW_LINE> <INDENT> system = self._system <NEW_LINE> G = nx.DiGraph() <NEW_LINE> for sort in objects: <NEW_LINE> <INDENT> nodes = (obj.name for obj in ... | Path analysis.
| 62598eeadd821e528d6d7655 |
class TestCertificateWinRM(base.BaseTestCase): <NEW_LINE> <INDENT> def test_winrm_certificate_auth(self): <NEW_LINE> <INDENT> cert_pem = pkg_resources.resource_filename( "argus.resources", "cert.pem") <NEW_LINE> cert_key = pkg_resources.resource_filename( "argus.resources", "key.pem") <NEW_LINE> client = self._backend.... | Test that WinRM certificate authentication works as expected. | 62598eea07f4c71912badb66 |
class XMLTranslator(object): <NEW_LINE> <INDENT> def translate(self, xml_dir, xml_index): <NEW_LINE> <INDENT> if not os.path.isdir(xml_dir): <NEW_LINE> <INDENT> LOG.error("'{}' is not a directory.".format(xml_dir)) <NEW_LINE> return True <NEW_LINE> <DEDENT> index_path = join(xml_dir, xml_index) <NEW_LINE> if not os.pat... | Translates STEP XML files to JSON | 62598eeafff4ab517ebcbee8 |
class UpSampling3D(Layer): <NEW_LINE> <INDENT> def __init__(self, size=(2, 2, 2), dim_ordering=K.image_dim_ordering(), **kwargs): <NEW_LINE> <INDENT> if K._BACKEND != 'theano': <NEW_LINE> <INDENT> raise Exception(self.__class__.__name__ + ' is currently only working with Theano backend.') <NEW_LINE> <DEDENT> self.size ... | Repeat the first, second and third dimension of the data
by size[0], size[1] and size[2] respectively.
Note: this layer will only work with Theano for the time being.
# Arguments
size: tuple of 3 integers. The upsampling factors for dim1, dim2 and dim3.
dim_ordering: 'th' or 'tf'.
In 'th' mode, the ch... | 62598eeaaad79263cf42cf1c |
class TestOptionalsDisallowLongAbbreviation(ParserTestCase): <NEW_LINE> <INDENT> parser_signature = Sig(allow_abbrev=False) <NEW_LINE> argument_signatures = [ Sig('--foo'), Sig('--foodle', action='store_true'), Sig('--foonly'), ] <NEW_LINE> failures = ['-foon 3', '--foon 3', '--food', '--food --foo 2'] <NEW_LINE> succe... | Do not allow abbreviations of long options at all | 62598eea6e29344779afed46 |
class PartnerListingAjax(http.Controller, SearchFormControllerMixin): <NEW_LINE> <INDENT> @http.route([ '/partnersAjax', '/partnersAjax/page/<int:page>', ], type='http', auth="public", website=True) <NEW_LINE> def list(self, **kw): <NEW_LINE> <INDENT> model = 'res.partner' <NEW_LINE> return self.make_response(model, **... | Partner search form controller. | 62598eea0c0af96317c54aaa |
class HostViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Host.objects.all() <NEW_LINE> serializer_class = HostSerializer <NEW_LINE> permission_classes = [IsOwnerOrReadOnly, ] <NEW_LINE> def perform_create(self, serializer): <NEW_LINE> <INDENT> serializer.save(self.request.user) | This Viewset Automatically Provides Actions:
- GET: list
- POST: create
- PUT: update
- DELETE:destroy | 62598eead486a94d0ba2a6e0 |
class Family(family.Family): <NEW_LINE> <INDENT> name = 'osm' <NEW_LINE> langs = {'en': 'wiki.openstreetmap.org'} <NEW_LINE> def protocol(self, code): <NEW_LINE> <INDENT> return "https" | Family class for OpenStreetMap wiki. | 62598eea091ae3566870332a |
class TestAchPreAuthTransaction(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 testAchPreAuthTransaction(self): <NEW_LINE> <INDENT> pass | AchPreAuthTransaction unit test stubs | 62598eead7e4931a7ef3a7b2 |
class AuthTokenSerializer(serializers.Serializer): <NEW_LINE> <INDENT> email = serializers.CharField() <NEW_LINE> password = serializers.CharField( style={'input_type': 'password'}, trim_whitespace=False ) <NEW_LINE> def validate(self, attrs): <NEW_LINE> <INDENT> email = attrs.get('email') <NEW_LINE> password = attrs.g... | Serializer for the user authentication object | 62598eeaf9cc0f698b1c4657 |
class InquiryAPI(BaseAPI): <NEW_LINE> <INDENT> model = ActionExecutionDB <NEW_LINE> schema = { "title": "Inquiry", "description": "Record of an Inquiry", "type": "object", "properties": { "id": {"type": "string", "required": True}, "route": {"type": "string", "default": "", "required": True}, "ttl": {"type": "integer",... | Model for working with Inquiries within the API controller
Please see InquiryResponseAPI for a model more appropriate for API
responses. This model contains fields that do not comply with the API
spec. | 62598eea009cb60464cffc61 |
class Enum(object): <NEW_LINE> <INDENT> def __init__(self, *args): <NEW_LINE> <INDENT> keys, values = [], [] <NEW_LINE> for entry in args: <NEW_LINE> <INDENT> if isinstance(entry, str): <NEW_LINE> <INDENT> key, val = entry, stem.util.str_tools.to_camel_case(entry) <NEW_LINE> <DEDENT> elif isinstance(entry, tuple) and l... | Basic enumeration. | 62598eeacc0a2c1114479716 |
class bars_spinner_v(simple_spinner): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.choices = "▁ ▂ ▃ ▄ ▅ ▆ ▇ █ ▇ ▆ ▅ ▄ ▃ ▁".split(' ') | Indeterminate growing bars spinner | 62598eeaa8370b77170eeaf6 |
@dataclass <NEW_LINE> class User(Base): <NEW_LINE> <INDENT> id: int <NEW_LINE> is_bot: bool <NEW_LINE> first_name: str <NEW_LINE> last_name: Optional[str] = None <NEW_LINE> username: Optional[str] = None <NEW_LINE> language_code: Optional[str] = None <NEW_LINE> can_join_groups: Optional[bool] = None <NEW_LINE> can_read... | This object represents a Telegram user or bot. | 62598eea56ac1b37e6300900 |
class CommandAssemblyAdd: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def Activated(self): <NEW_LINE> <INDENT> info("This command will, in the future, add an assembly to a Document") <NEW_LINE> <DEDENT> def GetResources(self): <NEW_LINE> <INDENT> icon = join(dirname(__file__), "... | AssemblyAddCommand
Command to add an assembly to a Part | 62598eea4f88993c371ef870 |
class EzvizSensor(CoordinatorEntity, SensorEntity): <NEW_LINE> <INDENT> coordinator: EzvizDataUpdateCoordinator <NEW_LINE> def __init__( self, coordinator: EzvizDataUpdateCoordinator, idx: int, name: str, sensor_type_name: str, ) -> None: <NEW_LINE> <INDENT> super().__init__(coordinator) <NEW_LINE> self._idx = idx <NEW... | Representation of a Ezviz sensor. | 62598eea379a373c97d97709 |
class DescribeCcnRoutesResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TotalCount = None <NEW_LINE> self.RouteSet = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.TotalCount = params.get("TotalCount") <NEW_LINE... | DescribeCcnRoutes返回参数结构体
| 62598eea63d6d428bbee0ee0 |
class NamedLock(Record, fromTable(LockSchema.NAMED_LOCK)): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def acquire(cls, txn, name): <NEW_LINE> <INDENT> def autoRelease(self): <NEW_LINE> <INDENT> txn.preCommit(lambda: self.release(True)) <NEW_LINE> return self <NEW_LINE> <DEDENT> return cls.create(txn, lockName=name).ad... | An L{AcquiredLock} lock against a shared data store that the current
process holds via the referenced transaction. | 62598eeaadb09d7d5dc08cdb |
class PriceTier(BaseModel, CapacityMixin): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> name = db.Column(db.String, nullable=False) <NEW_LINE> product_id = db.Column(db.Integer, db.ForeignKey(Product.id), nullable=False) <NEW_LINE> personal_limit = db.Column(db.Integer, default=10, nullab... | A pricing level for a Product.
PriceTiers have a capacity and an expiry through the CapacityMixin.
They have one Price object per currency.
In theory PriceTiers could cascade based on price, but this is problematic
with popular products as we need to update the customer each time.
For now, only one PriceTier is activ... | 62598eea3cc13d1c6d463e83 |
class GoodsImage(models.Model): <NEW_LINE> <INDENT> goods = models.ForeignKey(Goods, verbose_name='商品', related_name='images', on_delete=models.CASCADE) <NEW_LINE> image = models.ImageField(upload_to='brands/', verbose_name='图片', null=True, blank=True) <NEW_LINE> add_time = models.DateTimeField(default=datetime.now, ve... | 商品图片 | 62598eea7d43ff2487426785 |
class PackageComponent(object): <NEW_LINE> <INDENT> def __init__(self, packages, deps): <NEW_LINE> <INDENT> self._packages = packages <NEW_LINE> self._deps = deps <NEW_LINE> <DEDENT> def __call__(self, handles): <NEW_LINE> <INDENT> if isinstance(handles, basestring): <NEW_LINE> <INDENT> handles = uncommafy(handles) <NE... | A package is a special kind of dependency. It can refer to
scripts, stylesheets, other packages, and even contain some
javascript code.
During application initialization you can define a package like this::
deps.package('deform', libs='deform', css='deform',
script='alert("Spam!");', deps='another_packag... | 62598eea0a50d4780f703ab9 |
class PopularTopics: <NEW_LINE> <INDENT> def __init__(self, index_dir, analyzer): <NEW_LINE> <INDENT> self.searcher = Searcher(index_dir, analyzer) <NEW_LINE> <DEDENT> def dict_append(self, entity, f_dist): <NEW_LINE> <INDENT> entity = ' '.join(entity) <NEW_LINE> if entity not in f_dist: <NEW_LINE> <INDENT> f_dist[enti... | Retrieves popular research topics for given year. | 62598eea435de62698e9a4e8 |
class StatusMixin(object): <NEW_LINE> <INDENT> @declared_attr <NEW_LINE> def status(self): <NEW_LINE> <INDENT> self.Status = type( '{0:s}Status'.format(self.__name__), (Status, BaseModel,), dict( __tablename__='{0:s}_status'.format(self.__tablename__), parent_id=Column( Integer, ForeignKey('{0:s}.id'.format(self.__tabl... | A MixIn for generating the necessary tables in the database and to make
it accessible from the parent model object (the model object that uses this
MixIn, i.e. the object that the status is added to). | 62598eeaa219f33f346c4f4e |
class BRCPFField(CharField): <NEW_LINE> <INDENT> description = _("CPF Document") <NEW_LINE> default_error_messages = { 'invalid': _("Invalid CPF number."), 'max_digits': _("This field requires at most 11 digits or 14 characters."), } <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> kwargs['max_length... | A model field for the brazilian document named of CPF (Cadastro de Pessoa Física)
.. versionadded:: 2.2 | 62598eea7b25080760ed5bad |
class LocationAwareAttention(tf.contrib.seq2seq.BahdanauAttention): <NEW_LINE> <INDENT> def __init__(self, num_units, numfilt, filtersize, memory, memory_sequence_length=None, normalize=False, probability_fn=None, score_mask_value=float("-inf"), name='LocationAwareAttention'): <NEW_LINE> <INDENT> super(LocationAwareAtt... | attention mechanism that is location aware | 62598eeaa17c0f6771d5a967 |
@implements_to_string <NEW_LINE> class Actor(object): <NEW_LINE> <INDENT> data = {} <NEW_LINE> def __init__(self, mirror, data, show): <NEW_LINE> <INDENT> self.mirror, self.show = mirror, show <NEW_LINE> self.data = InsensitiveDictionary(ignore_case=show.api.config['ignore_case'], **data) <NEW_LINE> self.data['image_ur... | Representing an Actor as provided by `thetvdb.com <http://thetvdb.com>`_.
It Will contain all attributes as delivered from
`thetvdb.com <http://thetvdb.com>`_, the attributes are described in
more detail `here <http://www.thetvdb.com/wiki/index.php/API:actors.xml>`_.
Example::
>>> from pytvdbapi import api
>>... | 62598eea6e29344779afed48 |
class TDSDeployConfig(TDSConfig): <NEW_LINE> <INDENT> default_name_fragment = 'deploy' <NEW_LINE> schema = { 'env': ['environment', ], 'logging': ['syslog_facility', 'syslog_priority', ], 'notifications': ['enabled_methods', 'email', 'hipchat', 'validation_time', ], 'repo': ['build_base', 'incoming', 'processing', ], }... | Handle TDS deployment configuration file | 62598eea925a0f43d25e6743 |
class Solution: <NEW_LINE> <INDENT> def minPathSum(self, grid): <NEW_LINE> <INDENT> if grid is None or len(grid) == 0: <NEW_LINE> <INDENT> return -1 <NEW_LINE> <DEDENT> if grid[0] is None or len(grid[0]) == 0: <NEW_LINE> <INDENT> return -1 <NEW_LINE> <DEDENT> rows = len(grid) <NEW_LINE> cols = len(grid[0]) <NEW_LINE> f... | @param grid: a list of lists of integers
@return: An integer, minimizes the sum of all numbers along its path | 62598eeabe8e80087fbbd763 |
class RedisPythonModuleMissing(Exception): <NEW_LINE> <INDENT> pass | Raise for my specific kind of exception | 62598eea2eb69b55b15a0714 |
class HumanHasher(object): <NEW_LINE> <INDENT> def __init__(self, wordlist=DEFAULT_WORDLIST): <NEW_LINE> <INDENT> if len(wordlist) != 256: <NEW_LINE> <INDENT> raise ValueError("Wordlist must have exactly 256 items") <NEW_LINE> <DEDENT> self.wordlist = wordlist <NEW_LINE> <DEDENT> def humanize_list(self, hexdigest, word... | Transforms hex digests to human-readable strings.
The format of these strings will look something like:
`victor-bacon-zulu-lima`. The output is obtained by compressing the input
digest to a fixed number of bytes, then mapping those bytes to one of 256
words. A default wordlist is provided, but you can override this if... | 62598eeacb5e8a47e493b503 |
class Gather(TwiML): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(Gather, self).__init__(**kwargs) <NEW_LINE> self.name = 'Gather' <NEW_LINE> <DEDENT> def say(self, message, voice=None, loop=None, language=None, **kwargs): <NEW_LINE> <INDENT> return self.nest(Say( message, voice=voice, lo... | <Gather> TwiML Verb | 62598eea71ff763f4b5e5e71 |
class RegistroC501(Registro): <NEW_LINE> <INDENT> campos = [ CampoFixo(1, 'REG', 'C501'), CampoNumerico(2, 'CST_PIS', obrigatorio=True), CampoNumerico(3, 'VL_ITEM', obrigatorio=True), Campo(4, 'NAT_BC_CRED'), CampoNumerico(5, 'VL_BC_PIS', obrigatorio=True), CampoNumerico(6, 'ALIQ_PIS', obrigatorio=True), CampoNumerico(... | Complemento da operação (Códigos 06, 28 e 29) – PIS/PASEP | 62598eeaa79ad16197768731 |
@implementer(IVocabularyFactory) <NEW_LINE> class HarvesterVocabulary(BaseContentTypeVocabularyNoPkanState): <NEW_LINE> <INDENT> portal_type = constants.CT_HARVESTER | A vocabulary returning Harvester items. | 62598eeaf9cc0f698b1c4658 |
class Photo(models.Model): <NEW_LINE> <INDENT> photo_id = models.CharField(primary_key=True, max_length=100) <NEW_LINE> username = models.CharField(max_length=100) <NEW_LINE> user_avatar_url = models.URLField(null=True) <NEW_LINE> photo_url = models.URLField(null=True) <NEW_LINE> created_time = models.DateTimeField(nul... | Model for Photo detail | 62598eea56b00c62f0fb0fe5 |
class DruidCluster(Model, AuditMixinNullable): <NEW_LINE> <INDENT> __tablename__ = 'clusters' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> cluster_name = Column(String(250), unique=True) <NEW_LINE> coordinator_host = Column(String(255)) <NEW_LINE> coordinator_port = Column(Integer) <NEW_LINE> coordinato... | ORM object referencing the Druid clusters | 62598eea32920d7e50bc4741 |
class CartanType(CartanType_standard_finite, CartanType_simply_laced, CartanType_simple): <NEW_LINE> <INDENT> def __init__(self, n): <NEW_LINE> <INDENT> assert n >= 0 <NEW_LINE> CartanType_standard_finite.__init__(self, "A", n) <NEW_LINE> <DEDENT> def _latex_(self): <NEW_LINE> <INDENT> return "A_{%s}"%self.n <NEW_LINE>... | Cartan Type `A_n`
.. SEEALSO:: :func:`~sage.combinat.root_systems.cartan_type.CartanType` | 62598eea2c8b7c6e89bd1ed5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.