code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class MainHandler(tornado.web.RequestHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> self.render("index.html")
starting point off the application
6259905cd7e4931a7ef3d68f
@dataclass <NEW_LINE> class LinkedTaskChannel(trio.abc.Channel): <NEW_LINE> <INDENT> _to_aio: asyncio.Queue <NEW_LINE> _from_aio: trio.MemoryReceiveChannel <NEW_LINE> _to_trio: trio.MemorySendChannel <NEW_LINE> _trio_cs: trio.CancelScope <NEW_LINE> _aio_task_complete: trio.Event <NEW_LINE> _aio_task: Optional[asyncio.T...
A "linked task channel" which allows for two-way synchronized msg passing between a ``trio``-in-guest-mode task and an ``asyncio`` task scheduled in the host loop.
6259905cf548e778e596cb9f
class TestChatbotController(BaseTestCase): <NEW_LINE> <INDENT> def test_root_get(self): <NEW_LINE> <INDENT> response = self.client.open( '/nmf21/chatbotModel/1.0.0/', method='GET') <NEW_LINE> self.assert200(response, 'Response body is : ' + response.data.decode('utf-8'))
ChatbotController integration test stubs
6259905c3539df3088ecd8b2
class OrkutAuth(BaseGoogleOAuth): <NEW_LINE> <INDENT> AUTH_BACKEND = OrkutBackend <NEW_LINE> SETTINGS_KEY_NAME = 'ORKUT_CONSUMER_KEY' <NEW_LINE> SETTINGS_SECRET_NAME = 'ORKUT_CONSUMER_SECRET' <NEW_LINE> def user_data(self, access_token): <NEW_LINE> <INDENT> fields = ORKUT_DEFAULT_DATA <NEW_LINE> if hasattr(settings, 'O...
Orkut OAuth authentication mechanism
6259905cdd821e528d6da48b
class CliExtension(object): <NEW_LINE> <INDENT> COMMAND_NAME = None <NEW_LINE> COMMAND_DESCRIPTION = None <NEW_LINE> def __init__(self, parser: ArgumentParser, application): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.parser = parser <NEW_LINE> self.__application_manager = application <NEW_LINE> <DEDENT> def...
Allows Module to extend CLI interface
6259905cf548e778e596cba0
class ExpenseUnpacker(Unpacker): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Unpacker.__init__( self, scalars=('currency', 'description', 'expense_date', 'payer', 'value'), vectors=('travelers', ) )
Specialized unpacker for Expense data
6259905c2ae34c7f260ac6fd
class IEeaPrivacyscreenLayer(IDefaultBrowserLayer): <NEW_LINE> <INDENT> pass
Marker interface that defines a browser layer.
6259905c0fa83653e46f64fc
class Attachment: <NEW_LINE> <INDENT> __slots__ = ('id', 'size', 'height', 'width', 'filename', 'url', 'proxy_url', '_http') <NEW_LINE> def __init__(self, *, data, state): <NEW_LINE> <INDENT> self.id = int(data['id']) <NEW_LINE> self.size = data['size'] <NEW_LINE> self.height = data.get('height') <NEW_LINE> self.width ...
Represents an attachment from Discord. Attributes ------------ id: int The attachment ID. size: int The attachment size in bytes. height: Optional[int] The attachment's height, in pixels. Only applicable to images. width: Optional[int] The attachment's width, in pixels. Only applicable to images. filen...
6259905c097d151d1a2c2683
class Job(object): <NEW_LINE> <INDENT> def __init__(self, page): <NEW_LINE> <INDENT> self.document = weakref.ref(page.document()) <NEW_LINE> self.pageNumber = page.pageNumber() <NEW_LINE> self.rotation = page.rotation() <NEW_LINE> self.width = page.physWidth() <NEW_LINE> self.height = page.physHeight()
Simply contains data needed to create an image later.
6259905c8da39b475be047fd
class Game: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.player = Player("Phixyn") <NEW_LINE> self._woodcutting = Woodcutting() <NEW_LINE> self.player.add_skill(self._woodcutting) <NEW_LINE> self._wood = Wood() <NEW_LINE> self.player.add_item_to_inventory(self._wood) <NEW_LINE> self._chat = Chat(max...
The Game class.
6259905c91af0d3eaad3b43f
class DeliverCallbackUseCase: <NEW_LINE> <INDENT> MAX_ATTEMPTS = 3 <NEW_LINE> def __init__(self, delivery_outbox_repo: repos.DeliveryOutboxRepo, hub_url): <NEW_LINE> <INDENT> self.delivery_outbox = delivery_outbox_repo <NEW_LINE> self.hub_url = hub_url <NEW_LINE> <DEDENT> def execute(self): <NEW_LINE> <INDENT> delivera...
Is used by a callback deliverer worker Reads queue delivery_outbox_repo consisting of tasks in format: (url, message) Then such message should be either sent to this URL and the task is deleted or, in case of any error, not to be re-scheduled again (up to MAX_ATTEMPTS times)
6259905c097d151d1a2c2684
class ActionShortcut(object): <NEW_LINE> <INDENT> def __init__(self, ckan): <NEW_LINE> <INDENT> self._ckan = ckan <NEW_LINE> <DEDENT> def __getattr__(self, name): <NEW_LINE> <INDENT> def action(**kwargs): <NEW_LINE> <INDENT> files = {} <NEW_LINE> for k, v in kwargs.items(): <NEW_LINE> <INDENT> if is_file_like(v): <NEW_...
ActionShortcut(foo).bar(baz=2) <=> foo.call_action('bar', {'baz':2}) An instance of this class is used as the .action attribute of LocalCKAN and RemoteCKAN instances to provide a short way to call actions, e.g:: pkg = demo.action.package_show(id='adur_district_spending') instead of:: pkg = demo.call_action(...
6259905ca219f33f346c7e1c
class ANscanTest(RunStopMacroTestCase): <NEW_LINE> <INDENT> pass
Not yet implemented. Once implemented it will test anscan. See :class:`.RunStopMacroTestCase` for requirements.
6259905c498bea3a75a59108
class InboundNATRules(_BaseHNVModel): <NEW_LINE> <INDENT> _endpoint = ("/networking/v1/loadBalancers/{parent_id}" "/inboundNatRules/{resource_id}") <NEW_LINE> parent_id = model.Field( name="parent_id", key="parentResourceID", is_property=False, is_required=True, is_read_only=True) <NEW_LINE> backend_ip_configuration = ...
Model for inbound nat rules. This resource is used to configure the load balancer to apply Network Address Translation of inbound traffic.
6259905c32920d7e50bc765d
class OutputCheckerFix(doctest.OutputChecker): <NEW_LINE> <INDENT> _literal_re = re.compile( r"(\W|^)[uU]([rR]?[\'\"])", re.UNICODE) <NEW_LINE> _remove_byteorder = re.compile( r"([\'\"])[|<>]([biufcSaUV][0-9]+)([\'\"])", re.UNICODE) <NEW_LINE> _original_output_checker = doctest.OutputChecker <NEW_LINE> def do_fixes(sel...
A special doctest OutputChecker that normalizes a number of things common to astropy doctests. - Removes u'' prefixes on string literals - In Numpy dtype strings, removes the leading pipe, i.e. '|S9' -> 'S9'. Numpy 1.7 no longer includes it in display.
6259905c460517430c432b5e
class Show(ImageElement): <NEW_LINE> <INDENT> xmlns = namespaces.image <NEW_LINE> class Help: <NEW_LINE> <INDENT> synopsis = "show an image" <NEW_LINE> <DEDENT> image = Attribute( "Image to show", type="expression", default="image", evaldefault=True ) <NEW_LINE> def logic(self, context): <NEW_LINE> <INDENT> if context[...
Show an image (for debugging purposes). Imagemagick is required for this operation.
6259905c07f4c71912bb0a52
class About(QtGui.QDialog, about_dialog_layout.Ui_Dialog): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(About, self).__init__() <NEW_LINE> self.setupUi(self)
This class is a dialog which contains information about the program. The information shown here is on where to go for help, and on the lisence.
6259905cd6c5a102081e3738
class HolderListSchema(schema.ResponseSchema): <NEW_LINE> <INDENT> fields = { "City": fields.Str(required=False, load_from="City"), "CreateTime": fields.Int(required=False, load_from="CreateTime"), "DockerCount": fields.Int(required=False, load_from="DockerCount"), "DockerInfo": fields.List(DockerInfoSchema()), "Expire...
HolderList - 容器组信息
6259905c3c8af77a43b68a4c
class ComparisonTestFramework(SupernodeCoinTestFramework): <NEW_LINE> <INDENT> def set_test_params(self): <NEW_LINE> <INDENT> self.num_nodes = 2 <NEW_LINE> self.setup_clean_chain = True <NEW_LINE> <DEDENT> def add_options(self, parser): <NEW_LINE> <INDENT> parser.add_option("--testbinary", dest="testbinary", default=os...
Test framework for doing p2p comparison testing Sets up some supernodecoind binaries: - 1 binary: test binary - 2 binaries: 1 test binary, 1 ref binary - n>2 binaries: 1 test binary, n-1 ref binaries
6259905c7b25080760ed87eb
class DeleteForm(FlaskForm): <NEW_LINE> <INDENT> pass
Delete form – intentionally left blank.
6259905c0a50d4780f7068ca
class GroupsV2GroupPotentialMembership(object): <NEW_LINE> <INDENT> swagger_types = { 'member': 'GroupsV2GroupPotentialMember', 'group': 'GroupsV2GroupV2' } <NEW_LINE> attribute_map = { 'member': 'member', 'group': 'group' } <NEW_LINE> def __init__(self, member=None, group=None): <NEW_LINE> <INDENT> self._member = None...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
6259905c2c8b7c6e89bd4e05
class TestPlotMultiFunctions(unittest.TestCase): <NEW_LINE> <INDENT> def test_plot_multi_functions(self): <NEW_LINE> <INDENT> functions = { "Gamma 2.2": lambda x: x ** (1 / 2.2), "Gamma 2.4": lambda x: x ** (1 / 2.4), "Gamma 2.6": lambda x: x ** (1 / 2.6), } <NEW_LINE> plot_kwargs = {"c": "r"} <NEW_LINE> figure, axes =...
Define :func:`colour.plotting.common.plot_multi_functions` definition unit tests methods.
6259905c3539df3088ecd8b3
class MyRobot(wpilib.TimedRobot): <NEW_LINE> <INDENT> def robotInit(self): <NEW_LINE> <INDENT> self.drive = wpilib.drive.DifferentialDrive(wpilib.Talon(0), wpilib.Talon(1)) <NEW_LINE> self.components = {"drive": self.drive} <NEW_LINE> self.automodes = AutonomousModeSelector("autonomous", self.components) <NEW_LINE> <DE...
This shows using the AutonomousModeSelector to automatically choose autonomous modes. If you find this useful, you may want to consider using the Magicbot framework, as it already has this integrated into it.
6259905ce76e3b2f99fda016
class Handler: <NEW_LINE> <INDENT> def callback(self, prefix, name, *args): <NEW_LINE> <INDENT> method = getattr(self, prefix+name, None) <NEW_LINE> if isinstance(method, collections.Callable): return method(*args) <NEW_LINE> <DEDENT> def start(self, name): <NEW_LINE> <INDENT> self.callback('start_', name) <NEW_LINE> <...
An object that handles method calls from the Parser. The Parser will call the start() and end() methods at the beginning of each block, with the proper block name as a parameter. The sub() method will be used in regular expression substitution. When called with a name such as 'emphasis', it will return a proper substi...
6259905c16aa5153ce401afb
class Annotator(object): <NEW_LINE> <INDENT> def __init__(self, remove_types): <NEW_LINE> <INDENT> self.remove_list = remove_types <NEW_LINE> <DEDENT> def extract(self, i, doc, tags): <NEW_LINE> <INDENT> tag = [] <NEW_LINE> while doc[i] != '>': <NEW_LINE> <INDENT> tag.append(doc[i]) <NEW_LINE> i += 1 <NEW_LINE> <DEDENT...
Annotates named-entity tag with Wikipedia text.
6259905c7047854f463409d7
class MPUException(Exception): <NEW_LINE> <INDENT> def __init__(self, errString): <NEW_LINE> <INDENT> Exception.__init__(self) <NEW_LINE> self.errString = errString <NEW_LINE> <DEDENT> def ShowAndExit(self): <NEW_LINE> <INDENT> sys.stderr.write("mpu: Error: " + self.errString) <NEW_LINE> sys.exit(1)
Simple exception class for fatal errors.
6259905c8e7ae83300eea6a5
class FileRequestError(GeneralFileRequestsError): <NEW_LINE> <INDENT> not_found = None <NEW_LINE> not_a_folder = None <NEW_LINE> app_lacks_access = None <NEW_LINE> no_permission = None <NEW_LINE> email_unverified = None <NEW_LINE> validation_error = None <NEW_LINE> def is_not_found(self): <NEW_LINE> <INDENT> return sel...
There is an error with the file request. This class acts as a tagged union. Only one of the ``is_*`` methods will return true. To get the associated value of a tag (if one exists), use the corresponding ``get_*`` method. :ivar file_requests.FileRequestError.not_found: This file request ID was not found. :ivar fil...
6259905c55399d3f05627b37
class NBVAE(nn.Module): <NEW_LINE> <INDENT> NAME = "nbvae" <NEW_LINE> def __init__( self, *, n_input: int, n_latent: int, encoder_layers: Sequence[int], decoder_layers: Sequence[int] = None, lib_loc: float, lib_scale: float, scale_factor: float = 1.0, weight_scaling: bool = False, ): <NEW_LINE> <INDENT> super().__init_...
Variational auto-encoder model with negative binomial loss. :param n_input: Number of input genes :param n_latent: Dimensionality of the latent space :param encoder_layers: Number and size of hidden layers used for encoder NN :param decoder_layers: Number of size of hidden layers for decoder NN. ...
6259905c435de62698e9d41c
class TestBuildUrlShowHide(unittest.TestCase): <NEW_LINE> <INDENT> def makeManageable(self, component='', delete=True, checkPermission=True): <NEW_LINE> <INDENT> from raptus.article.core.manageable import Manageable <NEW_LINE> context = mock.Mock(spec='absolute_url portal_membership'.split()) <NEW_LINE> context.absolut...
Test edge cases of Manageable.build_url_show_hide().
6259905c009cb60464d02b4e
class UserSearchResultList(SearchResultList): <NEW_LINE> <INDENT> model = User <NEW_LINE> serializer_class = UserPublicOnlySerializer <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> key = self.request.GET.get('q', '') <NEW_LINE> return User.objects.filter(Q(username__contains=key) | Q(moment__contains=key) | Q(n...
List results of search on users ## Reading ### Permissions * Anyone can read this endpoint. ### Fields Parameter | Description | Type ------------ | ----------------------------------- | ---------- `q` | A UTF-8, URL-encoded search query | _string_ ### Response Reading this endp...
6259905cfff4ab517ebcee3d
class WSignalSource(WSignalSourceProto): <NEW_LINE> <INDENT> @verify_type('strict', signal_names=str) <NEW_LINE> def __init__(self, *signal_names): <NEW_LINE> <INDENT> WSignalSourceProto.__init__(self) <NEW_LINE> self.__signal_names = signal_names <NEW_LINE> self.__callbacks = {x: weakref.WeakSet() for x in signal_name...
:class:`.WSignalSourceProto` implementation
6259905ce5267d203ee6cecc
class RegisterUser(MethodView): <NEW_LINE> <INDENT> def post(self): <NEW_LINE> <INDENT> if request.content_type == 'application/json': <NEW_LINE> <INDENT> post_data = request.get_json() <NEW_LINE> email = post_data.get('email') <NEW_LINE> password = post_data.get('password') <NEW_LINE> username = post_data.get('usernam...
View function to register a user via the api
6259905c2ae34c7f260ac6ff
class OpenAction (BaseAction): <NEW_LINE> <INDENT> stringId = u"OpenTree" <NEW_LINE> def __init__ (self, application): <NEW_LINE> <INDENT> self._application = application <NEW_LINE> <DEDENT> @property <NEW_LINE> def title (self): <NEW_LINE> <INDENT> return _(u"Open…") <NEW_LINE> <DEDENT> @property <NEW_LINE> def descri...
Открытие дерева заметок
6259905c91af0d3eaad3b441
class ViewTestCase(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.client = APIClient() <NEW_LINE> self.job_data = { 'id': 1, 'name': 'Mock Job (1)', 'type': 'test', 'status': 'unknown', 'meta': {} } <NEW_LINE> self.response = self.client.post( reverse('create'), self.job_data, format="json") <...
Test suite for the api views.
6259905c8a43f66fc4bf37a5
class DoctorModel(BaseModel): <NEW_LINE> <INDENT> email = CharField(max_length=100, unique=True) <NEW_LINE> first_name = CharField(max_length=100) <NEW_LINE> last_name = CharField(max_length=100) <NEW_LINE> qualification = CharField(max_length=100) <NEW_LINE> profession = CharField(max_length=100) <NEW_LINE> birth = Ch...
{ 'first_name':'', 'last_name':'', 'qualification':'', 'profession': 'xxx', 'experience':'', 'gender':'', 'schedule':'', }
6259905ca219f33f346c7e1e
class RequestList(Resource): <NEW_LINE> <INDENT> @admin_required <NEW_LINE> def get(self): <NEW_LINE> <INDENT> result = models.Request.get_all_requests() <NEW_LINE> return result
Contains GET method to get all requests
6259905c8e7ae83300eea6a6
class TestData75(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 testData75(self): <NEW_LINE> <INDENT> pass
Data75 unit test stubs
6259905c01c39578d7f14243
class Hello(command.Command): <NEW_LINE> <INDENT> def initialize(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def destroy(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> async def command(self, message): <NEW_LINE> <INDENT> if message['type'] != 'message' or 'subtype' in message: <NEW_LINE> <INDENT> return <...
Simple command to showcase command structure/responses
6259905c442bda511e95d866
class DammitLogger(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.log_dir = os.path.join(get_dammit_dir(), 'log') <NEW_LINE> try: <NEW_LINE> <INDENT> os.makedirs(self.log_dir) <NEW_LINE> <DEDENT> except OSError: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> self.log_file = os.path.join(self.lo...
Set up logging for the dammit application. We insulate it in a class to let us choose to only activate it when the program itself is run, effectively keeping the tests and any use of the API from being noisy.
6259905c460517430c432b5f
class MachineData: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRING, 'name', None, None, ), (2, TType.I32, 'port', None, None, ), ) <NEW_LINE> def __init__(self, name=None, port=None,): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.port = port <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDE...
Attributes: - name - port
6259905c07f4c71912bb0a54
class _StructUnion(DeclNode): <NEW_LINE> <INDENT> def __init__(self, tag, members, r): <NEW_LINE> <INDENT> self.tag = tag <NEW_LINE> self.members = members <NEW_LINE> self.r = r <NEW_LINE> super().__init__()
Base class to represent a struct or a union C type. tag (Token) - Token containing the tag of this struct members (List(Node)) - List of decl_nodes nodes of members, or None r (Range) - range that the specifier covers
6259905c56b00c62f0fb3ee4
class Table(tablib.Dataset): <NEW_LINE> <INDENT> def __init__(self, fields, process_data, *args, **kwargs): <NEW_LINE> <INDENT> super(Table, self).__init__(*args, **kwargs) <NEW_LINE> self.fields = fields <NEW_LINE> self._process_data = types.MethodType(process_data, self, Table) <NEW_LINE> self.headers = [f.header for...
A extension of `tablib.Dataset` that has fields' slugs and HTML classes, and processes data that it is fed through a function provided at initialization.
6259905c63b5f9789fe8678b
class TokenAuthMiddleware: <NEW_LINE> <INDENT> def __init__(self, inner): <NEW_LINE> <INDENT> self.inner = inner <NEW_LINE> <DEDENT> def __call__(self, scope): <NEW_LINE> <INDENT> user = None <NEW_LINE> database_sync_to_async(close_old_connections)() <NEW_LINE> parsed_qs = parse_qs(scope["query_string"].decode("utf8"))...
Custom token auth middleware
6259905c3617ad0b5ee07764
class UserRegisterSchema(ResponsesSchema): <NEW_LINE> <INDENT> status_descriptions_create = { '201': _('Пользователь создан'), } <NEW_LINE> def get_status_descriptions(self, has_body=False, *args, **kwargs): <NEW_LINE> <INDENT> results = super().get_status_descriptions(has_body, *args, **kwargs) <NEW_LINE> if self.view...
Класс документирует user-register и partner-register (добавляет статус коды в openapi документацию)
6259905c7047854f463409d9
class IBrowserView(IView): <NEW_LINE> <INDENT> pass
Views which are specialized for requests from a browser o Such views are distinct from those geerated via WebDAV, FTP, XML-RPC, etc..
6259905c99cbb53fe68324f9
class SceneOperation(HookClass): <NEW_LINE> <INDENT> def execute(self, operation, file_path, context, parent_action, file_version, read_only, **kwargs): <NEW_LINE> <INDENT> if operation == "current_path": <NEW_LINE> <INDENT> file_path = MaxPlus.FileManager.GetFileNameAndPath() <NEW_LINE> if not file_path: <NEW_LINE> <I...
Hook called to perform an operation with the current scene
6259905c67a9b606de5475ae
class Z2UnicodeEncodingConflictResolver: <NEW_LINE> <INDENT> implements(IUnicodeEncodingConflictResolver) <NEW_LINE> def __init__(self, mode='strict'): <NEW_LINE> <INDENT> self.mode = mode <NEW_LINE> <DEDENT> def resolve(self, context, text, expression): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return unicode(text)...
This resolver tries to lookup the encoding from the 'management_page_charset' property and defaults to sys.getdefaultencoding().
6259905cd53ae8145f919a7c
class Update(models.Model): <NEW_LINE> <INDENT> UPDATE_STATUS = ( (Status.PENDING, "Pending"), (Status.STARTED, "Started"), (Status.RUNNING, "Running"), (Status.ABORTED, "Aborted"), (Status.SUCCESS, "Success"), (Status.FAILED, "Failed"), (Status.WAITING, "Waiting"), (Status.REJECTED, "Rejected"), ) <NEW_LINE> u...
Update description An Update is defined by a vehicle and a software package that to be sent to that vehicle.
6259905cb5575c28eb7137d9
class ProgressBar: <NEW_LINE> <INDENT> BAR = '${GREEN}[${BOLD}%s%s${NORMAL}${GREEN}]${NORMAL} %3d%%\n' <NEW_LINE> HEADER = '${BOLD}${CYAN}%s${NORMAL}\n\n' <NEW_LINE> simple = False <NEW_LINE> def __init__(self, term, header): <NEW_LINE> <INDENT> self.term = term <NEW_LINE> if not (self.term.CLEAR_EOL and self.term.UP a...
A 3-line progress bar, which looks like:: Header 20% [===========----------------------------------] progress message The progress bar is colored, if the terminal supports color output; and adjusts to the width of the terminal.
6259905c32920d7e50bc7660
class ConvertFiguresTransformer(Transformer): <NEW_LINE> <INDENT> from_format = Unicode(config=True, help='Format the converter accepts') <NEW_LINE> to_format = Unicode(config=True, help='Format the converter writes') <NEW_LINE> def __init__(self, **kw): <NEW_LINE> <INDENT> super(ConvertFiguresTransformer, self).__init...
Converts all of the outputs in a notebook from one format to another.
6259905cb57a9660fecd3095
class PacketCaptureListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[PacketCaptureResult]'}, } <NEW_LINE> def __init__( self, *, value: Optional[List["PacketCaptureResult"]] = None, **kwargs ): <NEW_LINE> <INDENT> super(PacketCaptureListResult, self).__in...
List of packet capture sessions. :param value: Information about packet capture sessions. :type value: list[~azure.mgmt.network.v2020_06_01.models.PacketCaptureResult]
6259905c2ae34c7f260ac701
class AbstractClient(Producer): <NEW_LINE> <INDENT> ONE_TIME_EVENTS = ('finish',) <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return self.__class__.__name__ <NEW_LINE> <DEDENT> __str__ = __repr__ <NEW_LINE> def connect(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def close(self): <NEW...
A :class:`.Producer` for a client connections.
6259905c91af0d3eaad3b442
class ThemePlan(AttestationModel): <NEW_LINE> <INDENT> __tablename__ = 'theme_plan' <NEW_LINE> id = Column(Integer, primary_key=True, autoincrement=True) <NEW_LINE> period_id = Column(ForeignKey(f'period.id')) <NEW_LINE> start_date = Column(DateTime(True), nullable=False) <NEW_LINE> end_date = Column(DateTime(True), nu...
Тематический план task: https://jira.it2g.ru/browse/KISUSS-913 subtask: https://jira.it2g.ru/browse/KISUSS-1047
6259905c23e79379d538db16
class case_01(unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> cls.driver = webdriver.Chrome() <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def tearDownClass(cls): <NEW_LINE> <INDENT> cls.driver.quit() <NEW_LINE> <DEDENT> def add_img(self): <NEW_LINE> <INDENT> retu...
def setUp(cls): cls.driver = webdriver.Chrome() def tearDown(cls): cls.driver.quit()
6259905c3d592f4c4edbc4f7
@admin.register(UserProfile) <NEW_LINE> class UserProfileAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = 'user', <NEW_LINE> def get_queryset(self, request): <NEW_LINE> <INDENT> return super().get_queryset(request).select_related('user')
UserProfile admin.
6259905c8e71fb1e983bd0e5
class GenericTable(AppendableFrameTable): <NEW_LINE> <INDENT> pandas_kind = "frame_table" <NEW_LINE> table_type = "generic_table" <NEW_LINE> ndim = 2 <NEW_LINE> obj_type = DataFrame <NEW_LINE> levels: list[Hashable] <NEW_LINE> @property <NEW_LINE> def pandas_type(self) -> str: <NEW_LINE> <INDENT> return self.pandas_kin...
a table that read/writes the generic pytables table format
6259905c4f6381625f199faf
class Slice(Delegate): <NEW_LINE> <INDENT> defaults = manager.Defaults( ("width", 256, "Slice width"), ("side", "left", "Side of the slice (left, right, top, bottom)"), ("name", "max", "Name of this layout."), ) <NEW_LINE> def __init__(self, side, width, wname=None, wmclass=None, role=None, fallback=Max(), **config): <...
Slice layout This layout cuts piece of screen and places a single window on that piece, and delegates other window placement to other layout
6259905c8e7ae83300eea6a8
class GoogleFinanceSource(): <NEW_LINE> <INDENT> _DATA_SOURCE = 'google' <NEW_LINE> def __init__(self, ticker): <NEW_LINE> <INDENT> self.ticker = ticker <NEW_LINE> <DEDENT> def get_stock_historical_prices(self, start_date, end_date): <NEW_LINE> <INDENT> return web.DataReader(self.ticker, self._DATA_SOURCE, start_date, ...
Google Finance source
6259905c627d3e7fe0e084a6
class Access_Id(Base): <NEW_LINE> <INDENT> subclass_names = ['Use_Name', 'Generic_Spec']
:F03R:`519`:: <access-id> = <use-name> | <generic-spec>
6259905c01c39578d7f14244
class AttributeDescriptor(Descriptor): <NEW_LINE> <INDENT> __slots__ = ("_name", "_doc") <NEW_LINE> def __init__(self, name, doc=None): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> self._doc = doc <NEW_LINE> <DEDENT> def key(self): <NEW_LINE> <INDENT> return self._name <NEW_LINE> <DEDENT> def doc(self, obj): <NEW_L...
An ``AttributeDescriptor`` describes a simple attribute of an object.
6259905c460517430c432b60
class SomaFlowPlugin(GraphPluginBase): <NEW_LINE> <INDENT> def __init__(self, plugin_args=None): <NEW_LINE> <INDENT> if soma_not_loaded: <NEW_LINE> <INDENT> raise ImportError('SomaFlow could not be imported') <NEW_LINE> <DEDENT> super(SomaFlowPlugin, self).__init__(plugin_args=plugin_args) <NEW_LINE> <DEDENT> def _subm...
Execute using Soma workflow
6259905c07f4c71912bb0a56
class Test(unittest.TestCase): <NEW_LINE> <INDENT> def test_run_all(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> work_dir = os.getcwd() <NEW_LINE> os.chdir(EXAMPLES_DIR) <NEW_LINE> self._run_all_examples() <NEW_LINE> <DEDENT> finally: <NEW_LINE> <INDENT> os.chdir(work_dir) <NEW_LINE> <DEDENT> <DEDENT> def _run_a...
run pdf genration using all files in examples.
6259905c3617ad0b5ee07766
class RedisCacheStore(BaseCacheStore): <NEW_LINE> <INDENT> def __init__(self, redis_connection=None, **kwargs): <NEW_LINE> <INDENT> super(RedisCacheStore, self).__init__(**kwargs) <NEW_LINE> self._cache_store = redis_connection <NEW_LINE> <DEDENT> def save(self, key, data, expire=None): <NEW_LINE> <INDENT> pipe = self....
Redis cache using Redis' EXPIRE command to set expiration time. `delete_expired` raises NotImplementedError. Pass the Redis connection instance as `db_conn`. ################## IMPORTANT NOTE: This caching store uses a flat namespace for storing keys since we cannot set an EXPIRE for a hash `field`. Use different Re...
6259905cd486a94d0ba2d5e3
class SilentLogger(): <NEW_LINE> <INDENT> def debug(self, msg): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def warning(self, msg): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def error(self, msg): <NEW_LINE> <INDENT> pass
A logger for YouTube-DL that doesn't actually log anything.
6259905cbaa26c4b54d508c1
class SimContext(InstanceContext): <NEW_LINE> <INDENT> def __init__(self, version, sid): <NEW_LINE> <INDENT> super(SimContext, self).__init__(version) <NEW_LINE> self._solution = {'sid': sid, } <NEW_LINE> self._uri = '/Sims/{sid}'.format(**self._solution) <NEW_LINE> self._billing_periods = None <NEW_LINE> <DEDENT> def ...
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
6259905c99cbb53fe68324fc
class LoggerDependency: <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> self.logger: Optional[BoundLogger] = None <NEW_LINE> <DEDENT> async def __call__(self, request: Request) -> BoundLogger: <NEW_LINE> <INDENT> if not self.logger: <NEW_LINE> <INDENT> self.logger = structlog.get_logger(logging.logg...
Provides a structlog logger configured with request information. The following additional information will be included: * A UUID for the request * The method and URL of the request * The IP address of the client * The ``User-Agent`` header of the request, if any. The last three pieces of information will be added us...
6259905c7047854f463409dc
class TrackerAlleles( VariantsTracker ): <NEW_LINE> <INDENT> pattern = "(.*)_alleles_genes$"
default tracker for allele analysis.
6259905c435de62698e9d420
class LOE_076: <NEW_LINE> <INDENT> play = GenericChoice(CONTROLLER, RandomBasicHeroPower() * 3)
Sir Finley Mrrgglton
6259905c1f037a2d8b9e5379
class LstsqL2nz(_LstsqL2Solver): <NEW_LINE> <INDENT> def __call__(self, A, Y, rng=None, E=None): <NEW_LINE> <INDENT> sigma = (self.reg * A.max()) * np.sqrt((A > 0).mean(axis=0)) <NEW_LINE> sigma[sigma == 0] = sigma.max() <NEW_LINE> X, info = self.solver(A, Y, sigma, **self.kwargs) <NEW_LINE> return self.mul_encoders(X,...
Least-squares with L2 regularization on non-zero components.
6259905c30dc7b76659a0d8e
class DNNClassifier(estimator.Estimator): <NEW_LINE> <INDENT> def __init__(self, hidden_units, feature_columns, model_dir=None, n_classes=2, weight_column=None, label_vocabulary=None, optimizer='Adagrad', activation_fn=nn.relu, dropout=None, input_layer_partitioner=None, config=None): <NEW_LINE> <INDENT> if n_classes =...
A classifier for TensorFlow DNN models. Example: ```python sparse_feature_a = sparse_column_with_hash_bucket(...) sparse_feature_b = sparse_column_with_hash_bucket(...) sparse_feature_a_emb = embedding_column(sparse_id_column=sparse_feature_a, ...) sparse_feature_b_emb = embed...
6259905ca8ecb03325872833
class AlexaInterfaceEnum(str, Enum): <NEW_LINE> <INDENT> BrightnessController = "Alexa.BrightnessController" <NEW_LINE> ColorController = "Alexa.ColorController" <NEW_LINE> ColorTemperatureController = "Alexa.ColorTemperatureController" <NEW_LINE> Cooking = "Alexa.Cooking" <NEW_LINE> EndpointHealth = "Alexa.EndpointHea...
Alexa interfaces. Reference: https://developer.amazon.com/en-US/docs/alexa/device-apis/list-of-interfaces.html
6259905cf7d966606f7493c6
class Detail(object): <NEW_LINE> <INDENT> def __init__(self, tag=None, value=None): <NEW_LINE> <INDENT> self.swagger_types = { 'tag': 'str', 'value': 'str' } <NEW_LINE> self.attribute_map = { 'tag': 'tag', 'value': 'value' } <NEW_LINE> self._tag = tag <NEW_LINE> self._value = value <NEW_LINE> <DEDENT> @property <NEW_LI...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
6259905cf548e778e596cba5
class Bounds(BaseAPIObject): <NEW_LINE> <INDENT> def __init__(self, d): <NEW_LINE> <INDENT> self.__dict__ = d <NEW_LINE> self.southwest = Coordinates(self.southwest) <NEW_LINE> self.northeast = Coordinates(self.northeast) <NEW_LINE> <DEDENT> def __unicode__(self): <NEW_LINE> <INDENT> return u'(%s, %s)' % (self.southwes...
A bounding box that contains the `southwest` and `northeast` corners as lnt/lng pairs.
6259905c3539df3088ecd8b8
class IPConfigurationProfile(SubResource): <NEW_LINE> <INDENT> _validation = { 'type': {'readonly': True}, 'etag': {'readonly': True}, 'provisioning_state': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'st...
IP configuration profile child resource. Variables are only populated by the server, and will be ignored when sending a request. :param id: Resource ID. :type id: str :param name: The name of the resource. This name can be used to access the resource. :type name: str :ivar type: Sub Resource type. :vartype type: str ...
6259905cf548e778e596cba6
class TextLogger(logging.Logger): <NEW_LINE> <INDENT> def __init__(self, name = "text_logger", level = logging.DEBUG, rootdir = None, filename = "testlog.txt", mode = 'w'): <NEW_LINE> <INDENT> super(TextLogger, self).__init__(name=name, level=level) <NEW_LINE> self.rootdir = rootdir <NEW_LINE> report_dir = ...
Print logs to text file. Args: name (str): logger name level (logging): logging.DEBUG, etc... refer to logging docs filename (str): report file name mode (str): refer to logging docs
6259905c7d847024c075d9f0
class ResourceviewsZoneViewsDeleteResponse(_messages.Message): <NEW_LINE> <INDENT> pass
An empty ResourceviewsZoneViewsDelete response.
6259905cac7a0e7691f73afe
class RetryDB(RetryOperationalError, MySQLDatabase): <NEW_LINE> <INDENT> pass
封装数据库重试类
6259905ca79ad1619776b5cb
class DoMysql: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> host=config.get("db","host") <NEW_LINE> user = config.get("db", "user") <NEW_LINE> password = config.get("db", "password") <NEW_LINE> port = config.get("db", "port") <NEW_LINE> self.mysql = pymysql.connect(host=host,user=user,password=password,p...
完成与mysql数据库的交互
6259905c2ae34c7f260ac703
class BlobjectAsync(Object): <NEW_LINE> <INDENT> def ice_invoke(self, bytes, current): <NEW_LINE> <INDENT> pass
Special-purpose servant base class that allows a subclass to handle asynchronous Ice invocations as "blobs" of bytes.
6259905c91af0d3eaad3b444
class Stack: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.stack = [] <NEW_LINE> <DEDENT> def stack_empty(self): <NEW_LINE> <INDENT> return self.stack == [] <NEW_LINE> <DEDENT> def push(self, x): <NEW_LINE> <INDENT> self.stack.append(x) <NEW_LINE> <DEDENT> def pop(self): <NEW_LINE> <INDENT> return se...
Стек на списках
6259905c498bea3a75a5910b
class ObjectTypeClient(ObjectTypeClientOperationsMixin): <NEW_LINE> <INDENT> def __init__( self, base_url=None, **kwargs ): <NEW_LINE> <INDENT> if not base_url: <NEW_LINE> <INDENT> base_url = 'http://localhost:3000' <NEW_LINE> <DEDENT> self._config = ObjectTypeClientConfiguration(**kwargs) <NEW_LINE> self._client = Pip...
Service client for testing basic type: object swaggers. :param str base_url: Service URL :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
6259905c91f36d47f223199d
class Forafricconfig(Config): <NEW_LINE> <INDENT> NAME = "ForafricPro" <NEW_LINE> IMAGES_PER_GPU = 5 <NEW_LINE> GPU_COUNT = 1 <NEW_LINE> NUM_CLASSES = 1 + 1 <NEW_LINE> STEPS_PER_EPOCH = 500 <NEW_LINE> VALIDATION_STEPS = 50 <NEW_LINE> IMAGE_MAX_DIM=128 <NEW_LINE> IMAGE_MIN_DIM=128
Configuration for training on data in MS COCO format. Derives from the base Config class and overrides values specific to the COCO dataset.
6259905c4f6381625f199fb0
class UnidentifiedUser(ValueError): <NEW_LINE> <INDENT> pass
Raised when a specified account does not exist within a bank.
6259905c16aa5153ce401b00
class BuildConfigTestsBase(test_lib.GRRBaseTest): <NEW_LINE> <INDENT> exceptions = [ "Client.private_key", "PrivateKeys.ca_key", "PrivateKeys.executable_signing_private_key", "PrivateKeys.server_key", ] <NEW_LINE> disabled_filters = ["resource", "file"] <NEW_LINE> def ValidateConfig(self, config_file=None): <NEW_LINE> ...
Base for config functionality tests.
6259905c63b5f9789fe8678f
class RetrieveArticleAPIView(APIView): <NEW_LINE> <INDENT> def get(self, request, slug): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> article = Article.objects.get(slug=slug) <NEW_LINE> article.tag_list = list(article.tag_list.names()) <NEW_LINE> serializer = ArticleSerializer( article, many=False, context={'request': ...
this class that handles the get request with slug
6259905ce76e3b2f99fda01c
class TimestampField(Field): <NEW_LINE> <INDENT> base_type = "float" <NEW_LINE> validators = [FloatValidator()] <NEW_LINE> example = 34.8
A unix timestamp
6259905c2ae34c7f260ac704
@magento <NEW_LINE> class StoreImporter(MagentoImporter): <NEW_LINE> <INDENT> _model_name = ['magento.store', ] <NEW_LINE> def _create(self, data): <NEW_LINE> <INDENT> binding = super(StoreImporter, self)._create(data) <NEW_LINE> checkpoint = self.unit_for(StoreAddCheckpoint) <NEW_LINE> checkpoint.run(binding.id) <NEW_...
Import one Magento Store (create a sale.shop via _inherits)
6259905c10dbd63aa1c72189
@zope.interface.implementer_only(interfaces.IRadioWidget) <NEW_LINE> class RadioWidget(widget.HTMLInputWidget, SequenceWidget): <NEW_LINE> <INDENT> klass = u'radio-widget' <NEW_LINE> css = u'radio' <NEW_LINE> items = () <NEW_LINE> def isChecked(self, term): <NEW_LINE> <INDENT> return term.token in self.value <NEW_LINE>...
Input type radio widget implementation.
6259905c097d151d1a2c268c
class ListItem(FloatLayout): <NEW_LINE> <INDENT> data = ObjectProperty() <NEW_LINE> item_id = NumericProperty() <NEW_LINE> item_link = NumericProperty() <NEW_LINE> rv_key = NumericProperty(0) <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(ListItem, self).__init__(**kwargs) <NEW_LINE> <DEDENT> def on...
Class to create a list item on the item maintenance screen
6259905c435de62698e9d423
class _DragState(object): <NEW_LINE> <INDENT> def __init__(self, root, tab_bar, tab, start_pos): <NEW_LINE> <INDENT> self.dragging = False <NEW_LINE> self._root = root <NEW_LINE> self._tab_bar = tab_bar <NEW_LINE> self._tab = tab <NEW_LINE> self._start_pos = QtCore.QPoint(start_pos) <NEW_LINE> self._clone = None <NEW_L...
The _DragState class handles most of the work when dragging a tab.
6259905cbe8e80087fbc06a2
class DogsCatsDataset(ImageFolder): <NEW_LINE> <INDENT> url = "http://files.fast.ai/data/dogscats.zip" <NEW_LINE> filename = "dogscats.zip" <NEW_LINE> checksum = "aef22ec7d472dd60e8ee79eecc19f131" <NEW_LINE> def __init__(self, root: str, suffix: str, transform=None, target_transform=None, loader=default_loader, downloa...
The 'Dogs and Cats' dataset from kaggle. https://www.kaggle.com/c/dogs-vs-cats-redux-kernels-edition/ Args: root: the location where to store the dataset suffix: path to the train/valid/sample dataset. See folder structure. transform (callable, optional): A function/transform that takes in an PIL ...
6259905c91f36d47f223199e
class TestSetup(unittest.TestCase): <NEW_LINE> <INDENT> layer = COLLECTIVE_SMARTLINK_INTEGRATION_TESTING <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.portal = self.layer['portal'] <NEW_LINE> self.installer = api.portal.get_tool('portal_quickinstaller') <NEW_LINE> <DEDENT> def test_product_installed(self): <NEW_...
Test that collective.smartlink is properly installed.
6259905c8e71fb1e983bd0e8
class AMTH_SCREEN_OT_frame_jump(Operator): <NEW_LINE> <INDENT> bl_idname = "screen.amaranth_frame_jump" <NEW_LINE> bl_label = "Jump Frames" <NEW_LINE> forward = BoolProperty(default=True) <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> scene = context.scene <NEW_LINE> preferences = context.user_preferences.a...
Jump a number of frames forward/backwards
6259905cbaa26c4b54d508c4
class VertexPosition(Enum): <NEW_LINE> <INDENT> LEFT_OF_SOURCE = -1 <NEW_LINE> RIGHT_OF_SOURCE = 1 <NEW_LINE> SOURCE = 0
Enumeration class used to define position of a vertex w.r.t source in modular decomposition. For computing modular decomposition of connected graphs a source vertex is chosen. The position of vertex is w.r.t this source vertex. The various positions defined are - ``LEFT_OF_SOURCE`` -- indicates vertex is to left of s...
6259905c4f6381625f199fb1
class TestTeamMembershipPolicyChoiceRestrcted( TestTeamMembershipPolicyChoiceModerated): <NEW_LINE> <INDENT> POLICY = TeamMembershipPolicy.RESTRICTED
Test `TeamMembershipPolicyChoice` Restricted constraints.
6259905ce64d504609df9ede
class RiakLinkPhase(object): <NEW_LINE> <INDENT> def __init__(self, bucket, tag, keep): <NEW_LINE> <INDENT> self._bucket = bucket <NEW_LINE> self._tag = tag <NEW_LINE> self._keep = keep <NEW_LINE> <DEDENT> def to_array(self): <NEW_LINE> <INDENT> stepdef = {'bucket': self._bucket, 'tag': self._tag, 'keep': self._keep} <...
The RiakLinkPhase object holds information about a Link phase in a map/reduce operation. Normally you won't need to use this object directly, but instead call :meth:`RiakMapReduce.link` on RiakMapReduce objects to add instances to the query.
6259905ccc0a2c111447c5de
class Squad(): <NEW_LINE> <INDENT> def __init__(self, units_number: int, unit_type: str, color: str, attack_mode: int): <NEW_LINE> <INDENT> self.units_number = units_number <NEW_LINE> self.unit_type = unit_type <NEW_LINE> self.color = color <NEW_LINE> self.attack_mode = attack_mode <NEW_LINE> self.units = [] <NEW_LINE>...
Represents units squad
6259905c0a50d4780f7068ce
class PostResource(Resource): <NEW_LINE> <INDENT> method_decorators = [jwt_required] <NEW_LINE> def get(self, post_id): <NEW_LINE> <INDENT> schema = PostSchema() <NEW_LINE> post = Post.query.get_or_404(post_id) <NEW_LINE> return {"post": schema.dump(post).data}
Single object resource
6259905cd53ae8145f919a82
class LogSliceView(viewsets.ViewSet): <NEW_LINE> <INDENT> def get_log_handle(self, url): <NEW_LINE> <INDENT> return urllib2.urlopen( url, timeout=settings.TREEHERDER_REQUESTS_TIMEOUT ) <NEW_LINE> <DEDENT> @with_jobs <NEW_LINE> def list(self, request, project, jm): <NEW_LINE> <INDENT> job_id = request.query_params.get("...
This view serves slices of the log
6259905c45492302aabfdaf8
class MDDLinked_WithPreviousAndNext( MDDLinked_WithPrevious, MDDLinked_WithNext): <NEW_LINE> <INDENT> security = ClassSecurityInfo() <NEW_LINE> def __init__( self): <NEW_LINE> <INDENT> MDDLinked_WithPrevious.__init__( self) <NEW_LINE> MDDLinked_WithNext.__init__( self)
Abstract cache entry class fully able to participate in the linked list, integrating the capabilities to relate to both previous and next cache entries.
6259905cd268445f2663a66c