code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class Select2Widget(BaseWidget): <NEW_LINE> <INDENT> _base = SelectWidget <NEW_LINE> _properties = BaseWidget._properties.copy() <NEW_LINE> _properties.update({ 'pattern': 'select2', 'pattern_options': {}, 'separator': ';', 'multiple': False, 'orderable': False, }) <NEW_LINE> def _base_args(self, context, field, reques...
Select widget for Archetypes.
62598f790383005118f6d049
class MQTT(ModuleLooper): <NEW_LINE> <INDENT> def __init__(self, client_id, host, port=1883, debug=False): <NEW_LINE> <INDENT> super(MQTT, self).__init__(debug=debug) <NEW_LINE> self.logger.debug("Client ID: " + client_id) <NEW_LINE> self.client_id = client_id <NEW_LINE> self.client = mqtt.Client(self.client_id) <NEW_L...
MQTT Module
62598f798a349b6b43685b8a
class IntIdMissingError(KeyError): <NEW_LINE> <INDENT> pass
Raised when ``getId`` cannot find an intid.
62598f79a4f1c619b294df33
class AccountUsage(BASE, ModelBase, Versioned): <NEW_LINE> <INDENT> __tablename__ = 'account_usage' <NEW_LINE> account = Column(String(25)) <NEW_LINE> rse_id = Column(GUID()) <NEW_LINE> files = Column(BigInteger) <NEW_LINE> bytes = Column(BigInteger) <NEW_LINE> _table_args = (PrimaryKeyConstraint('account', 'rse_id', n...
Represents account usage
62598f794d74a7450cd58b7a
class NeuclarTimings(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.training_times = {'create_spike_trains': 0., 'run': 0., 'identify_winner_pop': 0., 'compute_updated_weights' :0., 'total_train': 0.} <NEW_LINE> self.testing_times = {'create_spike_trains': 0., 'run': 0., 'identify_winner_pop'...
class to keep track of the time spent in the various phases of classifier training and testing.
62598f7930c21e258be9814f
class ContactoAplicante(models.Model): <NEW_LINE> <INDENT> nombre_completo = models.CharField(max_length=60) <NEW_LINE> email = models.EmailField() <NEW_LINE> telefono = models.CharField(max_length=50) <NEW_LINE> SEXO_CHOICES= ( ("M", "Masculino"), ("F", "Femenino"), ) <NEW_LINE> sexo = models.CharField(choices=SEXO_CH...
incluye funcion para obtener nombre de la vacante
62598f796e29344779afffa9
class DataFlags(_enum.Enum): <NEW_LINE> <INDENT> SINGLE_PACKET = 0b00 <NEW_LINE> FIRST_PACKET = 0b01 <NEW_LINE> NORMAL_PACKET = 0b10 <NEW_LINE> LAST_PACKET = 0b11
Messages larger than the Maximum Packet Size will be broken up into smaller packets and re-ensemble. For any fragmented set of packets: First packet will have a value of 0b01 Last packet will have a value of 0b11 All packets in between will have the value 0b10 If the message is under the Maximum Packet Si...
62598f79c432627299fa2920
class MessageSet(list, _List["Error"]): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> super().__init__([Error(datum) for datum in data]) <NEW_LINE> self.data = data
A set of messages to the user, such as warnings or comments.
62598f798e05c05ec3f6eaea
class PageEditor(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.host = CONF.wiki_host <NEW_LINE> self.site_lock = threading.Lock() <NEW_LINE> self._site = None <NEW_LINE> <DEDENT> def _get_site(self): <NEW_LINE> <INDENT> with self.site_lock: <NEW_LINE> <INDENT> if self._site is None: <NEW_LINE> <IN...
Utility class to maintain a mediawiki session and edit pages
62598f7915baa723494618c8
class Greeter(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def SayHello(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): <NEW_LINE> <INDENT> return grpc.experimental.unary_unary(request, target, '/...
The greeting service definition.
62598f79d164cc61758208be
class SpeedtestData: <NEW_LINE> <INDENT> def __init__(self, hass, config): <NEW_LINE> <INDENT> self.data = None <NEW_LINE> self._server_id = config.get(CONF_SERVER_ID) <NEW_LINE> if not config.get(CONF_MANUAL): <NEW_LINE> <INDENT> track_time_change( hass, self.update, second=config.get(CONF_SECOND), minute=config.get(C...
Get the latest data from speedtest.net.
62598f79cad5886f8bdc4c6b
class MemorizingFile(object): <NEW_LINE> <INDENT> def __init__(self, file_, max_memorized_lines=sys.maxint): <NEW_LINE> <INDENT> self._file = file_ <NEW_LINE> self._memorized_lines = [] <NEW_LINE> self._max_memorized_lines = max_memorized_lines <NEW_LINE> self._buffered = False <NEW_LINE> self._buffered_line = None <NE...
MemorizingFile wraps a file and memorizes lines read by readline. Note that data read by other methods are not memorized. This behavior is good enough for memorizing lines SimpleHTTPServer reads before the control reaches WebSocketRequestHandler.
62598f79711fe17d825e0030
class VCModel(model.CNNModel): <NEW_LINE> <INDENT> def __init__(self, params=None): <NEW_LINE> <INDENT> super(VCModel, self).__init__( 'vc', 32, 64, 0.1, params=params) <NEW_LINE> self.deps = params.deps <NEW_LINE> <DEDENT> def vc_conv(self, dep): <NEW_LINE> <INDENT> self.cnn.conv(dep, mode='SAME', k_height=3, k_width=...
Alexnet cnn model for cifar datasets. The model architecture follows the one defined in the tensorflow tutorial model. Reference model: tensorflow/models/tutorials/image/cifar10/cifar10.py Paper: http://www.cs.toronto.edu/~kriz/learning-features-2009-TR.pdf
62598f79bde94217f370730b
class Dot(Expr): <NEW_LINE> <INDENT> def __new__(cls, expr1, expr2): <NEW_LINE> <INDENT> expr1 = sympify(expr1) <NEW_LINE> expr2 = sympify(expr2) <NEW_LINE> expr1, expr2 = sorted([expr1, expr2], key=default_sort_key) <NEW_LINE> obj = Expr.__new__(cls, expr1, expr2) <NEW_LINE> obj._expr1 = expr1 <NEW_LINE> obj._expr2 = ...
Represents unevaluated Dot product. Examples ======== >>> from sympy.vector import CoordSys3D, Dot >>> from sympy import symbols >>> R = CoordSys3D('R') >>> a, b, c = symbols('a b c') >>> v1 = R.i + R.j + R.k >>> v2 = a * R.i + b * R.j + c * R.k >>> Dot(v1, v2) Dot(R.i + R.j + R.k, a*R.i + b*R.j + c*R.k) >>> Dot(v1, ...
62598f79b5575c28eb71296a
class NullExtensionTestMixin(ExtensionTestMixin[NullExtensionTypeVar]): <NEW_LINE> <INDENT> repr_tmpl = "<{name}: critical={critical}>" <NEW_LINE> def assertExtensionEqual( self, first: ExtensionTypeVar, second: ExtensionTypeVar ) -> None: <NEW_LINE> <INDENT> self.assertEqual(first.__class__, second.__class__) <NEW_LIN...
TestCase mixin for tests that all extensions are expected to pass, including abstract base classes.
62598f796fece00bbaccb2d5
class DishesListApiView(APIView): <NEW_LINE> <INDENT> def get(self, request, pk): <NEW_LINE> <INDENT> menu = Menu.objects.filter(id=pk).first() <NEW_LINE> if not menu: <NEW_LINE> <INDENT> return Response(status=status.HTTP_400_BAD_REQUEST) <NEW_LINE> <DEDENT> serializer = DishSerializer(menu.dishes.all(), context={'req...
Menu Dishes List View
62598f79b57a9660fecd13c7
class CropType(IntEnum): <NEW_LINE> <INDENT> RANDOM = 1 <NEW_LINE> CENTER = 2 <NEW_LINE> NO = 3 <NEW_LINE> GOOGLENET = 4
Type of image cropping.
62598f7930c21e258be98150
class Metrics(abupy.AbuMetricsBase): <NEW_LINE> <INDENT> def _metrics_extend_stats(self): <NEW_LINE> <INDENT> self.act_sell = self.action_pd[self.action_pd.action.isin(['sell']) & self.action_pd.deal.isin([True])] <NEW_LINE> if self.act_sell.empty: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> self.act_sell['sell_cost...
对:py:class:`abupy.AbuMetricsBase`的扩展。
62598f79ac7a0e7691f71e62
class Applicant(models.Model): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return"{} {}".format(self.FirstName, self.LastName) <NEW_LINE> <DEDENT> FirstName = models.CharField(max_length=250) <NEW_LINE> LastName = models.CharField(max_length=250) <NEW_LINE> Email = models.EmailField(max_length=250, uniqu...
Applicant profile in our app
62598f796fece00bbaccb2d6
class MiniLyrics(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def vl_enc(data, md5_extra): <NEW_LINE> <INDENT> datalen = len(data) <NEW_LINE> md5 = hashlib.md5() <NEW_LINE> md5.update(data + md5_extra) <NEW_LINE> hexx = md5.hexdigest() <NEW_LINE> hasheddata = '' <NEW_LINE> i = 0 <NEW_LINE> while (i < (len(hexx...
Minilyrics specific functions
62598f795e10d32532ce3592
class IRouteView(Interface): <NEW_LINE> <INDENT> pass
Route view interface
62598f7915baa723494618c9
class DCAwareRoundRobinPolicy(LoadBalancingPolicy): <NEW_LINE> <INDENT> local_dc = None <NEW_LINE> used_hosts_per_remote_dc = 0 <NEW_LINE> def __init__(self, local_dc, used_hosts_per_remote_dc=0): <NEW_LINE> <INDENT> self.local_dc = local_dc <NEW_LINE> self.used_hosts_per_remote_dc = used_hosts_per_remote_dc <NEW_LINE>...
Similar to :class:`.RoundRobinPolicy`, but prefers hosts in the local datacenter and only uses nodes in remote datacenters as a last resort.
62598f7907f4c71912baed97
class DwwenPaginationSerializer(BasePaginationSerializer): <NEW_LINE> <INDENT> next = NextPageField(source='*') <NEW_LINE> previous = PreviousPageField(source='*')
Dwwen implementation of a pagination serializer.
62598f790fa83653e46f483a
class V1PersistentVolumeClaimVolumeSource(object): <NEW_LINE> <INDENT> def __init__(self, claim_name=None, read_only=None): <NEW_LINE> <INDENT> self.swagger_types = { 'claim_name': 'str', 'read_only': 'bool' } <NEW_LINE> self.attribute_map = { 'claim_name': 'claimName', 'read_only': 'readOnly' } <NEW_LINE> self._claim_...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f79ec188e330fdf81e9
class PipelineSettings(collections.MutableMapping): <NEW_LINE> <INDENT> def __init__(self, wrapped_settings): <NEW_LINE> <INDENT> self.settings = DEFAULTS.copy() <NEW_LINE> self.settings.update(wrapped_settings) <NEW_LINE> <DEDENT> def __getitem__(self, key): <NEW_LINE> <INDENT> value = self.settings[key] <NEW_LINE> if...
Container object for pipeline settings
62598f791f037a2d8b9e3a35
class RMSE(EvalMetric): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(RMSE, self).__init__('rmse') <NEW_LINE> <DEDENT> def update(self, labels, preds): <NEW_LINE> <INDENT> check_label_shapes(labels, preds) <NEW_LINE> for label, pred in zip(labels, preds): <NEW_LINE> <INDENT> label = label.asnumpy() ...
Calculate Root Mean Squred Error loss
62598f790383005118f6d04b
class WSGIService(object): <NEW_LINE> <INDENT> def __init__(self, name, loader=None, use_ssl=False, max_url_len=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.manager = self._get_manager() <NEW_LINE> self.loader = loader or wsgi.Loader() <NEW_LINE> self.app = self.loader.load_app(name) <NEW_LINE> self.host...
Provides ability to launch API from a 'paste' configuration.
62598f797b25080760ed6deb
class DeploymentRoleDetailsAccordion(View): <NEW_LINE> <INDENT> @View.nested <NEW_LINE> class properties(Accordion): <NEW_LINE> <INDENT> nav = BootstrapNav('//div[@id="ems_prop"]//ul') <NEW_LINE> <DEDENT> @View.nested <NEW_LINE> class relationships(Accordion): <NEW_LINE> <INDENT> nav = BootstrapNav('//div[@id="ems_rel"...
The accordion on the Deployment Role details page
62598f79cad5886f8bdc4c6d
class MyApp(App): <NEW_LINE> <INDENT> def build(self): <NEW_LINE> <INDENT> return LoginScreen()
docstring
62598f79d164cc61758208c0
class TriggerLimitedLifetime(Trigger): <NEW_LINE> <INDENT> def __init__(self, lifeTimeInNumberOfUpdates): <NEW_LINE> <INDENT> super().__init__(BaseEntity.GetNextValidId()) <NEW_LINE> self._lifetime = lifeTimeInNumberOfUpdates <NEW_LINE> <DEDENT> def Update(self): <NEW_LINE> <INDENT> self._lifetime -= 1 <NEW_LINE> if se...
Defines a trigger that only remains in the game for a specified number of update steps
62598f7926068e7796d4c2a6
class TransferCoordinatorWithInterrupt(TransferCoordinator): <NEW_LINE> <INDENT> def result(self): <NEW_LINE> <INDENT> raise KeyboardInterrupt()
Used to inject keyboard interrupts
62598f7916aa5153ce3ffe49
class PiecewiseConstantDecayWithWarmup( tf.keras.optimizers.schedules.LearningRateSchedule): <NEW_LINE> <INDENT> def __init__(self, batch_size, epoch_size, warmup_epochs, boundaries, multipliers, compute_lr_on_cpu=True, name=None): <NEW_LINE> <INDENT> super(PiecewiseConstantDecayWithWarmup, self).__init__() <NEW_LINE> ...
Piecewise constant decay with warmup schedule.
62598f7950485f2cf55da8ba
class LinkIssue(Issue): <NEW_LINE> <INDENT> link: Link <NEW_LINE> def __init__(self, path: Path, link: Link) -> None: <NEW_LINE> <INDENT> super().__init__(path) <NEW_LINE> self.link = link
Base class for all link-related issues.
62598f7907d97122c42165ed
class GetChildInfoApiKeysV3(object): <NEW_LINE> <INDENT> swagger_types = { 'name': 'str', 'key': 'str' } <NEW_LINE> attribute_map = { 'name': 'name', 'key': 'key' } <NEW_LINE> def __init__(self, name=None, key=None): <NEW_LINE> <INDENT> self._name = None <NEW_LINE> self._key = None <NEW_LINE> self.discriminator = None ...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f79a05bb46b3848a1c8
class RazerBladeStealthLate2016(_RippleKeyboard): <NEW_LINE> <INDENT> EVENT_FILE_REGEX = re.compile(r'.*Razer_Blade_Stealth(-if01)?-event-kbd') <NEW_LINE> USB_VID = 0x1532 <NEW_LINE> USB_PID = 0x0220 <NEW_LINE> HAS_MATRIX = True <NEW_LINE> MATRIX_DIMS = [6, 16] <NEW_LINE> METHODS = ['get_device_type_keyboard', 'set_wav...
Class for the Razer Blade Stealth (Late 2016)
62598f7923e79379d538be46
class Process(models.Model, VisibilityMixin): <NEW_LINE> <INDENT> title = models.CharField(max_length=255) <NEW_LINE> organization = models.ForeignKey('accounts.Organization', related_name='processes') <NEW_LINE> primary_organization = models.ForeignKey('accounts.Organization', related_name='all_processes') <NEW_LINE> ...
A connected series of tasks.
62598f79b57a9660fecd13c9
class EnvironmentSetting(Model): <NEW_LINE> <INDENT> _validation = { 'name': {'required': True}, } <NEW_LINE> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'value': {'key': 'value', 'type': 'str'}, } <NEW_LINE> def __init__(self, name, value=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.value...
A collection of environment variables to set. :param name: The name of the environment variable. :type name: str :param value: The value of the environment variable. :type value: str
62598f798a349b6b43685b8d
class DiffieHellmanExchange: <NEW_LINE> <INDENT> def __init__(self, modulus, base, private_key): <NEW_LINE> <INDENT> self.__base = base <NEW_LINE> self.__modulus = modulus <NEW_LINE> self.__private_key = private_key <NEW_LINE> self.__public_key = pow(base, private_key, modulus) <NEW_LINE> <DEDENT> @property <NEW_LINE> ...
Diffie-Hellman is ment to be used from lets say Alice and Bob to generate a shared key. They arrange two numbers: "modulus" and "base" and use different secret keys. Alice and Bob generate public keys and pass them to each other to the "exchange" method which generates the shared key.
62598f79dc8b845886d52f00
class ActionsPostMethodRaises(TestCase): <NEW_LINE> <INDENT> def test_no_pk_raises_error(self): <NEW_LINE> <INDENT> with self.assertRaisesMessage(ValueError, 'POST data was poor'): <NEW_LINE> <INDENT> self.client.post( reverse('actions'), {'action': 'order-add-comment'}) <NEW_LINE> <DEDENT> <DEDENT> def test_no_action_...
Test the correct raise of errors in post method.
62598f7996565a6dacd2cc20
class SemiMonthEnd(SemiMonthOffset): <NEW_LINE> <INDENT> _prefix = "SM" <NEW_LINE> _min_day_of_month = 1 <NEW_LINE> def onOffset(self, dt): <NEW_LINE> <INDENT> if self.normalize and not _is_normalized(dt): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> days_in_month = ccalendar.get_days_in_month(dt.year, dt.month...
Two DateOffset's per month repeating on the last day of the month and day_of_month. Parameters ---------- n : int normalize : bool, default False day_of_month : int, {1, 3,...,27}, default 15
62598f7938b623060ffa89e4
class Product(TimeStampedModel): <NEW_LINE> <INDENT> name = models.CharField(max_length=255) <NEW_LINE> description = models.TextField() <NEW_LINE> price = models.DecimalField(decimal_places=2, max_digits=5) <NEW_LINE> category = models.CharField(max_length=1, choices=CATEGORIES) <NEW_LINE> def __str__(self): <NEW_LINE...
here we have set of products. each product has price.
62598f791f5feb6acb162581
class StockMarketDataset(AllDataset): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def cache_folder(data_path): <NEW_LINE> <INDENT> if data_path is not None: <NEW_LINE> <INDENT> os.makedirs(data_path, exist_ok=True) <NEW_LINE> return data_path <NEW_LINE> <DEDENT> dirname = os.path.dirname(__file__) <NEW_LINE> return os...
Examples -------- .. code-block:: python dataset = StockMarketDataset(['AAPL'], '2000-01-01', '2019-05-10')
62598f7963f4b57ef0085a14
class CapacityPoolPatch(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'size': {'maximum': 549755813888000, 'minimum': 4398046511104}, } <NEW_LINE> _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'id':...
Capacity pool patch resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar location: Resource location. :vartype location: str :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str :ivar tags...
62598f790fa83653e46f483c
class Text(str): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> new = super().__str__() <NEW_LINE> if(new == '<'): <NEW_LINE> <INDENT> new = new.replace('<', '&lt;') <NEW_LINE> <DEDENT> if(new == '>'): <NEW_LINE> <INDENT> new = new.replace('>', '&gt;') <NEW_LINE> <DEDENT> if(new == '"'): <NEW_LINE> <INDENT>...
A Text class to represent a text you could use with your HTML elements. Because directly using str class was too mainstream.
62598f791f037a2d8b9e3a37
class UnreferencedFootnotesDetector(SphinxTransform): <NEW_LINE> <INDENT> default_priority = 200 <NEW_LINE> def apply(self, **kwargs: Any) -> None: <NEW_LINE> <INDENT> for node in self.document.footnotes: <NEW_LINE> <INDENT> if node['names'] == []: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> elif node['names'][0] not ...
Detect unreferenced footnotes and emit warnings
62598f79d6c5a102081e1a92
class CounterDown: <NEW_LINE> <INDENT> def __init__(self, time_len): <NEW_LINE> <INDENT> assert isinstance(time_len, timedelta) <NEW_LINE> self._remember_time_len = time_len <NEW_LINE> self._time_len = time_len <NEW_LINE> self._started = False <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <INDENT> if not self.started...
Class for synchronizing the countdown in game
62598f797c178a314d78cdf4
class FanIn(Group): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(FanIn, self).__init__() <NEW_LINE> self.add_subsystem('p1', IndepVarComp('x1', 1.0)) <NEW_LINE> self.add_subsystem('p2', IndepVarComp('x2', 1.0)) <NEW_LINE> self.add_subsystem('comp1', ExecComp(['y=-2.0*x'])) <NEW_LINE> self.add_subsy...
Topology where two comps feed a single comp.
62598f7973bcbd0ca4bc9b9b
class SupplierAdmin(Fnorb.orb.CORBA.Object): <NEW_LINE> <INDENT> _FNORB_ID = "IDL:omg.org/CosEventChannelAdmin/SupplierAdmin:1.0" <NEW_LINE> def obtain_push_consumer(self, *args, **kw): <NEW_LINE> <INDENT> inputs = [] <NEW_LINE> outputs = [] <NEW_LINE> outputs.append(Fnorb.orb.CORBA.TC_Object) <NEW_LINE> exceptions = [...
Interface: IDL:omg.org/CosEventChannelAdmin/SupplierAdmin:1.0
62598f79cad5886f8bdc4c6f
class Softmax: <NEW_LINE> <INDENT> def __init__(self, num_training_iterations, num_sample_positions, num_data_sets, learning_rate, vectorize_method): <NEW_LINE> <INDENT> self.num_training_iterations = num_training_iterations <NEW_LINE> self.num_sample_positions = num_sample_positions <NEW_LINE> self.learning_rate = lea...
Constructs and trains a softmax regression model.
62598f79287bf620b6271505
class hunspell(SCBackend): <NEW_LINE> <INDENT> def __init__(self, dict_ids = None): <NEW_LINE> <INDENT> SCBackend.__init__(self, dict_ids) <NEW_LINE> if dict_ids: <NEW_LINE> <INDENT> self.start(dict_ids) <NEW_LINE> <DEDENT> <DEDENT> def start(self, dict_ids = None): <NEW_LINE> <INDENT> super(hunspell, self).start(dict_...
Hunspell backend. Doctests: # known word >>> sp = hunspell(["en_US"]) >>> sp.query("test") [] # unknown word >>> sp = hunspell(["en_US"]) >>> sp.query("jdaskljasd") # doctest: +ELLIPSIS [[...
62598f791d351010ab8f348c
class ResourceLimits( namedtuple( "ResourceLimits", ["cputime", "cputime_hard", "walltime", "memory", "cpu_cores"], ) ): <NEW_LINE> <INDENT> def __new__( cls, cputime=None, cputime_hard=None, walltime=None, memory=None, cpu_cores=None, ): <NEW_LINE> <INDENT> return super().__new__( cls, cputime, cputime_hard, walltime,...
Represent resource limits of a run. While this class is technically a tuple, this should be seen as an implementation detail and the order of elements in the tuple should not be considered. New fields may be added in the future. Each field contains a positive int or None, which means no limit. Explanation of fields: c...
62598f7907d97122c42165ef
class GTFSFeedProblem(DataSourceProblem): <NEW_LINE> <INDENT> gtfsfeed = models.ForeignKey(GTFSFeed)
Problem (either a warning or error) for a GTSFeed object
62598f79b5575c28eb71296c
@inherit_doc <NEW_LINE> class _KMeansParams(HasMaxIter, HasFeaturesCol, HasSeed, HasPredictionCol, HasTol, HasDistanceMeasure): <NEW_LINE> <INDENT> k = Param(Params._dummy(), "k", "The number of clusters to create. Must be > 1.", typeConverter=TypeConverters.toInt) <NEW_LINE> initMode = Param(Params._dummy(), "initMode...
Params for :py:class:`KMeans` and :py:class:`KMeansModel`. .. versionadded:: 3.0.0
62598f791d351010ab8f348d
class TestPostRequestList(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def testPostRequestList(self): <NEW_LINE> <INDENT> pass
PostRequestList unit test stubs
62598f7915baa723494618cd
class Error(Exception): <NEW_LINE> <INDENT> pass
A game error, which triggers the effects given in the spec.
62598f7923849d37ff850a0a
class DashboardView(TemplateView): <NEW_LINE> <INDENT> template_name = 'dashboard/index.html' <NEW_LINE> def index(request): <NEW_LINE> <INDENT> return render(request, 'dashboard/index.html') <NEW_LINE> <DEDENT> def topic_distribution(request): <NEW_LINE> <INDENT> computeTopicResults() <NEW_LINE> return render(request,...
Inherit from TemplateView, which normally is best used for templating static html pages. Return: none, just route user request on the browser to specific html templates at the specified paths
62598f7930c21e258be98154
class ToggleGizmosRotLoc(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "object.cycle_gizmos_rotloc" <NEW_LINE> bl_label = "Cycle Gizmos Rotation Location" <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> gizmo = bpy.context.space_data <NEW_LINE> if gizmo.show_gizmo_object_rotate == False: <NEW_LINE> <I...
Tooltip
62598f79b830903b9686e119
class TestNodeCLI(): <NEW_LINE> <INDENT> def __init__(self, binary, datadir): <NEW_LINE> <INDENT> self.options = [] <NEW_LINE> self.binary = binary <NEW_LINE> self.datadir = datadir <NEW_LINE> self.input = None <NEW_LINE> self.log = logging.getLogger('TestFramework.bitcorncli') <NEW_LINE> <DEDENT> def __call__(self, *o...
Interface to bitcorn-cli for an individual node
62598f798c3a8732951f5e9c
class NavElement(Element): <NEW_LINE> <INDENT> A_EPUB_TYPE = "type" <NEW_LINE> A_ID = "id" <NEW_LINE> A_NS_EPUB_TYPE = "{{{0}}}{1}".format(Namespace.EPUB, A_EPUB_TYPE) <NEW_LINE> E_HX = ["h1", "h2", "h3", "h4", "h5", "h6"] <NEW_LINE> E_LI = "li" <NEW_LINE> E_OL = "ol" <NEW_LINE> def __init__(self, internal_path=None, o...
Build a `<nav>` element in the Navigation Document or parse it from `obj` or `string`.
62598f790fa83653e46f483e
class AppTest(unittest.TestCase): <NEW_LINE> <INDENT> def startUp(self): <NEW_LINE> <INDENT> self.tidy() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> self.tidy() <NEW_LINE> <DEDENT> def tidy(self): <NEW_LINE> <INDENT> if not os.path.isdir(os.path.join('PopGen', 'simple')): <NEW_LINE> <INDENT> return <NEW...
Tests simcoal execution via biopython.
62598f79e76e3b2f99fd8380
class NameidFormatSupport(object): <NEW_LINE> <INDENT> implements(INameidFormatSupport) <NEW_LINE> def __init__(self, context): self.context = context <NEW_LINE> def make_id(self, member, sp, ok_create, nid): <NEW_LINE> <INDENT> return self._dispatcher[nid.Format](self, member, sp, ok_create, nid) <NEW_LINE> <DEDENT> d...
Default name id format support.
62598f79d99f1b3c44d04ffa
class CustomResultMessageTracked(ResultMessage): <NEW_LINE> <INDENT> my_type_codes = ResultMessage.type_codes.copy() <NEW_LINE> my_type_codes[0xc] = UUIDType <NEW_LINE> type_codes = my_type_codes <NEW_LINE> checked_rev_row_set = set() <NEW_LINE> @classmethod <NEW_LINE> def recv_results_rows(cls, f, protocol_version, us...
This is a custom Result Message that is use to track what primitive types have been processed when it receives results
62598f793eb6a72ae0389f90
class AggregateSprite(Sprite): <NEW_LINE> <INDENT> def __init__(self, view): <NEW_LINE> <INDENT> Sprite.__init__(self, view) <NEW_LINE> self.scene = view.scene <NEW_LINE> self._internal_group = set() <NEW_LINE> self._child_anchor = spyral.Vec2D(0, 0) <NEW_LINE> <DEDENT> def _get_child_anchor(self): <NEW_LINE> <INDENT> ...
An AggregateSprite is a sprite which also acts similarly to a group. Child sprites can be added to the group, and their drawing is offset by the position of the AggregateSprite. Their positioning can also be anchored with the attribute *child_anchor*, which will specify an :ref:`anchor point <anchors>` on the parent wh...
62598f79cad5886f8bdc4c71
class EmptySolutionError(Exception): <NEW_LINE> <INDENT> pass
Exception for Empty Solution.
62598f79d4950a0f3b110add
class VendorImporter: <NEW_LINE> <INDENT> def __init__(self, root_name, vendored_names=(), vendor_pkg=None): <NEW_LINE> <INDENT> self.root_name = root_name <NEW_LINE> self.vendored_names = set(vendored_names) <NEW_LINE> self.vendor_pkg = vendor_pkg or root_name.replace('extern', '_vendor') <NEW_LINE> <DEDENT> @property...
A PEP 302 meta path importer for finding optionally-vendored or otherwise naturally-installed packages from root_name.
62598f79d10714528d69d81c
class SearchableResourceMixin(object): <NEW_LINE> <INDENT> def prepend_urls(self): <NEW_LINE> <INDENT> logger.debug("Add get_search() URLs to %s" % self.__class__.__name__) <NEW_LINE> _prepend_urls = [ url(r"^(?P<resource_name>%s)/search%s$" % (self._meta.resource_name, trailing_slash()), self.wrap_view('get_search'), ...
Make a Tastypie ModelResource Haystack search-enabled. Search URL: /api/vX/<resource_name>/search/?search_terms=full+text&limit=10&offset=0 Returns a Tastypie ModelResource result-set like `get_list`, using the same parameter options. Send a `search_terms` parameter to Haystack's `AutoQuery`. See the Haystack documen...
62598f7973bcbd0ca4bc9b9e
class BotTestCases(AsyncTestCase): <NEW_LINE> <INDENT> def ircin(self, stat, txt): <NEW_LINE> <INDENT> self.bot._incoming(':faker.irc {} :{}\r\n'.format(stat, txt)) <NEW_LINE> <DEDENT> def rawircin(self, txt): <NEW_LINE> <INDENT> self.bot._incoming(txt) <NEW_LINE> <DEDENT> @mock.patch('iobot.IOBot._connect', _patched_c...
i really wrestled with mocking IOStream.read_until and then i could call bot._next() and have it do the right thing. The problem is you end up in a weird looping blocking situation. It's just easier (not cleaner) to call bot._incoming(...) with the expected input from the ircd and then let the parsing take over from ...
62598f79bde94217f370730e
class AxisLimits(typing.NamedTuple): <NEW_LINE> <INDENT> lower: float <NEW_LINE> upper: float
Limits of a :class:`microscope.abc.StageAxis`.
62598f7950485f2cf55da8bf
class BasePage: <NEW_LINE> <INDENT> def __init__(self, driver): <NEW_LINE> <INDENT> self.driver = driver
Base class to initialize the base page that will be called from all pages
62598f7923e79379d538be49
class LinearScale(Scale): <NEW_LINE> <INDENT> def _scale(self): <NEW_LINE> <INDENT> return self._pre_scale <NEW_LINE> <DEDENT> def _inv_scale(self): <NEW_LINE> <INDENT> return 1. / self._pre_scale <NEW_LINE> <DEDENT> def _log_scale(self): <NEW_LINE> <INDENT> return tf.log(tf.maximum(tf.abs(self._pre_scale), self._epsil...
A variant of :class:`Scale`, where `scale = pre_scale`.
62598f791d351010ab8f348f
class PackageBuilder(StageBuilder): <NEW_LINE> <INDENT> def _port_check(self, port): <NEW_LINE> <INDENT> if port.stage < self.stage - 1: <NEW_LINE> <INDENT> port.dependent.status_changed() <NEW_LINE> self.ports[port].stage_done() <NEW_LINE> return False <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> assert port.stage ==...
Implement Package specific checks.
62598f79711fe17d825e0036
class UnknownSignatureVersionError(KSCoreError): <NEW_LINE> <INDENT> fmt = 'Unknown Signature Version: {signature_version}.'
Requested Signature Version is not known. :ivar signature_version: The name of the requested signature version.
62598f7996565a6dacd2cc22
class HandoverClient(object): <NEW_LINE> <INDENT> def __init__(self, llc): <NEW_LINE> <INDENT> self.socket = None <NEW_LINE> self.llc = llc <NEW_LINE> <DEDENT> def connect(self, recv_miu=248, recv_buf=2): <NEW_LINE> <INDENT> socket = nfc.llcp.Socket(self.llc, nfc.llcp.DATA_LINK_CONNECTION) <NEW_LINE> socket.setsockopt(...
NFC Forum Connection Handover client
62598f79dc8b845886d52f04
class TopicError(HeaderError): <NEW_LINE> <INDENT> description = 'There was an issue with the `apns-topic` header.'
Base exception class for errors related to the APNs topic.
62598f79baa26c4b54d4ec02
class Memory(object): <NEW_LINE> <INDENT> def __init__(self, total_size=256): <NEW_LINE> <INDENT> self.total_size = total_size <NEW_LINE> self.code_page = [] <NEW_LINE> self.data_page = MemDataPage() <NEW_LINE> <DEDENT> def allocate_mem_space(self, code_size, static_var_size): <NEW_LINE> <INDENT> lines = code_size//8+1...
docstring for Memory: data_page: a list, False meanas no value.
62598f79d99f1b3c44d04ffc
class RetrieveItemAPIView(RetrieveAPIView): <NEW_LINE> <INDENT> queryset = AbstractItem.objects.all() <NEW_LINE> serializer_class = ItemSerializer <NEW_LINE> permission_classes = ( IsAuthenticated, )
Use this endpoint to get a list of all the auctions a user has signed up for.
62598f793eb6a72ae0389f92
class PhilipsTVDataUpdateCoordinator(DataUpdateCoordinator[None]): <NEW_LINE> <INDENT> def __init__(self, hass, api: PhilipsTV, options: dict) -> None: <NEW_LINE> <INDENT> self.api = api <NEW_LINE> self.options = options <NEW_LINE> self._notify_future: asyncio.Task | None = None <NEW_LINE> @callback <NEW_LINE> def _upd...
Coordinator to update data.
62598f798e71fb1e983bb405
class f_model(nn.Module): <NEW_LINE> <INDENT> def __init__(self, freeze_param=False, inter_dim=cfg.INTER_DIM, num_classes=cfg.CATEGORIES, model_path=None): <NEW_LINE> <INDENT> super(f_model, self).__init__() <NEW_LINE> print("set backbone") <NEW_LINE> self.backbone = torchvision.models.resnet50(pretrained=True) <NEW_LI...
input: N * 3 * 224 * 224 output: N * num_classes, N * inter_dim, N * C' * 7 * 7
62598f79a4f1c619b294df3c
class Feature(object): <NEW_LINE> <INDENT> def __init__(self, message_name): <NEW_LINE> <INDENT> self.message_name = message_name <NEW_LINE> <DEDENT> def message(self): <NEW_LINE> <INDENT> return self.message_name
Class used to generate each features/[message_name].feature
62598f79b5575c28eb71296e
class CreateAccountTestCase(TestCase): <NEW_LINE> <INDENT> def test_create_account_page(self): <NEW_LINE> <INDENT> response = self.client.get(reverse('create_account')) <NEW_LINE> self.assertEqual(response.status_code, 200) <NEW_LINE> <DEDENT> def test_account_creation(self): <NEW_LINE> <INDENT> response = self.client....
Tests of the create-account view
62598f796fece00bbaccb2dc
class TestCreate(unittest.TestCase): <NEW_LINE> <INDENT> def test_bare_create(self): <NEW_LINE> <INDENT> system = System() <NEW_LINE> self.assertTrue(isinstance(system, System)) <NEW_LINE> <DEDENT> def test_name_create(self): <NEW_LINE> <INDENT> system = System(name='Chulak') <NEW_LINE> self.assertEqual(system.name, 'C...
Test create planet object
62598f7938b623060ffa89ea
class AddCamToView(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "object.add_cam_to_view" <NEW_LINE> bl_label = "Add Camera to View" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> context = bpy.context <NEW_LINE> scene = context.scene <NEW_LINE> active = b...
Adds dynamic brush(es) and canvas in one click
62598f798e05c05ec3f6eaef
class GameWaitAgent(Agent): <NEW_LINE> <INDENT> def __init__(self, action_event, done_event): <NEW_LINE> <INDENT> Agent.__init__(self) <NEW_LINE> self.next_action = None <NEW_LINE> self.action_event = action_event <NEW_LINE> self.done_event = done_event <NEW_LINE> self.kill = False <NEW_LINE> <DEDENT> def getAction(sel...
GameWaitAgent is a blocking agent. During a run of a game, if GameWaitAgent is called to get the action, it blocks to wait for a trigger event.
62598f79004d5f362081eca3
@final <NEW_LINE> class ClassComplexityVisitor(BaseNodeVisitor): <NEW_LINE> <INDENT> def visit_ClassDef(self, node: ast.ClassDef) -> None: <NEW_LINE> <INDENT> self._check_base_classes(node) <NEW_LINE> self._check_public_attributes(node) <NEW_LINE> self.generic_visit(node) <NEW_LINE> <DEDENT> def _check_base_classes(sel...
Checks class complexity.
62598f79baa26c4b54d4ec04
class DigitSeries(str): <NEW_LINE> <INDENT> def common_digits(self, other): <NEW_LINE> <INDENT> commonDigitsSet = set() <NEW_LINE> for currenti in range(0, len(self)): <NEW_LINE> <INDENT> for eachi in range(0, len(other)): <NEW_LINE> <INDENT> if self[currenti] == other[eachi]: <NEW_LINE> <INDENT> commonDigitsSet.add(Sl...
Understands a series of digits
62598f791f037a2d8b9e3a3d
@log_to('tail') <NEW_LINE> class AutoencoderEval(Callable): <NEW_LINE> <INDENT> def __init__(self, sourceCategory='valid', valid_generator=None, sample_X_valid=None, seed=1, n_sample=10): <NEW_LINE> <INDENT> self.sourceCategory = sourceCategory <NEW_LINE> self.valid_generator = valid_generator <NEW_LINE> self.sample_X_...
Given autoencoder,save_dir, provide autoencoder scores for specified datasets under certain settings.
62598f79a4f1c619b294df3d
class PostDetail(generics.RetrieveUpdateDestroyAPIView): <NEW_LINE> <INDENT> serializer_class = PostSerializer <NEW_LINE> lookup_url_kwarg = 'post' <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> user_likes = Post.likes.through.objects.filter( post=OuterRef('pk'), user=self.request.user) <NEW_LINE> user_follows ...
get: Выводит указанный вопрос или рекомендацию. put: Редактирует указанный вопрос или рекомендацию. patch: Редактирует указанный вопрос или рекомендацию. delete: Удаляет указанный вопрос или рекомендацию.
62598f79be8e80087fbbe9b3
class AttendanceView(APIView): <NEW_LINE> <INDENT> permission_classes = [IsAuthenticated, ] <NEW_LINE> def get(self, request): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> token = Token.objects.filter(user=request.user).first() <NEW_LINE> if(token): <NEW_LINE> <INDENT> user = User.objects.get(auth_token=token) <NEW_LIN...
This view is used to return user's attendance that is to check user's attendance.
62598f79d10714528d69d81f
class NumericalDisplayElement(PhysicalDisplayElement): <NEW_LINE> <INDENT> _ascii_translations = {u'0': 48, u'1': 49, u'2': 50, u'3': 51, u'4': 52, u'5': 53, u'6': 54, u'7': 55, u'8': 56, u'9': 57} <NEW_LINE> def __init__(self, width_in_chars, num_segments): <NEW_LINE> <INDENT> PhysicalDisplayElement.__init__(self, wid...
Special display element that only displays numerical values
62598f7976d4e153a661c562
class LDA(Pipe): <NEW_LINE> <INDENT> input = Pipe.type.vecs <NEW_LINE> output = Pipe.type.vecs <NEW_LINE> def __init__(self, n_topics=5): <NEW_LINE> <INDENT> self.n_topics = n_topics <NEW_LINE> self.trained = False <NEW_LINE> <DEDENT> def __call__(self, vecs): <NEW_LINE> <INDENT> if not self.trained: <NEW_LINE> <INDENT...
LDA (Latent Dirichlet Allocation) model for unsupervised topic modeling. Takes vectors and returns topic vectors, which can be used for clustering.
62598f79287bf620b627150a
class BodyCom(Body): <NEW_LINE> <INDENT> def __init__(self, type, q, e, I, g, n, T, sx=0, sy=0, sz=0, name=None, m=None, r=None, d=None, a1=None, a2=None, a3=None, ep=None): <NEW_LINE> <INDENT> Body.__init__(self, type=type, name=name, m=m, r=r, d=d, a1=a1, a2=a2, a3=a3, ep=ep) <NEW_LINE> self.style = "Cometary" <NEW_L...
Class that define a body with cometary coordinates Parameters: q = periastron (in AU) e = eccentricity I = inclination (degrees) g = argument of pericentre (degrees) n = longitude of the ascending node (degrees) T = epoch of pericentre (days) sx, sy, sz : the 3 components of spin angular momentum for the body, ...
62598f7973bcbd0ca4bc9ba2
class MapField(_BaseField): <NEW_LINE> <INDENT> def __init__(self, function, constructor): <NEW_LINE> <INDENT> self.function = function <NEW_LINE> if hasattr(constructor, '_compute'): <NEW_LINE> <INDENT> self.constructor = constructor._compute <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.constructor = constructor...
A convenience field for a mapped list
62598f7926238365f5fac4c3
class LineType: <NEW_LINE> <INDENT> def __init__(self, name, d, massden, EA, MBL=0.0, cost=0.0, notes="", input_d=0.0, input_type=""): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.d = d <NEW_LINE> self.mlin = massden <NEW_LINE> self.w = (massden - np.pi / 4 * d * d * 1025) * 9.81 <NEW_LINE> self.EA = EA <NEW_LI...
A class to hold the various properties of a mooring line type
62598f790a366e3fb87dc31c
class PrivateEndpointConnectionDescription(PrivateEndpointConnection): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'system_data': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 't...
The Private Endpoint Connection resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resou...
62598f7929b78933be269d85
class UsersForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Users <NEW_LINE> fields = [ "first_name", "last_name", "age", "gender", "email", "phone_number", "active", "timezone", ] <NEW_LINE> labels = { "first_name": "First Name", "last_name": "Last Name", "age": "Age", "gender": "Gend...
A form for the Users model.
62598f7991af0d3eaad3975e
class FrameSampler(ABC): <NEW_LINE> <INDENT> def sample(self, video_length: int) -> Union[slice, List[int], List[slice]]: <NEW_LINE> <INDENT> raise NotImplementedError()
Abstract base class that all frame samplers implement. If you are creating your own sampler, you should inherit from this base class.
62598f79a05bb46b3848a1d0
class MogoFactory(base.Factory): <NEW_LINE> <INDENT> ABSTRACT_FACTORY = True <NEW_LINE> @classmethod <NEW_LINE> def _build(cls, target_class, *args, **kwargs): <NEW_LINE> <INDENT> return target_class.new(*args, **kwargs) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def _create(cls, target_class, *args, **kwargs): <NEW_L...
Factory for mogo objects.
62598f79cad5886f8bdc4c77
@add_start_docstrings( "The bare Bert Model transformer outputing raw hidden-states without any specific head on top.", TRANSFO_XL_START_DOCSTRING, TRANSFO_XL_INPUTS_DOCSTRING, ) <NEW_LINE> class TFTransfoXLModel(TFTransfoXLPreTrainedModel): <NEW_LINE> <INDENT> def __init__(self, config, *inputs, **kwargs): <NEW_LINE> ...
Outputs: `Tuple` comprising various elements depending on the configuration (config) and inputs: **last_hidden_state**: ``tf.Tensor`` of shape ``(batch_size, sequence_length, hidden_size)`` Sequence of hidden-states at the last layer of the model. **mems**: list of ``tf.Tensor`` (one for each la...
62598f791f037a2d8b9e3a3f
class TestCyclicLearningRate(test_util.TensorFlowTestCase): <NEW_LINE> <INDENT> def np_cyclic_learning_rate(self, step, lr, max_lr, step_size, mode): <NEW_LINE> <INDENT> cycle = math.floor(1. + step / (2. * step_size)) <NEW_LINE> x = math.fabs(step / step_size - 2. * cycle + 1.) <NEW_LINE> clr = (max_lr - lr) * max(0.,...
Functional test for Cyclic Learning Rate
62598f799b70327d1c57e6fa
class Lubumbashi(StaticTzInfo): <NEW_LINE> <INDENT> _zone = 'Africa/Lubumbashi' <NEW_LINE> _utcoffset = timedelta(seconds=7200) <NEW_LINE> _tzname = 'CAT'
Africa/Lubumbashi timezone definition. See datetime.tzinfo for details
62598f7907d97122c42165f6