code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class LinearModel: <NEW_LINE> <INDENT> def __init__(self, input_dim, n_action): <NEW_LINE> <INDENT> self.W = np.random.randn(input_dim, n_action) / np.sqrt(input_dim) <NEW_LINE> self.b = np.zeros(n_action) <NEW_LINE> self.vW = 0 <NEW_LINE> self.vb = 0 <NEW_LINE> self.losses = [] <NEW_LINE> <DEDENT> def predict(self, X)...
a linear regression model
62598edc97e22403b3839439
class Meta(object): <NEW_LINE> <INDENT> app_label = 'user_manager' <NEW_LINE> ordering = ['manager_user'] <NEW_LINE> unique_together = ( ('user', 'manager_user'), ('user', 'unregistered_manager_email'), )
Meta settings for ``UserManagerRole`` object.
62598edcdd821e528d6d748e
class DummyDescriptor(BaseDescriptorModel): <NEW_LINE> <INDENT> name_desc = "Dummy descriptor" <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self._out_formatter = null_out_formatter <NEW_LINE> self._assert_correctness() <NEW_LINE> <DEDENT> def compute(self, pointfeats, point_pos): <NEW_LINE> <INDENT> return [pfeat...
Dummy descriptor model created for testing purposes.
62598edcdd821e528d6d748f
class WorkoutTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.user = create_user() <NEW_LINE> self.wko = Workout.objects.create(user=self.user, date=timezone.now(), description='Bench day', comments='Good session with Ray') <NEW_LINE> <DEDENT> def test_workout_page_redirects_anonymous(self)...
Tests for the individual workout page.
62598edc460517430c4309d0
class Agent: <NEW_LINE> <INDENT> dr = [-1, 0, 1, 0] <NEW_LINE> dc = [0, 1, 0, -1] <NEW_LINE> def __init__ (self): <NEW_LINE> <INDENT> self.current = pair(0, 0) <NEW_LINE> self.dir = 1 <NEW_LINE> self.moves = 0 <NEW_LINE> self.alive = True <NEW_LINE> <DEDENT> def move(self, percept): <NEW_LINE> <INDENT> if not self.aliv...
Class of Robot
62598edc2ae34c7f260a962f
class Meta: <NEW_LINE> <INDENT> model = auth.get_user_model() <NEW_LINE> django_get_or_create = ('username', 'email')
Meta opções da fábrica.
62598edca79ad16197768563
class CompositeFilter(_messages.Message): <NEW_LINE> <INDENT> class OpValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> OPERATOR_UNSPECIFIED = 0 <NEW_LINE> AND = 1 <NEW_LINE> <DEDENT> filters = _messages.MessageField('Filter', 1, repeated=True) <NEW_LINE> op = _messages.EnumField('OpValueValuesEnum', 2)
A filter that merges multiple other filters using the given operator. Enums: OpValueValuesEnum: The operator for combining multiple filters. Fields: filters: The list of filters to combine. Must contain at least one filter. op: The operator for combining multiple filters.
62598edc435de62698e9a31e
class FakeCapture(object): <NEW_LINE> <INDENT> def __init__(self, size=(640,480),fps=30,timestamps=None,timebase=None): <NEW_LINE> <INDENT> super(FakeCapture, self).__init__() <NEW_LINE> self.size = size <NEW_LINE> self.fps = c_float(fps) <NEW_LINE> self.timestamps = timestamps <NEW_LINE> self.presentation_time = time(...
docstring for FakeCapture
62598edc0c0af96317c548e6
class data: <NEW_LINE> <INDENT> def __init__(self,name,binary=True): <NEW_LINE> <INDENT> from numpy import fromfile,loadtxt <NEW_LINE> try: <NEW_LINE> <INDENT> if binary is True: <NEW_LINE> <INDENT> self.data=fromfile(name,dtype='float64') <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.data=loadtxt(name) <NEW_LINE>...
Data class -- perform elementary data analysis
62598edc627d3e7fe0e053cf
class Session(): <NEW_LINE> <INDENT> def __init__(self, filename): <NEW_LINE> <INDENT> csv_reader = csv.reader(filename, dialect='excel-tab') <NEW_LINE> self.tracks = [] <NEW_LINE> for raw_row in csv_reader: <NEW_LINE> <INDENT> if raw_row: <NEW_LINE> <INDENT> row = [cell.strip() for cell in raw_row] <NEW_LINE> if row[0...
Session() instance reads .txt file, exported from Pro Tools and stores every tracks EDL as list of Track() instances. Supports export to .csv and .html formats.
62598edc5f7d997b871f8679
class ScreenMode(_object): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> __setattr__ = lambda self, name, value: _swig_setattr(self, ScreenMode, name, value) <NEW_LINE> __swig_getmethods__ = {} <NEW_LINE> __getattr__ = lambda self, name: _swig_getattr(self, ScreenMode, name) <NEW_LINE> __repr__ = _swig_repr <...
Proxy of C++ FIFE::ScreenMode class
62598edc3617ad0b5ee04675
class MagicalCreature(Creature): <NEW_LINE> <INDENT> def __init__(self, name, level, health, defense, armor, magic): <NEW_LINE> <INDENT> super().__init__(name, level, health, defense, armor) <NEW_LINE> self.magic = magic <NEW_LINE> <DEDENT> def attack_roll(self): <NEW_LINE> <INDENT> modifier = round(random.randint(1, s...
NPC magical class of characters
62598edc85dfad0860cbed0f
class Link(Task): <NEW_LINE> <INDENT> def __init__(self, product, dag, name): <NEW_LINE> <INDENT> super().__init__(None, product, dag, name, None) <NEW_LINE> self.product.save_metadata = self._null <NEW_LINE> self.product._outdated_data_dependencies = self._false <NEW_LINE> self.product._outdated_code_dependency = self...
A dummy Task used to "plug" an external Product to a pipeline The purpose of this Task is to link a pipeline to an external read-only dataset, this task does not do anything on the dataset and the product is always considered up-to-date. There are two primary use cases: when the raw data is automatically uploaded to a...
62598edc63d6d428bbee0d1a
class Counter(_WPILibObject): <NEW_LINE> <INDENT> def SetUpSource(self, channel): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def SetUpSourceEdge(self, risingEdge, fallingEdge): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def ClearUpSource(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def SetDownSource(self, ch...
TODO: Make this function as a genuine mock. It should behave like a real Counter
62598edc442bda511e95a9b0
class ExtractShaders(pyblish_magenta.api.Extractor): <NEW_LINE> <INDENT> label = "Shaders" <NEW_LINE> hosts = ["maya"] <NEW_LINE> families = ["lookdev"] <NEW_LINE> def process(self, instance): <NEW_LINE> <INDENT> from maya import cmds <NEW_LINE> temp_dir = self.temp_dir(instance) <NEW_LINE> temp_file = os.path.join(tem...
Output individual shaders
62598edc4428ac0f6e656aa4
class DemoWindow(Window): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> config = Config(sample_buffers=1, samples=4, depth_size=16, double_buffer=True,) <NEW_LINE> super(DemoWindow, self).__init__(resizable=True, config=config) <NEW_LINE> <DEDENT> except NoSuchConfigException: <NE...
docstring for DemoWindow
62598edc0fa83653e46f3435
class PrivateUserApiTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.user = create_user( email='test@test.com', password='password', name='name' ) <NEW_LINE> self.client = APIClient() <NEW_LINE> self.client.force_authenticate(user=self.user) <NEW_LINE> <DEDENT> def test_retrieve_profile_suc...
Test API requests that require authentication
62598edc4a966d76dd5ed42c
class rfftnd: <NEW_LINE> <INDENT> def __init__(self, shape, mode): <NEW_LINE> <INDENT> self._rfftnd = f'rfft{len(shape)}d_' <NEW_LINE> func = getattr(API, self._rfftnd + 'new') <NEW_LINE> self._handle = func(*shape, mode) <NEW_LINE> if self._handle == 0: <NEW_LINE> <INDENT> raise IcsError(func, None) <NEW_LINE> <DEDENT...
Wrapper for rfft#d_ functions.
62598edc6aa9bd52df0d33f6
class FirmwareDrivers(object): <NEW_LINE> <INDENT> URI = '/rest/firmware-drivers' <NEW_LINE> def __init__(self, con): <NEW_LINE> <INDENT> self._connection = con <NEW_LINE> self._client = ResourceClient(con, self.URI) <NEW_LINE> <DEDENT> def get_all(self, start=0, count=-1, filter='', sort=''): <NEW_LINE> <INDENT> retur...
Firmware Drivers API client.
62598edc32920d7e50bc4576
class PackageVersionTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> Package.objects.all().delete() <NEW_LINE> <DEDENT> def test_create(self): <NEW_LINE> <INDENT> pack = Package.objects.create(name='python-dikbm-adapter', latest_version='2.0.0', link='http://www.foo.bar', description='lorem ips...
The unitests for PackageVersion model
62598edc3539df3088eca7fb
class WinThenBlockStrat(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> def decide_move(self, game, verbose = False): <NEW_LINE> <INDENT> if verbose: <NEW_LINE> <INDENT> print('We will try and win the current board.') <NEW_LINE> <DEDENT> result = win_any_board(game) <NEW_L...
docstring for ClassName
62598edc76e4537e8c3edb0b
class HADES_UNAUTH_WHITELIST_IPSET(Option): <NEW_LINE> <INDENT> default = "hades_unauth_whitelist" <NEW_LINE> type = str
Name of ipset for whitelisted IPs.
62598edc236d856c2adc86b8
class PdfDocument: <NEW_LINE> <INDENT> def __init__(self, pdffile): <NEW_LINE> <INDENT> self.scores = {} <NEW_LINE> laparams = LAParams() <NEW_LINE> laparams.all_texts = True <NEW_LINE> sio = StringIO() <NEW_LINE> fp = open(pdffile, "rb") <NEW_LINE> document = PDFDocument(PDFParser(fp)) <NEW_LINE> if not document.is_ex...
A PdfDocument Object Contains the text and PDF document information and offers a sentiment method that runs a simplistic sentiment analysis on the text of the PDF file
62598edc498bea3a75a5607f
class NodeRelop(Node): <NEW_LINE> <INDENT> def __init__(self, pos, relop): <NEW_LINE> <INDENT> super(NodeRelop, self).__init__() <NEW_LINE> self.pos = pos <NEW_LINE> self.relop = relop <NEW_LINE> <DEDENT> def op(self, o1, o2): <NEW_LINE> <INDENT> if self.relop == "<": <NEW_LINE> <INDENT> return 1 if o1 < o2 else 0 <NEW...
generated source for class NodeRelop
62598edcfff4ab517ebcbd2d
class AsyncMirrorGroupRecoverDescriptor(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swagger_types = { 'member_ref': 'str', 'delete_recovery_point_if_necessary': 'bool' } <NEW_LINE> self.attribute_map = { 'member_ref': 'memberRef', 'delete_recovery_point_if_necessary': 'deleteRecoveryPointI...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598edc009cb60464cffa9e
class cons(object): <NEW_LINE> <INDENT> def __init__(self, car, cdr): <NEW_LINE> <INDENT> self.car = car <NEW_LINE> self.cdr = cdr <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "cons({0}, {1})".format(self.car, self.cdr) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "({0} . {1})...
Simple type representing a cons cell.
62598edccc0a2c111447954c
class _EC_KEY(_Rsrc): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> super(_EC_KEY, self).__init__(value) <NEW_LINE> <DEDENT> def __del__(self): <NEW_LINE> <INDENT> _logger.debug("Freeing EC_KEY: %d", self.raw) <NEW_LINE> from openssl import EC_KEY_free <NEW_LINE> EC_KEY_free(self._value) <NEW_LINE>...
EC KEY wrapper
62598edc6e29344779afeb75
class PartUploadError(Exception): <NEW_LINE> <INDENT> pass
This class is used to wrap exceptions that occur because of part upload errors.
62598edcadb09d7d5dc08b10
class WalletUnlockerServicer(object): <NEW_LINE> <INDENT> def GenSeed(self, request, context): <NEW_LINE> <INDENT> context.set_code(grpc.StatusCode.UNIMPLEMENTED) <NEW_LINE> context.set_details('Method not implemented!') <NEW_LINE> raise NotImplementedError('Method not implemented!') <NEW_LINE> <DEDENT> def InitWallet(...
The WalletUnlocker service is used to set up a wallet password for lnd at first startup, and unlock a previously set up wallet.
62598edc460517430c4309d2
class StopWordManager(TFExercise): <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> with open("example/stopwords/stop_words.txt") as f: <NEW_LINE> <INDENT> self._stop_words = f.read().split(",") <NEW_LINE> <DEDENT> self._stop_words.extend(list(string.ascii_lowercase)) <NEW_LINE> <DEDENT> def is_stop_...
Models the stop word filter
62598edc23849d37ff84f604
class VatSettingsResponse(ModelNormal): <NEW_LINE> <INDENT> allowed_values = { } <NEW_LINE> validations = { } <NEW_LINE> additional_properties_type = None <NEW_LINE> _nullable = False <NEW_LINE> @cached_property <NEW_LINE> def openapi_types(): <NEW_LINE> <INDENT> return { 'country_iso': (str, none_type,), 'no': (str, n...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. Attributes: allowed_values (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict with a capitalized key describing the a...
62598edcbe8e80087fbbd596
class TestImportCourseSummaryEnrollmentsIntoMysql(TestCase): <NEW_LINE> <INDENT> def test_query(self): <NEW_LINE> <INDENT> expected_columns = ('course_id', 'catalog_course_title', 'catalog_course', 'start_time', 'end_time', 'pacing_type', 'availability', 'mode', 'count', 'count_change_7_days', 'cumulative_count', 'pass...
Test that the correct columns are in the Course Summary Enrollments test set.
62598edca79ad16197768565
class NoIssuerKey(LaunchKeyAPIException): <NEW_LINE> <INDENT> pass
Issuer key was not loaded
62598edc004d5f362081e2a4
class CiscoDeviceManagementApi(object): <NEW_LINE> <INDENT> def __init__(self, topic, host): <NEW_LINE> <INDENT> self.host = host <NEW_LINE> target = messaging.Target(topic=topic, version='1.0') <NEW_LINE> self.client = n_rpc.get_client(target) <NEW_LINE> <DEDENT> def report_dead_hosting_devices(self, context, hd_ids=N...
Agent side of the device manager RPC API.
62598edc45492302aabfa9fd
class BatchUpdateEntityTypesResponse(_messages.Message): <NEW_LINE> <INDENT> entityTypes = _messages.MessageField('EntityType', 1, repeated=True)
The response message for EntityTypes.BatchUpdateEntityTypes. Fields: entityTypes: The collection of updated or created entity types.
62598edc596a8972361261b1
class ISubscriberEvent(zope.interface.Interface): <NEW_LINE> <INDENT> object = zope.interface.Attribute( "The object related to this event") <NEW_LINE> original_event = zope.interface.Attribute( "The ObjectEvent related to this event")
An event fired by the subscribers in relation to another event.
62598edc30bbd72246468183
class AuthenticationForm(django.contrib.auth.forms.AuthenticationForm): <NEW_LINE> <INDENT> username = forms.CharField(label="Username", max_length=75, widget=EmailInput()) <NEW_LINE> password = forms.CharField( label="Password", widget=forms.PasswordInput(attrs={'autocomplete': 'off'}) )
override the authentication form because we use the email address as the key to authentication.
62598edc3cc13d1c6d463cb3
class Config(object): <NEW_LINE> <INDENT> def __init__(self, inputs, config_file): <NEW_LINE> <INDENT> self.page_height = 600 <NEW_LINE> self.page_width = 1000 <NEW_LINE> self.page_pad = 50 <NEW_LINE> self.page_no_index = 0 <NEW_LINE> self.page_legend = 0 <NEW_LINE> self.legend_hoff = 0 <NEW_LINE> self.legend_woff = 0 ...
Configuration definition.
62598edccad5886f8bdc3849
class ArchivedCredit(models.Model): <NEW_LINE> <INDENT> archived_phoneuser = models.ForeignKey(ArchivedPhoneUser) <NEW_LINE> recharge = models.DecimalField( verbose_name="ricarica", default=0, max_digits=5, decimal_places=2) <NEW_LINE> recharge_date = models.DateTimeField() <NEW_LINE> reason = models.CharField(max_leng...
ArchivedCredit This class stores the credits of an archived phoneuser
62598edc44b2445a339b5c0a
class NodeExtension(fuel_master.NodeExtension): <NEW_LINE> <INDENT> def get_kernel_cmd(self, boot_from='cdrom', iface='enp0s3', wait_for_external_config='yes'): <NEW_LINE> <INDENT> if boot_from == 'usb': <NEW_LINE> <INDENT> return ( '<Wait>\n' '<Wait>\n' '<Wait>\n' '<F12>\n' '2\n' '<Esc><Enter>\n' '<Wait>\n' 'vmlinuz i...
Extension for Fuel 8.0
62598edc8a43f66fc4bf06bc
class EloquaBulkSyncTimeout(Exception): <NEW_LINE> <INDENT> pass
Exception class for Bulk sync timeouts
62598edc85dfad0860cbed10
class Initializer(websauna.system.Initializer): <NEW_LINE> <INDENT> def configure_static(self): <NEW_LINE> <INDENT> super(Initializer, self).configure_static() <NEW_LINE> self.config.registry.static_asset_policy.add_static_view( '{{cookiecutter.project_slug}}-static', '{{cookiecutter.pkg_name}}:static', ) <NEW_LINE> <D...
An initialization configuration used for starting {{cookiecutter.pkg_name}}. Override parent class methods to customize application behavior.
62598edc63d6d428bbee0d1c
class IDefaultInputConverter(IInputConverter): <NEW_LINE> <INDENT> pass
MarkerInterface to telling that the implementing class is the DefaultInputConverter. There should only be one.
62598edce76e3b2f99fd6f85
class ExportCsv(object): <NEW_LINE> <INDENT> header = [] <NEW_LINE> def __init__(self, filename): <NEW_LINE> <INDENT> self.response = HttpResponse(content_type='text/csv') <NEW_LINE> self.response.write(codecs.BOM_UTF8) <NEW_LINE> self._write_filename(filename) <NEW_LINE> self.writer = csv.writer(self.response) <NEW_LI...
Export csv
62598edc45492302aabfa9fe
class AristonDevice: <NEW_LINE> <INDENT> def __init__( self, api, ): <NEW_LINE> <INDENT> self.api = api
Representation of a base Ariston discovery device.
62598edc4428ac0f6e656aa6
class UnionType(SuperType): <NEW_LINE> <INDENT> types = [] <NEW_LINE> _native_type = None <NEW_LINE> def __new__(cls, *args, **kwargs): <NEW_LINE> <INDENT> if not cls.types: <NEW_LINE> <INDENT> raise TypeSystemError( 'Sub-class must define a `types` list attribute containing at ' 'least 1 type.', cls=cls) <NEW_LINE> <D...
A type that can be one of any of the defined `types`. The first type that does not raise a :class:`~doctor.errors.TypeSystemError` will be used as the type for the variable.
62598edcf7d966606f74653b
class TrackRCFor(AbstractContextManager): <NEW_LINE> <INDENT> __slots__ = ("args", "c_initial", "c_final") <NEW_LINE> def __init__(self, *args) -> None: <NEW_LINE> <INDENT> self.args = args <NEW_LINE> self.c_initial = None <NEW_LINE> self.c_final = None <NEW_LINE> <DEDENT> def __call__(self) -> ContextManager: <NEW_LIN...
Track the reference count for a sequence of objects specified as arguments at init time. Example: >>> a = object(); b = object() >>> with TrackRCFor(a, b) as t: ... c = a ... del b >>> t.assertDelta(1, -1) This is meant to assert that during the "suite" of code in the indented block under the "with" statemen...
62598edc7cff6e4e811b3f39
class GetRecentMeUrls(Object): <NEW_LINE> <INDENT> ID = 0x3dc0f114 <NEW_LINE> def __init__(self, referer: str): <NEW_LINE> <INDENT> self.referer = referer <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read(b: BytesIO, *args) -> "GetRecentMeUrls": <NEW_LINE> <INDENT> referer = String.read(b) <NEW_LINE> return GetRece...
Attributes: ID: ``0x3dc0f114`` Args: referer: ``str`` Raises: :obj:`Error <pyrogram.Error>` Returns: :obj:`help.RecentMeUrls <pyrogram.api.types.help.RecentMeUrls>`
62598edc9b70327d1c57d304
class Menu(models.Model): <NEW_LINE> <INDENT> objects = models.Manager() <NEW_LINE> menu_title = models.CharField(max_length=50) <NEW_LINE> created = models.DateTimeField(auto_now_add=True) <NEW_LINE> modified = models.DateTimeField(auto_now=True) <NEW_LINE> unique_id = models.UUIDField(primary_key=True, default=uuid.u...
Model holding menu data A menu contains a title, the date in which it was created and last modified, as well as a unique id which will identify this menu. Attributes: **menu_title** A Char field that contains a title for this menu. **created** A Date/Time field that represents the time of creation of this m...
62598edc8e71fb1e983b9fbd
class ProductionConfig(Config): <NEW_LINE> <INDENT> DEBUG = False <NEW_LINE> TESTING = False <NEW_LINE> SQLALCHEMY_TRACK_MODIFICATIONS = False <NEW_LINE> SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL', 'postgresql+psycopg2://mike:10131994@localhost/virs_db')
Configurations for Production.
62598edc8e7ae83300ee75db
class TopologyError(Exception): <NEW_LINE> <INDENT> def __init__(self,val): <NEW_LINE> <INDENT> self.value=val <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.value
When something goes wrong in topology
62598edc8da39b475be016f5
class VolumeCandidateRequestTypeDataTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_volume_candidate_request_type_data(self): <NEW_LINE> <INDENT> volume_candidate_request_type_data_obj = VolumeCandidateRequestTypeData() <NEW_LINE> self.assertNotEqual(volume_candidate_request_type_data_obj, None)
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598edc796e427e5384cce3
class Categories(models.Model): <NEW_LINE> <INDENT> category = models.CharField(max_length=128, unique=True) <NEW_LINE> description = models.TextField(default='', blank=True, help_text='Cases for when this category should be used') <NEW_LINE> date_created = models.DateTimeField(auto_now_add=True) <NEW_LINE> date_update...
Categories for tasks
62598edc7b25080760ed59e6
class AccessStack( list ): <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._current_level = 0 <NEW_LINE> self.append( self._DEFAULT ) <NEW_LINE> <DEDENT> def add_level(self, access_qualif: Access = None) -> None: <NEW_LINE> <INDENT> self._current_level += 1 <NEW_LI...
The class of push-and-pop stacks containing access qualifiers. To be used for the storage of current access status along the nested instructions blocks (i.e. levels of braces).
62598edc01c39578d7f112f3
class TestBatchDownloader(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.downloader = BatchDownloader("download", default_overwrite = True, default_create_directory = True) <NEW_LINE> <DEDENT> def test_empty_list(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.downloader.down...
Test class for the BatchDownloader class. Define a set of test cases to check handling of invalid URL lists, invalid URLs, incorrect URLs and valid testcases. Attributes: downloader (object): A BatchDownloader object that is initialized for all test cases. Interactive user requests are disabled.
62598edc6e29344779afeb77
class SustainReleaseBits(IntFlag): <NEW_LINE> <INDENT> RIS0 = 2**0 <NEW_LINE> RIS1 = 2**1 <NEW_LINE> RIS2 = 2**2 <NEW_LINE> RIS3 = 2**3 <NEW_LINE> STN0 = 2**4 <NEW_LINE> STN1 = 2**5 <NEW_LINE> STN2 = 2**6 <NEW_LINE> STN3 = 2**7
Bits in Sustain/Release registers
62598edc38b623060ffa75de
class NSNitroNserrWiSiteOnlyMpx(NSNitroSslvpnAaaErrors): <NEW_LINE> <INDENT> pass
Nitro error code 2666 WI can only be installed on NetScaler nCore builds
62598edc1b99ca400228e7b2
class CohortAnnotationsRequest(object): <NEW_LINE> <INDENT> swagger_types = { 'cohort_name': 'str', 'status_filter': 'list[CohortStatus]', 'cdr_version_name': 'str', 'annotation_query': 'AnnotationQuery' } <NEW_LINE> attribute_map = { 'cohort_name': 'cohortName', 'status_filter': 'statusFilter', 'cdr_version_name': 'cd...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598edcadb09d7d5dc08b12
class SceneUIActionSet(ActionSet): <NEW_LINE> <INDENT> groups = [scene_group, view_group] <NEW_LINE> menus = [new_menu, save_scene_as_menu] <NEW_LINE> actions = [ new_scene, save_scene, save_scene_to_png, save_scene_to_jpeg, save_scene_to_bmp, save_scene_to_tiff, save_scene_to_ps, save_scene_to_gl2ps, save_scene_to_...
The default action set for the scene UI plugin.
62598edcdd821e528d6d7493
class RegenerateSaneSnippetsCommand(sublime_plugin.WindowCommand): <NEW_LINE> <INDENT> def run(self, force=True): <NEW_LINE> <INDENT> regenerate_snippets(force=force)
Rechecks the packages directory for .sane-snippets and regenerates them If `force = True` it will regenerate all the snippets even if they weren't updated
62598edc097d151d1a2bf569
@cache_project <NEW_LINE> class RopeContext(object): <NEW_LINE> <INDENT> def __init__(self, path, project_path): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> self.project = project.Project(project_path, fscommands=FileSystemCommands()) <NEW_LINE> self.importer = rope_autoimport.AutoImport( project=self.project, obse...
A context manager to have a rope project context.
62598edc379a373c97d97546
class MetaData(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.change = 0 <NEW_LINE> self.type = 0 <NEW_LINE> self.refcnt = 0 <NEW_LINE> self.createverf = "" <NEW_LINE> self.owner = "" <NEW_LINE> self.mode = 0o777 <NEW_LINE> self.time_access = self.time_modify = self.time_create = nfs4lib.get_...
Contains everything that needs to be stored to preserve all of the object's metadata.
62598edc60cbc95b06362887
class Meta: <NEW_LINE> <INDENT> verbose_name = _('Timetable') <NEW_LINE> verbose_name_plural = _('Timetables') <NEW_LINE> ordering = ('-date',)
Meta definition for Timetable.
62598edc004d5f362081e2a5
class ScheduleCommitteeSpider(Spider): <NEW_LINE> <INDENT> name = 'schedule_committee' <NEW_LINE> start_urls = [ 'http://app.legco.gov.hk/ScheduleDB/odata/Tcommittee' ] <NEW_LINE> def parse(self, response): <NEW_LINE> <INDENT> resp = json.loads(response.body_as_unicode()) <NEW_LINE> for v in resp['value']: <NEW_LINE> <...
Committees from the schedule database.
62598edc4f6381625f198764
class IExternalEventSource(form.Schema): <NEW_LINE> <INDENT> title = TextLine( title=_(u'Name'), ) <NEW_LINE> enabled = Bool( title=_(u'Enabled'), required=True, default=True ) <NEW_LINE> limit = Int( title=_(u'Limit'), description=_(u'The number of events to import every 15 minutes.'), required=True, default=25 ) <NEW...
Marker for external event sources (content type)
62598edc63b5f9789fe836bd
class CacheBackedAuthenticationMiddleware(AuthenticationMiddleware): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> cache_model(User) <NEW_LINE> <DEDENT> def process_request(self, request): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> session_user_id = SafeSessionMiddleware.get_user_id_from_session(request...
See documentation above.
62598edc45492302aabfa9ff
class ErrorFeedback: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def invalid_data_format(): <NEW_LINE> <INDENT> response_object = { 'status': '400', 'error_message': 'Please use character strings', 'data': False } <NEW_LINE> return jsonify(response_object), 400 <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def invalid_...
Error handler to handle response errors.
62598edc99cbb53fe682f3fe
class IsUserOrRead(BasePermission): <NEW_LINE> <INDENT> def has_object_permission(self, request, view, user): <NEW_LINE> <INDENT> if request.method in SAFE_METHODS: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> return user == request.user
Custom permission to only allow owners of an object to edit it.
62598edc30dc7b766599ddd4
class ECOOpenIdBackend(BaseOAuth2): <NEW_LINE> <INDENT> name = 'ecoopenid-auth' <NEW_LINE> REDIRECT_STATE = False <NEW_LINE> ACCESS_TOKEN_METHOD = 'POST' <NEW_LINE> REVOKE_TOKEN_METHOD = 'GET' <NEW_LINE> DEFAULT_SCOPE = ['openid', 'profile', 'email'] <NEW_LINE> EXTRA_DATA = ['access_token', 'token_type', 'expires_in', ...
ECOOpendId authentication backend
62598edc8a43f66fc4bf06be
class Gravity(object): <NEW_LINE> <INDENT> @property <NEW_LINE> def gravity(self): <NEW_LINE> <INDENT> return self._get_gravity() <NEW_LINE> <DEDENT> def enable(self): <NEW_LINE> <INDENT> self._enable() <NEW_LINE> <DEDENT> def disable(self): <NEW_LINE> <INDENT> self._disable() <NEW_LINE> <DEDENT> def _enable(self): <NE...
Gravity facade. .. versionadded:: 1.2.5
62598edc07f4c71912bad9aa
class Config: <NEW_LINE> <INDENT> INPUT = "sample/input_image.jpg" <NEW_LINE> TEXT_FILE = "sample/input_text.txt" <NEW_LINE> OUTPUT_FILE = "sample/output.jpg" <NEW_LINE> OUTPUT_SCALE = 2 <NEW_LINE> FONT_NAME = "sample/Arial_Bold.ttf" <NEW_LINE> FONT_SIZE = 10
config constants
62598edc5f7d997b871f867b
class BsnBase(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def set_config(self, config:Config ): <NEW_LINE> <INDENT> self.config = config
:description : basic assembly class
62598edc57b8e32f525073ae
class ExtraLogFormatter(logging.Formatter): <NEW_LINE> <INDENT> def format(self, record): <NEW_LINE> <INDENT> custom_attributes = dict( [(k, v) for k, v in record.__dict__.items() if k.startswith("_")] ) <NEW_LINE> custom_attributes = self._dict_to_str(custom_attributes) <NEW_LINE> msg = logging.Formatter.format(self, ...
Custom log formatter which attaches all the attributes from the "extra" dictionary which start with an underscore to the end of the log message. For example: extra={'_id': 'user-1', '_path': '/foo/bar'}
62598edc82261d6c5272f15d
class PageAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> inlines = [QuestionInline] <NEW_LINE> list_display = ('title', 'slug', 'author', 'created', 'modified') <NEW_LINE> list_filter = ['title', 'created'] <NEW_LINE> search_fields = ['title', 'author']
Show helpful fields on the changelist page.
62598edc45492302aabfaa00
class MinimaxPlayer(IsolationPlayer): <NEW_LINE> <INDENT> def get_move(self, game, time_left): <NEW_LINE> <INDENT> self.time_left = time_left <NEW_LINE> best_move = (-1, -1) <NEW_LINE> try: <NEW_LINE> <INDENT> return self.minimax(game, self.search_depth) <NEW_LINE> <DEDENT> except SearchTimeout: <NEW_LINE> <INDENT> pas...
Game-playing agent that chooses a move using depth-limited minimax search. You must finish and test this player to make sure it properly uses minimax to return a good move before the search time limit expires.
62598edc4428ac0f6e656aa8
class CircleClient(RPCClient): <NEW_LINE> <INDENT> def __init__(self, host, fund, username, password): <NEW_LINE> <INDENT> self.HOST = host <NEW_LINE> self.FUND = fund <NEW_LINE> pwd_mgr = urllib2.HTTPPasswordMgr() <NEW_LINE> pwd_mgr.add_password(self.REALM, self.HOST, username, password) <NEW_LINE> handler = urllib2.H...
Allows accessing circle workflows from Python
62598edc0c0af96317c548ea
class ElinaTcons0Array(Structure): <NEW_LINE> <INDENT> _fields_ = [('p', ElinaTcons0Ptr), ('size', c_size_t)]
ElinaTcons0Array ctype compatible with elina_tcons0_array from elina_tcons_array.h. Fields ------ p : ElinaTcons0Ptr Expression. size : c_size_t Size of the array.
62598edc56b00c62f0fb0e1c
class WcEnvManagerError(Exception): <NEW_LINE> <INDENT> def __init__(self, message=None): <NEW_LINE> <INDENT> super().__init__(message)
Base class for exceptions in *wc_env_manager* Attributes: message (:obj:`str`): the exception's message
62598edca17c0f6771d5a7a8
class LookupModule(LookupBase): <NEW_LINE> <INDENT> def __init__(self, basedir=None, **kwargs): <NEW_LINE> <INDENT> self._basedir = basedir <NEW_LINE> <DEDENT> def run(self, hostname, inject=None, **kwargs): <NEW_LINE> <INDENT> host_detail = [] <NEW_LINE> for h in hostname: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> ...
Returns IP of host
62598edc442bda511e95a9b5
class Implicit(Statement): <NEW_LINE> <INDENT> match = re.compile(r'implicit\b', re.I).match <NEW_LINE> letters = lowercase <NEW_LINE> def process_item(self): <NEW_LINE> <INDENT> line = self.item.get_line()[8:].lstrip() <NEW_LINE> if line.lower() == 'none': <NEW_LINE> <INDENT> self.items = [] <NEW_LINE> return <NEW_LIN...
IMPLICIT <implicit-spec-list> IMPLICIT NONE <implicit-spec> = <declaration-type-spec> ( <letter-spec-list> ) <letter-spec> = <letter> [ - <letter> ]
62598edcf548e778e5969ae4
class _RawHook(_Hook): <NEW_LINE> <INDENT> def __init__(self, function): <NEW_LINE> <INDENT> _Hook.__init__(self, function, "irc_raw") <NEW_LINE> self.triggers = set() <NEW_LINE> <DEDENT> def add_hook(self, trigger_param, kwargs): <NEW_LINE> <INDENT> self._add_hook(kwargs) <NEW_LINE> if isinstance(trigger_param, str): ...
:type triggers: set[str]
62598edc3317a56b869bd80f
class CLIApplError(Exception): <NEW_LINE> <INDENT> def __init__(self, exitCode, message): <NEW_LINE> <INDENT> self.exitCode = exitCode <NEW_LINE> self.message = message
Exception raised for errors in the application
62598edc8e71fb1e983b9fbf
class Supplier(models.Model): <NEW_LINE> <INDENT> name = models.CharField( max_length=50, verbose_name='名称' ) <NEW_LINE> describe = models.TextField( verbose_name='描述', blank=True, null=True ) <NEW_LINE> phone1 = models.CharField( max_length=20, verbose_name='电话', blank=True, null=True ) <NEW_LINE> phone2 = models.Char...
供货商
62598edc8e7ae83300ee75dd
class PolarityInversion(BaseWaveformTransform): <NEW_LINE> <INDENT> supported_modes = {"per_batch", "per_example", "per_channel"} <NEW_LINE> supports_multichannel = True <NEW_LINE> requires_sample_rate = False <NEW_LINE> supports_target = True <NEW_LINE> requires_target = False <NEW_LINE> def __init__( self, mode: str ...
Flip the audio samples upside-down, reversing their polarity. In other words, multiply the waveform by -1, so negative values become positive, and vice versa. The result will sound the same compared to the original when played back in isolation. However, when mixed with other audio sources, the result may be different....
62598edc498bea3a75a56083
class IDiv(AugmentedAssignment): <NEW_LINE> <INDENT> _symbol = "/=" <NEW_LINE> _ast = ast.IDiv <NEW_LINE> _identity = IntValue(1)
A UFL `/=` operator.
62598edc090684286d592985
class Clearbit(object): <NEW_LINE> <INDENT> app = None <NEW_LINE> api_key = None <NEW_LINE> blueprint = None <NEW_LINE> def __init__(self, app=None, blueprint=None): <NEW_LINE> <INDENT> if app is not None: <NEW_LINE> <INDENT> self.init_app(app, blueprint) <NEW_LINE> <DEDENT> <DEDENT> def init_app(self, app, blueprint=N...
Flask-Clearbit Documentation: https://flask-clearbit.readthedocs.io API: https://clearbit.com/docs?python :param app: Flask app to initialize with. Defaults to `None` :param blueprint: Blueprint to attach the webhook handler to. Defaults to `None`
62598edc656771135c487bdd
class MDLVersionChecker(base.GitHubVersionChecker): <NEW_LINE> <INDENT> name = 'Material Design Lite' <NEW_LINE> slug = 'mdl' <NEW_LINE> homepage = 'https://getmdl.io/' <NEW_LINE> repository = 'https://github.com/google/material-design-lite'
Material Design Lite project checker
62598edc01c39578d7f112f5
class Node: <NEW_LINE> <INDENT> def __init__(self, val, nxt=None): <NEW_LINE> <INDENT> self.val = val <NEW_LINE> self.next = nxt <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return (isinstance(other, Node) and self.val == other.val and self.next == other.next) <NEW_LINE> <DEDENT> def __repr__(self):...
A node of a list Attributes: val (int): the payload nxt (Node): the next item in the list prev (Node): the previous item in the list
62598edc7b25080760ed59e8
class PowerOff(BasicIPL): <NEW_LINE> <INDENT> def runTest(self): <NEW_LINE> <INDENT> log.debug("IPL: starting PowerOff test") <NEW_LINE> self.cv_SYSTEM.goto_state(OpSystemState.PETITBOOT) <NEW_LINE> self.cv_SYSTEM.sys_power_off() <NEW_LINE> self.cv_SYSTEM.set_state(OpSystemState.POWERING_OFF) <NEW_LINE> self.cv_SYSTEM....
Get to Petitboot, then ask the BMC for a normal power off sequence, checking that the host did indeed power off.
62598edc1f5feb6acb16119f
class Dataset(db.Model): <NEW_LINE> <INDENT> dateAdded = db.DateTimeProperty(auto_now_add=True) <NEW_LINE> dateUpdated = db.DateTimeProperty(auto_now=True) <NEW_LINE> dateOfReference = db.DateTimeProperty(auto_now_add=True) <NEW_LINE> shortName = db.StringProperty(default='Unnamed Dataset') <NEW_LINE> description = db....
Models an individual School entry with appropriate property.
62598edc009cb60464cffaa2
class ProposalManager(models.Manager): <NEW_LINE> <INDENT> def get_queryset(self): <NEW_LINE> <INDENT> return super(ProposalManager, self).get_queryset().filter(num_prop__gt=0)
Orçamento é todo orçamento com num_prop > 0
62598edc0a50d4780f7038f5
class ServerVulnerabilityProperties(AdditionalData): <NEW_LINE> <INDENT> _validation = { 'assessed_resource_type': {'required': True}, 'type': {'readonly': True}, 'cvss': {'readonly': True}, 'patchable': {'readonly': True}, 'cve': {'readonly': True}, 'threat': {'readonly': True}, 'published_time': {'readonly': True}, '...
Additional context fields for server vulnerability assessment. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :param assessed_resource_type: Required. Sub-assessment resource type.Constant filled by server....
62598edc097d151d1a2bf56b
class TestRowWiseThreshold(unittest.TestCase): <NEW_LINE> <INDENT> def test_3by3_matrix(self): <NEW_LINE> <INDENT> X = np.array([ [0.5, 2.0, 3.0], [3.0, 4.0, 5.0], [4.0, 2.0, 1.0]]) <NEW_LINE> Y = refinement.RowWiseThreshold( p_percentile=0.5, thresholding_soft_multiplier=0.01).refine(X) <NEW_LINE> expected = np.array(...
Tests for the RowWiseThreshold class.
62598edcdd821e528d6d7495
class ScanConfig(_messages.Message): <NEW_LINE> <INDENT> class ExportToSecurityCommandCenterValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED = 0 <NEW_LINE> ENABLED = 1 <NEW_LINE> DISABLED = 2 <NEW_LINE> <DEDENT> class TargetPlatformsValueListEntryValuesEnum(_messages.En...
A ScanConfig resource contains the configurations to launch a scan. next id: 12 Enums: ExportToSecurityCommandCenterValueValuesEnum: Controls export of scan configurations and results to Cloud Security Command Center. TargetPlatformsValueListEntryValuesEnum: UserAgentValueValuesEnum: The user agent used duri...
62598edcd268445f26638e35
class kRegularSequenceSpace(RecognizableSeriesSpace): <NEW_LINE> <INDENT> Element = kRegularSequence <NEW_LINE> @classmethod <NEW_LINE> def __normalize__(cls, k, coefficient_ring, **kwds): <NEW_LINE> <INDENT> from sage.arith.srange import srange <NEW_LINE> nargs = super(kRegularSequenceSpace, cls).__normalize__( coeffi...
The space of `k`-regular Sequences over the given ``coefficients``. INPUT: - ``k`` -- an integer at least `2` specifying the base - ``coefficient_ring`` -- a (semi-)ring. - ``category`` -- (default: ``None``) the category of this space EXAMPLES:: sage: kRegularSequenceSpace(2, ZZ) Space of 2-regular seq...
62598edca17c0f6771d5a7a9
class Photon(object): <NEW_LINE> <INDENT> def __init__(self, position, velocity, wavelength, azimuth, zenith): <NEW_LINE> <INDENT> self.position = position <NEW_LINE> self.velocity = velocity <NEW_LINE> self.wavelength = wavelength <NEW_LINE> self.azimuth = azimuth <NEW_LINE> self.zenith = zenith <NEW_LINE> <DEDENT> de...
Represents a photon in the simulation. Only one photon is ever made, it is just reset when needed
62598edcf8510a7c17d7d423
class ExpresionId(ExpresionNumerica): <NEW_LINE> <INDENT> def __init__(self, id, linea=0 , columna=0) : <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.linea = linea <NEW_LINE> self.columna = columna
Esta clase representa la expresión que tiene un id
62598edcc432627299fa1503
class DDL(DDLElement): <NEW_LINE> <INDENT> __visit_name__ = "ddl" <NEW_LINE> def __init__(self, statement, on=None, context=None, bind=None): <NEW_LINE> <INDENT> if not isinstance(statement, basestring): <NEW_LINE> <INDENT> raise exc.ArgumentError( "Expected a string or unicode SQL statement, got '%r'" % statement) <NE...
A literal DDL statement. Specifies literal SQL DDL to be executed by the database. DDL objects can be attached to ``Tables`` or ``MetaData`` instances, conditionally executing SQL as part of the DDL lifecycle of those schema items. Basic templating support allows a single DDL instance to handle repetitive tasks for ...
62598edc596a8972361261b4
class AttachForZip(NamedTuple): <NEW_LINE> <INDENT> full_path: str <NEW_LINE> folder_path: str
Файл, подготовленный для добавления в zip-архив.
62598edc3539df3088eca800
class ZeroWidthSpaceCheck(TargetCheck): <NEW_LINE> <INDENT> check_id = "zero-width-space" <NEW_LINE> name = _("Zero-width space") <NEW_LINE> description = _("Translation contains extra zero-width space character") <NEW_LINE> def check_single(self, source, target, unit): <NEW_LINE> <INDENT> if self.is_language(unit, ("k...
Check for zero width space char (<U+200B>).
62598edc4f6381625f198765