code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class SchedulerWater(Scheduler): <NEW_LINE> <INDENT> title = 'Hot Water' <NEW_LINE> valuesperentry = 2 <NEW_LINE> entriesperday = 8 <NEW_LINE> fieldbase = '_water' <NEW_LINE> entry_formats = { 0: lambda dataset: "On at %02d:%02d " %(dataset[0], dataset[1]), 1: lambda dataset: "Off at %02d:%02d, " %(dataset[0], dataset[... | Inherited class with hot water variables and methods | 62598ef656ac1b37e6300a7b |
class TestingConfig(Config): <NEW_LINE> <INDENT> TESTING = True <NEW_LINE> SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/vms_test_db' <NEW_LINE> DEBUG = True | Configurations for Testing, with a separate test database. | 62598ef65fc7496912d476ba |
class InvalidModifierNode(tree.Node): <NEW_LINE> <INDENT> _fields = [ ('f1', int, None), ] | Node with invalid modifier
| 62598ef601c39578d7f11632 |
class Project(object): <NEW_LINE> <INDENT> def __init__(self, root, name, tplmanager): <NEW_LINE> <INDENT> super(Project, self).__init__() <NEW_LINE> if sublime.platform() == 'windows': <NEW_LINE> <INDENT> root = root.replace('\\', '/') <NEW_LINE> <DEDENT> self.root = root <NEW_LINE> self.name = name <NEW_LINE> self.tp... | Project class for Sublime Text 2 and SublimeRope Projects | 62598ef64527f215b58e8790 |
class OmniDecimalField(OmniField): <NEW_LINE> <INDENT> initial_data = models.DecimalField( blank=True, null=True, decimal_places=100, max_digits=1000, help_text=_('If provided, initial data will appear in this field by default.') ) <NEW_LINE> min_value = models.DecimalField( blank=True, null=True, decimal_places=100, m... | DecimalField representation | 62598ef610dbd63aa1c6f40a |
class FormatterDMS(object): <NEW_LINE> <INDENT> def __call__(self, direction, factor, values): <NEW_LINE> <INDENT> angles_deg = np.asarray(values)/factor <NEW_LINE> damping_ratios = np.cos((180-angles_deg) * np.pi/180) <NEW_LINE> ret = ["%.2f" % val for val in damping_ratios] <NEW_LINE> return ret | Transforms angle ticks to damping ratios | 62598ef6a17c0f6771d5aae5 |
class Bernoulli(BaseModel): <NEW_LINE> <INDENT> _formula_link_str = "logistic(\n{lc}\n)" <NEW_LINE> @staticmethod <NEW_LINE> def link(x): <NEW_LINE> <INDENT> return expit(x) <NEW_LINE> <DEDENT> def likelihood_func(self, probs): <NEW_LINE> <INDENT> return dist.Bernoulli(probs=probs) | Logistic/bernoulli family model, for a binary response variable. | 62598ef64428ac0f6e656ddc |
class st_within(BaseFunction): <NEW_LINE> <INDENT> pass | ST_Within(g1, g2) | 62598ef68a43f66fc4bf0a04 |
class TalkListDetailView(LoginRequiredMixin, RestrictToUserMixin, PrefetchRelatedMixin, DetailView): <NEW_LINE> <INDENT> form_class = TalkForm <NEW_LINE> http_method_names = ['get', 'post'] <NEW_LINE> model = TalkList <NEW_LINE> prefetch_related = ('talks', ) <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> ... | TalkListDetailView variant without CreateView inheritance | 62598ef655399d3f05624db5 |
class SwIoImagewriter(IoImageTransferrer): <NEW_LINE> <INDENT> def __init__( self, inpchannels_by_channelid): <NEW_LINE> <INDENT> super().__init__( inpchannels_by_channelid) <NEW_LINE> return <NEW_LINE> <DEDENT> def execute( self, iochannelid): <NEW_LINE> <INDENT> iochannel = self._iochannels_by_channelid[ iochannelid]... | Schreibt ein SwIoImage in einen IoChannel, der sowohl das SwIoImage als auch die Mailbox des IoChannel enthält.
| 62598ef667a9b606de54485e |
class IndicatorOverviewCounty(IndicatorOverviewBase): <NEW_LINE> <INDENT> def get_chart_location_parameter(self): <NEW_LINE> <INDENT> return f"county={self.county.fips5}" <NEW_LINE> <DEDENT> def get_place_name(self): <NEW_LINE> <INDENT> county_name = self.county.name <NEW_LINE> state_name = self.state.short <NEW_LINE> ... | The IndicatorOverview View for displaying a specific county | 62598ef6dc8b845886d51e54 |
class _ProcessMemoryInfo(object): <NEW_LINE> <INDENT> pagesize = _getpagesize() <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.pid = getpid() <NEW_LINE> self.rss = 0 <NEW_LINE> self.vsz = 0 <NEW_LINE> self.pagefaults = 0 <NEW_LINE> self.os_specific = [] <NEW_LINE> self.data_segment = 0 <NEW_LINE> self.code_seg... | Stores information about various process-level memory metrics. The
virtual size is stored in attribute `vsz`, the physical memory allocated to
the process in `rss`, and the number of (major) pagefaults in `pagefaults`.
On Linux, `data_segment`, `code_segment`, `shared_segment` and
`stack_segment` contain the number of ... | 62598ef6a8370b77170eec73 |
class FOM_forward(mm.PyModPiece): <NEW_LINE> <INDENT> def __init__(self, resolution=40, out_type="total_avg"): <NEW_LINE> <INDENT> V = get_space(resolution) <NEW_LINE> dofs = len(V.dofmap().dofs()) <NEW_LINE> self.solver = Fin(V) <NEW_LINE> self.out_type=out_type <NEW_LINE> if out_type == "total_avg": <NEW_LINE> <INDEN... | Solves the thermal fin steady state problem with
a full order model | 62598ef676e4537e8c3ede47 |
class PLSTM(tf.nn.rnn_cell.RNNCell): <NEW_LINE> <INDENT> def __init__(self, num_units, forget_bias=1.0, activation=None, reuse=None, fact_size=None, proj_size=None): <NEW_LINE> <INDENT> super(PLSTM, self).__init__(_reuse=reuse) <NEW_LINE> self._num_units = num_units <NEW_LINE> self._forget_bias = forget_bias <NEW_LINE>... | Implementation of Projection-LSTM and Factorized-LSTM (https://arxiv.org/abs/1703.10722) | 62598ef6d268445f26638fd7 |
class TripAdvisorReviewItem(BasicReviewItem): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self["score"] = 0 <NEW_LINE> self["via_mobile"] = 0 <NEW_LINE> self["helpful_count"] = 0 <NEW_LINE> self["location"] = "" <NEW_LINE> self["level"] = 0 <NEW_LINE> self["review_count"] =... | TripAdvisor restaurant review info. | 62598ef64a966d76dd5ed76a |
class IAtomPubPUTable(Interface): <NEW_LINE> <INDENT> pass | Marker for editable members. | 62598ef65fcc89381b265570 |
class Observer(object): <NEW_LINE> <INDENT> implements(IObserver, ISerializable) <NEW_LINE> def __init__(self, _method, *args, **kwargs): <NEW_LINE> <INDENT> if not callable(_method): <NEW_LINE> <INDENT> raise TypeError( "1st argument of __init__ should be a callable, got %r" % (type(_method), )) <NEW_LINE> <DEDENT> se... | I observe the fiber returned by a callable and remember its result.
I also expose methods to wait for the fiber to finish, and get its state. | 62598ef68a349b6b43684ad1 |
class LearningData(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.X = [] <NEW_LINE> self.y = [] <NEW_LINE> self.m = 0 <NEW_LINE> self.n = 0 <NEW_LINE> <DEDENT> def construct(self, stocks, date, future_day, features): <NEW_LINE> <INDENT> self.X = [] <NEW_LINE> self.y = [] <NEW_LINE> self.n = l... | The object of data. This object will be composed
from an array of stocks and dates. It will consist
of both input data (xs) and output data (ys). | 62598ef699fddb7c1ca6224b |
class ProjectCommentsResource(Resource, ArgsMixin): <NEW_LINE> <INDENT> @jwt_required <NEW_LINE> @permissions.require_admin <NEW_LINE> def get(self, project_id): <NEW_LINE> <INDENT> projects_service.get_project(project_id) <NEW_LINE> page = self.get_page() <NEW_LINE> return tasks_service.get_comments_for_project(projec... | Retrieve all comments to tasks related to given project.
It's mainly used for synchronisation purpose. | 62598ef67047854f4633dc58 |
class Colons(object): <NEW_LINE> <INDENT> def __init__(self, colons_line): <NEW_LINE> <INDENT> self._colons = colons_line.split(":") <NEW_LINE> <DEDENT> def __unicode__(self): <NEW_LINE> <INDENT> return "{t}: {k}: {u}".format(t=self.type, k=self.key_id, u=self.user_id) <NEW_LINE> <DEDENT> def _get(self, index): <NEW_LI... | Provide a colon->name mapping for the gpg script-parsable '--with-colons' output.
See /usr/share/doc/gnupg/DETAILS.gz. | 62598ef6167d2b6e312b582a |
class ScriptTests(TestCase, ScriptTestsMixin): <NEW_LINE> <INDENT> def test_twistd(self): <NEW_LINE> <INDENT> self.scriptTest("twistd") <NEW_LINE> <DEDENT> def test_twistdPathInsert(self): <NEW_LINE> <INDENT> script = self.bin.child("twistd") <NEW_LINE> if not script.exists(): <NEW_LINE> <INDENT> raise SkipTest( "Scrip... | Tests for the core scripts. | 62598ef67b180e01f3e4848e |
class WrappedCallableTask(Task): <NEW_LINE> <INDENT> def __init__(self, callable, *args, **kwargs): <NEW_LINE> <INDENT> super(WrappedCallableTask, self).__init__(*args, **kwargs) <NEW_LINE> self.wrapped = callable <NEW_LINE> if hasattr(callable, '__name__'): <NEW_LINE> <INDENT> if self.name == 'undefined': <NEW_LINE> <... | Wraps a given callable transparently, while marking it as a valid Task.
Generally used via `~.decorators.task` and not directly.
.. versionadded:: 1.1
.. seealso:: `~.docs.unwrap_tasks`, `~.decorators.task` | 62598ef697e22403b3839780 |
class SharedStruct: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.I32, 'key', None, None, ), (2, TType.STRING, 'value', None, None, ), ) <NEW_LINE> def __init__(self, key=None, value=None,): <NEW_LINE> <INDENT> self.key = key <NEW_LINE> self.value = value <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <IND... | Attributes:
- key
- value | 62598ef663b5f9789fe839ef |
class Vacancy(SRIM_Output): <NEW_LINE> <INDENT> def __init__(self, directory: Union[str, Path], filename: str = 'VACANCY.txt') -> None: <NEW_LINE> <INDENT> with open(os.path.join(directory, filename), 'rb') as f: <NEW_LINE> <INDENT> output = f.read() <NEW_LINE> ion = self._read_ion(output) <NEW_LINE> num_ions = self._r... | ``VACANCY.txt`` Table of the final distribution of vacancies vs depth
Parameters
----------
directory : :obj:`str`
directory of calculation
filename : :obj:`str`, optional
filename for Vacancy. Default ``VACANCY.txt`` | 62598ef667a9b606de54485f |
class MultiprocessingTestRunner(BaseTestRunner): <NEW_LINE> <INDENT> def run(self, suites): <NEW_LINE> <INDENT> wrapper = self.config.plugins.prepareTest(suites) <NEW_LINE> if wrapper is not None: <NEW_LINE> <INDENT> suites = wrapper <NEW_LINE> <DEDENT> wrapped = self.config.plugins.setOutputStream(self.stream) <NEW_LI... | Run suites with multiprocessing.Process | 62598ef65166f23b2e241c6b |
class SubredditMod: <NEW_LINE> <INDENT> def __init__(self, subreddit=REDDIT_CONFIG['subreddit'], username=AUTH['username'], password=AUTH['password'], client_id=AUTH['client_id'], client_secret=AUTH['client_secret'], user_agent=AUTH['user_agent']): <NEW_LINE> <INDENT> self.reddit = praw.Reddit( client_id=client_id, cli... | Reddit class that executes moderation actions | 62598ef67d847024c075ac5f |
class Ban(Plugin): <NEW_LINE> <INDENT> def __init__(self, banned={}): <NEW_LINE> <INDENT> self.banned = banned <NEW_LINE> <DEDENT> def _mapping(self): <NEW_LINE> <INDENT> return [('message.received', self.on_new_message), ('message.read.prevent', self.prevent)] <NEW_LINE> <DEDENT> def _init(self, event): <NE... | Ban plugin.
Handles banning users | 62598ef6a17c0f6771d5aae7 |
class DigitalClock(QtGui.QLCDNumber): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> super(DigitalClock, self).__init__(parent) <NEW_LINE> self.setWindowFlags(QtCore.Qt.Window) <NEW_LINE> self.setWindowTitle("Digital Clock") <NEW_LINE> self.resize(150, 60) <NEW_LINE> self.setSegmentStyle(QtGui... | 数字时钟 | 62598ef6851cf427c66b6b57 |
class HeightDistribution(BSElement): <NEW_LINE> <INDENT> element_type = "xs:string" <NEW_LINE> element_enumerations = ["Multiple Heights", "Uniform Height"] | Uniformity of building height. | 62598ef699fddb7c1ca6224c |
class Memoize(dict): <NEW_LINE> <INDENT> __documentation_section__ = 'Decorators' <NEW_LINE> def __init__(self, function=None): <NEW_LINE> <INDENT> self.function = function <NEW_LINE> <DEDENT> def __call__(self, *args): <NEW_LINE> <INDENT> return self[args] <NEW_LINE> <DEDENT> def __missing__(self, key): <NEW_LINE> <IN... | Memoize decorator.
Caches function return value. | 62598ef6d486a94d0ba2a85a |
class TestClubsApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = strava_api_v3.api.clubs_api.ClubsApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_get_club_activities_by_id(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> de... | ClubsApi unit test stubs | 62598ef6a05bb46b38489104 |
class ControlPacket(Packet): <NEW_LINE> <INDENT> def __init__(self, session, opcode=0, associd=0, qdata=''): <NEW_LINE> <INDENT> Packet.__init__(self, session, session.pktversion, MODE_CONTROL) <NEW_LINE> self.r_e_m_op = opcode <NEW_LINE> self.sequence = 1 <NEW_LINE> self.status = 0 <NEW_LINE> self.associd = associd <N... | Mode 6 request/response. | 62598ef666656f66f7d58c76 |
class PointFromPixel(): <NEW_LINE> <INDENT> def __init__(self, topic_camera_info, topic_depth): <NEW_LINE> <INDENT> self.need_camera_info = True <NEW_LINE> self.need_depth_image = True <NEW_LINE> self.model = PinholeCameraModel() <NEW_LINE> rospy.Subscriber(topic_camera_info, CameraInfo, self.callback_camera_info) <NEW... | Given a pixel location, find its 3D location in the world | 62598ef67d847024c075ac60 |
class Auth(object): <NEW_LINE> <INDENT> def __init__(self, requester, **kwargs): <NEW_LINE> <INDENT> self.requester = requester <NEW_LINE> self.logger = logging.getLogger(__name__) <NEW_LINE> self.query_string_auth = kwargs.pop('query_string_auth', True) <NEW_LINE> <DEDENT> @property <NEW_LINE> def api_version(self): <... | Boilerplate for handling authentication stuff. | 62598ef6009cb60464cffde1 |
class IBootControl: <NEW_LINE> <INDENT> def __init__(self, password, host, port=80, timeout=settings.DEVICE_TIMEOUT): <NEW_LINE> <INDENT> self.password = password <NEW_LINE> self.host = host <NEW_LINE> self.port = port <NEW_LINE> self.timeout = timeout <NEW_LINE> <DEDENT> def query_iboot_state(self): <NEW_LINE> <INDEN... | A control object for Dataprobe's iBoot network attached remote power controller | 62598ef64f88993c371ef933 |
class GenerateJunit(Command): <NEW_LINE> <INDENT> log = logging.getLogger(__name__) <NEW_LINE> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(GenerateJunit, self).get_parser(prog_name) <NEW_LINE> parser.add_argument( 'output_file', metavar='<output file>', help='The file to write the junit xml to. ... | Generate junit stream from ara data | 62598ef67b180e01f3e4848f |
class ServiceCache(db.Entity): <NEW_LINE> <INDENT> service_name = PrimaryKey(str) <NEW_LINE> created_at = Required(datetime) <NEW_LINE> updated_at = Required(datetime) <NEW_LINE> content = Required(str) | Cache service results | 62598ef64f6381625f198905 |
class TestConnection(Wizard): <NEW_LINE> <INDENT> __name__ = 'ldap.test_connection' <NEW_LINE> start_state = 'test' <NEW_LINE> test = StateTransition() <NEW_LINE> result = StateView('ldap.test_connection.result', 'ldap_connection.test_connection_result_form', [ Button('Close', 'end', 'tryton-close'), ]) <NEW_LINE> def ... | Test LDAP Connection | 62598ef69f28863672817090 |
class ListStreamingLocatorsResponse(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'streaming_locators': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'streaming_locators': {'key': 'streamingLocators', 'type': '[AssetStreamingLocator]'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <I... | The Streaming Locators associated with this Asset.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar streaming_locators: The list of Streaming Locators.
:vartype streaming_locators: list[~azure.mgmt.media.models.AssetStreamingLocator] | 62598ef61f5feb6acb1614e5 |
class MarginalInference(InferenceModule): <NEW_LINE> <INDENT> def initializeUniformly(self, gameState): <NEW_LINE> <INDENT> if self.index == 1: jointInference.initialize(gameState, self.legalPositions) <NEW_LINE> jointInference.addGhostAgentmaanhattan(self.ghostAgent) <NEW_LINE> <DEDENT> def observeState(self, gameStat... | A wrapper around the JointInference module that returns marginal beliefs about ghosts. | 62598ef691f36d47f22302ed |
class GatedActivationUnit(nn.Module): <NEW_LINE> <INDENT> def __init__(self, num_filters, kernel_size): <NEW_LINE> <INDENT> super(GatedActivationUnit, self).__init__() <NEW_LINE> self.f = DilatedConv('B', num_filters, num_filters, kernel_size=kernel_size, bias=False) <NEW_LINE> self.g = DilatedConv('B', num_filters, nu... | A Gated Activation Unit | 62598ef6283ffb24f3cf213b |
class MealPermissions(permissions.BasePermission): <NEW_LINE> <INDENT> def has_permission(self, request, view): <NEW_LINE> <INDENT> return request.user and request.user.is_authenticated <NEW_LINE> <DEDENT> def has_object_permission(self, request, view, obj): <NEW_LINE> <INDENT> user = request.user <NEW_LINE> return use... | Users can CRUD their own meals.
Staff can CRUD everybody's meals. | 62598ef67d847024c075ac61 |
class Printing(models.Model): <NEW_LINE> <INDENT> card = models.ForeignKey(Card) <NEW_LINE> set = models.ForeignKey(Set) <NEW_LINE> rarity = models.ForeignKey(Rarity) <NEW_LINE> artist = models.CharField(blank=True, max_length=255) <NEW_LINE> flavor_text = models.TextField(blank=True) <NEW_LINE> number = models.Positiv... | A printed card.
One card can (and often is) printed in multiple sets. Within
each set, its rarity might be different than any other. | 62598ef65fdd1c0f98e5c836 |
class ReviewGroupsWidget(Widget): <NEW_LINE> <INDENT> MAX_GROUPS = 5 <NEW_LINE> widget_id = 'review-groups-widget' <NEW_LINE> title = _('Review Groups') <NEW_LINE> template = 'admin/widgets/w-groups.html' <NEW_LINE> actions = [ { 'url': 'db/reviews/group/', 'label': _('View All'), 'classes': 'btn-right', }, { 'url': 'd... | Review groups widget.
Shows a list of recently created groups. | 62598ef64527f215b58e8794 |
class FullyConnectedMultiIndepFB(KroneckerProductFB): <NEW_LINE> <INDENT> def __init__(self, layer_collection, inputs, outputs, has_bias=False): <NEW_LINE> <INDENT> assert len(inputs) == len(outputs) <NEW_LINE> self._inputs = tuple(inputs) <NEW_LINE> self._outputs = tuple(outputs) <NEW_LINE> self._has_bias = has_bias <... | FisherBlock for fully-connected layers that share parameters.
| 62598ef601c39578d7f11635 |
class phoneType (pyxb.binding.basis.complexTypeDefinition): <NEW_LINE> <INDENT> _TypeDefinition = None <NEW_LINE> _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY <NEW_LINE> _Abstract = False <NEW_LINE> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'phoneType') <NEW_LINE> _XSDLocatio... | Complex type {http://www.ech.ch/xmlns/eCH-0046/1}phoneType with content type ELEMENT_ONLY | 62598ef68a43f66fc4bf0a08 |
class PauseCommandIssuedRequest(Request): <NEW_LINE> <INDENT> deserialized_types = { 'object_type': 'str', 'request_id': 'str', 'timestamp': 'datetime', 'locale': 'str' } <NEW_LINE> attribute_map = { 'object_type': 'type', 'request_id': 'requestId', 'timestamp': 'timestamp', 'locale': 'locale' } <NEW_LINE> def __init__... | :param request_id: Represents the unique identifier for the specific request.
:type request_id: (optional) str
:param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service.
:type timestamp: (optional) dateti... | 62598ef655399d3f05624db9 |
class FitAsl(NiftyFitCommand): <NEW_LINE> <INDENT> _cmd = get_custom_path('fit_asl', env_dir='NIFTYFITDIR') <NEW_LINE> input_spec = FitAslInputSpec <NEW_LINE> output_spec = FitAslOutputSpec <NEW_LINE> _suffix = '_fit_asl' | Interface for executable fit_asl from Niftyfit platform.
Use NiftyFit to perform ASL fitting.
ASL fitting routines (following EU Cost Action White Paper recommendations)
Fits Cerebral Blood Flow maps in the first instance.
`Source code <https://cmiclab.cs.ucl.ac.uk/CMIC/NiftyFit-Release>`_
Examples
--------
>>> fro... | 62598ef666673b3332c2ec40 |
class SilenceNotifier(tasks.Loop): <NEW_LINE> <INDENT> def __init__(self, alert_channel: TextChannel): <NEW_LINE> <INDENT> super().__init__(self._notifier, seconds=1, minutes=0, hours=0, count=None, reconnect=True, loop=None) <NEW_LINE> self._silenced_channels = {} <NEW_LINE> self._alert_channel = alert_channel <NEW_LI... | Loop notifier for posting notices to `alert_channel` containing added channels. | 62598ef632920d7e50bc48c0 |
@unittest.skip('cron not implemented yet') <NEW_LINE> class CronStyleSchedulerTests(AutoscaleFixture): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(CronStyleSchedulerTests, self).setUp() <NEW_LINE> create_group_response = self.autoscale_behaviors.create_scaling_group_given( lc_name="cron_style_schedul... | Verify cron style scheduler policy executes for all
policy change types | 62598ef6bf627c535bcafd05 |
class CommittedState(object): <NEW_LINE> <INDENT> NO_VALUE = object() <NEW_LINE> def __init__(self, manager, obj): <NEW_LINE> <INDENT> self.data = {} <NEW_LINE> for attr in manager.managed_attributes(obj.__class__): <NEW_LINE> <INDENT> self.commit_attribute(attr, obj) <NEW_LINE> <DEDENT> <DEDENT> def commit_attribute(s... | Store the original state of an object when the ``commit()`
method on the attribute manager is called. | 62598ef632920d7e50bc48c1 |
class Solution: <NEW_LINE> <INDENT> def maxSquare(self, matrix): <NEW_LINE> <INDENT> if not matrix: <NEW_LINE> <INDENT> return 0 <NEW_LINE> <DEDENT> width_c = len(matrix[0])+1 <NEW_LINE> width_r = len(matrix)+1 <NEW_LINE> dp = [] <NEW_LINE> for _ in range(width_r): <NEW_LINE> <INDENT> dp.append([0 for _ in range(width_... | @param: matrix: a matrix of 0 and 1
@return: an integer | 62598ef63346ee7daa336ab1 |
class PermissionDeniedBackendTest(TestCase): <NEW_LINE> <INDENT> backend = 'auth_tests.test_auth_backends.PermissionDeniedBackend' <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.user1 = User.objects.create_user('test', 'test@example.com', 'test') <NEW_LINE> self.user1.save() <NEW_LINE> <DEDENT> @modify_settings(A... | Tests that other backends are not checked once a backend raises PermissionDenied | 62598ef6e5267d203ee6a197 |
class Stop_Attachment( CSV_Attachment ): <NEW_LINE> <INDENT> source_name='sid' <NEW_LINE> gtf_name= 'Stop' | A :class:`CSV_Attachment` for the stop id mapping. | 62598ef68a349b6b43684ad5 |
class GoonsiteHTML(rend.Page): <NEW_LINE> <INDENT> docFactory = loaders.xmlfile(RESOURCE('templates/goonsite.xhtml')) <NEW_LINE> def __init__(self, path, registry, *a, **kw): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> self.registry = registry <NEW_LINE> doc = microdom.parse(self.path) <NEW_LINE> self.content = doc... | Render an HTML page inside goonsite's template | 62598ef67047854f4633dc5c |
class NsRecord(InfobloxObject): <NEW_LINE> <INDENT> _infoblox_type = 'record:ns' <NEW_LINE> _fields = ['addresses', 'cloud_info', 'creator', 'dns_name', 'last_queried', 'ms_delegation_name', 'name', 'nameserver', 'policy', 'view', 'zone'] <NEW_LINE> _search_for_update_fields = ['name', 'nameserver', 'view'] <NEW_LINE> ... | NsRecord: DNS NS record object.
Corresponds to WAPI object 'record:ns'
A DNS NS record identifies an authoritative DNS server for a domain.
Each authoritative DNS server must have an NS record. The appliance
automatically creates an NS record when you assign a grid member as
the primary server for a zone. You can manu... | 62598ef61f5feb6acb1614e7 |
class Drawing: <NEW_LINE> <INDENT> def __init__(self, w, h): <NEW_LINE> <INDENT> self.w = w <NEW_LINE> self.h = h <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return self.w == other.w and self.h == other.h | Another class that is not Rectangle but just happens to be cast to the
same dict | 62598ef69f28863672817092 |
class FigureCanvasMac(_macosx.FigureCanvas, FigureCanvasAgg): <NEW_LINE> <INDENT> def __init__(self, figure): <NEW_LINE> <INDENT> FigureCanvasBase.__init__(self, figure) <NEW_LINE> width, height = self.get_width_height() <NEW_LINE> _macosx.FigureCanvas.__init__(self, width, height) <NEW_LINE> self._device_scale = 1.0 <... | The canvas the figure renders into. Calls the draw and print fig
methods, creates the renderers, etc...
Public attribute
figure - A Figure instance
Events such as button presses, mouse movements, and key presses
are handled in the C code and the base class methods
button_press_event, button_release_event, motion_... | 62598ef630bbd722464684ca |
class _PerCloudConfigSpec(spec.BaseSpec): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def _GetOptionDecoderConstructions(cls): <NEW_LINE> <INDENT> result = super(_PerCloudConfigSpec, cls)._GetOptionDecoderConstructions() <NEW_LINE> for cloud in providers.VALID_CLOUDS: <NEW_LINE> <INDENT> result[cloud] = TypeVerifier, {... | Contains one config dict attribute per cloud provider.
The name of each attribute is the name of the cloud provider. | 62598ef65fc7496912d476bd |
class AutoscaleSettingResourcePatch(Model): <NEW_LINE> <INDENT> _validation = { 'profiles': {'required': True, 'max_items': 20}, } <NEW_LINE> _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, 'profiles': {'key': 'properties.profiles', 'type': '[AutoscaleProfile]'}, 'notifications': {'key': 'properties.notifi... | The autoscale setting object for patch operations.
:param tags: Resource tags
:type tags: dict[str, str]
:param profiles: the collection of automatic scaling profiles that specify
different scaling parameters for different time periods. A maximum of 20
profiles can be specified.
:type profiles: list[~azure.mgmt.moni... | 62598ef644b2445a339b5db7 |
@Table.action_registry.register('mark-for-op') <NEW_LINE> class TagDelayedAction(TagDelayedAction): <NEW_LINE> <INDENT> permission = ('dynamodb:TagResource',) <NEW_LINE> batch_size = 1 <NEW_LINE> def process_resource_set(self, tables, tags): <NEW_LINE> <INDENT> client = local_session(self.manager.session_factory).clien... | Action to specify an action to occur at a later date
:example:
.. code-block: yaml
policies:
- name: dynamo-mark-tag-compliance
resource: dynamodb-table
filters:
- "tag:custodian_cleanup": absent
- "tag:OwnerName": absent
actions:
... | 62598ef64527f215b58e8796 |
class Module(QtCore.QObject): <NEW_LINE> <INDENT> sigAddModule = QtCore.Signal(object) <NEW_LINE> def __init__(self, path, name, ref, connections, interfaces, options, stat_vars): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.path = path <NEW_LINE> if path.startswith('hardware'): <NEW_LINE> <INDENT> self.base ... | This class represents a Qudi module.
| 62598ef6a8370b77170eec78 |
class RemoveMods(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "artist_paint.remove_modifiers" <NEW_LINE> bl_label = "Remove Modifiers" <NEW_LINE> bl_options = { 'REGISTER','UNDO' } <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> scene = context.scene <NEW_LINE> context = bpy.context <NEW_LINE> scene ... | Remove Modifiers | 62598ef67d43ff2487426845 |
class TarResource(Resource): <NEW_LINE> <INDENT> def retrieve(self, outdir, auth=()): <NEW_LINE> <INDENT> outpath = super(TarResource, self).retrieve(outdir, auth) <NEW_LINE> logger.debug('Extracting archived package to: %s' % outdir) <NEW_LINE> if self.url.endswith('gz'): <NEW_LINE> <INDENT> archive = tarfile.open(out... | Download the resource and extract it to specified folder.
If there is a root directory in the archive (instead of multiple files in root), the
files and folders inside the subfolder are extracted directory to output folder
>>> res = TarResource('trac', 'http://ftp.edgewall.com/pub/trac/Trac-0.12.2.tar.gz')
>>> res.ret... | 62598ef65fdd1c0f98e5c839 |
@SkypeUtils.initAttrs <NEW_LINE> class SkypeHistoryPropertyMsg(SkypePropertyMsg): <NEW_LINE> <INDENT> attrs = SkypeMsg.attrs + ("history",) <NEW_LINE> @classmethod <NEW_LINE> def contentToFields(cls, content): <NEW_LINE> <INDENT> fields = super(SkypeHistoryPropertyMsg, cls).contentToFields(content) <NEW_LINE> propInfo ... | A message representing a change to history disclosure.
Attributes:
history (bool):
Whether message history is provided to new participants. | 62598ef667a9b606de544864 |
class EntityExtent(object): <NEW_LINE> <INDENT> entities = None <NEW_LINE> def __init__(self, world, entities): <NEW_LINE> <INDENT> self.__world = world <NEW_LINE> self.entities = entities <NEW_LINE> <DEDENT> def __getattr__(self, name): <NEW_LINE> <INDENT> component = getattr(self.__world.components, name) <NEW_LINE> ... | Encapsulates a set of entities queriable by component. Extents
are accessed by using an entity class as a key on the :class:`World`::
extent = world[MyEntity] | 62598ef6956e5f7376df4ac3 |
class TplinkTLWRBased(Router): <NEW_LINE> <INDENT> manufacturer = "tplink" <NEW_LINE> model = "wrbased" <NEW_LINE> config = { 'ip': '192.168.1.1', 'uris': { 'login': '', 'reboot': 'userRpm/SysRebootRpm.htm?Reboot=Reboot', 'wifi_settings': 'userRpm/WlanNetworkRpm.htm' } } <NEW_LINE> def login(self, username, password): ... | Implementation for TpLink WR based models.
For more details see all them:
http://www.tp-link.com.br/search/?q=wr | 62598ef632920d7e50bc48c2 |
class multiprocessObsSF(): <NEW_LINE> <INDENT> def __init__(self, spectro_df, photo_path, photo_tag, photo_coords, pointings, cm_limits=None, spectro_model=None, photo_model=None, tstart=0, fieldN=0): <NEW_LINE> <INDENT> self.spectro_df = spectro_df <NEW_LINE> self.photo_path = photo_path <NEW_LINE> self.photo_tag = ph... | multiprocessObsSF - Class for calculating observable selection function
- This allows us to run each field in a pool of parallel cores.
Parameters
----------
spectro_df: pandas DataFrame
- Spectroscopic catalogue
photo_path: str
- Location of photometric datafiles
photo_tag: str
... | 62598ef64a966d76dd5ed76f |
class SocketStage(Stage): <NEW_LINE> <INDENT> _pos_cache = None <NEW_LINE> _notifier = ChangeNotifier() <NEW_LINE> _monitor = None <NEW_LINE> _drives = [None]*2 <NEW_LINE> slowSpeed = 4 <NEW_LINE> def __init__(self, man, config, name): <NEW_LINE> <INDENT> port = config.pop('port') <NEW_LINE> ipAddress = config.pop('ipA... | This Device class represents a single drive of a stage/manipulator controlled through a network socket
Config options are:
port: <port at host server> # eg. 5555
ipAddress: <ip address of host server> # eg. '172.20.61.180' | 62598ef63346ee7daa336ab2 |
class Action1(Action): <NEW_LINE> <INDENT> def execute(self, instance): <NEW_LINE> <INDENT> filename = self.evaluate_index(0) <NEW_LINE> try: <NEW_LINE> <INDENT> open_file(filename, 'wb').write(instance.objectPlayer.value) <NEW_LINE> <DEDENT> except IOError: <NEW_LINE> <INDENT> return | File->Save to file
Parameters:
0: Save to file (EXPSTRING, ExpressionParameter) | 62598ef663d6d428bbee1063 |
class AcquiringCredentialsOnStorageException(exceptions.SerapisException): <NEW_LINE> <INDENT> def __init__(self, values=[], message='No access'): <NEW_LINE> <INDENT> super(NoAccessException, self).__init__(values, message) | Exception raised when the user running the code hasn't authenticated into iRODS beforehands. | 62598ef63617ad0b5ee049bc |
class RiskEvidenceSynthesisCertaintyCertaintySubcomponent( backboneelement.BackboneElement ): <NEW_LINE> <INDENT> resource_type = Field( "RiskEvidenceSynthesisCertaintyCertaintySubcomponent", const=True ) <NEW_LINE> note: typing.List[fhirtypes.AnnotationType] = Field( None, alias="note", title="Used for footnotes or ex... | Disclaimer: Any field name ends with ``__ext`` doesn't part of
Resource StructureDefinition, instead used to enable Extensibility feature
for FHIR Primitive Data Types.
A component that contributes to the overall certainty.
A description of a component of the overall certainty. | 62598ef6d486a94d0ba2a85e |
class TestMemoryProfilerToFunction(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def test_memory_profiler_call(): <NEW_LINE> <INDENT> assert isinstance(calc_sum.profiler, LineProfiler) <NEW_LINE> assert isinstance(calc_sum_2.profiler, LineProfiler) <NEW_LINE> print('求和结果: {}'.format(calc_sum())) <NEW_LINE> gc.c... | 测试用于装饰函数的内存分析器类装饰器 | 62598ef660cbc95b06362bcc |
class HDP: <NEW_LINE> <INDENT> def __init__(self,gamma,alpha_0): <NEW_LINE> <INDENT> self.sb_process = SBP(1,gamma) <NEW_LINE> self.gamma = gamma <NEW_LINE> self.alpha_0 = alpha_0 <NEW_LINE> self.samples = [] <NEW_LINE> <DEDENT> def newSample(self): <NEW_LINE> <INDENT> self.samples.append(HDP_Sample(self.alpha_0, self.... | Represents a Hierarchical Dirichlet Process. Samples are generated following
the stick-breaking construction in Section 4.1 of
Y. W. Teh, M. I. Jordan, M. J. Beal, and D. M. Blei.
Hierarchical dirichlet processes.
Journal of the American Statistical Association, 101(476), 2006. | 62598ef65fcc89381b265573 |
class User: <NEW_LINE> <INDENT> def __init__(self, user_id, user_name): <NEW_LINE> <INDENT> self.id = user_id <NEW_LINE> self.name = user_name <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> if isinstance(other, self.__class__): <NEW_LINE> <INDENT> return self.id == other.id <NEW_LINE> <DEDENT> else: <... | Representation of each game player | 62598ef67d847024c075ac64 |
class Title(graphene.String): <NEW_LINE> <INDENT> pass | GraphQL string type with min length = 4 and max = 32 | 62598ef61f5feb6acb1614e9 |
class DriverRating(IntEnum): <NEW_LINE> <INDENT> UNKNOWN = 0 <NEW_LINE> E = 1 <NEW_LINE> D = 2 <NEW_LINE> C = 3 <NEW_LINE> B = 4 <NEW_LINE> A = 5 <NEW_LINE> A_PLUS = 6 <NEW_LINE> @classmethod <NEW_LINE> def from_driver_class(cls, driver_class): <NEW_LINE> <INDENT> mapping = { 0: cls.UNKNOWN, 1: cls.E, 2: cls.D, 3: cls.... | Enumeration of driver ratings. The integer values correspond to the ones used in the GTSport API. | 62598ef62c8b7c6e89bd205b |
class TestDeploymentTemplateResource(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 testDeploymentTemplateResource(self): <NEW_LINE> <INDENT> pass | DeploymentTemplateResource unit test stubs | 62598ef6283ffb24f3cf213f |
class _KVClient: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> logging.debug("Created KVClient") <NEW_LINE> <DEDENT> def set(self, key, value): <NEW_LINE> <INDENT> cmd = "set {0} {1}".format(key, value) <NEW_LINE> self.send(cmd) <NEW_LINE> <DEDENT> def get(self, key): <NEW_LI... | Mixin class. Don't instantiate. Talks to the Key Val server | 62598ef64527f215b58e8798 |
class Rectangle(Patch): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return self.__class__.__name__ + "(%g,%g;%gx%g)" % (self._x, self._y, self._width, self._height) <NEW_LINE> <DEDENT> @docstring.dedent_interpd <NEW_LINE> def __init__(self, xy, width, height, angle=0.0, **kwargs): <NEW_LINE> <... | Draw a rectangle with lower left at *xy* = (*x*, *y*) with
specified *width* and *height*. | 62598ef610dbd63aa1c6f411 |
class BasePage(pageobject.PageObject): <NEW_LINE> <INDENT> _heading_locator = (by.By.CSS_SELECTOR, 'div.page-header > h2') <NEW_LINE> _error_msg_locator = (by.By.CSS_SELECTOR, 'div.alert-danger.alert') <NEW_LINE> @property <NEW_LINE> def heading(self): <NEW_LINE> <INDENT> return self._get_element(*self._heading_locator... | Base class for all dashboard page objects. | 62598ef65fdd1c0f98e5c83a |
class JobManager(models.Manager): <NEW_LINE> <INDENT> def cycle_data(self, repository, cycle_interval, chunk_size, sleep_time): <NEW_LINE> <INDENT> jobs_max_timestamp = datetime.datetime.now() - cycle_interval <NEW_LINE> jobs_cycled = 0 <NEW_LINE> while True: <NEW_LINE> <INDENT> jobs_chunk = list(self.filter(repository... | Convenience functions for operations on groups of jobs | 62598ef64428ac0f6e656de4 |
class CustomUser(AbstractUser, PermissionsMixin): <NEW_LINE> <INDENT> username = None <NEW_LINE> email = models.EmailField(verbose_name="email address", unique=True) <NEW_LINE> name = models.CharField(max_length=150, null=True) <NEW_LINE> join_date = models.DateTimeField( verbose_name="join date", auto_now_add=True ) <... | custom user - overrides django defaults | 62598ef6796e427e5384d030 |
class DjanguiJob(models.Model): <NEW_LINE> <INDENT> djangui_user = models.OneToOneField(settings.AUTH_USER_MODEL, blank=True, null=True) <NEW_LINE> djangui_celery_id = models.CharField(max_length=255, null=True) <NEW_LINE> content_type = models.ForeignKey(ContentType, null=True) <NEW_LINE> object_id = models.PositiveIn... | This model serves to link the submitted celery tasks to a script submitted | 62598ef655399d3f05624dbd |
class MaskPostProcessorCOCOFormat(MaskPostProcessor): <NEW_LINE> <INDENT> def forward(self, x, boxes): <NEW_LINE> <INDENT> import pycocotools.mask as mask_util <NEW_LINE> import numpy as np <NEW_LINE> results = super(MaskPostProcessorCOCOFormat, self).forward(x, boxes) <NEW_LINE> for result in results: <NEW_LINE> <INDE... | From the results of the CNN, post process the results
so that the masks are pasted in the image, and
additionally convert the results to COCO format. | 62598ef6aad79263cf42d0a5 |
class ModAuthKerbBackend(RemoteUserBackend): <NEW_LINE> <INDENT> def authenticate(self, remote_user): <NEW_LINE> <INDENT> if not remote_user: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> user = None <NEW_LINE> username = self.clean_username(remote_user) <NEW_LINE> if self.create_unknown_user: <NEW_LINE> <INDENT> user... | mod_auth_kerb modules authorization backend for lwepm.
Based on DjangoRemoteUser backend.
Required correct /etc/krb5.conf, /etc/krb5.keytab and
Correct mod_auth_krb5 module settings for apache.
Example apache settings:
# Set a httpd config to protect krb5login page with kerberos.
# You need to have mod_auth_kerb ins... | 62598ef623849d37ff84f954 |
class ShowInterfacesDescriptions(ShowInterfacesDescriptionsSchema): <NEW_LINE> <INDENT> cli_command = ['show interfaces descriptions', 'show interfaces descriptions {interface}'] <NEW_LINE> def cli(self, interface=None, output=None): <NEW_LINE> <INDENT> if not output: <NEW_LINE> <INDENT> if interface: <NEW_LINE> <INDEN... | Parser for:
* show interfaces descriptions
* show interfaces descriptions {interface} | 62598ef63317a56b869bd9b1 |
class MultiMap(MapADT): <NEW_LINE> <INDENT> def __setitem__(self, key, value): <NEW_LINE> <INDENT> super(MultiMap, self).append(key, value) | From wikipedia.org/wiki/Multimap (paraphrased):
"In computer science, a multimap (sometimes also multihash) is a
generalization of a map or associative array abstract data type in which
more than one value may be associated with and returned for a given key.
Often the multimap is implemented as a map with lists/sets a... | 62598ef666673b3332c2ec44 |
class ExchangeRootController(BaseController): <NEW_LINE> <INDENT> def __init__(self, exchange): <NEW_LINE> <INDENT> super(ExchangeRootController, self).__init__() <NEW_LINE> self._artifact_mounts = {} <NEW_LINE> self.exchange = exchange <NEW_LINE> <DEDENT> def sidebar_menu(self): <NEW_LINE> <INDENT> sidebar_menu = [] <... | Provides generic search and sortable table interface for browsing the
exchange | 62598ef692d797404e387fc7 |
class DailyRuns(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def GetDailyRuns(): <NEW_LINE> <INDENT> secrets = netrc.netrc() <NEW_LINE> user, account, pwd = secrets.authenticators("getfit") <NEW_LINE> dbConn = MySQLdb.connect(host="lindstrom.hopto.org", user=user, passwd=pwd, db="GetFit", port=25564) <NEW_LINE... | Creates a table of daily runs for a Rolling Week | 62598ef6bf627c535bcafd09 |
class EnvError(Error): <NEW_LINE> <INDENT> def __init__(self, var): <NEW_LINE> <INDENT> self.message = f'Could not find the environmental variable {var}.' | An error class for when an environmental variable is not found | 62598ef626068e7796d4b1f3 |
class MockSpatialDB(spdb.spatialdb.SpatialDB): <NEW_LINE> <INDENT> @patch('bossutils.configuration.BossConfig', MockBossConfig) <NEW_LINE> @patch('redis.StrictRedis', mock_strict_redis_client) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> if not _test_globals['kvio_engine']: <NEW_LINE... | mock for redis kvio so the actual server isn't used during unit testing, but a static mockredis-py instead | 62598ef663d6d428bbee1065 |
class SYMBOLINFO(object): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> __repr__ = _swig_repr <NEW_LINE> addr = _swig_property(_x64dbgapi64.SYMBOLINFO_addr_get, _x64dbgapi64.SYMBOLINFO_addr_set) <NEW_LINE> decoratedSymbol = _swig_p... | Proxy of C++ SYMBOLINFO_ class | 62598ef65fcc89381b265574 |
class Figure13(IndicatorTable): <NEW_LINE> <INDENT> name = "Figure 13" <NEW_LINE> title = "" <NEW_LINE> caption = ("Pourcentage de structures ayant transmis leurs données " "à temps (promptitude) ") <NEW_LINE> rendering_type = 'graph' <NEW_LINE> as_percentage = True <NEW_LINE> graph_type = 'spline' <NEW_LINE> INDICATOR... | de structures:
Numérateur : nombre de centres ayant transmis leurs rapports dans
les délais requis (le 5 du mois suivant)
Dénominateur : total centres couverts dans la région | 62598ef666656f66f7d58c7c |
class PythonJob(Job): <NEW_LINE> <INDENT> def __init__(self, name: str, code_dir: str): <NEW_LINE> <INDENT> super(PythonJob, self).__init__(name, code_dir) | Job subclass for Python jobs. | 62598ef6442bda511e95acfc |
class UpdateCluster(command.ShowOne): <NEW_LINE> <INDENT> log = logging.getLogger(__name__ + ".UpdateCluster") <NEW_LINE> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(UpdateCluster, self).get_parser(prog_name) <NEW_LINE> parser.add_argument( 'cluster', metavar="<cluster>", help="Name or ID of the... | Updates cluster | 62598ef6fff4ab517ebcc06f |
class PileError(Error): <NEW_LINE> <INDENT> def __init__(self, pile): <NEW_LINE> <INDENT> self.pile = pile | Exception for when a pile is not a valid pile | 62598ef63d592f4c4edb9785 |
class WebPanel(BasePanel): <NEW_LINE> <INDENT> def __init__(self, url, **kwargs): <NEW_LINE> <INDENT> self._url = url <NEW_LINE> super().__init__(**kwargs) <NEW_LINE> <DEDENT> def get_title(self): <NEW_LINE> <INDENT> title = '' if self._widgets is None else self._widgets.title() <NEW_LINE> if not title: <NEW_LINE> <IND... | HTML web view panel for URL. | 62598ef6167d2b6e312b5833 |
class ThreeDSubmarinesBoard(np.ndarray): <NEW_LINE> <INDENT> def __new__(subtype, shape: tuple=(10, 10, 3), dtype: np.dtype=np.object, *, pieces: list): <NEW_LINE> <INDENT> if len(shape) != 3: <NEW_LINE> <INDENT> return ValueError(f"Shape received was {shape}, but it must have exactly 3 items.") <NEW_LINE> <DEDENT> obj... | A 3D board to hold the pieces
Inherits from numpy.ndarray to allow for indexing, but one
could've easily used an array as an attribute of the class
instead.
There are 3 "planes" to the board, which are represented by the third dimension.
Plane 0 is under the sea, plane 1 is at sea-level, and plane 2 is the air.
The pie... | 62598ef6f548e778e5969e25 |
@admin.register(FilterAdvert) <NEW_LINE> class FilterAdvertAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ("id", "name") <NEW_LINE> list_display_links = ("name",) <NEW_LINE> prepopulated_fields = {"slug":("name",)} | Предстовление фильтра обновленияи | 62598ef6adb09d7d5dc08e57 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.