code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class ChromeWindow(wx.Window): <NEW_LINE> <INDENT> def __init__(self, parent, url="", useTimer=True, timerMillis=DEFAULT_TIMER_MILLIS, browserSettings=None, size=(-1, -1), *args, **kwargs): <NEW_LINE> <INDENT> wx.Window.__init__(self, parent, id=wx.ID_ANY, size=size, *args, **kwargs) <NEW_LINE> self.timer = wx.Timer() ...
Standalone CEF component. The class provides facilites for interacting with wx message loop
6259907b4c3428357761bcc6
class CompaniesListTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> Company.objects.create(name='Sofware Solutions') <NEW_LINE> <DEDENT> def test_list_one_company_on_list(self): <NEW_LINE> <INDENT> companies = [] <NEW_LINE> companies = Company.objects.all() <NEW_LINE> self.assertTrue(0 < len(com...
Unittest for list companies
6259907bf548e778e596cf9e
class StoreLocation(models.Model): <NEW_LINE> <INDENT> store = models.ForeignKey(Store) <NEW_LINE> street = models.CharField(max_length=255) <NEW_LINE> city = models.CharField(max_length=64) <NEW_LINE> state = models.CharField(max_length=2) <NEW_LINE> zip_code = models.CharField(max_length=5, null=True, blank=True) <NE...
Each store can have multiple location. so we have this module to rapresent this locations.
6259907b5fdd1c0f98e5f98c
class For(Basic): <NEW_LINE> <INDENT> def __new__(cls, target, iter, body): <NEW_LINE> <INDENT> target = _sympify(target) <NEW_LINE> if not iterable(iter): <NEW_LINE> <INDENT> raise TypeError("iter must be an iterable") <NEW_LINE> <DEDENT> if isinstance(iter, list): <NEW_LINE> <INDENT> iter = tuple(iter) <NEW_LINE> <DE...
Represents a 'for-loop' in the code. Expressions are of the form: "for target in iter: body..." Parameters ---------- target : symbol iter : iterable body : sympy expr Examples -------- >>> from sympy import symbols, Range >>> from sympy.codegen.ast import aug_assign, For >>> x, n = symbols('x n') >>> F...
6259907b1f5feb6acb164604
class AvailableServiceSkuPaged(Paged): <NEW_LINE> <INDENT> _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, 'current_page': {'key': 'value', 'type': '[AvailableServiceSku]'} } <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(AvailableServiceSkuPaged, self).__init__(*args, **k...
A paging container for iterating over a list of :class:`AvailableServiceSku <azure.mgmt.datamigration.models.AvailableServiceSku>` object
6259907bec188e330fdfa2b5
@parser(Specs.ceph_osd_log) <NEW_LINE> class CephOsdLog(LogFileOutput): <NEW_LINE> <INDENT> time_format = '%Y-%m-%d %H:%M:%S.%f'
Provide access to Ceph OSD logs using the LogFileOutput parser class. .. note:: Please refer to the super-class :class:`insights.core.LogFileOutput`
6259907b60cbc95b06365a74
class _BaseCommandManager(dict): <NEW_LINE> <INDENT> _use_args = True <NEW_LINE> _callback_manager = None <NEW_LINE> def register_commands(self, names, callback, *args, **kwargs): <NEW_LINE> <INDENT> if isinstance(names, str): <NEW_LINE> <INDENT> names = [names] <NEW_LINE> <DEDENT> if not type(names) in (list, tuple): ...
Class used to (un)register commands
6259907be1aae11d1e7cf517
class CatchLogStub(object): <NEW_LINE> <INDENT> @pytest.yield_fixture <NEW_LINE> def caplog(self): <NEW_LINE> <INDENT> yield
Provides a no-op 'caplog' fixture fallback.
6259907b5fc7496912d48f71
class ICustomNavigation(IViewletManager): <NEW_LINE> <INDENT> pass
Custom Viewlet Manager for Navigation.
6259907b283ffb24f3cf52ae
class HiddenInputs(HiddenInput): <NEW_LINE> <INDENT> item_widget = HiddenInput() <NEW_LINE> def __call__(self, field, **kwargs): <NEW_LINE> <INDENT> items = field._value() or [] <NEW_LINE> return HTMLString('\n'.join(self.item_widget(field, value=item) for item in items))
Render hidden inputs for list elements.
6259907ba8370b77170f1ddc
class DefaultLicense(Dict[str, Any]): <NEW_LINE> <INDENT> domain_content: bool = False <NEW_LINE> domain_data: bool = False <NEW_LINE> domain_software: bool = False <NEW_LINE> family: str = '' <NEW_LINE> is_generic: bool = False <NEW_LINE> od_conformance: str = 'not reviewed' <NEW_LINE> osd_conformance: str = 'not revi...
The license was a dict but this did not allow translation of the title. This is a slightly changed dict that allows us to have the title as a property and so translated.
6259907b796e427e53850188
class OpEnsembleMargin(Operator): <NEW_LINE> <INDENT> Input = InputSlot() <NEW_LINE> Output = OutputSlot() <NEW_LINE> def setupOutputs(self): <NEW_LINE> <INDENT> self.Output.meta.assignFrom(self.Input.meta) <NEW_LINE> taggedShape = self.Input.meta.getTaggedShape() <NEW_LINE> taggedShape["c"] = 1 <NEW_LINE> self.Output....
Produces a pixelwise measure of the uncertainty of the pixelwise predictions. Uncertainty is negatively proportional to the difference between the highest two probabilities at every pixel.
6259907b7047854f46340dc8
class ImageFile(): <NEW_LINE> <INDENT> def __init__(self, num=None, size=None, dest=None): <NEW_LINE> <INDENT> self.num = num <NEW_LINE> self.size = size <NEW_LINE> self.dest = dest <NEW_LINE> <DEDENT> def createimage(self): <NEW_LINE> <INDENT> for i in range(self.num): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> cmd ...
Created Image Files Using dd
6259907b63b5f9789fe86b75
class OSFBasicAuthentication(BasicAuthentication): <NEW_LINE> <INDENT> def authenticate(self, request): <NEW_LINE> <INDENT> user_auth_tuple = super(OSFBasicAuthentication, self).authenticate(request) <NEW_LINE> if user_auth_tuple is not None: <NEW_LINE> <INDENT> self.authenticate_twofactor_credentials(user_auth_tuple[0...
Custom DRF authentication class for API call with email, password, and two-factor if necessary.
6259907b009cb60464d02f4d
class DecimalType(BaseType): <NEW_LINE> <INDENT> primitive_type = str <NEW_LINE> native_type = decimal.Decimal <NEW_LINE> MESSAGES = { 'number_coerce': _("Number '{0}' failed to convert to a decimal."), 'number_min': _("Value should be greater than or equal to {0}."), 'number_max': _("Value should be less than or equal...
A fixed-point decimal number field.
6259907b91f36d47f2231b96
class ownedFromProp(SchemaProperty): <NEW_LINE> <INDENT> _prop_schema = 'ownedFrom' <NEW_LINE> _expected_schema = None <NEW_LINE> _enum = False <NEW_LINE> _format_as = "DateTimeField"
SchemaField for ownedFrom Usage: Include in SchemaObject SchemaFields as your_django_field = ownedFromProp() schema.org description:The date and time of obtaining the product. prop_schema returns just the property without url# format_as is used by app templatetags based upon schema.org datatype
6259907be1aae11d1e7cf518
@dataclasses.dataclass <NEW_LINE> class SelfSupervisedOutput: <NEW_LINE> <INDENT> frames: Union[np.ndarray, torch.FloatTensor] <NEW_LINE> feats: Union[np.ndarray, torch.FloatTensor] <NEW_LINE> embs: Union[np.ndarray, torch.FloatTensor] <NEW_LINE> def squeeze(self, dim): <NEW_LINE> <INDENT> kwargs = {} <NEW_LINE> for k,...
The output of a self-supervised model.
6259907bbe7bc26dc9252b5d
class DummyScreen(display.Display): <NEW_LINE> <INDENT> def __init__(self, width=64, height=32): <NEW_LINE> <INDENT> pygame.init() <NEW_LINE> self.canvas = pygame.Surface((width, height)) <NEW_LINE> self._display = pygame.display.set_mode( (width * SCALING, height * SCALING)) <NEW_LINE> pygame.display.set_caption('info...
A dummy screen for testing purposes.
6259907b7d847024c075dded
class Player(object): <NEW_LINE> <INDENT> def __init__(self, player_name, player_color): <NEW_LINE> <INDENT> self.adversary = None <NEW_LINE> self.name = player_name <NEW_LINE> self.color = player_color <NEW_LINE> self.points = 0 <NEW_LINE> <DEDENT> def get_adversary(self): <NEW_LINE> <INDENT> return self.adversary <NE...
Takes 4 arguments : The name of the player The color he chooses The number of points he has The name of the adversary Takes two method : get_adversary() set_adversary()
6259907b7b180e01f3e49d6d
class BlogAnswer(models.Model): <NEW_LINE> <INDENT> block_diagram_blog_question = models.OneToOneField( BlockDiagramBlogQuestion, related_name='blog_answer', on_delete=models.CASCADE, primary_key=True, ) <NEW_LINE> answer = models.TextField() <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return str(self.answer)
Answer from the user.
6259907b3346ee7daa338369
class MailInboundException(Exception): <NEW_LINE> <INDENT> def __init__(self, exitcode, errormsg): <NEW_LINE> <INDENT> self.exitcode = exitcode <NEW_LINE> self.errormsg = errormsg <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return '%s:%s' % (self.exitcode, self.errormsg)
An exception indicating an error occured while processing an inbound mail.
6259907b3539df3088ecdca8
class ProductionConfig(Config): <NEW_LINE> <INDENT> DEBUG = False <NEW_LINE> level = logging.WARNING <NEW_LINE> SQLALCHEMY_DATABASE_URI = 'mysql://root:[email protected]:3306/ihome01'
创建线上环境下的配置类
6259907b23849d37ff852ac9
class CouponTierItemDiscount(object): <NEW_LINE> <INDENT> swagger_types = { 'discount_amount': 'float', 'items': 'list[str]' } <NEW_LINE> attribute_map = { 'discount_amount': 'discount_amount', 'items': 'items' } <NEW_LINE> def __init__(self, discount_amount=None, items=None): <NEW_LINE> <INDENT> self._discount_amount ...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
6259907b01c39578d7f1443d
class NimbusConfig(Config): <NEW_LINE> <INDENT> def setup_contextualization(self): <NEW_LINE> <INDENT> self.validate_contextualization() <NEW_LINE> self.metadata_service_url_file = self.ini.get("DEFAULT", "metadata_service_url_file") <NEW_LINE> with open(self.metadata_service_url_file, 'r') as fd: <NEW_LINE> <INDENT> u...
Class for Nimbus pilot config
6259907b3317a56b869bf24e
class GridSpecFromSubplotSpec(GridSpecBase): <NEW_LINE> <INDENT> def __init__(self, nrows, ncols, subplot_spec, wspace=None, hspace=None, height_ratios=None, width_ratios=None): <NEW_LINE> <INDENT> self._wspace = wspace <NEW_LINE> self._hspace = hspace <NEW_LINE> self._subplot_spec = subplot_spec <NEW_LINE> self.figure...
GridSpec whose subplot layout parameters are inherited from the location specified by a given SubplotSpec.
6259907b32920d7e50bc7a53
class UserRegistrationForm(UserCreationForm): <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 = ['em...
Forms for registering a user
6259907b283ffb24f3cf52b1
class InvItemVirtualFields: <NEW_LINE> <INDENT> extra_fields = ["quantity", "pack_value", ] <NEW_LINE> def total_value(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> v = self.inv_inv_item.quantity * self.inv_inv_item.pack_value <NEW_LINE> <DEDENT> except (AttributeError,TypeError): <NEW_LINE> <INDENT> return curre...
Virtual fields as dimension classes for reports
6259907bbf627c535bcb2ee1
class AsyncSmallMsgDef(AbstractSmallMsgDef): <NEW_LINE> <INDENT> CORRELATION_ID_FLAG = 0x01 <NEW_LINE> CORRELATION_ID_BYTES_FLAG = 0x02 <NEW_LINE> def readExternal(self, obj, context): <NEW_LINE> <INDENT> AbstractSmallMsgDef.readExternal(self, obj, context) <NEW_LINE> flags = self._readFlags(context) <NEW_LINE> for i, ...
Decodes messages that were encoded using ISmallMessage.
6259907b283ffb24f3cf52b2
class Track(): <NEW_LINE> <INDENT> def __init__(self, name:str="", note:List[Note]=[]): <NEW_LINE> <INDENT> if(note==[]): <NEW_LINE> <INDENT> note=[] <NEW_LINE> <DEDENT> self.name=name <NEW_LINE> self.note=note <NEW_LINE> <DEDENT> pass
音轨类 name:音轨名,str singer:歌手编号,str note:音符列表,List[Svipnote] volume:音量,float,[0,2] balance:左右声道平衡,float,[-1,1] mute:静音,bool solo:独奏,bool reverb:混响类型,int
6259907b796e427e5385018c
class FeatureExtractor(nn.Module): <NEW_LINE> <INDENT> def __init__(self, token2idx_dict, pretrained_mtx, hidden_size, num_layers=1, freeze_embedding=True): <NEW_LINE> <INDENT> super(FeatureExtractor, self).__init__() <NEW_LINE> self.hidden_size = hidden_size <NEW_LINE> self.num_layers = num_layers <NEW_LINE> self.num_...
Feature extracter for each node in the graph.
6259907b99fddb7c1ca63ae0
class VitalNullPointerException (VitalBaseException): <NEW_LINE> <INDENT> pass
When an error occurs due to use of a NULL pointer
6259907b63b5f9789fe86b79
class User(BaseModel): <NEW_LINE> <INDENT> email = "" <NEW_LINE> password = "" <NEW_LINE> first_name = "" <NEW_LINE> last_name = ""
User reprisentation str info
6259907b97e22403b383c913
class BaseBrowserPlugin(_AttributeManipulator): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> _AttributeManipulator.__init__(self) <NEW_LINE> self.overrides = self._load_list("is_override") <NEW_LINE> self.extensions = self._load_list("is_extension") <NEW_LINE> self.property_extensions = self._load_list("...
A :class:`lib.browser.Browser` plugin is defined as a set of patches to be applied to a Browser object. This class defines a base for browser plugins.
6259907b3317a56b869bf24f
class Record(object): <NEW_LINE> <INDENT> def __init__(self, tuple, ats, dts): <NEW_LINE> <INDENT> self.tuple = tuple <NEW_LINE> self.ats = ats <NEW_LINE> self.dts = dts
Represents a structure that is inserted into the hash table. It is composed by a tuple, ats (arrival timestamp) and dts (departure timestamp).
6259907bfff4ab517ebcf22b
class AccountMonitor(BasicMonitor): <NEW_LINE> <INDENT> def __init__(self, main_engine, event_engine, parent=None): <NEW_LINE> <INDENT> super(AccountMonitor, self).__init__(main_engine, event_engine, parent) <NEW_LINE> d = OrderedDict() <NEW_LINE> d['accountID'] = {'chinese': u'账户', 'cellType': BasicCell} <NEW_LINE> d[...
账户监控
6259907b71ff763f4b5e91bf
class Iomega(omegaExpr): <NEW_LINE> <INDENT> quantity = 'Current spectrum' <NEW_LINE> units = 'A/rad/s' <NEW_LINE> def __init__(self, val): <NEW_LINE> <INDENT> super(Iomega, self).__init__(val) <NEW_LINE> self._fourier_conjugate_class = It
omega-domain current (units A/rad/s)
6259907b1b99ca400229023f
class _TestPageviews(_TestHarness): <NEW_LINE> <INDENT> _gwriter_mode = None <NEW_LINE> data__test_pageview__html = None <NEW_LINE> data__test_pageview_alt__html = None <NEW_LINE> def test_render_page(self): <NEW_LINE> <INDENT> as_html = self.request.g_analytics_writer.render() <NEW_LINE> self.assertEqual(as_html, self...
core class for tests. subclass this with data and a configred _gwriter_mode
6259907b56ac1b37e63039ec
class InlineResponse2005(object): <NEW_LINE> <INDENT> openapi_types = { 'items': 'list[VoltageChange]' } <NEW_LINE> attribute_map = { 'items': '_items' } <NEW_LINE> def __init__(self, items=None, local_vars_configuration=None): <NEW_LINE> <INDENT> if local_vars_configuration is None: <NEW_LINE> <INDENT> local_vars_conf...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually.
6259907bbf627c535bcb2ee3
class HuaweiDeviceHandler(DefaultDeviceHandler): <NEW_LINE> <INDENT> _EXEMPT_ERRORS = [] <NEW_LINE> def __init__(self, device_params): <NEW_LINE> <INDENT> super(HuaweiDeviceHandler, self).__init__(device_params) <NEW_LINE> <DEDENT> def add_additional_operations(self): <NEW_LINE> <INDENT> dict = {} <NEW_LINE> dict["cli"...
Huawei handler for device specific information. In the device_params dictionary, which is passed to __init__, you can specify the parameter "ssh_subsystem_name". That allows you to configure the preferred SSH subsystem name that should be tried on your Huawei switch. If connecting with that name fails, or you didn't s...
6259907ba8370b77170f1de2
class Roles(models.Model): <NEW_LINE> <INDENT> role_name = models.CharField(max_length=20) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> db_table = 'Roles' <NEW_LINE> managed = False <NEW_LINE> <DEDENT> def __unicode__(self): <NEW_LINE> <INDENT> return '%s' % self.role_name
Django model for Roles table.
6259907b9c8ee82313040e91
class AdvertEventHandler: <NEW_LINE> <INDENT> def __init__(self, pkt): <NEW_LINE> <INDENT> self.pkt = pkt <NEW_LINE> self.adv_data = None <NEW_LINE> self.rssi = None <NEW_LINE> self.manufacturer_data = None <NEW_LINE> self.service_data = None <NEW_LINE> self.eddystone_url = None <NEW_LINE> self.eddystone_uid = None <NE...
Class to unpack BLE advert event
6259907b8a349b6b43687c70
class AbstractSubject(object): <NEW_LINE> <INDENT> def register(self, listener): <NEW_LINE> <INDENT> raise NotImplementedError("Must subclass me") <NEW_LINE> <DEDENT> def unregister(self, listener): <NEW_LINE> <INDENT> raise NotImplementedError("Must subclass me") <NEW_LINE> <DEDENT> def notify_listeners(self, event): ...
Abstract Subject
6259907bdc8b845886d54fcf
class Channel(six.with_metaclass(abc.ABCMeta)): <NEW_LINE> <INDENT> @abc.abstractmethod <NEW_LINE> def subscribe(self, callback, try_to_connect=False): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def unsubscribe(self, callback): <NEW_LINE> <INDENT> raise NotImpleme...
Affords RPC invocation via generic methods on client-side. Channel objects implement the Context Manager type, although they need not support being entered and exited multiple times.
6259907b3346ee7daa33836b
@dataclass(frozen=True) <NEW_LINE> class ASTpathelem: <NEW_LINE> <INDENT> node: ast.AST <NEW_LINE> attr: str <NEW_LINE> index: Optional[int] = None <NEW_LINE> @property <NEW_LINE> def field(self): <NEW_LINE> <INDENT> return getattr(self.node, self.attr) <NEW_LINE> <DEDENT> def field_is_body(self): <NEW_LINE> <INDENT> r...
An element of AST path.
6259907b7d43ff248742811f
class CustomComponents(): <NEW_LINE> <INDENT> def __init__(self, hass, conf_hide_sensor, conf_component_urls): <NEW_LINE> <INDENT> _LOGGER.debug('CustomComponents - __init__') <NEW_LINE> from pyupdate.ha_custom.custom_components import ( CustomComponents as Components) <NEW_LINE> self.hass = hass <NEW_LINE> self.ha_con...
Custom components controller.
6259907b56b00c62f0fb42e8
class TestConverters(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.simple_model = create_simple_model_with_json_representation()[0] <NEW_LINE> self.simple_model_as_json = create_simple_model_with_json_representation()[1] <NEW_LINE> <DEDENT> def test_json_encoder_to_serializer(self): ...
Tests for `json_encoder_to_serializer` and `json_decoder_to_deserializer`.
6259907b91f36d47f2231b99
class Noticias(models.Model): <NEW_LINE> <INDENT> fecha = models.DateField() <NEW_LINE> titulo = models.CharField(max_length=200) <NEW_LINE> autor = models.CharField(max_length=200) <NEW_LINE> pais = models.ForeignKey(Pais) <NEW_LINE> texto = models.TextField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> verbose_name_pl...
Modelo que contendra las noticias del sitio
6259907b2c8b7c6e89bd5200
@endpoint("openapi/port/v1/accounts/subscriptions/", "POST", 201) <NEW_LINE> class SubscriptionCreate(Portfolio): <NEW_LINE> <INDENT> HEADERS = {"Content-Type": "application/json"} <NEW_LINE> @dyndoc_insert(responses) <NEW_LINE> def __init__(self, data): <NEW_LINE> <INDENT> super(SubscriptionCreate, self).__init__() <N...
Set up a subscription and returns an initial snapshot containing a list of accounts as specified by the parameters in the request.
6259907b71ff763f4b5e91c1
class CreateSkyDome(QueenbeeTask): <NEW_LINE> <INDENT> _input_params = luigi.DictParameter() <NEW_LINE> @property <NEW_LINE> def sky_density(self): <NEW_LINE> <INDENT> return self._input_params['sky_density'] <NEW_LINE> <DEDENT> @property <NEW_LINE> def execution_folder(self): <NEW_LINE> <INDENT> return pathlib.Path(se...
Create a skydome for daylight coefficient studies.
6259907b1b99ca4002290240
@implementer(IMessage) <NEW_LINE> class Cancel(Message): <NEW_LINE> <INDENT> MESSAGE_TYPE = 49 <NEW_LINE> SKIP = 'skip' <NEW_LINE> ABORT = 'abort' <NEW_LINE> KILL = 'kill' <NEW_LINE> def __init__(self, request, mode = None): <NEW_LINE> <INDENT> Message.__init__(self) <NEW_LINE> self.request = request <NEW_LINE> self.mo...
A WAMP `CANCEL` message. Format: `[CANCEL, CALL.Request|id, Options|dict]`
6259907bbf627c535bcb2ee5
class Solver1D(AbstractSolver): <NEW_LINE> <INDENT> def __init__(self, model): <NEW_LINE> <INDENT> super(Solver1D, self).__init__(model) <NEW_LINE> <DEDENT> def solve(self, *args, **kwargs): <NEW_LINE> <INDENT> return nls.solve_nls(*args, **kwargs) <NEW_LINE> <DEDENT> def chemicalPotentialRoutine(self, *args, **kwargs)...
One dimensional solver that call native Fortran routine that solves NLS equation in axial symmentry in 2D.
6259907bbe7bc26dc9252b60
class TestContainerManager(TestCase): <NEW_LINE> <INDENT> IMAGE = "busybox" <NEW_LINE> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> docker_client = docker.from_env() <NEW_LINE> TestContainerManager._remove_image(docker_client) <NEW_LINE> <DEDENT> def setUp(self): <NEW_LINE> <INDENT> self.manager = C...
Verifies functionality of ContainerManager by calling Docker APIs
6259907b796e427e53850190
class RVegan(RPackage): <NEW_LINE> <INDENT> homepage = "https://github.com/vegandevs/vegan" <NEW_LINE> url = "https://cloud.r-project.org/src/contrib/vegan_2.4-3.tar.gz" <NEW_LINE> list_url = "https://cloud.r-project.org/src/contrib/Archive/vegan" <NEW_LINE> version('2.5-7', sha256='e63b586951ea7d8b0118811f329c700...
Community Ecology Package Ordination methods, diversity analysis and other functions for community and vegetation ecologists.
6259907baad79263cf4301cf
class IndependentPipelineManager(PipelineManager): <NEW_LINE> <INDENT> changes_merge = False <NEW_LINE> def _postConfig(self, layout): <NEW_LINE> <INDENT> super(IndependentPipelineManager, self)._postConfig(layout) <NEW_LINE> <DEDENT> def getChangeQueue(self, change, event, existing=None): <NEW_LINE> <INDENT> log = get...
PipelineManager that puts every Change into its own ChangeQueue.
6259907bd268445f2663a869
class Ship(Sprite): <NEW_LINE> <INDENT> def __init__(self, ai_game): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.screen = ai_game.screen <NEW_LINE> self.settings = ai_game.settings <NEW_LINE> self.screen_rect = ai_game.screen.get_rect() <NEW_LINE> """ Load the ship image and get its rect """ <NEW_LINE> self....
A class to manage the ship
6259907b97e22403b383c917
class SelectorCV(ModelSelector): <NEW_LINE> <INDENT> def calc_best_score_cv(self, score_cv): <NEW_LINE> <INDENT> return max(score_cv, key = lambda x: x[0]) <NEW_LINE> <DEDENT> def select(self): <NEW_LINE> <INDENT> warnings.filterwarnings("ignore", category=DeprecationWarning) <NEW_LINE> kf = KFold(n_splits = 3, shuffle...
select best model based on average log Likelihood of cross-validation folds
6259907b7d43ff2487428120
class S3Control(Control): <NEW_LINE> <INDENT> def __init__(self, descriptor=None, endpoint_url=None): <NEW_LINE> <INDENT> self.setinitial("endpointUrl", endpoint_url) <NEW_LINE> super().__init__(descriptor) <NEW_LINE> <DEDENT> @property <NEW_LINE> def endpoint_url(self): <NEW_LINE> <INDENT> return ( self.get("endpointU...
S3 control representation API | Usage -------- | -------- Public | `from frictionless.plugins.s3 import S3Control` Parameters: descriptor? (str|dict): descriptor endpoint_url? (string): endpoint url Raises: FrictionlessException: raise any error that occurs during the process
6259907b5fdd1c0f98e5f996
class item_ensemble_input: <NEW_LINE> <INDENT> def __init__(self, location_type='url', item_locations=[]): <NEW_LINE> <INDENT> self.items = [] <NEW_LINE> self.location_type = location_type <NEW_LINE> self.item_locations = item_locations <NEW_LINE> <DEDENT> def label_items(self, item_dict): <NEW_LINE> <INDENT> for i, it...
need location_type='url' or 'local' provide list of local paths or urls
6259907b91f36d47f2231b9a
class PycbcSplitInspinjExecutable(Executable): <NEW_LINE> <INDENT> current_retention_level = Executable.INTERMEDIATE_PRODUCT <NEW_LINE> def __init__(self, cp, exe_name, num_splits, universe=None, ifo=None, out_dir=None): <NEW_LINE> <INDENT> super(PycbcSplitInspinjExecutable, self).__init__(cp, exe_name, universe, ifo, ...
The class responsible for running the pycbc_split_inspinj executable
6259907b5166f23b2e244dee
class WSGIApplication(web.Application): <NEW_LINE> <INDENT> def __call__(self, environ, start_response): <NEW_LINE> <INDENT> return WSGIAdapter(self)(environ, start_response)
A WSGI equivalent of `tornado.web.Application`. .. deprecated: 3.3:: Use a regular `.Application` and wrap it in `WSGIAdapter` instead.
6259907bad47b63b2c5a9266
class DeVilliersGlasser01(Benchmark): <NEW_LINE> <INDENT> def __init__(self, dimensions=4): <NEW_LINE> <INDENT> Benchmark.__init__(self, dimensions) <NEW_LINE> self.bounds = list(zip([1.0] * self.dimensions, [100.0] * self.dimensions)) <NEW_LINE> self.global_optimum = [60.137, 1.371, 3.112, 1.761] <NEW_LINE> self.fglob...
DeVilliers-Glasser 1 test objective function. This class defines the DeVilliers-Glasser 1 function global optimization problem. This is a multimodal minimization problem defined as follows: .. math:: f_{\text{DeVilliersGlasser01}}(\mathbf{x}) = \sum_{i=1}^{24} \left[ x_1x_2^{t_i} \sin(x_3t_i + x_4) - y_i \right ...
6259907b283ffb24f3cf52b7
class PerSourceFlag(SandboxDerived): <NEW_LINE> <INDENT> __slots__ = ( 'file_name', 'flags', ) <NEW_LINE> def __init__(self, sandbox, file_name, flags): <NEW_LINE> <INDENT> SandboxDerived.__init__(self, sandbox) <NEW_LINE> self.file_name = file_name <NEW_LINE> self.flags = flags
Describes compiler flags specified for individual source files.
6259907b4a966d76dd5f08fd
class EntityCache(caching.ProcessScopedSingleton): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def get_cache_len(cls): <NEW_LINE> <INDENT> return len(cls.instance()._cache.items.keys()) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def get_cache_size(cls): <NEW_LINE> <INDENT> return cls.instance()._cache.total_size <NEW_...
This class holds in-process global cache of objects.
6259907bbf627c535bcb2ee7
class TestCredentials(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.new_credentials = Credentials("Twitter","Muriuki","1234yruty") <NEW_LINE> <DEDENT> def test_init(self): <NEW_LINE> <INDENT> self.assertEqual(self.new_credentials.account_name,"Twitter") <NEW_LINE> self.assertEqual(se...
Test class that defines test cases for the Credentials class behaviours. Args: unittest.TestCase: TestCase class that helps in creating test cases
6259907b796e427e53850192
class BadDataException(MetadbException): <NEW_LINE> <INDENT> pass
Should be used when incorrect data is being submitted.
6259907bf548e778e596cfa9
@base.ReleaseTracks(base.ReleaseTrack.ALPHA) <NEW_LINE> class AddBackendAlpha(AddBackendBeta): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Args(parser): <NEW_LINE> <INDENT> flags.GLOBAL_REGIONAL_BACKEND_SERVICE_ARG.AddArgument(parser) <NEW_LINE> backend_flags.AddDescription(parser) <NEW_LINE> flags.MULTISCOPE_INST...
Add a backend to a backend service. *{command}* is used to add a backend to a backend service. A backend is a group of tasks that can handle requests sent to a backend service. Currently, the group of tasks can be one or more Google Compute Engine virtual machine instances grouped together using an instance group. Tr...
6259907b3346ee7daa33836d
@attr(shard=2) <NEW_LINE> class DiscussionOpenClosedThreadTest(BaseDiscussionTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(DiscussionOpenClosedThreadTest, self).setUp() <NEW_LINE> self.thread_id = "test_thread_{}".format(uuid4().hex) <NEW_LINE> <DEDENT> def setup_user(self, roles=[]): <NEW_L...
Tests for checking the display of attributes on open and closed threads
6259907b56b00c62f0fb42ec
class MixedSourceEstimate(_BaseSourceEstimate): <NEW_LINE> <INDENT> @verbose <NEW_LINE> def __init__(self, data, vertices=None, tmin=None, tstep=None, subject=None, verbose=None): <NEW_LINE> <INDENT> if not isinstance(vertices, list) or len(vertices) < 2: <NEW_LINE> <INDENT> raise ValueError('Vertices must be a list of...
Container for mixed surface and volume source estimates. Parameters ---------- data : array of shape (n_dipoles, n_times) | 2-tuple (kernel, sens_data) The data in source space. The data can either be a single array or a tuple with two arrays: "kernel" shape (n_vertices, n_sensors) and "sens_data" shape (n...
6259907b3539df3088ecdcb0
class MultiGetFileTestFlow(flow.GRRFlow): <NEW_LINE> <INDENT> args_type = MultiGetFileTestFlowArgs <NEW_LINE> @flow.StateHandler(next_state=["HashFile"]) <NEW_LINE> def Start(self): <NEW_LINE> <INDENT> self.state.Register("client_hashes", {}) <NEW_LINE> urandom = rdf_paths.PathSpec(path="/dev/urandom", pathtype=rdf_pat...
This flow checks MultiGetFile correctly transfers files.
6259907baad79263cf4301d2
class Topology(object): <NEW_LINE> <INDENT> swagger_types = { 'nodes': 'list[str]', 'links': 'list[str]' } <NEW_LINE> attribute_map = { 'nodes': 'nodes', 'links': 'links' } <NEW_LINE> def __init__(self, nodes=None, links=None): <NEW_LINE> <INDENT> self._nodes = None <NEW_LINE> self._links = None <NEW_LINE> self.discrim...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
6259907b5166f23b2e244df0
class CTD_ANON_ (pyxb.binding.basis.complexTypeDefinition): <NEW_LINE> <INDENT> _TypeDefinition = None <NEW_LINE> _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_EMPTY <NEW_LINE> _Abstract = False <NEW_LINE> _ExpandedName = None <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location(u'i:\\xml_editor\\xml_...
Complex type [anonymous] with content type EMPTY
6259907b91f36d47f2231b9b
class Transition(_FSMObjBase): <NEW_LINE> <INDENT> def __init__(self, name=None, predicates=None, instruction=None, next_state=None): <NEW_LINE> <INDENT> super(Transition, self).__init__(name) <NEW_LINE> self.predicates = predicates if predicates is not None else [] <NEW_LINE> self.instruction = instruction if instruct...
Links among FSM states that defines state changes and results to return when changing states. A Transition has the following components: * transition predicates: The conditions that need to be satisfied to take this transition. * next_state: The next FSM state to visit after taking the transition. * instructions...
6259907b01c39578d7f14441
class FileSizeGrowsAboveThreshold(TestCompareRPMs): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super().setUp() <NEW_LINE> self.before_rpm.add_installed_file( "/some/file", rpmfluff.SourceFile("file", "a" * 5) ) <NEW_LINE> self.after_rpm.add_installed_file( "/some/file", rpmfluff.SourceFile("file", "a" * 1...
Assert when a file grows by more than the configured threshold, VERIFY result occurs.
6259907b4f88993c371f122e
class FromError(ElasticFeedException): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return "From must be integer"
Exception raised when ElasticFeeds checks whether the from is integer.
6259907b71ff763f4b5e91c5
class Node(object): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self._visited = 0 <NEW_LINE> self.discovery_time = None <NEW_LINE> self.finishing_time = None <NEW_LINE> <DEDENT> def neighbors(self, adjacency_list): <NEW_LINE> <INDENT> return adjacency_list[self] <NEW_LI...
Represents a node.
6259907b56ac1b37e63039ef
class Role: <NEW_LINE> <INDENT> Feature = 'Feature' <NEW_LINE> Label = 'Label' <NEW_LINE> Weight = 'ExampleWeight' <NEW_LINE> GroupId = 'RowGroup' <NEW_LINE> User = 'User' <NEW_LINE> Item = 'Item' <NEW_LINE> Name = 'Name' <NEW_LINE> RowId = 'RowId' <NEW_LINE> @staticmethod <NEW_LINE> def get_column_name(role, suffix="C...
See same class in *nimbusml*.
6259907b55399d3f05627f2d
class k_winners(torch.autograd.Function): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def forward(ctx, x, dutyCycles, k, boostStrength): <NEW_LINE> <INDENT> if boostStrength > 0.0: <NEW_LINE> <INDENT> targetDensity = float(k) / x.size(1) <NEW_LINE> boostFactors = torch.exp((targetDensity - dutyCycles) * boostStrength)...
A simple K-winner take all autograd function for creating layers with sparse output. .. note:: Code adapted from this excellent tutorial: https://github.com/jcjohnson/pytorch-examples
6259907bf9cc0f698b1c5fd9
class GhibliStudioAdapter(BaseMovieProviderAdapter): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def parse_movies(request_body): <NEW_LINE> <INDENT> movies = {} <NEW_LINE> for movie in request_body: <NEW_LINE> <INDENT> movies[movie['url']] = { "title": movie['title'], "release_date": movie['release_date'], "people": [...
This class is adapter for GhibliStudio
6259907b796e427e53850194
class SlimDriverWithSutMethod(object): <NEW_LINE> <INDENT> def init(self): <NEW_LINE> <INDENT> self._sut = _PersonInterface() <NEW_LINE> <DEDENT> def sut(self): <NEW_LINE> <INDENT> return self._sut
Fixture class to name in fitnesse table, with sut() method
6259907b7d847024c075ddf7
class res_partner_followup_category(orm.Model): <NEW_LINE> <INDENT> _name = 'res.partner.followup.category' <NEW_LINE> _description = 'Partner followup category' <NEW_LINE> _columns = { 'name': fields.char('Category', size=64, required=True), 'note': fields.text('Note'), }
Followup event
6259907b7c178a314d78e8f8
class AzureMonitorPrivateLinkScopeListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'value': {'required': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[AzureMonitorPrivateLinkScope]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self...
Describes the list of Azure Monitor PrivateLinkScope resources. All required parameters must be populated in order to send to Azure. :ivar value: Required. List of Azure Monitor PrivateLinkScope definitions. :vartype value: list[~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope] :ivar next_lin...
6259907b5166f23b2e244df2
class CaseInsensitive(FunctionElement): <NEW_LINE> <INDENT> __visit_name__ = 'notacolumn' <NEW_LINE> name = 'CaseInsensitive' <NEW_LINE> type = VARCHAR()
Function for case insensite indexes
6259907b656771135c48ad3d
class Dev_Note(db.Model): <NEW_LINE> <INDENT> __tablename__ = "dev_Notice" <NEW_LINE> id = db.Column("ID", db.Integer, primary_key=True) <NEW_LINE> articlename = db.Column("ArticleName", db.Text) <NEW_LINE> article = db.Column("Article", db.Text) <NEW_LINE> createdate = db.Column("CreateDate", db.String(255)) <NEW_LINE...
通知公告模型
6259907be1aae11d1e7cf51e
class TestOptionSet(TestCase): <NEW_LINE> <INDENT> family = 'wikipedia' <NEW_LINE> code = 'en' <NEW_LINE> def test_non_lazy_load(self): <NEW_LINE> <INDENT> options = api.OptionSet(self.get_site(), 'recentchanges', 'show') <NEW_LINE> with self.assertRaises(KeyError): <NEW_LINE> <INDENT> options.__setitem__('invalid_name...
OptionSet class test class.
6259907b091ae35668706659
class WindowsConfiguration(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'provision_vm_agent': {'key': 'provisionVMAgent', 'type': 'bool'}, 'enable_automatic_updates': {'key': 'enableAutomaticUpdates', 'type': 'bool'}, 'time_zone': {'key': 'timeZone', 'type': 'str'}, 'additional_unattend_content':...
Specifies Windows operating system settings on the virtual machine. :ivar provision_vm_agent: Indicates whether virtual machine agent should be provisioned on the virtual machine. :code:`<br>`:code:`<br>` When this property is not specified in the request body, default behavior is to set it to true. This will ensur...
6259907b283ffb24f3cf52bb
class TestDegreesView(TestCase): <NEW_LINE> <INDENT> def test_correct_template_used(self): <NEW_LINE> <INDENT> response = self.client.get('/withers/degree/') <NEW_LINE> self.assertTemplateUsed(response, 'citeIt/degrees.html') <NEW_LINE> <DEDENT> def test_degrees_list_loads(self): <NEW_LINE> <INDENT> factories.CitationF...
Test that the degrees view functions correctly.
6259907bbf627c535bcb2eeb
class Robot: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.xpos = 10 <NEW_LINE> self.ypos = 10 <NEW_LINE> self.fuel = 100 <NEW_LINE> self.active = True <NEW_LINE> <DEDENT> def move_left(self): <NEW_LINE> <INDENT> if self.check_fuel(5): <NEW_LINE> <INDENT> print("Insufficient fuel to perform action") ...
The robot class can be used to create a robot that can move up, down, left, and right. It can also fire lasers and report it's status. member variables: xpos, ypos, fuel, active member functions: move_left, move_right, move_up, move_down, fire, status, power_switch, command, check_fuel
6259907b442bda511e95da65
class Em(Range): <NEW_LINE> <INDENT> def y(o, x, reset=False): <NEW_LINE> <INDENT> return o.m(reset) * (x - 3) + 1
Effort Multiplier
6259907bbe7bc26dc9252b63
class Results(object): <NEW_LINE> <INDENT> def __init__(self, page=0, pages=0): <NEW_LINE> <INDENT> self.page = page <NEW_LINE> self.pages = pages <NEW_LINE> self.items = []
A simple object prototype for collections of results
6259907b99fddb7c1ca63ae5
class Gcloud_template(BASE, HeatBase): <NEW_LINE> <INDENT> __tablename__ = 'gcloud_template' <NEW_LINE> id = sqlalchemy.Column(sqlalchemy.String(36), primary_key=True, default=lambda: str(uuid.uuid4())) <NEW_LINE> name = sqlalchemy.Column('name', sqlalchemy.String(255), nullable=True, unique=True) <NEW_LINE> content = ...
Represents a gcloud_template created by gcloud_template_managger .
6259907b56b00c62f0fb42f0
class Site(models.Model): <NEW_LINE> <INDENT> job = models.ForeignKey('Job', related_name='sites') <NEW_LINE> site_id = models.CharField(max_length=128) <NEW_LINE> url = models.URLField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> unique_together = ('job', 'site_id') <NEW_LINE> <DEDENT> def __unicode__(self): <NEW_LINE...
The Site model contains a site URL and its job-specific ID.
6259907bf548e778e596cfae
class Authenticate(Message): <NEW_LINE> <INDENT> MESSAGE_TYPE = 5 <NEW_LINE> def __init__(self, signature, extra = None): <NEW_LINE> <INDENT> assert(type(signature) == six.text_type) <NEW_LINE> assert(extra is None or type(extra) == dict) <NEW_LINE> Message.__init__(self) <NEW_LINE> self.signature = signature <NEW_LINE...
A WAMP ``AUTHENTICATE`` message. Format: ``[AUTHENTICATE, Signature|string, Extra|dict]``
6259907bd486a94d0ba2d9d4
class callback(_external): <NEW_LINE> <INDENT> def __init__(self, mc, energy_function, composite=False): <NEW_LINE> <INDENT> hoomd.util.print_status_line(); <NEW_LINE> _external.__init__(self); <NEW_LINE> cls = None; <NEW_LINE> if not hoomd.context.exec_conf.isCUDAEnabled(): <NEW_LINE> <INDENT> if isinstance(mc, integr...
Use a python-defined energy function in MC integration Args: mc (:py:mod:`hoomd.hpmc.integrate`): MC integrator. callback (callable): A python function to evaluate the energy of a configuration composite (bool): True if this evaluator is part of a composite external field Example:: def energy(snap...
6259907b7c178a314d78e8f9
class LineageForCertnameTest(BaseCertManagerTest): <NEW_LINE> <INDENT> @mock.patch('certbot.util.make_or_verify_dir') <NEW_LINE> @mock.patch('certbot._internal.storage.renewal_file_for_certname') <NEW_LINE> @mock.patch('certbot._internal.storage.RenewableCert') <NEW_LINE> def test_found_match(self, mock_renewable_cert,...
Tests for certbot._internal.cert_manager.lineage_for_certname
6259907b2c8b7c6e89bd5205
class INZipCodeField(_BaseRegexField): <NEW_LINE> <INDENT> min_length = 6 <NEW_LINE> max_length = 7 <NEW_LINE> regex = r'^\d{3}\s?\d{3}$'
India ZIP Code Field (XXXXXX or XXX XXX).
6259907ba05bb46b3848be37
class ChatRoom(models.Model): <NEW_LINE> <INDENT> sender = models.ForeignKey( AUTH_USER_MODEL, on_delete=models.CASCADE, related_name='chatroom_sender', verbose_name='Sender' ) <NEW_LINE> recipient = models.ForeignKey( AUTH_USER_MODEL, on_delete=models.CASCADE, related_name='chatroom_recipient' ) <NEW_LINE> created_at ...
A private char room Attributes: created_at (datetime): datetime value when chatroom is created. recipient (user): user whom the chatroom sends first message. sender (user): user who created the chatroom
6259907b01c39578d7f14443
class RandomSeedOffset(JobProperty): <NEW_LINE> <INDENT> statusOn = True <NEW_LINE> allowedTypes = ['int'] <NEW_LINE> StoredValue = 0
Integer value that will be added to initialization value the seed for each random number stream. Default value (=0) will be always be used in straight athena jobs.
6259907b71ff763f4b5e91c9
class PortControl(Yang): <NEW_LINE> <INDENT> def __init__(self, tag="control", parent=None, controller=None, orchestrator=None): <NEW_LINE> <INDENT> super(PortControl, self).__init__(tag, parent) <NEW_LINE> self._sorted_children = ["controller", "orchestrator"] <NEW_LINE> self.controller = StringLeaf("controller", pare...
Used to connect this port to a UNIFY orchestrator's Cf-Or reference point. Support controller - orchestrator or orchestrator - controller connection establishment.
6259907bbf627c535bcb2eed
class InternationalMelonOrder(AbstractMelonOrder): <NEW_LINE> <INDENT> tax = 0.17 <NEW_LINE> def __init__(self, species, qty, country_code): <NEW_LINE> <INDENT> super(InternationalMelonOrder, self).__init__(species, qty, "international") <NEW_LINE> self.country_code = country_code <NEW_LINE> <DEDENT> def get_country_co...
An international (non-US) melon order.
6259907b4a966d76dd5f0903
class integer_modulo(datashader.reductions.category_codes): <NEW_LINE> <INDENT> def __init__(self, column, modulo): <NEW_LINE> <INDENT> super().__init__(column) <NEW_LINE> self.modulo = modulo <NEW_LINE> <DEDENT> def apply(self, df): <NEW_LINE> <INDENT> return _column_modulo(df, self.column, self.modulo)
A variation on category_codes that replaces categories by the values from an integer column, modulo a certain number
6259907bbe7bc26dc9252b64