code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class ResolveSavingConflictOperation(object): <NEW_LINE> <INDENT> def execute(self, *args, **kwargs): <NEW_LINE> <INDENT> changelist_number = kwargs['changelist_number'] <NEW_LINE> perforce.resolve_save_conflict(changelist_number=changelist_number) | Save the conflicts | 6259902c925a0f43d25e905f |
class IdentityAwareProxy(_messages.Message): <NEW_LINE> <INDENT> enabled = _messages.BooleanField(1) <NEW_LINE> oauth2ClientId = _messages.StringField(2) <NEW_LINE> oauth2ClientSecret = _messages.StringField(3) <NEW_LINE> oauth2ClientSecretSha256 = _messages.StringField(4) | Identity-Aware Proxy
Fields:
enabled: Whether the serving infrastructure will authenticate and
authorize all incoming requests.If true, the oauth2_client_id and
oauth2_client_secret fields must be non-empty.
oauth2ClientId: OAuth2 client ID to use for the authentication flow.
oauth2ClientSecret: OAuth2 c... | 6259902c5166f23b2e2443ee |
class Logger(object): <NEW_LINE> <INDENT> _attrs_to_log = [ "time_this_iter_s", "mean_loss", "mean_accuracy", "episode_reward_mean", "episode_len_mean"] <NEW_LINE> def __init__(self, config, logdir, upload_uri=None): <NEW_LINE> <INDENT> self.config = config <NEW_LINE> self.logdir = logdir <NEW_LINE> self.uri = upload_u... | Logging interface for ray.tune; specialized implementations follow.
By default, the UnifiedLogger implementation is used which logs results in
multiple formats (TensorBoard, rllab/viskit, plain json) at once. | 6259902cd53ae8145f91947b |
class EVENt(SCPINode, SCPIQuery): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> _cmd = "EVENt" <NEW_LINE> args = [] | STATus:QUEStionable:BERT:EVENt
Arguments: | 6259902c287bf620b6272bff |
class AudioFile: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swaggerTypes = { 'attributionUrl': 'str', 'commentCount': 'int', 'voteCount': 'int', 'fileUrl': 'str', 'audioType': 'str', 'id': 'int', 'duration': 'float', 'attributionText': 'str', 'createdBy': 'str', 'description': 'str', 'createdAt': ... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 6259902c56b00c62f0fb38d9 |
class RemoveRedundantAssign(object): <NEW_LINE> <INDENT> def __init__(self, interp): <NEW_LINE> <INDENT> self.interp = interp <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> for blkid, blk in utils.iteritems(self.interp.blocks): <NEW_LINE> <INDENT> self.run_block(blk) <NEW_LINE> <DEDENT> <DEDENT> def run_block(s... | Turn assignment pairs into one assignment | 6259902c1d351010ab8f4b30 |
class ProberThread(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, thread_requests, thread_responses, threads_busy_lock): <NEW_LINE> <INDENT> super(ProberThread, self).__init__() <NEW_LINE> self.daemon = True <NEW_LINE> self.thread_requests = thread_requests <NEW_LINE> self.thread_responses = thread_responses... | Prober thread, consumes probe requests from thread requests queue,
runs associated code and puts result onto thread responses queue. | 6259902cd6c5a102081e313f |
class CFEExchangeCalendar(MarketCalendar): <NEW_LINE> <INDENT> aliases = ['CFE', "CBOE_Futures"] <NEW_LINE> regular_market_times = { "market_open": ((None, time(8, 30)),), "market_close": ((None, time(15, 15)),) } <NEW_LINE> @property <NEW_LINE> def name(self): <NEW_LINE> <INDENT> return "CFE" <NEW_LINE> <DEDENT> @prop... | Exchange calendar for the CBOE Futures Exchange (CFE).
http://cfe.cboe.com/aboutcfe/expirationcalendar.aspx
Open Time: 8:30am, America/Chicago
Close Time: 3:15pm, America/Chicago
(We are ignoring extended trading hours for now) | 6259902c6fece00bbaccc9c8 |
class Configuration(object): <NEW_LINE> <INDENT> DEV_CONFIG = "config/development.yaml" <NEW_LINE> PROD_CONFIG = "config/production.yaml" <NEW_LINE> @staticmethod <NEW_LINE> def for_env(environment_name): <NEW_LINE> <INDENT> if environment_name == "production": <NEW_LINE> <INDENT> file = Configuration.PROD_CONFIG <NEW... | Configuration object to provide config from file for environment | 6259902c796e427e5384f796 |
class RegionGrowing(base.SegmentationFunction): <NEW_LINE> <INDENT> def __init__(self, input_image): <NEW_LINE> <INDENT> return super().__init__(input_image) <NEW_LINE> <DEDENT> def get_result(self, parameters_vector): <NEW_LINE> <INDENT> return region_growing(self._input_image, (parameters_vector[0], parameters_vector... | Klasa przeprowadzająca rozrost obszaru w języku Python | 6259902c8e05c05ec3f6f668 |
class _VariableCapturingScope(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.variables = {} <NEW_LINE> self.tf_variables = {} <NEW_LINE> <DEDENT> @contextlib.contextmanager <NEW_LINE> def capturing_scope(self): <NEW_LINE> <INDENT> def _custom_getter(getter=None, name=None, shape=None, dtype=d... | Variable-scope-like object which captures tf.get_variable calls.
This is responsible for the main difference between the initialization version
of a function object and the calling version of a function object.
capturing_scope replaces calls to tf.get_variable with placeholder tensors to
be fed the variable's current... | 6259902c507cdc57c63a5dc1 |
class Brazzaville(DstTzInfo): <NEW_LINE> <INDENT> _zone = 'Africa/Brazzaville' <NEW_LINE> _utc_transition_times = [ d(1,1,1,0,0,0), d(1911,12,31,22,58,52), ] <NEW_LINE> _transition_info = [ i(3660,0,'LMT'), i(3600,0,'WAT'), ] | Africa/Brazzaville timezone definition. See datetime.tzinfo for details | 6259902c5e10d32532ce4110 |
class ParamPlants(object): <NEW_LINE> <INDENT> swagger_types = { 'piid': 'str' } <NEW_LINE> attribute_map = { 'piid': 'piid' } <NEW_LINE> def __init__(self, piid=None): <NEW_LINE> <INDENT> self._piid = None <NEW_LINE> if piid is not None: <NEW_LINE> <INDENT> self.piid = piid <NEW_LINE> <DEDENT> <DEDENT> @property <NEW_... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 6259902c5166f23b2e2443f0 |
class JSONEncodedDict(db.TypeDecorator): <NEW_LINE> <INDENT> impl = db.VARCHAR <NEW_LINE> def process_bind_param(self, value, dialect): <NEW_LINE> <INDENT> if value is not None: <NEW_LINE> <INDENT> value = json.dumps(value) <NEW_LINE> <DEDENT> return value <NEW_LINE> <DEDENT> def process_result_value(self, value, diale... | Represents an immutable structure as a json-encoded string. | 6259902c26238365f5fadb6b |
class Evento(models.Model): <NEW_LINE> <INDENT> titulo = models.CharField('Título', max_length = 120, unique = True,blank = False, null = False) <NEW_LINE> slug = models.SlugField(max_length = 120, unique = True,help_text = 'unico Valor',editable=False) <NEW_LINE> fecha_inicio = models.DateTimeField('Fecha de Inicio',b... | Modelo que representa el tipo de contenido Noticias | 6259902cd4950a0f3b11164a |
class Order(enum.IntEnum): <NEW_LINE> <INDENT> FIRST = job_pb2.FIRST <NEW_LINE> LAST = job_pb2.LAST <NEW_LINE> REVERSE = job_pb2.REVERSE | Represents the order of a layer. | 6259902c711fe17d825e14a7 |
class PodiumFriendshipsAPI(object): <NEW_LINE> <INDENT> def __init__(self, token): <NEW_LINE> <INDENT> self.token = token <NEW_LINE> <DEDENT> def get(self, *args, **kwargs): <NEW_LINE> <INDENT> make_friendship_get(self.token, *args, **kwargs) <NEW_LINE> <DEDENT> def list(self, *args, **kwargs): <NEW_LINE> <INDENT> make... | Object that handles friendship requests and keeps track of the
authentication token necessary to do so. Usually accessed via
PodiumAPI object.
**Attributes:**
**token** (PodiumToken): The token for the logged in user. | 6259902cd6c5a102081e3141 |
class TestZwave(unittest.TestCase): <NEW_LINE> <INDENT> def test_device_config_glob_is_ordered(self): <NEW_LINE> <INDENT> conf = CONFIG_SCHEMA( {'zwave': {CONF_DEVICE_CONFIG_GLOB: OrderedDict()}}) <NEW_LINE> self.assertIsInstance( conf['zwave'][CONF_DEVICE_CONFIG_GLOB], OrderedDict) | Test zwave init. | 6259902c30c21e258be99827 |
class FriendlyEmail(EmailMultiAlternatives): <NEW_LINE> <INDENT> content_subtype = 'html' <NEW_LINE> def has_text_alternative(self): <NEW_LINE> <INDENT> for content, mimetype in self.alternatives: <NEW_LINE> <INDENT> if mimetype in ('text', 'text/plain'): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> <DEDENT> ret... | Treat this as an HTML email and it will automatically generate a text alternative | 6259902c3eb6a72ae038b681 |
class GTreeNodeBase(object): <NEW_LINE> <INDENT> __slots__ = ["parent", "childs"] <NEW_LINE> def __init__(self, parent, childs=None): <NEW_LINE> <INDENT> self.parent = parent <NEW_LINE> self.childs = [] <NEW_LINE> if childs is not None: <NEW_LINE> <INDENT> if type(childs) != list: <NEW_LINE> <INDENT> utils.raiseExcepti... | GTreeNodeBase Class - The base class for the node tree genomes
:param parent: the parent node of the node
:param childs: the childs of the node, must be a list of nodes
.. versionadded:: 0.6
Added the *GTreeNodeBase* class | 6259902c8e05c05ec3f6f669 |
@final <NEW_LINE> class _ClassVisitor(ast.NodeVisitor): <NEW_LINE> <INDENT> def __init__(self, transformer: NamingChecker) -> None: <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.transformer = transformer <NEW_LINE> <DEDENT> def visit_ClassDef(self, node: ast.ClassDef) -> None: <NEW_LINE> <INDENT> self.transfor... | Used to set method types inside classes. | 6259902cc432627299fa4010 |
class DatastoreBackend: <NEW_LINE> <INDENT> def __init__(self, kind_name="Secrets", key_name="secrets", namespace=None, project_id=None): <NEW_LINE> <INDENT> self.kind_name = kind_name <NEW_LINE> self.key_name = key_name <NEW_LINE> self.namespace = namespace or "" <NEW_LINE> self.project = project_id <NEW_LINE> <DEDENT... | Secret storage backend for Google Cloud Datastore.
Secret values are stored as properties on a single datastore
entity.
Usage:
# settings.py
from djangae.contrib import secrets
MY_SECRETS = secrets.get(backend=secrets.DatastoreBackend())
SECRET_KEY = MY_SECRETS.secret_key | 6259902c5166f23b2e2443f2 |
class MdtestBase(DfuseTestBase): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self.mdtest_cmd = None <NEW_LINE> self.processes = None <NEW_LINE> self.hostfile_clients_slots = None <NEW_LINE> <DEDENT> def setUp(self): <NEW_LINE> <INDENT> self.u... | Base mdtest class.
:avocado: recursive | 6259902c287bf620b6272c03 |
class DIBELS(models.Model): <NEW_LINE> <INDENT> f_id1 = models.ForeignKey(Demographics) <NEW_LINE> test_id = models.TextField(default='DIBELS') <NEW_LINE> test_name = models.TextField() <NEW_LINE> date = models.TextField() <NEW_LINE> result = models.TextField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> unique_together... | DIBELS test table representation
[0] name
[1] id1
[2] id2
[3] Test Name
[4] Date taken
[5] school
[6] grade lvl
[7] Benchmark | Strategic | Intensive | 6259902c73bcbd0ca4bcb2ae |
class Storage(object): <NEW_LINE> <INDENT> def get(self, key): <NEW_LINE> <INDENT> raise NotImplementedError('%s.get is not implemented' % self.__class__.__name__) <NEW_LINE> <DEDENT> def put(self, key, data): <NEW_LINE> <INDENT> raise NotImplementedError('%s.put is not implemented' % self.__class__.__name__) <NEW_LINE... | Abstract class defining the interface for Storage classes. | 6259902c30c21e258be99828 |
class Nd4(ShapeFunction): <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._shape = "ND" <NEW_LINE> self._name = "ND4" <NEW_LINE> self._n_dof = 1 <NEW_LINE> self._n_node = 4 <NEW_LINE> self._n_intgp = 3 <NEW_LINE> self._weight = np.array( [ 0.555555555555556, 0.8888... | Nd4 (4-node element) class inheriting class: ShapeFunction | 6259902c0a366e3fb87dda04 |
class Colony: <NEW_LINE> <INDENT> colonies = {} <NEW_LINE> def __new__(cls, player: Player, planet: Planet, **kwargs): <NEW_LINE> <INDENT> unique_index = (player, planet) <NEW_LINE> if unique_index in cls.colonies: <NEW_LINE> <INDENT> return cls.colonies[unique_index] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> insta... | Fabrique pour éviter les doublons | 6259902ce76e3b2f99fd9a29 |
class AccountSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> password = serializers.CharField(write_only=True, required=False) <NEW_LINE> confirm_password = serializers.CharField(write_only=True, required=False) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Account <NEW_LINE> fields = ( 'id', 'email',... | Instead of including password in the fields tuple, we explicitly define the field at the top of this class. The
reason we do this is so we can pass the required=False argument. Each field in fields is required, but we don't
want to update the user's password unless they provide a new one.
confirm_pssword is similar to... | 6259902c8e05c05ec3f6f66a |
class EmailBackend(SmtpEmailBackend): <NEW_LINE> <INDENT> def _send(self, email_message): <NEW_LINE> <INDENT> if not email_message.recipients(): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> from_email = sanitize_address( email_message.from_email, email_message.encoding) <NEW_LINE> recipients = [sanitize_address... | Email backend that sends all emails to a defined address, no matter what
the recipient really is.
In order to use it, set this in your local_settings.py::
EMAIL_BACKEND = 'django_libs.test_email_backend.EmailBackend'
TEST_EMAIL_BACKEND_RECIPIENTS = (
('Name', 'email@gmail.com'),
) | 6259902c5e10d32532ce4112 |
class RotatingAvatar(OrientedSprite, MovingAvatar): <NEW_LINE> <INDENT> draw_arrow = True <NEW_LINE> speed = 0 <NEW_LINE> def update(self, game): <NEW_LINE> <INDENT> actions = self._readMultiActions(game) <NEW_LINE> if UP in actions: <NEW_LINE> <INDENT> self.speed = 1 <NEW_LINE> <DEDENT> elif DOWN in actions: <NEW_LINE... | Avatar retains its orientation, and moves forward/backward or rotates
relative to that. | 6259902c1f5feb6acb163c0e |
class ParallelThreadsAvailableNode(AtomicExprNode): <NEW_LINE> <INDENT> type = PyrexTypes.c_int_type <NEW_LINE> def analyse_types(self, env): <NEW_LINE> <INDENT> self.is_temp = True <NEW_LINE> return self <NEW_LINE> <DEDENT> def generate_result_code(self, code): <NEW_LINE> <INDENT> code.putln("#ifdef _OPENMP") <NEW_LIN... | Note: this is disabled and not a valid directive at this moment
Implements cython.parallel.threadsavailable(). If we are called from the
sequential part of the application, we need to call omp_get_max_threads(),
and in the parallel part we can just call omp_get_num_threads() | 6259902cc432627299fa4011 |
class Pressure(QuantityCouple): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.name = "Pressure" <NEW_LINE> self.unit = "N/m^2" <NEW_LINE> self.mapping_string = "consistent" <NEW_LINE> self.dim = 1 <NEW_LINE> pass | Pressures | 6259902c8c3a8732951f7576 |
class TelegramAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> def get_queryset(self, request): <NEW_LINE> <INDENT> return super(TelegramAdmin, self).get_queryset(request).only('title') | A ModelAdmin with a custom get_queryset() method that uses only(), to test
verbose_name display in messages shown after adding/editing Telegram
instances. Note that the Telegram model defines a __str__ method.
For testing fix for ticket #14529. | 6259902c63f4b57ef0086581 |
class tsCodigoObra (pyxb.binding.datatypes.string): <NEW_LINE> <INDENT> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'tsCodigoObra') <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('/home/leonardo/Projetos/PyNFe/nfse_v202.xsd', 224, 1) <NEW_LINE> _Documentation = None | An atomic simple type. | 6259902c711fe17d825e14a9 |
class DocumentCheckout(models.Model): <NEW_LINE> <INDENT> document = models.ForeignKey(Document, verbose_name=_('Document'), unique=True) <NEW_LINE> checkout_datetime = models.DateTimeField(verbose_name=_('Check out date and time'), auto_now_add=True) <NEW_LINE> expiration_datetime = models.DateTimeField(verbose_name=_... | Model to store the state and information of a document checkout | 6259902cbe8e80087fbc0099 |
class USBBootTest(test.VirtTest): <NEW_LINE> <INDENT> device_name = None <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> super(USBBootTest, self).setUp() <NEW_LINE> self.device_name = self.params.get('device_name', default='QEMU USB Tablet') <NEW_LINE> usb_bus_cmdline = self.params.get('usb_bus_cmdline', default='-devi... | Add a USB device to a QEMU vm and perform sanity checks on both QEMU monitor and guest OS.
:param device_name: Expected name of the device in lsusb
:param usb_bus_cmdline: Cmdline option to add the usb bus
:param device_cmdline: Cmdline option to add the device
:param check_cmd: Cmd to be ran in guest to query for the... | 6259902c1d351010ab8f4b36 |
@parser(Specs.dmsetup_info) <NEW_LINE> class DmsetupInfo(CommandParser): <NEW_LINE> <INDENT> def parse_content(self, content): <NEW_LINE> <INDENT> self.data = parse_delimited_table(content) <NEW_LINE> self.names = [dm['Name'] for dm in self.data if 'Name' in dm] <NEW_LINE> self.by_name = dict((dm['Name'], dm) for dm in... | ``dmsetup info -C`` command output
Example input::
Name Maj Min Stat Open Targ Event UUID
VG00-tmp 253 8 L--w 1 1 0 LVM-gy9uAwD7LuTIApplr2sogbOx5iS0FTax6lLmBji2ueSbX49gxcV76M29cmukQiw4
VG00-home 253 3 L--w 1 1 0 LVM-gy9uAwD7LuTIApplr2sogbOx5iS0FT... | 6259902cd18da76e235b795d |
class point(tuple): <NEW_LINE> <INDENT> def __new__(cls, ec, x=-1, y=-1): <NEW_LINE> <INDENT> self = super().__new__(cls, (x, y)) <NEW_LINE> self._ec = ec <NEW_LINE> if ec.includes(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> raise ValueError("Point does not belong to the curve") <NEW_LINE> <DEDENT> def n... | Points of elliptic curves are 2-tuple of integers in the underlying
field that satisfy the curve equation | 6259902c91af0d3eaad3ae49 |
class FakeLookupService(): <NEW_LINE> <INDENT> def get_device_mapping_from_network(self, initiator_wwns, target_wwns): <NEW_LINE> <INDENT> return DEVICE_MAP | Dummy FC zoning mapping lookup service class. | 6259902c507cdc57c63a5dc7 |
class SessionType(Enum): <NEW_LINE> <INDENT> headless = 1 <NEW_LINE> gui = 2 <NEW_LINE> sdl = 3 <NEW_LINE> emergencystop = 4 | Decides, if VirtualBox creates a graphical frontend for the vm or not
Members:
headless
gui
sdl
emergencystop | 6259902cc432627299fa4013 |
class IndicatorThread(object): <NEW_LINE> <INDENT> def __init__(self, note=None, system=True, debug=False, quiet=False): <NEW_LINE> <INDENT> self.quiet = quiet <NEW_LINE> self.debug = debug <NEW_LINE> self.system = system <NEW_LINE> self.note = note <NEW_LINE> if self.note is None: <NEW_LINE> <INDENT> self.note = 'Plea... | Creates a visual indicator while normally performing actions. | 6259902c63f4b57ef0086582 |
class TestHttpAnchor(HttpServerTest): <NEW_LINE> <INDENT> @pytest.mark.xfail(strict=True) <NEW_LINE> def test_anchor_html(self): <NEW_LINE> <INDENT> confargs = dict(enabledplugins=["AnchorCheck"], recursionlevel=1) <NEW_LINE> self.file_test("http_anchor.html", confargs=confargs) | Test checking of HTML pages containing links to anchors served over http. | 6259902c6e29344779b0166f |
class MiReserva(Reserva): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> proxy = True <NEW_LINE> verbose_name = 'mi reserva' <NEW_LINE> verbose_name_plural = 'mis reservas' <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.recurso.__str__() + ' para fecha: ' + self.fecha.isoformat() | Clase proxy que representa las reservas desde el punto de vista del solicitante | 6259902d15baa72349462fb9 |
class HighScores(game.GameState): <NEW_LINE> <INDENT> caption = "OmniTank High Scores" <NEW_LINE> img_assets = { "icon": "icon.png", "background": "highscores.png", "outline": "selection_outline.png", } <NEW_LINE> snd_assets = { "rollover": "menu_rollover.wav", "click": "menu_click.wav", } <NEW_LINE> scores_file = "hig... | The class for the highscores menu of the game. | 6259902dd6c5a102081e3147 |
class Music(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=50, help_text=u'歌名', default="") <NEW_LINE> artists = models.ManyToManyField(Artist, related_name='musics', help_text=u'演唱者', default=None) <NEW_LINE> album = models.ForeignKey(Album, related_name='musics', help_text=u'所属专辑', default=None... | cloud 音乐资源 | 6259902d8c3a8732951f757a |
class ShortAudioDescriptor(object): <NEW_LINE> <INDENT> def __init__(self, block, my_type): <NEW_LINE> <INDENT> self._block = block <NEW_LINE> self._type = my_type <NEW_LINE> <DEDENT> @property <NEW_LINE> def format_code(self): <NEW_LINE> <INDENT> return (self._block[0] >> 3) & 0x1F <NEW_LINE> <DEDENT> @property <NEW_L... | Defines a Short Audio Descriptor within an Audio Data Block. | 6259902d26238365f5fadb73 |
class BoolVariable(_EventVariable): <NEW_LINE> <INDENT> method = 'bool' | Class used to store bool event variables. | 6259902dd4950a0f3b11164e |
class UserPageVisitFilter(filters.FilterSet): <NEW_LINE> <INDENT> page_id = filters.CharFilter(name='page_id') <NEW_LINE> user_id = filters.CharFilter(name='user_id') <NEW_LINE> last_visit = filters.BooleanFilter(name='last_visit', method='get_last_visit') <NEW_LINE> def get_last_visit(self, queryset, name, value): <NE... | Filter for UserPageVisit | 6259902d30c21e258be9982e |
class FluxConfigAtStartSelect(FluxBaseEntity, SelectEntity): <NEW_LINE> <INDENT> _attr_entity_category = EntityCategory.CONFIG | Representation of a flux config entity that only updates at start or change. | 6259902d8c3a8732951f757b |
class ConsineDistance(Distance): <NEW_LINE> <INDENT> def distance(self, vec1, vec2): <NEW_LINE> <INDENT> super(ConsineDistance, self).distance(vec1, vec2) <NEW_LINE> num = np.dot(vec1, vec2) <NEW_LINE> denom = linalg.norm(vec1) * linalg.norm(vec2) <NEW_LINE> if num == 0: <NEW_LINE> <INDENT> return 1 <NEW_LINE> <DEDENT>... | consine distance
a sub class of Distance | 6259902d0a366e3fb87dda0a |
class NetworkPollCreatorWorker(worker.workers.Worker): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(self.__class__, self).__init__() <NEW_LINE> <DEDENT> def _run(self, job): <NEW_LINE> <INDENT> assert isinstance(job, NetworkPollCreatorJob) <NEW_LINE> curr_pcap_file_path = os.path.join(os.path.expan... | Create CFE POLL from captured network traffic. | 6259902dd6c5a102081e3149 |
class PlayerLostError(Exception): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) | An exception class which will be raised if a player's money goes below 0 | 6259902d507cdc57c63a5dcb |
class LogCapture(object): <NEW_LINE> <INDENT> def __init__(self, logger, level='DEBUG'): <NEW_LINE> <INDENT> self._logger = logger <NEW_LINE> self._level = nameToLevel[level] <NEW_LINE> self._calls = [] <NEW_LINE> self._rollback = None <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> self._rollback = weave(... | Records all log messages made on the given logger. Assumes the logger has a ``_log`` method.
Example::
>>> import logging
>>> logger = logging.getLogger('mylogger')
>>> with LogCapture(logger, level='INFO') as logs:
... logger.debug("Message from debug: %s", 'somearg')
... logger.info("Mes... | 6259902d1f5feb6acb163c14 |
class FileHandler: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> is_colab = os.path.exists(os.path.join("/content", "sample_data")) <NEW_LINE> is_google_drive_mounted = os.path.exists( os.path.join("/content", "drive", "My Drive") ) <NEW_LINE> colab_drive_path = os.path.join("/content", "drive", "My Drive... | Filehandler automates some json -> file and vice versa operations. | 6259902d1d351010ab8f4b3b |
class Page(object): <NEW_LINE> <INDENT> def __init__(self, item_count, page_index=1, page_size=10): <NEW_LINE> <INDENT> self.item_count = item_count <NEW_LINE> self.page_size = page_size <NEW_LINE> self.page_count = item_count // page_size + (1 if item_count % page_size > 0 else 0) <NEW_LINE> if(item_count == 0)or(page... | Page object for display pages. | 6259902d8c3a8732951f757c |
class HostResource(HTTPServerTransport): <NEW_LINE> <INDENT> VERSION_STRING = host_settings.HOST_VERSION_STRING <NEW_LINE> @exceptions_logged(logger) <NEW_LINE> def __init__(self, avatar): <NEW_LINE> <INDENT> HTTPServerTransport.__init__(self, avatar=avatar) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> @exceptions_logge... | The host acting as an HTTP server; a new instance is created
for every request. Technically, this is an C{IResource}. | 6259902d711fe17d825e14ac |
class Response(ResponseBase): <NEW_LINE> <INDENT> default_mimetype = 'application/json; charset=utf-8' <NEW_LINE> default_headers = { 'Strict-Transport-Security': 'max-age=31536000; includeSubdomains; preload', 'Cache-Control': 'no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0' } <NEW_LINE> def... | Base Response Object. This overrides the default in Flask, set in the
application factory | 6259902dd4950a0f3b11164f |
class BordaNauru(BaseVotingSystem): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_id(): <NEW_LINE> <INDENT> return 'borda-nauru' <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def get_description(): <NEW_LINE> <INDENT> return _('Nauru Borda Count voting') <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def create_tal... | Defines the helper functions that allows agora to manage an OpenSTV-based
Nauru Borda voting system. | 6259902d8a43f66fc4bf31a8 |
class Graph: <NEW_LINE> <INDENT> def __init__(self, edges=None): <NEW_LINE> <INDENT> self.adj_list = defaultdict(lambda: (list(), list())) <NEW_LINE> if edges: <NEW_LINE> <INDENT> for v1, v2 in edges: <NEW_LINE> <INDENT> self.add_edge(v1, v2) <NEW_LINE> <DEDENT> <DEDENT> <DEDENT> def add_edge(self, v1, v2): <NEW_LINE> ... | A directed graph with adjacency list/dict storage. Each element in its
adjacency list contains a tuple of two lists, the first the outgoing edges
and the second the incoming edges. The edges are represented by the
index/element on the other end of the list. | 6259902d23e79379d538d52e |
class OutputFile(BasicFile): <NEW_LINE> <INDENT> def __init__(self,name,titles=[],parent=None): <NEW_LINE> <INDENT> BasicFile.__init__(self,name) <NEW_LINE> self.parent=parent <NEW_LINE> self.setTitles(titles) <NEW_LINE> <DEDENT> def setTitles(self,titles): <NEW_LINE> <INDENT> self.titles=titles <NEW_LINE> <DEDENT> def... | output of time dependent data | 6259902da8ecb03325872242 |
class Annotator: <NEW_LINE> <INDENT> def annotate(self, tokens): <NEW_LINE> <INDENT> return [] | A base class for annotators. | 6259902d15baa72349462fbd |
class PyPsutil(PythonPackage): <NEW_LINE> <INDENT> homepage = "https://pypi.python.org/pypi/psutil" <NEW_LINE> url = "https://pypi.io/packages/source/p/psutil/psutil-5.4.5.tar.gz" <NEW_LINE> version('5.5.1', '81d6969ba8392cd3b6f5cba6c4e77caa') <NEW_LINE> version('5.4.5', '7d3d7954782bba4a400e106e66f10656') <NEW_LI... | psutil is a cross-platform library for retrieving information on
running processes and system utilization (CPU, memory, disks, network)
in Python. | 6259902da4f1c619b294f61b |
class AlchemyEngineUtility: <NEW_LINE> <INDENT> name = FieldProperty(IAlchemyEngineUtility['name']) <NEW_LINE> dsn = FieldProperty(IAlchemyEngineUtility['dsn']) <NEW_LINE> echo = FieldProperty(IAlchemyEngineUtility['echo']) <NEW_LINE> use_pool = FieldProperty(IAlchemyEngineUtility['use_pool']) <NEW_LINE> pool_size = Fi... | SQLAlchemy engine utility | 6259902d5166f23b2e2443fc |
class IS3Resource(INamed): <NEW_LINE> <INDENT> buckets = zope.schema.Object( title="Dictionary of S3Bucket objects", schema=IS3Buckets, required=True, ) | S3 Bucket | 6259902db57a9660fecd2aa8 |
class ProtectedItemResourceList(ResourceList): <NEW_LINE> <INDENT> _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, 'value': {'key': 'value', 'type': '[ProtectedItemResource]'}, } <NEW_LINE> def __init__( self, *, next_link: Optional[str] = None, value: Optional[List["ProtectedItemResource"]] = None,... | List of ProtectedItem resources.
:ivar next_link: The uri to fetch the next page of resources. Call ListNext() fetches next page
of resources.
:vartype next_link: str
:ivar value: List of resources.
:vartype value:
list[~azure.mgmt.recoveryservicesbackup.passivestamp.models.ProtectedItemResource] | 6259902d8a349b6b43687261 |
class CreationLicenseWidget(forms.MultiWidget): <NEW_LINE> <INDENT> COPYRIGHTED = {1: _("Copyright")} <NEW_LINE> CREATIVE_COMMONS = {10: _("CC BY - Attribution"), 11: _("CC BY-SA - Share alike"), 12: _("CC BY-ND - Cannot edit"), 13: _("CC BY-NC - Non commercial"), 14: _("CC BY-NC-SA - SA+NC"), 15: _("CC BY-NC-ND - ND+N... | Widget de licence ou copyright | 6259902d15baa72349462fbf |
class ElectionResult(ModelBase): <NEW_LINE> <INDENT> __versioned__ = {} <NEW_LINE> id = db.Column( evalg.database.types.UuidType, default=uuid.uuid4, primary_key=True) <NEW_LINE> election_id = db.Column( evalg.database.types.UuidType, db.ForeignKey('election.id')) <NEW_LINE> election = db.relationship( 'Election', back... | The ElectionResult class | 6259902da8ecb03325872244 |
class Solution(object): <NEW_LINE> <INDENT> def findMedianSortedArrays(self, nums1, nums2): <NEW_LINE> <INDENT> n = len(nums1) + len(nums2) <NEW_LINE> if n % 2 == 1: <NEW_LINE> <INDENT> return self.findKth(nums1, nums2, n / 2 + 1) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> smaller = self.findKth(nums1, nums2, n / 2)... | @param A: An integer array.
@param B: An integer array.
@return: a double whose format is *.5 or *.0 | 6259902dc432627299fa401b |
class BranchUnsupported(Exception): <NEW_LINE> <INDENT> def __init__(self, url: str, description: str): <NEW_LINE> <INDENT> self.url = url <NEW_LINE> self.description = description <NEW_LINE> <DEDENT> def __str__(self) -> str: <NEW_LINE> <INDENT> return self.description | The branch uses a VCS or protocol that is unsupported. | 6259902dd18da76e235b7962 |
class CreateLoadBalancersRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.VpcId = None <NEW_LINE> self.LoadBalancerType = None <NEW_LINE> self.SubnetId = None <NEW_LINE> self.ProjectId = None <NEW_LINE> self.GoodsNum = None <NEW_LINE> self.PayMode = None <NEW_LINE> self.TgwSetTyp... | CreateLoadBalancers请求参数结构体
| 6259902d6fece00bbaccc9d8 |
class Fact(object): <NEW_LINE> <INDENT> def __init__(self, model=None): <NEW_LINE> <INDENT> self.model = model <NEW_LINE> self.id = genID() <NEW_LINE> if model: <NEW_LINE> <INDENT> for fm in model.fieldModels: <NEW_LINE> <INDENT> self.fields.append(Field(fm)) <NEW_LINE> <DEDENT> <DEDENT> self.new = True <NEW_LINE> <DED... | A single fact. Fields exposed as dict interface. | 6259902d0a366e3fb87dda10 |
class IterableEventQueue(queue.Queue): <NEW_LINE> <INDENT> def __init__(self, timeout=3600): <NEW_LINE> <INDENT> queue.Queue.__init__(self, maxsize=32) <NEW_LINE> self._timeout = timeout <NEW_LINE> <DEDENT> def offer(self, event): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.put(event, block=False) <NEW_LINE> <DED... | Extends queue.Queue to add an __iter__ interface. | 6259902d796e427e5384f7a6 |
class StaffGradingService(GradingService): <NEW_LINE> <INDENT> METRIC_NAME = 'edxapp.open_ended_grading.staff_grading_service' <NEW_LINE> def __init__(self, config): <NEW_LINE> <INDENT> config['system'] = LmsModuleSystem( static_url='/static', track_function=None, get_module=None, render_template=render_to_string, repl... | Interface to staff grading backend. | 6259902dac7a0e7691f73512 |
class SentenceSelection(): <NEW_LINE> <INDENT> def __init__(self, stemmer=None, stoplist=None): <NEW_LINE> <INDENT> self.stemmer = stemmer if stemmer else lambda x: x <NEW_LINE> self.stoplist = stoplist if stoplist else lambda x: False <NEW_LINE> <DEDENT> def load_data(self, topics, sentence_data): <NEW_LINE> <INDENT> ... | Context object for hosting data and resources | 6259902d1d351010ab8f4b41 |
class Dropout(object): <NEW_LINE> <INDENT> def __init__(self, amount): <NEW_LINE> <INDENT> self.amount = amount <NEW_LINE> <DEDENT> def __call__(self, sample): <NEW_LINE> <INDENT> images = sample['images'] <NEW_LINE> if 0.5 > np.random.uniform(0.0, 1.0): <NEW_LINE> <INDENT> droped = [] <NEW_LINE> num_droped = np.ceil(n... | Flip randomly the image in a sample.
| 6259902d26238365f5fadb7b |
class InvalidConstraint(MAASAPIBadRequest): <NEW_LINE> <INDENT> def __init__(self, constraint, value, err=None): <NEW_LINE> <INDENT> super(InvalidConstraint, self).__init__(constraint, value) <NEW_LINE> self.err = err <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> s = "Invalid '%s' constraint '%s'" % self.a... | Node allocation constraint given cannot be interpreted. | 6259902d63f4b57ef0086587 |
class Subprogram(AccessPath): <NEW_LINE> <INDENT> class CallInterface(object): <NEW_LINE> <INDENT> IGNORE_STACK = 0 <NEW_LINE> PASS_STACK = 1 <NEW_LINE> RETURN_STACK = 2 <NEW_LINE> def __init__(self, out_indices, stack_action, does_return): <NEW_LINE> <INDENT> self.out_indices = out_indices <NEW_LINE> self.stack_action... | Represents an access to a subprogram. | 6259902d6e29344779b0167a |
class MyNode(object): <NEW_LINE> <INDENT> def __init__(self,item,lchild=None,rchild=None): <NEW_LINE> <INDENT> self.item = item <NEW_LINE> self.lchild = lchild <NEW_LINE> self.rchild = rchild | 节点 | 6259902dd6c5a102081e3151 |
class UsersHandler(BaseHandler): <NEW_LINE> <INDENT> methods = ['GET'] <NEW_LINE> path = '/api/users' <NEW_LINE> def run(self, *args, **kwargs): <NEW_LINE> <INDENT> def reduction(acc, location): <NEW_LINE> <INDENT> acc[location.user].append(location.device) <NEW_LINE> return acc <NEW_LINE> <DEDENT> locations = self.ctx... | Query all known users and associated devices. | 6259902d30c21e258be99837 |
class ReplayBuffer: <NEW_LINE> <INDENT> def __init__(self, action_size, buffer_size, batch_size, seed): <NEW_LINE> <INDENT> self.action_size = action_size <NEW_LINE> self.memory = deque(maxlen=buffer_size) <NEW_LINE> self.batch_size = batch_size <NEW_LINE> self.experience = namedtuple("Experience", field_names=["state"... | Fixed-size buffer to store experience objects. | 6259902dd164cc6175821f9d |
class Conv1d(nn.Conv1d): <NEW_LINE> <INDENT> def __init__(self, in_channels, out_channels, kernel_size, activation_fn=None, drop_rate=0., stride=1, padding='same', dilation=1, groups=1, bias=True): <NEW_LINE> <INDENT> self.activation_fn = activation_fn <NEW_LINE> self.drop_rate = drop_rate <NEW_LINE> if padding == 'sam... | Hightway Convolution 1d
Args:
x: (N, C_in, L)
Returns:
y: (N, C_out, L) | 6259902d1f5feb6acb163c1c |
class SpectrumExtractorMode(RoiMode): <NEW_LINE> <INDENT> persistent = True <NEW_LINE> def __init__(self, axes, **kwargs): <NEW_LINE> <INDENT> super(SpectrumExtractorMode, self).__init__(axes, **kwargs) <NEW_LINE> self.icon = get_icon('glue_spectrum') <NEW_LINE> self.mode_id = 'Spectrum' <NEW_LINE> self.action_text = '... | Let's the user select a region in an image and,
when connected to a SpectrumExtractorTool, uses this
to display spectra extracted from that position | 6259902d9b70327d1c57fdae |
class Transaction(object): <NEW_LINE> <INDENT> _tid = None <NEW_LINE> _msg_id = None <NEW_LINE> _oid_list = None <NEW_LINE> _prepared = False <NEW_LINE> _uuid_set = None <NEW_LINE> _lock_wait_uuid_set = None <NEW_LINE> def __init__(self, node, ttid): <NEW_LINE> <INDENT> self._node = node <NEW_LINE> self._ttid = ttid <N... | A pending transaction | 6259902db57a9660fecd2aae |
class aXe_DRZPREP(TaskWrapper): <NEW_LINE> <INDENT> def __init__(self, inlist, configs, **params): <NEW_LINE> <INDENT> super(aXe_DRZPREP, self).__init__('aXe_DRZPREP', 'drzprep') <NEW_LINE> if 'back' in params and params['back']: <NEW_LINE> <INDENT> self.bck = True <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.bck... | Wrapper around the aXe_DRZPREP task | 6259902dd53ae8145f91948f |
class Text(_String): <NEW_LINE> <INDENT> type = 'text' <NEW_LINE> def convert_to_cache(self, value, record, validate=True): <NEW_LINE> <INDENT> if value is None or value is False: <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> return ustr(value) | Very similar to :class:`~.Char` but used for longer contents, does not
have a size and usually displayed as a multiline text box.
:param translate: enable the translation of the field's values; use
``translate=True`` to translate field values as a whole; ``translate``
may also be a callable such that ``transla... | 6259902d8c3a8732951f7584 |
class LocationListPluginModel(CMSPlugin): <NEW_LINE> <INDENT> template = models.CharField(verbose_name=_('Plugin template'),max_length=250,null=True,blank=True) <NEW_LINE> def get_short_description(self): <NEW_LINE> <INDENT> desc = self.id <NEW_LINE> choices = getattr(self.get_plugin_class(),'template_choices',[]) <NEW... | A model for listing of all active locations | 6259902d63f4b57ef0086588 |
class IndexHandler(BaseHandler): <NEW_LINE> <INDENT> @auth.admin <NEW_LINE> def get(self): <NEW_LINE> <INDENT> args = dict() <NEW_LINE> self.jrender('dev_backstage_index.html', **args) | 后台管理首页 | 6259902d287bf620b6272c13 |
class AndExpression(BaseExpression): <NEW_LINE> <INDENT> operator = ' ' <NEW_LINE> def __init__(self, *terms): <NEW_LINE> <INDENT> self._subterms = list(terms) <NEW_LINE> self._costs = 0 <NEW_LINE> for t in self._subterms: <NEW_LINE> <INDENT> self._costs += t.costs() <NEW_LINE> <DEDENT> self.negated = 0 <NEW_LINE> <DED... | A term connecting several sub terms with a logical AND | 6259902d6fece00bbaccc9dc |
class ShowSecurityGroupRule(common.NetworkAndComputeShowOne): <NEW_LINE> <INDENT> def update_parser_common(self, parser): <NEW_LINE> <INDENT> parser.add_argument( 'rule', metavar="<rule>", help=_("Security group rule to display (ID only)") ) <NEW_LINE> return parser <NEW_LINE> <DEDENT> def take_action_network(self, cli... | Display security group rule details | 6259902dd164cc6175821f9f |
class ProjectsView(APIView): <NEW_LINE> <INDENT> render_classes = (JSONRenderer, ) <NEW_LINE> def get(self, request, hpc=None, project_name=None): <NEW_LINE> <INDENT> logger.debug('ProjectsView--->GET: called.') <NEW_LINE> user = get_user(request) <NEW_LINE> if not isinstance(user, User): <NEW_LINE> <INDENT> logger.war... | ProjectsView is used to create, retrieve and delete projects.
A project is intended as a virtual space into users can run jobs.
Allowed methods are:
GET: retrieve a specified project.
POST: create a new project.
DELETE: delete a specified project. | 6259902db57a9660fecd2ab0 |
class DocumentError(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'id': {'required': True}, 'error': {'required': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'error': {'key': 'error', 'type': 'TextAnalyticsError'}, } <NEW_LINE> def __init__( self, *, id: str, error: "Te... | DocumentError.
All required parameters must be populated in order to send to Azure.
:ivar id: Required. Document Id.
:vartype id: str
:ivar error: Required. Document Error.
:vartype error: ~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError | 6259902d4e696a045264e639 |
class BNLayer(TrainableLayer): <NEW_LINE> <INDENT> def __init__(self, regularizer=None, moving_decay=0.9, eps=1e-5, name='batch_norm'): <NEW_LINE> <INDENT> super(BNLayer, self).__init__(name=name) <NEW_LINE> self.eps = eps <NEW_LINE> self.moving_decay = moving_decay <NEW_LINE> self.initializers = {'beta': tf.constant_i... | Batch normalisation layer, with trainable mean value 'beta' and
std 'gamma'. 'beta' is initialised to 0.0 and 'gamma' is initialised
to 1.0. This class assumes 'beta' and 'gamma' share the same type_str of
regulariser. | 6259902d6fece00bbaccc9dd |
class Runner: <NEW_LINE> <INDENT> def __init__(self, runner_dic = None): <NEW_LINE> <INDENT> self.name = "" <NEW_LINE> self.last_name = "" <NEW_LINE> self.weight = 0 <NEW_LINE> self.height = 0 <NEW_LINE> self.runner_id = "" <NEW_LINE> self.firstbeat_file_read = False <NEW_LINE> if runner_dic != None: <NEW_LINE> <INDENT... | This class control the runner element in the application | 6259902d30c21e258be9983b |
class ProductImporterMessage(object): <NEW_LINE> <INDENT> openapi_types = { 'entries': 'list[CatalogProduct]' } <NEW_LINE> attribute_map = { 'entries': 'entries' } <NEW_LINE> def __init__(self, entries=None): <NEW_LINE> <INDENT> self._entries = None <NEW_LINE> self.discriminator = None <NEW_LINE> if entries is not None... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually. | 6259902dd164cc6175821fa1 |
@dataclass <NEW_LINE> class TransactionIndex: <NEW_LINE> <INDENT> withdraw = TransactionWithdrawIndex <NEW_LINE> datetime = TransactionDatetimeIndex | Secondary indexes helper | 6259902d6fece00bbaccc9de |
class User(BaseModel, Base): <NEW_LINE> <INDENT> if os.getenv('HBNB_TYPE_STORAGE') == 'db': <NEW_LINE> <INDENT> __tablename__ = "users" <NEW_LINE> email = Column(String(128), nullable=False) <NEW_LINE> password = Column(String(128), nullable=False) <NEW_LINE> first_name = Column(String(128)) <NEW_LINE> last_name = Colu... | Definition of the User class | 6259902d287bf620b6272c16 |
class Wildcard(m21Base.Music21Object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> m21Base.Music21Object.__init__(self) <NEW_LINE> self.duration = WildcardDuration() | An object that may have some properties defined, but others not that
matches a single object in a music21 stream. Equivalent to the
regular expression "."
>>> wc1 = search.Wildcard()
>>> wc1.pitch = pitch.Pitch("C")
>>> st1 = stream.Stream()
>>> st1.append(note.HalfNote("D"))
>>> st1.append(wc1) | 6259902d1f5feb6acb163c20 |
class Development(Resource): <NEW_LINE> <INDENT> endpoint = 'developments' <NEW_LINE> def __init__(self, api, data): <NEW_LINE> <INDENT> super(Development, self).__init__(api, data) <NEW_LINE> self.__class_agency__ = Agency <NEW_LINE> self.__class_agent__ = Agent <NEW_LINE> self.__class_group__ = PropertyGroup <NEW_LIN... | 'Development Project' entity resource class. | 6259902d9b70327d1c57fdb2 |
class Function(Element): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.has_input = True <NEW_LINE> self.has_output = True <NEW_LINE> super(Function, self).__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def worker(self, records): <NEW_LINE> <INDENT> return self.process(records) <NEW_LI... | Function() base class: a Function() takes records from the pipe,
applies a function to them and passes them further down the pipe | 6259902d1d351010ab8f4b47 |
class UpdateCheck(models.Model): <NEW_LINE> <INDENT> STATUSES = ( ("E", "Error"), ("R", "Running"), ("A", "Available"), ("N", "Not available") ) <NEW_LINE> state = models.CharField(max_length=1, choices=STATUSES, default="R", editable=False, null=False, blank=False) <NEW_LINE> created_at = models.DateTimeField(auto_now... | Collection of image analysis. | 6259902d8c3a8732951f7588 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.