code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
@python_2_unicode_compatible <NEW_LINE> class Regex(BaseFilter): <NEW_LINE> <INDENT> CODE_INVALID = 'malformed' <NEW_LINE> templates = { CODE_INVALID: 'Value does not match regular expression {pattern}.', } <NEW_LINE> def __init__(self, pattern): <NEW_LINE> <INDENT> super(Regex, self).__init__() <NEW_LINE> self.regex =... | Matches a regular expression in the value.
IMPORTANT: This filter returns a LIST of all sequences in the
input value that matched the regex!
IMPORTANT: This Filter uses the ``regex`` library, which behaves
slightly differently than Python's ``re`` library.
If you've never used ``regex`` before, try it; you'll never ... | 62598f7e21a7993f00c65949 |
class AsyncPopen2(object): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.args = args <NEW_LINE> self.kwargs = kwargs <NEW_LINE> self.on_output = Event() <NEW_LINE> self.on_end = Event() <NEW_LINE> self.pipe = None <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> self.kwargs["st... | Adapter for the legacy AsyncPopen | 62598f7ed10714528d69d8a8 |
class KoshGenericObjectFromFile(object): <NEW_LINE> <INDENT> def __init__(self, *args, **kwds): <NEW_LINE> <INDENT> self.args = args <NEW_LINE> self.kwds = kwds <NEW_LINE> self.file_obj = open(*self.args, **self.kwds) <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> self.file_obj = open(*self.args, **self.k... | Kosh object pointing to a file | 62598f7e23e79379d538bed2 |
class MultiQuery(object): <NEW_LINE> <INDENT> __slots__ = ('queries', 'deferred') <NEW_LINE> def __init__(self, protocol, items): <NEW_LINE> <INDENT> items = iter(items) <NEW_LINE> defers = [] <NEW_LINE> self.queries = [] <NEW_LINE> while True: <NEW_LINE> <INDENT> r = Query(protocol, items) <NEW_LINE> self.queries.appe... | Create a Request-like object that encapsulates many Query requests
We may need to split this request into many Query rests if the list of
items to query is to big to fit in one message. | 62598f7e287bf620b6271592 |
class PlugNetworks(BaseNetworkTask): <NEW_LINE> <INDENT> def execute(self, amphora, delta): <NEW_LINE> <INDENT> LOG.debug("Plug or unplug networks for amphora id: %s", amphora[constants.ID]) <NEW_LINE> if not delta: <NEW_LINE> <INDENT> LOG.debug("No network deltas for amphora id: %s", amphora[constants.ID]) <NEW_LINE> ... | Task to plug the networks.
This uses the delta to add all missing networks/nics | 62598f7e6aa9bd52df0d48b3 |
class UserAgentParser: <NEW_LINE> <INDENT> platforms = ( ('cros', 'chromeos'), ('iphone|ios', 'iphone'), ('ipad', 'ipad'), (r'darwin|mac|os\s*x', 'macos'), ('win', 'windows'), (r'android', 'android'), (r'x11|lin(\b|ux)?', 'linux'), ('(sun|i86)os', 'solaris'), (r'nintendo\s+wii', 'wii'), ('irix', 'irix'), ('hp-?ux', 'hp... | A simple user agent parser. Used by the `UserAgent`. | 62598f7ebe383301e02531d2 |
class DeviceDetectionMiddleware(object): <NEW_LINE> <INDENT> devices = ['mobile', 'gaia', 'tablet'] <NEW_LINE> def process_request(self, request): <NEW_LINE> <INDENT> for device in self.devices: <NEW_LINE> <INDENT> if getattr(request, device.upper(), False): <NEW_LINE> <INDENT> continue <NEW_LINE> <DEDENT> qs = request... | If the user has flagged that they are on a device. Store the device. | 62598f7e498bea3a75a574fe |
class Circuit(object): <NEW_LINE> <INDENT> def __init__(self, stream, transport, downstream=None, upstream=None): <NEW_LINE> <INDENT> if stream is None: <NEW_LINE> <INDENT> self.downstream=downstream <NEW_LINE> self.upstream=upstream <NEW_LINE> self.stream=None <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.downstr... | alias for obfsproxy style syntax | 62598f7eb57a9660fecd1457 |
class Event: <NEW_LINE> <INDENT> def __init__(self, calendar:str, summary:str, start_date: str, end_date: str, creator:str): <NEW_LINE> <INDENT> _start_date = self._string_to_date_time(start_date) <NEW_LINE> _end_date = self._string_to_date_time(end_date) <NEW_LINE> self.calendar = calendar <NEW_LINE> self.summary = su... | Event model.
Store main properties of the event.
Manage to transform string to dates and calculate event duration in seconds. | 62598f7e23849d37ff850a96 |
@ddt.ddt <NEW_LINE> class TestCatalogIntegration(mixins.CatalogIntegrationMixin, CacheIsolationTestCase): <NEW_LINE> <INDENT> def assert_get_internal_api_url_value(self, expected): <NEW_LINE> <INDENT> catalog_integration = self.create_catalog_integration() <NEW_LINE> self.assertEqual(catalog_integration.get_internal_ap... | Tests covering the CatalogIntegration model. | 62598f7e0a366e3fb87dc3a5 |
class Card: <NEW_LINE> <INDENT> suit_names = ['Clubs', 'Diamonds', 'Hearts', 'Spades'] <NEW_LINE> rank_names = [None, 'A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K'] <NEW_LINE> def __init__(self, suit, rank): <NEW_LINE> <INDENT> self.suit = suit <NEW_LINE> self.rank = rank <NEW_LINE> self.suit_name = ... | Class that represents a normal playing card. | 62598f7eec188e330fdf8279 |
class PacketCaptureResultPaged(Paged): <NEW_LINE> <INDENT> _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, 'current_page': {'key': 'value', 'type': '[PacketCaptureResult]'} } <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(PacketCaptureResultPaged, self).__init__(*args, **k... | A paging container for iterating over a list of :class:`PacketCaptureResult <azure.mgmt.network.v2017_03_01.models.PacketCaptureResult>` object | 62598f7e15baa72349461958 |
class TestCenturyFromYear: <NEW_LINE> <INDENT> def test_non_100_divisible(self): <NEW_LINE> <INDENT> year = 2405 <NEW_LINE> assert (century_from_year(year)) == 25 <NEW_LINE> <DEDENT> def test_100_divisble(self): <NEW_LINE> <INDENT> year = 2000 <NEW_LINE> assert (century_from_year(year)) == 20 | Test the century_from_year() function. | 62598f7e8a349b6b43685c1d |
class APILogin(BaseResource): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> return ERR_FORB() <NEW_LINE> <DEDENT> @json_request <NEW_LINE> def post(self, json_object): <NEW_LINE> <INDENT> user_name = None <NEW_LINE> password = None <NEW_LINE> if BU.USER_NAME in json_object: <NEW_LINE> <INDENT> user_name = str(... | This Resource manages the login to the service. | 62598f7e21bff66bcd722641 |
class HDF5Sink(object): <NEW_LINE> <INDENT> def __init__(self, filename): <NEW_LINE> <INDENT> self._file = tables.openFile(filename, mode="w", title="Pymworks converted datafile") <NEW_LINE> self._filename = filename <NEW_LINE> pass <NEW_LINE> <DEDENT> def convert(self, datafile): <NEW_LINE> <INDENT> sel... | Generic datafile conversion sink.
Implement at least two functions:
__init__(self, filename)
convert(self, datafile) | 62598f7e71ff763f4b5e7146 |
class FeatureSchema(DisableableSchema): <NEW_LINE> <INDENT> pass | Base feature schema. | 62598f7e6e29344779b0003c |
class ControlPanelForm(controlpanel.RegistryEditForm): <NEW_LINE> <INDENT> id = "captcha" <NEW_LINE> label = _(u"Captcha settings") <NEW_LINE> schema = ICaptchaSettings | Captcha control panel | 62598f7e8da39b475be02bbf |
class NetDnsInfo(NetAppObject): <NEW_LINE> <INDENT> _dns_state = None <NEW_LINE> @property <NEW_LINE> def dns_state(self): <NEW_LINE> <INDENT> return self._dns_state <NEW_LINE> <DEDENT> @dns_state.setter <NEW_LINE> def dns_state(self, val): <NEW_LINE> <INDENT> if val != None: <NEW_LINE> <INDENT> self.validate('dns_stat... | Contains DNS configuration information of a Vserver
When returned as part of the output, all elements of this typedef
are reported, unless limited by a set of desired attributes
specified by the caller.
<p>
When used as input to specify desired attributes to return,
omitting a given element indicates that it shall not ... | 62598f7ed4950a0f3b110b22 |
class ConfigLoader(Loader): <NEW_LINE> <INDENT> def __init__(self, config_file_path): <NEW_LINE> <INDENT> super(ConfigLoader, self).__init__(config_file_path) <NEW_LINE> for key, value in self.load(): <NEW_LINE> <INDENT> disp('{0} = {1}'.format(key, value)) <NEW_LINE> GlobalVariables.get_instance().set(key, value) | This class loads the file '.config'.
Read the file and put values in GlobalVariables | 62598f7e0383005118f6d0dc |
class Command(BaseCommand): <NEW_LINE> <INDENT> option_list = BaseCommand.option_list + ( make_option('-l', '--list', action='store_true', dest='list', default=False, help=_("List all of the available statistics."), ), make_option('-c', '--calculate', action='store', type='string', dest='calculate', default=None, help=... | The management command to handle statistic-related function calls. | 62598f7ea4f1c619b294dfc7 |
class SessionView(APIView): <NEW_LINE> <INDENT> permission_classes = (IsSameSessionAsLoggedIn, ) <NEW_LINE> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> if "pk" not in kwargs: <NEW_LINE> <INDENT> return HttpResponseBadRequest() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> session_key = kwargs["pk"] <NE... | View that handles session retrieving and session destroying. | 62598f7e94891a1f408b93dc |
class ConfigAlertasForm(forms.Form): <NEW_LINE> <INDENT> alertas = forms.ChoiceField(label='Alertas Activas', choices=choices.ALERTAS_CONFIG, initial='on') <NEW_LINE> def save(self, usuario): <NEW_LINE> <INDENT> cd = self.cleaned_data <NEW_LINE> usuarioPerfil = UsuarioPerfil.objects.get(user=usuario) <NEW_LINE> usuario... | Formulario de configuración global de las alertas | 62598f7e9b70327d1c57e77f |
class Assert: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._logger = Logging.get(2) <NEW_LINE> <DEDENT> def true(self, value, message): <NEW_LINE> <INDENT> if not value: <NEW_LINE> <INDENT> self._fail("%s (value was not True)" % (message)) <NEW_LINE> <DEDENT> <DEDENT> def false(self, value, message)... | Test helper | 62598f7e07d97122c421667c |
class _JunitRecorder(object): <NEW_LINE> <INDENT> def __init__(self, opts): <NEW_LINE> <INDENT> self._opts = opts <NEW_LINE> self._results = {} <NEW_LINE> self._skipped = [] <NEW_LINE> self._timedout = [] <NEW_LINE> self._start_times = {} <NEW_LINE> self._lock = threading.Lock() <NEW_LINE> <DEDENT> def start(self, case... | Record test results to Junit xml. | 62598f7ed10714528d69d8aa |
class CloudSigmaFirewallPolicy(object): <NEW_LINE> <INDENT> def __init__(self, id, name, rules): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.name = name <NEW_LINE> self.rules = rules if rules else [] <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.__repr__() <NEW_LINE> <DEDENT> def __repr__(... | Represents a CloudSigma firewall policy. | 62598f7e07d97122c421667d |
class Config(object): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.attrSkipList = [] <NEW_LINE> self.fileList = [] <NEW_LINE> self.localSkipList = [] <NEW_LINE> self.programName = None <NEW_LINE> self.programVersion = None <NEW_LINE> for (key, val) in kwargs.iteritems(): <NEW_LINE> ... | Hold configuration info useful throughout the exception handling
classes. This prevents having to pass a bunch of arguments to a
bunch of different functions. A Config instance must be created
before creating an ExceptionHandler instance. | 62598f7e23e79379d538bed4 |
class PieLexer(Lexer): <NEW_LINE> <INDENT> IGNORED_TOKES = ["T_WHITESPACE", "T_COMMENT", "T_INLINE_COMMENT", "T_DOC_COMMENT"] <NEW_LINE> def __init__(self, token_regexs, names): <NEW_LINE> <INDENT> self.token_regexs = token_regexs <NEW_LINE> self.names = names <NEW_LINE> self.rex = regex.PieLexingOrExpression(token_reg... | Special lexer for php files, adds processing of inline html content | 62598f7e76d4e153a661c5ed |
class LinkChecker: <NEW_LINE> <INDENT> def __init__(self, guest_checker, guest_list): <NEW_LINE> <INDENT> self.guest_checker = guest_checker <NEW_LINE> self.guest_list = guest_list <NEW_LINE> <DEDENT> def check_link(self, link_dic): <NEW_LINE> <INDENT> if 'type' not in link_dic: <NEW_LINE> <INDENT> link_dic['type'] = d... | Checks the consistency of the information used to create a link between two guests (that the guests and nics
exists mostly).
Attributes:
guest_checker(GuestChecker): Instance of the GuestChecker for this laboratory
guest_list(list: int, Guest): Dictionary with guests and their ids | 62598f7e73bcbd0ca4bc9c2b |
class ClientMethod(object, metaclass=ClientMethodMetaClass): <NEW_LINE> <INDENT> http_method_names = ['POST', 'GET', 'PUT', 'DELETE'] <NEW_LINE> category = None <NEW_LINE> PostForm = None <NEW_LINE> GetForm = None <NEW_LINE> PutForm = None <NEW_LINE> DeleteForm = None <NEW_LINE> url_pattern = None <NEW_LINE> names = {}... | View class based off of django.views.generic.View, main difference is dispatch doesn't
pass request, args and kwargs to methods, since they are already attributes of class instance | 62598f7e8a349b6b43685c1f |
class ElementDescription(object): <NEW_LINE> <INDENT> def __init__(self, follow=[], use_element='Description'): <NEW_LINE> <INDENT> self.follow = follow <NEW_LINE> self.use_element = use_element <NEW_LINE> <DEDENT> def __get__(self, instance, owner=None): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> element = instance.... | Descriptor class for accessing a top-level Description element.
Description elements contain a CDATA comment for some type of
container element, such as a Tag or Module.
:param follow: A List of elements which must come before the description element. This is use when creating a description to confirm it is place in... | 62598f7e0a366e3fb87dc3a7 |
class ClusterInstallingProgress(Resource): <NEW_LINE> <INDENT> def get(self, cluster_id): <NEW_LINE> <INDENT> progress_result = {} <NEW_LINE> with database.session() as session: <NEW_LINE> <INDENT> cluster = session.query(ModelCluster).filter_by(id=cluster_id) .first() <N... | Get cluster installing progress information. | 62598f7e8a43f66fc4bf1b5b |
class BetaGreeterStub(object): <NEW_LINE> <INDENT> def SayHello(self, request, timeout, metadata=None, with_call=False, protocol_options=None): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> SayHello.future = None <NEW_LINE> def getUas(self, request, timeout, metadata=None, with_call=False, protoco... | The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This class was generated
only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0. | 62598f7e4e696a045264daee |
class UserProfile(AbstractUser): <NEW_LINE> <INDENT> GENDER_CHOICES= ( ("male", "男"), ("female", "女") ) <NEW_LINE> nike_name = models.CharField(max_length=50,verbose_name="昵称",default="",null=True,blank=True) <NEW_LINE> birthday = models.DateField(verbose_name="生日",null=True,blank=True) <NEW_LINE> gender = models.CharF... | 扩展用户表 | 62598f7e71ff763f4b5e7148 |
class Clip(OnnxOpConverter): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def convert_attributes(inputs, attr, params): <NEW_LINE> <INDENT> convert = AttrCvt("clip", transforms={"min": "a_min", "max": "a_max"}) <NEW_LINE> return convert(inputs, attr, params) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def _impl_v1(cls,... | Operator converter for Clip. | 62598f7e0383005118f6d0dd |
class _IfdEntries(object): <NEW_LINE> <INDENT> def __init__(self, entries): <NEW_LINE> <INDENT> super(_IfdEntries, self).__init__() <NEW_LINE> self._entries = entries <NEW_LINE> <DEDENT> def __contains__(self, key): <NEW_LINE> <INDENT> return self._entries.__contains__(key) <NEW_LINE> <DEDENT> def __getitem__(self, key... | Image File Directory for a TIFF image, having mapping (dict) semantics
allowing "tag" values to be retrieved by tag code. | 62598f7e287bf620b6271595 |
class DenseCRFParams(object): <NEW_LINE> <INDENT> def __init__( self, alpha=160.0, beta=3.0, gamma=3.0, spatial_ker_weight=3.0, bilateral_ker_weight=5.0, ): <NEW_LINE> <INDENT> self.alpha = alpha <NEW_LINE> self.beta = beta <NEW_LINE> self.gamma = gamma <NEW_LINE> self.spatial_ker_weight = spatial_ker_weight <NEW_LINE>... | Parameters for the DenseCRF model | 62598f7ecad5886f8bdc4d01 |
class FoodViewSet(viewsets.ReadOnlyModelViewSet): <NEW_LINE> <INDENT> queryset = Food.objects.all() <NEW_LINE> serializer_class = FoodSerializer | API endpoint that allows groups to be viewed or edited. | 62598f7ea05bb46b3848a257 |
class Domain: <NEW_LINE> <INDENT> def __init__(self, connection, domain): <NEW_LINE> <INDENT> self.connection = connection <NEW_LINE> self.domain = domain <NEW_LINE> <DEDENT> def name(self): <NEW_LINE> <INDENT> return queue.executeInThread(self.domain.name) <NEW_LINE> <DEDENT> def create(self): <NEW_LINE> <INDENT> retu... | I am a wrapper around a libvirt Domain object | 62598f7e8e05c05ec3f6eb35 |
class PushDataInfo(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.StreamName = None <NEW_LINE> self.AppName = None <NEW_LINE> self.ClientIp = None <NEW_LINE> self.ServerIp = None <NEW_LINE> self.VideoFps = None <NEW_LINE> self.VideoSpeed = None <NEW_LINE> self.AudioFps = None <NEW_LINE... | 推流数据信息
| 62598f7e9b70327d1c57e780 |
class ModbusBaseRequestHandler(SocketServer.BaseRequestHandler): <NEW_LINE> <INDENT> def setup(self): <NEW_LINE> <INDENT> _logger.debug("Client Connected [%s:%s]" % self.client_address) <NEW_LINE> self.running = True <NEW_LINE> self.framer = self.server.framer(self.server.decoder) <NEW_LINE> self.server.threads.append(... | Implements the modbus server protocol
This uses the socketserver.BaseRequestHandler to implement
the client handler. | 62598f7e8da39b475be02bc1 |
class TestDataSpeed(ProxyDataFlow): <NEW_LINE> <INDENT> def __init__(self, ds, size=5000): <NEW_LINE> <INDENT> super(TestDataSpeed, self).__init__(ds) <NEW_LINE> self.test_size = size <NEW_LINE> <DEDENT> def get_data(self): <NEW_LINE> <INDENT> self.start_test() <NEW_LINE> for dp in self.ds.get_data(): <NEW_LINE> <INDEN... | Test the speed of some DataFlow | 62598f7e29b78933be269dc9 |
class Solution: <NEW_LINE> <INDENT> def kClosestNumbers(self, A, target, k): <NEW_LINE> <INDENT> if not A or k < 0 or not str(target).isdigit(): <NEW_LINE> <INDENT> return [] <NEW_LINE> <DEDENT> l = len(A) <NEW_LINE> if k > l: <NEW_LINE> <INDENT> return [] <NEW_LINE> <DEDENT> start = 0 <NEW_LINE> end = l - 1 <NEW_LINE>... | @param A: an integer array
@param target: An integer
@param k: An integer
@return: an integer array | 62598f7ef8510a7c17d7de66 |
class enableTable_args(object): <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRING, 'tableName', None, None, ), ) <NEW_LINE> def __init__(self, tableName=None,): <NEW_LINE> <INDENT> self.tableName = tableName <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBinaryProtocol.TB... | Attributes:
- tableName: name of the table | 62598f7e63b5f9789fe84b4e |
class TestPrebuildCcLibrary(blade_test.TargetTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.doSetUp('test_prebuild_cc_library') <NEW_LINE> <DEDENT> def testGenerateRules(self): <NEW_LINE> <INDENT> self.all_targets = self.blade.analyze_targets() <NEW_LINE> self.rules_buf = self.blade.generate_build... | Test cc_library | 62598f7e26068e7796d4c337 |
class ExprSetModeType(Enum): <NEW_LINE> <INDENT> Relative = 49 <NEW_LINE> Typical = 50 <NEW_LINE> def __int__(self): <NEW_LINE> <INDENT> return self.value <NEW_LINE> <DEDENT> def __char__(self): <NEW_LINE> <INDENT> return chr(self.value) | 日期表达式设置类型类型 | 62598f7e1f5feb6acb162611 |
class SearchEngine(object): <NEW_LINE> <INDENT> searchable_fields = { models.Project: ["name", "description"], models.Story: ["title", "description"], models.Task: ["title"], models.Comment: ["content"], models.User: ['full_name', 'email'] } <NEW_LINE> @abc.abstractmethod <NEW_LINE> def projects_query(self, q, sort_dir... | This is an interface that should be implemented by search engines.
| 62598f7e07d97122c421667e |
class SmomPipeline(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def from_crawler(cls, crawler): <NEW_LINE> <INDENT> cls.DB_URL = settings.get('MONGO_DB_URI') <NEW_LINE> cls.DB_NAME = settings.get('MONGO_DB_NAME') <NEW_LINE> return cls() <NEW_LINE> <DEDENT> def open_spider(self, spider): <NEW_LINE> <INDENT> self... | 将item写入MongoDB | 62598f7e8e71fb1e983bb494 |
class FormControl(AnchorLayout): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(FormControl,self).__init__(**kwargs) <NEW_LINE> c= LoginControl() <NEW_LINE> c.setparent(self) <NEW_LINE> self.add_widget(c) <NEW_LINE> <DEDENT> def changewidget(self,to): <NEW_LINE> <INDENT> if to == 'AfterLogi... | classdocs | 62598f7e76d4e153a661c5ef |
class EmphasizedText(Text): <NEW_LINE> <INDENT> def __init__(self, text, **kwargs): <NEW_LINE> <INDENT> super(EmphasizedText, self).__init__(text, tag_name="strong", **kwargs) | Text that should have **emphasis** on it. | 62598f7e507cdc57c63a4769 |
class ConnectionMonitorWorkspaceSettings(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(ConnectionMonitorWorkspaceSettings, self).__init__(**kwargs) <NEW_LI... | Describes the settings for producing output into a log analytics workspace.
:param workspace_resource_id: Log analytics workspace resource ID.
:type workspace_resource_id: str | 62598f7eac7a0e7691f71ef6 |
class UserProfile(AbstractBaseUser, PermissionsMixin): <NEW_LINE> <INDENT> email = models.EmailField(unique=True) <NEW_LINE> timezone = models.CharField(max_length=255) <NEW_LINE> known_as = models.CharField(max_length=20, help_text="Maximum of 20 characters.") <NEW_LINE> is_staff = models.BooleanField(default=False) <... | A class representing a user of the application | 62598f7e73bcbd0ca4bc9c2d |
class ThermostatSetpointThermalComfortFangerSingleHeatingOrCooling(DataObject): <NEW_LINE> <INDENT> _schema = {'extensible-fields': OrderedDict(), 'fields': OrderedDict([(u'name', {'name': u'Name', 'pyname': u'name', 'required-field': True, 'autosizable': False, 'autocalculatable': False, 'type': u'alpha'}), (u'fanger ... | Corresponds to IDD object `ThermostatSetpoint:ThermalComfort:Fanger:SingleHeatingOrCooling`
Used for heating and cooling thermal comfort control with a single setpoint. The PMV
setpoint can be scheduled and varied throughout the simulation for both heating and
cooling. | 62598f7ee76e3b2f99fd8411 |
class LoginForm(FlaskForm): <NEW_LINE> <INDENT> username = StringField('username_label', validators=[InputRequired(message="Username Required")]) <NEW_LINE> password = PasswordField('password_label', validators=[InputRequired(message="Password Required"), invalid_credentials]) <NEW_LINE> submit_button = SubmitField('Lo... | Login form | 62598f7ed99f1b3c44d0508a |
class PackageEvent(object): <NEW_LINE> <INDENT> implements(IPackageEvent) <NEW_LINE> def __init__(self, index_manager, path=None, name=None, version=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.version = version <NEW_LINE> self.im = index_manager <NEW_LINE> self.path = path <NEW_LINE> if self.name is Non... | Baseclass for pacakage events | 62598f7e711fe17d825e00c6 |
class DatasetFolder(object): <NEW_LINE> <INDENT> def __init__(self, root, loader, extensions, transform=None, target_transform=None): <NEW_LINE> <INDENT> self.root = root <NEW_LINE> self.transform = transform <NEW_LINE> self.target_transform = target_transform <NEW_LINE> file_list = os.path.join(root, "val_list.txt") <... | A generic data loader where the samples are arranged in this way: ::
root/class_x/xxx.ext
root/class_x/xxy.ext
root/class_x/xxz.ext
root/class_y/123.ext
root/class_y/nsdf3.ext
root/class_y/asd932_.ext
Args:
root (string): Root directory path.
loader (callable): A function to load a sa... | 62598f7e66656f66f7d59dd1 |
class CatalogTable(Table): <NEW_LINE> <INDENT> _filename = os.path.join(get_datadir(),'tables.yaml') <NEW_LINE> _section = 'catalog' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(CatalogTable,self).__init__(self._filename,self._section) | Object for managing the objects table. | 62598f7ed99f1b3c44d0508b |
class MNISTFashionMNISTFontDataset(BaseDataset): <NEW_LINE> <INDENT> def __init__(self, opt, idx=None): <NEW_LINE> <INDENT> if idx is None: <NEW_LINE> <INDENT> h5_name = "train_MNIST_fashionMNIST_font.h5" <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> h5_name = 'train_MNIST_unique_fashionMNIST_and_font_uniform_{:d}.h5'.... | A dataset class for label-image dataset.
It assumes that the directory '/path/to/data/train' contains image pairs in the form of {A,B}.
During test time, you need to prepare a directory '/path/to/data/test'. | 62598f7ec432627299fa29af |
class Test: <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.d = test.Daemon() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> self.d.shutdown() <NEW_LINE> <DEDENT> def test_simple(self): <NEW_LINE> <INDENT> url = self.d.p("200:b@100") <NEW_LINE> r = requests.put(url) <NEW_LINE> assert r.status... | Testing the requests module with
a pathod instance started for
each test. | 62598f7ecad5886f8bdc4d02 |
class MultiDict(DictMixin): <NEW_LINE> <INDENT> def __init__(self, *a, **k): <NEW_LINE> <INDENT> self.dict = dict() <NEW_LINE> for k, v in item_iterator(dict(*a, **k)): <NEW_LINE> <INDENT> self[k] = v <NEW_LINE> <DEDENT> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> return len(self.dict) <NEW_LINE> <DEDENT> def __ite... | A dict that remembers old values for each key | 62598f7e287bf620b6271597 |
class Rdb(Tab): <NEW_LINE> <INDENT> _format_name = 'rdb' <NEW_LINE> _io_registry_format_aliases = ['rdb'] <NEW_LINE> _io_registry_suffix = '.rdb' <NEW_LINE> _description = 'Tab-separated with a type definition header line' <NEW_LINE> header_class = RdbHeader <NEW_LINE> data_class = RdbData | Tab-separated file with an extra line after the column definition line that
specifies either numeric (N) or string (S) data.
See: https://compbio.soe.ucsc.edu/rdb/
Example::
col1 <tab> col2 <tab> col3
N <tab> S <tab> N
1 <tab> 2 <tab> 5 | 62598f7e8e05c05ec3f6eb36 |
class AddForm(base.AddForm): <NEW_LINE> <INDENT> form_fields = form.Fields(ICountdownPortlet) <NEW_LINE> form_fields['image'].custom_widget = UberSelectionWidget <NEW_LINE> form_fields['date'].custom_widget = DateWidget <NEW_LINE> def create(self, data): <NEW_LINE> <INDENT> return Assignment(**data) | Portlet add form.
| 62598f7ea79ad16197769a3e |
class GetExecSummary_args(object): <NEW_LINE> <INDENT> def __init__(self, req=None,): <NEW_LINE> <INDENT> self.req = req <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: <NEW_LINE... | Attributes:
- req | 62598f7e63b5f9789fe84b50 |
class SetProjectTemplateTransMemoriesDto(object): <NEW_LINE> <INDENT> swagger_types = { 'trans_memories': 'list[SetProjectTemplateTransMemoryDto]', 'target_lang': 'str', 'workflow_step': 'IdReference' } <NEW_LINE> attribute_map = { 'trans_memories': 'transMemories', 'target_lang': 'targetLang', 'workflow_step': 'workfl... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598f7e16aa5153ce3ffede |
class V1Toleration(object): <NEW_LINE> <INDENT> swagger_types = { 'effect': 'str', 'key': 'str', 'operator': 'str', 'toleration_seconds': 'int', 'value': 'str' } <NEW_LINE> attribute_map = { 'effect': 'effect', 'key': 'key', 'operator': 'operator', 'toleration_seconds': 'tolerationSeconds', 'value': 'value' } <NEW_LINE... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598f7e1f5feb6acb162613 |
class IS_PERSON_GENDER(IS_IN_SET): <NEW_LINE> <INDENT> def validate(self, value, record_id=None): <NEW_LINE> <INDENT> if value == 4: <NEW_LINE> <INDENT> return value <NEW_LINE> <DEDENT> return super(IS_PERSON_GENDER, self).validate(value) | Special validator for pr_person.gender and other fields
referring to s3db.pr_gender_opts: accepts the Other-option ("O")
even if it is not in the selectable set. | 62598f7e94891a1f408b93de |
class filter: <NEW_LINE> <INDENT> def __init__(self, mode, f, g=0, q=1): <NEW_LINE> <INDENT> self.width = len(FFT_X) <NEW_LINE> self.mode = mode <NEW_LINE> self.f = f <NEW_LINE> self.g = g <NEW_LINE> self.q = q <NEW_LINE> self.w = 10 <NEW_LINE> <DEDENT> def getProps(self): <NEW_LINE> <INDENT> print('Filter Properties:'... | Filter class, including lowpass, bandpass, and high pass options. | 62598f7e23849d37ff850a9c |
class CCSIDConfig: <NEW_LINE> <INDENT> default_ccsid = 1208 <NEW_LINE> default_encoding = 'utf8' <NEW_LINE> encoding_map = { 273: 'cp273', 367: 'ascii', 424: 'cp424', 437: 'cp437', 500: 'cp500', 737: 'cp737', 775: 'cp775', 813: 'iso8859_7', 819: 'iso8859_1', 850: 'cp850', 852: 'cp852', 855: 'cp855', 857: 'cp857', 860: ... | This is a mapping of CCSID to character encodings used by Python, e.g. CCSID 1208 -> utf-8 in Python.
In runtime, if a given CCSID cannot be looked up, Zato will assume 1208 = UTF-8.
Details: https://en.wikipedia.org/wiki/CCSID | 62598f7ebaa26c4b54d4ec92 |
class Person(IndexEntry, Concept): <NEW_LINE> <INDENT> forename = models.CharField( _('forename'), max_length=70) <NEW_LINE> surname = models.CharField( _('surname'), max_length=70) <NEW_LINE> genname = models.CharField( _('generational name'), max_length=30, blank=True, help_text=ugettext_lazy('e.g. "II." or "the Thir... | The Person model represents a single individual listed or
mentioned in the index of the Sbr Regesten. | 62598f7e711fe17d825e00c8 |
class RestponderRequestValidationError(Exception): <NEW_LINE> <INDENT> pass | Invalid request for a Restponder | 62598f7ed6c5a102081e1b27 |
class OpMaskedSelect(Operator): <NEW_LINE> <INDENT> Input = InputSlot() <NEW_LINE> Mask = InputSlot() <NEW_LINE> Output = OutputSlot() <NEW_LINE> def setupOutputs(self): <NEW_LINE> <INDENT> self.Output.meta.assignFrom( self.Input.meta ) <NEW_LINE> self.Output.meta.updateFrom( self.Mask.meta ) <NEW_LINE> self.Output.met... | For pixels where Mask == True, Output is a copy of the Input.
For all other pixels, Output is 0. | 62598f7e66656f66f7d59dd3 |
class _CommandsTranslations(dict): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> commands_path = GUNGAME_TRANSLATION_PATH / 'commands' <NEW_LINE> self._add_contents(commands_path / 'core.ini') <NEW_LINE> for directory in commands_path.dirs(): <NEW_LINE> <INDENT> for file in d... | Class used to store commands translations. | 62598f7ebde94217f3707356 |
class World(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.state = {} <NEW_LINE> <DEDENT> def update(self, newState): <NEW_LINE> <INDENT> self.state = newState | docstring for World | 62598f7e9b70327d1c57e784 |
class GoodRelativeUrlTestCase(UtilsMixin, unittest.TestCase): <NEW_LINE> <INDENT> def test_all(self): <NEW_LINE> <INDENT> cfg = config.get_config() <NEW_LINE> if check_issue_3104(cfg): <NEW_LINE> <INDENT> self.skipTest('https://pulp.plan.io/issues/3104') <NEW_LINE> <DEDENT> self.check_issue_2277(cfg) <NEW_LINE> self.ch... | Like :class:`GoodMirrorlistTestCase`, but pass ``relative_url`` too. | 62598f7ed4950a0f3b110b25 |
@admin.register(Category) <NEW_LINE> class CategoryAdmin(ImportExportMixin, admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('name', 'get_organization_count') <NEW_LINE> search_fields = ('name',) <NEW_LINE> def get_organization_count(self, obj): <NEW_LINE> <INDENT> return obj.organization_count <NEW_LINE> <DEDENT... | Admin View for Category | 62598f7ed10714528d69d8b0 |
class Merchant(Base): <NEW_LINE> <INDENT> __tablename__ = 'merchant' <NEW_LINE> nid = Column(Integer, primary_key=True) <NEW_LINE> domain = Column(CHAR(8), index=True) <NEW_LINE> business_mobile = Column(CHAR(11)) <NEW_LINE> qq = Column(CHAR(16)) <NEW_LINE> backend_mobile = Column(CHAR(11)) <NEW_LINE> county_id = Colum... | 商户 | 62598f7e1d351010ab8f351f |
class JoinBisectorOperator(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = 'mesh.joinbisectorline' <NEW_LINE> bl_label = 'Join Bisector line' <NEW_LINE> bl_description = "Join two points and bisect all the mesh" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> def main(self, context): <NEW_LINE> <INDENT> o... | une dos puntos y divide la malla | 62598f7ebe383301e02531da |
class ITodo(form.Schema): <NEW_LINE> <INDENT> description = Text( title=u"Long description", required=False ) <NEW_LINE> initiator = TextLine( title=_(u"Initiator"), description=_("The user (or group) who requested this task"), required=False, ) <NEW_LINE> assignee = TextLine( title=_(u"Assignee"), description=_("A use... | Todo schema
| 62598f7e6fece00bbaccb369 |
class SBS_CMD_BQ_DA_STATUS1(DecoratedEnum): <NEW_LINE> <INDENT> CellVoltage0 = 0x000 <NEW_LINE> CellVoltage1 = 0x010 <NEW_LINE> CellVoltage2 = 0x020 <NEW_LINE> CellVoltage3 = 0x030 <NEW_LINE> BATVoltage = 0x040 <NEW_LINE> PACKVoltage = 0x050 <NEW_LINE> CellCurrent0 = 0x060 <NEW_LINE> CellCurrent1 = 0x... | DAStatus1 sub-command fields used in BQ40 family SBS chips
| 62598f7e73bcbd0ca4bc9c32 |
class RecordTask: <NEW_LINE> <INDENT> def __init__(self, hardware_source: HardwareSource, frame_parameters: FrameParameters) -> None: <NEW_LINE> <INDENT> self.__hardware_source = hardware_source <NEW_LINE> assert not self.__hardware_source.is_recording <NEW_LINE> self.__data_and_metadata_list: typing.Sequence[typing.Op... | Run acquisition in a thread and record the result. | 62598f7e10dbd63aa1c70593 |
class Point(object): <NEW_LINE> <INDENT> def __init__(self, x, y): <NEW_LINE> <INDENT> self.x = x <NEW_LINE> self.y = y <NEW_LINE> <DEDENT> def get_x(self): <NEW_LINE> <INDENT> return self.x <NEW_LINE> <DEDENT> def get_y(self): <NEW_LINE> <INDENT> return self.y | Point
Essentially a helper class to organize x,y points within Geometry and
LineSegment classes, for example. | 62598f7ea4f1c619b294dfcf |
class Instances(base.ManagerWithFind): <NEW_LINE> <INDENT> resource_class = Instance <NEW_LINE> def create(self, name, flavor_id, volume, databases=None, users=None): <NEW_LINE> <INDENT> body = {"instance": { "name": name, "flavorRef": flavor_id, "volume": volume }} <NEW_LINE> if databases: <NEW_LINE> <INDENT> body["in... | Manage :class:`Instance` resources. | 62598f7e9b70327d1c57e786 |
class Ctcss: <NEW_LINE> <INDENT> def __init__(self,freq,note): <NEW_LINE> <INDENT> assert type(freq) == float <NEW_LINE> assert type(note) == str <NEW_LINE> self.freq = freq <NEW_LINE> self.note = note <NEW_LINE> <DEDENT> def html(self): <NEW_LINE> <INDENT> return '%0.1f Hz<br>%s' % (self.freq, self.note) | CTCSS | 62598f7e1f037a2d8b9e3acc |
class FuProtocol(object, irc.IRCClient): <NEW_LINE> <INDENT> nickname = 'fubot' <NEW_LINE> lineRate = 1 <NEW_LINE> versionName = 'fubot' <NEW_LINE> versionNum = '0.1' <NEW_LINE> versionEnv = 'loonix' <NEW_LINE> sourceURL = '127.0.0.1' <NEW_LINE> channels = None <NEW_LINE> def __init__(self, reactor, bot, factory, confi... | The FuProtocol | 62598f7e0383005118f6d0e4 |
class DailyLimitExceededError(Exception): <NEW_LINE> <INDENT> msg = "Daily limit exceeded. Please try again after midnight Pacific Standard Time." <NEW_LINE> def __init__(self, msg = None): <NEW_LINE> <INDENT> if msg: <NEW_LINE> <INDENT> self.msg = msg | Thrown by get_credentials() when HttpError indicates that daily limit has been exceeded | 62598f7e76d4e153a661c5f4 |
class Win2008SP1x64(VistaSP1x64): <NEW_LINE> <INDENT> _md_product = ["NtProductLanManNt", "NtProductServer"] | A Profile for Windows 2008 SP1 x64 | 62598f7e26238365f5fac552 |
class CharmNovaCloudController(CharmBase): <NEW_LINE> <INDENT> charm_name = 'nova-cloud-controller' <NEW_LINE> charm_rev = 50 <NEW_LINE> display_name = 'Controller' <NEW_LINE> menuable = True <NEW_LINE> related = ['mysql', 'rabbitmq-server', 'glance', 'keystone'] <NEW_LINE> allow_multi_units = False <NEW_LINE> def post... | Openstack Nova Cloud Controller directives | 62598f7ed10714528d69d8b1 |
class Bernoulli(BernoulliDistBase, PyDistributionBase): <NEW_LINE> <INDENT> def __init__(self, p): <NEW_LINE> <INDENT> BernoulliDistBase.__init__(self, p) <NEW_LINE> <DEDENT> def clone(self): <NEW_LINE> <INDENT> return BernoulliDistBase.clone(self) <NEW_LINE> <DEDENT> def isDiscrete(self): <NEW_LINE> <INDENT> return Be... | Represents the univariate bernoulli probability distribution. The
bernoulli probability distribution governs the probability of success
on a single trial when the probability of success is p and the
probability of failure is 1-p. | 62598f7e63f4b57ef0085a5f |
class Sub(Operation): <NEW_LINE> <INDENT> def __init__(self, input, output, name, op_type, domain, attributes, doc_string): <NEW_LINE> <INDENT> super(Sub, self).__init__(input, output, name, op_type, domain, attributes, doc_string) <NEW_LINE> self.i_A = self.input[0] <NEW_LINE> self.i_B = self.input[1] <NEW_LINE> self.... | Performs element-wise binary subtraction (with Numpy-style broadcasting support).
This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md).
| 62598f7e07d97122c4216684 |
class Key(object): <NEW_LINE> <INDENT> def __init__(self, language, label, description='', level=0, key=None): <NEW_LINE> <INDENT> self.label = label <NEW_LINE> self.description = description <NEW_LINE> self.language = language <NEW_LINE> self.level = level <NEW_LINE> self.key = self.build_key(key) <NEW_LINE> <DEDENT> ... | Translation key | 62598f7e38b623060ffa8a7a |
class Similarity(object): <NEW_LINE> <INDENT> def __init__(self, data_file, column_name, threshold=0.93, bin_size=600, results_file='results'): <NEW_LINE> <INDENT> super(Similarity, self).__init__() <NEW_LINE> self.data_file = data_file <NEW_LINE> self.column_name = column_name <NEW_LINE> self.threshold = threshold <NE... | docstring for Similarity | 62598f7ee64d504609df90a2 |
class CreateSitesResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Number = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Number = params.get("Number") <NEW_LINE> self.RequestId = params.get("RequestId") | CreateSites返回参数结构体
| 62598f7e6aa9bd52df0d48bd |
class ListTicketIncidentsInputSet(InputSet): <NEW_LINE> <INDENT> def set_Email(self, value): <NEW_LINE> <INDENT> InputSet._set_input(self, 'Email', value) <NEW_LINE> <DEDENT> def set_ID(self, value): <NEW_LINE> <INDENT> InputSet._set_input(self, 'ID', value) <NEW_LINE> <DEDENT> def set_Password(self, value): <NEW_LINE>... | An InputSet with methods appropriate for specifying the inputs to the ListTicketIncidents
Choreo. The InputSet object is used to specify input parameters when executing this Choreo. | 62598f7e596a897236127654 |
class CC_BY_NCLicense(License): <NEW_LINE> <INDENT> license_id = licenses.CC_BY_NC | The Attribution-NonCommercial License lets others remix, tweak, and
build upon your work non-commercially, and although their new works
must also acknowledge you and be non-commercial, they don't have to
license their derivative works on the same terms.
Reference: https://creativecommons.org/licenses/by-nc/4.0 | 62598f7e8a43f66fc4bf1b63 |
class TransactionReportTask(ReconcileOrdersAndTransactionsDownstreamMixin, WarehouseMixin, luigi.Task): <NEW_LINE> <INDENT> output_root = luigi.Parameter(default=None) <NEW_LINE> COLUMNS = [ 'date', 'transaction_id', 'payment_gateway_id', 'transaction_type', 'payment_method', 'transaction_amount', 'line_item_transactio... | Generates CSV files containing transaction information. | 62598f7ea4f1c619b294dfd0 |
class ResetPasswordView(View): <NEW_LINE> <INDENT> def get(self, request, reset_code): <NEW_LINE> <INDENT> record = EmailVerifyRecord.objects.get(code = reset_code) <NEW_LINE> if record: <NEW_LINE> <INDENT> email = record.email <NEW_LINE> return render(request, 'password_reset.html', {"email": email}) <NEW_LINE> <DEDEN... | 重置密码View | 62598f7e66656f66f7d59dd7 |
class Player(object): <NEW_LINE> <INDENT> def __init__(self, idNum, game, AI=False): <NEW_LINE> <INDENT> self.idNum = idNum <NEW_LINE> self.game = game <NEW_LINE> self.hand = Hand() <NEW_LINE> self.score = 0 <NEW_LINE> self.AI = AI <NEW_LINE> self.finished = False <NEW_LINE> self.AIFunction = None <NEW_LINE> self.human... | object for containing data relating a to player and state machine for order of play | 62598f7ec432627299fa29b2 |
class polycombGAT(cpgTracker): <NEW_LINE> <INDENT> mPattern = "overlapped_genes_gat_results$" <NEW_LINE> def __call__(self, track, slice=None): <NEW_LINE> <INDENT> data = self.get( "SELECT track, annotation, round(expected,0) as expected, observed, round(fold,1) as fold, pvalue FROM overlapped_genes_gat_results ") <NEW... | genomic assocation of H3K27Me3 intervals and genes overlapped >90% by NMIs | 62598f7e96565a6dacd2cc6b |
class STAs(RevCorrs): <NEW_LINE> <INDENT> def calc(self): <NEW_LINE> <INDENT> self.stas = [] <NEW_LINE> for neuron in self.neurons: <NEW_LINE> <INDENT> if neuron == None: <NEW_LINE> <INDENT> sta = None <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> sta = neuron.sta(experiment=self.experiment, trange=self.trange, nt=self... | Just a container class for multiple Neuron.STA objects. The plot() method is unique
though: it plots all the Neuron.STA objects in a single window | 62598f7ecad5886f8bdc4d08 |
class TemplateViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> serializer_class = TemplateSerializer <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> queryset = Template.objects.all() <NEW_LINE> report_set = self.request.query_params.get('report_set', None) <NEW_LINE> if report_set is not None: <NEW_LINE> <IND... | drf to datatable, filter qs | 62598f7e287bf620b627159c |
class Cache(models.Component): <NEW_LINE> <INDENT> def __init__(self, app, name, url): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.url = url <NEW_LINE> self._wait = app.green_pool.wait if app.green_pool else passthrough <NEW_LINE> self.init_app(app) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> r... | Cache base class
| 62598f7e73bcbd0ca4bc9c34 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.