code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class RmBugIsOpenTestCase(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.rm_backup = decorators._get_redmine_bug_status_id <NEW_LINE> self.stat_backup = decorators._redmine_closed_issue_statuses <NEW_LINE> decorators._redmine_closed_issue_statuses = lambda: [1, 2] <NEW_LINE> self.bug_id = gen_... | Tests for :func:`robottelo.common.decorators.rm_bug_is_open`. | 62598fa591f36d47f2230e0e |
class SalaryRate(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'salaryrates' <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> cur_cfg = db.Column(db.String(60), unique=True) <NEW_LINE> next_cfg = db.Column(db.String(60), unique=True) <NEW_LINE> notes = db.Column(db.String(256), index=True) <NEW_LINE>... | Create a SalaryRate table | 62598fa52c8b7c6e89bd369b |
class TestLibVirtControllerSystemHTML5( TestLibVirtControllerSystem, TestLibVirtControllerHTML5, unittest.TestCase ): <NEW_LINE> <INDENT> pass | Test LibVirtController with spice_html5 viewer at system mode. | 62598fa5379a373c97d98ee8 |
class ClockDisplay(Drawable): <NEW_LINE> <INDENT> def __init__(self, window, *args, **kwargs): <NEW_LINE> <INDENT> Drawable.__init__(self, window) <NEW_LINE> self.fps = pyglet.clock.ClockDisplay(*args, **kwargs) <NEW_LINE> <DEDENT> def do_render(self, *args, **kwargs): <NEW_LINE> <INDENT> self.fps.draw() | Simple display for FPS counter. | 62598fa592d797404e388ad0 |
class StopFirewallStatementTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.message = TaggedMessage([]) <NEW_LINE> self.pack = FirewallMessagePack(self.message, getDefaultDomain()) <NEW_LINE> <DEDENT> def testCompile1(self): <NEW_LINE> <INDENT> d = StopFirewallStatement(stop_ma... | Тест на L{spamfighter.core.firewall.StopFirewallStatement}. | 62598fa599fddb7c1ca62d53 |
class SElement(SObject): <NEW_LINE> <INDENT> def __init__(self, magnitude): <NEW_LINE> <INDENT> SObject.__init__(self, is_group=False) <NEW_LINE> self.magnitude = magnitude <NEW_LINE> self.underlying_mapping_set = None <NEW_LINE> from farg.apps.seqsee.categories import Number <NEW_LINE> self.DescribeAs(Number()) <NEW_L... | A subclass of SObject, where there is a single element, which is a number. | 62598fa5b7558d5895463506 |
class PCA: <NEW_LINE> <INDENT> def __init__(self, num_comp=None): <NEW_LINE> <INDENT> self.num_comp = num_comp <NEW_LINE> <DEDENT> def fit(self, X): <NEW_LINE> <INDENT> if self.num_comp is None: <NEW_LINE> <INDENT> self.num_comp = min(X.shape) <NEW_LINE> <DEDENT> if self.num_comp > min(X.shape): <NEW_LINE> <INDENT> rai... | Principle Components Analysis.
Parameters
----------
num_comp : int, optional
Number of principle components to use
(default min(num_samples, num_variables)). | 62598fa53317a56b869be4b5 |
class CapBank(CapCollection): <NEW_LINE> <INDENT> def iter_resources(self, objs, split_path): <NEW_LINE> <INDENT> if Account in objs: <NEW_LINE> <INDENT> self._restrict_level(split_path) <NEW_LINE> return self.iter_accounts() <NEW_LINE> <DEDENT> <DEDENT> def iter_accounts(self): <NEW_LINE> <INDENT> raise NotImplemented... | Capability of bank websites to see accounts and transactions. | 62598fa5435de62698e9bccc |
@to_json_decorator <NEW_LINE> @attr.s <NEW_LINE> class OAuthCodeToSessionResp(object): <NEW_LINE> <INDENT> access_token = attr.ib(type=str, default=None) <NEW_LINE> avatar_url = attr.ib(type=str, default=None) <NEW_LINE> avatar_thumb = attr.ib(type=str, default=None) <NEW_LINE> avatar_middle = attr.ib(type=str, default... | 获取登录用户身份,OAuth code 换取 session 对象
| 62598fa5eab8aa0e5d30bc60 |
class OF_TestXmlInputs_Base( unittest.TestCase ): <NEW_LINE> <INDENT> def __init__( self, methodName = 'runTest', path_to_xml = None ): <NEW_LINE> <INDENT> super( OF_TestXmlInputs_Base, self ).__init__( methodName ) <NEW_LINE> self.path_to_xml = path_to_xml <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def load_file_nam... | Base TEST class extends unittest.TestCase and
it provides possibility to add parameters for
all subclasses by call a static constructor:
OF_TestXmlInputs_Base.load_file_name(sub_class_name, param) | 62598fa556b00c62f0fb2789 |
class ExecutionRequestSerializer(serializers.Serializer): <NEW_LINE> <INDENT> code = serializers.CharField() <NEW_LINE> inputs = serializers.ListField( child=serializers.CharField() ) <NEW_LINE> section_id = serializers.IntegerField(required=False) | Sent by the client when it wants to execute some code | 62598fa516aa5153ce4003d9 |
class SuperAdminApi(Resource): <NEW_LINE> <INDENT> @superadmin_required <NEW_LINE> def post(self): <NEW_LINE> <INDENT> args = superadminParser.parse_args() <NEW_LINE> User.upsert_superadmin(args["username"]) <NEW_LINE> return "", 201 | Api class for creating superadmin | 62598fa56fb2d068a7693da1 |
@api.route(GAMES_MENU_ROUTE) <NEW_LINE> class GamesListMenu(Resource): <NEW_LINE> <INDENT> @api.response(200, 'Success') <NEW_LINE> @api.response(404, 'Not Found') <NEW_LINE> def get(self): <NEW_LINE> <INDENT> menu = db.get_games_menu() <NEW_LINE> if menu is None: <NEW_LINE> <INDENT> raise (NotFound("Games menu not fou... | This class returns the games menu for the game app. | 62598fa57cff6e4e811b5900 |
class Solution: <NEW_LINE> <INDENT> def climbStairs2(self, n): <NEW_LINE> <INDENT> if n <= 1: <NEW_LINE> <INDENT> return 1 <NEW_LINE> <DEDENT> if n == 2: <NEW_LINE> <INDENT> return 2 <NEW_LINE> <DEDENT> dp = [0] * (n + 1) <NEW_LINE> dp[1] = 1 <NEW_LINE> dp[2] = 2 <NEW_LINE> dp[3] = 4 <NEW_LINE> for i in range(4, n + 1)... | 和111几乎一样
@param n: An integer
@return: An Integer | 62598fa54f6381625f199429 |
class Errors(Enum): <NEW_LINE> <INDENT> INVALID_CREDS = 1, 'Invalid Credentials' <NEW_LINE> EMAIL_IN_USE = 2, 'The provided email address is already in use' <NEW_LINE> NO_USER = 3, 'The requested user could not be found' <NEW_LINE> def __init__(self, code, message): <NEW_LINE> <INDENT> self.code = code <NEW_LINE> self.... | Represents a Server Error | 62598fa5f7d966606f747ebb |
class Array(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.reset() <NEW_LINE> return <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT> self.a = [0] <NEW_LINE> self.i = 0 <NEW_LINE> return <NEW_LINE> <DEDENT> def right(self): <NEW_LINE> <INDENT> self.i += 1 <NEW_LINE> if self.i == len(self.a)... | Memory array class. | 62598fa5d58c6744b42dc240 |
class Layer(object): <NEW_LINE> <INDENT> __bases__ = () <NEW_LINE> __name__ = 'Layer' <NEW_LINE> def make_wsgi_app(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def cooperative_super(self, method_name): <NEW_LINE> <INDENT> method = getattr(super(Layer, self), method_name, None) <NEW_LINE> if ... | Test layer which sets up WSGI application for use with
wsgi_intercept/testbrowser. | 62598fa53617ad0b5ee0602a |
@parser(Specs.vgs_noheadings) <NEW_LINE> class Vgs(Lvm): <NEW_LINE> <INDENT> KEYS = { "LVM2_VG_EXTENDABLE": "Extendable", "LVM2_VG_EXTENT_SIZE": "Ext", "LVM2_VG_MDA_COUNT": "#VMda", "LVM2_VG_PROFILE": "VProfile", "LVM2_VG_ALLOCATION_POLICY": "AllocPol", "LVM2_MAX_PV": "MaxPV", "LVM2_VG_UUID": "VG_UUID", "LVM2_VG_ATTR":... | Parse the output of the `/sbin/vgs --nameprefixes --noheadings --separator='|' -a -o vg_all` command.
Parse each line in the output of vgs based on the vgs datasource in
`insights/specs/` Output sample of vgs::
LVM2_VG_FMT='lvm2'|LVM2_VG_UUID='YCpusB-LEly-THGL-YXhC-t3q6-mUQV-wyFZrx'|LVM2_VG_NAME='rhel'|LVM2_VG_AT... | 62598fa5925a0f43d25e7f16 |
class SearchMethod(object): <NEW_LINE> <INDENT> def search(self, initial_node, target_state): <NEW_LINE> <INDENT> pass | Interface class: SearchMethod
| 62598fa55166f23b2e2432ae |
class Throttle: <NEW_LINE> <INDENT> def __init__(self, delay): <NEW_LINE> <INDENT> self.delay = delay <NEW_LINE> self.domains = {} <NEW_LINE> <DEDENT> def wait(self, url): <NEW_LINE> <INDENT> domain = urlparse.urlparse(url).netloc <NEW_LINE> last_accessed = self.domains.get(domain) <NEW_LINE> if self.delay > 0 and last... | Throttle downloading by sleeping between requests to same domain
| 62598fa5236d856c2adc93a7 |
class COUNt(SCPINode, SCPIQuery): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> _cmd = "COUNt" <NEW_LINE> args = [] | SENSe:POWer:AVG:BUFFer:COUNt
Arguments: | 62598fa53cc13d1c6d465643 |
class AndroidApp(object): <NEW_LINE> <INDENT> def __init__(self, app_id, service): <NEW_LINE> <INDENT> self._app_id = app_id <NEW_LINE> self._service = service <NEW_LINE> <DEDENT> @property <NEW_LINE> def app_id(self): <NEW_LINE> <INDENT> return self._app_id <NEW_LINE> <DEDENT> def get_metadata(self): <NEW_LINE> <INDEN... | A reference to an Android app within a Firebase project.
Note: Unless otherwise specified, all methods defined in this class make an RPC.
Please use the module-level function ``android_app(app_id)`` to obtain instances of this class
instead of instantiating it directly. | 62598fa5d53ae8145f918364 |
class Feed(object): <NEW_LINE> <INDENT> TIME_FORMAT = '%Y-%m-%dT%H:%M:%S' <NEW_LINE> def __init__(self, name, url, folder, timestamp, config): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.url = url <NEW_LINE> self.folder = folder <NEW_LINE> self.timestamp = timestamp <NEW_LINE> self.config = config <NEW_LINE> <... | Represents a single feed from which files are downloaded.
| 62598fa5dd821e528d6d8e0d |
class Corpus2(interfaces.TransformationABC): <NEW_LINE> <INDENT> def __init__(self, function, *fargs, **fkwargs): <NEW_LINE> <INDENT> self.funct = function <NEW_LINE> self.fargs, self.fkwargs = fargs, fkwargs <NEW_LINE> <DEDENT> def __getitem__(self, doc): <NEW_LINE> <INDENT> is_corpus, doc = utils.is_corpus(doc) <NEW_... | This is a "generic" transformation.
Apply to a doc the provided function.
If doc is a corpus, then apply transformation to all.
Return doc(corpus) is based upon supplied function. | 62598fa50c0af96317c5625a |
class Controller: <NEW_LINE> <INDENT> def __init__(self, sensor: Sensor, recorder: Recorder): <NEW_LINE> <INDENT> self.__sensor = sensor <NEW_LINE> self.__recorder = recorder <NEW_LINE> <DEDENT> def record_movement(self): <NEW_LINE> <INDENT> if self.__sensor.is_detecting_movement(): <NEW_LINE> <INDENT> self.__recorder.... | description | 62598fa57b25080760ed7383 |
class GooglePrivacyDlpV2JobTrigger(_messages.Message): <NEW_LINE> <INDENT> class StatusValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> STATUS_UNSPECIFIED = 0 <NEW_LINE> HEALTHY = 1 <NEW_LINE> PAUSED = 2 <NEW_LINE> CANCELLED = 3 <NEW_LINE> <DEDENT> createTime = _messages.StringField(1) <NEW_LINE> description = _mes... | Contains a configuration to make dlp api calls on a repeating basis. See
https://cloud.google.com/dlp/docs/concepts-job-triggers to learn more.
Enums:
StatusValueValuesEnum: A status for this trigger. [required]
Fields:
createTime: The creation timestamp of a triggeredJob, output only field.
description: User p... | 62598fa5498bea3a75a579fa |
class PootleEscapePlaceable(Ph): <NEW_LINE> <INDENT> istranslatable = False <NEW_LINE> regex = re.compile(r'\\') <NEW_LINE> parse = classmethod(general.regex_parse) | Placeable handling escapes. | 62598fa5796e427e5384e66b |
class Geometry(Base): <NEW_LINE> <INDENT> __table_args__ = {'schema': 'airports_building_lines'} <NEW_LINE> __tablename__ = 'geometry' <NEW_LINE> id = sa.Column(sa.String, primary_key=True, autoincrement=False) <NEW_LINE> law_status = sa.Column(sa.String, nullable=False) <NEW_LINE> published_from = sa.Column(sa.Date, n... | The dedicated model for all geometries in relation to their public law restriction.
Attributes:
id (int): The identifier. This is used in the database only and must not be set manually. If
you don't like it - don't care about.
law_status (str): The status switch if the document is legally approved or ... | 62598fa5090684286d593647 |
class Vocab(object): <NEW_LINE> <INDENT> def __init__(self, vocab_dir, log_unknowns=False): <NEW_LINE> <INDENT> fn = os.path.join(vocab_dir, 'vocabulary.pkl') <NEW_LINE> dc = DataContainer.load(fn) <NEW_LINE> self.unk_token = dc.unk_token <NEW_LINE> self.eos_token = dc.eos_token <NEW_LINE> self.idx_t_word = dc.idx... | Vocabulary for use in training.
The Vocabulary is the list of word-tokens and their integer index
equivalents. Methods here convert word-tokens to indexes and vice-versa.
Args:
vocab_dir (str): directory where vocabulary.pkl is located
log_unknowns (bool): Create an unknown counter for use while indexing | 62598fa591f36d47f2230e0f |
class updateSquareMember_args(object): <NEW_LINE> <INDENT> def __init__(self, request=None,): <NEW_LINE> <INDENT> self.request = request <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not... | Attributes:
- request | 62598fa5442bda511e95c32e |
class NodeState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): <NEW_LINE> <INDENT> IDLE = "idle" <NEW_LINE> RUNNING = "running" <NEW_LINE> PREPARING = "preparing" <NEW_LINE> UNUSABLE = "unusable" <NEW_LINE> LEAVING = "leaving" <NEW_LINE> PREEMPTED = "preempted" | State of the compute node. Values are idle, running, preparing, unusable, leaving and
preempted. | 62598fa555399d3f056263fc |
class Comment(Node): <NEW_LINE> <INDENT> delim = '' <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> if self.root.get_opt('comments') and not self.root.get_opt('compress'): <NEW_LINE> <INDENT> return super(Comment, self).__str__() <NEW_LINE> <DEDENT> return '' | Comment node.
| 62598fa51f037a2d8b9e3fc3 |
class Hitbox (Component, Rect): <NEW_LINE> <INDENT> def __init__ (self, size): <NEW_LINE> <INDENT> Rect.__init__ (self, 0, 0, *map(int, size)) | Describes the area in which the entity can be hit _relative_
to the Position, that is, before using its .collide* methods
you will have to correctly set its center.
Only its .width/.height attributes matter. | 62598fa5167d2b6e312b6e48 |
class PloidyCaller(Caller): <NEW_LINE> <INDENT> def __init__(self, hybrid_inference_params: HybridInferenceParameters, ploidy_workspace: PloidyWorkspace): <NEW_LINE> <INDENT> self.hybrid_inference_params = hybrid_inference_params <NEW_LINE> self.ploidy_basic_caller = PloidyBasicCaller(hybrid_inference_params, ploidy_wo... | This class is a wrapper around `PloidyBasicCaller` to be used in a `HybridInferenceTask`. | 62598fa5656771135c48955a |
class SparkMLlibModel(SparkModel): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(SparkModel, self).__init__(**kwargs) <NEW_LINE> <DEDENT> def train(self, labeled_points, nb_epoch=10, batch_size=32, verbose=0, validation_split=0.1, categorical=False, nb_classes=None): <NEW_LINE> <INDENT> rd... | MLlib model takes RDDs of LabeledPoints. Internally we just convert
back to plain old pair RDDs and continue as in SparkModel | 62598fa5a17c0f6771d5c10d |
class XGB_Regression_Learner: <NEW_LINE> <INDENT> def __init__(self, Theta): <NEW_LINE> <INDENT> self.Theta = Theta <NEW_LINE> self.name = "XGB Regression" <NEW_LINE> params = {'max_depth': 4, 'silent': 1, 'objective': 'reg:linear', 'n_estimators': 200, 'reg_lambda' : 1, 'gamma':1} <NEW_LINE> self.regr = xgb.XGBRegress... | Gradient boosting based oracle
Oracle=LS; Class=Tree Ensemble | 62598fa5ac7a0e7691f723e3 |
class DBHandler(object): <NEW_LINE> <INDENT> tempdir = '/tmp' if platform.system() == 'Darwin' else tempfile.gettempdir() <NEW_LINE> DEFAULT_DB = tempdir + '/urldb.json' <NEW_LINE> DEFAULT_TABLE = 'oauth' <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self._db_path = kwargs.pop('db_path', self.DEFAULT_DB)... | The main class of DBHandler
Gives an access to TinyDb | 62598fa5be8e80087fbbef3a |
class User(AbstractUser): <NEW_LINE> <INDENT> name = CharField(_("Name of User"), blank=True, max_length=255) <NEW_LINE> def get_absolute_url(self): <NEW_LINE> <INDENT> return reverse("users:detail", kwargs={"username": self.username}) | Default user for dj_promocodes. | 62598fa5adb09d7d5dc0a463 |
class SignupTest(BaseTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> print("setUp z RegistrationPageTest") <NEW_LINE> super().setUp() <NEW_LINE> lpc = LoginPageCom (self.driver) <NEW_LINE> lpc._verify_page() <NEW_LINE> pp = ProductPage(self.driver) <NEW_LINE> pp.product_search(product_SKU) <NEW_LINE> pp... | Test strony Rejestracji | 62598fa5627d3e7fe0e06d85 |
class RayBatchSensor(LinkSensor): <NEW_LINE> <INDENT> def __init__(self, simulator, body_id, to_positions, link_id=-1, noise=None, ticks=1, latency=None, position=None, orientation=None): <NEW_LINE> <INDENT> super(RayBatchSensor, self).__init__(simulator, body_id=body_id, link_id=link_id, noise=noise, ticks=ticks, late... | Ray batch sensor.
This sensor casts a batch of rays into the world, check for intersections, and return the range of the nearest
objects. This can be used for sonars, laser scanning range sensors (such as LIDAR), and others.
Note that the number of rays must be smaller than `simulator.MAX_RAY_INTERSECTION_BATCH_SIZE`... | 62598fa5009cb60464d013fd |
class TestInstall(unittest.TestCase): <NEW_LINE> <INDENT> layer = EXPERIMENTAL_SAFE_HTML_TRANSFORM_INTEGRATION_TESTING <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.portal = self.layer['portal'] <NEW_LINE> self.installer = api.portal.get_tool('portal_quickinstaller') <NEW_LINE> <DEDENT> def test_product_installe... | Test installation of experimental.safe_html_transform into Plone. | 62598fa5435de62698e9bcce |
class CardFrontBackSearchFilter(filters.SearchFilter): <NEW_LINE> <INDENT> def get_search_fields(self, view, request): <NEW_LINE> <INDENT> return request.GET.getlist('search_field', ['front', 'back']) | Enables the user to specify search fields and if none are chosen both fields are used. | 62598fa5eab8aa0e5d30bc62 |
class Policy(nn.Module): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Policy, self).__init__() <NEW_LINE> self.affine1 = nn.Linear(4, 128) <NEW_LINE> self.action_head = nn.Linear(128, 2) <NEW_LINE> self.value_head = nn.Linear(128, 1) <NEW_LINE> self.saved_actions = [] <NEW_LINE> self.rewards = [] <... | implements both actor and critic in one model | 62598fa5d7e4931a7ef3bf74 |
class MultiHeadAttn(object): <NEW_LINE> <INDENT> def __init__(self, num_heads, d_model, l2_lambda=3e-7): <NEW_LINE> <INDENT> assert d_model % num_heads == 0, "MultiHeadAttn: d_model must be divisible by num_heads" <NEW_LINE> self.num_heads = num_heads <NEW_LINE> self.d_model = d_model <NEW_LINE> self.d_k = d_model // n... | Module for multi-head attention.
Based on the attention mechanism described in the paper "Attention Is All You Need" by Vaswani et al., 2017.
(https://arxiv.org/pdf/1706.03762.pdf).
Calls the ScaledDotProductAttn module in parallel over a number of heads. | 62598fa58e7ae83300ee8f7a |
class DimRedConfig: <NEW_LINE> <INDENT> dict_methods = OrderedDict({ 'Random Projection': SparseRandomProjection(), 'PCA': PCA(), 'Isomap': Isomap(), 'MDS': MDS(n_init=1, max_iter=100), 'LLE': LocallyLinearEmbedding(method='standard'), 'MLLE': LocallyLinearEmbedding(method='modified'), 'HLLE': LocallyLinearEmbedding(me... | Contain configs that do not change in DimRedTool for easy control and change | 62598fa5cb5e8a47e493c0e4 |
@admin.register(UserSerie) <NEW_LINE> class UserSerieAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> fields = ( "user","serie","serie_name", ) <NEW_LINE> list_display = ( "user","serie","serie_name", ) | UserSerie Admin | 62598fa544b2445a339b68db |
class ColorEntry: <NEW_LINE> <INDENT> def __init__(self, x, color): <NEW_LINE> <INDENT> self.x = x <NEW_LINE> self.color = color <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "[ %s %s ]" % (self.x, self.color) | Single line entry for a color map | 62598fa5fff4ab517ebcd6bd |
class ResNet3D(keras.Model): <NEW_LINE> <INDENT> def __init__( self, inputs, blocks, block, include_top=True, classes=1000, freeze_bn=True, numerical_names=None, *args, **kwargs ): <NEW_LINE> <INDENT> if keras.backend.image_data_format() == "channels_last": <NEW_LINE> <INDENT> axis = 3 <NEW_LINE> <DEDENT> else: <NEW_LI... | Constructs a `keras.models.Model` object using the given block count.
:param inputs: input tensor (e.g. an instance of `keras.layers.Input`)
:param blocks: the network’s residual architecture
:param block: a residual block (e.g. an instance of `keras_resnet.blocks.basic_3d`)
:param include_top: if true, includes cl... | 62598fa54f6381625f19942a |
class CloseTicket(BaseAction): <NEW_LINE> <INDENT> def run(self, subject, ticket_id): <NEW_LINE> <INDENT> assert subject or ticket_id, 'subject or ticket id is required' <NEW_LINE> if not subject: <NEW_LINE> <INDENT> subject = '' <NEW_LINE> <DEDENT> try: <NEW_LINE> <INDENT> tics = self.client.search(ticket_id, subject=... | Close ticket in zendesk
input: subject for matching tickets | 62598fa5baa26c4b54d4f18a |
class Options(OnlineDictLearnSGD.Options): <NEW_LINE> <INDENT> defaults = copy.deepcopy(OnlineDictLearnSGD.Options.defaults) <NEW_LINE> defaults.update({'CBPDN': copy.deepcopy( cbpdn.ConvBPDNMaskDcpl.Options.defaults)}) <NEW_LINE> def __init__(self, opt=None): <NEW_LINE> <INDENT> OnlineDictLearnSGD.Options.__init__(sel... | Online masked CBPDN dictionary learning algorithm options.
Options are the same as those of
:class:`OnlineDictLearnSGD.Options`, except for
``CBPDN`` : Options :class:`.admm.cbpdn.ConvBPDNMaskDcpl.Options`. | 62598fa560cbc95b06364225 |
class BTool_BrushToMesh(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "btool.brush_to_mesh" <NEW_LINE> bl_label = "Apply this Brush to Canvas" <NEW_LINE> bl_options = {'UNDO'} <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> if isBrush(context.active_object): <NEW_LINE> <INDENT> ret... | Apply this brush to the canvas | 62598fa54428ac0f6e6583fc |
class DictChildrenContainerSchema(object): <NEW_LINE> <INDENT> def __init__(self, _children_container=None, **schema): <NEW_LINE> <INDENT> for k, v in schema.items(): <NEW_LINE> <INDENT> assert isinstance(k, six.string_types) <NEW_LINE> assert ChildrenContainer in v.__bases__ <NEW_LINE> <DEDENT> self.schema = schema <N... | helper class for constructing a wrapped DictChildrenContainer's given a
schema
eg.
dccs = DictChildrenContainerSchema(
foo=ListChildrenContainer,
bar=ChildContainer,
)
# note how the values do not need to be converted into the appropriate
# ChildrenContainer instances manually
dccs({"foo": [ANode(), BNode()], "bar... | 62598fa5f548e778e596b47e |
class ReduceFunction(Function): <NEW_LINE> <INDENT> @abc.abstractmethod <NEW_LINE> def reduce(self, value1, value2): <NEW_LINE> <INDENT> pass | Base interface for Reduce functions. Reduce functions combine groups of elements to a single
value, by taking always two elements and combining them into one. Reduce functions may be
used on entire data sets, or on grouped data sets. In the latter case, each group is reduced
individually.
The basic syntax for using a ... | 62598fa523849d37ff850f8e |
class DownloadFixedTaskSet(TaskSet): <NEW_LINE> <INDENT> def on_start(self): <NEW_LINE> <INDENT> self.replica = get_replica() <NEW_LINE> <DEDENT> def download(self, bundle_uuid, version): <NEW_LINE> <INDENT> with TemporaryDirectory() as tmp_dir: <NEW_LINE> <INDENT> self.client.download(bundle_uuid, self.replica, versio... | Downloads a specific bundle and associated files.
These tests are specific to 'https://dss.dev.data.humancellatlas.org/v1/'. You will need to change the bundles used
to match a large and medium sized bundle in your specific deployment. | 62598fa58c0ade5d55dc35fd |
class AnnouncementForm(forms.Form): <NEW_LINE> <INDENT> content = forms.CharField(label=_('Content'), max_length=10000, widget=forms.Textarea) <NEW_LINE> show_after = forms.DateField(label=_('Show after'), initial=date.today, input_formats=['%Y-%m-%d']) <NEW_LINE> show_until = forms.DateField(label=_('Show until'), req... | Form for collecting information about an announcement.
This is not a ModelForm, and does not include the group or locale fields,
because it should only be used in a context where the group or locale is
implicit, and should not be user controllable. If you need a user
controllable locale or group, use the admin interfa... | 62598fa50c0af96317c5625c |
class Batcher: <NEW_LINE> <INDENT> def __init__(self, datafile): <NEW_LINE> <INDENT> self.f = open(datafile, 'r') <NEW_LINE> self.f.readline() <NEW_LINE> self.current_line = self.f.readline() <NEW_LINE> self.current_day = -1 <NEW_LINE> <DEDENT> def next_batch(self): <NEW_LINE> <INDENT> matlist = [] <NEW_LINE> if self.c... | For batching data too large to fit into memory. Written for one pass on data!!! | 62598fa5b7558d5895463509 |
class OperationName(Model): <NEW_LINE> <INDENT> def __init__(self, name: str=None, public_name: str=None): <NEW_LINE> <INDENT> self.swagger_types = { 'name': str, 'public_name': str } <NEW_LINE> self.attribute_map = { 'name': 'name', 'public_name': 'public_name' } <NEW_LINE> self._name = name <NEW_LINE> self._public_na... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598fa5462c4b4f79dbb8e6 |
class INewsView(model.Schema): <NEW_LINE> <INDENT> selected_news_folder = schema.Choice( title=_("Selected news folder"), description=_("Select news folder to display"), vocabulary="imio.smartweb.vocabulary.RemoteNewsFolders", required=True, ) <NEW_LINE> nb_results = schema.Int( title=_("Number of items to display"), d... | Marker interface and Dexterity Python Schema for NewsView | 62598fa51b99ca400228f49c |
class BinderFunction(BaseBinder): <NEW_LINE> <INDENT> def __init__(self, func_name, func_code='', func_file=None, inputs=[]): <NEW_LINE> <INDENT> super(BinderFunction, self).__init__('function', inputs=inputs) <NEW_LINE> self.func_name = func_name <NEW_LINE> self.etree.set('name', func_name) <NEW_LINE> if func_code: <N... | Represent a function : <function>
| 62598fa5be383301e02536d2 |
class Reconfig (object): <NEW_LINE> <INDENT> def __init__(self, parser=None, includer=None, builder=None, path=None, content=None): <NEW_LINE> <INDENT> self.parser = parser <NEW_LINE> self.builder = builder <NEW_LINE> self.includer = includer <NEW_LINE> if self.includer is not None: <NEW_LINE> <INDENT> if not self.incl... | Basic config class. Derivatives normally only need to override the constructor.
Config data is loaded either from ``path`` or from ``content``
:param parser: overrides the Parser instance
:param includer: overrides the Includer instance
:param builder: overrides the Builder instance
:param path: config file path. Not... | 62598fa5379a373c97d98eec |
class Output(Parameter): <NEW_LINE> <INDENT> outname = Property(dtype=str, default=None) <NEW_LINE> def summarize(self, obj): <NEW_LINE> <INDENT> unit_name = "" <NEW_LINE> val = getattr(obj, self.private_name).value <NEW_LINE> return StatsSummary(self.public_name, val, unit_name) <NEW_LINE> <DEDENT> def summarize_by_el... | A property sub-class that will convert values back
from SI units to input units.
Also has a function to provide summary statistics | 62598fa5656771135c48955c |
class UTC8(tzinfo): <NEW_LINE> <INDENT> def __init__(self, hours=8, minutes=0): <NEW_LINE> <INDENT> self.hours = hours <NEW_LINE> self.minutes = minutes <NEW_LINE> <DEDENT> def utcoffset(self, dt): <NEW_LINE> <INDENT> return timedelta(hours=self.hours, minutes=self.minutes) <NEW_LINE> <DEDENT> def tzname(self, dt): <NE... | 自定义时区,默认为UTC +8:00,也就是北京时间
hours->[-23,24] minutes->[-59,59]
注意:时间和分钟正负保持一致 | 62598fa5a219f33f346c66f2 |
class REPServer(object): <NEW_LINE> <INDENT> def __init__(self, context, address, receive_queue): <NEW_LINE> <INDENT> self._log = logging.getLogger("REPServer-{0}".format(address)) <NEW_LINE> if address.startswith("ipc://"): <NEW_LINE> <INDENT> prepare_ipc_path(address) <NEW_LINE> <DEDENT> self._rep_socket = context.so... | a class that manages a zeromq REP socket as a server | 62598fa599cbb53fe6830daf |
class Parser: <NEW_LINE> <INDENT> parser_type = ParserType.UNDEFINED <NEW_LINE> box_type = Box <NEW_LINE> extension = '.txt' <NEW_LINE> read_mode = 'r' <NEW_LINE> write_mode = 'w' <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def serialize(self, box): <NEW_LINE> <INDENT> if self.... | This is a Generic parser class.
Args:
kwargs (optional): Derived parsers should use keyword arguments to get any information they need upon initialisation. | 62598fa599fddb7c1ca62d55 |
class ImplicitDistribution(Distribution): <NEW_LINE> <INDENT> def _preprocess_parameters_for_sampling(self, **parameters): <NEW_LINE> <INDENT> return parameters, None <NEW_LINE> <DEDENT> def _preprocess_parameters_for_log_prob(self, x, **parameters): <NEW_LINE> <INDENT> return x, parameters, None, None <NEW_LINE> <DEDE... | Summary | 62598fa53539df3088ecc18f |
class Square: <NEW_LINE> <INDENT> def __init__(self, coords, length, size, state=False, active_col='black', inactive_col='white'): <NEW_LINE> <INDENT> self.length = length <NEW_LINE> self.coords = coords <NEW_LINE> self.size = size <NEW_LINE> self.state = state <NEW_LINE> self.active_colour = active_col <NEW_LINE> self... | A cell which can either be off or on.
This cell is the representation of a civilisation or a person.
Is a spot on a grid.
:ivar tuple coords: The coordinates of the square. (Needs x, y attributes)
:ivar int length: The length of the window
:ivar bool state: The state of the square (On or Of... | 62598fa5d6c5a102081e2022 |
class LargeBlobTest(BlobTestBase): <NEW_LINE> <INDENT> level = 2 if not USE_SMALL_BLOBS else 0 <NEW_LINE> testsize = 0 <NEW_LINE> with open(__file__, 'rb') as _f: <NEW_LINE> <INDENT> _random_file_data = _f.read().replace(b'\n', b'').split() <NEW_LINE> <DEDENT> del _f <NEW_LINE> def _random_file(self, size, fd): <NEW_LI... | Test large blob upload and download.
Note that this test excercises the blob storage and only makes sense
when shared_blob_support=False. | 62598fa56fb2d068a7693da3 |
class ClusterDiscoveryService(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def DiscoverClusters(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): <NEW_LINE> <INDENT> return grpc.experimental.unary_u... | Missing associated documentation comment in .proto file. | 62598fa5f7d966606f747ebf |
class _UnknownConfigurableReference: <NEW_LINE> <INDENT> def __init__(self, selector, evaluate): <NEW_LINE> <INDENT> self._selector = selector.split('/')[-1] <NEW_LINE> self._evaluate = evaluate <NEW_LINE> <DEDENT> @property <NEW_LINE> def selector(self): <NEW_LINE> <INDENT> return self._selector <NEW_LINE> <DEDENT> @p... | Represents a reference to an unknown configurable.
This class acts as a substitute for `ConfigurableReference` when the selector
doesn't match any known configurable. | 62598fa5baa26c4b54d4f18c |
class dumplib(BuildContext): <NEW_LINE> <INDENT> cmd = 'dumplib' <NEW_LINE> fun = 'build' <NEW_LINE> def execute(self): <NEW_LINE> <INDENT> dumpLibImpl(self, False) | dumps the libs connected to the targets | 62598fa56aa9bd52df0d4da5 |
class DictKeyValue(ListBase): <NEW_LINE> <INDENT> pass | Corresponds to `test ':' test` in DictGenListSetMakerCompForNode. | 62598fa5dd821e528d6d8e10 |
class Encoder(object): <NEW_LINE> <INDENT> encodings = (( '&(?!(amp|lt|gt|quot|apos);)', '&' ),( '<', '<' ),( '>', '>' ),( '"', '"' ),("'", ''' )) <NEW_LINE> decodings = (( '<', '<' ),( '>', '>' ),( '"', '"' ),( ''', "'" ),( '&', '&' )) <NEW_LINE> special = (... | An XML special character encoder/decoder.
@cvar encodings: A mapping of special characters encoding.
@type encodings: [(str,str)]
@cvar decodings: A mapping of special characters decoding.
@type decodings: [(str,str)]
@cvar special: A list of special characters
@type special: [char] | 62598fa5a8370b77170f02b6 |
class TaskForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Task <NEW_LINE> fields = ('name', 'date', 'descriptions', 'state', 'expired', 'file') <NEW_LINE> widgets = { 'expired': forms.DateInput(format=('%Y-%m-%d'), attrs={'type': 'date'}), 'date': forms.DateInput(format=('%Y-%m-%d'), ... | Form of Task model. | 62598fa501c39578d7f12c5b |
@widgy.register <NEW_LINE> @python_2_unicode_compatible <NEW_LINE> class FieldMappingValue(StrDisplayNameMixin, MappingValue): <NEW_LINE> <INDENT> form = FieldMappingValueForm <NEW_LINE> name = models.CharField(max_length=255) <NEW_LINE> field_ident = models.UUIDField(null=True) <NEW_LINE> class Meta: <NEW_LINE> <INDEN... | MappingValue that maps a form field to another value. | 62598fa57b25080760ed7387 |
class MonsterImage(pg.sprite.Sprite): <NEW_LINE> <INDENT> def __init__(self, kind): <NEW_LINE> <INDENT> pg.sprite.Sprite.__init__(self) <NEW_LINE> self.kind = kind <NEW_LINE> self.name = monsters_kinds[self.kind]['name'] <NEW_LINE> self.image = monsters_kinds[self.kind]['image_right'] <NEW_LINE> self.speed = monsters_k... | Class for just an image of monster, that can't do shit. | 62598fa5a8ecb033258710ea |
class Condition(object): <NEW_LINE> <INDENT> def __init__(self, argument, attribute, operator, negative=False): <NEW_LINE> <INDENT> self.attribute = attribute <NEW_LINE> self.argument = argument <NEW_LINE> self.operator = operator <NEW_LINE> self.negative = negative <NEW_LINE> <DEDENT> @property <NEW_LINE> def __is_or_... | A Condition is the configuration of an argument, its attribute and an
operator. It tells you if it itself is true or false given an input.
The ``argument`` defines what this condition is checking. Perhaps it's a
``User`` or ``Request`` object. The ``attribute`` name is then extracted out
of an instance of the argumen... | 62598fa5462c4b4f79dbb8e8 |
class LinearEstimator(estimator.Estimator): <NEW_LINE> <INDENT> def __init__(self, head, feature_columns, model_dir=None, optimizer='Ftrl', config=None, partitioner=None, sparse_combiner='sum'): <NEW_LINE> <INDENT> def _model_fn(features, labels, mode, config): <NEW_LINE> <INDENT> return linear_lib._linear_model_fn( fe... | An estimator for TensorFlow linear models with user-specified head.
Example:
```python
categorical_column_a = categorical_column_with_hash_bucket(...)
categorical_column_b = categorical_column_with_hash_bucket(...)
categorical_feature_a_x_categorical_feature_b = crossed_column(...)
# Estimator using the default opt... | 62598fa5851cf427c66b81a4 |
class EpisodeReaderMixin(object): <NEW_LINE> <INDENT> def create_dataset_input_pipeline(self, sampler, pool=None, shuffle_seed=None): <NEW_LINE> <INDENT> shuffle = (self.shuffle_buffer_size and self.shuffle_buffer_size > 0) <NEW_LINE> class_datasets = self.construct_class_datasets( pool=pool, shuffle=shuffle, shuffle_s... | Mixin class to assemble examples as episodes. | 62598fa5442bda511e95c332 |
class Connect(BaseHttpRoute): <NEW_LINE> <INDENT> def __init__(self, route=None, output=None): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.method_type = ['CONNECT'] <NEW_LINE> if route is not None and output is not None: <NEW_LINE> <INDENT> self.route(route, output) | Class for specifying Connect requests. | 62598fa52c8b7c6e89bd36a1 |
class channel(): <NEW_LINE> <INDENT> def __init__(self, parent, channel, position, time, pnl): <NEW_LINE> <INDENT> self.parent=parent <NEW_LINE> self.c=channel <NEW_LINE> self.p=position <NEW_LINE> self.t=time <NEW_LINE> self.dp=10 <NEW_LINE> self.dps=500 <NEW_LINE> self.slider = wx.Slider(pnl, value=100, minValue=0, m... | Classe canal. | 62598fa5d268445f26639af1 |
class UserValidation(): <NEW_LINE> <INDENT> correct_details = [] <NEW_LINE> def __init__(self, user_data): <NEW_LINE> <INDENT> self.data = user_data <NEW_LINE> <DEDENT> def valid_username(self): <NEW_LINE> <INDENT> if re.search("[!@#$%^&*-/\\')(;\"`<>?:|}{~ ]", self.data["userName"]): <NEW_LINE> <INDENT> abort(make_res... | THis class validates all user data input from a user for signup and login | 62598fa5b7558d589546350b |
class ValueIterationAgent(ValueEstimationAgent): <NEW_LINE> <INDENT> def __init__(self, mdp, discount=0.9, iterations=100): <NEW_LINE> <INDENT> self.mdp = mdp <NEW_LINE> self.discount = discount <NEW_LINE> self.iterations = iterations <NEW_LINE> self.values = util.Counter() <NEW_LINE> TotalIterations = self.iterations ... | * Please read learningAgents.py before reading this.*
A ValueIterationAgent takes a Markov decision process
(see mdp.py) on initialization and runs value iteration
for a given number of iterations using the supplied
discount factor. | 62598fa5498bea3a75a579ff |
class IBVModelSpecifyPerspective(Perspective): <NEW_LINE> <INDENT> name = 'Specify IBV Model' <NEW_LINE> enabled = True <NEW_LINE> show_editor_area = True <NEW_LINE> contents = [ PerspectiveItem(id=PROMOD_VIEW, position='top'), PerspectiveItem(id=TSTEPPER_VIEW, position='bottom'), ] | An default perspective for the app. | 62598fa597e22403b383ade8 |
class DataSourceQueryOption(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.LikeName = None <NEW_LINE> self.LikeTitle = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.LikeName = params.get("LikeName") <NEW_LINE> self.LikeTitle = params.get("LikeTitle")... | 数据源模糊查询参数
| 62598fa5656771135c48955e |
class UpdateProfile(permissions.BasePermission): <NEW_LINE> <INDENT> def has_object_permission(self, request, view, obj): <NEW_LINE> <INDENT> if request.method in permissions.SAFE_METHODS: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> return request.user.pk == obj.pk | Allow user to update their profile only | 62598fa57047854f4633f2b5 |
class Saturation: <NEW_LINE> <INDENT> def __init__(self, saturation=1): <NEW_LINE> <INDENT> assert 0 <= saturation <= 2, f'saturation should be in the range of [0,2] , given value was {saturation}' <NEW_LINE> self.saturation = saturation <NEW_LINE> <DEDENT> def __call__(self, frame): <NEW_LINE> <INDENT> if isinstance(f... | Change saturation value of frame.
| 62598fa50c0af96317c5625f |
class Config_Manager(QDialog): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> super(Config_Manager, self).__init__(parent=parent) <NEW_LINE> uipath = os.path.join(os.path.dirname(__file__), "lamia_popup_rereau_ui.ui") <NEW_LINE> uic.loadUi(uipath, self) <NEW_LINE> self.finished.connect(self.di... | open a popup to define alpha and P | 62598fa53317a56b869be4b8 |
class FoxZombie(Enemy): <NEW_LINE> <INDENT> def __init__(self, g, pos): <NEW_LINE> <INDENT> Enemy.__init__(self, g, pos, 'fox_zombie') <NEW_LINE> self.rect.width,self.rect.height = 64, 64 <NEW_LINE> self.shape.w,self.shape.h = 64, 64 <NEW_LINE> self.image = pygame.Surface((64,64), SRCALPHA) <NEW_LINE> self.health = 40 ... | Boss bro. Come at me
| 62598fa56e29344779b00539 |
class CommentUpvoteList(generics.ListCreateAPIView): <NEW_LINE> <INDENT> queryset = CommentUpvote.objects.all() <NEW_LINE> serializer_class = CommentUpvoteSerializer <NEW_LINE> def pre_save(self, obj): <NEW_LINE> <INDENT> if not self.request.user.is_anonymous(): <NEW_LINE> <INDENT> obj.upvote_user = AppUser.objects.get... | List all thread upvotes, or create a new thread upvote. | 62598fa530bbd722464698e6 |
class DetectorTest(unittest.TestCase): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> unittest.TestCase.__init__(self, *args, **kwargs) <NEW_LINE> <DEDENT> def test_einstein(self): <NEW_LINE> <INDENT> image = io.load_image("faces/albert-einstein.jpg") <NEW_LINE> faces = detect_faces(image)... | Test methods in face detector | 62598fa54f88993c371f0478 |
@api.doc(responses={404: 'Port not found'}, params={'direction': 'The port number'}) <NEW_LINE> @ns.route('/direction/<string:direction>/') <NEW_LINE> class HDMIPortDirection(Resource): <NEW_LINE> <INDENT> @api.doc(description='Control HDMI Port with Direction') <NEW_LINE> def get(self, direction): <NEW_LINE> <INDENT> ... | docstring for HDMIPort | 62598fa516aa5153ce4003df |
class sfp_bingsearch(SpiderFootPlugin): <NEW_LINE> <INDENT> opts = { 'fetchlinks': True, 'pages': 20 } <NEW_LINE> optdescs = { 'fetchlinks': "Fetch links found on the target domain-name?", 'pages': "Number of Bing results pages to iterate through." } <NEW_LINE> results = list() <NEW_LINE> def setup(self, sfc, userOpts=... | Bing:Footprint,Investigate:Some light Bing scraping to identify sub-domains and links. | 62598fa576e4537e8c3ef489 |
class TestPUTCreditMemoItemTypeFinanceInformation(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 testPUTCreditMemoItemTypeFinanceInformation(self): <NEW_LINE> <INDENT> pass | PUTCreditMemoItemTypeFinanceInformation unit test stubs | 62598fa5d7e4931a7ef3bf78 |
class TestCP2(gcounter.Model): <NEW_LINE> <INDENT> cp2 = gcounter.ComputedProperty(lambda self: self.my_value + ' ' + ' test' if self.my_value else 'test', counter_name='cp2n', behaviour='StringProperty') <NEW_LINE> my_value = ndb.StringProperty(default=None) | Test model for computed counters | 62598fa55f7d997b871f934f |
class WhitelistSerializer(NamespacedHMSerializer): <NEW_LINE> <INDENT> active = serializers.BooleanField(source="is_active") <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = users.Whitelist <NEW_LINE> fields = ("user", "raison", "date_start", "date_end", "active", "api_url") | Serialize `users.models.Whitelist` objects.
| 62598fa5fff4ab517ebcd6c2 |
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.BETA) <NEW_LINE> class Functions(base.Group): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Args(parser): <NEW_LINE> <INDENT> parser.display_info.AddTransforms(transforms.GetTransforms()) | Manages Google Cloud Functions. | 62598fa566673b3332c302a7 |
class Network: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.plugin = None <NEW_LINE> self.network = None <NEW_LINE> self.input_blob = None <NEW_LINE> self.output_blob = None <NEW_LINE> self.exec_network = None <NEW_LINE> self.infer_request = None <NEW_LINE> <DEDENT> def load_model(self, model_xml, d... | Load and configure inference plugins for the specified target devices
and performs synchronous and asynchronous modes for the specified infer requests. | 62598fa532920d7e50bc5f34 |
class TransactionMiddleware(object): <NEW_LINE> <INDENT> def __init__(self, root_factory, wsgi_stack): <NEW_LINE> <INDENT> self.root_factory = root_factory <NEW_LINE> self.wsgi_stack = wsgi_stack <NEW_LINE> <DEDENT> def __call__(self, environ, start_response): <NEW_LINE> <INDENT> transaction.commit() <NEW_LINE> for ent... | This middleware makes the WSGI application compatible with the
HTTPCaller behavior defined in zope.app.testing.functional:
- It commits and synchronises the current transaction before and
after the test. | 62598fa58c0ade5d55dc35ff |
class NotBuiltException(TestingFrameworkException): <NEW_LINE> <INDENT> _message = 'An item was not built' | Exception to raise when an item that was expected to be built was not | 62598fa5a8370b77170f02b8 |
class OnDateStrategy(BaseStrategy): <NEW_LINE> <INDENT> def __init__(self, date, based): <NEW_LINE> <INDENT> self.date = date <NEW_LINE> self.based = based <NEW_LINE> <DEDENT> def apply(self, query): <NEW_LINE> <INDENT> kwargs = { self.based: self.date } <NEW_LINE> return query.filter(**kwargs) | Filters query to care about one date only | 62598fa5d53ae8145f91836a |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.