code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class ParsingError(TsplibError, ValueError): <NEW_LINE> <INDENT> pass
Exception raised when a value cannot be parsed from the text.
62598f7e15fb5d323ce7e70e
class Authentication(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Login(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): <NEW_LINE> <INDENT> return grpc.experimental.unary_unary(request, target...
[brief]: Authentication service for Junos APIs [detail]: Authentication service to allow a client endpoint to authenticate itself to gain access to Junos APIs
62598f7ea79ad16197769a44
class Status: <NEW_LINE> <INDENT> class StatusTypes(IntEnum): <NEW_LINE> <INDENT> carry = 0 <NEW_LINE> zero = 1 <NEW_LINE> interrupt = 2 <NEW_LINE> decimal = 3 <NEW_LINE> unused1 = 4 <NEW_LINE> unused2 = 5 <NEW_LINE> overflow = 6 <NEW_LINE> negative = 7 <NEW_LINE> <DEDENT> def __init__(self): <NEW_LINE> <INDENT> self.b...
7 bit 0 ---- ---- NVss DIZC |||| |||| |||| |||+- Carry: 1 if last addition or shift resulted in a carry, or if |||| ||| last subtraction resulted in no borrow |||| ||+-- Zero: 1 if last operation resulted in a 0 value |||| |+--- Interrupt: Interrupt inhibit |||| | (0: /IRQ and /NMI get through; 1: only /NMI...
62598f7e30c21e258be981ed
class Product(models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=120) <NEW_LINE> description = models.TextField(null=True, blank=True) <NEW_LINE> price = models.DecimalField(decimal_places=2, max_digits=8) <NEW_LINE> tax_bracket = models.DecimalField(decimal_places=2, max_digits=4, default="22") <NE...
Model for products.
62598f7e94891a1f408b93e1
class Role(db.Model): <NEW_LINE> <INDENT> __tablename__ = "tbl_roles" <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> name = db.Column(db.String(32), unique=True) <NEW_LINE> users = db.relationship("User", backref="role") <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return "Role object: name=%s...
用户角色/身份表
62598f7e63f4b57ef0085a60
class AccountSummary(Resource): <NEW_LINE> <INDENT> method_decorators = [authenticate] <NEW_LINE> def get(self): <NEW_LINE> <INDENT> choices = {"AccountType", "NetLiquidation", "TotalCashValue", "SettledCash", "AccruedCash", "BuyingPower", "EquityWithLoanValue", "PreviousDayEquityWithLoanValue", "GrossPositionValue", "...
Resource to handle requests for account summary information
62598f7e3eb6a72ae038a026
class FK4NoETerms(BaseRADecFrame): <NEW_LINE> <INDENT> equinox = TimeFrameAttribute(default=EQUINOX_B1950) <NEW_LINE> obstime = TimeFrameAttribute(default=None, secondary_attribute='equinox') <NEW_LINE> @staticmethod <NEW_LINE> def _precession_matrix(oldequinox, newequinox): <NEW_LINE> <INDENT> return earth._precession...
A coordinate or frame in the FK4 system, but with the E-terms of aberration removed. The frame attributes are listed under **Other Parameters**. {params} Other parameters ---------------- equinox : `~astropy.time.Time` The equinox of this frame. obstime : `~astropy.time.Time` The time this frame was observed...
62598f7e097d151d1a2c0a0c
class StringField(Field): <NEW_LINE> <INDENT> _strip_null = False <NEW_LINE> _encoding = "ascii" <NEW_LINE> def __init__(self, length, encoding="ascii", strip_null=False): <NEW_LINE> <INDENT> super().__init__(f"{length}s") <NEW_LINE> self._strip_null = strip_null <NEW_LINE> self._encoding = encoding <NEW_LINE> <DEDENT>...
Represents a field that is interpreted as a Python string. :param int length: Maximum allowed length of the field, as measured in the number of bytes used by its encoding. Note that if a shorter string is provided, it will be padded by null bytes. :param str encoding: Name of an encoding to use in serializ...
62598f7e21a7993f00c65955
class NodesResource(Resource): <NEW_LINE> <INDENT> actions = { 'private_list': {'method': 'GET', 'url': Node.private_nodelist.value}, 'shared_list': {'method': 'GET', 'url': Node.shared_nodelist.value} }
docstring for NodesResource
62598f7ed53ae8145f917e7d
class Libmaus2(AutotoolsPackage): <NEW_LINE> <INDENT> homepage = "https://gitlab.com/german.tischler/libmaus2" <NEW_LINE> url = "https://gitlab.com/german.tischler/libmaus2/-/archive/2.0.767-release-20201123131410/libmaus2-2.0.767-release-20201123131410.tar.gz" <NEW_LINE> version('2.0.767', sha256='40cec9bef2fb61d...
libmaus2 is a collection of data structures and algorithmse.
62598f7e596a897236127657
class QuerystringInstalled(tcl_ptc.BasePTCLayer): <NEW_LINE> <INDENT> def afterSetUp(self): <NEW_LINE> <INDENT> import plone.app.querystring <NEW_LINE> self.loadZCML('configure.zcml', package=plone.app.querystring) <NEW_LINE> ztc.installPackage('plone.app.querystring')
A PloneTestCase layer that loads the ZCML for plone.app.querystring and installs the package into zope.
62598f7ed164cc617582095d
class CreateProductSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Product <NEW_LINE> fields = ( 'id', 'name', 'description', 'code', 'brand', 'product_type', 'gross_price', 'price_neto' ) <NEW_LINE> <DEDENT> def validate(self, data): <NEW_LINE> <INDENT> return data ...
Product create serializer
62598f7ed99f1b3c44d05092
class Filter4(QgsServerFilter): <NEW_LINE> <INDENT> def responseComplete(self): <NEW_LINE> <INDENT> global body2 <NEW_LINE> request = self.serverInterface().requestHandler() <NEW_LINE> body2 = request.body()
Body getter
62598f7ee76e3b2f99fd8419
class InputFormatError(Exception): <NEW_LINE> <INDENT> pass
This exception will raise user's input is in the wrong format.
62598f7e30dc7b766599f23f
class Verify(models.Model): <NEW_LINE> <INDENT> type = models.CharField( max_length=2, verbose_name="验证类型" ) <NEW_LINE> account = models.CharField( max_length=50, verbose_name="验证账户信息" ) <NEW_LINE> code = models.CharField( max_length=10, verbose_name="验证码" )
验证码表
62598f7e82261d6c5272fbc6
class bashrcs(_base): <NEW_LINE> <INDENT> __metaclass__ = _register_command <NEW_LINE> def __call__(self, namespace, out, err): <NEW_LINE> <INDENT> for bashrc in namespace.profile.bashrcs: <NEW_LINE> <INDENT> out.write(bashrc.path)
inspect bashrcs
62598f7e8a43f66fc4bf1b65
class Solution: <NEW_LINE> <INDENT> def searchInsert(self, A, target): <NEW_LINE> <INDENT> if len(A) == 0: <NEW_LINE> <INDENT> return 0 <NEW_LINE> <DEDENT> start, end = 0, len(A) -1 <NEW_LINE> while start + 1 < end: <NEW_LINE> <INDENT> mid = start + (end - start)/2 <NEW_LINE> if A[mid] == target: <NEW_LINE> <INDENT> en...
@param A : a list of integers @param target : an integer to be inserted @return : an integer
62598f7e4e696a045264daf3
class KeepOnParsing(SoupTest): <NEW_LINE> <INDENT> def testMultipleParseCalls(self): <NEW_LINE> <INDENT> f1 = '<foo>bah<bar>' <NEW_LINE> f2 = 'blee</bar></foo>' <NEW_LINE> s1 = BeautifulSoup(f1+f2) <NEW_LINE> s2 = BeautifulSoup(f1) <NEW_LINE> s2.feed(f2) <NEW_LINE> s3 = BeautifulSoup(f1, initialTextIsEverything=False) ...
Verifies that the parser treats multiple feed() calls the same as one big feed() call only if constructed with initialTextIsEverything=False.
62598f7e0a366e3fb87dc3b1
class Resources(Target): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def alias(cls): <NEW_LINE> <INDENT> return 'resources' <NEW_LINE> <DEDENT> def __init__(self, address=None, payload=None, sources=None, **kwargs): <NEW_LINE> <INDENT> payload = payload or Payload() <NEW_LINE> payload.add_fields({ 'sources': self.creat...
Resource files. Looking for loose files in your JVM application bundle? Those are `bundle <#bundle>`_\s. Resources are files included in deployable units like Java jars or Python wheels and accessible via language-specific APIs. :API: public
62598f7e96565a6dacd2cc6c
class Model(BaseModel): <NEW_LINE> <INDENT> __storm_table__ = None <NEW_LINE> id = Unicode(primary=True, default_factory=uuid4) <NEW_LINE> @classmethod <NEW_LINE> def get(cls, store, obj_id): <NEW_LINE> <INDENT> return store.find(cls, cls.id == obj_id).one() <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def delete(cls, s...
Base class for working the database, already integrating an id.
62598f7ecad5886f8bdc4d0a
class CondWithManyIntermediatesBenchmark(test.Benchmark): <NEW_LINE> <INDENT> NUM_INTERMEDIATES = 1000 <NEW_LINE> NUM_ITERS = 500 <NEW_LINE> NUM_WARM_UP_ITERS = 50 <NEW_LINE> def _create_cond(self, x): <NEW_LINE> <INDENT> def branch_fn(): <NEW_LINE> <INDENT> return x + sum(random_ops.random_normal([]) for _ in range(se...
Checks the runtime performance of outputting all intermediates.
62598f7e23e79379d538bedf
class MScene(QtGui.QGraphicsScene): <NEW_LINE> <INDENT> def __init__(self,parent=None): <NEW_LINE> <INDENT> super(MScene,self).__init__(parent) <NEW_LINE> self.colorMap = MB.ColorMap() <NEW_LINE> self.mandelbrotImage = MB.MandelbrotImage() <NEW_LINE> self.generateImage() <NEW_LINE> <DEDENT> def generateImage(self,upper...
Reimplementing the QGraphicsScene for better event control.
62598f7e76d4e153a661c5f8
class TestCatalogApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = swagger_client.api.catalog_api.CatalogApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_create_optimization_template(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <...
CatalogApi unit test stubs
62598f7e63b5f9789fe84b58
class TroubleshootingDetails(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'reason_type': {'key': 'reasonType', 'type': 'str'}, 'summary': {'key': 'summary', 'type': 'str'}, 'detail': {'key': 'detail', 'type': 'str'}, 'recommended_actions': {'key': 'recommendedA...
Information gained from troubleshooting of specified resource. :param id: The id of the get troubleshoot operation. :type id: str :param reason_type: Reason type of failure. :type reason_type: str :param summary: A summary of troubleshooting. :type summary: str :param detail: Details on troubleshooting results. :type ...
62598f7e26238365f5fac556
class HerReplayBuffer(ReplayBuffer): <NEW_LINE> <INDENT> def __init__(self, replay_k, reward_fun, env_spec, size_in_transitions, time_horizon): <NEW_LINE> <INDENT> self._env_spec = env_spec <NEW_LINE> self._sample_transitions = make_her_sample(replay_k, reward_fun) <NEW_LINE> self._replay_k = replay_k <NEW_LINE> self._...
Replay buffer for HER (Hindsight Experience Replay). It constructs hindsight examples using future strategy. Args: replay_k (float): Ratio between HER replays and regular replays reward_fun (callable): Function to re-compute the reward with substituted goals env_spec (garage.envs.EnvSpec): Environ...
62598f7e94891a1f408b93e2
class State: <NEW_LINE> <INDENT> def __init__(self, v): <NEW_LINE> <INDENT> self.value = v <NEW_LINE> self.blankPosition = v.index(0) <NEW_LINE> <DEDENT> def clone(self): <NEW_LINE> <INDENT> return State(list(self.value)) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return str(self.value) <NEW_LINE> <DED...
State for nPuzzle graph that stores the position of the blank.
62598f7e7b25080760ed6e8a
class AudioCaptcha(RenderedCaptcha): <NEW_LINE> <INDENT> def __call__(self): <NEW_LINE> <INDENT> self.set_headers('audio/wav') <NEW_LINE> return skimpyAPI.Wave(self.word, WAVSOUNDS).data()
Audio version of the captcha.
62598f7e8e71fb1e983bb49e
class JSONable(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def load(cls, filename): <NEW_LINE> <INDENT> with gzip.GzipFile(filename, "r") as source: <NEW_LINE> <INDENT> return jsonpickle.decode(source.read().decode("UTF-8"), keys=True) <NEW_LINE> <DEDENT> <DEDENT> def dump(self, filename): <NEW_LINE> <INDENT> ...
Mixin which makes a class support `jsonpickle`.
62598f7e38b623060ffa8a7e
class ScheduleBotNotAllowed(BadRequest): <NEW_LINE> <INDENT> ID = "SCHEDULE_BOT_NOT_ALLOWED" <NEW_LINE> MESSAGE = __doc__
Bots are not allowed to schedule messages
62598f7ebe383301e02531e0
class YAMLLiteral(six.text_type): <NEW_LINE> <INDENT> pass
Literal which should be set with | scalar view.
62598f7e73bcbd0ca4bc9c37
class ThreePlayMediaLanguagesRetrievalError(ThreePlayMediaError): <NEW_LINE> <INDENT> pass
An error Occurred while retrieving available 3PlayMedia languages.
62598f7e30c21e258be981f0
class ChromaFormatter(Formatter): <NEW_LINE> <INDENT> def __call__(self, x, pos=None): <NEW_LINE> <INDENT> return core.midi_to_note(int(x), octave=False, cents=False)
A formatter for chroma axes See also -------- matplotlib.ticker.Formatter Examples -------- >>> import matplotlib.pyplot as plt >>> values = np.arange(12) >>> plt.figure() >>> ax = plt.gca() >>> ax.plot(values) >>> ax.yaxis.set_major_formatter(librosa.display.ChromaFormatter()) >>> ax.set_ylabel('Pitch class')
62598f7e596a897236127659
class Interrupt(BaseException): <NEW_LINE> <INDENT> pass
Base class for exceptions used to asynchronously interrupt a thread's execution. An actor may catch these exceptions in order to respond gracefully, such as performing any necessary cleanup. This is *not* a subclass of ``RemouladeError`` to avoid it being caught unintentionally.
62598f7ed53ae8145f917e7f
class FriendshipInvitation(models.Model): <NEW_LINE> <INDENT> from_user = models.ForeignKey(User, related_name="invitations_from") <NEW_LINE> to_user = models.ForeignKey(User, related_name="invitations_to") <NEW_LINE> message = models.TextField() <NEW_LINE> sent = models.DateField(default=datetime.date.today) <NEW_LINE...
A frienship invite is an invitation from one user to another to be associated as friends.
62598f7e30dc7b766599f241
class LockContext(object): <NEW_LINE> <INDENT> def __init__(self, session, device_handler, target): <NEW_LINE> <INDENT> self.session = session <NEW_LINE> self.target = target <NEW_LINE> self.device_handler = device_handler <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> Lock(self.session, self.device_handl...
A context manager for the :class:`Lock` / :class:`Unlock` pair of RPC's. Any `rpc-error` will be raised as an exception. Initialise with (:class:`Session <ipngnc.transport.Session>`) instance and lock target.
62598f7e8a43f66fc4bf1b67
class Migration(migrations.Migration): <NEW_LINE> <INDENT> dependencies = [ ('Surveyapp', '0001_initial'), ] <NEW_LINE> operations = [ migrations.AddField( model_name='employee', name='emp_passFlag', field=models.BooleanField(default=True), ), ]
Generated by Django 2.1.5 on 2019-02-12 05:06
62598f7e6fece00bbaccb36f
class Kodi(BotPlugin): <NEW_LINE> <INDENT> def configure(self, configuration): <NEW_LINE> <INDENT> if configuration is not None and configuration != {}: <NEW_LINE> <INDENT> config = dict(chain(KODI_CONFIG.items(), configuration.items())) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> config = KODI_CONFIG <NEW_LINE> <DED...
Interact with a networked XBMC or Kodi installation via errbot.
62598f7e21bff66bcd72264f
class Reservations(NextGenListResource): <NEW_LINE> <INDENT> name = "Reservations" <NEW_LINE> instance = Reservation <NEW_LINE> def update(self, sid, **kwargs): <NEW_LINE> <INDENT> return self.update_instance(sid, kwargs)
A list of Reservation resources
62598f7e07f4c71912baee36
class NumberInWords(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def toString(self, number=None): <NEW_LINE> <INDENT> word = '' <NEW_LINE> if type(number) is not int: <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> if number == 0: <NEW_LINE> <INDENT> return 'zero' <...
From int(numbers) to string version
62598f7e66656f66f7d59ddb
class _NewCheckpointListenerForEvaluate( basic_session_run_hooks.CheckpointSaverListener): <NEW_LINE> <INDENT> def __init__(self, evaluator, eval_throttle_secs, continuous_eval_listener): <NEW_LINE> <INDENT> self._evaluator = evaluator <NEW_LINE> self._eval_throttle_secs = eval_throttle_secs <NEW_LINE> self._continuous...
A saver listener to run evaluate with every checkpoint.
62598f7e15fb5d323ce7e712
class GetArrayIndexInputSet(InputSet): <NEW_LINE> <INDENT> def set_AccountID(self, value): <NEW_LINE> <INDENT> super(GetArrayIndexInputSet, self)._set_input('AccountID', value) <NEW_LINE> <DEDENT> def set_Password(self, value): <NEW_LINE> <INDENT> super(GetArrayIndexInputSet, self)._set_input('Password', value) <NEW_LI...
An InputSet with methods appropriate for specifying the inputs to the GetArrayIndex Choreo. The InputSet object is used to specify input parameters when executing this Choreo.
62598f7e1d351010ab8f3526
class VideoWidget(gtk.DrawingArea): <NEW_LINE> <INDENT> def __init__(self, x=160, y=120): <NEW_LINE> <INDENT> super(VideoWidget, self).__init__() <NEW_LINE> self._imagesink = None <NEW_LINE> self.unset_flags(gtk.DOUBLE_BUFFERED) <NEW_LINE> self.set_size_request(x,y) <NEW_LINE> <DEDENT> def do_expose_event(self, event):...
A custom widget to render GStreamer video.
62598f7efb3f5b602db47ea4
class StickyNote(object): <NEW_LINE> <INDENT> name = "" <NEW_LINE> description = "" <NEW_LINE> contents = "" <NEW_LINE> legible = False <NEW_LINE> def __init__(self, name, description, contents, legible): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.description = description <NEW_LINE> self.contents = contents ...
This object represents a small paper Sticky Note.
62598f7e8e05c05ec3f6eb3b
class MainGUI(Tk): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> Tk.__init__(self, parent) <NEW_LINE> self.parent = parent <NEW_LINE> self.resizable(0, True) <NEW_LINE> self.center(win_w=1200, win_h=1000) <NEW_LINE> Header(self) <NEW_LINE> PlayBtn(self) <NEW_LINE> QuestionPanel(self, panel_name="q...
Main graphical user interface for queue app
62598f7e8c3a8732951f5f2f
class CollectorException(Exception): <NEW_LINE> <INDENT> pass
Prototype for collector exception
62598f7eac7a0e7691f71f02
class NCBICodonTableDNA(NCBICodonTable): <NEW_LINE> <INDENT> nucleotide_alphabet = IUPAC.unambiguous_dna
Codon table for unambiguous DNA sequences.
62598f7e21a7993f00c65959
class GILExitNode(StatNode): <NEW_LINE> <INDENT> child_attrs = [] <NEW_LINE> def analyse_expressions(self, env): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def generate_execution_code(self, code): <NEW_LINE> <INDENT> if self.state == 'gil': <NEW_LINE> <INDENT> code.put_release_ensured_gil() <NEW_LINE> <DEDENT> else: ...
Used as the 'finally' block in a GILStatNode state string 'gil' or 'nogil'
62598f7e596a89723612765a
class TakeLUNOfflinePage(BasePage): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> path = '#manager/storage/allstorage/luns' <NEW_LINE> super(TakeLUNOfflinePage, self).__init__(path=path, **kwargs) <NEW_LINE> <DEDENT> def setupSelectors(self): <NEW_LINE> <INDENT> self._selectors['lblTitle'] = '//...
Single page of dialog 'Take LUN(s) Offline'.
62598f7e507cdc57c63a4775
class GamesPage(webapp2.RequestHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> gamelist = api.get_all_games() <NEW_LINE> template_values = { 'gamelist': gamelist } <NEW_LINE> template = JINJA_ENVIRONMENT.get_template('templates/game.template') <NEW_LINE> self.response.write(template.render(template_val...
Lists all of the games currently in the datastore
62598f7ed164cc6175820961
class Tee: <NEW_LINE> <INDENT> def __init__(self, name, mode="at"): <NEW_LINE> <INDENT> self.filename = name <NEW_LINE> self.mode = mode <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> self.start() <NEW_LINE> <DEDENT> def __exit__(self, *exceptinfo): <NEW_LINE> <INDENT> self.stop(*exceptinfo) <NEW_LINE> <D...
Redirect stdin+stdout to a file and at the same time to the orig stdin+stdout. Use as a context manager or with .start() and .stop().
62598f7ebaa26c4b54d4ec9c
class KuberefValidator(Validator): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(KuberefValidator, self).__init__() <NEW_LINE> self._logger = logging.getLogger(__name__) <NEW_LINE> self._report = {"installer": "Kuberef", "criteria": "pass", "details": {"total_checks": 0, "metadata": {}, "pass": [], ...
Class for Kuberef Validation
62598f7e15baa72349461968
class vcfReader: <NEW_LINE> <INDENT> def __init__(self, inFileName): <NEW_LINE> <INDENT> self.headInfo = {} <NEW_LINE> self.headInfo["headBlock"] = [] <NEW_LINE> self.headInfo["FORMAT"] = [] <NEW_LINE> self.headInfo["contig"] = [] <NEW_LINE> self.headInfo["INFO"] = [] <NEW_LINE> self.lines = [] <NEW_LINE> inFile = open...
Method for reading VCF files
62598f7e15baa72349461969
class SrpMgmtIpsPathIndEnum(Enum): <NEW_LINE> <INDENT> short_path = 0 <NEW_LINE> long_path = 1 <NEW_LINE> unknown_path = 2 <NEW_LINE> @staticmethod <NEW_LINE> def _meta_info(): <NEW_LINE> <INDENT> from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_pfi_im_cmd_oper as meta <NEW_LINE> return meta._meta_table['SrpMgmt...
SrpMgmtIpsPathIndEnum SRP IPS path indication .. data:: short_path = 0 SHORT .. data:: long_path = 1 LONG .. data:: unknown_path = 2 UNKNOWN
62598f7e73bcbd0ca4bc9c3a
class BenchmarkManager(object): <NEW_LINE> <INDENT> def __init__(self, log_framerate, log_latency_bin_size): <NEW_LINE> <INDENT> self.alive = True <NEW_LINE> self.rate_limit = 0.01 <NEW_LINE> self.soft_stop_timeout = 2 <NEW_LINE> self.log_framerate = log_framerate <NEW_LINE> self.log_latency_bin_size = log_latency_bin_...
This class is responsible for spinning up, spinning down, and coordinating TaskManagers on a single node
62598f7e50485f2cf55da95c
class ExampleDatasetSimulated(ExampleDataset): <NEW_LINE> <INDENT> @lazyproperty <NEW_LINE> def source_table(self): <NEW_LINE> <INDENT> table = Table() <NEW_LINE> table['GLON'] = np.array([0, 45, 45], dtype='float32') <NEW_LINE> table['GLAT'] = np.array([0, 0, 45], dtype='float32') <NEW_LINE> table['COUNTS'] = np.array...
Example simulated dataset. Similar to `ExampleDatasetFermi`, but simulated, not requiring any data files.
62598f7e9b70327d1c57e78e
class Athelete(Base): <NEW_LINE> <INDENT> __tablename__ = 'athelete' <NEW_LINE> id = sa.Column(sa.Integer, primary_key=True) <NEW_LINE> age = sa.Column(sa.Integer) <NEW_LINE> birthdate = sa.Column(sa.Text) <NEW_LINE> gender = sa.Column(sa.Text) <NEW_LINE> height = sa.Column(sa.Float) <NEW_LINE> weight = sa.Column(sa.In...
Описывает структуру таблицы athelete, содержащую данные об атлетах
62598f7e26238365f5fac55a
class DateTimeField(Field): <NEW_LINE> <INDENT> widget = TextInput <NEW_LINE> def __init__(self, label=u'', validators=None, parse_kwargs=None, display_format='%Y-%m-%d %H:%M', **kwargs): <NEW_LINE> <INDENT> super(DateTimeField, self).__init__(label, validators, **kwargs) <NEW_LINE> if parse_kwargs is None: <NEW_LINE> ...
DateTimeField represented by a text input, accepts all input text formats that `dateutil.parser.parse` will. :param parse_kwargs: A dictionary of keyword args to pass to the dateutil parse() function. See dateutil docs for available keywords. :param display_format: A format string to pass to strftime() to ...
62598f7e8da39b475be02bcf
class SampleCentringQueueEntry(BaseQueueEntry): <NEW_LINE> <INDENT> def __init__(self, view=None, data_model=None): <NEW_LINE> <INDENT> BaseQueueEntry.__init__(self, view, data_model) <NEW_LINE> <DEDENT> def __setstate__(self, d): <NEW_LINE> <INDENT> self.__dict__.update(d) <NEW_LINE> <DEDENT> def __getstate__(self): <...
Entry for centring a sample
62598f7e23e79379d538bee4
class ExportCampaignToCSV(TemplateView): <NEW_LINE> <INDENT> @method_decorator(staff_member_required) <NEW_LINE> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> asset_qs = Asset.objects.filter( item__project__campaign__slug=self.kwargs["campaign_slug"] ) <NEW_LINE> assets = get_latest_transcription_data(as...
Exports the most recent transcription for each asset in a campaign
62598f7e442bda511e95be45
class OcrApiClient(APIClient, OcrClientBase): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(OcrApiClient, self).__init__() <NEW_LINE> self._init_user() <NEW_LINE> self.force_login(user=self.user)
The client to performing test for API views 2019-03-28
62598f7e596a89723612765c
class Component: <NEW_LINE> <INDENT> widget_type: Type[tk.Widget] <NEW_LINE> def __init__(self, title: str = '', **kwargs): <NEW_LINE> <INDENT> self.title = title <NEW_LINE> self.additional_kwargs = kwargs <NEW_LINE> <DEDENT> def get_kwargs(self, root) -> Dict[str, Any]: <NEW_LINE> <INDENT> return {'width': DEFAULT_WID...
Базовый класс, определяющий логику создания компонента
62598f7ed53ae8145f917e83
class DataLoader(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def load_data(self, fname): <NEW_LINE> <INDENT> with open(fname) as f: <NEW_LINE> <INDENT> content = f.readlines() <NEW_LINE> <DEDENT> print("Number of Rows: ", content[0]) <NEW_LINE> return content <NEW_LINE>...
docstring for data_loader
62598f7ed99f1b3c44d05098
class SessionMiddleware(object): <NEW_LINE> <INDENT> def pre_dispatch(self, handler): <NEW_LINE> <INDENT> if self.session_type == 'securecookie': <NEW_LINE> <INDENT> local.session_store = SessionStore(self) <NEW_LINE> <DEDENT> elif self.session_type == 'datastore': <NEW_LINE> <INDENT> local.session_store = DatastoreSes...
A middleware that initializes and persists sessions for a :class:`tipfy.RequestHandler`.
62598f7ea4f1c619b294dfd8
class Game(models.Model): <NEW_LINE> <INDENT> gameId = models.UUIDField(default=uuid.uuid4, primary_key=True, editable=False) <NEW_LINE> numPlayers = models.IntegerField(default=0) <NEW_LINE> numPairs = models.IntegerField(default=0) <NEW_LINE> creator = models.TextField(default='') <NEW_LINE> state = models.TextField(...
Created games by a user
62598f7e8a43f66fc4bf1b6b
class Solution: <NEW_LINE> <INDENT> def search(self, A, target): <NEW_LINE> <INDENT> n = len(A) <NEW_LINE> if n == 0: <NEW_LINE> <INDENT> return -1 <NEW_LINE> <DEDENT> i = 0 <NEW_LINE> j = n-1 <NEW_LINE> while True: <NEW_LINE> <INDENT> mid = (i+j) // 2 <NEW_LINE> if A[mid] < A[n-1]: <NEW_LINE> <INDENT> j = mid -1 <NEW_...
@see https://leetcode.com/problems/search-in-rotated-sorted-array/
62598f7e0a366e3fb87dc3b7
class TestV1DeploymentStrategy(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 testV1DeploymentStrategy(self): <NEW_LINE> <INDENT> model = lib_openshift.models.v1_deployment_strategy.V1DeploymentSt...
V1DeploymentStrategy unit test stubs
62598f7e50485f2cf55da95d
class LOCALNAMESPACEPATH(CIMElement): <NEW_LINE> <INDENT> def __init__(self, namespaces): <NEW_LINE> <INDENT> CIMElement.__init__(self, 'LOCALNAMESPACEPATH') <NEW_LINE> self.appendChildren(namespaces)
The LOCALNAMESPACEPATH element is used to define a local Namespace path (one without a Host component). It consists of one or more NAMESPACE elements (one for each namespace in the path). :: <!ELEMENT LOCALNAMESPACEPATH (NAMESPACE+)>
62598f7e287bf620b62715a0
class Score(Actor): <NEW_LINE> <INDENT> def updateScore(self): <NEW_LINE> <INDENT> oldText = super().get_text() <NEW_LINE> oldText = oldText.split() <NEW_LINE> score = oldText[len(oldText) - 1] <NEW_LINE> score = int(score) <NEW_LINE> score += 50 <NEW_LINE> score = str(score) <NEW_LINE> oldText[len(oldText) - 1] = scor...
This class extends actor and updates the score for the player. Author: McKay Williams Args: self (score): an instance of the score class.
62598f7e15fb5d323ce7e716
@method_decorator(user_passes_test(is_center), name="dispatch") <NEW_LINE> class CenterTfgListView(ListView): <NEW_LINE> <INDENT> model = Tfgs <NEW_LINE> template_name = "tfgs/center_tfgs_list.html" <NEW_LINE> paginate_by = PAGINATION <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> queryset = super().get_queryse...
Controlador para mostrar el listado de tfgs de una convocatoria. Atributos: model(model.Model): Modelo que se va a listar en la vista. template_name(str): Nombre del template donde se va a renderizar la vista. paginate_by(int): Número de items por página.
62598f7e76d4e153a661c5fe
class UserProfileView(generic.DetailView): <NEW_LINE> <INDENT> template_name='registration/user_profile.html' <NEW_LINE> model = UserProfile <NEW_LINE> def get_object(self): <NEW_LINE> <INDENT> qs = self.model.objects.filter(user__username=self.kwargs['slug']) <NEW_LINE> if qs.exists(): <NEW_LINE> <INDENT> return qs.ge...
Consultation/modification d'un profil
62598f7e29b78933be269dd1
class ServiceController(Controller): <NEW_LINE> <INDENT> @public <NEW_LINE> def GET(self, req): <NEW_LINE> <INDENT> log_s3api_command(req, 'list-buckets') <NEW_LINE> resp = req.get_response(self.app, query={'format': 'json'}) <NEW_LINE> containers = json.loads(resp.body) <NEW_LINE> containers = filter( lambda item: val...
Handles account level requests.
62598f7e30c21e258be981f5
class PropertyHTML(PropertyText): <NEW_LINE> <INDENT> pass
A property that allows html text. Used for plugin descriptions.
62598f7e9b70327d1c57e791
class ProfileForm(forms.Form): <NEW_LINE> <INDENT> curp = forms.CharField(max_length=18,required=True ) <NEW_LINE> phone_number = forms.CharField(max_length=20, required=False) <NEW_LINE> picture = forms.ImageField() <NEW_LINE> ine = forms.ImageField()
Profile form.
62598f7e07d97122c421668f
class ReceiverResult(object): <NEW_LINE> <INDENT> def __init__(self, response, certainty): <NEW_LINE> <INDENT> self._response = response <NEW_LINE> self._certainty = certainty <NEW_LINE> <DEDENT> @property <NEW_LINE> def response(self): <NEW_LINE> <INDENT> return self._response <NEW_LINE> <DEDENT> @property <NEW_LINE> ...
This class should be used to return from signals if you want to communicate something back to receiver. The most common (okay, only current) scenario for this is overriding the response to the user based on an application's specific logic.
62598f7ea17c0f6771d5bc30
class cached_property(Generic[A, R]): <NEW_LINE> <INDENT> def __init__(self, func: Callable[[A], R]) -> None: <NEW_LINE> <INDENT> self.func = func <NEW_LINE> self.__doc__ = func.__doc__ <NEW_LINE> <DEDENT> def __get__(self, instance: A, type: type) -> R: <NEW_LINE> <INDENT> res = instance.__dict__[self.func.__name__] =...
Decorator that creates converts a method with a single self argument into a property cached on the instance.
62598f7e7c178a314d78ce97
@pytest.mark.usefixtures('tasks_db') <NEW_LINE> class TestAdd: <NEW_LINE> <INDENT> def test_missing_summary(self): <NEW_LINE> <INDENT> with pytest.raises(ValueError): <NEW_LINE> <INDENT> tasks.add(Task(owner='bob')) <NEW_LINE> <DEDENT> <DEDENT> def test_done_not_bool(self): <NEW_LINE> <INDENT> with pytest.raises(ValueE...
Tests related to tasks.add().
62598f7ea4f1c619b294dfda
class logger(Singleton): <NEW_LINE> <INDENT> logger_initialized = False <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> if False == logger.logger_initialized: <NEW_LINE> <INDENT> this_file = inspect.getfile(inspect.currentframe()) <NEW_LINE> dirpath = os.path.abspath(os.path.dirname(this_file)) <NEW_LINE> dirpath = ...
singleton class logger
62598f7ed99f1b3c44d0509a
class Game: <NEW_LINE> <INDENT> def __init__(self, core): <NEW_LINE> <INDENT> self.core = core <NEW_LINE> self.running = True <NEW_LINE> self.screen = pygame.display.get_surface() <NEW_LINE> self.controller = Controller() <NEW_LINE> self.main_menu = MainMenu(self) <NEW_LINE> self.game_menu = GameMenu(self) <NEW_LINE> s...
This class represents the highest level of the game logic, managing the other more specific components of the game.
62598f7ebaa26c4b54d4eca0
class c14(nn.Module): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(c14, self).__init__() <NEW_LINE> self.conv1 = nn.Conv2d(3, 64, 3, padding=1) <NEW_LINE> self.conv2 = nn.Conv2d(64, 64, 3, padding=1) <NEW_LINE> self.conv3 = nn.Conv2d(64, 128, 3, padding=1) <NEW_LINE> self.conv4 = nn.Conv2d(128, 128...
The 8-layer conv net model used in: https://github.com/YisenWang/dynamic_adv_training/blob/master/models.py. BN preserved
62598f7e711fe17d825e00d6
class Line(ShapeStim): <NEW_LINE> <INDENT> def __init__(self, win, start=(-.5, -.5), end=(.5, .5), **kwargs): <NEW_LINE> <INDENT> self._initParams = dir() <NEW_LINE> self._initParams.remove('self') <NEW_LINE> self._initParams.remove('kwargs') <NEW_LINE> self._initParams.extend(kwargs) <NEW_LINE> self.__dict__['start'] ...
Creates a Line between two points. (New in version 1.72.00)
62598f7e66656f66f7d59de1
class Attribute(ABC): <NEW_LINE> <INDENT> def __init__(self, get_value): <NEW_LINE> <INDENT> self._get_value = get_value <NEW_LINE> <DEDENT> @property <NEW_LINE> def value(self): <NEW_LINE> <INDENT> return self._get_value() <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def in_range(self) -> bool: <NEW_LINE> <INDENT> r...
Represent a watched attribute :param: get_value: A function to retrieve the attributes value
62598f7e15baa7234946196c
class BSTIterator(object): <NEW_LINE> <INDENT> def inOrder(self, root): <NEW_LINE> <INDENT> stack = [] <NEW_LINE> res = [] <NEW_LINE> cur = root <NEW_LINE> while stack or cur: <NEW_LINE> <INDENT> if cur: <NEW_LINE> <INDENT> stack.append(cur) <NEW_LINE> cur = cur.left <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> node =...
空间复杂度不符合要求
62598f7e0383005118f6d0ef
class TestPlaceClass(unittest.TestCase): <NEW_LINE> <INDENT> def test_place_attr(self): <NEW_LINE> <INDENT> self.one = Place() <NEW_LINE> self.assertTrue(hasattr(self.one, "city_id")) <NEW_LINE> self.assertTrue(hasattr(self.one, "user_id")) <NEW_LINE> self.assertTrue(hasattr(self.one, "name")) <NEW_LINE> self.assertTru...
testing place class
62598f7e50485f2cf55da95f
class CmdStateQQ(COMMAND_DEFAULT_CLASS): <NEW_LINE> <INDENT> key = "qq" <NEW_LINE> help_category = "BatchProcess" <NEW_LINE> locks = "cmd:perm(batchcommands)" <NEW_LINE> def func(self): <NEW_LINE> <INDENT> purge_processor(self.caller) <NEW_LINE> self.caller.msg("Aborted interactive batch mode.")
qq Quit the batchprocessor.
62598f7e66673b3332c2fdb2
class CertificatePage(PageObject): <NEW_LINE> <INDENT> url_path = "certificates" <NEW_LINE> def __init__(self, browser, user_id, course_id): <NEW_LINE> <INDENT> super().__init__(browser) <NEW_LINE> self.user_id = user_id <NEW_LINE> self.course_id = course_id <NEW_LINE> <DEDENT> def is_browser_on_page(self): <NEW_LINE> ...
Certificate web view page.
62598f7e76d4e153a661c600
class Enum(RawType): <NEW_LINE> <INDENT> def __init__(self, cstruct, name, type_, values): <NEW_LINE> <INDENT> self.type = type_ <NEW_LINE> self.values = values <NEW_LINE> self.reverse = {} <NEW_LINE> for k, v in values.items(): <NEW_LINE> <INDENT> self.reverse[v] = k <NEW_LINE> <DEDENT> super(Enum, self).__init__(cstr...
Implements an Enum type. Enums can be made using any type. The API for accessing enums and their values is very similar to Python 3 native enums. Example: When using the default C-style parser, the following syntax is supported: enum <name> [: <type>] { <values> }; For example, a...
62598f7e26238365f5fac55e
class AdService(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def GetAds(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): <NEW_LINE> <INDENT> return grpc.experimental.unary_unary(request, target, '/...
Missing associated documentation comment in .proto file.
62598f7ef8510a7c17d7de6f
class linear(_parter): <NEW_LINE> <INDENT> def __init__(self, tickdists=None, labeldists=None, extendtick=0, extendlabel=None, epsilon=1e-10): <NEW_LINE> <INDENT> if tickdists is None and labeldists is not None: <NEW_LINE> <INDENT> self.ticklist = [tick.rational(labeldists[0])] <NEW_LINE> <DEDENT> else: <NEW_LINE> <IND...
partitioner to create a single linear partition
62598f7ed4950a0f3b110b2c
class CrabLogParabolaVeritas(Spectrum): <NEW_LINE> <INDENT> def __init__(self, index=-2.467, normalization_constant=3.75E-11 * u.Unit('cm-2 s-1 TeV-1'), beta=-0.16): <NEW_LINE> <INDENT> self.index = index <NEW_LINE> self.normalization_constant = normalization_constant <NEW_LINE> self.beta = beta <NEW_LINE> <DEDENT> def...
See VERITAS paper https://arxiv.org/pdf/1508.06442.pdf
62598f7ea17c0f6771d5bc32
class Bridge_Nose_pt(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "object.bridge_nose_pt" <NEW_LINE> bl_label = "Bridge of Nose" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> found = 'Bridge of Nose' in bpy.data.objects <NEW_LINE> if ...
Tooltip
62598f7e442bda511e95be49
class Solution: <NEW_LINE> <INDENT> def canJump(self, nums: List[int]) -> bool: <NEW_LINE> <INDENT> reach = 0 <NEW_LINE> for i in range(len(nums)): <NEW_LINE> <INDENT> if i > reach: <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> reach = max(reach, i+nums[i]) <NEW_LINE> <DEDENT> return True
贪心算法,每一步都算上一个数的索引和它的值的和是否有能力到达这一个数,如果可以的话,则说明有能力到达最后一个数, 不行的话就直接返回False Runtime: 48 ms, faster than 73.92% of Python3 online submissions for Jump Game. Memory Usage: 14.7 MB, less than 5.28% of Python3 online submissions for Jump Game.
62598f7e73bcbd0ca4bc9c3f
class AmbiguousInputError(Exception): <NEW_LINE> <INDENT> def __init__(self, name, output): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.output = output
Error raised for input that refers to multiple users
62598f7e21bff66bcd722657
class GaussianProcessNetworkBase(mx.gluon.HybridBlock): <NEW_LINE> <INDENT> @validated() <NEW_LINE> def __init__( self, prediction_length: int, context_length: int, cardinality: int, kernel_output: KernelOutputDict, params_scaling: bool, float_type: Type, max_iter_jitter: int, jitter_method: str, **kwargs, ) -> None: <...
Defines a Gluon block used for GP training and predictions.
62598f7ee76e3b2f99fd8423
class Planck15Kappa(PhixPhi): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Planck15Kappa, self).__init__() <NEW_LINE> <DEDENT> @property <NEW_LINE> def df(self): <NEW_LINE> <INDENT> if self._df is None: <NEW_LINE> <INDENT> self._df = pd.read_csv(os.path.join( P.PACKAGE_DIR, 'resources/phixphi/Planc...
Contains information on the CMB lensing power spectrum from the Planck (2015) PR2 release (https://arxiv.org/abs/1502.01591). Data are taken from https://wiki.cosmos.esa.int/planckpla2015/index.php/Specially_processed_maps#2015_Lensing_map and extrapolated for the multipoles 0-7. This class describes the lensing conver...
62598f7e8a43f66fc4bf1b6f
class Realizacao(models.Model): <NEW_LINE> <INDENT> evento = models.ForeignKey(Evento, verbose_name=_(u'Evento'), help_text=u'Selecione o evento.') <NEW_LINE> nome = models.CharField(max_length=255, verbose_name=u'Nome da realização', help_text=u'Digite o nome da realização.') <NEW_LINE> link = models.URLField(blank=Tr...
Modelo realização, onde contém as informações da realização do evento. Uma realização está associado a um evento.
62598f7e0a366e3fb87dc3bb
class ComDialog(wx.Dialog): <NEW_LINE> <INDENT> def __init__ (self, parent, top): <NEW_LINE> <INDENT> wx.Dialog.__init__(self, parent, -1, "MCCI USB Switch", size=wx.Size(100, 100), style=wx.STAY_ON_TOP|wx.DEFAULT_DIALOG_STYLE, name="MCCI USB Switch Search Dialog") <NEW_LINE> self.top = top <NEW_LINE> self.win = ComWin...
wxWindows application must have a class derived from wx.Dialog.
62598f7e73bcbd0ca4bc9c40
class LogUser(object): <NEW_LINE> <INDENT> def __init__(self, **kwags): <NEW_LINE> <INDENT> super(LogUser, self).__init__() <NEW_LINE> self.dataUserLogState=model0.UserLogState() <NEW_LINE> check0=self.dataUserLogState.getUserLogState(**kwags) <NEW_LINE> kwags['date_of_state']=time.ctime() <NEW_LINE> if len(check0)==0:...
docstring for LogUser.
62598f7e71ff763f4b5e715c
class DOMError: <NEW_LINE> <INDENT> def __init__(self, name, message=""): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.message = message
Not implemented yet
62598f7e50485f2cf55da961
class StringField(BaseField): <NEW_LINE> <INDENT> def __init__(self, regex=None, max_length=None, min_length=None, **kwargs): <NEW_LINE> <INDENT> self.regex = re.compile(regex) if regex else None <NEW_LINE> self.max_length = max_length <NEW_LINE> self.min_length = min_length <NEW_LINE> super(StringField, self).__init__...
A unicode string field.
62598f7e10dbd63aa1c705a1
class ZoneImportByID(APIView): <NEW_LINE> <INDENT> permission_classes = (permissions.IsAuthenticatedOrReadOnly,) <NEW_LINE> @staticmethod <NEW_LINE> def get_object(pk): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return Zone.objects.get(zone_id=pk) <NEW_LINE> <DEDENT> except Zone.DoesNotExist: <NEW_LINE> <INDENT> rais...
A router for API Zone import by ID POST
62598f7e8e05c05ec3f6eb3f