code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class UnknownError(QCEngineException): <NEW_LINE> <INDENT> error_type = "unknown_error" <NEW_LINE> header = "QCEngine Unknown Error"
Unknown QCEngine error, the type was not able to be specified.
6259906101c39578d7f14290
class PercolatorQuery(Query): <NEW_LINE> <INDENT> def __init__(self, doc, query=None, **kwargs): <NEW_LINE> <INDENT> super(PercolatorQuery, self).__init__(**kwargs) <NEW_LINE> self.doc = doc <NEW_LINE> self.query = query <NEW_LINE> <DEDENT> def serialize(self): <NEW_LINE> <INDENT> data = {'doc': self.doc} <NEW_LINE> if...
A percolator query is used to determine which registered PercolatorDoc's match the document supplied.
6259906197e22403b383c5c3
class ProjectBug(models.Model): <NEW_LINE> <INDENT> STATES = ( ('draft', u'草稿'), ('confirm', u"已确认"), ('appointed', u"已指派"), ('processing', u"处理中"), ('refuse', u"已拒绝"), ('hold', u"挂起"), ('solved', u"已解决"), ('done', u"完成"), ('close', u"关闭") ) <NEW_LINE> LEVELS = ( (1, u"致命"), (2, u"重大"), (3, u"次要"), (4, u"一般"), (5, u"建议...
项目bug管理
62599061d486a94d0ba2d67f
class GeneratorWrapper(Sequence): <NEW_LINE> <INDENT> def __init__(self, inputs, outputs, sample_weights, batch_size, shuffle): <NEW_LINE> <INDENT> self._inputs = inputs <NEW_LINE> self._outputs = outputs <NEW_LINE> self._sample_weights = sample_weights <NEW_LINE> self._size = inputs[0].shape[0] <NEW_LINE> self._batch_...
Converts fit() into fit_generator() interface.
62599061379a373c97d9a6db
class Walker(object): <NEW_LINE> <INDENT> def __init__(self, proxy, baseoid): <NEW_LINE> <INDENT> self.baseoid = baseoid <NEW_LINE> self.lastoid = baseoid <NEW_LINE> self.proxy = proxy <NEW_LINE> self.results = {} <NEW_LINE> self.defer = defer.Deferred() <NEW_LINE> <DEDENT> def __call__(self): <NEW_LINE> <INDENT> d = s...
SNMP walker class
6259906116aa5153ce401b94
class FernetSetup(BasePermissionsSetup): <NEW_LINE> <INDENT> name = 'fernet_setup' <NEW_LINE> @classmethod <NEW_LINE> def main(cls): <NEW_LINE> <INDENT> tutils = token_utils.TokenUtils( CONF.fernet_tokens.key_repository, CONF.fernet_tokens.max_active_keys, 'fernet_tokens' ) <NEW_LINE> keystone_user_id, keystone_group_i...
Setup a key repository for Fernet tokens. This also creates a primary key used for both creating and validating Fernet tokens. To improve security, you should rotate your keys (using keystone-manage fernet_rotate, for example).
625990615166f23b2e244a89
class LazyFile(object): <NEW_LINE> <INDENT> def __init__(self, filename, mode='r', encoding=None, errors='strict', atomic=False): <NEW_LINE> <INDENT> self.name = filename <NEW_LINE> self.mode = mode <NEW_LINE> self.encoding = encoding <NEW_LINE> self.errors = errors <NEW_LINE> self.atomic = atomic <NEW_LINE> if filenam...
A lazy file works like a regular file but it does not fully open the file but it does perform some basic checks early to see if the filename parameter does make sense. This is useful for safely opening files for writing.
625990618a43f66fc4bf3846
class BoatdHTTPServer(ThreadingMixIn, HTTPServer): <NEW_LINE> <INDENT> def __init__(self, boat, server_address, RequestHandlerClass, bind_and_activate=True): <NEW_LINE> <INDENT> HTTPServer.__init__(self, server_address, RequestHandlerClass, bind_and_activate) <NEW_LINE> log.info('boatd api listening on %s:%s', *server_...
The main REST server for boatd. Listens for requests on port server_address and handles each request with RequestHandlerClass.
62599061e5267d203ee6cf1b
class Restaurant(): <NEW_LINE> <INDENT> def __init__(self, restaurant_name, cuisine_type): <NEW_LINE> <INDENT> self.restaurant_name = restaurant_name <NEW_LINE> self.cuisine_type = cuisine_type <NEW_LINE> self.number_served = 0 <NEW_LINE> <DEDENT> def describe_restaurant(self): <NEW_LINE> <INDENT> print(self.restaurant...
A class representing a restaurant
62599061ac7a0e7691f73b9b
class EvaluationError(Exception): <NEW_LINE> <INDENT> pass
For evaluation errors
62599061e64d504609df9f2a
class Model(nn.Module): <NEW_LINE> <INDENT> def reset(self): <NEW_LINE> <INDENT> self.h = [Variable(Tensor(ModelManager.batch_size, ModelManager.hidden_size).zero_()) for i in range(ModelManager.num_hidden_layers)] <NEW_LINE> self.c = self.h <NEW_LINE> <DEDENT> def __init__(self): <NEW_LINE> <INDENT> super(ModelManager...
This model contains an LSTM created using PyTorch. This model will accept a batch of inputs, and will output a batch of predictions.
62599061097d151d1a2c2728
class ParallelNpArray(object): <NEW_LINE> <INDENT> def __init__(self, mp=None): <NEW_LINE> <INDENT> self._mp = mp <NEW_LINE> <DEDENT> def __call__(self, func): <NEW_LINE> <INDENT> def _parall(*args, **kwargs): <NEW_LINE> <INDENT> if self._mp.switch: <NEW_LINE> <INDENT> slices = self.prepare_slices(args[0], self._mp) <N...
do parallelisation using shared memory
62599061d6c5a102081e37dc
class SpaceToDepth(nn.Module): <NEW_LINE> <INDENT> def __init__(self, block_size=4): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> assert block_size in {2, 4}, "Space2Depth only supports blocks size = 4 or 2" <NEW_LINE> self.block_size = block_size <NEW_LINE> <DEDENT> def forward(self, x): <NEW_LINE> <INDENT> N, C,...
Pixel Unshuffle
625990614428ac0f6e659beb
class Line2D(Line): <NEW_LINE> <INDENT> def __repr__(self): <NEW_LINE> <INDENT> return 'Line2D(%s, %s)' % (self.P0,self.vL) <NEW_LINE> <DEDENT> def calculate_t_from_point(self,point): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return self.calculate_t_from_x(point.x) <NEW_LINE> <DEDENT> except ValueError: <NEW_LINE> <...
A two dimensional line, situated on an x, y plane. Equation of the line is P(t) = P0 + vL*t where: - P(t) is a point on the line; - P0 is the start point of the line; - vL is the line vector; - t is any real number. :param P0: The start point of the line. :type P0: Point2D :param vL: The line vect...
625990616e29344779b01d07
class MultipleMeasureData(AbstractData): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> abstract = True
Abstract model for DSD with measure dimension but no time dimension Each domain specific application with measure dimension but no time dimension should subclass this class and use it to store the data dim_key must be defined as a ForeignKey to the domain specific Dimensions class For each measure defined in the mea...
625990613d592f4c4edbc595
class FixedValueParamDef(PositionParamDef): <NEW_LINE> <INDENT> def __init__(self, values): <NEW_LINE> <INDENT> positions = [] <NEW_LINE> for v in values: <NEW_LINE> <INDENT> pos = v <NEW_LINE> positions.append(pos) <NEW_LINE> <DEDENT> super(FixedValueParamDef, self).__init__(values, positions) <NEW_LINE> self._logger....
Extension of PositionParamDef, in which the position is equal to the value of each entry from values.
6259906129b78933be26ac20
class FCEUXServer: <NEW_LINE> <INDENT> def __init__(self, frame_func, quit_func=None, ip='localhost', port=1234): <NEW_LINE> <INDENT> self._serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) <NEW_LINE> self._serversocket.bind((ip, port)) <NEW_LINE> self._serversocket.listen(5) <NEW_LINE> self._clientsocke...
Server class for making NES bots. Uses FCEUX emulator. Visit https://www.fceux.com for info. You will also need to load client lua script in the emulator.
6259906132920d7e50bc76ff
class Range: <NEW_LINE> <INDENT> start: Decimal <NEW_LINE> end: Decimal <NEW_LINE> def __init__(self, start, end): <NEW_LINE> <INDENT> self.start = Decimal(start) <NEW_LINE> self.end = Decimal(end) <NEW_LINE> <DEDENT> def __repr__(self) -> str: <NEW_LINE> <INDENT> return '(%0f, %0f)' % (self.start, self.end) <NEW_LINE>...
Represents a range of Decimals
6259906191af0d3eaad3b4e0
class Task(object): <NEW_LINE> <INDENT> def __init__(self, max_iter=None, proba_curriculum=0.2, batch_size=10, width=4): <NEW_LINE> <INDENT> self.max_iter = max_iter <NEW_LINE> self.num_iter = 0 <NEW_LINE> self.proba_curriculum = proba_curriculum <NEW_LINE> self.batch_size = batch_size <NEW_LINE> self.width = wi...
docstring for Task
6259906101c39578d7f14291
class Blockchain(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._chain = [self.get_genesis_block()] <NEW_LINE> self.timestamp = int(datetime.now().timestamp()) <NEW_LINE> self.difficulty_bits = 0 <NEW_LINE> <DEDENT> @property <NEW_LINE> def chain(self): <NEW_LINE> <INDENT> return self.dict(se...
A class representing list of blocks
6259906107f4c71912bb0af6
class gbSeq(Seq): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(gbSeq, self).__init__(*args, **kwargs) <NEW_LINE> self.locus = self.data.get('LOCUS',(None,))[0] <NEW_LINE> try: <NEW_LINE> <INDENT> self.taxid = self.data['FEATURES'][1]['source'][1]['db_xref'][0].split(':')[1] <NEW_LI...
Provides some convenience attributes for accessing data in Seq.data
625990614f88993c371f107b
class DevConfig(Config): <NEW_LINE> <INDENT> DEBUG = True <NEW_LINE> host = "ec2-54-235-244-185.compute-1.amazonaws.com" <NEW_LINE> user = "xvnedalyoohnpo" <NEW_LINE> password = "5db0f5db98186e38cd15f8d46396141a152d3795a26bb3931e9b1026a6a8e38b" <NEW_LINE> database = "d4pn014537djvi" <NEW_LINE> SQLALCHEMY_DATABASE_URI='...
Dev config
625990617d847024c075da8d
class ActionReverted(Event): <NEW_LINE> <INDENT> type_name = "undo" <NEW_LINE> def __hash__(self) -> int: <NEW_LINE> <INDENT> return hash(32143124318) <NEW_LINE> <DEDENT> def __eq__(self, other) -> bool: <NEW_LINE> <INDENT> return isinstance(other, ActionReverted) <NEW_LINE> <DEDENT> def __str__(self) -> Text: <NEW_LIN...
Bot undoes its last action. The bot reverts everything until before the most recent action. This includes the action itself, as well as any events that action created, like set slot events - the bot will now predict a new action using the state before the most recent action.
625990617b25080760ed883d
@enum.unique <NEW_LINE> class WireMode(enum.IntEnum): <NEW_LINE> <INDENT> rs485_4 = VI_ASRL_WIRE_485_4 <NEW_LINE> rs485_2_dtr_echo = VI_ASRL_WIRE_485_2_DTR_ECHO <NEW_LINE> rs485_2_dtr_ctrl = VI_ASRL_WIRE_485_2_DTR_CTRL <NEW_LINE> rs485_2_auto = VI_ASRL_WIRE_485_2_AUTO <NEW_LINE> rs232_dte = VI_ASRL_WIRE_232_DTE <NEW_LI...
Valid modes for National Instruments hardware supporting it.
62599061a79ad1619776b619
class Flavour(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def flavour(cls) -> str: <NEW_LINE> <INDENT> return "" <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def delims(cls) -> Tuple[str, str]: <NEW_LINE> <INDENT> return "[", "]" <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def current_schema_expr(cls) -> str: <...
Describes a database "flavour" (dialect).
62599061442bda511e95d8b6
class FairseqNATModel(TransformerModel): <NEW_LINE> <INDENT> def __init__(self, args, encoder, decoder): <NEW_LINE> <INDENT> super().__init__(args, encoder, decoder) <NEW_LINE> self.tgt_dict = decoder.dictionary <NEW_LINE> self.bos = decoder.dictionary.bos() <NEW_LINE> self.eos = decoder.dictionary.eos() <NEW_LINE> sel...
Abstract class for all nonautoregressive-based models
6259906144b2445a339b74bd
class FlowStatsMixIn(LBMixIn): <NEW_LINE> <INDENT> pass
When mixed with an LBFluidSim-descendant class, provides easy access to various flow statistics
625990612ae34c7f260ac7a0
class Error(RuntimeError): <NEW_LINE> <INDENT> pass
Generic exception class.
62599061b7558d5895464a8a
class ClientMonitor(metaclass=ABCMeta): <NEW_LINE> <INDENT> def __init__(self, config: dict): <NEW_LINE> <INDENT> self.config = config <NEW_LINE> self.listeners = dict() <NEW_LINE> self.connections = self.get_current_connections() <NEW_LINE> <DEDENT> def add_listener(self, name: str, action): <NEW_LINE> <INDENT> self.l...
Monitor client connections
6259906155399d3f05627bd9
class ListIssuesForRepoInputSet(InputSet): <NEW_LINE> <INDENT> def set_AccessToken(self, value): <NEW_LINE> <INDENT> InputSet._set_input(self, 'AccessToken', value) <NEW_LINE> <DEDENT> def set_Assignee(self, value): <NEW_LINE> <INDENT> InputSet._set_input(self, 'Assignee', value) <NEW_LINE> <DEDENT> def set_Direction(s...
An InputSet with methods appropriate for specifying the inputs to the ListIssuesForRepo Choreo. The InputSet object is used to specify input parameters when executing this Choreo.
6259906166673b3332c31ab6
class CorporatePaymentForm(forms.Form): <NEW_LINE> <INDENT> full_name = forms.CharField(max_length=127, label=_(u'Имя, Фамилия')) <NEW_LINE> org = forms.CharField(max_length=255, label=_(u'Название компании')) <NEW_LINE> position = forms.CharField(max_length=127, label=_(u'Должность')) <NEW_LINE> email = forms.EmailFie...
форма приема оплаты для юр.лиц
62599061d6c5a102081e37de
class Quart_UK( Unit ): <NEW_LINE> <INDENT> name= "qt.(UK)" <NEW_LINE> factor= 0.879877
quart (imperial)
6259906124f1403a9268642b
class IBlogstarLastEntries(IPortletDataProvider): <NEW_LINE> <INDENT> portletTitle = schema.TextLine(title=_(u"Title of the portlet"), description = _(u"Insert the title of the portlet."), default=_(u"Blog entries"), required = True) <NEW_LINE> blogFolder = schema.Choice(title=_(u"Blog folder"), description=_(u"Insert ...
A portlet It inherits from IPortletDataProvider because for this portlet, the data that is being rendered and the portlet assignment itself are the same.
62599061cc0a2c111447c62c
class TestLicenseLicenseTier(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 testLicenseLicenseTier(self): <NEW_LINE> <INDENT> pass
LicenseLicenseTier unit test stubs
62599061a219f33f346c7ec1
class HelloViewSet(viewsets.ViewSet): <NEW_LINE> <INDENT> serializer_class=serializers.HelloSerializer <NEW_LINE> def list(self, request): <NEW_LINE> <INDENT> a_viewset = [ 'Uses action (list, create, retrieve, update, partial_update)', 'Automatically maps to URLs using routers', 'Prvides more functionality with less c...
Test API ViewSet
6259906191f36d47f22319ec
class dataflow_fmri_with_confound(dataflow.DataFlow): <NEW_LINE> <INDENT> def __init__(self, fmri_files, confound_files): <NEW_LINE> <INDENT> assert (len(fmri_files) == len(confound_files)) <NEW_LINE> self.fmri_files = fmri_files <NEW_LINE> self.confound_files = confound_files <NEW_LINE> self._size = len(fmri_files) <N...
Iterate through fmri filenames and confound filenames
625990613539df3088ecd957
class PagedResult(Result): <NEW_LINE> <INDENT> def __init__(self, access_token, path, page_num, params, data, endpoint=None): <NEW_LINE> <INDENT> super(PagedResult, self).__init__(access_token, path, params, data) <NEW_LINE> self.page = page_num <NEW_LINE> self.endpoint = endpoint <NEW_LINE> <DEDENT> def next_page(self...
This class wraps the response from an API call that responded with a page of results. Usage: result = search_items(title='foo', fields=['id']) print 'First page: %d, data: %s' % (result.page, result.data) result = result.next_page() print 'Second page: %d, data: %s' % (result.page, result.data)
6259906107f4c71912bb0af7
class TestCleanXMLFile(test.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpTestData(cls): <NEW_LINE> <INDENT> cls.user = UserFactory(username='xml user', email='user@example.com') <NEW_LINE> cls.priority = Priority.objects.get(value='P1') <NEW_LINE> cls.status_confirmed = TestCaseStatus.objects.get(nam...
Test for testplan.clean_xml_file
6259906145492302aabfdb95
class SelectBySuffix(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "object.select_by_suffix" <NEW_LINE> bl_label = "Select by Suffix" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> global converted <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> return ((len(context.select...
Select all objects with the same suffix
625990614a966d76dd5f05ae
class UserModelTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.new_user = User(password = 'banana') <NEW_LINE> <DEDENT> def test_password_setter(self): <NEW_LINE> <INDENT> self.assertTrue(self.new_user.password_hash is not None) <NEW_LINE> <DEDENT> def test_no_access_password(self...
Test class to test behaviours of the [Class] class Args: unittest.TestCase : Test case class that helps create test cases
62599061004d5f362081fb4d
class Connection: <NEW_LINE> <INDENT> def __init__(self, dbname): <NEW_LINE> <INDENT> self.dbname = dbname <NEW_LINE> self.conn = self.connect() <NEW_LINE> <DEDENT> def connect(self): <NEW_LINE> <INDENT> return psycopg2.connect("dbname=%s" % self.dbname) <NEW_LINE> <DEDENT> def execute(self, query, args=None, update=Fa...
Provides handful operations and destroys DB connection automatically
625990617d847024c075da90
class Zip(Package): <NEW_LINE> <INDENT> def extract_zip(self, zip_path, extract_path, password, recursion_depth): <NEW_LINE> <INDENT> if self.is_overwritten(zip_path): <NEW_LINE> <INDENT> log.debug("ZIP file contains a file with the same name, original is going to be overwrite") <NEW_LINE> new_zip_path = zip_path + ".o...
Zip analysis package.
62599061435de62698e9d4c2
class RedisOrderOperation(BaseRedis): <NEW_LINE> <INDENT> def __init__(self, db, redis): <NEW_LINE> <INDENT> super().__init__(db, redis) <NEW_LINE> <DEDENT> def set_order_expiration(self, pk): <NEW_LINE> <INDENT> with manage_redis(self.db) as redis: <NEW_LINE> <INDENT> key = OrderCreateSerializer.generate_orderid(pk) <...
the operation of Shopper about redis
6259906116aa5153ce401b98
class Rule(_messages.Message): <NEW_LINE> <INDENT> class ActionValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> NO_ACTION = 0 <NEW_LINE> ALLOW = 1 <NEW_LINE> ALLOW_WITH_LOG = 2 <NEW_LINE> DENY = 3 <NEW_LINE> DENY_WITH_LOG = 4 <NEW_LINE> LOG = 5 <NEW_LINE> <DEDENT> action = _messages.EnumField('ActionValueValuesEnum...
A rule to be applied in a Policy. Enums: ActionValueValuesEnum: Required Fields: action: Required conditions: Additional restrictions that must be met description: Human-readable description of the rule. in_: The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this set of entries. logConfig: Th...
625990618a43f66fc4bf384a
class WFIRSTObservatoryL2(ObservatoryL2Halo): <NEW_LINE> <INDENT> def __init__(self, **specs): <NEW_LINE> <INDENT> ObservatoryL2Halo.__init__(self,**specs)
WFIRST Observatory at L2 implementation. Contains methods and parameters unique to the WFIRST mission.
62599061627d3e7fe0e08546
class RemoveFixedIP(command.Command): <NEW_LINE> <INDENT> deprecated = True <NEW_LINE> log = logging.getLogger('deprecated') <NEW_LINE> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(RemoveFixedIP, self).get_parser(prog_name) <NEW_LINE> parser.add_argument( "ip_address", metavar="<ip-address>", hel...
Remove fixed IP address from server
6259906199cbb53fe683259d
class IdentifyDevice(_StandardCommand): <NEW_LINE> <INDENT> _cmdval = 0x25 <NEW_LINE> _sendtwice = True
Identify Device Start or restart a 10s timer. While the timer is running the device will run a procedure to enable an observer to distinguish the device from other devices in which it is not running. This procedure is manufacturer-dependent. Identification will be stopped immediately upon reception of any command o...
625990618e7ae83300eea749
class StartJobUpdateResult(object): <NEW_LINE> <INDENT> __slots__ = [ 'key', 'updateSummary', ] <NEW_LINE> thrift_spec = ( None, (1, TType.STRUCT, 'key', (JobUpdateKey, JobUpdateKey.thrift_spec), None, ), (2, TType.STRUCT, 'updateSummary', (JobUpdateSummary, JobUpdateSummary.thrift_spec), None, ), ) <NEW_LINE> def __in...
Result of the startUpdate call. Attributes: - key: Unique identifier for the job update. - updateSummary: Summary of the update that is in progress for the given JobKey.
62599061462c4b4f79dbd0c1
class LISTAConvDictADMM(nn.Module): <NEW_LINE> <INDENT> def __init__(self, num_input_channels=3, num_output_channels=3, kc=64, ks=7, ista_iters=3, iter_weight_share=True, pad='reflection', norm_weights=True): <NEW_LINE> <INDENT> super(LISTAConvDictADMM, self).__init__() <NEW_LINE> if iter_weight_share == False: <NEW_LI...
LISTA ConvDict encoder based on paper: https://arxiv.org/pdf/1711.00328.pdf
625990616e29344779b01d0b
class CardItem(object): <NEW_LINE> <INDENT> def __init__(self, title, url, pic_url=None): <NEW_LINE> <INDENT> super(CardItem, self).__init__() <NEW_LINE> self.title = title <NEW_LINE> self.url = url <NEW_LINE> self.pic_url = pic_url <NEW_LINE> <DEDENT> def get_data(self): <NEW_LINE> <INDENT> if is_not_null_and_blank_st...
ActionCard和FeedCard消息类型中的子控件
6259906176e4537e8c3f0c49
class CompanyForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Company <NEW_LINE> fields = ('name',) <NEW_LINE> <DEDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self._caffe = kwargs.pop('caffe') <NEW_LINE> kwargs.setdefault('label_suffix', '') <NEW_LINE> super(CompanyFo...
Responsible for creating a Company.
62599061435de62698e9d4c3
class ScalarFactor(AbstractFactor): <NEW_LINE> <INDENT> __slots__ = ["dimension", "exponent"] <NEW_LINE> def __init__(self, factor_dimension, factor_exponent): <NEW_LINE> <INDENT> self.dimension = factor_dimension <NEW_LINE> self.exponent = factor_exponent <NEW_LINE> self.value_idx = None <NEW_LINE> <DEDENT> def __str_...
a factor depending on just one variable: :math:`f(x) = x_d^e`
62599061cc0a2c111447c62d
class CSVContinueDataset(CSVDatasetBase, ContinueDatasetBase): <NEW_LINE> <INDENT> source_file: Optional[str] = None <NEW_LINE> _base_directory: Optional[str] = None <NEW_LINE> def __init__( self, *, authorized: Optional[bool] = None, remove_unneeded_fields: Optional[bool] = None, base_directory: Optional[str] = None, ...
Provides the interface for the management of the continue CSV file.
6259906132920d7e50bc7703
class Vector3(Vector): <NEW_LINE> <INDENT> def __new__(cls, data, type = None): <NEW_LINE> <INDENT> data = np.array(data) <NEW_LINE> if type == None: <NEW_LINE> <INDENT> type = data.dtype <NEW_LINE> <DEDENT> return Vector.__new__(cls, shape = (3,), data = data, type = type) <NEW_LINE> <DEDENT> @property <NEW_LINE> de...
3D-s vektor Az általános C{Vector} specializálása, mely csak három elemű vektort képes csak elfogadni. Az adattagok névvel és indexxel is elérhetők
625990611f037a2d8b9e53c9
class _LoremFlickr(RemoteImage): <NEW_LINE> <INDENT> LOREM_FLICKR_URL = 'https://loremflickr.com' <NEW_LINE> WIDTH = 1280 <NEW_LINE> HEIGHT = 768 <NEW_LINE> def __init__(self, keyword: str) -> None: <NEW_LINE> <INDENT> super().__init__(self._build_url(_LoremFlickr.LOREM_FLICKR_URL, _LoremFlickr.WIDTH, _LoremFlickr.HEIG...
キーワードをもとにネットから画像を取得する。 Args: keyword (str): キーワード
625990610c0af96317c578bd
class OutputFormatTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def testOutputFormatConstructor(self): <NEW_LINE> <INDENT> new_format = mapscript.outputFormatObj('GDAL/GTiff', 'gtiff') <NEW_LINE> assert new_format.name == 'gtiff' <NEW_LINE> assert new_format.mimetype == 'image/tiff'
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=511
625990613617ad0b5ee0780b
class SupportedBuildpackResource(ProxyResource): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'system_data': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'...
Supported buildpack resource payload. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource Id for the resource. :vartype id: str :ivar name: The name of the resource. :vartype name: str :ivar type: The type of the resource. :vartype type: str :ivar...
625990614f88993c371f107d
class InvalidFormatException(Exception): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> Exception.__init__(self, *args, **kwargs)
InvalidFormatException: raised when file format is unrecognized
625990618e71fb1e983bd188
class ResultModel(dict): <NEW_LINE> <INDENT> def __init__(self, **kw): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> for k, v in kw.items(): <NEW_LINE> <INDENT> self.__setattr__(k, v) <NEW_LINE> <DEDENT> <DEDENT> def __setattr__(self, name, value): <NEW_LINE> <INDENT> self[str.replace(name, '-', '_')] = value <NEW_...
The base class of the response data.
6259906156b00c62f0fb3f88
class TransitiveIdealGraded(RecursivelyEnumeratedSet_generic): <NEW_LINE> <INDENT> def __init__(self, succ, generators, max_depth=float("inf")): <NEW_LINE> <INDENT> RecursivelyEnumeratedSet_generic.__init__(self, seeds=generators, successors=succ, enumeration='breadth', max_depth=max_depth) <NEW_LINE> self._generators ...
Generic tool for constructing ideals of a relation. INPUT: - ``relation`` -- a function (or callable) returning a list (or iterable) - ``generators`` -- a list (or iterable) - ``max_depth`` -- (Default: infinity) Specifies the maximal depth to which elements are computed Return the set `S` of elements that can b...
6259906156ac1b37e6303845
class GaussBandit(Bandit): <NEW_LINE> <INDENT> def __init__(self, mu, seed=None): <NEW_LINE> <INDENT> super().__init__(mu, seed) <NEW_LINE> <DEDENT> def randomize(self): <NEW_LINE> <INDENT> self.rt = (np.minimum(np.maximum(self.random.normal(self.mu, 0.1), 0), 1)).astype(float) <NEW_LINE> <DEDENT> def print(self): <NEW...
Bernoulli bandit.
62599061435de62698e9d4c4
class GraphQLScalarType(GraphQLNamedType): <NEW_LINE> <INDENT> __slots__ = "name", "description", "serialize", "parse_value", "parse_literal" <NEW_LINE> def __init__( self, name, description=None, serialize=None, parse_value=None, parse_literal=None, ): <NEW_LINE> <INDENT> assert name, "Type must be named." <NEW_LINE> ...
Scalar Type Definition The leaf values of any request and input values to arguments are Scalars (or Enums) and are defined with a name and a series of coercion functions used to ensure validity. Example: def coerce_odd(value): if value % 2 == 1: return value return None OddType =...
625990611f5feb6acb1642a8
class advFileManager(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.current_directory = False <NEW_LINE> <DEDENT> def open_stage_file(self, filename): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> full_name = filename <NEW_LINE> stage_content = open(full_name, "r", encoding="utf-8").read() <NE...
open_stage_file : open file, check integrity and extract blocks load_stage_file : dump stage content
625990619c8ee82313040ce8
class TestBangdiwalaB(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.tests = [(array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]), 0.1467764060356653), (array([[3600, 2595], [65, 3740]]), 0.575688404132935), (array([[9901, 64], [2, 33]]), 0.9933537203915539), (array([[9900, 86], [1, 13]]), 0.99...
This class implements the tests for Bangdiwala's B
625990618a43f66fc4bf384c
class BTable( NonTerminal ) : <NEW_LINE> <INDENT> def __init__( self, parser, btableblocks ): <NEW_LINE> <INDENT> NonTerminal.__init__( self, parser, btableblocks ) <NEW_LINE> self._nonterms = (self.btableblocks,) = (btableblocks,) <NEW_LINE> self.setparent( self, self.children() ) <NEW_LINE> <DEDENT> def children( sel...
class to handle `btable` grammar.
625990613c8af77a43b68aa0
class Player: <NEW_LINE> <INDENT> def __init__(self, checker): <NEW_LINE> <INDENT> assert(checker == 'X' or checker == 'O') <NEW_LINE> self.checker = checker <NEW_LINE> self.num_moves = 0 <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> s = 'Player ' + self.checker <NEW_LINE> return s <NEW_LINE> <DEDENT> def...
a data type for a Connect Four player object
62599061e5267d203ee6cf1e
class MultipleChoice(QuestionBase): <NEW_LINE> <INDENT> _question_answer_locator = (By.CSS_SELECTOR, '.openstax-answer') <NEW_LINE> _nudge_message_locator = ( By.XPATH, '//textarea/following-sibling::div[div[h5]]') <NEW_LINE> @property <NEW_LINE> def answers(self) -> List[MultipleChoice.Answer]: <NEW_LINE> <INDENT> ret...
A mutiple choice response step for an assessment.
625990618e7ae83300eea74b
class SIM900_stick(VisaInstrument): <NEW_LINE> <INDENT> def __init__(self, name: str, address: str, reset: bool=False, **kwargs): <NEW_LINE> <INDENT> super().__init__(name, address, terminator='\n', **kwargs) <NEW_LINE> self.add_parameter('volt_p1', label='Port 1 Voltage', unit='V', set_cmd=partial(self.setvolt, 1, 'VO...
Instrument Driver for the SRS Frame SIM900. Configure this class if you change the instruments and their port orders in the rack. Note that you must reset or write the escape string if you connect to any single port (using "CONN p,'escapestring'")
62599061e76e3b2f99fda0be
class TestAnomalyLogColouring(tests.GraphicsTest): <NEW_LINE> <INDENT> def test_plot_anomaly_log_colouring(self): <NEW_LINE> <INDENT> with fail_any_deprecation_warnings(): <NEW_LINE> <INDENT> with add_gallery_to_path(): <NEW_LINE> <INDENT> import plot_anomaly_log_colouring <NEW_LINE> <DEDENT> with show_replaced_by_chec...
Test the anomaly colouring gallery code.
62599061cc0a2c111447c62e
class DescribeLoginWhiteCombinedListResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TotalCount = None <NEW_LINE> self.LoginWhiteCombinedInfos = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.TotalCount = params...
DescribeLoginWhiteCombinedList返回参数结构体
62599061379a373c97d9a6e2
class CharacterArrayCoder(VariableCoder): <NEW_LINE> <INDENT> def encode(self, variable, name=None): <NEW_LINE> <INDENT> variable = ensure_fixed_length_bytes(variable) <NEW_LINE> dims, data, attrs, encoding = unpack_for_encoding(variable) <NEW_LINE> if data.dtype.kind == "S" and encoding.get("dtype") is not str: <NEW_L...
Transforms between arrays containing bytes and character arrays.
6259906129b78933be26ac23
class CountryResource(object): <NEW_LINE> <INDENT> swagger_types = { 'iso2': 'str', 'iso3': 'str', 'name': 'str' } <NEW_LINE> attribute_map = { 'iso2': 'iso2', 'iso3': 'iso3', 'name': 'name' } <NEW_LINE> def __init__(self, iso2=None, iso3=None, name=None): <NEW_LINE> <INDENT> self._iso2 = None <NEW_LINE> self._iso3 = N...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
625990618e71fb1e983bd189
class FunctionHintSource: <NEW_LINE> <INDENT> EH_FRAME = 0 <NEW_LINE> EXTERNAL_EH_FRAME = 1
Enums that describe the source of function hints.
6259906124f1403a9268642d
class LineMustNotContainWord(LineRule): <NEW_LINE> <INDENT> name = "line-must-not-contain" <NEW_LINE> id = "R5" <NEW_LINE> options_spec = [ListOption('words', [], "Comma separated list of words that should not be found")] <NEW_LINE> violation_message = "Line contains {0}" <NEW_LINE> def validate(self, line, _commit): <...
Violation if a line contains one of a list of words (NOTE: using a word in the list inside another word is not a violation, e.g: WIPING is not a violation if 'WIP' is a word that is not allowed.)
6259906191af0d3eaad3b4e6
@dataclass <NEW_LINE> class CommandTweak(TweakBase): <NEW_LINE> <INDENT> apply_command: str = '' <NEW_LINE> detach_command: str = '' <NEW_LINE> icon: str = '' <NEW_LINE> def _apply(self, command): <NEW_LINE> <INDENT> Logger.info(f'CmdTweak: calling {command}') <NEW_LINE> ret = os.system(command) <NEW_LINE> Logger.info(...
Used for tweaks requiring passing a command into the command line. Json can be extended as follows. ``` { "apply_command": "@echo applying", "detach_command": "@echo disabling" } ``` Attributes: `apply_command` - The command that is passed into the cmd when when the `apply` method is called. `deta...
625990613617ad0b5ee0780d
class DescribleL4RulesRequest(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> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> se...
DescribleL4Rules request structure.
625990614a966d76dd5f05b2
class BrandingIO(BaseModel): <NEW_LINE> <INDENT> logo: Optional[str] <NEW_LINE> font: Optional[FontIO]
Represent an instance of a corporate branding.
625990614f88993c371f107e
class Pbs(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def submitPbs(code2run,pbsfolder,pbsfilename,queue): <NEW_LINE> <INDENT> pbsfilepath = "{0}/{1}.pbs".format(pbsfolder,pbsfilename) <NEW_LINE> errorpath = "{0}/{1}.err".format(pbsfolder,pbsfilenam...
methods related to pbs
62599061009cb60464d02bf6
class MainView(generic.TemplateView): <NEW_LINE> <INDENT> template_name = 'green/main.html'
Loads the main page.
62599061d486a94d0ba2d687
class TestBgpLocalAsn(BaseActionTestCase): <NEW_LINE> <INDENT> action_cls = bgp_local_asn <NEW_LINE> def test_action(self): <NEW_LINE> <INDENT> action = self.get_action_instance() <NEW_LINE> mock_callback = MockCallback() <NEW_LINE> kwargs = { 'username': '', 'rbridge_id': '224', 'get': False, 'ip': '', 'local_as': '44...
Test holder class
62599061a79ad1619776b61c
class NewStockReport(object): <NEW_LINE> <INDENT> def __init__(self, form, timestamp, tag, transactions): <NEW_LINE> <INDENT> self._form = form <NEW_LINE> self.form_id = form._id <NEW_LINE> self.timestamp = timestamp <NEW_LINE> self.tag = tag <NEW_LINE> self.transactions = transactions <NEW_LINE> <DEDENT> @classmethod ...
Intermediate class for dealing with stock XML
62599061379a373c97d9a6e3
class VotesRoot(BoxLayout): <NEW_LINE> <INDENT> votes_container = ObjectProperty(None) <NEW_LINE> votes = {} <NEW_LINE> def add_vote_widget(self, name): <NEW_LINE> <INDENT> vote_widget = Factory.VoteWidget() <NEW_LINE> vote_widget.name = name <NEW_LINE> self.votes_container.add_widget(vote_widget) <NEW_LINE> self.votes...
The Root widget, defined in conjunction with the rule in votes.kv.
62599061627d3e7fe0e0854a
class LastFmAuthBlueprint(auth.oauth.OAuthBlueprint): <NEW_LINE> <INDENT> def generate_oauth_finished(self): <NEW_LINE> <INDENT> def oauth_finished(): <NEW_LINE> <INDENT> if 'token' not in flask.request.args: <NEW_LINE> <INDENT> return flask.redirect(self.oauth_refused_url) <NEW_LINE> <DEDENT> token = flask.request.arg...
Provides a custom oauth_finished function for Last.fm.
6259906199cbb53fe68325a1
class Kocka: <NEW_LINE> <INDENT> def __init__(self, pocet_stien = 6): <NEW_LINE> <INDENT> self.__pocet_stien = pocet_stien <NEW_LINE> <DEDENT> def vrat_pocet_stien(self): <NEW_LINE> <INDENT> return self.__pocet_stien <NEW_LINE> <DEDENT> def hod(self): <NEW_LINE> <INDENT> import random as _random <NEW_LINE> return _rand...
Trieda reprezentuje hraciu kocku.
625990617d43ff2487427f6f
class RoDict(Mapping): <NEW_LINE> <INDENT> def __init__(self, data: Dict[Text, Any], forgive_type=False): <NEW_LINE> <INDENT> self._data = data <NEW_LINE> self._forgive_type = forgive_type <NEW_LINE> <DEDENT> def __getitem__(self, key: Text) -> Any: <NEW_LINE> <INDENT> return make_ro(self._data[key], self._forgive_type...
Wrapper around a dict to make it read-only.
625990618e7ae83300eea74d
class Node4C(metaclass=abc.ABCMeta): <NEW_LINE> <INDENT> def __init__( self): <NEW_LINE> <INDENT> self.__node_next = None <NEW_LINE> self.__is_on = False <NEW_LINE> self.__is_running = False <NEW_LINE> return <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def configure( self, p_Ts: pandora.Box): <NEW_LINE> <INDENT>...
Node for controller. A controller consists of nodes. .. note:: Es ist die Frage, ob ein _Node einen Eingang und einen Ausgang braucht, denn das kann mit den Variablen erledigt werden, von denen gelesen und auf die geschrieben wird und die ja dem Ctor übergeben werden. Schließlich sind alle Subclasses ...
62599061462c4b4f79dbd0c5
class Catch(object): <NEW_LINE> <INDENT> def __call__(self, func, *args, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> __dict__ = None <NEW_LINE> __weakref__ = None <NEW_LINE> result = None <NEW_LINE> success = None
Reproduces the behavior of the mel command of the same name. if writing pymel scripts from scratch, you should use the try/except structure. This command is provided for python scripts generated by py2mel. stores the result of the function in catch.result. >>> if not catch( lambda: myFunc( "somearg" ) ): ... resul...
62599061097d151d1a2c272f
class ImagesReader(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def open_file(file_name, gray=False): <NEW_LINE> <INDENT> img = cv.imread(file_name) <NEW_LINE> if gray: <NEW_LINE> <INDENT> return cv.cvtColor(img, cv.COLOR_BGR2GRAY) <NEW_LINE> <DEDENT> return img <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def...
A class to read image
62599061adb09d7d5dc0bc2a
@Message.register(Byte(SSH_MSG_USERAUTH_FAILURE)) <NEW_LINE> class AuthFailure(Message): <NEW_LINE> <INDENT> SPEC = [('auth_continue', NameList), ('partial', Boolean)] <NEW_LINE> def __init__(self, auth_continue, partial): <NEW_LINE> <INDENT> super(AuthFailure, self).__init__(self.HEADER) <NEW_LINE> self.auth_continue ...
AuthFailure: Section 5.1
625990614428ac0f6e659bf2
class RegularMultiTriangleTiling( MultiTriangleTiling ): <NEW_LINE> <INDENT> def __init__( self, A, m ): <NEW_LINE> <INDENT> self.n = 1 <NEW_LINE> self.m = int( m ) <NEW_LINE> self.A = np.deg2rad( A ) <NEW_LINE> self.C = np.pi - 2 * np.pi / self.m <NEW_LINE> self.B = np.pi - ( self.A + self.C ) <NEW_LINE> self.a = np.s...
Class to generate a triangle tiling with the specified parameters, for the special case of ``n`` equal to 1 Parameters ---------- A : float Angle of lower-right corner of triangle (in degrees) m : int Number of arms in the tiling
62599061e64d504609df9f2e
class SolutionTagResource(CommonResource): <NEW_LINE> <INDENT> class Meta(CommonMeta): <NEW_LINE> <INDENT> queryset = models.SolutionTag.objects.all() <NEW_LINE> filtering = {'name': ALL, 'colour': ('exact'), 'show': ('exact'), } <NEW_LINE> detail_uri_name = 'name'
API Resource for 'SolutionTag' model.
625990614e4d562566373ac7
class QuotaTcp(A10BaseClass): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.ERROR_MSG = "" <NEW_LINE> self.b_key = "quota-tcp" <NEW_LINE> self.DeviceProxy = "" <NEW_LINE> self.tcp_quota = "" <NEW_LINE> self.tcp_reserve = "" <NEW_LINE> for keys, value in kwargs.items(): <NEW_LINE> <INDENT> s...
This class does not support CRUD Operations please use parent. :param tcp_quota: {"description": "NAT port quota per user (default: not configured)", "minimum": 1, "type": "number", "maximum": 64000, "format": "number"} :param tcp_reserve: {"description": "Number of ports to reserve per user (default: same as user-quo...
6259906199cbb53fe68325a2
class Singleton(type): <NEW_LINE> <INDENT> instance = {} <NEW_LINE> def __call__(cls, *args, **kw): <NEW_LINE> <INDENT> if cls not in cls.instance: <NEW_LINE> <INDENT> cls.instance[cls] = super(Singleton, cls).__call__(*args, **kw) <NEW_LINE> <DEDENT> return cls.instance[cls]
The **singleton pattern** is a design pattern that restricts the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system. As a metaclass, the pattern is applied to derived classes such as :: from pynion import Singleton class Foo(objec...
6259906191f36d47f22319ef
class Message(object): <NEW_LINE> <INDENT> def __init__(self, vars): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.__sender = vars["from"] <NEW_LINE> self.__to = vars["to"] <NEW_LINE> self.__body = vars["body"] <NEW_LINE> <DEDENT> except KeyError as e: <NEW_LINE> <INDENT> raise InvalidMessageError(e[0]) <NEW_LINE> ...
Encapsulates an XMPP message received by the application.
6259906166673b3332c31abd
class MediaDir: <NEW_LINE> <INDENT> NULL = 0 <NEW_LINE> ENCODING = 1 <NEW_LINE> DECODING = 2 <NEW_LINE> ENCODING_DECODING = 3
Media direction constants. Member documentation: NULL -- media is not active ENCODING -- media is active in transmit/encoding direction only. DECODING -- media is active in receive/decoding direction only ENCODING_DECODING -- media is active in both directions.
6259906145492302aabfdb9b
class CLBOrNodeDeleted(Exception): <NEW_LINE> <INDENT> def __init__(self, error, clb_id, node_id=None): <NEW_LINE> <INDENT> super(CLBOrNodeDeleted, self).__init__( 'CLB {} or node {} deleted due to {}'.format(clb_id, node_id, error)) <NEW_LINE> self.error = error <NEW_LINE> self.clb_id = clb_id <NEW_LINE> self.node_id ...
CLB or Node is deleted or in process of getting deleted :param :class:`RequestError` error: Error that caused this exception :param str clb_id: ID of deleted load balancer :param str node_id: ID of deleted node in above load balancer
62599061009cb60464d02bf8
class View(ViewDecorator, ResponseSetter): <NEW_LINE> <INDENT> same_exception_content = True <NEW_LINE> urls = {} <NEW_LINE> @classmethod <NEW_LINE> def get_urls(cls): <NEW_LINE> <INDENT> return cls.urls.get(cls, []) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def add_url(cls, url, name): <NEW_LINE> <INDENT> cls.urls.s...
Wrapper around falcon view api
62599061435de62698e9d4c8
class UserViewSet(viewsets.ReadOnlyModelViewSet): <NEW_LINE> <INDENT> authentication_classes = (authentication.SessionAuthentication,) <NEW_LINE> permission_classes = (ApiKeyHeaderPermission,) <NEW_LINE> queryset = User.objects.all().prefetch_related("preferences").select_related("profile") <NEW_LINE> serializer_class ...
DRF class for interacting with the User ORM object
625990615166f23b2e244a93
class DataReader: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.cur_path = os.path.abspath(os.path.dirname(__file__)) <NEW_LINE> self.file_path = os.path.join(self.cur_path, r"../TestData/TestData.xlsx") <NEW_LINE> <DEDENT> def load_excel_data(self): <NEW_LINE> <INDENT> records = None <NEW_LINE> try:...
This class includes basic reusable data helpers.
625990617047854f46340a7f
class TOS(commands.Cog): <NEW_LINE> <INDENT> def __init__(self, bot: Bot): <NEW_LINE> <INDENT> self.bot = bot <NEW_LINE> toscfg = ConfigUtil("./static/tos.json") <NEW_LINE> tos = toscfg.read()['tos'] <NEW_LINE> dgl = toscfg.read()['dgl'] <NEW_LINE> print(tos, dgl) <NEW_LINE> tmp = [] <NEW_LINE> for item in tos: <NEW_LI...
A cog for showing the terms and guidelines
62599061e5267d203ee6cf20