code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class KonkePowerStripUSB(SwitchDevice): <NEW_LINE> <INDENT> def __init__(self, powerstrip: KonkePowerStrip, name: str, index: int): <NEW_LINE> <INDENT> self._powerstrip = powerstrip <NEW_LINE> self._index = index <NEW_LINE> self._name = name <NEW_LINE> <DEDENT> @property <NEW_LINE> def should_poll(self) -> bool: <NEW_L...
Outlet in Konke Power Strip.
62598f6f63f4b57ef0085978
class Accra(DstTzInfo): <NEW_LINE> <INDENT> zone = 'Africa/Accra' <NEW_LINE> _utc_transition_times = [ d(1,1,1,0,0,0), d(1918,1,1,0,0,52), d(1936,9,1,0,0,0), d(1936,12,30,23,40,0), d(1937,9,1,0,0,0), d(1937,12,30,23,40,0), d(1938,9,1,0,0,0), d(1938,12,30,23,40,0), d(1939,9,1,0,0,0), d(1939,12,30,23,40,0), d(1940,9,1,0,...
Africa/Accra timezone definition. See datetime.tzinfo for details
62598f6fbe8e80087fbbe871
class FieldSizeError(ValueError): <NEW_LINE> <INDENT> def __init__(self, field, index, size): <NEW_LINE> <INDENT> message = ( f"{field.__class__.__name__}: Inappropriate field size value " f"'{size}' at index ({index.byte}, {index.bit})") <NEW_LINE> super().__init__(message)
Raised if an inappropriate bit size value is assigned to a field class.
62598f6f15baa7234946179c
class GUI(Tk): <NEW_LINE> <INDENT> def __init__(self, queue): <NEW_LINE> <INDENT> Tk.__init__(self) <NEW_LINE> self.queue = queue <NEW_LINE> self.is_game_over = False <NEW_LINE> self.canvas = Canvas(self, width=495, height=305, bg='#000000') <NEW_LINE> self.canvas.pack() <NEW_LINE> self.snake = self.canvas.create_line(...
class GUI use to create the gui
62598f6f30c21e258be98015
class Command(object): <NEW_LINE> <INDENT> STOP = 'stop' <NEW_LINE> NEXT = 'next' <NEW_LINE> PLAY = 'play' <NEW_LINE> PAUSE = 'pause' <NEW_LINE> RESUME = 'resume' <NEW_LINE> SHUFFLE = 'shuffle' <NEW_LINE> SHUTDOWN = 'shutdown' <NEW_LINE> SHUTDOWN_ALIASES = ['exit', 'logout', 'quit', 'shutdown'] <NEW_LINE> CLEAR = 'clea...
Contain known commands and make their use clear and unambiguous.
62598f6f1d351010ab8f3353
class HTMLDelegate(QStyledItemDelegate): <NEW_LINE> <INDENT> def paint(self, painter, option, index): <NEW_LINE> <INDENT> options = QStyleOptionViewItem(option) <NEW_LINE> item = index.data(Qt.UserRole) <NEW_LINE> if isinstance(item, (CommentItem, ChangeItem)): <NEW_LINE> <INDENT> options.decorationAlignment = Qt.Align...
http://stackoverflow.com/a/5443112
62598f6f6fece00bbaccb19d
class RCL(SCPINode, SCPISet): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> _cmd = "*RCL" <NEW_LINE> args = ["1"]
*RCL Arguments: 1
62598f6f76d4e153a661c425
class Benefit(models.Model): <NEW_LINE> <INDENT> declaration = models.ForeignKey("Declaration", on_delete=models.CASCADE, related_name='benefits') <NEW_LINE> date = MyCharField(_('ideje')) <NEW_LINE> name = MyCharField(_('megnevezése')) <NEW_LINE> value = AmountField(_('értéke')) <NEW_LINE> currency = MyCharField(_('pé...
Juttatás
62598f6f66656f66f7d59c04
class StopContainerGroupResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Result = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Result = params.get("Result") <NEW_LINE> self.RequestId = params.get("RequestId")
StopContainerGroup返回参数结构体
62598f6f73bcbd0ca4bc9a60
class FamilyInstancePlacingArgs(object,IDisposable): <NEW_LINE> <INDENT> def Dispose(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def ReleaseUnmanagedResources(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __enter__(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __exit__(self,*args...
The class is used to access necessary data during the placement of a FamilyInstance.
62598f6f0383005118f6cf17
class StopServer(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "development.stop_server" <NEW_LINE> bl_label = "Stop Server" <NEW_LINE> bl_description = "Stops a collaboration server" <NEW_LINE> def invoke(self,context, event): <NEW_LINE> <INDENT> return self.execute(context) <NEW_LINE> <DEDENT> def execute(self...
stops a collaboration server
62598f7026238365f5fac38a
class Encoder(BaseJSONEncoder): <NEW_LINE> <INDENT> def default(self, obj): <NEW_LINE> <INDENT> if isinstance(obj, UUID): <NEW_LINE> <INDENT> return str(obj) <NEW_LINE> <DEDENT> elif isinstance(obj, ObjectId): <NEW_LINE> <INDENT> return str(obj) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> return super(Encoder, self)....
JSONEconder subclass used by the json render function. This is different from BaseJSONEoncoder since it also addresses encoding of UUID and ObjectId
62598f7091af0d3eaad3961f
class NormalND: <NEW_LINE> <INDENT> def __init__(self, mean, sigma): <NEW_LINE> <INDENT> self.mean=numpy.array(mean) <NEW_LINE> self.sigma=numpy.array(sigma) <NEW_LINE> self.sigma2=numpy.array( [s**2 for s in sigma] ) <NEW_LINE> self.ivar=1.0/self.sigma2 <NEW_LINE> self.ndim=self.mean.size <NEW_LINE> <DEDENT> def get_m...
Currently no covariance
62598f70287bf620b62713cb
class ModelingContext(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.template = None <NEW_LINE> self.instance = None <NEW_LINE> self.node_id_format = '{template}_{id}' <NEW_LINE> self.id_type = IdType.UNIVERSAL_RANDOM <NEW_LINE> self.id_max_length = ID_MAX_LENGTH <NEW_LINE> self.inputs = Stri...
Modeling context. :ivar template: generated service template :vartype template: aria.modeling.models.ServiceTemplate :ivar instance: generated service instance :vartype instance: aria.modeling.models.Service :ivar node_id_format: format for node instance IDs :vartype node_id_format: basestring :ivar id_type: type of I...
62598f7050485f2cf55da784
class ShortcutSetError(Exception): <NEW_LINE> <INDENT> pass
Raised if code attempts to set shortcuts on an immutable object.
62598f7007d97122c42164b5
class SbpyException(Exception): <NEW_LINE> <INDENT> pass
Exception base class for all sbpy exceptions.
62598f701d351010ab8f3355
class SkyDriveLogErrorFormatter(interface.ConditionalEventFormatter): <NEW_LINE> <INDENT> DATA_TYPE = 'skydrive:error:line' <NEW_LINE> FORMAT_STRING_PIECES = [ u'[{module}', u'{source_code}]', u'{text}', u'({detail})'] <NEW_LINE> FORMAT_STRING_SHORT_PIECES = [u'{text}'] <NEW_LINE> SOURCE_LONG = 'SkyDrive Error Log File...
Formatter for a SkyDrive error log file event.
62598f70dc8b845886d52dc8
class kiss_to_pdu(gr.sync_block): <NEW_LINE> <INDENT> def __init__(self, control_byte=True): <NEW_LINE> <INDENT> gr.sync_block.__init__( self, name='kiss_to_pdu', in_sig=[numpy.uint8], out_sig=[]) <NEW_LINE> self.pdu = list() <NEW_LINE> self.transpose = False <NEW_LINE> self.control_byte = control_byte <NEW_LINE> self....
docstring for block kiss_to_pdu
62598f70925a0f43d25e7852
class DDDQNLoss(LossFunction): <NEW_LINE> <INDENT> def call(self, samples, q_net, target_q_net, config): <NEW_LINE> <INDENT> x, a, r, x_, t, n = samples["s"], samples["a"], samples["r"], samples["s_"], samples["t"], samples["n"] <NEW_LINE> a_ = tf.argmax(q_net(x_)["A"], axis=-1, output_type=tf.int32) <NEW_LINE> target_...
The DDDQN loss function (expected (over some batch) dueling/double-Q/n-step TD learning loss): L = E[(TDtarget(s') - Q(s,a))²] Where: E = expectation over a prioritized(!) memory batch. Prioritization according to previous abs(TD-error) terms. TDtarget(s') = r0 + γr1 + γ²*r2 + ... + γ^n Qt(s', argmax a' Q(s',...
62598f708c3a8732951f5d65
class UpdateRequestForm(NewsletterForm): <NEW_LINE> <INDENT> email_field = forms.EmailField( label=_("e-mail"), validators=[validate_email_nouser] ) <NEW_LINE> class Meta(NewsletterForm.Meta): <NEW_LINE> <INDENT> fields = ('email_field',) <NEW_LINE> <DEDENT> def clean(self): <NEW_LINE> <INDENT> if not self.instance.sub...
Request updating or activating subscription. Will result in an activation email being sent.
62598f70287bf620b62713cc
class TestChanPlanRegOp(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 testChanPlanRegOp(self): <NEW_LINE> <INDENT> pass
ChanPlanRegOp unit test stubs
62598f704e696a045264da08
class Record(object): <NEW_LINE> <INDENT> __metaclass__ = abc.ABCMeta <NEW_LINE> __getitem__ = abc.abstractmethod(lambda *args, **kwargs: NotImplemented) <NEW_LINE> @classmethod <NEW_LINE> def __subclasshook__(cls, subclass): <NEW_LINE> <INDENT> if cls is Record: <NEW_LINE> <INDENT> if _meets(subclass, cls) and not isi...
Root ABC for all record-types. Record types generalizes Sequence and Mapping, representing item-containing objects. @todo Add Mixins
62598f706fece00bbaccb1a0
class DelimitedCharField(forms.CharField): <NEW_LINE> <INDENT> def __init__(self, seperator=', ', trim=True, **kwargs): <NEW_LINE> <INDENT> self.widget = ListTextInput(seperator) <NEW_LINE> self.delimiter = seperator <NEW_LINE> self.trim = trim <NEW_LINE> super(DelimitedCharField, self).__init__(**kwargs) <NEW_LINE> <D...
Field that takes a list as input, produces a joined string TextInput and returns a list
62598f70ec188e330fdf80b8
class Cloud(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'cloud' <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> name = db.Column(db.String, nullable=False) <NEW_LINE> description = db.Column(db.String, nullable=False) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.name
A group of machines connected in a cloud.
62598f708c3a8732951f5d66
class CondizioniPagamentoType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): <NEW_LINE> <INDENT> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'CondizioniPagamentoType') <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('https://www.fatturapa.gov.it/export/documenti/fatturapa/v1.2.1...
An atomic simple type.
62598f70167d2b6e312b6794
class MailComposeMessage(osv.TransientModel): <NEW_LINE> <INDENT> _inherit = 'mail.compose.message' <NEW_LINE> _columns = { 'mass_mailing_campaign_id': fields.many2one( 'mail.mass_mailing.campaign', 'Mass Mailing Campaign', ), 'mass_mailing_id': fields.many2one( 'mail.mass_mailing', 'Mass Mailing' ), 'mass_mailing_name...
Add concept of mass mailing campaign to the mail.compose.message wizard
62598f7007d97122c42164b7
class Shortcut(): <NEW_LINE> <INDENT> def __init__(self, name=None, creator=None, content=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.creator = creator <NEW_LINE> self.content = content <NEW_LINE> <DEDENT> async def get_creator_name(self, context): <NEW_LINE> <INDENT> member = context.message.guild.get_...
The Shortcut class.
62598f7076d4e153a661c429
class Guide(models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=128) <NEW_LINE> slug = models.SlugField() <NEW_LINE> wiki_page = models.CharField(max_length=128) <NEW_LINE> authors = models.CharField(max_length=128) <NEW_LINE> description = models.TextField() <NEW_LINE> listed = models.BooleanField(d...
A full guide written by a contributor
62598f70dc8b845886d52dca
class CheckServiceRunning: <NEW_LINE> <INDENT> manager = AbstractServiceManager <NEW_LINE> service_name = "" <NEW_LINE> sudo = True <NEW_LINE> status_class = AbstractStatus <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.service = self.manager(self.service_name, sudo=self.sudo) <NEW_LINE> self.service.start() <NEW...
Test a running service
62598f704d74a7450cd58ae5
class QExposeEvent(__PyQt5_QtCore.QEvent): <NEW_LINE> <INDENT> def region(self): <NEW_LINE> <INDENT> return QRegion <NEW_LINE> <DEDENT> def __init__(self, *__args): <NEW_LINE> <INDENT> pass
QExposeEvent(QRegion) QExposeEvent(QExposeEvent)
62598f70d99f1b3c44d04ecd
class t_netstream(object): <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> base = _swig_property(_ollyapi2.t_netstream_base_get, _ollyapi2.t_netstream_base_set) <NEW_LINE> size = _swig_property(_ollya...
Proxy of C t_netstream struct
62598f70b57a9660fecd12a5
class GPath(pathlib.PurePosixPath): <NEW_LINE> <INDENT> def open(self, *args, **kwargs): <NEW_LINE> <INDENT> return tf.io.gfile.GFile(self, *args, **kwargs) <NEW_LINE> <DEDENT> def exists(self): <NEW_LINE> <INDENT> return tf.io.gfile.exists(self) <NEW_LINE> <DEDENT> def mkdir(self, mode=0o777, parents=False, exist_ok=F...
A thin wrapper around PurePath to support various filesystems.
62598f7073bcbd0ca4bc9a64
class BaselineTermForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = BaselineTerm <NEW_LINE> fields = ('name', 'org', 'start_date', 'end_date', 'baseline_poll', 'baseline_question', 'follow_up_poll', 'follow_up_question', 'y_axis_title') <NEW_LINE> widgets = { 'start_date': forms.widgets...
Form for Baseline Term
62598f705e10d32532ce34f8
class SwitchChekpoint13To24(SwitchCheckpointTestCase): <NEW_LINE> <INDENT> def __init__(self, methodName): <NEW_LINE> <INDENT> super(SwitchChekpoint13To24,self).__init__(methodName) <NEW_LINE> <DEDENT> def test_switch_checkpoint_13_24(self): <NEW_LINE> <INDENT> cluster_state = self.test_data[1][0] <NEW_LINE> fault_type...
Testing state of transactions with faults on master after crash-recovery @gucs gp_create_table_random_default_distribution=off
62598f706fece00bbaccb1a2
@relationships.root <NEW_LINE> class LinearApproximationSetup(relationships.QuestionPart): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.num_lines, self.num_marks = 0, 0 <NEW_LINE> self._qp, self._qi = {}, {} <NEW_LINE> self._qp['equation'] = random.choice([x ** sympy.Rational(1, random.randint(2, 3)...
Question description ==================== Choose a function and a point to perform linear approximation on.
62598f7015fb5d323ce7e53f
class Package: <NEW_LINE> <INDENT> def __init__(self, priority=None, size=None, address=None): <NEW_LINE> <INDENT> self.priority = priority <NEW_LINE> self.size = package_size.numericSize(package_size.get_size()) <NEW_LINE> self.address = address <NEW_LINE> self.arrival_date = None <NEW_LINE> self.delivery_date = None ...
Object to represent a package
62598f7016aa5153ce3ffd16
class ImageGrayScaleViewerLogic(ScriptedLoadableModuleLogic): <NEW_LINE> <INDENT> def hasImageData(self,volumeNode): <NEW_LINE> <INDENT> if not volumeNode: <NEW_LINE> <INDENT> logging.debug('hasImageData failed: no volume node') <NEW_LINE> return False <NEW_LINE> <DEDENT> if volumeNode.GetImageData() == None: <NEW_LINE...
This class should implement all the actual computation done by your module. The interface should be such that other python code can import this class and make use of the functionality without requiring an instance of the Widget. Uses ScriptedLoadableModuleLogic base class, available at: https://github.com/Slicer/Slice...
62598f70d53ae8145f917cb0
class MyBot(BlitzBot): <NEW_LINE> <INDENT> def make_move(self): <NEW_LINE> <INDENT> if not logic.basic_detect_five(self.board, self.gem_keys, self.swap): <NEW_LINE> <INDENT> if not logic.basic_detect_four(self.board, self.gem_keys, self.swap): <NEW_LINE> <INDENT> logic.basic_detect_three(self.board, self.gem_keys, self...
A custom class based on BlitzBot
62598f70a8ecb03325870a20
class IterateMe_2(object): <NEW_LINE> <INDENT> def __init__(self, start, stop, step = 1): <NEW_LINE> <INDENT> self.current = start - step <NEW_LINE> self.start = self.current <NEW_LINE> self.stop = stop <NEW_LINE> self.step = step <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDEN...
New Iterator class which mimics the functionality of range allows to set start, stop and step of an iteration
62598f70d4950a0f3b110a44
class Status(Enum): <NEW_LINE> <INDENT> DRAFT: int = 0 <NEW_LINE> PUBLISHED: int = 1
Valid status values for lessons in the Mavenseed API.
62598f70d10714528d69d6e9
class OpenStackClientRegistry(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.token_timestamp = 0 <NEW_LINE> self.session_timestamp = 0 <NEW_LINE> auth_uri = os.environ.get(OS_AUTH_URL) <NEW_LINE> keystone_ver = '2' <NEW_LINE> if auth_uri.lower().replace('/', '').endswith('v3'): <NEW_LINE> <IN...
Manages openstack connection details and clients.
62598f705e10d32532ce34f9
class IfExp: <NEW_LINE> <INDENT> def __init__(self, condExp, thenExp, elseExp): <NEW_LINE> <INDENT> self.condExp = condExp <NEW_LINE> self.thenExp = thenExp <NEW_LINE> self.elseExp = elseExp <NEW_LINE> <DEDENT> def map(self, f, skip=True): <NEW_LINE> <INDENT> if not skip: <NEW_LINE> <INDENT> f(self) <NEW_LINE> <DEDENT>...
An if expression. All three parameters can be any Scheme expression.
62598f706aa9bd52df0d46ef
class NLTestFail(Exception): <NEW_LINE> <INDENT> pass
Used to indicate test failure
62598f7015fb5d323ce7e541
class Action51(Action): <NEW_LINE> <INDENT> def execute(self, instance): <NEW_LINE> <INDENT> raise NotImplementedError('%s not implemented' % ( self.__class__.__name__))
Aliases->By Char->Set Clipping Height... Parameters: 0: Enter Alias (EXPRESSION, ExpressionParameter) 1: Enter Char (ASCII value) (EXPRESSION, ExpressionParameter) 2: Enter Clipping Height (EXPRESSION, ExpressionParameter)
62598f70d53ae8145f917cb2
class Controller(): <NEW_LINE> <INDENT> def __init__(self, _interface, _engine): <NEW_LINE> <INDENT> if type(self) is Controller: <NEW_LINE> <INDENT> raise TypeError("Controller should not be instantiated") <NEW_LINE> <DEDENT> self.interface = _interface <NEW_LINE> self.engine = _engine <NEW_LINE> <DEDENT> def run(self...
Abstract class/interface for controller implementations for Arch_Lab. A controller should implement all of these to be usable. Attributes: interface - Interface descendant. engine - Engine descendand instance.
62598f706e29344779affe79
class MeView(RetrieveUpdateDestroyAPIView): <NEW_LINE> <INDENT> queryset = User.objects.all() <NEW_LINE> serializer_class = UserSerializer <NEW_LINE> permission_classes = [IsAuthenticated] <NEW_LINE> def get_object(self): <NEW_LINE> <INDENT> return self.request.user
Get, Update and Delete logged in user
62598f7021bff66bcd72247b
class ConstantTerminal(Terminal): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> assert isinstance(value, numbers.Number) or isinstance(value, bool), 'The value of a constant terminal can only be a number or a bool variable.' <NEW_LINE> super().__init__(repr(value), value)
Class that represents a constant terminal, whose value will never change during the whole evolution. The value of a constant terminal can only be a literal variable , such as a numeric number or a Boolean variable.
62598f706fece00bbaccb1a5
class DatabaseName(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.DatabaseName = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.DatabaseName = params.get("DatabaseName")
数据库表名
62598f7076d4e153a661c42d
class ProjectChangesFeed(TranslationChangesFeed): <NEW_LINE> <INDENT> def get_object(self, request, project): <NEW_LINE> <INDENT> return get_project(request, project) <NEW_LINE> <DEDENT> def items(self, obj): <NEW_LINE> <INDENT> return Change.objects.filter( translation__subproject__project=obj ).order_by('-timestamp')...
RSS feed for changes in project.
62598f70925a0f43d25e7858
class Operations: <NEW_LINE> <INDENT> models = _models <NEW_LINE> def __init__(self, client, config, serializer, deserializer) -> None: <NEW_LINE> <INDENT> self._client = client <NEW_LINE> self._serialize = serializer <NEW_LINE> self._deserialize = deserializer <NEW_LINE> self._config = config <NEW_LINE> <DEDENT> def l...
Operations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. :type models: ~azure.mgmt.eventhub.v2015_08_01.models :param client...
62598f70d18da76e235b6d44
class ProviderWebsitesView(StaffuserRequiredMixin, ListView): <NEW_LINE> <INDENT> model = ProviderWebsites
Program Types List Page View
62598f7066656f66f7d59c0c
class OFPFlowRemoved(MsgBase): <NEW_LINE> <INDENT> version = ofproto.OFP_VERSION <NEW_LINE> msg_type = ofproto.OFPT_FLOW_REMOVED <NEW_LINE> def __init__(self, cookie=None, priority=None, reason=None, table_id=None, duration_sec=None, duration_nsec=None, idle_timeout=None, hard_timeout=None, packet_count=None, byte_coun...
Flow removed message When flow entries time out or are deleted, the switch notifies controller with this message. ================ ====================================================== Attribute Description ================ ====================================================== cookie Opaque control...
62598f70b57a9660fecd12a9
class UserViewSet(ModelViewSet): <NEW_LINE> <INDENT> perms_map = ({'*': 'admin'}, {'*': 'user_all'}, {'get': 'user_list'}, {'post': 'user_create'}, {'put': 'user_edit'}, {'delete': 'user_delete'}) <NEW_LINE> queryset = UserProfile.objects.all() <NEW_LINE> serializer_class = UserListSerializer <NEW_LINE> pagination_clas...
用户管理:增删改查
62598f70fb3f5b602db47dbe
class Concat(BinaryOp): <NEW_LINE> <INDENT> def __init__(self, left: Expression, right: Expression, **kwargs): <NEW_LINE> <INDENT> super().__init__("Concat", left, right, **kwargs)
Concat expression. Attributes: left (`Expression`): Left expression. right (`Expression`): Right expression.
62598f70796e427e5384dfb1
class Mage(Belligérant): <NEW_LINE> <INDENT> def __init__ ( self, un_nom): <NEW_LINE> <INDENT> super().__init__(un_nom) <NEW_LINE> self._mana = Dé.lancer(20) + Dé.lancer(20) <NEW_LINE> self._sorts = [] <NEW_LINE> <DEDENT> @property <NEW_LINE> def mana ( self ) : <NEW_LINE> <INDENT> return self._mana <NEW_LINE> <DEDENT>...
Un belligérant de type mage capable de jeter des sorts. Propriétés : _mana : int, La quantité d'énergie magique que possède le Mage. _sorts : list, Liste des sorts que possède le Mage.
62598f704e696a045264da0b
class ExternalizableInstanceDict(object): <NEW_LINE> <INDENT> _update_accepts_type_attrs = _ExternalizableInstanceDict._update_accepts_type_attrs <NEW_LINE> __external_use_minimal_base__ = _ExternalizableInstanceDict.__external_use_minimal_base__ <NEW_LINE> _excluded_out_ivars_ = AbstractDynamicObjectIO._excluded_out_i...
Externalizes to a dictionary containing the members of ``__dict__`` that do not start with an underscore. Meant to be used as a super class; also can be used as an external object superclass. Consider carefully before using this class. Generally, an interface and `InterfaceObjectIO` are better. .. versionchanged:: 1...
62598f7016aa5153ce3ffd19
class TestSignal2SignalConnect(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.sender = QObject() <NEW_LINE> self.forwarder = QObject() <NEW_LINE> self.args = None <NEW_LINE> self.called = False <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> del se...
Test case for signal to signal connections
62598f706e29344779affe7b
class Waiter(object): <NEW_LINE> <INDENT> __slots__ = ['greenlet'] <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.greenlet = None <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> if self.waiting: <NEW_LINE> <INDENT> waiting = ' waiting' <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> waiting = '' <NEW...
A low level synchronization class. Wrapper around greenlet's ``switch()`` and ``throw()`` calls that makes them safe: * switching will occur only if the waiting greenlet is executing :meth:`wait` method currently. Otherwise, :meth:`switch` and :meth:`throw` are no-ops. * any error raised in the greenlet is handled ...
62598f701d351010ab8f335d
class ImportModuleObjectManipulation(ObjectManipulation): <NEW_LINE> <INDENT> def __new__(cls, *args, **kwargs): <NEW_LINE> <INDENT> cls.__name__ = 'IMPORT-MODULE' <NEW_LINE> return object.__new__(cls) <NEW_LINE> <DEDENT> def __call__(self, forms, var_env, func_env, macro_env): <NEW_LINE> <INDENT> while forms is not Nu...
Assigns modules to variables like setq special operator.
62598f708e05c05ec3f6ea54
class FrameTypeStats(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._count = 0 <NEW_LINE> self._response_times = [] <NEW_LINE> self._break_times = [] <NEW_LINE> self._mark_times = [] <NEW_LINE> self._data_times = [] <NEW_LINE> <DEDENT> def RecordFrame(self, frame): <NEW_LINE> <INDENT> self._c...
Holds timing stats for a particular class of response.
62598f70cad5886f8bdc4b40
class LoadExamplesTests(SynchronousTestCase): <NEW_LINE> <INDENT> def test_loaded(self): <NEW_LINE> <INDENT> foo = {u"id": u"foo", u"foo_value": True} <NEW_LINE> bar = {u"id": u"bar", u"bar_value": False} <NEW_LINE> path = FilePath(self.mktemp()) <NEW_LINE> path.setContent(safe_dump([foo, bar])) <NEW_LINE> examples = _...
Tests for L{_loadExamples}.
62598f706fece00bbaccb1a8
class Handler(handler.handler): <NEW_LINE> <INDENT> def dispatch(self, session): <NEW_LINE> <INDENT> req_body = self.context.request.body <NEW_LINE> resp_body = self.context.response.body <NEW_LINE> goods_id = req_body.goodsId <NEW_LINE> goods_info = session.query(WechatshopGoodsGallery).filter(WechatshopGoodsGallery.g...
商品详细信息
62598f707c178a314d78ccc3
class MoveSequence(object): <NEW_LINE> <INDENT> def __init__(self, moves): <NEW_LINE> <INDENT> self._moves = moves <NEW_LINE> <DEDENT> def get_move(self, i): <NEW_LINE> <INDENT> if not (0 <= i < self.length): <NEW_LINE> <INDENT> IllegalMoveError(Exception) <NEW_LINE> <DEDENT> return self._moves[i] <NEW_LINE> <DEDENT> d...
Sequence of moves in TOAH game
62598f708c3a8732951f5d6e
class HttpLog(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'http_log' <NEW_LINE> id = db.Column(db.Integer, primary_key = True) <NEW_LINE> date = db.Column(db.DateTime(timezone = True), index = True) <NEW_LINE> ip = db.Column(db.CHAR(15)) <NEW_LINE> referrer = db.Column(db.String(255)) <NE...
Any HTTP Requests that result in a 404
62598f70287bf620b62713d5
@unique <NEW_LINE> class ProtocolType(Enum): <NEW_LINE> <INDENT> HTTP = "http" <NEW_LINE> HTTPS = "https" <NEW_LINE> SSH = "ssh"
Type of the git protocol used
62598f7030dc7b766599f07e
class AlphaBetaPlayer(IsolationPlayer): <NEW_LINE> <INDENT> def get_move(self, game, time_left): <NEW_LINE> <INDENT> self.time_left = time_left <NEW_LINE> legal_moves = game.get_legal_moves() <NEW_LINE> if legal_moves: <NEW_LINE> <INDENT> best_move = legal_moves[0] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> best_mov...
Game-playing agent that chooses a move using iterative deepening minimax search with alpha-beta pruning. You must finish and test this player to make sure it returns a good move before the search time limit expires.
62598f7076d4e153a661c430
class DataDisks(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'disk_size_in_gb': {'required': True}, 'disk_count': {'required': True}, 'storage_account_type': {'required': True}, } <NEW_LINE> _attribute_map = { 'disk_size_in_gb': {'key': 'diskSizeInGB', 'type': 'int'}, 'caching_type': {'key': 'cachin...
Data disks settings. All required parameters must be populated in order to send to Azure. :param disk_size_in_gb: Required. Disk size in GB for the blank data disks. :type disk_size_in_gb: int :param caching_type: Caching type for the disks. Available values are none (default), readonly, readwrite. Caching type can ...
62598f705166f23b2e242bfb
class YErrorBars: <NEW_LINE> <INDENT> defaults = {"stroke-width": "0.25pt", } <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return "<YErrorBars (%d nodes)>" % len(self.d) <NEW_LINE> <DEDENT> def __init__(self, d=[], **attr): <NEW_LINE> <INDENT> self.d = list(d) <NEW_LINE> self.attr = dict(self.defaults) <NEW_LINE>...
Draws y error bars at a set of points. This is usually used before (under) a set of Dots at the same points. YErrorBars(d, attribute=value) d required list of (x,y,yerr...) points attribute=value pairs keyword list SVG attributes If points in d have * 3 elements, the third is t...
62598f70be8e80087fbbe87e
class RandomTranslateWithReflect: <NEW_LINE> <INDENT> def __init__(self, max_translation): <NEW_LINE> <INDENT> self.max_translation = max_translation <NEW_LINE> <DEDENT> def __call__(self, old_image): <NEW_LINE> <INDENT> xtranslation, ytranslation = np.random.randint(-self.max_translation, self.max_translation + 1, siz...
Translate image randomly Translate vertically and horizontally by n pixels where n is integer drawn uniformly independently for each axis from [-max_translation, max_translation]. Fill the uncovered blank area with reflect padding.
62598f706fece00bbaccb1aa
class array(nla_base_string): <NEW_LINE> <INDENT> __slots__ = ("_fmt",) <NEW_LINE> own_parent = True <NEW_LINE> @property <NEW_LINE> def fmt(self): <NEW_LINE> <INDENT> if getattr(self, "_fmt", None) is not None: <NEW_LINE> <INDENT> return self._fmt <NEW_LINE> <DEDENT> try: <NEW_LINE> <INDENT> fclass = getattr(self.pare...
Array of simple data type
62598f7056b00c62f0fb20d7
class Parser(object): <NEW_LINE> <INDENT> regx = re.compile( r'{\s*"([^"]+)"\s*,\s*(?:required_argument|no_argument)\s*,\s*\w+\s*,\s*\'(\w)\'\s*}') <NEW_LINE> def __init__(self, path=os.getcwd()): <NEW_LINE> <INDENT> self._path = path <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def _extract_options(source_file): <NEW_...
Parses C files for long option style option blocks
62598f701f5feb6acb162459
class ValidateUserGroupTest(TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpTestData(cls): <NEW_LINE> <INDENT> cls.group_r = Group.objects.create(name='Rilevatore') <NEW_LINE> cls.group_v = Group.objects.create(name='Validatore') <NEW_LINE> cls.user = User.objects.create_user(username='user', password='...
Testa i metodi validate_punto_rilevatore e validate_punto_validatore
62598f707b25080760ed6cbe
class File: <NEW_LINE> <INDENT> MAZE_GRID = [] <NEW_LINE> MAZE_WALL = [] <NEW_LINE> MAZE_GROUND = [] <NEW_LINE> MAZE_POSSIBLE_ITEM = [] <NEW_LINE> INIT_CHARACTER_COLUMN = 0 <NEW_LINE> INIT_CHARACTER_LINE = 0 <NEW_LINE> INIT_CHARACTER_X = 0 <NEW_LINE> INIT_CHARACTER_Y = 0 <NEW_LINE> GUARD_X = 0 <NEW_LINE> GUARD_Y = 0 <N...
" "Read" the maze file and stock every data the script might use later
62598f703eb6a72ae0389e63
class ConllEntry: <NEW_LINE> <INDENT> def __init__(self, form, tasks, xpos=None, upos=None, chunk=None, multi_word = None, supersense=None, negation_scope=None, speculation_scope=None, sentiment=None): <NEW_LINE> <INDENT> self.form = form <NEW_LINE> self.tasks = tasks <NEW_LINE> self.norm = normalize(form) <NEW_LINE> s...
Class representing an entry, i.e. word and its annotations in CoNLL
62598f708a43f66fc4bf199f
class ODEOrderError(ValueError): <NEW_LINE> <INDENT> pass
Raised by linear_ode_to_matrix if the system has the wrong order
62598f70ac7a0e7691f71d38
class HungryAnt(Ant): <NEW_LINE> <INDENT> name = 'Hungry' <NEW_LINE> implemented = False <NEW_LINE> time_to_digest = 3 <NEW_LINE> food_cost = 4 <NEW_LINE> armor = 1 <NEW_LINE> def __init__(self, digesting=0): <NEW_LINE> <INDENT> self.digesting = digesting <NEW_LINE> <DEDENT> def eat_bee(self, bee): <NEW_LINE> <INDENT> ...
HungryAnt will take three turns to digest a Bee in its place. While digesting, the HungryAnt can't eat another Bee.
62598f7030c21e258be98025
class MonitoringDataListener(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def monitoring_data(self, data): <NEW_LINE> <INDENT> raise NotImplementedError("Abstract method needs to be overridden")
Monitoring listener interface parent class for Monitoring data listeners
62598f701f5feb6acb16245b
class SchedulerDriverModuleTestCase(test.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(SchedulerDriverModuleTestCase, self).setUp() <NEW_LINE> self.context = context.RequestContext('fake_user', 'fake_project') <NEW_LINE> <DEDENT> def test_volume_host_update_db(self): <NEW_LINE> <INDENT> self...
Test case for scheduler driver module methods.
62598f7026238365f5fac398
class EquipmentSystemIOController(ManagedObject): <NEW_LINE> <INDENT> consts = EquipmentSystemIOControllerConsts() <NEW_LINE> naming_props = set([u'id']) <NEW_LINE> mo_meta = { "modular": MoMeta("EquipmentSystemIOController", "equipmentSystemIOController", "slot-[id]", VersionMeta.Version2013e, "InputOutput", 0x1f, [],...
This is EquipmentSystemIOController class.
62598f7073bcbd0ca4bc9a6f
class RK(BaseRecordHandler): <NEW_LINE> <INDENT> def parseBytes (self): <NEW_LINE> <INDENT> row = globals.getSignedInt(self.bytes[0:2]) <NEW_LINE> col = globals.getSignedInt(self.bytes[2:4]) <NEW_LINE> xf = globals.getSignedInt(self.bytes[4:6]) <NEW_LINE> rkval = globals.getSignedInt(self.bytes[6:10]) <NEW_LINE> multi...
Cell with encoded integer or floating-point value
62598f70711fe17d825dff08
class PlaceRetrieveTest(TestCase): <NEW_LINE> <INDENT> base_url = '/api/place/' <NEW_LINE> def test_non_existing_id(self): <NEW_LINE> <INDENT> client = APIClient() <NEW_LINE> retrieve_result = client.get('{0}{1}/'.format(self.base_url, 1)) <NEW_LINE> self.assertTrue('detail' in retrieve_result.data)
Tests multiple scenarios for the GET implementation at /api/place/id/
62598f7050485f2cf55da793
class BlogCategoryListView(ListAPIView): <NEW_LINE> <INDENT> serializer_class = BlogCategorySerializer <NEW_LINE> queryset = BlogCategory.objects.all()
A view that permits a GET to allow listing of all blog categories
62598f70d164cc6175820799
class MyTestPlGiDialogTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_icon_png(self): <NEW_LINE> <INDENT> path = ':/plugins/MyTestPlGi/icon.png' <NEW_LINE> icon = QIcon(path) <NEW_LINE> s...
Test rerources work.
62598f703eb6a72ae0389e65
class NothingToDoError(PipAcceleratorError): <NEW_LINE> <INDENT> pass
Raised by :py:func:`~pip_accel.PipAccelerator.get_pip_requirement_set()` when pip doesn't report an error but also doesn't generate a requirement set (this happens when the user specifies an empty requirements file).
62598f70c432627299fa27fa
class Action12(Action): <NEW_LINE> <INDENT> def execute(self, instance): <NEW_LINE> <INDENT> raise NotImplementedError('%s not implemented' % ( str(self)))
&Hand cursor->Set hand cursor over an object OFF Parameters: 0: Please choose the object (OBJECT, Object)
62598f700383005118f6cf27
class SlimRNNCell(RNNCell): <NEW_LINE> <INDENT> def __init__(self, cell_fn): <NEW_LINE> <INDENT> if not callable(cell_fn): <NEW_LINE> <INDENT> raise TypeError("cell_fn %s needs to be callable", cell_fn) <NEW_LINE> <DEDENT> self._cell_fn = cell_fn <NEW_LINE> self._cell_name = cell_fn.func.__name__ <NEW_LINE> _, init_sta...
A simple wrapper for slim.rnn_cells.
62598f7073bcbd0ca4bc9a70
class Exploit(object): <NEW_LINE> <INDENT> headers = { "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537." "36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36" } <NEW_LINE> def get_path(self, host): <NEW_LINE> <INDENT> test_paths = ["/public/index.php?s=captcha", "/index.php?s=captch...
ref: https://xz.aliyun.com/t/3845
62598f7026238365f5fac39a
class String(Raw): <NEW_LINE> <INDENT> def format(self, value): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return text_type(value) <NEW_LINE> <DEDENT> except ValueError as ve: <NEW_LINE> <INDENT> raise MarshallingError(ve)
A string field.
62598f7021bff66bcd722485
class Device: <NEW_LINE> <INDENT> def __init__(self, rm, visaName): <NEW_LINE> <INDENT> self.visaName = visaName <NEW_LINE> self.rm = rm <NEW_LINE> <DEDENT> def close(self): <NEW_LINE> <INDENT> self.rm.close_instrument(self.visaName) <NEW_LINE> <DEDENT> def write(self, cmd): <NEW_LINE> <INDENT> print(self.visaName + ':...
Class whose instance is created when resource manager is asked for a new instrument. This class can be used as a base for subclasses emulating individual device type emulators.
62598f70167d2b6e312b67a2
class PushArgumentConverter(FromAppLevelConverter): <NEW_LINE> <INDENT> def __init__(self, space, argchain, w_func): <NEW_LINE> <INDENT> FromAppLevelConverter.__init__(self, space) <NEW_LINE> self.argchain = argchain <NEW_LINE> self.w_func = w_func <NEW_LINE> <DEDENT> def handle_signed(self, w_ffitype, w_obj, intval): ...
A converter used by W_FuncPtr to unwrap the app-level objects into low-level types and push them to the argchain.
62598f70d10714528d69d6f3
class AndorError(RuntimeError): <NEW_LINE> <INDENT> pass
Generic Andor camera error.
62598f70925a0f43d25e7862
class TriloBytes: <NEW_LINE> <INDENT> def __init__(self, initializer=(), drop=b'?'): <NEW_LINE> <INDENT> self._drop = drop <NEW_LINE> self._contents = tuple(initializer) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def fromhex(cls, string): <NEW_LINE> <INDENT> return cls(bytes.fromhex(string)) <NEW_LINE> <DEDENT> def __...
Three-level byte array (0, 1, Missing). This allows you to represent on-wire transactions with holes in the middle, due to eg. dropped packets. >>> tb = TriloBytes(b'hi') >>> bytes(tb) b'hi' >>> bytes(tb[:40]) b'hi' >>> tb = TriloBytes(b'hi') + [None] * 3 >>> bytes(tb) b'hi???' >>> bytes(tb[:40]) b'hi???' >>> bytes(...
62598f708e05c05ec3f6ea58
class LoadBalancerListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'next_link': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[LoadBalancer]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, value: Optional[List["L...
Response for ListLoadBalancers API service call. Variables are only populated by the server, and will be ignored when sending a request. :param value: A list of load balancers in a resource group. :type value: list[~azure.mgmt.network.v2019_04_01.models.LoadBalancer] :ivar next_link: The URL to get the next set of re...
62598f70d18da76e235b6d49
class MarketOrderList(object): <NEW_LINE> <INDENT> list_type = "orders" <NEW_LINE> def __init__(self, upload_keys=None, order_generator=None, *args, **kwargs): <NEW_LINE> <INDENT> self._orders = {} <NEW_LINE> self.upload_keys = upload_keys or [] <NEW_LINE> if not isinstance(self.upload_keys, list): <NEW_LINE> <INDENT> ...
A list of MarketOrder objects, with some added features for assisting with serializing to the Unified Uploader Data Interchange format. :attr list_type: This may be used in your logic to separate orders from history.
62598f70796e427e5384dfbb
class LinkFunctions(Base): <NEW_LINE> <INDENT> __tablename__ = 'link_function' <NEW_LINE> id = Column('id', INTEGER, primary_key=True) <NEW_LINE> owner_name = Column('owner_name', TEXT, nullable=True) <NEW_LINE> id_function = Column('id_function', INTEGER, ForeignKey('functions.id')) <NEW_LINE> def __init__(self, owner...
This table show relation A(id_local_type) <-> B(id_function) Sample: struct _mon_block_fld { void set_position(...); } relation _mon_block_fld <-> set_position
62598f704e696a045264da10
class Seldon_KFold(BaseEstimator): <NEW_LINE> <INDENT> def __init__(self,clf=None,k=5): <NEW_LINE> <INDENT> self.clf = clf <NEW_LINE> self.k = k <NEW_LINE> self.scores = [] <NEW_LINE> <DEDENT> def get_scores(self): <NEW_LINE> <INDENT> return self.scores <NEW_LINE> <DEDENT> def get_score(self): <NEW_LINE> <INDENT> if le...
Simple wrapper to provide cross validation test using estimator with input from pandas dataframe Parameters ---------- clf : object Pandas compatible scikit learn Estimator to apply to data splits k : int, optional number of folds
62598f70ac7a0e7691f71d3c
class GH_NaturalStringComparer(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Compare(s1, s2): <NEW_LINE> <INDENT> pass
GH_NaturalStringComparer()
62598f7063f4b57ef0085982
class TrieNode(object): <NEW_LINE> <INDENT> def __init__(self, parent=None, name=None): <NEW_LINE> <INDENT> self._parent = parent <NEW_LINE> self._name = name <NEW_LINE> self._children = {} <NEW_LINE> self._is_terminal = False <NEW_LINE> if (not self._parent) != (not self._name): <NEW_LINE> <INDENT> raise ValueError("M...
TrieNode: a simple node class that can be used to represent a trie. Each node in a trie of TrieNodes is assigned a string name, except for the root node which has no name. TrieNode can be used to represent all of the hostname-parts in the public suffix list (where each node contains a hostname-part, e.g. 'com' or 'co'...
62598f7030c21e258be98029
class cache(object): <NEW_LINE> <INDENT> def __init__(self, func): <NEW_LINE> <INDENT> self.func = func <NEW_LINE> self.cached = {} <NEW_LINE> <DEDENT> def __call__(self, *args, **kwargs): <NEW_LINE> <INDENT> arg_map = get_arg_map(self.func, *args, **kwargs) <NEW_LINE> key = yaml.dump(arg_map) <NEW_LINE> if not key in ...
Simple decorator for caching/memoizing function results. The function wil only be re-evaluated when there are unqiue function arguments, otherwise a copy of the function results will be returned. *** Note: this only works for functions with simple, non-mutable, arguments. So if any of the args are pandas objects this...
62598f7056b00c62f0fb20dd
class ProfileSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> username = serializers.ReadOnlyField(source='get_username') <NEW_LINE> image_url = serializers.ReadOnlyField(source='get_cloudinary_url') <NEW_LINE> following = serializers.SerializerMethodField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model ...
serializers for user profile upon user registration.
62598f705e10d32532ce34ff