code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class FWRegisterReadCommand(Command, ResponseParserMixIn): <NEW_LINE> <INDENT> name = "Register Firmware Read" <NEW_LINE> result_type = FWRegisterReadResult <NEW_LINE> response_fields = { 'File Name' : {}, 'Partition' : {}, 'Type' : {}, 'Error' : {} } <NEW_LINE> def parse_response(self, out, err): <NEW_LINE> <INDENT> r...
cxoem fw register read command
62598fa4fff4ab517ebcd6a2
class NMEA(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> gps <NEW_LINE> <DEDENT> def check_nmea0183(self,s): <NEW_LINE> <INDENT> if s[0] != '$': <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> if s[-3] != '*': <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> checksum = 0 <NEW_LINE> for c...
classdocs
62598fa4f7d966606f747ea1
class cubo: <NEW_LINE> <INDENT> def __init__(self,a,b,particulas = []): <NEW_LINE> <INDENT> self.a = a <NEW_LINE> self.b = b <NEW_LINE> self.particulas = particulas <NEW_LINE> self.volumen = (b-a)**3 <NEW_LINE> self.area = (b-a)**2 <NEW_LINE> <DEDENT> def generar(self,vli,m,n): <NEW_LINE> <INDENT> self.vli = vli <NEW_L...
Cubo de lado b-a, que contiene instancias de objetos particula. Tiene la capacidad de generar particulas aleatorias.
62598fa4f548e778e596b462
class CommandCompleter(Completer): <NEW_LINE> <INDENT> def __init__(self, dbman, mode): <NEW_LINE> <INDENT> self.dbman = dbman <NEW_LINE> self.mode = mode <NEW_LINE> <DEDENT> def complete(self, original): <NEW_LINE> <INDENT> cmdlist = command.COMMANDS['global'] <NEW_LINE> cmdlist.update(command.COMMANDS[self.mode]) <NE...
completes commands
62598fa4460517430c431fba
class ServerListener(object): <NEW_LINE> <INDENT> def __init__(self, server): <NEW_LINE> <INDENT> self._server = server <NEW_LINE> self.start_listening() <NEW_LINE> <DEDENT> def start_listening(self): <NEW_LINE> <INDENT> self._server.add_listener(self) <NEW_LINE> <DEDENT> def stop_listening(self): <NEW_LINE> <INDENT> s...
An interface for listening to the server.
62598fa4e1aae11d1e7ce782
class MockPLM(): <NEW_LINE> <INDENT> def __init__(self, loop=None): <NEW_LINE> <INDENT> self.sentmessage = '' <NEW_LINE> self._message_callbacks = MessageCallback() <NEW_LINE> self.loop = loop <NEW_LINE> self.devices = LinkedDevices() <NEW_LINE> <DEDENT> @property <NEW_LINE> def message_callbacks(self): <NEW_LINE> <IND...
Mock PLM class for testing devices.
62598fa44a966d76dd5eeda0
class Bullet(Sprite): <NEW_LINE> <INDENT> def __init__(self, ai_settings, screen, ship): <NEW_LINE> <INDENT> super(Bullet, self).__init__ <NEW_LINE> self.screen = screen <NEW_LINE> self.rect = pygame.Rect(0, 0, ai_settings.bullet_width, ai_settings.bullet_height) <NEW_LINE> self.rect.left = ship.rect.left <NEW_LINE> se...
A class to manage bullets fired from rocket.
62598fa48c0ade5d55dc35ef
class EmailDashboardDataHandler(base.BaseHandler): <NEW_LINE> <INDENT> @acl_decorators.can_manage_email_dashboard <NEW_LINE> def get(self): <NEW_LINE> <INDENT> cursor = self.request.get('cursor') <NEW_LINE> num_queries_to_fetch = self.request.get('num_queries_to_fetch') <NEW_LINE> if not num_queries_to_fetch.isdigit():...
Query data handler.
62598fa47d43ff2487427361
class Linkfetcher(object): <NEW_LINE> <INDENT> def __init__(self, url): <NEW_LINE> <INDENT> self.url = url <NEW_LINE> self.urls = [] <NEW_LINE> self.__version__ = "0.0.1" <NEW_LINE> self.agent = "%s/%s" % (__name__, self.__version__) <NEW_LINE> <DEDENT> def _addHeaders(self, request): <NEW_LINE> <INDENT> request.add_he...
Link Fetcher class to abstract the link fetching.
62598fa455399d3f056263e2
class IDatabase_driver(object): <NEW_LINE> <INDENT> def __init__(self, connection_param=None): <NEW_LINE> <INDENT> self.verify_database_parameters(connection_param) <NEW_LINE> <DEDENT> def verify_database_parameters(self, params): <NEW_LINE> <INDENT> if not isinstance(params, Database_parameters): <NEW_LINE> <INDENT> r...
classdocs
62598fa4be8e80087fbbef20
class _DeferredRunTest(RunTest): <NEW_LINE> <INDENT> def _got_user_failure(self, failure, tb_label='traceback'): <NEW_LINE> <INDENT> return self._got_user_exception( (failure.type, failure.value, failure.getTracebackObject()), tb_label=tb_label)
Base for tests that return Deferreds.
62598fa401c39578d7f12c3d
class ReplyCategory(models.Model): <NEW_LINE> <INDENT> _name = 'reply.category' <NEW_LINE> name = fields.Char(string=u'问题类别', required=True) <NEW_LINE> reply_ids = fields.One2many('reply', 'category_id', string=u'热门问题')
自动回复问题分类
62598fa4aad79263cf42e694
class Peg(drawable): <NEW_LINE> <INDENT> radius = .10 <NEW_LINE> height = .1 <NEW_LINE> slices = 20 <NEW_LINE> stacks = 20 <NEW_LINE> def draw(self): <NEW_LINE> <INDENT> glPushMatrix() <NEW_LINE> self.translate() <NEW_LINE> setMaterial(materials['greenshiny']) <NEW_LINE> glutSolidCylinder(self.radius, self.height, self...
Peg object. The position of the peg should be relative to the board
62598fa47d847024c075c284
class UnsortedTableMap(MapBase): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._table = [] <NEW_LINE> <DEDENT> def __getitem__(self, k): <NEW_LINE> <INDENT> for item in self._table: <NEW_LINE> <INDENT> if k == item._key: <NEW_LINE> <INDENT> return item._value <NEW_LINE> <DEDENT> <DEDENT> raise KeyErr...
Map implementation using an unsorted table.
62598fa4009cb60464d013e3
class Room: <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.number = 0 <NEW_LINE> self.name ='' <NEW_LINE> self.connects_to = [] <NEW_LINE> self.description = "" <NEW_LINE> for key, value in kwargs.items(): <NEW_LINE> <INDENT> setattr(self, key, value) <NEW_LINE> <DEDENT> <DEDENT> def __str__...
Defines a room. A room has a name (or number), a list of other rooms that it connects to. and a description. How these rooms are built into something larger (cave, dungeon, skyscraper) is up to you.
62598fa4adb09d7d5dc0a44a
class LocaleTime(object): <NEW_LINE> <INDENT> def _LocaleTime__calc_am_pm(self, *args, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def _LocaleTime__calc_date_time(self, *args, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def _LocaleTime__calc_month(self, *args, **kwargs): <NEW_LINE> <INDENT> pass...
Stores and handles locale-specific information related to time. ATTRIBUTES: f_weekday -- full weekday names (7-item list) a_weekday -- abbreviated weekday names (7-item list) f_month -- full month names (13-item list; dummy value in [0], which is added by code) a...
62598fa4435de62698e9bcb3
class AveragePool(Layer): <NEW_LINE> <INDENT> def __init__(self, kernel_size, strides): <NEW_LINE> <INDENT> super(AveragePool, self).__init__() <NEW_LINE> self._kernel_size = kernel_size <NEW_LINE> self._strides = (strides, strides) if isinstance(strides, int) else strides <NEW_LINE> self._built = False <NEW_LINE> <DED...
Network layer corresponding to an average pooling function.
62598fa491f36d47f2230e02
class _UDPRequestHandler(socketserver.BaseRequestHandler): <NEW_LINE> <INDENT> def handle(self): <NEW_LINE> <INDENT> data = self.request[0] <NEW_LINE> callback = self.server.handle <NEW_LINE> try: <NEW_LINE> <INDENT> packet = OSCPacket(data) <NEW_LINE> now = calendar.timegm(time.gmtime()) <NEW_LINE> if packet.time > no...
Handles correct UDP messages for all types of server. Whether this will be run on its own thread, the server's or a whole new process depends on the server you instantiated, look at their documentation. This method is called after a basic sanity check was done on the datagram, basically whether this datagram looks li...
62598fa48e7ae83300ee8f60
class Gumball: <NEW_LINE> <INDENT> def __init__(self, x = 0, y = 0, color = RED): <NEW_LINE> <INDENT> self.x = x <NEW_LINE> self.y = y <NEW_LINE> self.color = color
Represents a gumball. Has no image because it is drawn as a circle.
62598fa4eab8aa0e5d30bc48
class GeneratorEnqueuer(SequenceEnqueuer): <NEW_LINE> <INDENT> def __init__(self, generator, use_multiprocessing=False, wait_time=0.05, random_seed=None): <NEW_LINE> <INDENT> self.wait_time = wait_time <NEW_LINE> self._generator = generator <NEW_LINE> self._use_multiprocessing = use_multiprocessing <NEW_LINE> self._thr...
Builds a queue out of a data generator. Used in `fit_generator`, `evaluate_generator`, `predict_generator`. Arguments: generator: a generator function which endlessly yields data use_multiprocessing: use multiprocessing if True, otherwise threading wait_time: time to sleep in-between calls to `put()` ...
62598fa48da39b475be030a0
class GetHostList(Component): <NEW_LINE> <INDENT> sys_name = configs.SYSTEM_NAME <NEW_LINE> class Form(BaseComponentForm): <NEW_LINE> <INDENT> app_id = forms.CharField(label=u'业务ID', required=True) <NEW_LINE> def clean(self): <NEW_LINE> <INDENT> data = self.cleaned_data <NEW_LINE> return { 'ApplicatioNID': data['app_id...
@api {get} /api/c/compapi/hcp/get_host_list/ get_host_list @apiName get_host_list @apiGroup API-HCP @apiVersion 1.0.0 @apiDescription 查询主机列表 @apiParam {string} app_code app标识 @apiParam {string} app_secret app密钥 @apiParam {string} bk_token 当前用户登录态 @apiParam {int} app_id 业务ID @apiParam {array} [ip_list] 主机IP地址 @apiPar...
62598fa499cbb53fe6830d94
class TaskSequence(TaskSet): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> super(TaskSequence, self).__init__(parent) <NEW_LINE> self._index = 0 <NEW_LINE> self.tasks.sort(key=lambda t: t.locust_task_order if hasattr(t, 'locust_task_order') else 1) <NEW_LINE> <DEDENT> def get_next_task(self): <NEW...
Class defining a sequence of tasks that a Locust user will execute. When a TaskSequence starts running, it will pick the task in `index` from the *tasks* attribute, execute it, and call its *wait_function* which will define a time to sleep for. This defaults to a uniformly distributed random number between *min_wait* ...
62598fa466673b3332c30288
class CueOrigin (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): <NEW_LINE> <INDENT> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'CueOrigin') <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('http://ddex.net/xml/20100712/ddex.xsd', 284, 4) <NEW_LINE> _Documentation = 'A Type of Cue...
A Type of Cue according to its origin.
62598fa48e7ae83300ee8f61
class ImageDeserializer(wsgi.JSONRequestDeserializer): <NEW_LINE> <INDENT> def create(self, request): <NEW_LINE> <INDENT> return request <NEW_LINE> <DEDENT> def update(self, request): <NEW_LINE> <INDENT> return request
Handles deserialization of specific controller method requests.
62598fa4e64d504609df9319
class SliderWidget(BaseWidget): <NEW_LINE> <INDENT> def __init__(self, min_value, max_value, step, instance=None, can_delete_vote=True, key='', read_only=False, default='', template='ratings/slider_widget.html', attrs=None): <NEW_LINE> <INDENT> super(SliderWidget, self).__init__(attrs) <NEW_LINE> self.min_value = min_v...
Slider widget. In order to use this widget you must load the jQuery.ui slider javascript. This widget triggers the following javascript events: - *slider_change* with the vote value as argument (fired when the user changes his vote) - *slider_delete* without arguments (fired when the user deletes his vote) It's...
62598fa421bff66bcd722b25
@dataset({"main_routing_test": {"scenario": "distributed"}}) <NEW_LINE> class TestDistributedMaxDurationForDirectPathUpperLimit(NewDefaultScenarioAbstractTestFixture): <NEW_LINE> <INDENT> s = '8.98311981954709e-05;8.98311981954709e-05' <NEW_LINE> r = '0.0018864551621048887;0.0007186495855637672' <NEW_LINE> test_max_wal...
Test max_{mode}_direct_path_duration's upper limit Direct path should be filtered if its duration is greater than max_{mode}_direct_path_duration
62598fa40a50d4780f70529b
class TreeCell(Agent): <NEW_LINE> <INDENT> def __init__(self, pos, model): <NEW_LINE> <INDENT> super().__init__(pos, model) <NEW_LINE> self.pos = pos <NEW_LINE> self.condition = "Unelectrified" <NEW_LINE> <DEDENT> def step(self): <NEW_LINE> <INDENT> if self.condition == "Transition": <NEW_LINE> <INDENT> for neighbor in...
A tree cell. Attributes: x, y: Grid coordinates condition: Can be "Unelectrified", "Transition", or "Electrified" unique_id: (x,y) tuple. unique_id isn't strictly necessary here, but it's good practice to give one to each agent anyway.
62598fa43539df3088ecc174
@override_settings(ECOMMERCE_API_SIGNING_KEY=TEST_API_SIGNING_KEY, ECOMMERCE_API_URL=TEST_API_URL) <NEW_LINE> class EdxRestApiClientTest(TestCase): <NEW_LINE> <INDENT> TEST_USER_EMAIL = 'test@example.com' <NEW_LINE> TEST_CLIENT_ID = 'test-client-id' <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> super(EdxRestApiClient...
Tests to ensure the client is initialized properly.
62598fa43617ad0b5ee06013
class ONOSCLI( OldCLI ): <NEW_LINE> <INDENT> prompt = 'mininet-onos> ' <NEW_LINE> def __init__( self, net, **kwargs ): <NEW_LINE> <INDENT> clusters = [ c.net for c in net.controllers if isONOSCluster( c ) ] <NEW_LINE> net = MininetFacade( net, *clusters ) <NEW_LINE> OldCLI.__init__( self, net, **kwargs ) <NEW_LINE> <DE...
CLI Extensions for ONOS
62598fa410dbd63aa1c70a70
class Http2Server: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.server_cwd = None <NEW_LINE> self.safename = str(self) <NEW_LINE> <DEDENT> def server_cmd(self, args): <NEW_LINE> <INDENT> return ['python test/http2_test/http2_test_server.py'] <NEW_LINE> <DEDENT> def cloud_to_prod_env(self): <NEW_LINE...
Represents the HTTP/2 Interop Test server This pretends to be a language in order to be built and run, but really it isn't.
62598fa4656771135c489541
@request.RequestType.GETNAMEINFO <NEW_LINE> class GetNameInfo(request.UVRequest): <NEW_LINE> <INDENT> __slots__ = ['uv_getnameinfo', 'c_sockaddr', 'callback', 'ip', 'port', 'flags'] <NEW_LINE> uv_request_type = 'uv_getnameinfo_t*' <NEW_LINE> uv_request_init = lib.uv_getnameinfo <NEW_LINE> def __init__(self, ip, port, f...
Request to get name information for specified ip and port. If no callback is provided the request is executed synchronously. :param ip: IP to get name information for :param port: port to get name information for :param flags: flags to configure the behavior of `getnameinfo()` :param callback: callback...
62598fa42c8b7c6e89bd3685
class ID(Enum): <NEW_LINE> <INDENT> VENDOR = 1 <NEW_LINE> PRODUCT = 2 <NEW_LINE> SER_NUM = 3 <NEW_LINE> FW_VAR = 4 <NEW_LINE> DEVICE_VENDOR = 5 <NEW_LINE> DEVICE_NAME = 6
Information ID used for call to identify
62598fa49c8ee823130400cf
class ConditionMultiSignature(ConditionBaseClass): <NEW_LINE> <INDENT> def __init__(self, unlockhashes=None, min_nr_sig=0): <NEW_LINE> <INDENT> self._unlockhashes = [] <NEW_LINE> if unlockhashes: <NEW_LINE> <INDENT> for uh in unlockhashes: <NEW_LINE> <INDENT> self.add_unlockhash(uh) <NEW_LINE> <DEDENT> <DEDENT> self._m...
ConditionMultiSignature class
62598fa4460517430c431fbb
class Validator(base.ValidatorBase): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__spec = None <NEW_LINE> <DEDENT> @property <NEW_LINE> def spec(self): <NEW_LINE> <INDENT> self.__spec = ( "[{0}]".format(__name__), "host = string(default='127.0.0.1')", "port = integer(0, 65535, default=6379)", "db =...
This class store information which is used by validation config file.
62598fa430dc7b766599f70e
class Meta: <NEW_LINE> <INDENT> index = 'authorities-viaf-person-v0.0.1'
Search only on index.
62598fa4e5267d203ee6b7cd
class InvalidFormatError(LFException): <NEW_LINE> <INDENT> pass
For errors that occur for invalid file formats
62598fa4b7558d58954634ef
class PipelineTriggerProperties(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'source_trigger': {'key': 'sourceTrigger', 'type': 'PipelineSourceTriggerProperties'}, } <NEW_LINE> def __init__( self, *, source_trigger: Optional["PipelineSourceTriggerProperties"] = None, **kwargs ): <NEW_LINE> <INDEN...
PipelineTriggerProperties. :ivar source_trigger: The source trigger properties of the pipeline. :vartype source_trigger: ~azure.mgmt.containerregistry.v2021_12_01_preview.models.PipelineSourceTriggerProperties
62598fa4f7d966606f747ea3
class Source(BaseObject): <NEW_LINE> <INDENT> def __init__(self, name, is_cte=False): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.is_cte = is_cte
data object for a data source eg table
62598fa44a966d76dd5eeda2
class Radolan(object): <NEW_LINE> <INDENT> def __init__(self, do_lonlat = True): <NEW_LINE> <INDENT> if do_lonlat: <NEW_LINE> <INDENT> self.lonlat() <NEW_LINE> <DEDENT> <DEDENT> def read(self, name_or_time, rproduct = 'rx_hdcp2'): <NEW_LINE> <INDENT> if rproduct in ['rx', 'rw', 'sf']: <NEW_LINE> <INDENT> self.rawread(n...
Simple class for reading and holding Radolan data and georeference.
62598fa4be8e80087fbbef22
class MSE(Layer): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(MSE, self).__init__(**kwargs) <NEW_LINE> <DEDENT> def build(self, input_shape): <NEW_LINE> <INDENT> super(MSE, self).build(input_shape) <NEW_LINE> <DEDENT> def call(self, x): <NEW_LINE> <INDENT> return K.mean(K.batch_flatten(K...
Keras Layer: mean squared error
62598fa401c39578d7f12c3f
class State: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.cartstate = [0, 0, 0, 0, 0, 0]
The state (position and velocity of a point. cartstate - The Cartesian position and velocity. cs - The coordinate system in which the state is defined.
62598fa4a8370b77170f029a
class GlobalFunctionsTests(BaubleTestCase): <NEW_LINE> <INDENT> def test_combo_cell_data_func(self): <NEW_LINE> <INDENT> import bauble.connmgr <NEW_LINE> wt, at = bauble.connmgr.working_dbtypes, bauble.connmgr.dbtypes <NEW_LINE> bauble.connmgr.working_dbtypes = ['a', 'd'] <NEW_LINE> bauble.connmgr.dbtypes = ['a', 'b', ...
Presenter manages view and model, implements view callbacks.
62598fa4aad79263cf42e695
class SendStatusStatisticsResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.SendStatusStatistics = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("SendStatusStatistics") is not None: <NEW_LINE> <INDENT> ...
SendStatusStatistics response structure.
62598fa4e5267d203ee6b7ce
class Tresor(BaseObj): <NEW_LINE> <INDENT> enregistrer = True <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> BaseObj.__init__(self) <NEW_LINE> self.derniere_stats = datetime.now() <NEW_LINE> self.argent_total = 0 <NEW_LINE> self.argent_joueurs = 0 <NEW_LINE> self.joueur_max = None <NEW_LINE> self.valeur_max = 0 <NE...
Classe représentant les statistiques globales sur le trésor. Ces informations doivent être sauvegardées car ces statistiques sont faites sur une certaine période, définie dans la configuration.
62598fa41f5feb6acb162ae2
class OfferB2g3rdf(Offer): <NEW_LINE> <INDENT> def __init__(self, product): <NEW_LINE> <INDENT> self._product = product <NEW_LINE> <DEDENT> def add_discount(self, cart): <NEW_LINE> <INDENT> product = self._product <NEW_LINE> if product in cart.contents: <NEW_LINE> <INDENT> price = cart._products[product] <NEW_LINE> num...
buy two of product and get the third free
62598fa491f36d47f2230e03
class SimplexTopology(Topology): <NEW_LINE> <INDENT> __slots__ = 'simplices', 'transforms' <NEW_LINE> __cache__ = 'connectivity', 'elements' <NEW_LINE> @types.apply_annotations <NEW_LINE> def __init__(self, simplices:types.frozenarray[types.strictint], transforms:types.tuple[transform.stricttransform]): <NEW_LINE> <IND...
simpex topology
62598fa43317a56b869be4aa
class VideoDefinitionType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): <NEW_LINE> <INDENT> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'VideoDefinitionType') <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('http://ddex.net/xml/20121219/ddex.xsd', 5811, 3) <NEW_LINE> _Documenta...
A ddex:Type of resolution (or definition) in which a ddex:Video is provided.
62598fa4d7e4931a7ef3bf5c
class LoaderNotFoundError(Exception): <NEW_LINE> <INDENT> pass
Session loader is not found.
62598fa432920d7e50bc5f18
class ParsePylintArgsTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> import convertor <NEW_LINE> self.parse_pylint_args = convertor.parse_pylint_args <NEW_LINE> <DEDENT> def test_success(self): <NEW_LINE> <INDENT> args = ["program_name", "--param1=test", "module_name1", "--param2=test2"] <NEW_...
test of convert.parse_pylint_args function
62598fa4460517430c431fbc
class ios_full_admin(RouterVuln): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.router = 'Cisco IOS 11.x/12.x' <NEW_LINE> self.vuln = 'Full Admin' <NEW_LINE> super(ios_full_admin, self).__init__() <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> url = 'http://%s/level/' % (self.ip) <NEW_LINE>...
Exploit a remote admin vulnerability in Cisco IOS 11.x/12.x routers http://www.exploit-db.com/exploits/20975/
62598fa4a79ad16197769f23
class DevelopmentConfig(Config): <NEW_LINE> <INDENT> DEBUG = True <NEW_LINE> @staticmethod <NEW_LINE> def init_app(app): <NEW_LINE> <INDENT> Config.init_app(app) <NEW_LINE> import logging <NEW_LINE> from logging.handlers import RotatingFileHandler <NEW_LINE> handler_debug = logging.handlers.RotatingFileHandler(app.conf...
Development configuration
62598fa43539df3088ecc176
class StudySubject(): <NEW_LINE> <INDENT> def __init__(self, label="", secondaryLabel="", enrollmentDate="", subject=None, events=[]): <NEW_LINE> <INDENT> self._oid = "" <NEW_LINE> self._label = label <NEW_LINE> self._secondaryLabel = secondaryLabel <NEW_LINE> self._enrollmentDate = enrollmentDate <NEW_LINE> self._subj...
Representation of a subject which is enrolled into a Study
62598fa41f037a2d8b9e3fac
class OutputRedirector(object): <NEW_LINE> <INDENT> def __init__(self, fp): <NEW_LINE> <INDENT> self.fp = fp <NEW_LINE> <DEDENT> def write(self, s): <NEW_LINE> <INDENT> self.fp.write(s.decode("utf-8")) <NEW_LINE> <DEDENT> def writelines(self, lines): <NEW_LINE> <INDENT> self.fp.writelines(lines) <NEW_LINE> <DEDENT> def...
Wrapper to redirect stdout or stderr
62598fa4627d3e7fe0e06d6e
class TaskFailedError(Exception): <NEW_LINE> <INDENT> def __init__(self, message, task_id): <NEW_LINE> <INDENT> super().__init__(message) <NEW_LINE> self.task_id = task_id
Indicates that a task finished with a result other than "success".
62598fa4d486a94d0ba2be8f
class SInt32Be(SimpleType): <NEW_LINE> <INDENT> def __init__(self, value = 0, conditional = lambda:True, optional = False, constant = False): <NEW_LINE> <INDENT> SimpleType.__init__(self, ">I", 4, True, value, conditional = conditional, optional = optional, constant = constant)
@summary: signed int with Big endian representation in stream
62598fa4ac7a0e7691f723cd
class DashboardView(View): <NEW_LINE> <INDENT> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> if request.user in User.objects.filter(is_superuser=True): <NEW_LINE> <INDENT> scripts = UserScript.objects.all() <NEW_LINE> superuser = True <NEW_LINE> <DEDENT> elif not request.user.is_anonymous: <NEW_LINE> <IN...
Информация для дашборда пользователя.
62598fa457b8e32f5250807c
class TwitpicOptionsModel(OptionsModelFolder): <NEW_LINE> <INDENT> terra_type = "Model/Options/Folder/Image/Fullscreen/Submenu/Twitpic" <NEW_LINE> title = "Upload in TwitPic" <NEW_LINE> def __init__(self, parent=None): <NEW_LINE> <INDENT> OptionsModelFolder.__init__(self, parent) <NEW_LINE> self.parent_model = parent <...
Options model for twitpic
62598fa497e22403b383adce
class Null(ColumnElement): <NEW_LINE> <INDENT> __visit_name__ = 'null' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.type = type_api.NULLTYPE <NEW_LINE> <DEDENT> def compare(self, other): <NEW_LINE> <INDENT> return isinstance(other, Null)
Represent the NULL keyword in a SQL statement.
62598fa4236d856c2adc939c
class Version(Resource): <NEW_LINE> <INDENT> def __init__(self, options, session, raw=None): <NEW_LINE> <INDENT> Resource.__init__(self, 'version/{0}', options, session) <NEW_LINE> if raw: <NEW_LINE> <INDENT> self._parse_raw(raw) <NEW_LINE> <DEDENT> <DEDENT> def delete(self, moveFixIssuesTo=None, moveAffectedIssuesTo=N...
A version of a project.
62598fa4e64d504609df931a
class Teacher(Person): <NEW_LINE> <INDENT> def __init__(self, name, papers): <NEW_LINE> <INDENT> Person.__init__(self, name) <NEW_LINE> self.papers = papers <NEW_LINE> <DEDENT> def get_details(self): <NEW_LINE> <INDENT> return "%s teaches %s" % (self.name, ','.join(self.papers))
Returns a '''Teacher''' object, takes a list of strings (list of papers) as argument.
62598fa42ae34c7f260aafa3
class ItemPrice(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.UnitPrice = None <NEW_LINE> self.ChargeUnit = None <NEW_LINE> self.OriginalPrice = None <NEW_LINE> self.DiscountPrice = None <NEW_LINE> self.Discount = None <NEW_LINE> self.UnitPriceDiscount = None <NEW_LINE> self.UnitPrice...
描述了单项的价格信息
62598fa45fdd1c0f98e5de5a
class NoseTestSuiteRunner(BasicNoseRunner): <NEW_LINE> <INDENT> def _get_models_for_connection(self, connection): <NEW_LINE> <INDENT> tables = connection.introspection.get_table_list(connection.cursor()) <NEW_LINE> return [m for m in apps.get_models() if m._meta.db_table in tables] <NEW_LINE> <DEDENT> def setup_databas...
A runner that optionally skips DB creation Monkeypatches connection.creation to let you skip creating databases if they already exist. Your tests will start up much faster. To opt into this behavior, set the environment variable ``REUSE_DB`` to something that isn't "0" or "false" (case insensitive).
62598fa4d58c6744b42dc235
class Money(quantity.Quantity): <NEW_LINE> <INDENT> resource_name = "Money" <NEW_LINE> def __init__(self, jsondict=None): <NEW_LINE> <INDENT> super(Money, self).__init__(jsondict)
An amount of money. With regard to precision, see [[X]]. There SHALL be a code if there is a value and it SHALL be an expression of currency. If system is present, it SHALL be ISO 4217 (system = "urn:std:iso:4217" - currency).
62598fa4a8370b77170f029d
class DefaultConfig: <NEW_LINE> <INDENT> PORT = 3978 <NEW_LINE> APP_ID = '14aaf862-3aae-4aac-9d63-46908c22237f' <NEW_LINE> APP_PASSWORD = client.get_secret('bot-password').value <NEW_LINE> CONNECTION_NAME = 'github-auth-conn' <NEW_LINE> TRUST_TOKEN = client.get_secret('Trust-Token-ProactiveMessages').value <NEW_LINE> F...
Bot Configuration
62598fa47d847024c075c288
class VerifiedHTTPSConnection(six.moves.http_client.HTTPSConnection): <NEW_LINE> <INDENT> def connect(self): <NEW_LINE> <INDENT> self.connection_kwargs = {} <NEW_LINE> if hasattr(self, 'timeout'): <NEW_LINE> <INDENT> self.connection_kwargs.update(timeout = self.timeout) <NEW_LINE> <DEDENT> if hasattr(self, 'source_addr...
A connection that wraps connections with ssl certificate verification. https://github.com/pypa/pip/blob/d0fa66ecc03ab20b7411b35f7c7b423f31f77761/pip/download.py#L72
62598fa40c0af96317c56245
class BatchSizeScheduler(MTCallback): <NEW_LINE> <INDENT> def __init__(self, scheduler: Callable, **data_loader_kwargs): <NEW_LINE> <INDENT> super(BatchSizeScheduler, self).__init__() <NEW_LINE> self.event = Event.ON_EPOCH_BEGIN <NEW_LINE> self.scheduler = scheduler <NEW_LINE> self.data_loader_kwargs = data_loader_kwar...
This callback reinstantiates a DataLoader object at the beginning of each epoch based on the batch size scheduling function provided by the user. The scheduling function signature is: def scheduler(batch_size, epoch, loss) where 'loss' is the loss of the last processed batch in the previous epoch. The scheduling fu...
62598fa476e4537e8c3ef46f
class BarsInPeriodProvider(object): <NEW_LINE> <INDENT> def __init__(self, ticker: typing.Union[list, str], interval_len: int, interval_type: str, bgn_prd: datetime.datetime, delta: relativedelta, overlap: relativedelta = None, bgn_flt: datetime.time = None, end_flt: datetime.time = None, ascend: bool = True, max_ticks...
Generate a sequence of BarsInPeriod filters to obtain market history
62598fa43539df3088ecc177
class TreeNode(): <NEW_LINE> <INDENT> def __init__(self, parent = None, children = None, label = None): <NEW_LINE> <INDENT> if children is None: <NEW_LINE> <INDENT> children = [] <NEW_LINE> <DEDENT> self.parent = parent <NEW_LINE> self.children = children <NEW_LINE> self.label = label <NEW_LINE> self.number_of_descenda...
A class to represent each node in the trees used by :func:`_realizer` and :func:`_compute_coordinates` when finding a planar geometric embedding in the grid. Each tree node is doubly linked to its parent and children. INPUT: - ``parent`` -- the parent TreeNode of ``self`` - ``children`` -- a list of TreeNode childre...
62598fa48da39b475be030a4
class Control(object): <NEW_LINE> <INDENT> SP = u" " <NEW_LINE> NUL = u"\u0000" <NEW_LINE> BEL = u"\u0007" <NEW_LINE> BS = u"\u0008" <NEW_LINE> HT = u"\u0009" <NEW_LINE> LF = u"\n" <NEW_LINE> VT = u"\u000b" <NEW_LINE> FF = u"\u000c" <NEW_LINE> CR = u"\r" <NEW_LINE> SO = u"\u000e" <NEW_LINE> SI = u"\u000f" <NEW_LINE> CA...
pyte.control ~~~~~~~~~~~~ This module defines simple control sequences, recognized by :class:`~pyte.streams.Stream`, the set of codes here is for ``TERM=linux`` which is a superset of VT102. :copyright: (c) 2011-2013 by Selectel, see AUTHORS for details. :license: LGPL, see LICENSE for more details.
62598fa43317a56b869be4ab
class FooClass: <NEW_LINE> <INDENT> pass
Class documentation
62598fa432920d7e50bc5f1a
class CommentSortMenu(SortMenu): <NEW_LINE> <INDENT> default = 'confidence' <NEW_LINE> options = ('confidence', 'top', 'new', 'hot', 'controversial', 'old', 'random') <NEW_LINE> hidden_options = ('random',) <NEW_LINE> use_post = True
Sort menu for comments pages
62598fa4d6c5a102081e200a
class SelectorCV(ModelSelector): <NEW_LINE> <INDENT> def select(self): <NEW_LINE> <INDENT> warnings.filterwarnings("ignore", category=DeprecationWarning) <NEW_LINE> max_avg = 0 <NEW_LINE> n_opt = self.n_constant <NEW_LINE> split_method = KFold() <NEW_LINE> try: <NEW_LINE> <INDENT> for n in range(self.min_n_components, ...
select best model based on average log Likelihood of cross-validation folds
62598fa4d7e4931a7ef3bf5f
class HasRawPredictionCol(Params): <NEW_LINE> <INDENT> rawPredictionCol: "Param[str]" = Param( Params._dummy(), "rawPredictionCol", "raw prediction (a.k.a. confidence) column name.", typeConverter=TypeConverters.toString, ) <NEW_LINE> def __init__(self) -> None: <NEW_LINE> <INDENT> super(HasRawPredictionCol, self).__in...
Mixin for param rawPredictionCol: raw prediction (a.k.a. confidence) column name.
62598fa445492302aabfc394
class Provider(object): <NEW_LINE> <INDENT> DUMMY = 0 <NEW_LINE> CLOUDFILES_US = 1 <NEW_LINE> CLOUDFILES_UK = 2
Defines for each of the supported providers @cvar DUMMY: Example provider @cvar CLOUDFILES_US: CloudFiles US @cvar CLOUDFILES_UK: CloudFiles UK
62598fa4be8e80087fbbef26
class AugRandomScale(DataAugmenter): <NEW_LINE> <INDENT> def __init__(self, dimensionality, num_synth, random_seed, factor_start, factor_end): <NEW_LINE> <INDENT> super(AugRandomScale, self).__init__(dimensionality, num_synth, random_seed) <NEW_LINE> self.factor_start = factor_start <NEW_LINE> self.factor_end = factor_...
Performs random scaling on a sample with the specified factors
62598fa4d53ae8145f918350
class AsyncMirrorGroupSyncProgressListTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_async_mirror_group_sync_progress_list(self): <NEW_LINE> <INDENT> async_mirror_group_sync_progress_list_obj = AsyncMirrorGroupSyncProgressList() <NEW_LINE> self.assertNotEqual(async_mirror_group_sync_progress_list_obj, None)
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fa43cc13d1c6d465630
class AsyncFile(BaseSocket): <NEW_LINE> <INDENT> def __init__(self, file, mode='r', *args, **kwargs): <NEW_LINE> <INDENT> self.file = open(file, mode=mode, *args, **kwargs) <NEW_LINE> <DEDENT> @coroutine <NEW_LINE> @wraps(io.BytesIO.read) <NEW_LINE> def read(self, *args, **kwargs): <NEW_LINE> <INDENT> return threadwork...
A wrapped file object with all methods run in a threadpool
62598fa466673b3332c3028c
class js_function(object): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.__name = name <NEW_LINE> <DEDENT> def __call__(self, *args): <NEW_LINE> <INDENT> return _js_call(self.__name, [], args, called=True) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.__name
A JS function that can be "called" from python and and added to a widget by widget.add_call() so it get's called every time the widget is rendered. Used to create a callable object that can be called from your widgets to trigger actions in the browser. It's used primarily to initialize JS code programatically. Calls c...
62598fa42ae34c7f260aafa6
class MantelTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.inst = Mantel() <NEW_LINE> self.mantel_results_str1 = mantel_results_str1.split('\n') <NEW_LINE> <DEDENT> def test_parse(self): <NEW_LINE> <INDENT> obs = self.inst.parse(self.mantel_results_str1) <NEW_LINE> self.assertFloatEqual(...
Tests for the Mantel class.
62598fa48e71fb1e983bb976
class PigGameModel(object): <NEW_LINE> <INDENT> def __init__(self, numPlayers, scoreCap=50): <NEW_LINE> <INDENT> self._players = list() <NEW_LINE> self._scoreCap = scoreCap <NEW_LINE> self._currentPlayerTurn = None <NEW_LINE> self._currentPlayerAction = PlayerActions(0) <NEW_LINE> self._gameOver = False <NEW_LINE> self...
PigGameModel represents the model component of the MVC. It contains all data and methods related to the game's logic. Ideally, implements a coroutine function to give up control to its caller (the controller), without loosing its state.
62598fa4498bea3a75a579e7
class TestSupportFunctions(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> patch('commonpy.logger.Logger.logger').start() <NEW_LINE> patch('commonpy.parameters.SysParams.params', new_callable=PropertyMock).start() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> patch.stopall() <...
Test basic operation of the assorted functions
62598fa57b25080760ed736f
class Spm99AnalyzeHeader(SpmAnalyzeHeader): <NEW_LINE> <INDENT> def get_origin_affine(self): <NEW_LINE> <INDENT> hdr = self._header_data <NEW_LINE> zooms = hdr['pixdim'][1:4].copy() <NEW_LINE> if self.default_x_flip: <NEW_LINE> <INDENT> zooms[0] *= -1 <NEW_LINE> <DEDENT> origin = hdr['origin'][:3] <NEW_LINE> dims = hdr...
Adds origin functionality to base SPM header
62598fa563d6d428bbee2676
class SetCurrentProxy(TraceItem): <NEW_LINE> <INDENT> def __init__(self, selmodel, proxy, command): <NEW_LINE> <INDENT> TraceItem.__init__(self) <NEW_LINE> if proxy and proxy.IsA("vtkSMOutputPort"): <NEW_LINE> <INDENT> proxy = sm._getPyProxy(proxy.GetSourceProxy()) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> proxy = ...
Traces change in active view/source etc.
62598fa591f36d47f2230e05
class ForesporselSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Foresporsel <NEW_LINE> fields = ['id', 'kalasSender', 'kalasReciver', 'message']
serializer som tar inn attributtene fra Foresporsel modellen, brukt i PostForesporsel viewet
62598fa576e4537e8c3ef471
class SearchForm(forms.Form): <NEW_LINE> <INDENT> q = forms.CharField(label=_('Query')) <NEW_LINE> search = forms.ChoiceField( label=_('Search type'), required=False, choices=( ('ftx', _('Fulltext')), ('exact', _('Exact match')), ('substring', _('Substring')), ), initial=False ) <NEW_LINE> src = forms.BooleanField( lab...
Text searching form.
62598fa5b7558d58954634f4
@implementer_only(IPatDatePickerWidget) <NEW_LINE> class DateCheckboxWidget(Widget): <NEW_LINE> <INDENT> def extract(self, default=NO_VALUE): <NEW_LINE> <INDENT> value = self.request.get(self.name, default) <NEW_LINE> if ( value == default or not value or not isinstance(value, basestring) ): <NEW_LINE> <INDENT> return ...
Stores the date when a checkbox was checked :rtype datetime:
62598fa58e7ae83300ee8f66
class ActiveStateModel(mixins.ActiveStateMixin, models.Model): <NEW_LINE> <INDENT> pass
Test-only model to test ActiveStateMixin.
62598fa530bbd722464698da
class AgentError(AgentXInterfaceError): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs)
Exception throwable by the Agent class.
62598fa599cbb53fe6830d9a
class Performative: <NEW_LINE> <INDENT> REQUEST = "REQUEST" <NEW_LINE> AGREE = "AGREE" <NEW_LINE> REFUSE = "REFUSE" <NEW_LINE> FAILURE = "FAILURE" <NEW_LINE> INFORM = "INFORM" <NEW_LINE> CONFIRM = "CONFIRM" <NEW_LINE> DISCONFIRM = "DISCONFIRM" <NEW_LINE> QUERY_IF = "QUERY_IF" <NEW_LINE> NOT_UNDERSTOOD = "NOT_UNDERSTOOD...
An action represented by a message. The performative actions are a subset of the FIPA ACL recommendations for interagent communication.
62598fa532920d7e50bc5f1c
class OG_096: <NEW_LINE> <INDENT> play = CTHUN_CHECK & Heal(FRIENDLY_HERO, 10)
Twilight Darkmender
62598fa59c8ee823130400d2
class FilteringTools: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def full_cleaning(text): <NEW_LINE> <INDENT> text = FilteringTools.remove_simple_smileys(text) <NEW_LINE> text = FilteringTools.remove_emoji(text) <NEW_LINE> text = FilteringTools.remove_links(text) <NEW_LINE> return text <NEW_LINE> <DEDENT> @staticmeth...
This class contains methods to help clean texts from smileys, links, emojis...
62598fa54f6381625f199420
class InlineResponse20026(object): <NEW_LINE> <INDENT> swagger_types = { 'duration_bin': 'str', 'games_played': 'int', 'wins': 'int' } <NEW_LINE> attribute_map = { 'duration_bin': 'duration_bin', 'games_played': 'games_played', 'wins': 'wins' } <NEW_LINE> def __init__(self, duration_bin=None, games_played=None, wins=No...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fa57047854f4633f29e
class WebLinkType(models.Model): <NEW_LINE> <INDENT> id=models.AutoField(primary_key=True) <NEW_LINE> name=models.CharField(_("Name"), max_length=128) <NEW_LINE> note=models.CharField(_("Note"), max_length=255, blank=True, null=True) <NEW_LINE> base_url=models.URLField(_("Base URL"), blank=True, null=True) <NEW_LINE> d...
Social Media Connections
62598fa5097d151d1a2c0eec
class Honeypy(IPlugin): <NEW_LINE> <INDENT> __test_list = [TELNETTest] <NEW_LINE> @staticmethod <NEW_LINE> def get_test_list(): <NEW_LINE> <INDENT> return Honeypy.__test_list <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def get_port_list(): <NEW_LINE> <INDENT> port_list = set() <NEW_LINE> for i in Honeypy.__test_list: ...
List of tests
62598fa5f548e778e596b469
class ServiceDeployedEvent(object): <NEW_LINE> <INDENT> swagger_types = { 'events': 'list[BreTriggerResource]', 'resources': 'list[ResourceTypeDescription]', 'service_name': 'str', 'swagger_url': 'str' } <NEW_LINE> attribute_map = { 'events': 'events', 'resources': 'resources', 'service_name': 'service_name', 'swagger_...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fa544b2445a339b68d1
class IDesignerLoaderHost(IDesignerHost,IServiceContainer,IServiceProvider): <NEW_LINE> <INDENT> def EndLoad(self,baseClassName,successful,errorCollection): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def Reload(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __init__(self,*args): <NEW_LINE> <INDENT> pass
Provides an interface that can extend a designer host to support loading from a serialized state.
62598fa55f7d997b871f9343
class EchoLogAnalyzer(FoamLogAnalyzer): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> FoamLogAnalyzer.__init__(self,progress=False) <NEW_LINE> self.addAnalyzer("Echo",EchoLineAnalyzer())
Trivial analyzer. It echos the Log-File
62598fa563d6d428bbee2677
class PeriodicJobHeartBeat(webapp2.RequestHandler): <NEW_LINE> <INDENT> logger = logger.Logger() <NEW_LINE> def get(self): <NEW_LINE> <INDENT> self.logger.Clear() <NEW_LINE> job_query = model.JobModel.query( model.JobModel.status == Status.JOB_STATUS_DICT["leased"] ) <NEW_LINE> jobs = job_query.fetch() <NEW_LINE> lost_...
Main class for /tasks/job_heartbeat. Used to find lost jobs and change their status properly. Attributes: logger: Logger class
62598fa585dfad0860cbf9d7
class TestProject(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.settings = ProjectSettings() <NEW_LINE> <DEDENT> def test_update(self): <NEW_LINE> <INDENT> self.settings.update(settings_dict) <NEW_LINE> assert self.settings.get_env_settings('definitions') == settings_dict['definitions_dir'][0...
test things related to the Project class
62598fa58a43f66fc4bf2042
class SaslAuthenticatorTests(AuthenticationTests): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> if PROTOCOL_VERSION < 2: <NEW_LINE> <INDENT> raise unittest.SkipTest('Sasl authentication not available for protocol v1') <NEW_LINE> <DEDENT> if SASLClient is None: <NEW_LINE> <INDENT> raise unittest.SkipTest('pu...
Test SaslAuthProvider as PlainText
62598fa52ae34c7f260aafa7