code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Failure(Action): <NEW_LINE> <INDENT> def get_man_conclusion(self, man): <NEW_LINE> <INDENT> print('man failure') <NEW_LINE> <DEDENT> def get_woman_conclusion(self, woman): <NEW_LINE> <INDENT> print('woman failure') | Success class. | 6259907a656771135c48ad25 |
class remove_args: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRING, 'fileid', None, None, ), ) <NEW_LINE> def __init__(self, fileid=None,): <NEW_LINE> <INDENT> self.fileid = fileid <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated ... | Attributes:
- fileid | 6259907a5166f23b2e244dc3 |
class RecordForm(forms.ModelForm): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(RecordForm, self).__init__(*args, **kwargs) <NEW_LINE> self.is_update = False <NEW_LINE> <DEDENT> def clean(self): <NEW_LINE> <INDENT> if 'title' not in self.cleaned_data: <NEW_LINE> <INDENT> return <NE... | Record Form: form associated to the Record model | 6259907aaad79263cf4301a5 |
class Forwarder(object): <NEW_LINE> <INDENT> def __init__(self, local_bind_address, remote_bind_address, ssh_host='localhost', ssh_port=22, ssh_username='root', ssh_password=None, ssh_private_key=None): <NEW_LINE> <INDENT> self.ssh_host = ssh_host <NEW_LINE> self.ssh_port = ssh_port <NEW_LINE> self.ssh_user = ssh_usern... | forward tcp connection via ssh tunnel
example:
server = forwarder(
ssh_host=host,
ssh_port=ssh_port,
ssh_username=ssh_username,
ssh_private_key=ssh_pkey,
ssh_password=ssh_password,
local_bind_address=None,
remote_bind_address=('127.0.0.1', port),
)... | 6259907a8a349b6b43687c47 |
class ModuleStanza(Stanza): <NEW_LINE> <INDENT> def parse(self): <NEW_LINE> <INDENT> if len(self.toks) < 4: <NEW_LINE> <INDENT> self.syntax() <NEW_LINE> <DEDENT> self.vcc.modname = self.toks[1] <NEW_LINE> self.vcc.mansection = self.toks[2] <NEW_LINE> if len(self.toks) == 4 and is_quoted(self.toks[3]): <NEW_LINE> <INDEN... | $Module modname man_section description ... | 6259907a7047854f46340da7 |
class MultivariateNormalFull(_MultivariateNormalOperatorPD): <NEW_LINE> <INDENT> def __init__(self, mu, sigma, validate_args=False, allow_nan_stats=True, name="MultivariateNormalFull"): <NEW_LINE> <INDENT> parameters = locals() <NEW_LINE> parameters.pop("self") <NEW_LINE> with ops.name_scope(name, values=[sigma]) as ns... | The multivariate normal distribution on `R^k`.
This distribution is defined by a 1-D mean `mu` and covariance matrix `sigma`.
Evaluation of the pdf, determinant, and sampling are all `O(k^3)` operations.
#### Mathematical details
With `C = sigma`, the PDF of this distribution is:
```
f(x) = (2 pi)^(-k/2) |det(C)|^(... | 6259907abf627c535bcb2ebb |
class Character: <NEW_LINE> <INDENT> def __init__(self, name, atk, hp, defense): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.atk = atk <NEW_LINE> self.defense = defense <NEW_LINE> self.hp = hp <NEW_LINE> <DEDENT> def fight(self, opponent): <NEW_LINE> <INDENT> text_box(f"{self.name} attacks {opponent.name}") <N... | Generic character class | 6259907a91f36d47f2231b85 |
class PVMult(PyoPVObject): <NEW_LINE> <INDENT> def __init__(self, input, input2): <NEW_LINE> <INDENT> pyoArgsAssert(self, "pp", input, input2) <NEW_LINE> PyoPVObject.__init__(self) <NEW_LINE> self._input = input <NEW_LINE> self._input2 = input2 <NEW_LINE> input, input2, lmax = convertArgsToLists(self._input, self._inpu... | Multiply magnitudes from two phase vocoder streaming object.
:Parent: :py:class:`PyoPVObject`
:Args:
input: PyoPVObject
Phase vocoder streaming object to process. Frequencies from
this pv stream are used to compute the output signal.
input2: PyoPVObject
Phase vocoder streaming object ... | 6259907a7047854f46340da8 |
class RunPython3Tests(TestCommand): <NEW_LINE> <INDENT> def finalize_options(self): <NEW_LINE> <INDENT> TestCommand.finalize_options(self) <NEW_LINE> self.test_args = [] <NEW_LINE> self.test_suite = True <NEW_LINE> <DEDENT> def run_tests(self): <NEW_LINE> <INDENT> file_name = 'test_result_py3.xml' <NEW_LINE> ret = run_... | Run tests compatible with different python implementations. | 6259907a3346ee7daa338357 |
class DefaultSampling(BaseSampling): <NEW_LINE> <INDENT> size:int <NEW_LINE> def __init__(self, margin_of_error:float=0.02, confidence:float=0.99, min_sample_size:int=1000): <NEW_LINE> <INDENT> self.min_sample_size=min_sample_size <NEW_LINE> self.sample_size_method=CochransSampleSize(margin_of_error, confidence) <NEW_L... | Basic sampling using :class:`Cochrans <snowshu.samplings.sample_sizes.cochrans_sample_size.CochransSampleSize>` theorum for sample size and :class:`Bernoulli <snowshu.samplings.sample_methods.bernoulli_sample_method.BernoulliSampleMethod>` sampling.
This default sampling assumes high volitility in the population
Args... | 6259907a1b99ca400229022c |
class PrepareUpgradeJujuAttempt(SteppedStageAttempt): <NEW_LINE> <INDENT> prepare_upgrade = StageInfo( 'prepare-upgrade-juju', 'Prepare upgrade-juju', report_on=False, ) <NEW_LINE> @classmethod <NEW_LINE> def get_test_info(cls): <NEW_LINE> <INDENT> return dict([cls.prepare_upgrade.as_tuple()]) <NEW_LINE> <DEDENT> @clas... | Prepare to run an UpgradeJujuAttempt. This is the bootstrap portion. | 6259907a460517430c432d50 |
class HassAqualinkBinarySensor(AqualinkEntity, BinarySensorEntity): <NEW_LINE> <INDENT> @property <NEW_LINE> def name(self) -> str: <NEW_LINE> <INDENT> return self.dev.label <NEW_LINE> <DEDENT> @property <NEW_LINE> def is_on(self) -> bool: <NEW_LINE> <INDENT> return self.dev.is_on <NEW_LINE> <DEDENT> @property <NEW_LIN... | Representation of a binary sensor. | 6259907a283ffb24f3cf528d |
class TestPWWave(AbipyTest): <NEW_LINE> <INDENT> def test_base(self): <NEW_LINE> <INDENT> vectors = np.array([1.,0,0, 0,1,0, 0,0,1]) <NEW_LINE> vectors.shape = (3, 3) <NEW_LINE> mesh_443 = Mesh3D((4, 4, 3), vectors) <NEW_LINE> mesh_444 = Mesh3D((4, 4, 4), vectors) <NEW_LINE> repr(mesh_444); str(mesh_444) <NEW_LINE> ass... | Test PWWave | 6259907a2c8b7c6e89bd51d9 |
class ManagedCertificate(Certificate): <NEW_LINE> <INDENT> _attribute_map = { 'subject': {'key': 'subject', 'type': 'str'}, 'expiration_date': {'key': 'expirationDate', 'type': 'str'}, 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(ManagedCerti... | Managed Certificate used for https.
:param subject: Subject name in the certificate.
:type subject: str
:param expiration_date: Certificate expiration date.
:type expiration_date: str
:param thumbprint: Certificate thumbprint.
:type thumbprint: str | 6259907a7047854f46340daa |
class TemplateRendererTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self._template_renderer = ServerInstance.ForLocal().template_renderer <NEW_LINE> <DEDENT> def testSimpleWiring(self): <NEW_LINE> <INDENT> template = Handlebar('hello {{?true}}{{strings.extension}}{{/}}') <NEW_LINE> t... | Basic test for TemplateRenderer.
When the DataSourceRegistry conversion is finished then we could do some more
meaningful tests by injecting a different set of DataSources. | 6259907a3346ee7daa338358 |
class CommServerTestController(legion_test_case.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def CreateTestTask(cls): <NEW_LINE> <INDENT> parser = argparse.ArgumentParser() <NEW_LINE> parser.add_argument('--task-hash') <NEW_LINE> parser.add_argument('--os', default='Ubuntu-14.04') <NEW_LINE> args, _ = parser.... | A simple example controller for a test. | 6259907a99fddb7c1ca63ace |
class BaseRecipeAttrViewset(viewsets.GenericViewSet, mixins.ListModelMixin, mixins.CreateModelMixin): <NEW_LINE> <INDENT> authentication_classes = (JWTAuthentication,) <NEW_LINE> permission_classes = (IsAuthenticated,) <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> assigned_only = bool( int(self.request.query_p... | Base class for recipe attributes | 6259907a4c3428357761bca8 |
class SubpixelMaxima2D(Layer): <NEW_LINE> <INDENT> def __init__( self, kernel_size, sigma, upsample_factor, index=None, coordinate_scale=1.0, confidence_scale=1.0, data_format=None, **kwargs ): <NEW_LINE> <INDENT> super(SubpixelMaxima2D, self).__init__(**kwargs) <NEW_LINE> self.data_format = normalize_data_format(data_... | Subpixel maxima layer for 2D inputs.
Convolves a 2D Gaussian kernel to find
the subpixel maxima and 2D indices
for the channels in the input.
The output is ordered as [row, col, maximum].
# Arguments
index: Integer,
The index to slice the channels to.
Default is None, which does not slice the channe... | 6259907a5166f23b2e244dc7 |
class Potato(Crop): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__(1,3,6) <NEW_LINE> self._type = "Potato" <NEW_LINE> <DEDENT> def grow(self,light,water): <NEW_LINE> <INDENT> if light >= self._light_need and water >= self._water_need: <NEW_LINE> <INDENT> if self._status == "Seedling" and w... | A representation of a potato crop | 6259907adc8b845886d54faa |
class AddStudentOnCourseForm(forms.Form): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.users = kwargs.pop('users') <NEW_LINE> super(AddStudentOnCourseForm, self).__init__(*args, **kwargs) <NEW_LINE> self.fields['users'].queryset = self.users <NEW_LINE> <DEDENT> users = forms.ModelMu... | Форма добавления студента на курс | 6259907a26068e7796d4e32e |
class Branch(object): <NEW_LINE> <INDENT> id_generator = count(1) <NEW_LINE> def __init__(self, node_from_id, node_to_id, id_cim, name='', status_from=False, status_to=False): <NEW_LINE> <INDENT> self.node_from_id = node_from_id <NEW_LINE> self.node_to_id = node_to_id <NEW_LINE> self.id_cim = id_cim <NEW_LINE> self.nam... | Represents additional to the :py:class:`Topology_BusBranch.Branch` data about either ``IEC61970::Wires::ACLineSegment``
or ``IEC61970::Wires::PowerTransformer`` object from the source CIM file, which formed that *Branch*. | 6259907a5fc7496912d48f62 |
class variableWrapper(object, baseAttributeWrapper): <NEW_LINE> <INDENT> def __init__(self, component, attribute, maskFunction, index=None): <NEW_LINE> <INDENT> if maskFunctions.count(maskFunction.__class__) == 0: <NEW_LINE> <INDENT> raise exceptions.Exception(str(maskFunction)+ " is not a valid mask function") <NEW_LI... | The wrapper for attributes of built-in type | 6259907a97e22403b383c8f1 |
class DeviceResponsePacket(XBeeAPIPacket): <NEW_LINE> <INDENT> __MIN_PACKET_LENGTH = 8 <NEW_LINE> def __init__(self, frame_id, request_id, response_data=None, op_mode=OperatingMode.API_MODE): <NEW_LINE> <INDENT> if frame_id < 0 or frame_id > 255: <NEW_LINE> <INDENT> raise ValueError("Frame id must be between 0 and 255.... | This class represents a device response packet. Packet is built
using the parameters of the constructor or providing a valid API payload.
This frame type is sent to the serial port by the host in response to the
:class:`.DeviceRequestPacket`. It should be sent within five seconds to avoid
a timeout error.
.. seealso:... | 6259907a91f36d47f2231b87 |
class pluginloader(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def findModule(self, plugin_name=None): <NEW_LINE> <INDENT> module_dir = os.path.dirname(os.path.abspath(__file__)) <NEW_LINE> module_path = os.path.abspath( "%s/../plugins/%s/%s_plugin.py" % (module_dir, pl... | Find a plugin and create an instance | 6259907aaad79263cf4301aa |
class TerminalPdb(Pdb): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> Pdb.__init__(self, *args, **kwargs) <NEW_LINE> self._ptcomp = None <NEW_LINE> self.pt_init() <NEW_LINE> <DEDENT> def pt_init(self): <NEW_LINE> <INDENT> def get_prompt_tokens(): <NEW_LINE> <INDENT> return [(Token.Prompt,... | Standalone IPython debugger. | 6259907a7d43ff248742810d |
class CaConc(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_CaConc(*args) <NEW_LINE> try: self.this.append(this) <NEW_LI... | Proxy of C++ pymoose::CaConc class | 6259907a7cff6e4e811b7430 |
class FakeStrategyModule(object): <NEW_LINE> <INDENT> def a1(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def a2(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def b(self): <NEW_LINE> <INDENT> pass | A class that mockups a module of strategies | 6259907a7d847024c075ddcd |
class DoAspect(MiniToolAction): <NEW_LINE> <INDENT> def selected(self, attrs): <NEW_LINE> <INDENT> if config.display_mode & config.PAL_MONITOR_ID == config.PAL_MONITOR_ID: <NEW_LINE> <INDENT> self.gadget.state = 2 <NEW_LINE> self.gadget.need_redraw = True <NEW_LINE> <DEDENT> config.set_aspect(self.gadget.state) <NEW_LI... | Change NTSC/PAL aspect ratio | 6259907a44b2445a339b7656 |
class MIX(Effect): <NEW_LINE> <INDENT> instrument = "MIX" <NEW_LINE> pfields = 'amp', <NEW_LINE> load = () <NEW_LINE> def __init__(self, outsk=None, insk=None, dur=None, amp=None, *extra_args, **extra_kwargs): <NEW_LINE> <INDENT> self._passback(locals()) | MIX(outsk, insk, dur, AMP, p4-n: output channel assigns) | 6259907a66673b3332c31df0 |
class Visit(DatetimeModel): <NEW_LINE> <INDENT> visitor = models.ForeignKey(settings.AUTH_USER_MODEL, null=False, related_name='visits_maker', verbose_name=_("Visitor")) <NEW_LINE> user = models.ForeignKey(settings.AUTH_USER_MODEL, null=False, related_name='visits_receiver', verbose_name=_("User")) <NEW_LINE> objects =... | Visite de profil | 6259907a4a966d76dd5f08d7 |
class CustomFrame(QtGui.QFrame): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> QtGui.QFrame.__init__(self, parent) <NEW_LINE> self.parent = parent <NEW_LINE> self.info = parent.info <NEW_LINE> self.log = parent.log <NEW_LINE> self.setLayout(QtGui.QVBoxLayout()) <NEW_LINE> if hasattr(self, 'in... | Base class for all three tabbed frames | 6259907a5166f23b2e244dc9 |
class LoaderBase(IOBase): <NEW_LINE> <INDENT> def __init__(self, cachedir, **kwargs): <NEW_LINE> <INDENT> super(LoaderBase, self).__init__(cachedir, **kwargs) <NEW_LINE> if not os.path.exists(self.cachedir): <NEW_LINE> <INDENT> raise IOError('No cache exists with path {0!r}'.format(self.cachedir)) <NEW_LINE> <DEDENT> s... | Base class for data loaders.
.. note::
This is a base class and should not be used directly. | 6259907aad47b63b2c5a9241 |
class ObjectBuilderRebalance(Command): <NEW_LINE> <INDENT> log = logging.getLogger(__name__) <NEW_LINE> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(ObjectBuilderRebalance, self).get_parser(prog_name) <NEW_LINE> parser.add_argument('--user', help='the username to connect to the remote host', acti... | rebalance the object ring | 6259907a5fc7496912d48f63 |
class DatasourceNotSupportedError(WMSBaseError): <NEW_LINE> <INDENT> pass | Exception for invalid type od datasource | 6259907ad268445f2663a857 |
class Photo: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def send(bot, user_id, content): <NEW_LINE> <INDENT> send_content(bot.send_photo, user_id, content) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def get_content(message): <NEW_LINE> <INDENT> best_photo = message.photo[0] <NEW_LINE> for i in range(1, len(message.... | Wrapper class for handling photos | 6259907a97e22403b383c8f3 |
class BDIIOccupancy(object): <NEW_LINE> <INDENT> def __init__(self, se): <NEW_LINE> <INDENT> self.log = se.log.getSubLogger('BDIIOccupancy') <NEW_LINE> self.bdii = 'lcg-bdii.cern.ch:2170' <NEW_LINE> if 'LCG_GFAL_INFOSYS' in os.environ: <NEW_LINE> <INDENT> self.bdii = os.environ['LCG_GFAL_INFOSYS'] <NEW_LINE> <DEDENT> s... | .. class:: BDIIOccupancy
Occupancy plugin to return the space information given by BDII
Assuming the protocol is SRM | 6259907aa8370b77170f1dc0 |
class MLNode(DTNode): <NEW_LINE> <INDENT> def __init__(self,edges,ichildren,maxind,leafstart,words): <NEW_LINE> <INDENT> self.edges = edges <NEW_LINE> self.ichildren = ichildren <NEW_LINE> self.maxind = maxind <NEW_LINE> self.leafstart = leafstart <NEW_LINE> self.words = words | Represent a MustLink-node | 6259907af548e778e596cf83 |
class BaseLinePredictor(PredictorBase): <NEW_LINE> <INDENT> def fit(self, X_train, y_train): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def predict(self, X_test): <NEW_LINE> <INDENT> test_n = len(X_test) <NEW_LINE> zeroes = [0] * test_n <NEW_LINE> predictions_data = { 'ID': test_n, 'Adoption': [1] * test_n, 'Died': z... | All adopted benchmark | 6259907a21bff66bcd72465b |
class TagContainer(UserDict): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._add_taglike(DescriptionTag) <NEW_LINE> self.problems = [] <NEW_LINE> <DEDENT> def __call__(self, tag_name: str): <NEW_LINE> <INDENT> tag = self.data.get(tag_name) <NEW_LINE> if tag is None: <NEW... | Manages a coherent group of tags
Instances are callable. That syntax is the preferred way to get a tag, since
it will always return a tag object. Accessing an undeclared tag in this way
will return an UnknownTag object instead of raising an error.
This object can also be accessed like a normal dict. | 6259907a3346ee7daa33835a |
class MethodBooleanExtendsExclusionTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> class ExclusionMapper(SimpleTestMapper): <NEW_LINE> <INDENT> age = omm.MapField( "test.age", exclude={ "json": True, "dict": False, "custom": True }, exclude_serialize=True, exclude_deserialize=False ) <NEW_LINE... | exclude=dict and exclude_(method)=boolean test. | 6259907a7d43ff248742810e |
class TestICEInstaller(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_options(self): <NEW_LINE> <INDENT> print("") <NEW_LINE> print("----------------------------------------------------------------------") <NEW_LINE> print("Testing argument parsing...") <N... | Tests for the ICE Installer are stored here. Each test should be a
separate function within this class. | 6259907aa8370b77170f1dc1 |
class _DictLikeModel(ndb.Expando, DictMixin): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def _validateKey(cls, key): <NEW_LINE> <INDENT> if not isinstance(key, basestring): <NEW_LINE> <INDENT> raise ValueError("DictionaryProperty keys must be strings, got: %r" % key) <NEW_LINE> <DEDENT> if key.startswith('_'): <NEW_LI... | Internal model used to implement DictionaryProperty.
This is what you actually manipulate when dealing with a DictionaryProperty value. | 6259907a3317a56b869bf23f |
class ofp_flow_stats_request: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.match = ofp_match() <NEW_LINE> self.table_id = 0 <NEW_LINE> self.pad = 0 <NEW_LINE> self.out_port = 0 <NEW_LINE> <DEDENT> def __assert(self): <NEW_LINE> <INDENT> if(not isinstance(self.match, ofp_match)): <NEW_LINE> <INDENT> ... | Automatically generated Python class for ofp_flow_stats_request
Date 2011-06-13
Created by pylibopenflow.of.pythonize.pythonizer | 6259907a97e22403b383c8f4 |
class GBPServerRpcCallback(object): <NEW_LINE> <INDENT> RPC_API_VERSION = "1.0" <NEW_LINE> target = oslo_messaging.Target(version=RPC_API_VERSION) <NEW_LINE> def __init__(self, gbp_driver): <NEW_LINE> <INDENT> self.gbp_driver = gbp_driver <NEW_LINE> <DEDENT> def get_gbp_details(self, context, **kwargs): <NEW_LINE> <IND... | Plugin-side RPC (implementation) for agent-to-plugin interaction. | 6259907a4f88993c371f121b |
class LineBoxBuilder(BaseBuilder): <NEW_LINE> <INDENT> def __init__(self, tesseract_layout=1): <NEW_LINE> <INDENT> file_ext = ["html", "hocr"] <NEW_LINE> tess_flags = ["-psm", str(tesseract_layout)] <NEW_LINE> tess_conf = ["hocr"] <NEW_LINE> cun_args = ["-f", "hocr"] <NEW_LINE> super(LineBoxBuilder, self).__init__(file... | If passed to image_to_string(), image_to_string() will return an array of
LineBox. Each LineBox contains a list of word boxes. | 6259907a44b2445a339b7657 |
class TestXmlNs0ScriptAttributeImpl(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 testXmlNs0ScriptAttributeImpl(self): <NEW_LINE> <INDENT> pass | XmlNs0ScriptAttributeImpl unit test stubs | 6259907a460517430c432d53 |
class net_g(nn.Module): <NEW_LINE> <INDENT> def __init__(self, upscale_factor=4): <NEW_LINE> <INDENT> super(net_g, self).__init__() <NEW_LINE> self.relu = nn.ReLU() <NEW_LINE> self.conv1 = nn.Conv2d(3, 64, (5, 5), (1, 1), (2, 2)) <NEW_LINE> self.conv2 = nn.Conv2d(64, 64, (3, 3), (1, 1), (1, 1)) <NEW_LINE> self.conv3 = ... | Generator | 6259907a4a966d76dd5f08d9 |
class PermaTemplateView(object): <NEW_LINE> <INDENT> def __init__(self, filename): <NEW_LINE> <INDENT> self.filename = filename <NEW_LINE> self.fake_request = RequestFactory(HTTP_HOST=settings.WARC_HOST).get('/fake') <NEW_LINE> <DEDENT> def render_response(self, status='200 OK', content_type='text/html; charset=utf-8',... | Class to render Django templates for Pywb views. Uses a fake request from the Django testing library
to get Django to render a template without a real Django request object available. | 6259907aec188e330fdfa29b |
class NullToken(Token): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> self.data = data <NEW_LINE> <DEDENT> def run(self, interpreter, locals): <NEW_LINE> <INDENT> interpreter.write(self.data) <NEW_LINE> <DEDENT> def string(self): <NEW_LINE> <INDENT> return self.data | A chunk of data not containing markups. | 6259907a26068e7796d4e332 |
class GrantExchanger(Mediator): <NEW_LINE> <INDENT> install = Param("sentry.models.SentryAppInstallation") <NEW_LINE> code = Param((str,)) <NEW_LINE> client_id = Param((str,)) <NEW_LINE> user = Param("sentry.models.User") <NEW_LINE> def call(self): <NEW_LINE> <INDENT> self._validate() <NEW_LINE> self._create_token() <N... | Exchanges a Grant Code for an Access Token | 6259907a796e427e5385016e |
class ExecutionError(Exception): <NEW_LINE> <INDENT> pass | Unhandled thread error wrapper. Raised on the calling thread. | 6259907a91f36d47f2231b89 |
class MockStack: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass | Mock insteon_mqtt/network/Stack class
| 6259907a56b00c62f0fb42c8 |
class DHGroupExchangeSHA1Mixin: <NEW_LINE> <INDENT> kexAlgorithm = 'diffie-hellman-group-exchange-sha1' <NEW_LINE> hashProcessor = sha1 | Mixin for diffie-hellman-group-exchange-sha1 tests. | 6259907a167d2b6e312b828d |
class MultiItem(CoClass): <NEW_LINE> <INDENT> _reg_clsid_ = GUID('{BF3DD473-A408-4014-B913-69A31AF6115D}') <NEW_LINE> _idlflags_ = ['noncreatable'] <NEW_LINE> _typelib_path_ = typelib_path <NEW_LINE> _reg_typelib_ = ('{866AE5D3-530C-11D2-A2BD-0000F8774FB5}', 10, 2) | MultiItem CoType. | 6259907ad486a94d0ba2d9ac |
class McCabeMethodChecker(BaseChecker): <NEW_LINE> <INDENT> __implements__ = IAstroidChecker <NEW_LINE> name = 'design' <NEW_LINE> msgs = { 'R1260': ( "%s is too complex. The McCabe rating is %d", 'too-complex', 'Used when a method or function is too complex based on ' 'McCabe Complexity Cyclomatic'), } <NEW_LINE> opti... | Checks McCabe complexity cyclomatic threshold in methods and functions
to validate a too complex code. | 6259907a23849d37ff852aad |
class EnvironmentView(APIView): <NEW_LINE> <INDENT> CONFIGS_TO_EXPOSE = [ 'TERMS_OF_SERVICE_URL', 'PRIVACY_POLICY_URL', 'SOURCE_CODE_URL', 'SUPPORT_EMAIL', 'SUPPORT_URL', 'COMMUNITY_URL', ] <NEW_LINE> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> data = { key.lower(): getattr(constance.config, key) for k... | GET-only view for certain server-provided configuration data | 6259907a32920d7e50bc7a36 |
class ModelSerializer: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def dump_model(model, name: str, path="../resources/models"): <NEW_LINE> <INDENT> if model: <NEW_LINE> <INDENT> joblib.dump(model, f"{path}/{name}.pkl") <NEW_LINE> <DEDENT> <DEDENT> @staticmethod <NEW_LINE> def load_model(name: str): <NEW_LINE> <INDENT... | Support serialize and deserialize the model | 6259907ae1aae11d1e7cf50b |
class Attacking(State): <NEW_LINE> <INDENT> def __init__(self, enemy, player): <NEW_LINE> <INDENT> State.__init__(self, "attacking") <NEW_LINE> self.enemy = enemy <NEW_LINE> self.player = player <NEW_LINE> self.enemy.world.render_boss = True <NEW_LINE> <DEDENT> def do_actions(self, tick): <NEW_LINE> <INDENT> if self.en... | The enemy can see the player and is actively attacking them them, staying away if possible | 6259907a55399d3f05627f09 |
class ConfTree(ConfSimple): <NEW_LINE> <INDENT> def get(self, nm, sk = ''): <NEW_LINE> <INDENT> if sk == '' or sk[0] != '/': <NEW_LINE> <INDENT> return ConfSimple.get(self, nm, sk) <NEW_LINE> <DEDENT> if sk[len(sk)-1] != '/': <NEW_LINE> <INDENT> sk = sk + '/' <NEW_LINE> <DEDENT> while sk.find('/') != -1: <NEW_LINE> <IN... | A ConfTree adds path-hierarchical interpretation of the section keys,
which should be '/'-separated values. When a value is requested for a
given path, it will also be searched in the sections corresponding to
the ancestors. E.g. get(name, '/a/b') will also look in sections '/a' and
'/' or '' (the last 2 are equivalent... | 6259907a5fc7496912d48f65 |
class Position: <NEW_LINE> <INDENT> def __init__(self, x, y): <NEW_LINE> <INDENT> self.x = x <NEW_LINE> self.y = y <NEW_LINE> <DEDENT> def e(self): return Position(self.x+1, self.y) <NEW_LINE> def n(self): return Position(self.x, self.y-1) <NEW_LINE> def w(self): return Position(self.x-1, self.y) <NEW_LINE> def s(self)... | A two dimentional point in space | 6259907a7047854f46340db1 |
class TestCaseMixin(TestCase): <NEW_LINE> <INDENT> def create_app(self): <NEW_LINE> <INDENT> app = create_app() <NEW_LINE> app.config['TESTING'] = True <NEW_LINE> app.config['WTF_CSRF_ENABLED'] = False <NEW_LINE> return app <NEW_LINE> <DEDENT> def setUp(self): <NEW_LINE> <INDENT> db.create_all() <NEW_LINE> current_app.... | Use with flask.ext.testing.TestCase | 6259907a091ae35668706633 |
class Node(): <NEW_LINE> <INDENT> def __init__(self, name, weight=None, children=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.weight = weight <NEW_LINE> self.parent = None <NEW_LINE> self.total_weight = weight <NEW_LINE> if children is None: <NEW_LINE> <INDENT> self.children = [] <NEW_LINE> <DEDENT> else... | Defines a program in advent of code day 7 puzzle | 6259907a796e427e53850170 |
class drawShowArtButton : <NEW_LINE> <INDENT> def __init__(self, xl, yl, xu, yu): <NEW_LINE> <INDENT> self.coord = (xl, yl, xu, yu) <NEW_LINE> <DEDENT> def drawbutton(self): <NEW_LINE> <INDENT> t.penup() <NEW_LINE> t.goto(self.coord[0], self.coord[1]) <NEW_LINE> t.setheading(90) <NEW_LINE> t.pendown() <NEW_LINE> t.penc... | Represents the draw show art button | 6259907a7047854f46340db2 |
class Branch(Connectable): <NEW_LINE> <INDENT> def __init__(self, shape=None, net=None, layer=None, proxy_for=None): <NEW_LINE> <INDENT> self.net = net <NEW_LINE> self.shape = shape.centroid.buffer(TRACK_RADIUS) <NEW_LINE> self.proxy_for = proxy_for <NEW_LINE> if layer: <NEW_LINE> <INDENT> self.layers = [layer] <NEW_LI... | A point on a layer that connects to multiple points.
There is no pad associated with it | 6259907a5fcc89381b266e56 |
class Imply(LogicOperator, AlphabeticSymbol): <NEW_LINE> <INDENT> symbols = ['-->'] <NEW_LINE> def __init__(self, phi, psi): <NEW_LINE> <INDENT> super(Imply, self).__init__(phi, psi) | Represents logic implication. | 6259907a32920d7e50bc7a38 |
class RegistryConfigurationComponent(ConfigurationComponent): <NEW_LINE> <INDENT> id = 'registry' <NEW_LINE> def get_coercion(self): <NEW_LINE> <INDENT> return { 'registry_streaming': asbool, 'debug': asbool } <NEW_LINE> <DEDENT> def get_defaults(self): <NEW_LINE> <INDENT> return { 'registry_streaming': True, } <NEW_LI... | Configure the request local context registry.
This configures support for setting and restoring a clean
turbogears context on each request. This makes so that
``tg.request``, ``tg.response`` and so on always refer to
the data for current request.
Options:
* ``registry_streaming``: Enable streaming responses, thu... | 6259907a4f88993c371f121d |
class LockRequest(Request): <NEW_LINE> <INDENT> command_id = SMB2_LOCK <NEW_LINE> structure_size = 48 <NEW_LINE> def __init__(self, parent): <NEW_LINE> <INDENT> Request.__init__(self, parent) <NEW_LINE> self.file_id = None <NEW_LINE> self.lock_sequence = 0 <NEW_LINE> self.locks = [] <NEW_LINE> self.lock_count = None <N... | @ivar locks: A list of lock tuples, each of which consists of (offset, length, flags). | 6259907a656771135c48ad2b |
class _ChangelistCodereviewBase(object): <NEW_LINE> <INDENT> def __init__(self, changelist): <NEW_LINE> <INDENT> self._changelist = changelist <NEW_LINE> <DEDENT> def __getattr__(self, attr): <NEW_LINE> <INDENT> return getattr(self._changelist, attr) <NEW_LINE> <DEDENT> def GetStatus(self): <NEW_LINE> <INDENT> raise No... | Abstract base class encapsulating codereview specifics of a changelist. | 6259907a283ffb24f3cf5297 |
class class_wrapper_t( scoped.scoped_t ): <NEW_LINE> <INDENT> def __init__(self, declaration, class_creator ): <NEW_LINE> <INDENT> scoped.scoped_t.__init__( self, declaration=declaration ) <NEW_LINE> self._class_creator = class_creator <NEW_LINE> self._base_wrappers = [] <NEW_LINE> <DEDENT> def _get_wrapper_alias( self... | creates C++ code, which creates wrapper around a class | 6259907a3617ad0b5ee07b45 |
class ListAccounts(object): <NEW_LINE> <INDENT> swagger_types = { 'filters': 'FilterIdArray', 'sort': 'SortId', 'total': 'int', 'offset': 'int', 'limit': 'int', 'items': 'list[AccountFull]' } <NEW_LINE> attribute_map = { 'filters': 'filters', 'sort': 'sort', 'total': 'total', 'offset': 'offset', 'limit': 'limit', 'item... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 6259907ad268445f2663a85a |
class GenerateUuidTask(ManagementTask): <NEW_LINE> <INDENT> def run(self, namespace): <NEW_LINE> <INDENT> from uuid import uuid4 <NEW_LINE> logger.debug("Displaying a random uuid4 string.") <NEW_LINE> print(uuid4()) <NEW_LINE> sys.exit(0) | Generates an uuid4 string
| 6259907af548e778e596cf89 |
@test_tags("port", "server_port_flap", "run-on-diff") <NEW_LINE> @unittest.skip("Test broken - T24997025 to investigate furthur") <NEW_LINE> class ServerPortFlap(FbossBaseSystemTest): <NEW_LINE> <INDENT> def test_server_port_flap(self): <NEW_LINE> <INDENT> number_of_flaps = 1 <NEW_LINE> convergence_time_allowed = 10 <N... | Verify that a server port flap is handled by fboss correctly and does
not hang the system. | 6259907a21bff66bcd724661 |
class ChildLifecycle(models.Model): <NEW_LINE> <INDENT> _inherit = 'compassion.child.ble' <NEW_LINE> @api.model <NEW_LINE> def process_commkit(self, commkit_data): <NEW_LINE> <INDENT> ids = super(ChildLifecycle, self).process_commkit(commkit_data) <NEW_LINE> for lifecycle in self.browse(ids).filtered('child_id.sponsor_... | Send Communication when Child Lifecycle Event is received. | 6259907a99fddb7c1ca63ad3 |
class SimpleMocker: <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> print("entering context") <NEW_LINE> return "entering context" <NEW_LINE> <DEDENT> def __exit__(self, type, value, traceback): <NEW_LINE> <INDENT> raise File... | Simple mocking class to test triggers on __enter__ and __exit__ | 6259907a67a9b606de5477a2 |
class ASFByteArrayAttribute(ASFBaseAttribute): <NEW_LINE> <INDENT> TYPE = 0x0001 <NEW_LINE> def parse(self, data): <NEW_LINE> <INDENT> return data <NEW_LINE> <DEDENT> def _render(self): <NEW_LINE> <INDENT> return self.value <NEW_LINE> <DEDENT> def data_size(self): <NEW_LINE> <INDENT> return len(self.value) <NEW_LINE> <... | Byte array attribute. | 6259907a009cb60464d02f37 |
class Server(object): <NEW_LINE> <INDENT> def __init__(self, threads=1000): <NEW_LINE> <INDENT> self.pool = eventlet.GreenPool(threads) <NEW_LINE> self.socket_info = {} <NEW_LINE> <DEDENT> def start(self, application, port, host='0.0.0.0', key=None, backlog=128): <NEW_LINE> <INDENT> self.application = application <NEW_... | Server class to manage multiple WSGI sockets and applications. | 6259907ad486a94d0ba2d9b0 |
class SingleChoiceParameter(Parameter): <NEW_LINE> <INDENT> def __init__(self, id, choices): <NEW_LINE> <INDENT> super(SingleChoiceParameter, self).__init__(id) <NEW_LINE> self.choices = to_list(choices) <NEW_LINE> <DEDENT> def prompt(self, prompt, old_value=None): <NEW_LINE> <INDENT> print >> sys.stdout, prompt <NEW_L... | A parameter implemeting a single choice between multiple choices. | 6259907a23849d37ff852ab1 |
class DeleteUInfluxdbDatabaseResponseSchema(schema.ResponseSchema): <NEW_LINE> <INDENT> fields = {} | DeleteUInfluxdbDatabase - 删除Influxdb实例的数据库 | 6259907a4c3428357761bcb2 |
class RestDrive(Drive): <NEW_LINE> <INDENT> name = 'rest-drive' <NEW_LINE> def __init__(self, drive_system): <NEW_LINE> <INDENT> super().__init__(drive_system) <NEW_LINE> self.range_overwhelmed = [self.drive_min, -30] <NEW_LINE> self.range_underwhelmed = [70, self.drive_max] <NEW_LINE> self.range_homeostatic = [self.ra... | The drive that motivates the system to get rest | 6259907a442bda511e95da54 |
class TaskType(type): <NEW_LINE> <INDENT> def __new__(cls, name, bases, attrs): <NEW_LINE> <INDENT> new = super(TaskType, cls).__new__ <NEW_LINE> task_module = attrs.get("__module__") or "__main__" <NEW_LINE> if attrs.pop("abstract", None) or not attrs.get("autoregister", True): <NEW_LINE> <INDENT> return new(cls, name... | Meta class for tasks.
Automatically registers the task in the task registry, except
if the `abstract` attribute is set.
If no `name` attribute is provided, then no name is automatically
set to the name of the module it was defined in, and the class name. | 6259907afff4ab517ebcf211 |
class And(ParseExpression): <NEW_LINE> <INDENT> class _ErrorStop(Empty): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(Empty,self).__init__(*args, **kwargs) <NEW_LINE> self.leaveWhitespace() <NEW_LINE> <DEDENT> <DEDENT> def __init__( self, exprs, savelist = True ): <NEW_LINE> <INDEN... | Requires all given C{ParseExpressions} to be found in the given order.
Expressions may be separated by whitespace.
May be constructed using the '+' operator. | 6259907aec188e330fdfa2a1 |
class INtsuThemeLayer(IDefaultBrowserLayer): <NEW_LINE> <INDENT> pass | Marker interface that defines a browser layer. | 6259907a283ffb24f3cf5299 |
class RfModbusMasterRTU(RfModbusMaster): <NEW_LINE> <INDENT> def __init__(self, debug_level=logging.NOTSET): <NEW_LINE> <INDENT> super(RfModbusMasterRTU, self).__init__(debug_level=debug_level) <NEW_LINE> self.serial = None <NEW_LINE> <DEDENT> def open_connection(self, port='/dev/ttyUSB0', timeout=0.5, verbose=False): ... | RfModbusMasterRTU class implements a modbus master which can communicate with slaves
through a serial line | 6259907a9c8ee82313040e84 |
class Manager(base.Manager): <NEW_LINE> <INDENT> resource_class = Resource <NEW_LINE> service_type = 'network' <NEW_LINE> _attr_mapping = ATTRIBUTE_MAPPING <NEW_LINE> _hidden_methods = ["update"] <NEW_LINE> _json_resource_key = 'security_group' <NEW_LINE> _json_resources_key = 'security_groups' <NEW_LINE> _url_resource... | Manager class for security groups in Networking V2 API | 6259907a2c8b7c6e89bd51e4 |
class DummyForm(CleanSummer,forms.Form): <NEW_LINE> <INDENT> text = forms.CharField(widget=SummernoteWidget(),label="") <NEW_LINE> summer_max_length=1000 | DummyForm to test CleanSummer mixin | 6259907af9cc0f698b1c5fc9 |
class MailNotificationService(BaseNotificationService): <NEW_LINE> <INDENT> def __init__(self, server, port, sender, starttls, username, password, recipient, debug): <NEW_LINE> <INDENT> self._server = server <NEW_LINE> self._port = port <NEW_LINE> self._sender = sender <NEW_LINE> self.starttls = starttls <NEW_LINE> sel... | Implements notification service for E-Mail messages. | 6259907aaad79263cf4301b3 |
class Package(object): <NEW_LINE> <INDENT> def __init__(self, store, collection, id=None): <NEW_LINE> <INDENT> self.store = store <NEW_LINE> self.collection = collection.name <NEW_LINE> self.id = id or uuid4().hex <NEW_LINE> <DEDENT> def has(self, cls, name): <NEW_LINE> <INDENT> return cls(self, name).exists() <NEW_LIN... | An package is a resource in the remote bucket. It consists of a
source file, a manifest metadata file and one or many processed
version. | 6259907ad268445f2663a85b |
class SchemeMorphism_spec(SchemeMorphism): <NEW_LINE> <INDENT> def __init__(self, parent, phi, check=True): <NEW_LINE> <INDENT> SchemeMorphism.__init__(self, parent) <NEW_LINE> if check: <NEW_LINE> <INDENT> from sage.categories.all import Rings <NEW_LINE> if not (isinstance(phi, Map) and phi.category_for().is_subcatego... | Morphism of spectra of rings
INPUT:
- ``parent`` -- Hom-set whose domain and codomain are affine schemes.
- ``phi`` -- a ring morphism with matching domain and codomain.
- ``check`` -- boolean (optional, default:``True``). Whether to
check the input for consistency.
EXAMPLES::
sage: R.<x> = PolynomialRing(Q... | 6259907a796e427e53850174 |
class GroupList(_messages.Message): <NEW_LINE> <INDENT> id = _messages.StringField(1) <NEW_LINE> items = _messages.MessageField('Group', 2, repeated=True) <NEW_LINE> kind = _messages.StringField(3, default=u'clouduseraccounts#groupList') <NEW_LINE> nextPageToken = _messages.StringField(4) <NEW_LINE> selfLink = _message... | A GroupList object.
Fields:
id: [Output Only] Unique identifier for the resource; defined by the
server.
items: A list of Group resources.
kind: [Output Only] Type of resource. Always clouduseraccounts#groupList
for lists of groups.
nextPageToken: [Output Only] This token allows you to get the next pag... | 6259907a7b180e01f3e49d62 |
class DeleteObject(command.Command): <NEW_LINE> <INDENT> log = logging.getLogger(__name__ + '.DeleteObject') <NEW_LINE> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(DeleteObject, self).get_parser(prog_name) <NEW_LINE> parser.add_argument( 'container', metavar='<container>', help='Delete object(s)... | Delete object from container | 6259907a3346ee7daa33835e |
class Mapa(pygame.sprite.Sprite): <NEW_LINE> <INDENT> def __init__(self, image, x, y, st_position, st_line, mapnum): <NEW_LINE> <INDENT> pygame.sprite.Sprite.__init__(self) <NEW_LINE> self.image = pygame.image.load(image) <NEW_LINE> self.start = pygame.image.load('Linea.png') <NEW_LINE> self.halfline = pygame.image.loa... | En esta clase se definen las propiedades y algunas funciones
relacionadas con las pistas del juego | 6259907a5fdd1c0f98e5f979 |
class SwitchingProfileTypeIdEntry(object): <NEW_LINE> <INDENT> swagger_types = { 'value': 'str', 'key': 'str' } <NEW_LINE> attribute_map = { 'value': 'value', 'key': 'key' } <NEW_LINE> def __init__(self, value=None, key=None): <NEW_LINE> <INDENT> self._value = None <NEW_LINE> self._key = None <NEW_LINE> self.discrimina... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 6259907a5fcc89381b266e58 |
class TypeOMA(BaseInstrumentType): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(TypeOMA, self).__init__() <NEW_LINE> self._append_ins_type(InstrumentType.OMA) <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> self._raise_not_implemented() <NEW_LINE> <DEDENT> def stop(self): <N... | Optical Modulation Analyser. | 6259907a7cff6e4e811b743a |
@registry.register_problem <NEW_LINE> class TranslateEndeWmtBpe32k(translate.TranslateProblem): <NEW_LINE> <INDENT> @property <NEW_LINE> def vocab_type(self): <NEW_LINE> <INDENT> return text_problems.VocabType.TOKEN <NEW_LINE> <DEDENT> @property <NEW_LINE> def oov_token(self): <NEW_LINE> <INDENT> return "UNK" <NEW_LINE... | Problem spec for WMT En-De translation, BPE version. | 6259907aadb09d7d5dc0bf64 |
class Settings(object): <NEW_LINE> <INDENT> def __init__(self, sections): <NEW_LINE> <INDENT> self._sections = set(sections) <NEW_LINE> for section in self._sections: <NEW_LINE> <INDENT> setattr(self, section, Setting()) <NEW_LINE> <DEDENT> <DEDENT> def load_config(self, configpath, pkg=False): <NEW_LINE> <INDENT> if n... | Group setting objects | 6259907a60cbc95b06365a6b |
class SpeedWay(AbstractRoad): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> self.car.run() <NEW_LINE> print("高速公路上行驶") | 高速公路 | 6259907afff4ab517ebcf213 |
class ApiMalformedRequestException(ApiException): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> ApiException.__init__(self, 400, message) | Exception thrown by a REST API when an API request is missing required parameters. | 6259907aec188e330fdfa2a3 |
class BaseTinyMCEMemoWidget(BaseDashboardPluginWidget): <NEW_LINE> <INDENT> def render(self, request=None): <NEW_LINE> <INDENT> context = {'plugin': self.plugin} <NEW_LINE> return render_to_string('tinymce/render.html', context) | Base TinyMCE memo plugin widget. | 6259907a55399d3f05627f0f |
class mStack(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__data = [] <NEW_LINE> <DEDENT> def __del__(self): <NEW_LINE> <INDENT> del self.__data <NEW_LINE> <DEDENT> def clear(self): <NEW_LINE> <INDENT> del self.__data <NEW_LINE> self.__data = [] <NEW_LINE> <DEDENT> def isEmpty(self): <NEW_L... | a class for simple stack | 6259907a2c8b7c6e89bd51e6 |
class PatronPhotosDetailView(generics.RetrieveUpdateDestroyAPIView): <NEW_LINE> <INDENT> queryset = PatronPhotos.objects.all() <NEW_LINE> serializer_class = PatronPhotosSerializer <NEW_LINE> parser_class = (ImageUploadParser,) <NEW_LINE> permission_classes = (permissions.IsAdminUser,) <NEW_LINE> def get(self, request, ... | GET patronphoto/:id/
PUT patronphoto/:id/
DELETE patronphoto/:id/ | 6259907a76e4537e8c3f0f7b |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.