code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class _ImmutableLineList(list): <NEW_LINE> <INDENT> def _error(self, *a: object, **kw: object) -> None: <NEW_LINE> <INDENT> raise NotImplementedError("Attempt to modify an immutable list.") <NEW_LINE> <DEDENT> __setitem__ = _error <NEW_LINE> append = _error <NEW_LINE> clear = _error <NEW_LINE> extend = _error <NEW_LINE... | Some protection for our 'lines' list, which is assumed to be immutable in the cache.
(Useful for detecting obvious bugs.) | 62598f89e76e3b2f99fd8587 |
class APIFailure(APIException): <NEW_LINE> <INDENT> pass | An API failure signifies a problem with your request (e.g.: invalid API), a problem with your data,
or any error that resulted from improper use. | 62598f89cad5886f8bdc4e37 |
class ObjectsCondExtension(core.QTIElement): <NEW_LINE> <INDENT> XMLNAME = "objectscond_extension" <NEW_LINE> XMLCONTENT = xml.XMLMixedContent | This element contains the proprietary extensions that can be used to
extend the functionally capabilities of the <outcomes_condition> element::
<!ELEMENT objectscond_extension (#PCDATA)> | 62598f89596a8972361277cd |
class FeincmsRenderMixin(object): <NEW_LINE> <INDENT> def render_to_response(self, context, **response_kwargs): <NEW_LINE> <INDENT> return self.get_template_names(), context | This is required to use django template inheritance with CBVs | 62598f896aa9bd52df0d4a2c |
class OutputBox(Gtk.HBox): <NEW_LINE> <INDENT> __gtype_name__ = "DjangoProjectOutputBox" <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> Gtk.HBox.__init__(self, homogeneous=False, spacing=4) <NEW_LINE> self.cwd = None <NEW_LINE> self._last_output = None <NEW_LINE> scrolled = Gtk.ScrolledWindow() <NEW_LINE> self._vie... | A widget to display the output of running django commands. | 62598f89379a373c97d98b6c |
class PlaintextMessage(): <NEW_LINE> <INDENT> def __init__(self, text, shift): <NEW_LINE> <INDENT> self.text = text <NEW_LINE> self.shift = shift <NEW_LINE> self.valid_words = load_words("words.txt") <NEW_LINE> message = Message(text) <NEW_LINE> self.encrypting_dict = message.build_shift_dict(shift) <NEW_LINE> self.mes... | PlaintextMessage class | 62598f8921a7993f00c65acd |
class VOCLoader: <NEW_LINE> <INDENT> def __init__(self, root, name, min_prop_scale=20): <NEW_LINE> <INDENT> self.items = [] <NEW_LINE> self.name_to_index = {} <NEW_LINE> for line in open(os.path.join('../PascalVOC/categories.txt')): <NEW_LINE> <INDENT> s = re.split(' ', line) <NEW_LINE> self.name_to_index[s[1]] = int(s... | self.items = [{'id':图片编号,
'categories':标签号,
'im_path':图片路径,
'proposal':预训练框[xmin, ymin, xmax, ymax]
'prop_scores':预训练框的score},...]
self.name_to_index = dict{'标签名':标签号,...} | 62598f89b830903b9686e21e |
class AlarmPosition: <NEW_LINE> <INDENT> BOTTOM_RIGHT = 'bottom_right' <NEW_LINE> CENTER = 'center' | mark the position of desktop | 62598f8915baa72349461ad8 |
class NumberOnly(object): <NEW_LINE> <INDENT> swagger_types = { 'just_number': 'float' } <NEW_LINE> attribute_map = { 'just_number': 'JustNumber' } <NEW_LINE> def __init__(self, just_number=None): <NEW_LINE> <INDENT> self._just_number = None <NEW_LINE> if just_number is not None: <NEW_LINE> <INDENT> self.just_number = ... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598f89bde94217f3707413 |
class JID(object): <NEW_LINE> <INDENT> def __init__(self, str=None, tuple=None): <NEW_LINE> <INDENT> if not (str or tuple): <NEW_LINE> <INDENT> raise RuntimeError("You must provide a value for either 'str' or " "'tuple' arguments.") <NEW_LINE> <DEDENT> if str: <NEW_LINE> <INDENT> user, host, res = parse(str) <NEW_LINE>... | Represents a stringprep'd Jabber ID.
JID objects are hashable so they can be used in sets and as keys in
dictionaries. | 62598f8923849d37ff850c18 |
class Response(web.Response): <NEW_LINE> <INDENT> def __init__(self, body=None, **kwargs): <NEW_LINE> <INDENT> if isinstance(body, dict) or isinstance(body, list): <NEW_LINE> <INDENT> body = json.dumps(body, default=serialize_object).encode() <NEW_LINE> if not self._get_content_type(kwargs): <NEW_LINE> <INDENT> kwargs[... | Overrides aiohttp's response to facilitate its usage. | 62598f89507cdc57c63a48e8 |
class Friend(models.Model): <NEW_LINE> <INDENT> uid1 = models.IntegerField() <NEW_LINE> uid2 = models.IntegerField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> unique_together = ['uid1', 'uid2'] <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def make_friends(cls, uid1, uid2): <NEW_LINE> <INDENT> uid1, uid2 = (uid2, uid1) ... | 好友关系表 | 62598f8950485f2cf55daacf |
class JoinRoom(APIView): <NEW_LINE> <INDENT> serializer_class = CodeSerializer <NEW_LINE> def post(self, request, format=None): <NEW_LINE> <INDENT> code = request.data.get('code') <NEW_LINE> password = request.data.get('password') <NEW_LINE> if code != None: <NEW_LINE> <INDENT> room_result = Room.objects.filter(code=co... | user can join a room
takes a post request
-code
-password
take current user from session variable
add user to user in room table | 62598f89009cb60464d01086 |
class Gate(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, space, host, port=31415): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.alive = threading.Event() <NEW_LINE> self.alive.set() <NEW_LINE> self.daemon = True <NEW_LINE> self.space = space <NEW_LINE> self.source = host, port <NEW_LINE> s = socke... | Each gate is a thread bound to a socket, that accepts connections and
handles them. | 62598f896fece00bbaccb4e4 |
class SFS(BaseEstimator, MetaEstimatorMixin): <NEW_LINE> <INDENT> def __init__(self, estimator, k_features, print_progress=True, scoring='accuracy', cv=5, n_jobs=1): <NEW_LINE> <INDENT> self.scoring = scoring <NEW_LINE> self.estimator = estimator <NEW_LINE> self.cv = cv <NEW_LINE> self.k_features = k_features <NEW_LINE... | Sequential Forward Selection for feature selection.
Parameters
----------
estimator : scikit-learn estimator object
print_progress : bool (default: True)
Prints progress as the number of epochs
to stderr.
k_features : int
Number of features to select where k_features.
scoring : str, (default='accuracy')
S... | 62598f89ec188e330fdf83f9 |
class SelectAchievementForm(Form): <NEW_LINE> <INDENT> achievement = forms.ChoiceField(required=True) <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> game = kwargs.pop('game',None) <NEW_LINE> super(SelectAchievementForm,self).__init__(*args,**kwargs) <NEW_LINE> achievement_choices = [ (achievement.... | Form presented to the user when adding achievements to an achievement list. | 62598f896aa9bd52df0d4a2d |
class ReloadListener(sublime_plugin.EventListener): <NEW_LINE> <INDENT> def on_post_save(self, view): <NEW_LINE> <INDENT> path = view.file_name() <NEW_LINE> if RESOURCES_PATH in path: <NEW_LINE> <INDENT> grps = re.match(r'^(.*)' + os.path.sep + RESOURCES_PATH + os.path.sep + '(.*)$', path) <NEW_LINE> dest = os.path.joi... | listener class | 62598f89b57a9660fecd15d7 |
class Block: <NEW_LINE> <INDENT> def __init__(self, data: str, previous_hash: str, index: int = None, timestamp: str = None, hash_value: str = None, nonce: int = None): <NEW_LINE> <INDENT> self.index = index <NEW_LINE> self.data = data <NEW_LINE> self.previous_hash = previous_hash <NEW_LINE> self.timestamp = timestamp ... | Data structure for a block. | 62598f8982261d6c5272fc82 |
class FrequencyExperimenter(experimenter.Experimenter): <NEW_LINE> <INDENT> possible_settings = [] <NEW_LINE> default_settings = {} <NEW_LINE> def __init__(self, index, settings=None): <NEW_LINE> <INDENT> super(FrequencyExperimenter, self).__init__(index, None) <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> res... | Calculate the number of occurrences of things found in an index. | 62598f896aa9bd52df0d4a2e |
class KeystoneHTTPClient(HTTPClient): <NEW_LINE> <INDENT> def __init__(self, session): <NEW_LINE> <INDENT> self.session = session <NEW_LINE> <DEDENT> def request(self, method, url, data=None, params=None): <NEW_LINE> <INDENT> from keystoneauth1.exceptions.http import HttpError <NEW_LINE> try: <NEW_LINE> <INDENT> return... | An HTTPClient which authenticates with Keystone.
This uses an instance of python-keystoneclient's Session class
to do its work. | 62598f897b25080760ed7004 |
class DestCreateDBBackupProcess(AbstractProcess): <NEW_LINE> <INDENT> def init(self): <NEW_LINE> <INDENT> self.target = AbstractProcess.DEST <NEW_LINE> self.name = 'Creating wordpress tar file from destination' <NEW_LINE> <DEDENT> def execute(self, args, conf): <NEW_LINE> <INDENT> ssh = AbstractProcess.CONS[self.target... | Creates wp database dump | 62598f89097d151d1a2c0b80 |
@ddt.ddt <NEW_LINE> class DropdownProblemTypeTest(DropDownProblemTypeBase, ProblemTypeTestMixin, ChangingAnswerOfProblemTestMixin): <NEW_LINE> <INDENT> shard = 8 <NEW_LINE> pass | Standard tests for the Dropdown Problem Type | 62598f898a349b6b43685da0 |
@ChallengeResponse.register <NEW_LINE> class HTTP01Response(KeyAuthorizationChallengeResponse): <NEW_LINE> <INDENT> typ = "http-01" <NEW_LINE> PORT = 80 <NEW_LINE> WHITESPACE_CUTSET = "\n\r\t " <NEW_LINE> def simple_verify(self, chall, domain, account_public_key, port=None): <NEW_LINE> <INDENT> if not self.verify(chall... | ACME http-01 challenge response. | 62598f898c0ade5d55dc3438 |
class Config(object): <NEW_LINE> <INDENT> DEBUG = False <NEW_LINE> DATABASE_URL = os.getenv('DATABASE_URL') | Parent configuration class | 62598f8907d97122c4216801 |
class IBody(zope.interface.Interface): <NEW_LINE> <INDENT> pass | Adapts an ICMSContent to an lxml node that represents the "body"
of the content object, i.e. that contains the fulltext. | 62598f8907f4c71912baef9f |
class ProfileManager(models.Manager): <NEW_LINE> <INDENT> def profile_callback(self, user): <NEW_LINE> <INDENT> new_profile = UserProfile.objects.create(user=user,) | Custom manager for the "UserProfile" model. | 62598f89711fe17d825e0246 |
class Connection(pymysql.connections.Connection): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(Connection, self).__init__(*args, **kwargs) <NEW_LINE> self._pool = None <NEW_LINE> self._cursor = None <NEW_LINE> <DEDENT> @contextmanager <NEW_LINE> def swich_db(self, db, cursor=pymysq... | 数据库连接 | 62598f89d53ae8145f917feb |
class IntentConfirmationStatus(Enum): <NEW_LINE> <INDENT> NONE = "NONE" <NEW_LINE> DENIED = "DENIED" <NEW_LINE> CONFIRMED = "CONFIRMED" <NEW_LINE> def to_dict(self): <NEW_LINE> <INDENT> result = {self.name: self.value} <NEW_LINE> return result <NEW_LINE> <DEDENT> def to_str(self): <NEW_LINE> <INDENT> return pprint.pfor... | Indication of whether an intent or slot has been explicitly confirmed or denied by the user, or neither.
Allowed enum values: [NONE, DENIED, CONFIRMED] | 62598f8994891a1f408b949c |
class FigureCanvasQTAggBase(object): <NEW_LINE> <INDENT> def drawRectangle(self, rect): <NEW_LINE> <INDENT> self._drawRect = rect <NEW_LINE> self.draw_idle() <NEW_LINE> <DEDENT> def paintEvent(self, e): <NEW_LINE> <INDENT> FigureCanvasAgg.draw(self) <NEW_LINE> if DEBUG: <NEW_LINE> <INDENT> print('FigureCanvasQtAgg.pain... | The canvas the figure renders into. Calls the draw and print fig
methods, creates the renderers, etc...
Public attribute
figure - A Figure instance | 62598f890a50d4780f704f29 |
class Event(object): <NEW_LINE> <INDENT> def __init__(self, da, mb =EVT_MB_LEFT, shift =False, control =False): <NEW_LINE> <INDENT> self._keyCode = 0 <NEW_LINE> self._point = Point2() <NEW_LINE> self._move = Point2() <NEW_LINE> self._wheelRot = 0 <NEW_LINE> self._shifted = shift <NEW_LINE> self._controlled = control <N... | Eventクラスは,drawAreaに対する仮想イベントの基底クラスです.
_keyCode: イベント発生時の入力キーコード
_point: イベント発生時のマウス位置
_move: イベント発生時のマウス移動量
_wheelRot: イベント発生時のマウスホイール回転量
_shifted: Shiftキー押下フラグ
_controlled: Ctrlキー押下フラグ
_btnType: マウスボタン種別
(EVT_MB_NONE/EVT_MB_LEFT/EVT_MB_RIGHT/EVT_MB_MIDDLE)
_action: アクションへの参照
_screen: draw... | 62598f896e29344779b001af |
class StringLines(object): <NEW_LINE> <INDENT> def __init__(self, string): <NEW_LINE> <INDENT> self._string = string <NEW_LINE> self._line_start_indexes = self._process_line_breaks(string) <NEW_LINE> self.eof_index = len(string) <NEW_LINE> <DEDENT> def _process_line_breaks(self, string): <NEW_LINE> <INDENT> line_start_... | StringLines provides utility methods to work with a string in terms of
lines. As an example, it can convert an index into a line number or column
number (i.e. index into the line). | 62598f8915baa72349461ada |
class Maze: <NEW_LINE> <INDENT> def __init__(self, character, loot): <NEW_LINE> <INDENT> self.character = character <NEW_LINE> self.loot = loot <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def create(): <NEW_LINE> <INDENT> for index, position in enumerate(File.MAZE_WALL): <NEW_LINE> <INDENT> settings.WINDOW.blit(settin... | Create the base maze and additional items to have a complete maze. | 62598f89d4950a0f3b110be3 |
class Discoverable(MDNSDiscoverable): <NEW_LINE> <INDENT> def __init__(self, nd): <NEW_LINE> <INDENT> super(Discoverable, self).__init__(nd, '_miio._udp.local.') <NEW_LINE> <DEDENT> def info_from_entry(self, entry): <NEW_LINE> <INDENT> info = super().info_from_entry(entry) <NEW_LINE> info[ATTR_DEVICE_TYPE] = ... | Add support for discovering Yeelight. | 62598f890383005118f6d256 |
class Context(object): <NEW_LINE> <INDENT> def __init__(self, callback, rei): <NEW_LINE> <INDENT> self.callback = callback <NEW_LINE> self.rei = rei <NEW_LINE> <DEDENT> def __getattr__(self, name): <NEW_LINE> <INDENT> return getattr(self.callback, name) | Combined type of a callback and rei struct.
`Context` can be treated as a rule engine callback for all intents and purposes.
However @rule and @api functions that need access to the rei, can do so through this object. | 62598f8907f4c71912baefa0 |
class CategorySerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Category <NEW_LINE> fields = ('id','name','description') | Serializes Categories | 62598f89656771135c4891d7 |
class ScannerPool(basestring): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_api_name(): <NEW_LINE> <INDENT> return "scanner-pool" | Scanner pool is a set of attributes which are used to validate
and manage connections between clustered ONTAP and Vscan servers
(virus scanners). | 62598f890c0af96317c55ee7 |
class AbsorptionGaussian(ArithmeticModel): <NEW_LINE> <INDENT> def __init__(self, name='absorptiongaussian'): <NEW_LINE> <INDENT> self.fwhm = Parameter(name, 'fwhm', 100., tinyval, hard_min=tinyval, units="km/s") <NEW_LINE> self.pos = Parameter(name, 'pos', 5000., tinyval, frozen=True, units='angstroms') <NEW_LINE> sel... | Absorption Gaussian function expressed in equivalent width. | 62598f89d6c5a102081e1c9e |
class Atlas(object): <NEW_LINE> <INDENT> def __init__(self, w, h): <NEW_LINE> <INDENT> self.allocated = numpy.zeros((w,), dtype=numpy.int16) <NEW_LINE> self.w = w <NEW_LINE> self.h = h <NEW_LINE> <DEDENT> def add(self, w, h): <NEW_LINE> <INDENT> cond = self.allocated <= self.h - h <NEW_LINE> for x in xrange(self.w - w ... | Holds the world (or at least enough data to fit textures) | 62598f89ec188e330fdf83fb |
class SmartHome(models.Model): <NEW_LINE> <INDENT> name = models.CharField( max_length=256, verbose_name=_("Name of the smart home") ) <NEW_LINE> description = models.TextField( verbose_name=_("Additional information for the smart home") ) <NEW_LINE> address = models.CharField( max_length=256, verbose_name=_("Address o... | A SmartHome contains several smart devices, sensors, etc... | 62598f8910dbd63aa1c70712 |
class RefColorConstant(msrest.serialization.Model): <NEW_LINE> <INDENT> color_constant = "green-color" <NEW_LINE> def __init__( self, *, field1: Optional[str] = None, **kwargs ): <NEW_LINE> <INDENT> super(RefColorConstant, self).__init__(**kwargs) <NEW_LINE> self.field1 = field1 | RefColorConstant.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
:ivar color_constant: Required. Referenced Color Constant Description. Default value: "green-
color".
:vartype color_constant: str
:param fie... | 62598f89eab8aa0e5d30b8d5 |
class SwiftTestCase(TestCase): <NEW_LINE> <INDENT> def test_delete(self): <NEW_LINE> <INDENT> with patch.object(swift, "_auth", MagicMock()): <NEW_LINE> <INDENT> self.assertTrue(swift.delete("mycontainer")) <NEW_LINE> self.assertTrue(swift.delete("mycontainer", path="myfile.png")) <NEW_LINE> <DEDENT> <DEDENT> def test_... | Test cases for salt.modules.swift | 62598f89462c4b4f79dbb55f |
class SubunitLogObserver(logobserver.LogLineObserver, TestResult): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> logobserver.LogLineObserver.__init__(self) <NEW_LINE> TestResult.__init__(self) <NEW_LINE> try: <NEW_LINE> <INDENT> from subunit import TestProtocolServer, PROGRESS_CUR, PROGRESS_SET <NEW_LINE>... | Observe a log that may contain subunit output.
This class extends TestResult to receive the callbacks from the subunit
parser in the most direct fashion. | 62598f898e71fb1e983bb60d |
class WorkItemTypeCategory(WorkItemTrackingResource): <NEW_LINE> <INDENT> _attribute_map = { 'url': {'key': 'url', 'type': 'str'}, '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'default_work_item_type': {'key': 'defaultWorkItemType', 'type': 'WorkItemTypeReference'}, 'name': {'key': 'name', 'type': 'str'}, 're... | WorkItemTypeCategory.
:param url:
:type url: str
:param _links: Link references to related REST resources.
:type _links: :class:`ReferenceLinks <work-item-tracking.v4_1.models.ReferenceLinks>`
:param default_work_item_type: Gets or sets the default type of the work item.
:type default_work_item_type: :class:`WorkItemT... | 62598f89498bea3a75a57681 |
class SQLiteTest(Command): <NEW_LINE> <INDENT> description = "Run tests on SQLite" <NEW_LINE> user_options = [] <NEW_LINE> def initialize_options(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def finalize_options(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> if self.distri... | Run the tests on SQLite | 62598f89c432627299fa2b29 |
class Cauchy(Kernel): <NEW_LINE> <INDENT> def __init__(self, sigma=None): <NEW_LINE> <INDENT> if sigma is None: <NEW_LINE> <INDENT> self._sigma = None <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self._sigma = sigma**2 <NEW_LINE> <DEDENT> <DEDENT> def _compute(self, data_1, data_2): <NEW_LINE> <INDENT> if self._sigma ... | Cauchy kernel,
K(x, y) = 1 / (1 + ||x - y||^2 / s ^ 2)
where:
s = sigma | 62598f89bde94217f3707415 |
class AnalyticsVirtualGeneratereport(AnalyticsVirtualGeneratereportSchema): <NEW_LINE> <INDENT> cli_command = "/mgmt/tm/analytics/virtual/generate-report" <NEW_LINE> def rest(self): <NEW_LINE> <INDENT> response = self.device.get(self.cli_command) <NEW_LINE> response_json = response.json() <NEW_LINE> if not response_jso... | To F5 resource for /mgmt/tm/analytics/virtual/generate-report
| 62598f8923e79379d538c05b |
class MigrateSqlServerSqlMITaskOutputAgentJobLevel(MigrateSqlServerSqlMITaskOutput): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'result_type': {'required': True}, 'name': {'readonly': True}, 'is_enabled': {'readonly': True}, 'state': {'readonly': True}, 'started_on': {'readonly': True}, 'ended_on': {... | MigrateSqlServerSqlMITaskOutputAgentJobLevel.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: Result identifier
:vartype id: str
:param result_type: Required. Constant filled by server.
:type result... | 62598f8950485f2cf55daad2 |
class Regex(BaseType): <NEW_LINE> <INDENT> def __init__(self, flags=0, none_ok=False): <NEW_LINE> <INDENT> super().__init__(none_ok) <NEW_LINE> self.flags = flags <NEW_LINE> <DEDENT> def validate(self, value): <NEW_LINE> <INDENT> self._basic_validation(value) <NEW_LINE> if not value: <NEW_LINE> <INDENT> return <NEW_LIN... | A regular expression. | 62598f89dc8b845886d53116 |
class DataElementDisplayInfo(object): <NEW_LINE> <INDENT> def __init__(self, chart_title=None, chart_type=None): <NEW_LINE> <INDENT> self.swagger_types = { 'chart_title': 'str', 'chart_type': 'str' } <NEW_LINE> self.attribute_map = { 'chart_title': 'chartTitle', 'chart_type': 'chartType' } <NEW_LINE> self._chart_title ... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598f893617ad0b5ee05ca1 |
class LearnableFourier1D(torch.nn.Module): <NEW_LINE> <INDENT> def __init__(self, n, dim=-1, inverse=False, learnable=True): <NEW_LINE> <INDENT> super(LearnableFourier1D, self).__init__() <NEW_LINE> self.n = n <NEW_LINE> self.dim = dim <NEW_LINE> eye_n = torch.stack([torch.eye(n), torch.zeros(n, n)], dim=-1) <NEW_LINE>... | Learnable 1D discrete Fourier transform.
Implements a complex operator C^n -> C^n, which is learnable but
initialized as the Fourier transform.
Parameters
----------
n : int
Dimension of the domain and range of the operator.
dim : int, optional
Apply the 1D operator along specified axis for inputs with multi... | 62598f89d6c5a102081e1ca0 |
class ForaSuite(BaseSuite): <NEW_LINE> <INDENT> video_regex = 'https?://(www\.)?fora\.tv/\d{4}/\d{2}/\d{2}/\w+' <NEW_LINE> scrape_fields = set(['link', 'title', 'description', 'flash_enclosure_url', 'embed_code', 'thumbnail_url', 'publish_date', 'user', 'user_url']) <NEW_LINE> def get_scrape_url(self, video): <NEW_LINE... | Suite for fora.tv. As of 19-09-2011 fora does not offer any public API, only video pages and rss feeds. | 62598f8930dc7b766599f3b6 |
class UnitTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.start_dt = datetime.datetime.strptime("20191011", "%Y%m%d") <NEW_LINE> self.end_dt = datetime.datetime.strptime("20200309", "%Y%m%d") <NEW_LINE> self.datelist = [] <NEW_LINE> self.dt1 = datetime.datetime.strptime("20191001"... | Class: UnitTest
Description: Class which is a representation of a unit testing.
Methods:
setUp
test_reverse_dates
test_month_days | 62598f8a0a50d4780f704f2c |
class Var(Serializable): <NEW_LINE> <INDENT> def __init__(self, value=None): <NEW_LINE> <INDENT> super(Var, self).__init__() <NEW_LINE> self.value = value <NEW_LINE> <DEDENT> def set(self, value): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> <DEDENT> def get(self): <NEW_LINE> <INDENT> return self.value <NEW_LINE> ... | A variable, represents a wrapper for a value. | 62598f8aec188e330fdf83fd |
class BedDataProvider(GenomeDataProvider): <NEW_LINE> <INDENT> dataset_type = 'interval_index' <NEW_LINE> def get_iterator(self, data_file, chrom, start, end, **kwargs): <NEW_LINE> <INDENT> raise Exception("Unimplemented Method") <NEW_LINE> <DEDENT> def process_data(self, iterator, start_val=0, max_vals=None, **kwargs)... | Processes BED data from native format to payload format.
Payload format: [ uid (offset), start, end, name, strand, thick_start, thick_end, blocks ] | 62598f8a6aa9bd52df0d4a31 |
class MatchesListView(ListView): <NEW_LINE> <INDENT> model = Matches <NEW_LINE> template_name= 'user/match_list.html' | List of the Matches available | 62598f8a63d6d428bbee2317 |
class PasswordLock(Password): <NEW_LINE> <INDENT> def __init__(self, parent, password): <NEW_LINE> <INDENT> Password.__init__( self, parent, _('Enter password to unlock file'), _('The current file has been locked, please enter the file password to unlock it.'), ui.STOCK_UNLOCK ) <NEW_LINE> self.get_button(1).set_label(... | Asks for a password when the file is locked | 62598f8aa79ad16197769bc2 |
class SettingsProviderAttribute(Attribute,_Attribute): <NEW_LINE> <INDENT> def __init__(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def __new__(self,*__args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> ProviderTypeName=property(lambda self: object(),lambda self,v: None,lambda se... | Specifies the settings provider used to provide storage for the current application settings class or property. This class cannot be inherited.
SettingsProviderAttribute(providerTypeName: str)
SettingsProviderAttribute(providerType: Type) | 62598f8a8e71fb1e983bb60e |
class TraktUpcomingCalendarSensor(Entity): <NEW_LINE> <INDENT> def __init__(self, coordinator): <NEW_LINE> <INDENT> self.coordinator = coordinator <NEW_LINE> self._name = coordinator.config_entry.data[CONF_NAME] <NEW_LINE> <DEDENT> @property <NEW_LINE> def name(self): <NEW_LINE> <INDENT> return self._name <NEW_LINE> <D... | Representation of a Trakt Upcoming Calendar sensor. | 62598f8a96565a6dacd2cd27 |
class VersionParseError(ValueError): <NEW_LINE> <INDENT> pass | Dedicated exception for version and version filter parsing errors.
Arguments should be
- string that can't be parsed
- reason
>>> VersionParseError('asds', 'not a number')
VersionParseError('asds', 'not a number') | 62598f8a8a349b6b43685da4 |
class QueueAuth(requests.auth.AuthBase): <NEW_LINE> <INDENT> def __init__(self, endpoint, username, api_key, auth_token=None): <NEW_LINE> <INDENT> self.endpoint = endpoint <NEW_LINE> self.username = username <NEW_LINE> self.api_key = api_key <NEW_LINE> self.auth_token = auth_token <NEW_LINE> <DEDENT> def auth(self): <N... | Message Queue authentication for requests.
:param endpoint: endpoint URL
:param username: SoftLayer username
:param api_key: SoftLayer API Key
:param auth_token: (optional) Starting auth token | 62598f8a38b623060ffa8bf5 |
class BuildFile(object): <NEW_LINE> <INDENT> def __init__(self, command, domain, translatable): <NEW_LINE> <INDENT> self.command = command <NEW_LINE> self.domain = domain <NEW_LINE> self.translatable = translatable <NEW_LINE> <DEDENT> @cached_property <NEW_LINE> def is_templatized(self): <NEW_LINE> <INDENT> if self.dom... | Represents the state of a translatable file during the build process. | 62598f8ab830903b9686e221 |
@attr.s <NEW_LINE> class AdvRegConfig(object): <NEW_LINE> <INDENT> multiplier = attr.ib(default=0.2) <NEW_LINE> adv_neighbor_config = attr.ib(default=AdvNeighborConfig()) | Contains configuration for adversarial regularization.
Attributes:
multiplier: multiplier to adversarial regularization loss. Default set to
0.2.
adv_neighbor_config: an `nsl.configs.AdvNeighborConfig` object for
generating adversarial neighbor examples. | 62598f8a07f4c71912baefa3 |
class Cards(models.Model): <NEW_LINE> <INDENT> user_profile=models.ForeignKey(UserProfile, related_name='card', default=1) <NEW_LINE> card_hero_image=models.ImageField(upload_to='Cards', blank=True, null=True, verbose_name='Card display image', help_text='Add') <NEW_LINE> card_title=models.CharField(max_length=255, bla... | docstring for cards | 62598f8ad53ae8145f917fef |
class Singleton(type): <NEW_LINE> <INDENT> def __init__(cls, name, bases, attrs): <NEW_LINE> <INDENT> super(Singleton, cls).__init__(name, bases, attrs) <NEW_LINE> cls._instance = None <NEW_LINE> <DEDENT> def __call__(cls, *args, **kwargs): <NEW_LINE> <INDENT> if cls._instance is None: <NEW_LINE> <INDENT> cls._instance... | Singleton meta class
Usage:
>>> class Test(object):
>>> __metaclass__ = Singleton
>>>
>>> def __init__(self):
>>> pass | 62598f8a498bea3a75a57683 |
class Exports(ContextDerived): <NEW_LINE> <INDENT> __slots__ = ('exports', 'dist_install') <NEW_LINE> def __init__(self, context, exports, dist_install=True): <NEW_LINE> <INDENT> ContextDerived.__init__(self, context) <NEW_LINE> self.exports = exports <NEW_LINE> self.dist_install = dist_install | Context derived container object for EXPORTS, which is a
HierarchicalStringList.
We need an object derived from ContextDerived for use in the backend, so
this object fills that role. It just has a reference to the underlying
HierarchicalStringList, which is created when parsing EXPORTS. | 62598f8ad99f1b3c44d05208 |
class InputError(ValueError): <NEW_LINE> <INDENT> pass | 自定义异常类型 | 62598f8ad4950a0f3b110be5 |
class KernelDensity(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._bandwidth = 1.0 <NEW_LINE> self._sample = None <NEW_LINE> <DEDENT> def setBandwidth(self, bandwidth): <NEW_LINE> <INDENT> self._bandwidth = bandwidth <NEW_LINE> <DEDENT> def setSample(self, sample): <NEW_LINE> <INDENT> if not... | Estimate probability density at required points given a RDD of samples
from the population.
>>> kd = KernelDensity()
>>> sample = sc.parallelize([0.0, 1.0])
>>> kd.setSample(sample)
>>> kd.estimate([0.0, 1.0])
array([ 0.12938758, 0.12938758]) | 62598f8a15fb5d323ce7e88b |
class SocialOAuthGrantForm(ScopeMixin, OAuthForm): <NEW_LINE> <INDENT> uid = forms.CharField(required=False) <NEW_LINE> access_token = forms.CharField(required=False) <NEW_LINE> provider = forms.CharField(required=False) <NEW_LINE> scope = ScopeChoiceField(choices=SCOPE_NAMES, required=False) <NEW_LINE> def clean_uid(s... | Validate the password of a user on a password grant request. | 62598f8a656771135c4891db |
class Geometry(Analysis): <NEW_LINE> <INDENT> def __defaults__(self): <NEW_LINE> <INDENT> self.tag = 'geometry' <NEW_LINE> self.features = Data() <NEW_LINE> self.settings = Data() <NEW_LINE> <DEDENT> def evaluate(self,condtitions): <NEW_LINE> <INDENT> return Results() | SUAVE.Analyses.Geometry.Geometry()
| 62598f8ab57a9660fecd15dd |
class UcsmBindingAlreadyExists(exceptions.QuantumException): <NEW_LINE> <INDENT> message = _("Ucsm Binding with ip %(ucsm_ip)s already exists") | Ucsm Binding already exists | 62598f8a91af0d3eaad3995e |
class WeatherMapServer(object): <NEW_LINE> <INDENT> def get_server_ip( self ): <NEW_LINE> <INDENT> return '' <NEW_LINE> <DEDENT> def run( self ): <NEW_LINE> <INDENT> safe_log("localhost = {}:{}".format(self.__local_ip__, self.__port__)) <NEW_LINE> self.__httpd__.serve_forever() <NEW_LINE> <DEDENT> def stop( self ): <NE... | Class to handle running a REST endpoint to handle configuration. | 62598f8ad10714528d69da30 |
class ExpressRouteCrossConnectionsRoutesTableSummaryListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'next_link': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[ExpressRouteCrossConnectionRoutesTableSummary]'}, 'next_link': {'key': 'nextLink', 'type': ... | Response for ListRoutesTable associated with the Express Route Cross Connections.
Variables are only populated by the server, and will be ignored when sending a request.
:param value: A list of the routes table.
:type value:
list[~azure.mgmt.network.v2018_11_01.models.ExpressRouteCrossConnectionRoutesTableSummary]
:... | 62598f8a6aa9bd52df0d4a33 |
class UserProfile(models.Model): <NEW_LINE> <INDENT> def _get_avatar_path(self, filename): <NEW_LINE> <INDENT> path = os.path.join(USER_ICON_PATH, self.user.username) <NEW_LINE> return os.path.join(path, filename) <NEW_LINE> <DEDENT> SEX_TYPES = ( ('man', _("Man")), ('woman', _('Woman')) ) <NEW_LINE> AVATAR_SIZE_PATT... | A model for User profile. | 62598f8a6aa9bd52df0d4a34 |
class DirectoryObserver(ModuleLogicMixin): <NEW_LINE> <INDENT> @property <NEW_LINE> def running(self): <NEW_LINE> <INDENT> return getattr(self, "_running", False) <NEW_LINE> <DEDENT> StartedEvent = SlicerDevelopmentToolboxEvents.StartedEvent <NEW_LINE> StoppedEvent = SlicerDevelopmentToolboxEvents.StoppedEvent <NEW_LIN... | Helper class for observing a given directory by checking the filecount every n milliseconds
Args:
directory(str): directory to be observed
every(int, optional): time in milliseconds defining how often to check the filecount | 62598f8a379a373c97d98b74 |
class ConfigStub: <NEW_LINE> <INDENT> def __init__(self, data=None): <NEW_LINE> <INDENT> self.data = data or {} <NEW_LINE> <DEDENT> def section(self, name): <NEW_LINE> <INDENT> return self.data[name] <NEW_LINE> <DEDENT> def get(self, sect, opt): <NEW_LINE> <INDENT> data = self.data[sect] <NEW_LINE> try: <NEW_LINE> <IND... | Stub for basekeyparser.config.
Attributes:
data: The config data to return. | 62598f8a96565a6dacd2cd28 |
class PostSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> owner = serializers.ReadOnlyField(source='owner.username') <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Post <NEW_LINE> fields = ('id', 'name', 'owner', 'owner_id', 'date_created', 'date_modified') <NEW_LINE> read_only_fields = ('date_created'... | Serializer to map the Model instance into JSON format. | 62598f8a4e696a045264dbb4 |
class BugAttachmentURL: <NEW_LINE> <INDENT> implements(ICanonicalUrlData) <NEW_LINE> rootsite = 'bugs' <NEW_LINE> def __init__(self, context): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> <DEDENT> @property <NEW_LINE> def inside(self): <NEW_LINE> <INDENT> bugtask = getUtility(ILaunchBag).bugtask <NEW_LINE> if ... | Bug URL creation rules. | 62598f8a71ff763f4b5e72d0 |
class ShapeSerializer(ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Shape <NEW_LINE> fields = '__all__' | Shape is in geoJSON format | 62598f8a8e05c05ec3f6ebf8 |
class grid(object): <NEW_LINE> <INDENT> def __init__(self,rows,columns,width,height): <NEW_LINE> <INDENT> self.width=width <NEW_LINE> self.height=height <NEW_LINE> self.rows=rows <NEW_LINE> self.columns=columns <NEW_LINE> <DEDENT> def draw(self): <NEW_LINE> <INDENT> pass | create a grid for the snake to move around on | 62598f8a442bda511e95bfbd |
class Date(BaseColumn): <NEW_LINE> <INDENT> abstract_sql_column_type = 'Date' <NEW_LINE> def __init__(self, default=None, null=False, doc=None): <NEW_LINE> <INDENT> self.default = default <NEW_LINE> self.null = bool(null) <NEW_LINE> BaseColumn.__init__(self, doc) | Date column
| 62598f8afb3f5b602db47f61 |
class DatasetDateTimePlugin(_DatasetPlugin, DatasetDateTimeBase): <NEW_LINE> <INDENT> def __init__(self, manager, ds): <NEW_LINE> <INDENT> _DatasetPlugin.__init__(self, manager, ds) <NEW_LINE> DatasetDateTimeBase.__init__(self) <NEW_LINE> self.serr = self.perr = self.nerr = None <NEW_LINE> <DEDENT> def __getitem__(self... | Return date dataset from plugin. | 62598f8a73bcbd0ca4bc9daf |
class FooItemBaseAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('title', 'date_published') <NEW_LINE> prepopulated_fields = {'slug': ('title',)} <NEW_LINE> list_filter = ('date_published',) <NEW_LINE> readonly_fields = ('date_created', 'date_updated',) <NEW_LINE> fieldsets = ( (None, { 'fields': ('title',... | FooItem base admin. | 62598f8a15baa72349461ae0 |
class PostOrderIter(AbstractIter): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def _iter(children, filter_, stop, maxlevel): <NEW_LINE> <INDENT> return PostOrderIter.__next(children, 1, filter_, stop, maxlevel) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def __next(children, level, filter_, stop, maxlevel): <NEW_LINE... | Iterate over tree applying post-order strategy starting at `node`.
>>> from anytree import Node, RenderTree, AsciiStyle
>>> f = Node("f")
>>> b = Node("b", parent=f)
>>> a = Node("a", parent=b)
>>> d = Node("d", parent=b)
>>> c = Node("c", parent=d)
>>> e = Node("e", parent=d)
>>> g = Node("g", parent=f)
>>> i = Node(... | 62598f8a0383005118f6d25c |
class UserTaskMixin(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def generate_name(cls, arguments_dict): <NEW_LINE> <INDENT> return cls.__name__.split('.')[-1] <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def calculate_total_steps(arguments_dict): <NEW_LINE> <INDENT> return 1 <NEW_LINE> <DEDENT> @classmethod <N... | Mixin class for user-triggered Celery tasks.
Subclasses should usually override :py:meth:`generate_name` and
:py:meth:`calculate_total_steps`. In order to access the
:py:attr:`status` property (for calling its
:py:meth:`~user_tasks.models.UserStatus.increment_completed_steps` and
:py:meth:`~user_tasks.models.UserStat... | 62598f8a07f4c71912baefa6 |
class MaxInfoStratificationSelector(StratifiedSelector): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return 'Maximum Information Stratification Selector' <NEW_LINE> <DEDENT> def __init__(self, test_size): <NEW_LINE> <INDENT> super().__init__(test_size) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def sor... | Implementation of the maximum information stratification (MIS) selector
proposed by [Bar06]_, in which the item bank is sorted in ascending order
according to the items maximum information and then separated into :math:`K`
strata (:math:`K` being the test size), each stratum containing items with
gradually higher maxim... | 62598f8a66656f66f7d59f59 |
class EventSourcedSnapshotStrategy(AbstractSnapshotStrategy): <NEW_LINE> <INDENT> def __init__(self, event_store: EventStore): <NEW_LINE> <INDENT> assert isinstance(event_store, EventStore) <NEW_LINE> self.event_store = event_store <NEW_LINE> <DEDENT> async def get_snapshot(self, entity_id, lt=None, lte=None) -> Snapsh... | Snapshot strategy that uses an event sourced snapshot.
| 62598f8a0a366e3fb87dc532 |
class TestCIAggVote(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 testCIAggVote(self): <NEW_LINE> <INDENT> model = CIAggVote() <NEW_LINE> expected = {'job_id': None, 'success': None, 'url': None,... | CIAggVote unit test stubs | 62598f8a6fece00bbaccb4ec |
class ControlButtonsWidget(Gtk.Box): <NEW_LINE> <INDENT> def __init__(self, query, cache): <NEW_LINE> <INDENT> Gtk.Box.__init__(self, Gtk.Orientation.HORIZONTAL) <NEW_LINE> self.get_style_context().add_class(Gtk.STYLE_CLASS_LINKED) <NEW_LINE> self.set_property('margin', 4) <NEW_LINE> self._bts = Gtk.Button.new_from_ico... | Widget that implements the three buttons in the Metadata-Items.
The possible actions are: Save, Delete, Set.
The latter two are exclusive. Only one is sensitive at a time. | 62598f8a15baa72349461ae1 |
class HelloApiView(APIView): <NEW_LINE> <INDENT> serializer_class = serializers.HelloSerializer <NEW_LINE> def get(self, request, format=None): <NEW_LINE> <INDENT> an_apiview = [ 'Uses HTTP methods as function (get, post, patch, put, delete', 'Is similar to a traditional django view', 'gives you the most control over y... | Test API View | 62598f8ad10714528d69da33 |
class RectangleBin: <NEW_LINE> <INDENT> def __init__(self, bounds=None, size=None): <NEW_LINE> <INDENT> self.child = [None] * 2 <NEW_LINE> self.bounds = bounds <NEW_LINE> self.occupied = False <NEW_LINE> if size != None: <NEW_LINE> <INDENT> self.bounds = np.append([0,0], size) <NEW_LINE> <DEDENT> <DEDENT> def insert... | 2D BSP tree node.
http://www.blackpawn.com/texts/lightmaps/ | 62598f8aec188e330fdf8401 |
class AssetSearchResults(osid_searches.OsidSearchResults): <NEW_LINE> <INDENT> def get_assets(self): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> assets = property(fget=get_assets) <NEW_LINE> def get_asset_query_inspector(self): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> asset_query_inspector = property(fget=get_... | This interface provides a means to capture results of a search. | 62598f8a6aa9bd52df0d4a35 |
class AdiEmsWebApiV2DtoAnalyticSetAnalyticSet(Model): <NEW_LINE> <INDENT> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'items': {'key': 'items', 'type': '[AdiEmsWebApiV2DtoAnalyticSetAnalyticSetItem]'}, } <NEW_LINE> def __init__(self, name=None, descri... | Encapsulates the data that defines an AnalyticSet.
:param name: The name of the AnalyticSet.
:type name: str
:param description: An optional description of the ParameterSet.
:type description: str
:param items: An array of the analytics contained in the AnalyticSet.
:type items:
list[~emsapi.models.AdiEmsWebApiV2DtoA... | 62598f8aa79ad16197769bc6 |
class solid_ice_discharge_ais(contribution): <NEW_LINE> <INDENT> def equilibrium_sl(self, delta_temp): <NEW_LINE> <INDENT> return self.alpha * delta_temp | Antarctic ice sheet solid ice discharge,
equilibrium sea level response and transient response.
See M. Mengel et al., PNAS (2016), Materials and Methods | 62598f8ab7558d5895463196 |
class ClassroomCreateView(views.APIView): <NEW_LINE> <INDENT> serializer_class = ClassroomCreateSerializer <NEW_LINE> @swagger_serializer_method(serializer_or_field=ClassroomCreateSerializer) <NEW_LINE> def post(self, request): <NEW_LINE> <INDENT> serializer = ClassroomCreateSerializer(data=request.data) <NEW_LINE> if ... | API view for creating a classroom | 62598f8a8a349b6b43685da8 |
class EffectTypeData(RESTPayload): <NEW_LINE> <INDENT> effect_type_id: int <NEW_LINE> description: str <NEW_LINE> param1: Optional[str] <NEW_LINE> param2: Optional[str] <NEW_LINE> param3: Optional[str] <NEW_LINE> param4: Optional[str] <NEW_LINE> param5: Optional[str] <NEW_LINE> param6: Optional[str] <NEW_LINE> param7: ... | Data class for :class:`auraxium.ps2.EffectType`.
This class mirrors the payload data returned by the API, you may
use its attributes as keys in filters or queries. | 62598f8a4e696a045264dbb5 |
class MatrixError(Exception): <NEW_LINE> <INDENT> pass | The generic matrix-themed exception. | 62598f8a71ff763f4b5e72d2 |
class Mimetype: <NEW_LINE> <INDENT> def __init__(self, contentType): <NEW_LINE> <INDENT> self.contentType = contentType <NEW_LINE> <DEDENT> def getContentType(self): <NEW_LINE> <INDENT> return self.contentType <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.contentType <NEW_LINE> <DEDENT> def __c... | Represents a mime type. | 62598f8ab830903b9686e223 |
class VerifiedHTTPSConnection(httplib.HTTPSConnection): <NEW_LINE> <INDENT> VALID_FINGERPRINTS = ("A6:FE:08:F4:A8:86:F9:C1:BF:4E:70:0A:BD:72:AE:B8:8E:B7:78:52", "AD:A0:E3:2B:1F:CE:E8:44:F2:83:BA:AE:E4:7D:F2:AD:44:48:7F:1E") <NEW_LINE> def connect(self): <NEW_LINE> <INDENT> if sys.hexversion >= 0x02070000: <NEW_LINE> <I... | HTTPSConnection supporting certificate authentication based on fingerprint | 62598f8a442bda511e95bfbf |
class SegmentProcessor( Processor ): <NEW_LINE> <INDENT> def display( self, display_before=False): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> image = self._input['originalImg'].copy() <NEW_LINE> <DEDENT> except KeyError: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> image = self._input['image'].copy() <NEW_LINE> <DEDE... | Processor for segments, given image and segments, returning only the desirable
ones | 62598f8a5f7d997b871f918a |
class Value(FancySchemaItem): <NEW_LINE> <INDENT> if_missing=None <NEW_LINE> def __init__(self, value, **kw): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> FancySchemaItem.__init__(self, **kw) <NEW_LINE> <DEDENT> def _validate(self, value, **kw): <NEW_LINE> <INDENT> if value != self.value: <NEW_LINE> <INDENT> raise... | Checks that validated value is exactly ``value`` | 62598f8a07d97122c421680a |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.