code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class GlobusURL(serializers.Field): <NEW_LINE> <INDENT> GCS_V4_HTTP_SUFFIXES = ['.data.globus.org', '.e.globus.org'] <NEW_LINE> GCS_V5_HTTP_SUFFIXES = ['.dn.glob.us'] <NEW_LINE> PROTOCOLS = ['https', 'http', 'globus'] <NEW_LINE> def to_representation(self, value): <NEW_LINE> <INDENT> return value['url'] <NEW_LINE> <DED...
A valid Globus URL for which we can derive both an endpoint and a path. Can be used for a source or destination, as either a filename or a directory. * https://<globus_endpoint>.data.globus.org/foo/bar (gcs v4) * https://f8d036.eb38.dn.glob.us/home/jsmit/manifests (gcs v5) * https://<globus_endpoint>.e.globus.org/ (gcs...
62598f0960cbc95b06362e2e
class Batch(object): <NEW_LINE> <INDENT> graph = None <NEW_LINE> def __init__(self, graph): <NEW_LINE> <INDENT> self.graph = graph <NEW_LINE> self.runner = BatchRunner(remote(self.graph).metadata["batch"]) <NEW_LINE> self.jobs = [] <NEW_LINE> <DEDENT> def __getitem__(self, index): <NEW_LINE> <INDENT> return self.jobs[i...
A collection of :class:`.Job` objects that can be submitted to a :class:`.BatchRunner`. References to previous jobs are only valid **within the same batch** and will not work across batches.
62598f094a966d76dd5ed9d0
class Model: <NEW_LINE> <INDENT> id = 'Conv2-Dense2' <NEW_LINE> def __init__(self, params): <NEW_LINE> <INDENT> data_format = params['data_format'] <NEW_LINE> if data_format == 'channels_first': <NEW_LINE> <INDENT> self._input_shape = [-1, 1, 28, 28] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> assert data_format == '...
Model to recognize digits in the MNIST dataset.
62598f09656771135c488188
class CostCenter(SifacModel): <NEW_LINE> <INDENT> _table = "CSKS" <NEW_LINE> _columns = ["KOSTL"] <NEW_LINE> verbose_name = _("Cost center") <NEW_LINE> def __init__(self, code, *args, **kwargs): <NEW_LINE> <INDENT> super(CostCenter, self).__init__(*args, **kwargs) <NEW_LINE> self.code = code <NEW_LINE> <DEDENT> def __r...
Model to manage cost centers .. py:attribute:: code the cost center code .. py:attribute:: _table the table for cost centers (CSKS) .. py:attribute:: _columns the columns for cost center (KOSTL)
62598f09ab23a570cc2d42ea
class MercatorLatitudeScale(mscale.ScaleBase): <NEW_LINE> <INDENT> name = 'mercator' <NEW_LINE> def __init__(self, axis, **kwargs): <NEW_LINE> <INDENT> mscale.ScaleBase.__init__(self) <NEW_LINE> thresh = kwargs.pop("thresh", np.radians(85)) <NEW_LINE> if thresh >= np.pi / 2.0: <NEW_LINE> <INDENT> raise ValueError("thre...
Scales data in range -pi/2 to pi/2 (-90 to 90 degrees) using the system used to scale latitudes in a Mercator projection. The scale function: ln(tan(y) + sec(y)) The inverse scale function: atan(sinh(y)) Since the Mercator scale tends to infinity at +/- 90 degrees, there is user-defined threshold, above and belo...
62598f0971ff763f4b5e6261
class WhiteKernel(StationaryMixin, Kernel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._thetas = Thetas.from_seq((),()) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return self.__str__() <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return ...
white noise kernel k(x,z) = 1 if x == z else 0
62598f093617ad0b5ee04c2a
class CallStateFlow(flow.GRRFlow): <NEW_LINE> <INDENT> success = False <NEW_LINE> def Start(self): <NEW_LINE> <INDENT> self.CallState(next_state="ReceiveHello") <NEW_LINE> <DEDENT> def ReceiveHello(self, responses): <NEW_LINE> <INDENT> CallStateFlow.success = True
A flow that calls one of its own states.
62598f095fdd1c0f98e5ca9e
class symbolCH340G(symbolIC): <NEW_LINE> <INDENT> def __init__(self, name, refDes=defaults.icRefDes, showPinNames=True, showPinNumbers=True): <NEW_LINE> <INDENT> pinsRight = [ ['VCC', 16, pinType.pwrIn], ['RS232', 15, pinType.input], ['RTS', 14, pinType.output], ['DTR', 13, pinType.output], ['DCD', 12, pinType.input], ...
CH340G symbol
62598f095fcc89381b2656ab
class PositiveInt(ConstrainedInt, Primitive): <NEW_LINE> <INDENT> regex = re.compile(r"^\+?[1-9][0-9]*$") <NEW_LINE> __visit_name__ = "positiveInt" <NEW_LINE> gt = 0 <NEW_LINE> @classmethod <NEW_LINE> def to_string(cls, value): <NEW_LINE> <INDENT> assert isinstance(value, int) <NEW_LINE> return str(value)
Any positive integer in the range 1..2,147,483,647
62598f097b180e01f3e485c7
class Rectangle(BaseFigure): <NEW_LINE> <INDENT> def __init__(self, side_a, side_b): <NEW_LINE> <INDENT> self.name = 'Rectangle' <NEW_LINE> self.angles = 4 <NEW_LINE> self.side_a = side_a <NEW_LINE> self.side_b = side_b <NEW_LINE> self.perimeter = self.calculate_perimeter() <NEW_LINE> self.area = self.calculate_area() ...
Класс с переменными и методами геометрической фигуры "прямоугольник"
62598f09d486a94d0ba2aac5
class Sorter(object): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self._sorted = {} <NEW_LINE> self._sorted["$sort"] = OrderedDict() <NEW_LINE> self.add(kwargs) <NEW_LINE> <DEDENT> def add(self, sorts): <NEW_LINE> <INDENT> for k, v in sorts.items(): <NEW_LINE> <INDENT> self.add_sort(k, v) <NEW...
Required for ordered sorting of fields as python dictionaries do not guarantee to maintain insertion order. Sorted fields are maintained in an ``OrderedDict`` class that ensures order is maintained.
62598f0960cbc95b06362e32
class Chooser(Axon.Component.component): <NEW_LINE> <INDENT> Inboxes = { "inbox" : "receive commands", "control" : "" } <NEW_LINE> Outboxes = { "outbox" : "emits chosen items", "signal" : "" } <NEW_LINE> def __init__(self, items = [], loop = False): <NEW_LINE> <INDENT> super(Chooser,self).__init__() <NEW_LINE> self.i...
Chooser([items], [loop]) -> new Chooser component. Iterates through a finite list of items. Step by sending "NEXT", "PREV", "FIRST" or "LAST" messages to its "inbox" inbox. If loop is provided and true, then the iterates round the given items. Keyword arguments: - items -- list of items to be chosen from, must be ...
62598f09be7bc26dc92513e3
class DataflowSimulation(BaseSimulation): <NEW_LINE> <INDENT> def __init__( self, platform, graph, mapping, app_trace, wait_for_initial_tokens=False, ): <NEW_LINE> <INDENT> super().__init__(platform) <NEW_LINE> self.graph = graph <NEW_LINE> self.mapping = mapping <NEW_LINE> self.app_trace = app_trace <NEW_LINE> self.ap...
Handles the simulation of a single dataflow application Attributes: app (RuntimeApplication): Runtime instance of the application to be simulated. This is only valid inside a with block and is ``None`` otherwise. Args: platform (Platform): the platform that is simulated by this object grap...
62598f09f9cc0f698b1c484f
class RedisSentinelCache(RedisCache): <NEW_LINE> <INDENT> def __init__(self, server, params): <NEW_LINE> <INDENT> super(RedisCache, self).__init__(params) <NEW_LINE> self._server = server <NEW_LINE> self._params = params <NEW_LINE> options = params.get("OPTIONS", {}) <NEW_LINE> self._client_cls = options.get("CLIENT_CL...
Forces SentinelClient instead of DefaultClient
62598f09ff9c53063f519160
class PatientsSpider(scrapy.Spider): <NEW_LINE> <INDENT> name = 'kerala_patients' <NEW_LINE> allowed_domains = ['https://docs.google.com'] <NEW_LINE> start_urls = ['https://docs.google.com/spreadsheets/d/e/2PACX-1vQU9eLCMT0XwWnoxV_LkyCkxMcPYO7z7ULdODoUFgcdzp48pgGpGrVZFXvraXYvUioVRsQgQDU_pQyI/pubhtml'] <NEW_LINE> custom...
This spider crawls through the Google docs spreadsheet at given URL and collects necessary information regarding covid 19 patients of Kerala during the 2020 epidemic.
62598f097cff6e4e811b44e8
class Image(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swaggerTypes = { 'Width': 'int', 'Height': 'int', 'SelfUri': 'ResourceUri', 'AlternateLinks': 'list[ResourceUri]', 'Links': 'list[ResourceUri]' } <NEW_LINE> self.attributeMap = { 'Width': 'Width','Height': 'Height','SelfUri': 'SelfUri...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f09adb09d7d5dc090af
class args(_generic_attr): <NEW_LINE> <INDENT> _derived_types = (_generic_attr,) <NEW_LINE> def __init__(self,value): <NEW_LINE> <INDENT> _pbs_v1.validate_input("server", "default_qsub_arguments", value) <NEW_LINE> super(args,self).__init__(value)
Represents a space-separated list of PBS arguments to commands like qsub, qdel. Format: pbs.args(<space-separated PBS args to commands like qsub, qdel>) Ex. pbs.args("-Wsuppress_mail=N r y")
62598f093346ee7daa336be4
class JSClass( object): <NEW_LINE> <INDENT> def __init__(self, obj = None): <NEW_LINE> <INDENT> self._object = obj <NEW_LINE> <DEDENT> """Methods"""
Class JSClass Constructors
62598f09099cdd3c63674958
class JobEvent(ReprObject, ABC): <NEW_LINE> <INDENT> def __init__( self, event_number: int = None, time_stamp: date_time = None ): <NEW_LINE> <INDENT> self.event_number = event_number <NEW_LINE> self.time_stamp = time_stamp
Abstract class to wrap each HTCondor JobEvent. Each event has an event number and a time stamp The event number is defined by HTCondor but kept dynamic here to avoid errors if the setup changes. https://htcondor.readthedocs.io/en/latest/codes-other-values :param event_number: int HTCondor event number :param time...
62598f090fa83653e46f39e6
class CityD(NamedCoordD): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> for _s in [NamedCoordD]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) <NEW_LINE> __setattr__ = lambda self, name, value: _swig_setattr(self, CityD, name, value) <NEW_LINE> __swig_getmethods__ = {} <NEW_LINE> for _s in ...
Proxy of C++ Seiscomp::Math::Geo::City<(double)> class
62598f09851cf427c66b6dcb
class Solution: <NEW_LINE> <INDENT> def reverseBits(self, n): <NEW_LINE> <INDENT> res = 0 <NEW_LINE> for _ in range(32): <NEW_LINE> <INDENT> res = (res << 1) + (n & 1) <NEW_LINE> n = n >> 1 <NEW_LINE> <DEDENT> return res
Bit Manipulation.
62598f09656771135c48818e
class BasePartition(object): <NEW_LINE> <INDENT> @property <NEW_LINE> def id(self): <NEW_LINE> <INDENT> return self._id <NEW_LINE> <DEDENT> @property <NEW_LINE> def leader(self): <NEW_LINE> <INDENT> return self._leader <NEW_LINE> <DEDENT> @property <NEW_LINE> def replicas(self): <NEW_LINE> <INDENT> return self._replica...
A Kafka Partition. Each Kafka topic is split up into parts called "partitions". When reading or writing a topic, you're actually reading a partition of the topic. Replication also happens at the partition level. Like Brokers, Partitions aren't useful under normal circumstances, but are handy to know about for debugg...
62598f0960cbc95b06362e34
class NeonButton(Button): <NEW_LINE> <INDENT> width = 318 <NEW_LINE> height = 101 <NEW_LINE> def __init__(self, pos, text, call=None, args=None, *groups, **kwargs): <NEW_LINE> <INDENT> on = "neon_button_on_{}".format(text.lower()) <NEW_LINE> off = "neon_button_off_{}".format(text.lower()) <NEW_LINE> on_image = prepare....
Neon sign style button that glows on mouseover.
62598f09ec188e330fdf73b4
class Image(e._LinkElement): <NEW_LINE> <INDENT> def __init__(self, href, alt="picture", columns=6): <NEW_LINE> <INDENT> super().__init__(href) <NEW_LINE> self.image = e._ImageElement(src=href, alt=alt) <NEW_LINE> self.image._add_style({"width": "100%"}) <NEW_LINE> self._add_class("col-%s" % str(columns)) <NEW_LINE> se...
Parameters ---------- href: string it's name of image that is placed within static/ folder alt: string alternative text for people who can't see the picture itself columns: int how many of 12 columns the picture will take
62598f099f288636728172f9
class Movie: <NEW_LINE> <INDENT> def __init__(self, title, posterUrl, trailerUrl): <NEW_LINE> <INDENT> self.title = title <NEW_LINE> self.posterUrl = posterUrl <NEW_LINE> self.trailerUrl = trailerUrl
Movie class to hold information about the favourite movies A movie object containing the following fields: 1. Title 2. Poster URL 3. Trailer YouTube URL
62598f09ab23a570cc2d42ed
class ExtensionApp(Application): <NEW_LINE> <INDENT> name = u'jupyter_kernel_gateway_bundlers extension' <NEW_LINE> description = u'Utilities for managing the jupyter_kernel_gateway_bundlers extension' <NEW_LINE> examples = "" <NEW_LINE> subcommands = dict( activate=( ExtensionActivateApp, "Activate the extension." ), ...
CLI for extension management.
62598f093617ad0b5ee04c30
class RandomPyPolicy(py_policy.Base): <NEW_LINE> <INDENT> def __init__(self, time_step_spec, action_spec, seed=None, outer_dims=None): <NEW_LINE> <INDENT> self._seed = seed <NEW_LINE> self._outer_dims = outer_dims <NEW_LINE> self._rng = np.random.RandomState(seed) <NEW_LINE> if time_step_spec is None: <NEW_LINE> <INDEN...
Returns random samples of the given action_spec.
62598f0931939e2706ed0fe4
class PageChooseApn(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): <NEW_LINE> <INDENT> @autopilot.logging.log_action(logger.debug) <NEW_LINE> def open(self, name): <NEW_LINE> <INDENT> return self._open_editor(name) <NEW_LINE> <DEDENT> @autopilot.logging.log_action(logger.debug) <NEW_LINE> def delete(self, name)...
Autopilot helper for apn editor page
62598f090fa83653e46f39e8
class PublicAPI( Sender, AlbumMethods, AnnotationMethods, ArticleMethods, ArtistMethods, CoverArtMethods, DiscussionMethods, LeaderboardMethods, QuestionMethods, ReferentMethods, SearchMethods, SongMethods, UserMethods, VideoMethods, MiscMethods): <NEW_LINE> <INDENT> def __init__( self, response_format='plain', timeout...
Genius public API. The :obj:`PublicAPI` class is in charge of making all the requests to the public API (genius.com/api) You can use this method without an access token since calls are made to the public API. All methods of this class are available through the :class:`Genius` class. Args: response_format (:obj:`...
62598f093d592f4c4edb99ed
class AlternationsTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def testCanonicalForms(self): <NEW_LINE> <INDENT> base = (u'ゆっ', u'ぐり') <NEW_LINE> seg1Cases = [u'ゆ' + c for c in u'いちりきつくっ'] <NEW_LINE> seg2Cases = [u'くり', u'ぐり'] <NEW_LINE> expected = set(s...
This class tests the Alternations class.
62598f09ad47b63b2c5a631d
class geoJson(supportedFormat): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.name = u"GeoJson" <NEW_LINE> self.extension = u".json" <NEW_LINE> self.outVars = None <NEW_LINE> self.__logger = log(self.__class__.__name__) <NEW_LINE> <DEDENT> def convertShapeFile(self, destFolder, destPath, sourcePath, ...
Functions required to parse the html index file for GeoJson
62598f09be7bc26dc92513e5
class Player(): <NEW_LINE> <INDENT> def __init__(self, game, board): <NEW_LINE> <INDENT> self._game = game <NEW_LINE> self._playerboard = board <NEW_LINE> <DEDENT> @property <NEW_LINE> def game(self): <NEW_LINE> <INDENT> return (self._game) <NEW_LINE> <DEDENT> @property <NEW_LINE> def board(self): <NEW_LINE> <INDENT> r...
Player - human or computer making decisions about actions to take
62598f09bf627c535bcaff7a
class ContentViewVersionPromoteTestCase(APITestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> super(ContentViewVersionPromoteTestCase, cls).setUpClass() <NEW_LINE> cls.org = entities.Organization().create() <NEW_LINE> cls.lce1 = entities.LifecycleEnvironment(organization=cls...
Tests for content view version promotion.
62598f09ff9c53063f519164
class BaseEngineSettings: <NEW_LINE> <INDENT> def __init__(self, database): <NEW_LINE> <INDENT> self.database = database <NEW_LINE> self.database_adminuser = self.database.get('ADMINUSER', self.database['USER']) <NEW_LINE> self.database_user = self.database['USER'] <NEW_LINE> self.database_password = self.database['PAS...
Base settings for a database engine
62598f097c178a314d78bfa4
class UploadImageFromURLForm(forms.Form): <NEW_LINE> <INDENT> url = forms.URLField(required=True, label='', error_messages={ "required": "Please enter a valid image URL" }, widget=forms.TextInput(attrs={'placeholder': 'Image URL'}))
Form to get url of image
62598f09091ae35668703720
class Tool(_DomainObject): <NEW_LINE> <INDENT> _type = 'tool' <NEW_LINE> _properties = OrderedDict([ ('type', TypeProperty(_type, spec_version='2.0')), ('id', IDProperty(_type, spec_version='2.0')), ('created_by_ref', ReferenceProperty(valid_types='identity', spec_version='2.0')), ('created', TimestampProperty(default=...
For more detailed information on this object's properties, see `the STIX 2.0 specification <http://docs.oasis-open.org/cti/stix/v2.0/cs01/part2-stix-objects/stix-v2.0-cs01-part2-stix-objects.html#_Toc496714332>`__.
62598f09283ffb24f3cf23b2
class _MediaBrowsingStory(_BrowsingStory): <NEW_LINE> <INDENT> ABSTRACT_STORY = True <NEW_LINE> ITEM_VIEW_TIME_IN_SECONDS = 3 <NEW_LINE> ITEMS_TO_VISIT = 15 <NEW_LINE> ITEM_SELECTOR_INDEX = 0 <NEW_LINE> INCREMENT_INDEX_AFTER_EACH_ITEM = False <NEW_LINE> def _DidLoadDocument(self, action_runner): <NEW_LINE> <INDENT> ind...
Abstract base class for media user stories A media story imitates browsing a website with photo or video content: 1. Load a page showing a media item 2. Click on the next link to go to the next media item 3. etc.
62598f097b180e01f3e485cb
class LogDataStruct(LogFile): <NEW_LINE> <INDENT> def append(self,data_struct,memory_address=None, extra=None): <NEW_LINE> <INDENT> if self.log_init is False or self.reprint_header: <NEW_LINE> <INDENT> keys = [str(x) for x in data_struct.keys()] <NEW_LINE> line_list = ["Timestamp"]+keys <NEW_LINE> if extra is not None:...
This class will ingest DataStruct objects and log them appropriately
62598f09a219f33f346c5332
class Logger(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Logger, self).__init__() <NEW_LINE> logger_name = ('%s' % self.__class__).split('.')[-1] <NEW_LINE> self.logger = logging.getLogger(logger_name)
日志辅助类
62598f09283ffb24f3cf23b3
class DonationIn(db.Model): <NEW_LINE> <INDENT> date = db.DateProperty() <NEW_LINE> donor = db.ReferenceProperty(Contact, collection_name='donors') <NEW_LINE> intake = db.ReferenceProperty(OneOfUsPerson, collection_name='intake_people') <NEW_LINE> bikes = db.ListProperty(item_type=db.Key) <NEW_LINE> cash = db.FloatProp...
For a later stage of developement
62598f09851cf427c66b6dcf
class Server(Structure): <NEW_LINE> <INDENT> _fields_ = [ ("id", c_char_p), ("type", c_char_p), ("metadata", c_char_p), ("hostname", c_char_p), ("frontend", c_int)]
server class
62598f09bf627c535bcaff7c
class APITestCaseAuthMixin(APITestCase): <NEW_LINE> <INDENT> oauth2_settings._SCOPES = ["read", "write"] <NEW_LINE> client = APIClient() <NEW_LINE> def create_authorization(self): <NEW_LINE> <INDENT> test_user = User.objects.create_user("test_user", "test@example.com", "123456") <NEW_LINE> self.client.force_authenticat...
oauth toolkit authorized
62598f09cc40096d6161975e
class Idea(models.Model): <NEW_LINE> <INDENT> problem = models.ForeignKey(Problem, editable=False) <NEW_LINE> title = models.CharField(verbose_name=_('title'), max_length=90, help_text=_('Describe in a general basis what is the idea you\'re given to address the problem.')) <NEW_LINE> description = RichTextField(verbose...
Ideas are the second main entity in the platform, as the problem-solving process requires idea generation and participation of users. These will after compose the strategy table.
62598f0931939e2706ed0fe6
class ProductFactory(factory.django.DjangoModelFactory): <NEW_LINE> <INDENT> product_id = factory.Faker('uuid4') <NEW_LINE> sku = factory.Faker('uuid4') <NEW_LINE> type = factory.fuzzy.FuzzyChoice(Product.TYPE_CHOICES, getter=lambda c: c[0]) <NEW_LINE> price = factory.fuzzy.FuzzyDecimal(5.00, 100.00) <NEW_LINE> price_t...
Mock Product objects
62598f09ec188e330fdf73b9
class JsonWriter(template_writer.TemplateWriter): <NEW_LINE> <INDENT> def PreprocessPolicies(self, policy_list): <NEW_LINE> <INDENT> return self.FlattenGroupsAndSortPolicies(policy_list) <NEW_LINE> <DEDENT> def WritePolicy(self, policy): <NEW_LINE> <INDENT> example_value = policy['example_value'] <NEW_LINE> if policy['...
Class for generating policy files in JSON format (for Linux). The generated files will define all the supported policies with example values set for them. This class is used by PolicyTemplateGenerator to write .json files.
62598f09f9cc0f698b1c4853
class MessageReturnedException(RabbitpyException): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return 'Message %s was returned by RabbitMQ: (%s) %s' % (self.args[0], self.args[1], self.args[2])
Raised if the RabbitMQ sends a message back to a publisher via the Basic.Return RPC call.
62598f09dc8b845886d520cf
class InstanceMoveRequest(_messages.Message): <NEW_LINE> <INDENT> destinationZone = _messages.StringField(1) <NEW_LINE> targetInstance = _messages.StringField(2)
A InstanceMoveRequest object. Fields: destinationZone: The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone: - https://www.googleapis.com/compute/v1/projects/project/zones/zone - projects/project/zones/zone...
62598f09be7bc26dc92513e7
class ChartEntry: <NEW_LINE> <INDENT> def __init__(self, title, artist, peakPos, lastPos, weeks, rank, change): <NEW_LINE> <INDENT> self.title = title <NEW_LINE> self.artist = artist <NEW_LINE> self.peakPos = peakPos <NEW_LINE> self.lastPos = lastPos <NEW_LINE> self.weeks = weeks <NEW_LINE> self.rank = rank <NEW_LINE> ...
Represents a single entry (song) on a chart. Attributes: title: The title of the song. artist: The name of the song artist, as formatted on Billboard.com. If there are multiple artists and/or featured artists, they will be included in this string. peakPos: The song's peak position on the ch...
62598f09ad47b63b2c5a6321
class Solution: <NEW_LINE> <INDENT> def isMatch(self, s, p): <NEW_LINE> <INDENT> m, n = len(s), len(p) <NEW_LINE> def matches(i, j): <NEW_LINE> <INDENT> if i == 0: <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> if p[j - 1] == '.': <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> return s[i - 1] == p[j - 1] <NE...
动态规划 = 状态转移方程 + 边界条件 状态转移方程 = f[i][j] = if(p[j] != '*') = f[i-1][j-1] matches; otherwise false; otherwise = f[i-1][j] or f[i][j-2] matches; otherwise f[i][j-2] 边界条件 = f[0][0] = true, 即就是空串可以匹配 逐步匹配、 S.size = m、 P.size = n 时间复杂度 T(n) = big O(mn) 空间复杂度 S(n) = big O(mn)
62598f09851cf427c66b6dd1
class SourceInForm(forms.Form): <NEW_LINE> <INDENT> source_name = forms.ChoiceField( widget=forms.Select(attrs={'class': 'no_clear'}), label=form_consts.Indicator.SOURCE, required=True) <NEW_LINE> source_method = forms.CharField( widget=forms.TextInput, label=form_consts.Indicator.SOURCE_METHOD, required=False) <NEW_LI...
Add source stuff to a form.
62598f094527f215b58e8a03
class NamedHealthBar(HealthBar): <NEW_LINE> <INDENT> def __init__(self, *args, **kwds): <NEW_LINE> <INDENT> super().__init__(*args, **kwds) <NEW_LINE> self.name = 'UNKNOWN' <NEW_LINE> <DEDENT> def setName(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> <DEDENT> def boundingRect(self): <NEW_LINE> <INDENT> p...
A health bar with a name (of a Hero)
62598f09283ffb24f3cf23b5
class ArtigosDetalhe(generic.DetailView): <NEW_LINE> <INDENT> model = models.Artigo <NEW_LINE> context_object_name = 'artigo' <NEW_LINE> template_name = 'artigos/artigo.html'
Visão para um determinado artigo.
62598f097cff6e4e811b44f0
class Relation(DbBase): <NEW_LINE> <INDENT> def relation(self, table: str, origin_field: str, search_field: str, destination_field: str=None, id_field: str="id"): <NEW_LINE> <INDENT> df = self._relation(table, origin_field, search_field, destination_field, id_field) <NEW_LINE> self.df = df <NEW_LINE> <DEDENT> def relat...
A class to handle database relations
62598f0950812a4eaa620170
class Post(db.Model, base.ModelMixin): <NEW_LINE> <INDENT> title = db.Column(db.String(256), nullable=False) <NEW_LINE> body = db.Column(db.Text, nullable=False) <NEW_LINE> author_id = db.Column(db.Integer, db.ForeignKey('author.id'), nullable=False) <NEW_LINE> language_id = db.Column(db.Integer, db.ForeignKey('languag...
a post, usually a poem that has been uploaded to the site
62598f09fbf16365ca792ba6
class MainScreen(serge.blocks.actors.ScreenActor): <NEW_LINE> <INDENT> def __init__(self, options): <NEW_LINE> <INDENT> super(MainScreen, self).__init__('item', 'main-screen') <NEW_LINE> self.options = options <NEW_LINE> <DEDENT> def updateActor(self, interval, world): <NEW_LINE> <INDENT> super(MainScreen, self).update...
The logic for the main screen
62598f095fcc89381b2656b1
class ThirdNotificationTest(TestCase): <NEW_LINE> <INDENT> fixtures = ['demo_users.json', 'demo_reports.json'] <NEW_LINE> @fudge.patch('datetime.datetime.today') <NEW_LINE> def test_send_notification_with_reports_filled(self, fake_requests_obj): <NEW_LINE> <INDENT> fake_date = datetime.datetime(year=2012, month=3, day=...
Test sending of third notification to Reps to fill reports.
62598f093d592f4c4edb99f3
class Invigorated(Condition): <NEW_LINE> <INDENT> def __init__(self, duration): <NEW_LINE> <INDENT> super().__init__(duration) <NEW_LINE> self.type = INVIGORATED
Increases HP regen
62598f0955399d3f05625030
class SourceTypeField(EnumField): <NEW_LINE> <INDENT> _name = 'source_type' <NEW_LINE> _enum = SourceType
A field that holds the source type of device.
62598f094527f215b58e8a05
class Format(object): <NEW_LINE> <INDENT> def __init__(self, locale, tzinfo=None): <NEW_LINE> <INDENT> self.locale = Locale.parse(locale) <NEW_LINE> self.tzinfo = tzinfo <NEW_LINE> <DEDENT> def date(self, date=None, format='medium'): <NEW_LINE> <INDENT> return format_date(date, format, locale=self.locale) <NEW_LINE> <D...
Wrapper class providing the various date and number formatting functions bound to a specific locale and time-zone. >>> fmt = Format('en_US', UTC) >>> fmt.date(date(2007, 4, 1)) u'Apr 1, 2007' >>> fmt.decimal(1.2345) u'1.234'
62598f093617ad0b5ee04c38
class WultWORawResult(_WORawResultBase.WORawResultBase): <NEW_LINE> <INDENT> def __init__(self, reportid, outdir, toolver, cpunum): <NEW_LINE> <INDENT> self.cpunum = cpunum <NEW_LINE> super().__init__(reportid, outdir) <NEW_LINE> self.info["toolname"] = "wult" <NEW_LINE> self.info["toolver"] = toolver <NEW_LINE> self.i...
This class represents a write-only raw wult test result.
62598f0997e22403b38399ec
class RssFetch(models.Model): <NEW_LINE> <INDENT> podcast = models.ForeignKey(Podcast, related_name='fetches') <NEW_LINE> created = CreationDateTimeField() <NEW_LINE> fetched = models.DateTimeField(blank=True, null=True) <NEW_LINE> body = models.BinaryField(blank=True, null=True) <NEW_LINE> state = FSMField(default='no...
A fetch of the RSS feed of a podcast. @startuml [*] --> not_fetched not_fetched --> fetching fetching --> fetched fetching --> failed not_fetched --> fetched fetched --> [*] failed --> [*] @enduml
62598f094a966d76dd5ed9e0
class LoadingModelCheckpoint(tf.keras.callbacks.ModelCheckpoint): <NEW_LINE> <INDENT> def __init__(self, model_dir, **kwargs): <NEW_LINE> <INDENT> self._model_dir = model_dir <NEW_LINE> self._filename = "model-{epoch:04d}" + SAVE_FORMAT_WITH_SEP <NEW_LINE> super(LoadingModelCheckpoint, self).__init__( filepath=path.joi...
ModelCheckpoint modified to automatically restore model. Weight restoration can be done manually using `self.restore`. Restoration only happens once by default, but you can force subsequent restorations using `self.restore(force_restore=True)`.
62598f09dc8b845886d520d3
class HeaderChangeLevelCommand(sublime_plugin.TextCommand): <NEW_LINE> <INDENT> def run(self, edit, offset=-1): <NEW_LINE> <INDENT> cursor_pos = self.view.sel()[0].begin() <NEW_LINE> region = sublime.Region(0, self.view.size()) <NEW_LINE> tree = RstHeaderTree(self.view.substr(region)) <NEW_LINE> levels = tree.levels() ...
increase or decrease the header level, The level markup is autodetected from the document, and use sphinx's convention by default.
62598f09d486a94d0ba2aad3
class ValidateNodeNoGhosting(pyblish.api.InstancePlugin): <NEW_LINE> <INDENT> order = colorbleed.api.ValidateContentsOrder <NEW_LINE> hosts = ['maya'] <NEW_LINE> families = ['colorbleed.model', 'colorbleed.rig'] <NEW_LINE> label = "No Ghosting" <NEW_LINE> actions = [colorbleed.maya.action.SelectInvalidAction] <NEW_LINE...
Ensure nodes do not have ghosting enabled. If one would publish towards a non-Maya format it's likely that stats like ghosting won't be exported, eg. exporting to Alembic. Instead of creating many micro-managing checks (like this one) to ensure attributes have not been changed from their default it could be more effi...
62598f09adb09d7d5dc090bb
class Sqrt(MathNode): <NEW_LINE> <INDENT> INFIX_FMT = 'sqrt({0})' <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super().__init__(**kwargs) <NEW_LINE> self.data['name'] = 'sqrt' <NEW_LINE> <DEDENT> def get_arity(self=None): <NEW_LINE> <INDENT> return 1 <NEW_LINE> <DEDENT> def operation(self, *args): <NEW_...
Square root. .. warning:: This is an unprotected square root, i.e. the square root of negative numbers is not handled in this node.
62598f094a966d76dd5ed9e2
class ModelMetaclass(type): <NEW_LINE> <INDENT> def __new__(cls, name, bases, attrs): <NEW_LINE> <INDENT> if name == 'Model': <NEW_LINE> <INDENT> return super(ModelMetaclass, cls).__new__(cls, name, bases, attrs) <NEW_LINE> <DEDENT> mappings = dict() <NEW_LINE> for k, v in attrs.iteritems(): <NEW_LINE> <INDENT> if isin...
定义元类
62598f097b180e01f3e485cf
class Dict(dict): <NEW_LINE> <INDENT> def __init__(self, names=(), values=(), **kwargs): <NEW_LINE> <INDENT> super(Dict, self).__init__(**kwargs) <NEW_LINE> for k, v in zip(names, values): <NEW_LINE> <INDENT> self[k] = v <NEW_LINE> <DEDENT> <DEDENT> def __getattr__(self, key): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDEN...
Simple dict but support access as x.y style.
62598f09656771135c48819a
class AudioCall(WebrtcPage): <NEW_LINE> <INDENT> def __init__(self, page_set, codec, tags): <NEW_LINE> <INDENT> super(AudioCall, self).__init__( url='file://webrtc_cases/audio.html?codec=%s' % codec, name='audio_call_%s_10s' % codec.lower(), page_set=page_set, tags=tags) <NEW_LINE> self.codec = codec <NEW_LINE> <DEDENT...
Why: Sets up a WebRTC audio call.
62598f0950812a4eaa620173
class LimitMiddlewareTest(BaseLimitTestSuite): <NEW_LINE> <INDENT> @webob.dec.wsgify <NEW_LINE> def _empty_app(self, request): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def setUp(self): <NEW_LINE> <INDENT> super(LimitMiddlewareTest, self).setUp() <NEW_LINE> _limits = '(GET, *, .*, 1, MINUTE)' <NEW_LINE> self.app = l...
Tests for the `limits.RateLimitingMiddleware` class.
62598f09ec188e330fdf73c1
class Box(fbgui.Panel): <NEW_LINE> <INDENT> def __init__(self,id,settings=fbgui.Settings(),toplevel=False,parent=None): <NEW_LINE> <INDENT> super(Box,self).__init__(id,settings=settings, toplevel=toplevel,parent=parent) <NEW_LINE> self.padding = getattr(settings,'padding',(0,0)) <NEW_LINE> if not type(self.padding) is ...
base class for all Boxes
62598f0955399d3f05625036
class Hollow_Village(Center_Village): <NEW_LINE> <INDENT> def mass_calculate(self): <NEW_LINE> <INDENT> k = 1 <NEW_LINE> p = 1 <NEW_LINE> q = 1 <NEW_LINE> self.mass = 1 <NEW_LINE> return self.mass
This class defines hollow village which creates hollow village instance
62598f09167d2b6e312b5aab
class DragonSlayer(MetaBadge): <NEW_LINE> <INDENT> id = "drangonslayer" <NEW_LINE> model = models.History <NEW_LINE> one_time_only = True <NEW_LINE> title = _("Dragon Slayer") <NEW_LINE> description = _("Added and destroyed a file named spike") <NEW_LINE> level = "4" <NEW_LINE> def get_progress(self, user): <NEW_LINE> ...
Badge won by user who added and destroyed a file named spike
62598f09283ffb24f3cf23bd
class StatusManage: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def add_node(connection, address): <NEW_LINE> <INDENT> node = { "con": connection, "addr": address } <NEW_LINE> node_list.append(node) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def remove_node(connection, address): <NEW_LINE> <INDENT> node = { "con": c...
node 状态管理类
62598f09a05bb46b38489389
class RHEditingManagementBase(TokenAccessMixin, RHManageEventBase): <NEW_LINE> <INDENT> EVENT_FEATURE = 'editing' <NEW_LINE> PERMISSION = 'editing_manager' <NEW_LINE> def _check_access(self): <NEW_LINE> <INDENT> if not TokenAccessMixin._token_can_access(self): <NEW_LINE> <INDENT> super()._check_access()
Base class for editing RHs that don't reference an editable.
62598f09bf627c535bcaff86
class RandomRotatorZ(RandomTransformSE3): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__(rot_mag=360) <NEW_LINE> <DEDENT> def generate_transform(self): <NEW_LINE> <INDENT> rand_rot_deg = np.random.random() * self._rot_mag <NEW_LINE> rand_rot = Rotation.from_euler('z', rand_rot_deg, degrees...
Applies a random z-rotation to the source point cloud
62598f093617ad0b5ee04c3e
class PageDataEntityView(object): <NEW_LINE> <INDENT> swagger_types = { 'data': 'list[EntityView]', 'has_next': 'bool', 'total_elements': 'int', 'total_pages': 'int' } <NEW_LINE> attribute_map = { 'data': 'data', 'has_next': 'hasNext', 'total_elements': 'totalElements', 'total_pages': 'totalPages' } <NEW_LINE> def __in...
NOTE: This class is auto generated by the swagger code generator program.
62598f097c178a314d78bfb0
class VSEQFClearZooms(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = 'vseqf.quickzoom_clear' <NEW_LINE> bl_label = 'Clear All Presets' <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> scene = context.scene <NEW_LINE> bpy.ops.ed.undo_push() <NEW_LINE> for index, zoom_preset in reversed(list(enumerate(sce...
Clears all zoom presets
62598f0931939e2706ed0feb
class Card(): <NEW_LINE> <INDENT> __port = 0 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> print(self.__port) <NEW_LINE> self.__r = readers() <NEW_LINE> self.__card = self.__r[self.__port].createConnection() <NEW_LINE> self.__card.connect() <NEW_LINE> print("# Connect Device :", self.__r) ...
Card 通讯
62598f0997e22403b38399f2
class MethodAttributes(FrozenClass): <NEW_LINE> <INDENT> ua_types = { 'SpecifiedAttributes': 'UInt32', 'DisplayName': 'LocalizedText', 'Description': 'LocalizedText', 'WriteMask': 'UInt32', 'UserWriteMask': 'UInt32', 'Executable': 'Boolean', 'UserExecutable': 'Boolean', } <NEW_LINE> def __init__(self, binary=None): <NE...
The attributes for a method node. :ivar SpecifiedAttributes: :vartype SpecifiedAttributes: UInt32 :ivar DisplayName: :vartype DisplayName: LocalizedText :ivar Description: :vartype Description: LocalizedText :ivar WriteMask: :vartype WriteMask: UInt32 :ivar UserWriteMask: :vartype UserWriteMask: UInt32 :ivar Executabl...
62598f09091ae3566870372c
class MGMSG_MOT_REQ_VELPARAMS(Message): <NEW_LINE> <INDENT> id = 0x414 <NEW_LINE> parameters = [('chan_ident', 'B'), (None, 'B')]
See :class:`MGMSG_MOT_SET_VELPARAMS`. :param chan_ident: channel number (0x01, 0x02) :type chan_ident: int
62598f09cc40096d61619763
class StoreFinder: <NEW_LINE> <INDENT> def __init__(self, store_respository: StoreRepository) -> NoReturn: <NEW_LINE> <INDENT> if not isinstance(store_respository, StoreRepository): <NEW_LINE> <INDENT> raise Exception(f"Error {store_respository} is no instance of StoreRepository") <NEW_LINE> <DEDENT> self.__store_respo...
Store Finder
62598f095fcc89381b2656b5
class Person: <NEW_LINE> <INDENT> def __init__(self, name, weight): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.weight = weight <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return f"我的名字叫{self.name},我的体重是{self.weight}公斤" <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> print(f"{self.name}爱跑...
人类
62598f0a283ffb24f3cf23bf
class ValidatieCategorieViewSet(DatapuntViewSet): <NEW_LINE> <INDENT> queryset = models.ValidatieCategorie.objects.all().order_by("pk") <NEW_LINE> serializer_class = serializers.ValidatieCategorieSerializer <NEW_LINE> serializer_detail_class = serializers.ValidatieCategorieSerializer
Returns all `ValidatieCategorie instances`, ordered by id
62598f0a5fc7496912d477fc
class Middleware(Component): <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> component_name = 'Base Middleware'
Interface definition for a Frontier Middlewares
62598f0a50812a4eaa620175
class CalendarDateTimePicker(CalendarDatePicker): <NEW_LINE> <INDENT> messages = { 'badFormat': 'Invalid datetime format.', 'empty': 'Please Enter a Date and Time.', } <NEW_LINE> date_format = "%Y-%m-%d %H:%M" <NEW_LINE> picker_shows_time = True
Use a javascript calendar system to allow picking of calendar dates and time. The date_format is in yyyy-mm-dd hh:mm unless otherwise specified
62598f0a3617ad0b5ee04c40
class CompilerNotFoundError(CompileError): <NEW_LINE> <INDENT> pass
Cannot find compiler.
62598f0a7c178a314d78bfb2
class CourseSection(models.Model): <NEW_LINE> <INDENT> chapter = models.ForeignKey(to="CourseChapter", related_name="course_sections", on_delete=None) <NEW_LINE> title = models.CharField(max_length=32, verbose_name="课时") <NEW_LINE> section_order = models.SmallIntegerField(verbose_name="课时排序", help_text="建议每个课时之间空1至2个值,...
课时表
62598f0a71ff763f4b5e6277
class RsaBased: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def generate_keypair(): <NEW_LINE> <INDENT> skey: rsa.RSAPrivateKey = rsa.generate_private_key( public_exponent=3, key_size=1024, backend=default_backend() ) <NEW_LINE> pkey: rsa.RSAPublicKey = skey.public_key() <NEW_LINE> return skey, pkey <NEW_LINE> <DEDENT...
Wallet crypto implementation using RSA. Useful because some attacks on RSA can be leveraged in the context of FumbleChain.
62598f0a9f2886367281730a
class Text(unicode): <NEW_LINE> <INDENT> __slots__ = ('lang', 'escaped',) <NEW_LINE> @classmethod <NEW_LINE> def __valid(cls, *args): <NEW_LINE> <INDENT> return ( len(args) and args[0] is not None ) <NEW_LINE> <DEDENT> def __new__(cls, *args, **kwargs): <NEW_LINE> <INDENT> if cls.__valid(*args): <NEW_LINE> <INDENT> lan...
An XML text object used to represent text content. @ivar lang: The (optional) language flag. @type lang: bool @ivar escaped: The (optional) XML special character escaped flag. @type escaped: bool
62598f0afbf16365ca792bb0
class HostMigration(InputEvent): <NEW_LINE> <INDENT> def __init__(self, old_ingress_dpid, old_ingress_port_no, new_ingress_dpid, new_ingress_port_no, host_id, label=None, logical_round=-1, event_time=None): <NEW_LINE> <INDENT> super(HostMigration, self).__init__(label=label, logical_round=logical_round, event_time=even...
Migrates a host from one location in network to another. Creates a new virtual port on the new switch, and takes down the old port on the old switch.
62598f0a5fcc89381b2656b6
class Tunes(Base): <NEW_LINE> <INDENT> __tablename__ = 'tunes' <NEW_LINE> __table_args__ = ( db.UniqueConstraint('name', 'stream_id'), ) <NEW_LINE> id = db.Column( db.Integer, primary_key=True) <NEW_LINE> name = db.Column(db.String) <NEW_LINE> path = db.Column(db.String) <NEW_LINE> stream_id = db.Column(db.String) <NEW...
Indexing of 'tunes' available during observations. Should correspond to all tune files. Attributes ----------- id : integer primary key name : string name of tune file path : string absolute path of tune file stream_id : string stream_id for file start : datetime.datetime The time the tune file ...
62598f0adc8b845886d520db
class BaseDeclarativeModel(BaseModel, BaseDeclarativeMixIn): <NEW_LINE> <INDENT> pass
Base model to use for declarative model definitions.
62598f0a377c676e912f62ef
class Solution: <NEW_LINE> <INDENT> def searchRange(self, A, target): <NEW_LINE> <INDENT> if len(A) == 0: <NEW_LINE> <INDENT> return [-1,-1] <NEW_LINE> <DEDENT> results = [] <NEW_LINE> start, end = 0, len(A)-1 <NEW_LINE> while start + 1 < end: <NEW_LINE> <INDENT> mid = start + (end - start) // 2 <NEW_LINE> if A[mid] < ...
@param A: an integer sorted array @param target: an integer to be inserted @return: a list of length 2, [index1, index2]
62598f0aab23a570cc2d42f6
class MIU(object): <NEW_LINE> <INDENT> def __init__(self, _input, target, rule=None, parent=None): <NEW_LINE> <INDENT> self._input = _input <NEW_LINE> self._rule_lookup = { 1: self._rule_one, 2: self._rule_two, 3: self._rule_three, 4: self._rule_four } <NEW_LINE> self._target = target <NEW_LINE> self.done_rule = rule <...
implementation to generate theorums from the MU system in descibed in https://en.wikipedia.org/wiki/Godel,_Escher,_Bach
62598f0aff9c53063f519174
class HessApproximation(base, HessianObjectiveJacApprox): <NEW_LINE> <INDENT> pass
Class which impersonates ``base``, but which returns zeros for the models Hessian. This will effectively result in the calculation of the approximate Hessian by calculating outer(J.T, J) when calling ``base.eval_hessian``.
62598f0a50812a4eaa620176
class NetworkConfigurationDiagnosticResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'profile': {'key': 'profile', 'type': 'NetworkConfigurationDiagnosticProfile'}, 'network_security_group_result': {'key': 'networkSecurityGroupResult', 'type': 'NetworkSecurityGroupResult'}, } <NEW_LINE> def __...
Network configuration diagnostic result corresponded to provided traffic query. :param profile: Network configuration diagnostic profile. :type profile: ~azure.mgmt.network.v2021_02_01.models.NetworkConfigurationDiagnosticProfile :param network_security_group_result: Network security group result. :type network_securi...
62598f0a9f2886367281730c
class AybabtuTests(unittest.TestCase): <NEW_LINE> <INDENT> def test_aybabtuStrictEmpty(self): <NEW_LINE> <INDENT> self.assertEqual(styles._aybabtu(styles.Versioned), []) <NEW_LINE> <DEDENT> def test_aybabtuStrictSubclass(self): <NEW_LINE> <INDENT> self.assertEqual(styles._aybabtu(VersionedSubClass), []) <NEW_LINE> <DED...
L{styles._aybabtu} gets all of classes in the inheritance hierarchy of its argument that are strictly between L{Versioned} and the class itself.
62598f0a5fcc89381b2656b7
class Solution: <NEW_LINE> <INDENT> def backPackV(self, A, m): <NEW_LINE> <INDENT> if not A or not m: return 0 <NEW_LINE> dp = [0] * (m+1) <NEW_LINE> dp[0] = 1 <NEW_LINE> for i in xrange(len(A)): <NEW_LINE> <INDENT> for w in xrange(m, A[i]-1, -1): <NEW_LINE> <INDENT> dp[w] += dp[w - A[i]] <NEW_LINE> <DEDENT> <DEDENT> r...
@param nums: an integer array and all positive numbers @param target: An integer @return: An integer
62598f0acc40096d61619765
class AutoVivification(dict): <NEW_LINE> <INDENT> def __getitem__(self, item): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return dict.__getitem__(self, item) <NEW_LINE> <DEDENT> except KeyError: <NEW_LINE> <INDENT> value = self[item] = type(self)() <NEW_LINE> return value
Implementation of perl's autovivification feature
62598f0a851cf427c66b6ddf
class Demand(DjangoWorkflow): <NEW_LINE> <INDENT> prefix = 'results/django_demand' <NEW_LINE> class ExpDatagen(DjangoWorkflow.ExpDatagen): <NEW_LINE> <INDENT> progs = [ 'django_inc', 'django_dem', 'django_osq', 'django_simp_inc', 'django_simp_dem', 'django_simp_osq', ] <NEW_LINE> def get_dsparams_list(self): <NEW_LINE>...
Vary the number of users that are demanded.
62598f0aff9c53063f519176