code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class CouchTransaction(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.depth = 0 <NEW_LINE> self.docs_to_delete = defaultdict(list) <NEW_LINE> self.docs_to_save = defaultdict(dict) <NEW_LINE> <DEDENT> def delete(self, doc): <NEW_LINE> <INDENT> self.docs_to_delete[doc.__class__].append(doc) <NE... | Helper for saving up a bunch of saves and deletes of couch docs
and then committing them all at once with a few bulk operations
ex:
with CouchTransaction() as transaction:
for doc in docs:
transaction.save(doc)
other = Other.get(doc.other_id)
other.name = ''
... | 62598fb24a966d76dd5eef48 |
@dataclass <NEW_LINE> class DeconzNumberEntityDescription( NumberEntityDescription, DeconzNumberEntityDescriptionBase ): <NEW_LINE> <INDENT> entity_category = EntityCategory.CONFIG | Class describing deCONZ number entities. | 62598fb271ff763f4b5e77e3 |
class DaylightHandler(APIItems[Daylight]): <NEW_LINE> <INDENT> resource_type = ResourceTypes.DAYLIGHT <NEW_LINE> path = URL <NEW_LINE> item_cls = Daylight | Handler for daylight sensor. | 62598fb267a9b606de54603e |
@implementer(_IGlobal) <NEW_LINE> class _GlobalObject(object): <NEW_LINE> <INDENT> pass | used for global tool lookup | 62598fb223849d37ff851124 |
class Alarm(resource.Resource, display.Display): <NEW_LINE> <INDENT> list_column_names = [ "id", "name", "desc", "metric namespace", "metric name", "status" ] <NEW_LINE> show_column_names = [ "id", "name", "desc", "metric namespace", "metric name", "metric dimensions", "condition", "enabled", "action enabled", "update ... | Cloud Eye alarm resource instance. | 62598fb285dfad0860cbfaac |
@base.register_class <NEW_LINE> class SORT_new_material(SORT_new_material_base): <NEW_LINE> <INDENT> bl_idname = "sort_material.new" | Add a new material | 62598fb2adb09d7d5dc0a5fc |
class MGMSG_HW_YES_FLASH_PROGRAMMING(MessageWithoutData): <NEW_LINE> <INDENT> message_id = 0x0017 <NEW_LINE> _params_names = ['message_id'] + [None, None] + ['dest', 'source'] | This message is sent by the server on start up, however, it is a
deprecated message (i.e. has no function) and can be ignored. | 62598fb230bbd722464699b1 |
class StructInputMethod(ContractMethod): <NEW_LINE> <INDENT> def __init__( self, provider: BaseProvider, contract_address: str, contract_function: ContractFunction, validator: Validator = None, ): <NEW_LINE> <INDENT> super().__init__(provider, contract_address, validator) <NEW_LINE> self.underlying_method = contract_fu... | Various interfaces to the structInput method. | 62598fb2b7558d589546369c |
class Operation(object): <NEW_LINE> <INDENT> Types = Enum("Types", "ACTION TRANSFORMATION INSTANT_ACTION") <NEW_LINE> def __init__(self, name, *args, **kwargs): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.args = args <NEW_LINE> self.kwargs = kwargs <NEW_LINE> self.op_type = self._classify_operation(name) <NEW_... | A Generic representation of an operation. The
operation could be a transformation or an action.
Attributes
----------
Types
A class member that is an Enum of the types
of operations supported. This can be ACTION
or TRANSFORMATION or INSTANT_ACTION.
name
Name of the current operation.
args
Variabl... | 62598fb2f9cc0f698b1c5303 |
class Title(CleanText): <NEW_LINE> <INDENT> @debug() <NEW_LINE> def filter(self, txt): <NEW_LINE> <INDENT> txt = super(Title, self).filter(txt) <NEW_LINE> return txt.title() | Extract text with :class:`CleanText` and apply title() to it. | 62598fb216aa5153ce400575 |
class PeerExpressRouteCircuitConnectionListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[PeerExpressRouteCircuitConnection]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, value: Optional[List["PeerExpressRouteCircu... | Response for ListPeeredConnections API service call retrieves all global reach peer circuit connections that belongs to a Private Peering for an ExpressRouteCircuit.
:param value: The global reach peer circuit connection associated with Private Peering in an
ExpressRoute Circuit.
:type value: list[~azure.mgmt.network... | 62598fb28e7ae83300ee9115 |
@final <NEW_LINE> class AssignVisitor(BaseFSTVisitor): <NEW_LINE> <INDENT> def visit_assign(self, node: Assign) -> None: <NEW_LINE> <INDENT> self._check_assign_char(node) <NEW_LINE> self.generic_visit(node) <NEW_LINE> <DEDENT> def _check_assign_char(self, node: Assign) -> None: <NEW_LINE> <INDENT> if node.raw_text.star... | Finds wrong assigns. | 62598fb2fff4ab517ebcd857 |
class Island (object): <NEW_LINE> <INDENT> def __init__ (self, line): <NEW_LINE> <INDENT> self.lines = [line] <NEW_LINE> self.ymax = line.y <NEW_LINE> <DEDENT> def adjoin (self, island): <NEW_LINE> <INDENT> lnew = [] <NEW_LINE> u = self.lines <NEW_LINE> v = island.lines <NEW_LINE> i = 0 <NEW_LINE> ilen = len (u) <NEW_L... | List of directly or indirectly adjacent PixLines.
Takes in list of horizontal line segments | 62598fb21b99ca400228f569 |
class frac(Function): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def eval(cls, arg): <NEW_LINE> <INDENT> from sympy import AccumBounds, im <NEW_LINE> def _eval(arg): <NEW_LINE> <INDENT> if arg is S.Infinity or arg is S.NegativeInfinity: <NEW_LINE> <INDENT> return AccumBounds(0, 1) <NEW_LINE> <DEDENT> if arg.is_integer... | Represents the fractional part of x
For real numbers it is defined [1]_ as
.. math::
x - \lfloor{x}\rfloor
Examples
========
>>> from sympy import Symbol, frac, Rational, floor, ceiling, I
>>> frac(Rational(4, 3))
1/3
>>> frac(-Rational(4, 3))
2/3
returns zero for integer arguments
>>> n = Symbol('n', integer... | 62598fb2ec188e330fdf8901 |
class MultiModeAction(qt.QWidgetAction): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> assert isinstance(parent, qt.QWidget) <NEW_LINE> qt.QWidgetAction.__init__(self, parent) <NEW_LINE> button = qt.QToolButton(parent) <NEW_LINE> button.setPopupMode(qt.QToolButton.MenuButtonPopup) <NEW_LINE> ... | This action provides a default checkable action from a list of checkable
actions.
The default action can be selected from a drop down list. The last one used
became the default one.
The default action is directly usable without using the drop down list. | 62598fb27047854f4633f44c |
class AttributeSpecification: <NEW_LINE> <INDENT> __slots__ = ("name", "alt_name", "default", "transform", "accessor", "func") <NEW_LINE> def __init__(self, name, default=None, alt_name=None, transform=None, func=None): <NEW_LINE> <INDENT> if isinstance(default, tuple): <NEW_LINE> <INDENT> default, transform = default ... | Class that describes how the value of a given attribute should be
retrieved.
The class contains the following members:
- C{name}: the name of the attribute. This is also used when we
are trying to get its value from a vertex/edge attribute of a
graph.
- C{alt_name}: alternative name of the attrib... | 62598fb2a79ad1619776a0da |
class FakeInputs: <NEW_LINE> <INDENT> def __init__(self, inputs): <NEW_LINE> <INDENT> self.inputs = inputs <NEW_LINE> <DEDENT> def __call__(self, prompt=None): <NEW_LINE> <INDENT> if prompt is not None: <NEW_LINE> <INDENT> print(prompt, end='') <NEW_LINE> <DEDENT> try: <NEW_LINE> <INDENT> return self.inputs.pop(0) <NEW... | Simulate multiple user inputs, can be used as input() replacement | 62598fb2be383301e025386c |
class LoginCodeView(DjangoLoginView): <NEW_LINE> <INDENT> form_class = forms.LoginCodeForm <NEW_LINE> template_name = 'registration/login_code.html' <NEW_LINE> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> if 'code' in self.request.GET and getattr(settings, 'NOPASSWORD_LOGIN_ON_GET', False): <NEW_LINE> <... | Authenticates a user with a login code. | 62598fb2be7bc26dc9251e95 |
class StitchValue(Generic[T]): <NEW_LINE> <INDENT> def __lt__(self,b): <NEW_LINE> <INDENT> return SBinCmp.from_dsl(self,b,CmpType.lt) <NEW_LINE> <DEDENT> def __le__(self,b): <NEW_LINE> <INDENT> return SBinCmp.from_dsl(self,b,CmpType.le) <NEW_LINE> <DEDENT> def __eq__(self,b): <NEW_LINE> <INDENT> return SBinCmp.from_dsl... | A value dependent on the state of a Stitch object.
This is a lazily evaluated value that can be used directly but also serves
as a DSL for comparisons. | 62598fb27d847024c075c434 |
class ProductDataAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('data_file', 'data_name', 'errors') <NEW_LINE> actions = [cheap_products, avg_prices, products_analogs] <NEW_LINE> form = ProductDataAdminForm | Product data model for admin | 62598fb2ff9c53063f51a6bf |
class TokenizerSplitter(Resource): <NEW_LINE> <INDENT> def post(self): <NEW_LINE> <INDENT> text = request.json["texto"] <NEW_LINE> if text[-1] not in PUNCTUATION: <NEW_LINE> <INDENT> text = text + "." <NEW_LINE> <DEDENT> outputSentences = [] <NEW_LINE> parsedTree = parsetree(text) <NEW_LINE> for sentence in parsedTree:... | Splits an input text into tokenized sentences. | 62598fb2cc0a2c111447b085 |
class Median(RMS) : <NEW_LINE> <INDENT> def __init__ ( self , xmin , xmax ) : <NEW_LINE> <INDENT> RMS.__init__ ( self , xmin , xmax , err = False ) <NEW_LINE> <DEDENT> def _median_ ( self , func , xmin , xmax , *args ) : <NEW_LINE> <INDENT> from ostap.math.integral import IntegralCache <NEW_LINE> iint = IntegralCache... | Calculate median for the distribution or function
>>> xmin,xmax = 0,math.pi
>>> median = Median ( xmin,xmax ) ## specify min/max
>>> value = median ( math.sin )
- scipy.optimize.brentq is used | 62598fb223849d37ff851126 |
class XObject: <NEW_LINE> <INDENT> def __init__(self, data, width, height): <NEW_LINE> <INDENT> self.dictionary = {"Type": "/XObject", "Subtype": "/Image", "BitsPerComponent" : "8", "ColorSpace": "/DeviceRGB", "Width": str(width), "Height": str(height)} <NEW_LINE> self.raw_data = data <NEW_LINE> <DEDENT> def data(self)... | XObject dictionary and stream | 62598fb25fc7496912d482b7 |
class Digraph(CommandBase, Requirer): <NEW_LINE> <INDENT> cmds = { 'digraph': 'Write out package.dot digraph for graphviz', } <NEW_LINE> host_sys_deps = ['graphviz'] <NEW_LINE> @staticmethod <NEW_LINE> def setup_subparser(parser, cmd=None): <NEW_LINE> <INDENT> parser.add_argument( '--all', help="Print dependency tree",... | Generate dependency graph | 62598fb28a43f66fc4bf21ed |
class HeadlessShell(object): <NEW_LINE> <INDENT> def __init__(self, workflowClass): <NEW_LINE> <INDENT> self._workflowClass = workflowClass <NEW_LINE> self.projectManager = None <NEW_LINE> <DEDENT> @property <NEW_LINE> def workflow(self): <NEW_LINE> <INDENT> return self.projectManager.workflow <NEW_LINE> <DEDENT> def c... | For now, this class is just a stand-in for the GUI shell (used when running from the command line). | 62598fb285dfad0860cbfaad |
class Binary(object): <NEW_LINE> <INDENT> def __init__(self, num = None): <NEW_LINE> <INDENT> if num is None: <NEW_LINE> <INDENT> self.binNum = [] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.binNum = decToBin(num) <NEW_LINE> <DEDENT> <DEDENT> def add(self, num): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> int(n... | classdocs | 62598fb292d797404e388b9d |
class CAP_Add_Stored_Presets(Operator): <NEW_LINE> <INDENT> bl_idname = "cap.create_current_preset" <NEW_LINE> bl_label = "Default Presets" <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> user_preferences = context.user_preferences <NEW_LINE> addon_prefs = user_preferences.addons[__packag... | Add the currently selected saved preset into the file presets list, enabling it's use for exports in this .blend file. | 62598fb257b8e32f52508155 |
class Digraph(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.nodes = set([]) <NEW_LINE> self.edges = {} <NEW_LINE> <DEDENT> def addNode(self, node): <NEW_LINE> <INDENT> node = node.getName() <NEW_LINE> if node in self.nodes: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDEN... | A directed graph | 62598fb230bbd722464699b2 |
class RestApiException(BiiException): <NEW_LINE> <INDENT> pass | Base class exception of this module | 62598fb256b00c62f0fb292a |
class SchemaNode(colander.SchemaNode): <NEW_LINE> <INDENT> readonly = False <NEW_LINE> def deserialize(self, cstruct=null): <NEW_LINE> <INDENT> if self.readonly and cstruct != null: <NEW_LINE> <INDENT> raise Invalid(self, 'This field is ``readonly``.') <NEW_LINE> <DEDENT> return super().deserialize(cstruct) <NEW_LINE> ... | Subclass of :class: `SchemaNode` with extended keyword support.
The constructor accepts these additional keyword arguments:
readonly:
Disable deserialization. Default: False | 62598fb297e22403b383af82 |
class LogRecorder: <NEW_LINE> <INDENT> _base_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) <NEW_LINE> _logpath = os.path.join(_base_path, "testlog") <NEW_LINE> _level = logging.INFO <NEW_LINE> if Path(_logpath).exists(): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> os.mkd... | usage: 记录日志,默认日志等级INFO,每个log最大为30M,最多保留10个日志文件 | 62598fb260cbc95b063643c2 |
class DevConfig(EnvironmentConfig): <NEW_LINE> <INDENT> LOG_LEVEL = logging.DEBUG | Development Environment Config | 62598fb24c3428357761a32c |
class Rotate(Operation): <NEW_LINE> <INDENT> def __init(self, prob, magnitude): <NEW_LINE> <INDENT> super(Rotate, self).__init__(prob, magnitude) <NEW_LINE> <DEDENT> def __call__(self, image): <NEW_LINE> <INDENT> if random.uniform(0, 1) > self.prob: <NEW_LINE> <INDENT> return image <NEW_LINE> <DEDENT> else: <NEW_LINE> ... | Rotate the image magnitude degrees. | 62598fb266673b3332c30440 |
class HTTPClient(_HTTPClient): <NEW_LINE> <INDENT> def __init__(self, connector=None, *, loop=None): <NEW_LINE> <INDENT> super().__init__(connector, loop=loop) <NEW_LINE> self._user_agent = self.user_agent <NEW_LINE> self.alt_user_agent = self.user_agent <NEW_LINE> <DEDENT> @contextlib.contextmanager <NEW_LINE> def use... | Subclass of discord.http.HTTPClient adding features.
See HTTPClient.__base__.__doc__ for more info. | 62598fb27d43ff248742743c |
class NotAuthenticated(Exception): <NEW_LINE> <INDENT> pass | User not Authorization for action. | 62598fb21b99ca400228f56a |
class TestTask554(unittest.TestCase): <NEW_LINE> <INDENT> @parameterized.expand( [ ( 20, [ [3, 4, 5], [6, 8, 10], [9, 12, 15], [12, 16, 20], [5, 12, 13], [8, 15, 17], ], ), (5, [[3, 4, 5]]), (10, [[3, 4, 5], [6, 8, 10]]), (1, []), ] ) <NEW_LINE> def test_main_logic(self, number, expected_value): <NEW_LINE> <INDENT> sel... | Test class for task 178b | 62598fb2283ffb24f3cf3900 |
class NesstarHarvester(OaipmhHarvester): <NEW_LINE> <INDENT> md_format = 'oai_ddi' <NEW_LINE> def info(self): <NEW_LINE> <INDENT> return { 'name': 'NESSTAR', 'title': 'NESSTAR', 'description': 'Harvester for NESSTAR data sources' } <NEW_LINE> <DEDENT> def _before_record_fetch(self, harvest_object): <NEW_LINE> <INDENT> ... | NESSTAR Harvester | 62598fb2fff4ab517ebcd85a |
class DistributedParameterServerBuilder(DataParallelBuilder, DistributedBuilderBase): <NEW_LINE> <INDENT> def __init__(self, towers, server, caching_device): <NEW_LINE> <INDENT> DataParallelBuilder.__init__(self, towers) <NEW_LINE> DistributedBuilderBase.__init__(self, server) <NEW_LINE> assert caching_device in ['cpu'... | Distributed parameter server training.
A single copy of parameters are scattered around PS.
Gradients across GPUs are averaged within the worker, and applied to PS.
Each worker also caches the variables for reading.
It is an equivalent of ``--variable_update=parameter_server`` in
`tensorflow/benchmarks <https://github... | 62598fb2d268445f26639bbd |
class BaseConfig: <NEW_LINE> <INDENT> TESTING = False <NEW_LINE> DEV = False <NEW_LINE> SQLALCHEMY_TRACK_MODIFICATIONS = False <NEW_LINE> SECRET_KEY = os.environ.get('SECRET_KEY') or 'some-long-random-key' <NEW_LINE> TMP_FOLDER = os.environ.get('TMP_FOLDER') or os.path.abspath('/tmp') <NEW_LINE> FILE_TYPES = os.environ... | Base configuration | 62598fb23346ee7daa337681 |
class BroLogUtil(object): <NEW_LINE> <INDENT> EXT_EXPR = re.compile(r"[^/].*?\.(.*)$") <NEW_LINE> logtypes = dict() <NEW_LINE> @staticmethod <NEW_LINE> def supports(path): <NEW_LINE> <INDENT> base, fname = os.path.split(path) <NEW_LINE> return BroLogUtil.get_ext(fname) in BroLogUtil.logtypes <NEW_LINE> <DEDENT> @static... | Container class for a few useful file / extension related functions.
Also maintains a registry for file extension / type specification pairs. These pairs
are used to automatically determine how to decode certain files. | 62598fb20c0af96317c563f0 |
class Area_01(area): <NEW_LINE> <INDENT> def __init__(self, player): <NEW_LINE> <INDENT> area.__init__(self, player) <NEW_LINE> self.background = pygame.image.load("background/background_images/forrest_side_scroll_background_2.jpg").convert() <NEW_LINE> self.background.set_colorkey(constants.WHITE) <NEW_LINE> self.area... | Definition for area 1. | 62598fb2be7bc26dc9251e96 |
class QueenCard(PlayingCard): <NEW_LINE> <INDENT> def __init__(self, suit): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.suit = suit <NEW_LINE> self.value = 12 <NEW_LINE> self.uni = self.Uni[suit.value] <NEW_LINE> self.symbol = 'Q' <NEW_LINE> <DEDENT> def give_value(self): <NEW_LINE> <INDENT> return self.valu... | The QueenCard class represents the queen card. | 62598fb27b180e01f3e4908a |
class Repository(object): <NEW_LINE> <INDENT> def __init__(self, id, display_name=None, description=None, notes=None, working_dir=None, content_unit_counts=None, last_unit_added=None, last_unit_removed=None): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.display_name = display_name <NEW_LINE> self.description = desc... | Contains repository data and any additional data relevant for the plugin to
function.
:ivar id: programmatic ID for the repository
:type id: str
:ivar display_name: user-friendly name describing the repository
:type display_name: str or None
:ivar description: user-friendly description of the repository
:type descri... | 62598fb267a9b606de546043 |
class PGHeaderFooter (Directive): <NEW_LINE> <INDENT> required_arguments = 0 <NEW_LINE> optional_arguments = 0 <NEW_LINE> def run (self): <NEW_LINE> <INDENT> settings = self.state.document.settings <NEW_LINE> include_lines = statemachine.string2lines ( settings.get_resource ('mydocutils.gutenberg.parsers', self.resourc... | Inserts PG header or footer. | 62598fb2d486a94d0ba2c044 |
class FBPFilter(BaseEnum): <NEW_LINE> <INDENT> Ramp: str = "ramp" <NEW_LINE> Hamming: str = "hamming" <NEW_LINE> SheppLogan: str = "shepp-logan" | The enum class of algoritm types. Possible values:
* ``FBPFilter.Ramp``
* ``FBPFilter.Hamming``
* ``FBPFilter.SheppLogan`` | 62598fb2bf627c535bcb1514 |
class Upyun: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def _httpdate_rfc1123(dt=None): <NEW_LINE> <INDENT> dt = dt or datetime.utcnow() <NEW_LINE> return dt.strftime('%a, %d %b %Y %H:%M:%S GMT') <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def _sign(client_key, client_secret, method, uri, date, policy=None, md5=None... | 使用又拍云提供的REST API上传文件
文档地址:https://help.upyun.com/knowledge-base/rest_api/
认证方式采用签名认证:https://help.upyun.com/knowledge-base/object_storage_authorization/#e7adbee5908de8aea4e8af81 | 62598fb28a349b6b436862b2 |
class MST(object): <NEW_LINE> <INDENT> def __init__(self, trace, data, dataquality): <NEW_LINE> <INDENT> self.mst = clibmseed.mst_init(None) <NEW_LINE> sampletype = SAMPLETYPE[data.dtype.type] <NEW_LINE> self.mst.contents.network = trace.stats.network <NEW_LINE> self.mst.contents.station = trace.stats.station <NEW_LINE... | Class that transforms a ObsPy Trace object to a libmseed internal MSTrace
struct. | 62598fb2796e427e5384e80a |
class Sextant(Client): <NEW_LINE> <INDENT> def __init__(self, access_key: str, url: str = "") -> None: <NEW_LINE> <INDENT> super().__init__(access_key, url) <NEW_LINE> self._open_api = urljoin(self.gateway_url, "apps-sextant/v1/") <NEW_LINE> <DEDENT> def _generate_benmarks( self, offset: int = 0, limit: int = 128 ) -> ... | This class defines :class:`Sextant`.
Arguments:
access_key: User's access key.
url: The URL of the graviti gas website. | 62598fb2442bda511e95c4cc |
class EVEClient(GenericClient): <NEW_LINE> <INDENT> def _get_url_for_timerange(self, timerange, **kwargs): <NEW_LINE> <INDENT> if timerange.start.strftime('%M-%S') != '00-00': <NEW_LINE> <INDENT> timerange = TimeRange(timerange.start.strftime('%Y-%m-%d'), timerange.end) <NEW_LINE> <DEDENT> eve = Scraper(BASEURL) <NEW_L... | Provides access to Level 0C Extreme ultraviolet Variability Experiment (EVE) data
as hosted by `LASP <http://lasp.colorado.edu/home/eve/data/data-access/>`_.
To use this client you must request Level 0 data.
Examples
--------
>>> from sunpy.net import Fido, attrs as a
>>> results = Fido.search(a.Time("2016/1/1", "20... | 62598fb297e22403b383af84 |
class Settings(Gio.Settings): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Gio.Settings.__init__(self) <NEW_LINE> <DEDENT> def new(): <NEW_LINE> <INDENT> settings = Gio.Settings.new('org.gnome.Lollypop') <NEW_LINE> settings.__class__ = Settings <NEW_LINE> return settings <NEW_LINE> <DEDENT> def get_music... | Lollypop settings | 62598fb244b2445a339b69ac |
class DataShape(object): <NEW_LINE> <INDENT> __metaclass__ = Type <NEW_LINE> composite = False <NEW_LINE> def __init__(self, parameters=None, name=None): <NEW_LINE> <INDENT> if type(parameters) is DataShape: <NEW_LINE> <INDENT> self.parameters = parameters <NEW_LINE> <DEDENT> elif len(parameters) > 0: <NEW_LINE> <INDEN... | The Datashape class, implementation for generic composite
datashape objects | 62598fb216aa5153ce400579 |
class ValidationException(MobilemApiException): <NEW_LINE> <INDENT> num = 1200 | Common validation exception | 62598fb255399d3f05626590 |
class ReferenceDefinition(Base): <NEW_LINE> <INDENT> __table_args__ = {'schema': 'groundwater_protection_sites'} <NEW_LINE> __tablename__ = 'reference_definition' <NEW_LINE> id = sa.Column(sa.String, primary_key=True, autoincrement=False) <NEW_LINE> topic = sa.Column(sa.String, nullable=True) <NEW_LINE> canton = sa.Col... | The meta bucket for definitions which are directly related to a public law restriction in a common way or
to the whole canton or a whole municipality. It is used to have a place to store general documents
which are related to an extract but not directly on a special public law restriction situation.
Attributes:
i... | 62598fb263d6d428bbee2822 |
class FireStatsDialogTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_icon_png(self): <NEW_LINE> <INDENT> path = ':/plugins/FireStats/icon.png' <NEW_LINE> icon = QIcon(path) <NEW_LINE> sel... | Test rerources work. | 62598fb25fcc89381b266187 |
class UnicodeRawConfigParser(RawConfigParser): <NEW_LINE> <INDENT> def write(self, fp): <NEW_LINE> <INDENT> if self._defaults: <NEW_LINE> <INDENT> fp.write("[%s]\n" % DEFAULTSECT) <NEW_LINE> for (key, value) in self._defaults.items(): <NEW_LINE> <INDENT> fp.write("%s = %s\n" % (key, getUnicode(value, "UTF8").replace('\... | RawConfigParser with unicode writing support | 62598fb2cc0a2c111447b088 |
class OperationInputs(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'name': {'required': True}, } <NEW_LINE> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, name: str, **kwargs ): <NEW_LINE> <INDENT> super(OperationInputs, self).__init__(**kwargs) <NEW_L... | Input values for operation results call.
All required parameters must be populated in order to send to Azure.
:ivar name: Required. The name of the Provisioning Service to check.
:vartype name: str | 62598fb23346ee7daa337682 |
class ModelIdentifier(object): <NEW_LINE> <INDENT> def __init__( self, arch_id=0, input_id=0, hypers={}, n_split=10, split=-1, split_seed=252, path='', prefix='model', formatter={}): <NEW_LINE> <INDENT> super(ModelIdentifier, self).__init__() <NEW_LINE> self.arch_id = int(arch_id) <NEW_LINE> self.input_id = int(input_i... | Object to keep track of a model's identifying information.
Attributes:
arch_id: Integer that identifies the model architecture.
input_id: Integer that identifies the input data.
n_dim: Integer indicating the dimensionality of the embedding.
spit_seed: Integer indicating the split seed.
split: Integ... | 62598fb27b180e01f3e4908b |
class Solution: <NEW_LINE> <INDENT> def sumKEven(self, k): <NEW_LINE> <INDENT> res = 0 <NEW_LINE> for i in range(1, k + 1): <NEW_LINE> <INDENT> tmp = str(i) + str(i)[::-1] <NEW_LINE> res += int(tmp) <NEW_LINE> <DEDENT> return res | @param k:
@return: the sum of first k even-length palindrome numbers | 62598fb2379a373c97d9908b |
class RenderViewCommand: <NEW_LINE> <INDENT> def GetResources(self): <NEW_LINE> <INDENT> return { "Pixmap": os.path.join(ICONDIR, "RenderView.svg"), "MenuText": QT_TRANSLATE_NOOP( "RenderViewCommand", "Rendering View" ), "ToolTip": QT_TRANSLATE_NOOP( "RenderViewCommand", "Create a Rendering View of the " "selected obje... | GUI command to create a rendering view of an object in a project.
The command operates on the selected object(s) and the selected project,
or the default project. | 62598fb27d847024c075c438 |
class BgpPeerStatus(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'local_address': {'readonly': True}, 'neighbor': {'readonly': True}, 'asn': {'readonly': True}, 'state': {'readonly': True}, 'connected_duration': {'readonly': True}, 'routes_received': {'readonly': True}, 'messages_sent': {'readonly':... | BGP peer status details.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar local_address: The virtual network gateway's local address.
:vartype local_address: str
:ivar neighbor: The remote BGP peer.
:vartype neighbor: str
:ivar asn: The autonomous system number of the remo... | 62598fb23539df3088ecc328 |
class Action(models.Model): <NEW_LINE> <INDENT> actor_content_type = models.ForeignKey(ContentType,related_name='actor') <NEW_LINE> actor_object_id = models.PositiveIntegerField() <NEW_LINE> actor = generic.GenericForeignKey('actor_content_type','actor_object_id') <NEW_LINE> verb = models.CharField(max_length=255) <NEW... | Action model describing the actor acting out a verb (on an optional target).
Nomenclature based on http://martin.atkins.me.uk/specs/activitystreams/atomactivity
Generalized Format::
<actor> <verb> <time>
<actor> <verb> <target> <time>
<actor> <verb> <action_object> <target> <time>
Examples::
<justqu... | 62598fb2009cb60464d01598 |
class BaseConversionTests(unittest.TestCase): <NEW_LINE> <INDENT> def test_base(self): <NEW_LINE> <INDENT> self.assertEquals(u'11', calc.base(11, 10)) <NEW_LINE> self.assertEquals(u'12', calc.base(10, 8)) <NEW_LINE> self.assertEquals(u'A', calc.base(10, 16)) <NEW_LINE> self.assertEquals(u'3YW', calc.base(5144, 36)) | Tests for L{eridanusstd.calc.base}. | 62598fb266656f66f7d5a466 |
class DeleteContent(MyUserBaseHandler): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(DeleteContent, self).__init__(*args, **kwargs) <NEW_LINE> <DEDENT> @token_required() <NEW_LINE> @deco_jsonp() <NEW_LINE> async def post(self, *args, **kwargs): <NEW_LINE> <INDENT> post_json = self.... | 删除文本内容 | 62598fb2aad79263cf42e84a |
class Refund(object): <NEW_LINE> <INDENT> def __init__(self, attributes, api_response): <NEW_LINE> <INDENT> self.attributes = attributes <NEW_LINE> self.api_response = api_response <NEW_LINE> <DEDENT> @property <NEW_LINE> def amount(self): <NEW_LINE> <INDENT> return self.attributes.get('amount') <NEW_LINE> <DEDENT> @pr... | A thin wrapper around a refund, providing easy access to its
attributes.
Example:
refund = client.refunds.get()
refund.id | 62598fb2d486a94d0ba2c046 |
class ArgsPlugin(Plugin): <NEW_LINE> <INDENT> def _build_instance(self, arg_list): <NEW_LINE> <INDENT> instance = {} <NEW_LINE> if 'dimensions' in self.args: <NEW_LINE> <INDENT> instance['dimensions'] = dict(item.strip().split(":") for item in self.args['dimensions'].split(",")) <NEW_LINE> <DEDENT> for arg in arg_list:... | Base plugin for detection plugins that take arguments for configuration rather than do detection. | 62598fb2bd1bec0571e150fe |
class QuizAnswers(Document): <NEW_LINE> <INDENT> quiz = ReferenceField(QuestionSet, required=True) <NEW_LINE> question_order = ListField(ReferenceField(WikiQuestion)) <NEW_LINE> workerId = StringField(required=True) <NEW_LINE> assignmentId = StringField(required=True, unique_with=['workerId']) <NEW_LINE> quiz_answer_pr... | Record a list of answers for a quiz (question set) | 62598fb285dfad0860cbfaaf |
class PhysicsInterface: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._base_update_called = False <NEW_LINE> self._num_update_calls = 0 <NEW_LINE> <DEDENT> def update(self, dt): <NEW_LINE> <INDENT> self._base_update_called = True <NEW_LINE> self._num_update_calls += 1 <NEW_LINE> <DEDENT> def create_p... | An interface to apply updates to physics | 62598fb24f6381625f1994fb |
class TranslationSynthesisEventArgs(SessionEventArgs): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> for _s in [SessionEventArgs]: <NEW_LINE> <INDENT> __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) <NEW_LINE> <DEDENT> __setattr__ = lambda self, name, value: _swig_setattr(self, TranslationS... | Defines payload that is sent with the event :py:attr:`TranslationRecognizer.synthesizing`. | 62598fb28a349b6b436862b4 |
class HideHudFlags(IntEnum): <NEW_LINE> <INDENT> WEAPONSELECTION = HIDEHUD_WEAPONSELECTION <NEW_LINE> FLASHLIGHT = HIDEHUD_FLASHLIGHT <NEW_LINE> ALL = HIDEHUD_ALL <NEW_LINE> HEALTH = HIDEHUD_HEALTH <NEW_LINE> PLAYERDEAD = HIDEHUD_PLAYERDEAD <NEW_LINE> NEEDSUIT = HIDEHUD_NEEDSUIT <NEW_LINE> MISCSTATUS = HIDEHUD_MISCSTAT... | Hide hud flags wrapper enumerator. | 62598fb25fdd1c0f98e5e004 |
class InlineEntityListDescriptor(EntityListDescriptor): <NEW_LINE> <INDENT> def __init__(self, tag, klass, *args): <NEW_LINE> <INDENT> super(EntityListDescriptor, self).__init__(tag, klass) <NEW_LINE> self.rootkeys = args <NEW_LINE> <DEDENT> def __get__(self, instance, cls): <NEW_LINE> <INDENT> instance.get() <NEW_LINE... | EntityListDescriptor which saves the XML tags in the parent entity as the
root elements of the referenced entities. Useful when the full body of the
referenced entity is enclosed in the parent. | 62598fb2be8e80087fbbf0dd |
class Privileges(object): <NEW_LINE> <INDENT> stmts = None <NEW_LINE> roles = None <NEW_LINE> aws_api_list = None <NEW_LINE> def __init__(self, aws_api_list): <NEW_LINE> <INDENT> self.stmts = [] <NEW_LINE> self.roles = [] <NEW_LINE> self.aws_api_list = aws_api_list <NEW_LINE> <DEDENT> def add_stmt(self, stmt): <NEW_LIN... | Keep track of privileges an actor has been granted | 62598fb27d43ff248742743e |
class DUMP3res(BaseObj): <NEW_LINE> <INDENT> _strfmt1 = "" <NEW_LINE> _attrlist = ("mountlist",) <NEW_LINE> def __init__(self, unpack): <NEW_LINE> <INDENT> self.mountlist = unpack.unpack_list(mountentry) | struct DUMP3res {
mountentry *mountlist;
}; | 62598fb2be383301e0253872 |
class SummaryStatisticsNumba(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @jit <NEW_LINE> def calculate_number_observation(self, one_dimensional_array): <NEW_LINE> <INDENT> number_observation = one_dimensional_array.size <NEW_LINE> return number_observation <NEW_LINE> <D... | calculate number of observations, arithmetic mean, median
and sample standard deviation using numba library | 62598fb23539df3088ecc32a |
@pytest.mark.usefixtures('versioning_manager', 'table_creator') <NEW_LINE> class TestColumnExclusion(object): <NEW_LINE> <INDENT> @pytest.fixture <NEW_LINE> def textitem_cls(self, base): <NEW_LINE> <INDENT> class TextItem(base): <NEW_LINE> <INDENT> __tablename__ = 'textitem' <NEW_LINE> __versioned__ = {'exclude': ['_cr... | Test column exclusion with polymorphic inheritance and column aliases to
cover as many edge cases as possible. | 62598fb2379a373c97d9908d |
class MiddlewarePipeline(HTTPAdapter): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._current_middleware = None <NEW_LINE> self._first_middleware = None <NEW_LINE> self.poolmanager = PoolManager(ssl_version=ssl.PROTOCOL_TLSv1_2) <NEW_LINE> <DEDENT> def add_middleware(sel... | MiddlewarePipeline, entry point of middleware
The pipeline is implemented as a linked-list, read more about
it here https://buffered.dev/middleware-python-requests/ | 62598fb276e4537e8c3ef61e |
class Person(object): <NEW_LINE> <INDENT> def __init__(self, name, slug=None, **kwargs): <NEW_LINE> <INDENT> super(Person, self).__init__() <NEW_LINE> self.name = name <NEW_LINE> self.biography = self.birthplace = self.tmdb_id = self.birthday = None <NEW_LINE> self.job = self.character = self._images = self._movie_cred... | A Class representing a trakt.tv Person such as an Actor or Director | 62598fb2ff9c53063f51a6c5 |
class KMP: <NEW_LINE> <INDENT> def __init__(self, pat): <NEW_LINE> <INDENT> self.pat = pat <NEW_LINE> M = len(pat) <NEW_LINE> self.dfa = [[0 for i in range(M)] for j in range(256)] <NEW_LINE> self.dfa[pat[0]][0] = 1 <NEW_LINE> X = 0 <NEW_LINE> for j in range(M): <NEW_LINE> <INDENT> for c in range(256): <NEW_LINE> <INDE... | Knuth-Morris-Pratt algorithm | 62598fb266656f66f7d5a468 |
class AssessmentFeedbackAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('id', 'submission_uuid',) <NEW_LINE> search_fields = ('id', 'submission_uuid',) <NEW_LINE> readonly_fields = ( 'submission_uuid', 'assessments_by', 'options', 'feedback_text' ) <NEW_LINE> exclude = ('assessments',) <NEW_LINE> def asses... | Django admin model for AssessmentFeedbacks. | 62598fb28a349b6b436862b6 |
class ListSnapshot(command.Lister): <NEW_LINE> <INDENT> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(ListSnapshot, self).get_parser(prog_name) <NEW_LINE> parser.add_argument( '--all-projects', action='store_true', default=False, help='Include all projects (admin only)', ) <NEW_LINE> parser.add_ar... | List snapshots | 62598fb2b7558d58954636a4 |
class IncludeRole(TaskInclude): <NEW_LINE> <INDENT> _allow_duplicates = FieldAttribute(isa='bool', default=True, private=True) <NEW_LINE> _private = FieldAttribute(isa='bool', default=None, private=True) <NEW_LINE> _static = FieldAttribute(isa='bool', default=None) <NEW_LINE> def __init__(self, block=None, role=None, t... | A Role include is derived from a regular role to handle the special
circumstances related to the `- include_role: ...` | 62598fb2796e427e5384e80d |
class ExporterSetting(dict): <NEW_LINE> <INDENT> def __init__(self, enabled, initial_convert_time=None, tuple_key=None, extra_schema=None, parsing_format=None, base_schema=None, update_time=None): <NEW_LINE> <INDENT> assert enabled is not None <NEW_LINE> if initial_convert_time is None: <NEW_LINE> <INDENT> initial_conv... | Structure for Exporter setting.
Fields:
enabled (bool): The exporter is enabled or not.
initalConvetTime (long): The initial conversion time in Epoch (milliseconds). Default: now.
tupleKey (str): The tuple key. Default: ptuple.
extraSchema (object): The extra schema.
parsingFormat (str): The input ... | 62598fb255399d3f05626593 |
class User(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'users' <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> username = db.Column(db.String(20), unique=True) <NEW_LINE> name = db.Column(db.String(20)) <NEW_LINE> password = db.Column(db.String(20)) <NEW_LINE> admin = db.Column(db.Boolean) <NEW_LI... | Represents a standard user. (Login, own objects, etc) | 62598fb2442bda511e95c4d0 |
class LRPSequentialPresetBFlat(LRPSequentialPresetB): <NEW_LINE> <INDENT> def __init__(self, model, *args, **kwargs): <NEW_LINE> <INDENT> super(LRPSequentialPresetBFlat, self).__init__(model, *args, input_layer_rule="Flat", **kwargs) | Special LRP-configuration for ConvNets | 62598fb2baa26c4b54d4f32f |
class Policy(object): <NEW_LINE> <INDENT> def __init__(): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def choose(self, agent): <NEW_LINE> <INDENT> return 0 | Policy prescribes action to be taken given the agent's parameter
estimates | 62598fb297e22403b383af88 |
class update_account_result(object): <NEW_LINE> <INDENT> def __init__(self, success=None, e1=None, e2=None, e3=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> self.e1 = e1 <NEW_LINE> self.e2 = e2 <NEW_LINE> self.e3 = e3 <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot._fast_decode i... | Attributes:
- success
- e1
- e2
- e3 | 62598fb260cbc95b063643c5 |
@total_ordering <NEW_LINE> class Contig: <NEW_LINE> <INDENT> def __init__(self, contig_name, contig_size): <NEW_LINE> <INDENT> self.name = contig_name <NEW_LINE> self.size = contig_size <NEW_LINE> self.total_reads = 0 <NEW_LINE> self.reads = 0 <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return self... | Stores name, size, reads, and total reads for a contig
and implements ordering based on number of reads | 62598fb2460517430c43209b |
class LocalFileAdapter(requests.adapters.BaseAdapter): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def _chkpath(method, path): <NEW_LINE> <INDENT> if method.lower() in ('put', 'delete'): <NEW_LINE> <INDENT> return 501, "Not Implemented" <NEW_LINE> <DEDENT> elif method.lower() not in ('get', 'head'): <NEW_LINE> <INDENT... | Protocol Adapter to allow Requests to GET file:// URLs
@todo: Properly handle non-empty hostname portions. | 62598fb291f36d47f2230ee4 |
class OrangeOpType(Enum): <NEW_LINE> <INDENT> def __init__(self, number): <NEW_LINE> <INDENT> self._as_parameter__ = number <NEW_LINE> <DEDENT> TextCommand = 1 <NEW_LINE> BatteryPercent = 2 <NEW_LINE> LastSpeechHeard = 3 <NEW_LINE> LastSpeechSpoken = 4 <NEW_LINE> IpAddress = 5 <NEW_LINE> GoogleSpeech = 6 <NEW_LINE> Tog... | Enumerated type for operation type | 62598fb266673b3332c30446 |
class Solution: <NEW_LINE> <INDENT> def findMin(self, nums): <NEW_LINE> <INDENT> if not nums: <NEW_LINE> <INDENT> return -1 <NEW_LINE> <DEDENT> target = nums[-1] <NEW_LINE> start, end = 0, len(nums) - 1 <NEW_LINE> while start + 1 < end: <NEW_LINE> <INDENT> mid = start + (end - start) // 2 <NEW_LINE> if nums[mid] <= tar... | @param nums: a rotated sorted array
@return: the minimum number in the array | 62598fb2a79ad1619776a0e2 |
class MCVersionsList(object): <NEW_LINE> <INDENT> def __init__(self, mc_dir): <NEW_LINE> <INDENT> self._dict = {} <NEW_LINE> os.chdir(os.path.join(mc_dir, 'versions')) <NEW_LINE> for version in os.listdir(): <NEW_LINE> <INDENT> if os.path.isdir(version): <NEW_LINE> <INDENT> json_file = os.path.join(version, version + '... | An object to handle a list of valid Minecraft version files. | 62598fb27047854f4633f455 |
@ejit <NEW_LINE> class Exception(BaseException): <NEW_LINE> <INDENT> pass | Common base class for all non-exit exceptions. | 62598fb2a8370b77170f0456 |
class Connection(_http.JSONConnection): <NEW_LINE> <INDENT> API_BASE_URL = 'https://logging.googleapis.com' <NEW_LINE> API_VERSION = 'v2' <NEW_LINE> API_URL_TEMPLATE = '{api_base_url}/{api_version}{path}' <NEW_LINE> SCOPE = ('https://www.googleapis.com/auth/logging.read', 'https://www.googleapis.com/auth/logging.write'... | A connection to Google Stackdriver Logging via the JSON REST API.
:type credentials: :class:`oauth2client.client.OAuth2Credentials`
:param credentials: (Optional) The OAuth2 Credentials to use for this
connection.
:type http: :class:`httplib2.Http` or class that defines ``request()``.
:param http:... | 62598fb2cc0a2c111447b08c |
class TestImagesIPv6(functional.FunctionalTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> test_utils.get_unused_port_ipv4 = test_utils.get_unused_port <NEW_LINE> test_utils.get_unused_port_and_socket_ipv4 = ( test_utils.get_unused_port_and_socket) <NEW_LINE> test_utils.get_unused_port = test_utils.get_u... | Verify that API and REG servers running IPv6 can communicate | 62598fb24f88993c371f0548 |
class Cheshire2QueryStream(QueryStream): <NEW_LINE> <INDENT> booleans = {'AND': 'and', '.AND.': 'and', '&&': 'and', 'OR': 'or', '.OR.': 'or', '||': 'or', 'NOT': 'not', '.NOT.': 'not', 'ANDNOT': 'not', '.ANDNOT.': 'not', '!!': 'not' } <NEW_LINE> relations = {'<': '<', 'LT': '<', '.LT.': '<', '<=': '<=', 'LE': '<=', '.LE... | A QueryStream to process queries in the Cheshire 2 Query Syntax.
http://cheshire.berkeley.edu/cheshire2.html#zfind
top ::= query ['resultsetid' name]
query ::= query boolean clause | clause
clause ::= '(' query ')'
| attributes [relation] term
| resultset
attributes ::= ... | 62598fb27d847024c075c43c |
class SystemPolicyV1Beta1ClientMeta(type): <NEW_LINE> <INDENT> _transport_registry = ( OrderedDict() ) <NEW_LINE> _transport_registry["grpc"] = SystemPolicyV1Beta1GrpcTransport <NEW_LINE> _transport_registry["grpc_asyncio"] = SystemPolicyV1Beta1GrpcAsyncIOTransport <NEW_LINE> def get_transport_class( cls, label: str = ... | Metaclass for the SystemPolicyV1Beta1 client.
This provides class-level methods for building and retrieving
support objects (e.g. transport) without polluting the client instance
objects. | 62598fb23539df3088ecc32c |
class SwitchField(BooleanField): <NEW_LINE> <INDENT> def __init__(self, label=None, **kwargs): <NEW_LINE> <INDENT> super().__init__(label, **kwargs) | A wrapper field for ``BooleanField`` that renders as a Bootstrap switch.
.. versionadded:: 2.0.0 | 62598fb27b180e01f3e4908d |
class StreamCounterStub(object): <NEW_LINE> <INDENT> def __init__(self, channel): <NEW_LINE> <INDENT> self.Count = channel.stream_unary( '/streamcount.StreamCounter/Count', request_serializer=streamcount__pb2.CountRequest.SerializeToString, response_deserializer=streamcount__pb2.CountReply.FromString, ) | The greeting service definition.
| 62598fb2cc0a2c111447b08d |
class AggregateTask(models.Model): <NEW_LINE> <INDENT> aggregate = models.ForeignKey('Aggregate') <NEW_LINE> task_id = models.CharField(max_length=36) <NEW_LINE> timestamp = models.DateTimeField(default=datetime.now) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> unique_together = ('aggregate', 'task_id') | A Celery task in the process of recalculating an Aggregate | 62598fb2851cf427c66b8336 |
class Marker(models.Model): <NEW_LINE> <INDENT> name = models.CharField(unique=True, max_length=255, verbose_name=_(u"name"), help_text=_("Name of the marker.")) <NEW_LINE> slug = models.SlugField(unique=True, verbose_name=_(u"name in URL"), null=True) <NEW_LINE> layer = models.ForeignKey(Layer, verbose_name=_("layer")... | Map markers with display style definition. | 62598fb2dd821e528d6d8fa9 |
class Worker(object): <NEW_LINE> <INDENT> def __init__(self, name, sess, ac_parms, globalAC, game_name, ): <NEW_LINE> <INDENT> super(Worker, self).__init__() <NEW_LINE> self.name = name <NEW_LINE> self.sess = sess <NEW_LINE> self.ac_parms =ac_parms <NEW_LINE> self.globalAC = globalAC <NEW_LINE> self.env = gym.make(game... | docstring for Worker | 62598fb23d592f4c4edbaf3b |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.