code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class RecurringCharge(OfferTermInfo): <NEW_LINE> <INDENT> _validation = { 'name': {'required': True}, } <NEW_LINE> _attribute_map = { 'name': {'key': 'Name', 'type': 'str'}, 'effective_date': {'key': 'EffectiveDate', 'type': 'iso-8601'}, 'recurring_charge': {'key': 'RecurringCharge', 'type': 'int'}, } <NEW_LINE> def __... | Indicates a recurring charge is present for this offer.
All required parameters must be populated in order to send to Azure.
:param name: Required. Name of the offer term.Constant filled by server. Possible values
include: "Recurring Charge", "Monetary Commitment", "Monetary Credit".
:type name: str or ~azure.mgmt.... | 62598fce7b180e01f3e4924d |
class Parser(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._rules = [] <NEW_LINE> <DEDENT> def process(self, paragraphs): <NEW_LINE> <INDENT> self._guess_types(paragraphs) <NEW_LINE> for rule in get_all_rules(): <NEW_LINE> <INDENT> rule_inst = rule(paragraphs) <NEW_LINE> self._rules.append(r... | Parser to debian copyright file machine readable. Try to parse the
described here
http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | 62598fce3346ee7daa337845 |
class Square(Rectangle): <NEW_LINE> <INDENT> def __init__(self, size, x=0, y=0, id=None): <NEW_LINE> <INDENT> super().__init__(size, size, x, y, id) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "[Square] ({:d}) {:d}/{:d} - {:d}".format( self.id, self.x, self.y, self.size, ) <NEW_LINE> <DEDENT> @pro... | Square class | 62598fceec188e330fdf8c91 |
class BaseVoyageContribution(models.Model): <NEW_LINE> <INDENT> date_created = models.DateTimeField(auto_now_add=True) <NEW_LINE> contributor = models.ForeignKey(User, null=False, related_name='+') <NEW_LINE> notes = models.TextField('Notes', max_length=10000, help_text='Notes for the contribution') <NEW_LINE> status =... | Base (abstract) model for all types of contributions. | 62598fce5fcc89381b26634a |
class TxFoot(Foot): <NEW_LINE> <INDENT> def pack(self): <NEW_LINE> <INDENT> self.packed = '' <NEW_LINE> self.kind = self.packet.data['fk'] <NEW_LINE> if self.kind not in raeting.FOOT_KIND_NAMES: <NEW_LINE> <INDENT> self.kind = raeting.footKinds.unknown <NEW_LINE> emsg = "Unrecognizible packet foot." <NEW_LINE> raise ra... | RAET protocol transmit packet foot class | 62598fce4527f215b58ea2ca |
class contains(object): <NEW_LINE> <INDENT> def __init__(self, str_): <NEW_LINE> <INDENT> self.str_ = str_ <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return isinstance(other, basestring) and self.str_ in other <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "<string containing '... | Match using string operator 'in' | 62598fce50812a4eaa620de2 |
class Solution: <NEW_LINE> <INDENT> def longestPalindrome(self, s): <NEW_LINE> <INDENT> if len(s) == 0: <NEW_LINE> <INDENT> return "" <NEW_LINE> <DEDENT> sLen = len(s) <NEW_LINE> start = 0 <NEW_LINE> longest = 1 <NEW_LINE> isPalindrome = [[False for i in range(sLen)] for j in range(sLen)] <NEW_LINE> for i in range(sLen... | @param s: input string
@return: the longest palindromic substring | 62598fce97e22403b383b303 |
class TestOptionEod(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 testOptionEod(self): <NEW_LINE> <INDENT> pass | OptionEod unit test stubs | 62598fcebf627c535bcb18a8 |
class FAILURE_AWG_STREAM_NOT_CLOSED(_INJECT_FAILURE): <NEW_LINE> <INDENT> index = 280 | The FAILURE_AWG_STREAM_NOT_CLOSED state indicates that after performing
the injection, that awg did not close the stream when it should have. | 62598fce7cff6e4e811b5e24 |
class SettingOptions(SettingItem): <NEW_LINE> <INDENT> options = ListProperty([]) <NEW_LINE> popup = ObjectProperty(None, allownone=True) <NEW_LINE> def on_panel(self, instance, value): <NEW_LINE> <INDENT> if value is None: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> self.bind(on_release=self._create_popup) <NEW_LIN... | Implementation of an option list on top of a :class:`SettingItem`.
It is visualized with a :class:`~kivy.uix.label.Label` widget that, when
clicked, will open a :class:`~kivy.uix.popup.Popup` with a
list of options from which the user can select. | 62598fce283ffb24f3cf3c83 |
class Social(AuthenticationBase): <NEW_LINE> <INDENT> def __init__(self, domain): <NEW_LINE> <INDENT> self.domain = domain <NEW_LINE> <DEDENT> def login(self, client_id, access_token, connection, scope='openid'): <NEW_LINE> <INDENT> return self.post( 'https://%s/oauth/access_token' % self.domain, data={ 'client_id': cl... | Social provider's endpoints.
Args:
domain (str): Your auth0 domain (e.g: username.auth0.com) | 62598fceab23a570cc2d4f6c |
class Colm(AutotoolsPackage): <NEW_LINE> <INDENT> homepage = "http://www.colm.net/open-source/colm" <NEW_LINE> url = "http://www.colm.net/files/colm/colm-0.12.0.tar.gz" <NEW_LINE> version('0.12.0', '079a1ed44f71d48a349d954096c8e411') | Colm Programming Language
Colm is a programming language designed for the analysis and
transformation of computer languages. Colm is influenced primarily
by TXL. It is in the family of program transformation languages. | 62598fce5fcc89381b26634b |
class IXlsMime(IMime): <NEW_LINE> <INDENT> pass | Marker interface for Excel mime type. | 62598fce377c676e912f6f77 |
class MVMStringPPrinter(object): <NEW_LINE> <INDENT> def __init__(self, val, pointer = False): <NEW_LINE> <INDENT> self.val = val <NEW_LINE> self.pointer = pointer <NEW_LINE> <DEDENT> def stringify(self): <NEW_LINE> <INDENT> stringtyp = str_t_info[int(self.val['body']['storage_type']) & 0b11] <NEW_LINE> if stringtyp in... | Whenever gdb encounters an MVMString or an MVMString*, this class gets
instantiated and its to_string method tries its best to print out the
actual contents of the MVMString's storage. | 62598fce7c178a314d78d89e |
class ReverseComplementCollapsingCounter(object): <NEW_LINE> <INDENT> def __init__(self, n): <NEW_LINE> <INDENT> self._n = n <NEW_LINE> self._counts = dict() <NEW_LINE> self._converter = MarkovOrderConverter(4, n-1) <NEW_LINE> <DEDENT> def __call__(self, nmer, count): <NEW_LINE> <INDENT> assert len(nmer) == self._n <NE... | Counts n-mers but collapses reverse complement counts together. | 62598fcedc8b845886d539bc |
class QuotaConsumer(object): <NEW_LINE> <INDENT> def __init__(self, quota_manager, bucket, batch_size): <NEW_LINE> <INDENT> self.quota_manager = quota_manager <NEW_LINE> self.batch_size = batch_size <NEW_LINE> self.bucket = bucket <NEW_LINE> self.quota = 0 <NEW_LINE> <DEDENT> def consume(self, amount=1): <NEW_LINE> <IN... | Quota consumer wrapper for efficient quota consuming/reclaiming.
Quota is consumed in batches and put back in dispose() method.
WARNING: Always call the dispose() method if you need to keep quota
consistent. | 62598fce71ff763f4b5e7b80 |
class SegmentationAccuracy(caffe.Layer): <NEW_LINE> <INDENT> def setup(self, bottom, top): <NEW_LINE> <INDENT> if len(bottom) != 2: <NEW_LINE> <INDENT> raise Exception('Need two bottom inputs for SegmentationAccuracy') <NEW_LINE> <DEDENT> if len(top) != 1: <NEW_LINE> <INDENT> raise Exception('Need one top layer for pix... | Layer for reporting the Segmentation accuracy | 62598fce851cf427c66b86b1 |
class ValueGenerator(Generator): <NEW_LINE> <INDENT> values = {} <NEW_LINE> DIRS = { 'value':str } <NEW_LINE> def __init__(self, att, params): <NEW_LINE> <INDENT> Generator.__init__(self, att, params) <NEW_LINE> assert 'value' in self.params, "{0}: mandatory 'value' directive".format(self) <NEW_LINE> value =... | Generate a constant value per tuple | 62598fce9f28863672818a7c |
class DataAnalyticPipeline(object): <NEW_LINE> <INDENT> def __init__(self, pipeline_type, layer=constants.INFRA): <NEW_LINE> <INDENT> self.pipeline_type = pipeline_type <NEW_LINE> self.layer = layer <NEW_LINE> self.pipes = [] <NEW_LINE> self.num_of_pipes = 0 <NEW_LINE> self.state = constants.PIPELINE_STATE_FREE <NEW_LI... | Abstract class for data analytic pipeline entity
| 62598fceab23a570cc2d4f6d |
class Metrics(Callback): <NEW_LINE> <INDENT> def on_train_begin(self, logs={}): <NEW_LINE> <INDENT> self.val_f1s = [] <NEW_LINE> self.val_recalls = [] <NEW_LINE> self.val_precisions = [] <NEW_LINE> <DEDENT> def on_epoch_end(self, epoch, logs={}): <NEW_LINE> <INDENT> val_predict = np.argmax(np.asarray(self.model.predict... | Defined your personal callback | 62598fce3346ee7daa337847 |
@python_2_unicode_compatible <NEW_LINE> class BuildCommandResult(BuildCommandResultMixin, models.Model): <NEW_LINE> <INDENT> build = models.ForeignKey(Build, verbose_name=_('Build'), related_name='commands') <NEW_LINE> command = models.TextField(_('Command')) <NEW_LINE> description = models.TextField(_('Description'), ... | Build command for a ``Build``. | 62598fce5fdd1c0f98e5e38c |
class RuleNode(Node): <NEW_LINE> <INDENT> def __init__(self, tokens): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.resource = ResourceNode(tokens) <NEW_LINE> condition_length = isolate_condition(tokens) <NEW_LINE> condition_tokens = tokens[:condition_length] <NEW_LINE> del tokens[:condition_length] <NEW_LINE> self... | A node that defines a rule, basically a coupling of a resource type,
a condition and a set of actions to apply to matching resources | 62598fcebe7bc26dc9252059 |
class barycentric: <NEW_LINE> <INDENT> def __init__(self, xs, ys): <NEW_LINE> <INDENT> self.xs = xs <NEW_LINE> self.ys = np.copy(ys) <NEW_LINE> self.n = np.size(self.xs) <NEW_LINE> <DEDENT> def pre_compute_weights(self): <NEW_LINE> <INDENT> w = np.ones(self.n) <NEW_LINE> eps=1.0e-14 <NEW_LINE> for i in range(0, self.n)... | A class to solve the interpolation problem of a f:R -> R^2 using
Lagrange polynomial in barycentric form | 62598fce60cbc95b0636473e |
class TpuContext(threading.local): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._number_of_shards = None <NEW_LINE> <DEDENT> @property <NEW_LINE> def number_of_shards(self): <NEW_LINE> <INDENT> return self._number_of_shards <NEW_LINE> <DEDENT> def set_number_of_shards(self, number_of_shards): <NEW_L... | A context object holding state about the TPU computation being built. | 62598fce956e5f7376df587e |
class SchedulerOptions(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(SchedulerOptions, self).__init__() <NEW_LINE> self.data = {} <NEW_LINE> self.last_modified = None <NEW_LINE> self.last_checked = None <NEW_LINE> <DEDENT> def _get_file_handle(self, filename): <NEW_LINE> <INDENT> return ope... | Monitor and load local .json file for filtering and weighing.
SchedulerOptions monitors a local .json file for changes and loads it
if needed. This file is converted to a data structure and passed into
the filtering and weighing functions which can use it for dynamic
configuration. | 62598fce4527f215b58ea2d0 |
class InstanceBinding(Binding[T], Generic[T]): <NEW_LINE> <INDENT> def __init__(self, key: Key, instance: T) -> None: <NEW_LINE> <INDENT> assert isinstance is not None <NEW_LINE> assert isinstance(instance, key.interface) <NEW_LINE> self._instance = instance <NEW_LINE> self._key = key <NEW_LINE> <DEDENT> @property <NEW... | Binding that binds interface to an instance of this interface | 62598fce377c676e912f6f79 |
class MiniCIReport(object): <NEW_LINE> <INDENT> def __init__(self, api_username, api_key, api_limit): <NEW_LINE> <INDENT> self.api_username = api_username <NEW_LINE> self.api_key = api_key <NEW_LINE> self.api_limit= api_limit <NEW_LINE> self.c3api = api_helper.C3api(api_username, api_key, api_limit) <NEW_LINE> <DEDENT>... | to get mini-CI report | 62598fce091ae3566870502d |
class FairseqDataset(torch.utils.data.Dataset): <NEW_LINE> <INDENT> def __getitem__(self, index): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def collater(self, samples): <NEW_LINE> <INDENT> raise NotImplementedEr... | A dataset that provides helpers for batching. | 62598fcebf627c535bcb18ae |
class Identity(GPTransformation): <NEW_LINE> <INDENT> def transf(self,f): <NEW_LINE> <INDENT> return f <NEW_LINE> <DEDENT> def dtransf_df(self,f): <NEW_LINE> <INDENT> return np.ones_like(f) <NEW_LINE> <DEDENT> def d2transf_df2(self,f): <NEW_LINE> <INDENT> return np.zeros_like(f) <NEW_LINE> <DEDENT> def d3transf_df3(sel... | .. math::
g(f) = f | 62598fce3346ee7daa337849 |
class TrackResultSet(ResultSet): <NEW_LINE> <INDENT> def getJSONFromString(self, str): <NEW_LINE> <INDENT> return json.loads(str) <NEW_LINE> <DEDENT> def get_Response(self): <NEW_LINE> <INDENT> return self._output.get('Response', None) | A ResultSet with methods tailored to the values returned by the Track Choreo.
The ResultSet object is used to retrieve the results of a Choreo execution. | 62598fce5fdd1c0f98e5e390 |
class ResidualCBAMBlock(nn.Module): <NEW_LINE> <INDENT> def __init__(self, nf=64,norm='BN',activate='relu'): <NEW_LINE> <INDENT> super(ResidualCBAMBlock, self).__init__() <NEW_LINE> self.input = BasicConvModule(in_channels=nf,out_channels=nf,activate=activate,normalized=norm,is_3d=False,deconv=False,kernel_size=3, stri... | Resduial bolck with Instance normalized | 62598fce50812a4eaa620de6 |
class MongoDBDestination(Destination): <NEW_LINE> <INDENT> def connect(self): <NEW_LINE> <INDENT> self.client = pymongo.MongoClient( host=self.config.get("MongoDB", "server_ip"), port=self.config.getint("MongoDB", "port") ) <NEW_LINE> self.db = self.client[self.config.get("MongoDB", "db")] <NEW_LINE> <DEDENT> def close... | A class for storing data in a mongodb database. | 62598fce4a966d76dd5ef2dc |
class check_user_anonymous_users(): <NEW_LINE> <INDENT> TITLE = 'Anonymous Users' <NEW_LINE> CATEGORY = 'User' <NEW_LINE> TYPE = 'sql' <NEW_LINE> SQL = "SELECT * FROM mysql.user WHERE user=''" <NEW_LINE> verbose = False <NEW_LINE> skip = False <NEW_LINE> result = {} <NEW_LINE> def do_check(self, *result... | check_user_anonymous_users:
Do anonymous users exist. | 62598fce8a349b6b43686645 |
class CamLoggingMixin(BaseMixin): <NEW_LINE> <INDENT> def __init__(self, params, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(params, *args, **kwargs) <NEW_LINE> self.__cam_log_file = params.cam_log <NEW_LINE> self.__camlogger = None <NEW_LINE> <DEDENT> def __exit__(self, *eargs): <NEW_LINE> <INDENT> if self.... | Initialize file descriptor and open cam log file for appending cam
emulator message logs. Closing it on exit/end test run | 62598fcea219f33f346c6c0e |
class Branch(Picker): <NEW_LINE> <INDENT> def pick(self, build): <NEW_LINE> <INDENT> return build.get_params().get('BRANCH_NAME') or build._get_git_rev_branch()[0]['name'] | Picks out job branches. | 62598fce7b180e01f3e49252 |
class Bilateral_EAF2(TransactionManager): <NEW_LINE> <INDENT> def resolve(self): <NEW_LINE> <INDENT> while len(self.get_deficits()) > 0: <NEW_LINE> <INDENT> for acc in self.get_deficits(): <NEW_LINE> <INDENT> for tx in self.get_txs(acc, 'outflows', 'reverse_chronological', 'active'): <NEW_LINE> <INDENT> self.inactivate... | Deactivate transactions in inverse chronological order for every deficit party until
that party has positive position | 62598fce0fa83653e46f52ed |
class LocalTCP(asyncio.Protocol): <NEW_LINE> <INDENT> def __init__(self, port): <NEW_LINE> <INDENT> self.port = port <NEW_LINE> self._handler = None <NEW_LINE> self._transport = None <NEW_LINE> <DEDENT> def _init_handler(self): <NEW_LINE> <INDENT> self._handler = LocalHandler(self.port) <NEW_LINE> <DEDENT> def __call__... | Local Tcp Factory | 62598fceec188e330fdf8c9b |
class X: <NEW_LINE> <INDENT> def __init__(self, TAG_NAME: str = 'X'): <NEW_LINE> <INDENT> self.TAG_NAME = TAG_NAME <NEW_LINE> self.known_attrs = {} <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return f'{self.TAG_NAME}' <NEW_LINE> <DEDENT> def __strip(self, line: str): <NEW_LINE> <INDENT> data = line.spli... | 每一个标签具有的通用性质
- 标签名
- 以期望的形式打印本身信息
- 标签行去除 TAG_NAME: 部分 | 62598fce4527f215b58ea2d4 |
class OBJECT_MT_spiral_curve_presets(Menu): <NEW_LINE> <INDENT> bl_label = "Spiral Curve Presets" <NEW_LINE> bl_idname = "OBJECT_MT_spiral_curve_presets" <NEW_LINE> preset_subdir = "curve_extras/curve.spirals" <NEW_LINE> preset_operator = "script.execute_preset" <NEW_LINE> draw = bpy.types.Menu.draw_preset | Presets for curve.spiral | 62598fce099cdd3c636755e2 |
class NodeView(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.NodeId = None <NEW_LINE> self.NodeIp = None <NEW_LINE> self.Visible = None <NEW_LINE> self.Break = None <NEW_LINE> self.DiskSize = None <NEW_LINE> self.DiskUsage = None <NEW_LINE> self.MemSize = None <NEW_LINE> self.MemUsage... | 节点维度视图数据
| 62598fce4a966d76dd5ef2de |
class Attribute(Element): <NEW_LINE> <INDENT> pass | Attribute descriptions
| 62598fce8a349b6b43686647 |
class LoadAverageCollector(diamond.collector.Collector): <NEW_LINE> <INDENT> PROC = '/proc/loadavg' <NEW_LINE> def collect(self): <NEW_LINE> <INDENT> if not os.access(self.PROC, os.R_OK): <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> file = open(self.PROC) <NEW_LINE> for line in file: <NEW_LINE> <INDENT> match = ... | Uses /proc/loadavg to collect data on load average | 62598fce7c178a314d78d8a6 |
class Control(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.filepath = '/Users/Nieo/Library/Logs/Unity/Player.log' <NEW_LINE> self.logreader = LogReader(self.filepath, self.handleLogUpdate) <NEW_LINE> self.database = dbhandler.DatabaseHandler() <NEW_LINE> self.playerName = 'Nieo' <NEW_LINE> self.l... | Main controler | 62598fce0fa83653e46f52ef |
class GWeather(): <NEW_LINE> <INDENT> def __init__(self, city, country): <NEW_LINE> <INDENT> self.url = "http://www.google.com/ig/api?weather" <NEW_LINE> self.city = city <NEW_LINE> self.country = country <NEW_LINE> <DEDENT> def get_data(self): <NEW_LINE> <INDENT> current = dict() <NEW_LINE> forecast = [] <NEW_LINE> da... | Retrieves weather data from google weather API.
You can put your city. | 62598fce97e22403b383b30f |
class RNNCell(object): <NEW_LINE> <INDENT> def __call__(self, inputs, state, scope=None): <NEW_LINE> <INDENT> raise NotImplementedError("Abstract method") <NEW_LINE> <DEDENT> @property <NEW_LINE> def input_size(self): <NEW_LINE> <INDENT> raise NotImplementedError("Abstract method") <NEW_LINE> <DEDENT> @property <NEW_LI... | Abstract object representing an RNN cell.
An RNN cell, in the most abstract setting, is anything that has
a state -- a vector of floats of size self.state_size -- and performs some
operation that takes inputs of size self.input_size. This operation
results in an output of size self.output_size and a new state.
This m... | 62598fce50812a4eaa620de8 |
class TestPyComments(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_name_to_func_map(self): <NEW_LINE> <INDENT> test_file = 'tests/commentsForPy' <NEW_LINE> options = Namespace() <NEW_LINE> o... | Test functioning of Python line counters. | 62598fcea05bb46b3848ac75 |
class PackDirectory(Action): <NEW_LINE> <INDENT> def created(self): <NEW_LINE> <INDENT> self.conditions = self.get_conditions(PackingFinished) <NEW_LINE> <DEDENT> def execute(self, instance): <NEW_LINE> <INDENT> src = self.evaluate_expression(self.get_parameter(0)) <NEW_LINE> dest = self.evaluate_expression(self.get_pa... | Pack directory
Parameters:
0: Directory (EXPSTRING, ExpressionParameter)
1: Destination filename (EXPSTRING, ExpressionParameter) | 62598fcecc40096d6161a3dc |
class DaesoError(DaesoException): <NEW_LINE> <INDENT> pass | Exception for a serious error in Daeso | 62598fce099cdd3c636755e4 |
class PhbstRobot(Robot, RobotWithPhbands): <NEW_LINE> <INDENT> EXT = "PHBST" <NEW_LINE> def write_notebook(self, nbpath=None): <NEW_LINE> <INDENT> nbformat, nbv, nb = self.get_nbformat_nbv_nb(title=None) <NEW_LINE> args = [(l, f.filepath) for l, f in self.items()] <NEW_LINE> nb.cells.extend([ nbv.new_code_cell("robot =... | This robot analyzes the results contained in multiple PHBST.nc files.
.. rubric:: Inheritance Diagram
.. inheritance-diagram:: PhbstRobot | 62598fcebe7bc26dc925205e |
class ProfileRequestHandler(RequestHandler): <NEW_LINE> <INDENT> @tornado.gen.coroutine <NEW_LINE> def get(self): <NEW_LINE> <INDENT> if not self.current_user: <NEW_LINE> <INDENT> self.redirect("/") <NEW_LINE> <DEDENT> profile = yield self.db.accounts.find_one({"_id": self.current_user.account_id}) <NEW_LINE> statistic... | User profile handler. | 62598fcead47b63b2c5a7c65 |
class SoftDeletionQueryset(models.QuerySet): <NEW_LINE> <INDENT> def existing(self): <NEW_LINE> <INDENT> return self.filter(deleted_at=None) <NEW_LINE> <DEDENT> def deleted(self): <NEW_LINE> <INDENT> return self.exclude(deleted_at=None) <NEW_LINE> <DEDENT> def delete(self): <NEW_LINE> <INDENT> now = datetime.datetime.u... | Queryset implementing soft deletion behaviour | 62598fcefbf16365ca7944c6 |
class _TransactionCtx(object): <NEW_LINE> <INDENT> def __enter__(self): <NEW_LINE> <INDENT> global _db_ctx <NEW_LINE> self.should_close_conn = False <NEW_LINE> if not _db_ctx.is_init(): <NEW_LINE> <INDENT> _db_ctx.init() <NEW_LINE> self.should_close_conn = True <NEW_LINE> <DEDENT> _db_ctx.transactions += 1 <NEW_LINE> l... | 事务嵌套比Connection嵌套复杂一点,因为事务嵌套需要计数,
每遇到一层嵌套就+1,离开一层嵌套就-1,最后到0时提交事务 | 62598fcebf627c535bcb18b7 |
class FireAnt(Ant): <NEW_LINE> <INDENT> name = 'Fire' <NEW_LINE> damage = 3 <NEW_LINE> "*** YOUR CODE HERE ***" <NEW_LINE> implemented = True <NEW_LINE> food_cost = 4 <NEW_LINE> armor = 1 <NEW_LINE> implemented = True <NEW_LINE> def reduce_armor(self, amount): <NEW_LINE> <INDENT> self.armor -= amount <NEW_LINE> if self... | FireAnt cooks any Bee in its Place when it expires. | 62598fce283ffb24f3cf3c90 |
class GoGoAnime: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.url = 'https://gogoanime.pe/' <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "GoGoAnime" <NEW_LINE> <DEDENT> def _findAnimeElements(self, tree): <NEW_LINE> <INDENT> return tree.xpath("//ul[contains(concat(' ', normalize... | GoGoAnime: provides a minimal GoGoAnime api. | 62598fcedc8b845886d539c8 |
class MultiLevelImplicitDecoder(tf.keras.Model): <NEW_LINE> <INDENT> def __init__(self, num_level: int = 3, num_filter: Union[int, Sequence[int]] = 128, num_out_channel: int = 1, implicit_net_type: str = 'imnet', share_net_level_groups: Sequence[Sequence[int]] = None, activation_params: Dict[str, Any] = None, name: str... | Decodes multi-level latent codes into SDF. | 62598fceadb09d7d5dc0a986 |
class TimestampError(TxValidationError): <NEW_LINE> <INDENT> pass | Transaction timestamp is smaller or equal to one parent's timestamp | 62598fced8ef3951e32c8061 |
class RationalJerks(object): <NEW_LINE> <INDENT> def __init__(self, start, stop, step, state_0=[46, 1.0, 10], alpha=10.3): <NEW_LINE> <INDENT> self.alpha = alpha <NEW_LINE> self.state_0 = state_0 <NEW_LINE> self.t = np.arange(start, stop, step) <NEW_LINE> self.states = self.get_states() <NEW_LINE> <DEDENT> def lorenz_f... | description of class | 62598fceab23a570cc2d4f73 |
class CollectionMatcher(BaseMatcher): <NEW_LINE> <INDENT> CLASS = None <NEW_LINE> def __init__(self, of=None): <NEW_LINE> <INDENT> assert self.CLASS, "must specify collection type to match" <NEW_LINE> self.of = self._validate_argument(of) <NEW_LINE> <DEDENT> def _validate_argument(self, arg): <NEW_LINE> <INDENT> if arg... | Base class for collections' matchers.
This class shouldn't be used directly. | 62598fce5fdd1c0f98e5e398 |
class UsersView(mixins.ListModelMixin, mixins.RetrieveModelMixin, viewsets.GenericViewSet): <NEW_LINE> <INDENT> serializer_class = UserSerializer <NEW_LINE> filter_backends = (filters.OrderingFilter, ) <NEW_LINE> ordering = ('id', ) <NEW_LINE> queryset = User.objects.all() <NEW_LINE> def get_queryset(self): <NEW_LINE> ... | Get more information about users
| 62598fce4527f215b58ea2da |
class GitTreeRef(Model): <NEW_LINE> <INDENT> _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'object_id': {'key': 'objectId', 'type': 'str'}, 'size': {'key': 'size', 'type': 'long'}, 'tree_entries': {'key': 'treeEntries', 'type': '[GitTreeEntryRef]'}, 'url': {'key': 'url', 'type': 'str'} } <NE... | GitTreeRef.
:param _links:
:type _links: :class:`ReferenceLinks <git.v4_1.models.ReferenceLinks>`
:param object_id: SHA1 hash of git object
:type object_id: str
:param size: Sum of sizes of all children
:type size: long
:param tree_entries: Blobs and trees under this tree
:type tree_entries: list of :class:`GitTreeEnt... | 62598fcebe7bc26dc925205f |
class PathSet: <NEW_LINE> <INDENT> def __init__(self, paths=()): <NEW_LINE> <INDENT> self._covers_cache = {} <NEW_LINE> self._paths = set() <NEW_LINE> for path in paths: <NEW_LINE> <INDENT> self.add(path) <NEW_LINE> <DEDENT> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> for path in self._paths: <NEW_LINE> <INDENT> y... | Collects metadata paths and stores only the highest levels ones.
>>> s = PathSet()
>>> s.add(("foo", "bar"))
>>> s.add(("foo",))
>>> s
{"foo"} | 62598fce3d592f4c4edbb2c1 |
class Auth(_widget.Abstract): <NEW_LINE> <INDENT> def __init__(self, uid: str, **kwargs): <NEW_LINE> <INDENT> super().__init__(uid, **kwargs) <NEW_LINE> self._app_id = _reg.get('vkontakte.app_id') <NEW_LINE> if not self._app_id: <NEW_LINE> <INDENT> raise RuntimeError("Settings parameter 'vkontakte.app_id' is not define... | PytSite Vkontakte oAuth Widget.
| 62598fce8a349b6b4368664d |
class ValidateNamingConvention(pyblish.backend.plugin.Validator): <NEW_LINE> <INDENT> families = ['model', 'animation', 'animRig'] <NEW_LINE> hosts = ['maya'] <NEW_LINE> version = (0, 1, 0) <NEW_LINE> pattern = re.compile("^\w+_\w{3}(Shape)?$") <NEW_LINE> def process(self, context): <NEW_LINE> <INDENT> for instance in ... | Ensure each included node ends with a three-letter, upper-case type
Example:
clavicle_CTL <- Good
shoulder <- Bad
Raises:
ValueError with an added .nodes attribute for each node
found to be misnamed. | 62598fce956e5f7376df5884 |
@IN.register('DBObjectUnknownTypeException', type = 'exception_handler') <NEW_LINE> class DBObjectUnknownTypeException(DBException): <NEW_LINE> <INDENT> pass | Exception DBObjectUnknownTypeException.
| 62598fce851cf427c66b86c0 |
class NonMaxSuppression(OnnxOpConverter): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def _impl_v10(cls, inputs, attr, params): <NEW_LINE> <INDENT> boxes = inputs[0] <NEW_LINE> scores = inputs[1] <NEW_LINE> max_output_boxes_per_class = inputs[2] <NEW_LINE> iou_threshold = inputs[3] <NEW_LINE> score_threshold = inputs[4... | Operator converter for NonMaxSuppression. | 62598fcead47b63b2c5a7c69 |
class UpdateModuleView(PermissionRequiredMixin, UpdateView): <NEW_LINE> <INDENT> permission_required = 'loads.change_module' <NEW_LINE> model = Module <NEW_LINE> fields = ['module_code', 'module_name', 'campus', 'size', 'semester', 'contact_hours', 'admin_hours', 'assessment_hours', 'coordinator', 'moderators', 'progra... | View for editing a Module | 62598fce3d592f4c4edbb2c3 |
class FieldRecalculation(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def build(cls, field_calculation, recalculates_on): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> model = apps.get_model(*(recalculates_on['model'].split('.'))) <NEW_LINE> <DEDENT> except LookupError: <NEW_LINE> <INDENT> raise CalculatedFieldE... | Clase base de un recalculo del campo. | 62598fcedc8b845886d539cc |
class FixedOffset(datetime.tzinfo): <NEW_LINE> <INDENT> def __init__(self, offset): <NEW_LINE> <INDENT> self.__offset = datetime.timedelta(minutes = offset) <NEW_LINE> hr, min = divmod( offset, 60 ) <NEW_LINE> self.__name= "GMT{0:+03.0f}:{1:02.0f}".format(hr,min) <NEW_LINE> <DEDENT> def utcoffset(self, dt): <NEW_LINE> ... | Fixed offset in minutes east from UTC. | 62598fce956e5f7376df5885 |
class JpegStillArrayWriter(QtCore.QObject): <NEW_LINE> <INDENT> __CAPTURE_FRAME__ = False <NEW_LINE> __PROCESS_FRAME__ = False <NEW_LINE> __CAPTURE_GROUP__ = False <NEW_LINE> __PROCESS_GROUP__ = True <NEW_LINE> def __init__(self, settings, config): <NEW_LINE> <INDENT> QtCore.QObject.__init__(self) <NEW_LINE> self._sett... | Writes a frame group to file in the form of 1 jpg per frameset per frame | 62598fce7b180e01f3e49257 |
class cl_platform_info(cl_uenum): <NEW_LINE> <INDENT> CL_PLATFORM_PROFILE = 0x0900 <NEW_LINE> CL_PLATFORM_VERSION = 0x0901 <NEW_LINE> CL_PLATFORM_NAME = 0x0902 <NEW_LINE> CL_PLATFORM_VENDOR = 0x0903 <NEW_LINE> CL_PLATFORM_EXTENSIONS = 0x0904 | The set of possible parameter names used
with the :func:`clGetPlatformInfo` function. | 62598fce3346ee7daa33784f |
class OAuth2CodeRequest(models.Model): <NEW_LINE> <INDENT> owner = models.ForeignKey('auth.User', related_name='OAuth2CodeRequests', on_delete=models.CASCADE) <NEW_LINE> name = models.CharField(max_length=40) <NEW_LINE> state = models.CharField(max_length=200) <NEW_LINE> timestamp = models.DateTimeField() | Model for Stracking OAuth2 states and users. | 62598fce5fdd1c0f98e5e39c |
class ListAlertsResponse(object): <NEW_LINE> <INDENT> swagger_types = { 'request_id': 'str', 'took': 'float', 'data': 'list[BaseAlert]', 'paging': 'PageDetails' } <NEW_LINE> attribute_map = { 'request_id': 'requestId', 'took': 'took', 'data': 'data', 'paging': 'paging' } <NEW_LINE> def __init__(self, request_id=None, t... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598fce3d592f4c4edbb2c5 |
class BaseCommand(metaclass=BaseCommandMeta): <NEW_LINE> <INDENT> names = [] <NEW_LINE> def __init__(self, app_state, command_processor, tab_manager): <NEW_LINE> <INDENT> self._app_state = app_state <NEW_LINE> self._command_processor = command_processor <NEW_LINE> self._tab_manager = tab_manager <NEW_LINE> <DEDENT> def... | Base command that all commands are supposed to derive from.
Automatically registers given command in the registry via own metaclass. | 62598fce283ffb24f3cf3c96 |
class Conv2d(Affine): <NEW_LINE> <INDENT> def __init__(self, out_channels, kernel_size, strides, padding="same", dilation=1, bias=True, initializer=None, name=None): <NEW_LINE> <INDENT> super().__init__(bias=bias, initializer=initializer, name=name) <NEW_LINE> self.out_channels = out_channels <NEW_LINE> self.kernel_siz... | Applies 2d convolutional transformation (and bias) to input.
| 62598fceec188e330fdf8ca7 |
class UrlRewriteNyaa(object): <NEW_LINE> <INDENT> def validator(self): <NEW_LINE> <INDENT> from flexget import validator <NEW_LINE> root = validator.factory() <NEW_LINE> root.accept('choice').accept_choices(CATEGORIES) <NEW_LINE> advanced = root.accept('dict') <NEW_LINE> advanced.accept('choice', key='category').accept... | Nyaa urlrewriter and search plugin. | 62598fceab23a570cc2d4f76 |
class Header(PmmlBinding): <NEW_LINE> <INDENT> def toPFA(self, options, context): <NEW_LINE> <INDENT> raise NotImplementedError | Represents a <Header> tag and provides methods to convert to PFA. | 62598fcead47b63b2c5a7c6d |
class cached_property(object): <NEW_LINE> <INDENT> def __init__(self, fget=None, fset=None, fdel=None, doc=None, name=None): <NEW_LINE> <INDENT> self.fget = fget <NEW_LINE> self.fset = fset <NEW_LINE> self.fdel = fdel <NEW_LINE> if doc is None and fget is not None: <NEW_LINE> <INDENT> doc = fget.__doc__ <NEW_LINE> <DED... | Property descriptor that caches the return value
of the get function.
Like django.utils.functional.cached_property with the addition
of setter and deleter.
*Examples*
.. code-block:: python
@cached_property
def connection(self):
return Connection()
@connection.setter # Prepares stored value
def... | 62598fce4a966d76dd5ef2ea |
class ExperimentalDataFilter(paf.filter_base.Filter): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> paf.filter_base.Filter.__init__(self) <NEW_LINE> temp_port = port.Port(MAKE_DATA()) <NEW_LINE> self.output_port["experiment_data"] = temp_port <NEW_LINE> self.add_expected_parameter("pump_name", MAKE_DATA("... | filter to extract instrument and experimental data from database
| 62598fce0fa83653e46f52fa |
class TestCompareXLSXFiles(ExcelComparisonTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.maxDiff = None <NEW_LINE> filename = 'header_image08.xlsx' <NEW_LINE> test_dir = 'xlsxwriter/test/comparison/' <NEW_LINE> self.image_dir = test_dir + 'images/' <NEW_LINE> self.got_filename = test_dir + '_test_... | Test file created by XlsxWriter against a file created by Excel. | 62598fcea219f33f346c6c19 |
class TestImageProcessing: <NEW_LINE> <INDENT> def setup_method(self): <NEW_LINE> <INDENT> self.hass = get_test_home_assistant() <NEW_LINE> setup_component( self.hass, http.DOMAIN, {http.DOMAIN: {http.CONF_SERVER_PORT: get_test_instance_port()}}) <NEW_LINE> config = { ip.DOMAIN: { 'platform': 'test' }, 'camera': { 'pla... | Test class for image processing. | 62598fce9f28863672818a86 |
class StrictContainer: <NEW_LINE> <INDENT> __fields__ = () <NEW_LINE> __field_types__ = () <NEW_LINE> def __init__(self, fields, *args, field_types=None, default=None, **kwargs): <NEW_LINE> <INDENT> self.__fields__ = fields <NEW_LINE> if field_types is None: <NEW_LINE> <INDENT> self.__field_types__ = {} <NEW_LINE> <DED... | A mutable container with fixed fields (optionally typed). | 62598fce7b180e01f3e49259 |
class FiException(Exception): <NEW_LINE> <INDENT> def __init__(self, status, message, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(status, message, *args, **kwargs) <NEW_LINE> self.status = status <NEW_LINE> self.message = message | Exception produced by a context broker response | 62598fce5fdd1c0f98e5e3a0 |
class PypiVariables: <NEW_LINE> <INDENT> classifiers = [ "Environment :: Console", "Natural Language :: English", "Programming Language :: Python", "Topic :: Database :: Front-Ends", "Intended Audience :: Developers", "Development Status :: 3 - Alpha", "Operating System :: OS Independent", "License :: OSI Approved :: G... | Variables used for distributing with setuptools to the python package index | 62598fce656771135c489a84 |
class TestPastAppointmentsUnit: <NEW_LINE> <INDENT> def setup_class(self): <NEW_LINE> <INDENT> self.pastappointments = PastAppointments() | The `TestPastAppointmentsUnit` class contains unit tests for predict functions. | 62598fce97e22403b383b31b |
class WordDictionary: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.root = dict() <NEW_LINE> pass <NEW_LINE> <DEDENT> def addWord(self, word: str) -> None: <NEW_LINE> <INDENT> cur = self.root <NEW_LINE> for c in word: <NEW_LINE> <INDENT> if c not in cur: <NEW_LINE> <INDENT> cur[c] = dict() <NEW_LINE>... | CREATED AT: 2022/1/28
1 <= word.length <= 500
word in addWord consists lower-case English letters.
word in search consist of '.' or lower-case English letters.
At most 50000 calls will be made to addWord and search. | 62598fceadb09d7d5dc0a990 |
class Widget(object): <NEW_LINE> <INDENT> def __init__(self, parent, manage=True, embed=False): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.Parent = parent.ContentArea <NEW_LINE> embed = True <NEW_LINE> <DEDENT> except AttributeError: <NEW_LINE> <INDENT> self.Parent = parent <NEW_LINE> <DEDENT> self.Create(self.P... | Manage a group of related controls.
This is an abstract base class. Subclasses should override the following
members:
- CreateControls
- GetData / SetData
- Validate (wx.Validator API)
- Title (as attribute) | 62598fce283ffb24f3cf3c9a |
class SupplierOrderStatus(models.Model): <NEW_LINE> <INDENT> order = models.ForeignKey(SupplierOrder) <NEW_LINE> status = models.CharField(_("Status"), max_length=20, choices=SUPPLIERORDER_STATUS, blank=True) <NEW_LINE> notes = models.CharField(_("Notes"), max_length=100, blank=True) <NEW_LINE> date = models.DateTimeFi... | Status of a supplier's order. There will be multiple statuses as it is
placed and subsequently processed and received. | 62598fce851cf427c66b86c8 |
class AggregationLayerMetadata(GenericLayerMetadata): <NEW_LINE> <INDENT> _standard_properties = { 'aggregation_attribute': ( 'gmd:identificationInfo/' 'gmd:MD_DataIdentification/' 'gmd:supplementalInformation/' 'inasafe/' 'aggregation_attribute/' 'gco:CharacterString'), 'adult_ratio_attribute': ( 'gmd:identificationIn... | Metadata class for aggregation layers
.. versionadded:: 3.2 | 62598fce4c3428357761a6d4 |
class TestCMakeBuildRunner_WithParam_cmake_generator(AbstractTestCMakeProject_WithParam_cmake_generator): <NEW_LINE> <INDENT> CMAKE_PROJECT_FACTORY = CMakeBuildRunnerAsCMakeProjectFactory | Test CMakeBuildRunner with CMakeProject commands
cmake_generator param (cmake -G <CMAKE_GENERATOR> option)
and ensure that CMake command-line is correct. | 62598fce50812a4eaa620def |
class FileSystemApplicationLogsConfig(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'level': {'key': 'level', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, level: Optional[Union[str, "LogLevel"]] = None, **kwargs ): <NEW_LINE> <INDENT> super(FileSystemApplicationLogsConfig, self).__init__(**... | Application logs to file system configuration.
:ivar level: Log level. Possible values include: "Off", "Verbose", "Information", "Warning",
"Error".
:vartype level: str or ~azure.mgmt.web.v2020_06_01.models.LogLevel | 62598fcefbf16365ca7944d2 |
class User(Base): <NEW_LINE> <INDENT> __tablename__ = 'acl_user' <NEW_LINE> email = sqlalchemy.Column(sqlalchemy.String, primary_key=True) <NEW_LINE> role = sqlalchemy.Column(sqlalchemy.String) <NEW_LINE> def __init__(self, email: str, role: str): <NEW_LINE> <INDENT> self.email = email <NEW_LINE> self.role = role <NEW_... | A user that is known to the ACL | 62598fce0fa83653e46f52fe |
class S3Filter(S3Method): <NEW_LINE> <INDENT> def apply_method(self, r, **attr): <NEW_LINE> <INDENT> representation = r.representation <NEW_LINE> if representation == "html": <NEW_LINE> <INDENT> return self._form(r, **attr) <NEW_LINE> <DEDENT> elif representation == "json": <NEW_LINE> <INDENT> return self._options(r, *... | Back-end for filter form updates | 62598fce4a966d76dd5ef2ee |
class UINotificationModel(BaseNotificationListenerModel): <NEW_LINE> <INDENT> sync_url = ZMQSocketURL() <NEW_LINE> pub_url = ZMQSocketURL() <NEW_LINE> identifier = Str() <NEW_LINE> sub_url = ZMQSocketURL() | This is a data model for :class:`UINotification
<.ui_notification.UINotification>`, which contains the
sync and pub sockets, along with an identifier. | 62598fce60cbc95b06364754 |
class MetaInfo(plugin.DocumentPlugin): <NEW_LINE> <INDENT> def __init__(self, doc): <NEW_LINE> <INDENT> self.load() <NEW_LINE> if doc.__class__ == document.EditorDocument: <NEW_LINE> <INDENT> doc.loaded.connect(self.load, -999) <NEW_LINE> doc.closed.connect(self.save, 999) <NEW_LINE> <DEDENT> <DEDENT> def settingsGrou... | Stores meta-information for a Document. | 62598fce656771135c489a88 |
class BibWorkflowEngineLog(db.Model): <NEW_LINE> <INDENT> __tablename__ = "bwlWORKFLOWLOGGING" <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> id_object = db.Column(db.String(255), db.ForeignKey('bwlWORKFLOW.uuid'), nullable=False) <NEW_LINE> log_type = db.Column(db.Integer, default=0, nullable=False... | Represents a log entry for BibWorkflowEngine.
This class represent a record of a log emit by an object
into the database. The object must be saved before using
this class as it requires the object id. | 62598fce283ffb24f3cf3c9e |
class LineEditWFocusOut(QtWidgets.QLineEdit): <NEW_LINE> <INDENT> def __init__(self, parent, callback, focusInCallback=None): <NEW_LINE> <INDENT> super().__init__(parent) <NEW_LINE> if parent.layout() is not None: <NEW_LINE> <INDENT> parent.layout().addWidget(self) <NEW_LINE> <DEDENT> self.callback = callback <NEW_LINE... | A class derived from QLineEdit, which postpones the synchronization
of the control's value with the master's attribute until the user leaves
the line edit or presses Tab when the value is changed.
The class also allows specifying a callback function for focus-in event.
.. attribute:: callback
Callback that is ca... | 62598fce283ffb24f3cf3c9f |
class UserLoginForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = User <NEW_LINE> fields = ['username', 'password'] <NEW_LINE> widgets = { 'password': forms.PasswordInput(), } <NEW_LINE> <DEDENT> def clean(self): <NEW_LINE> <INDENT> username = self.cleaned_data.get('username') <NEW_LINE>... | Registration form validation for user login | 62598fcfad47b63b2c5a7c75 |
class GoogleAnalyticsResponseError(Exception): <NEW_LINE> <INDENT> pass | Exception class raised when the API response does not have
an expected format by the data generation. | 62598fcf55399d3f05626934 |
class VoicesTransformer(Visitor): <NEW_LINE> <INDENT> def visit_Voices(self, voices): <NEW_LINE> <INDENT> for i, music in enumerate(voices.exprs): <NEW_LINE> <INDENT> voice = Voice(music.exprs) <NEW_LINE> voices.exprs[i] = voice <NEW_LINE> <DEDENT> return voices, True | Children of Voices are always Music. Specializing them to Voice adds
semantic information which Music does not provide for later consumers. | 62598fcf50812a4eaa620df1 |
class Solution: <NEW_LINE> <INDENT> res = [] <NEW_LINE> def search(self, nums, permutation, used): <NEW_LINE> <INDENT> if not nums: <NEW_LINE> <INDENT> self.res.append(permutation) <NEW_LINE> <DEDENT> for i in range(len(nums)): <NEW_LINE> <INDENT> if nums[i] in used: <NEW_LINE> <INDENT> continue <NEW_LINE> <DEDENT> use... | @param nums: A list of Integers.
@return: A list of permutations. | 62598fcfdc8b845886d539d8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.