code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class TestIoK8sApiCoreV1ConfigMap(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 testIoK8sApiCoreV1ConfigMap(self): <NEW_LINE> <INDENT> pass
IoK8sApiCoreV1ConfigMap unit test stubs
62598fbbaad79263cf42e965
class Webpage: <NEW_LINE> <INDENT> def __init__(self, name, url, title_tag, body_tag, next_tag): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.url = url <NEW_LINE> self.title_tag = title_tag <NEW_LINE> self.body_tag = body_tag <NEW_LINE> self.next_tag = next_tag <NEW_LINE> logging.info('Succesfully initialized s...
Contains information about website structure
62598fbb956e5f7376df5746
class DbBarData(ModelBase): <NEW_LINE> <INDENT> id = AutoField() <NEW_LINE> symbol: str = CharField() <NEW_LINE> exchange: str = CharField() <NEW_LINE> datetime: datetime = DateTimeField() <NEW_LINE> interval: str = CharField() <NEW_LINE> volume: float = FloatField() <NEW_LINE> open_interest: float = FloatField() <NEW_...
Candlestick bar data for database storage. Index is defined unique with datetime, interval, symbol
62598fbbadb09d7d5dc0a70d
class Agent(): <NEW_LINE> <INDENT> def __init__(self, action_space): <NEW_LINE> <INDENT> self.action_space = action_space <NEW_LINE> <DEDENT> def act(self, obs): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def update(self, obs, actions, rewards, new_obs): <NEW_LINE> <INDENT> pass
Parent abstract Agent.
62598fbbe5267d203ee6ba91
class TransportFailedException(TransportException): <NEW_LINE> <INDENT> pass
The transport has failed to deliver the message due to an internal error; a new instance of the transport should be used to retry.
62598fbb283ffb24f3cf3a14
class ShortThrower(ThrowerAnt): <NEW_LINE> <INDENT> name = 'Short' <NEW_LINE> food_cost = 2 <NEW_LINE> min_range = 0 <NEW_LINE> max_range = 3 <NEW_LINE> def nearest_bee(self, hive): <NEW_LINE> <INDENT> current = self.place <NEW_LINE> transition = 0 <NEW_LINE> while current != hive and transition >= ShortThrower.min_ran...
A ThrowerAnt that only throws leaves at Bees at most 3 places away.
62598fbb5fcc89381b266215
class TestWriteFiles(base.CloudTestCase): <NEW_LINE> <INDENT> def test_b64(self): <NEW_LINE> <INDENT> out = self.get_data_file('file_b64') <NEW_LINE> self.assertIn('ASCII text', out) <NEW_LINE> <DEDENT> def test_binary(self): <NEW_LINE> <INDENT> out = self.get_data_file('file_binary') <NEW_LINE> self.assertIn('ELF 64-b...
Example cloud-config test
62598fbbdc8b845886d5374a
class Wiktionary(BaseCommand): <NEW_LINE> <INDENT> wikiName = "Wiktionary" <NEW_LINE> wikiUrl = "http://en.wiktionary.org" <NEW_LINE> wikiApi = "/w/api.php" <NEW_LINE> wikiBase = "/wiki" <NEW_LINE> maxMessageSize = 0 <NEW_LINE> level = AuthLevels.User <NEW_LINE> def __init__(self, bot, channel, user, args): <NEW_LINE...
English Wiktionary Lookup Command
62598fbb3d592f4c4edbb04f
class DescribeReplicationInstancesRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RegistryId = None <NEW_LINE> self.Offset = None <NEW_LINE> self.Limit = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RegistryId = params.get("RegistryId") <NEW_...
DescribeReplicationInstances请求参数结构体
62598fbb57b8e32f525081e5
class TravelTracker(App): <NEW_LINE> <INDENT> current_sort = StringProperty() <NEW_LINE> sorting_code = ListProperty() <NEW_LINE> def build(self): <NEW_LINE> <INDENT> self.title = "Travel Tracker" <NEW_LINE> self.root = Builder.load_file("travel_app.kv") <NEW_LINE> self.sorting_code = SORTING_DICT.keys() <NEW_LINE> sel...
Create the Travel Tracker class
62598fbb4428ac0f6e6586b5
class RecordParser(AbstractParser): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> import warnings <NEW_LINE> warnings.warn("Bio.Compass._RecordParser is deprecated; please use the read() and parse() functions in this module instead", Bio.BiopythonDeprecationWarning) <NEW_LINE> self._scanner = _Scanner() <...
Parses compass results into a Record object (DEPRECATED).
62598fbb099cdd3c636754ab
class Hocuspocus(): <NEW_LINE> <INDENT> key = Fernet.generate_key() <NEW_LINE> cipher_suite = Fernet(key) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> print(Hocuspocus.key) <NEW_LINE> <DEDENT> def hocus(*arg): <NEW_LINE> <INDENT> message_sombre = Hocuspocus.cipher_suite.encrypt(arg[0]) <NEW_LINE> return message_s...
Class servant à encrypter et décrypter
62598fbb9c8ee8231304023d
class AmphoraConfigUpdate(BaseAmphoraTask): <NEW_LINE> <INDENT> def execute(self, amphora, flavor): <NEW_LINE> <INDENT> if flavor: <NEW_LINE> <INDENT> topology = flavor.get(constants.LOADBALANCER_TOPOLOGY, CONF.controller_worker.loadbalancer_topology) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> topology = CONF.contro...
Task to push a new amphora agent configuration to the amphora.
62598fbb851cf427c66b8448
class TextFileInputNode(Node, ProgrammingNodeTree): <NEW_LINE> <INDENT> bl_idname = "TextFileInputNode" <NEW_LINE> bl_label = "Text File Input" <NEW_LINE> bl_icon = "OBJECT_DATA" <NEW_LINE> def uda(self, context): <NEW_LINE> <INDENT> self.update() <NEW_LINE> <DEDENT> tfile = PointerProperty(type=Text, name="tfile", upd...
Text File Input Node
62598fbb92d797404e388c2c
class SimpleUDPListener(Actor): <NEW_LINE> <INDENT> @manage(['host', 'port']) <NEW_LINE> def init(self, address): <NEW_LINE> <INDENT> self.host, self.port = address.split(':') <NEW_LINE> try: <NEW_LINE> <INDENT> self.port = int(self.port) <NEW_LINE> <DEDENT> except ValueError: <NEW_LINE> <INDENT> self.port = 0 <NEW_LIN...
Listen for UDP messages on a given port. Address is of the form "ip:port" (note: ip is ipv4) Output: data : data in packets received on the UDP port will forwarded as tokens.
62598fbbfff4ab517ebcd976
class SplitDateTime(DateTime): <NEW_LINE> <INDENT> def __init__(self, date, time, *args, **kwargs): <NEW_LINE> <INDENT> super(DateTime, self).__init__(*args, **kwargs) <NEW_LINE> self.date = date <NEW_LINE> self.time = time <NEW_LINE> <DEDENT> def output(self, key, obj): <NEW_LINE> <INDENT> date = fields.get_value(self...
custom date format from 2 fields: - one for the date (in timestamp to midnight) - one for the time in seconds from midnight the date can be null (for example when the time is for a period like for calendar schedule) if the date is not null be convert to local using the default timezone if the date is null,...
62598fbbaad79263cf42e967
class Operator(object): <NEW_LINE> <INDENT> def __init__(self, tag=None): <NEW_LINE> <INDENT> self.tag = tag <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "<%s%s at 0x%x>" % ( type(self).__name__, self._tagstr(), id(self)) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> strs = (s for s i...
Base class for operator instances understood by Nengo. During one simulator timestep, a `.Signal` can experience 1. at most one set operator (optional) 2. any number of increments 3. any number of reads 4. at most one update in this specific order. A ``set`` defines the state of the signal at time :math:`t`, the st...
62598fbb3346ee7daa337711
class RecipientYear(models.Model): <NEW_LINE> <INDENT> recipient = models.ForeignKey('Recipient', db_index=True) <NEW_LINE> name = models.TextField(null=True) <NEW_LINE> year = models.IntegerField(blank=True, null=True) <NEW_LINE> country = models.CharField(blank=True, max_length=2) <NEW_LINE> total = models.FloatField...
Denormalized model containing the total each recipient received per year.
62598fbb167d2b6e312b7108
class FileHistory(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._history_file_name = 'file.history' <NEW_LINE> self._history_file_path = '' <NEW_LINE> if os.name == 'nt': <NEW_LINE> <INDENT> self._history_file_path = os.path.dirname(os.getenv('POSE')) <NEW_LINE> <DEDENT> else: <NEW_LINE> <IN...
A Houdini recent file history parser Holds the data in a dictionary, where the keys are the file types and the values are string list of recent file paths of that type
62598fbb236d856c2adc9509
class AzureBlob(StorageManager): <NEW_LINE> <INDENT> _BLOB_FILE = ("https://%(storage)s.blob.core.windows.net/" "%(container)s/%(blob)s") <NEW_LINE> _REMOTE_FILE = collections.namedtuple( "RemoteFile", ["store", "storage", "container", "blob"]) <NEW_LINE> _URL_FORMAT = re.compile(r'http.*\/\/(?P<storage>[^.]+)[^/]+\/' ...
Azure Blob storage service manager.
62598fbbd486a94d0ba2c161
class CaptureImage(object): <NEW_LINE> <INDENT> def __init__(self, Type, *args): <NEW_LINE> <INDENT> self.bitmap = win32ui.CreateBitmap() <NEW_LINE> {'Window': self.extract_window, 'DC': self.build_from_dc}[Type](*args) <NEW_LINE> <DEDENT> def extract_window(self, windowName): <NEW_LINE> <INDENT> Handle = identify_wind...
Returns object to retain, manage and preform screen captures.
62598fbb091ae35668704db5
class _ColorFormatter(Formatter): <NEW_LINE> <INDENT> colors = set(colors) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(_ColorFormatter, self).__init__() <NEW_LINE> self._depth = len(inspect.stack()) <NEW_LINE> <DEDENT> def get_value(self, key, args, kwargs): <NEW_LINE> <INDENT> if key == 'color' and kwargs...
Special string formatter which skips colors.
62598fbb2c8b7c6e89bd3959
class CarboxamideNToTyrOH(HydrogenBond): <NEW_LINE> <INDENT> def __init__(self, model, rcutoff=3.2, *args, **kwds): <NEW_LINE> <INDENT> HydrogenBond.__init__(self, model, *args, **kwds) <NEW_LINE> listik1 = model.atom_lister('rat', rats=['GLNNE2', 'ASNND2']) <NEW_LINE> listik2 = model.atom_lister('rat', rats=['TYROH'])...
Asn/Gln carboxamide nitrogen (donor) to Tyr hydroxyl oxygen (acceptor)
62598fbb4f88993c371f05d6
class TagKeysClientMeta(type): <NEW_LINE> <INDENT> _transport_registry = OrderedDict() <NEW_LINE> _transport_registry["grpc"] = TagKeysGrpcTransport <NEW_LINE> _transport_registry["grpc_asyncio"] = TagKeysGrpcAsyncIOTransport <NEW_LINE> def get_transport_class( cls, label: str = None, ) -> Type[TagKeysTransport]: <NEW_...
Metaclass for the TagKeys client. This provides class-level methods for building and retrieving support objects (e.g. transport) without polluting the client instance objects.
62598fbb627d3e7fe0e07045
class UserProfileSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = models.UserProfile <NEW_LINE> fields = ('id', 'name', 'email', 'password') <NEW_LINE> extra_kwargs = { 'password': { 'write_only': True, 'style': { 'input_type': 'password' } } } <NEW_LINE> <DEDENT> def...
Serializers a user profile object
62598fbbad47b63b2c5a79e7
class MinioException(Exception): <NEW_LINE> <INDENT> pass
Base Minio exception.
62598fbb60cbc95b063644d2
class NullNode(SceneNode): <NEW_LINE> <INDENT> _enabled = False <NEW_LINE> def __bool__(self): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def draw_idle(self): <NEW_LINE> <INDENT> pass
Non-existent node.
62598fbb21bff66bcd722dfd
class NonRecoverableError(CustodianError): <NEW_LINE> <INDENT> def __init__(self, message, raises, handler): <NEW_LINE> <INDENT> super().__init__(message, raises) <NEW_LINE> self.handler = handler
Error raised when a handler found an error but could not fix it
62598fbb796e427e5384e929
class ComplexVote(Vote): <NEW_LINE> <INDENT> __mapper_args__ = {'polymorphic_identity': 'complex'} <NEW_LINE> @property <NEW_LINE> def polymorphic_base(self): <NEW_LINE> <INDENT> return Vote <NEW_LINE> <DEDENT> @property <NEW_LINE> def proposal(self): <NEW_LINE> <INDENT> return self.ballot('proposal', create=True) <NEW...
A complex vote with proposal, counter-proposal and tie-breaker.
62598fbb3539df3088ecc440
class CmdSocedit(Commande): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Commande.__init__(self, "socedit", "socedit") <NEW_LINE> self.groupe = "administrateur" <NEW_LINE> self.schema = "<ident>" <NEW_LINE> self.nom_categorie = "batisseur" <NEW_LINE> self.aide_courte = "ouvre l'éditeur d'attitude" <NEW_L...
Commande 'socedit'
62598fbbd268445f26639c4e
class AsyncAND(defer.Deferred): <NEW_LINE> <INDENT> def __init__(self, deferredList): <NEW_LINE> <INDENT> defer.Deferred.__init__(self) <NEW_LINE> if not deferredList: <NEW_LINE> <INDENT> self.callback(None) <NEW_LINE> return <NEW_LINE> <DEDENT> self.remaining = len(deferredList) <NEW_LINE> self._fired = False <NEW_LIN...
Like DeferredList, but results are discarded and failures handled in a more convenient fashion. Create me with a list of Deferreds. I will fire my callback (with None) if and when all of my component Deferreds fire successfully. I will fire my errback when and if any of my component Deferreds errbacks, in which case I...
62598fbb4428ac0f6e6586b7
class Agent(object): <NEW_LINE> <INDENT> configuration: Configuration <NEW_LINE> decorators: List[Decorator] <NEW_LINE> def __init__(self, configuration: Configuration, decorators: List[Decorator] = None): <NEW_LINE> <INDENT> self.configuration = configuration <NEW_LINE> if decorators is None: <NEW_LINE> <INDENT> decor...
Monitor agent that will be constantly verifying if the URL is healthy and updating the component.
62598fbbcc40096d6161a2a3
class Run(webapp2.RequestHandler): <NEW_LINE> <INDENT> def post(self, job_id): <NEW_LINE> <INDENT> job = job_module.JobFromId(job_id) <NEW_LINE> try: <NEW_LINE> <INDENT> job.Run() <NEW_LINE> <DEDENT> finally: <NEW_LINE> <INDENT> job.put()
Handler that runs a Pinpoint job.
62598fbb7b180e01f3e49119
class CfsInsInfo(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.UserId = None <NEW_LINE> self.UserGroupId = None <NEW_LINE> self.CfsId = None <NEW_LINE> self.MountInsId = None <NEW_LINE> self.LocalMountDir = None <NEW_LINE> self.RemoteMountDir = None <NEW_LINE> self.IpAddress = None <N...
Configuration information of the CFS instance associated with function
62598fbb498bea3a75a57cb8
class MeasureAreaController(AnalysisControllerBase): <NEW_LINE> <INDENT> def __init__(self, giface, mapWindow): <NEW_LINE> <INDENT> AnalysisControllerBase.__init__( self, giface=giface, mapWindow=mapWindow) <NEW_LINE> self._graphicsType = 'polygon' <NEW_LINE> <DEDENT> def _doAnalysis(self, coords): <NEW_LINE> <INDENT> ...
Class controls measuring area in map display.
62598fbb44b2445a339b6a3f
class ThresholdedReLU(layers.Layer): <NEW_LINE> <INDENT> def __init__(self, threshold=1.0, name=None): <NEW_LINE> <INDENT> super(ThresholdedReLU, self).__init__() <NEW_LINE> self._threshold = threshold <NEW_LINE> self._name = name <NEW_LINE> <DEDENT> def forward(self, x): <NEW_LINE> <INDENT> return F.thresholded_relu(x...
Thresholded ReLU Activation .. math:: ThresholdedReLU(x) = \\begin{cases} x, \\text{if } x > threshold \\\\ 0, \\text{otherwise} \\end{cases} Parameters: threshold (float, optional): The value of threshold for ThresholdedReLU. De...
62598fbb0fa83653e46f5078
class TestV1ReplicaSet(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 testV1ReplicaSet(self): <NEW_LINE> <INDENT> pass
V1ReplicaSet unit test stubs
62598fbbaad79263cf42e969
class AdaptiveScaleWrapper: <NEW_LINE> <INDENT> target_size = 35. <NEW_LINE> image_min_side = 832 <NEW_LINE> def __init__(self, detector, scales=(0.8, 1, 1.25)): <NEW_LINE> <INDENT> assert detector.image_min_side == self.image_min_side <NEW_LINE> self.detector = detector <NEW_LINE> self.scales = scales <NEW_LINE> <DEDE...
Adaptive scale detection wrapper.
62598fbb236d856c2adc950a
class ClearCacheMixin(object): <NEW_LINE> <INDENT> def save_model(self, request, obj, form, change): <NEW_LINE> <INDENT> call_command('clear_cache') <NEW_LINE> super().save_model(request, obj, form, change) <NEW_LINE> <DEDENT> def delete_model(self, request, obj): <NEW_LINE> <INDENT> call_command('clear_cache') <NEW_LI...
Mixin that overrides the `save` and `delete` methods of Django's ModelAdmin class to clear the cache whenever an object is added or changed.
62598fbb71ff763f4b5e790e
class GenericBox(GW.BaseBox): <NEW_LINE> <INDENT> modified = QC.Signal([], [object]) <NEW_LINE> def __init__(self, parent=None): <NEW_LINE> <INDENT> super().__init__(parent) <NEW_LINE> self.init() <NEW_LINE> <DEDENT> @property <NEW_LINE> def default_modified_signal(self): <NEW_LINE> <INDENT> return(self.modified[object...
Defines the :class:`~GenericBox` class. This class is used for making a generic value box that only accepts single values, unlike :class:`~LongGenericBox`. It currently supports inputs of type bool; float; int; and str.
62598fbbadb09d7d5dc0a711
class WorldBorder(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=50) <NEW_LINE> area = models.IntegerField() <NEW_LINE> pop2005 = models.IntegerField('Population 2005') <NEW_LINE> fips = models.CharField('FIPS Code', max_length=2) <NEW_LINE> iso2 = models.CharField('2 Digit ISO', max_length=2) <N...
Za svako dato polje u .shp kreiramo njemu odgovarajuće u modelu
62598fbb097d151d1a2c11c8
@with_input_types(Tuple[T, TimestampType]) <NEW_LINE> @with_output_types(T) <NEW_LINE> class LatestCombineFn(core.CombineFn): <NEW_LINE> <INDENT> def create_accumulator(self): <NEW_LINE> <INDENT> return (None, window.MIN_TIMESTAMP) <NEW_LINE> <DEDENT> def add_input(self, accumulator, element): <NEW_LINE> <INDENT> if ac...
CombineFn to get the element with the latest timestamp from a PCollection.
62598fbb091ae35668704db7
class ReplyTopicTestCase(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.board = Board.objects.create(name='Django', description='Django board') <NEW_LINE> self.username = 'john' <NEW_LINE> self.password = '123' <NEW_LINE> user = User.objects.create_user(username=self.username, password=self.pa...
Base test case to be used in all `reply_topic` view tests
62598fbb55399d3f056266a9
class SvnTagDialog(QDialog, Ui_SvnTagDialog): <NEW_LINE> <INDENT> def __init__(self, taglist, reposURL, standardLayout, parent=None): <NEW_LINE> <INDENT> super(SvnTagDialog, self).__init__(parent) <NEW_LINE> self.setupUi(self) <NEW_LINE> self.okButton = self.buttonBox.button(QDialogButtonBox.Ok) <NEW_LINE> self.okButto...
Class implementing a dialog to enter the data for a tagging operation.
62598fbb4a966d76dd5ef068
class WhiteKing(King, Piece): <NEW_LINE> <INDENT> symbol = u'\u2654' <NEW_LINE> simple_simbol = u'WK' <NEW_LINE> name = u'WhiteKing' <NEW_LINE> color = Color.WHITE <NEW_LINE> def __init__(self, has_moved=False): <NEW_LINE> <INDENT> self.has_moved = has_moved
The White King chess piece.
62598fbb3d592f4c4edbb053
class DNSManager(utils.IdentifierMixin, object): <NEW_LINE> <INDENT> def __init__(self, client): <NEW_LINE> <INDENT> self.client = client <NEW_LINE> self.service = self.client['Dns_Domain'] <NEW_LINE> self.record = self.client['Dns_Domain_ResourceRecord'] <NEW_LINE> self.resolvers = [self._get_zone_id_from_name] <NEW_L...
Manage SoftLayer DNS. See product information here: http://www.softlayer.com/DOMAIN-SERVICES :param SoftLayer.API.BaseClient client: the client instance
62598fbb796e427e5384e92b
class AbstractSTREnityListView(QListView): <NEW_LINE> <INDENT> def __init__(self, parent=None, **kwargs): <NEW_LINE> <INDENT> super(AbstractSTREnityListView, self).__init__(parent) <NEW_LINE> self._model = QStandardItemModel(self) <NEW_LINE> self._model.setColumnCount(1) <NEW_LINE> self.setModel(self._model) <NEW_LINE>...
A widget for listing and selecting one or more STR entities. .. versionadded:: 1.7
62598fbb5fc7496912d48346
@dataclass <NEW_LINE> class Inst: <NEW_LINE> <INDENT> tvar: TypeVariable <NEW_LINE> typeclass: str <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return f"{self.typeclass} {self.tvar}"
States the `tvar` is an instance of type class `typeclass`
62598fbb97e22403b383b09d
class NavViewDashWidget(IconToolButton): <NEW_LINE> <INDENT> def __init__(self, context, name='NavView'): <NEW_LINE> <INDENT> super(NavViewDashWidget, self).__init__(name) <NEW_LINE> self.context = context <NEW_LINE> self._icon = self.load_image('nav.png') <NEW_LINE> self._clicked_icon = self.load_image('nav-click.png'...
A widget which launches a nav_view widget in order to view and interact with the ROS nav stack :param context: The plugin context in which to dsiplay the nav_view :type context: qt_gui.plugin_context.PluginContext :param name: The widgets name :type name: str
62598fbb498bea3a75a57cba
class InferenceInfo(object): <NEW_LINE> <INDENT> def __init__(self,csp,variable,value,inferenceProcedure): <NEW_LINE> <INDENT> self._variableDomains = copy.deepcopy(csp.getVariableDomains()) <NEW_LINE> self._affectedVariables = [] <NEW_LINE> self._inferenceProcedure = inferenceProcedure <NEW_LINE> self._affectedVariabl...
classdocs
62598fbbff9c53063f51a7e4
class ResidueList(list): <NEW_LINE> <INDENT> def __init__(self, parm): <NEW_LINE> <INDENT> list.__init__(self, [Residue(parm.parm_data['RESIDUE_LABEL'][i], i+1) for i in range(parm.ptr('nres'))]) <NEW_LINE> for i, val in enumerate(parm.parm_data['RESIDUE_POINTER']): <NEW_LINE> <INDENT> start = val - 1 <NEW_LINE> try: <...
Array of Residues.
62598fbb0fa83653e46f507a
class MWidget(HasTraits): <NEW_LINE> <INDENT> tooltip = Str() <NEW_LINE> context_menu = Instance("pyface.action.menu_manager.MenuManager") <NEW_LINE> def create(self): <NEW_LINE> <INDENT> self._create() <NEW_LINE> <DEDENT> def destroy(self): <NEW_LINE> <INDENT> if self.control is not None: <NEW_LINE> <INDENT> self._rem...
The mixin class that contains common code for toolkit specific implementations of the IWidget interface.
62598fbb56ac1b37e6302384
@dataclass <NEW_LINE> class MinuteNumber(AdminMessage): <NEW_LINE> <INDENT> ADMIN_ID = 0x00 <NEW_LINE> MESSAGE_SIZE = 1 <NEW_LINE> minute: int <NEW_LINE> def __post_init__(self): <NEW_LINE> <INDENT> assert 1 <= self.minute <= 10, "minute must be in range(1, 11)" <NEW_LINE> <DEDENT> def marshal(self): <NEW_LINE> <INDENT...
Minute marker (Deprecated in M2)
62598fbb66656f66f7d5a589
class TracedFile(File): <NEW_LINE> <INDENT> READ_THEN_WRITTEN = 0 <NEW_LINE> ONLY_READ = 1 <NEW_LINE> WRITTEN = 2 <NEW_LINE> what = None <NEW_LINE> def __init__(self, path): <NEW_LINE> <INDENT> path = Path(path) <NEW_LINE> size = None <NEW_LINE> if path.exists(): <NEW_LINE> <INDENT> if path.is_link(): <NEW_LINE> <INDEN...
Override of `~reprozip.common.File` that reads stats from filesystem.
62598fbb7cff6e4e811b5bb8
class BJ_Card(karty.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 = BJ_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 = No...
Karta do blackjacka
62598fbbadb09d7d5dc0a713
class IPortalFooter(IPageElement): <NEW_LINE> <INDENT> pass
portal footer
62598fbb2c8b7c6e89bd395c
class CodeGRECO(ModelView, ModelSQL): <NEW_LINE> <INDENT> __name__ = "portrait.codegreco" <NEW_LINE> code = fields.Char( string=u'Code', help=u'Code GRECO', required=True, ) <NEW_LINE> name = fields.Char( string=u'Nom', help=u'Nom GRECO', required=True, ) <NEW_LINE> domaine = fields.Char( string=u'Domaine', help=u'Doma...
Code couleur GRECO
62598fbb5166f23b2e243575
class Answer(Region): <NEW_LINE> <INDENT> _is_correct_locator = (By.CSS_SELECTOR, '.correct-incorrect svg') <NEW_LINE> _answer_letter_locator = (By.CSS_SELECTOR, '.answer-letter') <NEW_LINE> _answer_content_locator = (By.CSS_SELECTOR, '.answer-content') <NEW_LINE> _has_image_locator = (By.CSS_SELECTOR, '.answer-content...
An answer option.
62598fbb5fcc89381b266218
class ForAllPSE(list): <NEW_LINE> <INDENT> def __getattr__(self, name): <NEW_LINE> <INDENT> def wrapper(*args, **kargs): <NEW_LINE> <INDENT> threads = [] <NEW_LINE> for o in self: <NEW_LINE> <INDENT> threads.append(utils.InterruptedThread(o.__getattribute__(name), args=args, kwargs=kargs)) <NEW_LINE> <DEDENT> for t in ...
Parallel version of and suppress exception.
62598fbbbf627c535bcb163c
class QuestionForm(forms.Form): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.helper = FormHelper() <NEW_LINE> self.helper.form_method = 'post' <NEW_LINE> self.helper.form_tag = kwargs.get('form_tag', True) <NEW_LINE> if 'form_tag' in kwargs: <NEW_LINE> <INDENT> del kwargs['form_tag'...
Base class for a Question
62598fbb26068e7796d4caf2
class AddressAlreadyInUse(Exception): <NEW_LINE> <INDENT> pass
Address is already used by other service.
62598fbb01c39578d7f12f13
class Ident(ctypes.Structure): <NEW_LINE> <INDENT> _fields_ = [('ei_mag0', ctypes.c_ubyte), ('ei_mag1', ctypes.c_ubyte), ('ei_mag2', ctypes.c_ubyte), ('ei_mag3', ctypes.c_ubyte), ('ei_class', ctypes.c_ubyte), ('ei_data', ctypes.c_ubyte), ('ei_version', ctypes.c_ubyte), ('ei_osabi', ctypes.c_ubyte), ('ei_abiversion', ct...
Represents the ELF ident array in the ehdr structure.
62598fbb5fc7496912d48347
class Security(Base): <NEW_LINE> <INDENT> __tablename__ = "security" <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> symbol = Column(String, unique=True) <NEW_LINE> namespace = Column(String) <NEW_LINE> in_symbol = Column(String) <NEW_LINE> updater = Column(String) <NEW_LINE> currency = Column(String) <NEW...
The security / symbol entity Adding a record here should enable it for updated automatically. Contains the link to Yahoo symbol and should replace SymbolMap.
62598fbbd486a94d0ba2c167
class DVCSLoader(BaseLoader): <NEW_LINE> <INDENT> def cleanup(self) -> None: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def has_contents(self) -> bool: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> def get_contents(self) -> Iterable[BaseContent]: <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT>...
This base class is a pattern for dvcs loaders (e.g. git, mercurial). Those loaders are able to load all the data in one go. For example, the loader defined in swh-loader-git :class:`BulkUpdater`. For other loaders (stateful one, (e.g :class:`SWHSvnLoader`), inherit directly from :class:`BaseLoader`.
62598fbb091ae35668704dbb
class Parameter(AbstraktParameter): <NEW_LINE> <INDENT> def __init__(self, verzeichnis, fmin, fmax, fitfunktion, fenster, ordnung, phase_modus, phase_versatz, df, pixel, bereich_links, bereich_rechts, amp_min, amp_max, guete_min, guete_max, off_min, off_max): <NEW_LINE> <INDENT> AbstraktParameter.__init__( self, verzei...
Alle für den Fit einer Rastermessung nötigen Messparameter
62598fbb2c8b7c6e89bd395f
class Process(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.log_comp_times = False <NEW_LINE> self.is_paused = False <NEW_LINE> <DEDENT> def on_tick(self, sim): <NEW_LINE> <INDENT> raise NotImplementedError("should be implemented by child class") <NEW_LINE> <DEDENT> def pause(self): <NEW_LIN...
Processes implement the ``on_tick`` method called by the simulation.
62598fbb627d3e7fe0e0704b
class QuestionModelTest(TestCase): <NEW_LINE> <INDENT> def test_was_published_recently_with_future_question(self): <NEW_LINE> <INDENT> time = timezone.now() + datetime.timedelta(days=30) <NEW_LINE> future_question = Question(pub_date=time) <NEW_LINE> self.assertIs(future_question.was_published_recently(), False) <NEW_L...
Check obj model
62598fbba219f33f346c699f
class DistributedLargeBlobSenderAI(DistributedObjectAI.DistributedObjectAI): <NEW_LINE> <INDENT> notify = DirectNotifyGlobal.directNotify.newCategory('DistributedLargeBlobSenderAI') <NEW_LINE> def __init__(self, air, zoneId, targetAvId, data, useDisk=0): <NEW_LINE> <INDENT> DistributedObjectAI.DistributedObjectAI.__ini...
DistributedLargeBlobSenderAI: for sending large chunks of data through the DC system to a specific avatar
62598fbb63b5f9789fe85308
class Divide(StochasticParameter): <NEW_LINE> <INDENT> def __init__(self, other_param, val, elementwise=False): <NEW_LINE> <INDENT> super(Divide, self).__init__() <NEW_LINE> self.other_param = handle_continuous_param(other_param, "other_param") <NEW_LINE> self.val = handle_continuous_param(val, "val") <NEW_LINE> self.e...
Parameter to divide other parameter's results with. This parameter will automatically prevent division by zero (uses 1.0) as the denominator in these cases. Parameters ---------- other_param : number or tuple of two number or list of number or StochasticParameter Other parameter which's sampled values are to be ...
62598fbb76e4537e8c3ef740
class DigitalException(Exception): <NEW_LINE> <INDENT> message = _("An unknown exception occurred.") <NEW_LINE> code = 500 <NEW_LINE> def __init__(self, message=None, **kwargs): <NEW_LINE> <INDENT> self.kwargs = kwargs <NEW_LINE> if 'code' not in self.kwargs and hasattr(self, 'code'): <NEW_LINE> <INDENT> self.kwargs['c...
Base Digital Exception To correctly use this class, inherit from it and define a 'message' property. That message will get printf'd with the keyword arguments provided to the constructor.
62598fbb21bff66bcd722e03
class Test(EntryPoint): <NEW_LINE> <INDENT> pass
测试相关的工具.
62598fbb4c3428357761a455
class StripePercentField(StripeFieldMixin, models.DecimalField): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> defaults = { 'decimal_places': 2, 'max_digits': 5, 'validators': [MinValueValidator(1.00), MaxValueValidator(100.00)] } <NEW_LINE> defaults.update(kwargs) <NEW_LINE> super().__in...
A field used to define a percent according to djstripe logic.
62598fbb283ffb24f3cf3a1c
class VideoListSorted: <NEW_LINE> <INDENT> def __init__(self, path_response, context_name, context_id, req_sort_order_type): <NEW_LINE> <INDENT> self.perpetual_range_selector = path_response.get('_perpetual_range_selector') <NEW_LINE> self.data = path_response <NEW_LINE> self.context_name = context_name <NEW_LINE> has_...
A video list
62598fbbcc0a2c111447b1a7
class RandomAgent(agents.base_agent.RlAgent): <NEW_LINE> <INDENT> def __init__(self, action_space): <NEW_LINE> <INDENT> self.action_space = action_space <NEW_LINE> <DEDENT> def act(self, state): <NEW_LINE> <INDENT> return self.action_space.sample() <NEW_LINE> <DEDENT> def receive_reward(self, reward, terminal): <NEW_LI...
The world's simplest agent!
62598fbb796e427e5384e92f
class VoteInfo: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.option: str = '' <NEW_LINE> self.votes: float = 0.0 <NEW_LINE> self.cleared_votes: float = 0 <NEW_LINE> <DEDENT> def __str__(self) -> str: <NEW_LINE> <INDENT> return pformat(protobuf_to_dict(self.to_raw())) <NEW_LINE> <DEDENT> def from_raw...
Contains information about vote info. Attributes: option: Vote option votes: Current votes cleared_votes: Votes that has been clead
62598fbb5fdd1c0f98e5e12b
class Query(QueryComponent): <NEW_LINE> <INDENT> class Method(enum.Enum): <NEW_LINE> <INDENT> SELECT = 0 <NEW_LINE> CONSTRUCT = 1 <NEW_LINE> <DEDENT> def __init__(self, result_vars=[], default_url="http://dbpedia.org/sparql", formatter=BasicFormatter()): <NEW_LINE> <INDENT> self._children = [] <NEW_LINE> self.method = ...
Representation of a SPARQL Query. Attributes: method (QueryMethod): Determines the SPARQL query method (e.g., SELECT, CONSTRUCT) result_vars (list): A list of BNodes to be selected from the query results default_url (string): Default remote SPARQL url used when 'execute' is called result_format: ...
62598fbb56b00c62f0fb2a55
class LinearSelfAttn(nn.Module): <NEW_LINE> <INDENT> def __init__(self, input_size, dropout=None): <NEW_LINE> <INDENT> super(LinearSelfAttn, self).__init__() <NEW_LINE> self.linear = nn.Linear(input_size, 1) <NEW_LINE> self.dropout = dropout <NEW_LINE> <DEDENT> def forward(self, x, x_mask): <NEW_LINE> <INDENT> x = self...
Self attention over a sequence: * o_i = softmax(Wx_i) for x_i in X.
62598fbb956e5f7376df574b
class Section: <NEW_LINE> <INDENT> def __init__(self, content: str, section_type: str='section'): <NEW_LINE> <INDENT> self.section_type = section_type <NEW_LINE> self.content = content <NEW_LINE> <DEDENT> def tex(self) -> str: <NEW_LINE> <INDENT> return f'{BACKSLASH}{self.section_type}{{{self.content}}}'
Represents a depth-aware header
62598fbb091ae35668704dbd
class ActivityProperty(files.FileProperty): <NEW_LINE> <INDENT> pass
A convenience wrapper for creating filters for Activity searches. Usage: filters = [ActivityProperty('color') == 'blue'] ActivitiesService.get_activities(['create'], filters=filters)
62598fbb4f88993c371f05da
class ReportChartInline(admin.TabularInline): <NEW_LINE> <INDENT> extra = 1 <NEW_LINE> form = ReportChartForm <NEW_LINE> model = MSQCdbModels.ReportChart <NEW_LINE> raw_id_fields = ('chart',) <NEW_LINE> sortable_field_name = "position" <NEW_LINE> def formfield_for_dbfield(self, db_field, **kwargs): <NEW_LINE> <INDENT> ...
Admin config for ReportChart InLine.
62598fbb2c8b7c6e89bd3960
class UnicodeNamedObjectTest(S3ApiVerificationTestBase): <NEW_LINE> <INDENT> utf8_key_name = u"utf8ファイル名.txt" <NEW_LINE> def test_unicode_object(self): <NEW_LINE> <INDENT> bucket = self.conn.create_bucket(self.bucket_name) <NEW_LINE> k = Key(bucket) <NEW_LINE> k.key = UnicodeNamedObjectTest.utf8_key_name <NEW_LINE> k.s...
test to check unicode object name works
62598fbbbe383301e0253998
class Sony12(protocol_base.IrProtocolBase): <NEW_LINE> <INDENT> irp = '{40k,600,lsb}<1,-1|2,-1>(4,-1,F:7,D:5,^45m)*' <NEW_LINE> frequency = 40000 <NEW_LINE> bit_count = 12 <NEW_LINE> encoding = 'lsb' <NEW_LINE> _lead_in = [TIMING * 4, -TIMING] <NEW_LINE> _lead_out = [45000] <NEW_LINE> _middle_timings = [] <NEW_LINE> _b...
IR decoder for the Sony12 protocol.
62598fbb5166f23b2e243579
class CloningVisitor(ClauseVisitor): <NEW_LINE> <INDENT> def copy_and_process(self, list_): <NEW_LINE> <INDENT> return [self.traverse(x) for x in list_] <NEW_LINE> <DEDENT> def traverse(self, obj): <NEW_LINE> <INDENT> return cloned_traverse(obj, self.__traverse_options__, self._visitor_dict)
Base class for visitor objects which can traverse using the cloned_traverse() function.
62598fbb5fcc89381b26621a
class LikeFunction(LikeFunctionBase): <NEW_LINE> <INDENT> def __init__(self, log=False): <NEW_LINE> <INDENT> super(LikeFunction, self).__init__(log) <NEW_LINE> self.mappings = OrderedDict() <NEW_LINE> return <NEW_LINE> <DEDENT> def get_value(self, x): <NEW_LINE> <INDENT> for rng, f in reversed(self.mappings.items()): <...
Gegneral form. Maps separate values or ranges according to their functions. Mapping information is in self.mappings, which is an OrderedDict of the form `range -> function`.
62598fbb4527f215b58ea070
class HeaderFITSParser(HeaderPlainTextParser): <NEW_LINE> <INDENT> def to_string(self): <NEW_LINE> <INDENT> data = super(HeaderFITSParser, self).to_string() <NEW_LINE> data = [data[i:i + 80] for i in range(0, len(data), 80)] <NEW_LINE> data = ('\r\n'.join(data)) <NEW_LINE> return data.strip()
A parser for FITS headers.
62598fbb4c3428357761a457
class Yn00(Paml): <NEW_LINE> <INDENT> def __init__(self, alignment = None, working_dir = None, out_file = None): <NEW_LINE> <INDENT> Paml.__init__(self, alignment, working_dir, out_file) <NEW_LINE> self.ctl_file = "yn00.ctl" <NEW_LINE> self._options = {"verbose": None, "icode": None, "weighting": None, "commonf3x4": No...
This class implements an interface to yn00, part of the PAML package.
62598fbb63d6d428bbee294c
class ExtraPanelTabTestCase(TestCase): <NEW_LINE> <INDENT> def get_tab_type_dicts(self, tab_types): <NEW_LINE> <INDENT> if tab_types: <NEW_LINE> <INDENT> return [{'tab_type': tab_type} for tab_type in tab_types.split(',')] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> return [] <NEW_LINE> <DEDENT> <DEDENT> def get_cour...
Tests adding and removing extra course tabs.
62598fbbf548e778e596b742
class VectorQuantization(autograd.Function): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def forward(ctx, input, codebook): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def backward(ctx, grad_outputs): <NEW_LINE> <INDENT> pass
https://pytorch.org/docs/stable/notes/extending.html
62598fbb26068e7796d4caf6
class WarpAugmentation(Augmentation): <NEW_LINE> <INDENT> def __init__(self, fliph_probability=0., flipv_probability=0., translation=(0, 0), rotation=(0, 0), scale=(1, 1), shear=(0, 0), diffeomorphism=[], diff_fix_border=False, fill_mode='edge', ): <NEW_LINE> <INDENT> self.fliph_probability = _parse_parameter(fliph_pro...
Perform random warping transformation on the input data. Parameters can be either constant values, a list/tuple containing the lower and upper bounds for a uniform distribution or a value generating function: Examples: * WarpAugmentation(rotation=0.5 * np.pi) * WarpAugmentation(rotation=(-0.25 * np.pi, 0.25 *...
62598fbb4428ac0f6e6586bf
@dataclass(eq=False, repr=False) <NEW_LINE> class FilterKernel(AbstractKernel): <NEW_LINE> <INDENT> iqs: List[float] = field(default_factory=list) <NEW_LINE> bias: float = 0.0e+0
A filter kernel to produce scalar readout features from acquired readout waveforms.
62598fbb97e22403b383b0a3
class UserViewset(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = User.objects.all() <NEW_LINE> serializer_class = UserSerializer
User viewset
62598fbbd268445f26639c52
class Failure(Exception): <NEW_LINE> <INDENT> def __init__(self, text): <NEW_LINE> <INDENT> self.text = text
Class exception.
62598fbb851cf427c66b8452
class Topic(models.Model): <NEW_LINE> <INDENT> text = models.CharField(max_length=200) <NEW_LINE> date_added = models.DateTimeField(auto_now_add=True) <NEW_LINE> owner = models.ForeignKey(User, on_delete=models.CASCADE) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.text
A topic the user is learning about
62598fbb0fa83653e46f5080
class Penetration(BroabModel): <NEW_LINE> <INDENT> HEMISPHERE_CHOICES = ( ('R','Right'), ('L', 'Left'), ) <NEW_LINE> hemisphere = models.CharField(max_length=1, choices=HEMISPHERE_CHOICES) <NEW_LINE> rostral = models.FloatField(default=0.0,help_text='negative is Caudal') <NEW_LINE> lateral = models.FloatField(default=0...
a single penetration of a neural probe - foreign key to probe - has multiple depths - in a subject - coordinates & reference/system
62598fbb8a349b6b436863d8
class MongoengineUpdater(object): <NEW_LINE> <INDENT> def __init__(self, datalayer): <NEW_LINE> <INDENT> self.datalayer = datalayer <NEW_LINE> <DEDENT> def _transform_updates_to_mongoengine_kwargs(self, resource, updates): <NEW_LINE> <INDENT> field_cls = self.datalayer.cls_map[resource] <NEW_LINE> nopfx = lambda x: fie...
Helper class for managing updates (PATCH requests) through mongoengine ODM layer. Updates are managed in this class cecause sometimes things need to get dirty and there would be unnecessary 'helper' methods in the main class MongoengineDataLayer causing namespace pollution.
62598fbb656771135c48980a
class RateViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Rate.objects.all().order_by('currency', '-date') <NEW_LINE> serializer_class = RateSerializer
API endpoint that allows rates to be viewed or edited.
62598fbb236d856c2adc950e
class ExpressRouteConnectionList(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[ExpressRouteConnection]'}, } <NEW_LINE> def __init__( self, *, value: Optional[List["ExpressRouteConnection"]] = None, **kwargs ): <NEW_LINE> <INDENT> super(ExpressRouteConnectionList...
ExpressRouteConnection list. :param value: The list of ExpressRoute connections. :type value: list[~azure.mgmt.network.v2019_11_01.models.ExpressRouteConnection]
62598fbba8370b77170f057c
class HyperElasticFamilyData(Struct): <NEW_LINE> <INDENT> data_shapes = { 'mtx_f': ('n_el', 'n_qp', 'dim', 'dim'), 'det_f': ('n_el', 'n_qp', 1, 1), 'sym_b': ('n_el', 'n_qp', 'sym', 1), 'tr_b': ('n_el', 'n_qp', 1, 1), 'in2_b': ('n_el', 'n_qp', 1, 1), 'sym_c' : ('n_el', 'n_qp', 'sym', 1), 'tr_c' : ('n_el', 'n_qp', 1, 1),...
Base class for hyperelastic family data. The common (family) data are cached in the evaluate cache of state variable.
62598fbbd486a94d0ba2c16b
class AbsColorLight(AbsColorTemperatureLight, HasColorHSB): <NEW_LINE> <INDENT> _type = "color_light" <NEW_LINE> def set_color(self, hue: float, saturation: float) -> None: <NEW_LINE> <INDENT> raise NotImplementedError()
AbsColorTemperatureLight is an abstraction of all lighting devices with controllable color temperature
62598fbb7d43ff24874274d2
class ScanInfo(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.CallbackUrl = None <NEW_LINE> self.ScanTypes = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.CallbackUrl = params.get("CallbackUrl") <NEW_LINE> self.ScanTypes = params.get("ScanTypes")
需要扫描的应用的服务信息
62598fbb091ae35668704dbf