code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class StackStrapCLI(CommandLoader): <NEW_LINE> <INDENT> commands_to_load = (Create, Template) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.parser = argparse.ArgumentParser( description='Making development with Vagrant + Salt more awesome' ) <NEW_LINE> self.subparsers = self.parser.add_subparsers( title='comm... | The main CLI interface for StackStrap | 6259902056b00c62f0fb3742 |
class TimeCodesTreeprocessor(markdown.treeprocessors.Treeprocessor): <NEW_LINE> <INDENT> def run(self, doc): <NEW_LINE> <INDENT> fill_missing_ends(doc) | This Tree Processor adds explicit endtimes to timed sections where a
subsequent sibling element has a start time. | 62599020462c4b4f79dbc88e |
class EncoderLayerDiff(nn.Module): <NEW_LINE> <INDENT> def __init__(self, size, attr_num, self_attn_h, self_attn_g, feed_forward_h, feed_forward_g, dropout): <NEW_LINE> <INDENT> super(EncoderLayerDiff, self).__init__() <NEW_LINE> self.attr_num = attr_num <NEW_LINE> self.self_attn_h = self_attn_h <NEW_LINE> self.self_at... | Encoder is made up of self-attn and feed forward (defined below) | 62599020a8ecb033258720a3 |
class _SQLConnected(Extension): <NEW_LINE> <INDENT> arguments = [ qm.fields.TextField( name = "db_name", title = "Database name", description = "The PostgreSQL database to connect to.", verbatim = "true", default_value = ""), qm.fields.TextField( name = "db_module", title = "Database module", description = "The DB 2.0 ... | Mixin class for classes that need a database connection. | 62599020d18da76e235b788f |
class LoginCheck(object): <NEW_LINE> <INDENT> def process_request(self, request): <NEW_LINE> <INDENT> if re.search(r'^/admin/', request.path) and not re.search(r'^/admin/account', request.path): <NEW_LINE> <INDENT> if 'admin' not in request.session: <NEW_LINE> <INDENT> return HttpResponseRedirect("/admin/account") <NEW... | 检查用户是否登录 | 6259902066673b3332c31271 |
@cors_preflight('GET,OPTIONS') <NEW_LINE> @API.route('', methods=['GET', 'OPTIONS']) <NEW_LINE> class Documents(Resource): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> @TRACER.trace() <NEW_LINE> @cors.crossdomain(origin='*') <NEW_LINE> def get(): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> doc = DocumentService.fetch_... | Resource for managing the affidavit.
Separate resource is created since affidavit is accessible without authentication. | 6259902021a7993f00c66e03 |
class Summation(Process): <NEW_LINE> <INDENT> order = 2 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def set_options(self, parser): <NEW_LINE> <INDENT> parser.add_option("--sum", action="store_true", default="False", dest="sum", help="Sum of all selected nodes") <NEW_LINE> parser.add_opti... | Sum all the nodes of filtered stats | 6259902063f4b57ef00864b5 |
class InstrumentDriver(SingleConnectionInstrumentDriver): <NEW_LINE> <INDENT> def get_resource_params(self): <NEW_LINE> <INDENT> return DriverParameter.list() <NEW_LINE> <DEDENT> def _build_protocol(self): <NEW_LINE> <INDENT> self._protocol = Protocol(Prompt, NEWLINE, self._driver_event) | InstrumentDriver subclass
Subclasses SingleConnectionInstrumentDriver with connection state
machine. | 62599020d18da76e235b7890 |
class WorkflowEnabledMeta(type): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def _add_workflow(mcs, field_name, state_field, attrs): <NEW_LINE> <INDENT> attrs[field_name] = StateProperty(state_field.workflow, field_name) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def _find_workflows(mcs, attrs): <NEW_LINE> <INDENT> wo... | Base metaclass for all Workflow Enabled objects.
Defines:
- one class attribute for each the attached workflows,
- a '_workflows' attribute, a dict mapping each field_name to the related
Workflow,
- a '_xworkflows_implems' attribute, a dict mapping each field_name to a
dict of related ImplementationProperty.
-... | 62599020a8ecb033258720a5 |
class GalleryExtension(command.CommandExtension): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def defaultConfig(): <NEW_LINE> <INDENT> config = command.CommandExtension.defaultConfig() <NEW_LINE> return config <NEW_LINE> <DEDENT> def extend(self, reader, renderer): <NEW_LINE> <INDENT> self.requires(core, command, medi... | Adds commands needed to create image galleries. | 6259902021bff66bcd723aea |
class GitHub(RequestClient): <NEW_LINE> <INDENT> BASE = "https://api.github.com" <NEW_LINE> REPO = BASE + "/repos/kyb3r/modmail" <NEW_LINE> HEAD = REPO + "/git/refs/heads/master" <NEW_LINE> MERGE_URL = BASE + "/repos/{username}/modmail/merges" <NEW_LINE> FORK_URL = REPO + "/forks" <NEW_LINE> STAR_URL = BASE + "/user/st... | The client for interacting with GitHub API.
Parameters
----------
bot : Bot
The Modmail bot.
access_token : str, optional
GitHub's access token.
username : str, optional
GitHub username.
avatar_url : str, optional
URL to the avatar in GitHub.
url : str, optional
URL to the GitHub profile.
Attribut... | 625990205166f23b2e24425b |
class NoamLR(lr_scheduler._LRScheduler): <NEW_LINE> <INDENT> def __init__(self, optimizer, warmup_steps=4000): <NEW_LINE> <INDENT> self.warmup_steps = warmup_steps <NEW_LINE> super(NoamLR, self).__init__(optimizer) <NEW_LINE> <DEDENT> def scale(self, step): <NEW_LINE> <INDENT> return self.warmup_steps ** 0.5 * min(step... | Noam Learning rate schedule.
Increases the learning rate linearly for the first `warmup_steps` training steps, then decreases it proportional to
the inverse square root of the step number.
^
/ \
/ `
/ `
/ `
/ `
/ `
/... | 62599020507cdc57c63a5c2c |
class WorkplaceForm(BaseForm): <NEW_LINE> <INDENT> schema = { 'workplaces': { 'required': True, 'empty': False, 'type': 'list', 'schema': { 'required': True, 'empty': False, 'type': 'dict', 'schema': { 'id': { 'type': 'integer', 'required': False }, 'position': { 'type': 'string', 'empty': False, 'required': True }, 'r... | Workplace form class. | 62599020ac7a0e7691f73372 |
class ProviderUiManager: <NEW_LINE> <INDENT> def __init__(self, app): <NEW_LINE> <INDENT> self._app = app <NEW_LINE> self._items = {} <NEW_LINE> self.model = ProvidersModel(self._app.library, self._app) <NEW_LINE> <DEDENT> def create_item(self, name, text, symbol='♬ ', desc='', colorful_svg=None): <NEW_LINE> <INDENT> p... | (alpha) | 6259902021bff66bcd723aec |
class FileIterator(object): <NEW_LINE> <INDENT> chunk_size = 4096 <NEW_LINE> def __init__(self, filename, start, stop): <NEW_LINE> <INDENT> self.filename = filename <NEW_LINE> self.fileobj = open(self.filename, 'rb') <NEW_LINE> if start: <NEW_LINE> <INDENT> self.fileobj.seek(start) <NEW_LINE> <DEDENT> if stop is not No... | Iterate over a file.
FileIterable provides a simple file iterator, optionally allowing the
user to specify start and end ranges for the file. | 625990201d351010ab8f499f |
class DataError(Exception): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return 'Data error!' <NEW_LINE> <DEDENT> def __unicode__(self): <NEW_LINE> <INDENT> return str(self) | Base class for all data errors. | 625990205e10d32532ce404a |
class TimeGPS(TimeFromEpoch): <NEW_LINE> <INDENT> name = 'gps' <NEW_LINE> unit = 1.0 / erfa.DAYSEC <NEW_LINE> epoch_val = '1980-01-06 00:00:19' <NEW_LINE> epoch_val2 = None <NEW_LINE> epoch_scale = 'tai' <NEW_LINE> epoch_format = 'iso' | GPS time: seconds from 1980-01-06 00:00:00 UTC
For example, 630720013.0 is midnight on January 1, 2000.
Notes
=====
This implementation is strictly a representation of the number of seconds
(including leap seconds) since midnight UTC on 1980-01-06. GPS can also be
considered as a time scale which is ahead of TAI by a... | 625990206e29344779b014da |
class Model: <NEW_LINE> <INDENT> def __init__(self, sess, model_path): <NEW_LINE> <INDENT> self.model_path = model_path <NEW_LINE> self.sess = sess <NEW_LINE> self.predictor = None <NEW_LINE> self._load_model() <NEW_LINE> <DEDENT> def _load_model(self): <NEW_LINE> <INDENT> tf.saved_model.loader.load(self.sess, [tf.save... | load tensorflow pd model | 625990201d351010ab8f49a0 |
class HasReferenceCountBase(Rule): <NEW_LINE> <INDENT> labels = [ _('Reference count must be:'), _('Reference count:')] <NEW_LINE> name = 'Objects with a reference count of <count>' <NEW_LINE> description = "Matches objects with a certain reference count" <NEW_LINE> category = _('General filters') <NEW_L... | Objects with a reference count of <count>. | 6259902056b00c62f0fb374a |
@dataclass <NEW_LINE> class Topics: <NEW_LINE> <INDENT> items: List[Topic] <NEW_LINE> def node(self): <NEW_LINE> <INDENT> return create_node('topics', None, self.items, {}) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def object(node): <NEW_LINE> <INDENT> return [Topic.object(n) for n in node] | Topics layer class | 625990203eb6a72ae038b4f0 |
class BaseAdministrationTest(arrow.test.BaseTestCase): <NEW_LINE> <INDENT> credentials = ['superadmin'] <NEW_LINE> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> super(BaseAdministrationTest, cls).setUpClass() <NEW_LINE> cls.admin_client = cls.os.admin_client <NEW_LINE> <DEDENT> @classmethod <NEW_LINE... | Base test case class for all Physical Resource GUI tests. | 62599020a8ecb033258720ab |
class Blobs(Game): <NEW_LINE> <INDENT> def __init__(self, board = None): <NEW_LINE> <INDENT> self.initial = GameState(to_move='R', utility=0, board=BlobsBoard(), moves=['L','R','U','D']) <NEW_LINE> <DEDENT> def actions(self, state): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def result(self, stat... | Play Blobs on an 6 x 6 board, with Max (first player) playing the red
Blobs with marker 'R'.
A state has the player to move, a cached utility, a list of moves in
the form of the four directions (left 'L', right 'R', up 'U', and down 'D'),
and a board, in the form of a BlobsBoard object.
Marker is 'R' for the Red Player... | 62599020be8e80087fbbff02 |
class URLToken(FunctionToken): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> super(URLToken, self).__init__(value) | A token representing a URL function
Parameters
----------
value : str
The value of the url function | 62599020d164cc6175821e02 |
class IdxINDEXField(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'idxINDEX_field' <NEW_LINE> id_idxINDEX = db.Column(db.MediumInteger(9, unsigned=True), db.ForeignKey(IdxINDEX.id), primary_key=True) <NEW_LINE> id_field = db.Column(db.MediumInteger(9, unsigned=True), db.ForeignKey(Field.id), primary_key=True) <NEW_LIN... | Represent a IdxINDEXField record. | 6259902056b00c62f0fb374c |
class DateRangeDialog(BasicDialog): <NEW_LINE> <INDENT> title = _(u'Select a date range') <NEW_LINE> size = (-1, -1) <NEW_LINE> def __init__(self, title=None, header_text=None): <NEW_LINE> <INDENT> title = title or self.title <NEW_LINE> header_text = '<b>%s</b>' % header_text if header_text else '' <NEW_LINE> BasicDial... | A simple dialog for selecting a date range
When confirmed, a :class:`date_range` object will be returned
containig the information about the date range selected | 625990206fece00bbaccc846 |
class InviteCodeList(db.Model): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True, autoincrement=True) <NEW_LINE> inviteCode = db.Column(db.String(50), index=True, nullable=False, unique=True) <NEW_LINE> codestatus = db.Column(db.Boolean, nullable=False) <NEW_LINE> def __init__(self, inviteCode, codestatu... | 邀请码表 | 62599020d18da76e235b7894 |
class TestProductController(BaseTestCase): <NEW_LINE> <INDENT> def test_delete_product(self): <NEW_LINE> <INDENT> response = self.client.open( '/omogollo2/ServerAPI/1.0.0/product/{productId}'.format(product_id=56), method='DELETE') <NEW_LINE> self.assert200(response, 'Response body is : ' + response.data.decode('utf-8'... | ProductController integration test stubs | 625990201d351010ab8f49a4 |
class Meta: <NEW_LINE> <INDENT> model = Area <NEW_LINE> fields = ('id', 'name', 'area_type', 'area_type_display', 'northern_extent', 'mpoly') | Class opts. | 62599020c432627299fa3e7f |
class Player: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.name = "nameless" <NEW_LINE> self.position = 1 <NEW_LINE> <DEDENT> def setName(self, newval): <NEW_LINE> <INDENT> self.name = newval <NEW_LINE> <DEDENT> def toString(self): <NEW_LINE> <INDENT> info = self.name + "is on square number " + str(... | A class to represent a player in a board game | 6259902066673b3332c3127b |
class DailySummary(Link): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> Link.__init__(self, kwargs.pop('name', 'DailySummary')) <NEW_LINE> self._process_kwargs(kwargs, read_key=None, store_key=None, feature_cols=[], new_date_col='date', datetime_col=None, partitionby_cols=[]) <NEW_LINE> self.che... | Creates daily summary information from a timeseries dataframe.
Each feature given from the input df will by default correspond to 6 columns
in the output: min, mean, max, stddev, count, and sum. The columns are named
like 'feature_stddev_0d' (0d since we look 0 days back into the past).
The new dataframe will also co... | 62599020d164cc6175821e05 |
class TestUserGetInfo(MediaFireApiTestCaseWithSessionToken): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(TestUserGetInfo, self).setUp() <NEW_LINE> self.url = self.build_url('user/get_info') <NEW_LINE> <DEDENT> @responses.activate <NEW_LINE> def test_response(self): <NEW_LINE> <INDENT> body = self.loa... | Tests for user/get_info | 62599020796e427e5384f60e |
class SessionReceiveCountResponse: <NEW_LINE> <INDENT> def __init__(self, name: str, result: bool, message: str, count: int): <NEW_LINE> <INDENT> self.type = "session_receive_count_response" <NEW_LINE> self.name = name <NEW_LINE> self.result = result <NEW_LINE> self.message = message <NEW_LINE> self.count = count <NEW_... | Return count of server's received messages. | 62599020a8ecb033258720af |
class Manager: <NEW_LINE> <INDENT> def __init__(self, content, fileOut): <NEW_LINE> <INDENT> self.content = content <NEW_LINE> self.fileOut = open(fileOut, "w") <NEW_LINE> self.parse() <NEW_LINE> self.fileOut.write(self.markup) <NEW_LINE> self.fileOut.close() <NEW_LINE> <DEDENT> def parse(self): <NEW_LINE> <INDENT> sel... | Abstract class for LaTeX document classes | 625990201d351010ab8f49a6 |
class ProductionConfig(Config): <NEW_LINE> <INDENT> DATABASE = '' <NEW_LINE> DEBUG = False <NEW_LINE> TESTING = False <NEW_LINE> ENVIRONMENT = 'production' <NEW_LINE> HOST = '' <NEW_LINE> USER = '' <NEW_LINE> PASSWORD = '' | Configurations for Production. | 62599020507cdc57c63a5c36 |
class NotASpecDataFile(Exception): <NEW_LINE> <INDENT> pass | content of file is not SPEC data (first line must start with ``#F``) | 62599020d164cc6175821e09 |
class Perceptron(object): <NEW_LINE> <INDENT> def __init__(self, eta=0.01, n_iter=10): <NEW_LINE> <INDENT> self.eta = eta <NEW_LINE> self.n_iter = n_iter <NEW_LINE> <DEDENT> def fit(self, X, y): <NEW_LINE> <INDENT> self.w_ = np.zeros(1 + X.shape[1]) <NEW_LINE> self.errors_ = [] <NEW_LINE> for _ in range(self.n_iter): <... | Perceptron classifier.
Parameters
------------
eta : float
Learning rate (between 0.0 and 1.0)
n_iter : int
Passes over the training dataset
Attributes
-----------
w_ : 1d-array
Weights after fitting
errors_ : list
Number of misclassifications in every epoch | 62599020287bf620b6272a7f |
class ParseWith(ParseLilyPond): <NEW_LINE> <INDENT> items = ( CloseBracket, ContextName, GrobName, ContextProperty, EqualSign, DotPath, ) + toplevel_base_items | Parses the expression after ``\with {``, leaving at ``}`` | 62599020507cdc57c63a5c38 |
class MultiLine(Unicode): <NEW_LINE> <INDENT> __type_name__ = None <NEW_LINE> class Attributes(Unicode.Attributes): <NEW_LINE> <INDENT> dim = None <NEW_LINE> <DEDENT> def __new__(cls, dim=None, **kwargs): <NEW_LINE> <INDENT> assert dim in (None,2,3) <NEW_LINE> if dim is not None: <NEW_LINE> <INDENT> kwargs['dim'] = dim... | A Multipolygon type whose native format is a WKT string. You can use
:func:`shapely.wkt.loads` to get a proper multipolygon type. | 625990203eb6a72ae038b4f8 |
class OrgTeacherView(View): <NEW_LINE> <INDENT> def get(self, request, org_id): <NEW_LINE> <INDENT> current_page = 'teacher' <NEW_LINE> course_org = CourseOrg.objects.get(id=int(org_id)) <NEW_LINE> all_teachers = course_org.teacher_set.all() <NEW_LINE> has_fav = False <NEW_LINE> if request.user.is_authenticated(): <NEW... | 机构教师 | 62599020ac7a0e7691f7337e |
class AllocateShareBandwidthResponseSchema(schema.ResponseSchema): <NEW_LINE> <INDENT> fields = { "ShareBandwidthId": fields.Str( required=False, load_from="ShareBandwidthId" ), } | AllocateShareBandwidth - 开通共享带宽 | 62599020796e427e5384f612 |
class DuplicateZoneError(Exception): <NEW_LINE> <INDENT> pass | Duplicate zone error.
Thrown whenever an attempt to create a zone fails because a zone with the
same domain already exists. | 62599020a8ecb033258720b3 |
class CreateUser(graphene.Mutation): <NEW_LINE> <INDENT> class Arguments: <NEW_LINE> <INDENT> email = graphene.String(required=True) <NEW_LINE> location = graphene.String(required=False) <NEW_LINE> name = graphene.String(required=True) <NEW_LINE> picture = graphene.String() <NEW_LINE> <DEDENT> user = graphene.Field(Use... | Mutation to create a user | 62599020462c4b4f79dbc89e |
class Table(object): <NEW_LINE> <INDENT> def __init__(self, seats, sb_amount, bb_amount, buy_in, ante=0): <NEW_LINE> <INDENT> self.seats = {} <NEW_LINE> self._build_seats(seats) <NEW_LINE> self.sb_amount = sb_amount <NEW_LINE> self.bb_amount = bb_amount <NEW_LINE> self.ante = ante <NEW_LINE> self.buy_in = buy_in <NEW_L... | Table holds the intermediate data needed for the app to drive the game
ATTRIBUTES:
@property {dict} seats A dict of Player obj representing seat order
@property {int} sb_amount The small blind amount
@property {int} bb_amount The big blind amount
@property {int} ante The ante amount
@property {lis... | 625990201d351010ab8f49aa |
class TrueFalseQuestion(Persistable): <NEW_LINE> <INDENT> def __init__(self, idevice, question="", isCorrect=False, feedback="", hint=""): <NEW_LINE> <INDENT> self.idevice = idevice <NEW_LINE> self.questionTextArea = TextAreaField(x_(u'Question:'), self.idevice.questionInstruc, question) <NEW_LINE> self.questionTextAre... | A TrueFalse iDevice is built up of questions. Each question can
be rendered as an XHTML element | 62599020bf627c535bcb2349 |
class Returns(CustomFactor): <NEW_LINE> <INDENT> inputs = [USEquityPricing.close] <NEW_LINE> def compute(self, today, assets, out, close): <NEW_LINE> <INDENT> out[:] = (close[-1] - close[0]) / close[0] | Calculates the percent change in close price over the given window_length.
**Default Inputs**: [USEquityPricing.close] | 6259902021bff66bcd723af8 |
class Ogr2OgrExecOutput(ExecOutput): <NEW_LINE> <INDENT> @Config(ptype=str, default=None, required=True) <NEW_LINE> def dest_data_source(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @Config(ptype=str, default=None, required=False) <NEW_LINE> def dest_format(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @Co... | Executes an Ogr2Ogr command.
Input is a file name to be processed.
Output by calling Ogr2Ogr command.
consumes=FORMAT.string | 625990208c3a8732951f73ed |
class Dish(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'dish' <NEW_LINE> id = db.Column(db.Integer, primary_key=True, autoincrement=True) <NEW_LINE> name = db.Column(db.String, nullable=False, unique=True) <NEW_LINE> description = db.Column(db.String, nullable=False, unique=True) <NEW_LINE> portion_count = db.Column... | Табличка блюда | 62599020ac7a0e7691f73380 |
class Singleton: <NEW_LINE> <INDENT> def __init__(self, decorated): <NEW_LINE> <INDENT> self._decorated = decorated <NEW_LINE> <DEDENT> def Instance(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return self._instance <NEW_LINE> <DEDENT> except AttributeError: <NEW_LINE> <INDENT> self._instance = self._decorated()... | A non-thread-safe helper class to ease implementing singletons.
This should be used as a decorator -- not a metaclass -- to the
class that should be a singleton.
The decorated class can define one `__init__` function that
takes only the `self` argument. Other than that, there are
no restrictions that apply to the deco... | 625990206e29344779b014e6 |
class WebSocketClientDakara(WebSocketClient): <NEW_LINE> <INDENT> def set_default_callbacks(self): <NEW_LINE> <INDENT> self.set_callback("idle", lambda: None) <NEW_LINE> self.set_callback("playlist_entry", lambda playlist_entry: None) <NEW_LINE> self.set_callback("command", lambda command: None) <NEW_LINE> self.set_cal... | WebSocket client connected to the Dakara server.
Example of use:
>>> config = {
... "address": "www.example.com",
... "port": 8080,
... "login": "player",
... "password": "pass"
... }
>>> http_client = HTTPClientDakara(
... config,
... enpoint_prefix="api/",
... )
>>> http_client.authenticate(... | 62599020796e427e5384f614 |
class Cloud(object): <NEW_LINE> <INDENT> def __init__(self, name, endpoints=None, suffixes=None, is_active=False): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.endpoints = endpoints or CloudEndpoints() <NEW_LINE> self.suffixes = suffixes or CloudSuffixes() <NEW_LINE> self.is_active = is_active | Represents an Azure Cloud instance | 62599020462c4b4f79dbc8a0 |
class DeferredDelete(extensions.V3APIExtensionBase): <NEW_LINE> <INDENT> name = "DeferredDelete" <NEW_LINE> alias = "os-deferred-delete" <NEW_LINE> namespace = ("http://docs.openstack.org/compute/ext/" "deferred-delete/api/v3") <NEW_LINE> version = 1 <NEW_LINE> def get_controller_extensions(self): <NEW_LINE> <INDENT> c... | Instance deferred delete. | 625990201d351010ab8f49ac |
class Super(Term): <NEW_LINE> <INDENT> def __init__(self, latex, index): <NEW_LINE> <INDENT> self.__latex = latex <NEW_LINE> self.__index = index <NEW_LINE> <DEDENT> def latex(self): <NEW_LINE> <INDENT> return self.__latex + "^{{ {0} }}".format(self.__index) <NEW_LINE> <DEDENT> def copy(self): <NEW_LINE> <INDENT> retur... | Super is a term with a four-vector superscript.
| 62599020c432627299fa3e87 |
class ProjectsFeedAdapter(BaseFeedAdapter): <NEW_LINE> <INDENT> implements(IFeedData) <NEW_LINE> adapts(IAddProject) <NEW_LINE> @property <NEW_LINE> def items(self, n_items=10): <NEW_LINE> <INDENT> if hasattr(self,'_items'): <NEW_LINE> <INDENT> return self._items <NEW_LINE> <DEDENT> cat = getToolByName(self.context, 'p... | feed for new projects | 625990211d351010ab8f49ad |
class ScatterPlotNode(BaseNode): <NEW_LINE> <INDENT> figure_number = 0 <NEW_LINE> def __init__(self, plot_ms, channels = None, **kwargs): <NEW_LINE> <INDENT> super(ScatterPlotNode, self).__init__(**kwargs) <NEW_LINE> self.set_permanent_attributes( plot_ms = plot_ms, channels = channels, number_of_channels = None, color... | Creates a scatter plot of the given channels for the given point in time
This node creates scatter_plot of the values of all vs. all specified
channels for the given point in time (plot_ms).
Parameters
* *plot_ms* : The point of time, for which the scatter plots are drawn.
For instance, if plot_ms =... | 62599021287bf620b6272a84 |
class NegativeMeanDistance: <NEW_LINE> <INDENT> def __init__(self, nneighbours=None, metric="euclidean"): <NEW_LINE> <INDENT> self.metric = metric <NEW_LINE> self.nneighbours = nneighbours <NEW_LINE> <DEDENT> def fit(self, X): <NEW_LINE> <INDENT> self.X = X <NEW_LINE> if self.nneighbours is not None: <NEW_LINE> <INDENT... | A helper class which behaves like KDE, but models "density" as
negative mean distance. Distance behaves slightly differently to a
kernel: a so-called linear kernel is only linear within the
bandwidth, but goes non-linearly to zero outside. We use negative
distance to preserve the sense, ie lower numbers are more
anomal... | 62599021925a0f43d25e8edc |
class OutOfRange(PlaidMLError): <NEW_LINE> <INDENT> pass | A call parameter is out of the range accepted by the implementation. | 625990213eb6a72ae038b4fe |
class BaseModel(object): <NEW_LINE> <INDENT> def __init__(self, database): <NEW_LINE> <INDENT> self.__context = app.app_context() <NEW_LINE> self.__collection = None <NEW_LINE> self.structure = None <NEW_LINE> self.database = database <NEW_LINE> <DEDENT> @property <NEW_LINE> def collection(self): <NEW_LINE> <INDENT> if... | Base model for mongodb collections. This is the structure to
continue other models. | 62599021462c4b4f79dbc8a4 |
class List(base_classes.ZonalLister): <NEW_LINE> <INDENT> @property <NEW_LINE> def service(self): <NEW_LINE> <INDENT> return self.context['compute'].disks <NEW_LINE> <DEDENT> @property <NEW_LINE> def resource_type(self): <NEW_LINE> <INDENT> return 'disks' | List Google Compute Engine persistent disks. | 62599021c432627299fa3e8b |
class Action(UnrecognizedHappening): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> assert 'agent' in dir(self) | A direct action taken by a player.
Attributes
----------
agent : :class:`~aionationstates.Nation`
The player who took the action. | 62599021d164cc6175821e11 |
class MygeneSourceHandler(MetadataSourceHandler): <NEW_LINE> <INDENT> def extras(self, _meta): <NEW_LINE> <INDENT> _meta['taxonomy'] = {} <NEW_LINE> _meta['genome_assembly'] = {} <NEW_LINE> for s, d in self.biothings.config.TAXONOMY.items(): <NEW_LINE> <INDENT> if 'tax_id' in d: <NEW_LINE> <INDENT> _meta['taxonomy'][s]... | GET /metadata
GET /v3/metadata
{
"biothing_type": "gene",
"build_date": "2020-03-29T04:00:00.012426",
"build_version": "20200329",
"genome_assembly": {
"human": "hg38",
"mouse": "mm10",
...
},
"src": { ... }, // 28 items
"stats": {
"total": 36232158,
... | 62599021925a0f43d25e8ee0 |
class Line(object): <NEW_LINE> <INDENT> def __init__(self, p1, p2): <NEW_LINE> <INDENT> if p1 == p2: <NEW_LINE> <INDENT> raise ValueError("Line needs two distinct points") <NEW_LINE> <DEDENT> self.p1 = p1 <NEW_LINE> self.p2 = p2 <NEW_LINE> self.vector = p2 - p1 <NEW_LINE> self.length = self.p1.distance(self.p2) <NEW_LI... | A straight line in 2D between two points.
Args:
p1 (skymap.geometry.Point): the first point
p2 (skymap.geometry.Point): the second point | 625990215166f23b2e24426f |
@ddt.ddt <NEW_LINE> class VolumeTypePolicyTest(base.BasePolicyTest): <NEW_LINE> <INDENT> authorized_readers = [ 'legacy_admin', 'legacy_owner', 'system_admin', 'project_admin', 'project_member', 'project_reader', 'project_foo', 'system_member', 'system_reader', 'system_foo', 'other_project_member', 'other_project_reade... | Verify default policy settings for the types API | 62599021d18da76e235b789b |
class Link(Link_ToGFA2, GFA1_ToGFA2, Link_References, Equivalence, Complement, Canonical, Other, GFA1_AlignmentType, OrientedSegments, GFA1_References, AlignmentType, FromTo, Edge): <NEW_LINE> <INDENT> RECORD_TYPE = "L" <NEW_LINE> POSFIELDS = ["from_segment", "from_orient", "to_segment", "to_orient", "overlap"] <... | A link line (L) of a GFA1 file.
Note:
from_segment and to_segment are used instead of from/to
as from is not a valid method name in Python and "to" alone
potentially clashes with the tag namespace. | 625990219b70327d1c57fc1d |
class TestTokeniser(unittest.TestCase): <NEW_LINE> <INDENT> def testComplexExpression(self): <NEW_LINE> <INDENT> t = list(tree_parse.tokeniser("(+ (- 2 3) (a))")) <NEW_LINE> x = ['(','+','(','-','2','3',')','(','a',')',')'] <NEW_LINE> self.assertEqual(x, t) <NEW_LINE> <DEDENT> def testSimpleExpression(self): <NEW_LINE>... | Test the functioning of the tokeniser | 62599021796e427e5384f61a |
class NewProjectAction(ProjectAction): <NEW_LINE> <INDENT> uol = 'envisage.ui.single_project.ui_service.UiService' <NEW_LINE> method_name = 'create' <NEW_LINE> description = 'Create a project' <NEW_LINE> image = ImageResource('new_project') <NEW_LINE> name = 'New...' <NEW_LINE> tooltip = 'Create a project' | An action that creates a new project. | 62599021d164cc6175821e12 |
class FederalDeputyTermDTO: <NEW_LINE> <INDENT> def __init__(self, id, personId, state, initialDate, finalDate=None): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.personId = personId <NEW_LINE> self.state = state <NEW_LINE> self.initialDate = initialDate <NEW_LINE> self.finalDate = finalDate | Class used to store and transfer the data of a term of Federal Deputy | 62599021d164cc6175821e13 |
class GetTags(Choreography): <NEW_LINE> <INDENT> def __init__(self, temboo_session): <NEW_LINE> <INDENT> Choreography.__init__(self, temboo_session, '/Library/LastFm/Album/GetTags') <NEW_LINE> <DEDENT> def new_input_set(self): <NEW_LINE> <INDENT> return GetTagsInputSet() <NEW_LINE> <DEDENT> def _make_result_set(self, r... | Create a new instance of the GetTags Choreography. A TembooSession object, containing a valid
set of Temboo credentials, must be supplied. | 625990215166f23b2e244271 |
class AddComment_form(FlaskForm): <NEW_LINE> <INDENT> body = TextAreaField(label='Текст комментария', validators=[ Length(min=10, max=5000, message='Комментарий не должен быть меньше 10 и больше 5000 символов')]) | Форма добавления комментария. | 62599021d18da76e235b789c |
class TestCraftingShovel(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.i = Workbench() <NEW_LINE> <DEDENT> def test_check_crafting(self): <NEW_LINE> <INDENT> self.i.crafting[0] = Slot(bravo.blocks.blocks["cobblestone"].slot, 0, 1) <NEW_LINE> self.i.crafting[3] = Slot(bravo.blocks.ite... | Test basic crafting functionality.
Assumes that the basic shovel recipe is present and enabled. This recipe
was chosen because shovels broke at one point and we couldn't figure out
why. | 625990216e29344779b014ef |
class ConstantIndexed(Indexed, Constant): <NEW_LINE> <INDENT> def __new__(cls, label, indices, **kwargs): <NEW_LINE> <INDENT> base = IndexedBase(label) <NEW_LINE> if isinstance(indices, list): <NEW_LINE> <INDENT> for i in indices: <NEW_LINE> <INDENT> if not isinstance(i, Idx): <NEW_LINE> <INDENT> raise ValueError("The ... | An indexed object represented by an array of constants.
:param str label: Name of the ConstantIndexed.
:param list indices: Indices of the ConstantIndexed. (See: Sympy Indexed class). | 6259902156b00c62f0fb375e |
@interface <NEW_LINE> class RubricAPI: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get( id: Optional[UUID] = None, user: Optional[UUID] = None, object: Optional[UUID] = None, timestamp: Optional[Timestamp] = None, skip: Optional[int] = None, limit: Optional[int] = None, ) -> HTTPResponse[List[RubricModel]]: <NEW_L... | swagger: '2.0'
info:
title: FAIRshakeRubric
version: 1.0.0
description: A generic FAIRshake Rubric REST API for storing questions to be answered.
contact:
email: daniel.clarke@mssm.edu
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
schemes:
- https
securityDefinitio... | 62599021507cdc57c63a5c44 |
class DjangoAppNamePrompt(StringTemplatePrompt): <NEW_LINE> <INDENT> PARAMETER = 'django_app_name' <NEW_LINE> MESSAGE = '{} Enter a Django app name or leave blank to use' <NEW_LINE> DEFAULT_VALUE = 'home' <NEW_LINE> def _validate(self, s: str): <NEW_LINE> <INDENT> if not s.isidentifier(): <NEW_LINE> <INDENT> raise Valu... | Allow the user to enter a Django project name. | 6259902121a7993f00c66e1c |
class MyClass(C, B): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> if direct[0]: <NEW_LINE> <INDENT> C.__init__(self) <NEW_LINE> B.__init__(self) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> super(MyClass, self).__init__() <NEW_LINE> <DEDENT> <DEDENT> def do_something(self): <NEW_LINE> <INDENT> print("Do... | A class that you write. | 62599021d164cc6175821e16 |
class BipedNeckPuppet(object): <NEW_LINE> <INDENT> def __init__(self, side = None, name = [None, None, None], position = [[0, 20, 0], [0, 21, 0], [0, 22, 0]]): <NEW_LINE> <INDENT> self.__create(side = side, name = name, position = position) <NEW_LINE> <DEDENT> def reload_modules(self): <NEW_LINE> <INDENT> reload(jointC... | this is the biped neck puppet class, which will be used to create a real biped neck | 62599021507cdc57c63a5c46 |
class StatementExtension(object): <NEW_LINE> <INDENT> def __init__(self, original_iterators=None, expr=None): <NEW_LINE> <INDENT> self.original_iterators = original_iterators <NEW_LINE> self.expr = expr <NEW_LINE> <DEDENT> def get_number_original_iterators(self): <NEW_LINE> <INDENT> if self.original_iterators is not No... | Represents an Extension within a Statement
Attributes:
- original_iterators : List of original iterators
- expr : Statement body expression | 62599021d164cc6175821e17 |
@tf_export("RandomShuffleQueue") <NEW_LINE> class RandomShuffleQueue(QueueBase): <NEW_LINE> <INDENT> def __init__(self, capacity, min_after_dequeue, dtypes, shapes=None, names=None, seed=None, shared_name=None, name="random_shuffle_queue"): <NEW_LINE> <INDENT> dtypes = _as_type_list(dtypes) <NEW_LINE> shapes = _as_shap... | A queue implementation that dequeues elements in a random order.
See @{tf.QueueBase} for a description of the methods on
this class.
@compatibility(eager)
Queues are not compatible with eager execution. Instead, please
use `tf.data` to get data into your model.
@end_compatibility | 62599021925a0f43d25e8ee6 |
class ShortHeader(exception.FormError): <NEW_LINE> <INDENT> pass | The DNS packet passed to from_wire() is too short. | 62599021d18da76e235b789e |
class TrainAI: <NEW_LINE> <INDENT> def __init__(self, state_shape, replay_size=10000, ai=None, verbose=False ): <NEW_LINE> <INDENT> self.state_shape = state_shape <NEW_LINE> self.verbose = verbose <NEW_LINE> if ai is None: <NEW_LINE> <INDENT> self.ai = QAI( state_shape=self.state_shape, output_dim=5, verbose=self.verbo... | Train AI model process | 62599021796e427e5384f621 |
class OutputFiles(Enum): <NEW_LINE> <INDENT> CONFIGS = "configs" <NEW_LINE> LOGS = "logs" <NEW_LINE> RESULTS = "results" <NEW_LINE> TEMPORARY = "temporary" | Output file types.
Args:
CONFIGS: Configuration files.
LOGS: Log files.
RESULTS: Result files.
TEMPORARY: Temporary files.
Attributes:
CONFIGS: Configuration files.
LOGS: Log files.
RESULTS: Result files.
TEMPORARY: Temporary files. | 62599021d164cc6175821e19 |
class PoissonDiagnostic(CountDiagnostic): <NEW_LINE> <INDENT> def _init__(self, results): <NEW_LINE> <INDENT> self.results = results <NEW_LINE> <DEDENT> def test_dispersion(self): <NEW_LINE> <INDENT> res = dispersion_poisson(self.results) <NEW_LINE> return res <NEW_LINE> <DEDENT> def test_poisson_zeroinflation(self, me... | Diagnostic and specification tests and plots for Poisson model
status: experimental
Parameters
----------
results : PoissonResults instance | 625990215166f23b2e244277 |
class SqlScriptContent(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'query': {'required': True}, 'current_connection': {'required': True}, } <NEW_LINE> _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, 'query': {'key': 'query', 'type': 'str'}, 'current_connection': {'key':... | The content of the SQL script.
All required parameters must be populated in order to send to Azure.
:param additional_properties: Unmatched properties from the message are deserialized to this
collection.
:type additional_properties: dict[str, object]
:param query: Required. SQL query to execute.
:type query: str
:p... | 62599021d18da76e235b789f |
class Qualifier: <NEW_LINE> <INDENT> def __init__(self, key="", value=""): <NEW_LINE> <INDENT> self.key = key <NEW_LINE> self.value = value <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "Qualifier(key=%r, value=%r)" % (self.key, self.value) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT>... | Hold information about a qualifier in a GenBank feature.
Attributes:
- key - The key name of the qualifier (ie. /organism=)
- value - The value of the qualifier ("Dictyostelium discoideum"). | 625990213eb6a72ae038b508 |
class Widget(CountableWidget): <NEW_LINE> <INDENT> widget_type = 'checkbox' <NEW_LINE> widget_label = _('Checkboxes') <NEW_LINE> groups = ( DefaultSchemata, LayoutSchemata, CountableSchemata, DisplaySchemata ) <NEW_LINE> index = ViewPageTemplateFile('widget.pt') <NEW_LINE> @property <NEW_LINE> def css_class(self): <NEW... | Widget
| 6259902163f4b57ef00864c4 |
class AssetsAnnotationTagsService(base_api.BaseApiService): <NEW_LINE> <INDENT> _NAME = u'assets_annotationTags' <NEW_LINE> def __init__(self, client): <NEW_LINE> <INDENT> super(CategorymanagerV1alpha2.AssetsAnnotationTagsService, self).__init__(client) <NEW_LINE> self._upload_configs = { } <NEW_LINE> <DEDENT> def List... | Service class for the assets_annotationTags resource. | 62599021be8e80087fbbff1a |
class TriggerElem: <NEW_LINE> <INDENT> def __init__(self, parent, elem, schedule): <NEW_LINE> <INDENT> self.parent = parent <NEW_LINE> self.elem = elem <NEW_LINE> self.schedule = schedule <NEW_LINE> <DEDENT> def eval(self): <NEW_LINE> <INDENT> import interface as i <NEW_LINE> LayerStateType = i.control.scan.LayerStateT... | Handles individual trigger elements and how to interface with libkiibohd | 62599021ac7a0e7691f7338e |
class Observation(object): <NEW_LINE> <INDENT> def __init__(self, value, weight=1.0): <NEW_LINE> <INDENT> self.value = float(value) <NEW_LINE> self.weight = float(weight) <NEW_LINE> <DEDENT> def __hash__(self): <NEW_LINE> <INDENT> return 37 * hash(self.value) + hash(self.weight) <NEW_LINE> <DEDENT> def __eq__(self, oth... | An observation has a weight and a value, representing a data element in a partition. A partition is a collection
of observations | 625990215e10d32532ce4057 |
class PrintableEnum(Enum): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return self.value <NEW_LINE> <DEDENT> def untype(self): <NEW_LINE> <INDENT> return self.value | Allows for easier formatting when substituting for parameters. | 62599021796e427e5384f623 |
class ComplementaryDomain( Domain): <NEW_LINE> <INDENT> def __init__(self, complemented_domain ): <NEW_LINE> <INDENT> self._object_type = 'domain' <NEW_LINE> self._complement = complemented_domain <NEW_LINE> <DEDENT> @property <NEW_LINE> def id(self): <NEW_LINE> <INDENT> return self._complement.id <NEW_LINE> <DEDENT> @... | Represents a complemented domain. Note that this is always
defined in terms of an original domain and does not have the same
data members, instead providing an interface to the complementary
members. | 62599021a8ecb033258720c3 |
class StorageAccountCheckNameAvailabilityParameters(Model): <NEW_LINE> <INDENT> _validation = { 'name': {'required': True}, } <NEW_LINE> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, } <NEW_LINE> def __init__(self, name, type="Microsoft.Storage/storageAccounts"): <NE... | The parameters used to check the availabity of the storage account name.
:param name:
:type name: str
:param type: Default value: "Microsoft.Storage/storageAccounts" .
:type type: str | 625990218c3a8732951f73fe |
class Visualize: <NEW_LINE> <INDENT> def __init__(self,mid,output_path): <NEW_LINE> <INDENT> conn = pymongo.MongoClient('13.209.73.233', 27017) <NEW_LINE> db = conn.get_database('test') <NEW_LINE> self.collection = db.get_collection('meets') <NEW_LINE> self.oid = ObjectId(mid) <NEW_LINE> result = self.collection.find({... | - mode_path : stored model path
- output_path : observation path
- vector_size : Vector size applied during learning | 6259902156b00c62f0fb3766 |
class Researcher(models.Model): <NEW_LINE> <INDENT> person = models.OneToOneField(Person, on_delete=models.CASCADE) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return '%s - %s' % (self.person.__str__(), self.person.user.__str__()) | Researcher class represents a model/relationship for the database.
It contains all the persons who are researchers, it is a one to one
relationship with the Person's relationship. | 625990215e10d32532ce4059 |
class UserProfilePage(object): <NEW_LINE> <INDENT> def get_profile_page_url(self, user): <NEW_LINE> <INDENT> groups = [g.name for g in user.groups.all()] <NEW_LINE> page_url = reverse('home') <NEW_LINE> if 'employee' in groups: <NEW_LINE> <INDENT> page_url = reverse('home') <NEW_LINE> <DEDENT> elif 'employee_manager' i... | @summary: To get user profile page url by their group | 625990219b70327d1c57fc29 |
class EmbeddingNN(nn.Module): <NEW_LINE> <INDENT> def __init__(self, voc_size, emb_size=300, init_with=None): <NEW_LINE> <INDENT> super(EmbeddingNN, self).__init__() <NEW_LINE> padding_idx = 0 <NEW_LINE> self.voc_size = voc_size <NEW_LINE> self.emb_size = emb_size <NEW_LINE> self.iembeddings = nn.Embedding(self.voc_siz... | single hidden layer embedding model | 62599021ac7a0e7691f73394 |
class Tracker: <NEW_LINE> <INDENT> def __init__(self, return_images=True, lookup_tail_size=80, labels=None): <NEW_LINE> <INDENT> self.return_images = return_images <NEW_LINE> self.frame_index = 0 <NEW_LINE> self.labels = labels <NEW_LINE> self.detection_history = [] <NEW_LINE> self.last_detected = {} <NEW_LINE> self.tr... | Generate detections and build tracklets. | 625990211d351010ab8f49c0 |
class HeadTail(object): <NEW_LINE> <INDENT> def __init__(self, file, max_capture=510): <NEW_LINE> <INDENT> self.file = file <NEW_LINE> self.max_capture = max_capture <NEW_LINE> self.capture_head = '' <NEW_LINE> self.capture_head_len = 0 <NEW_LINE> self.capture_tail = '' <NEW_LINE> <DEDENT> def write(self, data): <NEW_L... | Capture first part of file write and discard remainder | 62599021c432627299fa3e9b |
class GetTeamList(REST): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(GetTeamList, self).__init__('getteamlist.do', 3.0, **kwargs) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def get(self, **args): <NEW_LINE> <INDENT> return self().GET(args, format='text') | class: veracode.API.admin.GetTeamList
params: dynamic, see veracode.SDK.admin.GetTeamList for more info
returns: XML data from veracode API | 62599021bf627c535bcb235f |
class LoggingProjectsSinksCreateRequest(_messages.Message): <NEW_LINE> <INDENT> logSink = _messages.MessageField('LogSink', 1) <NEW_LINE> projectsId = _messages.StringField(2, required=True) | A LoggingProjectsSinksCreateRequest object.
Fields:
logSink: A LogSink resource to be passed as the request body.
projectsId: Part of `projectName`. The resource name of the project to
which the sink is bound. | 62599021796e427e5384f629 |
class LocalStBlockListManager(BlockListManager): <NEW_LINE> <INDENT> def __init__(self, root_dm: "LocalStorageManager"): <NEW_LINE> <INDENT> self._root_dm = root_dm <NEW_LINE> <DEDENT> def contains(self, _id: str) -> bool: <NEW_LINE> <INDENT> bl = self._root_dm.get_data()["notebooks"].get(_id) <NEW_LINE> if bl is None:... | Local Storage block list manager. | 625990219b70327d1c57fc2b |
class GzipHandler(urllib2.BaseHandler): <NEW_LINE> <INDENT> def http_request(self, request): <NEW_LINE> <INDENT> request.add_header("Accept-Encoding", "gzip, deflate") <NEW_LINE> return request <NEW_LINE> <DEDENT> https_request = http_request <NEW_LINE> def http_response(self, request, response): <NEW_LINE> <INDENT> ne... | A handler that enhances urllib2's capabilities with transparent gzipped
data handling support. | 625990213eb6a72ae038b510 |
class AlbumRow(Row): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._builder = Gtk.Builder() <NEW_LINE> self._builder.add_from_resource('/org/gnome/Lollypop/AlbumRow.ui') <NEW_LINE> self._builder.connect_signals(self) <NEW_LINE> self._cover = self._builder.get_object('cover') <NEW_LINE> self._header =... | A track row with album cover | 625990218c3a8732951f7404 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.