code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class UnionFind(object): <NEW_LINE> <INDENT> def __init__(self, n): <NEW_LINE> <INDENT> self.uf = [-1 for i in range(n+1)] <NEW_LINE> self.sets_count = n <NEW_LINE> <DEDENT> def find(self, p): <NEW_LINE> <INDENT> if self.uf[p] < 0: <NEW_LINE> <INDENT> return p <NEW_LINE> <DEDENT> self.uf[p] = self.find(self.uf[p]) <NEW... | 并查集的初始化,即用一种特殊的方式表示初始的每一个元素都不相交,等待后续的合并操作 | 62598f756fece00bbaccb258 |
class SentimentClassifier(nn.Module): <NEW_LINE> <INDENT> def __init__(self, n_classes): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.bert = BertModel.from_pretrained(PRE_TRAINED_MODEL_NAME) <NEW_LINE> self.drop = nn.Dropout(p=0.2) <NEW_LINE> self.out = nn.Linear(self.bert.config.hidden_size, n_classes) <NEW_... | BERT電影影評評分分類模型的主體
Bert sentiment main model for review sentiment analyzer | 62598f75dc8b845886d52e7f |
class PersonHandle: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.po = PersonObject() <NEW_LINE> <DEDENT> def get_user_name(self): <NEW_LINE> <INDENT> name = self.po.find_username().text <NEW_LINE> logging.info("当前获取用户名:{}".format(name)) <NEW_LINE> return name <NEW_LINE> <DEDENT> def click_setting_bt... | 操作层 | 62598f754d74a7450cd58b40 |
class _SerializableQuerySet(models.query.QuerySet): <NEW_LINE> <INDENT> def serialize(self, *args): <NEW_LINE> <INDENT> serialized = [] <NEW_LINE> for elem in self: <NEW_LINE> <INDENT> serialized.append(elem.serialize(*args)) <NEW_LINE> <DEDENT> return serialized | Implements the serialize method on a QuerySet | 62598f7576d4e153a661c4e1 |
class Meta: <NEW_LINE> <INDENT> database = DB <NEW_LINE> primary_key = CompositeKey('citation', 'project') | PeeWee meta class contains the database and the primary key. | 62598f75287bf620b6271484 |
class VPCRouteTableAssociationDefinition(nixops.resources.ResourceDefinition): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def get_type(cls): <NEW_LINE> <INDENT> return "vpc-route-table-association" <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def get_resource_type(cls): <NEW_LINE> <INDENT> return "vpcRouteTableAssociat... | Definition of a VPC route table association | 62598f75e76e3b2f99fd82fe |
class ErrorEnum(Enum): <NEW_LINE> <INDENT> PENDING = 0 <NEW_LINE> @staticmethod <NEW_LINE> def _meta_info(): <NEW_LINE> <INDENT> from ydk.models.cisco_ios_xe._meta import _tailf_confd_monitoring as meta <NEW_LINE> return meta._meta_table['ConfdState.Internal.Cdb.Client.Subscription.ErrorEnum'] | ErrorEnum
If this leaf exists, there is a problem
with the subscription.
.. data:: PENDING = 0
This value means that the subscribing client has not
completed the subscription (with cdb_subscribe_done()). | 62598f75b57a9660fecd134c |
class Digital: <NEW_LINE> <INDENT> def __init__(self, answer, pixels): <NEW_LINE> <INDENT> self.answer = answer <NEW_LINE> self.pic = pixels <NEW_LINE> self.pixels = pixels.load() <NEW_LINE> <DEDENT> def pixinit(self,x,y): <NEW_LINE> <INDENT> for i in range(x): <NEW_LINE> <INDENT> for j in range(y): <NEW_LINE> <INDENT>... | Read from each picture and transform the handwriting numbers to 32*32 pixels | 62598f7591af0d3eaad396d9 |
class CreateUSMSSignatureRequestSchema(schema.RequestSchema): <NEW_LINE> <INDENT> fields = { "CertificateType": fields.Int(required=True, dump_to="CertificateType"), "Description": fields.Str(required=True, dump_to="Description"), "File": fields.Str(required=True, dump_to="File"), "International": fields.Bool(required=... | CreateUSMSSignature - 调用接口CreateUSMSSignature申请短信签名 | 62598f758c3a8732951f5e1b |
class TimeDeltaSensor(BaseSensorOperator): <NEW_LINE> <INDENT> template_fields = tuple() <NEW_LINE> @apply_defaults <NEW_LINE> def __init__(self, delta, *args, **kwargs): <NEW_LINE> <INDENT> super(TimeDeltaSensor, self).__init__(*args, **kwargs) <NEW_LINE> self.delta = delta <NEW_LINE> <DEDENT> def poke(self, context):... | Waits for a timedelta after the task's execution_date + schedule_interval.
In Airflow, the daily task stamped with ``execution_date``
2016-01-01 can only start running on 2016-01-02. The timedelta here
represents the time after the execution period has closed.
:param delta: time length to wait after execution_date bef... | 62598f75d164cc6175820842 |
class LoginMiddleware(object): <NEW_LINE> <INDENT> def process_request(self, request): <NEW_LINE> <INDENT> path = request.path <NEW_LINE> pattern = "^/(log|site_media|favicon.ico)/" <NEW_LINE> if re.compile(pattern).match(path): <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> challenge_mgr.init() <NEW_LINE> pattern... | This middleware does the following checks and tracking:
* checks if today is in the competition period
* checks if user has completed the setup
* tracks how many days in a row the user has come to the site. | 62598f7526068e7796d4c22a |
class GetDocMockTestCase(TestCase): <NEW_LINE> <INDENT> def test_get_document_or_404_not_found(self): <NEW_LINE> <INDENT> with mock_get_context(): <NEW_LINE> <INDENT> with self.assertRaises(Http404): <NEW_LINE> <INDENT> get_document_or_404(MockModel, 'ham', '123') <NEW_LINE> <DEDENT> <DEDENT> <DEDENT> def test_get_docu... | Tests get_document_or_404 with mocking | 62598f75ec188e330fdf816e |
class MultipleValues(object): <NEW_LINE> <INDENT> def __init__(self, *values: str) -> None: <NEW_LINE> <INDENT> if not values: <NEW_LINE> <INDENT> raise ValueError("values cannot be empty") <NEW_LINE> <DEDENT> self.values = values <NEW_LINE> <DEDENT> def __str__(self) -> str: <NEW_LINE> <INDENT> return f'{{{",".join(se... | Graphite API allows to get data from multiple sources in one request
using curly brace notation, for example:
'my_server.{my_instance1,my_instance2}.cpu'
This class defines interface for building that value list
Example:
>>> values = GraphiteMultipleValue('foo', bar', 'spam')
>>> str(values)
>>> '{foo,... | 62598f75d4950a0f3b110a9d |
class ThreadDemo ( HasFacets ): <NEW_LINE> <INDENT> create = Button( 'Create Thread' ) <NEW_LINE> counters = List( Counter ) <NEW_LINE> view = View( VGroup( Item( 'create', width = -100 ), '_', Item( 'counters', style = 'custom', editor = NotebookEditor( dock_style = 'tab', allow_tabs = False ) ), show_labels ... | Defines the main demo class. | 62598f75d18da76e235b6d9d |
class ServesStaticPluginMixin( object ): <NEW_LINE> <INDENT> def _set_up_static_plugin( self, **kwargs ): <NEW_LINE> <INDENT> self.serves_static = False <NEW_LINE> if self._is_static_plugin(): <NEW_LINE> <INDENT> self.static_path = self._build_static_path() <NEW_LINE> self.static_url = self._build_static_url() <NEW_LIN... | An object that serves static files from the server. | 62598f756e29344779afff2f |
class DIAResNet(nn.Module): <NEW_LINE> <INDENT> def __init__(self, channels, init_block_channels, bottleneck, conv1_stride, in_channels=3, in_size=(224, 224), num_classes=1000): <NEW_LINE> <INDENT> super(DIAResNet, self).__init__() <NEW_LINE> self.in_size = in_size <NEW_LINE> self.num_classes = num_classes <NEW_LINE> s... | DIA-ResNet model from 'DIANet: Dense-and-Implicit Attention Network,' https://arxiv.org/abs/1905.10671.
Parameters:
----------
channels : list of list of int
Number of output channels for each unit.
init_block_channels : int
Number of output channels for the initial unit.
bottleneck : bool
Whether to use a... | 62598f7523e79379d538bdc7 |
class NonstationaryLinearDistribution(object): <NEW_LINE> <INDENT> def __init__(self, num_timesteps, inputs_per_timestep=None, outputs_per_timestep=None, initializers=None, variance_min=0.0, output_distribution=tfd.Normal, dtype=tf.float32): <NEW_LINE> <INDENT> if not initializers: <NEW_LINE> <INDENT> initializers = DE... | A set of loc-scale distributions that are linear functions of inputs.
This class defines a series of location-scale distributions such that
the means are learnable linear functions of the inputs and the log variances
are learnable constants. The functions and log variances are different across
timesteps, allowing the ... | 62598f75d10714528d69d79d |
class Timer: <NEW_LINE> <INDENT> def __init__(self, autoprint=False): <NEW_LINE> <INDENT> self.started = False <NEW_LINE> self.start_time = None <NEW_LINE> self.stopped = False <NEW_LINE> self.total_time = None <NEW_LINE> self.autoprint = autoprint <NEW_LINE> <DEDENT> @property <NEW_LINE> def elapsed_time(self): <NEW_L... | A super simple wall clock timer.
After an instance is created, it must be started with
:meth:`start`. It will run until it is :meth:`stop`pped.
A timer can be reset/reused by calling :meth:`stop` then
:meth:`start`.
The string value of a timer is its current elapsed time.
Can be used as a context manager, in which ... | 62598f7576d4e153a661c4e3 |
class principal: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.build=Gtk.Builder() <NEW_LINE> self.build.add_from_file("../interfaz/inicio.glade") <NEW_LINE> if os.path.exists("database.dat"): <NEW_LINE> <INDENT> self.bd=dbapi.connect("database.dat") <NEW_LINE> self.cursor=self.bd.cursor() <NEW_LINE>... | Clase inicial de la aplicacion | 62598f75e76e3b2f99fd8300 |
class War: <NEW_LINE> <INDENT> def __init__(self, names: Tuple[str, str] = ['Player1', 'Player2'], verbose: bool = False): <NEW_LINE> <INDENT> full_deck = Deck.create_standard_deck() <NEW_LINE> full_deck.shuffle() <NEW_LINE> self._p1 = Player(names[0], full_deck.draw(26)) <NEW_LINE> self._p2 = Player(names[1], full_dec... | The game of War. | 62598f7596565a6dacd2cbe3 |
class SubnetAssociation(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> su... | Network interface and its custom security rules.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: Subnet ID.
:vartype id: str
:param security_rules: Collection of custom security rules.
:type security_rules: list[~azure.mgmt.network.v2018_08_01.models.SecurityRule] | 62598f75a8ecb03325870ad8 |
class GlobalCheckFail(CommandError): <NEW_LINE> <INDENT> pass | ... | 62598f7523e79379d538bdc8 |
class Scrap(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.driver = webdriver.Chrome( ChromeDriverManager().install(), options=options) <NEW_LINE> self.wait = WebDriverWait(self.driver, 30) <NEW_LINE> <DEDENT> def scrap_data(self): <NEW_LINE> <INDENT> self.driver.get( 'https://en.wikipedia.or... | Class to handle all the scrapping process | 62598f751d351010ab8f340e |
class Predator(Animal): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Animal.__init__(self,0,0) <NEW_LINE> <DEDENT> def Catch_Prey(self,mp): <NEW_LINE> <INDENT> return mp.Catch_Prey(self) | Implementation of the "abstract" Animal class to instanciate a Predator. | 62598f75d99f1b3c44d04f80 |
class Array(list): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Array, self).__init__() <NEW_LINE> self.__collection_format = 'csv' <NEW_LINE> <DEDENT> def apply_with(self, obj, val, _): <NEW_LINE> <INDENT> if isinstance(val, six.string_types): <NEW_LINE> <INDENT> val = json.loads(val) <NEW_LINE> <... | for array type, or parameter when allowMultiple=True
| 62598f7515baa72349461852 |
class ROSLaunchChildNode(ROSLaunchNode): <NEW_LINE> <INDENT> def __init__(self, run_id, name, server_uri, pm, sigint_timeout=DEFAULT_TIMEOUT_SIGINT, sigterm_timeout=DEFAULT_TIMEOUT_SIGTERM): <NEW_LINE> <INDENT> self.logger = logging.getLogger("roslaunch.server") <NEW_LINE> self.run_id = run_id <NEW_LINE> self.name = na... | XML-RPC server for roslaunch child processes | 62598f7538b623060ffa896b |
class Company(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'companies' <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> portfolio_id = db.Column(db.ForeignKey('portfolios.id'), nullable=False) <NEW_LINE> company_name = db.Column(db.String(256), index=True, unique=True) <NEW_LINE> symbol = db.Column(... | Creates a companies table. | 62598f75cad5886f8bdc4bf2 |
class for_keyword(parser.keyword): <NEW_LINE> <INDENT> def __init__(self, sString): <NEW_LINE> <INDENT> parser.keyword.__init__(self, sString) | unique_id = iteration_scheme : for_keyword | 62598f754d74a7450cd58b42 |
class AbstractSession(metaclass=ABCMeta): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def is_available(host): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def __init__(self, host, port): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def start(self, taskset, *... | Abstract class for the low level implementation of a session.
It is important to keep the low level implementation as simple as possible
for debugging purposes. For examples, look at the `taskgen.sessions.*`
implementations. | 62598f7516aa5153ce3ffdcf |
class ListCache: <NEW_LINE> <INDENT> def __init__(self, maxlen=1000): <NEW_LINE> <INDENT> self._cache = deque(maxlen=maxlen) <NEW_LINE> <DEDENT> def add(self, obj): <NEW_LINE> <INDENT> self._cache.appendleft(obj) <NEW_LINE> <DEDENT> def items(self): <NEW_LINE> <INDENT> return [flow_to_json(flow) for flow in list(self._... | 双向序列
默认最大值1000
存储流经mock服务的数据 | 62598f7515fb5d323ce7e5f9 |
class purchase_order_line1(osv.osv): <NEW_LINE> <INDENT> _name = 'purchase.order.line' <NEW_LINE> _inherit = 'purchase.order.line' <NEW_LINE> def _get_vat_ok(self, cr, uid, ids, field_name, args, context=None): <NEW_LINE> <INDENT> vat_ok = self.pool.get('unifield.setup.configuration').get_config(cr, uid).vat_ok <NEW_LI... | this modification is placed before merged, because unit price of merged should be Computation as well | 62598f7596565a6dacd2cbe4 |
class WeightedBCEWithLogitsLoss(nn.Module): <NEW_LINE> <INDENT> def __init__(self, class_weights, reduction='none'): <NEW_LINE> <INDENT> super(WeightedBCEWithLogitsLoss, self).__init__() <NEW_LINE> self.class_weights = class_weights <NEW_LINE> self.reduction = reduction <NEW_LINE> <DEDENT> def forward(self, input, targ... | Log-loss for RSNA Intracranial Hemorhage Competition.
Args:
class_weights (tensor): weights for 6 classes any, intraparenchymal,
intraventricular, subarachnoid, subdural, epidural.
reduction (str): Specifies the reduction to apply to the output. | 62598f75b57a9660fecd1350 |
class Connection(object): <NEW_LINE> <INDENT> __logger = _getChildLogger(_logger, 'connection') <NEW_LINE> def __init__(self, connector, database=None, login=None, password=None, user_id=None): <NEW_LINE> <INDENT> self.connector = connector <NEW_LINE> self.set_login_info(database, login, password, user_id) <NEW_LINE> s... | A class to represent a connection with authentication to an Odoo Server.
It also provides utility methods to interact with the server more easily. | 62598f75711fe17d825dffb6 |
class GeneratorRef(object): <NEW_LINE> <INDENT> def __init__(self, generator, epoch): <NEW_LINE> <INDENT> self.__hash = hash(generator) <NEW_LINE> self.__wrapper = ref(generator) <NEW_LINE> self.__last_known_epoch = epoch <NEW_LINE> self.order_epoch = epoch <NEW_LINE> self.__count = 1 <NEW_LINE> self.gced = False <NEW_... | This contains the weak reference to the GeneratorWrapper and is stored
in the GC priority queue. | 62598f75c432627299fa28a9 |
class Meta: <NEW_LINE> <INDENT> abstract = True | Define the class as abstract. | 62598f759b70327d1c57e680 |
class DateSchema(Schema): <NEW_LINE> <INDENT> date = EDTFDateString(required=True) <NEW_LINE> type = fields.Nested(VocabularySchema, required=True) <NEW_LINE> description = fields.Str() | Schema for date intervals. | 62598f757c178a314d78cd78 |
class Marcador(Birome): <NEW_LINE> <INDENT> def __init__(self, cantidad_tinta = 200): <NEW_LINE> <INDENT> super().__init__(cantidad_tinta) <NEW_LINE> <DEDENT> def recargar(self, tinta): <NEW_LINE> <INDENT> self.cantidad_tinta += tinta | Marcador hereda de Birome y puede cargar tinta
cantidad_tinta: int | 62598f750383005118f6cfd3 |
class NameInfo(): <NEW_LINE> <INDENT> def __init__(self, info): <NEW_LINE> <INDENT> self.__info = json.loads(MessageToJson(info)) <NEW_LINE> self.__name = info.name.name <NEW_LINE> self.__owner = Address.encode(info.owner) <NEW_LINE> self.__dest = Address.encode(info.destination) <NEW_LINE> <DEDENT> @property <NEW_LINE... | NameInfo is used to store information of name system. | 62598f75ec188e330fdf8172 |
class AboutDialog(QtWidgets.QDialog, Ui_AboutDialog): <NEW_LINE> <INDENT> def __init__(self, author, version, parent=None): <NEW_LINE> <INDENT> super(AboutDialog, self).__init__(parent) <NEW_LINE> self.setupUi(self) <NEW_LINE> self.label_title.setText("Short Circuit {}".format(version)) <NEW_LINE> self.label_author.set... | Tripwire Configuration Window | 62598f758c3a8732951f5e20 |
class Br(SelfClosingTag): <NEW_LINE> <INDENT> tag_name = u"br /" | A br tag. | 62598f75d18da76e235b6d9f |
class SubTableFormTemplate(pt.PageTemplate): <NEW_LINE> <INDENT> pt.view(SubTableForm) | A default template for a SubTableForm
| 62598f75d6c5a102081e1a18 |
class OpenIDConfiguration: <NEW_LINE> <INDENT> def __init__(self, data) -> None: <NEW_LINE> <INDENT> self._data = data <NEW_LINE> <DEDENT> @property <NEW_LINE> def issuer(self) -> str: <NEW_LINE> <INDENT> return self._data["issuer"] <NEW_LINE> <DEDENT> @property <NEW_LINE> def jwks_uri(self) -> str: <NEW_LINE> <INDENT>... | Proxy class for a remote OpenID Connect well-known configuration. | 62598f758a349b6b43685b15 |
class Dropout(base._Layer): <NEW_LINE> <INDENT> def __init__(self, rate=0.5, noise_shape=None, seed=None, name=None, **kwargs): <NEW_LINE> <INDENT> super(Dropout, self).__init__(name=name, **kwargs) <NEW_LINE> self.rate = rate <NEW_LINE> self.noise_shape = noise_shape <NEW_LINE> self.seed = seed <NEW_LINE> <DEDENT> def... | Applies Dropout to the input.
Dropout consists in randomly setting a fraction `rate` of input units to 0
at each update during training time, which helps prevent overfitting.
The units that are kept are scaled by `1 / (1 - rate)`, so that their
sum is unchanged at training time and inference time.
Arguments:
rate: ... | 62598f75dc8b845886d52e86 |
class PythonClass(PythonPythonMapper): <NEW_LINE> <INDENT> type = "class" <NEW_LINE> member_order = 30 <NEW_LINE> def __init__(self, obj, **kwargs): <NEW_LINE> <INDENT> super(PythonClass, self).__init__(obj, **kwargs) <NEW_LINE> self.bases = obj["bases"] <NEW_LINE> <DEDENT> @property <NEW_LINE> def args(self): <NEW_LIN... | The representation of a class. | 62598f7530c21e258be980d8 |
class Contributor(models.Model): <NEW_LINE> <INDENT> last_name = models.CharField(max_length=191) <NEW_LINE> first_name = models.CharField(max_length=191, blank=True) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return ('%s %s' % (self.first_name, self.last_name)).strip() <NEW_LINE> <DEDENT> @property <NEW_LINE> d... | A contributor to a published work. | 62598f7515fb5d323ce7e5fb |
class NETCONFMountRequest(object): <NEW_LINE> <INDENT> def __init__(self, device_name, ip_addr, netconf_port, user_name, user_password): <NEW_LINE> <INDENT> _req_template = { 'name': None, 'odl-sal-netconf-connector-cfg:address': None, 'odl-sal-netconf-connector-cfg:port': None, 'odl-sal-netconf-connector-cfg:username'... | Helper class that used for RESTCONF request content preparation
for mounting NETCONF device on the Controller | 62598f75fb3f5b602db47e1a |
class BaseSensor(Entity): <NEW_LINE> <INDENT> def __init__(self, data, data_params, name, icon, unique_id): <NEW_LINE> <INDENT> self._attrs = {ATTR_ATTRIBUTION: DEFAULT_ATTRIBUTION} <NEW_LINE> self._icon = icon <NEW_LINE> self._name = name <NEW_LINE> self._data_params = data_params <NEW_LINE> self._state = None <NEW_LI... | Define a base class for all of our sensors. | 62598f758c3a8732951f5e21 |
class WidgetNodeView(NodeView, QtGui.QGraphicsRectItem): <NEW_LINE> <INDENT> def __init__(self, node): <NEW_LINE> <INDENT> QtGui.QGraphicsRectItem.__init__(self, 0., 0., 70., 50.) <NEW_LINE> proxy = QtGui.QGraphicsProxyWidget(self) <NEW_LINE> proxy.setWidget(node.get_widget()) <NEW_LINE> proxy.setPos(15., 15.) <NEW_LIN... | Node using a full fledged widget. | 62598f7591af0d3eaad396df |
class fib_gen(SeqGenerator): <NEW_LINE> <INDENT> def __init__(self, *args): <NEW_LINE> <INDENT> self.n = 1 <NEW_LINE> self.x = 0 <NEW_LINE> self.y = 1 <NEW_LINE> self.args = args <NEW_LINE> <DEDENT> def _calc(self): <NEW_LINE> <INDENT> self.x, self.y = self.y, self.x + self.y <NEW_LINE> return self.x | generates a list of fibonacci numbers | 62598f75b830903b9686e0dc |
class ValueIterationAgent(ValueEstimationAgent): <NEW_LINE> <INDENT> def __init__(self, mdp, discount = 0.9, iterations = 100): <NEW_LINE> <INDENT> self.mdp = mdp <NEW_LINE> self.discount = discount <NEW_LINE> self.iterations = iterations <NEW_LINE> self.values = util.Counter() <NEW_LINE> self.qvalues = { state: {} for... | A ValueIterationAgent takes a Markov decision process
(see mdp.py) on initialization and runs value iteration
for a given number of iterations using the supplied
discount factor. | 62598f756aa9bd52df0d47a8 |
class Layer(AbstractLayer, Basic): <NEW_LINE> <INDENT> def use_params(self, params): <NEW_LINE> <INDENT> if hasattr(self, "name"): <NEW_LINE> <INDENT> if "ntm_model_ntm" in self.name: <NEW_LINE> <INDENT> self.params.set_values(params.filterby(self.name) + params.filterby("Addressed")) <NEW_LINE> <DEDENT> else: <NEW_LIN... | Simple Layer base class. | 62598f75ec188e330fdf8174 |
class MessageLog: <NEW_LINE> <INDENT> def __init__(self, x, width, height): <NEW_LINE> <INDENT> self.messages = [] <NEW_LINE> self.x = x <NEW_LINE> self.width = width <NEW_LINE> self.height = height <NEW_LINE> <DEDENT> def add_message(self, message): <NEW_LINE> <INDENT> new_msg_lines = textwrap.wrap(message.text, self.... | Class for the message log, which contains message objects. | 62598f7576d4e153a661c4e8 |
class NBPError(Exception): <NEW_LINE> <INDENT> pass | General exception for NBPy. | 62598f75d18da76e235b6da0 |
class StrModule(nn.Module): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.str = name <NEW_LINE> <DEDENT> def forward(self, *args, **kwargs): <NEW_LINE> <INDENT> return self.str <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "{}({})".format(self.... | A shell used to wrap choices as nn.Module for non-one-shot space definition
You can use ``map_nn`` function
Parameters
----------
name : anything
the name of module, can be any type | 62598f756fece00bbaccb260 |
class AuthView(View): <NEW_LINE> <INDENT> def post(self, request, *args, **kwargs): <NEW_LINE> <INDENT> result = { 'auth_token': '', 'success': True, 'error_msg': None } <NEW_LINE> try: <NEW_LINE> <INDENT> username = request.POST['username'] <NEW_LINE> password = request.POST['password'] <NEW_LINE> <DEDENT> except KeyE... | Exposes a token based Authentication system to make it fully stateless
REST compatible system. | 62598f7563f4b57ef00859d9 |
class NGramJobHandlerWorker(multiprocessing.Process): <NEW_LINE> <INDENT> def __init__(self, jobQueue=None, resultQueue=None): <NEW_LINE> <INDENT> multiprocessing.Process.__init__(self) <NEW_LINE> jobQueue = jobQueue or () <NEW_LINE> resultQueue = resultQueue or () <NEW_LINE> self.jobQueue = jobQueue <NEW_LINE> self.re... | Worker process which runs ``QuantizationJobs``.
Not composer-safe.
Used internally by ``ParallelJobHandler``. | 62598f75d6c5a102081e1a1a |
class UnifiedJobTemplateAccess(BaseAccess): <NEW_LINE> <INDENT> model = UnifiedJobTemplate <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> if self.user.is_superuser or self.user.is_system_auditor: <NEW_LINE> <INDENT> qs = self.model.objects.all() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> qs = self.model.obje... | I can see a unified job template whenever I can see the same project,
inventory source, WFJT, or job template. Unified job templates do not include
inventory sources without a cloud source. | 62598f758a349b6b43685b17 |
class _demandmod(object): <NEW_LINE> <INDENT> def __init__(self, name, globals, locals, level=level): <NEW_LINE> <INDENT> if '.' in name: <NEW_LINE> <INDENT> head, rest = name.split('.', 1) <NEW_LINE> after = [rest] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> head = name <NEW_LINE> after = [] <NEW_LINE> <DEDENT> obje... | module demand-loader and proxy | 62598f7516aa5153ce3ffdd3 |
class AddressViewset(viewsets.ModelViewSet): <NEW_LINE> <INDENT> serializer_class = AddressSerializer <NEW_LINE> authentication_classes = (JSONWebTokenAuthentication,SessionAuthentication) <NEW_LINE> permission_classes = (IsOwnerOrReadOnly,IsAuthenticated) <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> return U... | 收货地址管理
list:
获取收货地址
create:
添加收货地址
update:
更新收货地址
delete:
删除收货地址 | 62598f75b57a9660fecd1353 |
class GetSubscriptionSplitResponse(object): <NEW_LINE> <INDENT> _names = { "enabled":'enabled', "rules":'rules' } <NEW_LINE> def __init__(self, enabled=None, rules=None): <NEW_LINE> <INDENT> self.enabled = enabled <NEW_LINE> self.rules = rules <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_dictionary(cls, diction... | Implementation of the 'GetSubscriptionSplitResponse' model.
Subscription's split response
Attributes:
enabled (bool): Defines if the split is enabled
rules (list of GetSplitResponse): Split | 62598f75a4f1c619b294dec0 |
class Sound(BaseTable): <NEW_LINE> <INDENT> def __init__(self, session): <NEW_LINE> <INDENT> BaseTable.__init__(self, 6, 1) <NEW_LINE> self.session = session <NEW_LINE> self.append_markup('<b>Messages events:</b>') <NEW_LINE> self.append_check('Play sound on first sent message', 'session.config.b_play_first_send') <NEW... | the panel to display/modify the config related to the sounds
| 62598f7515fb5d323ce7e5fd |
class BaseLogicalResourceTest(arrow.test.BaseTestCase): <NEW_LINE> <INDENT> credentials = ['superadmin'] <NEW_LINE> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> super(BaseLogicalResourceTest, cls).setUpClass() <NEW_LINE> cls.admin_client = cls.os.admin_client <NEW_LINE> cls.vdev_client = cls.os.vdev... | Base test case class for all Logical Resource GUI tests. | 62598f7573bcbd0ca4bc9b24 |
class PerDollar(CommissionModel): <NEW_LINE> <INDENT> def __init__(self, cost=0.0015): <NEW_LINE> <INDENT> self.cost_per_dollar = float(cost) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "{class_name}(cost_per_dollar={cost})".format( class_name=self.__class__.__name__, cost=self.cost_per_dollar) <... | Calculates a commission for a transaction based on a per trade cost.
Parameters
----------
cost : float
The flat amount of commissions paid per trade. | 62598f7566656f66f7d59cc6 |
class WhenDeserializingAProductRemoveAttributeWithInvalidDataTests(TestCaseWithFixtureData): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpTestData(cls): <NEW_LINE> <INDENT> super(WhenDeserializingAProductRemoveAttributeWithInvalidDataTests, cls).setUpTestData() <NEW_LINE> cls.serializer_data = { "attribute_id":... | This class defines the test suite for valid deserialization of a product and attribute id. | 62598f75507cdc57c63a4660 |
class WinnerViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Winner.objects.all() <NEW_LINE> serializer_class = pickem.serializers.WinnerSerializer <NEW_LINE> permission_classes = [rest_permissions.IsAuthenticatedOrReadOnly, rest_permissions.DjangoModelPermissionsOrAnonReadOnly] | API endpoint that allows winners to be viewed or edited
| 62598f75a8ecb03325870ade |
class GetDisplayLevelWithData(TestMixins.GetWithDataMixin, OptionalParameterTestFixture): <NEW_LINE> <INDENT> CATEGORY = TestCategory.ERROR_CONDITIONS <NEW_LINE> PID = 'DISPLAY_LEVEL' | GET the pan invert setting with extra data. | 62598f758a43f66fc4bf1a52 |
class Proyecto(models.Model): <NEW_LINE> <INDENT> nombre= models.CharField(max_length=100, verbose_name='Nombre',unique=True) <NEW_LINE> descripcion= models.TextField(verbose_name='Descripcion') <NEW_LINE> fecha_ini=models.DateField(verbose_name='Fecha de inicio',null=False) <NEW_LINE> fecha_fin=models.DateField(verbos... | Clase del Modelo que representa al proyecto con sus atributos.
@cvar nombre: Cadena de caracteres
@cvar descripcion: Un campo de texto
@cvar fecha_ini: Fecha que indica el inicio de un proyecto
@cvar fecha_fin: Fecha que indica el fin estimado de un proyecto
@cvar estado: Enum de los tipos de estados por los que puede... | 62598f758da39b475be02ab8 |
class GaussMarkovProcess(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._mean = 0 <NEW_LINE> self._min = -1 <NEW_LINE> self._max = 1 <NEW_LINE> self._mu = 0 <NEW_LINE> self._var = 0 <NEW_LINE> self._noise_amp = 0 <NEW_LINE> self._last_time_stamp = -1 <NEW_LINE> <DEDENT> def __str__(self): <NE... | Gauss-Markov process of first order
| 62598f75d4950a0f3b110aa1 |
class DecayedAdaGradOptimizer(BaseSGDOptimizer): <NEW_LINE> <INDENT> def to_setting_kwargs(self): <NEW_LINE> <INDENT> return { 'learning_method': 'decayed_adagrad', 'ada_rou': self.rho, 'ada_epsilon': self.epsilon } <NEW_LINE> <DEDENT> def __init__(self, rho=0.95, epsilon=1e-6): <NEW_LINE> <INDENT> self.rho = rho <NEW_... | AdaGrad method with decayed sum gradients. The equations of this method
show as follow.
.. math::
E(g_t^2) &= \rho * E(g_{t-1}^2) + (1-\rho) * g^2 \\
learning\_rate &= 1/sqrt( ( E(g_t^2) + \epsilon )
:param rho: The :math:`\rho` parameter in that equation
:type rho: float
:param epsilon: The :math:`\epsilon... | 62598f751f037a2d8b9e39c3 |
class CF_SNEmbedding(Embedding): <NEW_LINE> <INDENT> def __init__(self, size, dim, dist=model.PoincareDistance, max_norm=1): <NEW_LINE> <INDENT> super(CF_SNEmbedding, self).__init__(size, dim, dist, max_norm) <NEW_LINE> self.dist=dist <NEW_LINE> <DEDENT> def _forward(self, e): <NEW_LINE> <INDENT> o = e.narrow(1, 1, e.s... | Collaborative filtering model using Poincare distance. The _forward function takes embeddings for the query
item (in this case will always be a user), the positive example (item the user purchased) and then a series of
negative items (for the case of Bayesian Pairwise Loss this will just be one negative item).
It then ... | 62598f757b25080760ed6d76 |
class ClippingNonlinearBlock(NonlinearBlock): <NEW_LINE> <INDENT> def __init__(self, input_signal=None, clipping_threshold=None): <NEW_LINE> <INDENT> NonlinearBlock.__init__(self, input_signal=input_signal) <NEW_LINE> if clipping_threshold is None: <NEW_LINE> <INDENT> self._clipping_threshold = [-1.0, 1.0] <NEW_LINE> <... | A base class to create nonlinear block by clipping signals. | 62598f76d99f1b3c44d04f84 |
class TextDecoder(nn.Module): <NEW_LINE> <INDENT> def __init__(self, d_embed, d_hidden, d_vocab, d_layers, d_max_seq_len=20): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.d_vocab = d_vocab <NEW_LINE> self.d_embed = d_embed <NEW_LINE> self.d_hidden = d_hidden <NEW_LINE> self.d_layers = d_layers <NEW_LINE> self... | Network to decode image features into text. | 62598f76cad5886f8bdc4bf8 |
class Sin(PyoObject): <NEW_LINE> <INDENT> def __init__(self, input, mul=1, add=0): <NEW_LINE> <INDENT> PyoObject.__init__(self, mul, add) <NEW_LINE> self._input = input <NEW_LINE> self._in_fader = InputFader(input) <NEW_LINE> in_fader, mul, add, lmax = convertArgsToLists(self._in_fader, mul, add) <NEW_LINE> self._base_... | Performs a sine function on audio signal.
Returns the sine of audio signal as input.
:Parent: :py:class:`PyoObject`
:Args:
input : PyoObject
Input signal, angle in radians.
>>> s = Server().boot()
>>> s.start()
>>> import math
>>> a = Phasor(500, mul=math.pi*2)
>>> b = Sin(a, mul=.3).mix(2).out() | 62598f7616aa5153ce3ffdd5 |
class iScsiDiskDevice(DiskDevice, NetworkStorageDevice): <NEW_LINE> <INDENT> _type = "iscsi" <NEW_LINE> _packages = ["iscsi-initiator-utils", "dracut-network"] <NEW_LINE> def __init__(self, device, **kwargs): <NEW_LINE> <INDENT> self.node = kwargs.pop("node") <NEW_LINE> self.ibft = kwargs.pop("ibft") <NEW_LINE> self.ni... | An iSCSI disk. | 62598f76a4f1c619b294dec2 |
class ComputeaccountsGroupsInsertRequest(messages.Message): <NEW_LINE> <INDENT> group = messages.MessageField('Group', 1) <NEW_LINE> project = messages.StringField(2, required=True) | A ComputeaccountsGroupsInsertRequest object.
Fields:
group: A Group resource to be passed as the request body.
project: Project ID for this request. | 62598f76b57a9660fecd1355 |
class dados: <NEW_LINE> <INDENT> def salas(self,a,b,c,d,e,f,g,h,i): <NEW_LINE> <INDENT> self.m = agendaMo() <NEW_LINE> self.m.setpriSala(a) <NEW_LINE> self.m.setsegSala(b) <NEW_LINE> self.m.setterSala(c) <NEW_LINE> self.m.setquarSala(d) <NEW_LINE> self.m.setquinSala(e) <NEW_LINE> self.m.setsexSala(f) <NEW_LINE> self.m.... | INSTANCIAS DA CLASSE AGENDA(SALAS) | 62598f7673bcbd0ca4bc9b25 |
class IconStyle(BaseOption): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.normal = Normal() <NEW_LINE> self.emphasis = Emphasis() <NEW_LINE> <DEDENT> def set_keys(self, *args, **kwargs): <NEW_LINE> <INDENT> pass | This Class Is For ToolBox | 62598f7623e79379d538bdd0 |
class Space(node.TreeNode): <NEW_LINE> <INDENT> def __init__(self, name, parent): <NEW_LINE> <INDENT> node.TreeNode.__init__(self, name, parent) <NEW_LINE> <DEDENT> def takeParser(self, parser): <NEW_LINE> <INDENT> self.setODEObject(parser.getParam('spaceFactory')()) <NEW_LINE> self._parser = parser <NEW_LINE> self._pa... | Represents an ode.Space object and corresponds to the <space> tag. | 62598f761f5feb6acb16250e |
class TestComments(BaseTest): <NEW_LINE> <INDENT> def test_post_question(self): <NEW_LINE> <INDENT> self.meetups() <NEW_LINE> response = self.questions() <NEW_LINE> result = json.loads(response.data.decode("UTF-8")) <NEW_LINE> self.assertEqual(response.status_code, 201) <NEW_LINE> self.assertIn("createdby", result.get(... | Test Questions | 62598f76287bf620b627148f |
class Playlist: <NEW_LINE> <INDENT> def __init__(self, session: ServiceSession, data: Dict): <NEW_LINE> <INDENT> self.session = session <NEW_LINE> self.data = data <NEW_LINE> self.links = data["links"] <NEW_LINE> <DEDENT> def __getattr__(self, name): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> val = self.data[name] <N... | A local object representing a playlist response from the phenotype
catalog service.
Please refer to the API Documentation for the phenotype catalog service.
In addition to the ones documented here, this object has at least these attributes:
* name - Playlist name
* description - Textual description of this phenotype... | 62598f76ec188e330fdf8178 |
class HostHeaderTestCase(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.c = Client(HTTP_HOST='_') <NEW_LINE> <DEDENT> def test_underscore_host(self): <NEW_LINE> <INDENT> resp = self.c.get('/') <NEW_LINE> self.assertEqual(resp.status_code, 400) <NEW_LINE> <DEDENT> def test_empy_host(self): <NEW... | Testing boot traffic. | 62598f768da39b475be02aba |
class NatureConvBodySigmoid(nn.Module): <NEW_LINE> <INDENT> def __init__(self, action_dim, in_channels=1, seed=0): <NEW_LINE> <INDENT> super(NatureConvBodySigmoid, self).__init__() <NEW_LINE> self.seed = torch.manual_seed(seed) <NEW_LINE> self.feature_dim = action_dim <NEW_LINE> self.conv1 = layer_init(nn.Conv3d(in_cha... | Adapted from https://github.com/ShangtongZhang/DeepRL/blob/717fe68e7ed00a80c6c52ec9613c9a16dbb37e0c/deep_rl/network/network_bodies.py#L10 | 62598f7626068e7796d4c234 |
class GetInstrumentBars(BaseParser): <NEW_LINE> <INDENT> def setup(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def setParams(self, category, market, code, start, count): <NEW_LINE> <INDENT> if type(code) is six.text_type: <NEW_LINE> <INDENT> code = code.encode("utf-8") <NEW_LINE> <DEDENT> pkg = bytearray.fromhe... | first:
0000 01 01 08 6a 01 01 16 00 16 00 ...j......
second:
0000 ff 23 2f 49 46 4c 30 00 74 01 a9 13 04 00 01 00 .#/IFL0.t.......
0010 00 00 00 00 f0 00 ......
0000 ff 23 28 42 41 42 41 00 00 00 a9 13 04 00 01 00 .#(BABA.........
0010 00 00 00 00 f0 ... | 62598f76d18da76e235b6da2 |
class MergeDirection: <NEW_LINE> <INDENT> Local, Remote, Merge = range(1,4) | MergeDirection represents an enumeration to identify which side to keep. | 62598f7623e79379d538bdd1 |
class Code(object): <NEW_LINE> <INDENT> QUIET_COMPILE = False <NEW_LINE> PREFIX = None <NEW_LINE> EXTENSIONS = None <NEW_LINE> def __init__(self, src_name, src_dir, out_dir): <NEW_LINE> <INDENT> self.src_name = src_name <NEW_LINE> self.src_dir = src_dir <NEW_LINE> self.out_dir = out_dir <NEW_LINE> <DEDENT> def Compile(... | Interface of program codes.
Supports operations such as compile, run, clean. | 62598f76d99f1b3c44d04f86 |
class GreeterStub(object): <NEW_LINE> <INDENT> def __init__(self, channel): <NEW_LINE> <INDENT> self.AdicionarContato = channel.unary_unary( '/Greeter/AdicionarContato', request_serializer=helloworld__pb2.Contato.SerializeToString, response_deserializer=helloworld__pb2.Resposta.FromString, ) <NEW_LINE> self.RemoverCont... | interface de servico
| 62598f7676d4e153a661c4ed |
class RepeatedIPv6Events(RepeatedEvents): <NEW_LINE> <INDENT> format = 4 <NEW_LINE> repeat = 18 | A subreport regarding multiple occurrences of events regarding an
IPv6 address.
Each repeated IPv6 subreport contains one or more events. The length of
each event is 18. The events themselves consist of:
* The 16-byte IPv6 address in network byte order.
* A one-byte event type.
* A one-byte repeat. This b... | 62598f764e696a045264da6b |
class Environment(ABC): <NEW_LINE> <INDENT> def step(self, action): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def getObservation(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def calcula... | Environment base class. | 62598f7673bcbd0ca4bc9b27 |
class KineticHub(PyMooseBase): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> __repr__ = _swig_repr <NEW_LINE> def __init__(self, *args): <NEW_LINE> <INDENT> this = _moose.new_KineticHub(*args) <NEW_LINE> try: self.this.append(this)... | Proxy of C++ pymoose::KineticHub class | 62598f7673bcbd0ca4bc9b28 |
@implementer(INameChooser) <NEW_LINE> class NormalizingNameChooser: <NEW_LINE> <INDENT> def __init__(self, context): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> <DEDENT> def checkName(self, name, obj): <NEW_LINE> <INDENT> return not self._getCheckId(obj)(name, required=1) <NEW_LINE> <DEDENT> def chooseName(se... | A name chooser for a Zope object manager.
If the object is adaptable to or provides INameFromTitle, use the
title to generate a name. | 62598f7615fb5d323ce7e601 |
class XLATestCase(test.TestCase): <NEW_LINE> <INDENT> def __init__(self, method_name='runTest'): <NEW_LINE> <INDENT> super(XLATestCase, self).__init__(method_name) <NEW_LINE> self.device = FLAGS.test_device <NEW_LINE> self.has_custom_call = (self.device == 'XLA_CPU') <NEW_LINE> self.all_tf_types = [ dtypes.as_dtype(typ... | XLA test cases are parameterized test cases. | 62598f76c432627299fa28b1 |
class TestMovesTypeCollection(BaseTestCase): <NEW_LINE> <INDENT> @parameterized.expand([ [None], ['admin'], ['user_1'], ['user_2'], ]) <NEW_LINE> @request_context <NEW_LINE> def test_moves_types_collection_has_right_number_of_items(self, username): <NEW_LINE> <INDENT> user = getattr(self, username) if username else Non... | Test Moves Types collection | 62598f76b830903b9686e0df |
class CoupleTripletInGroupSolver(BaseSolver): <NEW_LINE> <INDENT> def reduce_allowed_moves(self, board, allowed_moves): <NEW_LINE> <INDENT> for group in board.all_groups: <NEW_LINE> <INDENT> gmoves = {} <NEW_LINE> for cell in group.cells: <NEW_LINE> <INDENT> if not cell.value: <NEW_LINE> <INDENT> am = frozenset(allowed... | If two moves are the only possible moves for two cells of the same group,
or three moves are the only possible moves for three cells,
remove them from the other cells of the group | 62598f7691af0d3eaad396e5 |
class HATEOASMixin(object): <NEW_LINE> <INDENT> def get_links(self, obj): <NEW_LINE> <INDENT> request = self.context['request'] <NEW_LINE> detail_name = '{}-detail'.format(get_model_name(obj.__class__)) <NEW_LINE> return { 'self': reverse(detail_name, kwargs={'pk': obj.pk}, request=request), } | Serializer mixin for providing links. | 62598f76d164cc617582084e |
class ResetPasswordSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> email = serializers.EmailField(required=True) <NEW_LINE> otp = serializers.CharField(required=True) <NEW_LINE> password = serializers.CharField(required=True) <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.password... | Reset Password | 62598f767c178a314d78cd80 |
class XCATBaremetalDriver(base.BaseDriver): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.power = xcat_rpower.XcatPower() <NEW_LINE> self.console = ipmitool.IPMIShellinaboxConsole() <NEW_LINE> self.deploy = xcat_pxe.PXEDeploy() <NEW_LINE> self.pxe_vendor = pxe.VendorPassthru() <NEW_LINE> self.ipmi_ve... | xCAT driver
This driver implements the `core` functionality, combinding
:class:`ironic.drivers.xcat_rpower.XcatPower` for power on/off and reboot with
:class:`ironic.driver.xcat_pxe.PXEDeploy` for image deployment. Implementations are in
those respective classes; this class is merely the glue between them. | 62598f7621bff66bcd72253d |
class RouterAdvertisedPrefix(_messages.Message): <NEW_LINE> <INDENT> description = _messages.StringField(1) <NEW_LINE> prefix = _messages.StringField(2) | Description-tagged prefixes for the router to advertise.
Fields:
description: User-specified description for the prefix.
prefix: The prefix to advertise. The value must be a CIDR-formatted
string. | 62598f76d99f1b3c44d04f87 |
class QQUserView(View): <NEW_LINE> <INDENT> def get(self,request): <NEW_LINE> <INDENT> code=request.GET.get('code') <NEW_LINE> if not code: <NEW_LINE> <INDENT> return JsonResponse({ 'code':400, 'errmsg':'缺少参数', }) <NEW_LINE> <DEDENT> oauth=OAuthQQ( client_id=settings.QQ_CLIENT_ID, client_secret=settings.QQ_CLIENT_SECRE... | 扫码登录回调处理 | 62598f760a366e3fb87dc2a2 |
class ColumnRef: <NEW_LINE> <INDENT> def __init__(self, table_name:TableName, column_name:Optional[ColumnName]=None): <NEW_LINE> <INDENT> self.table_name = table_name <NEW_LINE> self.column_name = column_name <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_tuple(cls, arg): <NEW_LINE> <INDENT> if isinstance(arg, Co... | Reference of the column in the table | 62598f768da39b475be02abc |
class Vertex(object): <NEW_LINE> <INDENT> def __init__(self, name, adj): <NEW_LINE> <INDENT> super(Vertex, self).__init__() <NEW_LINE> self.name = name <NEW_LINE> self.adj = adj.copy() <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "<%s: %s>" % (self.name, self.__dict__) <NEW_LINE> <DEDENT> def clon... | A vertex in a graph. | 62598f7626068e7796d4c236 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.