code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class AddTeam(Add): <NEW_LINE> <INDENT> log = logging.getLogger(__name__) <NEW_LINE> _command_name = 'add team'
Add a team.
6259903ed10714528d69efaf
class TreeAPIView(ListAPIView): <NEW_LINE> <INDENT> serializer_class = TreeSerializer <NEW_LINE> authentication_classes = (JSONWebTokenAuthentication,) <NEW_LINE> permission_classes = (IsAuthenticated,) <NEW_LINE> def list(self, request, *args, **kwargs): <NEW_LINE> <INDENT> queryset = self.filter_queryset(self.get_que...
自定义树结构View
6259903e73bcbd0ca4bcb4d1
class HTTSOAPAudit(Base): <NEW_LINE> <INDENT> __tablename__ = 'http_soap_audit' <NEW_LINE> id = Column(Integer, Sequence('http_soap_audit_seq'), primary_key=True) <NEW_LINE> name = Column(String(200), nullable=False, index=True) <NEW_LINE> cid = Column(String(200), nullable=False, index=True) <NEW_LINE> transport = Col...
An audit log for HTTP/SOAP channels and outgoing connections.
6259903ebaa26c4b54d504ef
class GenerateProto(appcommands.Cmd): <NEW_LINE> <INDENT> def Run(self, _): <NEW_LINE> <INDENT> codegen = _GetCodegenFromFlags() <NEW_LINE> _WriteProtoFiles(codegen)
Generate just the two proto files for a given API.
6259903e23e79379d538d746
class TestLiveApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = opendota_client.api.live_api.LiveApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_live_get(self): <NEW_LINE> <INDENT> pass
LiveApi unit test stubs
6259903e1d351010ab8f4d64
class ClasspointersGenerator(object): <NEW_LINE> <INDENT> def __init__(self, source_file): <NEW_LINE> <INDENT> self._source_file = source_file <NEW_LINE> self._internal_cp_table = self._load_cp_table() <NEW_LINE> <DEDENT> def cp_subset_by_ratio(self, min_class_ratio): <NEW_LINE> <INDENT> return {a_cp_row[ID_POSITION] f...
Expected file format: [ [ 1, # Rank "P31", # ID 94119660, # Classes 0, # Instances 94119660, # Total 1.0, # ratio "instance of" # label ], [ 2, "P279", 3025254, 0, 3025254, 1.0, "subclass of" ], ....
6259903eb57a9660fecd2cc2
class RichWidget(object): <NEW_LINE> <INDENT> def put_text(self, text, fg_color=None, bg_color=None, font=None, size=None, bold=False, italic=False, underline=False, strike=False): <NEW_LINE> <INDENT> raise NotImplementedError('Not implemented') <NEW_LINE> <DEDENT> def put_formatted(self, text, fg_color=None, bg_color=...
a base widget that allows to add formatted text based on a xhtml subset
6259903eb830903b9686ed9d
class Solution: <NEW_LINE> <INDENT> def searchRange(self, A, target): <NEW_LINE> <INDENT> if len(A) == 0: <NEW_LINE> <INDENT> return [-1, -1] <NEW_LINE> <DEDENT> lb = 0 <NEW_LINE> rb = len(A) - 1 <NEW_LINE> while lb < rb: <NEW_LINE> <INDENT> m = (lb + rb) // 2 <NEW_LINE> if target < A[m]: <NEW_LINE> <INDENT> rb = m - 1...
@param A: an integer sorted array @param target: an integer to be inserted @return: a list of length 2, [index1, index2]
6259903e30c21e258be99a54
class WLEDRestartButton(WLEDEntity, ButtonEntity): <NEW_LINE> <INDENT> _attr_device_class = ButtonDeviceClass.RESTART <NEW_LINE> _attr_entity_category = ENTITY_CATEGORY_CONFIG <NEW_LINE> def __init__(self, coordinator: WLEDDataUpdateCoordinator) -> None: <NEW_LINE> <INDENT> super().__init__(coordinator=coordinator) <NE...
Defines a WLED restart button.
6259903e63f4b57ef0086698
class WindowsSecurityContextOptions(_kuber_definitions.Definition): <NEW_LINE> <INDENT> def __init__( self, gmsa_credential_spec: str = None, gmsa_credential_spec_name: str = None, host_process: bool = None, run_as_user_name: str = None, ): <NEW_LINE> <INDENT> super(WindowsSecurityContextOptions, self).__init__( api_ve...
WindowsSecurityContextOptions contain Windows-specific options and credentials.
6259903eac7a0e7691f73731
class Scanner: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.keywords = {} <NEW_LINE> self.token_specs = [ ('NUMBER', r'\d+'), ('DOT', r'\.'), ('HYPHEN', r'\-'), ('STAR', r'\*'), ('PLUS', r'\+'), ('FSLASH', r'\/'), ('COLON', r':'), ('EQUALS', r'='), ('PIPE', r'\|'), ('QUOTE', r'[\'"]'), ('PAREN', r'[...
docstring for Scanner
6259903e1f5feb6acb163e3b
class ChromeDebuggerControl(object): <NEW_LINE> <INDENT> def __init__(self, port): <NEW_LINE> <INDENT> if websocket is None: <NEW_LINE> <INDENT> raise NotImplementedError("websocket-client library not available; cannot control Chrome.\n" "Please install it (pip install websocket-client) then try again.") <NEW_LINE> <DE...
Control Chrome using the debugging socket. Chrome must be launched using the --remote-debugging-port=<port> option for this to work!
6259903e596a897236128ed2
class Stream(QtCore.QObject): <NEW_LINE> <INDENT> newText = QtCore.pyqtSignal(str) <NEW_LINE> def write(self, text): <NEW_LINE> <INDENT> self.newText.emit(str(text))
Redirects console output to text widget.
6259903e8a349b6b4368748e
class Ocaml(Package): <NEW_LINE> <INDENT> homepage = "http://ocaml.org/" <NEW_LINE> url = "http://caml.inria.fr/pub/distrib/ocaml-4.03/ocaml-4.03.0.tar.gz" <NEW_LINE> version('4.06.0', '66e5439eb63dbb8b8224cba5d1b20947') <NEW_LINE> version('4.03.0', '43812739ea1b4641cf480f57f977c149') <NEW_LINE> depends_on('ncurse...
OCaml is an industrial strength programming language supporting functional, imperative and object-oriented styles
6259903e15baa723494631da
class GitHubServerUnavailable(HTTPException): <NEW_LINE> <INDENT> code = 500 <NEW_LINE> description = ( "Failed to get repositories " "Connection failed after max retries." )
*5xx* Connection issue` Raise in case any exception with GitHub except 404 occur
6259903ed53ae8145f9196a4
class ProjectComboBox(QtWidgets.QComboBox): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(ProjectComboBox, self).__init__(*args, **kwargs) <NEW_LINE> self._show_active_projects = False <NEW_LINE> self.fill_ui() <NEW_LINE> <DEDENT> def fill_ui(self): <NEW_LINE> <INDENT> from stalker ...
A QComboBox variant for Stalker Project instances
6259903e63b5f9789fe863b5
class LavaFloorExam2018Env(ObsGrid): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> actions = {0: "L", 1: "R", 2: "U", 3: "D"} <NEW_LINE> grid = [ ["S", "L", "L", "L", "L", "L"], ["L", "L", "W", "L", "L", "P"], ["L", "P", "W", "L", "L", "W"], ["L", "L", "L", "L", "L", "L"], ["P", "L", "L", "L", "L", "G"] ]...
The floor is lava! Actions have a stochastic outcome. Bigger grid.
6259903e23e79379d538d748
class NfvPortResource(BASE, NovaBase): <NEW_LINE> <INDENT> __tablename__ = "nfv_port_resource" <NEW_LINE> id = Column(Integer, primary_key=True, autoincrement=True) <NEW_LINE> node_id = Column(Integer, nullable=True) <NEW_LINE> nic_id = Column(String(length=255), nullable=True) <NEW_LINE> name = Column(String(length=25...
Represents nfv port resource.
6259903ecad5886f8bdc59a1
class Species(FixedObject): <NEW_LINE> <INDENT> attributes = ['name', 'color', 'representation', 'tags'] <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> FixedObject.__init__(self, **kwargs) <NEW_LINE> self.name = kwargs.get('name', '') <NEW_LINE> self.representation = kwargs.get('representation', '') <NEW_...
Class that represent a species such as oxygen, empty, ... . Note: `empty` is treated just like a species.
6259903e10dbd63aa1c71e20
class Services: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.services = { "account": { "email": "test@test.com", "firstname": "HA", "lastname": "HA", "username": "HA", "password": "password", }, "service_offering": { "name": "Tiny Instance", "displaytext": "Tiny Instance", "cpunumber": 1, "cpuspeed"...
Test network offering Services
6259903ebe383301e0254a61
class ServedAssetFieldType(enum.IntEnum): <NEW_LINE> <INDENT> UNSPECIFIED = 0 <NEW_LINE> UNKNOWN = 1 <NEW_LINE> HEADLINE_1 = 2 <NEW_LINE> HEADLINE_2 = 3 <NEW_LINE> HEADLINE_3 = 4 <NEW_LINE> DESCRIPTION_1 = 5 <NEW_LINE> DESCRIPTION_2 = 6
The possible asset field types. Attributes: UNSPECIFIED (int): No value has been specified. UNKNOWN (int): The received value is not known in this version. This is a response-only value. HEADLINE_1 (int): The asset is used in headline 1. HEADLINE_2 (int): The asset is used in headline 2. HEADLINE_3 (int):...
6259903ed6c5a102081e336f
class Console: <NEW_LINE> <INDENT> def __init__(self, width=0, height=0, tab_size=4, variables={}): <NEW_LINE> <INDENT> self.width = width <NEW_LINE> self.height = height <NEW_LINE> self.tab_size = tab_size <NEW_LINE> self.variables = variables <NEW_LINE> <DEDENT> @property <NEW_LINE> def size(self): <NEW_LINE> <INDENT...
Definition of the console being used.
6259903ed99f1b3c44d068e6
class Solution: <NEW_LINE> <INDENT> def isValidBST(self, root): <NEW_LINE> <INDENT> return self.__isValid(root, [None]) <NEW_LINE> <DEDENT> def __isValid(self, root, prev): <NEW_LINE> <INDENT> if not root: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> if not self.__isValid(root.left, prev): <NEW_LINE> <INDENT> re...
@param: root: The root of binary tree. @return: True if the binary tree is BST, or false
6259903ed4950a0f3b111765
class periodic(object): <NEW_LINE> <INDENT> def __init__(self, document): <NEW_LINE> <INDENT> self.document = document <NEW_LINE> self.callback = None <NEW_LINE> self.period = None <NEW_LINE> self.count = None <NEW_LINE> self.counter = None <NEW_LINE> self._start_time = None <NEW_LINE> self.timeout = None <NEW_LINE> <D...
Mocks the API of periodic Thread in hv.core.util, allowing a smooth API transition on bokeh server.
6259903e63f4b57ef0086699
class Sha1Hash(object): <NEW_LINE> <INDENT> name = 'python-sha1' <NEW_LINE> digest_size = 20 <NEW_LINE> block_size = 64 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self._h = ( 0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0, ) <NEW_LINE> self._unprocessed = b'' <NEW_LINE> self._message_byte_length = 0...
A class that mimics that hashlib api and implements the SHA-1 algorithm.
6259903e73bcbd0ca4bcb4d4
class Track(object): <NEW_LINE> <INDENT> def __init__(self, category = None, frame_number = None, track_id = None, **kwds): <NEW_LINE> <INDENT> super(Track, self).__init__(**kwds) <NEW_LINE> self.category = category <NEW_LINE> self.frame_number = frame_number <NEW_LINE> self.last_added = 0 <NEW_LINE> self.length = 0 <N...
Class to store & manipulate a single track.
6259903e711fe17d825e15c1
class ProgressBar(object): <NEW_LINE> <INDENT> def __init__(self, niter, f, width, silent): <NEW_LINE> <INDENT> self.niter = niter <NEW_LINE> self.f = f <NEW_LINE> self.width = width <NEW_LINE> self.silent = silent <NEW_LINE> self.count = 0 <NEW_LINE> self.nchar = 0 <NEW_LINE> <DEDENT> def __call__(self, inc=1): <NEW_L...
Simple progress bar for the screen logger.
6259903e29b78933be26a9e8
class MultiServer(object): <NEW_LINE> <INDENT> def __init__(self, addr, registry, connect=False, context=None): <NEW_LINE> <INDENT> self.context = context or zmq.Context.instance() <NEW_LINE> self.addr = addr <NEW_LINE> self.connect = connect <NEW_LINE> self.registry = registry <NEW_LINE> <DEDENT> def run_device(self, ...
A multi-threaded ZMQ server.
6259903e8a43f66fc4bf33da
class ODE(HasTraits): <NEW_LINE> <INDENT> name = Str <NEW_LINE> num_vars = Int(0) <NEW_LINE> vars = List(Str, desc='The names of the variables of X vector') <NEW_LINE> changed = Event <NEW_LINE> def eval(self, X, t): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def default_domain(self): <NEW_LINE> ...
An ODE of the form dX/dt = f(X).
6259903e30dc7b76659a0a7c
class OclWrapper_Collection(OclWrapper_Any, OclWrapper_Multiple): <NEW_LINE> <INDENT> def __length_hint__(self) -> int: <NEW_LINE> <INDENT> return self._wrapped.__length_hint__() <NEW_LINE> <DEDENT> def __setitem__(self, key: object, item: object): <NEW_LINE> <INDENT> self._wrapped.__setitem__(key, item) <NEW_LINE> <DE...
A wrapper to emulate Collection type in OCL (in python <multiple types possibles depending on the collection>).
6259903ebaa26c4b54d504f3
class QeTask(pipeBase.Task): <NEW_LINE> <INDENT> ConfigClass = QeConfig <NEW_LINE> _DefaultName = "QeTask" <NEW_LINE> @pipeBase.timeMethod <NEW_LINE> def run(self, sensor_id, qe_files, pd_ratio_file, mask_files, gains, bias_frame=None, medians_file=None, vendor_data=False, correction_image=None, mondiode_func=None): <N...
Task to compute QE curves from wavelength scan dataset
6259903e507cdc57c63a5fe7
class AzureAsyncOperationResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'status': {'key': 'status', 'type': 'str'}, 'error': {'key': 'error', 'type': 'Error'}, } <NEW_LINE> def __init__( self, *, status: Optional[Union[str, "NetworkOperationStatus"]] = None, error: Optional["Error"] = None, ...
The response body contains the status of the specified asynchronous operation, indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the response bod...
6259903ed4950a0f3b111766
class hello(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(hello, self).__init__() <NEW_LINE> pathToFile = 'C:/johannes/gdrive/scripts/sequence/maya/tools/exportNulls/ui' <NEW_LINE> qtWin = cmds.loadUI(uiFile=pathToFile) <NEW_LINE> if cmds.window(qtWin, exists=True): <NEW_LINE> <INDENT> cmds...
docstring for hello
6259903e07d97122c4217eea
class VarGenerator(object): <NEW_LINE> <INDENT> def __init__(self, starting_vid=1): <NEW_LINE> <INDENT> self.vid = starting_vid <NEW_LINE> self.store = {} <NEW_LINE> <DEDENT> def new(self, sort, properties=None): <NEW_LINE> <INDENT> varstring = '{}{}'.format(sort, self.vid) <NEW_LINE> if properties is None: <NEW_LINE> ...
Simple class to produce variables, incrementing the vid for each one.
6259903eac7a0e7691f73735
class MastodonAPI(): <NEW_LINE> <INDENT> def __init__(self, extractor, root="https://pawoo.net", access_token=("286462927198d0cf3e24683e91c8259a" "ac4367233064e0570ca18df2ac65b226")): <NEW_LINE> <INDENT> access_token = extractor.config("access-token", access_token) <NEW_LINE> self.session = extractor.session <NEW_LINE>...
Minimal interface for the Mastodon API on pawoo.net https://github.com/tootsuite/mastodon https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md
6259903e379a373c97d9a275
class VUMeter(): <NEW_LINE> <INDENT> def __init__(self, parent, track, top, bottom, increments, vu_set, master = False): <NEW_LINE> <INDENT> self.frames = [0.0] * RMS_FRAMES <NEW_LINE> self.parent = parent <NEW_LINE> self.track = track <NEW_LINE> self.top = top <NEW_LINE> self.bottom = bottom <NEW_LINE> self.multiplier...
represents a single VU to store RMS values etc in
6259903e50485f2cf55dc1cf
class SelectObject( ActionStep ): <NEW_LINE> <INDENT> def __init__( self, admin ): <NEW_LINE> <INDENT> self.admin = admin <NEW_LINE> self.query = admin.get_query() <NEW_LINE> <DEDENT> def gui_run( self, gui_context ): <NEW_LINE> <INDENT> select_dialog = SelectDialog( self.admin, self.query ) <NEW_LINE> select_dialog.ex...
Select an object from a list :param admin: a :class:`camelot.admin.object_admin.ObjectAdmin` object
6259903e96565a6dacd2d8b1
class Student: <NEW_LINE> <INDENT> def __init__(self, first_name, last_name, age): <NEW_LINE> <INDENT> self.age = age <NEW_LINE> self.last_name = last_name <NEW_LINE> self.first_name = first_name <NEW_LINE> <DEDENT> def to_json(self): <NEW_LINE> <INDENT> return self.__dict__ <NEW_LINE> <DEDENT> def to_json(self, attrs=...
new class
6259903e66673b3332c31645
@dataclasses.dataclass <NEW_LINE> class UserService: <NEW_LINE> <INDENT> _user_repository: IUserRepository <NEW_LINE> def exists(self, user: User) -> bool: <NEW_LINE> <INDENT> return self._user_repository.exists(user)
レポジトリを利用したドメインサービス Attributes: _user_repository (IUserRepository): ユーザレポジトリ Note: リスト5.6を利用するとドメインサービスが主体にならない
6259903ebe383301e0254a65
class DeletePrivilegeEventsResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RequestId = params.get("RequestId")
DeletePrivilegeEvents返回参数结构体
6259903e8e71fb1e983bcd1b
@combiner([Uname, rht_release]) <NEW_LINE> class RedHatRelease(object): <NEW_LINE> <INDENT> def __init__(self, uname, rh_rel): <NEW_LINE> <INDENT> self.major = self.minor = self.rhel = None <NEW_LINE> if uname and uname.redhat_release.major != -1: <NEW_LINE> <INDENT> self.major = uname.redhat_release.major <NEW_LINE> s...
Combiner class to check uname and redhat-release for RHEL major/minor version. Prefer uname to redhat-release. Attributes: major (int): The major RHEL version. minor (int): The minor RHEL version. rhel (str): The RHEL version, e.g. '7.2', '7.5-0.14' rhel6 (str): The RHEL version when it's RHEL6, otherw...
6259903ea4f1c619b294f7ae
class MemcacheTestCase(BaseTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(MemcacheTestCase, self).setUp() <NEW_LINE> self.clear_memcache() <NEW_LINE> <DEDENT> def clear_memcache(self): <NEW_LINE> <INDENT> memcache.flush_all() <NEW_LINE> <DEDENT> def assertMemcacheHits(self, hits): <NEW_LINE> ...
The ``MemcacheTestCase`` is a base test case that provides helper methods for dealing with App Engine's Memcache API. App Engine actually does most of the work for this by providing statistics through the Memcache API, as well as a simple method call to clear out the cache. The main feature of this is the ability to ...
6259903e23849d37ff852307
class PluginProxy(object): <NEW_LINE> <INDENT> def inject(self, data, url): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def setInjectionCode(self, code): <NEW_LINE> <INDENT> raise NotImplementedError
' Main class modules
6259903eec188e330fdf9ae7
class Detector(object): <NEW_LINE> <INDENT> def __init__(self, hPath): <NEW_LINE> <INDENT> self.haarDetector = HaarDetector(hPath) <NEW_LINE> self.meanshiftTracker = None <NEW_LINE> <DEDENT> def detectar(self,image): <NEW_LINE> <INDENT> if(self.meanshiftTracker == None): <NEW_LINE> <INDENT> seEncontro, x,y,w,h = self.h...
Esta clase se encarga de encontrar y dar seguimiento determinado patron dado por el haar feature pasado en el constructor
6259903e1f5feb6acb163e41
class FakeFindQuery(object): <NEW_LINE> <INDENT> def __init__(self, pattern): <NEW_LINE> <INDENT> self.pattern = pattern
Fake Query object for testing puposes. We don't use the Graphite Query because it imports too many things from Django.
6259903e30c21e258be99a5b
class GroupSerializer(serializers.HyperlinkedModelSerializer): <NEW_LINE> <INDENT> users_count = serializers.IntegerField(read_only=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Group <NEW_LINE> fields = ('url', 'name', 'users_count',) <NEW_LINE> extra_kwargs = {'url': {'view_name': 'api:group-detail', 'look...
Group list serializer. users_count - field that represents ammount of users in group, passed from view as annotation.
6259903e29b78933be26a9ea
class Column(SerializationMixin, SA_Column): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(Column, self).__init__(*args, **kwargs)
Represents a column in a database table. Inherits from :class:`sqlalchemy.schema.Column <sqlalchemy:sqlalchemy.schema.Column>`
6259903e004d5f362081f90b
class MDict(dict): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.missing = kwargs.pop("missing", 0) <NEW_LINE> dict.__init__(self, kwargs) <NEW_LINE> <DEDENT> def __missing__(self, _key): <NEW_LINE> <INDENT> return self.missing
A dictionionary which returns self.missing (default=0) for non existing value The advantage over collections.defaultdict(int), is that the key is not filled when a unknown key is requested.
6259903ee76e3b2f99fd9c5a
class KeychainException(Exception): <NEW_LINE> <INDENT> def __init__(self, value=""): <NEW_LINE> <INDENT> self.message_prefix = "Keychain Error:" <NEW_LINE> self.message = "%s %s" % (self.message_prefix, value) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.message
The generic keychain exception class
6259903e82261d6c527307eb
class DfpClientTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.network_code = '12345' <NEW_LINE> self.application_name = 'application name' <NEW_LINE> self.oauth2_client = 'unused' <NEW_LINE> self.https_proxy = 'myproxy:443' <NEW_LINE> self.cache = None <NEW_LINE> self.version = s...
Tests for the googleads.dfp.DfpClient class.
6259903e07d97122c4217eed
class ProjectStep: <NEW_LINE> <INDENT> def __init__(self, client, data): <NEW_LINE> <INDENT> self.client = client <NEW_LINE> self._data = data <NEW_LINE> <DEDENT> @property <NEW_LINE> def project_step_id(self): <NEW_LINE> <INDENT> return self._data.get("projectStepId") <NEW_LINE> <DEDENT> @property <NEW_LINE> def proje...
A step of a Tamr project. This is not a `BaseResource` because it has no API path and cannot be directly retrieved or modified. See https://docs.tamr.com/reference#retrieve-downstream-dataset-usage :param client: Delegate underlying API calls to this client. :type client: :class:`~tamr_unify_client.Client` :param dat...
6259903e26238365f5fadda6
class _CommandWithNamespaceTypeInfo(_CommandBaseTypeInfo): <NEW_LINE> <INDENT> def __init__(self, command): <NEW_LINE> <INDENT> self._command = command <NEW_LINE> super(_CommandWithNamespaceTypeInfo, self).__init__(command) <NEW_LINE> <DEDENT> def get_constructor_method(self): <NEW_LINE> <INDENT> class_name = common.ti...
Class for command code generation.
6259903e30dc7b76659a0a80
class CoreDownloader(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.name = "CORE" <NEW_LINE> self.config = None <NEW_LINE> self.logger = None <NEW_LINE> self.downloader = None <NEW_LINE> self.uploader = None <NEW_LINE> self.db = None <NEW_LINE> self.new_version = None <NEW_LINE> <DEDENT> def ...
Core of this project
6259903e1d351010ab8f4d6b
class SymLinkNest: <NEW_LINE> <INDENT> def __init__(self, dirname): <NEW_LINE> <INDENT> self._dirname = dirname <NEW_LINE> <DEDENT> def add_provider(self, provider): <NEW_LINE> <INDENT> for filename in provider.executable_list: <NEW_LINE> <INDENT> self.add_executable(filename) <NEW_LINE> <DEDENT> <DEDENT> def add_execu...
A class for setting up a control directory with symlinked executables
6259903ed10714528d69efb3
class NotifyWorker(BaseWorker): <NEW_LINE> <INDENT> def __init__(self, program, **kwargs): <NEW_LINE> <INDENT> super(NotifyWorker, self).__init__(program, **kwargs) <NEW_LINE> self.registered = [] <NEW_LINE> <DEDENT> def do(self, function): <NEW_LINE> <INDENT> def make_new_fun(fun): <NEW_LINE> <INDENT> @functools.wraps...
Show notifications
6259903e23e79379d538d74e
class Title(models.Model): <NEW_LINE> <INDENT> id = models.IntegerField(primary_key=True) <NEW_LINE> name = models.CharField(max_length=100) <NEW_LINE> admin_notes = models.TextField(blank=True, null=True) <NEW_LINE> admin_published = models.BooleanField(default=True) <NEW_LINE> meta_created_datetime = models.DateTimeF...
Title for each custom user, e.g. Mr, Mrs, Dr, Prof.
6259903e0fa83653e46f6129
class Distros(collection.Collection): <NEW_LINE> <INDENT> def collection_type(self): <NEW_LINE> <INDENT> return "distro" <NEW_LINE> <DEDENT> def factory_produce(self, collection_mgr, item_dict): <NEW_LINE> <INDENT> new_distro = distro.Distro(collection_mgr) <NEW_LINE> new_distro.from_dict(item_dict) <NEW_LINE> return n...
A distro represents a network bootable matched set of kernels and initrd files.
6259903e6e29344779b018a2
class BaseResource(object): <NEW_LINE> <INDENT> HUMAN_ID = False <NEW_LINE> NAME_ATTR = "name" <NEW_LINE> get_details = True <NEW_LINE> _non_display = [] <NEW_LINE> def __init__(self, manager, info, key=None, loaded=False): <NEW_LINE> <INDENT> self._loaded = loaded <NEW_LINE> self.manager = manager <NEW_LINE> if key: <...
A resource represents a particular instance of an object (server, flavor, etc). This is pretty much just a bag for attributes.
6259903e50485f2cf55dc1d3
class SmokeTests(SmokeTestCase): <NEW_LINE> <INDENT> authenticated_or_anonymous_urls = ["/public-data/"] <NEW_LINE> authenticated_urls = [ "/public-data/activate-1-overview/", "/public-data/activate-2-information/", "/public-data/toggle-sharing/", "/public-data/deactivate/", ] <NEW_LINE> post_only_urls = [ "/public-dat...
A simple GET test for all of the simple URLs in the site.
6259903e8a43f66fc4bf33e0
class _Masters(object): <NEW_LINE> <INDENT> def add_masters_name(self, masters_name): <NEW_LINE> <INDENT> stmt = iscconf.Statement(masters_name) <NEW_LINE> self.add_element(stmt) <NEW_LINE> <DEDENT> def add_master(self, master, port=None, key=None): <NEW_LINE> <INDENT> ip = ipaddr.IPAddress(master) <NEW_LINE> value = [...
Abstract class for NamedMasters and Masters classes.
6259903e1d351010ab8f4d6d
class InvalidGroupId(Exception): <NEW_LINE> <INDENT> def __init__(self, value=''): <NEW_LINE> <INDENT> Exception.__init__(self, value)
...
6259903ec432627299fa4229
class DevicesActive(bb.Struct): <NEW_LINE> <INDENT> __slots__ = [ '_windows_value', '_macos_value', '_linux_value', '_ios_value', '_android_value', '_other_value', '_total_value', ] <NEW_LINE> _has_required_fields = True <NEW_LINE> def __init__(self, windows=None, macos=None, linux=None, ios=None, android=None, other=N...
Each of the items is an array of values, one value per day. The value is the number of devices active within a time window, ending with that day. If there is no data for a day, then the value will be None. :ivar team.DevicesActive.windows: Array of number of linked windows (desktop) clients with activity. :ivar te...
6259903ed99f1b3c44d068ed
class DegreeVsVariable(base.PlotterBase): <NEW_LINE> <INDENT> def plot(self): <NEW_LINE> <INDENT> fig, ax = plt.subplots() <NEW_LINE> variable = self.graph.settings.get('variable', 'size') <NEW_LINE> labels = { 'degree': "Stopnja", 'in-degree': "Vhodna stopnja", 'out-degree': "Izhodna stopnja", } <NEW_LINE> values = { ...
Draws graph degree in relation to some variable.
6259903e96565a6dacd2d8b3
class NoSuchObjectError(OperationalError, ValueError): <NEW_LINE> <INDENT> pass
Raised when an operation is attempted on a non-existent object.
6259903e66673b3332c31649
class HMDA(object): <NEW_LINE> <INDENT> def __init__(self, institution_zip_file, institution_csv_file, loan_zip_file, loans_csv_file): <NEW_LINE> <INDENT> self.inst_fp = institution_zip_file <NEW_LINE> self.inst_file = institution_csv_file <NEW_LINE> self.loans_fp = loan_zip_file <NEW_LINE> self.loans_file = loans_csv_...
Main Class for generating file / formatting / saving JSON data from zipped .csv files
6259903ebe383301e0254a69
class Post(core_models.TimeStampedModel): <NEW_LINE> <INDENT> title = models.CharField(max_length=140) <NEW_LINE> description = models.TextField() <NEW_LINE> photo = models.ImageField(blank=True, upload_to='post_photos/') <NEW_LINE> author = models.ForeignKey( "authentication.User", related_name="author", on_delete=mod...
Post Model Definition
6259903ea4f1c619b294f7b0
class NativeEventsManagementServiceStub(object): <NEW_LINE> <INDENT> def __init__(self, channel): <NEW_LINE> <INDENT> self.ListEvents = channel.unary_unary( '/dmi.NativeEventsManagementService/ListEvents', request_serializer=dmi_dot_hw__pb2.HardwareID.SerializeToString, response_deserializer=dmi_dot_hw__events__mgmt__s...
Missing associated documentation comment in .proto file.
6259903e30c21e258be99a5e
class MockMemcache(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.key = None <NEW_LINE> self.time = None <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def get_stats(): <NEW_LINE> <INDENT> return [('127.0.0.1:11211 (1)', {})] <NEW_LINE> <DEDENT> def delete(self, key, time): <NEW_LINE> <INDENT> ...
Mock of memcache
6259903eac7a0e7691f7373b
class OrderService(object): <NEW_LINE> <INDENT> def _create_order(self, paypal_payment_id, user_id, products, order_id, status): <NEW_LINE> <INDENT> order = Order({ 'paypal_payment_id': paypal_payment_id, 'user_id': user_id, 'created_at': datetime.now(), 'status': status }) <NEW_LINE> db.session.add(order) <NEW_LINE> d...
Database wrapper for the orders
6259903e50485f2cf55dc1d5
class Solution: <NEW_LINE> <INDENT> def coinChange(self, coins, amount): <NEW_LINE> <INDENT> dp = [sys.maxsize for _ in range(amount + 1)] <NEW_LINE> dp[0] = 0 <NEW_LINE> for amo in range(1, amount + 1): <NEW_LINE> <INDENT> for coin in coins: <NEW_LINE> <INDENT> if amo - coin >= 0: <NEW_LINE> <INDENT> dp[amo] = min(dp[...
@param coins: a list of integer @param amount: a total amount of money amount @return: the fewest number of coins that you need to make up
6259903e29b78933be26a9ec
class V4RoomMemberDemotedFromOwner(object): <NEW_LINE> <INDENT> openapi_types = { 'stream': 'V4Stream', 'affected_user': 'V4User' } <NEW_LINE> attribute_map = { 'stream': 'stream', 'affected_user': 'affectedUser' } <NEW_LINE> def __init__(self, stream=None, affected_user=None, local_vars_configuration=None): <NEW_LINE>...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually.
6259903e004d5f362081f90d
class SubscriptionAPI(Resource): <NEW_LINE> <INDENT> def get(self, sid): <NEW_LINE> <INDENT> subscription = get_object_or_404(Subscription, sid) <NEW_LINE> result = SubscriptionSchema().dump(subscription) <NEW_LINE> return jsonify(result.data)
Resource/routes for subscription endpoints
6259903e50485f2cf55dc1d6
class Part(object): <NEW_LINE> <INDENT> BOUNDARY = '---------------------------89322229629855' <NEW_LINE> CRLF = '\r\n' <NEW_LINE> CONTENT_TYPE = 'Content-Type' <NEW_LINE> CONTENT_DISPOSITION = 'Content-Disposition' <NEW_LINE> DEFAULT_CONTENT_TYPE = 'application/octet-stream' <NEW_LINE> def __init__(self, name, filenam...
Class holding a single part of the form. You should never need to use this class directly; instead, use the factory methods in Multipart: field and file.
6259903e26068e7796d4db99
class OffsetBaseIndexScale(interface.namedtypedtuple, interface.symbol_t): <NEW_LINE> <INDENT> _fields = ('offset','base','index','scale') <NEW_LINE> _types = (six.integer_types, (types.NoneType,register_t), (types.NoneType,register_t), six.integer_types) <NEW_LINE> @property <NEW_LINE> def __symbols__(self): <NEW_LINE...
A tuple containing an intel operand (offset, base, index, scale). Within the tuple, `base` and `index` are registers.
6259903e21bff66bcd723ebc
class __EntryIterator(object): <NEW_LINE> <INDENT> ITEMS_MODE = 0 <NEW_LINE> KEYS_MODE = 1 <NEW_LINE> VALUES_MODE = 2 <NEW_LINE> def __init__(self, entries, mode): <NEW_LINE> <INDENT> self.__mode = mode <NEW_LINE> self.__entries = entries <NEW_LINE> self.__next_index = 0 <NEW_LINE> self.__skip_unused() <NEW_LINE> <DEDE...
Iterator class for visiting all entries in the collection.
6259903e30dc7b76659a0a84
class NotificationEventRequest: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.I64, 'lastEvent', None, None, ), (2, TType.I32, 'maxEvents', None, None, ), ) <NEW_LINE> def __init__(self, lastEvent=None, maxEvents=None,): <NEW_LINE> <INDENT> self.lastEvent = lastEvent <NEW_LINE> self.maxEvents = maxEvents <NEW_LINE...
Attributes: - lastEvent - maxEvents
6259903e16aa5153ce401740
class DeviceCategory(object): <NEW_LINE> <INDENT> def __init__(self, code: str, description: str, max_devices: Optional[int]): <NEW_LINE> <INDENT> self._code = code <NEW_LINE> self._description = description <NEW_LINE> self._max_devices = max_devices <NEW_LINE> <DEDENT> @property <NEW_LINE> def code(self) -> str: <NEW_...
Represents a category of devices.
6259903e3c8af77a43b68865
class TruncatedZipfDist(DiscreteDist): <NEW_LINE> <INDENT> def __init__(self, alpha=1.0, n=1000, seed=None): <NEW_LINE> <INDENT> if alpha <= 0: <NEW_LINE> <INDENT> raise ValueError("alpha must be positive") <NEW_LINE> <DEDENT> if n < 0: <NEW_LINE> <INDENT> raise ValueError("n must be positive") <NEW_LINE> <DEDENT> pdf ...
Implements a truncated Zipf distribution, i.e. a Zipf distribution with a finite population, which can hence take values of alpha > 0.
6259903e23e79379d538d752
class NavButton(Styled): <NEW_LINE> <INDENT> _style = "plain" <NEW_LINE> def __init__(self, title, dest, sr_path=True, nocname=False, aliases=None, target="", use_params=False, css_class='', data=None): <NEW_LINE> <INDENT> aliases = aliases or [] <NEW_LINE> aliases = set(_force_unicode(a.rstrip('/')) for a in aliases) ...
Smallest unit of site navigation. A button once constructed must also have its build() method called with the current path to set self.path. This step is done automatically if the button is passed to a NavMenu instance upon its construction.
6259903e24f1403a926861f6
class debounce_handler(object): <NEW_LINE> <INDENT> DEBOUNCE_SECONDS = 0.3 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.lastEcho = time.time() <NEW_LINE> <DEDENT> def on(self, client_address): <NEW_LINE> <INDENT> if self.debounce(): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> return self.act(client_a...
Use this handler to keep multiple Amazon Echo devices from reacting to the same voice command.
6259903e0a366e3fb87ddc39
class FailedMos(BaseObject): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> BaseObject.__init__(self, "FailedMos", "failedMos") <NEW_LINE> if kwargs: <NEW_LINE> <INDENT> for n, v in six.iteritems(kwargs): <NEW_LINE> <INDENT> self.attr_set(n, v)
This is FailedMos class.
6259903eac7a0e7691f7373d
class TestUsersEdit(BaseTestCase): <NEW_LINE> <INDENT> @request_context <NEW_LINE> def test_admin_can_edit_all_attributes(self): <NEW_LINE> <INDENT> UserPayload() .blend() .patch(self.user_1.id, user=self.admin)
Test Users edit
6259903e6e29344779b018a6
class TestQueryPreset(mediaBase.MediaBase): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> mediaBase.MediaBase.__init__(self) <NEW_LINE> self.pre = self.prefix + 'querypreset' <NEW_LINE> self.preset_name = self.pre <NEW_LINE> self.container = 'mp4' <NEW_LINE> self.client = media_client.MediaClient(media_co...
test query preset
6259903e50485f2cf55dc1d7
class ICallforpaper(model.Schema): <NEW_LINE> <INDENT> title = schema.TextLine( title=_(safe_unicode('Call for paper title')), ) <NEW_LINE> description = schema.Text( title=_(safe_unicode('Call for paper summary')), required=False, ) <NEW_LINE> primary('details') <NEW_LINE> details = RichText( title=_(safe_unicode('Det...
A call for paper for a conferences. A call for paper can contain incomming talks.
6259903e07f4c71912bb0686
class DatetimeWidget(BaseDatetimeWidget): <NEW_LINE> <INDENT> pickDate = True <NEW_LINE> pickTime = True <NEW_LINE> klass = 'datetime-widget'
Widget for Datetime fields.
6259903e50485f2cf55dc1d8
class TestRoutesApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = swagger_client.api.routes_api.RoutesApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_get_route_as_gpx(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tes...
RoutesApi unit test stubs
6259903ed164cc61758221ca
class Invitation(models.Model): <NEW_LINE> <INDENT> exam = models.ForeignKey(Exam, on_delete=models.CASCADE, blank=True) <NEW_LINE> email = models.EmailField() <NEW_LINE> date_created = models.DateTimeField(auto_now_add=True) <NEW_LINE> date_started = models.DateTimeField(blank=True, null=True) <NEW_LINE> date_ended = ...
Invite to exam by email or direct user
6259903e07d97122c4217ef3
class TestCompareXLSXFiles(ExcelComparisonTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.maxDiff = None <NEW_LINE> filename = 'selection01.xlsx' <NEW_LINE> test_dir = 'xlsxwriter/test/comparison/' <NEW_LINE> self.got_filename = test_dir + '_test_' + filename <NEW_LINE> self.exp_filename = test_dir...
Test file created by XlsxWriter against a file created by Excel.
6259903e73bcbd0ca4bcb4df
class DisbiGetTableData(View): <NEW_LINE> <INDENT> experiment_meta_model = None <NEW_LINE> def get(self, request, exp_id_str): <NEW_LINE> <INDENT> response = {} <NEW_LINE> response['status'] = None <NEW_LINE> response['data'] = {} <NEW_LINE> response['err_msg'] = None <NEW_LINE> exp_ids = get_ids(exp_id_str) <NEW_LINE>...
View for initially getting the data for the datatable.
6259903e96565a6dacd2d8b5
class RecordingStopping(base_classes.Baseevents): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> base_classes.Baseevents.__init__(self) <NEW_LINE> self.name = "RecordingStopping"
A request to stop recording has been issued.
6259903e507cdc57c63a5ff1
class CosineAnnealingExtendLR(torch.optim.lr_scheduler._LRScheduler): <NEW_LINE> <INDENT> def __init__(self, optimizer, T_cosine_max, eta_min=0, last_epoch=-1): <NEW_LINE> <INDENT> self.eta_min = eta_min <NEW_LINE> self.T_cosine_max = T_cosine_max <NEW_LINE> super(CosineAnnealingExtendLR, self).__init__(optimizer, last...
Set the learning rate of each parameter group using a cosine annealing schedule, where :math:`\eta_{max}` is set to the initial lr and :math:`T_{cur}` is the number of epochs since the last restart in SGDR: .. math:: \eta_t = \eta_{min} + \frac{1}{2}(\eta_{max} - \eta_{min})(1 + \cos(\frac{T_{cur}}{T_{max}}\pi...
6259903e0a366e3fb87ddc3b
class FacebookMessage: <NEW_LINE> <INDENT> notification_message_max_len = 15 <NEW_LINE> def __init__(self, sent_by, location, time, content): <NEW_LINE> <INDENT> self.sent_by = sent_by <NEW_LINE> self.location = location <NEW_LINE> self.time = time <NEW_LINE> self.content = content <NEW_LINE> <DEDENT> def notification(...
페이스북 메시지 클래스
6259903e63f4b57ef008669f
class FixtureLib: <NEW_LINE> <INDENT> def assert_logger(self, logger): <NEW_LINE> <INDENT> if not isinstance(logger, logging.Logger): <NEW_LINE> <INDENT> raise TypeError("logger must be a Logger instance") <NEW_LINE> <DEDENT> <DEDENT> def close_loggers(self, handler): <NEW_LINE> <INDENT> return logging.flush.close_late...
Class that exposes the resmokelib API that fixtures can use.
6259903e6e29344779b018a8
class TestValidTemplateMeta(MetaTestCaseClass): <NEW_LINE> <INDENT> def __new__(cls, name, bases, dct): <NEW_LINE> <INDENT> def test_method(site): <NEW_LINE> <INDENT> def test_template(self): <NEW_LINE> <INDENT> lang = site.lang <NEW_LINE> if lang not in keys: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> msg = i18n.t...
Test meta class.
6259903e1f5feb6acb163e49
class VirtualCorpus(Corpus): <NEW_LINE> <INDENT> _virtual_works = [] <NEW_LINE> for name in dir(virtual): <NEW_LINE> <INDENT> className = getattr(virtual, name) <NEW_LINE> if callable(className): <NEW_LINE> <INDENT> obj = className() <NEW_LINE> if isinstance(obj, virtual.VirtualWork): <NEW_LINE> <INDENT> if obj.corpusP...
A model of the *virtual* corpus. >>> virtualCorpus = corpus.VirtualCorpus()
6259903e097d151d1a2c22bc
@inherit_doc <NEW_LINE> class VectorSizeHint( JavaTransformer, HasInputCol, HasHandleInvalid, JavaMLReadable, JavaMLWritable ): <NEW_LINE> <INDENT> size = Param( Params._dummy(), "size", "Size of vectors in column.", typeConverter=TypeConverters.toInt ) <NEW_LINE> handleInvalid = Param( Params._dummy(), "handleInvalid"...
A feature transformer that adds size information to the metadata of a vector column. VectorAssembler needs size information for its input columns and cannot be used on streaming dataframes without this metadata. .. versionadded:: 2.3.0 Notes ----- VectorSizeHint modifies `inputCol` to include size metadata and does n...
6259903e6fece00bbacccc06
class Critter(object): <NEW_LINE> <INDENT> def __init__(self, name, hunger = 0, boredom = 0): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.hunger = hunger <NEW_LINE> self.boredom = boredom <NEW_LINE> <DEDENT> def __pass_time(self): <NEW_LINE> <INDENT> self.hunger += 1 <NEW_LINE> self.boredom += 1 <NEW_LINE> <DE...
A virtual pet
6259903e07d97122c4217ef5
class EndpointAuthorization(object): <NEW_LINE> <INDENT> deserialized_types = { 'object_type': 'str' } <NEW_LINE> attribute_map = { 'object_type': 'type' } <NEW_LINE> supports_multiple_types = False <NEW_LINE> discriminator_value_class_map = { 'AWS_IAM': 'ask_smapi_model.v0.development_events.subscriber.endpoint_aws_au...
Authorization information to be able to publish notification to specified endpoint. :param object_type: :type object_type: (optional) str .. note:: This is an abstract class. Use the following mapping, to figure out the model class to be instantiated, that sets ``type`` variable. | AWS_IAM: :py:class:...
6259903e21bff66bcd723ec0
class AutoInitModelMixin(object): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> @declared_attr <NEW_LINE> def __tablename__(cls): <NEW_LINE> <INDENT> return cls.__name__.lower() <NEW_LINE> <DEDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> for attr in (a for a in dir(self) i...
Mixin for populating models' columns automatically (no need to define an __init__ method) and set the default value if any. Also sets the model's id and __tablename__ automatically.
6259903e30dc7b76659a0a88
class Users(UserMixin, db.Model): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> erp_user_id = db.Column(db.Integer, unique=True, nullable=False) <NEW_LINE> erp_user_name = db.Column(db.String(50), nullable=False) <NEW_LINE> tm_email_id = db.Column(db.String(50), unique=True, nullable=False...
This class is used for User table
6259903ed10714528d69efb7