code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class MockTractInfo: <NEW_LINE> <INDENT> def __init__(self, name, bbox, wcs, numPatches): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.bbox = bbox <NEW_LINE> self.wcs = wcs <NEW_LINE> self._numPatches = numPatches <NEW_LINE> assert bbox.getWidth()%numPatches[0] == 0 <NEW_LINE> assert bbox.getHeight()%numPatches... | A Tract based on a bounding box and WCS.
Testing is made easier when we can specifically define
a Tract in terms of its bounding box in pixel coordinates
along with a WCS for the exposure.
Only the relevant methods from `TractInfo` needed to make
test pass are implemented here. Since this is just for
testing, it isn'... | 62598efc5166f23b2e241d2e |
class Team(Resource): <NEW_LINE> <INDENT> def __init__(self, jsonstr=None, key=None, warnings=None): <NEW_LINE> <INDENT> super(Team, self).__init__(jsonstr, key, warnings) <NEW_LINE> if 'accounts' in self.json_data: <NEW_LINE> <INDENT> acct_list = [] <NEW_LINE> for acct in self.accounts: <NEW_LINE> <INDENT> acct_list.a... | Contains information about your team and its members
Comprises the following attributes:
name (str): The name of your Team
accounts (list of dict): A list of all Accounts belonging to your Team.
Note that this response is a subset of the response parameters
found in GET /account.
acc... | 62598efca05bb46b384891c7 |
class OneComicDayView(OneComicMixin, ReleaseDayArchiveView): <NEW_LINE> <INDENT> def get_current_day(self): <NEW_LINE> <INDENT> return self.context['day'] | View of the releases from a single comic for a given day | 62598efc091ae3566870356c |
class PublishersDB: <NEW_LINE> <INDENT> def __init__(self, db, cache): <NEW_LINE> <INDENT> self.db = db <NEW_LINE> self.cache = cache <NEW_LINE> self.headers = {"Content-Type": "application/json"} <NEW_LINE> self.return_code_success = 200 <NEW_LINE> self.return_code_created = 201 <NEW_LINE> self.return_code_fail = 500 ... | class to handle requests from api for authors | 62598efc0fa83653e46f3834 |
class LineEdit(QtGui.QLineEdit, views.BaseView): <NEW_LINE> <INDENT> def __init__(self, *args, **kwds): <NEW_LINE> <INDENT> super(LineEdit, self).__init__(*args, **kwds) <NEW_LINE> self.set_stylesheet('lineedit') | Inherits from the base Qt class and the common object | 62598efc009cb60464cffea3 |
class Token_Manage2(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.host = RedisHost <NEW_LINE> self.port = RedisPost <NEW_LINE> self.redisobj = redis.StrictRedis(host=self.host, port=self.port, db=0) <NEW_LINE> <DEDENT> def generate_auth_token(self, data): <NEW_LINE> <INDENT> data = data.copy... | data = {'username':'test','password':'123456'}
or something other user's data | 62598efce5267d203ee6a258 |
class CoverSourcePlugin(GObject.Object): <NEW_LINE> <INDENT> __gsignals__ = { 'fetch-success': (GObject.SignalFlags.RUN_LAST, None, (object,)), 'fetch-failure': (GObject.SignalFlags.RUN_LAST, None, (object,)), 'search-complete': (GObject.SignalFlags.RUN_LAST, None, (object,)) } <NEW_LINE> embedded = False <NEW_LINE> de... | Plugins that given a song should provide a cover art.
The plugin should override following methods and properties:
@staticmethod priority()
@property cover_path(self)
fetch_cover(self)
Refer to default function implementation's documentation in order to
understand their role. | 62598efcf548e778e5969ed9 |
class CRTPPacket(object): <NEW_LINE> <INDENT> def __init__(self, header=0, data=None): <NEW_LINE> <INDENT> self.size = 0 <NEW_LINE> self._data = "" <NEW_LINE> self.header = header <NEW_LINE> self._port = (header & 0xF0) >> 4 <NEW_LINE> self._channel = header & 0x03 <NEW_LINE> if data: <NEW_LINE> <INDENT> self._set_data... | A packet that can be sent via the CRTP. | 62598efcbf627c535bcafdc7 |
class DynamicSortingFilter(OrderingFilter): <NEW_LINE> <INDENT> def filter_queryset(self, request, queryset, view): <NEW_LINE> <INDENT> self.ordering_param = view.SORT <NEW_LINE> ordering = self.get_ordering(request, queryset, view) <NEW_LINE> if ordering: <NEW_LINE> <INDENT> return queryset.order_by(*ordering) <NEW_LI... | Subclass of DRF's OrderingFilter.
This class adds support for multi-field ordering and rewritten fields. | 62598efc97e22403b383983b |
class Break(Builtin): <NEW_LINE> <INDENT> messages = { 'nofwd': "No enclosing For, While, or Do found for Break[].", } <NEW_LINE> def apply(self, evaluation): <NEW_LINE> <INDENT> raise BreakInterrupt | <dl>
<dt>'Break[]'
<dd>exits a 'For', 'While', or 'Do' loop.
</dl>
>> n = 0;
>> While[True, If[n>10, Break[]]; n=n+1]
>> n
= 11 | 62598efc167d2b6e312b58ef |
class Config(object): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> self.proxy = {} <NEW_LINE> self.http = {} <NEW_LINE> self.cache = {} <NEW_LINE> with open(path) as f: <NEW_LINE> <INDENT> config = json.load(f) <NEW_LINE> <DEDENT> self.proxy.update(PROXY_DEFAULTS) <NEW_LINE> self.http.update(HTTP_D... | This class encapsulates configuration information shared across
components throughout the proxy. User-modifiable config
information is stored in a JSON document with different objects
for each software component. | 62598efc5fdd1c0f98e5c8f9 |
class ChangeEmailForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = User <NEW_LINE> fields = ('email',) | Formulario para modificar el email | 62598efc796e427e5384d0ee |
class VerificationSerializer(serializers.Serializer): <NEW_LINE> <INDENT> profile = serializers.CharField(max_length=200, min_length=50) <NEW_LINE> def validate(self, attrs): <NEW_LINE> <INDENT> profile = Profile.objects.get_by_code(attrs['profile']) <NEW_LINE> if not profile: <NEW_LINE> <INDENT> raise serializers.Vali... | The user verification token serializer | 62598efc9c8ee8231303f606 |
class ChannelConfig(object): <NEW_LINE> <INDENT> def __init__(self, name, v_range=5.0, probe_attenuation=1.0, coupling="DC", enabled=True): <NEW_LINE> <INDENT> self.name=name <NEW_LINE> self.v_range=v_range <NEW_LINE> self.probe_attenuation=probe_attenuation <NEW_LINE> self.enabled=enabled <NEW_LINE> self.coupling=coup... | This class is used to store the configuration of a channel | 62598efc7d43ff24874268a5 |
class BatchInjector(metaclass=abc.ABCMeta): <NEW_LINE> <INDENT> @abc.abstractmethod <NEW_LINE> def block_start(self, previous_block): <NEW_LINE> <INDENT> raise NotImplementedError() | The interface to implement for injecting batches during block
publishing. | 62598efcad47b63b2c5a616d |
class DemoRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): <NEW_LINE> <INDENT> def do_GET(self): <NEW_LINE> <INDENT> mapping = { "/": lambda: (200, "OK USA West"), "/service": CpuBurner().handle_http_request, } <NEW_LINE> if self.path not in mapping: <NEW_LINE> <INDENT> self.send_response(404) <NEW_LINE> self.end... | Request handler for Demo http server. | 62598efc9f28863672817148 |
class TransformNode(VLibNode): <NEW_LINE> <INDENT> def __init__(self,func=None,**kwargs): <NEW_LINE> <INDENT> VLibNode.__init__(self,**kwargs) <NEW_LINE> self._func = func <NEW_LINE> <DEDENT> def next(self): <NEW_LINE> <INDENT> done = 0 <NEW_LINE> parent = self.GetParents()[0] <NEW_LINE> args = [] <NEW_LINE> try: <NEW_... | base class for nodes which filter their input
Assumptions:
- transform function takes a number of arguments equal to the
number of inputs we have. We return whatever it returns
- inputs (parents) can be stepped through in lockstep
Usage Example:
>>> from rdkit.VLib.Supply import SupplyNode
>>> def func... | 62598efc55399d3f05624e7a |
class OutputAtEndOfWindowImpl(DependsOnlyOnWindow): <NEW_LINE> <INDENT> def assign_output_time(self, window, unused_input_timestamp): <NEW_LINE> <INDENT> return window.end | OutputTimeFnImpl outputting at end of window. | 62598efc44b2445a339b5e19 |
class Times(Retry): <NEW_LINE> <INDENT> def __init__(self, attempts=1, name=None, provides=None, requires=None, auto_extract=True, rebind=None, revert_all=False): <NEW_LINE> <INDENT> super(Times, self).__init__(name, provides, requires, auto_extract, rebind) <NEW_LINE> self._attempts = attempts <NEW_LINE> if revert_all... | Retries subflow given number of times. Returns attempt number. | 62598efc56ac1b37e6300b41 |
class AttendView(generic.ListView): <NEW_LINE> <INDENT> template_name = 'attend_list.html' <NEW_LINE> context_object_name = 'object_list' <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super(AttendView, self).get_context_data(**kwargs) <NEW_LINE> localhost_list, localhost_user_dict, week... | all blog list | 62598efc4527f215b58e8852 |
class FrScopedObjectPrinter(FrPtrObjectPrinter): <NEW_LINE> <INDENT> enabled = True <NEW_LINE> def __init__(self, val): <NEW_LINE> <INDENT> self.val = val <NEW_LINE> self.typestr = 'ScopedObject' <NEW_LINE> self.label = 'obj' | Print the object pointed at by a ScopedObject | 62598efc63d6d428bbee1125 |
class Login(LowDataAdapter): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(Login, self).__init__(*args, **kwargs) <NEW_LINE> self.auth = salt.auth.Resolver(self.opts) <NEW_LINE> <DEDENT> def GET(self): <NEW_LINE> <INDENT> cherrypy.response.headers['WWW-Authenticate'] = 'Session' <NE... | Log in to receive a session token
:ref:`Authentication information <rest_cherrypy-auth>`. | 62598efc956e5f7376df4b25 |
class SeverityType(graphene.Scalar): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def serialize(severity): <NEW_LINE> <INDENT> return check_severity(severity) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def parse_literal(node): <NEW_LINE> <INDENT> if isinstance(node, (ast.FloatValue, ast.IntValue)): <NEW_LINE> <INDENT... | A scalar type representing a severity between 0 and 10
Additionally the following values are defined:
-1.0: False positive severity constant
-2.0: Debug message severity constant
-3.0: Error message severity constant
-98.0: Constant for undefined severity (for ranges)
-99.0: Constant for missing or invalid severit... | 62598efc3317a56b869bda0f |
class StarsCreateView(LoginRequiredMixin, CreateView): <NEW_LINE> <INDENT> def form_valid(self, form): <NEW_LINE> <INDENT> print('form_valid called') <NEW_LINE> object = form.save(commit=False) <NEW_LINE> object.owner = self.request.user <NEW_LINE> object.save() <NEW_LINE> return super(StarsCreateView, self).form_valid... | Sub-class of the CreateView to automatically pass the Request to the Form
and add the ads to the saved object. | 62598efc4a966d76dd5ed829 |
class NewUserConsentResource(DirectServeHtmlResource): <NEW_LINE> <INDENT> def __init__(self, hs: "HomeServer"): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._sso_handler = hs.get_sso_handler() <NEW_LINE> self._server_name = hs.hostname <NEW_LINE> self._consent_version = hs.config.consent.user_consent_version... | A resource which collects consent to the server's terms from a new user
This resource gets mounted at /_synapse/client/new_user_consent, and is shown
when we are automatically creating a new user due to an SSO login.
It shows a template which prompts the user to go and read the Ts and Cs, and click
a clickybox if the... | 62598efc63b5f9789fe83ab5 |
class ClearScreen(Request): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def compile(cls): <NEW_LINE> <INDENT> return super(ClearScreen, cls).compile([Direct.CLR, 0]) | @brief DIRECT Clear Screen request packet compiler
@see PATO_DIRECT_CLR | 62598efc8a349b6b43684b99 |
class A(Interface): <NEW_LINE> <INDENT> pass | A root interface. | 62598efc99fddb7c1ca622ad |
class Dsx3LinecodingEnum(Enum): <NEW_LINE> <INDENT> dsx3Other = 1 <NEW_LINE> dsx3B3ZS = 2 <NEW_LINE> e3HDB3 = 3 <NEW_LINE> @staticmethod <NEW_LINE> def _meta_info(): <NEW_LINE> <INDENT> from ydk.models.cisco_ios_xe._meta import _DS3_MIB as meta <NEW_LINE> return meta._meta_table['Ds3Mib.Dsx3Configtable.Dsx3Configentry.... | Dsx3LinecodingEnum
This variable describes the variety of Zero Code
Suppression used on this interface, which in turn
affects a number of its characteristics.
dsx3B3ZS and e3HDB3 refer to the use of specified
patterns of normal bits and bipolar violations
which are used to replace sequences of zero bits
of a spe... | 62598efc4f88993c371ef996 |
class TranslationsPatternTest1(TranslatedBuildTest): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def patch_site(self): <NEW_LINE> <INDENT> os.rename(os.path.join(self.target_dir, "stories", "1.txt.pl"), os.path.join(self.target_dir, "stories", "1.pl.txt") ) <NEW_LINE> conf_path = os.path.join(self.target_dir, "conf.py"... | Check that the path.lang.ext TRANSLATIONS_PATTERN works too | 62598efc4428ac0f6e656ea4 |
class AddPetForm(FlaskForm): <NEW_LINE> <INDENT> name = StringField("Pet name", validators=[InputRequired(message="Pet name can't be blank")]) <NEW_LINE> species = SelectField("Species", validators=[InputRequired(message="Species can't be blank")],choices= [('cat','Cat'),('dog','Dog'),('porc','Porcupine')]) <NEW_LINE> ... | AddPetForm. Includes validation and messages | 62598efc3d592f4c4edb9845 |
class DefaultIdsProvider(IdsProviderInterface): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._last_session_id = 0 <NEW_LINE> <DEDENT> def get_new_session_id(self): <NEW_LINE> <INDENT> self._last_session_id = (self._last_session_id + 1) % (2 << 32) <NEW_LINE> return self._last_session_id | Default implementation of the provider interface | 62598efc377c676e912f620f |
class ContinuousCompoundInterestParams(BaseParams): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return "<ContinuousCompoundInterestParams(A=%r, P=%r, r=%r, t=%r)>" % ( self.A, self.P, self.r, self.t) | A = Accrued interest
P = Principal
r = Annual nominal rate of return
t = Time in years | 62598efc67a9b606de544926 |
class InputFeatures(object): <NEW_LINE> <INDENT> def __init__(self, input_ids, input_masks, segment_ids, output_masks, num_paragraphs, num_steps, ex_index = None): <NEW_LINE> <INDENT> self.input_ids = input_ids <NEW_LINE> self.input_masks = input_masks <NEW_LINE> self.segment_ids = segment_ids <NEW_LINE> self.output_ma... | A single set of features of data. | 62598efc4527f215b58e8854 |
class EnrollmentMixin(ProgramSpecificViewMixin): <NEW_LINE> <INDENT> def get_required_permissions(self, request): <NEW_LINE> <INDENT> if request.method == 'GET': <NEW_LINE> <INDENT> return [perms.API_READ_ENROLLMENTS] <NEW_LINE> <DEDENT> if request.method == 'POST' or self.request.method == 'PATCH': <NEW_LINE> <INDENT>... | This mixin defines the required permissions
for any views that read or write program/course enrollment data.
Overrides AuthMixin.check_permissions. | 62598efc7b180e01f3e484f2 |
class IgnoreBackupLogFilter(logging.Filter): <NEW_LINE> <INDENT> def filter(self, record): <NEW_LINE> <INDENT> return "db backup" in record.getMessage() | 忽略db backup 的日志 | 62598efc10dbd63aa1c6f4d6 |
class AttachmentSegment(object): <NEW_LINE> <INDENT> __slots__ = 'data_size', 'attachment_entry', 'data_offset', '_fh' <NEW_LINE> SID = 'ZISRAWATTACH' <NEW_LINE> def __init__(self, fh): <NEW_LINE> <INDENT> self.data_size = struct.unpack('<i', fh.read(4))[0] <NEW_LINE> fh.seek(12, 1) <NEW_LINE> self.attachment_entry = A... | ZISRAWATTACH segment data.
Contains binary or text data as specified in attachment_entry. | 62598efc5166f23b2e241d34 |
class TensorDatapoint(object): <NEW_LINE> <INDENT> def __init__(self, field_names): <NEW_LINE> <INDENT> self._data = {} <NEW_LINE> for field_name in field_names: <NEW_LINE> <INDENT> self._data[field_name] = None <NEW_LINE> <DEDENT> <DEDENT> def __getitem__(self, name): <NEW_LINE> <INDENT> return self._data[name] <NEW_L... | A single tensor datapoint.
Basically acts like a dictionary | 62598efcfff4ab517ebcc12a |
class PingView(APIView): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get(request): <NEW_LINE> <INDENT> return Response("", status=200) | Get api created to test response time
This is a test api.
To test the response time.
It will just return status 200 | 62598efc4a966d76dd5ed82b |
class QuadraticModel(FunctionModel1DAuto): <NEW_LINE> <INDENT> def f(self,x,c2=1,c1=0,c0=0): <NEW_LINE> <INDENT> return c2*x*x+c1*x+c0 | 2-degree polynomial :math:`f(x)=c_2 x^2 + c_1 x + c_0` | 62598efc4f88993c371ef997 |
class KeyczarDocsKeyring(DocsKeyring): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> crypter = keyczar.EnvironCrypter() <NEW_LINE> credential = EnvironCredential() <NEW_LINE> source = os.environ.get('GOOGLE_KEYRING_SOURCE') <NEW_LINE> super(KeyczarDocsKeyring, self).__init__( credential, source, crypter) ... | Google Docs keyring using keyczar initialized from environment
variables | 62598efc3617ad0b5ee04a82 |
class override(object): <NEW_LINE> <INDENT> def __init__(self, timezone): <NEW_LINE> <INDENT> self.timezone = timezone <NEW_LINE> self.oldTimezone = getattr(_active, 'value', None) <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> if self.timezone is None: <NEW_LINE> <INDENT> deactivate() <NEW_LINE> <DEDENT>... | Temporarily set the time zone for the current thread.
This is a context manager that uses ``~theory.utils.timezone.activate()``
to set the timezone on entry, and restores the previously active timezone
on exit.
The ``timezone`` argument must be an instance of a ``tzinfo`` subclass, a
time zone name, or ``None``. If i... | 62598efc091ae35668703572 |
class AudioDescriptorLpcm(ShortAudioDescriptor): <NEW_LINE> <INDENT> def __init__(self, block, my_type): <NEW_LINE> <INDENT> ShortAudioDescriptor.__init__(self, block, my_type) <NEW_LINE> <DEDENT> @property <NEW_LINE> def bit_depth(self): <NEW_LINE> <INDENT> return tools.DictFilter(AUDIO_BITS, self._block[2] & 0x07) | Defines a LPCM Short Audio Descriptor inside Audio Data Block. | 62598efc2c8b7c6e89bd211a |
class ShowCatalog(show.ShowOne): <NEW_LINE> <INDENT> log = logging.getLogger(__name__ + '.ShowCatalog') <NEW_LINE> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(ShowCatalog, self).get_parser(prog_name) <NEW_LINE> parser.add_argument( 'service', metavar='<service>', help='Service to display (type, ... | Show service catalog entry
Demonstrates a command using the existing Identity client | 62598efc9f2886367281714c |
class BufferedLinePlotObserver(MatplotObservable): <NEW_LINE> <INDENT> _matrix: torch.Tensor <NEW_LINE> _buffer: np.ndarray <NEW_LINE> def __init__(self, data_vector: torch.Tensor): <NEW_LINE> <INDENT> self._matrix = data_vector <NEW_LINE> self._buffer = np.ndarray((data_vector.shape[0], 0)) <NEW_LINE> <DEDENT> def get... | Each time it is called Plots each row of a 2D tensor as a line into one plot. | 62598efc5fcc89381b2655d5 |
class CreateSubjectApiView(generics.CreateAPIView): <NEW_LINE> <INDENT> queryset = Subject.objects.all() <NEW_LINE> serializer_class = SubjectSerializer <NEW_LINE> def create(self, request, *args, **kwargs): <NEW_LINE> <INDENT> serializer = self.get_serializer(data=request.data) <NEW_LINE> if serializer.is_valid(): <NE... | 새로운 과목을 생성한다. | 62598efc97e22403b383983f |
class CoreListener(listener.Listener): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def send(event, **kwargs): <NEW_LINE> <INDENT> listener.send(CoreListener, event, **kwargs) <NEW_LINE> <DEDENT> def on_event(self, event, **kwargs): <NEW_LINE> <INDENT> getattr(self, event)(**kwargs) <NEW_LINE> <DEDENT> def track_playba... | Marker interface for recipients of events sent by the core actor.
Any Pykka actor that mixes in this class will receive calls to the methods
defined here when the corresponding events happen in the core actor. This
interface is used both for looking up what actors to notify of the events,
and for providing default imp... | 62598efc21bff66bcd7215af |
class ResultThread(threading.Thread): <NEW_LINE> <INDENT> fx_output = None <NEW_LINE> def run(self, *args, **kwargs): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> if self._target: <NEW_LINE> <INDENT> self.fx_output = self._target(*self._args, **self._kwargs) <NEW_LINE> <DEDENT> <DEDENT> finally: <NEW_LINE> <INDENT> del... | A custom Thread that can return the value of the function
runned inside it | 62598efcbe383301e0252139 |
class PytorchTestable(): <NEW_LINE> <INDENT> def get_testing_data(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def get_metric(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def prepare_test(self, sample): <NEW_LINE> <INDENT> data, label = sample <NEW_LINE> data = da... | Mixin for testing-related abstractions.
Realizes the most high-level idea of a test, defined as follows:
* create the data source
* create the test metric
* iterate over the data source, each time doing the following:
* prepare the data sample
* perform the forward pass for this sample, obtaining some ou... | 62598efc55399d3f05624e7e |
class VCRHTTPSConnection(VCRConnection): <NEW_LINE> <INDENT> _baseclass = HTTPSConnection <NEW_LINE> _protocol = 'https' | A Mocked class for HTTPS requests | 62598efc99cbb53fe682f809 |
class SpecifyIndexBuilderCoro: <NEW_LINE> <INDENT> def it_is_callable(self): <NEW_LINE> <INDENT> import da.util.misc <NEW_LINE> assert callable(da.util.misc.index_builder_coro) | Specify the da.util.misc.index_builder_coro() function. | 62598efc3d592f4c4edb9847 |
class SubAssembly(Operation): <NEW_LINE> <INDENT> def __init__(self, sub_assembly_class, *args): <NEW_LINE> <INDENT> self.__sub_assembly_class = sub_assembly_class <NEW_LINE> self.__args = args <NEW_LINE> <DEDENT> def _create_with_parent(self, parent): <NEW_LINE> <INDENT> pipe = self.__sub_assembly_class(parent.get_ass... | Pipe for a Cascading SubAssembly.
We can use it in PyCascading to make use of existing subassemblies,
such as Unique. | 62598efc56ac1b37e6300b45 |
class MapChangeEvent(object): <NEW_LINE> <INDENT> def __init__(self, newMap): <NEW_LINE> <INDENT> self.map = newMap | To notify that the map has been changed | 62598efc7b180e01f3e484f3 |
class Price(models.Model): <NEW_LINE> <INDENT> product = models.ForeignKey(Product) <NEW_LINE> price = models.DecimalField(_("Price"), max_digits=14, decimal_places=6, ) <NEW_LINE> quantity = models.IntegerField(_("Discount Quantity"), default=1, help_text=_("Use this price only for this quantity or higher")) <NEW_LINE... | A Price!
Separating it out lets us have different prices for the same product for different purposes.
For example for quantity discounts.
The current price should be the one with the earliest expires date, and the highest quantity
that's still below the user specified (IE: ordered) quantity, that matches a given produc... | 62598efc1f5feb6acb1615ae |
class BaseTestCase(TestCase): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(BaseTestCase, self).__init__(*args, **kwargs) <NEW_LINE> self.settings_manager = TestSettingsManager() <NEW_LINE> <DEDENT> def addTestApps(self, apps): <NEW_LINE> <INDENT> installed_apps = settings.INSTALLED... | A subclass of the Django TestCase with a settings_manager
attribute which is an instance of TestSettingsManager.
Comes with a tearDown() method that calls
self.settings_manager.revert(). | 62598efce1aae11d1e7cdcef |
class ChoiceDetail(generics.RetrieveUpdateAPIView): <NEW_LINE> <INDENT> queryset = Choice.objects.all() <NEW_LINE> serializer_class = ChoiceSerializer | Retrieve a choice, update a choice | 62598efcbf627c535bcafdcd |
class NST: <NEW_LINE> <INDENT> def __init__(self, style_image, content_image, alpha=1e4, beta=1): <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def scale_image(image): <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> def load_model(self): <NEW_LINE> <INDENT> return None <NEW_LINE> <DED... | Performs tasks for neural style transfer | 62598efc92d797404e388027 |
class Plugin(CSMPlugin): <NEW_LINE> <INDENT> name = "Install Deactivate Plugin" <NEW_LINE> platforms = {'ASR9K', 'CRS'} <NEW_LINE> phases = {'Deactivate'} <NEW_LINE> os = {'XR'} <NEW_LINE> def get_tobe_deactivated_pkg_list(self): <NEW_LINE> <INDENT> packages = self.ctx.software_packages <NEW_LINE> pkgs = SoftwarePackag... | This plugin deactivates packages on the device. | 62598efcff9c53063f518fbb |
class TextQuestionBase(PageBaseWithTitle): <NEW_LINE> <INDENT> def __init__(self, vctx, location, page_desc): <NEW_LINE> <INDENT> super(TextQuestionBase, self).__init__(vctx, location, page_desc) <NEW_LINE> widget = TextAnswerForm.get_text_widget( getattr(page_desc, "widget", None), check_only=True) <NEW_LINE> if widge... | A page asking for a textual answer
.. attribute:: id
|id-page-attr|
.. attribute:: type
``TextQuestion``
.. attribute:: access_rules
|access-rules-page-attr|
.. attribute:: title
|title-page-attr|
.. attribute:: prompt
The page's prompt, written in :ref:`markup`.
.. attribute:: widget
... | 62598efcf548e778e5969edf |
class SBHostOS(_object): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> __setattr__ = lambda self, name, value: _swig_setattr(self, SBHostOS, name, value) <NEW_LINE> __swig_getmethods__ = {} <NEW_LINE> __getattr__ = lambda self, name: _swig_getattr(self, SBHostOS, name) <NEW_LINE> __repr__ = _swig_repr <NEW_LI... | Proxy of C++ lldb::SBHostOS class. | 62598efc099cdd3c63674883 |
class FakeImage: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.sizes = (10, 20) <NEW_LINE> <DEDENT> def get_image_sizes(self): <NEW_LINE> <INDENT> return self.sizes | A fake image class | 62598efc5166f23b2e241d36 |
class TargetTrackComponent(Component): <NEW_LINE> <INDENT> __events__ = (u'target_track',) <NEW_LINE> def __init__(self, *a, **k): <NEW_LINE> <INDENT> super(TargetTrackComponent, self).__init__(*a, **k) <NEW_LINE> self._target_track = None <NEW_LINE> self._armed_track_list = [] <NEW_LINE> self.__on_selected_track_chang... | Component that can be used to notify other components (such as
PercussionInstrumentFinder) of the track they should control/listen to
(the target_track). In this base class, the target_track will always be the
selected track. | 62598efc656771135c487fe3 |
class JSONSerializer(Serializer): <NEW_LINE> <INDENT> ext = "json" <NEW_LINE> woptions = "w" <NEW_LINE> roptions = "r" <NEW_LINE> @classmethod <NEW_LINE> def marshal(cls, input_data): <NEW_LINE> <INDENT> return json.dumps(input_data, indent=2) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def unmarshal(cls, input_string)... | JSON Serializer | 62598efcaad79263cf42d169 |
class ColoredFormatter(logging.Formatter): <NEW_LINE> <INDENT> COLORS = { 'WARNING': 'yellow', 'INFO': None, 'DEBUG': 'cyan', 'CRITICAL': 'red', 'ERROR': 'red' } <NEW_LINE> def format(self, record): <NEW_LINE> <INDENT> level_name = record.levelname <NEW_LINE> level_color = None <NEW_LINE> if level_name in ColoredFormat... | A logging formatter using ansi code to format the message. | 62598efca05bb46b384891cf |
class Cloud(core.Model): <NEW_LINE> <INDENT> def __init__(self, pos, view): <NEW_LINE> <INDENT> core.Model.__init__(self) <NEW_LINE> self.x, self.y = pos <NEW_LINE> self.ix = conf.cloud.max_ix <NEW_LINE> self.view = view <NEW_LINE> <DEDENT> def update(self, dt): <NEW_LINE> <INDENT> core.Model.update(self, dt) <NEW_LINE... | Give me my position and my view, as I need to talk to it. I tell it when
should I die so it will know to pop an image from its list | 62598efc8a349b6b43684b9d |
class BorrowBook(Resource): <NEW_LINE> <INDENT> @jwt_required <NEW_LINE> def post(self, book_id): <NEW_LINE> <INDENT> available_book = Book.query.filter_by(book_id=book_id).first() <NEW_LINE> has_borrowed_book = Borrow.query.filter_by(book_id=book_id, user_id=get_jwt_identity()).first() <NEW_LINE> date_borrowed = datet... | This class hold function for user can borrow, return book and check history | 62598efc50812a4eaa620097 |
class Assert(_Statement, _FormalStatement): <NEW_LINE> <INDENT> def __init__(self, cond, initial=False): <NEW_LINE> <INDENT> self.cond = wrap(cond) <NEW_LINE> self.initial = initial | Assert a condition
Parameters
----------
cond : _Value(1), in
Condition
initial : bool, in
Only test the assertion on the first cycle. Defaults to false.
Ignored if the assert is not continuous.
Examples
--------
>>> a = Signal()
>>> b = Signal()
>>> c = Signal()
>>> If(c,
... Assert(a == b)
... ) | 62598efcad47b63b2c5a6173 |
class PoolExhausted(Exception): <NEW_LINE> <INDENT> pass | All connections acquired. | 62598efc5fc7496912d4771f |
class StreamTestListOutput(TestListOutputBase): <NEW_LINE> <INDENT> def output_normal_tests(self, normal_tests): <NEW_LINE> <INDENT> self._output_func("\n======================") <NEW_LINE> self._output_func("%s normal tests:" % len(normal_tests)) <NEW_LINE> self._output_func("======================") <NEW_LINE> for te... | stream output | 62598efc0fa83653e46f383c |
class ContentWidget( BrowserView ): <NEW_LINE> <INDENT> def isPayable( self ): <NEW_LINE> <INDENT> addable = filter( lambda x, s=self.context: x.providedBy(s), interfaces.PayableMarkers ) <NEW_LINE> return not not addable | Content Widget Portlet | 62598efc97e22403b3839841 |
class SMB2SrvSnapshotArray(Structure): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.fields = OrderedDict([ ('number_of_snapshots', IntField(size=4)), ('number_of_snapshots_returned', IntField(size=4)), ('snapshot_array_size', IntField(size=4)), ('snapshots', BytesField()) ]) <NEW_LINE> super(SMB2Srv... | [MS-SMB2] v53.0 2017-09-15
2.2.32.2 SRV_SNAPSHOT_ARRAY
Sent by the server in response to an SMB2IOCTLResponse for the
FSCTL_SRV_ENUMERATE_SNAPSHOTS request. | 62598efcbe383301e025213b |
class IOType(Enum): <NEW_LINE> <INDENT> LGF = 1 <NEW_LINE> GML = 2 <NEW_LINE> RDKIT = 3 <NEW_LINE> OPENBABEL = 4 <NEW_LINE> PYBEL = 5 <NEW_LINE> ITP = 6 <NEW_LINE> def get_extension(self) -> str: <NEW_LINE> <INDENT> ext = { IOType.LGF: ".lgf", IOType.GML: ".gml", IOType.ITP: ".itp", } <NEW_LINE> try: <NEW_LINE> <INDENT... | Supported I/O formats. | 62598efcbf627c535bcafdcf |
class ElementFactory(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.ElementsCache = {} <NEW_LINE> self.setup_elements_cache() <NEW_LINE> <DEDENT> def setup_elements_cache(self): <NEW_LINE> <INDENT> for mod in filter(lambda x: x.startswith('Elements.'), sys.modules): <NEW_LINE> <INDENT> for name, ob... | the element factory keeps a cache of element names and their objects
it prepares the element cache dynamically from Elements package via reflection
it doesn't need any element registration as such; as long as a class derives from
'element' class, it's in the business, and will get picked by element factory
the facto... | 62598efc92d797404e388028 |
class JsdocsReparse(sublime_plugin.TextCommand): <NEW_LINE> <INDENT> def run(self, edit): <NEW_LINE> <INDENT> tabIndex = counter() <NEW_LINE> def tabStop(m): <NEW_LINE> <INDENT> return "${%d:%s}" % (next(tabIndex), m.group(1)) <NEW_LINE> <DEDENT> v = self.view <NEW_LINE> v.run_command('clear_fields') <NEW_LINE> sel = g... | Reparse a docblock to make the fields 'active' again, so that pressing tab will jump to the next one | 62598efc23849d37ff84fa1b |
class Account: <NEW_LINE> <INDENT> instance_count = 0 <NEW_LINE> @classmethod <NEW_LINE> def increment_instance_count(cls): <NEW_LINE> <INDENT> cls.instance_count += 1 <NEW_LINE> print('Instance count = {}'.format(cls.instance_count)) <NEW_LINE> <DEDENT> def __init__(self, account_number, owner_name, balance): <NEW_LIN... | An example class to hold an account data. | 62598efc379a373c97d97955 |
class Datetime(Actor): <NEW_LINE> <INDENT> @manage() <NEW_LINE> def init(self): <NEW_LINE> <INDENT> self.setup() <NEW_LINE> <DEDENT> def did_migrate(self): <NEW_LINE> <INDENT> self.setup() <NEW_LINE> <DEDENT> def setup(self): <NEW_LINE> <INDENT> self.use('calvinsys.native.python-time', shorthand='time') <NEW_LINE> <DED... | Return a dictionary with current date and time.
The dictionary contains entries for:
century, year, month, day, hour, minute, second, timezone
Input:
trigger : any token
Output:
datetime : dictionary | 62598efcfff4ab517ebcc12e |
class Read(Statement): <NEW_LINE> <INDENT> match = re.compile(r'read\b\s*[\w(*\'"]', re.I).match <NEW_LINE> def process_item(self): <NEW_LINE> <INDENT> item = self.item <NEW_LINE> line = item.get_line()[4:].lstrip() <NEW_LINE> if line.startswith('('): <NEW_LINE> <INDENT> self.__class__ = Read0 <NEW_LINE> <DEDENT> else:... | Read0: READ ( <io-control-spec-list> ) [ <input-item-list> ]
<io-control-spec-list> = [ UNIT = ] <io-unit>
| [ FORMAT = ] <format>
| [ NML = ] <namelist-group-name>
| ADVANCE = <scalar-default-char-expr>
... | 62598efc63b5f9789fe83abb |
class ListProductsResponse(SdkResponse): <NEW_LINE> <INDENT> sensitive_list = [] <NEW_LINE> openapi_types = { 'products': 'list[ProductSummary]', 'page': 'Page' } <NEW_LINE> attribute_map = { 'products': 'products', 'page': 'page' } <NEW_LINE> def __init__(self, products=None, page=None): <NEW_LINE> <INDENT> super().__... | Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition. | 62598efc57b8e32f525075b0 |
class NoteBase(Model): <NEW_LINE> <INDENT> _validation = { 'name': {'max_length': 255, 'min_length': 0}, 'note': {'max_length': 8000, 'min_length': 0}, } <NEW_LINE> _attribute_map = { 'acl': {'key': 'Acl', 'type': 'int'}, 'name': {'key': 'Name', 'type': 'str'}, 'note': {'key': 'Note', 'type': 'str'}, } <NEW_LINE> def _... | Note Base Class.
:param acl: Gets or sets the acl.
:type acl: int
:param name: Gets or sets the name.
:type name: str
:param note: Gets or sets the note.
:type note: str | 62598efc4f6381625f19896a |
class Controller(object): <NEW_LINE> <INDENT> _log = logging.getLogger("accessibility") <NEW_LINE> class Capture(object): <NEW_LINE> <INDENT> def __init__(self, closure): <NEW_LINE> <INDENT> self.closure = closure <NEW_LINE> self.done_event = threading.Event() <NEW_LINE> self.exception = None <NEW_LINE> self.return_val... | Provides access to the AT-SPI subsystem. All accesses to this subsystem
must be run in a single thread, which is managed here. | 62598efc091ae35668703575 |
class ListFile(SolutionFile): <NEW_LINE> <INDENT> def __init__(self,place,name): <NEW_LINE> <INDENT> SolutionFile.__init__(self,place,name) <NEW_LINE> <DEDENT> def getSize(self): <NEW_LINE> <INDENT> size=-1 <NEW_LINE> l=LineReader() <NEW_LINE> self.openFile() <NEW_LINE> while l.read(self.fh): <NEW_LINE> <INDENT> try: <... | Represents a OpenFOAM file with only a list | 62598efc50812a4eaa620098 |
class RetentionPolicy(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'enabled': {'required': True}, 'days': {'required': True, 'minimum': 0}, } <NEW_LINE> _attribute_map = { 'enabled': {'key': 'enabled', 'type': 'bool'}, 'days': {'key': 'days', 'type': 'int'}, } <NEW_LINE> def __init__( self, *, enabl... | Specifies the retention policy for the log.
All required parameters must be populated in order to send to Azure.
:param enabled: Required. a value indicating whether the retention policy is enabled.
:type enabled: bool
:param days: Required. the number of days for the retention in days. A value of 0 will retain
the ... | 62598efc5fc7496912d47720 |
class Frame: <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> self.bindings = {} <NEW_LINE> self.parent = parent <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> if self.parent is None: <NEW_LINE> <INDENT> return '<Global Frame>' <NEW_LINE> <DEDENT> s = sorted(['{0}: {1}'.format(k, v) for ... | An environment frame binds Scheme symbols to Scheme values. | 62598efc97e22403b3839843 |
class MyNLLLoss(loss._Loss): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(MyNLLLoss, self).__init__() <NEW_LINE> <DEDENT> def forward(self, outputs, batch): <NEW_LINE> <INDENT> y_start = batch[-2] <NEW_LINE> y_end = batch[-1] <NEW_LINE> outputs = torch.log(outputs) <NEW_LINE> start_loss = f.nll_los... | MLE 最大似然估计 | 62598efc2c8b7c6e89bd211e |
class Pod(PodmanResource): <NEW_LINE> <INDENT> @property <NEW_LINE> def id(self): <NEW_LINE> <INDENT> return self.attrs.get("ID", self.attrs.get("Id")) <NEW_LINE> <DEDENT> @property <NEW_LINE> def name(self): <NEW_LINE> <INDENT> return self.attrs.get("Name") <NEW_LINE> <DEDENT> def kill(self, signal: Union[str, int, No... | Details and configuration for a pod managed by the Podman service. | 62598efccc40096d61619687 |
class DepDiamondPatchMid1(Package): <NEW_LINE> <INDENT> homepage = "http://www.example.com" <NEW_LINE> url = "http://www.example.com/patch-a-dependency-1.0.tar.gz" <NEW_LINE> version('1.0', '0123456789abcdef0123456789abcdef') <NEW_LINE> depends_on('patch', patches='mid1.patch') <NEW_LINE> def install(self, spec, prefix... | Package that requires a patch on a dependency
W
/ \
X Y
\ /
Z
This is package X
| 62598efc442bda511e95adbd |
class DojoInteractive(cmd.Cmd): <NEW_LINE> <INDENT> intro = colored('Starting Dojo App.....', 'green', attrs=['bold']) <NEW_LINE> prompt = colored('DOJO >>>', 'blue', attrs=['bold', 'blink']) <NEW_LINE> dojo=Dojo() <NEW_LINE> close = sys.stdout <NEW_LINE> @docopt_cmd <NEW_LINE> def do_create_room(self, args): <NEW_LINE... | dojo intractive | 62598efc3d592f4c4edb984b |
class Correlated_Trains: <NEW_LINE> <INDENT> def get_list_of_trains(self,c1,c2,frate): <NEW_LINE> <INDENT> import Parameters_Int_and_Fire <NEW_LINE> import numpy as np <NEW_LINE> import numpy.random as nr <NEW_LINE> nr.seed() <NEW_LINE> time_step_sim=Parameters_Int_and_Fire.time_step_sim <NEW_LINE> t_max=Parameters_Int... | Class for creating groups of spike trains, with
within-group correlations created by copying spikes.
These correlations are instantaneous (no jitter) and Poisson
statistics are maintained at the single train level.
Based on Romain Brette, 2008. | 62598efc009cb60464cffead |
class PacketSendRsp(ResponsePacket): <NEW_LINE> <INDENT> def __init__(self, raw_data): <NEW_LINE> <INDENT> __data = {} <NEW_LINE> __data["token"], = struct.unpack("<I", raw_data[0:4]) <NEW_LINE> super(PacketSendRsp, self).__init__("PacketSend", 0xAB, __data) | Response to a(n) PacketSend command. | 62598efca8370b77170eed41 |
class Weekly_Schedule(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.name= "Weekly" <NEW_LINE> <DEDENT> def is_pay_date(self, date): <NEW_LINE> <INDENT> return date.weekday() == 4 <NEW_LINE> <DEDENT> def get_start_date(self, date): <NEW_LINE> <INDENT> if self.is_pay_date(date): <NEW_LINE> <IN... | Payment schedule | 62598efc92d797404e388029 |
class Number(Raw): <NEW_LINE> <INDENT> num_type = float <NEW_LINE> def __init__(self, default=0.0, attribute=None, as_string=False, error=None, **kwargs): <NEW_LINE> <INDENT> self.as_string = as_string <NEW_LINE> super(Number, self).__init__(default=default, attribute=attribute, error=error, **kwargs) <NEW_LINE> <DEDEN... | Base class for number fields. | 62598efc3346ee7daa336b15 |
class MWT(object): <NEW_LINE> <INDENT> _caches = {} <NEW_LINE> _timeouts = {} <NEW_LINE> def __init__(self,timeout=2): <NEW_LINE> <INDENT> self.timeout = timeout <NEW_LINE> <DEDENT> def collect(self): <NEW_LINE> <INDENT> for func in self._caches: <NEW_LINE> <INDENT> cache = {} <NEW_LINE> for key in self._caches[func]: ... | Memoize With Timeout | 62598efc60cbc95b06362c8e |
class LineArrangements(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def node_strings_from_graph(cls, config, graph): <NEW_LINE> <INDENT> roots = sorted( GraphUtils.get_roots(graph), key=SortingUtils.str_key_func_gen( lambda n: config.info_func(n, [config.sort_key])[config.sort_key] ) ) <NEW_LINE> def node_func(... | Sort out nodes and their relationship to each other in printing. | 62598efcadb09d7d5dc08f14 |
class KSClient(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(KSClient, self).__init__() <NEW_LINE> self._ksclient = None <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return '<KSClient instance>' + super(KSClient, self).__repr__() <NEW_LINE> <DEDENT> def __call__(self, auth_ur... | Provides keystone user auth mechanism | 62598efc57b8e32f525075b1 |
class ServicesConfig(AppConfig): <NEW_LINE> <INDENT> name = 'services' | Класс, содержащий метаданные для приложения services. | 62598efc4f88993c371ef99a |
class jsonify(object): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.status_code = 200 <NEW_LINE> self.values = kwargs <NEW_LINE> <DEDENT> def init(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def json(self): <NEW_LINE> <INDENT> return json.dumps(self.values) <NEW_LINE> <DEDENT> def ... | Wrapper that represents Flask.jsonify functionality. | 62598efc3d592f4c4edb984c |
class WrappedIMAP4(UsefulIMAPMixIn, IMAP4): <NEW_LINE> <INDENT> def open(self, host = '', port = IMAP4_PORT): <NEW_LINE> <INDENT> self.host = host <NEW_LINE> self.port = port <NEW_LINE> res = socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM) <NEW_LINE> last_error = 0 <NEW_LINE> for remote in res: <NE... | Improved version of imaplib.IMAP4 that can also connect to IPv6 | 62598efc21bff66bcd7215b5 |
class NodeCollection(collection.Collection): <NEW_LINE> <INDENT> items = [Node] <NEW_LINE> @classmethod <NEW_LINE> def convert_with_links(cls, nodes, limit, **kwargs): <NEW_LINE> <INDENT> collection = NodeCollection() <NEW_LINE> collection.type = 'node' <NEW_LINE> collection.items = [Node.convert_with_links(n) for n in... | API representation of a collection of nodes. | 62598efc4428ac0f6e656eab |
class CodecVHDLRecordType(VHDLRecordType): <NEW_LINE> <INDENT> def generate_codecs_and_support_functions(self, debug=False): <NEW_LINE> <INDENT> if not debug: <NEW_LINE> <INDENT> template = RecordStdCodecTemplate() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> template = RecordDebugCodecTemplate() <NEW_LINE> <DEDENT> d... | Class derived from VHDLRecordType to provide codec generator functionality for the record type. | 62598efc851cf427c66b6c26 |
class BBox(object): <NEW_LINE> <INDENT> def __init__(self, bbox): <NEW_LINE> <INDENT> self.left = bbox[0] <NEW_LINE> self.right = bbox[1] <NEW_LINE> self.top = bbox[2] <NEW_LINE> self.bottom = bbox[3] <NEW_LINE> self.x = bbox[0] <NEW_LINE> self.y = bbox[2] <NEW_LINE> self.w = bbox[1] - bbox[0] <NEW_LINE> self.h = bbox[... | Bounding Box of face | 62598efc44b2445a339b5e1e |
class OAuth1Auth(Auth, ClientAuth): <NEW_LINE> <INDENT> requires_request_body = True <NEW_LINE> def auth_flow(self, request: Request) -> typing.Generator[Request, Response, None]: <NEW_LINE> <INDENT> url, headers, body = self.prepare( request.method, str(request.url), request.headers, request.content) <NEW_LINE> header... | Signs the httpx request using OAuth 1 (RFC5849) | 62598efcdc8b845886d51f25 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.