code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class FileSizeSpinButton(Gtk.Box): <NEW_LINE> <INDENT> __gsignals__ = { 'value-changed': (GObject.SIGNAL_RUN_FIRST, None, (int, )) } <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> Gtk.Box.__init__(self, orientation=Gtk.Orientation.HORIZONTAL) <NEW_LINE> self._last_val, self._curr_exp = 1, 1 <NEW_LINE> self._units =...
Widget to choose a file size in the usual units. Works mostly like a GtkSpinButon (and consists of one).
62598fb163d6d428bbee27f8
class Users(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'users' <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> name = db.Column(db.String(250)) <NEW_LINE> email = db.Column(db.String(250), unique=True) <NEW_LINE> _password = db.Column(db.LargeBinary(128)) <NEW_LINE> _salt = db.Column(db.String(12...
Represents a user of the system. The user is linked to objects that they own and can view.
62598fb1091ae35668704c6c
class MessageMeIfLabel(db.Model): <NEW_LINE> <INDENT> __tablename__ = "messagemeiflabels" <NEW_LINE> messagemeiflabel_id = db.Column(db.Integer, primary_key=True, autoincrement=True) <NEW_LINE> message_me_if_label = db.Column(db.Integer) <NEW_LINE> feature = db.Column(db.Text)
Features for message-me-if labels
62598fb1236d856c2adc9464
class SLPResponse(NamedTuple): <NEW_LINE> <INDENT> packet_id: VarInt <NEW_LINE> json: dict <NEW_LINE> def __bytes__(self): <NEW_LINE> <INDENT> json = dumps(self).encode('latin-1') <NEW_LINE> json_size = len(json) <NEW_LINE> json_size = VarInt(json_size) <NEW_LINE> json_size = bytes(json_size) <NEW_LINE> payload = json_...
A server list ping response.
62598fb1aad79263cf42e820
class Child(Parent): <NEW_LINE> <INDENT> def __init__(self, name, age, sex): <NEW_LINE> <INDENT> super(Child, self).__init__(name, age) <NEW_LINE> self.sex = sex <NEW_LINE> self.dig = Test(self.age) <NEW_LINE> <DEDENT> def play(self): <NEW_LINE> <INDENT> if self.sex == "Male": <NEW_LINE> <INDENT> self.kid = "boy" <NEW_...
This is a class of Child
62598fb126068e7796d4c9a2
class loss(tnn.Module): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(loss, self).__init__() <NEW_LINE> self.loss_rating = tnn.BCEWithLogitsLoss() <NEW_LINE> self.loss_category = tnn.CrossEntropyLoss() <NEW_LINE> <DEDENT> def forward(self, ratingOutput, categoryOutput, ratingTarget, categoryTarget):...
Class for creating the loss function. The labels and outputs from your network will be passed to the forward method during training.
62598fb19c8ee82313040198
class Command(BaseCommand): <NEW_LINE> <INDENT> help = 'Export all courses from mongo to the specified data directory' <NEW_LINE> def handle(self, *args, **options): <NEW_LINE> <INDENT> if len(args) != 1: <NEW_LINE> <INDENT> raise CommandError("export requires one argument: <output path>") <NEW_LINE> <DEDENT> output_pa...
Export all courses from mongo to the specified data directory
62598fb14e4d562566372473
class PickleStorage(BaseStorage): <NEW_LINE> <INDENT> def _load(self, file_path): <NEW_LINE> <INDENT> with open(enc.syspath(file_path), 'rb') as fh: <NEW_LINE> <INDENT> return pickle.load(fh, encoding='bytes') <NEW_LINE> <DEDENT> <DEDENT> def _dump(self, value, file_path): <NEW_LINE> <INDENT> with open(enc.syspath(file...
Implementation using a very simple standard library serialization module.
62598fb14c3428357761a306
class SignalsTestCase(TestCase): <NEW_LINE> <INDENT> def test_disable_for_loaddata(self): <NEW_LINE> <INDENT> self.top = 0 <NEW_LINE> @disable_for_loaddata <NEW_LINE> def make_top(): <NEW_LINE> <INDENT> self.top += 1 <NEW_LINE> <DEDENT> def call(): <NEW_LINE> <INDENT> return make_top() <NEW_LINE> <DEDENT> call() <NEW_L...
Test cases for signals
62598fb130bbd7224646999f
class Timeout: <NEW_LINE> <INDENT> default = TimeoutDefault() <NEW_LINE> forever = None <NEW_LINE> maximum = float(2**20) <NEW_LINE> def __init__(self, timeout=default): <NEW_LINE> <INDENT> self._stop = 0 <NEW_LINE> self.timeout = self._get_timeout_seconds(timeout) <NEW_LINE> <DEDENT> @property <NEW_LINE> def timeout(s...
Implements a basic class which has a timeout, and support for scoped timeout countdowns. Valid timeout values are: - ``Timeout.default`` use the global default value (``context.default``) - ``Timeout.forever`` or ``None`` never time out - Any positive float, indicates timeouts in seconds Example: >>> context.ti...
62598fb14f88993c371f0531
class RelatedObjectInstanceMixin(object): <NEW_LINE> <INDENT> related_object = None <NEW_LINE> related_object_id = None <NEW_LINE> related_object_model_class = None <NEW_LINE> related_object_base_model_class = None <NEW_LINE> def __init__(self, model_admin, instance_pk, related_object_id): <NEW_LINE> <INDENT> super(Rel...
Mixin class for working with persisted form field instances
62598fb1d486a94d0ba2c01c
class Department(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=100) <NEW_LINE> budget = models.IntegerField() <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.name
author: Harper Frankstone purpose: defines properties associated with the Departments properties: departmentName = builds the department name column in the department table, departmentBudget = builds the department budget column for the the department table, the __str__ method makes the departmentName available to be u...
62598fb155399d3f05626572
class AbstractQueryParameter(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def from_api_repr(cls, resource): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def to_api_repr(self): <NEW_LINE> <INDENT> raise NotImplementedError
Base class for named / positional query parameters.
62598fb197e22403b383af5b
class DatabaseService(service_filter.ServiceFilter): <NEW_LINE> <INDENT> valid_versions = [service_filter.ValidVersion('v1')] <NEW_LINE> def __init__(self, version=None): <NEW_LINE> <INDENT> super(DatabaseService, self).__init__(service_type='database', version=version)
The database service.
62598fb110dbd63aa1c70c01
class StaClrNginx(StatusLog): <NEW_LINE> <INDENT> def serialization(self): <NEW_LINE> <INDENT> lines = self.status_log <NEW_LINE> data = self.data <NEW_LINE> if_n = True <NEW_LINE> for i in lines: <NEW_LINE> <INDENT> if i.startswith("nginx"): <NEW_LINE> <INDENT> if "latest" in i: <NEW_LINE> <INDENT> start = lines.index...
default test_status_nginx long analysis
62598fb1d268445f26639baa
class Router: <NEW_LINE> <INDENT> routing_table = {} <NEW_LINE> @staticmethod <NEW_LINE> def extract_data(packets): <NEW_LINE> <INDENT> data_extracted = {} <NEW_LINE> for packet in packets: <NEW_LINE> <INDENT> downlink_format = Router.__get_downlink_format(packet) <NEW_LINE> if downlink_format in Router.routing_table: ...
This class is responsible for taking a list of binary packets and passing them to the correct Downlink Format handler. When using this class, the routing_table must be populated, mapping Downlink Format numbers to the correct handlers
62598fb1aad79263cf42e821
class Box(Sdf): <NEW_LINE> <INDENT> r <NEW_LINE> def __init__(): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def at(): <NEW_LINE> <INDENT> pass
Box aligned with axes
62598fb14e4d562566372474
@base.ReleaseTracks(base.ReleaseTrack.ALPHA) <NEW_LINE> class ExportAlpha(ExportBeta): <NEW_LINE> <INDENT> pass
Export a Google Compute Engine image for Alpha release track.
62598fb191f36d47f2230ece
class LivingSpaceAllocations(dec_base): <NEW_LINE> <INDENT> __tablename__ = 'tb_living_space_allocations' <NEW_LINE> allocation_id = Column(Integer, primary_key=True, autoincrement=True) <NEW_LINE> room_name = Column(String(32), nullable=False) <NEW_LINE> members = Column(String(255)) <NEW_LINE> member_ids = Column(Str...
Create the rooms table
62598fb144b2445a339b6998
class secp256k1(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.P = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f <NEW_LINE> self.a = 0 <NEW_LINE> self.b = 7 <NEW_LINE> self.N = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141 <NEW_LINE> self.Gx = 0x79be6...
Elliptic curve with Secp256k1 standard parameters See https://en.bitcoin.it/wiki/Secp256k1 This is the curve E: y^2 = x^3 + ax + b over Fp P is the characteristic of the finite field G is the base (or generator) point N is a prime number, called the order (number of points in E(Fp)) H is the cofactor
62598fb1cc40096d6161a200
class AaaUserEp(ManagedObject): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> ManagedObject.__init__(self, "AaaUserEp") <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def class_id(): <NEW_LINE> <INDENT> return "aaaUserEp" <NEW_LINE> <DEDENT> DN = "Dn" <NEW_LINE> RN = "Rn" <NEW_LINE> STATUS = "Status"
This class contains the relevant properties and constant supported by this MO.
62598fb1f7d966606f748033
class Frame(amqp_object.AMQPObject): <NEW_LINE> <INDENT> NAME = 'Frame' <NEW_LINE> def __init__(self, frame_type, channel_number): <NEW_LINE> <INDENT> self.frame_type = frame_type <NEW_LINE> self.channel_number = channel_number <NEW_LINE> <DEDENT> def _marshal(self, pieces): <NEW_LINE> <INDENT> payload = ''.join(pieces...
Base Frame object mapping. Defines a behavior for all child classes for assignment of core attributes and implementation of the a core _marshal method which child classes use to create the binary AMQP frame.
62598fb17047854f4633f429
class Permutations_set(Permutations): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def __classcall_private__(cls, s): <NEW_LINE> <INDENT> return super(Permutations_set, cls).__classcall__(cls, tuple(s)) <NEW_LINE> <DEDENT> def __init__(self, s): <NEW_LINE> <INDENT> Permutations.__init__(self, category=FiniteEnumeratedS...
Permutations of an arbitrary given finite set. Here, a "permutation of a finite set `S`" means a list of the elements of `S` in which every element of `S` occurs exactly once. This is not to be confused with bijections from `S` to `S`, which are also often called permutations in literature.
62598fb166656f66f7d5a43e
class CardKeyProviderCsv(CardKeyProvider): <NEW_LINE> <INDENT> csv_file = None <NEW_LINE> filename = None <NEW_LINE> def __init__(self, filename: str): <NEW_LINE> <INDENT> self.csv_file = open(filename, 'r') <NEW_LINE> if not self.csv_file: <NEW_LINE> <INDENT> raise RuntimeError("Could not open CSV file '%s'" % filenam...
Card key provider implementation that allows to query against a specified CSV file
62598fb1167d2b6e312b6fc0
class RenderParameters(object): <NEW_LINE> <INDENT> def __init__(*args, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> baseColor = None <NEW_LINE> showAlphaMask = None <NEW_LINE> unfiltered = None <NEW_LINE> __new__ = None
Provides information on how to render the image.
62598fb15166f23b2e243428
class Sinusoidal(_Transform): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def _get_params(N): <NEW_LINE> <INDENT> A = np.random.uniform(0, 1, N) <NEW_LINE> W = np.random.uniform(0, 0.5, N) <NEW_LINE> F = np.random.uniform(0, np.pi, N) <NEW_LINE> return A, W, F <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def _func(A, ...
Sinusoidal series transformation.
62598fb1627d3e7fe0e06efd
class EventHooks(object): <NEW_LINE> <INDENT> def __init__(self, resource: str, EventType=Event) -> None: <NEW_LINE> <INDENT> self.EventType = EventType <NEW_LINE> self.resource = resource <NEW_LINE> self.events = [] <NEW_LINE> <DEDENT> def _make_and_append(self, event: str, func: EventFuncType) -> None: <NEW_LINE> <IN...
An :class:`Event` container that holds events for a domain resource. :param resource: The domain resource :param EventType: The :class:`Event` class or function for the events of this class.
62598fb1a79ad1619776a0b7
class ResCityZip(models.Model): <NEW_LINE> <INDENT> _name = "res.city.zip" <NEW_LINE> _description = __doc__ <NEW_LINE> _order = "name asc" <NEW_LINE> _rec_name = "display_name" <NEW_LINE> name = fields.Char("ZIP", required=True) <NEW_LINE> city_id = fields.Many2one( "res.city", "City", required=True, auto_join=True, o...
City/locations completion object
62598fb1a8370b77170f042b
class NaiveHermiteSpline(HermiteSpline): <NEW_LINE> <INDENT> def __init__(self, knots, values, extrapolation_left='constant', extrapolation_right='constant'): <NEW_LINE> <INDENT> derivatives = np.gradient(values, knots) <NEW_LINE> HermiteSpline.__init__(self, knots, values, derivatives, extrapolation_left, extrapolatio...
Implements a naive Hermite spline which derivatives the knots are not given but calculated using numpy.gradient.
62598fb155399d3f05626574
class MissingDataError(Exception): <NEW_LINE> <INDENT> pass
Error to be raised if any images are missing key data, like energy or forces.
62598fb1498bea3a75a57b6f
class DescribleL7RulesRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Business = None <NEW_LINE> self.Id = None <NEW_LINE> self.RuleIdList = None <NEW_LINE> self.Limit = None <NEW_LINE> self.Offset = None <NEW_LINE> self.Domain = None <NEW_LINE> self.ProtocolList = None <NEW_LIN...
DescribleL7Rules请求参数结构体
62598fb1e1aae11d1e7ce84b
class LMDBDataPointIndexed(MapData): <NEW_LINE> <INDENT> def __init__(self, ds, index=1): <NEW_LINE> <INDENT> def f(dp): <NEW_LINE> <INDENT> dp[index-1:index+1] = loads(dp[index]) <NEW_LINE> return dp <NEW_LINE> <DEDENT> super(LMDBDataPointIndexed, self).__init__(ds, f)
Read a LMDB file and produce deserialized values. This can work with :func:`tensorpack.dataflow.dftools.dump_dataflow_to_lmdb`. The input DS can be processed already (with join, shuffle, etc), so the index of key and val are specified. Further more, there could be multiple LMDB data fused together before local shuf...
62598fb156b00c62f0fb2905
class StoringException(Exception): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> self.message = message <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.message
Exception raised when storing file
62598fb157b8e32f52508143
class CheckResult(structs_rdf.RDFProtoStruct): <NEW_LINE> <INDENT> protobuf = checks_pb2.CheckResult <NEW_LINE> def __nonzero__(self): <NEW_LINE> <INDENT> return bool(self.anomaly) <NEW_LINE> <DEDENT> def ExtendAnomalies(self, other): <NEW_LINE> <INDENT> for o in other: <NEW_LINE> <INDENT> if o is not None: <NEW_LINE> ...
Results of a single check performed on a host.
62598fb171ff763f4b5e77c1
class WorkThread(QThread): <NEW_LINE> <INDENT> trigger = pyqtSignal() <NEW_LINE> def __int__(self): <NEW_LINE> <INDENT> super(WorkThread, self).__init__() <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> os.system( "gnome-terminal -x bash -c 'source ~/catkin_ws/devel/setup.bash; roslaunch ros_car_py car_running.l...
使用 pyqtsignalo函数创建信号时,信号可以传递多个参数,并指定信号传递参 数的类型,参数类型是标准的 Python数据类型(字符串、日期、布尔类型、数字、 列表、元组和字典)
62598fb17c178a314d78d4ec
class Post(models.Model): <NEW_LINE> <INDENT> comment = models.CharField(max_length=255) <NEW_LINE> latitude = models.CharField(max_length=100) <NEW_LINE> longitude = models.CharField(max_length=100) <NEW_LINE> traffic = models.IntegerField() <NEW_LINE> capacity = models.IntegerField() <NEW_LINE> busline = models.Forei...
Post Model.
62598fb1f548e778e596b5f3
class Shuffle: <NEW_LINE> <INDENT> def __init__(self, schema: Schema): <NEW_LINE> <INDENT> self.schema = schema <NEW_LINE> <DEDENT> def _shuffle_within_keyed_list(self, to_shuffle: Dict, path: List) -> Dict: <NEW_LINE> <INDENT> ret: Dict[str, Dict] = OrderedDict() <NEW_LINE> for key, value in to_shuffle.items(): <NEW_L...
Inverse of sort -- completely randomize all structure to be sorted
62598fb1d268445f26639bab
class TestLyapunov(object): <NEW_LINE> <INDENT> def test_safe_set_init(self): <NEW_LINE> <INDENT> with tf.Session(): <NEW_LINE> <INDENT> discretization = GridWorld([[0, 1], [0, 1]], 3) <NEW_LINE> lyap_fun = lambda x: tf.reduce_sum(tf.square(x), axis=1) <NEW_LINE> dynamics = LinearSystem(np.array([[1, 0.01], [0., 1.]]))...
Test the Lyapunov base class.
62598fb13539df3088ecc302
class Event: <NEW_LINE> <INDENT> def __init__(self, raw): <NEW_LINE> <INDENT> self._raw = raw <NEW_LINE> <DEDENT> @property <NEW_LINE> def raw(self): <NEW_LINE> <INDENT> return self._raw <NEW_LINE> <DEDENT> @property <NEW_LINE> def type_id(self): <NEW_LINE> <INDENT> return self.raw["eventId"] <NEW_LINE> <DEDENT> @prope...
A representation of a Risco event.
62598fb1a8370b77170f042c
@register <NEW_LINE> class StepBackArguments(BaseSchema): <NEW_LINE> <INDENT> __props__ = { "threadId": { "type": "integer", "description": "Execute 'stepBack' for this thread." } } <NEW_LINE> __refs__ = set() <NEW_LINE> __slots__ = list(__props__.keys()) + ['kwargs'] <NEW_LINE> def __init__(self, threadId, update_ids_...
Arguments for 'stepBack' request. Note: automatically generated code. Do not edit manually.
62598fb1cc0a2c111447b062
class Subscription(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.subscribers = [] <NEW_LINE> self.new_data = None <NEW_LINE> self.old_data = None <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> return len(self.subscribers) <NEW_LINE> <DEDENT> def __getitem__(self, subscriber_number: int...
A simple class to handle subscriptions to a pattern, and updating the data associated with it. Attributes: new_data (Any): new data to be used in updating the subscription query pattern (passed along to response_to_query). old_data (Any): copy of the new data after it has been retired, used for...
62598fb1a05bb46b3848a8bb
class OrganisationMixin(object): <NEW_LINE> <INDENT> def find_organisations(self): <NEW_LINE> <INDENT> organisations = {} <NEW_LINE> current_user = User.objects.with_id(self.current_user.id) <NEW_LINE> for organisation in self.current_user.organisations: <NEW_LINE> <INDENT> all_projects = Project.objects(organisation=o...
A mixin class
62598fb138b623060ffa90ec
class StoppableThread(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(StoppableThread, self).__init__(*args, **kwargs) <NEW_LINE> self._stop = threading.Event() <NEW_LINE> <DEDENT> def stop(self): <NEW_LINE> <INDENT> self._stop.set() <NEW_LINE> <DEDENT> def stopped(...
A thread that exposes a stop command to halt execution.
62598fb160cbc95b063643a0
class TestVoltageMap(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 make_instance(self, include_optional): <NEW_LINE> <INDENT> if include_optional : <NEW_LINE> <INDENT> return VoltageMap( name = '...
VoltageMap unit test stubs
62598fb13317a56b869be573
class TestShowVolumeCapability(volume_fakes.TestVolume): <NEW_LINE> <INDENT> capability = volume_fakes.FakeCapability.create_one_capability() <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> super(TestShowVolumeCapability, self).setUp() <NEW_LINE> self.capability_mock = self.app.client_manager.volume.capabilities <NEW_L...
Test backend capability functionality.
62598fb15fcc89381b266174
class DriverOutput(object): <NEW_LINE> <INDENT> strip_patterns = [] <NEW_LINE> strip_patterns.append((re.compile('at \(-?[0-9]+,-?[0-9]+\) *'), '')) <NEW_LINE> strip_patterns.append((re.compile('size -?[0-9]+x-?[0-9]+ *'), '')) <NEW_LINE> strip_patterns.append((re.compile('text run width -?[0-9]+: '), '')) <NEW_LINE> s...
Groups information about a output from driver for easy passing and post-processing of data.
62598fb1dd821e528d6d8f85
class UserSignupSchema(UserSchema): <NEW_LINE> <INDENT> password = SchemaNode( String(), validator=Length(max=30))
Schema definition for user signup.
62598fb166656f66f7d5a440
class MACCORExtractor(BatteryDataExtractor): <NEW_LINE> <INDENT> def group(self, files: Union[str, List[str]], directories: List[str] = None, context: dict = None) -> Iterator[Tuple[str, ...]]: <NEW_LINE> <INDENT> for file in files: <NEW_LINE> <INDENT> if file[-3:].isdigit(): <NEW_LINE> <INDENT> yield file <NEW_LINE> <...
Parser for reading from Arbin-format files Expects the files to be in .### format to be an ASCII file
62598fb126068e7796d4c9a6
class SplitLists(Enrich): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> self.data = data <NEW_LINE> <DEDENT> def enrich(self, columns): <NEW_LINE> <INDENT> for column in columns: <NEW_LINE> <INDENT> if column not in self.data.columns: <NEW_LINE> <INDENT> return self.data <NEW_LINE> <DEDENT> <DEDENT>...
This class looks for lists in the given columns and append at the end of the dataframe a row for each entry in those lists.
62598fb1167d2b6e312b6fc2
class newBriquetteTest(MyTest): <NEW_LINE> <INDENT> def briquette_verify(self): <NEW_LINE> <INDENT> LoginPage(self.driver).login('13733333333', '88888888') <NEW_LINE> briquette(self.driver).new_briquette() <NEW_LINE> <DEDENT> def test_newBriquette1(self): <NEW_LINE> <INDENT> self.briquette_verify() <NEW_LINE> time.slee...
试块送检
62598fb15fdd1c0f98e5dfdd
class PrepareOutputDir(luigi.Task): <NEW_LINE> <INDENT> def output(self): <NEW_LINE> <INDENT> return luigi.LocalTarget("tmp/test.txt")
If invoked, it cleans up existing files. Also, creates required directories.
62598fb13539df3088ecc303
class VirtualNetworkListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[VirtualNetwork]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, value: Optional[List["VirtualNetwork"]] = None, next_link: Optional[str] = None, ...
Response for the ListVirtualNetworks API service call. :param value: Gets a list of VirtualNetwork resources in a resource group. :type value: list[~azure.mgmt.network.v2018_12_01.models.VirtualNetwork] :param next_link: The URL to get the next set of results. :type next_link: str
62598fb1a79ad1619776a0b9
class Object(object): <NEW_LINE> <INDENT> def type(self): <NEW_LINE> <INDENT> affirm(False, u".type isn't overloaded") <NEW_LINE> <DEDENT> @jit.unroll_safe <NEW_LINE> def invoke(self, args): <NEW_LINE> <INDENT> import pixie.vm.stdlib as stdlib <NEW_LINE> return stdlib.invoke_other(self, args) <NEW_LINE> <DEDENT> def in...
Base Object for all VM objects
62598fb14527f215b58e9f26
class WebLiveBackend(object): <NEW_LINE> <INDENT> client = None <NEW_LINE> URL = os.environ.get('SOFTWARE_CENTER_WEBLIVE_HOST', 'https://weblive.stgraber.org/weblive/json') <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.weblive = WebLive(self.URL, True) <NEW_LINE> self.available_servers = [] <NEW_LINE> for cli...
Backend for interacting with the WebLive service
62598fb192d797404e388b8c
class MulledDockerContainerResolver(CliContainerResolver): <NEW_LINE> <INDENT> resolver_type = "mulled" <NEW_LINE> shell = '/bin/bash' <NEW_LINE> protocol: Optional[str] = None <NEW_LINE> def __init__(self, app_info=None, namespace="biocontainers", hash_func="v2", auto_install=True, **kwds): <NEW_LINE> <INDENT> super()...
Look for mulled images matching tool dependencies.
62598fb1cc0a2c111447b063
class ConfigurationService: <NEW_LINE> <INDENT> def __init__(self, repository, configuration_changed_event): <NEW_LINE> <INDENT> self.repository = repository <NEW_LINE> self.event = configuration_changed_event <NEW_LINE> <DEDENT> def change_path(self, path): <NEW_LINE> <INDENT> self.repository.change_path(path) <NEW_LI...
Handle configuration rules
62598fb171ff763f4b5e77c3
class Loader(object): <NEW_LINE> <INDENT> def __init__(self, config_path=None): <NEW_LINE> <INDENT> self.config_path = None <NEW_LINE> config_path = config_path or CONF.api_paste_config <NEW_LINE> if not os.path.isabs(config_path): <NEW_LINE> <INDENT> self.config_path = CONF.find_file(config_path) <NEW_LINE> <DEDENT> e...
Used to load WSGI applications from paste configurations.
62598fb156ac1b37e630223c
class CausalLinearAttention(Module): <NEW_LINE> <INDENT> def __init__(self, query_dimensions, feature_map=None, eps=1e-6, event_dispatcher=""): <NEW_LINE> <INDENT> super(CausalLinearAttention, self).__init__() <NEW_LINE> self.feature_map = ( feature_map(query_dimensions) if feature_map else elu_feature_map(query_dimens...
Implement causally masked attention using dot product of feature maps in O(N D^2) complexity. See fast_transformers.attention.linear_attention.LinearAttention for the general concept of replacing the softmax with feature maps. In addition to that, we also make use of the fact that causal masking is a triangular mask w...
62598fb1d7e4931a7ef3c0e6
class TestCMovAverage(TestCase): <NEW_LINE> <INDENT> def __init__(self, *args, **kwds): <NEW_LINE> <INDENT> TestCase.__init__(self, *args, **kwds) <NEW_LINE> self.data = np.arange(25) <NEW_LINE> self.maskeddata = ma.array(self.data) <NEW_LINE> self.maskeddata[10] = masked <NEW_LINE> <DEDENT> def test_onregulararray(sel...
Testing Centered Moving Average
62598fb1adb09d7d5dc0a5dc
class Circle: <NEW_LINE> <INDENT> pass
Represents a circle. attributes: center (a Point object), radius.
62598fb1d58c6744b42dc301
class SlideLayouts(ParentedElementProxy): <NEW_LINE> <INDENT> __slots__ = ("_sldLayoutIdLst",) <NEW_LINE> def __init__(self, sldLayoutIdLst, parent): <NEW_LINE> <INDENT> super(SlideLayouts, self).__init__(sldLayoutIdLst, parent) <NEW_LINE> self._sldLayoutIdLst = sldLayoutIdLst <NEW_LINE> <DEDENT> def __getitem__(self, ...
Sequence of slide layouts belonging to a slide-master. Supports indexed access, len(), iteration, index() and remove().
62598fb15fdd1c0f98e5dfde
class TestEsiToken(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 testEsiToken(self): <NEW_LINE> <INDENT> pass
EsiToken unit test stubs
62598fb1cc0a2c111447b064
class LoadBalancerNetworkInterfacesOperations(object): <NEW_LINE> <INDENT> models = _models <NEW_LINE> def __init__(self, client, config, serializer, deserializer): <NEW_LINE> <INDENT> self._client = client <NEW_LINE> self._serialize = serializer <NEW_LINE> self._deserialize = deserializer <NEW_LINE> self._config = con...
LoadBalancerNetworkInterfacesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. :type models: ~azure.mgmt.network.v2020_07_0...
62598fb1f9cc0f698b1c52f3
class WikiThumbAction (BaseAction): <NEW_LINE> <INDENT> stringId = u"WikiThumbnail" <NEW_LINE> def __init__(self, application): <NEW_LINE> <INDENT> self._application = application <NEW_LINE> <DEDENT> @property <NEW_LINE> def title(self): <NEW_LINE> <INDENT> return _(u"Thumbnail") <NEW_LINE> <DEDENT> @property <NEW_LINE...
Вставка миниатюры
62598fb144b2445a339b699a
class HybridVisMModes(FreqContainer, MContainer): <NEW_LINE> <INDENT> _axes = ("pol", "ew", "el") <NEW_LINE> _dataset_spec = { "vis": { "axes": ["m", "msign", "pol", "freq", "ew", "el"], "dtype": np.complex64, "initialise": True, "distributed": True, "distributed_axis": "freq", }, "vis_weight": { "axes": ["m", "msign",...
Visibilities beamformed in the NS direction and m-mode transformed in RA. This container has visibilities beam formed only in the NS direction to give a grid in elevation.
62598fb1be383301e025384c
class Language(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.iso3 = None <NEW_LINE> self.wals_code = None <NEW_LINE> self.iso1 = None <NEW_LINE> self.wikicode = None <NEW_LINE> self.wikiname = None <NEW_LINE> self.wikisize = None <NEW_LINE> self.wals_vec = None <NEW_LINE> self.phoible_set = ...
Language class. Each language has: * ISO639-1 code (e.g. tr) * ISO639-3 code (e.g. cmn) * wikipedia code (e.g. fr) * wikipedia name (e.g. Waray-Waray) * phoible data * wals data * script data * character frequency data * wikipedia file size
62598fb10c0af96317c563ce
class YearReport(AbstractReport): <NEW_LINE> <INDENT> def __init__(self, year, month_queryset, customer=None): <NEW_LINE> <INDENT> self.settings = ProfileSettings.get_solo() <NEW_LINE> self.customer = customer <NEW_LINE> self.year = year <NEW_LINE> self.months = self.create_months_from_queryset(month_queryset) <NEW_LIN...
This class represents a report for one year. It holds the summed up month and quarter values and also the total amount.
62598fb17047854f4633f42d
class MultiWidgetButtons(object): <NEW_LINE> <INDENT> def __init__(self, parent, label, buttons): <NEW_LINE> <INDENT> self.box = gtk.HBox(False, 0) <NEW_LINE> parent.pack_start(self.box, False, False, 0) <NEW_LINE> if label: <NEW_LINE> <INDENT> label = gtk.Label('%s:' % label) <NEW_LINE> label.set_alignment(0, 0.5) <NE...
Display label and multiple toggle image buttons.
62598fb14e4d562566372478
class login(Page): <NEW_LINE> <INDENT> url= '/' <NEW_LINE> def selectLoginMethod(self): <NEW_LINE> <INDENT> ele0 = self.driver.find_element_by_id('lbNormal') <NEW_LINE> ActionChains(self.driver).move_to_element(ele0).perform() <NEW_LINE> <DEDENT> def switchToFrame(self): <NEW_LINE> <INDENT> self.driver.switch_to.frame(...
用户登录页面
62598fb132920d7e50bc60a6
class Solver(BasicSolver): <NEW_LINE> <INDENT> def __init__(self, state, **kwargs): <NEW_LINE> <INDENT> self.moves = [] <NEW_LINE> super().__init__(state, **kwargs) <NEW_LINE> <DEDENT> def apply(self, move): <NEW_LINE> <INDENT> self.moves.append(move) <NEW_LINE> super().apply(move) <NEW_LINE> <DEDENT> @property <NEW_LI...
Keep track of the moves that are applied to the state.
62598fb17b25080760ed7503
class ServicesRolloutsService(base_api.BaseApiService): <NEW_LINE> <INDENT> _NAME = u'services_rollouts' <NEW_LINE> def __init__(self, client): <NEW_LINE> <INDENT> super(ServicemanagementV1.ServicesRolloutsService, self).__init__(client) <NEW_LINE> self._upload_configs = { } <NEW_LINE> <DEDENT> def Create(self, request...
Service class for the services_rollouts resource.
62598fb1091ae35668704c72
class TestInterpolateRepeats(unittest.TestCase): <NEW_LINE> <INDENT> def test_monotonic(self): <NEW_LINE> <INDENT> repeats = np.array([ 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, ], dtype=np.float32) <NEW_LINE> expected = np.array([ 1., 1.33333333, 1.66666667, 2., 2.5, 3., 3.33333333, 3.66666667, 4., 4.5, 5., 5.25...
Test _interpolate_repeats helper function
62598fb1167d2b6e312b6fc4
class Address(BaseModel): <NEW_LINE> <INDENT> user = models.ForeignKey('users.User', on_delete=models.CASCADE, related_name='addresses', verbose_name='用户') <NEW_LINE> province = models.ForeignKey('areas.Area', on_delete=models.PROTECT, related_name='province_addresses', verbose_name='省') <NEW_LINE> city = models.Foreig...
用户地址模型类
62598fb1a79ad1619776a0bb
class VocabularyType(Model): <NEW_LINE> <INDENT> def __init__(self, id: str=None, name: str=None, description: str=None, tags: Dict[str, str]=None): <NEW_LINE> <INDENT> self.openapi_types = { 'id': str, 'name': str, 'description': str, 'tags': Dict[str, str] } <NEW_LINE> self.attribute_map = { 'id': 'id', 'name': 'name...
NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually.
62598fb12c8b7c6e89bd3818
class RepeatSumLayer(lasagne.layers.MergeLayer): <NEW_LINE> <INDENT> def __init__(self, incomings, axis=1, **kwargs): <NEW_LINE> <INDENT> super(RepeatSumLayer, self).__init__(incomings, **kwargs) <NEW_LINE> self.axis = axis <NEW_LINE> <DEDENT> def get_output_shape_for(self, input_shapes): <NEW_LINE> <INDENT> output_sha...
Sums up multiple inputs along the specified axis. Inputs should have the same shape. Additionally, if a dimension has size 1 it gets broadcasted automatically to the size of the other layers. Parameters ---------- incomings : a list of :class:`Layer` instances or tuples The layers feeding into this layer, or expec...
62598fb13539df3088ecc305
class MovementSpecs(Specs): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def specs_factory(cls): <NEW_LINE> <INDENT> csv_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'feature_metadata', 'movement_features.csv') <NEW_LINE> return super(M...
This class specifies how to treat each movement-related feature when doing histogram processing. Attributes ---------- feature_field : old_feature_field : index : feature_category : is_time_series : bin_width : is_zero_bin : is_signed : name : short_name : units : Notes ---------------- From Matlab comments: TODO: - ...
62598fb18da39b475be03239
class DataMessage(AsyncMessage): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> AsyncMessage.__init__(self) <NEW_LINE> self.identity = None <NEW_LINE> self.operation = None
I am used to transport an operation that occured on a managed object or collection. This class of message is transmitted between clients subscribed to a remote destination as well as between server nodes within a cluster. The payload of this message describes all of the relevant details of the operation. This informat...
62598fb1009cb60464d01574
class DTIFit(FSLCommand): <NEW_LINE> <INDENT> _cmd = 'dtifit' <NEW_LINE> input_spec = DTIFitInputSpec <NEW_LINE> output_spec = DTIFitOutputSpec <NEW_LINE> def _list_outputs(self): <NEW_LINE> <INDENT> outputs = self.output_spec().get() <NEW_LINE> for k in list(outputs.keys()): <NEW_LINE> <INDENT> if k not in ('outputtyp...
Use FSL dtifit command for fitting a diffusion tensor model at each voxel Example ------- >>> from nipype.interfaces import fsl >>> dti = fsl.DTIFit() >>> dti.inputs.dwi = 'diffusion.nii' >>> dti.inputs.bvecs = 'bvecs' >>> dti.inputs.bvals = 'bvals' >>> dti.inputs.base_name = 'TP' >>> dti.inputs.mask = 'mask.nii' >>...
62598fb171ff763f4b5e77c5
class AdminUserChangeForm(forms.ModelForm): <NEW_LINE> <INDENT> password = ReadOnlyPasswordHashField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Account <NEW_LINE> fields = ('username', 'email', 'password', 'name', 'is_active', 'is_staff', 'is_admin') <NEW_LINE> <DEDENT> def clean_password(self): <NEW_LINE> <I...
A form for updating users. Includes all the fields on the user, but replaces the password field with admin's password hash display field.
62598fb156b00c62f0fb2909
class Producto(models.Model): <NEW_LINE> <INDENT> marca=models.CharField(max_length=50) <NEW_LINE> nombre=models.CharField(max_length=50) <NEW_LINE> foto=models.ImageField(upload_to='foto/') <NEW_LINE> precio=models.IntegerField() <NEW_LINE> caracteristica = models.CharField(max_length=200, blank=True) <NEW_LINE> def _...
Producto
62598fb1e1aae11d1e7ce84d
class GpibInstrument(Instrument): <NEW_LINE> <INDENT> def __init__(self, gpib_identifier, board_number=0, **keyw): <NEW_LINE> <INDENT> warn_for_invalid_kwargs(keyw, Instrument.ALL_KWARGS.keys()) <NEW_LINE> if isinstance(gpib_identifier, int): <NEW_LINE> <INDENT> resource_name = "GPIB%d::%d" % (board_number, gpib_identi...
Class for GPIB instruments. This class extents the Instrument class with special operations and properties of GPIB instruments. :param gpib_identifier: strings are interpreted as instrument's VISA resource name. Numbers are interpreted as GPIB number. :param board_number: the number of the GPI...
62598fb17c178a314d78d4f0
class TouchSS(IMP.ScoreState): <NEW_LINE> <INDENT> def __init__(self, m, pi, k): <NEW_LINE> <INDENT> IMP.ScoreState.__init__(self, m, "TouchSS") <NEW_LINE> self.pi = pi <NEW_LINE> self.k = k <NEW_LINE> <DEDENT> def do_before_evaluate(self): <NEW_LINE> <INDENT> self.get_model().set_attribute(self.k, self.pi, 1) <NEW_LIN...
ScoreState that logs all calls
62598fb185dfad0860cbfa9d
class DeviceAPI(API): <NEW_LINE> <INDENT> device: Device <NEW_LINE> def __init__(self, db_factory: Callable, pin_spec: PinSpec) -> None: <NEW_LINE> <INDENT> super().__init__(db_factory) <NEW_LINE> self.device = Device(pin_spec) <NEW_LINE> <DEDENT> async def _feed_fish(self, db: Database, feeding): <NEW_LINE> <INDENT> t...
An API implementation tied to the fish feeder hardware. Attributes: device: A Device instance to control the hardware
62598fb1f548e778e596b5f7
class DeleteCcnResponse(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")
DeleteCcn返回参数结构体
62598fb13317a56b869be575
class Conducteur(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'conducteurs' <NEW_LINE> telephone = db.Column(db.String, primary_key=True) <NEW_LINE> email = db.Column(db.String, unique=True) <NEW_LINE> prenom = db.Column(db.String) <NEW_LINE> nom = db.Column(db.String) <NEW_LINE> libre = db.Column(db.Boolean) <NEW_LI...
Un conducteur de taxi.
62598fb15fdd1c0f98e5dfe0
class OrganizationOnboardingTask(Model): <NEW_LINE> <INDENT> __core__ = False <NEW_LINE> TASK_CHOICES = ( (OnboardingTask.FIRST_EVENT, 'First event'), (OnboardingTask.INVITE_MEMBER, 'Invite member'), (OnboardingTask.ISSUE_TRACKER, 'Issue tracker'), (OnboardingTask.NOTIFICATION_SERVICE, 'Notification services'), (Onboar...
Onboarding tasks walk new Sentry orgs through basic features of Sentry. data field options (not all tasks have data fields): FIRST_EVENT: { 'platform': 'flask', } INVITE_MEMBER: { 'invited_member': user.id, 'teams': [team.id] } ISSUE_TRACKER | NOTIFICATION_SERVICE: { 'plugin': 'plugin_name' } ISSUE_ASS...
62598fb12ae34c7f260ab136
class MediaWikiSignature(Component): <NEW_LINE> <INDENT> _description = cleandoc(__doc__) <NEW_LINE> implements(IWikiPageManipulator) <NEW_LINE> def prepare_wiki_page(self, req, page, fields): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def _count_characters(self, text, character): <NEW_LINE> <INDENT> count = 0 <NEW_L...
[required] Provides the functionality that MediaWiki signatures (`~~~~`) can be used when editing Wiki pages. During the saving of the Wiki page the !MediaWiki signature is replaced by the username and/or the timestamp of the edit. Three different variants are possible: * The `~~~` will be replaced by the username o...
62598fb1be383301e025384e
class MultiProviderNetworks(model_base.BASEV2): <NEW_LINE> <INDENT> __tablename__ = 'nvp_multi_provider_networks' <NEW_LINE> network_id = Column(String(36), ForeignKey('networks.id', ondelete="CASCADE"), primary_key=True) <NEW_LINE> def __init__(self, network_id): <NEW_LINE> <INDENT> self.network_id = network_id
Networks that were provision through multiprovider extension.
62598fb144b2445a339b699b
class PackagePluginManager(PluginManager): <NEW_LINE> <INDENT> PLUGIN_MANIFEST = 'plugins.py' <NEW_LINE> plugin_path = List(Directory) <NEW_LINE> @on_trait_change('plugin_path[]') <NEW_LINE> def _plugin_path_changed(self, obj, trait_name, removed, added): <NEW_LINE> <INDENT> self._update_sys_dot_path(removed, added) <N...
A plugin manager that finds plugins in packages on the 'plugin_path'. All items in 'plugin_path' are directory names and they are all added to 'sys.path' (if not already present). Each directory is then searched for plugins as follows:- a) If the package contains a 'plugins.py' module, then we import it and look for ...
62598fb1cc40096d6161a203
class ActionSend(RouteAction): <NEW_LINE> <INDENT> name = 'send' <NEW_LINE> def __init__(self, data, *, crnl: bool = False): <NEW_LINE> <INDENT> if crnl: <NEW_LINE> <INDENT> self.name = 'send-crnl' <NEW_LINE> <DEDENT> super().__init__(data)
Extremely advanced (and dangerous) function allowing you to add raw data to the response.
62598fb163d6d428bbee2800
class Speak: <NEW_LINE> <INDENT> def __init__(self, bot): <NEW_LINE> <INDENT> self.bot = bot <NEW_LINE> print("{} addon loaded.".format(self.__class__.__name__)) <NEW_LINE> <DEDENT> @commands.has_permissions(manage_messages=True) <NEW_LINE> @commands.command(pass_context=True) <NEW_LINE> async def speak(self, ctx, dest...
Give the bot a voice
62598fb1091ae35668704c74
class SubnetListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[Subnet]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, value: Optional[List["Subnet"]] = None, next_link: Optional[str] = None, **kwargs ): <NEW_LINE> <...
Response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network. :param value: The subnets in a virtual network. :type value: list[~azure.mgmt.network.v2017_06_01.models.Subnet] :param next_link: The URL to get the next set of results. :type next_link: str
62598fb15fcc89381b266176
class GenericResource(Resource): <NEW_LINE> <INDENT> def __init__(self, properties): <NEW_LINE> <INDENT> super(GenericResource, self).__init__("testResource", "testPartition", **properties) <NEW_LINE> for key, value in list(properties.items()): <NEW_LINE> <INDENT> self._data[key] = value <NEW_LINE> <DEDENT> <DEDENT> de...
Mock resource
62598fb1e5267d203ee6b95c
class BaseTAXIIServer: <NEW_LINE> <INDENT> PERSISTENCE_MANAGER_CLASS: ClassVar[Type[BasePersistenceManager]] <NEW_LINE> app: Flask <NEW_LINE> config: dict <NEW_LINE> def __init__(self, config: dict): <NEW_LINE> <INDENT> self.config = config <NEW_LINE> self.persistence = self.PERSISTENCE_MANAGER_CLASS( server=self, api=...
Base class for common functionality in taxii* servers.
62598fb1283ffb24f3cf38e1
class XSvbremss(XSAdditiveModel): <NEW_LINE> <INDENT> __function__ = "xsbrmv" <NEW_LINE> def __init__(self, name='vbremss'): <NEW_LINE> <INDENT> self.kT = Parameter(name, 'kT', 3.0, 1.e-2, 100., 0.0, hugeval, 'keV') <NEW_LINE> self.HeovrH = Parameter(name, 'HeovrH', 1.0, 0., 100., 0.0, hugeval, aliases=["HeH"]) <NEW_LI...
The XSPEC vbremss model: thermal bremsstrahlung. The model is described at [1]_. .. note:: Deprecated in Sherpa 4.10.0 The ``HeH`` parameter has been renamed ``HeovrH`` to match the XSPEC definition. The name ``HeH`` can still be used to access the parameter, but this name will be removed in a future releas...
62598fb1097d151d1a2c1080
class OutputView(webkit.WebView): <NEW_LINE> <INDENT> def __init__(self, theme, source, target, target_display, source_img, target_img): <NEW_LINE> <INDENT> webkit.WebView.__init__(self) <NEW_LINE> self.theme = theme <NEW_LINE> self.last_incoming = None <NEW_LINE> self.ready = False <NEW_LINE> self.pending = [] <NEW_LI...
a class that represents the output widget of a conversation
62598fb166656f66f7d5a444
class BaseParser(LogsterParser): <NEW_LINE> <INDENT> def __init__(self, option_string=None): <NEW_LINE> <INDENT> self.metric = 0 <NEW_LINE> self.reg_compiled = re.compile(self.reg) <NEW_LINE> <DEDENT> def parse_line(self, line): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> if self.reg_compiled.match(line): <NEW_LINE> <...
This class is intended to be inherited from. self.reg, self.name, and self.description must be provided by the child class.
62598fb12ae34c7f260ab137
class Test_cfg(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'test_cfg' <NEW_LINE> id = Column(Integer, unique=True, primary_key=True) <NEW_LINE> cfg = Column(String) <NEW_LINE> def __init__(self, cfg): <NEW_LINE> <INDENT> self.cfg = cfg
Test configuration, can be used multiple times.
62598fb1be8e80087fbbf0bb
class language(MessageFilter): <NEW_LINE> <INDENT> def __init__(self, lang: SLT[str]): <NEW_LINE> <INDENT> if isinstance(lang, str): <NEW_LINE> <INDENT> lang = cast(str, lang) <NEW_LINE> self.lang = [lang] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> lang = cast(List[str], lang) <NEW_LINE> self.lang = lang <NEW_LINE> ...
Filters messages to only allow those which are from users with a certain language code. Note: According to official Telegram API documentation, not every single user has the `language_code` attribute. Do not count on this filter working on all users. Examples: ``MessageHandler(Filters.language("en"), call...
62598fb110dbd63aa1c70c09
class CredentialInputSourceAccess(BaseAccess): <NEW_LINE> <INDENT> model = CredentialInputSource <NEW_LINE> select_related = ('target_credential', 'source_credential') <NEW_LINE> def filtered_queryset(self): <NEW_LINE> <INDENT> return CredentialInputSource.objects.filter( target_credential__in=Credential.accessible_pk_...
I can see a CredentialInputSource when: - I can see the associated target_credential I can create/change a CredentialInputSource when: - I'm an admin of the associated target_credential - I have use access to the associated source credential I can delete a CredentialInputSource when: - I'm an admin of the associate...
62598fb13317a56b869be576