code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class RedisSentinelStorage(RedisStorage): <NEW_LINE> <INDENT> STORAGE_SCHEME = "redis+sentinel" <NEW_LINE> def __init__(self, uri, **options): <NEW_LINE> <INDENT> if not get_dependency("redis"): <NEW_LINE> <INDENT> raise ConfigurationError( "redis prerequisite not available" ) <NEW_LINE> <DEDENT> parsed = urllib.parse....
rate limit storage with redis sentinel as backend
62598fa03d592f4c4edbacf5
class User(AbstractUser): <NEW_LINE> <INDENT> @property <NEW_LINE> def has_profile(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.profile <NEW_LINE> <DEDENT> except Profile.DoesNotExist: <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> return True <NEW_LINE> <DEDENT> @property <NEW_LINE> def has_creditche...
Main auth user model.
62598fa00c0af96317c561a8
class Softmax(Layer): <NEW_LINE> <INDENT> def __init__(self, insize, outsize): <NEW_LINE> <INDENT> super(Softmax, self).__init__(insize, outsize, name=None) <NEW_LINE> self.kernel = nn.LogSoftmax(dim=2)
Softmax Layer
62598fa08e7ae83300ee8ec7
class FileUtilsTest(IndexTester): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.makebase() <NEW_LINE> <DEDENT> def test_model_index(self): <NEW_LINE> <INDENT> self.assertEquals(file_utils.model_index('somepath',[self.collectiondups]),(None,None)) <NEW_LINE> <DEDENT> def test_filespecs(self): <NEW_LINE> ...
test various fileutils
62598fa0a79ad16197769e8c
class PlatformConfigMeta(object): <NEW_LINE> <INDENT> __metaclass__ = abc.ABCMeta <NEW_LINE> @abc.abstractmethod <NEW_LINE> def ConfigDir(self): <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def DownloadDir(self): <NEW_LINE> <INDENT> return None
Class to provide platform-specific information like directory locations. Each platform is expected to subclass PlatformMeta and supply concrete implementations of all methods. We use a Python Abstract Base Class to protect against future versions. If we add fields to this class, any existing platform implementations w...
62598fa07cff6e4e811b584b
class Settings(BaseSettings): <NEW_LINE> <INDENT> SEED: str = 'SCOMIY6IHXNIL6ZFTBBYDLU65VONYWI3Y6EN4IDWDP2IIYTCYZBCCE6C' <NEW_LINE> HORIZON_ENDPOINT: str = kin_config.HORIZON_URI_TEST <NEW_LINE> NETWORK_PASSPHRASE: str = kin_config.HORIZON_PASSPHRASE_TEST <NEW_LINE> APP_ID: str = kin_config.ANON_APP_ID <NEW_LINE> CHANN...
Config options for the bootstrap server If an environmental variable exist for the same name, it will override the default value given here
62598fa03c8af77a43b67e53
class BaseCloudStorage(metaclass=abc.ABCMeta): <NEW_LINE> <INDENT> def __init__( self, part_size: int = DEFAULT_PART_SIZE, file_threshold: int = DEFAULT_FILE_THRESHOLD, ): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.part_size = part_size <NEW_LINE> self.file_threshold = file_threshold <NEW_LINE> <DEDENT> @ab...
Abstract definition of what a platform implementation needs to include. Any new platforms need to inherit from this.
62598fa0fbf16365ca793ee1
class SimpleLock(object): <NEW_LINE> <INDENT> def __init__(self, lockname): <NEW_LINE> <INDENT> self.lockname = lockname <NEW_LINE> self.filename = os.path.join(LOCKDIR, self.lockname) <NEW_LINE> <DEDENT> @property <NEW_LINE> def active(self): <NEW_LINE> <INDENT> return os.path.exists(self.filename) <NEW_LINE> <DEDENT>...
mylock = SimpleLock('mylock') @mylock.decorate def myfunc(): do_something() myfunc() only calls the function if no other thread/process is running it at the moment.
62598fa00a50d4780f705201
class Poll(object): <NEW_LINE> <INDENT> def __init__(self, poll_title, vote_options): <NEW_LINE> <INDENT> global POLL_ID <NEW_LINE> self.poll_ID = POLL_ID <NEW_LINE> POLL_ID += 1 <NEW_LINE> self.creation_time = time.time() <NEW_LINE> self.poll_msg = None <NEW_LINE> self.creation_msg = None <NEW_LINE> self.creator = Non...
A Poll object, used as parent for SinglePoll and MultiPoll.
62598fa0cc0a2c111447ae35
@zope.interface.implementer(interfaces.IUnauthorizedPagelet) <NEW_LINE> class UnauthorizedPagelet(z3c.pagelet.browser.BrowserPagelet): <NEW_LINE> <INDENT> def update(self): <NEW_LINE> <INDENT> self.request.response.setStatus(403) <NEW_LINE> self.request.response.setHeader( 'Expires', 'Mon, 26 Jul 1997 05:00:00 GMT') <N...
Unauthorized pagelet.
62598fa007f4c71912baf273
class Sum(Plugin): <NEW_LINE> <INDENT> def init(self, config): <NEW_LINE> <INDENT> self.register(self.events.TALKED_TO_ME, self.action) <NEW_LINE> <DEDENT> def action(self, user, channel, msg): <NEW_LINE> <INDENT> result = sum(int(x) for x in msg.split()) <NEW_LINE> self.say(channel, u"%s, la suma es %d", user, result)
Ejemplo que suma los nros pasados.
62598fa056ac1b37e6302012
class MsgInstCreate: <NEW_LINE> <INDENT> pass
errorList 错误返回列表 :fieldmembers: * successFlg : 成功标志 * tradeFlag : 允许交易标志 * errorCode : 错误代码 * failInfo : 中文失败信息 * englishFailInfo : 英文失败信息 * optFlag : 操作标志 * exceptionType : 异常类型 * instructId : 指令ID ...
62598fa024f1403a926857c6
class TestGevent(setuptools.Command): <NEW_LINE> <INDENT> BANNED_TESTS = ( 'unit._cython._no_messages_server_completion_queue_per_call_test.Test.test_rpcs', 'unit._cython._no_messages_single_server_completion_queue_test.Test.test_rpcs', 'testing._client_test.ClientTest.test_infinite_request_stream_real_time', 'unit._se...
Command to run tests w/gevent.
62598fa067a9b606de545df2
class IBNDenseUnit(nn.Module): <NEW_LINE> <INDENT> def __init__(self, in_channels, out_channels, dropout_rate, conv1_ibn): <NEW_LINE> <INDENT> super(IBNDenseUnit, self).__init__() <NEW_LINE> self.use_dropout = (dropout_rate != 0.0) <NEW_LINE> bn_size = 4 <NEW_LINE> inc_channels = out_channels - in_channels <NEW_LINE> m...
IBN-DenseNet unit. Parameters: ---------- in_channels : int Number of input channels. out_channels : int Number of output channels. dropout_rate : float Parameter of Dropout layer. Faction of the input units to drop. conv1_ibn : bool Whether to use IBN normalization in the first convolution layer of th...
62598fa0435de62698e9bc1b
class Directions: <NEW_LINE> <INDENT> NORTH = "North" <NEW_LINE> SOUTH = "South" <NEW_LINE> EAST = "East" <NEW_LINE> WEST = "West" <NEW_LINE> STOP = "Stop" <NEW_LINE> LEFT = {NORTH: WEST, SOUTH: EAST, EAST: NORTH, WEST: SOUTH, STOP: STOP} <NEW_LINE> RIGHT = dict([(y,x) for x, y in LEFT.items()])
Map the directions.
62598fa09c8ee82313040082
class ActionContextHandler(sublime_plugin.EventListener): <NEW_LINE> <INDENT> def on_query_context(self, view, key, op, operand, match_all): <NEW_LINE> <INDENT> if not key.startswith('python_traceback'): <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> return view.name() == TRACEBACK_WINDOW_NAME
Provide special `python_traceback` context in traceback window So that plugin could provide traceback specific bindings.
62598fa0796e427e5384e5bb
class SessionViewTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.initial_response = self.client.get(reverse('exordium:index')) <NEW_LINE> <DEDENT> def test_add_success_message(self): <NEW_LINE> <INDENT> add_session_success(self.initial_response.wsgi_request, 'Success') <NEW_LINE> self.ass...
Tests dealing with the session variables we set (for success/fail messages). Mostly this isn't really necessary since they're tested "by accident" in a number of other tests, but we'll explicitly run a couple tests here and slightly increase our coverage to boot.
62598fa02ae34c7f260aaf08
class VanillaSeq2seqModel(baseModel): <NEW_LINE> <INDENT> def _add_decoder(self): <NEW_LINE> <INDENT> cell1 = tf.contrib.rnn.LSTMCell( self.hps.hidden_dim, state_is_tuple=True, initializer=self.rand_unif_init) <NEW_LINE> cell2 = tf.contrib.rnn.LSTMCell( self.hps.hidden_dim, state_is_tuple=True, initializer=self.rand_un...
Vanilla sequence-to-sequence model with attention mechanism.
62598fa05fdd1c0f98e5ddc1
class PartyCustomer(ModelSQL, ModelView): <NEW_LINE> <INDENT> _description = __doc__ <NEW_LINE> _name = "party.customer" <NEW_LINE> _rec_name = 'shortname' <NEW_LINE> _inherits = {'party.party': 'party'} <NEW_LINE> party = fields.Many2One('party.party', 'Party', ondelete="CASCADE", required=True) <NEW_LINE> def create(...
Party Customer
62598fa092d797404e388a7a
class StoryAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('title', 'branch', 'content_type', 'year',) <NEW_LINE> list_filter = ['year', 'public_approved'] <NEW_LINE> search_fields = ['title']
Adds the ability to filter stories in the admin page
62598fa04e4d56256637224c
class YaruAuth(BaseOAuth2): <NEW_LINE> <INDENT> AUTHORIZATION_URL = YANDEX_AUTHORIZATION_URL <NEW_LINE> ACCESS_TOKEN_URL = YANDEX_ACCESS_TOKEN_URL <NEW_LINE> AUTH_BACKEND = YaruBackend <NEW_LINE> SERVER_URL = YANDEX_SERVER <NEW_LINE> SETTINGS_KEY_NAME = 'YANDEX_APP_ID' <NEW_LINE> SETTINGS_SECRET_NAME = 'YANDEX_API_SECR...
Yandex Ya.ru OAuth mechanism
62598fa01b99ca400228f442
class PropertyModel(object): <NEW_LINE> <INDENT> def __init__( self, user_name, bucket_name, property_name=None, property_prefix_id=None): <NEW_LINE> <INDENT> self.user_name = user_name <NEW_LINE> self.bucket_name = bucket_name <NEW_LINE> self.property_name = property_name <NEW_LINE> if property_name: <NEW_LINE> <INDEN...
Properties are key/value pairs linked to a visitor and stored in buckets.
62598fa0a17c0f6771d5c063
class Identity(Transform): <NEW_LINE> <INDENT> def __init__(self,dropout_chance=0): <NEW_LINE> <INDENT> Transform.__init__(self) <NEW_LINE> <DEDENT> def forward(self, x, train=True): <NEW_LINE> <INDENT> self.shape = x.shape <NEW_LINE> return x <NEW_LINE> <DEDENT> def backward(self,grad_wrt_out): <NEW_LINE> <INDENT> ret...
Identity Transform This exists to give you an idea for how to fill out the template
62598fa032920d7e50bc5e7f
class DownloadError(DangoException): <NEW_LINE> <INDENT> pass
Exception raised when an error occurs while the bot was downloading a file.
62598fa0442bda511e95c283
class UserStatsAdmin(FullAuditBaseAdmin): <NEW_LINE> <INDENT> list_display = ('id', ) <NEW_LINE> readonly_fields = ('id', )
UserStats Admin
62598fa085dfad0860cbf989
class ApplicationGatewayBackendHealth(Model): <NEW_LINE> <INDENT> _attribute_map = { 'backend_address_pools': {'key': 'backendAddressPools', 'type': '[ApplicationGatewayBackendHealthPool]'}, } <NEW_LINE> def __init__(self, backend_address_pools=None): <NEW_LINE> <INDENT> self.backend_address_pools = backend_address_poo...
List of ApplicationGatewayBackendHealthPool resources. :param backend_address_pools: :type backend_address_pools: list[~azure.mgmt.network.v2017_06_01.models.ApplicationGatewayBackendHealthPool]
62598fa007f4c71912baf274
class MIMEMessage(db.Model): <NEW_LINE> <INDENT> message_id = db.LinkProperty(required=True) <NEW_LINE> from_id = db.StringProperty() <NEW_LINE> subject = db.StringProperty() <NEW_LINE> reply_to = db.LinkProperty() <NEW_LINE> content_type = db.StringProperty() <NEW_LINE> content = db.StringProperty() <NEW_LINE> @classm...
First version of representation of mailinglist message.
62598fa0a8370b77170f020d
class SessionDestroyedError(Exception): <NEW_LINE> <INDENT> pass
If a session is destroyed, it cannot be opened or accessed anymore
62598fa0ac7a0e7691f72334
class MediaAttachment: <NEW_LINE> <INDENT> def __init__(self, media_type, url): <NEW_LINE> <INDENT> self.media_type = media_type <NEW_LINE> self.url = url <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_json(cls, json): <NEW_LINE> <INDENT> return cls(json['type'], json['payload']['url']) <NEW_LINE> <DEDENT> def to...
A class holding media attachments. Attributes: media_type: The type of the attachment. Can be one of 'image', 'audio', 'video', or 'file'. url: The url of the media as a string.
62598fa08e7ae83300ee8ec9
class IrModel(models.Model): <NEW_LINE> <INDENT> _inherit = 'ir.model' <NEW_LINE> website_form_recaptcha = fields.Boolean( string='Require ReCaptcha', help='Requires successful ReCaptcha for form submission.', )
Add ReCaptcha attr & validation to IrModel for use in forms
62598fa0d6c5a102081e1f6f
class JSONResponseMixin(object): <NEW_LINE> <INDENT> def render_to_json_response(self, context, **response_kwargs): <NEW_LINE> <INDENT> return HttpResponse(self.get_data(context), content_type="application/json") <NEW_LINE> <DEDENT> def get_data(self, context): <NEW_LINE> <INDENT> return json.dumps(context)
A mixin that can be used to render a JSON response.
62598fa091af0d3eaad39c35
class ProxySignalWithArguments(object): <NEW_LINE> <INDENT> def __init__(self, sender, signal_name, signal_index): <NEW_LINE> <INDENT> self._sender = sender <NEW_LINE> self._signal_name = signal_name <NEW_LINE> if isinstance(signal_index, tuple): <NEW_LINE> <INDENT> self._signal_index = ','.join(["'%s'" % a for a in si...
This is a proxy for (what should be) a signal that passes arguments.
62598fa0cc0a2c111447ae37
class Solution: <NEW_LINE> <INDENT> def hasRoute(self, graph, s, t): <NEW_LINE> <INDENT> def dfs(v): <NEW_LINE> <INDENT> if v == t: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> visited.append(v) <NEW_LINE> for i in v.neighbors: <NEW_LINE> <INDENT> if i in visited: <NEW_LINE> <INDENT> continue <NEW_LINE> <DEDENT>...
@param graph: A list of Directed graph node @param s: the starting Directed graph node @param t: the terminal Directed graph node @return: a boolean value
62598fa08da39b475be03009
class _PlayerProperty: <NEW_LINE> <INDENT> def __init__(self, attribute, doc=None): <NEW_LINE> <INDENT> self.attribute = attribute <NEW_LINE> self.__doc__ = doc or '' <NEW_LINE> <DEDENT> def __get__(self, obj, objtype=None): <NEW_LINE> <INDENT> if obj is None: <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> if '_' ...
Descriptor for Player attributes to forward to the AudioPlayer. We want the Player to have attributes like volume, pitch, etc. These are actually implemented by the AudioPlayer. So this descriptor will forward an assignement to one of the attributes to the AudioPlayer. For example `player.volume = 0.5` will call `play...
62598fa03eb6a72ae038a46b
class DescribeProjectSecurityGroupsResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Groups = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("Groups") is not None: <NEW_LINE> <INDENT> self.Groups = [] <N...
DescribeProjectSecurityGroups返回参数结构体
62598fa0097d151d1a2c0e52
class ServiceCallEventTest(TestCase): <NEW_LINE> <INDENT> def test_attribute_names(self): <NEW_LINE> <INDENT> event = ServiceCallEvent() <NEW_LINE> expected = [] <NEW_LINE> names = sorted(n for n in dir(event) if not n.startswith("_")) <NEW_LINE> self.assertSequenceEqual(expected, names) <NEW_LINE> <DEDENT> def test_fo...
Test the ServiceCallEvent class.
62598fa030dc7b766599f677
class StringNotInAdvancedFilter(AdvancedFilter): <NEW_LINE> <INDENT> _validation = { 'operator_type': {'required': True}, } <NEW_LINE> _attribute_map = { 'operator_type': {'key': 'operatorType', 'type': 'str'}, 'key': {'key': 'key', 'type': 'str'}, 'values': {'key': 'values', 'type': '[str]'}, } <NEW_LINE> def __init__...
StringNotIn Advanced Filter. All required parameters must be populated in order to send to Azure. :ivar operator_type: Required. The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.Constant filled by server. Possible values include: "NumberIn", "NumberNotIn", "NumberLessThan"...
62598fa0009cb60464d0134e
class PIPConfigException(PIPException): <NEW_LINE> <INDENT> pass
Configuration errors related to the XACML PIP (Policy Information Point) class
62598fa05f7d997b871f92f4
@define_command(args=MATCH_STR, syntax='<message>') <NEW_LINE> class cmd_say(events.Handler): <NEW_LINE> <INDENT> def handler_10_do(self, event, message): <NEW_LINE> <INDENT> event.client.write("You say: %s" % message) <NEW_LINE> self.container.write_all( "%s says: %s" % (event.user.name, message), exclude=event.client...
Say something to the other users
62598fa0097d151d1a2c0e53
class NamedType(object): <NEW_LINE> <INDENT> isOptional = False <NEW_LINE> isDefaulted = False <NEW_LINE> def __init__(self, name, asn1Object): <NEW_LINE> <INDENT> self.__name = name <NEW_LINE> self.__type = asn1Object <NEW_LINE> self.__nameAndType = name, asn1Object <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <...
Create named field object for a constructed ASN.1 type. The |NamedType| object represents a single name and ASN.1 type of a constructed ASN.1 type. |NamedType| objects are immutable and duck-type Python :class:`tuple` objects holding *name* and *asn1Object* components. Parameters ---------- name: :py:class:`str` ...
62598fa0627d3e7fe0e06cd5
class Any(expression.ColumnElement): <NEW_LINE> <INDENT> __visit_name__ = 'any' <NEW_LINE> def __init__(self, left, right, operator=operators.eq): <NEW_LINE> <INDENT> self.type = sqltypes.Boolean() <NEW_LINE> self.left = expression._literal_as_binds(left) <NEW_LINE> self.right = right <NEW_LINE> self.operator = operato...
Represent the clause ``left operator ANY (right)``. ``right`` must be an array expression. .. seealso:: :class:`.postgresql.ARRAY` :meth:`.postgresql.ARRAY.Comparator.any` - ARRAY-bound method
62598fa0b7558d5895463457
class GatedRecurrentUnit(object): <NEW_LINE> <INDENT> def __init__(self, n_hidden=100, init='glorot_uniform'): <NEW_LINE> <INDENT> self.n_hidden = n_hidden <NEW_LINE> self.init = initializations.get(init) <NEW_LINE> Wz = self.init([n_hidden, n_hidden]) <NEW_LINE> Wr = self.init([n_hidden, n_hidden]) <NEW_LINE> Wh = sel...
Submodule for Message Passing
62598fa07d847024c075c1f0
class KeystoneLDAPConfigurationAdapter( charms_openstack.adapters.ConfigurationAdapter): <NEW_LINE> <INDENT> @property <NEW_LINE> def ldap_options(self): <NEW_LINE> <INDENT> return os_utils.config_flags_parser( hookenv.config('ldap-config-flags') )
Charm specific configuration adapter to deal with ldap config flag parsing
62598fa097e22403b383ad36
class RateHandler(BaseHandler): <NEW_LINE> <INDENT> @tornado.web.asynchronous <NEW_LINE> def post(self): <NEW_LINE> <INDENT> self.finish() <NEW_LINE> if 'value' in self.request.arguments: <NEW_LINE> <INDENT> play = bool(float(self.request.arguments['value'][0])) <NEW_LINE> if play: <NEW_LINE> <INDENT> self._media_backe...
Handler for /rate requests. The rate command is used to play/pause media. A value argument should be supplied which indicates media should be played or paused. 0.000000 => pause 1.000000 => play
62598fa0be383301e0253620
class LiUEmployeeLDAPBackend(_LiUBaseLDAPBackend): <NEW_LINE> <INDENT> settings_prefix = 'LIU_EMPLOYEE_LDAP_' <NEW_LINE> _settings = LiUEmployeeLDAPSettings(settings_prefix)
An authentication backend for LiU employees.
62598fa0dd821e528d6d8d5f
class AddTableWindow(QtWidgets.QWidget, Ui_Form_AddTable, Msg): <NEW_LINE> <INDENT> def __init__(self, ic_db, parent=None): <NEW_LINE> <INDENT> super().__init__(parent) <NEW_LINE> self.setupUi(self) <NEW_LINE> self.ic_db = ic_db <NEW_LINE> self.buttonAdd.clicked.connect(self.addTable) <NEW_LINE> self.buttonExit.clicked...
Widget whose function is to add a table to the database. ic_db is an instance of ItemChooser(). It represents the database on which the actions will be performed. parent is the parent widget, which defaults to None.
62598fa0a17c0f6771d5c064
class BiphasicPort(serial.Serial): <NEW_LINE> <INDENT> def __init__(self, port=DEFAULT_PORT, baud=BAUDRATE): <NEW_LINE> <INDENT> if not REALLY_STIM: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> serial.Serial.__init__(self, port, baud, timeout=0, stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS, ...
Serial port set up for biphasic pulse communication
62598fa0435de62698e9bc1e
class RedisAbstractBackEnd(object): <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> PREFIX = "h:{0}" <NEW_LINE> def __init__(self, obj=None): <NEW_LINE> <INDENT> if obj is None: <NEW_LINE> <INDENT> self._redis = Redis() <NEW_LINE> <DEDENT> elif isinstance(obj, (list, tuple)): <NEW_LINE> <INDENT> host, port = obj...
Having two classes implementing a Hanoi BackEnd in REDIS means duplicating a lot of code. This class is defined as abstract for the sake of clarity that should not be directly used but by means of a subclass.
62598fa030bbd7224646988c
class Longueur: <NEW_LINE> <INDENT> def __init__(self,cartes): <NEW_LINE> <INDENT> self.cartes=set(cartes) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> l=list(self.cartes) <NEW_LINE> l.sort(reverse=True) <NEW_LINE> chaine='' <NEW_LINE> for x in l: <NEW_LINE> <INDENT> chaine += ' '+valeur[x] <NEW_LINE> <D...
Une longueur dans une couleur particulière
62598fa001c39578d7f12ba9
class WorseAndWorse3(Player): <NEW_LINE> <INDENT> name = 'Worse and Worse 3' <NEW_LINE> classifier = { 'memory_depth': float('inf'), 'stochastic': True, 'makes_use_of': set(), 'long_run_time': False, 'inspects_source': False, 'manipulates_source': False, 'manipulates_state': False } <NEW_LINE> def strategy(self, oppone...
Cooperates in the first turn. Then defects with probability no. of opponent defects / (current turn - 1). Therefore it is more likely to defect when the opponent defects for a larger proportion of the turns. Names: - Worse and Worse 3: [PRISON1998]_
62598fa0e1aae11d1e7ce739
class OneVersusAllOutput(OutputType): <NEW_LINE> <INDENT> def output(self, A, Z=None): <NEW_LINE> <INDENT> return A <NEW_LINE> <DEDENT> def predict(self, A): <NEW_LINE> <INDENT> return A.argmax(axis=1) <NEW_LINE> <DEDENT> def loss(self, Y, Z, A=None): <NEW_LINE> <INDENT> return np.maximum(0, 1 - Y*Z).sum() <NEW_LINE> <...
One versus all hinge loss output layer.
62598fa0a79ad16197769e8f
class SimplePreprocessor: <NEW_LINE> <INDENT> def __init__(self, width: int, height: int, inter=cv2.INTER_AREA): <NEW_LINE> <INDENT> self.width = width <NEW_LINE> self.height = height <NEW_LINE> self.inter = inter <NEW_LINE> <DEDENT> def preprocess(self, image: np.ndarray) -> np.ndarray: <NEW_LINE> <INDENT> resized_ima...
Class to resize an image to a certain width and height Parameters ---------- width: int output width height: int output height inter: interpolation method, default = ``cv2.INTER_AREA`` ``opencv`` interpolation method. See ``opencv`` :obj:`InterpolationFlags`. .. note:: The value 3 that appears in ...
62598fa0e5267d203ee6b738
class Sphere: <NEW_LINE> <INDENT> def __init__(self, radius): <NEW_LINE> <INDENT> self.radius = radius <NEW_LINE> <DEDENT> def getRadius(self): <NEW_LINE> <INDENT> return self.radius <NEW_LINE> <DEDENT> def surfaceArea(self): <NEW_LINE> <INDENT> self.surfaceArea = 4 * pi * (self.radius * self.radius) <NEW_LINE> return ...
This class represents a geometric solid sphere. it will return radius, surface area, and volume using getRadius(), surfaceArea(), and volume().
62598fa007f4c71912baf276
class InputBox(InteractControl): <NEW_LINE> <INDENT> def __init__(self, default=u"", label=None, width=0, height=1, keypress=False): <NEW_LINE> <INDENT> if not isinstance(default, basestring): <NEW_LINE> <INDENT> default = repr(default) <NEW_LINE> <DEDENT> self.default=default <NEW_LINE> self.width=int(width) <NEW_LINE...
An input box control :arg default: default value of the input box. If this is not a string, repr is called on it to get a string, which is then the default input. :arg int width: character width of the input box. :arg int height: character height of the input box. If this is greater than one, an HTML textarea...
62598fa04e4d56256637224f
class SchemeListSerializer(serializers.HyperlinkedModelSerializer, SchemeSerializerMixin): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Scheme <NEW_LINE> fields = ['id', 'url', 'name', 'description', 'date_from', 'date_to']
Сериализатор списка моделей опроса
62598fa08e7ae83300ee8ecb
class Calculator: <NEW_LINE> <INDENT> def add(num1, num2): <NEW_LINE> <INDENT> addition = num1 + num2 <NEW_LINE> return addition <NEW_LINE> <DEDENT> def sub(num1, num2): <NEW_LINE> <INDENT> subtraction = num1 - num2 <NEW_LINE> return subtraction <NEW_LINE> <DEDENT> def mult(num1, num2): <NEW_LINE> <INDENT> multiplicat...
A simple calculator module
62598fa091af0d3eaad39c37
class CKEditorField(TextAreaField): <NEW_LINE> <INDENT> widget = CKEditorWidget()
A custom text editor for the admin panel.
62598fa04527f215b58e9d0f
class _RARHeaderDataEx(ctypes.Structure): <NEW_LINE> <INDENT> _pack_ = 1 <NEW_LINE> _fields_ = [("ArcName", ctypes.c_char * 1024), ("ArcNameW", ctypes.c_wchar * 1024), ("FileName", ctypes.c_char * 1024), ("FileNameW", ctypes.c_wchar * 1024), ("Flags", ctypes.c_uint), ("PackSize", ctypes.c_uint), ("PackSizeHigh", ctypes...
Archive file structure. Used by DLL calls.
62598fa01f037a2d8b9e3f13
class cublasNotInitialized(cublasError): <NEW_LINE> <INDENT> pass
CUBLAS library not initialized.
62598fa038b623060ffa8ebe
class VCharacterManager: <NEW_LINE> <INDENT> __metaclass__ = Singleton <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.character_client = {} <NEW_LINE> self.client_character = {} <NEW_LINE> <DEDENT> def addVCharacter(self,vcharacter): <NEW_LINE> <INDENT> characterId = vcharacter.getCharacterId() <NEW_LINE> self...
角色管理器
62598fa03eb6a72ae038a46e
class ICouponDeletedEvent(BaseWebhookEvent): <NEW_LINE> <INDENT> pass
Occurs whenever a coupon is deleted.
62598fa063d6d428bbee25dd
class Rip_packet: <NEW_LINE> <INDENT> def __init__(self, router_id): <NEW_LINE> <INDENT> self.command = 2 <NEW_LINE> self.version = 2 <NEW_LINE> self.router_id = router_id <NEW_LINE> self.entry_table = [] <NEW_LINE> <DEDENT> def add_entry(self, entry): <NEW_LINE> <INDENT> self.entry_table.append(entry) <NEW_LINE> <DEDE...
a rip v2 packet, this class handles turning itself into a byte array
62598fa07b25080760ed72d4
class CNNReporter(Reporter): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> proxy = True <NEW_LINE> <DEDENT> objects = CNNReporterManager()
This class is a proxy model for Reporter, used for testing proxy model support
62598fa0fff4ab517ebcd61a
class Caches: <NEW_LINE> <INDENT> def __init__(self, root): <NEW_LINE> <INDENT> self.root = root <NEW_LINE> <DEDENT> def get(self, name): <NEW_LINE> <INDENT> return Cache(os.path.join(self.root, name))
Repository of caches that, if kept across site builds, can speed up further builds
62598fa0cb5e8a47e493c08b
class ListInstanceProfilesResultSet(ResultSet): <NEW_LINE> <INDENT> def getJSONFromString(self, str): <NEW_LINE> <INDENT> return json.loads(str) <NEW_LINE> <DEDENT> def get_Response(self): <NEW_LINE> <INDENT> return self._output.get('Response', None)
A ResultSet with methods tailored to the values returned by the ListInstanceProfiles Choreo. The ResultSet object is used to retrieve the results of a Choreo execution.
62598fa0498bea3a75a5794d
class Complexity(pydrogen.Typical): <NEW_LINE> <INDENT> functions = {'len': constant, 'print': constant, 'range': linear} <NEW_LINE> def preprocess(self, context): <NEW_LINE> <INDENT> syms = [] <NEW_LINE> if 'functions' in context and type(context['functions']) == dict: <NEW_LINE> <INDENT> self.functions.update(context...
Complexity approximation for a small subset of Python.
62598fa0bd1bec0571e14fd9
class Classifier(): <NEW_LINE> <INDENT> log = logging.getLogger("recheckwatchbot") <NEW_LINE> queries = None <NEW_LINE> def __init__(self, queries_dir): <NEW_LINE> <INDENT> self.es = results.SearchEngine(ES_URL) <NEW_LINE> self.queries_dir = queries_dir <NEW_LINE> self.queries = loader.load(self.queries_dir) <NEW_LINE>...
Classify failed tempest-devstack jobs based. Given a change and revision, query logstash with a list of known queries that are mapped to specific bugs.
62598fa01f5feb6acb162a4e
class AuditRecordMixin(models.Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> <DEDENT> audit_records = GenericRelation(AuditRecord) <NEW_LINE> def get_revision_field_names(self): <NEW_LINE> <INDENT> return [f.name for f in self._meta.get_fields()] <NEW_LINE> <DEDENT> def save(self...
Mixin for logging model field changes.
62598fa05fdd1c0f98e5ddc5
@attr.s(frozen=True, eq=False) <NEW_LINE> class WorkerContext(metaclass=NoPublicConstructor): <NEW_LINE> <INDENT> idle_timeout: float = attr.ib( default=600.0, validator=check_non_negative, ) <NEW_LINE> init: Callable[[], Any] = attr.ib( default=bool, validator=attr.validators.is_callable(), ) <NEW_LINE> retire: Callab...
A reification of a context where workers have a custom configuration. Instances of this class are to be created using :func:`open_worker_context`, and cannot be directly instantiated. The arguments to :func:`open_worker_context` that created an instance are available for inspection as read-only attributes. This class...
62598fa0435de62698e9bc1f
class ExitException(Exception): <NEW_LINE> <INDENT> pass
Raise and main sees this as regular exit
62598fa02ae34c7f260aaf0c
class Key(namedtuple('__KeyCombination', 'symbol modifiers modMatters')): <NEW_LINE> <INDENT> s_symbol = 0 <NEW_LINE> s_modifiers = 0 <NEW_LINE> s_modMatters = False <NEW_LINE> def __new__(cls, symbol, modifiers, modMatters=False): <NEW_LINE> <INDENT> return super(Key, cls).__new__(cls, symbol, modifiers, modMatters) <...
A key + modifying keys combination. A Key will register Key(symbol,mod) as being equal to Key(symbol,mod2) so long as mod is a subset of mod2 or vice versa This way, random modifiers like numlock will not have an effect on playability. This does mean that differentiating ctrl+shift+x and ctrl+x is not currently possibl...
62598fa0435de62698e9bc20
class CreateSubreddit(Templated): <NEW_LINE> <INDENT> def __init__(self, site = None, name = '', captcha=None): <NEW_LINE> <INDENT> allow_image_upload = site and not site.quarantine <NEW_LINE> feature_autoexpand_media_previews = feature.is_enabled("autoexpand_media_previews") <NEW_LINE> Templated.__init__(self, site=si...
reddit creation form.
62598fa03cc13d1c6d465598
class WheelBuilder(object): <NEW_LINE> <INDENT> def __init__(self, requirement_set, finder, build_options=None, global_options=None): <NEW_LINE> <INDENT> self.requirement_set = requirement_set <NEW_LINE> self.finder = finder <NEW_LINE> self.wheel_dir = requirement_set.wheel_download_dir <NEW_LINE> self.build_options = ...
Build wheels from a RequirementSet.
62598fa0b7558d589546345a
class CallableObject(object): <NEW_LINE> <INDENT> __slots__ = ['_ob', '_func'] <NEW_LINE> def __init__(self, c): <NEW_LINE> <INDENT> if not hasattr(c, '__call__'): <NEW_LINE> <INDENT> raise ValueError('Error: given callback is not callable.') <NEW_LINE> <DEDENT> if hasattr(c, '__self__'): <NEW_LINE> <INDENT> self._ob =...
CallableObject(callable) A class to hold a callable. If it is a plain function, its reference is held (because it might be a closure). If it is a method, we keep the function name and a weak reference to the object. In this way, having for instance a signal bound to a method, the object is not prevented from being cle...
62598fa021bff66bcd722a90
class Component(object): <NEW_LINE> <INDENT> def __init__(self,manufacturer,model='n/a',manufactureYear='',comment=''): <NEW_LINE> <INDENT> self._manufacturer = manufacturer <NEW_LINE> self._model = model <NEW_LINE> self._manufactureYear = manufactureYear <NEW_LINE> self._comment = comment <NEW_LINE> <DEDENT> @classmet...
This class in intended as a basic heritable class for all components of an X-ray scattering set-up. The purpose of Components is to save the experimental set-up used in a standardized way. Anyone not familiar with an experiment should be able to easily get the specs of the set-up and there should be no ambiguity on wha...
62598fa04a966d76dd5eed0e
class PaymentStatusListener(View): <NEW_LINE> <INDENT> def post(self, request, *args, **kwargs): <NEW_LINE> <INDENT> status = request.POST.get('status', None) <NEW_LINE> order_payment_id = request.POST.get('order_payment_id') <NEW_LINE> try: <NEW_LINE> <INDENT> order_payment = OrderPayment.objects.get(id=order_payment_...
This view simulates our listener that handles incoming messages from an external PSP to update the status of a payment. It's an "underwater" view and the user does not directly engage with this view or url, only the external server by making a POST request to it.
62598fa0adb09d7d5dc0a3b7
class CreateDistanceCallback(object): <NEW_LINE> <INDENT> def __init__(self, locations): <NEW_LINE> <INDENT> size = len(locations) <NEW_LINE> self.matrix = {} <NEW_LINE> for from_node in range(size): <NEW_LINE> <INDENT> self.matrix[from_node] = {} <NEW_LINE> for to_node in range(size): <NEW_LINE> <INDENT> x1 = location...
Create callback to calculate distances between points.
62598fa03539df3088ecc0e1
class RuleAddForm(AddForm): <NEW_LINE> <INDENT> form_fields = form.FormFields(IRuleConfiguration) <NEW_LINE> label = _(u"Add Rule") <NEW_LINE> description = _(u"Add a new rule. Once complete, you can manage the " "rule's actions and conditions separately.") <NEW_LINE> form_name = _(u"Configure rule") <NEW_LINE> def nex...
An add form for rules.
62598fa08a43f66fc4bf1fa9
class MessageBulkActionEndpoint(BaseAPIView): <NEW_LINE> <INDENT> permission = 'msgs.msg_api' <NEW_LINE> serializer_class = MsgBulkActionSerializer <NEW_LINE> def post(self, request, *args, **kwargs): <NEW_LINE> <INDENT> user = request.user <NEW_LINE> serializer = self.serializer_class(user=user, data=request.data) <NE...
## Bulk Message Updating A **POST** can be used to perform an action on a set of messages in bulk. * **messages** - either a single message id or a JSON array of message ids (int or array of ints) * **action** - the action to perform, a string one of: label - Apply the given label to the messages unl...
62598fa0baa26c4b54d4f0dc
class EmporiumCoin(Bitcoin): <NEW_LINE> <INDENT> name = 'emporiumcoin' <NEW_LINE> symbols = ('EMPC', ) <NEW_LINE> nodes = ("40.68.31.20", ) <NEW_LINE> port = 8295 <NEW_LINE> message_start = b'\xc2\xb4\xa3\xd1' <NEW_LINE> base58_prefixes = { 'PUBKEY_ADDR': 33, 'SCRIPT_ADDR': 28, 'SECRET_KEY': 161 }
Class with all the necessary EmporiumCoin network information based on https://github.com/emporiumcoin/EmporiumCoin/blob/master/src/net.cpp (date of access: 02/14/2018)
62598fa091f36d47f2230db7
class Question(models.Model): <NEW_LINE> <INDENT> quiz = models.ManyToManyField(Quiz) <NEW_LINE> question_text = models.TextField() <NEW_LINE> is_subjective = models.BooleanField(default=False) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.question_text
Questions belonging to a quiz.
62598fa0f7d966606f747e0f
class InspectionViewSet(ListModelMixin, mixins.RetrieveModelMixin, mixins.CreateModelMixin, mixins.DestroyModelMixin, mixins.UpdateModelMixin, viewsets.GenericViewSet): <NEW_LINE> <INDENT> queryset = Inspection.objects.filter_by() <NEW_LINE> authentication_classes = (JSONWebTokenAuthentication, SessionAuthentication) <...
巡检 list: 获取巡检信息 retrieve: 获取巡检详细信息 create: 创建巡检报告 destroy: 删除巡检报告 update: 修改巡检报告 upload_images: 上传巡检图片
62598fa00c0af96317c561af
class Authorizer(ftpserver.DummyAuthorizer): <NEW_LINE> <INDENT> _group_info = None <NEW_LINE> _root_path_len = None <NEW_LINE> _home = None <NEW_LINE> def __init__(self, grp): <NEW_LINE> <INDENT> super(Authorizer, self).__init__() <NEW_LINE> self._group_info = grp <NEW_LINE> self._root_path_len = len(config.FTP_ROOT.s...
authorizer used for pyftpdlib
62598fa0379a373c97d98e43
class SQLAlchemy: <NEW_LINE> <INDENT> def __init__(self, app=None): <NEW_LINE> <INDENT> self._app = app <NEW_LINE> self.session = self._create_scoped_session() <NEW_LINE> if app is not None: <NEW_LINE> <INDENT> self.init_app(app) <NEW_LINE> <DEDENT> <DEDENT> def init_app(self, app): <NEW_LINE> <INDENT> ctx = _app_ctx_s...
SQLAlchemy demonstrate how flask-sqlalchemy managing session
62598fa03c8af77a43b67e56
class _ListSpiders(cli_base.Command): <NEW_LINE> <INDENT> def setup(self): <NEW_LINE> <INDENT> parser = self._parser.add_parser( "list", help="List the availible tasks.") <NEW_LINE> parser.set_defaults(work=self.run) <NEW_LINE> <DEDENT> def _work(self): <NEW_LINE> <INDENT> return spiders_util.get_spiders_info() <NEW_LI...
List the spiders.
62598fa057b8e32f52508033
class Google(models.Model): <NEW_LINE> <INDENT> user = models.OneToOneField(User, on_delete=models.CASCADE) <NEW_LINE> gauth_key = models.CharField(max_length=16)
This models adds the Google Authenticator info to the standard User model
62598fa0e76e3b2f99fd8865
class QueueWithMax(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._s1 = StackWithMax() <NEW_LINE> self._s2 = StackWithMax() <NEW_LINE> <DEDENT> def enqueue(self, a): <NEW_LINE> <INDENT> self._s1.push(a) <NEW_LINE> <DEDENT> def dequeue(self): <NEW_LINE> <INDENT> if self._s2.is_empty: <NEW_LINE> <IND...
Implement a queue with two stacks with constant time maximum retrieving.
62598fa0097d151d1a2c0e57
class SimpleSITKReader(AbstractReader): <NEW_LINE> <INDENT> def __init__(self, dtypes, dshapes, name='simplesitkreader'): <NEW_LINE> <INDENT> super(SimpleSITKReader, self).__init__(dtypes, dshapes, name=name) <NEW_LINE> <DEDENT> def _read_sample(self, id_queue, **kwargs): <NEW_LINE> <INDENT> path_list = id_queue[0] <NE...
SimpleSITKReader Simple reader class to read sitk files by file path
62598fa07047854f4633f20b
class BanditAlgorithm: <NEW_LINE> <INDENT> def __init__(self, bandit): <NEW_LINE> <INDENT> self.reset(bandit) <NEW_LINE> <DEDENT> def reset(self, bandit=None): <NEW_LINE> <INDENT> if bandit is not None: <NEW_LINE> <INDENT> self.bandit = bandit <NEW_LINE> <DEDENT> num_arms = bandit.get_num_arms() <NEW_LINE> self.running...
Bandit algorithm abstract class.
62598fa045492302aabfc304
class RnnRbm: <NEW_LINE> <INDENT> def __init__( self, n_hidden=150, n_hidden_recurrent=100, lr=0.001, r=(21, 109), dt=0.3 ): <NEW_LINE> <INDENT> self.lastcost=None <NEW_LINE> self.r = r <NEW_LINE> self.dt = dt <NEW_LINE> (v, v_sample, cost, monitor, params, updates_train, v_t, updates_generate) = build_rnnrbm( r[1] - r...
Simple class to train an RNN-RBM from MIDI files and to generate sample sequences.
62598fa067a9b606de545df8
class Auth(TokenAuth): <NEW_LINE> <INDENT> def check_auth(self, token, allowed_roles, resource, method): <NEW_LINE> <INDENT> accounts = app.data.driver.db['accounts'] <NEW_LINE> lookup = {'t': token} <NEW_LINE> if allowed_roles: <NEW_LINE> <INDENT> lookup['r'] = {'$in': allowed_roles} <NEW_LINE> <DEDENT> account = acco...
This class implements Token Based Authentication for our API endpoints. Since the API itself is going to be on SSL, we're fine with this variation of Basic Authentication. For details on Eve authentication handling see: http://python-eve.org/authentication.html
62598fa05fdd1c0f98e5ddc7
class Cluster(Particle): <NEW_LINE> <INDENT> pass
egamma: ph_cl_* pau: ph_*_clus
62598fa045492302aabfc305
class ListDocIdsService(RestfulResource): <NEW_LINE> <INDENT> def get(self, wiki_id, start=0, limit=None): <NEW_LINE> <INDENT> bucket = get_s3_bucket() <NEW_LINE> keys = bucket.get_all_keys(prefix='xml/%s' % (str(wiki_id)), max_keys=1) <NEW_LINE> if len(keys) == 0: <NEW_LINE> <INDENT> return {'status':500, 'message':'W...
Service to expose resources in WikiDocumentIterator
62598fa0a17c0f6771d5c068
class Point: <NEW_LINE> <INDENT> def __init__(self, ship, faces, draft, trim): <NEW_LINE> <INDENT> disp, B, cb = displacement(ship, draft=draft, trim=trim) <NEW_LINE> if not faces: <NEW_LINE> <INDENT> wet = 0.0 <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> wet = wettedArea(faces, draft=draft, trim=trim) <NEW_LINE> <DED...
Hydrostatics point, that contains the following members: draft -- Ship draft trim -- Ship trim disp -- Ship displacement xcb -- Bouyance center X coordinate wet -- Wetted ship area mom -- Trimming 1cm ship moment farea -- Floating area KBt -- Transversal KB height BMt -- Transversal BM height Cb -- Block coefficient. ...
62598fa0442bda511e95c289
class _CacheConfig(object): <NEW_LINE> <INDENT> def __init__( self, api_url="https://kubernetes.default", verify_api_queries=True, cache_expiry_secs=30, cache_purge_secs=300, cache_expiry_fuzz_secs=0, cache_start_fuzz_secs=0, query_timeout=20, global_config=None, ): <NEW_LINE> <INDENT> self.api_url = api_url <NEW_LINE>...
Internal configuration options for the Kubernetes cache
62598fa001c39578d7f12bad
class ChebyshevFitter(BandpassFitter): <NEW_LINE> <INDENT> def __init__(self, polycount=33): <NEW_LINE> <INDENT> self.polycount = polycount <NEW_LINE> <DEDENT> def fit(self, bandpass): <NEW_LINE> <INDENT> return ChebyShevFitter.chebyshevFit(bandpass, self.polycount) <NEW_LINE> <DEDENT> def chebyshevFit(cls, bandpass, p...
The bandpass shape can be analytically expressed as a Chebyshev polynomial. This fitter will apply a Chebyshev fit on a dataset
62598fa030bbd7224646988e
class ColumnTest(case.DBTestCase): <NEW_LINE> <INDENT> @property <NEW_LINE> def column(self): <NEW_LINE> <INDENT> from moztrap.view.lists.finder import Column <NEW_LINE> return Column <NEW_LINE> <DEDENT> def test_objects(self): <NEW_LINE> <INDENT> qs = Mock() <NEW_LINE> c = self.column("thing", "_things.html", qs) <NEW...
Tests for finder Column.
62598fa06e29344779b0048b
class EuNorwayTransformFunctions(CommonCompHarmTransformFunctions): <NEW_LINE> <INDENT> NORWAY_SPECIFIC_CATEGORY_MAPPINGS = { } <NEW_LINE> def __init__(self, config): <NEW_LINE> <INDENT> self.config = config <NEW_LINE> self.category_mappings = dict( comp_harm_constants.ENGLISH_CATEGORY_MAPPINGS, **EuNorwayTransformFunc...
All custom (uncommon) transform functions **SPECIFIC to individual processing task** must be defined as part of this class.
62598fa03539df3088ecc0e3
class BackgroundThread(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, func, frequency=2, verbosity=1, **kwargs): <NEW_LINE> <INDENT> super(BackgroundThread, self).__init__(**kwargs) <NEW_LINE> self.func = func <NEW_LINE> self.frequency = frequency <NEW_LINE> self.verbosity = verbosity <NEW_LINE> self.daemon ...
BackgroundThread Runs a routine continuously in a separate thread until `BackgroundThread.cancel` is called.
62598fa092d797404e388a7d
class BaseConfig: <NEW_LINE> <INDENT> DEBUG = False <NEW_LINE> SECRET_KEY = os.getenv('SECRET_KEY', 'a default secret key') <NEW_LINE> CORS_SUPPORTS_CREDENTIALS = True
Base application configuration
62598fa02ae34c7f260aaf0f