code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class resultWidget(QListWidgetItem): <NEW_LINE> <INDENT> def __init__(self, text: str, engine_name: str, manga: Manga): <NEW_LINE> <INDENT> super().__init__(text) <NEW_LINE> self.engine_name = engine_name <NEW_LINE> self.manga = manga
class for the line where result of search are displayed
62598f748e05c05ec3f6ea9d
class CreateInstanceRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RegistryName = None <NEW_LINE> self.RegistryType = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RegistryName = params.get("RegistryName") <NEW_LINE> self.RegistryType = param...
CreateInstance请求参数结构体
62598f74287bf620b6271466
class UserProfileManager(BaseUserManager): <NEW_LINE> <INDENT> def create_user(self, email, name, password=None): <NEW_LINE> <INDENT> if not email: <NEW_LINE> <INDENT> raise ValueError('User must input email address') <NEW_LINE> <DEDENT> email = self.normalize_email(email) <NEW_LINE> user = self.model(email=email, name...
Manager for user profiles
62598f74287bf620b6271467
@six.add_metaclass(abc.ABCMeta) <NEW_LINE> class CheckBase(object): <NEW_LINE> <INDENT> @abc.abstractproperty <NEW_LINE> def product_items(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def create_order(self, resource, unit='hour', period=None, renew=None): <NEW_LINE> <INDENT> order_id = uuidutils.generate_uuid() ...
Base check class.
62598f7491af0d3eaad396bb
class DangerousMoveException(Exception): <NEW_LINE> <INDENT> def __init__(self, current_position, safe_zone, unsafe_position): <NEW_LINE> <INDENT> self.current_position = current_position <NEW_LINE> self.safe_zone = safe_zone <NEW_LINE> self.unsafe_position = unsafe_position
Rover was instructed to move out of the safe zone
62598f74711fe17d825dff94
class PrivateUserApiTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.user = create_user( email='test@londonappdev.com', password='testpass', name='Name' ) <NEW_LINE> self.client = APIClient() <NEW_LINE> self.client.force_authenticate(user=self.user) <NEW_LINE> <DEDENT> def test_retrieve_pr...
Test API requests that require authenticate
62598f74ac7a0e7691f71dc7
class TradesApi(object): <NEW_LINE> <INDENT> def __init__(self, api_client=None): <NEW_LINE> <INDENT> if api_client is None: <NEW_LINE> <INDENT> api_client = ApiClient() <NEW_LINE> <DEDENT> self.api_client = api_client <NEW_LINE> <DEDENT> def iserver_account_trades_get(self, **kwargs): <NEW_LINE> <INDENT> kwargs['_retu...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen
62598f746aa9bd52df0d4785
class ConsistencyCheck: <NEW_LINE> <INDENT> def __init__(self, count=3, total=5, default=False, strict=False): <NEW_LINE> <INDENT> self.results = [1 if default else -1]*int(total) <NEW_LINE> self.total = int(total) <NEW_LINE> self.count = int(count) <NEW_LINE> self.state = default <NEW_LINE> self.default = default <NEW...
Call 'check' on a value to tell if it is consistently True. This does dual-threshold hysteresis, so it requires 'count' of the last 'total' calls to be true to switch to returning true, and then it would wait for 'count' of the last 'total' values to be false before switching back to returning false. If 'strict' is us...
62598f740383005118f6cfb2
class ICDARDataLayer(caffe.Layer): <NEW_LINE> <INDENT> def setup(self, bottom, top): <NEW_LINE> <INDENT> params = eval(self.param_str) <NEW_LINE> self.icdar_dir = params['icdar_dir'] <NEW_LINE> self.split = params['split'] <NEW_LINE> self.mean = np.array(params['mean']) <NEW_LINE> self.random = params.get('randomize', ...
Load (input image, label image) pairs from the SBDD extended labeling of PASCAL VOC for semantic segmentation one-at-a-time while reshaping the net to preserve dimensions. Use this to feed data to a fully convolutional network.
62598f743eb6a72ae0389ef3
class Attrib(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.varname = None <NEW_LINE> self.long_name = None <NEW_LINE> self.short_name = None <NEW_LINE> self.metavar = None <NEW_LINE> self.dtype = None <NEW_LINE> self.defval = None <NEW_LINE> self.helptxt = None <NEW_LINE> self.required = Fal...
Container object for command line attributes.
62598f74d6c5a102081e19f6
class Text(models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=200) <NEW_LINE> slug = models.SlugField(max_length=100) <NEW_LINE> tease = models.TextField(blank=True) <NEW_LINE> text = models.TextField() <NEW_LINE> author_name = models.CharField(max_length=200, blank=True, default="Anonymous") <NEW_L...
Post model.
62598f74be383301e02530a7
@unique <NEW_LINE> class FormattingCodes(Enum): <NEW_LINE> <INDENT> bold = '\x02' <NEW_LINE> colour = '\x03' <NEW_LINE> normal = '\x0f' <NEW_LINE> reverse = '\x16' <NEW_LINE> italic = '\x1d' <NEW_LINE> underline = '\x1f'
IRC formatting codes A list is maintained by WikiChip_ .. _WikiChip: http://en.wikichip.org/wiki/irc/colors
62598f740383005118f6cfb3
class SQLBlogItemViews(PSQL): <NEW_LINE> <INDENT> pass
BlogItemViews related SQL attributes
62598f7496565a6dacd2cbd4
class Iterator(object): <NEW_LINE> <INDENT> def __init__(self, dataset, batch_size, batchifier, pool, shuffle=False, use_padding=False, no_semaphore=20): <NEW_LINE> <INDENT> games = dataset.get_data() <NEW_LINE> games = batchifier.filter(games) <NEW_LINE> games = batchifier.split(games) <NEW_LINE> if shuffle: <NEW_LINE...
Provides an generic multithreaded iterator over the dataset.
62598f7491af0d3eaad396bd
class SpecificationPillarAffiliation(PillarAffiliation): <NEW_LINE> <INDENT> def getPillars(self): <NEW_LINE> <INDENT> return [self.context.target]
An affiliation adapter for blueprints.
62598f74b57a9660fecd1331
class RNNConfig(Config): <NEW_LINE> <INDENT> def __init__(self, cell_type: str, num_hidden: int, num_layers: int, dropout_inputs: float, dropout_states: float, dropout_recurrent: float = 0, residual: bool = False, first_residual_layer: int = 2, forget_bias: float = 0.0, dtype: str = C.DTYPE_FP32) -> None: <NEW_LINE> <I...
RNN configuration. :param cell_type: RNN cell type. :param num_hidden: Number of RNN hidden units. :param num_layers: Number of RNN layers. :param dropout_inputs: Dropout probability on RNN inputs (Gal, 2015). :param dropout_states: Dropout probability on RNN states (Gal, 2015). :param dropout_recurrent: Dropout proba...
62598f74ac7a0e7691f71dc9
class Ask_time(QDialog): <NEW_LINE> <INDENT> def __init__(self, time_format): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> hbox = QVBoxLayout(self) <NEW_LINE> self.label = QLabel() <NEW_LINE> self.label.setText("Go to time") <NEW_LINE> hbox.addWidget(self.label) <NEW_LINE> self.time_widget = duration_widget.Durati...
"Ask time" dialog box using duration widget in duration_widget module
62598f7438b623060ffa894d
class GuildInfoOpsMsgRet: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRING, 'guildImage', None, "", ), (2, TType.STRING, 'guildNotice', None, "", ), ) <NEW_LINE> def __init__(self, guildImage=thrift_spec[1][4], guildNotice=thrift_spec[2][4],): <NEW_LINE> <INDENT> self.guildImage = guildImage <NEW_LINE> self.g...
Attributes: - guildImage - guildNotice
62598f7466673b3332c2fc72
class StoreDict(argparse.Action): <NEW_LINE> <INDENT> def __init__(self, option_strings, dest, nargs=None, **kwargs): <NEW_LINE> <INDENT> self._nargs = nargs <NEW_LINE> super(StoreDict, self).__init__(option_strings, dest, nargs=nargs, **kwargs) <NEW_LINE> <DEDENT> def __call__(self, parser, namespace, values, option_s...
Custom argparse action for storing dict. In: args1:0.0 args2:"dict(a=1)" Out: {'args1': 0.0, arg2: dict(a=1)}
62598f74cad5886f8bdc4bd3
class AuthorInput(graphene.InputObjectType): <NEW_LINE> <INDENT> id = graphene.ID() <NEW_LINE> name = graphene.String()
The input for the author class aka when an author needs to be added to the db
62598f748c3a8732951f5e00
class DomainAccessRegionDict(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.NationCountryInnerList = None <NEW_LINE> self.ProxyList = None <NEW_LINE> self.RegionId = None <NEW_LINE> self.GeographicalZoneInnerCode = None <NEW_LINE> self.ContinentInnerCode = None <NEW_LINE> self.RegionNa...
Nearest access configuration details of domain name resolution
62598f74d99f1b3c44d04f69
class MS1Scans(MSnScans): <NEW_LINE> <INDENT> def __init__(self, level=1): <NEW_LINE> <INDENT> super().__init__(level) <NEW_LINE> <DEDENT> def __getitem__(self, item): <NEW_LINE> <INDENT> if isinstance(item, float): <NEW_LINE> <INDENT> index = np.searchsorted(self._times, item) <NEW_LINE> return Spectrum(self._mza[inde...
"MS1 part of experiment
62598f74796e427e5384e047
@override_settings(USER_ID=SETTING_DELETED) <NEW_LINE> class TestSettingDeletedDecoratedClass(unittest.TestCase): <NEW_LINE> <INDENT> @override_settings(USER_ID=1) <NEW_LINE> def test_set_user_id(self): <NEW_LINE> <INDENT> self.assertEqual(settings.USER_ID, 1) <NEW_LINE> <DEDENT> def test_set_user_id_in_context_manager...
settings.USER_ID is gone for all tests. Test various ways to temporarily add it back.
62598f7466656f66f7d59ca3
class InvalidUrlError(Error): <NEW_LINE> <INDENT> pass
Raised when a URL is invalid
62598f743eb6a72ae0389ef4
class Fake(operator.CustomOp): <NEW_LINE> <INDENT> def forward(self, is_train, req, in_data, out_data, aux): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def backward(self, req, out_grad, in_data, out_data, in_grad, aux): <NEW_LINE> <INDENT> pass
Fake symbol
62598f7426238365f5fac427
class GCRuntimeMetricCollector(RuntimeMetricCollector): <NEW_LINE> <INDENT> required_modules = ['gc'] <NEW_LINE> def collect_fn(self, keys): <NEW_LINE> <INDENT> gc = self.modules.get('gc') <NEW_LINE> counts = gc.get_count() <NEW_LINE> metrics = [ (GC_COUNT_GEN0, counts[0]), (GC_COUNT_GEN1, counts[1]), (GC_COUNT_GEN2, c...
Collector for garbage collection generational counts More information at https://docs.python.org/3/library/gc.html
62598f7476d4e153a661c4c6
class DictBasedComplexCastingTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.Schema = DictSimpleTestSchemaWithComplexCast1 <NEW_LINE> self.schema = self.Schema() <NEW_LINE> <DEDENT> def test_set(self): <NEW_LINE> <INDENT> self.schema.name = 189 <NEW_LINE> result = self.schema.connected_obj...
Complex casting test for dict-based connection.
62598f746e29344779afff13
class HttpsCheck(models.Model): <NEW_LINE> <INDENT> date = models.DateTimeField(default=datetime.now) <NEW_LINE> status = models.NullBooleanField(default=False) <NEW_LINE> test_point = models.ForeignKey(SpeedtestTestPoint) <NEW_LINE> class Meta(object): <NEW_LINE> <INDENT> verbose_name = 'Chequeo HTTPS' <NEW_LINE> verb...
HTTPS checks for Speedtest points
62598f74d10714528d69d781
class RegistryFinderConditionFormRenderer(forms.UnionMultiFormRenderer): <NEW_LINE> <INDENT> type = rdfvalue.RegistryFinderCondition <NEW_LINE> union_by_field = "condition_type"
Renders a single option in a list of conditions.
62598f7496565a6dacd2cbd5
class ShortSet(ChoicesSet): <NEW_LINE> <INDENT> def __init__(self,question,answers): <NEW_LINE> <INDENT> ChoicesSet.__init__(self,question,answers) <NEW_LINE> <DEDENT> def toPl(self): <NEW_LINE> <INDENT> dico = init_dictionnary_from_question(self.question) <NEW_LINE> dico['template'] = '/gift/template/short_template.pl...
A single answer is expected but several solutions are possible
62598f7466673b3332c2fc74
class Movie(): <NEW_LINE> <INDENT> VALID_RATINGS = ["G", "PG", "PG-13", "R"] <NEW_LINE> def __init__(self, movie_title, poster_image, trailer_youtube): <NEW_LINE> <INDENT> self.title = movie_title <NEW_LINE> self.poster_image_url = poster_image <NEW_LINE> self.trailer_youtube_url = trailer_youtube <NEW_LINE> <DEDENT> d...
this class provides a way to store movie related information
62598f748e05c05ec3f6ea9f
class Sound(BaseAnalogSensor): <NEW_LINE> <INDENT> def __init__(self, brick, port, adjusted=True): <NEW_LINE> <INDENT> super(Sound, self).__init__(brick, port) <NEW_LINE> self.set_adjusted(adjusted) <NEW_LINE> <DEDENT> def set_adjusted(self, active): <NEW_LINE> <INDENT> if active: <NEW_LINE> <INDENT> type_ = Type.SOUND...
Object for sound sensors
62598f74711fe17d825dff98
class TestLinkDensityScoring(unittest.TestCase): <NEW_LINE> <INDENT> def test_link_density(self): <NEW_LINE> <INDENT> doc = document_fromstring(load_article('ars/ars.001.html')) <NEW_LINE> for node in doc.getiterator(): <NEW_LINE> <INDENT> if node.tag in ['p', 'td', 'pre']: <NEW_LINE> <INDENT> density = get_link_densit...
Link density will adjust out candidate scoresself.
62598f74b57a9660fecd1333
class BookOpen(Wizard): <NEW_LINE> <INDENT> _name = 'ekd.book.cash.open' <NEW_LINE> states = { 'init': { 'result': { 'type': 'action', 'action': '_action_open', 'state': 'end', }, }, } <NEW_LINE> def _action_open(self, data): <NEW_LINE> <INDENT> if not data['ids']: <NEW_LINE> <INDENT> return {} <NEW_LINE> <DEDENT> mode...
Book Open
62598f748c3a8732951f5e02
class StatusInfo(object): <NEW_LINE> <INDENT> def __init__(self, check_name): <NEW_LINE> <INDENT> self.check_name = check_name <NEW_LINE> self.check_cnt = 0 <NEW_LINE> self.check_fail_cnt = 0 <NEW_LINE> self.expect_fail_cnt = 0 <NEW_LINE> self.fail_info = [] <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> st...
status info
62598f7423e79379d538bdac
class ListVpnSitesResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[VpnSite]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, value: Optional[List["VpnSite"]] = None, next_link: Optional[str] = None, **kwargs ): <NEW_LIN...
Result of the request to list VpnSites. It contains a list of VpnSites and a URL nextLink to get the next set of results. :param value: List of VpnSites. :type value: list[~virtual_wan_as_aservice_management_client.models.VpnSite] :param next_link: URL to get the next set of operation list results if there are any. :t...
62598f744e696a045264da58
class Button(enum.Enum): <NEW_LINE> <INDENT> left = 1 <NEW_LINE> middle = 2 <NEW_LINE> right = 3 <NEW_LINE> scroll_up = 4 <NEW_LINE> scroll_down = 5 <NEW_LINE> scroll_left = 6 <NEW_LINE> scroll_right = 7
The various buttons.
62598f7426238365f5fac428
class ConfigFileAction(FileExistsAction): <NEW_LINE> <INDENT> def __call__(self, parser, namespace, values, option_string=None): <NEW_LINE> <INDENT> f = super(ConfigFileAction, self).__call__(parser, namespace, values, option_string=None) <NEW_LINE> config = ConfigParser() <NEW_LINE> config.readfp(f) <NEW_LINE> setattr...
Argparse action to validate an argument as a valid INI configuration file, transforming the string path into a ConfigParse object. __call__ function inherit from FileExists, recovering the opened file descriptor.
62598f7430c21e258be980b9
class ProtFrealign(ProtFrealignBase, em.ProtRefine3D): <NEW_LINE> <INDENT> _label = 'frealign' <NEW_LINE> def __init__(self, **args): <NEW_LINE> <INDENT> ProtFrealignBase.__init__(self, **args) <NEW_LINE> <DEDENT> def createOutputStep(self): <NEW_LINE> <INDENT> lastIter = self._getLastIter() <NEW_LINE> inputSet = self....
Protocol to refine a 3D map using Frealign. The algorithms implemented are optimized to perform efficiently the correction for the contrast transfer function of the microscope and refinement of three-dimensional reconstructions.
62598f74a4f1c619b294de9f
class ScrTask(ManyBodyTask): <NEW_LINE> <INDENT> color_rgb = np.array((255, 128, 0)) / 255 <NEW_LINE> @property <NEW_LINE> def scr_path(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return self._scr_path <NEW_LINE> <DEDENT> except AttributeError: <NEW_LINE> <INDENT> path = self.outdir.has_abiext("SCR.nc") <NEW_LI...
Tasks for SCREENING calculations
62598f74d6c5a102081e19fa
class Device(models.Model): <NEW_LINE> <INDENT> user = models.ForeignKey(getattr(settings, 'AUTH_USER_MODEL', 'auth.User'), help_text="The user that this device belongs to.") <NEW_LINE> name = models.CharField(max_length=64, help_text="The human-readable name of this device.") <NEW_LINE> confirmed = models.BooleanField...
Abstract base model for a :term:`device` attached to a user. Plugins must subclass this to define their OTP models. .. _unsaved_device_warning: .. warning:: OTP devices are inherently stateful. For example, verifying a token is logically a mutating operation on the device, which may involve incrementing ...
62598f7407d97122c4216555
class EnvPath(cabc.MutableSequence): <NEW_LINE> <INDENT> def __init__(self, args=None): <NEW_LINE> <INDENT> if not args: <NEW_LINE> <INDENT> self._l = [] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> if isinstance(args, str): <NEW_LINE> <INDENT> self._l = args.split(os.pathsep) <NEW_LINE> <DEDENT> elif isinstance(args,...
A class that implements an environment path, which is a list of strings. Provides a custom method that expands all paths if the relevant env variable has been set.
62598f7463f4b57ef00859c9
class R2pmBuilder(CommandRunner): <NEW_LINE> <INDENT> def __init__ (self, logger, name, version_, build): <NEW_LINE> <INDENT> self._log=logger <NEW_LINE> self.name = name <NEW_LINE> self.version_ = version_ <NEW_LINE> self.build_ = build <NEW_LINE> <DEDENT> def createR2pm (self, tempDir, subPkgs, key=None, description=...
A class that builds r2pm files, which are Qwilt package files
62598f74d10714528d69d783
class Solution: <NEW_LINE> <INDENT> def findTheDifference(self, s, t): <NEW_LINE> <INDENT> lists=list(s) <NEW_LINE> listt=list(t) <NEW_LINE> for i in lists: <NEW_LINE> <INDENT> listt.remove(i) <NEW_LINE> <DEDENT> return listt[0]
@param s: a string @param t: a string @return: the letter that was added in t
62598f744d74a7450cd58b34
class JSONDataPathError(JSONDataError, KeyError): <NEW_LINE> <INDENT> def __init__(self, *arg): <NEW_LINE> <INDENT> JSONDataError.__init__(self, *arg) <NEW_LINE> JSONDataError.fetch(self, *arg) <NEW_LINE> KeyError.__init__(self, self.s) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "JSONDataPathErro...
Error on key.
62598f740383005118f6cfb7
class Decimal(Localizable): <NEW_LINE> <INDENT> def __new__(cls, value, precision=None): <NEW_LINE> <INDENT> if precision is None: <NEW_LINE> <INDENT> format = '%f' <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> format = '%%.%df' % precision <NEW_LINE> <DEDENT> return unicode.__new__(cls, format % value) <NEW_LINE> <DED...
Localizable decimal number.
62598f7473bcbd0ca4bc9b03
class Person(Model): <NEW_LINE> <INDENT> class MyJSONField(TextField): <NEW_LINE> <INDENT> def db_value(self, value): <NEW_LINE> <INDENT> return json.dumps(value) <NEW_LINE> <DEDENT> def python_value(self, value): <NEW_LINE> <INDENT> if value is not None: <NEW_LINE> <INDENT> return json.loads(value) <NEW_LINE> <DEDENT>...
Class serving as a model for person table in database
62598f7430c21e258be980ba
@global_scope <NEW_LINE> class ImageLocation(BASE, GlanceBase): <NEW_LINE> <INDENT> __tablename__ = 'image_locations' <NEW_LINE> __table_args__ = (Index('ix_image_locations_image_id', 'image_id'), Index('ix_image_locations_deleted', 'deleted'),) <NEW_LINE> id = Column(Integer, primary_key=True, nullable=False) <NEW_LIN...
Represents an image location in the datastore.
62598f750383005118f6cfb8
class BaseProxy2 (BaseProxy): <NEW_LINE> <INDENT> def __init__(self, token, serializer, manager=None, authkey=None, exposed=None, incref=True): <NEW_LINE> <INDENT> super(BaseProxy2, self).__init__(token, serializer, manager, authkey, exposed, incref) <NEW_LINE> self._manager_copy = manager <NEW_LINE> multiprocessing.ut...
Intermediate class under BaseProxy in order to fix the resetting of the _manager on fork (doesn't need to be? security issues?).
62598f756e29344779afff17
class CheckeredBackground(object): <NEW_LINE> <INDENT> def __init__(self, width=600, height=480, side=40): <NEW_LINE> <INDENT> self.image = wx.EmptyBitmap(width, height) <NEW_LINE> offDC = wx.MemoryDC() <NEW_LINE> offDC.SelectObject(self.image) <NEW_LINE> offDC.SetBackground(wx.Brush("WHEAT")) <NEW_LINE> offDC.Clear() ...
Checkered-like image pattern defined so that we can better visualise the moving canvas.
62598f75be8e80087fbbe915
class MillDataUpdateCoordinator(DataUpdateCoordinator): <NEW_LINE> <INDENT> def __init__( self, hass: HomeAssistant, update_interval: timedelta | None = None, *, mill_data_connection: Mill | MillLocal, ) -> None: <NEW_LINE> <INDENT> self.mill_data_connection = mill_data_connection <NEW_LINE> super().__init__( hass, _LO...
Class to manage fetching Mill data.
62598f75a4f1c619b294dea1
class Object: <NEW_LINE> <INDENT> attributes = [i.strip() for i in open(OBJECT_ATTS, "r").readlines()] <NEW_LINE> code = "def __init__(self" <NEW_LINE> for att in attributes: <NEW_LINE> <INDENT> code = code + ", " + att + " = None" <NEW_LINE> <DEDENT> code = code + "):\n" <NEW_LINE> for att in attributes: <NEW_LINE> <I...
Define Object class from a file containing list of attributes Object class represents a case which can be classified by SCRDR
62598f754d74a7450cd58b35
class Node(object): <NEW_LINE> <INDENT> def __init__(self,initdata): <NEW_LINE> <INDENT> self.__data = initdata <NEW_LINE> self.__next = None <NEW_LINE> <DEDENT> def get_data(self): <NEW_LINE> <INDENT> return self.__data <NEW_LINE> <DEDENT> def get_next(self): <NEW_LINE> <INDENT> return self.__next <NEW_LINE> <DEDENT> ...
Definiton of the node of the single linked list.
62598f758da39b475be02a99
class SyncParallelizer(Parallelizer): <NEW_LINE> <INDENT> def __call__(self, *args, **kwargs): <NEW_LINE> <INDENT> r = super(SyncParallelizer, self).__call__(*args, **kwargs) <NEW_LINE> r.pFinish(None) <NEW_LINE> return r
A Parallelizer that blocks on function calls.
62598f75ec188e330fdf8159
class suffixPerturbator(dataPerturbator): <NEW_LINE> <INDENT> def __init__(self, listOfSuffixes, prob=0.5): <NEW_LINE> <INDENT> super(suffixPertubator, self).__init__(prob) <NEW_LINE> self._listOfSuffixes = listOfSuffixes <NEW_LINE> self._Nsuffixes = len(self._listOfSuffixes) <NEW_LINE> <DEDENT> def __call__(self,aStri...
Defines a suffix to a string with a given probability Please see documentation of prefixPerturbator which is complementary. Examples: P = optionGenerator(["Burroughs", "Kerouac", "Cohen", "Ginsberg"]) Q = suffixPerturbator(["ing", "ong", ". Jr"])
62598f750a366e3fb87dc280
@python_2_unicode_compatible <NEW_LINE> class instrument_annotation(models.Model): <NEW_LINE> <INDENT> instrument = models.OneToOneField('instrument', primary_key=True) <NEW_LINE> annotation = models.OneToOneField('annotation') <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return 'Instrument Annotation' <NEW_LINE> ...
Not all parameters are listed here, only those that present some interest in their Django implementation.
62598f7523e79379d538bdb0
class StandartSearchAPI(generics.ListAPIView): <NEW_LINE> <INDENT> def get_queryset(self): <NEW_LINE> <INDENT> stellarquery = StellarObject.objects.all() <NEW_LINE> constellation = self.request.query_params.get('const', None) <NEW_LINE> type_ = self.request.query_params.get('otype', None) <NEW_LINE> catalogue = self.re...
Endpoint dla wyszukiwarki
62598f75796e427e5384e04e
class TestThirdPartyParcelAccountApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = Infoplus.api.third_party_parcel_account_api.ThirdPartyParcelAccountApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_add_third_party_parcel_accou...
ThirdPartyParcelAccountApi unit test stubs
62598f75d6c5a102081e19fe
class MiniImagenet(data.Dataset): <NEW_LINE> <INDENT> def __init__(self, root, partition='train', category='mini'): <NEW_LINE> <INDENT> super(MiniImagenet, self).__init__() <NEW_LINE> self.root = root <NEW_LINE> self.partition = partition <NEW_LINE> self.data_size = [3, 84, 84] <NEW_LINE> mean_pix = [x / 255.0 for x in...
preprocess the MiniImageNet dataset
62598f7563f4b57ef00859cb
class DemoCompView(View): <NEW_LINE> <INDENT> def get(self, request): <NEW_LINE> <INDENT> return render(request, 'job/my_demo_company.html')
окно при нажатии на "компания" в выпадающем меню зарег пользователя, у которого нет компании (ссылка на допавление компании)
62598f758e05c05ec3f6eaa2
class Gpio23(GpioPin): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> GpioPin.__init__(self) <NEW_LINE> <DEDENT> value = 23 <NEW_LINE> name = "Gpio23"
GPIO 23 (pin P1-16).
62598f75711fe17d825dff9e
class mTOW(parameter): <NEW_LINE> <INDENT> pass
Aircraft maximum take-off weight :Unit: [N]
62598f756fece00bbaccb245
class ClasiLamb_2_1_ModelAsker(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.model = None <NEW_LINE> <DEDENT> def loadModel(self, model_path): <NEW_LINE> <INDENT> model_name = self.__get_just_filename(model_path) <NEW_LINE> if "CL21" in model_name: <NEW_LINE> <INDENT> self.model = torch.load(model...
Esta clase carga el modelo y permite utilizarlo para hacer predicciones
62598f75fb3f5b602db47e0d
class PixmapCache(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.pixmapCache = {} <NEW_LINE> self.searchPath = ['./res/shadow'] <NEW_LINE> <DEDENT> def getPixmap(self, key): <NEW_LINE> <INDENT> if key: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return self.pixmapCache[key] <NEW_LINE> <DEDEN...
Class implementing a pixmap cache for icons.
62598f758c3a8732951f5e07
class WikiAggregateServiceTestCase(StoreTestCase): <NEW_LINE> <INDENT> def configure(self): <NEW_LINE> <INDENT> from twistedcaldav.config import config <NEW_LINE> super(WikiAggregateServiceTestCase, self).configure() <NEW_LINE> self.patch(config.Authentication.Wiki, "Enabled", True) <NEW_LINE> <DEDENT> @inlineCallbacks...
Get a wiki service as part of directoryFromConfig
62598f75ec188e330fdf815b
class event: <NEW_LINE> <INDENT> venusian = venusian <NEW_LINE> def __init__(self, regexp, callback=None, iotype='in', venusian_category='irc3.rfc1459'): <NEW_LINE> <INDENT> if iotype == 'out': <NEW_LINE> <INDENT> re_out = getattr(regexp, 're_out', None) <NEW_LINE> if re_out is not None: <NEW_LINE> <INDENT> regexp = re...
register a method or function an irc event callback:: >>> @event('^:\S+ 353 [^&#]+(?P<channel>\S+) :(?P<nicknames>.*)') ... def on_names(bot, channel=None, nicknames=None): ... '''this will catch nickname when you enter a channel''' ... print(channel, nicknames.split(':')) The callback can be ...
62598f754e696a045264da5b
class Subscription(ORMBase): <NEW_LINE> <INDENT> __tablename__ = 'subscription' <NEW_LINE> __table_args__ = ( dict( mysql_engine='InnoDB', mysql_charset='utf8', ) ) <NEW_LINE> studentId = sqlalchemy.schema.Column( sqlalchemy.types.Integer(), sqlalchemy.schema.ForeignKey('student.studentId'), primary_key=True, ) <NEW_LI...
Student <-> Lecture subscriptions
62598f75287bf620b6271471
class PytestTestRunner(object): <NEW_LINE> <INDENT> def __init__(self, verbosity=1, failfast=False, keepdb=False, **kwargs): <NEW_LINE> <INDENT> self.verbosity = verbosity <NEW_LINE> self.failfast = failfast <NEW_LINE> self.keepdb = keepdb <NEW_LINE> <DEDENT> def run_tests(self, test_labels, **kwargs): <NEW_LINE> <INDE...
Runs pytest to discover and run tests.
62598f756aa9bd52df0d478f
class ResourceRefDetail(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.ResourceId = None <NEW_LINE> self.Version = None <NEW_LINE> self.Name = None <NEW_LINE> self.Type = None <NEW_LINE> self.SystemProvide = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> s...
JobConfig引用资源信息
62598f75d18da76e235b6d93
@resource("std::Directory", agent = "host.name", id_attribute = "path") <NEW_LINE> class Directory(Resource): <NEW_LINE> <INDENT> fields = ("path", "owner", "group", "mode", "purged", "reload")
A directory on a filesystem
62598f7576d4e153a661c4ce
class EnergyRange(object): <NEW_LINE> <INDENT> def __init__(self, min, max): <NEW_LINE> <INDENT> self.min = min <NEW_LINE> self.max = max <NEW_LINE> <DEDENT> @property <NEW_LINE> def width(self): <NEW_LINE> <INDENT> return self.max - self.min <NEW_LINE> <DEDENT> @property <NEW_LINE> def log10_width(self): <NEW_LINE> <I...
Energy range. This is just a little helper class. We could have used length-2 tuple or Quantity for this. TODO: Merge with `~gammapy.utils.energy.EnergyBounds`
62598f750383005118f6cfbc
class CubeView(BaseView): <NEW_LINE> <INDENT> class AggType: <NEW_LINE> <INDENT> (COUNT, SUM, MIN, MAX) = ("COUNT", "SUM", "MIN", "MAX") <NEW_LINE> <DEDENT> def __init__(self, model, cube_fields, aggregate_type, aggregate_field = "id"): <NEW_LINE> <INDENT> BaseView.__init__(self, model) <NEW_LINE> self.aggregate_type =...
Aggregates model objects grouped by cube_fields. Returns the aggregate_type function over the aggregate_field for each cube_field grouping. Similar to: SELECT cube_fields, aggregate_type(aggregate_field) AS self.aggregate_field FROM model GROUP BY cube_fields;
62598f7563f4b57ef00859cc
class BaseHTMLHandler(BaseHandler): <NEW_LINE> <INDENT> db = None <NEW_LINE> template = None <NEW_LINE> error_template = "500.html" <NEW_LINE> maintenance = False <NEW_LINE> def data_received(self, chunk): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def write_error(self, status_code, **kwargs): <NEW_LINE> <INDENT> sel...
Abstract Handler for HTML responses, this will render a template with some data, this class should be extended defining template, title, get, post, push, etc... methods
62598f756fece00bbaccb246
class YumUpdate(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._pkgs = {} <NEW_LINE> self._yb = getattr(__import__('yum'), 'YumBase')() <NEW_LINE> self.update_cmd = ["yum", "-y", "update"] <NEW_LINE> <DEDENT> def _refreshUpdateList(self): <NEW_LINE> <INDENT> self._pkgs = self._yb.doPackageLis...
Class to represent and operate with YUM software update system. It's loaded only on those systems listed at YUM_DISTROS and loads necessary modules in runtime.
62598f757b25080760ed6d5a
class OppositeGrudger(Player): <NEW_LINE> <INDENT> name = 'Opposite Grudger' <NEW_LINE> classifier = { 'memory_depth': float('inf'), 'stochastic': False, 'makes_use_of': set(), 'inspects_source': False, 'manipulates_source': False, 'manipulates_state': False } <NEW_LINE> def strategy(self, opponent): <NEW_LINE> <INDENT...
A player starts by defecting however will cooperate if at any point the opponent has cooperated.
62598f75d10714528d69d788
class BaseEntityForm(ModelForm): <NEW_LINE> <INDENT> def __init__(self, data=None, *args, **kwargs): <NEW_LINE> <INDENT> super(BaseEntityForm, self).__init__(data, *args, **kwargs) <NEW_LINE> self.eav_entity = getattr(self.instance, self.instance._eav_config.eav_attr) <NEW_LINE> self.eav_fields = [] <NEW_LINE> self.eav...
ModelForm for entity with support for EAV attributes. Form fields are created on the fly depending on Schema defined for given entity instance.
62598f753eb6a72ae0389efd
class VpnAllocation(model_base.BASEV2): <NEW_LINE> <INDENT> __tablename__ = 'h3c_vpn_allocations' <NEW_LINE> vpn_id = sa.Column(sa.Integer, nullable=False, primary_key=True) <NEW_LINE> router_id = sa.Column(sa.String(36), nullable=False)
Represent allocation of vpn.
62598f75d10714528d69d789
class Lvsetup(Test): <NEW_LINE> <INDENT> ramdisks = [] <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.disk = self.params.get('disk', default=None) <NEW_LINE> vg_name = self.params.get('vg_name', default='avocado_vg') <NEW_LINE> lv_name = self.params.get('lv_name', default='avocado_lv') <NEW_LINE> self.lv_size = s...
Test class for creating logical volumes.
62598f758e05c05ec3f6eaa3
class EntityProperty(object): <NEW_LINE> <INDENT> pass
Main base class for ChemicalEntity property specification
62598f7515fb5d323ce7e5e3
class OrderWidget(QFrame): <NEW_LINE> <INDENT> def __init__(self, bar, food, quantity): <NEW_LINE> <INDENT> QFrame.__init__(self) <NEW_LINE> self.__init_UI(bar, food, quantity) <NEW_LINE> <DEDENT> def __init_UI(self, bar, food, quantity): <NEW_LINE> <INDENT> self.setStyleSheet("background-color: none;") <NEW_LINE> self...
Class defining the notification widget for a prevision.
62598f751f5feb6acb1624f2
class ModbusServerFactory(ServerFactory): <NEW_LINE> <INDENT> protocol = ModbusTcpProtocol <NEW_LINE> def __init__(self, store, framer=None, identity=None, **kwargs): <NEW_LINE> <INDENT> self.decoder = ServerDecoder() <NEW_LINE> self.framer = framer or ModbusSocketFramer <NEW_LINE> self.store = store or ModbusServerCon...
Builder class for a modbus server This also holds the server datastore so that it is persisted between connections
62598f75b830903b9686e0d0
class Enumeration(object): <NEW_LINE> <INDENT> pass
Has atributes: - string name - EnumerationElement list elements - Interface interface
62598f75287bf620b6271472
class SearchForm(forms.Form): <NEW_LINE> <INDENT> def __init__(self, atomsLoV, *args, **kwargs): <NEW_LINE> <INDENT> super(SearchForm, self).__init__(*args, **kwargs) <NEW_LINE> self.fields['environment'] = forms.ChoiceField(label="Environment", choices=atomsLoV) <NEW_LINE> self.fields['environment'].widget.attrs.updat...
Definition of the main search form used in the "main" landing page after login.
62598f758da39b475be02a9d
class NevowRequestToRequestMapTests(TestCase): <NEW_LINE> <INDENT> @depends_on('nevow') <NEW_LINE> def test_basic(self): <NEW_LINE> <INDENT> request = fake_nevow_request(request_headers={ b'x-foo': [b'bar'], }) <NEW_LINE> self.assertThat( _nevow_request_to_request_map(request), ContainsDict({ 'content_type': Equals(b'a...
Tests for `_nevow_request_to_request_map`.
62598f7515baa72349461847
class TaskManager(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._thread_pool = ThreadPool(3) <NEW_LINE> <DEDENT> def add_task(self, func): <NEW_LINE> <INDENT> def func_wrapper(): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> func() <NEW_LINE> <DEDENT> except BaseException: <NEW_LINE> <INDENT>...
Task manager that manages a thread pool. It is used to run hotkey functions in the thread pool.
62598f756aa9bd52df0d4791
class DenyOrganizationInvitationRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Id = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Id = params.get("Id")
DenyOrganizationInvitation请求参数结构体
62598f75d4950a0f3b110a94
class _IconSet(object): <NEW_LINE> <INDENT> def __init__(self, iconset, base_dir): <NEW_LINE> <INDENT> self._fallback = self._file_name(iconset.text, base_dir) <NEW_LINE> self._use_fallback = True <NEW_LINE> self._roles = {} <NEW_LINE> for i in iconset: <NEW_LINE> <INDENT> file_name = i.text <NEW_LINE> if file_name is ...
An icon set, ie. the mode and state and the pixmap used for each.
62598f759b70327d1c57e66b
class ConflictResolverThread(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, dbsession_factory): <NEW_LINE> <INDENT> self.dbsession_factory = dbsession_factory <NEW_LINE> self.failure = None <NEW_LINE> threading.Thread.__init__(self) <NEW_LINE> self.success_count = 0 <NEW_LINE> self.failure_count = 0 <NEW_LIN...
Launch two of these and they should cause database conflict and then retryable resolves it.
62598f7530c21e258be980c1
class ClientConnectorStatistics(ConnectorStatistics): <NEW_LINE> <INDENT> def init(self): <NEW_LINE> <INDENT> self._stats = { "created_at": 0, "last_received_pdu_at": 0, "last_sent_pdu_at": 0, "last_received_elink_at": 0, "last_sent_elink_at": 0, "last_seqNum_at": 0, "last_seqNum": None, "connected_at": 0, "bound_at": ...
One client connector statistics holder
62598f7566656f66f7d59cad
class Preferences (object): <NEW_LINE> <INDENT> def runPreferences (self, widget, interface): <NEW_LINE> <INDENT> fenetre = gtk.Dialog(_("Preferences"), None, gtk.DIALOG_MODAL, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_APPLY, gtk.RESPONSE_APPLY)) <NEW_LINE> onglets = gtk.Notebook() <NEW_LINE> general = gtk.Labe...
Gestion du fichier de configuration via une fenêtre
62598f7530dc7b766599f119
class AnimKit(Structure): <NEW_LINE> <INDENT> fields = Skeleton( IDField(), UnknownField(), UnknownField(), )
AnimKit.dbc New in 4.0.0.11927
62598f758a43f66fc4bf1a3a
class cachedIn(object): <NEW_LINE> <INDENT> def __init__(self, attribute_name, factory=dict): <NEW_LINE> <INDENT> self.attribute_name = attribute_name <NEW_LINE> self.factory = factory <NEW_LINE> <DEDENT> def __call__(self, func): <NEW_LINE> <INDENT> @wraps(func) <NEW_LINE> def decorated(instance, *args, **kwargs): <NE...
Cached method with given cache attribute.
62598f7526238365f5fac431
class SG_super_group_remove(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "super_grouper.super_group_remove" <NEW_LINE> bl_label = "Remove Super Group" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> return bool(context.scene) <NEW_LINE>...
Remove selected layer group
62598f7596565a6dacd2cbda
class UserProfileManager(BaseUserManager): <NEW_LINE> <INDENT> def create_user(self,email,name,password=None): <NEW_LINE> <INDENT> if not email: <NEW_LINE> <INDENT> raise ValueError('User must have an email address') <NEW_LINE> <DEDENT> email=self.normalize_email(email) <NEW_LINE> user = self.model(email=email, name=na...
Manger for user profile
62598f7566673b3332c2fc7e
class Seed(Strategy): <NEW_LINE> <INDENT> def __init__(self, num_seeds: int = 1, size: int = 1): <NEW_LINE> <INDENT> super(Seed, self).__init__() <NEW_LINE> self.num_seeds = num_seeds <NEW_LINE> self.size = size <NEW_LINE> <DEDENT> def __call__(self, candidate: np.ndarray): <NEW_LINE> <INDENT> new_candidate = candidate...
Parameters ---------- num_seeds : int Number of seeds to plant. size : int Size of each seed.
62598f7515fb5d323ce7e5e5
class StructuredThingSerializer(object): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.instance = args[0] <NEW_LINE> self.fields = kwargs.get('fields', '__all__') <NEW_LINE> self.many = kwargs.get('many') <NEW_LINE> if self.many: <NEW_LINE> <INDENT> self.data = [] <NEW_LINE> for i in...
Initially made to only handle StructuredNodes but found that it also worked for StructuredRels.
62598f7576d4e153a661c4d1
class _AltRecord(object): <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> def __init__(self, type, **kwargs): <NEW_LINE> <INDENT> super(_AltRecord, self).__init__(**kwargs) <NEW_LINE> self.type = type <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> raise NotImplementedError ...
An alternative allele record: either replacement string, SV placeholder, or breakend
62598f7573bcbd0ca4bc9b0b
class LxcFactory(Factory): <NEW_LINE> <INDENT> def create_lxc_job(self, filename, output_dir='/tmp/'): <NEW_LINE> <INDENT> device = NewDevice(os.path.join(os.path.dirname(__file__), '../devices/lxc-01.yaml')) <NEW_LINE> lxc_yaml = os.path.join(os.path.dirname(__file__), filename) <NEW_LINE> with open(lxc_yaml) as sampl...
Not Model based, this is not a Django factory. Factory objects are dispatcher based classes, independent of any database objects.
62598f7523e79379d538bdb6
class UserMappingSerializer(serializers.Serializer): <NEW_LINE> <INDENT> provider = None <NEW_LINE> username = serializers.SerializerMethodField() <NEW_LINE> remote_id = serializers.SerializerMethodField() <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.provider = kwargs['context'].get('provide...
Serializer for User Mapping
62598f75287bf620b6271475
class CSVSheetReader(ISheet): <NEW_LINE> <INDENT> def __init__( self, sheet, encoding="utf-8", auto_detect_float=True, ignore_infinity=True, auto_detect_int=True, auto_detect_datetime=True, pep_0515_off=True, ignore_nan_text=False, default_float_nan=None, **keywords ): <NEW_LINE> <INDENT> self._native_sheet = sheet <NE...
generic csv file reader
62598f7538b623060ffa8959