code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Slave: <NEW_LINE> <INDENT> pzd = () <NEW_LINE> pzdHook = None <NEW_LINE> ppo = ('PKW PKW PKW PKW PZD PZD PZD PZD', 'PKW PKW PKW PKW PZD PZD', 'PZD PZD PZD PZD', 'PZD PZD') <NEW_LINE> def __init__(self, slaveno: int) -> None: <NEW_LINE> <INDENT> assert slaveno < (1 << 5), f'Slave number cant be {1 << 5} or greater... | Create telegram with self.telegram
give me netdata
netdata = pkw + pzd
->
Create pkw/pzd with self._create{PKW, PZD}
give me PWEs | 62598f9d379a373c97d98de7 |
class CreateListener(neutronV20.CreateCommand): <NEW_LINE> <INDENT> resource = 'listener' <NEW_LINE> def add_known_arguments(self, parser): <NEW_LINE> <INDENT> parser.add_argument( '--admin-state-down', dest='admin_state', action='store_false', help=_('Set admin state up to false.')) <NEW_LINE> parser.add_argument( '--... | LBaaS v2 Create a listener. | 62598f9d3539df3088ecc088 |
class SubtractSquare(Game): <NEW_LINE> <INDENT> player: str <NEW_LINE> current_state: 'SubtractSquareState' <NEW_LINE> INSTRUCTIONS = 'Players take turns subtracting square numbers from the ' 'starting number. The winner is the person who subtracts ' 'to 0.' <NEW_LINE> def __init__(s... | The Subtract Square game.
player - the starting player of the game
current_state - the current state of the game | 62598f9d1f5feb6acb1629f4 |
class Robot(object): <NEW_LINE> <INDENT> def __init__(self, room, speed, capacity): <NEW_LINE> <INDENT> self.room = room <NEW_LINE> self.speed = speed <NEW_LINE> self.capacity = capacity <NEW_LINE> self.position = room.get_random_position() <NEW_LINE> self.direction = random.uniform(0, 360) <NEW_LINE> <DEDENT> def get_... | Represents a robot cleaning a particular room.
At all times, the robot has a particular position and direction in the room.
The robot also has a fixed speed and a fixed cleaning capacity.
Subclasses of Robot should provide movement strategies by implementing
update_position_and_clean, which simulates a single time-st... | 62598f9de64d504609df92a1 |
class Variant(Base): <NEW_LINE> <INDENT> __tablename__ = 'hutt' <NEW_LINE> record_id = Column(BigInteger, primary_key=True, unique=True) <NEW_LINE> maf_imputed = Column(Float) <NEW_LINE> is_qc = Column(Boolean) <NEW_LINE> var_region = Column(String(255)) <NEW_LINE> var_mutation = Column(String(255)) <NEW_LINE> def __re... | Variant annotation.
See http://workshops.arl.arizona.edu/sql1/sql_workshop/mysql/ucscdatabase.html#querying-the-refgene-table | 62598f9d498bea3a75a578f3 |
class memoize(object): <NEW_LINE> <INDENT> def __init__(self, func): <NEW_LINE> <INDENT> self.func = func <NEW_LINE> update_wrapper(self, func) <NEW_LINE> <DEDENT> def __get__(self, obj, objtype=None): <NEW_LINE> <INDENT> return partial(self, obj) <NEW_LINE> <DEDENT> def __call__(self, *args, **kw): <NEW_LINE> <INDENT>... | cache the return value of a method.
This class is meant to be used as a decorator of methods. The return value
from a given method invocation will be cached on the instance whose method
was invoked. All arguments passed to a method decorated with memoize must
be hashable.
If a memoized method is invoked directly on i... | 62598f9d5f7d997b871f92c8 |
class PaymentPage(BasePage): <NEW_LINE> <INDENT> def credit_card_number(self, text): <NEW_LINE> <INDENT> self.driver.find_element(*PaymentPageLocators.CREDIT_CARD_NUMBER).send_keys(text) <NEW_LINE> <DEDENT> def expiration(self, text): <NEW_LINE> <INDENT> self.driver.find_element(*PaymentPageLocators.EXPIRATION).send_ke... | Payment page action methods come here. | 62598f9d55399d3f056262f4 |
class PrivateLinkServiceConnectionState(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'status': {'key': 'status', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, status: Optiona... | A collection of information about the state of the connection between service consumer and provider.
:ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner
of the service. Possible values include: "Pending", "Approved", "Rejected".
:vartype status: str or
~azure.mgmt.compute.v... | 62598f9d38b623060ffa8e64 |
class BulkUpdate(BulkUD): <NEW_LINE> <INDENT> def __init__(self, query, values, update_kwargs): <NEW_LINE> <INDENT> super(BulkUpdate, self).__init__(query) <NEW_LINE> self.values = values <NEW_LINE> self.update_kwargs = update_kwargs | BulkUD which handles UPDATEs. | 62598f9d97e22403b383acde |
class URLSchema(SchemaBase): <NEW_LINE> <INDENT> shortcut = fields.Str(location='view_args', description='The generated or manually set URL shortcut') <NEW_LINE> url = fields.URL(description='The original URL (the short URL target)') <NEW_LINE> short_url = fields.Method('_get_short_url', description='The short URL') <N... | Schema class to validate URLs.
Note: use one of the sub-classes below for validation, depending on the shortcut requirements. | 62598f9d8e7ae83300ee8e72 |
class ResistantVirus(SimpleVirus): <NEW_LINE> <INDENT> def __init__(self, maxBirthProb, clearProb, resistances, mutProb): <NEW_LINE> <INDENT> SimpleVirus.__init__(self, maxBirthProb, clearProb) <NEW_LINE> self.resistances = resistances <NEW_LINE> self.mutProb = mutProb <NEW_LINE> <DEDENT> def getResistances(self): <NEW... | Representation of a virus which can have drug resistance. | 62598f9d4a966d76dd5eecb4 |
class SourceFile(File): <NEW_LINE> <INDENT> _ITEMNAME = "None" | Add a generic file to use for building.
These files will be included in the sdist, but will not be copied
in-place or included in wheels. | 62598f9dd7e4931a7ef3be6c |
class TopicUpdateView(PermissionRequiredMixin, TopicFormView): <NEW_LINE> <INDENT> model = Topic <NEW_LINE> success_message = _('This message has been edited successfully.') <NEW_LINE> template_name = 'forum_conversation/topic_update.html' <NEW_LINE> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> self.obj... | Allows users to update forum topics. | 62598f9dcc0a2c111447addf |
class User(AbstractBaseUser, PermissionsMixin): <NEW_LINE> <INDENT> email = models.EmailField(max_length=255, unique=True) <NEW_LINE> first_name = models.CharField(max_length=40) <NEW_LINE> last_name = models.CharField(max_length=40) <NEW_LINE> image = models.ImageField('Profile picture', upload_to='profiles', blank=Tr... | User information
| 62598f9df7d966606f747dbb |
class LocationError(WeathereggException): <NEW_LINE> <INDENT> pass | Invalid location | 62598f9dbe8e80087fbbee32 |
class Recursive: <NEW_LINE> <INDENT> @rpc() <NEW_LINE> def ep(self, a: int) -> int: <NEW_LINE> <INDENT> assert a > 0 <NEW_LINE> s = service(Recursive, origin(), ClientConfig(timeout_total=1., horz=False)) <NEW_LINE> if a == 1: <NEW_LINE> <INDENT> return 0 <NEW_LINE> <DEDENT> elif a > 1: <NEW_LINE> <INDENT> return s.ep(... | Recursively call itself till exit | 62598f9d3539df3088ecc089 |
class StatusWriter: <NEW_LINE> <INDENT> def __init__(self, vers): <NEW_LINE> <INDENT> self.vers = vers <NEW_LINE> self.xmlLogHandle = None <NEW_LINE> self.pid = os.getpid() <NEW_LINE> <DEDENT> def setXmlLog ( self, xmlLogFile ): <NEW_LINE> <INDENT> xmlLogFile = xmlLogFile.strip() <NEW_LINE> try: <NEW_LINE> <INDENT> sel... | Outputs status to stderr and optionally to an xml log file | 62598f9d379a373c97d98de8 |
class _MarkovChainToGaussian(Deterministic): <NEW_LINE> <INDENT> _moments = GaussianMoments(1) <NEW_LINE> _parent_moments = (GaussianMarkovChainMoments(),) <NEW_LINE> def __init__(self, X, **kwargs): <NEW_LINE> <INDENT> if utils.is_numeric(X): <NEW_LINE> <INDENT> X = Constant(GaussianMarkovChain)(X) <NEW_LINE> <DEDENT>... | Transform a Gaussian Markov chain node into a Gaussian node.
This node is deterministic. | 62598f9d56ac1b37e6301fbe |
class OutOfRange(BadRequest): <NEW_LINE> <INDENT> grpc_status_code = grpc.StatusCode.OUT_OF_RANGE if grpc is not None else None | Exception mapping a :attr:`grpc.StatusCode.OUT_OF_RANGE` error. | 62598f9d3eb6a72ae038a414 |
class _SelfAttentionBlock(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_channels, key_channels, value_channels, out_channels=None, scale=1, norm_type=None,psp_size=(1,3,6,8)): <NEW_LINE> <INDENT> super(_SelfAttentionBlock, self).__init__() <NEW_LINE> self.scale = scale <NEW_LINE> self.in_channels = in_channels ... | The basic implementation for self-attention block/non-local block
Input:
N X C X H X W
Parameters:
in_channels : the dimension of the input feature map
key_channels : the dimension after the key/query transform
value_channels : the dimension after the value transform
scale ... | 62598f9ddd821e528d6d8d09 |
class StdSetPrinter: <NEW_LINE> <INDENT> class _iter: <NEW_LINE> <INDENT> def __init__(self, rbiter, type): <NEW_LINE> <INDENT> self.rbiter = rbiter <NEW_LINE> self.count = 0 <NEW_LINE> self.type = type <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def next(self): <NEW_LINE... | Print a std::set or std::multiset | 62598f9dcc0a2c111447ade0 |
class JSONRedisHashDict(RedisHashDict, JSONSerializer): <NEW_LINE> <INDENT> pass | Serialize hash-map values using JSON. | 62598f9dbe383301e02535c9 |
class MessageSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Message <NEW_LINE> fields = ["content"] | Message serializer | 62598f9dfff4ab517ebcd5c2 |
class MeteringConfiguration(BSElement): <NEW_LINE> <INDENT> element_type = "xs:string" <NEW_LINE> element_enumerations = [ "Direct metering", "Master meter without sub metering", "Master meter with sub metering", "Other", "Unknown", ] | The structure of how the various meters are arranged. | 62598f9d3539df3088ecc08a |
class VideoFileClip(VideoClip): <NEW_LINE> <INDENT> def __init__(self, filename, has_mask=False, audio=True, audio_buffersize = 200000, audio_fps=44100, audio_nbytes=2, verbose=False): <NEW_LINE> <INDENT> VideoClip.__init__(self) <NEW_LINE> pix_fmt= "rgba" if has_mask else "rgb24" <NEW_LINE> self.reader = FFMPEG_VideoR... | A video clip originating from a movie file. For instance: ::
>>> clip = VideofileClip("myHolidays.mp4")
>>> clip2 = VideofileClip("myMaskVideo.avi")
Parameters
------------
filename:
The name of the video file. It can have any extension supported
by ffmpeg: .ogv, .mp4, .mpeg, .avi, .mov etc.
has_mask... | 62598f9da8ecb03325870fe0 |
@register <NEW_LINE> class FocusCell(DOMWidget): <NEW_LINE> <INDENT> _view_name = Unicode("FocusCell").tag(sync=True) <NEW_LINE> _view_module = Unicode("nbextensions/chmp-widgets/widgets").tag(sync=True) <NEW_LINE> _view_module_version = Unicode("0.1.0").tag(sync=True) | A widget to hide all other cells, but the one containing this widget.
Usage::
# in a notebook cell
widget = FocusCell()
widget | 62598f9d2ae34c7f260aaeb5 |
class Trafficlight (object): <NEW_LINE> <INDENT> def __init__ (self, pin_red, pin_green, pin_orange=None): <NEW_LINE> <INDENT> self.red = Lamp(pin_red) <NEW_LINE> self.green = Lamp(pin_green) <NEW_LINE> self._lamps = [self.red, self.green] <NEW_LINE> if pin_orange: <NEW_LINE> <INDENT> self.orange = Lamp(pin_orange)... | one traffic light built of three lamps (red, orange, green) | 62598f9d8e71fb1e983bb88a |
class LoginForm(AuthenticationForm ): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> for field in self.fields.values(): <NEW_LINE> <INDENT> field.widget.attrs['class'] = 'login-form-control' <NEW_LINE> field.widget.attrs['placeholder'] = field.l... | ログインフォーム | 62598f9d01c39578d7f12b52 |
class BaseUpdateView(DocumentFormMixin, ProcessFormView): <NEW_LINE> <INDENT> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> self.object = self.get_object() <NEW_LINE> return super(BaseUpdateView, self).get(request, *args, **kwargs) <NEW_LINE> <DEDENT> def post(self, request, *args, **kwargs): <NEW_LINE> ... | Base view for updating an existing object.
Using this base class requires subclassing to provide a response mixin. | 62598f9d63b5f9789fe84f4a |
class NimbusConfManager(ConfManager): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> ConfManager.__init__(self, 'nimbus') <NEW_LINE> self.cloud_parser = SafeConfigParser() <NEW_LINE> <DEDENT> def read(self): <NEW_LINE> <INDENT> ConfManager.read(self) <NEW_LINE> self.read_login_data() <NEW_LINE> self.read_c... | nimbus configuration management | 62598f9d97e22403b383ace0 |
class GitCommitTrigger(Model): <NEW_LINE> <INDENT> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'commit_id': {'key': 'commitId', 'type': 'str'}, 'repository_url': {'key': 'repositoryUrl', 'type': 'str'}, 'branch_name': {'key': 'branchName', 'type': 'str'}, 'provider_type': {'key': 'providerType', 'type': 'str... | The git commit trigger that caused a build.
:param id: The unique ID of the trigger.
:type id: str
:param commit_id: The unique ID that identifies a commit.
:type commit_id: str
:param repository_url: The repository URL.
:type repository_url: str
:param branch_name: The branch name in the repository.
:type branch_name... | 62598f9d7cff6e4e811b57f7 |
class NumericInFilter(django_filters.BaseInFilter, django_filters.NumberFilter): <NEW_LINE> <INDENT> pass | Filters for set of numeric values. Example: id__in=100,200,300 | 62598f9d4f6381625f1993a6 |
class Evidence(dict): <NEW_LINE> <INDENT> def __setitem__(self, keys, values): <NEW_LINE> <INDENT> if not isinstance(keys, types.ListType): <NEW_LINE> <INDENT> keys = [keys] <NEW_LINE> values = [values] <NEW_LINE> <DEDENT> elif (not isinstance(values, types.ListType)) and (not isinstance(values, ArrayType)): <NEW_LINE>... | This is the data structure for evidence. It acts exactly like a dictionary except that it will take lists of keys with the [] notation, rather than just single keys.
| 62598f9d4a966d76dd5eecb6 |
class PipelineServerTestCase(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(PipelineServerTestCase, self).setUp() <NEW_LINE> self.server = ThreadedHTTPServer() <NEW_LINE> self.addCleanup(self.server.shutdown) <NEW_LINE> self.url = "http://127.0.0.1:{port}".format(port=self.server.port) <NEW_L... | TestCase class for verifying the HTTP server that
is servicing the webhooks from GitHub. | 62598f9dd6c5a102081e1f1a |
class EnrollmentByBirthYearPartitionTask(HivePartitionTask): <NEW_LINE> <INDENT> date = luigi.DateParameter() <NEW_LINE> @property <NEW_LINE> def hive_table_task(self): <NEW_LINE> <INDENT> return EnrollmentByBirthYearTaskTableTask( warehouse_path=self.warehouse_path, overwrite=self.overwrite ) <NEW_LINE> <DEDENT> @prop... | Creates storage partition for the `course_enrollment_birth_year_daily` Hive table. | 62598f9d009cb60464d012fa |
class SanshokuDoukou(Yaku): <NEW_LINE> <INDENT> def set_attributes(self): <NEW_LINE> <INDENT> self.yaku_id = 26 <NEW_LINE> self.name = 'Sanshoku Doukou' <NEW_LINE> self.han_open = 2 <NEW_LINE> self.han_closed = 2 <NEW_LINE> self.is_yakuman = False <NEW_LINE> <DEDENT> def is_condition_met(self, hand, *args): <NEW_LINE> ... | Three pon sets consisting of the same numbers in all three suits | 62598f9d0c0af96317c56158 |
class CrossbarWampRawSocketClientProtocol(WampRawSocketClientProtocol): <NEW_LINE> <INDENT> pass | Crossbar.io WAMP-over-RawSocket client protocol. | 62598f9d91af0d3eaad39be0 |
class CompareDist(rdFMCS.MCSAtomCompare): <NEW_LINE> <INDENT> def __init__(self, threshold=0.5, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self.threshold = threshold <NEW_LINE> <DEDENT> def compare(self, p, mol1, atom1, mol2, atom2): <NEW_LINE> <INDENT> x_i = mol1.GetConformer(0)... | Custom atom comparison: use positions within generated conformer | 62598f9d236d856c2adc9324 |
class mainFrame(wx.Frame): <NEW_LINE> <INDENT> def __init__(self, *args, **kwds): <NEW_LINE> <INDENT> kwds["style"] = wx.DEFAULT_FRAME_STYLE <NEW_LINE> wx.Frame.__init__(self, *args, **kwds) <NEW_LINE> self.pickMaskBrowser = FileBrowseButton(self, -1, labelText='Mask File') | Creates the main window of the application. | 62598f9df7d966606f747dbd |
class profile(object): <NEW_LINE> <INDENT> def __init__(self, enabled=True): <NEW_LINE> <INDENT> self.enabled = enabled <NEW_LINE> self.function_events = None <NEW_LINE> if not self.enabled: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> self.entered = False <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> ... | 结果的评价指标.
参数:
enabled (bool, 可选): 如果设置为 False ,则没有评价指标.
Default: ``True``.
.. 警告:
不应该递归地调用这个上下文管理器,即最多一个实例应该在任何给定的时间启用.
Example:
>>> x = Variable(torch.randn(1, 1), requires_grad=True)
>>> with torch.autograd.profiler.profile() as prof:
... y = x ** 2
... y.backward()
>>> #... | 62598f9db5575c28eb712bb8 |
class RedisDataHandler(FileDataHandler): <NEW_LINE> <INDENT> def __init__(self, filename, host='localhost', port=6379, key_prefix=None): <NEW_LINE> <INDENT> self._trec_qrels = self._initialise_handler(filename=filename, host=host, port=port, key_prefix=key_prefix) <NEW_LINE> <DEDENT> def _initialise_handler(self, filen... | Extends the FileDataHandler to consider a TrecQrelHandler object stored in
a Redis cache. If it is found that a TrecQrelHandler object does not exist for
the given key, a new TrecQrelHandler is instantiated using the filename given.
This handler is then placed in the Redis cache, ready for the next use. | 62598f9ddd821e528d6d8d0a |
class NicknameApiTestCase(SimpleNameApiTestCase): <NEW_LINE> <INDENT> factory_class = factories.NicknameModelFactory <NEW_LINE> model_class = models.Nickname <NEW_LINE> serializer_class = serializers.NicknameSerializer <NEW_LINE> url_detail = "nickname-detail" <NEW_LINE> url_list = "nickname-list" <NEW_LINE> name = "sm... | Nickname API unit test class. | 62598f9d3539df3088ecc08b |
class Config(object): <NEW_LINE> <INDENT> def __init__(self, logcat_params=None, clear_log=True, output_file_path=None): <NEW_LINE> <INDENT> self.clear_log = clear_log <NEW_LINE> self.logcat_params = logcat_params if logcat_params else '' <NEW_LINE> self.output_file_path = output_file_path | Config object for logcat service.
Attributes:
clear_log: bool, clears the logcat before collection if True.
logcat_params: string, extra params to be added to logcat command.
output_file_path: string, the path on the host to write the log file
to, including the actual filename. The service will automatically... | 62598f9d3c8af77a43b67e29 |
class NullListFilter(admin.SimpleListFilter): <NEW_LINE> <INDENT> def lookups(self, request, model_admin): <NEW_LINE> <INDENT> return (('0', 'Not None',), ('1', 'None',),) <NEW_LINE> <DEDENT> def queryset(self, request, queryset): <NEW_LINE> <INDENT> if self.value() in ('0', '1'): <NEW_LINE> <INDENT> kwargs = { '{}__is... | Admin list filter to filter for whether a field is null or not null. | 62598f9d4e4d5625663721f9 |
class Packet(object): <NEW_LINE> <INDENT> def __init__(self, route=None, command=None): <NEW_LINE> <INDENT> self.route = route <NEW_LINE> self.command = command <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def try_parse(packet=""): <NEW_LINE> <INDENT> packet_CRC = packet[-4:] <NEW_LINE> check_CRC = detect.Crc('crc-16')... | Packet class defines the structure of a mesh network packet | 62598f9dd486a94d0ba2bdab |
class StochasticParameterMaskGen(IBatchwiseMaskGenerator): <NEW_LINE> <INDENT> def __init__(self, parameter, per_channel): <NEW_LINE> <INDENT> super(StochasticParameterMaskGen, self).__init__() <NEW_LINE> self.parameter = parameter <NEW_LINE> self.per_channel = iap.handle_probability_param(per_channel, "per_channel") <... | Mask generator that queries stochastic parameters for mask values.
This class receives batches for which to generate masks, iterates over
the batch rows (i.e. images) and generates one mask per row.
For a row with shape ``(H, W, C)`` (= image shape), it generates
either a ``(H, W)`` mask (if ``per_channel`` is false-l... | 62598f9da79ad16197769e3a |
class EditProfileTestCase(TestCase): <NEW_LINE> <INDENT> def test_hard_no_more_than(self): <NEW_LINE> <INDENT> utils.create_user( "userexample", "userexample@admin.com", "userexample123456" ) <NEW_LINE> User = get_user_model() <NEW_LINE> username = get_object_or_404(User, username="userexample") <NEW_LINE> Profile.obje... | Test Edit profile | 62598f9dd99f1b3c44d05486 |
class TestNpMetrics(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.hamming = npmetrics.np_hamming_distance <NEW_LINE> self.seq_similarity = npmetrics.np_seq_similarity <NEW_LINE> self.coverage_distance = npmetrics.np_coverage_distance <NEW_LINE> self.seq_distance = npmetrics.np_seq_di... | Numpy metrics | 62598f9d8a43f66fc4bf1f52 |
class DateValidator(DataValidator): <NEW_LINE> <INDENT> def validate(self,date): <NEW_LINE> <INDENT> pass | Validates date objects | 62598f9d097d151d1a2c0dfe |
class soundcard(sos.plugintools.PluginBase): <NEW_LINE> <INDENT> def defaultenabled(self): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def setup(self): <NEW_LINE> <INDENT> self.addCopySpecs([ "/proc/asound/*", "/etc/alsa/*", "/etc/asound.*"]) <NEW_LINE> self.collectExtOutput("/sbin/lspci | grep -i audio") <NEW... | Sound card information
| 62598f9d8e7ae83300ee8e76 |
class TraccarEntity(TrackerEntity, RestoreEntity): <NEW_LINE> <INDENT> def __init__(self, device, latitude, longitude, battery, accuracy, attributes): <NEW_LINE> <INDENT> self._accuracy = accuracy <NEW_LINE> self._attributes = attributes <NEW_LINE> self._name = device <NEW_LINE> self._battery = battery <NEW_LINE> self.... | Represent a tracked device. | 62598f9d3d592f4c4edbaca5 |
class StateData(MappingSchema): <NEW_LINE> <INDENT> missing = drop <NEW_LINE> @deferred <NEW_LINE> def default(self, kw): <NEW_LINE> <INDENT> return {} <NEW_LINE> <DEDENT> name = StateName() <NEW_LINE> description = Text(missing='', default='') <NEW_LINE> start_date = DateTime(missing=None, default=None) | Resource specific data for a workflow state. | 62598f9d60cbc95b06364124 |
class Commitment(Base): <NEW_LINE> <INDENT> __tablename__ = 'commitment' <NEW_LINE> id = Column(types.UnicodeText, primary_key=True, default=make_uuid) <NEW_LINE> created = Column(types.DateTime, default=datetime.now) <NEW_LINE> source = Column(types.UnicodeText, nullable=False, index=True) <NEW_LINE> dataset_name = ... | A commitment that it either from an Open Data Strategy or one of
the PMs letters. | 62598f9d9c8ee82313040059 |
class SparseRandomProjection(BaseRandomProjection): <NEW_LINE> <INDENT> def __init__(self, n_components='auto', density='auto', eps=0.1, dense_output=False, random_state=None): <NEW_LINE> <INDENT> super(SparseRandomProjection, self).__init__( n_components=n_components, eps=eps, dense_output=dense_output, random_state=r... | Reduce dimensionality through sparse random projection
Sparse random matrix is an alternative to dense random
projection matrix that guarantees similar embedding quality while being
much more memory efficient and allowing faster computation of the
projected data.
If we note `s = 1 / density` the components of the ran... | 62598f9d85dfad0860cbf960 |
class CommonTimeWindow(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Monday = None <NEW_LINE> self.Tuesday = None <NEW_LINE> self.Wednesday = None <NEW_LINE> self.Thursday = None <NEW_LINE> self.Friday = None <NEW_LINE> self.Saturday = None <NEW_LINE> self.Sunday = None <NEW_LINE> <DE... | 通用时间窗
| 62598f9d435de62698e9bbcb |
class json_cmp_result(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.errors = [] <NEW_LINE> <DEDENT> def add_error(self, error): <NEW_LINE> <INDENT> for line in error.splitlines(): <NEW_LINE> <INDENT> self.errors.append(line) <NEW_LINE> <DEDENT> <DEDENT> def has_errors(self): <NEW_LINE> <INDE... | json_cmp result class for better assertion messages | 62598f9d236d856c2adc9325 |
class PaygenSigningRequirementsError(failures_lib.StepFailure): <NEW_LINE> <INDENT> pass | Paygen stage can't run if signing failed. | 62598f9dadb09d7d5dc0a361 |
class InvalidTypeSignatureError(Exception): <NEW_LINE> <INDENT> pass | Thrown when `Pipeline.input_type` or `Pipeline.output_type` is not valid.
| 62598f9dbe8e80087fbbee36 |
class Critic(nn.Module): <NEW_LINE> <INDENT> def __init__(self, opt): <NEW_LINE> <INDENT> super(Critic, self).__init__() <NEW_LINE> self.opt = opt <NEW_LINE> self.embedding = nn.Embedding(opt.vocab_size, opt.emb_size) <NEW_LINE> self.rnn = nn.GRU(input_size=opt.emb_size, hidden_size=opt.critic_hidden_size, num_layers=o... | The imitation GAN critic used for stable training of the actor. | 62598f9db5575c28eb712bb9 |
class TestASToratorPy3(unittest.TestCase, _TestUtil): <NEW_LINE> <INDENT> def test_annotations_identity(self): <NEW_LINE> <INDENT> _a, _b, _c, _d, _va, _kw, _return = [], [], [], [], [], [], [] <NEW_LINE> def real(a:_a, b:_b=1, *va:_va, c:_c, d:_d=1, **kw:_kw) -> _return: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> se... | Python3 only tests for black_magic.decorator.wraps (uses AST).
Contains checks for annotations object identity and keyword-only
arguments. | 62598f9d379a373c97d98dec |
class RenaultBatteryLevelSensor(RenaultBatteryDataEntity): <NEW_LINE> <INDENT> @property <NEW_LINE> def state(self) -> Optional[int]: <NEW_LINE> <INDENT> return self.data.batteryLevel <NEW_LINE> <DEDENT> @property <NEW_LINE> def device_class(self) -> str: <NEW_LINE> <INDENT> return DEVICE_CLASS_BATTERY <NEW_LINE> <DEDE... | Battery Level sensor. | 62598f9d462c4b4f79dbb7e3 |
class LazyProperty(object): <NEW_LINE> <INDENT> def __init__(self, func): <NEW_LINE> <INDENT> self.func = func <NEW_LINE> <DEDENT> def __get__(self, instance, owner): <NEW_LINE> <INDENT> if instance is None: <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> value = self.func(instance) <NEW_L... | LazyProperty
https://blog.csdn.net/handsomekang/article/details/39933553
参考 proxy_pool.Util.GetConfig | 62598f9deab8aa0e5d30bb5d |
class AtomAction(Action): <NEW_LINE> <INDENT> def __init__(self, function_tuple, **kwargs): <NEW_LINE> <INDENT> self.function_tuple = function_tuple <NEW_LINE> arg_types = function_tuple.args <NEW_LINE> super().__init__(arg_types, **kwargs) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def factory(cls, pysc2_function): <... | A Class made to directly mirror pysc2 523 default actions | 62598f9d009cb60464d012fd |
class CreateOAuthUser(OAuthRequestHandler): <NEW_LINE> <INDENT> def post(self): <NEW_LINE> <INDENT> data = json_decode(self.request.body) <NEW_LINE> if 'api_auth_token' not in data: <NEW_LINE> <INDENT> raise HTTPError(400, 'api_auth_token not provided') <NEW_LINE> <DEDENT> if 'access_token' not in data: <NEW_LINE> <IND... | The JupyterHub application itself should be the only 'user' that calls this.
After the OAuthenticator that JupyterHub is currently using finishes the OAuth login process, it should
call this function by using pre_spawn_start() so the OAuth manager knows which tokens to store for the
user that just logged in.
http://j... | 62598f9da8370b77170f01bb |
class Group(_GroupMixin, _RawLayer): <NEW_LINE> <INDENT> def __init__(self, parent, index): <NEW_LINE> <INDENT> super(Group, self).__init__(parent, index) <NEW_LINE> self._layers = [] <NEW_LINE> self._bbox = None <NEW_LINE> <DEDENT> @property <NEW_LINE> def closed(self): <NEW_LINE> <INDENT> divider = self._divider <NEW... | PSD layer group. | 62598f9da79ad16197769e3c |
class GoogleRefreshableOAuth2Client(GoogleOAuth2Client): <NEW_LINE> <INDENT> def Refresh(self): <NEW_LINE> <INDENT> raise NotImplementedError( 'You must subclass GoogleRefreshableOAuth2Client.') | A refreshable OAuth2 client for use with Google APIs.
This interface assumes all responsibility for refreshing credentials when
necessary. | 62598f9dbe383301e02535cd |
class AbstractMercator(SpatialReferenceSystem): <NEW_LINE> <INDENT> @property <NEW_LINE> def tile_size(self): <NEW_LINE> <INDENT> return self._tile_size <NEW_LINE> <DEDENT> @tile_size.setter <NEW_LINE> def tile_size(self, value): <NEW_LINE> <INDENT> self._tile_size = value <NEW_LINE> <DEDENT> def __init__(self, tile_si... | Base Class for any Mercator projection classes. Sets-up the commonalities for the other Mercator projections
such as Ellipsoidal, scaled world mercator, or Psuedo-Mercator. | 62598f9d32920d7e50bc5e2e |
class JSONtree(object): <NEW_LINE> <INDENT> def __init__(self, root_name, leaf=False, association=None, id=None): <NEW_LINE> <INDENT> super(JSONtree,self).__init__() <NEW_LINE> self.name = root_name <NEW_LINE> if not leaf: <NEW_LINE> <INDENT> self.children = list() <NEW_LINE> <DEDENT> self.leaf = leaf <NEW_LINE> self.a... | Constructs a Tree-like object that is supported by the D3 Framework | 62598f9d1f037a2d8b9e3ebf |
class screenshotProp(SchemaProperty): <NEW_LINE> <INDENT> _prop_schema = 'screenshot' <NEW_LINE> _expected_schema = 'ImageObject' <NEW_LINE> _enum = False <NEW_LINE> _format_as = "URLField" | SchemaField for screenshot
Usage: Include in SchemaObject SchemaFields as your_django_field = screenshotProp()
schema.org description:A link to a screenshot image of the app.
prop_schema returns just the property without url#
format_as is used by app templatetags based upon schema.org datatype
used to reference Imag... | 62598f9d9b70327d1c57eb78 |
class Vote(models.Model): <NEW_LINE> <INDENT> created = models.DateTimeField(auto_now_add=True) <NEW_LINE> voter = models.OneToOneField('Voter', on_delete=models.CASCADE) <NEW_LINE> polling_station = models.ForeignKey('PollingStation', on_delete=models.CASCADE) <NEW_LINE> list_choice = models.ForeignKey('List', on_dele... | A vote from a voter. As simple as that. | 62598f9d7047854f4633f1bb |
class Profile(object): <NEW_LINE> <INDENT> def __init__(self, logger, doc, checkouts_manager): <NEW_LINE> <INDENT> self.logger = logger <NEW_LINE> self.doc = doc <NEW_LINE> self.parameters = dict(doc.get('parameters', {})) <NEW_LINE> self.file_resolver = FileResolver(checkouts_manager, doc.get('package_dirs', [])) <NEW... | Profiles acts as nodes in a tree, with `extends` containing the
parent profiles (which are child nodes in a DAG). | 62598f9d67a9b606de545da2 |
class CASMLReuseMethod(IReuseMethod): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(CASMLReuseMethod, self).__init__() <NEW_LINE> <DEDENT> def execute(self, case, case_matches, fn_retrieve=None): <NEW_LINE> <INDENT> cluster = [] <NEW_LINE> id_map = {} <NEW_LINE> for i, m in enumerate(case_matches.it... | The reuse method implementation for :class:`CASML`.
The solutions of the best (or set of best) retrieved cases are used to construct
the solution for the query case; new generalizations and specializations may occur
as a consequence of the solution transformation.
The CASML reuse method further specializes the soluti... | 62598f9d4428ac0f6e658303 |
class Iperf3Server(object): <NEW_LINE> <INDENT> def __init__(self, parameters, loop=None, use_processes=False): <NEW_LINE> <INDENT> if loop is None: <NEW_LINE> <INDENT> self._loop = asyncio.get_event_loop() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self._loop = loop <NEW_LINE> <DEDENT> self._use_processes = use_pro... | Big ToDo | 62598f9d0c0af96317c5615b |
@total_ordering <NEW_LINE> class Smallest(object): <NEW_LINE> <INDENT> def __neg__(self): <NEW_LINE> <INDENT> return Largest() <NEW_LINE> <DEDENT> def __lt__(self, other): <NEW_LINE> <INDENT> if other.__class__ == self.__class__: <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> return True <NEW_LINE> <DEDENT> def _... | Represents the smallest value
This type doesn't do much; it implements a pseudo-value that's smaller
than everything but itself.
>>> negInf = Smallest()
>>> smallest = Smallest()
>>> -264 < negInf
False
>>> -264 == negInf
False
>>> -264 > negInf
True
>>> negInf < negInf
False
>>> negInf == smallest
True | 62598f9d0a50d4780f7051b2 |
class MinLengthValidator(Validator): <NEW_LINE> <INDENT> def __init__(self, min_length, message=None): <NEW_LINE> <INDENT> self.min_length = min_length <NEW_LINE> super(MinLengthValidator, self).__init__(message if message else "Not allowed length") <NEW_LINE> <DEDENT> def validate(self, value): <NEW_LINE> <INDENT> ret... | Raises a ValidationError with a code of 'min_length' if length of value
is less than min_length. | 62598f9dd6c5a102081e1f1e |
class SolutionRefer: <NEW_LINE> <INDENT> def reverseString(self, s: List[str]) -> None: <NEW_LINE> <INDENT> s.reverse() | I think that this way is abusing with python
196ms, 18.1MB (99.1%, 92%) | 62598f9d4a966d76dd5eecba |
class generalized_forward_backward(solver): <NEW_LINE> <INDENT> def __init__(self, lambda_=1, *args, **kwargs): <NEW_LINE> <INDENT> super(generalized_forward_backward, self).__init__(*args, **kwargs) <NEW_LINE> self.lambda_ = lambda_ <NEW_LINE> <DEDENT> def _pre(self, functions, x0): <NEW_LINE> <INDENT> if self.lambda_... | Generalized forward-backward proximal splitting algorithm.
This algorithm solves convex optimization problems composed of the sum of
any number of non-smooth (or smooth) functions.
See generic attributes descriptions of the
:class:`pyunlocbox.solvers.solver` base class.
Parameters
----------
lambda_ : float, optiona... | 62598f9d10dbd63aa1c7098f |
class DeltaCSMRatioFunction(AbstractRatioFunction): <NEW_LINE> <INDENT> ALLOWED_FUNCTIONS = {"smootherstep": ["delta_csm_min", "delta_csm_max"]} <NEW_LINE> def smootherstep(self, vals): <NEW_LINE> <INDENT> return smootherstep(vals, edges=[self.__dict__["delta_csm_min"], self.__dict__["delta_csm_max"]]) | Concrete implementation of a series of ratio functions applied to differences of
continuous symmetry measures (DeltaCSM).
Uses "finite" ratio functions.
See the following reference for details:
ChemEnv: a fast and robust coordination environment identification tool,
D. Waroquiers et al., Acta Cryst. B 76, 683 (2020). | 62598f9d1b99ca400228f41a |
class Article2Tag(models.Model): <NEW_LINE> <INDENT> nid = models.AutoField(primary_key=True) <NEW_LINE> article = models.ForeignKey(to="Article", to_field="nid") <NEW_LINE> tag = models.ForeignKey(to="Tag", to_field="nid") <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return "{}-{}".format(self.article.title, self... | 文章和标签的多对多关系表 | 62598f9d63d6d428bbee258b |
class GetTypeInfo_result(object): <NEW_LINE> <INDENT> thrift_spec = ( (0, TType.STRUCT, 'success', (TGetTypeInfoResp, TGetTypeInfoResp.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, success=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot... | Attributes:
- success | 62598f9d0c0af96317c5615c |
class Loader(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.module = None <NEW_LINE> <DEDENT> def find_module(self, name, path): <NEW_LINE> <INDENT> sys.meta_path.remove(self) <NEW_LINE> try: <NEW_LINE> <INDENT> self.module = importlib.import_module(name) <NEW_LINE> <DEDENT> finally: <NEW_LIN... | A class that import a module like normal and then passed to a hacker
object that gets to do whatever it wants to the module. Then the return
value from the hack call is put into sys.modules. | 62598f9dcc0a2c111447ade5 |
class BatterStats(mlbgame.object.Object): <NEW_LINE> <INDENT> def nice_output(self): <NEW_LINE> <INDENT> if self.rbi > 0: <NEW_LINE> <INDENT> if self.hr > 0: <NEW_LINE> <INDENT> return "%s - %i for %i with %i RBI and %i Home Runs" % (self.name_display_first_last, self.h, self.ab, self.rbi, self.hr) <NEW_LINE> <DEDENT> ... | Holds stats information for a batter.
Check out `statmap.py` for a full list of object properties. | 62598f9dc432627299fa2db2 |
class PlayScreen(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.map = Map() <NEW_LINE> self.map.genere() <NEW_LINE> self.commande = Commandes() <NEW_LINE> <DEDENT> def show(self, fenetre): <NEW_LINE> <INDENT> self.map.show(fenetre) <NEW_LINE> self.commande.show(fenetre) | classe de l'ecran de jeu | 62598f9d8e7ae83300ee8e79 |
class Message(_MsgBase): <NEW_LINE> <INDENT> def __new__(cls, msg_id, symbol, location, msg, confidence): <NEW_LINE> <INDENT> return _MsgBase.__new__( cls, msg_id, symbol, msg, msg_id[0], MSG_TYPES[msg_id[0]], confidence, *location ) <NEW_LINE> <DEDENT> def format(self, template): <NEW_LINE> <INDENT> return template.fo... | This class represent a message to be issued by the reporters | 62598f9da8370b77170f01bd |
class TestCurrentArtist100(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.chart = billboard.ChartData('artist-100') <NEW_LINE> <DEDENT> def test_date(self): <NEW_LINE> <INDENT> self.assertIsNotNone(self.chart.date) <NEW_LINE> <DEDENT> def test_ranks(self): <NEW_LINE> <INDENT> ranks = ... | Checks that the ChartData object for the current Artist 100 chart has
entries and instance variables that are valid and reasonable. Does not test
whether the data is actually correct.
The Artist 100 chart is special in that it does not provide titles. | 62598f9db7558d5895463409 |
class GoogleCloudDialogflowV2IntentMessageListSelectItem(_messages.Message): <NEW_LINE> <INDENT> description = _messages.StringField(1) <NEW_LINE> image = _messages.MessageField('GoogleCloudDialogflowV2IntentMessageImage', 2) <NEW_LINE> info = _messages.MessageField('GoogleCloudDialogflowV2IntentMessageSelectItemInfo',... | An item in the list.
Fields:
description: Optional. The main text describing the item.
image: Optional. The image to display.
info: Required. Additional information about this option.
title: Required. The title of the list item. | 62598f9d92d797404e388a53 |
class Item(): <NEW_LINE> <INDENT> def __init__(self, name, description): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.description = description <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "=====\n{}\n=====\n{}\n".format(self.name, self.description) | The base class for all items | 62598f9d2c8b7c6e89bd35ab |
class FoundryComment(BaseComment): <NEW_LINE> <INDENT> in_reply_to = models.ForeignKey('self', null=True, blank=True, db_index=True) <NEW_LINE> moderated = models.BooleanField(default=False, db_index=True) <NEW_LINE> @property <NEW_LINE> def replies(self): <NEW_LINE> <INDENT> return FoundryComment.objects.filter(in_rep... | Custom comment class | 62598f9d6aa9bd52df0d4ca7 |
class Placeholders(object): <NEW_LINE> <INDENT> class Collection(object): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> class KeyValueMappedCollectionProxy(object): <NEW_LINE> <INDENT> pass | Fake classes to use as placeholders.
The purpose of this is for the dummy items, so they can be replaced
once the parent item is expanded. | 62598f9de76e3b2f99fd8811 |
class CloudAdminAllocationRequest(CloudAdminRequestDetailMixin, APIView): <NEW_LINE> <INDENT> model = AllocationRequest <NEW_LINE> serializer_class = ResolveAllocationRequestSerializer <NEW_LINE> def approve(self, pending_request): <NEW_LINE> <INDENT> membership = pending_request.membership <NEW_LINE> membership.alloca... | Manage user allocation requests | 62598f9da17c0f6771d5c015 |
class Router(_messages.Message): <NEW_LINE> <INDENT> bgp = _messages.MessageField('RouterBgp', 1) <NEW_LINE> bgpPeers = _messages.MessageField('RouterBgpPeer', 2, repeated=True) <NEW_LINE> creationTimestamp = _messages.StringField(3) <NEW_LINE> description = _messages.StringField(4) <NEW_LINE> id = _messages.IntegerFie... | Router resource.
Fields:
bgp: BGP information specific to this router.
bgpPeers: BGP information that needs to be configured into the routing
stack to establish the BGP peering. It must specify peer ASN and either
interface name, IP, or peer IP. Please refer to RFC4273.
creationTimestamp: [Output Only] C... | 62598f9df7d966606f747dc2 |
class fudge_pow(Both): <NEW_LINE> <INDENT> def __init__(self, both, fudge, pow_, s2c): <NEW_LINE> <INDENT> self.hr_mod = both.hr_mod <NEW_LINE> self.resp_mod = both.resp_mod <NEW_LINE> self.n_states = both.hr_mod.n_states <NEW_LINE> self.dtype = both.dtype <NEW_LINE> self.P_Y = both.P_Y <NEW_LINE> self.fudge = fudge <N... | Variant of class "Both" with parameters fudge and pow.
"fudge" multiplies all probabilities for normal states, and the
heart rate component of the likelihood is raised to power "pow" | 62598f9d097d151d1a2c0e02 |
class Trajectory_of_cannon: <NEW_LINE> <INDENT> def __init__(self,time_step=0.05,X=0,Y=0,initial_speed=700,initial_angel=30,a=0.0065,α=2.5,V_wind=-4.5): <NEW_LINE> <INDENT> self.a=a <NEW_LINE> self.α=α <NEW_LINE> self.V_wind=V_wind <NEW_LINE> self.theta=initial_angel <NEW_LINE> self.Vx=[math.cos(self.theta*math.pi/180... | Calculate the trajectory of the cannon shell including
both air drag and the reduced air density at high altitudes. | 62598f9d32920d7e50bc5e31 |
class ApiregistrationV1beta1ServiceReference(object): <NEW_LINE> <INDENT> swagger_types = { 'name': 'str', 'namespace': 'str' } <NEW_LINE> attribute_map = { 'name': 'name', 'namespace': 'namespace' } <NEW_LINE> def __init__(self, name=None, namespace=None): <NEW_LINE> <INDENT> self._name = None <NEW_LINE> self._namespa... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598f9da219f33f346c65f4 |
class Homepage(base.GSoCRequestHandler): <NEW_LINE> <INDENT> def templatePath(self): <NEW_LINE> <INDENT> return 'modules/gsoc/homepage/base.html' <NEW_LINE> <DEDENT> def djangoURLPatterns(self): <NEW_LINE> <INDENT> return [ url(r'homepage/%s$' % url_patterns.PROGRAM, self, name='gsoc_homepage'), url(r'program/home/%s$'... | Encapsulate all the methods required to generate GSoC Home page.
| 62598f9d4527f215b58e9cbe |
class SubtitleProvider(metaclass=ProviderMount): <NEW_LINE> <INDENT> _instances = [] <NEW_LINE> def __init__(self, name, address, code): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.address = address <NEW_LINE> self.code = code <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def get_providers(): <NEW_LINE> <INDENT... | Mount point for subtitles providers.
Providers implementing this reference should provide
the following attributes:
name -- Name of the provider that will be displayed
address -- Official address of the provider
code -- Unique code for this provider | 62598f9d21a7993f00c65d5d |
class InlineResponse2003DetailsFindings(object): <NEW_LINE> <INDENT> swagger_types = { 'scanners': 'InlineResponse2003DetailsFindingsScanners', 'malware': 'int', 'vulnerabilities': 'InlineResponse2003DetailsFindingsVulnerabilities' } <NEW_LINE> attribute_map = { 'scanners': 'scanners', 'malware': 'malware', 'vulnerabil... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598f9d01c39578d7f12b58 |
class DocumentAdmin(MultilingualPublishMixin, M2MPlaceholderAdmin): <NEW_LINE> <INDENT> list_display = [ 'title', 'category', 'position', 'user', 'is_on_front_page', 'languages', 'is_published', ] <NEW_LINE> def title(self, obj): <NEW_LINE> <INDENT> lang = get_language() <NEW_LINE> return get_preferred_translation_from... | Admin class for the ``Document`` model. | 62598f9d91f36d47f2230d8d |
class BibIndexItemCountTokenizer(BibIndexEmptyTokenizer): <NEW_LINE> <INDENT> def __init__(self, stemming_language = None, remove_stopwords = False, remove_html_markup = False, remove_latex_markup = False): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tokenize(self, record): <NEW_LINE> <INDENT> count = 0 <NEW_LINE>... | Returns a number of copies of a book which is owned by the library. | 62598f9da17c0f6771d5c016 |
class Locations(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=40) <NEW_LINE> description = models.CharField(max_length=200, null=True, blank=True) <NEW_LINE> lat = models.FloatField() <NEW_LINE> lon = models.FloatField() <NEW_LINE> created_at = models.DateTimeField(auto_now_add=True) <NEW_LINE> ... | Locations AKA landmarks model | 62598f9d45492302aabfc2b3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.