code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
@config(category="gather", compatibilities=['windows', 'linux', 'darwin']) <NEW_LINE> class CheckVM(PupyModule): <NEW_LINE> <INDENT> dependencies = ['checkvm'] <NEW_LINE> @classmethod <NEW_LINE> def init_argparse(cls): <NEW_LINE> <INDENT> cls.arg_parser = PupyArgumentParser(prog="CheckVM", description=cls.__doc__) <NEW...
check if running on Virtual Machine
62598fab38b623060ffa9039
class Constant: <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name.lower() <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.name <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return type(self) == type(self) and self.name == other.name <NEW_LINE> <...
A logic constant is an abstraction of an object. Assertions or negations can be made of the constant's properties, which constitute a predicate.
62598fab2ae34c7f260ab082
class Week(callbacks.Plugin): <NEW_LINE> <INDENT> threaded = True <NEW_LINE> def week(self, irc, msg, args, weeknumber): <NEW_LINE> <INDENT> d = datetime.now() <NEW_LINE> curyear, curweek, _ = d.isocalendar() <NEW_LINE> ret = '' <NEW_LINE> if (weeknumber): <NEW_LINE> <INDENT> first_date = self.week_start_date(curyear, ...
Add the help for "@plugin help Week" here This should describe *how* to use this plugin.
62598fabaad79263cf42e775
class Dropout2d(Module): <NEW_LINE> <INDENT> def __init__(self, p=0.5, inplace=False): <NEW_LINE> <INDENT> super(Dropout2d, self).__init__() <NEW_LINE> self.p = p <NEW_LINE> self.inplace = inplace <NEW_LINE> <DEDENT> def forward(self, input): <NEW_LINE> <INDENT> return self._backend.Dropout2d(self.p, self.training, sel...
Randomly zeroes whole channels of the input tensor. The input is 4D (batch x channels, height, width) and each channel is of size (1, height, width). The channels to zero are randomized on every forward call. Usually the input comes from Conv2d modules. As described in the paper &quot;Efficient Object Localization Usi...
62598fabdd821e528d6d8ed6
class QuestionDetailView(generics.RetrieveAPIView): <NEW_LINE> <INDENT> serializer_class = serializers.QuestionSerializer <NEW_LINE> queryset = Question.objects.all() <NEW_LINE> lookup_url_kwarg = "q_id"
Question detail Return info about question: id, title, text, publish date, author username, tags, votes count, answers count and link to AnswerListView page.
62598fab0c0af96317c56323
class ValueIterationAgent(ValueEstimationAgent): <NEW_LINE> <INDENT> def __init__(self, mdp, discount = 0.9, iterations = 100): <NEW_LINE> <INDENT> T = mdp.getTransitionStatesAndProbs <NEW_LINE> R = mdp.getReward <NEW_LINE> Act = mdp.getPossibleActions <NEW_LINE> self.mdp = mdp <NEW_LINE> self.discount = discount <NEW_...
* Please read learningAgents.py before reading this.* A ValueIterationAgent takes a Markov decision process (see mdp.py) on initialization and runs value iteration for a given number of iterations using the supplied discount factor.
62598fab435de62698e9bd97
class ErrorInfo: <NEW_LINE> <INDENT> import_ctx = None <NEW_LINE> file = '' <NEW_LINE> type = '' <NEW_LINE> function_or_member = '' <NEW_LINE> line = 0 <NEW_LINE> message = '' <NEW_LINE> blocker = True <NEW_LINE> def __init__(self, import_ctx: List[Tuple[str, int]], file: str, typ: str, function_or_member: str, line: i...
Representation of a single error message.
62598fab56ac1b37e630218d
class IRegisteredConfEvent(IObjectEvent): <NEW_LINE> <INDENT> pass
pass
62598fab71ff763f4b5e7710
class GenButtonEvent(wx.CommandEvent): <NEW_LINE> <INDENT> def __init__(self, eventType, id): <NEW_LINE> <INDENT> wx.CommandEvent.__init__(self, eventType, id) <NEW_LINE> self.isDown = False <NEW_LINE> self.theButton = None <NEW_LINE> <DEDENT> def SetIsDown(self, isDown): <NEW_LINE> <INDENT> self.isDown = isDown <NEW_L...
Event sent from the generic buttons when the button is activated.
62598fabd58c6744b42dc2a7
class DraftsRead(object): <NEW_LINE> <INDENT> openapi_types = { 'cursor': 'Cursor', 'data': 'list[DraftMetaRead]' } <NEW_LINE> attribute_map = { 'cursor': 'cursor', 'data': 'data' } <NEW_LINE> def __init__(self, cursor=None, data=None, local_vars_configuration=None): <NEW_LINE> <INDENT> if local_vars_configuration is N...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually.
62598fab796e427e5384e735
class TestCase(TruncationTestCase): <NEW_LINE> <INDENT> async def _run_outcome(self, outcome, expecting_failure, testMethod) -> None: <NEW_LINE> <INDENT> _restore_default() <NEW_LINE> self.__db__ = Tortoise.get_connection("models") <NEW_LINE> if self.__db__.capabilities.supports_transactions: <NEW_LINE> <INDENT> connec...
An asyncio capable test class that will ensure that each test will be run at separate transaction that will rollback on finish. This is a fast test runner. Don't use it if your test uses transactions.
62598fabbd1bec0571e15094
@implementer(IPollPlugin) <NEW_LINE> @adapter(IPoll) <NEW_LINE> class PollPlugin(object): <NEW_LINE> <INDENT> @property <NEW_LINE> def name(self): <NEW_LINE> <INDENT> raise NotImplementedError("Must be provided by subclass") <NEW_LINE> <DEDENT> @property <NEW_LINE> def title(self): <NEW_LINE> <INDENT> raise NotImplemen...
Base class for poll plugins. Subclass this to make your own. It's not usable by itself, since it doesn't implement the required interfaces. See :mod:`voteit.core.models.interfaces.IPollPlugin` for documentation.
62598fabdd821e528d6d8ed7
class mympirun_vsc_install_scripts(vsc_install_scripts): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> vsc_install_scripts.run(self) <NEW_LINE> for script in self.original_outfiles: <NEW_LINE> <INDENT> if script.endswith(".py") or script.endswith(".sh"): <NEW_LINE> <INDENT> script = script[:-3] <NEW_LINE> <DED...
Create the (fake) links for mympirun also remove .sh and .py extensions from the scripts
62598fab30dc7b766599f7ef
class FollowView(APIView): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def post(request): <NEW_LINE> <INDENT> request_user = request.user <NEW_LINE> target_user_id = int(request.data.get('target_user')) <NEW_LINE> target_user = get_user_model().objects.get(pk=target_user_id) <NEW_LINE> create_follow_relationship(reque...
A class based view to create and look up follow relationship.
62598fab1f5feb6acb162bc2
class Person: <NEW_LINE> <INDENT> total = 0 <NEW_LINE> def __init__(self, _name, _age): <NEW_LINE> <INDENT> Person.total += 1 <NEW_LINE> self.name = _name <NEW_LINE> self.age = _age <NEW_LINE> <DEDENT> def getAge(self): <NEW_LINE> <INDENT> return self.age <NEW_LINE> <DEDENT> def getName(self): <NEW_LINE> <INDENT> retur...
Person Class with Name and Age as Properties and Total as a Static Property
62598fab2c8b7c6e89bd3768
class Worker(QRunnable): <NEW_LINE> <INDENT> def __init__(self, fn, *args, **kwargs): <NEW_LINE> <INDENT> super(Worker, self).__init__() <NEW_LINE> self.fn = fn <NEW_LINE> self.args = args <NEW_LINE> self.kwargs = kwargs <NEW_LINE> self.signals = WorkerSignals() <NEW_LINE> self.kwargs['progress_callback'] = self.signal...
Worker thread Inherits from QRunnable to handler worker thread setup, signals and wrap-up. :param callback: The function callback to run on this worker thread. Supplied args and kwargs will be passed through to the runner. :type callback: function :param args: Arguments to pass to the callback functio...
62598fab460517430c43202e
class Track(object): <NEW_LINE> <INDENT> def __init__( self, filename, track_id=None, track_artist=None, track_title=None, subset=None, path=None ): <NEW_LINE> <INDENT> self.filename = filename <NEW_LINE> try: <NEW_LINE> <INDENT> split_name = filename.split(' - ') <NEW_LINE> self.id = int(split_name[0]) <NEW_LINE> self...
An audio Track which is mixture of several sources and provides several targets Attributes ---------- name : str Track name path : str Absolute path of mixture audio file subset : {'Test', 'Dev'} belongs to subset targets : OrderedDict OrderedDict of mixted Targets for this Track sources : Dict ...
62598faba8370b77170f037e
class ActionNetwork(object): <NEW_LINE> <INDENT> def __init__(self, p_values, low_action, high_action, stochastic, eps, theta=0.15, sigma=0.2, use_gaussian_noise=False, act_noise=0.1, is_target=False, target_noise=0.2, noise_clip=0.5, parameter_noise=False): <NEW_LINE> <INDENT> deterministic_actions = ( (high_action - ...
Acts as a stochastic policy for inference, but a deterministic policy for training, thus ignoring the batch_size issue when constructing a stochastic action.
62598fab1b99ca400228f501
class Renderer(FPDF): <NEW_LINE> <INDENT> def __init__(self, music_box_object, paper_size=(279.4, 215.9), strip_separation=0, style={}): <NEW_LINE> <INDENT> super().__init__("l", "mm", paper_size) <NEW_LINE> self.set_author("Mexomagno") <NEW_LINE> self.set_auto_page_break(True) <NEW_LINE> self.set_margins(8, 6, 8) <NEW...
Represents a music box document. All units in mm except for fonts, which are in points.
62598fab7c178a314d78d43f
@generic_repr <NEW_LINE> class ActionAbapRsusr002__IT_ACTGRPS(Base, StandardAuthSelectionOptionMixin, BaseMixin): <NEW_LINE> <INDENT> __tablename__ = pluginName+'__IT_ACTGRPS' <NEW_LINE> __table_args__ = {'extend_existing':True} <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> parent_id = Column(Integer, Fo...
Selection Options for Roles
62598fab44b2445a339b6941
class BackupPolicyDetails(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'backup_policy_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'volumes_assigned': {'readonly': True}, 'volume_backups': {'reado...
Backup policy properties. 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: A ...
62598fab0c0af96317c56325
class purchase_view_details(template): <NEW_LINE> <INDENT> def get(self, request, transaction_number): <NEW_LINE> <INDENT> r = requests.get(url = PURCHASE_TRANSACTION, params = {'transaction_number':transaction_number}) <NEW_LINE> if r.status_code is 200: <NEW_LINE> <INDENT> json_data = r.json() <NEW_LINE> if hasUpdate...
classdocs
62598fab851cf427c66b825f
class NODE_OT_template_add(Operator): <NEW_LINE> <INDENT> bl_idname = "node.template_add" <NEW_LINE> bl_label = "Add node group template" <NEW_LINE> bl_description = "Add node group template" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> filepath: StringProperty( subtype='FILE_PATH', ) <NEW_LINE> group_name: ...
Add a node template
62598fab7047854f4633f37d
class RegisterView(View): <NEW_LINE> <INDENT> def get(self,requset): <NEW_LINE> <INDENT> return render(requset,"register.html") <NEW_LINE> <DEDENT> def post(self,request): <NEW_LINE> <INDENT> user_name = request.POST.get("user_name") <NEW_LINE> password = request.POST.get("pwd") <NEW_LINE> email = request.POST.get("ema...
类视图:处理注册
62598fab2ae34c7f260ab085
class FactorMixture(Factor): <NEW_LINE> <INDENT> def accept(self, visitor, *args, **kwargs): <NEW_LINE> <INDENT> return visitor.visit_factor_mixture(self, *args, **kwargs) <NEW_LINE> <DEDENT> def __init__(self, x, factors, _lambda): <NEW_LINE> <INDENT> self.x = x <NEW_LINE> self.factors = list(factors) <NEW_LINE> self....
A factor in a factor graph that models a mixture of several other factors.
62598fab4f6381625f199490
class TestPersonAgent(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> logging.basicConfig(format="%(levelname)s %(asctime)s: %(message)s", level=logging.DEBUG) <NEW_LINE> self.sim = Simulation(number_of_floors=10) <NEW_LINE> self.ctrl = ElevatorBank(self.sim) <NEW_LINE> self.first_elevator ...
Test case docstring.
62598fab21bff66bcd722c0a
class Named(type): <NEW_LINE> <INDENT> _names = {} <NEW_LINE> def __new__(metacls, name, bases, attrs): <NEW_LINE> <INDENT> name = attrs['name'] <NEW_LINE> iface = attrs['iface'] <NEW_LINE> cls = metacls._names.setdefault(name, {}).get(iface) <NEW_LINE> if cls is None: <NEW_LINE> <INDENT> cls = super(Named, metacls).__...
Metaclass to implement named lookup of dependencies
62598faba219f33f346c67ba
class RNet(nn.Module): <NEW_LINE> <INDENT> def __init__(self,is_train=False, use_cuda=True): <NEW_LINE> <INDENT> super(RNet, self).__init__() <NEW_LINE> self.is_train = is_train <NEW_LINE> self.use_cuda = use_cuda <NEW_LINE> self.pre_layer = nn.Sequential( nn.Conv2d(3, 28, kernel_size=3, stride=1), nn.PReLU(), nn.MaxPo...
RNet
62598fab435de62698e9bd9a
class FilterWordsPipeline(object): <NEW_LINE> <INDENT> words_to_filter = ['politics', 'religion'] <NEW_LINE> def process_item(self, item, spider): <NEW_LINE> <INDENT> if re.match(r'^.*((\))|(\()|(船只)|(沙箱)|(规范)|(信条)|(维基)|(名片)|(版权)|(军备)|(药品)|(百科)|(严肃)|(方针)|(管理)|(申请)|(指南)|(/)|(\.\.\.)|(的)|(第[一二三四五六七八九十])).*$', item['name'...
A pipeline for filtering out items which contain certain words in their description
62598fab4428ac0f6e6584c8
class PotentiallyInvisibleTab(WaitTab): <NEW_LINE> <INDENT> def select(self): <NEW_LINE> <INDENT> if not self.is_displayed: <NEW_LINE> <INDENT> self.logger.info("Tab not present and ignoring turned on - not touching the tab.") <NEW_LINE> return <NEW_LINE> <DEDENT> return super(PotentiallyInvisibleTab, self).select()
Tab, that can be potentially invisible.
62598fab2c8b7c6e89bd3769
class DecoupledFactTable(pygrametl.parallel.Decoupled): <NEW_LINE> <INDENT> def __init__(self, facttbl, returnvalues=True, consumes=(), attstoconsume=(), batchsize=500, queuesize=200): <NEW_LINE> <INDENT> pygrametl.parallel.Decoupled.__init__( self, facttbl, returnvalues, consumes, tuple([(0, a) for a in attstoconsume]...
A FactTable-like class that enables parallelism by executing all operations on a given FactTable in a separate, dedicated process (that FactTable is said to be "decoupled").
62598fab32920d7e50bc5ff9
class Point: <NEW_LINE> <INDENT> def __init__(self, pointname, x, y, h): <NEW_LINE> <INDENT> self.PointName = pointname <NEW_LINE> self.X = x <NEW_LINE> self.Y = y <NEW_LINE> self.H = h <NEW_LINE> <DEDENT> def Cal_Distans(self, x0, y0): <NEW_LINE> <INDENT> d = math.sqrt(math.pow(x0-self.X, 2)+math.pow(y0-self.Y, 2)) <N...
包含 点名 数学坐标X 数学坐标Y 高程(z)H
62598fabf548e778e596b548
class EditMirror9Test(BaseTest): <NEW_LINE> <INDENT> fixtureCmds = ["aptly mirror create -keyring=aptlytest.gpg mirror9 http://pkg.jenkins-ci.org/debian-stable binary/"] <NEW_LINE> fixtureGpg = True <NEW_LINE> runCmd = "aptly mirror edit -with-udebs mirror9" <NEW_LINE> expectedCode = 1
edit mirror: flat mirror with udebs
62598fab498bea3a75a57ac2
class Testwhat_ext(UnitTestBase): <NEW_LINE> <INDENT> def get_ext_dir(self): <NEW_LINE> <INDENT> return os.path.join(self.datadir, 'ext') <NEW_LINE> <DEDENT> def setUp(self): <NEW_LINE> <INDENT> UnitTestBase.setUp(self) <NEW_LINE> self._files = ['a.txt', 'b.html', 'c.txtl', 'español.txt'] <NEW_LINE> os.mkdir(self.get_e...
tools.what_ext
62598fabaad79263cf42e778
class ContractSyncronizeUnitTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_syncronize_success(self): <NEW_LINE> <INDENT> my_contract = Contract("0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae") <NEW_LINE> self.assertEqual(my_contract.last_syncronization, None) <NEW_LINE> my_contract.syncronize() <NEW_LINE> self.asse...
Tests on contracts syncronization
62598fab10dbd63aa1c70b58
class pWB_shortcuts: <NEW_LINE> <INDENT> def __init__(self,parent): <NEW_LINE> <INDENT> self.back_sc = QShortcut(QKeySequence(parent.tr("Ctrl+H")),parent) <NEW_LINE> self.reload_sc = QShortcut(QKeySequence(parent.tr("F5")),parent) <NEW_LINE> self.urld_sc = QShortcut(QKeySequence(parent.tr("Ctrl+G")),parent) <NEW_LINE> ...
Class that holds all keyboard shortcuts for pWB
62598fab01c39578d7f12d24
class New(models.Model): <NEW_LINE> <INDENT> title = models.CharField( 'Заголовок', max_length=140, unique_for_date='update' ) <NEW_LINE> description = models.TextField( 'Описание', max_length=140 ) <NEW_LINE> content = models.TextField( 'Содержание' ) <NEW_LINE> pubdate = models.DateTimeField( 'Дата публикации', auto_...
Model of news.
62598fab009cb60464d014c5
class ModelComposition(ModelDefinition): <NEW_LINE> <INDENT> def __init__(self, kwds): <NEW_LINE> <INDENT> ModelDefinition.__init__(self, kwds) <NEW_LINE> self.description = None <NEW_LINE> self.model = [] <NEW_LINE> self.initialization = [] <NEW_LINE> self.inputlink=[] <NEW_LINE> self.outputlink=[] <NEW_LINE> self.int...
Formal description of a Model Composite.
62598fab44b2445a339b6942
class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler): <NEW_LINE> <INDENT> def handle(self): <NEW_LINE> <INDENT> self.announce = announce <NEW_LINE> data = self.request.recv(1024) <NEW_LINE> cur_thread = threading.current_thread() <NEW_LINE> if data is not None: <NEW_LINE> <INDENT> self.announce.uppercase(da...
Echo data back in uppercase
62598fab442bda511e95c3fc
class Place(object): <NEW_LINE> <INDENT> def __init__(self, name, exit=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.exit = exit <NEW_LINE> self.bees = [] <NEW_LINE> self.ant = None <NEW_LINE> self.entrance = None <NEW_LINE> if self.exit != None: <NEW_LINE> <INDENT> self.exit.entrance = self <NEW_LINE> <D...
A Place holds insects and has an exit to another Place.
62598fab4f6381625f199491
class Writer(object): <NEW_LINE> <INDENT> def __init__(self, request): <NEW_LINE> <INDENT> self.request = request <NEW_LINE> <DEDENT> def write(self, data): <NEW_LINE> <INDENT> f = self.request.get_wfile() <NEW_LINE> self.write = f <NEW_LINE> return self.write(data)
Perform a start_response if need be when we start writing.
62598faba8370b77170f0381
class UnitTestTypes(DynamicTypeEnum): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_unittest_enum_class() -> List[DynamicTypeEnum]: <NEW_LINE> <INDENT> from ..project.constants import Unittest_Module_Folder <NEW_LINE> try: <NEW_LINE> <INDENT> return DynamicTypeEnum.get_dynamic_class_enum_class(Unittest_Module_Fo...
base abstract unitest enum class
62598fab32920d7e50bc5ffa
class Dashboard(models.Model): <NEW_LINE> <INDENT> slug = models.SlugField(unique=True) <NEW_LINE> sites = models.ManyToManyField(Site, blank=True) <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return self.slug
A group of featured stuff.
62598fab63d6d428bbee2750
class LearningRateSchedulerInvSqrtT(LearningRateScheduler): <NEW_LINE> <INDENT> def __init__(self, updates_per_checkpoint: int, half_life: int, warmup: int = 0) -> None: <NEW_LINE> <INDENT> super().__init__(warmup) <NEW_LINE> check_condition(updates_per_checkpoint > 0, "updates_per_checkpoint needs to be > 0.") <NEW_LI...
Learning rate schedule: lr / sqrt(1 + factor * t). Note: The factor is calculated from the half life of the learning rate. :param updates_per_checkpoint: Number of batches between checkpoints. :param half_life: Half life of the learning rate in number of checkpoints. :param warmup: Number of (linear) learning rate inc...
62598fab99cbb53fe6830e7d
class StartDownload(BackendMessage): <NEW_LINE> <INDENT> def __init__(self, id_): <NEW_LINE> <INDENT> self.id = id_ <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return BackendMessage.__repr__(self) + (", id: %s" % self.id)
Start downloading an item.
62598fabac7a0e7691f724af
class GatherRemoteMongoCoredumps(PowercycleCommand): <NEW_LINE> <INDENT> COMMAND = "gatherRemoteMongoCoredumps" <NEW_LINE> def execute(self) -> None: <NEW_LINE> <INDENT> aws_ec2_yml = self.expansions["aws_ec2_yml"] <NEW_LINE> if os.path.exists(aws_ec2_yml) and os.path.isfile( aws_ec2_yml) or "ec2_ssh_failure" in self.e...
Gather Remote Mongo Coredumps.
62598fab66673b3332c30371
class PrincipalError(FaraException): <NEW_LINE> <INDENT> pass
Raised when there is a problem with a principal data
62598fab7cff6e4e811b59d2
class Image(object): <NEW_LINE> <INDENT> def __init__(self, filepath='', url='', collection_filepath='', metadata=None): <NEW_LINE> <INDENT> self.data = None <NEW_LINE> self.filepath = filepath <NEW_LINE> self.url = url <NEW_LINE> self.collection_filepath = '' <NEW_LINE> if filepath != '': <NEW_LINE> <INDENT> with cont...
Class representing an image. Image on filesystem: >>> from tineyeservices import Image >>> image = Image(filepath='/path/to/image.jpg', collection_filepath='collection.jpg') Image URL: >>> image = Image(url='https://tineye.com/images/meloncat.jpg', collection_filepath='collection.jpg') Image with metad...
62598fab92d797404e388b37
class XiaomiGenericCover(XiaomiDevice, CoverDevice): <NEW_LINE> <INDENT> def __init__(self, device, name, data_key, xiaomi_hub): <NEW_LINE> <INDENT> self._data_key = data_key <NEW_LINE> self._pos = 0 <NEW_LINE> XiaomiDevice.__init__(self, device, name, xiaomi_hub) <NEW_LINE> <DEDENT> @property <NEW_LINE> def current_co...
Representation of a XiaomiGenericCover.
62598fab4e4d5625663723cc
class NonCancellableAPI(BaseFakeAPI): <NEW_LINE> <INDENT> _job_status = [ {'status': 'RUNNING'}, {'status': 'RUNNING'}, {'status': 'RUNNING'} ]
Class for emulating an API without cancellation running a long job.
62598fab7d43ff24874273d5
class LinuxExtractor(Extractor): <NEW_LINE> <INDENT> def extract(self): <NEW_LINE> <INDENT> if os.path.exists("/tmp/cuda-installer.log"): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> os.remove("/tmp/cuda-installer.log") <NEW_LINE> <DEDENT> except OSError as e: <NEW_LINE> <INDENT> raise RuntimeError( "Failed to remove /...
The Linux Extractor
62598fab2c8b7c6e89bd376b
class RuleSpec(BaseModel): <NEW_LINE> <INDENT> rule = models.CharField(max_length=50, blank=True) <NEW_LINE> name = models.TextField(blank=True) <NEW_LINE> checks = JSONField(default=[], schema=[basestring])
A rule specification in a classifier.
62598fab5166f23b2e24337f
class Segmentation: <NEW_LINE> <INDENT> def __init__(self, file_path, output_path): <NEW_LINE> <INDENT> self.file_path = file_path <NEW_LINE> self.output_path = output_path <NEW_LINE> <DEDENT> def read_file(self): <NEW_LINE> <INDENT> fileTrainRead = [] <NEW_LINE> for txt_name in self.file_path: <NEW_LINE> <INDENT> with...
中文分词类
62598fab460517430c432030
class ToolAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> form = ToolForm <NEW_LINE> list_display = [ 'name', 'version', 'in_last_update', ] <NEW_LINE> list_filter = [ 'in_last_update', ] <NEW_LINE> ordering = [ 'enabled', 'in_last_update', 'name', 'version', ] <NEW_LINE> readonly_fields = [ 'name', 'version', 'descriptio...
Admin site definitions for the Tool model.
62598fab3cc13d1c6d465712
class MoeExampleTestCase(T.TestCase): <NEW_LINE> <INDENT> @T.class_setup <NEW_LINE> def create_webapp(self): <NEW_LINE> <INDENT> from moe import main <NEW_LINE> app = main({}, use_mongo='false') <NEW_LINE> from webtest import TestApp <NEW_LINE> self.testapp = TestApp(app)
Base class for testing the moe examples.
62598fab76e4537e8c3ef554
@attr.s <NEW_LINE> class RtcpRtpfbPacket: <NEW_LINE> <INDENT> fmt = attr.ib() <NEW_LINE> ssrc = attr.ib() <NEW_LINE> media_ssrc = attr.ib() <NEW_LINE> lost = attr.ib(default=attr.Factory(list)) <NEW_LINE> def __bytes__(self): <NEW_LINE> <INDENT> payload = pack('!LL', self.ssrc, self.media_ssrc) <NEW_LINE> if self.lost:...
Generic RTP Feedback Message (RFC 4585).
62598fab5fdd1c0f98e5df3d
class Rule(KLCRule): <NEW_LINE> <INDENT> def __init__(self, component): <NEW_LINE> <INDENT> super(Rule, self).__init__(component, 'Rule 3.2', 'For black-box symbols, pins have a length of 100mils. Large pin numbers can be accommodated by incrementing the width in steps of 50mil.') <NEW_LINE> <DEDENT> def check(self): <...
Create the methods check and fix to use with the kicad lib files.
62598fab99fddb7c1ca62dbc
class ChannelParticipantCreator(TLObject): <NEW_LINE> <INDENT> __slots__ = ["user_id", "rank"] <NEW_LINE> ID = 0x808d15a4 <NEW_LINE> QUALNAME = "types.ChannelParticipantCreator" <NEW_LINE> def __init__(self, *, user_id: int, rank: str = None): <NEW_LINE> <INDENT> self.user_id = user_id <NEW_LINE> self.rank = rank <NEW_...
Attributes: LAYER: ``112`` Attributes: ID: ``0x808d15a4`` Parameters: user_id: ``int`` ``32-bit`` rank (optional): ``str``
62598fab99cbb53fe6830e7e
class Solution: <NEW_LINE> <INDENT> def lowestCommonAncestor(self, root, A, B): <NEW_LINE> <INDENT> common, _, _ = self.helper(root, A, B) <NEW_LINE> return common <NEW_LINE> <DEDENT> def helper(self, root, A, B): <NEW_LINE> <INDENT> if root is None: <NEW_LINE> <INDENT> return None, False, False <NEW_LINE> <DEDENT> lca...
@param: root: The root of the binary search tree. @param: A: A TreeNode in a Binary. @param: B: A TreeNode in a Binary. @return: Return the least common ancestor(LCA) of the two nodes.
62598fab7c178a314d78d444
class NSNitroNserrInvalnodeid(NSNitroBaseErrors): <NEW_LINE> <INDENT> pass
Nitro error code 362 Invalid node ID specified
62598fab851cf427c66b8263
class DeleteImageCachesResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RequestId = params.get("RequestId")
DeleteImageCaches返回参数结构体
62598fabf548e778e596b54b
class CompiledSource(object): <NEW_LINE> <INDENT> def __init__(self, src, kernel_name): <NEW_LINE> <INDENT> self.src = src <NEW_LINE> self.kernel_name = kernel_name <NEW_LINE> self.module = None <NEW_LINE> self.kernel = None <NEW_LINE> <DEDENT> def __call__(self, *args, **kw): <NEW_LINE> <INDENT> if self.module is None...
Compile a source string with PyCuda, caching the resulting module.
62598fab01c39578d7f12d26
class MnistDatabase(Database): <NEW_LINE> <INDENT> def __repr__(self): <NEW_LINE> <INDENT> return f'{type(self).__name__}()' <NEW_LINE> <DEDENT> @cached_property.cached_property <NEW_LINE> def data(self): <NEW_LINE> <INDENT> from appdirs import user_cache_dir <NEW_LINE> path = Path(user_cache_dir('padercontrib')) / 'fg...
>>> db = MnistDatabase() >>> db.get_dataset('train') DictDataset(name='train', len=60000) MapDataset(_pickle.loads) >>> db.get_dataset('test') DictDataset(name='test', len=10000) MapDataset(_pickle.loads) >>> db.get_dataset('test')[0]['image'].shape (28, 28) >>> db.get_dataset('test')[0]['digit'] 7 >>> type(db.get_...
62598fab66656f66f7d5a397
class SparkDataSources(object): <NEW_LINE> <INDENT> def __init__(self, idDfMapping=dict()): <NEW_LINE> <INDENT> super(SparkDataSources, self).__init__() <NEW_LINE> self._idDfMapping = idDfMapping <NEW_LINE> <DEDENT> def to_java_object(self): <NEW_LINE> <INDENT> jvm_object = _jvm() <NEW_LINE> elems = [] <NEW_LINE> for k...
SparkDataSources wrapper class
62598fabdd821e528d6d8edc
class RevisionMismatchError(ArangoRequestError): <NEW_LINE> <INDENT> pass
There was a mismatch between expected and actual revision.
62598faba8370b77170f0383
class Hasher: <NEW_LINE> <INDENT> __slots__ = [ 'additional_data', 'backend', 'hash_len', 'iterations', 'lanes', 'memory_size', 'salt', 'secret_key', 'threads', 'variant', 'version' ] <NEW_LINE> def __init__( self, *, secret_key: Union[bytes, str, None], additional_data: Union[bytes, str, None] = None, backe...
A class that knows how to hash
62598fab8e7ae83300ee9049
class MetricTree(Metric): <NEW_LINE> <INDENT> def __init__(self, metric): <NEW_LINE> <INDENT> super(MetricTree, self).__init__(metric.name) <NEW_LINE> self.root = metric <NEW_LINE> self.children = [] <NEW_LINE> <DEDENT> def add_child(self, child): <NEW_LINE> <INDENT> self.children.append(child) <NEW_LINE> <DEDENT> def ...
A tree structure which has a node :class:`Metric` and some children. Upon execution, the node is called with the input and its output is passed to each of the children. A dict is updated with the results. :param metric: The metric to act as the root node of the tree / subtree :type metric: Metric
62598fab8c0ade5d55dc3665
class BoundedArraySpec(ArraySpec): <NEW_LINE> <INDENT> __slots__ = ('_minimum', '_maximum') <NEW_LINE> def __init__(self, shape, dtype, minimum, maximum, name=None): <NEW_LINE> <INDENT> super(BoundedArraySpec, self).__init__(shape, dtype, name) <NEW_LINE> self._minimum = minimum <NEW_LINE> self._maximum = maximum <NEW_...
An `ArraySpec` that specifies minimum and maximum values. Example usage: ```python # Specifying the same minimum and maximum for every element. spec = BoundedArraySpec((3, 4), np.float64, minimum=0.0, maximum=1.0) # Specifying a different minimum and maximum for each element. spec = BoundedArraySpec( (2,), np.flo...
62598fab4a966d76dd5eee88
class ControllerTests(unittest.TestCase): <NEW_LINE> <INDENT> def test_controller_tick(self): <NEW_LINE> <INDENT> self.pump = Pump('127.0.0.1', 8000) <NEW_LINE> self.pump.set_state = MagicMock(return_value = True) <NEW_LINE> self.pump.get_state = MagicMock(return_value = "PUMP_IN") <NEW_LINE> self.sensor = Sensor('127....
Unit tests for the Controller class
62598fab85dfad0860cbfa47
class FeatureChart(Chart): <NEW_LINE> <INDENT> def select(self, **restrictions): <NEW_LINE> <INDENT> if restrictions == {}: <NEW_LINE> <INDENT> return iter(self._edges) <NEW_LINE> <DEDENT> restr_keys = sorted(restrictions.keys()) <NEW_LINE> restr_keys = tuple(restr_keys) <NEW_LINE> if restr_keys not in self._indexes: <...
A Chart for feature grammars. :see: ``Chart`` for more information.
62598fab1b99ca400228f503
class GaussianNoiseAnnealing(Callback): <NEW_LINE> <INDENT> def __init__(self, parameters, eta=0.3, gamma=0.55): <NEW_LINE> <INDENT> self._parameters = parameters <NEW_LINE> self._eta = eta <NEW_LINE> self._gamma = gamma <NEW_LINE> super(GaussianNoiseAnnealing, self).__init__() <NEW_LINE> <DEDENT> def before_step(self)...
Add gaussian noise to the gradients. Add gaussian noise to the gradients with the given mean & std. The std will decrease at each batch up to 0. # References: - Adding Gradient Noise Improves Learning for Very Deep Networks - https://arxiv.org/abs/1511.06807 :param eta: TODO :param gamma: Decay rate.
62598fabbd1bec0571e15097
class AvgScore(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.reset() <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT> self.num_steps = 0 <NEW_LINE> self.total_score = 0. <NEW_LINE> self.total_scores = None <NEW_LINE> <DEDENT> def add(self, score): <NEW_LINE> <INDENT> if isinstance(score, l...
Calcuatlate avg scores, input can be single value or list Not using numpy, so may be much slower then numpy version, now mainly used for tensorflow testers
62598fab851cf427c66b8264
class IsAdmin(BasePermission): <NEW_LINE> <INDENT> def has_permission(self, request, view): <NEW_LINE> <INDENT> return request.user and request.user.is_authenticated and request.user.is_admin
Allows access only to admin users.
62598fab5fcc89381b266120
@dataclass <NEW_LINE> class AvanzaFondDAO(BaseDao): <NEW_LINE> <INDENT> id: int <NEW_LINE> name: str <NEW_LINE> description: str <NEW_LINE> NAV: str <NEW_LINE> changeSinceOneMonth: str <NEW_LINE> changeSinceThreeMonths: str <NEW_LINE> prospectus: str <NEW_LINE> tradingCurrency: str
The Dao for interesting information about a fund from Fond Marknaden.
62598fac92d797404e388b38
class FATFS(FS): <NEW_LINE> <INDENT> _type = "vfat" <NEW_LINE> _modules = ["vfat"] <NEW_LINE> _labelfs = fslabeling.FATFSLabeling() <NEW_LINE> _supported = True <NEW_LINE> _formattable = True <NEW_LINE> _max_size = Size("1 TiB") <NEW_LINE> _packages = ["dosfstools"] <NEW_LINE> _fsck_class = fsck.DosFSCK <NEW_LINE> _mkf...
FAT filesystem.
62598fac3317a56b869be51e
class GdocsCrawlerController: <NEW_LINE> <INDENT> gdc = GdocsCrawler <NEW_LINE> _event_list = [] <NEW_LINE> _event_index_list = [] <NEW_LINE> _event_id_list = [] <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.gdc = GdocsCrawler() <NEW_LINE> <DEDENT> @property <NEW_LINE> def event_list(self): <NEW_LINE> <INDENT...
GdocsCrawlerController ---------- A controller for the GdocsCrawler. It takes care of validating the events that the GdocsCrawler returns, adds them to the database if they are valid and not duplicates of events already parsed.
62598fac090684286d5936b0
class STS(RegressionTask): <NEW_LINE> <INDENT> def __init__(self, config: configure_finetuning.FinetuningConfig, tokenizer): <NEW_LINE> <INDENT> super(STS, self).__init__(config, "sts", tokenizer, 0.0, 5.0) <NEW_LINE> <DEDENT> def _create_examples(self, lines, split): <NEW_LINE> <INDENT> examples = [] <NEW_LINE> if spl...
Semantic Textual Similarity.
62598facdd821e528d6d8edd
class WAR_Card(cards.Card): <NEW_LINE> <INDENT> ACE_VALUE = 1 <NEW_LINE> @property <NEW_LINE> def value(self): <NEW_LINE> <INDENT> if self.is_face_up: <NEW_LINE> <INDENT> v = WAR_Card.RANKS.index(self.rank) + 1 <NEW_LINE> if v > 10: <NEW_LINE> <INDENT> v = 10 <NEW_LINE> <DEDENT> <DEDENT> else: <NEW_LINE> <INDENT> v = N...
Карта для игры в Блек-джек.
62598fac4e4d5625663723ce
class Tracking(lyrebird.PluginView): <NEW_LINE> <INDENT> def index(self): <NEW_LINE> <INDENT> return self.render_template('index.html') <NEW_LINE> <DEDENT> def get_result(self): <NEW_LINE> <INDENT> return jsonify({'result': app_context.result_list}) <NEW_LINE> <DEDENT> def get_content(self, id=''): <NEW_LINE> <INDENT> ...
tracking插件视图
62598fac5166f23b2e243381
class LockedDropout(nn.Module): <NEW_LINE> <INDENT> def __init__(self, drop): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.drop = nn.Dropout(drop) <NEW_LINE> <DEDENT> def forward(self, x): <NEW_LINE> <INDENT> mask = self.drop(torch.ones(1, x.size(1), x.size(2)).cuda()) <NEW_LINE> return mask * x
Locked dropout layer. Input is 3D tensor, dropout along dimension 0 is constant at every forward call.
62598fac01c39578d7f12d27
class FBNamespaceAction (object): <NEW_LINE> <INDENT> kFBConcatNamespace=property(doc="Use to add a namespace name to object. ") <NEW_LINE> kFBReplaceNamespace=property(doc="Use to replace a define namespace. ") <NEW_LINE> kFBRemoveAllNamespace=property(doc="Remove all the namespace name. ") <NE...
Namespace flags.
62598fac23849d37ff85105d
@override_settings(ALLOWED_HOSTS=['rdap.example']) <NEW_LINE> class TestNameserverToDict(SimpleTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.request = RequestFactory(HTTP_HOST='rdap.example').get('/dummy/') <NEW_LINE> <DEDENT> def test_simple(self): <NEW_LINE> <INDENT> nameserver = NameServer...
Test `rdap.rdap_rest.domain.nameserver_to_dict` function.
62598facfff4ab517ebcd78e
class ConversationMessageFactory(DjangoModelFactory): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = ConversationMessageModel <NEW_LINE> strategy = CREATE_STRATEGY <NEW_LINE> <DEDENT> body = Faker('text') <NEW_LINE> sent_at = now()
Factory for message creation
62598facbaa26c4b54d4f25b
class Tv(Video): <NEW_LINE> <INDENT> def __init__(self,title,box_art,poster_image_url,trailer_youtube_url,broadcaster): <NEW_LINE> <INDENT> Video.__init__(self,title,box_art,poster_image_url,trailer_youtube_url) <NEW_LINE> self.broadcaster = broadcaster <NEW_LINE> <DEDENT> def show_trailer(self): <NEW_LINE> <INDENT> we...
Child Class Object that is inherited from Parent Class Object
62598fac851cf427c66b8265
class ForkChildVortex(object): <NEW_LINE> <INDENT> def __init__(self, vortexClientProtocol): <NEW_LINE> <INDENT> assert isinstance(vortexClientProtocol, VortexPayloadProtocol) <NEW_LINE> self._vortexClientProtocol = vortexClientProtocol <NEW_LINE> <DEDENT> def uuid(self): <NEW_LINE> <INDENT> return self._vortexClientPr...
VortexServer The static instance of the controller
62598fac91f36d47f2230e7a
class TestNormalizedAction(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 testNormalizedAction(self): <NEW_LINE> <INDENT> model = artikcloud.models.normalized_action.NormalizedAction()
NormalizedAction unit test stubs
62598fac1f037a2d8b9e4097
class MdiChild(pmonitor.Monitor): <NEW_LINE> <INDENT> def __init__(self, fio, cmds, info, title='X', mmax=100): <NEW_LINE> <INDENT> super(MdiChild, self).__init__(fio, cmds, info, title, mmax)
Create instance of pmonitor.Monitor
62598fac0c0af96317c5632b
class MagnitudeSigmaIMTTrellis(MagnitudeIMTTrellis): <NEW_LINE> <INDENT> def _build_plot(self, ax, i_m, gmvs): <NEW_LINE> <INDENT> self.labels = [] <NEW_LINE> self.lines = [] <NEW_LINE> for gmpe in self.gsims: <NEW_LINE> <INDENT> self.labels.append(gmpe.__class__.__name__) <NEW_LINE> line, = ax.plot(self.magnitudes, gm...
Creates the Trellis plot for the standard deviations
62598fac55399d3f056264cd
class LoginHelper(object): <NEW_LINE> <INDENT> def do_login(self, data): <NEW_LINE> <INDENT> return self.client.post( f"{reverse('login')}?next=/openid/authorize/" f"%3Fresponse_type%3Dcode%26scope%3Dopenid%26client_id" f"%3Dmigration_client_id%26redirect_uri%3Dhttp%3A%2F%2F" f"example.com%2F%26state%3D3G3Rhw9O5n0okXjZ...
Test urls can be handled a bit better, however this was the fastest way to refactor the existing tests.
62598fac1b99ca400228f504
class prop_writer (object): <NEW_LINE> <INDENT> def __init__ (self, filepath, transform, scene): <NEW_LINE> <INDENT> self.lib = dsf.path_util.daz_library (filepath = filepath) <NEW_LINE> self.scene = scene <NEW_LINE> self.duf_libpath = self.lib.get_libpath (filepath) <NEW_LINE> self.transform = transform <NEW_LINE> <DE...
write props for a single export-operation.
62598fac7d847024c075c36d
class DSfloat(float): <NEW_LINE> <INDENT> __slots__ = 'original_string' <NEW_LINE> def __init__(self, val): <NEW_LINE> <INDENT> if isinstance(val, (str, compat.text_type)): <NEW_LINE> <INDENT> self.original_string = val <NEW_LINE> <DEDENT> elif isinstance(val, (DSfloat, DSdecimal)) and hasattr(val, 'original_string'): ...
Store values for DICOM VR of DS (Decimal String) as a float. If constructed from an empty string, return the empty string, not an instance of this class.
62598fac10dbd63aa1c70b5c
class Model(peewee.Model): <NEW_LINE> <INDENT> uid = peewee.PrimaryKeyField(unique=True, index=True) <NEW_LINE> uts = peewee.DateTimeField(default=datetime.datetime.now, index=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> database = db.pool <NEW_LINE> order_by = ('-uts', )
Common db model: uid - primary key uts - timestamp (auto on creation)
62598fac85dfad0860cbfa48
class NetworkNamespace(object): <NEW_LINE> <INDENT> CLONE_NEWNET = 0x40000000 <NEW_LINE> @staticmethod <NEW_LINE> def _error_handler(result, func, arguments): <NEW_LINE> <INDENT> if result == -1: <NEW_LINE> <INDENT> errno = ctypes.get_errno() <NEW_LINE> raise OSError(errno, os.strerror(errno)) <NEW_LINE> <DEDENT> <DEDE...
A network namespace context manager. Runs wrapped code inside the specified network namespace. :param netns: The network namespace name to enter.
62598fac63d6d428bbee2754
class PyTest(TestCommand): <NEW_LINE> <INDENT> def finalize_options(self): <NEW_LINE> <INDENT> TestCommand.finalize_options(self) <NEW_LINE> self.test_args = ['-s'] <NEW_LINE> self.test_suite = True <NEW_LINE> <DEDENT> def run_tests(self): <NEW_LINE> <INDENT> import pytest <NEW_LINE> errcode = pytest.main(self.test_arg...
pytest's integration with setuptools, which is borrowed from http://pytest.org/latest/goodpractises.html#goodpractises
62598facd7e4931a7ef3c03f
class PotentialKey(DefaultModel): <NEW_LINE> <INDENT> id: str = Field( ..., description="A unique identifier of this potential, i.e. a SMARTS pattern or an atom type", ) <NEW_LINE> mult: Optional[int] = Field( None, description="The index of this duplicate interaction" ) <NEW_LINE> associated_handler: Optional[str] = F...
A unique identifier of an instance of physical parameters as applied to a segment of a chemical topology. These refer to a single term in a force field as applied to a single segment of a chemical topology, i.e. a single atom or dihedral. For example, a PotentialKey corresponding to a bond would store the the force co...
62598faca219f33f346c67c0
class USPSService(object): <NEW_LINE> <INDENT> SERVICE_NAME = '' <NEW_LINE> CHILD_XML_NAME = '' <NEW_LINE> PARAMETERS = [] <NEW_LINE> @property <NEW_LINE> def API(self): <NEW_LINE> <INDENT> return self.SERVICE_NAME <NEW_LINE> <DEDENT> def __init__(self, url, user_id): <NEW_LINE> <INDENT> self.url = url <NEW_LINE> self....
Base USPS Service Wrapper implementation
62598fac6e29344779b00606
class ISPClass: <NEW_LINE> <INDENT> yidong = [139, 138, 137, 136, 135, 134, 159, 158, 157, 150, 151, 152, 147, 188, 187, 182, 183, 184, 178] <NEW_LINE> liantong = [130, 131, 132, 156, 155, 186, 185, 145, 176] <NEW_LINE> dianxin = [133, 153, 189, 180, 181, 177, 173] <NEW_LINE> simulate = [100, 199] <NEW_LINE> all = yido...
号段数据
62598fac99cbb53fe6830e81
class Exploit(exploits.Exploit): <NEW_LINE> <INDENT> __info__ = { 'name': 'Belkin G & N150 Password Disclosure', 'description': 'Module exploits Belkin G and N150 Password MD5 Disclosure vulnerability which allows fetching administration\'s password in md5 format', 'authors': [ 'Aodrulez <f3arm3d3ar[at]gmail.com>', 'Av...
Exploit implementation for Belkin G and N150 Password MD5 Disclosure vulnerability. If the target is vulnerable, password in MD5 format is returned.
62598fac66673b3332c30375
class ConfigurationMixin(object): <NEW_LINE> <INDENT> def _render_config(self, flavor): <NEW_LINE> <INDENT> config = template.SingleInstanceConfigTemplate( self.datastore_version, flavor, self.id) <NEW_LINE> config.render() <NEW_LINE> return config <NEW_LINE> <DEDENT> def _render_replica_source_config(self, flavor): <N...
Configuration Mixin Configuration related tasks for instances and resizes.
62598fac1f5feb6acb162bca
class SpiralMovement(Movement): <NEW_LINE> <INDENT> def position(self, data, robot): <NEW_LINE> <INDENT> x, y, alpha, v, v_alpha = data <NEW_LINE> if v < 20: <NEW_LINE> <INDENT> a = 1 <NEW_LINE> a_alpha = 1 <NEW_LINE> return a, a_alpha <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> a = 1 <NEW_LINE> a_alpha = 0 <NEW_LINE...
Accelerates to a certain speed while turning, then keeps accelerating while retaining turn speed.
62598fac4e4d5625663723cf