code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class local(DecoratorBase): <NEW_LINE> <INDENT> def __call__(self, *args, **kwargs): <NEW_LINE> <INDENT> context = self.determine_context(args, kwargs) <NEW_LINE> self.push_fn(context, self.fn_key, self.fn) <NEW_LINE> args, kwargs = self.key_and_push_args(args, kwargs, context=context) <NEW_LINE> result_key = context._... | Decorator to run a function locally on the engines. | 62598eecff9c53063f518dc2 |
class catalogCluster_membersLe3FitFile (_ImportedBinding_euclid_dm__fit.fitsFile): <NEW_LINE> <INDENT> _TypeDefinition = None <NEW_LINE> _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY <NEW_LINE> _Abstract = False <NEW_LINE> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, u'catalogClu... | Complex type {http://euclid.esa.org/schema/pro/le3/cog}catalogCluster_membersLe3FitFile with content type ELEMENT_ONLY | 62598eecaad79263cf42cf6a |
class Code: <NEW_LINE> <INDENT> def __init__(self, rawcode) -> None: <NEW_LINE> <INDENT> if not hasattr(rawcode, "co_filename"): <NEW_LINE> <INDENT> rawcode = getrawcode(rawcode) <NEW_LINE> <DEDENT> if not isinstance(rawcode, CodeType): <NEW_LINE> <INDENT> raise TypeError("not a code object: {!r}".format(rawcode)) <NEW... | wrapper around Python code objects | 62598eec16aa5153ce3fec5e |
class B: <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> <DEDENT> '''@helpDescription(The __eq__ method is implicity called whenever the "==" operator is used. The left side of the comparison operator is passed in as "self", and the right side is passed in as "other".)''... | @helpDescription(A value is passed in, and assigned to the class.) | 62598eec67a9b606de54472d |
class CsvTableModel(QtCore.QAbstractTableModel): <NEW_LINE> <INDENT> def __init__(self, data,headers): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._data=data <NEW_LINE> self._headers=headers; <NEW_LINE> <DEDENT> def rowCount(self, parent): <NEW_LINE> <INDENT> return len(self._data) <NEW_LINE> <DEDENT> def co... | The model for a CSV table. | 62598eecfff4ab517ebcbf36 |
class ListGistsForAuthenticatedUserInputSet(InputSet): <NEW_LINE> <INDENT> def set_AccessToken(self, value): <NEW_LINE> <INDENT> super(ListGistsForAuthenticatedUserInputSet, self)._set_input('AccessToken', value) <NEW_LINE> <DEDENT> def set_Page(self, value): <NEW_LINE> <INDENT> super(ListGistsForAuthenticatedUserInput... | An InputSet with methods appropriate for specifying the inputs to the ListGistsForAuthenticatedUser
Choreo. The InputSet object is used to specify input parameters when executing this Choreo. | 62598eec7d847024c075ab2c |
class ApplicationGatewayWebApplicationFirewallConfiguration(Model): <NEW_LINE> <INDENT> _validation = { 'enabled': {'required': True}, } <NEW_LINE> _attribute_map = { 'enabled': {'key': 'enabled', 'type': 'bool'}, 'firewall_mode': {'key': 'firewallMode', 'type': 'str'}, } <NEW_LINE> def __init__(self, enabled, firewall... | Application gateway web application firewall configuration.
:param enabled: Whether web application firewall is enabled
:type enabled: bool
:param firewall_mode: Web application firewall mode. Possible values
include: 'Detection', 'Prevention'
:type firewall_mode: str or :class:`ApplicationGatewayFirewallMode
<azure... | 62598eecf548e778e5969cea |
class OverrideWaffleFlagTests(TestCase): <NEW_LINE> <INDENT> NAMESPACE_NAME = "test_namespace" <NEW_LINE> FLAG_NAME = "test_flag" <NEW_LINE> NAMESPACED_FLAG_NAME = NAMESPACE_NAME + "." + FLAG_NAME <NEW_LINE> TEST_COURSE_KEY = CourseKey.from_string("edX/DemoX/Demo_Course") <NEW_LINE> TEST_NAMESPACE = WaffleFlagNamespace... | Tests for the override_waffle_flag decorator. | 62598eec4e4d562566370b78 |
class NfqnlMsgConfigCmd(NLStructure): <NEW_LINE> <INDENT> _fields_ = [("command", ctypes.c_uint8), ("_pad", ctypes.c_uint8), ("pf", ctypes.c_uint16)] | struct nfqnl_msg_config_cmd
| 62598eec283ffb24f3cf200f |
class HttpProvider(BaseProvider): <NEW_LINE> <INDENT> def __init__(self, node_url, request_kwargs=None): <NEW_LINE> <INDENT> self.node_url = node_url.rstrip('/') <NEW_LINE> uri = urlparse(node_url) <NEW_LINE> if uri.scheme not in HTTP_SCHEMES: <NEW_LINE> <INDENT> raise NotImplementedError( 'TronAPI does not know how to... | A Connection object to make HTTP requests to a particular node. | 62598eec4e4d562566370b79 |
class ChecklistItemsList(ListCreateAPIView): <NEW_LINE> <INDENT> serializer_class = ChecklistItemSerializer <NEW_LINE> permission_classes = [IsAuthenticated] <NEW_LINE> def get(self, request, pk): <NEW_LINE> <INDENT> items = self.get_queryset().filter(checklist__id=pk) <NEW_LINE> serializer = ChecklistItemSerializer(it... | API endpoint for listing only those items under a specific Checklist. Requires authentication. | 62598eeca8370b77170eeb43 |
class ServerError(ConsulateException): <NEW_LINE> <INDENT> pass | An internal Consul server error occurred | 62598eec090684286d592a91 |
class MouseMode: <NEW_LINE> <INDENT> def draw(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def set_pos(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def right_up(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def right_down(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def left_up(self): <NEW_LI... | Implementations should have a 'parent' member which points to a gui | 62598eecdc8b845886d51d22 |
class ChannelDataset(object): <NEW_LINE> <INDENT> def __init__(self, datasrc, scale=None, test_split=0.3, summary=True): <NEW_LINE> <INDENT> self.datasrc = datasrc <NEW_LINE> self.test_split = test_split <NEW_LINE> if self.datasrc == 'mcelroy': <NEW_LINE> <INDENT> self.df = pd.read_csv('data/mcelroy_dataclean.csv') <NE... | Data handler for channel geometry dataset work.
Wrap all the normalization and such away. | 62598eec167d2b6e312b56f8 |
class TestBase(unittest.TestCase): <NEW_LINE> <INDENT> def test_documentation(self): <NEW_LINE> <INDENT> self.assertTrue(hasattr(BaseModel, "__init__")) <NEW_LINE> self.assertTrue(hasattr(BaseModel, "__str__")) <NEW_LINE> self.assertTrue(hasattr(BaseModel, "save")) <NEW_LINE> self.assertTrue(hasattr(BaseModel, "to_dict... | Tests BaseModel Class | 62598eec91f36d47f2230253 |
class ShowL2routeEvpnMacIpAll(ShowL2routeEvpnMacIpAllSchema): <NEW_LINE> <INDENT> cli_command = 'show l2route evpn mac-ip all' <NEW_LINE> def cli(self, output=None): <NEW_LINE> <INDENT> if output is None: <NEW_LINE> <INDENT> out = self.device.execute(self.cli_command) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> out =... | Parser class for show l2route evpn mac-ip all | 62598eec851cf427c66b6a28 |
class LocationProvider(faker.providers.BaseProvider): <NEW_LINE> <INDENT> def location(self, within: dict = {}): <NEW_LINE> <INDENT> nw = make_tuple(str(within['nw'])) <NEW_LINE> se = make_tuple(str(within['se'])) <NEW_LINE> width = abs(nw[1] - se[1]) <NEW_LINE> height = abs(nw[0] - se[0]) <NEW_LINE> r = Random() <NEW_... | Creates locations for company deployments within given GPS Coordinates rectangle | 62598eecfff4ab517ebcbf37 |
class ProductExportTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> from django.contrib.auth.models import User <NEW_LINE> user = User.objects.create_user('root', 'root@eruditorum.com', '12345') <NEW_LINE> user.is_staff = True <NEW_LINE> user.is_superuser = True <NEW_LINE> user.save() <NEW_LINE>... | Test product export functionality. | 62598eecd486a94d0ba2a72c |
class SearchMaterialRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Platform = None <NEW_LINE> self.SearchScopes = None <NEW_LINE> self.MaterialTypes = None <NEW_LINE> self.Text = None <NEW_LINE> self.Resolution = None <NEW_LINE> self.DurationRange = None <NEW_LINE> self.CreateT... | SearchMaterial请求参数结构体
| 62598eec2c8b7c6e89bd1f20 |
class KMeansSummary(ClusteringSummary): <NEW_LINE> <INDENT> @property <NEW_LINE> @since("2.4.0") <NEW_LINE> def trainingCost(self) -> float: <NEW_LINE> <INDENT> return self._call_java("trainingCost") | Summary of KMeans.
.. versionadded:: 2.1.0 | 62598eecff9c53063f518dc4 |
class RGBError(Exception): <NEW_LINE> <INDENT> @property <NEW_LINE> def message(self): <NEW_LINE> <INDENT> return self.args[0] | Base class for Color errors | 62598eec57b8e32f525074b4 |
class SimulatedTriangularGrid(TriangularGrid): <NEW_LINE> <INDENT> def __init__(self, rows,cols, t): <NEW_LINE> <INDENT> self.t = t <NEW_LINE> xy = [] <NEW_LINE> for i in range(rows): <NEW_LINE> <INDENT> for j in range(cols): <NEW_LINE> <INDENT> xy.append(center_position(i,j,t)) <NEW_LINE> <DEDENT> <DEDENT> xy = np.vst... | Represents a triangular grid with a given number of rows and columns.
Inherits TriangularGrid. | 62598eec3346ee7daa336a18 |
class SubAnagramPattern (AnagramPattern): <NEW_LINE> <INDENT> subanagram = True <NEW_LINE> def __init__ (self, subanagram=True): <NEW_LINE> <INDENT> super(SubAnagramPattern, self).__init__(subanagram=True) | This pattern is a convenience subclass of Pattern; the usage,
initialisation, etc, are identical to Pattern, but it automatically sets
subanagram=True to all of these. | 62598eecd7e4931a7ef3a7ff |
@admin.register(Response) <NEW_LINE> class ResponseAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> pass | Admin View for Response | 62598eec30dc7b766599dfe9 |
class AnonymousQuestion(AnonymousContent): <NEW_LINE> <INDENT> title = models.CharField(max_length=300) <NEW_LINE> tagnames = models.CharField(max_length=125) <NEW_LINE> is_anonymous = models.BooleanField(default=False) <NEW_LINE> def publish(self, user): <NEW_LINE> <INDENT> added_at = timezone.now() <NEW_LINE> try: <N... | question that was asked before logging in
maybe the name is a little misleading, the user still
may or may not want to stay anonymous after the question
is published | 62598eec4428ac0f6e656cad |
class FitsModel(DataModel): <NEW_LINE> <INDENT> schema_url = "http://example.com/schemas/fits_model" | Model whose schema includes support for writing to FITS
files. | 62598eec44b2445a339b5d1a |
class AutoOxiStateDecorationTransformation(AbstractTransformation): <NEW_LINE> <INDENT> def __init__(self, symm_tol=0.1, max_radius=4, max_permutations=100000, distance_scale_factor=1.015): <NEW_LINE> <INDENT> self.analyzer = BVAnalyzer(symm_tol, max_radius, max_permutations, distance_scale_factor) <NEW_LINE> <DEDENT> ... | This transformation automatically decorates a structure with oxidation
states using a bond valence approach. | 62598eec4a966d76dd5ed63b |
class DatasetGroup(dict): <NEW_LINE> <INDENT> def __init__(self, datasets): <NEW_LINE> <INDENT> self.update({ds.name: ds for ds in datasets}) <NEW_LINE> <DEDENT> def extract_all(self): <NEW_LINE> <INDENT> for dataset in self.values(): <NEW_LINE> <INDENT> dataset.extract() <NEW_LINE> <DEDENT> <DEDENT> def _combined_comp... | Container for :class:`Dataset` (or subclasses) objects.
This is a subclass of :class:`dict` with methods added for performing
record linkage operations. Keys are the dataset names. | 62598eec460517430c430be9 |
class ForEach(Container): <NEW_LINE> <INDENT> def __init__(self, mutated_field, fields=[], encoder=ENC_BITS_DEFAULT, fuzzable=True, name=None): <NEW_LINE> <INDENT> super(ForEach, self).__init__(fields=fields, encoder=encoder, fuzzable=fuzzable, name=name) <NEW_LINE> kassert.not_none(mutated_field) <NEW_LINE> self._muta... | Perform all mutations of enclosed fields for each mutation of mutated_field | 62598eecadb09d7d5dc08d29 |
class LocationParseError(LocationValueError): <NEW_LINE> <INDENT> def __init__(self, location): <NEW_LINE> <INDENT> message = "Failed to parse: %s" % location <NEW_LINE> HTTPError.__init__(self, message) <NEW_LINE> self.location = location | Raised when get_host or similar fails to parse the URL input. | 62598eec2eb69b55b15a073b |
class HeaderError(Exception): <NEW_LINE> <INDENT> pass | Exception raise when header is not dict type
| 62598eecf548e778e5969cec |
class BaseAPIObject(UnicodeMixin): <NEW_LINE> <INDENT> def __repr__(self): <NEW_LINE> <INDENT> return '<%s: %s>' % (self.__class__.__name__, self.__str__()) <NEW_LINE> <DEDENT> def __unicode__(self): <NEW_LINE> <INDENT> return six.text_type('%s' % self.name) | An abstract version of the objects returned by the API. | 62598eeccc0a2c1114479765 |
@skipIf(SKIP_TEST, "пропущено для економії часу") <NEW_LINE> class FolderContentsPageVisitorCanUploadReportTest(FolderContentsPageVisitTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.dummy_user = self.create_dummy_user() <NEW_LINE> self.add_user_cookie_to_browser(self.dummy_user) <NEW_LINE> self.ad... | Тест відвідання сторінки сайту
аутентифікованим користувачем | 62598eec796e427e5384cef9 |
class FileSystemClassifyStore(ClassifyStore): <NEW_LINE> <INDENT> folder_path = None <NEW_LINE> filename_pattern = None <NEW_LINE> last_inserted = {} <NEW_LINE> image_format = None <NEW_LINE> def __init__(self, folder_path, filename_pattern, labels, image_format="PNG"): <NEW_LINE> <INDENT> self.folder_path = folder_pat... | Store captures in a FS folder | 62598eec85dfad0860cbee18 |
class PixelTracker(): <NEW_LINE> <INDENT> def __init__(self, path_to_image): <NEW_LINE> <INDENT> img = Image.open(path_to_image) <NEW_LINE> self.shape = img.size[::-1] <NEW_LINE> img_pix = np.asarray(img) <NEW_LINE> R = img_pix[:,:,0].ravel().astype(int) <NEW_LINE> G = img_pix[:,:,1].ravel().astype(int) <NEW_LINE> B = ... | This class parses the information about an input image,
including the spatial information about each RGB pixel. #FIXME: elaborate better!
Inputs
---------
path_to_image: The path to an input image, of type .jpg, .png, etc.
Attributes
---------
shape: tuple containing dimensions of the input image
xy: 2d-array describ... | 62598eec167d2b6e312b56fa |
class CSL(object): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self._handle = None <NEW_LINE> for key, value in kwargs.items(): <NEW_LINE> <INDENT> self[key] = value <NEW_LINE> <DEDENT> <DEDENT> @property <NEW_LINE> def _as_parameter_(self): <NEW_LINE> <INDENT> if not self._handle: <NEW_LINE> ... | Wrapper for GDAL CSL API.
| 62598eecd486a94d0ba2a72e |
class GetAccountFromUser(object): <NEW_LINE> <INDENT> def __init__(self, queue: 'AccountQueue', onion_address_user: str) -> None: <NEW_LINE> <INDENT> self.queue = queue <NEW_LINE> self.onion_address_user = onion_address_user <NEW_LINE> self.root = tkinter.Tk() <NEW_LINE> self.root.title("Contact account en... | Get correct account of contact from the user via Tkinter prompt. | 62598eeceab8aa0e5d30a4dd |
class ApiError(AmatinoError): <NEW_LINE> <INDENT> pass | An error caused by the Amatino API returning data that Amatino Python could
not parse, or interpreted as being invalid. This error type indicates
that there is a bug in either the Amatino API or Amatino Python. | 62598eec57b8e32f525074b5 |
class LoginPage(tk.Frame): <NEW_LINE> <INDENT> def __init__(self, master, connector, *args, **kwargs): <NEW_LINE> <INDENT> tk.Frame.__init__(self, master, *args, **kwargs) <NEW_LINE> self.frame1 = tk.Frame(self) <NEW_LINE> self.frame1.pack(pady=(50, 10)) <NEW_LINE> self.frame2 = tk.Frame(self) <NEW_LINE> self.frame2.pa... | 登录的界面 | 62598eec2c8b7c6e89bd1f23 |
class Creator(object): <NEW_LINE> <INDENT> _parent_key = '_json_field_cache' <NEW_LINE> def __init__(self, field): <NEW_LINE> <INDENT> self.field = field <NEW_LINE> <DEDENT> def __get__(self, obj, type=None): <NEW_LINE> <INDENT> if obj is None: <NEW_LINE> <INDENT> raise AttributeError('Can only be accessed via an insta... | Taken from django.db.models.fields.subclassing. | 62598eecd58c6744b42db666 |
class Namer(ABC): <NEW_LINE> <INDENT> def start(self, length): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def generate_id(self, param_set, sweep_id): <NEW_LINE> <INDENT> pass | Abstract class for assigning simulation IDs to simulation.
Only the ``next`` method has to be implemented. | 62598eecbe383301e0251f3c |
class ConnectorProfile(AWSObject): <NEW_LINE> <INDENT> resource_type = "AWS::AppFlow::ConnectorProfile" <NEW_LINE> props: PropsDictType = { "ConnectionMode": (str, True), "ConnectorProfileConfig": (ConnectorProfileConfig, False), "ConnectorProfileName": (str, True), "ConnectorType": (str, True), "KMSArn": (str, False),... | `ConnectorProfile <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appflow-connectorprofile.html>`__ | 62598eec5166f23b2e241b3b |
class colour(object): <NEW_LINE> <INDENT> def __init__(self, code='rgb(0,0,0)'): <NEW_LINE> <INDENT> if not code.strip(): <NEW_LINE> <INDENT> self.type = None <NEW_LINE> self.values = tuple() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> m = re.match(r'(\w+)\((([\d\.]+,)+[\d\.]+)\)', re.sub(r'\... | To hold a colour tuple and support conversiopn into luminance value | 62598eec30dc7b766599dfeb |
class Image(): <NEW_LINE> <INDENT> def __init__(self, image): <NEW_LINE> <INDENT> self.id = image['id'] <NEW_LINE> self.name = image['name'] <NEW_LINE> self.kind = image['kind'] <NEW_LINE> self.self_link = image['selfLink'] <NEW_LINE> self.creation_timestamp = image['creationTimestamp'] <NEW_LINE> self.description = im... | Represents a GCE Image. | 62598eec097d151d1a2bf77f |
class LIS331HH(LIS331): <NEW_LINE> <INDENT> def __init__(self, i2c_bus, address=_LIS331_DEFAULT_ADDRESS): <NEW_LINE> <INDENT> super().__init__(i2c_bus, address) <NEW_LINE> self._range_class = LIS331HHRange <NEW_LINE> self.data_rate = Rate.RATE_1000_HZ <NEW_LINE> self.range = LIS331HHRange.RANGE_24G | Driver for the LIS331HH 3-axis high-g accelerometer.
:param ~busio.I2C i2c_bus: The I2C bus the LIS331 is connected to.
:param address: The I2C device address. Defaults to :const:`0x18`
**Quickstart: Importing and using the device**
Here is an example of using the :class:`LIS331` class.
First you will need t... | 62598eec01c39578d7f1150c |
@add_metaclass(ABCMeta) <NEW_LINE> class ErrorFunction(object): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def __call__(self, params): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def derivatives(self, params): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> def lsq_estimate_parameters(s... | Define an error function. | 62598eecf7d966606f746754 |
class ASNForm(BaseForm): <NEW_LINE> <INDENT> asn = StringField('AS 号', validators=[PositiveInteger()]) | AS 号必填正整数 | 62598eec4a966d76dd5ed63d |
@admin.register(Server) <NEW_LINE> class ServerAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('name',) <NEW_LINE> search_fields = ('name',) | Admin interface for servers | 62598eecf548e778e5969ced |
class DescribeOsInfoResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.OsInfoSet = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("OsInfoSet") is not None: <NEW_LINE> <INDENT> self.OsInfoSet = [] <NEW_LIN... | DescribeOsInfo返回参数结构体
| 62598eec76e4537e8c3edd16 |
class CustomPagination(pagination.PageNumberPagination): <NEW_LINE> <INDENT> def get_paginated_response(self, data): <NEW_LINE> <INDENT> return OrderedDict([ ('start_index', self.page.start_index()), ('end_index', self.page.end_index()), ('num_pages', self.page.paginator.num_pages), ('current_page', self.page.number), ... | Serializes page objects of user querysets. | 62598eecfff4ab517ebcbf3a |
class EntityObject(GameObject): <NEW_LINE> <INDENT> def __init__(self, posX, posY, tile): <NEW_LINE> <INDENT> super().__init__(posX, posY, tile) <NEW_LINE> <DEDENT> def move(self, dX, dY): <NEW_LINE> <INDENT> self.posX += dX <NEW_LINE> self.posY += dY | For all objects that move, and/or interact with the environment. | 62598eec01c39578d7f1150d |
class System(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def GetUsePythonVersion(): <NEW_LINE> <INDENT> return int(platform.python_version_tuple()[0]) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def IsHostWindows(): <NEW_LINE> <INDENT> return bool(platform.system() == "Windows") <NEW_LINE> <DEDENT> @staticme... | * システム関連クラス | 62598eec7d847024c075ab30 |
class Slot(BodyChild): <NEW_LINE> <INDENT> def __init__(self, name=None, value=None): <NEW_LINE> <INDENT> default_attr = dict(name=str(), value=str()) <NEW_LINE> self.name = name <NEW_LINE> self.value = value <NEW_LINE> self._set_default_attr(default_attr) | Request context associated with an intent slot.
Arguments:
name: str. Name of slot.
value: str. Value of the slot. | 62598eecbe7bc26dc9251213 |
@python_2_unicode_compatible <NEW_LINE> class GeoBaseModel(SortableTranslatableModel): <NEW_LINE> <INDENT> numeric_code = models.CharField(_("numeric code"), max_length=3, blank=True, null=True, unique=True, validators=[NumericCodeValidator], help_text=_( "ISO 3166-1 or M.49 numeric code") ) <NEW_LINE> def __str__(self... | Abstract base model for the UN M.49 geoscheme.
Refs: http://unstats.un.org/unsd/methods/m49/m49.htm
http://unstats.un.org/unsd/methods/m49/m49regin.htm
https://en.wikipedia.org/wiki/United_Nations_geoscheme
https://en.wikipedia.org/wiki/UN_M.49 | 62598eec67a9b606de544732 |
class DescribeListenersResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Listeners = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("Listeners") is not None: <NEW_LINE> <INDENT> self.Listeners = [] <NEW_... | DescribeListeners返回参数结构体
| 62598eec21bff66bcd7213b7 |
class Button(): <NEW_LINE> <INDENT> def __init__(self, ai_settings, screen, msg): <NEW_LINE> <INDENT> self.screen = screen <NEW_LINE> self.screen_rect = screen.get_rect() <NEW_LINE> self.width, self.height = 200, 50 <NEW_LINE> self.botton_color = (0,255,0) <NEW_LINE> self.text_color = (255,255,255) <NEW_LINE> self.font... | Pygame没有内置创建按钮的方法,我们创建一个Button 类,用于创建带标签的实心矩形 | 62598eeca8370b77170eeb47 |
class Processor: <NEW_LINE> <INDENT> def __init__(self, ohlc_loc=None, metadata_loc=None): <NEW_LINE> <INDENT> self.ohlc_location = ohlc_loc <NEW_LINE> self.metadata_loc = metadata_loc <NEW_LINE> <DEDENT> def process_metrics(self): <NEW_LINE> <INDENT> pass | Base class to represent a Processor
...
Attributes
----------
ohlc_location : str
Location of OHLC Cleaned data
metadata_loc : str
Location of Cleaned Metadata
Methods
-------
process_metrics(): void
Calculates required metrics and stores them in CSV format | 62598eec435de62698e9a538 |
class Memo(models.Model): <NEW_LINE> <INDENT> txt = models.CharField(max_length=200) <NEW_LINE> location = models.ForeignKey(WesabeLocation, null=True) | Maps memo's to locations | 62598eec498bea3a75a56295 |
class DockContainerMonitor(QObject): <NEW_LINE> <INDENT> def __init__(self, manager): <NEW_LINE> <INDENT> super(DockContainerMonitor, self).__init__() <NEW_LINE> self._manager = atomref(manager) <NEW_LINE> <DEDENT> def onTopLevelChanged(self, toplevel): <NEW_LINE> <INDENT> if self._manager: <NEW_LINE> <INDENT> handler ... | A QObject class which monitors dock container toplevel changes.
| 62598eec435de62698e9a539 |
class Decorator(AbstractArbiterDecorator): <NEW_LINE> <INDENT> def __init__(self, parent, threshold): <NEW_LINE> <INDENT> super().__init__(parent) <NEW_LINE> self._threshold = threshold <NEW_LINE> <DEDENT> def _check_single_condition(self, sequence): <NEW_LINE> <INDENT> a = sequence <NEW_LINE> a_star = common.wc(a) <NE... | Asserts that the sequence has weak affinity to other sequences in the collection
(i.e. for new sequence a, the affinities of a-b, a-b*, a*-b, and a*-b* are all weak) | 62598eeccad5886f8bdc3a66 |
class RegistrationResource(interfaces.ClientRequestableResource, ResourceWithURI): <NEW_LINE> <INDENT> resource_type = 'reg' <NEW_LINE> body = jose.Field('body', decoder=Registration.from_json) <NEW_LINE> new_authzr_uri = jose.Field('new_authzr_uri') <NEW_LINE> terms_of_service = jose.Field('terms_of_service', omitempt... | Registration Resource.
:ivar acme.messages.Registration body:
:ivar str new_authzr_uri: URI found in the 'next' ``Link`` header
:ivar str terms_of_service: URL for the CA TOS. | 62598eeca8370b77170eeb48 |
class BONEWIDGET_OT_returnToArmature(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "bonewidget.return_to_armature" <NEW_LINE> bl_label = "Return to armature" <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> return (context.object and context.object.type == 'MESH' and context.object.... | Switch back to the armature | 62598eec5fc7496912d47624 |
class AboutUsView(generic.ListView): <NEW_LINE> <INDENT> template_name = 'about-us.html' <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> return | Static page describing the company and its co-founders | 62598eec5fcc89381b2654d8 |
class SageTimeitResult(object): <NEW_LINE> <INDENT> def __init__(self, stats, series=None): <NEW_LINE> <INDENT> self.stats = stats <NEW_LINE> self.series = series if not None else [] <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "%d loops, best of %d: %.*g %s per loop" % self.stats | Represent the statistics of a timeit() command.
Prints as a string so that it can be easily returned to a user.
INPUT:
- ``stats`` -- tuple of length 5 containing the following information:
- integer, number of loops
- integer, repeat number
- Python integer, number of digits to print
- number, best... | 62598eecf9cc0f698b1c4680 |
class VtsCallbackServerError(errors.VtsError): <NEW_LINE> <INDENT> pass | Raised when an error occurs in VTS TCP server. | 62598eec4f6381625f19886d |
class TextMelCollateEval(): <NEW_LINE> <INDENT> def __init__(self, hparams): <NEW_LINE> <INDENT> self.n_frames_per_step = hparams.n_frames_per_step <NEW_LINE> <DEDENT> def __call__(self, batch): <NEW_LINE> <INDENT> input_lengths, ids_sorted_decreasing = torch.sort( torch.LongTensor([len(x[0]) for x in batch]), dim=0, d... | Zero-pads model inputs and targets based on number of frames per setep
| 62598eecff9c53063f518dc8 |
class WebhookAuthorizationError(LaunchKeyAPIException): <NEW_LINE> <INDENT> pass | There was an issue with validating the authorization provided by the
webhook request. | 62598eec57b8e32f525074b6 |
class DateTime(object): <NEW_LINE> <INDENT> def __init__(self, default_tzinfo=None): <NEW_LINE> <INDENT> if default_tzinfo is None: <NEW_LINE> <INDENT> default_tzinfo = iso8601.Utc() <NEW_LINE> <DEDENT> self.default_tzinfo = default_tzinfo <NEW_LINE> <DEDENT> def deserialize(self, value, mapping, node, model): <NEW_LIN... | Represents a DateTime datatype in a schema. This is an identical implementation
to colander's DateTime object. iso8601 is actually a module in colander itself.
Like all other datatypes, an instance of this class can be passed into a
:class:`soap.SchemaNode` to create a SchemaNode of type :class:`soap.DateTime` | 62598eec3346ee7daa336a1a |
class BuildingQuery(graphene.ObjectType): <NEW_LINE> <INDENT> building = graphene.Field( BuildingType, id=graphene.ID(), name=graphene.String()) <NEW_LINE> buildings = graphene.Field(lambda: BuildingType, limit=graphene.Int(5)) <NEW_LINE> def resolve_building(self, info, **args): <NEW_LINE> <INDENT> identity = args.get... | Building Query,
fetch building entries matching to provided criteria | 62598eeccc40096d6161958a |
class User(Document): <NEW_LINE> <INDENT> meta = {'queryset_class': UserQuerySet} <NEW_LINE> login = StringField(required=True, unique=True) <NEW_LINE> name = StringField() <NEW_LINE> email = StringField() <NEW_LINE> avatar_url = StringField() <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self._closed_is... | A JIRA user. | 62598eec63d6d428bbee0f32 |
class RemovePhotosFromAlbum(graphene.Mutation): <NEW_LINE> <INDENT> class Arguments: <NEW_LINE> <INDENT> photo_ids = graphene.String() <NEW_LINE> album_id = graphene.String() <NEW_LINE> <DEDENT> ok = graphene.Boolean() <NEW_LINE> @staticmethod <NEW_LINE> def mutate(self, info, photo_ids, album_id): <NEW_LINE> <INDENT>... | Remove photos from particular album tag. | 62598eec4527f215b58e8662 |
class SpreadsheetWriter: <NEW_LINE> <INDENT> def __init__(self, outFilePath): <NEW_LINE> <INDENT> self.imz = InMemoryZipFile(compression=ZIP_DEFLATED) <NEW_LINE> self.outFilePath = outFilePath <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def __exit__(self, exc_type, exc_v... | Writer of unprotected xlsx/xlsm files from initial source files.
The zip file is first created in memory, actual write is delayed until __exit__() or until writeClose() is called.
Attributes:
outFilePath (path-like): path to write output file
imz (ruamel.std.zipfile.InMemoryZipFile): zip file created in memor... | 62598eecb7558d5895461daa |
class Article(models.Model): <NEW_LINE> <INDENT> category = models.ManyToManyField(Category, null=True, blank=True, related_name='categories', verbose_name=u"Категория") <NEW_LINE> edition = models.ForeignKey(Edition, null=True, blank=True, verbose_name=u"Журнал") <NEW_LINE> authors = models.ManyToManyField(Profile, nu... | Статьи | 62598eec7d43ff24874267ae |
class PyDuecredit(PythonPackage): <NEW_LINE> <INDENT> homepage = "https://github.com/duecredit/duecredit" <NEW_LINE> pypi = "duecredit/duecredit-0.9.1.tar.gz" <NEW_LINE> version('0.9.1', sha256='f6192ce9315b35f6a67174761291e61d0831e496e8ff4acbc061731e7604faf8') <NEW_LINE> depends_on('python@3.6:', type=('build', 'r... | Publications (and donations) tracer. | 62598eecfff4ab517ebcbf3c |
class Transactions(Collection): <NEW_LINE> <INDENT> def __init__(self, api): <NEW_LINE> <INDENT> super(Transactions, self).__init__(api) <NEW_LINE> self._meta_data['allowed_lazy_attributes'] = [Transaction] <NEW_LINE> self._meta_data['attribute_registry'] = {'tm:transactionstate': Transaction} | This class is a context manager for iControl transactions.
Upon successful exit of the with statement, the transaction will be
submitted, otherwise it will be rolled back.
NOTE: This feature was added to BIGIP in version 11.0.0.
Example:
> bigip = BigIP(<args>)
> tx = bigip.transactions.transaction
> with Transactio... | 62598eec851cf427c66b6a2d |
class NeedsUpdateError(AcapelaGroupError): <NEW_LINE> <INDENT> pass | Exception class thrown when the code cannot scrap the website.
Basically, it means that the module needs some update to keep interfacing
with the Acapela Group website. | 62598eec4c34283577618a4a |
class HomePageView(TemplateView): <NEW_LINE> <INDENT> template_name = 'pages/home.html' <NEW_LINE> def get_template_names(self): <NEW_LINE> <INDENT> templates = super(HomePageView, self).get_template_names() <NEW_LINE> language = get_language() <NEW_LINE> if language == 'es': <NEW_LINE> <INDENT> templates = ['pages/hom... | List of Threads | 62598eecdd821e528d6d76a9 |
class BaseFrame(wx.Frame): <NEW_LINE> <INDENT> def __init__(self, parent, config_name, config_key, id=wx.ID_ANY, title='Untitled', pos=wx.DefaultPosition, size=(800, 300), style=wx.DEFAULT_FRAME_STYLE): <NEW_LINE> <INDENT> wx.Frame.__init__(self, parent, id, title, pos, size, style) <NEW_LINE> self._config = wx.Con... | A Frame that can save/load its position and size. | 62598eec435de62698e9a53b |
class IntervalsUpdate(LoginRequiredMixin, UpdateView): <NEW_LINE> <INDENT> model = IntervalSchedule <NEW_LINE> form_class = IntervalScheduleForm <NEW_LINE> template_name = 'crontab/intervals-add-update.html' <NEW_LINE> success_url = reverse_lazy('crontabs:intervals_list') <NEW_LINE> def get_context_data(self, **kwargs)... | 定时任务时间 更新 | 62598eec8e7ae83300ee77f5 |
class STD_ANON_6( _ImportedBinding__cm.DatoNP_Type, pyxb.binding.basis.enumeration_mixin): <NEW_LINE> <INDENT> _ExpandedName = None <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location( '/opt/odoo/tmp/data/common/liquidazione/intestazioneIvp_2017_v1.xsd', 22, 4) <NEW_LINE> _Documentation = None | An atomic simple type. | 62598eec091ae3566870337d |
class SurfactantVariable(CellVariable): <NEW_LINE> <INDENT> def __init__(self, value = 0., distanceVar = None, name = 'surfactant variable', hasOld=False): <NEW_LINE> <INDENT> CellVariable.__init__(self, mesh = distanceVar.mesh, name = name, hasOld=False) <NEW_LINE> self.distanceVar = self._requires(distanceVar) <NEW_L... | The `SurfactantVariable` maintains a conserved volumetric
concentration on cells adjacent to, but in front of, the
interface. The `value` argument corresponds to the initial
concentration of surfactant on the interface (moles divided by
area). The value held by the `SurfactantVariable` is actually a
volume density (mol... | 62598eeca17c0f6771d5a9b9 |
class AppDirectoriesFinder(BaseFinder): <NEW_LINE> <INDENT> storage_class = AppStaticStorage <NEW_LINE> @uses_settings({'INSTALLED_APPS':'installed_apps'}) <NEW_LINE> def __init__(self, apps=None, installed_apps=( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', '... | A static files finder that looks in the directory of each app as
specified in the source_dir attribute of the given storage class. | 62598eec56ac1b37e6300952 |
class OrderGoods(BaseModel): <NEW_LINE> <INDENT> order = models.ForeignKey('OrderInfo', verbose_name='订单', on_delete=models.DO_NOTHING) <NEW_LINE> sku = models.ForeignKey('goods.GoodsSKU', verbose_name='商品SKU', on_delete=models.DO_NOTHING) <NEW_LINE> count = models.IntegerField(default=1, verbose_name='商品数目') <NEW_LINE... | 订单商品模型类 | 62598eec63b5f9789fe838c3 |
class _Registry(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.ref_holder = {} <NEW_LINE> self.counter = 0 <NEW_LINE> self.result_deps = set() <NEW_LINE> self.lock = Lock() <NEW_LINE> <DEDENT> def inc(self): <NEW_LINE> <INDENT> self.lock.acquire() <NEW_LINE> cur = self.counter <NEW_LINE> self... | CustomOp registry. | 62598eec99fddb7c1ca621b7 |
class CurrentUserViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> serializer_class = UserSerializer <NEW_LINE> queryset = User.objects.all() <NEW_LINE> def list(self, request, pk=None): <NEW_LINE> <INDENT> if pk: <NEW_LINE> <INDENT> user = get_object_or_404(User, pk=pk) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> ... | Przekazanie informacji o aktywnym użytkowniku do zewnętrznej aplikacji. | 62598eec4f6381625f19886e |
class SimpleVolumefloat(BaseVolumefloat): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> for _s in [BaseVolumefloat]: <NEW_LINE> <INDENT> __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {})) <NEW_LINE> <DEDENT> __setattr__ = lambda self, name, value: _swig_setattr(self, SimpleVolumefloat, name, v... | Proxy of C++ PolyVox::SimpleVolume<(float)> class. | 62598eeceab8aa0e5d30a4e1 |
class Logger(BaseLogging): <NEW_LINE> <INDENT> def setup(self): <NEW_LINE> <INDENT> lh = logging.StreamHandler() <NEW_LINE> lh.setLevel(logging.DEBUG) <NEW_LINE> lf = logging.Formatter("%(asctime)s - %(name)s[%(process)d] - %(levelname)s - %(message)s") <NEW_LINE> lh.setFormatter(lf) <NEW_LINE> return lh | Logging Class | 62598eecbe383301e0251f40 |
class Lesson: <NEW_LINE> <INDENT> lineLengthMax = 60 <NEW_LINE> def __init__(self, bookName, chapterName, sectionCount): <NEW_LINE> <INDENT> self._id = str(uuid4()) <NEW_LINE> self._text = '' <NEW_LINE> self._name = bookName + ' - ' + chapterName + ' ' + str(sectionCount) <NEW_LINE> <DEDENT> def addParagraph(self, para... | A section of a chapter that is created as a lesson | 62598eec4428ac0f6e656cb3 |
class VppObjectRegistry(object): <NEW_LINE> <INDENT> _shared_state = {} <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.__dict__ = self._shared_state <NEW_LINE> if not hasattr(self, "_object_registry"): <NEW_LINE> <INDENT> self._object_registry = [] <NEW_LINE> <DEDENT> if not hasattr(self, "_object_dict"): <NEW... | Class which handles automatic configuration cleanup. | 62598eec32920d7e50bc4792 |
@tf.keras.utils.register_keras_serializable(package='yolo') <NEW_LINE> class CSPConnect(tf.keras.layers.Layer): <NEW_LINE> <INDENT> def __init__(self, filters, filter_scale=2, activation='mish', kernel_initializer='glorot_uniform', bias_initializer='zeros', bias_regularizer=None, kernel_regularizer=None, dilation_rate=... | Sister Layer to the CSPRoute layer. Merges the partial feature stacks generated by the CSPDownsampling layer,
and the finaly output of the residual stack. Suggested in the CSPNet paper.
Cross Stage Partial networks (CSPNets) were proposed in:
[1] Chien-Yao Wang, Hong-Yuan Mark Liao, I-Hau Yeh, Yueh-Hua Wu, Ping-Yang Ch... | 62598eec3d592f4c4edb965d |
class PSNotification: <NEW_LINE> <INDENT> def __init__(self, conn, bucket_name, topic_name, events=''): <NEW_LINE> <INDENT> self.conn = conn <NEW_LINE> assert bucket_name.strip() <NEW_LINE> assert topic_name.strip() <NEW_LINE> self.resource = '/notifications/bucket/'+bucket_name <NEW_LINE> if events.strip(): <NEW_LINE>... | class to set/get/delete a notification
PUT /notifications/bucket/<bucket>?topic=<topic-name>[&events=<event>[,<event>]]
GET /notifications/bucket/<bucket>
DELETE /notifications/bucket/<bucket>?topic=<topic-name> | 62598eecfff4ab517ebcbf3e |
class Ban(DiscordObject): <NEW_LINE> <INDENT> def __init__(self, reason="", user=None): <NEW_LINE> <INDENT> self.reason = reason <NEW_LINE> self.user = user <NEW_LINE> <DEDENT> async def _from_api_ext(self, key, value): <NEW_LINE> <INDENT> if key == 'user': <NEW_LINE> <INDENT> setattr(self, key, await User.from_api_res... | Represents a ban
.. versionadded:: 0.2.0
Attributes:
reason (:obj:`str`): the reason for the ban
user (:class:`.User`): the banned user | 62598eec2ae34c7f260a984e |
class DetectorConfigSchemaError(ViseronError): <NEW_LINE> <INDENT> def __init__(self, detector: str) -> None: <NEW_LINE> <INDENT> super().__init__(self) <NEW_LINE> self.detector = detector <NEW_LINE> <DEDENT> def __str__(self) -> str: <NEW_LINE> <INDENT> return ( f"Could not import {self.detector}.config. A constant na... | Raised when a detectors schema cannot be found. | 62598eecdc8b845886d51d2a |
class Test_GetReources(TestCase): <NEW_LINE> <INDENT> def test_get_ps(self): <NEW_LINE> <INDENT> response = self.client.get("/resources/") <NEW_LINE> self.assertEqual(response.status_code, 200) <NEW_LINE> <DEDENT> def test_get_cpumem(self): <NEW_LINE> <INDENT> response = self.client.get("/resources/pscpumem/") <NEW_LIN... | test get Reourcese info | 62598eecbe8e80087fbbd7b7 |
class CommentViewSet(PCreateDestroyViewSet): <NEW_LINE> <INDENT> serializer_class = CommentSerializer <NEW_LINE> permission_classes = [permissions.IsAuthenticated] <NEW_LINE> permission_classes_by_action = { 'destroy': [IsOwner] } <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> return Comment.objects.filter(init... | Создание комментария
Удаление комментария | 62598eec167d2b6e312b5700 |
class ApiError(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'details': {'key': 'details', 'type': '[ApiErrorBase]'}, 'innererror': {'key': 'innererror', 'type': 'InnerError'}, 'code': {'key': 'code', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, 'message': {'key': 'message', 'type':... | Api error.
:ivar details: The Api error details.
:vartype details: list[~azure.mgmt.compute.v2017_03_30.models.ApiErrorBase]
:ivar innererror: The Api inner error.
:vartype innererror: ~azure.mgmt.compute.v2017_03_30.models.InnerError
:ivar code: The error code.
:vartype code: str
:ivar target: The target of the parti... | 62598eecaad79263cf42cf73 |
class galaxy_galaxy(DES): <NEW_LINE> <INDENT> bibtex_file = 'des_y1.bibtex' | Galaxy-galaxy lensing data from the first year of the Dark Energy Survey (DES Y1)
\cite{Abbott:2017wau}. | 62598eecf9cc0f698b1c4682 |
class PartyTestsDatabase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.client = app.test_client() <NEW_LINE> app.config['TESTING'] = True <NEW_LINE> connect_to_db(app, "postgresql:///testdb") <NEW_LINE> db.create_all() <NEW_LINE> example_data() <NEW_LINE> <DEDENT> def test_games(self... | Flask tests that use the database. | 62598eecd6c5a102081e0899 |
class SpotCrimeSensor(Entity): <NEW_LINE> <INDENT> def __init__(self, name, latitude, longitude, radius, include, exclude, days): <NEW_LINE> <INDENT> import spotcrime <NEW_LINE> self._name = name <NEW_LINE> self._include = include <NEW_LINE> self._exclude = exclude <NEW_LINE> self.days = days <NEW_LINE> self._spotcrime... | Representation of a Spot Crime Sensor. | 62598eecd7e4931a7ef3a807 |
class BuilderStateMachine(RuleBasedStateMachine): <NEW_LINE> <INDENT> starting = Bundle("starting") <NEW_LINE> in_progress = Bundle("advanced") <NEW_LINE> @rule(cls=classes, target=starting) <NEW_LINE> def start(self, cls): <NEW_LINE> <INDENT> return BuilderState(cls, builder(cls), frozenset(attr.fields(cls))) <NEW_LIN... | Tests for :py:func:`builder`. | 62598eece1aae11d1e7cdbf3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.