code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class ProgressBar(object): <NEW_LINE> <INDENT> def __init__(self, task_num=0, bar_width=50, start=True, file=sys.stdout): <NEW_LINE> <INDENT> self.task_num = task_num <NEW_LINE> max_bar_width = self._get_max_bar_width() <NEW_LINE> self.bar_width = ( bar_width if bar_width <= max_bar_width else max_bar_width) <NEW_LINE>... | A progress bar which can print the progress | 62598fc6ff9c53063f51a954 |
class StatelessServiceSpec(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.placement = PlacementSpec() <NEW_LINE> self.name = "" <NEW_LINE> self.count = 1 <NEW_LINE> self.extended = {} | Details of stateless service creation.
This is *not* supposed to contain all the configuration
of the services: it's just supposed to be enough information to
execute the binaries. | 62598fc626068e7796d4cc64 |
class abstractModel(QtGui.QFrame): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> QtGui.QFrame.__init__(self) <NEW_LINE> self.setupUi() <NEW_LINE> <DEDENT> def setupUi(self): <NEW_LINE> <INDENT> QtCore.QObject.connect(self.bAdd, QtCore.SIGNAL("clicked()"), self.ladd) <NEW_LINE> QtCore.QObject.connect(self.... | Base class for the tabs, does most of the work | 62598fc67047854f4633f6db |
class PhysicalExpansionFilter(DirectFilter): <NEW_LINE> <INDENT> types = ('PhysicalCard',) <NEW_LINE> def __init__(self, sExpansion): <NEW_LINE> <INDENT> if sExpansion is not None: <NEW_LINE> <INDENT> self._iId = IExpansion(sExpansion).id <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self._iId = None <NEW_LINE> <DEDENT... | Filter PhysicalCard based on the PhysicalCard expansion | 62598fc63617ad0b5ee06450 |
class MultFactory(OperationFactory): <NEW_LINE> <INDENT> def create_operation(self): <NEW_LINE> <INDENT> return OperationMult() | Factory for OperationMult. | 62598fc6099cdd3c63675566 |
class Form0(QWidget, Ui_Form): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> super(Form0, self).__init__(parent) <NEW_LINE> self.setupUi(self) <NEW_LINE> self.cam = cv2.VideoCapture(0) <NEW_LINE> self.image = QtGui.QImage(0, 0, QtGui.QImage.Format_RGB888) <NEW_LINE> self.timer = QtCore.QTim... | Class documentation goes here. | 62598fc6656771135c489978 |
class ChatMember(Result): <NEW_LINE> <INDENT> def __init__(self, user, status): <NEW_LINE> <INDENT> super(ChatMember, self).__init__() <NEW_LINE> assert(user is not None) <NEW_LINE> assert(isinstance(user, User)) <NEW_LINE> self.user = user <NEW_LINE> assert(status is not None) <NEW_LINE> assert(isinstance(status, str)... | This object contains information about one member of the chat.
https://core.telegram.org/bots/api#chatmember | 62598fc67b180e01f3e491d4 |
class CreateDistanceEvaluator(object): <NEW_LINE> <INDENT> def __init__(self, data, distance_calculator): <NEW_LINE> <INDENT> self._data = data <NEW_LINE> self._distances = distance_calculator <NEW_LINE> <DEDENT> def distance_evaluator(self, from_node, to_node): <NEW_LINE> <INDENT> from_node_str = str(self._data.locati... | Creates callback to return distance between points. | 62598fc6aad79263cf42eade |
class Planet(): <NEW_LINE> <INDENT> def __init__(self,root): <NEW_LINE> <INDENT> self.Uranium=0 <NEW_LINE> self.Titanium=0 <NEW_LINE> self.Hydrocarbons=0 <NEW_LINE> self.Water=0 <NEW_LINE> self.Silicon=0 <NEW_LINE> self.Inhabitable=0 <NEW_LINE> self.Size=random.randint(1,1000) <NEW_LINE> self.Dilithium=0 <NEW_LINE> sel... | Planet represents a single planet member of a solar system. | 62598fc6091ae35668704f33 |
class seqtune(TestCase): <NEW_LINE> <INDENT> _multiprocess_can_split_ = True <NEW_LINE> name = "mp_seqtune" <NEW_LINE> description = "mp_seqtune tool tests" <NEW_LINE> cmd = [os.path.join(BASEPATH, "targets", "generic", "tools", "mp_seqtune.py")] <NEW_LINE> target = os.path.join(BASEPATH, "targets") <NEW_LINE> trials =... | seqtune Test Class. | 62598fc6cc40096d6161a35d |
class Onlinelog(object): <NEW_LINE> <INDENT> def select(self): <NEW_LINE> <INDENT> sql = """select * from v$logfile""" <NEW_LINE> results = Oracle().select(sql) <NEW_LINE> return results <NEW_LINE> <DEDENT> def create(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def drop(self): <NEW_LINE> <INDENT> pass <NEW_LINE... | docstring for Onlinelogs | 62598fc67b180e01f3e491d5 |
class Event(db.Model): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> title = db.Column(db.String(35), index=True) <NEW_LINE> description = db.Column(db.String(256), index=True) <NEW_LINE> date = db.Column(db.String(256), index=True) <NEW_LINE> startTime = db.Column(db.String(256), index=Tr... | This model contains information that is needed to create an event.
All of the variables for this class are listed below. | 62598fc6283ffb24f3cf3b90 |
class BitAndOpExpr(BinaryOpExpr): <NEW_LINE> <INDENT> def is_bit_and_op(self): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return '{} & {}'.format(self.lhs, self.rhs) | A bit-and operator (``&``). | 62598fc6bf627c535bcb17b3 |
class KML(object): <NEW_LINE> <INDENT> _features = [] <NEW_LINE> ns = None <NEW_LINE> def __init__(self, ns=None): <NEW_LINE> <INDENT> self._features = [] <NEW_LINE> if ns is None: <NEW_LINE> <INDENT> self.ns = config.NS <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.ns = ns <NEW_LINE> <DEDENT> <DEDENT> def from_st... | represents a KML File | 62598fc64a966d76dd5ef1e0 |
class SmartCrop(object): <NEW_LINE> <INDENT> def __init__(self, width=None, height=None): <NEW_LINE> <INDENT> self.width = width <NEW_LINE> self.height = height <NEW_LINE> <DEDENT> def compare_entropy(self, start_slice, end_slice, slice, difference): <NEW_LINE> <INDENT> start_entropy = histogram_entropy(start_slice) <N... | Crop an image 'smartly' -- based on smart crop implementation from easy-thumbnails:
https://github.com/SmileyChris/easy-thumbnails/blob/master/easy_thumbnails/processors.py#L193
Smart cropping whittles away the parts of the image with the least entropy. | 62598fc6f548e778e596b8a8 |
class itkNumericTraitsVD1(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> __swig_destroy__ = _itkNumericTraitsPython.delete_itkNumericTraitsVD1 <NEW_LINE> def __init__(self, *args): <NEW_LINE... | Proxy of C++ itkNumericTraitsVD1 class | 62598fc65fdd1c0f98e5e29a |
class two_level_weight_vector_generator_TestCase(unittest.TestCase): <NEW_LINE> <INDENT> def test1(self): <NEW_LINE> <INDENT> self.assertTrue(len(two_level_weight_vector_generator([3, 2], 8)) == 156) <NEW_LINE> <DEDENT> def test2(self): <NEW_LINE> <INDENT> self.assertTrue(len(two_level_weight_vector_generator([3, 2], 1... | Tests for `primes.py`. | 62598fc6ec188e330fdf8ba0 |
class RootItem(BaseItem): <NEW_LINE> <INDENT> def __init__(self, include_revision_types=False): <NEW_LINE> <INDENT> super(RootItem, self).__init__() <NEW_LINE> self.obj = None <NEW_LINE> self.children = [ContainerMetaItem(self)] <NEW_LINE> if include_revision_types: <NEW_LINE> <INDENT> self.children.append(RevisionMeta... | The root of the Shotgun entity tree | 62598fc6be7bc26dc9251fe1 |
class GroupViewSet(mixins.ListModelMixin, mixins.RetrieveModelMixin, GenericViewSet): <NEW_LINE> <INDENT> queryset = Group.objects.all() <NEW_LINE> serializer_class = serializers.GroupSerializer <NEW_LINE> def list(self, request, *args, **kwargs): <NEW_LINE> <INDENT> ret = OrderedDict() <NEW_LINE> for each in Group.obj... | Group view set. | 62598fc60fa83653e46f51f2 |
class History(models.Model): <NEW_LINE> <INDENT> task = models.ForeignKey(Task) <NEW_LINE> acknowledge_date = models.DateTimeField(default=timezone.now) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> month = self.acknowledge_date.month <NEW_LINE> if month < 10: <NEW_LINE> <INDENT> month = '0{}'.format(month) <NEW_LI... | Task Acknowledge History | 62598fc6167d2b6e312b7283 |
class MakeSetupCommand(Command): <NEW_LINE> <INDENT> def handle(self): <NEW_LINE> <INDENT> poet = self.poet <NEW_LINE> builder = Builder() <NEW_LINE> setup = builder._setup(poet) <NEW_LINE> builder._write_setup(setup, os.path.join(os.path.dirname(self.poet_file), 'setup.py')) | Renders a setup.py for testing purposes.
make:setup | 62598fc666673b3332c306e2 |
class IncorrectEndpointException(Exception): <NEW_LINE> <INDENT> pass | Raise exception on wrong or No endpoint provided | 62598fc6dc8b845886d538c8 |
class Gradient: <NEW_LINE> <INDENT> def __init__(self, uid, type_, stops=None): <NEW_LINE> <INDENT> self.uid = uid <NEW_LINE> self.type = type_ <NEW_LINE> self.stops = stops if stops is not None else [] <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return str.format("Gradient(uid={}, type={} stops={})", r... | Represents a gradient.
===Attributes===
uid - The unique id of this Gradient.
type - The type of this Gradient.
stops - The list of stops in this Gradient.
===Operations=== | 62598fc65fcc89381b2662d3 |
class MinimaxAgent(RandomAgent): <NEW_LINE> <INDENT> def __init__(self, evaluate_function, alpha_beta_pruning=False, max_depth=5): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.evaluate = evaluate_function <NEW_LINE> self.alpha_beta_pruning = alpha_beta_pruning <NEW_LINE> self.max_depth = max_depth <NEW_LINE> ... | An agent that makes decisions using the Minimax algorithm, using a
evaluation function to approximately guess how good certain states
are when looking far into the future.
:param evaluation_function: The function used to make evaluate a
GameState. Should have the parameters (state, player_id) where
`state` is ... | 62598fc6099cdd3c63675568 |
class NetworkInterfaceDnsSettings(Model): <NEW_LINE> <INDENT> _attribute_map = { 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, 'applied_dns_servers': {'key': 'appliedDnsServers', 'type': '[str]'}, 'internal_dns_name_label': {'key': 'internalDnsNameLabel', 'type': 'str'}, 'internal_fqdn': {'key': 'internalFqdn'... | DNS settings of a network interface.
:param dns_servers: List of DNS servers IP addresses. Use
'AzureProvidedDNS' to switch to azure provided DNS resolution.
'AzureProvidedDNS' value cannot be combined with other IPs, it must be the
only value in dnsServers collection.
:type dns_servers: list[str]
:param applied_dn... | 62598fc655399d3f05626825 |
class StandardRobot(Robot): <NEW_LINE> <INDENT> def updatePositionAndClean(self): <NEW_LINE> <INDENT> potential_new_position = self.position.getNewPosition(self.direction, self.speed) <NEW_LINE> if self.room.isPositionInRoom(potential_new_position) == True: <NEW_LINE> <INDENT> self.position = potential_new_position <NE... | A StandardRobot is a Robot with the standard movement strategy.
At each time-step, a StandardRobot attempts to move in its current
direction; when it would hit a wall, it *instead* chooses a new direction
randomly. | 62598fc6bf627c535bcb17b5 |
class TemplateHelper(Bcfg2.Server.Plugin.Plugin, Bcfg2.Server.Plugin.Connector, Bcfg2.Server.Plugin.DirectoryBacked): <NEW_LINE> <INDENT> __author__ = 'chris.a.st.pierre@gmail.com' <NEW_LINE> ignore = re.compile(r'^(\.#.*|.*~|\..*\.(sw[px])|.*\.py[co])$') <NEW_LINE> patterns = MODULE_RE <NEW_LINE> __child__ = HelperMod... | A plugin to provide helper classes and functions to templates | 62598fc63d592f4c4edbb1bf |
class EulerGamma(NumberSymbol, metaclass=Singleton): <NEW_LINE> <INDENT> is_real = True <NEW_LINE> is_positive = True <NEW_LINE> is_negative = False <NEW_LINE> is_irrational = None <NEW_LINE> is_number = True <NEW_LINE> __slots__ = () <NEW_LINE> def _latex(self, printer): <NEW_LINE> <INDENT> return r"\gamma" <NEW_LINE>... | The Euler-Mascheroni constant.
Explanation
===========
`\gamma = 0.5772157\ldots` (also called Euler's constant) is a mathematical
constant recurring in analysis and number theory. It is defined as the
limiting difference between the harmonic series and the
natural logarithm:
.. math:: \gamma = \lim\limits_{n\to\in... | 62598fc6ec188e330fdf8ba2 |
class UpdateRoleConsoleLoginRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.ConsoleLogin = None <NEW_LINE> self.RoleId = None <NEW_LINE> self.RoleName = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.ConsoleLogin = params.get("ConsoleLogin") <N... | UpdateRoleConsoleLogin请求参数结构体
| 62598fc63346ee7daa3377cf |
class RequestJoin(M2MPacket): <NEW_LINE> <INDENT> type = PacketType.request_join | Client requests joining the server. | 62598fc663b5f9789fe85482 |
class ConstExpr(Expr): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> Expr.__init__(self) <NEW_LINE> self._is_const = True <NEW_LINE> self._value = value <NEW_LINE> <DEDENT> def code(self): <NEW_LINE> <INDENT> return str(self._value) | Constant expression
| 62598fc626068e7796d4cc6a |
class Model(interfaces.ParticleFiltering): <NEW_LINE> <INDENT> def __init__(self, P0, Q, R): <NEW_LINE> <INDENT> self.P0 = numpy.copy(P0) <NEW_LINE> self.Q = numpy.copy(Q) <NEW_LINE> self.R = numpy.copy(R) <NEW_LINE> <DEDENT> def create_initial_estimate(self, N): <NEW_LINE> <INDENT> return numpy.random.normal(0.0, self... | x_{k+1} = x_k + v_k, v_k ~ N(0,Q)
y_k = x_k + e_k, e_k ~ N(0,R),
x(0) ~ N(0,P0) | 62598fc671ff763f4b5e7a8d |
class ReduceImageDimensions(ScaledImageMixin, MinibufferAction): <NEW_LINE> <INDENT> name = "Reduce Dimensions by Integer" <NEW_LINE> default_menu = ("Tools", 301) <NEW_LINE> minibuffer_label = "Reduce Dimensions by Integer Factor:" <NEW_LINE> def processMinibuffer(self, minibuffer, mode, scale): <NEW_LINE> <INDENT> se... | Create a new image by reducing the size of the current view by an
integer scale factor.
Uses the current CubeView image to create a new image that is scaled in
pixel dimensions. Note that the CubeView image that is used is after all
the filters are applied. | 62598fc65fcc89381b2662d4 |
class SubmissionTestThread(Thread): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Thread.__init__(self) <NEW_LINE> self._shutdown_flag = False <NEW_LINE> self.start() <NEW_LINE> <DEDENT> def shutdown(self): <NEW_LINE> <INDENT> self._shutdown_flag = True <NEW_LINE> self.join() <NEW_LINE> <DEDENT> def run(s... | A Thread for running tests on student submissions.
Gets new submissions from the global new_submission_queue. | 62598fc65fdd1c0f98e5e29c |
class _Touch: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.filez = _File() <NEW_LINE> <DEDENT> def pid(self, prefix): <NEW_LINE> <INDENT> timestamp = int(time.time()) <NEW_LINE> filename = self.filez.pid(prefix) <NEW_LINE> os.utime(filename, (timestamp, timestamp)) | A class for updating modifed times for hidden files. | 62598fc6a05bb46b3848ab7a |
class OutputCapture(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.writes = [] <NEW_LINE> <DEDENT> def write(self, what): <NEW_LINE> <INDENT> self.writes.append(what) <NEW_LINE> <DEDENT> def as_result(self): <NEW_LINE> <INDENT> if len(self.writes) == 1: <NEW_LINE> <INDENT> return repr(self.wr... | File-like object used to trap output sent through a shell context's
::out() method | 62598fc6ec188e330fdf8ba4 |
class Term: <NEW_LINE> <INDENT> def __init__(self, name, ling, f): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.ling = ling <NEW_LINE> self.f = f <NEW_LINE> <DEDENT> def __call__(self, x): <NEW_LINE> <INDENT> return self.f(x) <NEW_LINE> <DEDENT> def cut(self, cut): <NEW_LINE> <INDENT> return self.f.clip(cut) | Atomic fuzzy set term
[name] is correspondent (type) name of this term.
[ling] is fuzzy linguistic category of this (type) name.
[f] is membership functions | 62598fc660cbc95b0636464d |
class BanABC(ABC): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> @staticmethod <NEW_LINE> def parse(obj: dict) -> 'BanABC': <NEW_LINE> <INDENT> if obj['banned'] == "0": <NEW_LINE> <INDENT> return NoBan(obj['user_id']) <NEW_LINE> <DEDENT> return Ban(obj['user_id'], obj['reason'], obj['case_id'], obj['proof']) <NEW_LINE>... | Base class for bans. Don't use this. Use :class:`Ban` or :class:`NoBan`. | 62598fc663b5f9789fe85484 |
class Storage(object): <NEW_LINE> <INDENT> def open(self, handle=None): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def write(self, resource): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def error(self, message): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> ... | The inventory storage interface | 62598fc60fa83653e46f51f6 |
class AgePredict(object): <NEW_LINE> <INDENT> def __init__(self, age_tags, app_dict): <NEW_LINE> <INDENT> self.app_data = {} <NEW_LINE> for pkg_index in app_dict: <NEW_LINE> <INDENT> result = defaultdict(int) <NEW_LINE> keywords = ",".join(app_dict[pkg_index][:2]) <NEW_LINE> for age, words_list in age_tags.items(): <NE... | 年龄预测 | 62598fc626068e7796d4cc6c |
class RadialBinnedStatistic(BinnedStatistic1D): <NEW_LINE> <INDENT> def __init__(self, shape, bins=10, range=None, origin=None, mask=None, r_map=None, statistic='mean'): <NEW_LINE> <INDENT> if origin is None: <NEW_LINE> <INDENT> origin = (shape[0] - 1) / 2, (shape[1] - 1) / 2 <NEW_LINE> <DEDENT> if r_map is None: <NEW_... | Create a 1-dimensional histogram by binning a 2-dimensional
image in radius. | 62598fc6167d2b6e312b7287 |
class Sink(object): <NEW_LINE> <INDENT> def __init__(self, sink_id): <NEW_LINE> <INDENT> self.data = StringIO() <NEW_LINE> self.sink_id = sink_id <NEW_LINE> self.struct = TidyOutputSink() <NEW_LINE> self.struct.sinkData = ctypes.cast( ctypes.pointer(ctypes.c_int(sink_id)), ctypes.c_void_p) <NEW_LINE> write_func = self.... | Represent a buffer to which Tidy writes errors with a callback function | 62598fc666673b3332c306e6 |
class Padding(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def size(length, alignment): <NEW_LINE> <INDENT> overlap = length % alignment <NEW_LINE> if overlap: <NEW_LINE> <INDENT> return alignment - overlap <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> return 0 <NEW_LINE> <DEDENT> <DEDENT> @staticmethod <NEW_L... | Padding base class. | 62598fc6fff4ab517ebcdaf8 |
class MeasureType(IntEnum): <NEW_LINE> <INDENT> UNKNOWN = -999999 <NEW_LINE> WEIGHT = 1 <NEW_LINE> HEIGHT = 4 <NEW_LINE> FAT_FREE_MASS = 5 <NEW_LINE> FAT_RATIO = 6 <NEW_LINE> FAT_MASS_WEIGHT = 8 <NEW_LINE> DIASTOLIC_BLOOD_PRESSURE = 9 <NEW_LINE> SYSTOLIC_BLOOD_PRESSURE = 10 <NEW_LINE> HEART_RATE = 11 <NEW_LINE> TEMPERA... | Measure types. | 62598fc6656771135c489980 |
class UpdatePw(webapp2.RequestHandler): <NEW_LINE> <INDENT> def post(self): <NEW_LINE> <INDENT> runningclub_name = self.request.get('runningclub') <NEW_LINE> username = self.request.get('username') <NEW_LINE> encrypteddbpassword = self.request.get('encrypteddbpassword') <NEW_LINE> user = getuserpw(runningclub_name,user... | update a userpw in the database, updating encrypteddbpassword attribute | 62598fc6d486a94d0ba2c2e2 |
class DromaeoJslibAttrPrototype(_DromaeoBenchmark): <NEW_LINE> <INDENT> tag = 'jslibattrprototype' <NEW_LINE> query_param = 'jslib-attr-prototype' | Dromaeo JSLib attr prototype JavaScript benchmark | 62598fc6956e5f7376df5806 |
class GatewaySensor(GatewayGenericDevice, SensorEntity): <NEW_LINE> <INDENT> def __init__( self, gateway, device, attr, ): <NEW_LINE> <INDENT> self._state = False <NEW_LINE> self.is_metric = False <NEW_LINE> self.with_attr = bool(device['type'] not in ( 'gateway', 'zigbee')) and bool(attr not in ( 'key_id', 'battery', ... | Xiaomi/Aqara Sensors | 62598fc65fdd1c0f98e5e29e |
class TimingHook(TrainingHook): <NEW_LINE> <INDENT> def __init__(self, trainer): <NEW_LINE> <INDENT> super(TimingHook, self).__init__(trainer) <NEW_LINE> self._epoch_times = [] <NEW_LINE> <DEDENT> @property <NEW_LINE> def epoch_times(self): <NEW_LINE> <INDENT> return self._epoch_times <NEW_LINE> <DEDENT> @staticmethod ... | Training Hook for log the training time between epochs
| 62598fc6ec188e330fdf8ba6 |
class Breakcom(Platform): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.platformName = "Breakcom" <NEW_LINE> self.tags = ["video"] <NEW_LINE> self.isValidMode = {} <NEW_LINE> self.isValidMode["phonefy"] = False <NEW_LINE> self.isValidMode["usufy"] = True <NEW_LINE> self.isValidMode["searchfy"] = Fals... | A <Platform> object for Breakcom. | 62598fc676e4537e8c3ef8b6 |
class MonitoredResourceDescriptor(_messages.Message): <NEW_LINE> <INDENT> description = _messages.StringField(1) <NEW_LINE> displayName = _messages.StringField(2) <NEW_LINE> labels = _messages.MessageField('LabelDescriptor', 3, repeated=True) <NEW_LINE> name = _messages.StringField(4) <NEW_LINE> type = _messages.String... | An object that describes the schema of a MonitoredResource object using
a type name and a set of labels. For example, the monitored resource
descriptor for Google Compute Engine VM instances has a type of
`"gce_instance"` and specifies the use of the labels `"instance_id"` and
`"zone"` to identify particular VM instan... | 62598fc6adb09d7d5dc0a88d |
class Logger(object): <NEW_LINE> <INDENT> use_external_configuration = False <NEW_LINE> @staticmethod <NEW_LINE> def configure_by_file(filename): <NEW_LINE> <INDENT> logging.config.fileConfig(filename) <NEW_LINE> Logger.use_external_configuration = True <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def configure_default... | Wrapper for logging calls. | 62598fc60fa83653e46f51f8 |
class TemplateRenderer(Application): <NEW_LINE> <INDENT> VERSION = __version__ <NEW_LINE> overwrite = Flag( ['f', 'force'], help="Overwrite any existing destination file" ) <NEW_LINE> def main(self, template_file: ExistingFile, *var_files: ExistingFile): <NEW_LINE> <INDENT> warn_shebangs(template_file) <NEW_LINE> data ... | Use json or yaml var_files to render template_file to an adjacent
file with the same name but the extension stripped | 62598fc6fff4ab517ebcdafa |
class Perceptron(object): <NEW_LINE> <INDENT> def __init__(self, eta=0.01, n_iter=10): <NEW_LINE> <INDENT> self.eta = eta <NEW_LINE> self.n_iter = n_iter <NEW_LINE> <DEDENT> def fit(self, X, y): <NEW_LINE> <INDENT> self.w_ = np.zeros(1 + X.shape[1]) <NEW_LINE> self.errors_ = [] <NEW_LINE> for _ in range(self.n_iter): <... | Perceptron classifier.
Parameters
-------------
eta : float
Learing rate (between 0.0 and 1.0)
n_iter : int
Passes over the training dataset.
Attributes
-------------
w_ : 1d-array
Weights after fitting.
errors_ : list
Number of misclassifications in every epoch. | 62598fc6ad47b63b2c5a7b6b |
class DescribeDDoSDefendStatusResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.DefendStatus = None <NEW_LINE> self.UndefendExpire = None <NEW_LINE> self.ShowFlag = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.... | DescribeDDoSDefendStatus返回参数结构体
| 62598fc67c178a314d78d7b2 |
class BaseConfig(object): <NEW_LINE> <INDENT> TESTING = False <NEW_LINE> DEBUG = False <NEW_LINE> SECRET_KEY = "awesome nakatudde" | Common configurations | 62598fc6bf627c535bcb17bb |
class FixedMonitor(MonitorInterface): <NEW_LINE> <INDENT> def __call__(self): <NEW_LINE> <INDENT> constraint = self.newConstraint() <NEW_LINE> constraint['count'] = _FixedValue <NEW_LINE> return [constraint] | _FixedMonitor_
Every time this plugin is polled, return the same value | 62598fc6ff9c53063f51a960 |
class BaseUnit(Unit): <NEW_LINE> <INDENT> named = {} <NEW_LINE> index_order = [None] * len(Unit._measureable) <NEW_LINE> def __init__(self, name, abbreviation, quantifies, display_order): <NEW_LINE> <INDENT> unit_index = self._measureable[quantifies] <NEW_LINE> super().__init__(name, abbreviation, quantifies, display_o... | Defines an SI base unit.
:param name: Full name of the unit.
:param abbreviation: The official unit abbreviation. Used for display
and parsing.
:param quantifies: A string (no white space allowed) that describes the
quantity measured by the unit.
:param display_order: A integer that controls the print-out ord... | 62598fc6a8370b77170f06ee |
class LearningProcessStaticVisualizer(AbstractStaticVisualizer): <NEW_LINE> <INDENT> METRICS = { "mean": np.mean, "median": np.median, } <NEW_LINE> def __init__(self, reward_set, axis=None, conf=68, bounds=False, metric="median", minimum=15e3): <NEW_LINE> <INDENT> self._rs = reward_set <NEW_LINE> super(LearningProcessS... | Visualizer class to plot the learning process of a set of RL controllers. Requires a RewardSet object to
instantiate. | 62598fc63346ee7daa3377d2 |
class ZhThTranslator: <NEW_LINE> <INDENT> def __init__(self, pretrained: str = "Lalita/marianmt-zh_cn-th") -> None: <NEW_LINE> <INDENT> self.tokenizer_zhth = AutoTokenizer.from_pretrained(pretrained) <NEW_LINE> self.model_zhth = AutoModelForSeq2SeqLM.from_pretrained(pretrained) <NEW_LINE> <DEDENT> def translate(self, t... | Chinese-Thai Machine Translation
from Lalita @ AI builder
- GitHub: https://github.com/LalitaDeelert/lalita-mt-zhth
- Facebook post https://web.facebook.com/aibuildersx/posts/166736255494822 | 62598fc60fa83653e46f51fa |
class normalbandit(Bandit): <NEW_LINE> <INDENT> def __init__(self, arms=1, shock=False, murange=(-1, 1), varmax=(1)): <NEW_LINE> <INDENT> Bandit.__init__(self, arms, shock) <NEW_LINE> self._armsmu = np.random.uniform(min(murange), max(murange), self.k) <NEW_LINE> self._armsvar = np.random.uniform(0, varmax, self.k) <NE... | Bandit class with rewards drawn from the normal distribution
parameters:
k: number of bandits to initialize. Takes integers > 1
mu range: range in which means are drawn: min to max
var range: range in which variance is drawn: 0 to max
methods:
pull:generates reward from bandit i in k
| 62598fc623849d37ff8513c6 |
@python_2_unicode_compatible <NEW_LINE> class Category(MP_Node): <NEW_LINE> <INDENT> name = models.CharField('分类名', max_length=255, db_index=True) <NEW_LINE> description = models.TextField('分类描述', blank=True) <NEW_LINE> image = models.ImageField('图片', upload_to='images/categories', blank=True, null=True, max_length=255... | A product category. Merely used for navigational purposes; has no
effects on business logic.
Uses django-treebeard. | 62598fc6f9cc0f698b1c545c |
class UserLabel(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=128) <NEW_LINE> user = models.ForeignKey(User, default=None, null=True) | Individual user labels (a filled out ballot that "votes" for a label associated with an image) | 62598fc7cc40096d6161a362 |
class ComponentMaker: <NEW_LINE> <INDENT> colors = ['#FF0000','#00FF00','#0000FF', '#009999','#990099','#999900', '#996666','#669966','#666699', '#0066CC','#6600CC','#66CC00', '#00CC66','#CC0066','#CC6600'] <NEW_LINE> def __init__(self, graph, animator, forbidden_colors=None): <NEW_LINE> <INDENT> self.G = graph <NEW_LI... | Subsequent calls of method NewComponent() will return differently
colored subgraphs of G | 62598fc74527f215b58ea1e4 |
class Bishop: <NEW_LINE> <INDENT> def __init__(self, color): <NEW_LINE> <INDENT> self.color = color <NEW_LINE> <DEDENT> def get_color(self): <NEW_LINE> <INDENT> return self.color <NEW_LINE> <DEDENT> def char(self): <NEW_LINE> <INDENT> return 'B' <NEW_LINE> <DEDENT> def can_move(self, board, row, col, row1, col1): <NEW_... | Класс слона | 62598fc75fcc89381b2662d7 |
class rice_gen(rv_continuous): <NEW_LINE> <INDENT> def _argcheck(self, b): <NEW_LINE> <INDENT> return b >= 0 <NEW_LINE> <DEDENT> def _rvs(self, b): <NEW_LINE> <INDENT> t = b/np.sqrt(2) + self._random_state.standard_normal(size=(2,) + self._size) <NEW_LINE> return np.sqrt((t*t).sum(axis=0)) <NEW_LINE> <DEDENT> def _cdf(... | A Rice continuous random variable.
%(before_notes)s
Notes
-----
The probability density function for `rice` is::
rice.pdf(x, b) = x * exp(-(x**2+b**2)/2) * I[0](x*b)
for ``x > 0``, ``b > 0``.
`rice` takes ``b`` as a shape parameter.
%(after_notes)s
The Rice distribution describes the length, ``r``, of a 2-D ... | 62598fc7656771135c489984 |
class FileIdentificationBlock: <NEW_LINE> <INDENT> __slots__ = ( "address", "file_identification", "version_str", "program_identification", "reserved0", "mdf_version", "reserved1", "unfinalized_standard_flags", "unfinalized_custom_flags", ) <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super().__init__()... | *FileIdentificationBlock* has the following attributes, that are also available as
dict like key-value pairs
IDBLOCK fields
* ``file_identification`` - bytes : file identifier
* ``version_str`` - bytes : format identifier
* ``program_identification`` - bytes : creator program identifier
* ``reserved0`` - bytes : res... | 62598fc7ad47b63b2c5a7b6d |
class MsgReply(Message): <NEW_LINE> <INDENT> def __init__(self, request_message=None, **kwargs): <NEW_LINE> <INDENT> if request_message and hasattr(request_message, "routing_key"): <NEW_LINE> <INDENT> if request_message.routing_key.endswith(".request"): <NEW_LINE> <INDENT> self.routing_key = request_message.routing_key... | Auxiliary class which creates replies messages with fields based on the request.
Routing key, corr_id are generated based on the request message
When not passing request_message as argument | 62598fc7a219f33f346c6b1c |
class Sento(namedtuple('Sento', ['id', 'name', 'address', 'access', 'holidays', 'has_laundry', 'office_hours'])): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return '\t'.join(self[:5]) + '\t' + str(self.has_laundry) + '\t' + self[-1] | TODO: docstring | 62598fc7a8370b77170f06f0 |
class UnitTest(unittest.TestCase, metaclass=abc.ABCMeta): <NEW_LINE> <INDENT> unittest = True | A base IntegrationTesting class | 62598fc750812a4eaa620d6f |
class Last(Semigroup): <NEW_LINE> <INDENT> def __str__(self) -> str: <NEW_LINE> <INDENT> return 'Last[value={}]'.format(self.value) <NEW_LINE> <DEDENT> def concat(self, semigroup): <NEW_LINE> <INDENT> return Last(semigroup.value) | Last is a Monoid that will always return the lastest, value when 2 Last instances are combined. | 62598fc7d8ef3951e32c7fe6 |
class FITSReader(Reader): <NEW_LINE> <INDENT> def __init__(self, filename, verbose = False): <NEW_LINE> <INDENT> super(FITSReader, self).__init__(filename, verbose = verbose) <NEW_LINE> from astropy.io import fits <NEW_LINE> self.hdul = fits.open(filename, memmap = True) <NEW_LINE> hdr = self.hdul[0].header <NEW_LINE> ... | FITS file reader class.
FIXME: This depends on internals of astropy.io.fits that I'm sure
we are not supposed to be messing with. The problem is that
astropy.io.fits does not support memmap'd images when the
image is scaled (which is pretty much always the case?). To
get around this we set ... | 62598fc73d592f4c4edbb1c8 |
class time_mock(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._now = time.time() <NEW_LINE> <DEDENT> def do_tick(self): <NEW_LINE> <INDENT> self._now += 1.0 <NEW_LINE> <DEDENT> def time(self): <NEW_LINE> <INDENT> return self._now | Mock class for the time module.
Use this to quickly skip forward in time. It starts with the time at which it is instantiated and then increases
with one second every time do_tick is called. | 62598fc78a349b6b43686555 |
class CaliperLogTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_log_verbose(self): <NEW_LINE> <INDENT> target_cmd = [ './ci_test_basic' ] <NEW_LINE> env = { 'CALI_LOG_VERBOSITY' : '3', 'CALI_LOG_LOGFILE' : 'stdout' } <NEW_LINE> log_targets = [ 'CALI_LOG_VERBOSITY=3', '== CALIPER: default: snapshot scopes: proce... | Caliper Log test cases | 62598fc70fa83653e46f51fc |
class Date(Column): <NEW_LINE> <INDENT> def __init__(self, name, frmt='%Y-%m-%d'): <NEW_LINE> <INDENT> super().__init__(name) <NEW_LINE> self.frmt = frmt <NEW_LINE> <DEDENT> def parse(self, value): <NEW_LINE> <INDENT> return datetime.datetime.strptime(value.strip(), self.frmt).date() | Specialized Column descriptor for date fields.
Parse strings into datetime.date objects accordingly to the
provided format specification. The format specification is the
same understood by datetime.datetime.strptime().
Args:
name: Column name or index.
frmt: Date format specification. | 62598fc723849d37ff8513c8 |
class TrackingLatticeGridTestHarness(TrackingTestHarness): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(TrackingLatticeGridTestHarness, self).__init__() <NEW_LINE> self.input_set = LatticeGridInput() <NEW_LINE> <DEDENT> def _setup(self): <NEW_LINE> <INDENT> super(TrackingLatticeGridTestHarness, sel... | Tests tracking over a lattice geometry. | 62598fc755399d3f0562682f |
class ParseJobList(ApiList): <NEW_LINE> <INDENT> API_NAME = "parse_jobs" <NEW_LINE> API_NAME_SRC = "parse_job_list" <NEW_LINE> API_SIMPLE = {} <NEW_LINE> API_COMPLEX = {} <NEW_LINE> API_CONSTANTS = {} <NEW_LINE> API_STR_ADD = [] <NEW_LINE> API_ITEM_ATTR = "parse_job" <NEW_LINE> API_ITEM_CLS = "ParseJob" | Automagically generated API array object. | 62598fc74527f215b58ea1e6 |
class word(object): <NEW_LINE> <INDENT> instances=weakref.WeakValueDictionary() <NEW_LINE> iCount=0 <NEW_LINE> def __init__(self,txtGrp=None,text=None,group=None,coordinate=None,dir=None): <NEW_LINE> <INDENT> if txtGrp is not None: <NEW_LINE> <INDENT> text=txtGrp[0] <NEW_LINE> group=txtGrp[1:] <NEW_LINE> <DEDENT> self.... | description of class | 62598fc7ad47b63b2c5a7b6f |
class Vector4: <NEW_LINE> <INDENT> def as_list(self): <NEW_LINE> <INDENT> return [self.x, self.y, self.z, self.w] <NEW_LINE> <DEDENT> def as_tuple(self): <NEW_LINE> <INDENT> return (self.x, self.y, self.z, self.w) <NEW_LINE> <DEDENT> def get_copy(self): <NEW_LINE> <INDENT> v = NifFormat.Vector4() <NEW_LINE> v.x = self.... | >>> from pyffi.formats.nif import NifFormat
>>> vec = NifFormat.Vector4()
>>> vec.x = 1.0
>>> vec.y = 2.0
>>> vec.z = 3.0
>>> vec.w = 4.0
>>> print(vec)
[ 1.000 2.000 3.000 4.000 ]
>>> vec.as_list()
[1.0, 2.0, 3.0, 4.0]
>>> vec.as_tuple()
(1.0, 2.0, 3.0, 4.0)
>>> print(vec.get_vector_3())
[ 1.000 2.000 3.000 ]
>... | 62598fc7dc8b845886d538d3 |
class ComputeHealthChecksDeleteRequest(_messages.Message): <NEW_LINE> <INDENT> healthCheck = _messages.StringField(1, required=True) <NEW_LINE> project = _messages.StringField(2, required=True) | A ComputeHealthChecksDeleteRequest object.
Fields:
healthCheck: Name of the HealthCheck resource to delete.
project: Name of the project scoping this request. | 62598fc7bf627c535bcb17bf |
class AddressInfoView(APIView): <NEW_LINE> <INDENT> permission_classes = [permissions.IsAuthenticated] <NEW_LINE> serializer_class = AddressSerializer <NEW_LINE> http_method_names = ['post'] <NEW_LINE> def post(self, request, format=None): <NEW_LINE> <INDENT> data = request.data.copy() <NEW_LINE> data['user'] = request... | API endpoint that shows all the transactions related to the specific address. | 62598fc77cff6e4e811b5d3d |
class DescribeApplicationTriggerPersonalResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Data = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("Data") is not None: <NEW_LINE> <INDENT> self.Data = Descri... | DescribeApplicationTriggerPersonal返回参数结构体
| 62598fc72c8b7c6e89bd3ada |
class Detector: <NEW_LINE> <INDENT> def __init__(self, detector): <NEW_LINE> <INDENT> self.detector = detector <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return type(self).__name__ <NEW_LINE> <DEDENT> def detect_and_compute(self, img): <NEW_LINE> <INDENT> kp, des = self.detector.detectAndCompute(img, N... | Base class for detector wrappers | 62598fc760cbc95b06364655 |
class Info(enum.IntFlag): <NEW_LINE> <INDENT> NONE = 0 <NEW_LINE> BASIC = 1 <NEW_LINE> SCORE = 2 <NEW_LINE> PV = 4 <NEW_LINE> REFUTATION = 8 <NEW_LINE> CURRLINE = 16 <NEW_LINE> ALL = BASIC | SCORE | PV | REFUTATION | CURRLINE | Used to filter information sent by the chess engine. | 62598fc7377c676e912f6f01 |
class TestPaverNodeInstall(PaverTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super().setUp() <NEW_LINE> os.environ['NO_PREREQ_INSTALL'] = 'false' <NEW_LINE> <DEDENT> def test_npm_install_with_subprocess_error(self): <NEW_LINE> <INDENT> with patch('subprocess.Popen') as _mock_popen: <NEW_LINE> <IN... | Test node install logic | 62598fc7167d2b6e312b728f |
class AuthManager(): <NEW_LINE> <INDENT> def __init__(self, app): <NEW_LINE> <INDENT> self.user_datastore = PeeweeUserDatastore(db, User, Role, UserRoles) <NEW_LINE> self.security = Security(app, self.user_datastore, register_blueprint=True) | Manager of security
Include
- Registration without email confirmation
- Login
- Forgot password
- Change Password | 62598fc7091ae35668704f41 |
class AlexaPowerController(AlexaCapibility): <NEW_LINE> <INDENT> def name(self): <NEW_LINE> <INDENT> return "Alexa.PowerController" <NEW_LINE> <DEDENT> def properties_supported(self): <NEW_LINE> <INDENT> return [{"name": "powerState"}] <NEW_LINE> <DEDENT> def properties_proactively_reported(self): <NEW_LINE> <INDENT> r... | Implements Alexa.PowerController.
https://developer.amazon.com/docs/device-apis/alexa-powercontroller.html | 62598fc79f28863672818a08 |
class TransientPopup(STT.SuperToolTip): <NEW_LINE> <INDENT> def __init__(self, grid_window, comment, position): <NEW_LINE> <INDENT> STT.SuperToolTip.__init__(self, grid_window) <NEW_LINE> xls_comment = comment.comment <NEW_LINE> split = xls_comment.split(":") <NEW_LINE> header, rest = split[0], split[1:] <NEW_LINE> res... | This is a sublass of L{SuperToolTip} and it is used to display a
"comment-window" on the cells containing a comment (a note).
:note: If Mark Hammonds' `pywin32` package is not available, this class is
never invoked. | 62598fc7656771135c489988 |
class FastRandom(object): <NEW_LINE> <INDENT> def __init__(self, min, max, len=255): <NEW_LINE> <INDENT> self.randoms = [random.randint(min, max) for i in range(len)] <NEW_LINE> self.index = 0 <NEW_LINE> self.len = len <NEW_LINE> <DEDENT> def rand(self): <NEW_LINE> <INDENT> value = self.randoms[self.index] <NEW_LINE> i... | random itself is too slow for our purposes, so we use random to populate
a small list of randomly generated numbers that can be used in each call
to randint()
A call to randint() just returns the a number from our list and increments
the list index.
This is faster and good enough for a "random" filler | 62598fc73617ad0b5ee06460 |
class TempFunctionCallCounter(TempValueSetter): <NEW_LINE> <INDENT> def __init__(self, function): <NEW_LINE> <INDENT> if cute_iter_tools.is_iterable(function): <NEW_LINE> <INDENT> first, second = function <NEW_LINE> if isinstance(second, basestring): <NEW_LINE> <INDENT> actual_function = getattr(first, second) <NEW_LIN... | Temporarily counts the number of calls made to a function.
Example:
f()
with TempFunctionCallCounter(f) as counter:
f()
f()
assert counter.call_count == 2
| 62598fc77cff6e4e811b5d3f |
class Predictor(Registrable): <NEW_LINE> <INDENT> def __init__(self, model: Model, dataset_reader: DatasetReader) -> None: <NEW_LINE> <INDENT> self._model = model <NEW_LINE> self._dataset_reader = dataset_reader <NEW_LINE> <DEDENT> def load_line(self, line: str) -> JsonDict: <NEW_LINE> <INDENT> return json.loads(line) ... | a ``Predictor`` is a thin wrapper around an AllenNLP model that handles JSON -> JSON predictions
that can be used for serving models through the web API or making predictions in bulk. | 62598fc75fdd1c0f98e5e2a6 |
class API: <NEW_LINE> <INDENT> def __init__(self, modules = None): <NEW_LINE> <INDENT> self.modules = [] <NEW_LINE> if modules is not None: <NEW_LINE> <INDENT> self.modules.extend(modules) <NEW_LINE> <DEDENT> <DEDENT> def getAllTypes(self): <NEW_LINE> <INDENT> collector = Collector() <NEW_LINE> for module in self.modul... | API abstraction.
Essentially, a collection of types, functions, and interfaces. | 62598fc760cbc95b06364657 |
class TaskProgress(XMLRemoteModel): <NEW_LINE> <INDENT> class StageProgress(XMLRemoteModel): <NEW_LINE> <INDENT> name = serializers.XMLNodeAttributeField(attr='ID') <NEW_LINE> backup_workers = serializers.XMLNodeField('BackupWorkers', parse_callback=int) <NEW_LINE> terminated_workers = serializers.XMLNodeField('Termina... | TaskProgress reprents for the progress of a task.
A single TaskProgress may consist of several stages.
:Example:
>>> progress = instance.get_task_progress('task_name')
>>> progress.get_stage_progress_formatted_string()
2015-11-19 16:39:07 M1_Stg1_job0:0/0/1[0%] R2_1_Stg1_job0:0/0/1[0%] | 62598fc78a349b6b43686559 |
class Paster(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, url, **kwargs): <NEW_LINE> <INDENT> self.url = url <NEW_LINE> self.data = kwargs <NEW_LINE> self.error = None <NEW_LINE> self.result = None <NEW_LINE> threading.Thread.__init__(self) <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> try: <NEW_L... | Paste code snippets to ubuntu pastebin. | 62598fc7377c676e912f6f02 |
class CustomSignupForm(SignupForm): <NEW_LINE> <INDENT> birth_day = forms.DateField(label='Birthday') <NEW_LINE> first_name = forms.CharField(max_length=30, label='First Name') <NEW_LINE> last_name = forms.CharField(max_length=30, label='Last Name') <NEW_LINE> class Meta: <NEW_LINE> <INDENT> widgets = {'birth_day': Dat... | Extended SignupForm for MyUser model | 62598fc755399d3f05626833 |
class ListCategoriesByIDInputSet(InputSet): <NEW_LINE> <INDENT> def set_APIKey(self, value): <NEW_LINE> <INDENT> super(ListCategoriesByIDInputSet, self)._set_input('APIKey', value) <NEW_LINE> <DEDENT> def set_AccessToken(self, value): <NEW_LINE> <INDENT> super(ListCategoriesByIDInputSet, self)._set_input('AccessToken',... | An InputSet with methods appropriate for specifying the inputs to the ListCategoriesByID
Choreo. The InputSet object is used to specify input parameters when executing this Choreo. | 62598fc7ad47b63b2c5a7b73 |
class Drain(SewerElement): <NEW_LINE> <INDENT> tag = 'ZB_E' <NEW_LINE> def __init__(self, ref): <NEW_LINE> <INDENT> super(Drain, self).__init__(ref) <NEW_LINE> self.geom = None <NEW_LINE> self.owner = '' <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.ref | A storm drain (`kolk` in Dutch).
| 62598fc77cff6e4e811b5d41 |
class InMageRcmApplyRecoveryPointInput(ApplyRecoveryPointProviderSpecificInput): <NEW_LINE> <INDENT> _validation = { 'instance_type': {'required': True}, 'recovery_point_id': {'required': True}, } <NEW_LINE> _attribute_map = { 'instance_type': {'key': 'instanceType', 'type': 'str'}, 'recovery_point_id': {'key': 'recove... | ApplyRecoveryPoint input specific to InMageRcm provider.
All required parameters must be populated in order to send to Azure.
:param instance_type: Required. The class type.Constant filled by server.
:type instance_type: str
:param recovery_point_id: Required. The recovery point Id.
:type recovery_point_id: str | 62598fc7ec188e330fdf8bb0 |
class OwnerUpdateView(LoginRequiredMixin, UpdateView): <NEW_LINE> <INDENT> def get_queryset(self): <NEW_LINE> <INDENT> print('update get_queryset called') <NEW_LINE> qs = super(OwnerUpdateView, self).get_queryset() <NEW_LINE> return qs.filter(ads=self.request.user) | Sub-class the UpdateView to pass the request to the form and limit the
queryset to the requesting user. | 62598fc7a8370b77170f06f6 |
class rpm(Plugin, RedHatPlugin): <NEW_LINE> <INDENT> optionList = [("rpmq", "queries for package information via rpm -q", "fast", True), ("rpmva", "runs a verify on all packages", "slow", False)] <NEW_LINE> def setup(self): <NEW_LINE> <INDENT> self.addCopySpec("/var/log/rpmpkgs") <NEW_LINE> if self.getOption("rpmq"): <... | RPM information
| 62598fc7adb09d7d5dc0a897 |
class DeleteLiveSnapshotTemplateRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TemplateId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.TemplateId = params.get("TemplateId") | DeleteLiveSnapshotTemplate请求参数结构体
| 62598fc7be7bc26dc9251fe9 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.