code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class ComputeInstanceGroupManagersResizeRequest(_messages.Message): <NEW_LINE> <INDENT> instanceGroupManager = _messages.StringField(1, required=True) <NEW_LINE> project = _messages.StringField(2, required=True) <NEW_LINE> size = _messages.IntegerField(3, required=True, variant=_messages.Variant.INT32) <NEW_LINE> zone ... | A ComputeInstanceGroupManagersResizeRequest object.
Fields:
instanceGroupManager: The name of the managed instance group.
project: Project ID for this request.
size: The number of running instances that the managed instance group
should maintain at any given time. The group automatically adds or
removes ... | 62598ee00c0af96317c5497b |
class IndexPagePictureAdmin(ModelAdmin): <NEW_LINE> <INDENT> fields = ( 'file', 'position', 'font_color', ) <NEW_LINE> list_display = [ 'admin_thumb', 'position', ] <NEW_LINE> list_display_links = ('admin_thumb',) <NEW_LINE> list_editable = ('position',) <NEW_LINE> def formfield_for_dbfield(self, db_field, **kwargs): <... | Картинки на главной странице | 62598ee055399d3f05624b0d |
class SecretStorePluginNotFound(exception.BarbicanException): <NEW_LINE> <INDENT> def __init__(self, plugin_name=None): <NEW_LINE> <INDENT> if plugin_name: <NEW_LINE> <INDENT> message = u._("Secret store plugin \"{0}\"" " not found.").format(plugin_name) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> message = u._("Secr... | Raised when no plugins are installed. | 62598ee060cbc95b06362919 |
class TestSignaturesController(BaseTestCase): <NEW_LINE> <INDENT> def test_get_signatures_by_participant_id(self): <NEW_LINE> <INDENT> response = self.client.open( "/api/signatures/participantId/{participantId}".format(participantId=789), method="GET", ) <NEW_LINE> self.assert200(response, "Response body is : " + respo... | SignaturesController integration test stubs | 62598ee04a966d76dd5ed4c1 |
class NodeProxy(object): <NEW_LINE> <INDENT> def __init__(self, orig_node, env): <NEW_LINE> <INDENT> self._orig_node = orig_node <NEW_LINE> self._env = env <NEW_LINE> <DEDENT> def __getattr__(self, name): <NEW_LINE> <INDENT> return getattr(self._orig_node, name) <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <... | Fuelclient Node proxy model with some helpful methods | 62598ee07d847024c075a9ac |
class worksheet(object): <NEW_LINE> <INDENT> def __init__(self, fname, title="", savetex=False): <NEW_LINE> <INDENT> self.fname = fname <NEW_LINE> self.worksheet = document(fname, title, savetex) <NEW_LINE> self.solutions = document(fname + "_solutions", title + " Solutions", savetex) <NEW_LINE> <DEDENT> def add_sectio... | Class for managing an worksheet. | 62598ee03539df3088eca890 |
class EmptyReport(Exception): <NEW_LINE> <INDENT> pass | raised when a report is empty and so should not be displayed | 62598ee0a8370b77170ee9c3 |
class ContainerServiceCustomProfile(Model): <NEW_LINE> <INDENT> _validation = { 'orchestrator': {'required': True}, } <NEW_LINE> _attribute_map = { 'orchestrator': {'key': 'orchestrator', 'type': 'str'}, } <NEW_LINE> def __init__(self, orchestrator): <NEW_LINE> <INDENT> super(ContainerServiceCustomProfile, self).__init... | Properties to configure a custom container service cluster.
:param orchestrator: The name of the custom orchestrator to use.
:type orchestrator: str | 62598ee0498bea3a75a56115 |
class API404: <NEW_LINE> <INDENT> def GET(self, **kwargs): <NEW_LINE> <INDENT> raise cherrypy.HTTPError(status=404) <NEW_LINE> <DEDENT> def POST(self, **kwargs): <NEW_LINE> <INDENT> raise cherrypy.HTTPError(status=404) <NEW_LINE> <DEDENT> def PUT(self, **kwargs): <NEW_LINE> <INDENT> raise cherrypy.HTTPError(status=404)... | Base Template For the API | 62598ee06fb2d068a7693111 |
class tsCpf(pyxb.binding.datatypes.string): <NEW_LINE> <INDENT> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, "tsCpf") <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location( "/Users/Marcelo/Dev/Projetos/PyNFSe/PyNFSe/XSD/Curitiba/Template/nfse.xsd", 196, 1 ) <NEW_LINE> _Documentation = None | An atomic simple type. | 62598ee0baa26c4b54d4d8af |
class Atbash(Cipher): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.alphabet = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] <NEW_LINE> self.cipher_alphabet = ['Z', 'Y', 'X', 'W', 'V', 'U', 'T', 'S', 'R', 'Q', 'P', '... | THIS IS MY FIRST CIPHER, IT INHERITS FROM THE CIPHER CLASS | 62598ee05fdd1c0f98e5c58d |
class StarletteGraphQlClient: <NEW_LINE> <INDENT> def __init__(self, client: TestClient): <NEW_LINE> <INDENT> self.client = client <NEW_LINE> <DEDENT> def execute(self, query, variables=None, **kwargs) -> dict: <NEW_LINE> <INDENT> body = {"query": query} <NEW_LINE> if variables: <NEW_LINE> <INDENT> body["variables"] = ... | Client that passess trough starlette request system in order
to ensure that context is correctly set in graphql resolvers | 62598ee03617ad0b5ee0470d |
class SCPCommand(Enum): <NEW_LINE> <INDENT> CMD_VER = (0, "Get SCAMP Version") <NEW_LINE> CMD_RUN = 1 <NEW_LINE> CMD_READ = (2, "Read SDRAM") <NEW_LINE> CMD_WRITE = (3, "Write SDRAM") <NEW_LINE> CMD_APLX = 4 <NEW_LINE> CMD_FILL = 5 <NEW_LINE> CMD_REMAP = 16 <NEW_LINE> CMD_LINK_READ = (17, "Read neighbouring chip's memo... | The SCP Commands
| 62598ee0e1aae11d1e7cdb2e |
class Sky2Pix_SlantOrthographic(Sky2PixProjection, Zenithal): <NEW_LINE> <INDENT> @property <NEW_LINE> def inverse(self): <NEW_LINE> <INDENT> return Pix2Sky_SlantOrthographic() <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def evaluate(cls, phi, theta): <NEW_LINE> <INDENT> phi = np.deg2rad(phi) <NEW_LINE> theta = np.deg2... | Slant orthographic projection - sky to pixel.
Corresponds to the ``SIN`` projection in FITS WCS.
See `Zenithal` for a definition of the full transformation.
.. math::
R_\theta = \frac{180^{\circ}}{\pi}\cos \theta | 62598ee00c0af96317c5497c |
class Runtime: <NEW_LINE> <INDENT> def __init__(self, project): <NEW_LINE> <INDENT> self.project = project <NEW_LINE> <DEDENT> @property <NEW_LINE> def df(self): <NEW_LINE> <INDENT> data = [{ 'dataset': r['dataset'], 'clf': r['clf'], 'score': r['score'], 'time': r['time'] } for r in self.results] <NEW_LINE> return pd.D... | Compute on-device inference time and accuracy | 62598ee0a219f33f346c4e17 |
class ManabaAnswerViewType(Enum): <NEW_LINE> <INDENT> PUBLISH_AT_SUBMIT = (auto(), "提出時に公開する") <NEW_LINE> UNPUBLISH = (auto(), "公開しない") <NEW_LINE> UNKNOWN = (auto(), None) <NEW_LINE> def __init__(self, _id: int, showing_name: str): <NEW_LINE> <INDENT> self.id = _id <NEW_LINE> self.showing_name = showing_name <NEW_LINE>... | manaba 正解の公開 (小テストドリル) | 62598ee07d43ff24874266eb |
class InceptionD(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_channels): <NEW_LINE> <INDENT> super(InceptionD, self).__init__() <NEW_LINE> self.branch3x3_1 = BasicConv2d(in_channels, 192, kernel_size=1) <NEW_LINE> self.branch3x3_2 = BasicConv2d(192, 320, kernel_size=3, stride=2) <NEW_LINE> self.branch7x7x3_1 =... | InceptionD model. | 62598ee0ac7a0e7691f70af3 |
class IAffiniticPolicyLayer(IDefaultBrowserLayer): <NEW_LINE> <INDENT> pass | Marker interface that defines a browser layer. | 62598ee07cff6e4e811b3fcc |
class ChDir(object): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> self.old_dir = os.getcwd() <NEW_LINE> self.new_dir = path <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> os.chdir(self.new_dir) <NEW_LINE> <DEDENT> def __exit__(self, *args): <NEW_LINE> <INDENT> os.chdir(self.old_dir) | Step into a directory temporarily.
Not very elegant, it should be removed in the future. | 62598ee099cbb53fe682f491 |
class FinishProfile: <NEW_LINE> <INDENT> def process_request(self,request): <NEW_LINE> <INDENT> if not request.user.is_anonymous(): <NEW_LINE> <INDENT> if request.path != '/profile/' and request.path != '/accounts/logout/': <NEW_LINE> <INDENT> if hasattr(request.user, "memberprofile"): <NEW_LINE> <INDENT> if request.us... | Middleware that checks if the user finished filling out their profile.
If they go anywhere on the site they will be redirect tot he profile form. | 62598ee09c8ee8231303f447 |
class LayerEyeMatrix(Structure): <NEW_LINE> <INDENT> _pack_ = OVR_PTR_SIZE <NEW_LINE> _fields_ = [ ("Header", LayerHeader), ("ColorTexture", POINTER(SwapTextureSet) * Eye_Count), ("Viewport", Recti * Eye_Count), ("RenderPose", Posef * Eye_Count), ("Matrix", Matrix4f * Eye_Count), ("SensorSampleTime", c_double), ] <NEW_... | Describes a layer that specifies a monoscopic or stereoscopic view.
This uses a direct 3x4 matrix to map from view space to the UV coordinates.
It is essentially the same thing as ovrLayerEyeFov but using a much
lower level. This is mainly to provide compatibility with specific apps.
Unless the application really requi... | 62598ee0442bda511e95aa46 |
class Radio(EtapeSpeakerDiarizationProtocol): <NEW_LINE> <INDENT> def trn_iter(self): <NEW_LINE> <INDENT> return self._subset('radio', 'trn') <NEW_LINE> <DEDENT> def dev_iter(self): <NEW_LINE> <INDENT> return self._subset('radio', 'dev') <NEW_LINE> <DEDENT> def tst_iter(self): <NEW_LINE> <INDENT> return self._subset('r... | Speaker diarization protocol using radio subset of ETAPE
Parameters
----------
preprocessors : dict or (key, preprocessor) iterable
When provided, each protocol item (dictionary) are preprocessed, such
that item[key] = preprocessor(**item). In case 'preprocessor' is not
callable, it should be a string cont... | 62598ee023849d37ff84f699 |
class PrsObjectDeleteTest(PrsViewsTestCase): <NEW_LINE> <INDENT> models = [Referral, Task, Record, Note, Condition, Location] <NEW_LINE> def test_get(self): <NEW_LINE> <INDENT> for model in self.models: <NEW_LINE> <INDENT> for i in model.objects.all(): <NEW_LINE> <INDENT> url = reverse( 'prs_object_delete', kwargs={ 'm... | Test the generic object delete view. | 62598ee0b7558d5895461c2b |
class TextLabel(QLabel): <NEW_LINE> <INDENT> def __init__(self, text, font=None, size=None, color=None, bold=None, italic=None): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> if font is None: <NEW_LINE> <INDENT> self.font = GuiPrala.BASIC_FONT <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.font = font <NEW_LINE... | This class represents a simple text label with specific caracteristics of font | 62598ee0d53ae8145f916a6b |
class HydroEnergyConversionKind(str): <NEW_LINE> <INDENT> pass | Values are: generator, pumpAndGenerator
| 62598ee03c8af77a43b67222 |
class FusedGemmsBoundingBoxCostEstimator(BoundingBoxCostEstimator): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._lead_dim = 0 <NEW_LINE> self._loaded_to_gpu_cache = set() <NEW_LINE> <DEDENT> def _get_terms(self, node): <NEW_LINE> <INDENT> left_indices = node.leftTerm()... | Estimates num. of hardware flops for a tensor operation per GPU thread.
Therefore, results of BoundingBoxCostEstimator are divided by a size
of the first dimension of lhs because this dimension is fully parallelized.
Note, the estimator includes GPU caching. This estimator is relevant to
fused gemms kernels. | 62598ee08e7ae83300ee766e |
class CheckoutRequestModel(Model): <NEW_LINE> <INDENT> _attribute_map = { 'redirect_url': {'key': 'redirectUrl', 'type': 'str'}, 'reference_id': {'key': 'referenceId', 'type': 'str'}, 'amount': {'key': 'amount', 'type': 'float'}, 'name_on_account': {'key': 'nameOnAccount', 'type': 'str'}, 'expiration_date': {'key': 'ex... | Checkout request model.
:param redirect_url: Gets or sets the redirect URL.
:type redirect_url: str
:param reference_id: Gets or sets the reference identifier.
:type reference_id: str
:param amount: Gets or sets the amount.
:type amount: float
:param name_on_account: Gets or sets the name on account.
:type name_on_acc... | 62598ee030dc7b766599de67 |
class CenterCrop(object): <NEW_LINE> <INDENT> def __init__(self, size): <NEW_LINE> <INDENT> if isinstance(size, numbers.Number): <NEW_LINE> <INDENT> self.size = (int(size), int(size)) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.size = size <NEW_LINE> <DEDENT> <DEDENT> def __call__(self, inputs, target): <NEW_LIN... | Crops the given inputs and target arrays at the center to have a region of
the given size. size can be a tuple (target_height, target_width)
or an integer, in which case the target will be of a square shape (size, size)
Careful, img1 and img2 may not be the same size | 62598ee056ac1b37e63007cc |
class FqnTestCase(TestCase): <NEW_LINE> <INDENT> def test_class(self): <NEW_LINE> <INDENT> result = util.fqn(self) <NEW_LINE> self.assertEqual(result, 'encode.tests.test_util.FqnTestCase') | Tests for :py:func:`encode.util.fqn`. | 62598ee04428ac0f6e656b32 |
@unittest.skipIf(six.PY2, "Those tests run just for Python 3") <NEW_LINE> class TestEditDataJson(unittest.TestCase): <NEW_LINE> <INDENT> layer = INTEGRATION_TESTING <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> super(TestEditDataJson, self).setUp() <NEW_LINE> self.portal = self.layer["portal"] <NEW_LINE> self.request... | Test Edit Data JSON view. | 62598ee0656771135c487c71 |
class LinkedList: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.size = 0 <NEW_LINE> <DEDENT> def isEmpty(self): <NEW_LINE> <INDENT> return self.size == 0 <NEW_LINE> <DEDENT> def insertEnd(self, x): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def removeEnd(self): <NEW_LINE> <IN... | Interface of LinkedList | 62598ee03539df3088eca891 |
class AttributeNotFoundError(GribInternalError): <NEW_LINE> <INDENT> pass | Attribute not found.. | 62598ee097e22403b38394cf |
class ComposeTestCompleted(Base): <NEW_LINE> <INDENT> expected_title = "autocloud.compose.complete" <NEW_LINE> expected_subti = 'Fedora-24-20160419.n.1 tests have completed' <NEW_LINE> expected_link = 'https://apps.fedoraproject.org/autocloud/jobs/37' <NEW_LINE> expected_secondary_icon = "https://apps.fedoraproject.org... | These messages are published when tests for a compose completes
in Autocloud app. | 62598ee07d847024c075a9af |
class NicheEvaluator(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> llvm.initialize() <NEW_LINE> llvm.initialize_native_target() <NEW_LINE> llvm.initialize_native_asmprinter() <NEW_LINE> self.codegen = LLVMCodeGenerator() <NEW_LINE> self.target = llvm.Target.from_default_triple() <NEW_LINE> <DEDEN... | Evaluator for Niche expressions.
Once an object is created, calls to evaluate() add new expressions to the
module. Definitions (including imports) are only added into the IR - no
JIT compilation occurs. When a toplevel expression is evaluated, the whole
module is JITed and the result of the expression is returned. | 62598ee00a50d4780f703989 |
@ns.route('/<string:outlet_name>/') <NEW_LINE> class OutletsAPI(Resource): <NEW_LINE> <INDENT> @ns.response(OutletsSchema()) <NEW_LINE> @ns.doc('Get Outlet Device by Name', responses={404: 'Outlet not found'}) <NEW_LINE> def get(self, outlet_name): <NEW_LINE> <INDENT> log.info('here inspecting:\n\t{p}\n\t{n}\n\t{i.f_li... | docstring for OutletsAPI | 62598ee02ae34c7f260a96c8 |
class RPkgmaker(RPackage): <NEW_LINE> <INDENT> homepage = "https://renozao.github.io/pkgmaker" <NEW_LINE> url = "https://cran.r-project.org/src/contrib/pkgmaker_0.22.tar.gz" <NEW_LINE> list_url = "https://cran.r-project.org/src/contrib/Archive/pkgmaker" <NEW_LINE> version('0.22', '73a0c6d3e84c6dadf3de7582ef7e88a4'... | This package provides some low-level utilities to use for package
development. It currently provides managers for multiple package specific
options and registries, vignette, unit test and bibtex related utilities.
It serves as a base package for packages like NMF, RcppOctave, doRNG, and
as an incubator package for othe... | 62598ee0379a373c97d975db |
@dataclasses.dataclass <NEW_LINE> class ConfiguredDevice: <NEW_LINE> <INDENT> device_name: str <NEW_LINE> device_type: EDeviceType <NEW_LINE> device_number: int <NEW_LINE> unique_id: str <NEW_LINE> @staticmethod <NEW_LINE> def from_dict(cd_dict: Dict[str, Any]) -> 'ConfiguredDevice': <NEW_LINE> <INDENT> return Configur... | The fields of an Alpaca Configured Device value. | 62598ee0d7e4931a7ef3a67c |
class Event(object): <NEW_LINE> <INDENT> def __init__(self, data=None, stanza=None, time=None, host=None, index=None, source=None, sourcetype=None, done=True, unbroken=True): <NEW_LINE> <INDENT> self.data = data <NEW_LINE> self.done = done <NEW_LINE> self.host = host <NEW_LINE> self.index = index <NEW_LINE> self.source... | Represents an event or fragment of an event to be written by this modular input to Splunk.
To write an input to a stream, call the ``write_to`` function, passing in a stream. | 62598ee08e71fb1e983ba050 |
class ExpressRouteServiceProvider(Resource): <NEW_LINE> <INDENT> _validation = { 'name': {'readonly': True}, 'type': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'ty... | A ExpressRouteResourceProvider object.
Variables are only populated by the server, and will be ignored when
sending a request.
:param id: Resource ID.
:type id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param location: Resource location.
:type location: str
:para... | 62598ee091f36d47f2230194 |
class PackageBugCommand(BaseCommand): <NEW_LINE> <INDENT> find_config = False <NEW_LINE> @staticmethod <NEW_LINE> def build_parser(parser) -> ArgumentParser: <NEW_LINE> <INDENT> builders.build_config(parser) <NEW_LINE> builders.build_venv(parser) <NEW_LINE> builders.build_output(parser) <NEW_LINE> builders.build_api(pa... | Report bug in a package.
| 62598ee03617ad0b5ee0470f |
class DisciplineEnterForm(forms.Form): <NEW_LINE> <INDENT> password = forms.CharField( label=_('Access Password'), max_length=30, widget=forms.PasswordInput ) | Form to insert students and monitors in the discipline. | 62598ee00a50d4780f70398a |
class AllReduce(autograd.Function): <NEW_LINE> <INDENT> def __init__(self, key): <NEW_LINE> <INDENT> super(AllReduce, self).__init__() <NEW_LINE> self.xsumkey = key + 'sum' <NEW_LINE> self.xsqukey = key + 'squ' <NEW_LINE> <DEDENT> def forward(self, isum, isqu): <NEW_LINE> <INDENT> sharedTensorDict.push(self.xsumkey, is... | All Reduce Operation | 62598ee076e4537e8c3edb98 |
class TwilioTrunkingClient(TwilioClient): <NEW_LINE> <INDENT> def __init__(self, account=None, token=None, base="https://trunking.twilio.com", version="v1", timeout=UNSET_TIMEOUT, request_account=None): <NEW_LINE> <INDENT> super(TwilioTrunkingClient, self).__init__(account, token, base, version, timeout, request_accoun... | A client for accessing the Twilio Trunking API
:param str account: Your Account SID from `your dashboard
<https://twilio.com/user/account>`_
:param str token: Your Auth Token from `your dashboard
<https://twilio.com/user/account>`_
:param float timeout: The socket and read timeout for requests to Twilio | 62598ee08a43f66fc4bf0753 |
class Response(ModelNoTitleNoRequiredNoPropTitle): <NEW_LINE> <INDENT> default: bytes | Simple Description | 62598ee0a219f33f346c4e19 |
class TestCalendarDialog(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.cd = CalendarDialog(application=mock.MagicMock()) <NEW_LINE> self.cd.calendar = Gtk.Calendar() <NEW_LINE> self.cd.calendar.select_month(3, 2017) <NEW_LINE> self.cd.calendar.select_day(2) <NEW_LINE> <DEDENT> def te... | The unit tests for the CalendarDialog class. | 62598ee0eab8aa0e5d30a359 |
class PostsFeedView(LoginRequiredMixin, ListView): <NEW_LINE> <INDENT> template_name = 'posts/feed.html' <NEW_LINE> model = Post <NEW_LINE> ordering = ('-created',) <NEW_LINE> paginate_by = 2 <NEW_LINE> context_object_name = 'posts' | Retunr all published posts. | 62598ee0090684286d5929d0 |
class SlackResponse: <NEW_LINE> <INDENT> def __init__(self, text=None, response_type="in_channel", replace_original=True): <NEW_LINE> <INDENT> self.response_dict = dict() <NEW_LINE> self.attachments = [] <NEW_LINE> self._is_prepared = False <NEW_LINE> if text is not None: <NEW_LINE> <INDENT> self.response_dict['text'] ... | Class used for easy crafting of a Slack response | 62598ee08c0ade5d55dc2974 |
class ValidatorMap( namedtuple('_VMap', 'query path form headers body response') ): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> @classmethod <NEW_LINE> def from_operation(cls, operation, models, resolver): <NEW_LINE> <INDENT> args = [] <NEW_LINE> for schema, validator in [ (build_param_schema(operation, 'query'), Swa... | A data object with validators for each part of the request and response
objects. Each field is a :class:`SchemaValidator`. | 62598ee091af0d3eaad383f9 |
class FilterModule(object): <NEW_LINE> <INDENT> def filters(self): <NEW_LINE> <INDENT> return { 'bridge_name': bridge_name, 'peer_link_name': peer_link_name, 'physnet_index_to_name': physnet_index_to_name, 'physnet_name_to_index': physnet_name_to_index, 'source_link_name': source_link_name, 'source_to_peer_link_name': ... | Tenks filters
NOTE(w-miller): The Libvirt filters need to use some of the network name
filters. Due to Ansible issue #27748, filter plugins cannot import any
custom Python modules, so we can't have a Libvirt filters file that imports
a network filters file; for the same reason, we can't have a shared utils
file either... | 62598ee0a8370b77170ee9c6 |
class EdxNotesFixtureError(Exception): <NEW_LINE> <INDENT> pass | Error occurred while installing a edxnote fixture. | 62598ee02ae34c7f260a96c9 |
class ITC080301_CreateDisk(BaseTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.dm = super(self.__class__, self).setUp() <NEW_LINE> <DEDENT> def test_CreateDisk_iscsi_cow(self): <NEW_LINE> <INDENT> self.flag = True <NEW_LINE> diskapi = DiskAPIs() <NEW_LINE> LogPrint().info("Test: Create cow type... | @summary: ITC-08磁盘管理-03创建磁盘-01成功创建 | 62598ee04a966d76dd5ed4c5 |
class Averager(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.reset() <NEW_LINE> <DEDENT> def add(self, v): <NEW_LINE> <INDENT> count = v.data.numel() <NEW_LINE> v = v.data.sum() <NEW_LINE> self.n_count += count <NEW_LINE> self.sum += v <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT>... | Compute average for torch.Tensor, used for loss average. | 62598ee01f037a2d8b9e26e8 |
class _CommonSystemHealthBenchmark(perf_benchmark.PerfBenchmark): <NEW_LINE> <INDENT> def CreateTimelineBasedMeasurementOptions(self): <NEW_LINE> <INDENT> options = timeline_based_measurement.Options( chrome_trace_category_filter.ChromeTraceCategoryFilter()) <NEW_LINE> options.config.chrome_trace_config.category_filter... | Chrome Common System Health Benchmark.
This test suite contains system health benchmarks that can be collected
together due to the low overhead of the tracing agents required. If a
benchmark does have significant overhead, it should either:
1) Be rearchitected such that it doesn't. This is the most preferred option... | 62598ee092d797404e387e6c |
class Video(models.Model): <NEW_LINE> <INDENT> playlist = models.ForeignKey(Playlist) <NEW_LINE> identifier = models.SlugField(max_length=20) <NEW_LINE> name = models.CharField(max_length=200) <NEW_LINE> order = models.PositiveSmallIntegerField() <NEW_LINE> created = models.DateTimeField() <NEW_LINE> def __unicode__(se... | Class for videos | 62598ee06fb2d068a7693113 |
class NexusDict(dict): <NEW_LINE> <INDENT> def __init__(self,*args,**kwargs): <NEW_LINE> <INDENT> dict.__init__(self,*args,**kwargs) <NEW_LINE> self._fields = [] <NEW_LINE> <DEDENT> def __getitem__(self, key): <NEW_LINE> <INDENT> return dict.__getitem__(self,key.upper())[1] <NEW_LINE> <DEDENT> def __setitem__(self, key... | Dictionary, that has case-insensitive keys.
Dictionary also maintains order of items.
Keys are retained in their original form
when queried with keys() or items().
Implementation: Inherites from dict. All key lookups are done
against the uppercase keys, but all methods that expose keys to
the user retrieve the ori... | 62598ee03539df3088eca893 |
class CyRestClient(object): <NEW_LINE> <INDENT> def __init__(self, ip=IP, port=PORT, version=VERSION): <NEW_LINE> <INDENT> self.__url = 'http://' + ip + ':' + str(port) + '/' + version + '/' <NEW_LINE> self.network = NetworkClient(self.__url) <NEW_LINE> self.style = StyleClient(self.__url) <NEW_LINE> self.layout = Layo... | This class is the most basic class to use Cytoscape programatically.
In this class, you can use all methods to controll Cytoscape.
So, if you want to use py2cytoscape, the first step is to call this class. | 62598ee0cad5886f8bdc38e2 |
class Preferences(gtk.Window): <NEW_LINE> <INDENT> def __init__(self, parent=None, mode='user'): <NEW_LINE> <INDENT> gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL) <NEW_LINE> self.mode = mode <NEW_LINE> self.mainwin = parent <NEW_LINE> if self.mode == 'user': <NEW_LINE> <INDENT> self.current = parent.read_config() <NEW... | Ventana de preferencias de Turpial | 62598ee0e5267d203ee69ee6 |
class Entity(object): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> self.data = data <NEW_LINE> self.index = 'towns' <NEW_LINE> self.doc_type = 'town' <NEW_LINE> self._id = data['id'] <NEW_LINE> <DEDENT> def json(self): <NEW_LINE> <INDENT> return json.dumps(self.data) | Entity. | 62598ee0a17c0f6771d5a837 |
class LicensingProcessStatus (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): <NEW_LINE> <INDENT> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'LicensingProcessStatus') <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('http://ddex.net/xml/20100121/ddex.xsd', 725, 4) <NEW_LINE> _Docu... | An operational status of a licensing process. | 62598ee0d486a94d0ba2a5b9 |
class CreateReleaseFileResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Msg = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Msg = params.get("Msg") <NEW_LINE> self.RequestId = params.get("RequestId") | CreateReleaseFile返回参数结构体
| 62598ee045492302aabfaa95 |
class TestSelectedUnitVal(test_bot.TestBot): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(TestSelectedUnitVal, self).setUp() <NEW_LINE> self.array = {} <NEW_LINE> ir_analog_input_gpios = self.config["ir_analog_input_gpios"] <NEW_LINE> self.name = ir_analog_input_gpios.keys()[0] <NEW_LINE> self.gpio = ... | Test getter for the currently selected unit of an IR array. | 62598ee067a9b606de5445b1 |
class DZN(models.Model): <NEW_LINE> <INDENT> info = models.OneToOneField( EyeInfo, verbose_name='Информация о глазе', on_delete=models.CASCADE, related_name='dzn' ) <NEW_LINE> color = models.CharField('Цвет', max_length=100, default='') <NEW_LINE> border = models.CharField('Границы', max_length=100, default='') <NEW_LI... | Диск зрительного нерва | 62598ee03eb6a72ae0388c24 |
class StripeCardView(LoginRequiredMixin, View): <NEW_LINE> <INDENT> login_url = '/login/' <NEW_LINE> redirect_field_name = 'redirect_to' <NEW_LINE> def get(self, request): <NEW_LINE> <INDENT> return render(request, 'user/stripe.html', {'publishable': settings.STRIPE_PUBLISHABLE}) <NEW_LINE> <DEDENT> def post(self, requ... | Create new stripe token based on a card data | 62598ee0fff4ab517ebcbdc7 |
class ContentType(Model): <NEW_LINE> <INDENT> collection_name = 'content_types' <NEW_LINE> unique_indices = ('id',) <NEW_LINE> def __init__(self, id, display_name, description, unit_key, search_indexes, referenced_types): <NEW_LINE> <INDENT> super(ContentType, self).__init__() <NEW_LINE> self.id = id <NEW_LINE> self.di... | Represents a content type supported by the Pulp server. This is purely the
metadata about the type and will not contain any instances of content of
the type.
@ivar id: uniquely identifies the type
@type id: str
@ivar display_name: user-friendly name of the content type
@type display_name: str
@ivar description: user... | 62598ee01b99ca400228e7fe |
class Dog(AbstractAnimal): <NEW_LINE> <INDENT> def setup(self, definition) : <NEW_LINE> <INDENT> self.definition = definition['Dog'] <NEW_LINE> return <NEW_LINE> <DEDENT> def Speak(self) : <NEW_LINE> <INDENT> return self.definition['speak'] <NEW_LINE> <DEDENT> def Description(self) : <NEW_LINE> <INDENT> return self.def... | Define a product object to be created by the corresponding concrete
factory.
Implement the AbstractProduct interface. | 62598ee0442bda511e95aa4a |
class BSplineBasis: <NEW_LINE> <INDENT> def __init__(self, knots, degree): <NEW_LINE> <INDENT> self.low = knots[0] <NEW_LINE> self.high = knots[-1] <NEW_LINE> self._iknots = knots[1:-1] <NEW_LINE> self.degree = degree <NEW_LINE> lo = [self.low] * self.order <NEW_LINE> hi = [self.high] * self.order <NEW_LINE> self._knot... | An encoder mapping from a scalar to a basis representation.
| 62598ee0bd1bec0571e143bd |
class Future: <NEW_LINE> <INDENT> def __init__(self, func, *args, **kwargs): <NEW_LINE> <INDENT> self._result = None <NEW_LINE> args = list(args) <NEW_LINE> args.insert(0, func) <NEW_LINE> self.exc = None <NEW_LINE> def wrapper(func, *args, **kwargs): <NEW_LINE> <INDENT> self.exc = None <NEW_LINE> try: <NEW_LINE> <INDE... | Very basic implementation of a async future. | 62598ee0eab8aa0e5d30a35b |
class WindowsServicesAnalysisArgumentsHelper(interface.ArgumentsHelper): <NEW_LINE> <INDENT> NAME = 'windows_services' <NEW_LINE> CATEGORY = 'analysis' <NEW_LINE> DESCRIPTION = 'Argument helper for the Windows Services analysis plugin.' <NEW_LINE> _DEFAULT_OUTPUT = 'text' <NEW_LINE> @classmethod <NEW_LINE> def AddArgum... | Windows Services analysis plugin CLI arguments helper. | 62598ee07cff6e4e811b3fd0 |
class CLIView(object): <NEW_LINE> <INDENT> def __init__(self, analyser): <NEW_LINE> <INDENT> self.__analyser = analyser <NEW_LINE> <DEDENT> def render(self): <NEW_LINE> <INDENT> result = '' <NEW_LINE> result += "Перелік країн:\n" <NEW_LINE> result += "\n".join(self.__analyser.countries()) <NEW_LINE> result += "\nПерелі... | classdocs | 62598ee030bbd7224646821c |
class ProfileListView(ListView): <NEW_LINE> <INDENT> context_object_name = 'profile_list' <NEW_LINE> page = 1 <NEW_LINE> paginate_by = 20 <NEW_LINE> template_name = 'accounts/profile_list.html' <NEW_LINE> extra_context = None <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super(ProfileLi... | Lists all profiles | 62598ee03c8af77a43b67224 |
class _ValueEditor(Editor): <NEW_LINE> <INDENT> readonly = Bool(False) <NEW_LINE> root = Instance(RootNode) <NEW_LINE> scrollable = True <NEW_LINE> def init(self, parent): <NEW_LINE> <INDENT> self.update_editor() <NEW_LINE> editor = TreeEditor( auto_open=self.factory.auto_open, hide_root=True, editable=False, nodes=val... | Simple style of editor for values, which displays a tree. | 62598ee060cbc95b0636291f |
class JAVSpider(Spider): <NEW_LINE> <INDENT> handle_httpstatus_list = (404,) <NEW_LINE> start_urls = () <NEW_LINE> pagination_xpath = None <NEW_LINE> pagination_text = 'text()' <NEW_LINE> def get_start_urls(self, urls): <NEW_LINE> <INDENT> for url in urls: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> with open(url) as ... | Custom Spider class for JAV scrapers.
Allow file containing `start_urls` to be specified in settings | 62598ee0a8370b77170ee9c8 |
class DeleteScheduleStepTestCase(WgerDeleteTestCase): <NEW_LINE> <INDENT> object_class = ScheduleStep <NEW_LINE> url = 'manager:step:delete' <NEW_LINE> pk = 2 | Tests editing a schedule | 62598ee0cc0a2c11144795e6 |
class TestAskbotUpdatedAnswer(Base): <NEW_LINE> <INDENT> expected_title = "askbot.post.edit" <NEW_LINE> expected_subti = ("ralph updated an answer " "to the question 'I have a new question'") <NEW_LINE> expected_secondary_icon = ("http://www.gravatar.com/avatar/" "2f933f4364baaabd2d3ab8f0664faef2?s=64&d=http%3A%2F%2F" ... | Messages get emitted on this topic anytime a question is updated.
An 'update' includes a new question, a new answer, and a modification
to either. *This* example is one of a **answer being modified** on
`Ask Fedora <https://ask.fedoraproject.org/questions/>`_. | 62598ee0796e427e5384cd7c |
class TopologyResource(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'associations': {'key': 'associations', 'type': '[TopologyAssociation]'}, } <NEW_LINE> def __init__( self... | The network resource topology information for the given resource group.
:param name: Name of the resource.
:type name: str
:param id: ID of the resource.
:type id: str
:param location: Resource location.
:type location: str
:param associations: Holds the associations the resource has with other resources in the
resou... | 62598ee030dc7b766599de6b |
class GetAccessTokenResponse(object): <NEW_LINE> <INDENT> _names = { "id":'id', "code":'code', "status":'status', "created_at":'created_at', "customer":'customer' } <NEW_LINE> def __init__(self, id=None, code=None, status=None, created_at=None, customer=None): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.code = cod... | Implementation of the 'GetAccessTokenResponse' model.
Response object for getting a access token
Attributes:
id (string): TODO: type description here.
code (string): TODO: type description here.
status (string): TODO: type description here.
created_at (datetime): TODO: type description here.
custo... | 62598ee0a8370b77170ee9c9 |
class JsonResponseMixin(object): <NEW_LINE> <INDENT> @cached_property <NEW_LINE> def json(self): <NEW_LINE> <INDENT> if not json_available: <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> return json.loads(self.data.decode("utf-8")) | Mixin with testing helper methods | 62598ee00a50d4780f70398d |
class XCheb: <NEW_LINE> <INDENT> def __init__(self, y): <NEW_LINE> <INDENT> self.y = y <NEW_LINE> self.ymin, self.ymax = np.amin(y), np.amax(y) <NEW_LINE> self.ymid = (self.ymax - self.ymin)/2 <NEW_LINE> <DEDENT> def get_normalized(self, y): <NEW_LINE> <INDENT> return (y - self.ymid)/(self.ymax - self.ymid) <NEW_LINE> ... | Chebyshev polynomial x range manipulator | 62598ee01f5feb6acb161235 |
class TestBaseModel(unittest.TestCase): <NEW_LINE> <INDENT> b1 = BaseModel() <NEW_LINE> b2 = BaseModel() <NEW_LINE> def test_docstring_module(self): <NEW_LINE> <INDENT> self.assertGreater(len(BaseModel.__doc__), 1) <NEW_LINE> <DEDENT> def test_pep8_FileStorage(self): <NEW_LINE> <INDENT> style = pep8.StyleGuide(quiet=Tr... | Test BaseModel class | 62598ee07b25080760ed5a7f |
class Song: <NEW_LINE> <INDENT> def __init__(self, track_id, song_id, artist, song_title): <NEW_LINE> <INDENT> self.track_id = track_id <NEW_LINE> self.song_id = song_id <NEW_LINE> self.artist = artist <NEW_LINE> self.song_title = song_title <NEW_LINE> <DEDENT> def get_track_id(self): <NEW_LINE> <INDENT> return self.tr... | docstring for Song | 62598ee0d7e4931a7ef3a680 |
class CollectionQuery(Query): <NEW_LINE> <INDENT> def __init__(self, mode=CMR_OPS): <NEW_LINE> <INDENT> Query.__init__(self, "collections", mode) <NEW_LINE> self._valid_formats_regex.extend([ "dif", "dif10", "opendata", "umm_json", "umm_json_v[0-9]_[0-9]" ]) <NEW_LINE> <DEDENT> def archive_center(self, center): <NEW_LI... | Class for querying collections from the CMR. | 62598ee0baa26c4b54d4d8b5 |
class OpenCLI: <NEW_LINE> <INDENT> def __init__(self, source, history_path, output_format=formatter.JSON, headers=None): <NEW_LINE> <INDENT> self.history_path = history_path <NEW_LINE> self.output_format = output_format <NEW_LINE> self.logger = logging.getLogger("open-cli") <NEW_LINE> self.logger.debug("Creating a pyth... | CLI processor. | 62598ee0d6c5a102081e0715 |
class UhooAirSensor(Entity): <NEW_LINE> <INDENT> def __init__(self, data, device, sensor_type): <NEW_LINE> <INDENT> self._uuid = device["serialNumber"] <NEW_LINE> self._device_class = SENSOR_TYPES[sensor_type]['device_class'] <NEW_LINE> self._name = '{0} {1}'.format(device['deviceName'], self._device_class) <NEW_LINE> ... | Implementation of a uHooAir device. | 62598ee03cc13d1c6d463d50 |
class Heartbeat(BaseRequest): <NEW_LINE> <INDENT> def get_heartbeat(self): <NEW_LINE> <INDENT> url = vari.BASE_URL + "/v1/heartbeat" <NEW_LINE> response = self.get_endpoint(url) <NEW_LINE> return json.loads(response.text) <NEW_LINE> <DEDENT> def get_teapot(self): <NEW_LINE> <INDENT> url = vari.BASE_URL + "/v1/teapot" <... | Class for Heartbeat endpoint methods. | 62598ee0e1aae11d1e7cdb31 |
class CtdpfCklWfpMetadataParticle(DataParticle): <NEW_LINE> <INDENT> def _build_parsed_values(self): <NEW_LINE> <INDENT> if len(self.raw_data[0]) != TIME_RECORD_BYTES: <NEW_LINE> <INDENT> raise SampleException("CtdpfCklWfpMetadataDataParticle: Received unexpected number of bytes %d" % len(self.raw_data[0])) <NEW_LINE> ... | Class for creating the metadata particle for ctdpf_ckl | 62598ee056b00c62f0fb0eb5 |
class HistoricalDataCache: <NEW_LINE> <INDENT> _cache = {} <NEW_LINE> def get(self, query_string): <NEW_LINE> <INDENT> print("Checking cache for: {}".format(query_string)) <NEW_LINE> query_hash = self._query_hash(query_string) <NEW_LINE> if not (query_hash in self.__class__._cache): <NEW_LINE> <INDENT> print("\t{}".for... | Represents a local cache for historical data. It maps historical data to
unique hashes of their query strings. This ensures only one db read is
performed for each historical query. | 62598ee02c8b7c6e89bd1da4 |
class Context: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass | The main context for Spider JIT. This will hold all the global information needed for the module being built.
| 62598ee0a219f33f346c4e1d |
class MockBlueprintTests(BlueprintTests): <NEW_LINE> <INDENT> BlueprintClass = MockBlueprint <NEW_LINE> db: LocalMephistoDB <NEW_LINE> data_dir: str <NEW_LINE> build_dir: str <NEW_LINE> def task_is_built(self, build_dir) -> bool: <NEW_LINE> <INDENT> expected_build_path = os.path.join(build_dir, MockTaskBuilder.BUILT_FI... | This class contains the basic data model tests that should
be passable for a blueprint. Runs the tests on the MockBlueprint,
which is the entry point for all blueprints. | 62598ee0442bda511e95aa4c |
class HostsActionCommonDialog(BaseLoggedInView): <NEW_LINE> <INDENT> title = None <NEW_LINE> table = SatTable("//div[@class='modal-body']//table") <NEW_LINE> keep_selected = Checkbox(id='keep_selected') <NEW_LINE> submit = Text('//button[@onclick="tfm.hosts.table.submitModalForm()"]') <NEW_LINE> @property <NEW_LINE> de... | Common base class Dialog for Hosts Actions | 62598ee04e4d5625663709fe |
class ServiceFilterICMP(ServiceFilter): <NEW_LINE> <INDENT> def __init__ (self): <NEW_LINE> <INDENT> self.services = defaultdict(list) <NEW_LINE> <DEDENT> def add (self, service): <NEW_LINE> <INDENT> self.services[(service.src_ip, service.id, service.seq, tuple(service.vlan))].append(service) <NEW_LINE> <DEDENT> def lo... | Service filter for ICMP services | 62598ee057b8e32f525073f8 |
@ClassFactory.register(ClassType.TRANSFORM) <NEW_LINE> class MaskTransform(object): <NEW_LINE> <INDENT> def __call__(self, masks, pad_shape, scale_factor, flip=False): <NEW_LINE> <INDENT> masks = [ mmcv.imrescale(mask, scale_factor, interpolation='nearest') for mask in masks ] <NEW_LINE> if flip: <NEW_LINE> <INDENT> ma... | Mask tramsform method, which contains.
1. resize masks to expected size and stack to a single array
2. flip the masks (if needed)
3. pad the masks (if needed) | 62598ee03c8af77a43b67225 |
class ExpressRouteCrossConnectionListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'next_link': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[ExpressRouteCrossConnection]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( se... | Response for ListExpressRouteCrossConnection API service call.
Variables are only populated by the server, and will be ignored when sending a request.
:param value: A list of ExpressRouteCrossConnection resources.
:type value: list[~azure.mgmt.network.v2019_04_01.models.ExpressRouteCrossConnection]
:ivar next_link: T... | 62598ee001c39578d7f1138d |
class FixedOperatorField(forms.ChoiceField): <NEW_LINE> <INDENT> def set_operator(self, operator, is_superuser=False): <NEW_LINE> <INDENT> if not is_superuser: <NEW_LINE> <INDENT> self.choices = ((operator.pk, operator.username),) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.choices = django.contrib.auth.models.U... | Form field class for the *fixed* selection of a single user. This is
intended for edit-process views when the operator must be the currently
logged-in user, or the previous operator. In other words, it must be
impossible to change it. Then, you can use this form field for the
operator, and hide the field from displa... | 62598ee0d53ae8145f916a71 |
class TagTree(persistent.Persistent): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._root = TagNode(name=None) <NEW_LINE> self._objects = IOBTree() <NEW_LINE> self._counter = 1 <NEW_LINE> <DEDENT> def create_tag(self, tag): <NEW_LINE> <INDENT> node = self._root <NEW_LINE> for level in tag: <NEW_LINE>... | Container, which allows objects access by tags.
| 62598ee0442bda511e95aa4d |
class Sum(CAReduceDtype): <NEW_LINE> <INDENT> __props__ = ("axis", "dtype", "acc_dtype") <NEW_LINE> def __init__(self, axis=None, dtype=None, acc_dtype=None): <NEW_LINE> <INDENT> CAReduceDtype.__init__(self, scalar.add, axis=axis, dtype=dtype, acc_dtype=acc_dtype) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDE... | Sums all the values of a tensor along the specified axis(es).
Equivalent to `CAReduceDtype(scalar.add, axis=axis, dtype=dtype)`,
with the difference that this defines the gradient of sum wrt its
tensor input.
Parameters
----------
axis
Axis(es) along which the tensor should be summed
(use None to sum over all... | 62598ee03317a56b869bd85a |
class TestSearchLoc: <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setup_class(cls): <NEW_LINE> <INDENT> cls.mock_data = { "data": { "geo_search": ['Great Wall of China'], "geo_search_with_radius": ['Great Wall of China', 'Jinshanling', 'Gubeikou'], "geo_search_with_existing_article_name": ['Great Wall of China'], "g... | Test the functionality of wikipedia.geosearch. | 62598ee0236d856c2adc8706 |
class Customer_history(models.Model): <NEW_LINE> <INDENT> mac = models.CharField(u'mac',max_length=64,default = "") <NEW_LINE> online_sign = models.CharField(u'online_sign',max_length=32, default = "",blank=True) <NEW_LINE> up = models.BigIntegerField(u'up',default = 0) <NEW_LINE> down = models.BigIntegerField(u'down',... | Description: Model Description | 62598ee0097d151d1a2bf604 |
class DBThing(Validator): <NEW_LINE> <INDENT> def __init__(self, param, cls, id_validator, **kwargs): <NEW_LINE> <INDENT> super(DBThing, self).__init__(param, **kwargs) <NEW_LINE> self.cls = cls <NEW_LINE> self.id_validator = id_validator <NEW_LINE> <DEDENT> def run(self, value, errors, request): <NEW_LINE> <INDENT> it... | An application-specific validator that converts ids into the object. | 62598ee0498bea3a75a5611b |
class DreamStorm: <NEW_LINE> <INDENT> def __init__(self, threads, tor=False): <NEW_LINE> <INDENT> self.counter = 0 <NEW_LINE> self.threads = threads <NEW_LINE> self.tor = tor <NEW_LINE> self.q = (Queue.Queue(), Queue.Queue()) <NEW_LINE> self.qq = [] <NEW_LINE> for i in xrange(self.threads): <NEW_LINE> <INDENT> self.qq.... | Main Engine of DreamStorm
It's just awesome... | 62598ee0656771135c487c77 |
class Layout(Widget): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> if self.__class__ == Layout: <NEW_LINE> <INDENT> raise Exception('The Layout class cannot be used.') <NEW_LINE> <DEDENT> kwargs.setdefault('size', (1, 1)) <NEW_LINE> self._minimum_size = (0, 0) <NEW_LINE> self._trigger_minimum_s... | Layout interface class, used to implement every layout. Check module
documentation for more information. | 62598ee0a8370b77170ee9cb |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.