code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Describe_BaseSortRowsByValueHelper: <NEW_LINE> <INDENT> def it_provides_the_order( self, SortByValueCollator_, _rows_dimension_prop_, _element_values_prop_, _subtotal_values_prop_, _empty_row_idxs_prop_, ): <NEW_LINE> <INDENT> _BaseSortRowsByValueHelper(None, None)._order <NEW_LINE> SortByValueCollator_.display_o... | Unit test suite for `cr.cube.matrix.assembler._BaseSortRowsByValueHelper`. | 62598fa9b7558d5895463592 |
class MainPane (object): <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> def __init__ (self, parent, auiManager, application): <NEW_LINE> <INDENT> self._parent = parent <NEW_LINE> self._auiManager = auiManager <NEW_LINE> self._application = application <NEW_LINE> self._panel = self._createPanel() <NEW_LINE> self... | Базовый класс для хранения основных панелей главного окна | 62598fa95166f23b2e24333b |
class BluetoothPlugin(interface.PlistPlugin): <NEW_LINE> <INDENT> NAME = 'macosx_bluetooth' <NEW_LINE> DATA_FORMAT = 'Bluetooth plist file' <NEW_LINE> PLIST_PATH_FILTERS = frozenset([ interface.PlistPathFilter('com.apple.bluetooth.plist')]) <NEW_LINE> PLIST_KEYS = frozenset(['DeviceCache', 'PairedDevices']) <NEW_LINE> ... | Plist parser plugin for Bluetooth plist files.
Additional details about the fields.
LastInquiryUpdate:
Device connected via Bluetooth Discovery. Updated
when a device is detected in discovery mode. E.g. BT headphone power
on. Pairing is not required for a device to be discovered and cached.
LastNameUpdate:
W... | 62598fa94e4d562566372388 |
class DeleteSchemaView(LoginRequiredMixin, View): <NEW_LINE> <INDENT> def post(self, request, schema_id): <NEW_LINE> <INDENT> if request.is_ajax(): <NEW_LINE> <INDENT> schema = Schema.objects.filter(id=schema_id, owner=request.user) <NEW_LINE> schema.delete() <NEW_LINE> return JsonResponse({'succsess': schema_id}, stat... | Responsible for delete schemas. Receive a POST AJAX request
and delete schema in database and send json data to front end. | 62598fa9aad79263cf42e737 |
class DevelopmentConfig(Config): <NEW_LINE> <INDENT> DEBUG = True | Application development configurations | 62598fa9f7d966606f747f48 |
class AboutDialog(QtGui.QDialog): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> QtGui.QDialog.__init__(self) <NEW_LINE> self.ui = Ui_FreeseerAbout() <NEW_LINE> self.ui.setupUi(self) <NEW_LINE> self.ui.aboutInfo.setText(ABOUT_INFO) | About dialog class for displaying app information. | 62598fa9442bda511e95c3ba |
class CliResolver(Resolver): <NEW_LINE> <INDENT> def resolve(self, param: inspect.Parameter) -> typing.Optional[typing.Tuple[str, typing.Callable]]: <NEW_LINE> <INDENT> key = 'param:%s' % param.name <NEW_LINE> func = self.command_line_argument <NEW_LINE> return (key, func) <NEW_LINE> <DEDENT> def command_line_argument(... | Handles resolving parameters for running with the command line. | 62598fa92ae34c7f260ab045 |
class HPBasicCode(): <NEW_LINE> <INDENT> def __init__(self,file_path=None,**options): <NEW_LINE> <INDENT> if file_path is None: <NEW_LINE> <INDENT> print("Please Do Not Write Any More HP Basic Code!!") <NEW_LINE> raise <NEW_LINE> <DEDENT> self.path=file_path <NEW_LINE> self.code=[] <NEW_LINE> in_file=open(self.path,'r'... | This Class Serves a container for HPBasic Code that has been converted to DOS Compatible ASCII.
| 62598fa97d847024c075c327 |
class Ksztalt(QWidget): <NEW_LINE> <INDENT> prost = QRect(1, 1, 101, 101) <NEW_LINE> punkty = QPolygon([ QPoint(1, 101), QPoint(51, 1), QPoint(101, 101)]) <NEW_LINE> def __init__(self, parent, ksztalt=Ksztalty.Rect): <NEW_LINE> <INDENT> super(Ksztalt, self).__init__(parent) <NEW_LINE> self.ksztalt = ksztalt <NEW_LINE> ... | Klasa definiująca widget do rysowania kształtów | 62598fa9cb5e8a47e493c12a |
class WriteRackNestedSerializer(object): <NEW_LINE> <INDENT> def __init__(self, name=None, facility_id=None): <NEW_LINE> <INDENT> self.swagger_types = { 'name': 'str', 'facility_id': 'str' } <NEW_LINE> self.attribute_map = { 'name': 'name', 'facility_id': 'facility_id' } <NEW_LINE> self._name = name <NEW_LINE> self._fa... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598fa926068e7796d4c8b8 |
class And(Condition): <NEW_LINE> <INDENT> def __init__(self, exprs): <NEW_LINE> <INDENT> self.exprs = exprs <NEW_LINE> <DEDENT> def loss(self, args): <NEW_LINE> <INDENT> losses = [exp.loss(args) for exp in self.exprs] <NEW_LINE> return reduce(lambda a, b: a + b, losses) <NEW_LINE> <DEDENT> def satisfy(self, args): <NEW... | E_1 & E_2 & ... E_k | 62598fa94e4d562566372389 |
class Response(object): <NEW_LINE> <INDENT> def __init__(self, response): <NEW_LINE> <INDENT> if response.content: <NEW_LINE> <INDENT> self.data = response.json() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.data = {} | Basic container for response dictionary
:param requests.Response response: Response for call via requests lib | 62598fa9d268445f26639b35 |
class Drone(Zergling): <NEW_LINE> <INDENT> def __init__(self, player): <NEW_LINE> <INDENT> Zergling.__init__(self, player) <NEW_LINE> self.name = 'drone' <NEW_LINE> self.hp = 45 <NEW_LINE> self.taken_supplies = 1 <NEW_LINE> player.busy_supply += self.taken_supplies - 0.5 <NEW_LINE> <DEDENT> def build(self, structure): ... | Changing drone's characteristics | 62598fa9a8ecb03325871174 |
class Test(unittest.TestCase): <NEW_LINE> <INDENT> data = [ ('waterbottle', 'erbottlewat', True), ('water','', False) ('foo', 'bar', False), ('foo', 'foofoo', False) ] <NEW_LINE> def test_string_rotation(self): <NEW_LINE> <INDENT> for [s1, s2, expected] in self.data: <NEW_LINE> <INDENT> actual = string_rotation(s1, s2)... | Test Cases | 62598fa9f548e778e596b509 |
class sqlitelib(object): <NEW_LINE> <INDENT> def __init__(self, dbfile): <NEW_LINE> <INDENT> self.dbfile = dbfile <NEW_LINE> self.conn = self.connect() <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def connect(self): <NEW_LINE> <INDENT> self.conn = sqlite3.connect(self.dbf... | wrapper for sqlite3 providing some convenience functions.
Autocommit is on by default, and query results are lists of dicts. | 62598fa91f037a2d8b9e4051 |
class Member(object): <NEW_LINE> <INDENT> def __init__(self, soup): <NEW_LINE> <INDENT> self.soup = soup <NEW_LINE> self.name = self.soup.get('name') <NEW_LINE> self.wn = self.soup.get('wn') <NEW_LINE> self.grouping = self.soup.get('grouping') <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "<Member %... | Represents a single member of a VerbClass, with associated name, WordNet
category and PropBank grouping. | 62598fa966656f66f7d5a355 |
class NoProxy(Proxy): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(NoProxy, self).__init__(None) <NEW_LINE> self._proxy_socket = None <NEW_LINE> <DEDENT> def _connect(self, destination): <NEW_LINE> <INDENT> self._proxy_socket = self._init_connection(destination.address, destination.port) <NEW_LINE>... | A proxy which is actually no proxy? That's right! The NoProxy class extends from the Proxy class but is
actually no proxy but a direct connection. It's used when the program does not make use of a proxy.
This method makes the implementation of AttackMethods easier by 'abstracting' away the connection.
This approach pr... | 62598fa93539df3088ecc217 |
class TestCompareXLSXFiles(ExcelComparisonTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.set_filename('chart_blank03.xlsx') <NEW_LINE> <DEDENT> def test_create_file(self): <NEW_LINE> <INDENT> workbook = Workbook(self.got_filename) <NEW_LINE> worksheet = workbook.add_worksheet() <NEW_LINE> chart = ... | Test file created by XlsxWriter against a file created by Excel. | 62598fa97d43ff24874273b4 |
class get_Image_with_Tag_args(object): <NEW_LINE> <INDENT> def __init__( self, openstack_id=None, ): <NEW_LINE> <INDENT> self.openstack_id = openstack_id <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... | Attributes:
- openstack_id | 62598fa966673b3332c3032f |
class Settings(models.Model): <NEW_LINE> <INDENT> site = models.ForeignKey(Site, unique=True) <NEW_LINE> site_name = models.CharField(max_length=50, editable=False) <NEW_LINE> author_name = models.CharField(_('author name'), max_length=255, blank=True, null=True) <NEW_LINE> copyright = models.CharField(_('copyright'), ... | Global settings for the blog.
The class name is plural because "Setting" singular implies one and this is a collection of settings.
Possible: dynamic settings could be designed at some point to allow the user to add settings as they wish. | 62598fa9090684286d59368e |
class MissingTagError(UnicodeException, E.KeyError): <NEW_LINE> <INDENT> pass | The requested tag at the specified address does not exist. | 62598fa91b99ca400228f4e2 |
class QuerySplitterError(Exception): <NEW_LINE> <INDENT> pass | Top-level error type. | 62598fa9baa26c4b54d4f216 |
class SOptionsOfResult(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__root = Tk() <NEW_LINE> self.__root.title('Результаты') <NEW_LINE> self.__root.geometry('340x200') <NEW_LINE> self.__root.resizable(width=False, height=False) <NEW_LINE> self.__root.protocol('WM_DELETE_WINDOW', self.close)... | Экран опций результатов | 62598fa97d847024c075c328 |
class HeadingRule(Rule): <NEW_LINE> <INDENT> type = 'heading' <NEW_LINE> def condition(self, block): <NEW_LINE> <INDENT> return not '\n' in block and len(block) <= 70 and not block[-1] == ':' | 标题占一行,最多 70 个字符,并且不以冒号结尾。 | 62598fa9a8370b77170f0340 |
class RegisterHandler(base.APIBaseHandler, MailMixin): <NEW_LINE> <INDENT> @gen.coroutine <NEW_LINE> def post(self): <NEW_LINE> <INDENT> form = forms.RegisterForm(self.json_args, locale_code=self.locale.code) <NEW_LINE> if form.validate(): <NEW_LINE> <INDENT> user = self.create_user(form) <NEW_LINE> yield self.send_con... | URL: /register
Allowed methods: POST | 62598fa94e4d56256637238a |
class PrefixStorage(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._mapping = {} <NEW_LINE> self._sizes = [] <NEW_LINE> <DEDENT> def __setitem__(self, key, value): <NEW_LINE> <INDENT> ln = len(key) <NEW_LINE> if ln not in self._sizes: <NEW_LINE> <INDENT> self._sizes.append(ln) <NEW_LINE> self... | Storage for store information about prefixes.
>>> s = PrefixStorage()
First we save information for some prefixes:
>>> s["123"] = "123 domain"
>>> s["12"] = "12 domain"
Then we can retrieve prefix information by full key
(longest prefix always win):
>>> s.getByPrefix("123456")
'123 domain'
>>> s.getByPrefix("12456... | 62598fa9236d856c2adc93ef |
class ReflexAgent(Agent): <NEW_LINE> <INDENT> def getAction(self, gameState): <NEW_LINE> <INDENT> legalMoves = gameState.getLegalActions() <NEW_LINE> scores = [self.evaluationFunction(gameState, action) for action in legalMoves] <NEW_LINE> bestScore = max(scores) <NEW_LINE> bestIndices = [index for index in range(len(s... | A reflex agent chooses an action at each choice point by examining
its alternatives via a state evaluation function.
The code below is provided as a guide. You are welcome to change
it in any way you see fit, so long as you don't touch our method
headers. | 62598fa938b623060ffa8ffd |
class Filter(Node): <NEW_LINE> <INDENT> def run(self, data, func, **kwargs): <NEW_LINE> <INDENT> if func(self, data): <NEW_LINE> <INDENT> self.push(data) | A node that only pushes if some condition is met | 62598fa9379a373c97d98f77 |
class CoffeedocDocumenter(Documenter): <NEW_LINE> <INDENT> priority = 20 <NEW_LINE> domain = 'coffee' <NEW_LINE> @classmethod <NEW_LINE> def can_document_member(cls, member, membername, isattr, parent): <NEW_LINE> <INDENT> return isinstance(member, StubObject) and member.type == cls.documents_type <NEW_LINE> <DEDENT> d... | Base class for documenters that use the output of ``coffeedoc`` | 62598fa9aad79263cf42e739 |
class CatmainURLTileProcessor(TileProcessor): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> TileProcessor.__init__(self) <NEW_LINE> <DEDENT> def setup(self, parameters): <NEW_LINE> <INDENT> self.parameters = parameters <NEW_LINE> <DEDENT> def process(self, file_path, x_index, y_index, z_index, t_index=0):... | A Tile processor for a single image file identified by z index | 62598fa9925a0f43d25e7fa4 |
class CriticalSection(object): <NEW_LINE> <INDENT> def __init__(self, keys, fail_hard=False, timeout=60): <NEW_LINE> <INDENT> self.keys = keys <NEW_LINE> self.locks = [] <NEW_LINE> self.fail_hard = fail_hard <NEW_LINE> self.timeout = timeout <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <... | An object to facilitate the use of locking in critical sections where
you can't use CouchDocLockableMixIn (i.e., in cases where you don't
necessarily want or need a document to be created).
Sample usage:
with CriticalSection(["my-update-key"]):
...do processing
keys - a list of strings representing the ke... | 62598fa94c3428357761a21f |
class BOT_533: <NEW_LINE> <INDENT> pass | Menacing Nimbus | 62598fa9aad79263cf42e73a |
class BaseProductVersionSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> content_title = serializers.SerializerMethodField() <NEW_LINE> readable_id = serializers.SerializerMethodField() <NEW_LINE> price = serializers.SerializerMethodField() <NEW_LINE> def get_content_title(self, instance): <NEW_LINE> <INDEN... | ProductVersion serializer for fetching summary info for receipts | 62598fa94428ac0f6e658489 |
class IPDFPeekConfiguration(Interface): <NEW_LINE> <INDENT> preview_toggle = schema.Bool( title=_(u'Preview Toggle'), description=_( u'Display PDFPeek image previews in default content views.'), required=True, default=True ) <NEW_LINE> eventhandler_toggle = schema.Bool( title=_(u'Event Handler Toggle'), description=_(u... | interface describing the pdfpeek control panel. | 62598fa92ae34c7f260ab047 |
class SelectLoop(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._r_list = set() <NEW_LINE> self._w_list = set() <NEW_LINE> self._x_list = set() <NEW_LINE> <DEDENT> def poll(self, timeout): <NEW_LINE> <INDENT> r, w, x = select.select( self._r_list, self._w_list, self._x_list, timeout) <NEW_LIN... | SelectLoop
Methods:
* __init__()
* pool()
* add_fd()
* remove_fd()
* modify_fd() | 62598fa9e1aae11d1e7ce7d6 |
class UserData: <NEW_LINE> <INDENT> def __init__(self, userdatafile): <NEW_LINE> <INDENT> self.userdatafile = userdatafile <NEW_LINE> <DEDENT> def read_user_info(self, userdatafile): <NEW_LINE> <INDENT> self.userdatas = [] <NEW_LINE> datafile = open(userdatafile) <NEW_LINE> reader = csv.reader(datafile) <NEW_LINE> for ... | read userdate and output new userdata file | 62598fa921bff66bcd722bcc |
class Fixture(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def populate(): <NEW_LINE> <INDENT> pass | Class contains populate method as static method
Is used by django-swagger-utils as a management command | 62598fa945492302aabfc437 |
class ToTensor(object): <NEW_LINE> <INDENT> def __init__(self, sample_rate=16000, augment=False, tempo_range=(0.85, 1.15), gain_range=(-6, 8)): <NEW_LINE> <INDENT> self.sample_rate = sample_rate <NEW_LINE> self.augment = augment <NEW_LINE> self.tempo_range = tempo_range <NEW_LINE> self.gain_range = gain_range <NEW_LINE... | Picks tempo and gain uniformly, applies it to the utterance by using sox utility.
Args:
sample_rate (int): the desired sample rate
augment (bool): if `True`, will add random jitter and gain
tempo_prob (float): probability of tempo jitter being applied to sample
tempo_range (list, int): list with (tempo... | 62598fa98e7ae83300ee9008 |
class CTD_ANON_7 (pyxb.binding.basis.complexTypeDefinition): <NEW_LINE> <INDENT> _TypeDefinition = None <NEW_LINE> _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY <NEW_LINE> _Abstract = False <NEW_LINE> _ExpandedName = None <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('/tmp/tmpJ5bTz... | Tag to indicate that the trace file will be sampled. | 62598fa9a8ecb03325871176 |
class Pbkdf1_Test(TestCase): <NEW_LINE> <INDENT> descriptionPrefix = "passlib.crypto.digest.pbkdf1" <NEW_LINE> pbkdf1_tests = [ (b'password', hb('78578E5A5D63CB06'), 1000, 16, 'sha1', hb('dc19847e05c64d2faf10ebfb4a3d2a20')), (b'password', b'salt', 1000, 0, 'md5', b''), (b'password', b'salt', 1000, 1, 'md5', hb('8... | test kdf helpers | 62598fa95fcc89381b2660ff |
class XmlSystemStatus(ElementWrapper): <NEW_LINE> <INDENT> def filter(self, joins): <NEW_LINE> <INDENT> value = self.get_xml_attr('value', unicode, None) <NEW_LINE> query = None <NEW_LINE> if value: <NEW_LINE> <INDENT> query = System.status == value <NEW_LINE> <DEDENT> return (joins, query) | Pick a system with the correct system status. | 62598fa91f037a2d8b9e4053 |
class DysonInvalidCredential(DysonException): <NEW_LINE> <INDENT> pass | Requesents invalid mqtt credential. | 62598fa9a79ad16197769fcb |
class ArModeSonar(ArMode): <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> def __init__(self, *args): <NEW_LINE> <INDENT> this = _AriaPy.new_ArModeSonar(*args) <NEW_LINE> try: self.this.append(this) <... | Proxy of C++ ArModeSonar class | 62598fa92c8b7c6e89bd372c |
class AjaxSetMemberAllAccounts(AjaxAllAccountsViewBase): <NEW_LINE> <INDENT> def init_counter(self): <NEW_LINE> <INDENT> self.group_msg.title = "Надання права доступу групі акаунтів" <NEW_LINE> self.group_msg.type = msgType.Group <NEW_LINE> self.group_msg.message = "" <NEW_LINE> self.counter = OrderedDict() <NEW_L... | Приєднання до групи members всіх акаунтів з фільтрованого списку. | 62598fa97d43ff24874273b5 |
class Bootstrap(Role): <NEW_LINE> <INDENT> def __init__(self, node, peers, execute_fn, replica_cls=Replica, acceptor_cls=Acceptor, leader_cls=Leader, commander_cls=Commander, scout_cls=Scout): <NEW_LINE> <INDENT> super(Bootstrap, self).__init__(node) <NEW_LINE> self.execute_fn = execute_fn <NEW_LINE> self.peers = peers... | introduce a new node to an existing cluster | 62598fa910dbd63aa1c70b19 |
class Spider(): <NEW_LINE> <INDENT> url = "https://www.panda.tv/cate/lol" <NEW_LINE> root_pattern = '<div class="video-info">([\s\S]*?)</div>' <NEW_LINE> name_pattern = '</i>([\s\S]*?)</span>' <NEW_LINE> number_pattern = '<span class="video-number">([\s\S]*?)</span>' <NEW_LINE> def __fetch_content(self): <NEW_LINE> <IN... | This is a class | 62598fa930dc7b766599f7b3 |
class LdapSyncJobStatusJson(object): <NEW_LINE> <INDENT> swagger_types = { 'in_progress': 'bool', 'clusters': 'list[ClusterLdapSyncInfoJson]' } <NEW_LINE> attribute_map = { 'in_progress': 'inProgress', 'clusters': 'clusters' } <NEW_LINE> def __init__(self, in_progress=None, clusters=None): <NEW_LINE> <INDENT> self._in_... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598fa97d847024c075c32a |
class ModbusConnectedRequestHandler(ModbusBaseRequestHandler): <NEW_LINE> <INDENT> def handle(self): <NEW_LINE> <INDENT> while self.running: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> data = self.request.recv(1024) <NEW_LINE> if not data: self.running = False <NEW_LINE> if _logger.isEnabledFor(logging.DEBUG): <NEW_LI... | Implements the modbus server protocol
This uses the socketserver.BaseRequestHandler to implement
the client handler for a connected protocol (TCP). | 62598fa9a8370b77170f0342 |
class UserView(object): <NEW_LINE> <INDENT> def __init__(self, app, user): <NEW_LINE> <INDENT> self.app = app <NEW_LINE> self.user = user <NEW_LINE> <DEDENT> @property <NEW_LINE> def image_thumb(self): <NEW_LINE> <INDENT> u = self.user <NEW_LINE> uf = self.app.url_for <NEW_LINE> if u.image is not None and u.image!="": ... | adapter for a user object to provide additional data such as profile image etc. | 62598fa923849d37ff85101b |
class ZWaveProtectionView(HomeAssistantView): <NEW_LINE> <INDENT> url = r"/api/zwave/protection/{node_id:\d+}" <NEW_LINE> name = "api:zwave:protection" <NEW_LINE> async def get(self, request, node_id): <NEW_LINE> <INDENT> nodeid = int(node_id) <NEW_LINE> hass = request.app["hass"] <NEW_LINE> network = hass.data.get(con... | View for the protection commandclass of a node. | 62598faaf548e778e596b50b |
class StatsGroupTopInviter(TLObject): <NEW_LINE> <INDENT> __slots__: List[str] = ["user_id", "invitations"] <NEW_LINE> ID = 0x31962a4c <NEW_LINE> QUALNAME = "types.StatsGroupTopInviter" <NEW_LINE> def __init__(self, *, user_id: int, invitations: int) -> None: <NEW_LINE> <INDENT> self.user_id = user_id <NEW_LINE> self.i... | This object is a constructor of the base type :obj:`~pyrogram.raw.base.StatsGroupTopInviter`.
Details:
- Layer: ``122``
- ID: ``0x31962a4c``
Parameters:
user_id: ``int`` ``32-bit``
invitations: ``int`` ``32-bit`` | 62598faa44b2445a339b6923 |
class DefaultValueFormatInvalid(SettingValueFormatInvalid, DefaultValueError): <NEW_LINE> <INDENT> pass | As SettingValueFormatInvalid, but specifically for a default value. | 62598faa379a373c97d98f79 |
class TestUpdateStories(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def testUpdateStories(self): <NEW_LINE> <INDENT> pass | UpdateStories unit test stubs | 62598faae76e3b2f99fd899d |
class IPageVersion(IPageContentVersion): <NEW_LINE> <INDENT> pass | A page version
| 62598faad486a94d0ba2bf35 |
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): <NEW_LINE> <INDENT> VERSION = 1 <NEW_LINE> async def async_step_user( self, user_input: dict[str, Any] | None = None ) -> FlowResult: <NEW_LINE> <INDENT> if user_input is None: <NEW_LINE> <INDENT> return self.async_show_form(step_id="user", data_schema=USER_DA... | Handle a config flow for tractive. | 62598faa32920d7e50bc5fbc |
class ComputerWeekly(JobSite): <NEW_LINE> <INDENT> def __init__(self, job): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.site = "Computer Weekly" <NEW_LINE> job_details = job.find_all('div', class_='col-xs-7') <NEW_LINE> self.title = job.find('a').text <NEW_LINE> self.recruiter = job_details[2].p.text <NEW_LI... | Computer Weekly job site. | 62598faa7c178a314d78d404 |
class Champion : <NEW_LINE> <INDENT> count = 0 <NEW_LINE> def __init__(self, key, name, title) : <NEW_LINE> <INDENT> self.key = key <NEW_LINE> self.name = name <NEW_LINE> self.title = title <NEW_LINE> Champion.count += 1 <NEW_LINE> <DEDENT> def return_name(self) : <NEW_LINE> <INDENT> return self.name <NEW_LINE> <DEDENT... | Base Class for Champions | 62598faaaad79263cf42e73c |
class ScaXmlTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_load_xml(self): <NEW_LINE> <INDENT> sca_xml = ScaXml() <NEW_LINE> events = sca_xml.get_event_list() <NEW_LINE> assert not [] == events <NEW_LINE> event = next((event for event in events if event.name == "MOVE HOT CODE TO COLD AREA"), None) <NEW_LINE> ass... | Class to run tests from sca xml | 62598faaac7a0e7691f72471 |
class Landsat(object): <NEW_LINE> <INDENT> def __init__(self, parts): <NEW_LINE> <INDENT> self.parts = list(parts) <NEW_LINE> self.labels = ['sensor', 'satellite'] <NEW_LINE> self.lut = [{'C': 'OLI_TIRS', 'O': 'OLI', 'E': 'ETM+', 'T': 'TM', 'M': 'MSS' }, {'07': 'Landsat7', '08': 'Landsat8', }, ] <NEW_LINE> <DEDENT> def... | https://landsat.usgs.gov/landsat-collections | 62598faa4f6381625f199472 |
class VisibleDeprecationWarning(UserWarning): <NEW_LINE> <INDENT> pass | Warning issued by jupyter_client 5.2.4 about future deprecations in tornado | 62598faa8e7ae83300ee9009 |
class InEdgeView(OutEdgeView): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> view = InEdgeDataView <NEW_LINE> def __init__(self, G): <NEW_LINE> <INDENT> pred = G._pred if hasattr(G, "pred") else G._adj <NEW_LINE> self.nbunch_iter = G.nbunch_iter <NEW_LINE> self._adjdict = pred <NEW_LINE> self._nodes_nbrs = pred.items <... | A EdgeView class for inward edges of a DiGraph | 62598faa8c0ade5d55dc3645 |
class FormError(ApiFailed): <NEW_LINE> <INDENT> code = 400 <NEW_LINE> errcode = 4007 | 表单格式错误 | 62598faa56b00c62f0fb281c |
class AcmiFileReader: <NEW_LINE> <INDENT> _codec = 'utf-8-sig' <NEW_LINE> def __init__(self, fh): <NEW_LINE> <INDENT> self.fh = fh <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def __next__(self): <NEW_LINE> <INDENT> line = self.fh.readline().decode(AcmiFileReader._codec) <... | Stream reading class that correctly line escaped acmi files. | 62598faa21bff66bcd722bce |
class CompanyEditView(generic.UpdateView): <NEW_LINE> <INDENT> model = Company <NEW_LINE> form_class = CompanyForm | Company edit view. | 62598faa8e7ae83300ee900a |
class StrictModeError(PanzerError): <NEW_LINE> <INDENT> pass | An error on `---strict` mode that causes panzer to exit
- On `--strict` mode: exception raised if any error of level 'ERROR' or
above is logged
- Without `--strict` mode: exception never raised | 62598faa45492302aabfc439 |
class SubscriberEditTest(SubscriberBaseTest): <NEW_LINE> <INDENT> def test_get(self): <NEW_LINE> <INDENT> response = self.client.get('/dashboard/subscribers/%s/edit' % self.subscriber_imsi) <NEW_LINE> self.assertEqual(200, response.status_code) | Testing endagaweb.views.dashboard.SubscriberEdit. | 62598faaa8ecb03325871178 |
class PoolTrackTagOverlay(obj.ProfileModification): <NEW_LINE> <INDENT> conditions = {'os': lambda x: x == 'windows'} <NEW_LINE> def modification(self, profile): <NEW_LINE> <INDENT> profile.merge_overlay({ '_POOL_TRACKER_TABLE': [ None, { 'Key': [ None, ['String', dict(length = 4)]] }], }) | Overlays for pool trackers | 62598faaa17c0f6771d5c19d |
class Mailbox(object): <NEW_LINE> <INDENT> def __init__(self, parent_api, boxtype='inbox', page='1', sort='unread'): <NEW_LINE> <INDENT> self.parent_api = parent_api <NEW_LINE> self.boxtype = boxtype <NEW_LINE> self.current_page = page <NEW_LINE> self.total_pages = None <NEW_LINE> self.sort = sort <NEW_LINE> self.messa... | This class represents the logged in user's inbox/sentbox | 62598faad7e4931a7ef3bffe |
class KeyedPool(object): <NEW_LINE> <INDENT> def __init__(self, factory, disposer): <NEW_LINE> <INDENT> self.factory = factory <NEW_LINE> self.disposer = disposer <NEW_LINE> self._value_to_key = {} <NEW_LINE> def make_pool(key): <NEW_LINE> <INDENT> def factory(): <NEW_LINE> <INDENT> return self.factory(key) <NEW_LINE> ... | Async object pool that uses a factory to create objects as needed.
There is one pool per key. | 62598faa67a9b606de545f34 |
class ANSIFormatterMixin(object): <NEW_LINE> <INDENT> def format(self, record): <NEW_LINE> <INDENT> msg = super(ANSIFormatterMixin, self).format(record) <NEW_LINE> return format_ansi(msg) | A log formatter mixin that inserts ANSI color.
| 62598faadd821e528d6d8e9e |
class PostUpdateView(AutoPermissionRequiredMixin, UpdateView): <NEW_LINE> <INDENT> model = Post <NEW_LINE> form_class = PostEditForm <NEW_LINE> template_name = "blog/edit_post.html" <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super().get_context_data(**kwargs) <NEW_LINE> context["post... | PostUpdateView
View to update a Post
Args:
AutoPermissionRequiredMixin ([type]): Tests if the User has the permission to do that
UpdateView ([type]): [description]
Returns:
[type]: [description] | 62598faad486a94d0ba2bf36 |
class LokiOptions_Default_Resources_Statefulset(Data): <NEW_LINE> <INDENT> def is_enabled(self) -> bool: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> def get_value(self) -> Any: <NEW_LINE> <INDENT> return { 'requests': { 'cpu': '100m', 'memory': '128Mi' }, 'limits': { 'cpu': '200m', 'memory': '256Mi' }, } | Default option value for:
```kubernetes.resources.statefulset``` | 62598faa71ff763f4b5e76d7 |
class GCSLog(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> remote_conn_id = configuration.get('core', 'REMOTE_LOG_CONN_ID') <NEW_LINE> self.use_gcloud = False <NEW_LINE> try: <NEW_LINE> <INDENT> from airflow.contrib.hooks import GCSHook <NEW_LINE> self.hook = GCSHook(remote_conn_id) <NEW_LINE> se... | Utility class for reading and writing logs in GCS.
Requires either airflow[gcloud] or airflow[gcp_api] and
setting the REMOTE_BASE_LOG_FOLDER and REMOTE_LOG_CONN_ID configuration
options in airflow.cfg. | 62598faa0c0af96317c562eb |
class QLearningAgent(ReinforcementAgent): <NEW_LINE> <INDENT> def __init__(self, **args): <NEW_LINE> <INDENT> ReinforcementAgent.__init__(self, **args) <NEW_LINE> self.qvalues = util.Counter() <NEW_LINE> <DEDENT> def getQValue(self, state, action): <NEW_LINE> <INDENT> return self.qvalues[(state, action)] <NEW_LINE> <DE... | Q-Learning Agent
Functions you should fill in:
- computeValueFromQValues
- computeActionFromQValues
- getQValue
- getAction
- update
Instance variables you have access to
- self.epsilon (exploration prob)
- self.alpha (learning rate)
- self.discount (discount rate)
Functions you should use
- self.g... | 62598faa498bea3a75a57a86 |
class MappingUsersRulesRuleOptions(object): <NEW_LINE> <INDENT> swagger_types = { '_break': 'bool', 'default_user': 'MappingUsersRulesRuleUser2', 'group': 'bool', 'groups': 'bool', 'user': 'bool' } <NEW_LINE> attribute_map = { '_break': 'break', 'default_user': 'default_user', 'group': 'group', 'groups': 'groups', 'use... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598faa4f88993c371f04be |
class TestUndbm(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_undbm_1(self): <NEW_LINE> <INDENT> self.assertTrue(np.allclose([undbm(53.015)], [100.054125892], rtol=1e-05, atol=1e-08)) <NEW_LINE> <DEDENT> def test_undbm_2(self): <NEW_LINE> <INDENT> self.as... | Test class for undbm() | 62598faa0a50d4780f705346 |
class I_cpseq_w_w_B(Instruction_w_w_B): <NEW_LINE> <INDENT> name = 'cpseq' <NEW_LINE> mask = 0xFF83F0 <NEW_LINE> code = 0xE78000 <NEW_LINE> feat = idaapi.CF_USE1 | idaapi.CF_USE2 | CPSEQ{.B} Wb, Wn | 62598faa7d847024c075c32c |
class CharacterTable(): <NEW_LINE> <INDENT> def __init__(self, chars, maxlen): <NEW_LINE> <INDENT> self.chars = sorted(set(chars)) <NEW_LINE> self.char_index = dict((c, i) for i, c in enumerate(self.chars)) <NEW_LINE> self.index_char = dict((i, c) for i, c in enumerate(self.chars)) <NEW_LINE> self.maxlen = maxlen <NEW_... | encode: 将一个str转化为一个n维数组
decode: 将一个n为数组转化为一个str
输入输出分别为
character_table = [' ', '+', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
如果一个question = [' 123+23']
那个改question对应的数组就是(7,12):
同样expected最大是一个四位数[' 146']:
那么ans对应的数组就是[4,12] | 62598faa23849d37ff85101d |
class UserNotFound(APIException): <NEW_LINE> <INDENT> status_code = 404 <NEW_LINE> default_detail = 'Sorry the user with the id dosen\'t exist' <NEW_LINE> default_code = "user_not_found" | User exists.
This exception provide a good custom error message,
when a user is not found. | 62598faa5166f23b2e243341 |
class DB(object): <NEW_LINE> <INDENT> supported_databases = [DATABASE_MYSQL, DATABASE_SQLITE] <NEW_LINE> database_type_to_connection = { DATABASE_MYSQL: MySQLConnection, } <NEW_LINE> def __init__(self, database_type, db_name=None, username=None, password=None, host='localhost', port=3306, unix_socket=None): <NEW_LINE> ... | Database connection | 62598faa76e4537e8c3ef516 |
class Recognizer(Configurable): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Configurable.__init__(self) <NEW_LINE> Configurable.load(self) | Fake :class:`Recognizer <Camera>` class.
Just to simulate configs | 62598faa3cc13d1c6d4656d5 |
class CLRSSFeed(object): <NEW_LINE> <INDENT> def __init__(self, city_url, make, model): <NEW_LINE> <INDENT> self.city_url = city_url <NEW_LINE> self.make = make <NEW_LINE> self.model = model <NEW_LINE> self.rss_url = f"{self.city_url}/search/mcy?format=rss&query={self.make.lower()}+{self.model.lower()}*" <NEW_LINE> sel... | Creat object to hold RSS Feed information for a given search location. | 62598faae5267d203ee6b873 |
class ProsegurAlarm(alarm.AlarmControlPanelEntity): <NEW_LINE> <INDENT> def __init__(self, contract: str, auth: Auth) -> None: <NEW_LINE> <INDENT> self._changed_by = None <NEW_LINE> self._installation = None <NEW_LINE> self.contract = contract <NEW_LINE> self._auth = auth <NEW_LINE> self._attr_name = f"contract {self.c... | Representation of a Prosegur alarm status. | 62598faa379a373c97d98f7b |
@public.add <NEW_LINE> class Table: <NEW_LINE> <INDENT> columns = [] <NEW_LINE> data = [] <NEW_LINE> def __init__(self, columns, data): <NEW_LINE> <INDENT> self.columns = list(columns) <NEW_LINE> self.data = list(data) <NEW_LINE> <DEDENT> def get_headers(self): <NEW_LINE> <INDENT> return self.columns <NEW_LINE> <DEDENT... | table class. attrs: `columns`, `data` | 62598faa460517430c432011 |
class ExtractURLpartsTests(TestCase): <NEW_LINE> <INDENT> def test_types(self): <NEW_LINE> <INDENT> url_scheme, server_name, server_port, path_info, script_name = _extractURLparts(requestMock(b"/f\xc3\xb6\xc3\xb6")) <NEW_LINE> self.assertIsInstance(url_scheme, unicode) <NEW_LINE> self.assertIsInstance(server... | Tests for L{klein.resource._extractURLparts}. | 62598faafff4ab517ebcd74e |
class LtmMonitorSmb(LtmMonitorSmbSchema): <NEW_LINE> <INDENT> cli_command = "/mgmt/tm/ltm/monitor/smb" <NEW_LINE> def rest(self): <NEW_LINE> <INDENT> response = self.device.get(self.cli_command) <NEW_LINE> response_json = response.json() <NEW_LINE> if not response_json: <NEW_LINE> <INDENT> return {} <NEW_LINE> <DEDENT>... | To F5 resource for /mgmt/tm/ltm/monitor/smb
| 62598faa3617ad0b5ee060bd |
class Translator(gtapi.TranslateService): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Translator, self).__init__() <NEW_LINE> self.lock = threading.Lock() <NEW_LINE> <DEDENT> def trans_details(self, source_lang, target_lang, value): <NEW_LINE> <INDENT> response = super(Translator, self).trans_deta... | Customization of :class:`google_translate_api.TranslateService`
mainly for output formatting. | 62598faaa219f33f346c6780 |
class RegisterView(CreateView): <NEW_LINE> <INDENT> template_name = 'accounts/register.html' <NEW_LINE> form_class = RegisterForm <NEW_LINE> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> logout(self.request) <NEW_LINE> form_class = self.get_form_class() <NEW_LINE> form = self.get_form(form_class) <NEW_LI... | Register view template, render form.
If form valid, try to authenticate user and redirect to User Profile | 62598faa2ae34c7f260ab04b |
class HuberParameter(Model): <NEW_LINE> <INDENT> def __init__(self, epsilon=None, max_iter=None, alpha=None, tol=None): <NEW_LINE> <INDENT> self.openapi_types = { 'epsilon': 'float', 'max_iter': 'int', 'alpha': 'float', 'tol': 'float' } <NEW_LINE> self.attribute_map = { 'epsilon': 'epsilon', 'max_iter': 'max_iter', 'al... | NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Do not edit the class manually. | 62598faae5267d203ee6b874 |
class DescribeAlarmsRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Offset = None <NEW_LINE> self.Limit = None <NEW_LINE> self.Status = None <NEW_LINE> self.BeginTime = None <NEW_LINE> self.EndTime = None <NEW_LINE> self.ObjName = None <NEW_LINE> self.SortBy = None <NEW_LINE> se... | DescribeAlarms请求参数结构体
| 62598faad7e4931a7ef3c000 |
class Customer_LevelForm(forms.Form): <NEW_LINE> <INDENT> level = forms.ChoiceField(choices=level_choices, initial=2) <NEW_LINE> name = forms.CharField(max_length=20) | 客户水平 | 62598faa4428ac0f6e65848e |
class Watchable(TutorialObject): <NEW_LINE> <INDENT> def at_object_creation(self): <NEW_LINE> <INDENT> self.cmdset.add_default(CmdSetWatchable, permanent=True) <NEW_LINE> self.watch_reward = 1 <NEW_LINE> <DEDENT> def at_watch(self): <NEW_LINE> <INDENT> return self.watch_reward | A watchable object. All that is special about it is that it has
the "watch" command available on it. | 62598faa2ae34c7f260ab04c |
class InvokeCACTIP(Invoke): <NEW_LINE> <INDENT> def __init__(self, output_dir, cfg_dir=None, log_dir=None, cacti_path=None): <NEW_LINE> <INDENT> super().__init__(output_dir, cfg_dir=cfg_dir, log_dir=log_dir, cacti_path=cacti_path) <NEW_LINE> self.cfg_cls = config.ConfigCACTIP <NEW_LINE> self.res_cls = result_parser.Res... | Environment class to invoke CACTI-P. | 62598faaa8370b77170f0346 |
class Message(AttrDict): <NEW_LINE> <INDENT> def __init__(self, folder, message_id, data): <NEW_LINE> <INDENT> assert is_sha1(message_id), 'Message id not a SHA1 hash' <NEW_LINE> self.folder = folder <NEW_LINE> self.id = message_id <NEW_LINE> super(AttrDict, self).__init__(data) <NEW_LINE> self['startTime'] = gmtime(in... | Wrapper for all call/sms message instances stored in Google Voice
Attributes are:
* id: SHA1 identifier
* isTrash: bool
* displayStartDateTime: datetime
* star: bool
* isSpam: bool
* startTime: gmtime
* labels: list
* displayStartTime: time
* children: str
* note: str
* isRead: bool
* displayNumber: str
*... | 62598faabaa26c4b54d4f21c |
class Name(PhotosBaseElement): <NEW_LINE> <INDENT> _tag = 'name' | The Google Photo `Name' element | 62598faa0a50d4780f705348 |
class QAPair(): <NEW_LINE> <INDENT> def __init__(self, question, answers): <NEW_LINE> <INDENT> self.question = question <NEW_LINE> self.answers = answers | Stores a question and a list of acceptable answers. | 62598faa5166f23b2e243343 |
class MixinHorizontal: <NEW_LINE> <INDENT> def _add_label(self): <NEW_LINE> <INDENT> Label(self, text=self._name, bg=self._color, bd=0).pack(side=LEFT) <NEW_LINE> <DEDENT> def _add_entry(self): <NEW_LINE> <INDENT> self._entry = Entry(self, width=7, validate='key') <NEW_LINE> self._entry.pack(side=LEFT, fill=X) <NEW_LIN... | Override _add_label and _add_entry methods to provide a horizontal
arrangement instead of vertical. | 62598faa236d856c2adc93f2 |
class AlertName(EtcString): <NEW_LINE> <INDENT> pass | Update the parent's alert name | 62598faa7b25080760ed7418 |
class UndoableDelete(object): <NEW_LINE> <INDENT> def __init__(self, text_buffer, start_iter, end_iter): <NEW_LINE> <INDENT> self.text = str(text_buffer.get_text(start_iter, end_iter, True)) <NEW_LINE> self.start = start_iter.get_offset() <NEW_LINE> self.end = end_iter.get_offset() <NEW_LINE> insert_iter = text_buffer.... | something that has been deleted from our textbuffer | 62598faae5267d203ee6b875 |
class Interaction(object): <NEW_LINE> <INDENT> def interact(self, view): <NEW_LINE> <INDENT> pass | TEMPLATE CLASS for Interactions.
An Interaction is a sequence of displayables and prompts that
display on a View in order. Interactions are created by Stories, but
are not necessarily able to reference their creator. This class's
single method returns instructions of some sort that tell the Story
how to produce its ne... | 62598faa8da39b475be0314f |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.