code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class DictBody: <NEW_LINE> <INDENT> __visitor_list = [] <NEW_LINE> __obj = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.__visitor_list = list() <NEW_LINE> <DEDENT> def __call__(self, args): <NEW_LINE> <INDENT> self.__obj = args <NEW_LINE> for v in self.__visitor_list: <NEW_LINE> <INDENT> self.accept(v) ... | Defines the interface concrete class implementation that drives code generation. | 62598edc45492302aabfaa11 |
class CompositionRepositoryAssignmentSession(abc_repository_sessions.CompositionRepositoryAssignmentSession, osid_sessions.OsidSession): <NEW_LINE> <INDENT> def __init__(self, proxy=None, runtime=None, **kwargs): <NEW_LINE> <INDENT> OsidSession._init_catalog(self, proxy, runtime) <NEW_LINE> self._session_name = 'Compos... | This session provides methods to re-assign ``Compositions`` to ``Repository`` objects.
A ``Composition`` may be associated with multiple ``Repository``
objects. Removing the last reference to a ``Composition`` is the
equivalent of deleting it. Each ``Repository`` may have its own
authorizations governing who is allow... | 62598edc4428ac0f6e656aba |
@dataclass <NEW_LINE> class AnimationFrame: <NEW_LINE> <INDENT> image: ImageAsset <NEW_LINE> duration: float <NEW_LINE> flip_x: bool = False <NEW_LINE> flip_y: bool = False <NEW_LINE> offset: Vector = Vector(0, 0) | A class describing a frame of an animation.
Args:
image (ImageAsset): the image to display
duration (float): the amount of time to display this image for
(in seconds)
flip_x (bool): if true, flip this image horizontally
flip_y (bool): if true, flip this image vertically | 62598edc85dfad0860cbed1a |
class InstanceRefreshToken(APIView): <NEW_LINE> <INDENT> permission_classes = (IsAdminUser,) <NEW_LINE> def get_object(self, pk): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return instance_api.get_by_id(pk) <NEW_LINE> <DEDENT> except exceptions.DoesNotExist: <NEW_LINE> <INDENT> raise Http404 <NEW_LINE> <DEDENT> <DEDE... | " Refresh of token an Instance | 62598edcb7558d5895461baa |
class OperationSilentAbort(BaseOperationException): <NEW_LINE> <INDENT> pass | Error to raise if something went wrong when running the operation but you do not want the user to see.
This error will be handled silently.
Changes will be rolled back to the last backup. | 62598edc7cff6e4e811b3f4d |
class TestBusStop(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.route0 = BusRoute(id='0', name='r0') <NEW_LINE> self.route0.routeForward = ['001', '002', '003'] <NEW_LINE> self.route0.routeBackward = ['103', '102', '101'] <NEW_LINE> self.route1 = BusRoute(id='1', name='r1') <NEW_LINE... | make sure BusStop object report the error when unsuitable value is assigned to BusStop object | 62598edca219f33f346c4d97 |
class MaxAbsScaler(BaseEstimator, TransformerMixin): <NEW_LINE> <INDENT> def __init__(self, copy=True): <NEW_LINE> <INDENT> self.copy = copy <NEW_LINE> <DEDENT> def fit(self, X, y=None): <NEW_LINE> <INDENT> X = check_array(X, accept_sparse=('csr', 'csc'), copy=self.copy, ensure_2d=False, estimator=self, dtype=FLOAT_DTY... | Scale each feature by its maximum absolute value.
This estimator scales and translates each feature individually such
that the maximal absolute value of each feature in the
training set will be 1.0. It does not shift/center the data, and
thus does not destroy any sparsity.
This scaler can also be applied to sparse CS... | 62598edc91af0d3eaad38378 |
class EventExDate(EventRDate): <NEW_LINE> <INDENT> __name__ = 'calendar.event.exdate' <NEW_LINE> _table = 'calendar_event_exdate' | Exception Date | 62598edc442bda511e95a9c7 |
class LoginForm(Form): <NEW_LINE> <INDENT> account = TextField(u"帳號", validators=[required()]) <NEW_LINE> password = PasswordField(u"密碼", validators=[required()]) <NEW_LINE> submit = SubmitField(u"登入") | 登錄用的表單 | 62598edc596a8972361261c4 |
class TFIDF_Vectorizer: <NEW_LINE> <INDENT> def __init__(self, vectitle, vecdesc, filename): <NEW_LINE> <INDENT> self.vectorize_title = vectitle <NEW_LINE> self.title_para = {'max_df': vectitle.max_df, 'min_df': vectitle.min_df} <NEW_LINE> self.vectorize_desc = vecdesc <NEW_LINE> self.desc_para = {'max_df': vecdesc.max... | Create an object of tfidf vectorizer for both job title docs and job description doc.
Attribute:
vectorize_title: tfidf vectorizer for job title.
vectorize_desc: tfidf vectorizer for job description.
title_para: parameters of job title vectorizer - {"max_df":max_df, "min_df":min_df}.
desc_para: paramete... | 62598edc236d856c2adc86c3 |
class OfflineStorageConfigDialog(QDialog, Ui_OfflineStorageConfigDialog): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> super(OfflineStorageConfigDialog, self).__init__(parent) <NEW_LINE> self.setupUi(self) <NEW_LINE> self.databaseEnabledCheckBox.setChecked( Preferences.getHelp("OfflineStorag... | Class implementing a dialog to configure the offline storage. | 62598edc090684286d59298e |
class Goods(BaseModel): <NEW_LINE> <INDENT> name = models.CharField(max_length=20, verbose_name='商品SPU名称') <NEW_LINE> detail = HTMLField(blank=True, verbose_name='商品详情') <NEW_LINE> class Meta: <NEW_LINE> <INDENT> db_table = 'Goods_spu' <NEW_LINE> verbose_name = '商品SPU' <NEW_LINE> verbose_name_plural = verbose_name <NEW... | 商品SPU表 | 62598edc76e4537e8c3edb20 |
class IpeReconIpPort(ipe_tools.IpeTools): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> ipe_tools.IpeTools.__init__() <NEW_LINE> pass <NEW_LINE> <DEDENT> def scan_masscan(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def scan_shodan(self, raw_list_ip=None, api_key=None): <NEW_LINE> <INDENT> output_i... | This class describe the functionality:
- scan ip address using masscan
- import external xml file, generated masscan to ipe database
- scan ip address using Shoda | 62598edc656771135c487bef |
class ExtensionURIType (_ImportedBinding__udt.IdentifierType): <NEW_LINE> <INDENT> _TypeDefinition = pyxb.binding.datatypes.normalizedString <NEW_LINE> _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_SIMPLE <NEW_LINE> _Abstract = False <NEW_LINE> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'Ex... | Complex type {urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2}ExtensionURIType with content type SIMPLE | 62598edc0c0af96317c548fd |
class GetPersonGroupInfoRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.PersonId = None <NEW_LINE> self.Offset = None <NEW_LINE> self.Limit = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.PersonId = params.get("PersonId") <NEW_LINE> self.Offse... | GetPersonGroupInfo请求参数结构体
| 62598edc32920d7e50bc458d |
class IDFNormalizer(FlexibleScorer): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> kwargs['idf_normalization'] = False <NEW_LINE> FlexibleScorer.__init__(self, *args, **kwargs) <NEW_LINE> self.idf_normalization = True <NEW_LINE> <DEDENT> def tf(self, tfreq, k1, b, avgdoclen, doclen): <NEW... | Purpose of this class is to extract the weight magnitude
from the relevancy score; we do it by setting TF and boost
parts to 1.0 | 62598edc2c8b7c6e89bd1d1f |
class AthleteIndividualAPIView(RetrieveAPIView): <NEW_LINE> <INDENT> queryset = Athlete_details.objects.all() <NEW_LINE> serializer_class = AthleteSerializer <NEW_LINE> authentication_classes = (SessionAuthentication, BasicAuthentication) <NEW_LINE> permission_classes = (IsAuthenticated, ) | Retrieve details about an athlete
api ==> hostname:port/api/athlete/athlete_id/ | 62598edc66673b3332c2e906 |
class Language(models.Model): <NEW_LINE> <INDENT> language = models.CharField(max_length=5, help_text="Enter a language in format language-country (e.g. pt-BR, en-US):") <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return '%s' % (self.language) | Model representing the language of a book instance | 62598edc097d151d1a2bf57d |
@tvm._ffi.register_object("relay.Call") <NEW_LINE> class Call(ExprWithOp): <NEW_LINE> <INDENT> def __init__(self, op, args, attrs=None, type_args=None, span=None): <NEW_LINE> <INDENT> if not type_args: <NEW_LINE> <INDENT> type_args = [] <NEW_LINE> <DEDENT> self.__init_handle_by_constructor__(_ffi_api.Call, op, args, at... | Function call node in Relay.
Call node corresponds the operator application node
in computational graph terminology.
Parameters
----------
op: tvm.ir.Op or any tvm.relay.Expr with function type.
The operation to be called.
args: List[tvm.relay.Expr]
The arguments to the call.
attrs: Optional[tvm.Attrs]
... | 62598edcadb09d7d5dc08b26 |
class Client(object): <NEW_LINE> <INDENT> def __init__(self, app): <NEW_LINE> <INDENT> self.app = app <NEW_LINE> <DEDENT> def request(self, path, method, body=None): <NEW_LINE> <INDENT> path = path or '/' <NEW_LINE> request = BaseRequest.blank(path) <NEW_LINE> request.method = method <NEW_LINE> request.text = body or '... | Make requests to a wsgi app and return the response. | 62598edca79ad1619776857b |
class NSNitroNserrAsNoxss(NSNitroAsErrors): <NEW_LINE> <INDENT> pass | Nitro error code 3128
No such CrossSiteScripting check | 62598edc8c0ade5d55dc2933 |
class Boolean_specialValue(Boolean): <NEW_LINE> <INDENT> def _validate(self, value): <NEW_LINE> <INDENT> for vv in self.valid_values: <NEW_LINE> <INDENT> if value == vv[0]: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> <DEDENT> raise ValueError <NEW_LINE> <DEDENT> def _convert_to_kodi_setting(self, value): <NEW_L... | Class to handle settings that show up as booleans in Kodi,
but have specific flags in the config.txt, rather than just 0 or 1.
The flags should all be strings. | 62598edc91f36d47f2230154 |
class PhraseSearchIndexer(Indexer): <NEW_LINE> <INDENT> def Index(self, col, value): <NEW_LINE> <INDENT> terms = {} <NEW_LINE> expansions = {} <NEW_LINE> tokens = self._Tokenize(value) <NEW_LINE> for pos, term in zip(xrange(len(tokens)), tokens): <NEW_LINE> <INDENT> if term == '_': <NEW_LINE> <INDENT> continue <NEW_LIN... | A base class for indexing values where relative position of
tokens is important and the indexer must support phrase searches,
such as the full-text indexer and the placemark indexer.
Sub-classes must implement _Tokenize(). | 62598edc67a9b606de54452e |
class ChecklistsPage(CoursePage): <NEW_LINE> <INDENT> URL_PATH = "checklists" <NEW_LINE> def is_browser_on_page(self): <NEW_LINE> <INDENT> return self.is_css_present('body.view-checklists') | Course Checklists page. | 62598edc4f6381625f19876d |
class ImageMixin(object): <NEW_LINE> <INDENT> id = Column(Integer, primary_key=True) <NEW_LINE> ext = Column(Unicode) <NEW_LINE> type = '' <NEW_LINE> variants = { '': Original() } <NEW_LINE> FS_PATH_PREFIX = os.path.join(app_conf('store-path'), 'images') <NEW_LINE> SRC_URL_PREFIX = '//' + subdomain('static') + '... | Filesystem path: /<store-path>/images/<type>/<id>-<variant>.<ext>
URL: <prefix>/<type>/<id>-<variant>.<ext> | 62598edc67a9b606de54452f |
class TableCode(models.Model): <NEW_LINE> <INDENT> code = models.CharField(max_length=4) <NEW_LINE> experiment = models.ForeignKey(Experiment, null=True) <NEW_LINE> date = models.DateField() <NEW_LINE> first_used = models.DateTimeField(null=True) <NEW_LINE> expired = models.BooleanField(default=False) <NEW_LINE> object... | Table code
4 character codes that are assigned to each day | 62598edcf7d966606f746551 |
class TestGetEventSummary: <NEW_LINE> <INDENT> def test_is_dataframe(self, catalog): <NEW_LINE> <INDENT> df = catalog.get_event_summary() <NEW_LINE> assert isinstance(df, pd.DataFrame) <NEW_LINE> assert len(df) | tests for returning and event summary dataframe | 62598edc0c0af96317c548fe |
class UrlShortenerValidateUrlSerializer(serializers.Serializer): <NEW_LINE> <INDENT> hash = serializers.CharField(max_length=8) <NEW_LINE> def validate_hash(cself, hash): <NEW_LINE> <INDENT> if not utils.validate_hash(hash): <NEW_LINE> <INDENT> raise serializers.ValidationError("Invalid hash") <NEW_LINE> <DEDENT> retur... | serializer for UrlShortener Serializer | 62598edccc0a2c1114479562 |
class DocumentEntity(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'category': {'required': True}, 'content': {'required': True}, 'spans': {'required': True}, 'confidence': {'required': True, 'maximum': 1, 'minimum': 0}, } <NEW_LINE> _attribute_map = { 'category': {'key': 'category', 'type': 'str'}, ... | An object representing various categories of entities.
All required parameters must be populated in order to send to Azure.
:ivar category: Required. Entity type.
:vartype category: str
:ivar sub_category: Entity sub type.
:vartype sub_category: str
:ivar content: Required. Entity content.
:vartype content: str
:ivar... | 62598edca8370b77170ee94f |
class Page_translation(models.Model): <NEW_LINE> <INDENT> Page = models.ForeignKey("Page", verbose_name=_("Page"), help_text=_("The page that's translated")) <NEW_LINE> Language = models.ForeignKey("Language", verbose_name=_("Language"), help_text=_("The language for the translation")) <NEW_LINE> Name = models.CharFiel... | Page translation for another language | 62598edca219f33f346c4d99 |
class RegistrationForm(forms.ModelForm): <NEW_LINE> <INDENT> password1 = forms.CharField(label='Password', widget=forms.PasswordInput) <NEW_LINE> password2 = forms.CharField(label='Password Confirmation', widget=forms.PasswordInput) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = User <NEW_LINE> fields = ('username'... | A form for creating new users. Includes all the required fields, plus a repeated password.
Attributes:
password1 (CharField): User Password
password2 (CharField): Password Confirmation | 62598edc236d856c2adc86c4 |
class NetworkRuleSet(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'default_action': {'required': True}, } <NEW_LINE> _attribute_map = { 'bypass': {'key': 'bypass', 'type': 'str'}, 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, 'ip_rules': {'key': 'ipRules', ... | Network rule set.
All required parameters must be populated in order to send to Azure.
:ivar bypass: Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible
values are any combination of Logging|Metrics|AzureServices (For example, "Logging, Metrics"),
or None to bypass none of those traffi... | 62598edcf548e778e5969af8 |
class MultipleOutputsTest(prodtest.ProduceTestCase): <NEW_LINE> <INDENT> def test_without(self): <NEW_LINE> <INDENT> self.assertDirectoryContents(['produce.ini', 'Makefile']) <NEW_LINE> with self.assertLogs(logger='produce', level='INFO') as l: <NEW_LINE> <INDENT> self.produce('a.txt', 'b.txt', **{'-j': '3'}) <NEW_LINE... | Tests the handling of recipes with multiple outputs. | 62598edc6e29344779afeb8d |
class OscilloGrapheBis(OscilloGraphe): <NEW_LINE> <INDENT> def __init__(self, master =None, larg =200, haut =150): <NEW_LINE> <INDENT> OscilloGraphe.__init__(self, master, larg, haut) <NEW_LINE> <DEDENT> def traceAxes(self): <NEW_LINE> <INDENT> pas = (self.larg-25)/8. <NEW_LINE> self.create_line(10+4*pas, self.haut-5, ... | Classe dérivée du widget Oscillographe | 62598edc3317a56b869bd819 |
class AltoTrombone(Instrument): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> def __init__( self, instrument_name='alto trombone', short_instrument_name='alt. trb.', instrument_name_markup=None, short_instrument_name_markup=None, allowable_clefs=('bass', 'tenor'), pitch_range='[A2, Bb5]', sounding_pitch_of_written_midd... | An alto trombone.
::
>>> staff = Staff("c4 d4 e4 fs4")
>>> clef = Clef(name='bass')
>>> attach(clef, staff)
>>> alto_trombone = instrumenttools.AltoTrombone()
>>> attach(alto_trombone, staff)
>>> show(staff) # doctest: +SKIP
.. doctest::
>>> print(format(staff))
\new Staff {
... | 62598edc0c0af96317c548ff |
class TestAvrotools(unittest.TestCase): <NEW_LINE> <INDENT> def testNonProtocolElement(self): <NEW_LINE> <INDENT> with self.assertRaises(avrotools.AvrotoolsException): <NEW_LINE> <INDENT> avrotools.Validator(object).getInvalidFields({}) <NEW_LINE> <DEDENT> <DEDENT> def testLessFields(self): <NEW_LINE> <INDENT> for clas... | Tests avrotools creator and validator | 62598edc2c8b7c6e89bd1d21 |
class TestQEMUOpen(mox.MoxTestBase): <NEW_LINE> <INDENT> def test(self): <NEW_LINE> <INDENT> virt_con = self.mox.CreateMock(libvirt.virConnect) <NEW_LINE> self.mox.StubOutWithMock(libvirt, 'open') <NEW_LINE> libvirt.open('qemu:///system').AndReturn(virt_con) <NEW_LINE> self.mox.ReplayAll() <NEW_LINE> self.assertEquals(... | Test that qemu.QEMU can open a connection to libvirt. | 62598edc8e7ae83300ee75f1 |
class Trajectory(NamedTuple): <NEW_LINE> <INDENT> observations: jnp.ndarray <NEW_LINE> actions: jnp.ndarray <NEW_LINE> pi: jnp.ndarray <NEW_LINE> gae: jnp.ndarray <NEW_LINE> rtg: jnp.ndarray <NEW_LINE> rewards: jnp.ndarray <NEW_LINE> discounts: jnp.ndarray | A trajectory is a sequence of observations, ... etc.
Note: `observations` should be of length T+1 to make up the final transition. | 62598edc63d6d428bbee0d33 |
class TestAwaitResponse: <NEW_LINE> <INDENT> async def test_ok(self, rpc): <NEW_LINE> <INDENT> task = asyncio.ensure_future(rpc._await_response(correlation_id=RESPONSE_CORR_ID, timeout=10.0)) <NEW_LINE> assert set(rpc._responses.keys()) == set() <NEW_LINE> await asyncio.sleep(0) <NEW_LINE> assert set(rpc._responses.key... | AsyncAmqpRpc._await_response | 62598edc8e71fb1e983b9fd3 |
class StructuredTerminalFormatter(StructuredHumanFormatter): <NEW_LINE> <INDENT> def set_terminal(self, terminal): <NEW_LINE> <INDENT> self.terminal = terminal <NEW_LINE> self._sgr0 = blessings.tigetstr('sgr0') or '' if terminal and blessings else '' <NEW_LINE> <DEDENT> def format(self, record): <NEW_LINE> <INDENT> f =... | Log formatter for structured messages writing to a terminal. | 62598edc30bbd7224646819a |
class TestTaskPage(SeleniumTestCase): <NEW_LINE> <INDENT> RECIPE_NAME = 'bar' <NEW_LINE> RECIPE_VERSION = '0.1' <NEW_LINE> TASK_NAME = 'do_da_doo_ron_ron' <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> now = timezone.now() <NEW_LINE> project = Project.objects.get_or_create_default_project() <NEW_LINE> self.build = Bui... | Test page which shows an individual task | 62598edc10dbd63aa1c6f0d2 |
class Main: <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.config() <NEW_LINE> sys.exit(self.run()) <NEW_LINE> <DEDENT> except (EOFError, KeyboardInterrupt): <NEW_LINE> <INDENT> sys.exit(114) <NEW_LINE> <DEDENT> except SystemExit as exception: <NEW_LINE> <INDENT> sys.e... | Main class | 62598edc23849d37ff84f61c |
class BoxSpectrum(BoxLayout): <NEW_LINE> <INDENT> type = 'spectrum' <NEW_LINE> def init(self, wlmin, wlmax): <NEW_LINE> <INDENT> self.ids['graph_widget'].xmin = wlmin <NEW_LINE> self.ids['graph_widget'].xmax = wlmax <NEW_LINE> self.ids['boxspectrum_title_lbl'].text = 'Mesure de spectre de %d nm \u00e0 %d nm' % (wlmin, ... | displays a box layout | 62598edca79ad1619776857d |
class HubQuestionView(View): <NEW_LINE> <INDENT> def dispatch(self, request, city_name, question_id): <NEW_LINE> <INDENT> question = get_object_or_404(HubQuestion, city__name=city_name, is_published=True, id=question_id) <NEW_LINE> answers = HubQuestion.objects.get_question_answers(question.id) <NEW_LINE> questions = H... | One hub question view | 62598edc97e22403b3839453 |
class BaseLogger(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> dir_path = os.path.dirname(os.path.realpath(__file__)) <NEW_LINE> log_dir = str(dir_path.split("python")[0]) + "python/logs/" <NEW_LINE> logging.getLogger('faker.factory').setLevel(logging.ERROR) <NEW_LINE> self.logger = logging.getLo... | The base Logger object. | 62598edc462c4b4f79db9f5b |
class ExpenseSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> owner = serializers.ReadOnlyField(source='owner.username') <NEW_LINE> image = Base64ImageField( max_length=None, use_url=True, ) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Expenses <NEW_LINE> fields = ('id', 'name', 'owner', 'price', 'ima... | Serializer to map the Model instance into JSON format for expense list | 62598edcdd821e528d6d74a9 |
class D3_Time_Offset(SetupMixin, unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> SetupMixin.setUp(self) <NEW_LINE> self.m_schedule_obj = self.m_schedules[0] <NEW_LINE> self.m_schedule_obj.DayOfWeek = 1 + 2 + 4 + 8 + 16 + 32 + 64 <NEW_LINE> self.m_riseset = Mock.RiseSet() <NEW_LINE> <DEDENT>... | These "D" classes will _test the parsing of the "Time" attribute of the Schedule.
D3 will _test the offset portion:
Possible valid formats are:
"" (Blank)
hh
hh:mm
hh:mm:ss
xxyyzz (Garbage) | 62598edcbe8e80087fbbd5ae |
class PackWebResponse(WebResponse, ISerializable, IDisposable): <NEW_LINE> <INDENT> def Close(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def Dispose(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def GetObjectData(self, *args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def GetResponseStream(self): <NEW... | Represents a response of a System.IO.Packaging.PackWebRequest. | 62598edce1aae11d1e7cdaef |
class Constant_Temperature(Atmosphere): <NEW_LINE> <INDENT> def __defaults__(self): <NEW_LINE> <INDENT> self.fluid_properties = Air() <NEW_LINE> self.planet = Earth() <NEW_LINE> self.breaks = Data() <NEW_LINE> self.breaks.altitude = np.array( [-2.00 , 0.00, 11.00, 20.00, 32.00, 47.00, 51.0... | Contains US Standard 1976 values with temperature modified to be constant.
Assumptions:
Constant temperature
Source:
U.S. Standard Atmosphere (1976 version) | 62598edc097d151d1a2bf580 |
class BTC(Coin): <NEW_LINE> <INDENT> block_time = timedelta(minutes=15) <NEW_LINE> def get_block_hash(self, number = None): <NEW_LINE> <INDENT> if number is None: <NEW_LINE> <INDENT> return self.block['hash'] <NEW_LINE> <DEDENT> return self.rpc('getblockhash', number) <NEW_LINE> <DEDENT> def get_last_block_number(self)... | BTC implements the intercations with Bitcoin cryptocurrency | 62598edc4f6381625f19876e |
class ProxyPullSupplier_skel(Fnorb.orb.CORBA.Object_skel, CosEventComm_skel.PullSupplier_skel): <NEW_LINE> <INDENT> _FNORB_ID = "IDL:omg.org/CosEventChannelAdmin/ProxyPullSupplier:1.0" <NEW_LINE> def _skel_connect_pull_consumer(self, server_request): <NEW_LINE> <INDENT> inputs = [] <NEW_LINE> inputs.append(Fnorb.orb.CO... | Interface: IDL:omg.org/CosEventChannelAdmin/ProxyPullSupplier:1.0 | 62598edc63b5f9789fe836d3 |
class RecruiterView(generic.TemplateView): <NEW_LINE> <INDENT> template_name = 'recruiters/recruiters.html' <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super(RecruiterView, self).get_context_data(**kwargs) <NEW_LINE> context['header'] = RecruiterHeader.objects.latest('updated_at') <NE... | Recruiter Index View | 62598edc0a50d4780f70390a |
class ParentDetailsTenantView(DetailsTenantView): <NEW_LINE> <INDENT> @property <NEW_LINE> def is_displayed(self): <NEW_LINE> <INDENT> return ( self.accordions.accesscontrol.is_opened and self.title.text == '{} "{}"'.format(self.context['object'].parent_tenant.obj_type, self.context['object'].parent_tenant.name) ) | Parent Tenant Details View | 62598edc3eb6a72ae0388ba2 |
class CaseInsensitiveDict(MutableMapping): <NEW_LINE> <INDENT> def __init__(self, data=None, **kwargs): <NEW_LINE> <INDENT> self._store = OrderedDict() <NEW_LINE> if data is None: <NEW_LINE> <INDENT> data = {} <NEW_LINE> <DEDENT> self.update(data, **kwargs) <NEW_LINE> <DEDENT> def __setitem__(self, key, value): <NEW_LI... | A case-insensitive ``dict``-like object.
Implements all methods and operations of
``collections.MutableMapping`` as well as dict's ``copy``. Also
provides ``lower_items``.
All keys are expected to be strings. The structure remembers the
case of the last key to be set, and ``iter(instance)``,
``keys()``, ``items()``, ... | 62598edc56ac1b37e630074f |
@dataclass <NEW_LINE> class RegistrationProcessContextOptions: <NEW_LINE> <INDENT> request: Request <NEW_LINE> acquisition_obj: object <NEW_LINE> results: defaultdict = field(init=False, default_factory=default_results) <NEW_LINE> result: object = field(init=False) <NEW_LINE> action: str = field(init=False) <NEW_LINE> ... | Used to store registration process context data.
Parameter Fields
----------------
request: Request
The request that is the cause of the process loop.
log: An acquisition log object
The acquisition log model object related to this submission.
Attribute Fields
results:
Mapping of package => class => agenc... | 62598edcb7558d5895461bae |
@implementer(IAbsoluteURL) <NEW_LINE> class AbsoluteURL(BrowserView): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> context = self.context <NEW_LINE> request = self.request <NEW_LINE> container = aq_parent(context) <NEW_LINE> if container is None: <NEW_LINE> <INDENT> raise TypeError(_insufficientContext) <... | An absolute_url adapter for generic objects in Zope 2 that
aren't OFS.Traversable (e.g. views, resources, etc.).
This is very close to the generic implementation from
zope.traversing.browser, but the Zope 2 request doesn't support
all the methods that it uses yet. | 62598edccc0a2c1114479564 |
class RNNEncoder3(object): <NEW_LINE> <INDENT> def __init__(self, hidden_size, keep_prob): <NEW_LINE> <INDENT> self.hidden_size = hidden_size <NEW_LINE> self.keep_prob = keep_prob <NEW_LINE> self.rnn_cell_fw = rnn_cell.LSTMCell(self.hidden_size) <NEW_LINE> self.rnn_cell_fw = DropoutWrapper(self.rnn_cell_fw, input_keep_... | General-purpose module to encode a sequence using a RNN.
It feeds the input through a RNN and returns all the hidden states.
Note: In lecture 8, we talked about how you might use a RNN as an "encoder"
to get a single, fixed size vector representation of a sequence
(e.g. by taking element-wise max of hidden states).
He... | 62598edc85dfad0860cbed1c |
class BookingPolicyInlineAdmin(nested_admin.NestedGenericStackedInline): <NEW_LINE> <INDENT> model = BookingPolicy <NEW_LINE> verbose_name="booking policy" <NEW_LINE> verbose_name_plural="booking policies" <NEW_LINE> extra=0 <NEW_LINE> max_num=0 <NEW_LINE> inlines=[BookingRightsInlineAdmin] | An inline editor form for Images. | 62598edcd53ae8145f9169ed |
class Question(models.Model): <NEW_LINE> <INDENT> category = models.ForeignKey('Category') <NEW_LINE> order = models.SmallIntegerField(_('Order'),default=100) <NEW_LINE> text = models.CharField(_('Question'), max_length=250) <NEW_LINE> active = models.BooleanField(_('Active'), default=True) <NEW_LINE> timestamp = model... | Place tags | 62598edc32920d7e50bc4591 |
class ModifyLiveSnapshotTemplateResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RequestId = params.get("RequestId") | ModifyLiveSnapshotTemplate response structure.
| 62598edc01c39578d7f1130b |
class Proc(dict): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> kwargs.setdefault("suspicious", False) <NEW_LINE> kwargs.setdefault("should_terminate", False) <NEW_LINE> super().__init__(**kwargs) <NEW_LINE> self["cmd"] = " ".join(self["cmdline"]) <NEW_LINE> self["cpu_total"] = sum(kwargs.get("c... | Proc is a dict subclass with attribute-access for keys
suspicious and should_terminate are added via inspection.
They can be booleans or truthy strings explaining
why they are suspicious or should be terminated. | 62598edc8e71fb1e983b9fd5 |
class IntervalLengthVsFoldChange(cpgTracker): <NEW_LINE> <INDENT> mPattern = "_macs_merged_intervals$" <NEW_LINE> def __call__(self, track, slice=None): <NEW_LINE> <INDENT> data = self.get( "SELECT length, fold FROM %(track)s_macs_merged_intervals" % locals()) <NEW_LINE> return odict(zip(("length", "foldchange"), zip(*... | Length vs fold change | 62598edc0a50d4780f70390b |
class ListRule(Rule, metaclass=ABCMeta): <NEW_LINE> <INDENT> def __init__(self, *args): <NEW_LINE> <INDENT> self.data = set(args) | Generic Rule for List-related checks | 62598edc460517430c4309ec |
class PublicUserApiTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.client = APIClient() <NEW_LINE> <DEDENT> def test_create_valid_user_success(self): <NEW_LINE> <INDENT> payload = { 'email': 'test@test.com', 'password': 'testpass', 'name': 'A new user' } <NEW_LINE> res = self.client.post(C... | Test the users API public | 62598edccb5e8a47e493b42b |
class NumberCMeta(ContractMeta): <NEW_LINE> <INDENT> def __getitem__(self, slice_): <NEW_LINE> <INDENT> return self(gte=slice_.start, lte=slice_.stop) <NEW_LINE> <DEDENT> def __lt__(self, lt): <NEW_LINE> <INDENT> return self(lt=lt) <NEW_LINE> <DEDENT> def __gt__(self, gt): <NEW_LINE> <INDENT> return self(gt=gt) | Allows slicing syntax for min and max arguments for
number contracts
>>> IntC[1:]
<IntC(gte=1)>
>>> IntC[1:10]
<IntC(gte=1, lte=10)>
>>> IntC[:10]
<IntC(lte=10)>
>>> FloatC[1:]
<FloatC(gte=1)>
>>> IntC > 3
<IntC(gt=3)>
>>> 1 < (FloatC < 10)
<FloatC(gt=1, lt=10)>
>>> (IntC > 5).check(10)
>>> (IntC > 5).check(1)
Traceba... | 62598edc97e22403b3839455 |
class Alarm: <NEW_LINE> <INDENT> def __init__(self, condition, variables, protocol=None): <NEW_LINE> <INDENT> self.trigger_variable = Variable(expression=condition, definitions=variables) <NEW_LINE> if protocol: <NEW_LINE> <INDENT> self.protocol = protocol <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.protocol = '... | Triggers if a condition among variables is met and indicates the response protocol | 62598edcd268445f26638e40 |
class HomogeneousTractions(TractionField): <NEW_LINE> <INDENT> strike = Float.T( default=1., help='Tractions in strike direction [Pa].') <NEW_LINE> dip = Float.T( default=1., help='Traction in dip direction (up) [Pa].') <NEW_LINE> normal = Float.T( default=1., help='Traction in normal direction [Pa].') <NEW_LINE> def g... | Homogeneous traction field.
The traction vectors in strike, dip and normal direction are acting
homogeneously on the rupture plane. | 62598edc462c4b4f79db9f5d |
class ExactInference(InferenceModule): <NEW_LINE> <INDENT> def initializeUniformly(self, gameState): <NEW_LINE> <INDENT> self.beliefs = util.Counter() <NEW_LINE> for p in self.legalPositions: self.beliefs[p] = 1.0 <NEW_LINE> self.beliefs.normalize() <NEW_LINE> <DEDENT> def observe(self, observation, gameState): <NEW_LI... | The exact dynamic inference module should use forward-algorithm updates to
compute the exact belief function at each time step. | 62598edc67a9b606de544532 |
class PhononTask(AbinitTask): <NEW_LINE> <INDENT> CRITICAL_EVENTS = [ events.ScfConvergenceWarning, ] <NEW_LINE> def restart(self): <NEW_LINE> <INDENT> for ext in ["1WF", "1DEN"]: <NEW_LINE> <INDENT> restart_file = self.outdir.has_abiext(ext) <NEW_LINE> irdvars = irdvars_for_ext(ext) <NEW_LINE> if restart_file: <NEW_LI... | DFPT calculations for a single atomic perturbation.
Provide support for in-place restart via (1WF|1DEN) files | 62598edc379a373c97d9755f |
class TestSystemError(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 testSystemError(self): <NEW_LINE> <INDENT> pass | SystemError unit test stubs | 62598edce1aae11d1e7cdaf0 |
class StandardParam: <NEW_LINE> <INDENT> def __init__(self, name, unit, inp_min, inp_max, inp_type): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.unit = unit <NEW_LINE> self.min = inp_min <NEW_LINE> self.max = inp_max <NEW_LINE> self.type = inp_type <NEW_LINE> self.caps_name = self.name.replace(" ", "").strip()... | StandardParam object is used to define the parameter characteristics
of standard BoloCalc input and output parameters
Args:
name (str): parameter name
unit (src.Unit): parameter unit. Defaults to src.Unit('NA')
inp_min (float): minimum allowed value. Defaults to None
inp_max (float): maximum allowe value. Defaults to ... | 62598edc0a50d4780f70390c |
class LoginViewSimpleJWT(TokenObtainPairView): <NEW_LINE> <INDENT> serializer_class = MyTokenObtainSerilizer | Generates Authorization Bearer access token to authenticate the user | 62598edc2ae34c7f260a964c |
class QNetwork(nn.Module): <NEW_LINE> <INDENT> def __init__(self, state_size, action_size, seed, fc1_units=120, fc2_units=64, fc3_units=64): <NEW_LINE> <INDENT> super(QNetwork, self).__init__() <NEW_LINE> self.seed = torch.manual_seed(seed) <NEW_LINE> self.fc1 = nn.Linear(state_size, fc1_units) <NEW_LINE> self.fc2 = nn... | Actor (Policy) Model. | 62598edc4e4d56256637097d |
class Rule(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def name(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def description(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def check(self, files, lexer, line_filter=None): <NEW_LINE> <INDENT> pass | Abstract class to check a precise coding style rule. | 62598edcb7558d5895461bb0 |
@add_delegate(HasParameters) <NEW_LINE> class DOEdriver(CaseIterDriverBase): <NEW_LINE> <INDENT> DOEgenerator = Slot(IDOEgenerator, iotype='in', required=True, desc='Iterator supplying normalized DOE values.') <NEW_LINE> record_doe = Bool(True, iotype='in', desc='Record normalized DOE values to CSV file.') <NEW_LINE> d... | Driver for Design of Experiments. | 62598edc851cf427c66b6836 |
class LoggingMixin(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def get_logger(cls): <NEW_LINE> <INDENT> if not hasattr(cls, "_logger"): <NEW_LINE> <INDENT> cls._logger = logging.getLogger("controller.%s" % cls.__name__) <NEW_LINE> <DEDENT> return cls._logger | We generally want to be able to log the behavior of
controllers. This mixin makes a logging object available. | 62598edcb5575c28eb711f83 |
class ByteTextEncoder(TextEncoder): <NEW_LINE> <INDENT> def encode(self, s): <NEW_LINE> <INDENT> numres = self._num_reserved_ids <NEW_LINE> if six.PY2: <NEW_LINE> <INDENT> return [ord(c) + numres for c in s] <NEW_LINE> <DEDENT> return [c + numres for c in s.encode('utf-8')] <NEW_LINE> <DEDENT> def decode(self, ids): <N... | Encodes each byte to an id. For 8-bit strings only. | 62598edc3539df3088eca817 |
class Device(object): <NEW_LINE> <INDENT> _cublas_handles = {} <NEW_LINE> def __init__(self, device=None): <NEW_LINE> <INDENT> if device is None: <NEW_LINE> <INDENT> self.id = runtime.getDevice() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.id = int(device) <NEW_LINE> <DEDENT> self._device_stack = [] <NEW_LINE> <... | Object that represents a CUDA device.
This class provides some basic manipulations on CUDA devices.
It supports the context protocol. For example, the following code is an
example of temporarily switching the current device::
with Device(0):
do_something_on_device_0()
After the *with* statement gets done,... | 62598edce76e3b2f99fd6f9f |
class Config(DefaultConfig): <NEW_LINE> <INDENT> __NEED_LOADED_SETTINGS__ = [] <NEW_LINE> __DEFAULT_SETTINGS__ = { "DB_POOL_SIZE": 10, "DB_MAX_OVERFLOW": 1, "DB_POOL_RECYCLE": 300, "DB_SETTINGS": default_empty({}), "LOGGER_NAME": "SouthPay", "ASYNC_ENABLED": False, "STATSD_SETTINGS": default_empty("") } <NEW_LINE> expl... | Defaults config. Specially you should load your own config from object,
or even a config file such as `yaml`
e.g.
from walila.settings import settings
class MyConfig(object):
# some settings
class CeleryConfig(object):
# some stuff
settings.from_object(MyConfig) | 62598edcf548e778e5969afc |
class EventDetailSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Event <NEW_LINE> fields = ('id', 'period_start', 'period_end', 'title', 'event_type') <NEW_LINE> <DEDENT> def to_representation(self, instance): <NEW_LINE> <INDENT> representation = super( EventDetailSe... | Schedule serializer for detail information | 62598edca79ad16197768580 |
class DiluvianModel(UserFocusedModel): <NEW_LINE> <INDENT> name = models.TextField() <NEW_LINE> server = models.ForeignKey( ComputeServer, on_delete=models.SET_NULL, null=True, blank=True ) <NEW_LINE> model_source_path = models.TextField() <NEW_LINE> config = models.ForeignKey(ConfigFile, on_delete=models.CASCADE) | This model stores a Floodfilling network trained with diluvian. | 62598edc7d847024c075a935 |
class Fenwick: <NEW_LINE> <INDENT> def __init__(self, t): <NEW_LINE> <INDENT> self.s = [0] * len(t) <NEW_LINE> for i in range(1, len(t)): <NEW_LINE> <INDENT> self.add(i, t[i]) <NEW_LINE> <DEDENT> <DEDENT> def prefixSum(self, i): <NEW_LINE> <INDENT> sum = 0 <NEW_LINE> while i > 0: <NEW_LINE> <INDENT> sum += self.s[i] <N... | maintains a tree to allow quick updates and queries
| 62598edc66673b3332c2e90c |
class SelfTestPaintDevice(svg_export.SVGPaintDevice): <NEW_LINE> <INDENT> def __init__(self, fileobj, width_in, height_in): <NEW_LINE> <INDENT> svg_export.SVGPaintDevice.__init__(self, fileobj, width_in, height_in) <NEW_LINE> self.engine = SelfTestPaintEngine(width_in, height_in) | Paint device for SVG paint engine. | 62598edc8e7ae83300ee75f5 |
class BeamerTranslator (LaTeXTranslator): <NEW_LINE> <INDENT> def __init__ (self, document): <NEW_LINE> <INDENT> LaTeXTranslator.__init__ (self, document) <NEW_LINE> self.head_prefix = [x for x in self.head_prefix if ('{typearea}' not in x)] <NEW_LINE> hyperref_posn = [i for i in range (len (self.head_prefix)) if ('{hy... | A converter for docutils elements to beamer-flavoured latex. | 62598edcbaa26c4b54d4d837 |
class Channelcheck(pattern.Pattern): <NEW_LINE> <INDENT> def __init__(self, config, config_global): <NEW_LINE> <INDENT> self.config_defaults = { 'x': 42 } <NEW_LINE> pattern.Pattern.__init__(self, config, config_global) <NEW_LINE> self.channel_current = 0 <NEW_LINE> <DEDENT> def _calculate_step(self, universe): <NEW_LI... | Channelcheck pattern Class. | 62598edc7b25080760ed5a00 |
class ScriptBase(with_metaclass(TypeclassBase, ScriptDB)): <NEW_LINE> <INDENT> objects = ScriptManager() | Base class for scripts. Don't inherit from this, inherit from the
class `DefaultScript` below instead. | 62598edc60cbc95b063628a1 |
class CompositeEvalMetric(EvalMetric): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(CompositeEvalMetric, self).__init__('composite') <NEW_LINE> try: <NEW_LINE> <INDENT> self.metrics = kwargs['metrics'] <NEW_LINE> <DEDENT> except KeyError: <NEW_LINE> <INDENT> self.metrics = [] <NEW_LINE> <... | Manage multiple evaluation metrics. | 62598edc4527f215b58e8469 |
@beam.typehints.with_output_types(statistics_pb2.DatasetFeatureStatistics) <NEW_LINE> class _UniquesStatsGeneratorImpl(beam.PTransform): <NEW_LINE> <INDENT> def __init__(self, schema): <NEW_LINE> <INDENT> self._categorical_features = set( stats_util.get_categorical_numeric_features(schema) if schema else []) <NEW_LINE>... | A PTransform that computes the number of unique values
for string features. | 62598edcb7558d5895461bb1 |
class Solution: <NEW_LINE> <INDENT> def isMatch(self, s, p): <NEW_LINE> <INDENT> self.memo = [[None]*len(p) for _ in range(len(s))] <NEW_LINE> return self.is_match(s, p, 0, 0) <NEW_LINE> <DEDENT> def is_match(self, s, p, i, j): <NEW_LINE> <INDENT> if j >= len(p): <NEW_LINE> <INDENT> return i >= len(s) <NEW_LINE> <DEDEN... | @param s: A string
@param p: A string includes "." and "*"
@return: A boolean | 62598edc462c4b4f79db9f5e |
class Config(dict): <NEW_LINE> <INDENT> def __init__(self, settings=None, verbose=False): <NEW_LINE> <INDENT> super(Config, self).__init__(settings or {}) <NEW_LINE> self._verbose = verbose <NEW_LINE> <DEDENT> def from_yml(self, directory, filename): <NEW_LINE> <INDENT> _cfg_file = None <NEW_LINE> if not os.path.isdir(... | Configuration class. | 62598edc91f36d47f2230157 |
class Periodic: <NEW_LINE> <INDENT> def __init__(self, func: callable, interval: int): <NEW_LINE> <INDENT> self.func = func <NEW_LINE> self.interval = interval <NEW_LINE> self.is_started = False <NEW_LINE> self._task = None <NEW_LINE> <DEDENT> async def start(self): <NEW_LINE> <INDENT> if not self.is_started: <NEW_LINE... | Class for periodic work in asyncio | 62598edcf8510a7c17d7d42f |
@MongoModelInterface.inject <NEW_LINE> class WikiProject(Document): <NEW_LINE> <INDENT> _id = ObjectIdField(primary_key=True) <NEW_LINE> name = StringField(required=True) <NEW_LINE> subproject = BooleanField(default=False) <NEW_LINE> parents = ListField(StringField(), null=True) <NEW_LINE> watchers = IntField(null=True... | WikiProject document.
Attributes
----------
_id : ObjectIdField
Generic primary key.
name : StringField
Project name.
subproject : BooleanField
Flag indicating whether it is a subproject.
This may not be 100% veridical as determining
relationships between WikiProject is not trivial.
parents : ListF... | 62598edc3617ad0b5ee04693 |
class DeleteTagResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RequestId = params.get("RequestId") | DeleteTag返回参数结构体
| 62598edd63d6d428bbee0d38 |
class RegistrarEstado(CreateView): <NEW_LINE> <INDENT> template_name = 'topologia/estados/estados.html' <NEW_LINE> model = Estado <NEW_LINE> success_url = reverse_lazy("listar_estado") <NEW_LINE> form_class = EstadoForm <NEW_LINE> def post(self, request, *args, **kwargs): <NEW_LINE> <INDENT> bandera = request.POST.get(... | Vista basada en clase: (`Registrar`)
:param template_name: ruta de la plantilla
:param model: Modelo al cual se hace referencia
:param success_url: nombre de la ruta a la cual se redireccionara la aplicacion una vez culminado el registro
satisfactoriamente
:param form_class: nombre de la clase Formulario | 62598eddf7d966606f746556 |
class StdConfigItemBase(object): <NEW_LINE> <INDENT> def __init__(self, section, option, label, icon=None, info=None, cb=None): <NEW_LINE> <INDENT> self._sec = section <NEW_LINE> self._opt = option <NEW_LINE> self._lbl = label <NEW_LINE> self._ico = icon <NEW_LINE> self._inf = info <NEW_LINE> self._cb = cb <NEW_LINE> <... | Base class for all the other StdConfigItem* classes.
Do not inherit from EmcItemClass to not be a Singleton. | 62598edda8370b77170ee955 |
class CythonIntegrationTest(IntegrationTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.sim = Sim() <NEW_LINE> self.sys = PyMassSpringDamper() <NEW_LINE> self.sys.store("x1") <NEW_LINE> self.sim.add_system(self.sys) <NEW_LINE> self.integrationlength = 50 <NEW_LINE> self.timestep = 0.1 | Use a Cython System to simulate. The results are compared with the
analytical results. | 62598edda219f33f346c4d9f |
class MailerMebelRabbitMQ(MailerRabbitMQ): <NEW_LINE> <INDENT> pass | Источник для взаимодействия с проектом mailer-mebel через RabbitMq | 62598eddd53ae8145f9169f1 |
class ShortSighted(MovingAlgorithm): <NEW_LINE> <INDENT> def move_elevators(self, elevators: List[Elevator], waiting: Dict[int, List[Person]], max_floor: int) -> List[Direction]: <NEW_LINE> <INDENT> res = [] <NEW_LINE> waiting_floor = [] <NEW_LINE> for floor in waiting: <NEW_LINE> <INDENT> if len(waiting[floor]) != 0: ... | A moving algorithm that preferences the closest possible choice.
If the elevator is empty, it moves towards the *closest* floor that has at
least one person waiting, or stays still if there are no people waiting.
If the elevator isn't empty, it moves towards the closest target floor of
all passengers who are on the e... | 62598edda79ad16197768582 |
class NormalizedBool(with_metaclass(Type, boolclass.base)): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> super(NormalizedBool, self).__init__( type(self).normalize(value)) <NEW_LINE> <DEDENT> except ValueError as e: <NEW_LINE> <INDENT> raise type(e)(repr(value)) | Base class for :func:`normboolclass` created classes.
| 62598eddeab8aa0e5d30a2dd |
class Master(SMaster): <NEW_LINE> <INDENT> def __init__(self, opts): <NEW_LINE> <INDENT> SMaster.__init__(self, opts) <NEW_LINE> <DEDENT> def _clear_old_jobs(self): <NEW_LINE> <INDENT> if self.opts['keep_jobs'] == 0: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> jid_root = os.path.join(self.opts['cachedir'], 'jobs') <... | The salt master server | 62598edd10dbd63aa1c6f0d8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.