code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class Ai(object): <NEW_LINE> <INDENT> def __init__(self, racket, ball): <NEW_LINE> <INDENT> self.ball = ball <NEW_LINE> self.racket = racket <NEW_LINE> <DEDENT> def move(self): <NEW_LINE> <INDENT> x = self.ball.rect.centerx <NEW_LINE> self.racket.move(x)
Przeciwnik, steruje swoją rakietką na podstawie obserwacji piłeczki.
62598f6dc432627299fa279f
class Rules(object): <NEW_LINE> <INDENT> def __init__(self, name, comment=None): <NEW_LINE> <INDENT> if name is None: <NEW_LINE> <INDENT> self.name = 'blueprint-generated-bcfg2-bundle' <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.name = str(name) <NEW_LINE> <DEDENT> self.comment = comment <NEW_LINE> self.rules = ...
A bcfg2 Rules file contains the literal components of the configuration entries referenced in Bundler.
62598f6d7c178a314d78cc6d
class DivByZero(Logic): <NEW_LINE> <INDENT> def __init__(self, a, b, zero=0.0): <NEW_LINE> <INDENT> super(DivByZero, self).__init__(a, b) <NEW_LINE> self.a = self.args[0] <NEW_LINE> self.b = self.args[1] <NEW_LINE> self.zero = zero <NEW_LINE> <DEDENT> def next(self): <NEW_LINE> <INDENT> b = self.b[0] <NEW_LINE> self[0]...
This operation is a Lines object and fills it values by executing a division on the numerator / denominator arguments and avoiding a division by zero exception by checking the denominator Params: - a: numerator (numeric or iterable object ... mostly a Lines object) - b: denominator (numeric or iterable object ... ...
62598f6dd10714528d69d697
class NetworkDeviceBriefNIOResult(object): <NEW_LINE> <INDENT> swagger_types = { 'response': 'NetworkDeviceBriefNIOResultResponse', 'version': 'str' } <NEW_LINE> attribute_map = { 'response': 'response', 'version': 'version' } <NEW_LINE> def __init__(self, response=None, version=None): <NEW_LINE> <INDENT> self._respons...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f6d30c21e258be97fcc
class BCE_Loss(torch.autograd.Function): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def forward(ctx, x, y, weight): <NEW_LINE> <INDENT> ctx.save_for_backward(x, y, weight) <NEW_LINE> clamp_log_x = torch.log(x) <NEW_LINE> clamp_log_x[clamp_log_x <-100] = -100 <NEW_LINE> clamp_log_1_x = torch.log(1-x) <NEW_LINE> clamp_...
This class is Binary Cross Entropy with Weighting that is used in the paper In paper, the loss is defined: Loss = - (y+epsilon) * (ylog(x) - (1-y)log(1-x)) I used Pytorch's idea for when x = 0 in log(x), where I used log-clamp. if log(x) is below -100, the value of log is -100 and the gradient is 0. Amirali
62598f6dd99f1b3c44d04e7f
class Commit: <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.__dict__.update(kwargs)
Git commit.
62598f6d30c21e258be97fcd
class OrOperation(BinaryOperation): <NEW_LINE> <INDENT> def negate(self): <NEW_LINE> <INDENT> return AndOperation( self.getLeftSubformula().negate() , self.getRightSubformula().negate() ) <NEW_LINE> <DEDENT> def makeSimple(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT>...
Operacja dysjunkcji
62598f6d50485f2cf55da739
class DataWriter(PetscComponent): <NEW_LINE> <INDENT> def __init__(self, name="datawriter"): <NEW_LINE> <INDENT> PetscComponent.__init__(self, name, facility="datawriter") <NEW_LINE> return <NEW_LINE> <DEDENT> def preinitialize(self): <NEW_LINE> <INDENT> self._createModuleObj() <NEW_LINE> return <NEW_LINE> <DEDENT> @st...
Python abstract base class for writing finite-element data.
62598f6d167d2b6e312b6748
class SegmentationDegradation(NetworkDegradationBase): <NEW_LINE> <INDENT> def __init__(self, device: str = 'cpu') -> None: <NEW_LINE> <INDENT> segmentation_network = SegmentationModule(ModelBuilder.build_encoder('resnet18dilated'), ModelBuilder.build_decoder('ppm_deepsup')) <NEW_LINE> segmentation_network.encoder.load...
This class represents semantic segmentation degradation, approximated by convolution neural network (CNN)
62598f6d21bff66bcd72242b
class NightlyDocUtil(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._nightly_dict: NightlyDict = _load_nightly_dict() <NEW_LINE> <DEDENT> def is_builder_nightly( self, builder: Union[tfds.core.DatasetBuilder, str], ) -> bool: <NEW_LINE> <INDENT> if isinstance(builder, tfds.core.DatasetBuilder...
Small util to format the doc.
62598f6dc432627299fa27a1
class TestingEnvironmentError(DavosAssertionError, OSError): <NEW_LINE> <INDENT> pass
Raised due to issues with the testing environment
62598f6d66656f66f7d59bbc
class WeChatBase(object): <NEW_LINE> <INDENT> logger_ok = False <NEW_LINE> def __init__(self, appname, ini_name): <NEW_LINE> <INDENT> self.appname = appname <NEW_LINE> if ini_name: <NEW_LINE> <INDENT> self.config = utils.get_config(ini_name) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.config = utils.get_config()...
微信消息发送与接收类的公共基类 负责进行日志的初始化工作等
62598f6d0383005118f6cece
class Constant: <NEW_LINE> <INDENT> def __init__(self,name): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> <DEDENT> @property <NEW_LINE> def name(self): <NEW_LINE> <INDENT> return self._name <NEW_LINE> <DEDENT> @property <NEW_LINE> def isConstantNode(self): <NEW_LINE> <INDENT> return True
Represent a constant object. A constant object is ignored for the scheduling. But it can be connected to CMSIS-DSP inputs. It is generated as DEFINE
62598f6d50485f2cf55da73a
class TestIterSourceCode(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.tempdir = tempfile.mkdtemp() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> shutil.rmtree(self.tempdir) <NEW_LINE> <DEDENT> def makeEmptyFile(self, *parts): <NEW_LINE> <INDENT> assert parts <NEW_LINE> fpath = ...
Tests for L{iterSourceCode}.
62598f6d1f037a2d8b9e38bb
class DOSubscriptionInfo(Resource): <NEW_LINE> <INDENT> id = CharField() <NEW_LINE> estimated_delivery_days = FloatField() <NEW_LINE> subscription_list_price = FloatField() <NEW_LINE> tos = CharField() <NEW_LINE> tos_link = CharField() <NEW_LINE> licenses = CharField() <NEW_LINE> licenses_link = CharField() <NEW_LINE> ...
Represents a Data Observatory Subscriptions in CARTO.
62598f6d5166f23b2e242ba7
class CountyApplicationReviewView(ApplicantFormViewBase): <NEW_LINE> <INDENT> template_name = "forms/county_form_review.jinja" <NEW_LINE> success_url = reverse_lazy('intake-thanks') <NEW_LINE> def get_form_class(self): <NEW_LINE> <INDENT> form_class = county_display_form_selector.get_combined_form_class( counties=self....
County application review page
62598f6d287bf620b627138c
class LocallyConnected1D(Layer): <NEW_LINE> <INDENT> def __init__(self, n_input_frame, input_frame_size, output_frame_size, kernel_w, stride_w=1, propagate_back=True, weight_regularizer=None, bias_regularizer=None, init_weight=None, init_bias=None, init_grad_weight=None, init_grad_bias=None, bigdl_type="float"): <NEW_L...
The `LocallyConnected1D` layer works similarly to the `TemporalConvolution` layer, except that weights are unshared, that is, a different set of filters is applied at each different patch of the input. The input tensor in `forward(input)` is expected to be a 2D tensor (`nInputFrame` x `inputFrameSize`) or a 3D tensor (...
62598f6d23e79379d538bccf
class And(Predicate): <NEW_LINE> <INDENT> def __init__(self, *preds): <NEW_LINE> <INDENT> self.p1, self.p2 = _multi_to_binary(preds, And) <NEW_LINE> <DEDENT> def _assert(self, modelset, i): <NEW_LINE> <INDENT> g = new_graph('g') <NEW_LINE> a = new_action('a') <NEW_LINE> s = new_modelset('s') <NEW_LINE> t = new_modelset...
`AND` two L predicates together.
62598f6d30c21e258be97fce
class GDMDiscoverable(BaseDiscoverable): <NEW_LINE> <INDENT> def __init__(self, netdis): <NEW_LINE> <INDENT> self.netdis = netdis <NEW_LINE> <DEDENT> def find_by_content_type(self, value): <NEW_LINE> <INDENT> return self.netdis.gdm.find_by_content_type(value) <NEW_LINE> <DEDENT> def find_by_data(self, values): <NEW_LIN...
GDM discoverable base class.
62598f6dbe8e80087fbbe82b
class ServiceCatalog(object): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self._catalog = dict() <NEW_LINE> sc = kwargs.get('service_catalog') or kwargs.get('serviceCatalog') <NEW_LINE> assert sc is not None <NEW_LINE> for service in sc: <NEW_LINE> <INDENT> atype, aname = service['type'...
A representation of a service catalog. Allows you to retrieve endpoints of a specific service
62598f6d167d2b6e312b674a
class Persistencer: <NEW_LINE> <INDENT> sub_tasks: list <NEW_LINE> class_version = 0.1 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.version = self.__class__.class_version <NEW_LINE> <DEDENT> def save(self, fh): <NEW_LINE> <INDENT> pickle.dump(self, fh) <NEW_LINE> <DEDENT> def _upgrade(self): <NEW_LINE> <INDE...
Abstract Class which handles persistence, including introducing new attributes for further development: Abstract upgrade class for Task, for unpickeling old save data with inadequate/insufficient attributes (able to do upgrades recursively)
62598f6d26238365f5fac343
class FTreeDistCommandline(_EmbossCommandLine): <NEW_LINE> <INDENT> def __init__(self, cmd = "ftreedist", **kwargs): <NEW_LINE> <INDENT> self.parameters = [_Option(["-intreefile", "intreefile"], ["input"], None, 1, "tree file to score (phylip)"), _Option(["-dtype", "dtype"], ["input"], None, 0, "distance type ([...
Commandline object for the ftreedist program from EMBOSS. ftreedist is an EMBOSS wrapper for the PHYLIP program treedist used for calulating distance measures between phylogentic trees.
62598f6d8c3a8732951f5d1d
class JS_OT_EditMode(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "myops.add_edit" <NEW_LINE> bl_label = "Edit/object Mode" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> bpy.ops.object.editmode_toggle() <NEW_LINE> return {'FINISHED'}
switch edit object mode
62598f6d1f5feb6acb162405
class TestRunners(unittest.SynchronousTestCase): <NEW_LINE> <INDENT> def test_id(self): <NEW_LINE> <INDENT> loader = runner.TestLoader() <NEW_LINE> suite = loader.loadDoctests(mockdoctest) <NEW_LINE> idPrefix = 'twisted.trial.test.mockdoctest.Counter' <NEW_LINE> for test in suite._tests: <NEW_LINE> <INDENT> self.assert...
Tests for Twisted's doctest support.
62598f6dff9c53063f519e25
class POLDIDataAnalysisEmptyFile(systemtesting.MantidSystemTest): <NEW_LINE> <INDENT> def runTest(self): <NEW_LINE> <INDENT> empty = PoldiLoadRuns(2015, 977) <NEW_LINE> peaks = PoldiCreatePeaksFromCell(SpaceGroup='F d -3 m', a=5.431, LatticeSpacingMin=0.7, Atoms='Si 0 0 0 1.0 0.01', OutputWorkspace='Si') <NEW_LINE> try...
This test runs PoldiDataAnalysis with Si data, using an empty workspace.
62598f6d1d351010ab8f330e
class RoseAppDirective(RoseDirective): <NEW_LINE> <INDENT> NAME = 'app' <NEW_LINE> LABEL = 'Rose App'
Directive for documenting Rose apps. Example: Click :guilabel:`source` to view source code. .. code-block:: rst .. rose:app:: foo An app called ``foo``.
62598f6d9b70327d1c57e57a
class AlphaBetaAgent(MultiAgentSearchAgent): <NEW_LINE> <INDENT> def getAction(self, gameState): <NEW_LINE> <INDENT> pacman_index = 0 <NEW_LINE> ghost_index = range(1, gameState.getNumAgents()) <NEW_LINE> largenum = sys.maxint <NEW_LINE> def TERMINAL(state, depth): <NEW_LINE> <INDENT> return state.isWin() or state.isLo...
Your minimax agent with alpha-beta pruning (question 3)
62598f6d63f4b57ef0085956
@inherit_doc <NEW_LINE> class RandomForestRegressor(JavaEstimator, HasFeaturesCol, HasLabelCol, HasPredictionCol, HasSeed, RandomForestParams, TreeRegressorParams, HasCheckpointInterval, JavaMLWritable, JavaMLReadable): <NEW_LINE> <INDENT> @keyword_only <NEW_LINE> def __init__(self, featuresCol="features", labelCol="la...
.. note:: Experimental `Random Forest <http://en.wikipedia.org/wiki/Random_forest>`_ learning algorithm for regression. It supports both continuous and categorical features. >>> from numpy import allclose >>> from pyspark.mllib.linalg import Vectors >>> df = sqlContext.createDataFrame([ ... (1.0, Vectors.dense(1....
62598f6d66656f66f7d59bbf
class TestConfigParams(unittest.TestCase): <NEW_LINE> <INDENT> def _runner(self, layer): <NEW_LINE> <INDENT> conf = layer.get_config() <NEW_LINE> assert (type(conf) == dict) <NEW_LINE> param = layer.get_params() <NEW_LINE> assert hasattr(param, '__iter__') <NEW_LINE> <DEDENT> def test_base(self): <NEW_LINE> <INDENT> la...
Test the constructor, config and params functions of all layers in core.
62598f6d0a366e3fb87dc194
class Solution: <NEW_LINE> <INDENT> def mergeSortedArray(self, A, m, B, n): <NEW_LINE> <INDENT> i = m - 1 <NEW_LINE> j = n - 1 <NEW_LINE> k = m + n - 1 <NEW_LINE> while i >= 0 and j >= 0: <NEW_LINE> <INDENT> if A[i] > B[j]: <NEW_LINE> <INDENT> A[k] = A[i] <NEW_LINE> i -= 1 <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> ...
@param: A: sorted integer array A which has m elements, but size of A is m+n @param: m: An integer @param: B: sorted integer array B which has n elements @param: n: An integer @return: nothing
62598f6d26238365f5fac345
class cd(Action): <NEW_LINE> <INDENT> usage = '<directory>' <NEW_LINE> needs_parm = False <NEW_LINE> def init(self, arg_list): <NEW_LINE> <INDENT> mydir = os.path.expanduser(os.path.expandvars(arg_list.get_next_string())) <NEW_LINE> self.directory = glob(mydir) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT>...
Changes to a new directory like UNIX 'cd'
62598f6d1d351010ab8f330f
class Moderation(models.Model): <NEW_LINE> <INDENT> editor = models.ForeignKey(User, on_delete=models.SET_NULL, null=True, related_name="moderated_objects", editable=False) <NEW_LINE> created_datetime = models.DateTimeField(auto_now_add=True, editable=False) <NEW_LINE> action = models.CharField(max_length=1, choices=[(...
62598f6d50485f2cf55da73e
class SubscriptionPolicies(Model): <NEW_LINE> <INDENT> _validation = { 'location_placement_id': {'readonly': True}, 'quota_id': {'readonly': True}, 'spending_limit': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'location_placement_id': {'key': 'locationPlacementId', 'type': 'str'}, 'quota_id': {'key': 'quotaId',...
Subscription policies. Variables are only populated by the server, and will be ignored when sending a request. :ivar location_placement_id: The subscription location placement ID. The ID indicates which regions are visible for a subscription. For example, a subscription with a location placement Id of Public_2014-0...
62598f6d8a349b6b43685a12
class InfluxQuerySet(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.query = InfluxQuery() <NEW_LINE> self.compiler = None <NEW_LINE> self.model = None <NEW_LINE> <DEDENT> def _fetch_results(self): <NEW_LINE> <INDENT> influx_query = self.compiler.compile(self.query) <NEW_LINE> result_set = cli...
Represent a lazy database lookup.
62598f6d711fe17d825dfeba
class PythonRepl(ReplTaskMixin, PythonExecutionTaskBase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def register_options(cls, register): <NEW_LINE> <INDENT> super(PythonRepl, cls).register_options(register) <NEW_LINE> register('--ipython', type=bool, help='Run an IPython REPL instead of the standard python one.') <NE...
Launch an interactive Python interpreter session.
62598f6dd99f1b3c44d04e85
class GoWESTAgent(Agent): <NEW_LINE> <INDENT> def getAction(self, state): <NEW_LINE> <INDENT> if Directions.WEST in state.getLegalPacmanActions(): <NEW_LINE> <INDENT> return Directions.WEST <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> return Directions.STOP
An agent that goes WEST until it can't.
62598f6d50485f2cf55da73f
class FilterForm(FlaskForm): <NEW_LINE> <INDENT> user = TextField('User (n.ethz, RFID or AMIV User ID)') <NEW_LINE> date_from = DateField('Start date') <NEW_LINE> date_to = DateField('End date') <NEW_LINE> organisation = SelectField('Organisation', choices=[(None, 'all'), *OrganisationEnum.choices()], coerce=Organisati...
Form for filtering statistics list
62598f6dd6c5a102081e1915
class Solution: <NEW_LINE> <INDENT> @timeit <NEW_LINE> def runningSum(self, nums: List[int]) -> List[int]: <NEW_LINE> <INDENT> pre = [] <NEW_LINE> c = 0 <NEW_LINE> for x in nums: <NEW_LINE> <INDENT> c += x <NEW_LINE> pre.append(c) <NEW_LINE> <DEDENT> return pre
[1480. 一维数组的动态和](https://leetcode-cn.com/problems/running-sum-of-1d-array/)
62598f6dd10714528d69d69e
class GanSystem(pl.LightningModule): <NEW_LINE> <INDENT> def __init__(self, discriminator, generator, opt_d, opt_g, discriminator_loss, generator_loss, train_loader, validation_loss=None, val_loader=None, scheduler_d=None, scheduler_g=None, conf=None): <NEW_LINE> <INDENT> super(GanSystem, self).__init__() <NEW_LINE> se...
Base class for training GANs. Usually, a 'train_procedure.py' file, specific to each recipe, implements a class that inherit from this one and overrides at least the 'training_step' method. Args: discriminator (torch.nn.Module): Instance of discriminator (d). generator (torch.nn.Module): Instance of generat...
62598f6d1d351010ab8f3312
class TestEfergySensor(unittest.TestCase): <NEW_LINE> <INDENT> DEVICES = [] <NEW_LINE> @requests_mock.Mocker() <NEW_LINE> def add_entities(self, devices, mock): <NEW_LINE> <INDENT> mock_responses(mock) <NEW_LINE> for device in devices: <NEW_LINE> <INDENT> device.update() <NEW_LINE> self.DEVICES.append(device) <NEW_LINE...
Tests the Efergy Sensor platform.
62598f6dc432627299fa27a8
class agilentDSO7052B(agilent7000B): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.__dict__.setdefault('_instrument_id', 'DSO7052B') <NEW_LINE> super(agilentDSO7052B, self).__init__(*args, **kwargs) <NEW_LINE> self._analog_channel_count = 2 <NEW_LINE> self._digital_channel_count = 0 ...
Agilent InfiniiVision DSO7052B IVI oscilloscope driver
62598f6d91af0d3eaad395dd
class Meteorite: <NEW_LINE> <INDENT> def createName(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> <DEDENT> def displayName(self): <NEW_LINE> <INDENT> return self.name <NEW_LINE> <DEDENT> def to_string(self): <NEW_LINE> <INDENT> return "{} was a meteorite".format(self.name)
A simple meteorite class
62598f6d63f4b57ef0085958
class NextWeeklyScheduleView(views.APIView): <NEW_LINE> <INDENT> authentication_classes = (TokenAuthentication,) <NEW_LINE> permission_classes = (IsAuthenticated,) <NEW_LINE> serializer_class = AuthorizationSerializer <NEW_LINE> def get(self, request, format=None): <NEW_LINE> <INDENT> user = request.user <NEW_LINE> tod...
API endpoint to get user schedule for next week
62598f6d1f037a2d8b9e38c2
class PrettyPrint(Print): <NEW_LINE> <INDENT> def print(self, data): <NEW_LINE> <INDENT> pp(data)
Pretty-prints the data
62598f6d0383005118f6ced5
class Source(Pio): <NEW_LINE> <INDENT> def __init__(self, producer=None, url=None, tags=None, **kwargs): <NEW_LINE> <INDENT> super(Source, self).__init__(tags=tags, **kwargs) <NEW_LINE> self._producer = None <NEW_LINE> self.producer = producer <NEW_LINE> self._url = None <NEW_LINE> self.url = url <NEW_LINE> <DEDENT> @p...
Information about the source of a system.
62598f6d50485f2cf55da741
class WebsocketAuthenticationMessage(WebsocketMessage): <NEW_LINE> <INDENT> def __init__(self, access_token: str) -> None: <NEW_LINE> <INDENT> super().__init__(type_='authentication', data=access_token)
Container for an authentication message sent via websockets.
62598f6d15baa7234946175c
class Calibrate(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def Quit(cls, command, identifier, flag, value): <NEW_LINE> <INDENT> return formatter.FormatSkippyCommand(command, identifier, flag, value) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def Start(cls, command, identifier, flag, value): <NEW_LINE> <INDEN...
Help: Start and stop self calibration.
62598f6d1f5feb6acb16240b
class ABOD(BaseAnomalyDetector): <NEW_LINE> <INDENT> def __init__(self, n_k): <NEW_LINE> <INDENT> self.n_k = n_k <NEW_LINE> <DEDENT> def predict(self, A): <NEW_LINE> <INDENT> num_instances = A.shape[0] <NEW_LINE> var_array = [] <NEW_LINE> n_k = min(self.n_k, num_instances) <NEW_LINE> for i in range(num_instances): <NEW...
Angle Based Outlier Detector Uses the fast ABOD algorithm of "Angle-Based Outlier Detection in High-dimensional Data In KDD2008" [Hans-Peter, Kriegel Matthias, Schubert Arthur Zimek]
62598f6e287bf620b6271394
class CeseBC(BC): <NEW_LINE> <INDENT> from solvcon.dependency import getcdll <NEW_LINE> __clib_ceseb = { 2: getcdll('ceseb2d', raise_on_fail=False), 3: getcdll('ceseb3d', raise_on_fail=False), } <NEW_LINE> del getcdll <NEW_LINE> @property <NEW_LINE> def _clib_ceseb(self): <NEW_LINE> <INDENT> return self.__clib_ceseb[se...
Base class for all BC types for CESE method, except periodic BC. @cvar _ghostgeom_: selector for the ghost geometry caculator. @ctype _ghostgeom_: str
62598f6e63f4b57ef0085959
class TestBFS(unittest.TestCase): <NEW_LINE> <INDENT> def test_connected_graph(self): <NEW_LINE> <INDENT> graph = {'A': ['B', 'C'], 'B': ['F', 'D'], 'C': ['D', 'E'], 'D': [], 'E': [], 'F': [] } <NEW_LINE> start = 'A' <NEW_LINE> out_visited = ['A', 'B', 'C', 'F', 'D', 'E'] <NEW_LINE> self.assertEqual(bfs(graph, start), ...
Test cases: Connected graph: regular graph Cyclical graph: A -> B -> A
62598f6e50485f2cf55da742
class Stack : <NEW_LINE> <INDENT> def __init__(self, text="") : <NEW_LINE> <INDENT> self.items = list(text) <NEW_LINE> <DEDENT> def push(self, item) : <NEW_LINE> <INDENT> self.items.append(item) <NEW_LINE> <DEDENT> def pop(self) : <NEW_LINE> <INDENT> if not self.is_empty(): <NEW_LINE> <INDENT> return self.items.pop() <...
Stack class
62598f6ed18da76e235b6d20
class Application(tornado.web.Application): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> handlers = [ (r'/', MainHandler), (r'/storage/', StorageHandler), ] <NEW_LINE> settings = { 'template_path': 'templates', 'static_path': 'static', 'ui_modules': {'Result': SolutionModule}, 'debug': True } <NEW_LINE> ...
Create tornado web-app
62598f6ed6c5a102081e1919
class SimpleLogger: <NEW_LINE> <INDENT> def __init__(self, landingdir, name, test): <NEW_LINE> <INDENT> landingAbs = os.path.join(landingdir, name) <NEW_LINE> if not os.path.exists(landingdir): <NEW_LINE> <INDENT> os.makedirs(landingdir) <NEW_LINE> <DEDENT> self.loggerfile = open(landingAbs, "w") <NEW_LINE> self.logger...
A highly simplified logger used in tapestry's testing.
62598f6e167d2b6e312b6752
class MacMorphoCorpusReader(TaggedCorpusReader): <NEW_LINE> <INDENT> def __init__(self, root, fileids, encoding=None, tag_mapping_function=None): <NEW_LINE> <INDENT> TaggedCorpusReader.__init__( self, root, fileids, sep='_', word_tokenizer=LineTokenizer(), sent_tokenizer=RegexpTokenizer('.*\n'), para_block_reader=self....
A corpus reader for the MAC_MORPHO corpus. Each line contains a single tagged word, using '_' as a separator. Sentence boundaries are based on the end-sentence tag ('_.'). Paragraph information is not included in the corpus, so each paragraph returned by ``self.paras()`` and ``self.tagged_paras()`` contains a single...
62598f6e1d351010ab8f3316
class SniffSource(Source): <NEW_LINE> <INDENT> def __init__(self, iface=None, filter=None, socket=None, name=None): <NEW_LINE> <INDENT> Source.__init__(self, name=name) <NEW_LINE> if (iface or filter) and socket: <NEW_LINE> <INDENT> raise ValueError("iface and filter options are mutually exclusive " "with socket") <NEW...
Read packets from an interface and send them to low exit. +-----------+ >>-| |->> | | >-| [iface]--|-> +-----------+ If neither of the ``iface`` or ``socket`` parameters are specified, then Scapy will capture from the first network interface. :param iface: A layer 2 interface...
62598f6e8a43f66fc4bf1953
class BlueGalaxySpectrum(Spectrum): <NEW_LINE> <INDENT> def __init__(self, redshift=0.0): <NEW_LINE> <INDENT> fitsfile = os.path.join(os.environ['ENYO_DIR'], 'data/galaxy/blue_galaxy_8329-6104.fits') <NEW_LINE> hdu = fits.open(fitsfile) <NEW_LINE> wave = hdu['WAVE'].data * (1+redshift) <NEW_LINE> flux = hdu['FLUX'].dat...
An example blue galaxy spectrum pulled from the MaNGA survey.
62598f6ed53ae8145f917c6d
class Help: <NEW_LINE> <INDENT> def __init__(self, key_help, key_split, help_dict): <NEW_LINE> <INDENT> self.reply = '' <NEW_LINE> self.key_help = key_help <NEW_LINE> self.key_split = key_split <NEW_LINE> self.help_dict = help_dict <NEW_LINE> self.lang = detect(list(help_dict.values())[0]) <NEW_LINE> <DEDENT> def handl...
help info system, en version
62598f6e23e79379d538bcd8
class NullDeviceUpdater(object): <NEW_LINE> <INDENT> implements(IDeviceUpdater) <NEW_LINE> def update(self, device, dev_info, request, request_type): <NEW_LINE> <INDENT> return defer.succeed(None)
Device updater that updates nothing.
62598f6ed4950a0f3b110a22
class msg_pair_to_var(gr.sync_block): <NEW_LINE> <INDENT> def __init__(self, callback): <NEW_LINE> <INDENT> gr.sync_block.__init__(self, name="msg_pair_to_var", in_sig=None, out_sig=None) <NEW_LINE> self.callback = callback <NEW_LINE> self.message_port_register_in(pmt.intern("inpair")) <NEW_LINE> self.set_msg_handler(p...
This block will take an input message pair and allow you to set a gnuradio variable.
62598f6efb3f5b602db47d9b
class HTTPConfiguration(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'method': {'key': 'method', 'type': 'str'}, 'headers': {'key': 'headers', 'type': '[HTTPHeader]'}, 'valid_status_codes': {'key': 'validStatusCodes', 'type': '[int]'}, } <NEW_LINE> def __init__( self, *, method: Optional[Union[st...
HTTP configuration of the connectivity check. :param method: HTTP method. Possible values include: "Get". :type method: str or ~azure.mgmt.network.v2019_06_01.models.HTTPMethod :param headers: List of HTTP headers. :type headers: list[~azure.mgmt.network.v2019_06_01.models.HTTPHeader] :param valid_status_codes: Valid ...
62598f6ed10714528d69d6a3
class ForwardController(base_tests.SimpleDataPlane): <NEW_LINE> <INDENT> def runTest(self): <NEW_LINE> <INDENT> logging.info("Running Forward_Controller test") <NEW_LINE> of_ports = config["port_map"].keys() <NEW_LINE> of_ports.sort() <NEW_LINE> self.assertTrue(len(of_ports) > 1, "Not enough ports for test") <NEW_LINE>...
ForwardController : Packet is sent to controller output.port = OFPP_CONTROLLER
62598f6e50485f2cf55da745
class OverrideableSettings(): <NEW_LINE> <INDENT> def __init__(self, settings=None, overrides=None): <NEW_LINE> <INDENT> self._settings = settings <NEW_LINE> self._overrides = overrides <NEW_LINE> <DEDENT> def set_settings(self, settings): <NEW_LINE> <INDENT> self._settings = settings <NEW_LINE> <DEDENT> def set_overri...
Class for adding a layer of overrides on top of a Settings object The class is read-only. If a dictionary-like _overrides member is present, the get() method will look there first for a setting before reading from the _settings member.
62598f6e4d74a7450cd58ac4
class EnquiryFolder(ATBTreeFolder): <NEW_LINE> <INDENT> security = ClassSecurityInfo() <NEW_LINE> archetype_name = 'EnquiryFolder' <NEW_LINE> meta_type = 'EnquiryFolder' <NEW_LINE> portal_type = 'EnquiryFolder' <NEW_LINE> _at_rename_after_creation = True <NEW_LINE> schema = EnquiryFolder_schema <NEW_LINE> security.decl...
Enquiry Folder
62598f6ecad5886f8bdc4af6
class V(StdGate): <NEW_LINE> <INDENT> r <NEW_LINE> def __init__(self, q0: Qubit) -> None: <NEW_LINE> <INDENT> super().__init__(qubits=[q0]) <NEW_LINE> <DEDENT> @property <NEW_LINE> def hamiltonian(self) -> Pauli: <NEW_LINE> <INDENT> (q0,) = self.qubits <NEW_LINE> return (sX(q0) - 1) * PI / 4 <NEW_LINE> <DEDENT> @cached...
Principal square root of the X gate, X-PLUS-90 gate.
62598f6e925a0f43d25e7812
class TestIbmPublishObject(): <NEW_LINE> <INDENT> def preprocess_url(self, request_url: str): <NEW_LINE> <INDENT> request_url = urllib.parse.unquote(request_url) <NEW_LINE> request_url = urllib.parse.quote(request_url, safe=':/') <NEW_LINE> if re.fullmatch('.*/+', request_url) is None: <NEW_LINE> <INDENT> return reques...
Test Class for ibm_publish_object
62598f6ed6c5a102081e191b
class EpmiWeighting(Scaling): <NEW_LINE> <INDENT> _name = 'epmi' <NEW_LINE> _uses_column_stats = True <NEW_LINE> def apply(self, matrix_, column_marginal=None): <NEW_LINE> <INDENT> matrix_.assert_positive() <NEW_LINE> row_sum = matrix_.sum(axis = 1) <NEW_LINE> if not column_marginal is None: <NEW_LINE> <INDENT> col_sum...
Exponential Point-wise Mutual Information. :math:`epmi(r,c) = \frac{P(r,c)}{P(r)P(c)}`
62598f6ed18da76e235b6d21
class is_developable(Variable): <NEW_LINE> <INDENT> def dependencies(self): <NEW_LINE> <INDENT> return [my_attribute_label('development_type_id')] <NEW_LINE> <DEDENT> def compute(self, dataset_pool): <NEW_LINE> <INDENT> filter = dataset_pool.get_dataset('development_filter') <NEW_LINE> valid_from_ids = filter.get_attri...
Boolean indicating whether the gridcell is suitable to convert to landuse type DDD
62598f6e26238365f5fac34d
class KatanaError(Exception): <NEW_LINE> <INDENT> message = None <NEW_LINE> def __init__(self, message=None): <NEW_LINE> <INDENT> if message: <NEW_LINE> <INDENT> self.message = message <NEW_LINE> <DEDENT> super().__init__(self.message) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.message or se...
Base exception for KATANA errors.
62598f6e711fe17d825dfec1
class Template(ttk.Frame): <NEW_LINE> <INDENT> def __init__(self, parent, *args): <NEW_LINE> <INDENT> ttk.Frame.__init__(self, parent, *args) <NEW_LINE> self.parent = parent
-----DESCRIPTION----- A template for new widgets. -----USAGE----- template = Template(parent) template.pack() -----PARAMETERS----- parent = The parent of the widget. -----CONTENTS----- ---VARIABLES--- parent = The parent of the widget. ---TKINTER VARIABLES--- None ---WIDGETS--- self...
62598f6e66673b3332c2fb95
class DrupalBuildoutBootstrapTemplate(BaseTemplate): <NEW_LINE> <INDENT> _template_dir = 'tmpl/buildout_bootstrap' <NEW_LINE> summary = "Bootstrap script and configuration file for buildout + " "drupalindustry.templates package." <NEW_LINE> vars = []
Drupal's buildout boostrap template. Buildout bootstrap includes bootstrap.py and minimal buildout configuration file to installs drupalindustry.templates package.
62598f6e21bff66bcd722437
class OverflowEnum(str, Enum): <NEW_LINE> <INDENT> ellipsis = 'ellipsis' <NEW_LINE> title = 'title' <NEW_LINE> tooltip = 'tooltip'
内容过长时展示行为
62598f6e1f5feb6acb16240f
class CommandLineArgument(type): <NEW_LINE> <INDENT> _value = None
Base class (and meta class) for all Arguments classes.
62598f6e8c3a8732951f5d26
class X509CertificateProperties(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'validity_in_months': {'minimum': 0}, } <NEW_LINE> _attribute_map = { 'subject': {'key': 'subject', 'type': 'str'}, 'ekus': {'key': 'ekus', 'type': '[str]'}, 'subject_alternative_names': {'key': 'sans', 'type': 'SubjectAlte...
Properties of the X509 component of a certificate. :param subject: The subject name. Should be a valid X509 distinguished Name. :type subject: str :param ekus: The enhanced key usage. :type ekus: list[str] :param subject_alternative_names: The subject alternative names. :type subject_alternative_names: ~azure.keyvault...
62598f6e0383005118f6ced9
class SymbolBOUNDLIST(Symbol): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Symbol.__init__(self, None, 'BOUNDLIST') <NEW_LINE> self.size = 0 <NEW_LINE> self.count = 0
Defines a bound list for an array
62598f6e9b70327d1c57e584
class ProteomeComparison(tls.Unicode, TypeMeta): <NEW_LINE> <INDENT> info_text = "GenomeComparison.ProteomeComparison" <NEW_LINE> class v2_0(tls.Unicode, TypeMeta): <NEW_LINE> <INDENT> info_text = "GenomeComparison.ProteomeComparison-2.0"
ProteomeComparison type
62598f6eac7a0e7691f71ced
class TestBody31(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 testBody31(self): <NEW_LINE> <INDENT> pass
Body31 unit test stubs
62598f6e63f4b57ef008595b
class AdminHandler(BaseHandler): <NEW_LINE> <INDENT> EXCEPTION_HANDLERS = { errors.AuthenticationNotPass: 'redirect_login', (errors.OperationNotAllowed, errors.ParamsInvalidError): 'render_error', errors.ObjectNotFound: '_handle_404' } <NEW_LINE> AUTH_REQUIRED = True <NEW_LINE> PREPARES = ['basic'] <NEW_LINE> def prepa...
Construct project's own base handler class
62598f6ed4950a0f3b110a23
class NamespacesRevisionsService(base_api.BaseApiService): <NEW_LINE> <INDENT> _NAME = u'namespaces_revisions' <NEW_LINE> def __init__(self, client): <NEW_LINE> <INDENT> super(ServerlessV1alpha1.NamespacesRevisionsService, self).__init__(client) <NEW_LINE> self._upload_configs = { } <NEW_LINE> <DEDENT> def Delete(self,...
Service class for the namespaces_revisions resource.
62598f6ea8ecb033258709de
class Resize(K.layers.Layer): <NEW_LINE> <INDENT> def __init__( self, size, interpolation = 'nearest', antialias = False, pad = False, channels_first = False, *args, **kwargs, ): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self.size = size <NEW_LINE> self.channels_first = channels_first <NEW_LINE> ...
Resizes an input tensor to a given shape Parameters: target_shape (tuple) - target shape in the form (height, width) interpolation (str) - interpolation algorithm ('nearest', 'bilinear', 'bicubic', 'lanczos3', 'lanczos5', 'gaussian', 'area', 'mitchellcubic') Refer to tensorflow.image.resize documentation fo...
62598f6e4d74a7450cd58ac5
class ReportInfo(models.Model): <NEW_LINE> <INDENT> BUS = "bus" <NEW_LINE> STOP = "busStop" <NEW_LINE> REPORT_TYPE = ( (BUS, 'An event for the bus.'), (STOP, 'An event for the busStop.')) <NEW_LINE> reportType = models.CharField('Event Type', max_length=7, choices=REPORT_TYPE) <NEW_LINE> busUUID = models.UUIDField(null...
Table for the report info data in Report
62598f6e925a0f43d25e7814
class GatewayObject: <NEW_LINE> <INDENT> gateway = None <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> if 'gateway' in kwargs: <NEW_LINE> <INDENT> self.set_gateway(kwargs['gateway']) <NEW_LINE> <DEDENT> <DEDENT> def set_gateway(self, gateway): <NEW_LINE> <INDENT> self.gateway = gateway <NEW_LINE> <DEDENT>...
Abstract class for all objects being returned from the Gateway.
62598f6e26238365f5fac34f
class User(meta.Base): <NEW_LINE> <INDENT> __tablename__ = 'user' <NEW_LINE> user_id = Column(Integer, autoincrement=True, primary_key=True) <NEW_LINE> user_name = Column(Unicode(255), unique=True) <NEW_LINE> email = Column(Unicode(255)) <NEW_LINE> _password = Column('password', Unicode(80)) <NEW_LINE> is_ldap = Column...
Reasonably basic User definition. Probably would want additional attributes.
62598f6e8c3a8732951f5d29
class JsonResponse(HttpResponse): <NEW_LINE> <INDENT> def __init__(self, content={}, mimetype=None, status=None, content_type='application/json'): <NEW_LINE> <INDENT> super(JsonResponse, self).__init__(json.dumps(content), mimetype=mimetype, status=status, content_type=content_type)
Wrapper for HttpResponse with the right content type and the dump to json.
62598f6e76d4e153a661c3f0
class NodeVector: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.node_num = 0 <NEW_LINE> self.node_vec = []
Contains information about a vector consisting of all nodes in a 3D mesh. Attributes: node_num: int representing number of nodes in mesh. node_vec: list containing node positions; beginning at index 1 (as opposed to 0).
62598f6e5166f23b2e242bb5
class Test06_params_marshaling(BaseTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super().setUp() <NEW_LINE> self.expanded = expand_jinja(self.source, context=self.context) <NEW_LINE> self.parsed = yaml.load(self.expanded) <NEW_LINE> testopname = "add-note" <NEW_LINE> opspec = self.parsed["operatio...
test params marshaling
62598f6e1f037a2d8b9e38c9
class APSFitter(MultiScaleParametricFitter): <NEW_LINE> <INDENT> def __init__(self, aps, algorithms): <NEW_LINE> <INDENT> self._model = aps <NEW_LINE> super(APSFitter, self).__init__( scales=aps.scales, reference_shape=aps.reference_shape, holistic_features=aps.holistic_features, algorithms=algorithms) <NEW_LINE> <DEDE...
Abstract class for defining an APS fitter. .. note:: When using a method with a parametric shape model, the first step is to **reconstruct the initial shape** using the shape model. The generated reconstructed shape is then used as initialisation for the iterative optimisation. This step ...
62598f6ed164cc617582074f
class getSess_result: <NEW_LINE> <INDENT> thrift_spec = ( (0, TType.STRUCT, 'success', (TSessionInfo, TSessionInfo.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, success=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBinar...
Attributes: - success
62598f6e0383005118f6cedc
class Furniture(Inventory): <NEW_LINE> <INDENT> def __init__(self, product_code, description, market_price, rental_price, material, size): <NEW_LINE> <INDENT> Inventory.__init__(self, product_code, description, market_price, rental_price) <NEW_LINE> self.material = material <NEW_LINE> self.size = size <NEW_LINE> <DEDEN...
docstring
62598f6e91af0d3eaad395e5
class LAA_Assembly: <NEW_LINE> <INDENT> def __init__(self, filename): <NEW_LINE> <INDENT> self.bam = BAM(filename) <NEW_LINE> <DEDENT> def build_reference(self): <NEW_LINE> <INDENT> self.bam.reset() <NEW_LINE> aa = [a for a in self.bam] <NEW_LINE> data = [ ( a.pos, { "name": a.query_name, "sequence": a.query_sequence, ...
Input is a SAM/BAM from the mapping of amplicon onto a known reference. Based on the position, we can construct the new reference.
62598f6e38b623060ffa8876
class InformationElement(object): <NEW_LINE> <INDENT> def __new__(cls, *args, **kwargs): <NEW_LINE> <INDENT> if len(args) > 0: <NEW_LINE> <INDENT> targetClass = IEI_CLASS_MAP.get(args[0], cls) <NEW_LINE> <DEDENT> elif 'iei' in kwargs: <NEW_LINE> <INDENT> targetClass = IEI_CLASS_MAP.get(kwargs['iei'], cls) <NEW_LINE> <D...
User Data Header (UDH) Information Element (IE) implementation This represents a single field ("information element") in the PDU's User Data Header. The UDH itself contains one or more of these information elements. If the IEI (IE identifier) is recognized, the class will automatically specialize into one of the sub...
62598f6e15fb5d323ce7e501
class VarUbConstraintWrapper(VarBoundWrapper): <NEW_LINE> <INDENT> def __init__(self, var): <NEW_LINE> <INDENT> super(VarUbConstraintWrapper, self).__init__(var) <NEW_LINE> <DEDENT> @property <NEW_LINE> def short_typename(self): <NEW_LINE> <INDENT> return "Upper Bound" <NEW_LINE> <DEDENT> def as_constraint(self): <NEW_...
This class is a wrapper for a model variable and its associated upper bound. Instances of this class are created by the ``refine_conflict`` method when the conflict involves a variable upper bound. Each of these instances is then referenced by a ``TConflictConstraint`` namedtuple in the conflict list returned by ``ref...
62598f6e925a0f43d25e7816
class Imputer: <NEW_LINE> <INDENT> def _fit(self, X, column, k=10, is_categorical=False): <NEW_LINE> <INDENT> clf = None <NEW_LINE> if not is_categorical: <NEW_LINE> <INDENT> clf = neighbors.KNeighborsRegressor(n_neighbors=k) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> clf = neighbors.KNeighborsClassifier(n_neighbors...
Imputer class.
62598f6e6fece00bbaccb166
class SpotDetail(DynamicFieldsViewMixin, RetrieveUpdateDestroyAPIView): <NEW_LINE> <INDENT> queryset = Spot.objects.all() <NEW_LINE> serializer_class = SpotSerializer <NEW_LINE> permission_classes = (IsAuthenticatedOrReadOnly,)
GET: Get spot details PATCH: Partially update a spot PUT: Update a spot DELETE: Delete a spot
62598f6e1d351010ab8f331b
class DataSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> personal_information = PersonalInformationSerializer(required=False) <NEW_LINE> contact_information = ContactInformationSerializer(required=False) <NEW_LINE> bank_information = BankInformationSerializer(required=False) <NEW_LINE> class Meta: <NEW_LI...
Data serializer.
62598f6ea4f1c619b294ddd2
class TestReportGenerator(unittest.TestCase): <NEW_LINE> <INDENT> def test_scenario_01(self): <NEW_LINE> <INDENT> c = Core(source_file="wetest/tests/scenario_example01.yaml", schema_files=["wetest/resources/scenario_schema.yaml"]) <NEW_LINE> c.validate() <NEW_LINE> <DEDENT> def test_scenario_02(self): <NEW_LINE> <INDEN...
Module's Unit Tests.
62598f6e3eb6a72ae0389e1d
class DelayTest(WebAppTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(DelayTest, self).setUp() <NEW_LINE> self.delay = DelayPage(self.browser) <NEW_LINE> self.delay.visit() <NEW_LINE> <DEDENT> def test_delay(self): <NEW_LINE> <INDENT> self.delay.trigger_output() <NEW_LINE> self.assertEquals(self.d...
Test waiting for elements to appear after a delay.
62598f6e5e10d32532ce34d9
class NameTypeReference(TypeReference): <NEW_LINE> <INDENT> def __init__(self, location, name): <NEW_LINE> <INDENT> TypeReference.__init__(self, location) <NEW_LINE> self.name = name <NEW_LINE> <DEDENT> def GetTypeInternal(self, context, scoped): <NEW_LINE> <INDENT> if scoped: <NEW_LINE> <INDENT> type_defn = context.Lo...
Class representing a type reference by name. This class represents the reference to a type by name. Look-up will produce a type that has the specified name, within the specified look-up context - if it exists. Produced by the IDL construct 'Type' where Type is the name of a type (typedef, typename, class, enum).
62598f6e287bf620b627139c
class ResNetG(nn.Module): <NEW_LINE> <INDENT> def __init__(self, input_nc=1, output_nc=1, ngf=64, norm_layer=nn.BatchNorm2d, use_dropout=False, n_blocks=6, padding_type='reflect'): <NEW_LINE> <INDENT> assert(n_blocks >= 0) <NEW_LINE> super(ResNetG, self).__init__() <NEW_LINE> if type(norm_layer) == functools.partial: <...
Resnet-based generator that consists of Resnet blocks between a few downsampling/upsampling operations. We adapt Torch code and idea from Justin Johnson's neural style transfer project(https://github.com/jcjohnson/fast-neural-style)
62598f6e796e427e5384df71
class FullNameTask(PeriodicTask): <NEW_LINE> <INDENT> run_every = timedelta(seconds=60) <NEW_LINE> def run(self, **kwargs): <NEW_LINE> <INDENT> logger = self.get_logger(**kwargs) <NEW_LINE> logger.info("Running periodic task.") <NEW_LINE> return True
A periodic task that concatenates fields to form a person's full name.
62598f6e63f4b57ef008595d
class EnumValue(Node): <NEW_LINE> <INDENT> def __init__(self, name, parent, id=None, deprecated=False, optional=False, hidden=False, notes=None, sdk_notes=None, ndk_notes=None, ndk_hidden=False, hal_version='3.2'): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> self._id = id <NEW_LINE> self._deprecated = deprecated <...
A class corresponding to a <value> element within an <enum> within an <entry>. Attributes (Read-Only): name: A string, e.g. 'ON' or 'OFF' id: An optional numeric string, e.g. '0' or '0xFF' deprecated: A boolean, True if the enum should be deprecated. optional: A boolean hidden: A boolean, Tru...
62598f6e0383005118f6cede