code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class AbstractLocalSearchProblem(ABC): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def move(self, move): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def undo_move(self, move): <NEW_LINE> <INDENT> pass <NEW_LINE...
Template to create Problem-classes for localsearch implemenatations. This Class is meant to be used as a template. It is supposed to be used when constructing your own solution objects for a specific problem.
62598ee1e5267d203ee69ef2
class DecodedQr: <NEW_LINE> <INDENT> data: str <NEW_LINE> location: list <NEW_LINE> def __init__(self, data: str, location: list): <NEW_LINE> <INDENT> self.data = data <NEW_LINE> self.location = location <NEW_LINE> <DEDENT> def __eq__(self, other) -> bool: <NEW_LINE> <INDENT> if isinstance(other, DecodedQr): <NEW_LINE>...
Base class for decoded QR codes.
62598ee17b25080760ed5a89
class EnumerationType(type(c_int)): <NEW_LINE> <INDENT> def __new__(metacls, name, bases, dict): <NEW_LINE> <INDENT> if not "_members_" in dict: <NEW_LINE> <INDENT> _members_ = {} <NEW_LINE> for key, value in dict.items(): <NEW_LINE> <INDENT> if not key.startswith("_"): <NEW_LINE> <INDENT> _members_[key] = value <NEW_L...
Metatype for all ctype enumerations. See also -------- CEnum : actual ctypes enum
62598ee1d7e4931a7ef3a68b
class MPI3D(DatasetBase): <NEW_LINE> <INDENT> def __init__(self, state_space, dataset_path: Union[str, Path], mode="mpi3d_toy"): <NEW_LINE> <INDENT> data = np.load(dataset_path) <NEW_LINE> if mode in ["mpi3d_toy", "mpi3d_realistic"]: <NEW_LINE> <INDENT> self.factor_sizes = [4, 4, 2, 3, 3, 40, 40] <NEW_LINE> <DEDENT> el...
MPI3D datasets have been introduced as a part of NeurIPS 2019 Disentanglement Competition. (http://www.disentanglement-challenge.com) There are three different datasets: 1. Simplistic rendered images (mpi3d_toy) 2. Realistic rendered images (mpi3d_realistic) 3. Real world images (mpi3d_real). Currently only mpi3d_toy...
62598ee10a50d4780f703998
class ModuleSpec(object): <NEW_LINE> <INDENT> __slots__ = ( 'name', 'path', 'scope', 'surface', 'includes', 'protocol', 'linked', 'thrift_source', ) <NEW_LINE> def __init__(self, name, protocol, path=None, thrift_source=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.path = path <NEW_LINE> self.protocol = p...
Specification for a single module.
62598ee138b623060ffa7683
@mock.patch("astakosclient.AstakosClient", new=AstakosClientMock) <NEW_LINE> @mock.patch("snf_django.lib.astakos.get_user", new=get_user_mock) <NEW_LINE> class TestAdminViewsIntegration(django.test.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> settings.SKIP_SSH_VALIDATION = True <NEW_LINE> admin_s...
Integration tests for admin views.
62598ee10c0af96317c5498c
class Cords2D: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.x = None <NEW_LINE> self.y = None <NEW_LINE> self.I = None <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> if self.I is None: <NEW_LINE> <INDENT> return _pair_objects(self.x,self.y) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> ...
A class for carrying around sets of 2D data
62598ee1d58c6744b42db5ae
class ExcludeRegionsConfig(ConfigPanel): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(ExcludeRegionsConfig, self).__init__(*args, **kwargs) <NEW_LINE> self.fwd_map_cache = {} <NEW_LINE> gb = QGroupBox('Regions') <NEW_LINE> vbox = QVBoxLayout() <NEW_LINE> self.lw_variables = QListWi...
Automatic config panel for selecting regions in data, e.g. for icoshift This simple config panel lists currently defined data regions, currently defineable via drag-drop in output views. Manual definition should also be possible.
62598ee129b78933be2693c7
class TemperatureHumiditySensorWithoutDisplay(Device): <NEW_LINE> <INDENT> def __init__(self, connection): <NEW_LINE> <INDENT> super().__init__(connection) <NEW_LINE> self.temperatureOffset = 0 <NEW_LINE> self.actualTemperature = 0 <NEW_LINE> self.humidity = 0 <NEW_LINE> self.vaporAmount = 0.0 <NEW_LINE> <DEDENT> def f...
HMIP-STH (Temperature and Humidity Sensor without display - indoor)
62598ee1eab8aa0e5d30a367
class AutoRestSwaggerBATArrayServiceConfiguration(Configuration): <NEW_LINE> <INDENT> def __init__( self, base_url=None): <NEW_LINE> <INDENT> if not base_url: <NEW_LINE> <INDENT> base_url = 'http://localhost' <NEW_LINE> <DEDENT> super(AutoRestSwaggerBATArrayServiceConfiguration, self).__init__(base_url) <NEW_LINE> self...
Configuration for AutoRestSwaggerBATArrayService Note that all parameters used to create this instance are saved as instance attributes. :param str base_url: Service URL
62598ee1adb09d7d5dc08bb6
class notificacion(models.Model): <NEW_LINE> <INDENT> titulo = models.CharField(max_length=40) <NEW_LINE> texto = models.TextField(max_length=250)
Clase que sirve para guardar en la base de datos las notificaciones
62598ee160cbc95b0636292b
class OperationResultError(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs ): <NEW_LINE> <INDENT> super(Operat...
Required if status == failed or status == canceled. :param code: Required if status == failed or status == cancelled. If status == failed, provide an invariant error code used for error troubleshooting, aggregation, and analysis. :type code: str :param message: Required if status == failed. Localized. If status == fa...
62598ee1cc0a2c11144795f1
class DashboardView(view_mixins.PermissionRequiredViewMixin, TemplateView): <NEW_LINE> <INDENT> template_name = 'dashboard_app/dashboard.html' <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> ctx = super(DashboardView, self).get_context_data(**kwargs) <NEW_LINE> widgets = dashboard_widget_pool.get_w...
Main view of the app. Displays the metrics dashboard. Widgets on the dashboard get loaded individually via AJAX calls against the ``DashboardAPIWidgetView``.
62598ee124f1403a92684b9c
class SlocTextFormatter(utils.IReportFormatter): <NEW_LINE> <INDENT> def __init__(self, out=sys.stdout): <NEW_LINE> <INDENT> self.out = out <NEW_LINE> <DEDENT> def outstream(self): <NEW_LINE> <INDENT> return self.out <NEW_LINE> <DEDENT> def format_report_header(self): <NEW_LINE> <INDENT> self.out.write('SLOC (Source Li...
Functionality for formatting SLOC info into a readable file.
62598ee101c39578d7f11397
class MyTCPHandler(socketserver.BaseRequestHandler): <NEW_LINE> <INDENT> def handle(self): <NEW_LINE> <INDENT> self.data = self.request.recv(1024).strip() <NEW_LINE> print("{} wrote:".format(self.client_address[0])) <NEW_LINE> print(self.data) <NEW_LINE> self.request.sendall(self.data.upper()) <NEW_LINE> global tcpCoun...
The RequestHandler class for our server. It is instantiated once per connection to the server, and must override the handle() method to implement communication to the client.
62598ee157b8e32f525073fd
class commonExamples(Cmnd): <NEW_LINE> <INDENT> @subjectToTracking(fnLoc=True, fnEntry=True, fnExit=True) <NEW_LINE> def cmnd(self, interactive=True, ): <NEW_LINE> <INDENT> G_myFullName = sys.argv[0] <NEW_LINE> G_myName = os.path.basename(G_myFullName) <NEW_LINE> cmndExampleMenuChapter('/Intercatively Invokable Module ...
Print common ICM examples.
62598ee16fb2d068a769311a
class SetupConfigReplace(SetupFunction): <NEW_LINE> <INDENT> def __init__(self, function, target, **keyargs): <NEW_LINE> <INDENT> assert isinstance(target, SetupConfig), 'Invalid target %s' % target <NEW_LINE> SetupFunction.__init__(self, function, name=target.name, group=target.group, ** keyargs) <NEW_LINE> documentat...
Provides the setup for replacing a configuration setup function.
62598ee12eb69b55b15a0681
class EditNewSLOPageTestRecipe(EditNewSLOPageTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super().setUp() <NEW_LINE> self.slo = baker.make_recipe('makeReports.sloInReport',slo__numberOfUses=1) <NEW_LINE> self.slo.slo.numberOfUses = 1 <NEW_LINE> self.slo.slo.save()
Tests editing new SLO using fixtures made with recipes
62598ee18da39b475be0179a
class AuthUserMethodEntity(ndb.Model): <NEW_LINE> <INDENT> auth_type = ndb.StringProperty() <NEW_LINE> auth_key = ndb.StringProperty() <NEW_LINE> auth_data = ndb.TextProperty() <NEW_LINE> user_key = ndb.KeyProperty(kind='AuthUser') <NEW_LINE> @classmethod <NEW_LINE> def _get_kind(self): <NEW_LINE> <INDENT> return 'Auth...
Storage of the various authentication records for a user Note: Entity keys are defined by AuthLogin.generate_key() and the user is the parent of the EG
62598ee1b7558d5895461c3c
class TrackerComm(object): <NEW_LINE> <INDENT> __slots__ = ( 'author', 'it_client', 'project_name', ) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.author = None <NEW_LINE> self.it_client = None <NEW_LINE> self.project_name = None <NEW_LINE> <DEDENT> def Connect(self, creds, project_name, source='chromiumos')...
Class to manage communication with Tracker.
62598ee1462c4b4f79db9fe9
class ImageDictionary(DocumentEntity): <NEW_LINE> <INDENT> def __init__(self, width, height, colour_space, bits, interpolate=True): <NEW_LINE> <INDENT> self._size = (width, height) <NEW_LINE> self._cs = colour_space <NEW_LINE> self._bpc = bits <NEW_LINE> self._interpolate = interpolate <NEW_LINE> self._extra_entries = ...
Describes an image. :param width: :param height: Integers describing the image size :param colour_space: Instance of :class:`ColourSpace` giving the colour space. :param bits: Bits per component; typically 1 or 8. :param interpolate: Should we specify interpolation?
62598ee1925a0f43d25e661d
class TestStyleIllustrations(unittest.TestCase): <NEW_LINE> <INDENT> def test_print_all_styles_to_screen(self): <NEW_LINE> <INDENT> tinytools.py_styles.print_all_styles_to_screen() <NEW_LINE> self.assertTrue(True)
Testing for: print_all_styles_to_screen
62598ee121a7993f00c6455c
class KickstartReport(DBusData): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._error_messages = [] <NEW_LINE> self._warning_messages = [] <NEW_LINE> <DEDENT> def is_valid(self): <NEW_LINE> <INDENT> return not self._error_messages <NEW_LINE> <DEDENT> def get_messages(self): <NEW_LINE> <INDENT> return...
The kickstart report.
62598ee10a50d4780f703999
class FlagWord(object): <NEW_LINE> <INDENT> __slots__ = [ "_nbits", "_value", "_schema", ] <NEW_LINE> def __init__(self, schema, nbits=32, initial=0): <NEW_LINE> <INDENT> self._nbits = nbits <NEW_LINE> self._value = initial <NEW_LINE> self._schema = OrderedDict() <NEW_LINE> tot_bits = sum([item.nbits for item in schema...
Class to wrap an integer in bitwise flag/field accessors.
62598ee11f5feb6acb161241
class PresenceConfirmationView(DetailView): <NEW_LINE> <INDENT> model = Yokoshi <NEW_LINE> template_name = 'dummy.html' <NEW_LINE> def get_object(self): <NEW_LINE> <INDENT> whoId = self.request.GET["yokoshi"] <NEW_LINE> who = Yokoshi.objects.get(pk=whoId) <NEW_LINE> eventId = self.request.GET['current_event'] <NEW_LINE...
View for presence confirmation. Displays a notification message saying that the presence was successfully saved.
62598ee13539df3088eca8a1
class RuleNonEmptyValidator(BaseComboValidator): <NEW_LINE> <INDENT> def validate(self, rule, details): <NEW_LINE> <INDENT> invalidations = [] <NEW_LINE> if len(rule.mapping) == 0 and not self._rule_is_exempt(rule): <NEW_LINE> <INDENT> invalidations.append("rules must have at least one command") <NEW_LINE> <DEDENT> ret...
Any static rule should have at least one command to start. Some selfmod rules don't have any rules the first time they are instantiated, but then immediately fill in and "reboot" themselves. SikuliRule is not a selfmod rule, but it kind of works like one, so it is also exempted.
62598ee197e22403b38394e0
class ReportedDisperserPosition(CSC_Evt): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> <DEDENT> async def aget(self): <NEW_LINE> <INDENT> self.name = ATSpectrograph.grating <NEW_LINE> return self
Return a struct including the grating name
62598ee17d847024c075a9bf
class TestProductRatePlanObjectNSFields(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 testProductRatePlanObjectNSFields(self): <NEW_LINE> <INDENT> pass
ProductRatePlanObjectNSFields unit test stubs
62598ee13539df3088eca8a2
class J2KType(Serializable): <NEW_LINE> <INDENT> _fields = ('Original', 'Parsed') <NEW_LINE> _required = ('Original', ) <NEW_LINE> Original = SerializableDescriptor( 'Original', J2KSubtype, _required, strict=DEFAULT_STRICT, docstring='') <NEW_LINE> Parsed = SerializableDescriptor( 'Parsed', J2KSubtype, _required, stric...
Jpeg 2000 parameters.
62598ee167a9b606de5445be
class SecurityAPITests(CatalogusAPITestMixin, APILiveServerTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super().setUp() <NEW_LINE> self.client.credentials() <NEW_LINE> <DEDENT> def test_api_key_required(self): <NEW_LINE> <INDENT> response = self.client.get(self.catalogus_list_url) <NEW_LINE> self...
Section 2.6.2 of the DSO: API strategy
62598ee1379a373c97d975eb
class direct_declarator_Node(ParseNode): <NEW_LINE> <INDENT> def __init__(self, **kw): <NEW_LINE> <INDENT> ParseNode.__init__(self, **kw) <NEW_LINE> <DEDENT> def dump(self, indent=0): <NEW_LINE> <INDENT> ParseNode.dump(self, indent)
Holds a "direct_declarator" parse target and its components.
62598ee12ae34c7f260a96d8
class MastodonFileNotFoundError(MastodonIOError): <NEW_LINE> <INDENT> pass
Raised when a file requested to be loaded can not be opened
62598ee185dfad0860cbed61
class LocalJsonProxy(JsonProxy): <NEW_LINE> <INDENT> def setup(self, handler=None, environ=None, **kwargs): <NEW_LINE> <INDENT> self.local.handler = handler <NEW_LINE> self.local.environ = environ <NEW_LINE> <DEDENT> def _call(self, name, *args, **kwargs): <NEW_LINE> <INDENT> data, raw = self._get_data(name, *args, **k...
A proxy class to use when accessing the rpc within the rpc application domain.
62598ee13cc13d1c6d463d5c
class BatchData(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.totalLength = None <NEW_LINE> self.dataShape = None <NEW_LINE> <DEDENT> @property <NEW_LINE> def shape(self): <NEW_LINE> <INDENT> return self.dataShape <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> return self.totalLength <...
Base class for data and labels, interface to Network.
62598ee10a50d4780f70399a
class RemoveGrass: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.threshold = Parameter("Threshold",0,255,100) <NEW_LINE> self.technique = Parameter("Technique",0,2,0) <NEW_LINE> <DEDENT> def remove_green_from_blue(self, image): <NEW_LINE> <INDENT> blue, green, red = cv2.split(image) <NEW_LINE> new_bl...
Remove grass from an image
62598ee12c8b7c6e89bd1db0
class ScanPauseCliTests(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> write_server_config(DEFAULT_CONFIG) <NEW_LINE> self.orig_stderr = sys.stderr <NEW_LINE> sys.stderr = HushUpStderr() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> sys.stderr = self.orig_stderr <NEW_LINE> <D...
Class for testing the scan pause commands for qpc.
62598ee1d58c6744b42db5af
class Meta: <NEW_LINE> <INDENT> ordering = ['-id'] <NEW_LINE> db_table = 'help' <NEW_LINE> verbose_name = 'Пункт помощи' <NEW_LINE> verbose_name_plural = 'Пункты помощи'
HelpItem model settings
62598ee1e1aae11d1e7cdb37
class Bullet(pygame.sprite.Sprite): <NEW_LINE> <INDENT> timeToLive = 0 <NEW_LINE> angle = 0 <NEW_LINE> speed = 0 <NEW_LINE> speedDecay = 0 <NEW_LINE> colour = None <NEW_LINE> damage = 0 <NEW_LINE> def __init__(self, position, direction, speed): <NEW_LINE> <INDENT> self.x = position[0] <NEW_LINE> self.y = position[1] <N...
Abstract class for bullets. Each one disappears at a different rate, has different shape, colour, etc Each bullet decides itself where it moves, depeding on its starting conditions
62598ee176e4537e8c3edba8
class PowerMeasurementListView(SubUserView, SubMeterView, ListAPIView): <NEW_LINE> <INDENT> GET_permissions = [RequestUserIsRelatedToUser, UserOwnerOfMeter] <NEW_LINE> filter_backends = [filters.SearchFilter, DjangoFilterBackend, filters.OrderingFilter] <NEW_LINE> search_fields = ['name'] <NEW_LINE> ordering_fields = [...
List of power measurements for a meter (from user) Available request methods: GET `GET`:
62598ee1be383301e0251dc9
class TestShapeAreaFunc(unittest.TestCase): <NEW_LINE> <INDENT> def test_n1(self): <NEW_LINE> <INDENT> self.assertEqual(1, shapeArea(1)) <NEW_LINE> self.assertEqual(5, shapeArea(2)) <NEW_LINE> self.assertEqual(13, shapeArea(3)) <NEW_LINE> self.assertEqual(25, shapeArea(4))
Test mathfuc.py
62598ee1442bda511e95aa58
class BaseFeedView(View): <NEW_LINE> <INDENT> def get_products(self): <NEW_LINE> <INDENT> return self.products <NEW_LINE> <DEDENT> def get_feed_class(self): <NEW_LINE> <INDENT> return self.feed_class <NEW_LINE> <DEDENT> def get_feed(self): <NEW_LINE> <INDENT> feedclass = self.get_feed_class() <NEW_LINE> return feedclas...
Base class for Merchant feed views Override the ``products`` attribute with a queryset or other iterable of products to include in the feed, and the ``feed_class`` attribute with the feed class to use.
62598ee1e64d504609df86b8
class GlossaryLinkPattern(Pattern): <NEW_LINE> <INDENT> def __init__(self, ext, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self.ext = ext <NEW_LINE> self.processor = 'glossary-link' <NEW_LINE> self.pattern = self.ext.processor_info['glossary-link']['pattern'] <NEW_LINE> self.comp...
Return a glossary link element from the given match Matches: {glossary-link term="super-serious-term"}Super Serious Term{glossary-link end} Returns: <p> <a class="glossary-term" data-glossary-term="super-serious-term"> Super Serious Term </a> </p>
62598ee160cbc95b0636292d
class TestHistoryQueryUpdateBB(unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> Log.info('TestHistoryQueryUpdateBB START BB端') <NEW_LINE> cls.node = 2 <NEW_LINE> cls.dh = DataHandle() <NEW_LINE> cls.L = Login(node=cls.node) <NEW_LINE> cls.admin_cookies = cls.L.get...
历史记录--数据更新BB端
62598ee199cbb53fe682f4a3
class PackageDataManager: <NEW_LINE> <INDENT> def get_data(self, name): <NEW_LINE> <INDENT> cache = PackageCache() <NEW_LINE> package_data = cache.get_package_data(name) <NEW_LINE> if not package_data: <NEW_LINE> <INDENT> package_data = self._fetch_data(name) <NEW_LINE> cache.add_package_data(name, package_data) <NEW_L...
Package data manager.
62598ee1cc0a2c11144795f3
class SSMParameter(Refreshable): <NEW_LINE> <INDENT> def __init__(self, param_name, max_age=None, with_decryption=True): <NEW_LINE> <INDENT> super(SSMParameter, self).__init__(max_age) <NEW_LINE> if not param_name: <NEW_LINE> <INDENT> raise ValueError("Must specify name") <NEW_LINE> <DEDENT> self._name, self._version, ...
Concrete class for an individual SSM Parameter
62598ee16fb2d068a769311b
class Create(base.CreateCommand): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Args(parser): <NEW_LINE> <INDENT> flags.AddKeyResourceFlags(parser) <NEW_LINE> parser.add_argument( '--primary', action='store_true', help='If specified, immediately make the new version primary.') <NEW_LINE> <DEDENT> def Run(self, args)...
Create a new CryptoKeyVersion. Creates a new CryptoKeyVersion within the given CryptoKey. ## EXAMPLES The following command creates a new CryptoKeyVersion within the `frodo` CryptoKey, `fellowship` KeyRing, and `global` Location and sets it as the primary version: $ {command} --location global \ --keyring f...
62598ee12ae34c7f260a96d9
class Solution: <NEW_LINE> <INDENT> def threeSum2(self, n): <NEW_LINE> <INDENT> a = [x for x in range(int(sqrt(n)) + 1)] <NEW_LINE> cnt = 0 <NEW_LINE> for i in range(len(a)): <NEW_LINE> <INDENT> z = a[i] <NEW_LINE> target = n - z**2 <NEW_LINE> cnt += self.twosum(a, target, i) <NEW_LINE> <DEDENT> return cnt <NEW_LINE> <...
@param n: an integer @return: the number of solutions
62598ee1097d151d1a2bf610
class InvalidAuthError(Exception): <NEW_LINE> <INDENT> pass
Error raised if authentication fails
62598ee1435de62698e9a3c7
class CustomPagination(pagination.LimitOffsetPagination): <NEW_LINE> <INDENT> def get_paginated_response(self, serializer): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> field_header = serializer.field_header <NEW_LINE> <DEDENT> except Exception as e: <NEW_LINE> <INDENT> field_header = [f"{e}"] <NEW_LINE> <DEDENT> retur...
自定义分页返回结构
62598ee156ac1b37e63007de
class NumPages(OptionallyRequired): <NEW_LINE> <INDENT> def __init__(self, at_lest=1, **kwargs): <NEW_LINE> <INDENT> super(NumPages, self).__init__(**kwargs) <NEW_LINE> self.at_lest = at_lest <NEW_LINE> <DEDENT> def pre_validation(self, config, key_name): <NEW_LINE> <INDENT> if config.get(key_name) is not None: <NEW_LI...
NumPages Config Option Set the value to True if the number of pages is greater than the given number (defaults to 1).
62598ee1627d3e7fe0e05479
class Info(six.with_metaclass(FieldMeta, BaseObj_v1_2)): <NEW_LINE> <INDENT> __swagger_fields__ = [ ('title', None), ('termsOfServiceUrl', None), ('contact', None), ('license', None), ('licenseUrl', None), ('description', None), ]
Info Object
62598ee1796e427e5384cd8a
class NoiseControl: <NEW_LINE> <INDENT> def random_noise_generator(network_size, noise_range): <NEW_LINE> <INDENT> random_noise = [] <NEW_LINE> for node in range(network_size): <NEW_LINE> <INDENT> random_noise.append(random.randrange(noise_range)) <NEW_LINE> <DEDENT> return random_noise <NEW_LINE> <DEDENT> def apply_re...
Implementations of different input paterns to nodes in a network
62598ee1fbf16365ca792695
class Contents(Transform): <NEW_LINE> <INDENT> default_priority = 720 <NEW_LINE> def apply(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> toc_by_writer = self.document.settings.use_latex_toc <NEW_LINE> <DEDENT> except AttributeError: <NEW_LINE> <INDENT> toc_by_writer = False <NEW_LINE> <DEDENT> details = self.star...
This transform generates a table of contents from the entire document tree or from a single branch. It locates "section" elements and builds them into a nested bullet list, which is placed within a "topic" created by the contents directive. A title is either explicitly specified, taken from the appropriate language m...
62598ee14a966d76dd5ed4d5
class WebsocketEndpoint(object): <NEW_LINE> <INDENT> exposed = True <NEW_LINE> _cp_config = dict(LowDataAdapter._cp_config, **{ 'response.stream': True, 'tools.encode.encoding': 'utf-8', 'tools.salt_auth.on': False, 'tools.hypermedia_in.on': False, 'tools.hypermedia_out.on': False, 'tools.websocket.on': True, 'tools.we...
Open a WebSocket connection to Salt's event bus The event bus on the Salt master exposes a large variety of things, notably when executions are started on the master and also when minions ultimately return their results. This URL provides a real-time window into a running Salt infrastructure. Uses websocket as the tra...
62598ee130dc7b766599de79
class UsagesOperations: <NEW_LINE> <INDENT> models = _models <NEW_LINE> def __init__(self, client, config, serializer, deserializer) -> None: <NEW_LINE> <INDENT> self._client = client <NEW_LINE> self._serialize = serializer <NEW_LINE> self._deserialize = deserializer <NEW_LINE> self._config = config <NEW_LINE> <DEDENT>...
UsagesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. :type models: ~azure.mgmt.labservices.models :param client: C...
62598ee166673b3332c2e999
class Metrosimulation (object): <NEW_LINE> <INDENT> def __init__(self, env, num_stations, defaultime): <NEW_LINE> <INDENT> self.env = env <NEW_LINE> self.eastfalls = simpy.Resource(env, num_stations) <NEW_LINE> self.ballston = simpy.Resource(env, num_stations) <NEW_LINE> self.vasquare = simpy.Resource(env, num_stations...
The Metrorail system has a limited number of stations (NUM_STATIONS) that trains must pass through one-by-one. Trains have to request one of the stations, but only one train can access a station at a time. Random delays are throw into the system, which cause delays that can compound throughout the system.
62598ee144b2445a339b5c5f
class ClassFoo: <NEW_LINE> <INDENT> def __init__(self, x, y): <NEW_LINE> <INDENT> pass
test_constr_params_in_class_numpy Example of a class with missing constructor parameter documentation (Numpy style) Everything is completely analogous to functions. Parameters ---------- y: bla missing constructor parameter documentation
62598ee11f5feb6acb161243
@dependency.provider('credential_api') <NEW_LINE> class Manager(manager.Manager): <NEW_LINE> <INDENT> driver_namespace = 'keystone.credential' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(Manager, self).__init__(CONF.credential.driver) <NEW_LINE> <DEDENT> @manager.response_truncated <NEW_LINE> def list_cred...
Default pivot point for the Credential backend. See :mod:`keystone.common.manager.Manager` for more details on how this dynamically calls the backend.
62598ee197e22403b38394e1
class ClusterPlacementGenerator(): <NEW_LINE> <INDENT> def __init__(self, hwSpecs, placementSpecification): <NEW_LINE> <INDENT> self.hwSpecs = hwSpecs <NEW_LINE> self.placementSpecification = placementSpecification <NEW_LINE> <DEDENT> def generateWithSpecification(self, generationSpec): <NEW_LINE> <INDENT> clusterPlace...
Generates a list of virtual cluster placements based on a generation specification. Each virtual cluster placement generated should satisfy a cluster specification.
62598ee1d268445f26638e87
class TestTokenPasswordReset(UserManagerTestCase): <NEW_LINE> <INDENT> def test_password_reset_happy_path(self): <NEW_LINE> <INDENT> with self.settings(DISPLAY_AUTH_SUCCESS_MESSAGES=True): <NEW_LINE> <INDENT> user_data = { 'username_or_email': 'test@example.com', 'username': 'testuser', 'password': 't3st3r@dmin' } <NEW...
Test cases for token based password reset
62598ee1a17c0f6771d5a847
class GTestListTestsTest(unittest.TestCase): <NEW_LINE> <INDENT> def testConfigToGNToConfig(self): <NEW_LINE> <INDENT> configs_to_test = { "target_os": [None, "android", "chromeos", "linux"], "target_arch": [None, "x86", "x64", "arm"], "is_debug": [False, True], "is_clang": [False, True], "sanitizer": [None, Config.SAN...
Tests mopy.gn.
62598ee132920d7e50bc461f
class ScaleResNeXtBottleneck(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_channels, out_channels, stride, cardinality, widen_factor): <NEW_LINE> <INDENT> super(ScaleResNeXtBottleneck, self).__init__() <NEW_LINE> D = cardinality * out_channels // widen_factor * 3 <NEW_LINE> self.conv_reduce = nn.Conv2d(in_chann...
ScaleRexNeXt bottleneck type C based on (https://github.com/facebookresearch/ResNeXt/blob/master/models/resnext.lua)
62598ee1c432627299fa15a9
class BTool_Diff(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "btool.boolean_diff" <NEW_LINE> bl_label = "Brush Difference" <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> return context.active_object is not None <NEW_LINE> <DEDENT> def execute(self, context): <NEW_LINE> <INDENT> ...
This operator add a difference brush to a canvas
62598ee1d6c5a102081e0723
class ReportItem(object): <NEW_LINE> <INDENT> def __init__(self, raw_line): <NEW_LINE> <INDENT> self.raw_line = raw_line <NEW_LINE> self.call_tree = None <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> strs = [] <NEW_LINE> strs.append('ReportItem (raw_line %s)' % self.raw_line) <NEW_LINE> if self.call_tree i...
Representing one item in report, may contain a CallTree.
62598ee167a9b606de5445c1
class BoundedStream(io.IOBase): <NEW_LINE> <INDENT> def __init__(self, stream, stream_len): <NEW_LINE> <INDENT> self.stream = stream <NEW_LINE> self.stream_len = stream_len <NEW_LINE> self._bytes_remaining = self.stream_len <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> def ...
Wrap *wsgi.input* streams to make them more robust. ``socket._fileobject`` and ``io.BufferedReader`` are sometimes used to implement *wsgi.input*. However, app developers are often burned by the fact that the `read()` method for these objects block indefinitely if either no size is passed, or a size greater than the r...
62598ee199cbb53fe682f4a4
class ProductRequiredSignoffScheduledChangeSignoffsView(SignoffsView): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(ProductRequiredSignoffScheduledChangeSignoffsView, self).__init__("product_req_signoffs", dbo.productRequiredSignoffs)
/scheduled_changes/required_signoffs/product/<int:sc_id>/signoffs
62598ee10c0af96317c54990
class Company(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'companies' <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> portfolio_id = db.Column(db.ForeignKey('portfolios.id'), nullable=False) <NEW_LINE> user_id = db.Column(db.ForeignKey('users.id'), nullable=True) <NEW_LINE> name = db.Column(db.Str...
Instantiates a table of companies in the Company database.
62598ee163d6d428bbee0dc5
class StandardEpisode(Episode): <NEW_LINE> <INDENT> def __init__(self, config: dict): <NEW_LINE> <INDENT> self.prf_id: str = config["prfId"] <NEW_LINE> self.episode_number: int = config["firstTransmissionDateDisplayValue"] <NEW_LINE> self.image_url: str = config["image"][0]["url"] <NEW_LINE> self.title: str = config["t...
Episode of a sequential type episode
62598ee16aa9bd52df0d34a2
class ReminderDetailView(UpdateModelMixin, RetrieveModelMixin, DestroyModelMixin, viewsets.GenericViewSet): <NEW_LINE> <INDENT> queryset = Reminder.objects.all() <NEW_LINE> lookup_field = 'id' <NEW_LINE> serializer_class = ReminderDetailSerializer
Reminder detail view to get detail instance of reminder. GET, UPDATE, DELETE methods are allowed.
62598ee110dbd63aa1c6f164
class DatasetFactory(): <NEW_LINE> <INDENT> def __init__(self, dataset_class, **args): <NEW_LINE> <INDENT> self.dataset_class = dataset_class <NEW_LINE> self.args = args <NEW_LINE> <DEDENT> def create_instance(self, current_data, mode, transform): <NEW_LINE> <INDENT> obj = self.dataset_class(**self.args) <NEW_LINE> obj...
This class will be used to create the dataset objects to be used by the different stages in the DataLoader.
62598ee11b99ca400228e806
class QueryExporter(QtCore.QObject): <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> super(QueryExporter, self).__init__() <NEW_LINE> self.signals = SqlSignals() <NEW_LINE> self.thread = None <NEW_LINE> <DEDENT> def start_pull(self, query, headers: List[str]) -> None: <NEW_LINE> <INDENT> self.signal...
This class manages the currently active ExportSql thread
62598ee1f8510a7c17d7d475
class MultiplePermissionsRequiredMixin(AccessMixin): <NEW_LINE> <INDENT> permissions = None <NEW_LINE> def dispatch(self, request, *args, **kwargs): <NEW_LINE> <INDENT> self._check_permissions_attr() <NEW_LINE> perms_all = self.permissions.get('all') or None <NEW_LINE> perms_any = self.permissions.get('any') or None <N...
View mixin which allows you to specify two types of permission requirements. The `permissions` attribute must be a dict which specifies two keys, `all` and `any`. You can use either one on its own or combine them. The value of each key is required to be a list or tuple of permissions. The standard Django permissions st...
62598ee163d6d428bbee0dc6
class databases: <NEW_LINE> <INDENT> def __init__(self, active_database): <NEW_LINE> <INDENT> self.active_database = database <NEW_LINE> <DEDENT> def active_database(self): <NEW_LINE> <INDENT> self.active_database = AI.active_ai <NEW_LINE> print(f"{self.active_database} is the database that is currently active.") <NEW_...
These are the databases used to store records
62598ee199cbb53fe682f4a5
class ParticleFilter(InferenceModule): <NEW_LINE> <INDENT> def __init__(self, ghostAgent, numParticles=300): <NEW_LINE> <INDENT> InferenceModule.__init__(self, ghostAgent); <NEW_LINE> self.setNumParticles(numParticles) <NEW_LINE> self.particles = None <NEW_LINE> <DEDENT> def setNumParticles(self, numParticles): <NEW_LI...
A particle filter for approximately tracking a single ghost. Useful helper functions will include random.choice, which chooses an element from a list uniformly at random, and util.sample, which samples a key from a Counter by treating its values as probabilities.
62598ee1a8ecb0332586f7db
class HttpRequest(object): <NEW_LINE> <INDENT> def request(self, method, url, json=None, data=None, headers=None): <NEW_LINE> <INDENT> method = method.lower() <NEW_LINE> if method == 'post': <NEW_LINE> <INDENT> return requests.post(url=url, json=json, data=data, headers=headers) <NEW_LINE> <DEDENT> elif method == 'get'...
不需要记住cookie信息的请求类
62598ee1cc0a2c11144795f6
class SoapError(ApiItem): <NEW_LINE> <INDENT> API_NAME = "soap_error" <NEW_LINE> API_NAME_SRC = "soap_error" <NEW_LINE> API_SIMPLE = { "object_name": "string_types", "exception_name": "string_types", "context": "string_types", "object_request": "string_types", } <NEW_LINE> API_COMPLEX = {} <NEW_LINE> API_CONSTANTS = {}...
Automagically generated API object.
62598ee1498bea3a75a56128
class JBoolean : <NEW_LINE> <INDENT> def __init__(self, v) : <NEW_LINE> <INDENT> pass
Wrapper class to manage Java primitive boolean. Used mainly to resolve ambiguity in method calls.
62598ee18da39b475be0179e
class TargetVpnGatewaysScopedList(_messages.Message): <NEW_LINE> <INDENT> class WarningValue(_messages.Message): <NEW_LINE> <INDENT> class CodeValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> CLEANUP_FAILED = 0 <NEW_LINE> DEPRECATED_RESOURCE_USED = 1 <NEW_LINE> DISK_SIZE_LARGER_THAN_IMAGE_SIZE = 2 <NEW_LINE> FIELD_...
A TargetVpnGatewaysScopedList object. Messages: WarningValue: [Output Only] Informational warning which replaces the list of addresses when the list is empty. Fields: targetVpnGateways: [Output Only] List of target vpn gateways contained in this scope. warning: [Output Only] Informational warning which ...
62598ee101c39578d7f1139c
class osmnet_config(object): <NEW_LINE> <INDENT> def __init__(self, logs_folder='logs', log_file=True, log_console=False, log_name='osmnet', log_filename='osmnet', keep_osm_tags=['name', 'ref', 'highway', 'service', 'bridge', 'tunnel', 'access', 'oneway', 'toll', 'lanes', 'maxspeed', 'hgv', 'hov', 'area', 'width', 'est...
A set of configuration variables to initiate the configuration settings for osmnet. Parameters ---------- logs_folder : str location to write log files log_file : bool if true, save log output to a log file in logs_folder log_console : bool if true, print log output to the console log_name : str name o...
62598ee1796e427e5384cd8c
class FileUpload(models.Model): <NEW_LINE> <INDENT> title = models.CharField(default='年月', max_length=100) <NEW_LINE> upload_file = models.FileField(upload_to='csv', validators=[FileExtensionValidator(['csv',])]) <NEW_LINE> created_at = models.DateField(auto_now_add=True) <NEW_LINE> analyzed_file = models.FileField(upl...
ファイルのアップロード
62598ee1b7558d5895461c40
class ReverseDictionaryInputSet(InputSet): <NEW_LINE> <INDENT> def set_APIKey(self, value): <NEW_LINE> <INDENT> super(ReverseDictionaryInputSet, self)._set_input('APIKey', value) <NEW_LINE> <DEDENT> def set_ExcludePartOfSpeech(self, value): <NEW_LINE> <INDENT> super(ReverseDictionaryInputSet, self)._set_input('ExcludeP...
An InputSet with methods appropriate for specifying the inputs to the ReverseDictionary Choreo. The InputSet object is used to specify input parameters when executing this Choreo.
62598ee166673b3332c2e99b
class TestLinkUtils(DataGridTestCase): <NEW_LINE> <INDENT> def afterSetUp(self): <NEW_LINE> <INDENT> self.folder.invokeFactory("DataGridDemoType", id="sample") <NEW_LINE> <DEDENT> def testMakeAbsoluteURL(self): <NEW_LINE> <INDENT> context = self.folder.sample <NEW_LINE> self.assertEqual(makeAbsoluteLink("test", context...
Test LinkColumn link transforms
62598ee1be8e80087fbbd641
class ActEgutegiaParser(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.document = '' <NEW_LINE> self.estropada = None <NEW_LINE> self.base_url = 'http://www.euskolabelliga.com' <NEW_LINE> self.liga = 'ACT' <NEW_LINE> <DEDENT> def parse(self, content): <NEW_LINE> <INDENT> self.document = lxml....
Base class to parse the ACT calendar
62598ee17d847024c075a9c2
class FinishTaskView(APIView): <NEW_LINE> <INDENT> def put(self, request, task_id): <NEW_LINE> <INDENT> user = request.user <NEW_LINE> try: <NEW_LINE> <INDENT> if user.is_superuser: <NEW_LINE> <INDENT> task = Task.objects.get(pk=task_id) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> task = Task.objects.get(pk=task_id, ...
Finish task
62598ee1f548e778e5969b8a
class TestObliqueTree(TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> cls.classifier = ObliqueTree <NEW_LINE> cls.random_state = 3 <NEW_LINE> <DEDENT> def test_iris(self): <NEW_LINE> <INDENT> classifier = self.classifier(splitter="oc1, axis_parallel", random_state = self....
Tests model training and prediction in bulk
62598ee1379a373c97d975ee
class FileWriter(KNOutlet): <NEW_LINE> <INDENT> def __init__(self, outdir, filename = 'Unknown-knive-file',keepFiles=5, suffix=None): <NEW_LINE> <INDENT> self.outfile = None <NEW_LINE> if os.path.exists(outdir): <NEW_LINE> <INDENT> self.outdir = outdir <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> raise(Exception("Dire...
Write data received from self.inlet to file specified during init
62598ee1d268445f26638e88
class Borrar_imagen(SuccessMessageMixin, DeleteView): <NEW_LINE> <INDENT> form_class = ImagenForm <NEW_LINE> model = Imagen <NEW_LINE> success_message = "Se eliminó la información con éxito" <NEW_LINE> success_url = reverse_lazy('registro:lista_imagenes')
Clase que permite borrar las imagenes.
62598ee1d486a94d0ba2a5cb
class AMQPConnectorAMQPHandshakeError(AMQPConnectorPhaseErrorBase): <NEW_LINE> <INDENT> pass
Error during AMQP handshake
62598ee10a50d4780f70399d
class UnicodeWriter: <NEW_LINE> <INDENT> def __init__(self, f, dialect=csv.excel, encoding="utf-8", **kwds): <NEW_LINE> <INDENT> self.queue = cStringIO.StringIO() <NEW_LINE> self.writer = csv.writer(self.queue, dialect=dialect, **kwds) <NEW_LINE> self.stream = f <NEW_LINE> self.encoder = codecs.getincrementalencoder(en...
A CSV writer which will write rows to CSV file "f", which is encoded in the given encoding.
62598ee18e71fb1e983ba062
class AcceleratorTable(CoClass): <NEW_LINE> <INDENT> _reg_clsid_ = GUID('{CE259B71-280C-11D2-AA2F-000000000000}') <NEW_LINE> _idlflags_ = ['noncreatable'] <NEW_LINE> _typelib_path_ = typelib_path <NEW_LINE> _reg_typelib_ = ('{866AE5D3-530C-11D2-A2BD-0000F8774FB5}', 10, 2)
Accelerator Table Object.
62598ee132920d7e50bc4621
class Activity(PipelineObject): <NEW_LINE> <INDENT> def __init__(self, dependsOn, maximumRetries, runsOn, workerGroup, **kwargs): <NEW_LINE> <INDENT> if not exactly_one(runsOn, workerGroup): <NEW_LINE> <INDENT> raise ETLInputError( 'Exactly one of runsOn or workerGroup allowed!') <NEW_LINE> <DEDENT> if runsOn: <NEW_LIN...
Base class for pipeline activities
62598ee156b00c62f0fb0ec5
class AppPlugin(BasePlugin): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(AppPlugin, self).__init__() <NEW_LINE> self.app = None <NEW_LINE> <DEDENT> def init_app(self, app): <NEW_LINE> <INDENT> self.app = app
Base application plugin
62598ee185dfad0860cbed63
class AmericanSignLangSpider(scrapy.Spider): <NEW_LINE> <INDENT> name = "asl" <NEW_LINE> allowed_domains = ["asl.virginia.edu"] <NEW_LINE> start_urls = ( "http://asl.virginia.edu/node/11", ) <NEW_LINE> def parse(self, response): <NEW_LINE> <INDENT> sel = Selector(response) <NEW_LINE> people_sel = sel.xpath('//div[@clas...
Scrape all profiles from http://www.asl.virginia.edu
62598ee17047854f4633d9d5
class Address(models.Model): <NEW_LINE> <INDENT> profile = models.ForeignKey(Profile) <NEW_LINE> address_type = models.IntegerField(max_length=2,choices=constants.ADDRESS_TYPE_CHOICES) <NEW_LINE> street_1 = models.CharField(max_length=200, blank=True,null=True) <NEW_LINE> street_2 = models.CharField(max_length=200, bla...
People's Addresses - they can have more than one.
62598ee1aad79263cf42ce0a
class LocalMyServiceOAuthenticator(LocalAuthenticator, MyServiceOAuthenticator): <NEW_LINE> <INDENT> pass
A version that mixes in local system user creation
62598ee1adb09d7d5dc08bbc
class ItalicWrapper(TextTag): <NEW_LINE> <INDENT> def __init__(self, wrapped): <NEW_LINE> <INDENT> self._wrapped = wrapped <NEW_LINE> <DEDENT> def render(self): <NEW_LINE> <INDENT> return f'<i>{self._wrapped.render()}</i>'
加 <i>
62598ee16e29344779afec23
class PlayerYearOverYearSplits(_PlayerDashboard): <NEW_LINE> <INDENT> _endpoint = 'playerdashboardbyyearoveryear' <NEW_LINE> def by_year(self): <NEW_LINE> <INDENT> return _api_scrape(self.json, 1)
Displays player stats over the given season and over all seasons in the given league Args: :player_id: ID of the player to look up :team_id: ID of the team to look up :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure statistics (Totals, PerGame, Per36, et...
62598ee199cbb53fe682f4a7
class LoadGame(Frame): <NEW_LINE> <INDENT> def __init__(self, master): <NEW_LINE> <INDENT> super().__init__(Tk()) <NEW_LINE> self.pack() <NEW_LINE> self.master.title("Load game") <NEW_LINE> for i, save in enumerate(master.saved_games): <NEW_LINE> <INDENT> Button(self, text="Save #" + str(i).zfill(len(str(len(master.sav...
Menu to load a saved game.
62598ee1a8ecb0332586f7dd
class WikidataMongoDB: <NEW_LINE> <INDENT> def __init__( self, database_name: str = "wikidata_db", collection_name: str = "wikidata", ) -> None: <NEW_LINE> <INDENT> self.database_name = database_name <NEW_LINE> self.collection_name = collection_name <NEW_LINE> self.client = MongoClient(port=DEFAULT_MONGODB_PORT) <NEW_L...
Class for interfacing with Wikidata dump ingested into a MongoDB instance.
62598ee15f7d997b871f86d0
class Ressource: <NEW_LINE> <INDENT> def __init__(self, value, delta): <NEW_LINE> <INDENT> self._value = int(value) <NEW_LINE> self._delta = 0 <NEW_LINE> self._timestamp = int(time.time()) <NEW_LINE> self.set_delta(delta) <NEW_LINE> <DEDENT> def update(self): <NEW_LINE> <INDENT> time_diff = int(time.time()) - self._tim...
It manages a ressource including auto increasing value
62598ee176e4537e8c3edbad