code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Position(object): <NEW_LINE> <INDENT> def __init__(self, X=None, Y=None,): <NEW_LINE> <INDENT> self.X = X <NEW_LINE> self.Y = Y <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not No... | Attributes:
- X
- Y | 62598fa03cc13d1c6d4655a4 |
class Modelim(SystemTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.interpreter.pipe.create('elim', 'mf') <NEW_LINE> <DEDENT> def test_te_200ns(self): <NEW_LINE> <INDENT> self.interpreter.results.read(file='final_results_trunc_1.3_v2', dir=status.install_path + sep+'test_suite'+sep+'shared_data... | Class for testing model selection. | 62598fa0435de62698e9bc2c |
class CanCache(ndb.Model): <NEW_LINE> <INDENT> updated_at = ndb.DateTimeProperty(auto_now=True) | Super brilliant Idea: Lots of things will change very infrequently, so store the date it was last updated.
If it wasn't updated, then list is cached client side.
The benefit of this is in drastically reduces Data-Store Reads
Reduce DB Reads => Save Money | 62598fa001c39578d7f12bb7 |
class LObs(GenericMedia): <NEW_LINE> <INDENT> supported_domains = ['www.nouvelobs.com', 'bibliobs.nouvelobs.com'] <NEW_LINE> id = 'l_obs' <NEW_LINE> articles_regex = [r'\.html$'] <NEW_LINE> display_name = 'L\'Obs' | Class used for french media "L'Obs". | 62598fa0009cb60464d0135d |
class JsonEncoder(flask.json.JSONEncoder): <NEW_LINE> <INDENT> def __init__(self, *args: Any, **kwargs: Any) -> None: <NEW_LINE> <INDENT> kwargs['namedtuple_as_object'] = False <NEW_LINE> kwargs['tuple_as_array'] = False <NEW_LINE> super().__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def default(self, obj: object) -> ... | A JSON encoder that deals with various types used in SRComp. | 62598fa0a17c0f6771d5c072 |
class TestDataPaths(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> print("TestDataCRUD:setUp__:begin") <NEW_LINE> self.data_config = dc <NEW_LINE> self.db_targets = dc.DB_TARGETS() <NEW_LINE> print("TestDataCRUD:setUp__:end") <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> prin... | Test data access in the filesystem. | 62598fa0a8370b77170f021d |
class LbvsEntry(plugin_api.PluginInterface): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.stream = None <NEW_LINE> self.counter = 0 <NEW_LINE> self.first_entry = False <NEW_LINE> <DEDENT> def execute(self, files): <NEW_LINE> <INDENT> query = LbvsEntry._load_file(files["query_file"]) <NEW_LINE> datab... | Compute Tanimoto similarity. | 62598fa076e4537e8c3ef3f0 |
class FreqList: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.words, self.word_freq, self.word_rank = list(), dict(), dict() <NEW_LINE> self.ready = False <NEW_LINE> <DEDENT> def load(self, filename=None, stream=None): <NEW_LINE> <INDENT> if filename is not None: <NEW_LINE> <INDENT> self.words, self.... | Klasa opisuje listę frekwencyjną. | 62598fa08e71fb1e983bb8ef |
class MplRegularPolygonProperties(MplPatchProperties): <NEW_LINE> <INDENT> _input_ports = [ ("xy", "basic:String", {'optional': True, 'docstring': 'A length 2 tuple (x, y) of the center.'}), ("radius", "basic:Integer", {'optional': True, 'docstring': 'The distance from the center to each of the vertices.', 'defaults': ... | A regular polygon patch. | 62598fa0925a0f43d25e7e76 |
class ProjectsLocationsJobsMessagesService(base_api.BaseApiService): <NEW_LINE> <INDENT> _NAME = u'projects_locations_jobs_messages' <NEW_LINE> def __init__(self, client): <NEW_LINE> <INDENT> super(DataflowV1b3.ProjectsLocationsJobsMessagesService, self).__init__(client) <NEW_LINE> self._upload_configs = { } <NEW_LINE>... | Service class for the projects_locations_jobs_messages resource. | 62598fa085dfad0860cbf991 |
class TailLogEntriesResponse(proto.Message): <NEW_LINE> <INDENT> class SuppressionInfo(proto.Message): <NEW_LINE> <INDENT> class Reason(proto.Enum): <NEW_LINE> <INDENT> REASON_UNSPECIFIED = 0 <NEW_LINE> RATE_LIMIT = 1 <NEW_LINE> NOT_CONSUMED = 2 <NEW_LINE> <DEDENT> reason = proto.Field( proto.ENUM, number=1, enum="Tail... | Result returned from ``TailLogEntries``.
Attributes:
entries (Sequence[google.cloud.logging_v2.types.LogEntry]):
A list of log entries. Each response in the stream will
order entries with increasing values of
``LogEntry.timestamp``. Ordering is not guaranteed between
separate respon... | 62598fa0e5267d203ee6b746 |
class ImageSource(abc.ABC): <NEW_LINE> <INDENT> def __getitem__(self, index: int) -> str: <NEW_LINE> <INDENT> return self.images[index] <NEW_LINE> <DEDENT> images: Dict[int, str] <NEW_LINE> def __iter__(self) -> Iterable[str]: <NEW_LINE> <INDENT> for image in self.images.values(): <NEW_LINE> <INDENT> yield image | Base class for image sources. | 62598fa0596a897236127ab5 |
class SchemaTab(BaseResource): <NEW_LINE> <INDENT> def render_tab(self, request): <NEW_LINE> <INDENT> return html <NEW_LINE> <DEDENT> def render_POST(self, request): <NEW_LINE> <INDENT> path = request.args['path'][0] <NEW_LINE> def send_response(data): <NEW_LINE> <INDENT> response = { 'schema': extract_result(data[0]),... | Schema tab | 62598fa007f4c71912baf27e |
class PhysicalVerification(SamlBase): <NEW_LINE> <INDENT> c_tag = 'PhysicalVerification' <NEW_LINE> c_namespace = NAMESPACE <NEW_LINE> c_children = SamlBase.c_children.copy() <NEW_LINE> c_attributes = SamlBase.c_attributes.copy() <NEW_LINE> c_child_order = SamlBase.c_child_order[:] <NEW_LINE> c_cardinality = SamlBase.c... | The urn:oasis:names:tc:SAML:2.0:ac:classes:TimeSyncToken:
PhysicalVerification element | 62598fa08e7ae83300ee8ed9 |
class UpdatePeerSettings(TLObject): <NEW_LINE> <INDENT> __slots__: List[str] = ["peer", "settings"] <NEW_LINE> ID = 0x6a7e7366 <NEW_LINE> QUALNAME = "types.UpdatePeerSettings" <NEW_LINE> def __init__(self, *, peer: "raw.base.Peer", settings: "raw.base.PeerSettings") -> None: <NEW_LINE> <INDENT> self.peer = peer <NEW_LI... | This object is a constructor of the base type :obj:`~pyrogram.raw.base.Update`.
Details:
- Layer: ``122``
- ID: ``0x6a7e7366``
Parameters:
peer: :obj:`Peer <pyrogram.raw.base.Peer>`
settings: :obj:`PeerSettings <pyrogram.raw.base.PeerSettings>` | 62598fa0ac7a0e7691f72344 |
class HostUser(models.Model): <NEW_LINE> <INDENT> auth_type_choices = ((0,'ssh-password'),(1,'ssh-key')) <NEW_LINE> auth_type = models.SmallIntegerField(choices=auth_type_choices) <NEW_LINE> username = models.CharField(max_length=32) <NEW_LINE> password = models.CharField(blank=True,null=True,max_length=128) <NEW_LINE>... | 存储远程主机的用户信息
root 123
root abc
root sfsfs | 62598fa00c0af96317c561ba |
class Project(object): <NEW_LINE> <INDENT> def __init__(self, energy_trace_set, interventions, site): <NEW_LINE> <INDENT> self.energy_trace_set = energy_trace_set <NEW_LINE> self.interventions = interventions <NEW_LINE> self.site = site <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return ( "Project(energ... | Container for storing project data.
Parameters
----------
trace_set : eemeter.structures.TraceSet
Complete set of energy traces for this project. For a project site that
has, for example, two electricity meters, each with two traces
(supplied electricity kWh, and solar-generated kWh) and one natural gas
... | 62598fa00c0af96317c561bb |
class Remote(object): <NEW_LINE> <INDENT> def __init__(self, url): <NEW_LINE> <INDENT> self.url = url.endswith("/") and url or url + "/" <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def all(cls): <NEW_LINE> <INDENT> if not Configuration.has_section('remotes'): <NEW_LINE> <INDENT> cls.create("https://raw.github.com/mwrla... | Remote is a wrapper around a set of Mercury remote repositories, and provides
methods for managing them.
A Remote can be instantiated to provide API access to the repository, to
get information about available modules and download their source. | 62598fa03539df3088ecc0ee |
class ProductionConfig(BaseConfig): <NEW_LINE> <INDENT> DEBUG = False <NEW_LINE> SQLALCHEMY_DATABASE_URI = 'mysql:///example' | Production configuration. | 62598fa07d847024c075c1ff |
class TestPrettifyCombo(TestCSVFlatten): <NEW_LINE> <INDENT> def test_prettify_multiline_records_disable_max_length(self): <NEW_LINE> <INDENT> self.assertLines( ["-L", "0", "examples/dummy2m.csv"], [ "| field | value |", "| ----- | ----- |", "| a | 1 |", "| b | 2 |", "| c | 3, |", "| | 4 ... | tklegacy
test prettify with other settings to make make sure side-effects don't conflict
legacy tests from before non-default-prettify | 62598fa0c432627299fa2e13 |
class UniversalP3PHeader (object): <NEW_LINE> <INDENT> def process_response(self, request, response): <NEW_LINE> <INDENT> response['P3P'] = 'CP="Shareabouts does not have a P3P policy."' <NEW_LINE> return response | Sets P3P headers on the response. This header does not specify
a valid P3P policy, but it is enough to get past IE.
See http://stackoverflow.com/a/17710503/123776 | 62598fa0498bea3a75a5795b |
@pytest.mark.skipif(IS_JYTHON or IS_IRONPYTHON, reason='CPython/pypy only') <NEW_LINE> class TestSetLocals(unittest.TestCase): <NEW_LINE> <INDENT> def test_set_locals_using_save_locals(self): <NEW_LINE> <INDENT> x = check_method(use_save_locals) <NEW_LINE> self.assertEqual(x, 2) <NEW_LINE> <DEDENT> def test_frame_simpl... | Test setting locals in one function from another function using several approaches. | 62598fa0f548e778e596b3e7 |
class Offset(Vector): <NEW_LINE> <INDENT> pass | This class implements an offset. | 62598fa063d6d428bbee25eb |
class File(BIO): <NEW_LINE> <INDENT> def __init__(self, pyfile, close_pyfile=1): <NEW_LINE> <INDENT> BIO.__init__(self, _pyfree=1) <NEW_LINE> self.pyfile = pyfile <NEW_LINE> self.close_pyfile = close_pyfile <NEW_LINE> if hasattr(m2, "bio_new_pyfd"): <NEW_LINE> <INDENT> self.bio = m2.bio_new_pyfd(pyfile.fileno(), m2.bio... | Object interface to BIO_s_pyfd
This class interfaces Python to OpenSSL functions that expect BIO \*. For
general file manipulation in Python, use Python's builtin file object. | 62598fa0236d856c2adc9357 |
class Log(base.PlexCommand): <NEW_LINE> <INDENT> name = 'log' <NEW_LINE> type_map = { 'StatusNotification': 'Status', 'ProgressNotification': 'Progress' } <NEW_LINE> @asyncio.coroutine <NEW_LINE> def notifications(self, table): <NEW_LINE> <INDENT> server = self.serverapi.uri.split('://', 1)[1] <NEW_LINE> notif_url = 'w... | Show activity log | 62598fa0d268445f26639aa0 |
class SourceModel(collections.abc.Sequence): <NEW_LINE> <INDENT> def __init__(self, src_groups, name='', investigation_time='', start_time=''): <NEW_LINE> <INDENT> self.src_groups = src_groups <NEW_LINE> self.name = name <NEW_LINE> self.investigation_time = investigation_time <NEW_LINE> self.start_time = start_time <NE... | A container of source groups with attributes name, investigation_time
and start_time. It is serialize on hdf5 as follows:
>> with openquake.baselib.hdf5.File('/tmp/sm.hdf5', 'w') as f:
.. f['/'] = source_model | 62598fa01b99ca400228f44b |
class Request: <NEW_LINE> <INDENT> def __init__(self, url, cookies, delay, userAgent, bauth): <NEW_LINE> <INDENT> self.cookies = cookies <NEW_LINE> self.delay = delay <NEW_LINE> self.url = url <NEW_LINE> self.headers = { "User-Agent": userAgent, "Authorization": "Basic " + bauth } <NEW_LINE> self.session = requests.Se... | This class wraps the requests module in order to setup cookies, User-Agent, etc.
| 62598fa0796e427e5384e5cd |
class Config(object): <NEW_LINE> <INDENT> def __init__(self, poetry_file, weight_file, max_len, batch_size, learning_rate, form): <NEW_LINE> <INDENT> self.poetry_file = poetry_file <NEW_LINE> self.weight_file = weight_file <NEW_LINE> self.max_len = max_len <NEW_LINE> self.batch_size = batch_size <NEW_LINE> self.learnin... | form_ equals 5 means we choose 5 character poems as our training data,
equals 7 means we choose 7 character poems as training data,
while other nums means we do not choose.
max equals form plus 1 | 62598fa0442bda511e95c294 |
class LinkADRReqTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_encode(self): <NEW_LINE> <INDENT> expected = '\x03\x21\xff\x00\x00' <NEW_LINE> chmask = int('FF', 16) <NEW_LINE> m = lora_mac.LinkADRReq(datarate=2, txpower=1, chmask=chmask, chmaskcntl=0, nbrep=0) <NEW_LINE> result = m.encode() <NEW_LINE> self.asser... | Test LinkADRReq class | 62598fa0442bda511e95c295 |
class AdminTeamGamesHandler(webapp2.RequestHandler): <NEW_LINE> <INDENT> def post(self): <NEW_LINE> <INDENT> file_name = self.request.get('file_name') <NEW_LINE> with open(file_name, 'rb') as schedule: <NEW_LINE> <INDENT> next(schedule) <NEW_LINE> reader = csv.reader(schedule) <NEW_LINE> home_team = self.__get_home_tea... | Controller to load the given team's home games into the data store | 62598fa021bff66bcd722a9e |
class Hostname(ConfigType): <NEW_LINE> <INDENT> def __init__(self, type_name='hostname value'): <NEW_LINE> <INDENT> super(Hostname, self).__init__(type_name=type_name) <NEW_LINE> <DEDENT> def __call__(self, value): <NEW_LINE> <INDENT> if len(value) == 0: <NEW_LINE> <INDENT> raise ValueError("Cannot have an empty hostna... | Hostname type.
A hostname refers to a valid DNS or hostname. It must not be longer than
253 characters, have a segment greater than 63 characters, nor start or
end with a hyphen.
:param type_name: Type name to be used in the sample config file. | 62598fa0a17c0f6771d5c075 |
class ValueIterationAgent(ValueEstimationAgent): <NEW_LINE> <INDENT> def __init__(self, mdp, discount = 0.9, iterations = 100): <NEW_LINE> <INDENT> self.mdp = mdp <NEW_LINE> self.discount = discount <NEW_LINE> self.iterations = iterations <NEW_LINE> self.values = util.Counter() <NEW_LINE> self.runValueIteration() <NEW_... | * Please read learningAgents.py before reading this.*
A ValueIterationAgent takes a Markov decision process
(see mdp.py) on initialization and runs value iteration
for a given number of iterations using the supplied
discount factor. | 62598fa057b8e32f52508039 |
class set_all_blades_default_power_state_off: <NEW_LINE> <INDENT> def __init__ (self, parameters): <NEW_LINE> <INDENT> self.args = parameters <NEW_LINE> <DEDENT> def pre_check (self): <NEW_LINE> <INDENT> run_pre_check (command_name_enum.set_blade_config) <NEW_LINE> <DEDENT> def get_response (self): <NEW_LINE> <INDENT> ... | Handler for the SetAllBladesDefaultPowerStateOff command. | 62598fa076e4537e8c3ef3f1 |
@api.route('/login') <NEW_LINE> class UserLogin(Resource): <NEW_LINE> <INDENT> @api.doc('user_login') <NEW_LINE> @api.expect(user_auth, validate=True) <NEW_LINE> def post(self): <NEW_LINE> <INDENT> post_data = request.json <NEW_LINE> return auth.login_user(data=post_data) | User Login Resource | 62598fa021a7993f00c65dbe |
class FileAsserterInterface(AsserterInterface): <NEW_LINE> <INDENT> def get_return(self, path): <NEW_LINE> <INDENT> return path <NEW_LINE> <DEDENT> meets = abc.abstractproperty() <NEW_LINE> message = abc.abstractproperty() <NEW_LINE> exception = abc.abstractproperty() | Parent interface for all File-related assertions. | 62598fa03539df3088ecc0ef |
class QDScreen(SelectorMixin, BaseEstimator): <NEW_LINE> <INDENT> def __init__(self, absolute_eps=None, relative_eps=None): <NEW_LINE> <INDENT> self.absolute_eps = absolute_eps <NEW_LINE> self.relative_eps = relative_eps <NEW_LINE> <DEDENT> def fit(self, X, y=None): <NEW_LINE> <INDENT> X = self._validate_data(X, accept... | Feature selector that removes all features that are (quasi-)deterministically predicted from others.
This feature selection algorithm looks only at the features (X), not the
desired outputs (y), and can thus be used for unsupervised learning.
Read more in the User Guide.
Parameters
----------
absolute_eps : float, o... | 62598fa099fddb7c1ca62d05 |
class FactoryTest(TestCase): <NEW_LINE> <INDENT> def test_instance(self): <NEW_LINE> <INDENT> google = Company.factory("Google") <NEW_LINE> self.assertTrue(isinstance(google, Company)) <NEW_LINE> <DEDENT> def test_factory_initialize_object(self): <NEW_LINE> <INDENT> apple = Company.factory("Apple") <NEW_LINE> self.asse... | Test for checking Factory Design Pattern. | 62598fa0be383301e0253631 |
class validate_test(unittest.TestCase): <NEW_LINE> <INDENT> def test_validate_simple(self): <NEW_LINE> <INDENT> inputs=( ( ({b'title':[b'Macro4']},[]), {},[],[],[],{}, ( ({b'title': [b'Macro4']}, []), {b'title': [b'title cannot be Macro4', b'title cannot contain 4']} ) ), ( ({b'captchahidden': [b'78515'], b'captchapubl... | Validate tests | 62598fa03d592f4c4edbad09 |
class Vector4(Tuple): <NEW_LINE> <INDENT> default_value = (0, 0, 0, 0) <NEW_LINE> info_text = 'a four-element vector' <NEW_LINE> def __init__(self, trait=CFloat, default_value=Undefined, **kwargs): <NEW_LINE> <INDENT> if default_value is Undefined: <NEW_LINE> <INDENT> default_value = self.default_value <NEW_LINE> <DEDE... | A trait for a 4-tuple corresponding to a three.js Vector4.
| 62598fa055399d3f0562635d |
class UnsupportedResponseTypeError(OAuth2Error): <NEW_LINE> <INDENT> error = 'unsupported_response_type' <NEW_LINE> def __init__(self, response_type): <NEW_LINE> <INDENT> super(UnsupportedResponseTypeError, self).__init__() <NEW_LINE> self.response_type = response_type <NEW_LINE> <DEDENT> def get_error_description(self... | The authorization server does not support obtaining
an access token using this method. | 62598fa007f4c71912baf280 |
class RAfex(RPackage): <NEW_LINE> <INDENT> homepage = "https://github.com/singmann/afex" <NEW_LINE> cran = "afex" <NEW_LINE> version('0.28-1', sha256='cfb0b79bfa01b590afc3354a5b2ad3640d2f4974b036d6c256fa8e684bc69c2e') <NEW_LINE> depends_on('r@3.5.0:', type=('build', 'run')) <NEW_LINE> depends_on('r-lme4@1.1-8:', ty... | Analysis of Factorial Experiments
Convenience functions for analyzing factorial experiments using ANOVA or
mixed models. aov_ez(), aov_car(), and aov_4() allow specification of
between, within (i.e., repeated-measures), or mixed (i.e., split-plot)
ANOVAs for data in long format (i.e., one observation per row),
automat... | 62598fa0462c4b4f79dbb847 |
class MaterialFactory: <NEW_LINE> <INDENT> factories = {} <NEW_LINE> def addFactory(material, materialFactory): <NEW_LINE> <INDENT> MaterialFactory.factories.put[material] = materialFactory <NEW_LINE> <DEDENT> def createMaterial(material, **kwargs): <NEW_LINE> <INDENT> if not material in MaterialFactory.factories: <NEW... | Factory class to encapsulate creation of materials. Using **kwargs lets you
pass values to the material constructors,
eg. for an Elastic material createMaterial(materials.ELASTIC, name="mat",
youngs_modulus = 20000, poissons_ratio = 2) | 62598fa05fdd1c0f98e5ddd4 |
@unittest.skipUnless(os.getenv(ENV), REASON) <NEW_LINE> @patch('doorstop.settings.ADDREMOVE_FILES', False) <NEW_LINE> class TestReorder(unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> cls.prefix = 'tut' <NEW_LINE> cls.path = os.path.join('docs', 'reqs', 'tutorial... | Integration tests for the 'doorstop reorder' command. | 62598fa010dbd63aa1c709e9 |
class ButtonEntry(Button, HelpedWidget): <NEW_LINE> <INDENT> def __init__(self, master, title, variable, help): <NEW_LINE> <INDENT> Button.__init__(self, master, text=title) <NEW_LINE> self.help = help <NEW_LINE> self.bind("<Button-3>", self.helpme) <NEW_LINE> self.master.ncallbacks += 1 <NEW_LINE> self.config(command=... | If the command is one to just 'activate' | 62598fa099cbb53fe6830d0e |
class Note(models.Model): <NEW_LINE> <INDENT> content = models.TextField(null=False) <NEW_LINE> date_created = models.DateTimeField(auto_now_add=True) <NEW_LINE> name = models.CharField(max_length=255, null=False) <NEW_LINE> image = models.ImageField(null=True) <NEW_LINE> owner = models.ForeignKey(User, null=False, def... | Note model.
Defines:
Name - The name of the note
Date_created - The date and time the note was created
Content - Of course, the actual content of the note | 62598fa0f548e778e596b3e9 |
class TableBuilder(object): <NEW_LINE> <INDENT> def __init__(self, *headers): <NEW_LINE> <INDENT> self.headers = list(headers) <NEW_LINE> self.results = [[] for x in self.headers] <NEW_LINE> <DEDENT> def col(self, name): <NEW_LINE> <INDENT> self.headers.append(name) <NEW_LINE> self.results.append(["" for x in range(len... | OMERO-addition to make working with Tables easier | 62598fa01f5feb6acb162a5e |
class GeneralLayerPropPage(CoClass): <NEW_LINE> <INDENT> _reg_clsid_ = GUID('{49C65517-D260-11D2-9F48-00C04F8ED21A}') <NEW_LINE> _idlflags_ = [] <NEW_LINE> _typelib_path_ = typelib_path <NEW_LINE> _reg_typelib_ = ('{D92377DC-FAB1-4DFB-A4C1-61BD8C40DBEB}', 10, 2) | General property page for managing layer properties. | 62598fa0435de62698e9bc2f |
class MainHandler(tornado.web.RequestHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> self.render( "index.html", title="Home", header_text="Welcome", footer_text="") | 默认请求 | 62598fa0627d3e7fe0e06ce7 |
class Status(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def to_console(indent_qty, message): <NEW_LINE> <INDENT> indent = ' ' <NEW_LINE> text = indent * indent_qty <NEW_LINE> text += message <NEW_LINE> print(text) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def time_format(time): <NEW_LINE> <INDENT> retu... | Used to communicate with console. | 62598fa056ac1b37e6302027 |
class _TimerHandle(nbio_interface.AbstractTimerReference): <NEW_LINE> <INDENT> def __init__(self, handle): <NEW_LINE> <INDENT> self._handle = handle <NEW_LINE> <DEDENT> def cancel(self): <NEW_LINE> <INDENT> if self._handle is not None: <NEW_LINE> <INDENT> self._handle.cancel() <NEW_LINE> self._handle = None | This module's adaptation of `nbio_interface.AbstractTimerReference`.
| 62598fa01b99ca400228f44c |
class TestAzureGroup(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 testAzureGroup(self): <NEW_LINE> <INDENT> model = esp_sdk.models.azure_group.AzureGroup() | AzureGroup unit test stubs | 62598fa06aa9bd52df0d4d07 |
class TestReadArticle(TestUsingLoggedInUser, TestConfig): <NEW_LINE> <INDENT> def retrieve_user_read_stats(self): <NEW_LINE> <INDENT> return self.client.get( reverse("user_read_stats"), content_type='application/json', HTTP_AUTHORIZATION="Token {}".format(self.access_token) ) <NEW_LINE> <DEDENT> def test_1_start_read_a... | test suite for user read stat | 62598fa0442bda511e95c296 |
class MockedOut(object): <NEW_LINE> <INDENT> def write(self, *args, **kwargs): <NEW_LINE> <INDENT> pass | the one which has no isatty
| 62598fa0851cf427c66b8104 |
class router_volume(AbstractResourceRoute): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.abstract = super(router_volume, self) <NEW_LINE> self.controller = ControllerVolume <NEW_LINE> <DEDENT> @token_required <NEW_LINE> def get(self, mongoid=None): <NEW_LINE> <INDENT> app.logger.debug("***{} fired a... | Extends of flask restfull resource
:param Resource extended class | 62598fa032920d7e50bc5e92 |
class testKelvinToFarenheit2(unittest.TestCase): <NEW_LINE> <INDENT> knownValues = [(300, 80.0), (270, 26.0), (455, 359.0), (600, 620.0)] <NEW_LINE> def testCorrectResult(self): <NEW_LINE> <INDENT> for kel, far in self.knownValues: <NEW_LINE> <INDENT> result = conversions_refactored.allConversions('kelvin', 'farenheit'... | convertCelsiusToFarenheit should return the correct value | 62598fa04a966d76dd5eed1e |
class GameCategory(BaseModel): <NEW_LINE> <INDENT> create_time = models.DateTimeField(auto_now_add=True) <NEW_LINE> stick_time = models.DateTimeField(null=True, blank=True) <NEW_LINE> game = models.ForeignKey(Game) <NEW_LINE> category = models.ForeignKey(Category) <NEW_LINE> rank = models.IntegerField(default=1) <NEW_L... | 游戏系列映射 | 62598fa099cbb53fe6830d0f |
class Dog(): <NEW_LINE> <INDENT> def __init__(self, name, age): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.age = age <NEW_LINE> <DEDENT> def sit(self): <NEW_LINE> <INDENT> print(self.name.title() + "is now sitting.") <NEW_LINE> <DEDENT> def roll_over(self): <NEW_LINE> <INDENT> print(self.name.title()+" rolled... | 一次模拟小狗的简单尝试 | 62598fa092d797404e388a84 |
class FakeOvsdbRow(FakeResource): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def create_one_ovsdb_row(attrs=None, methods=None): <NEW_LINE> <INDENT> attrs = attrs or {} <NEW_LINE> methods = methods or {} <NEW_LINE> fake_uuid = uuidutils.generate_uuid() <NEW_LINE> ovsdb_row_attrs = { 'uuid': fake_uuid, 'name': 'name-'... | Fake one or more OVSDB rows. | 62598fa0d7e4931a7ef3bed6 |
class ProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): <NEW_LINE> <INDENT> PROVISIONING = "Provisioning" <NEW_LINE> SUCCEEDED = "Succeeded" <NEW_LINE> DELETING = "Deleting" <NEW_LINE> FAILED = "Failed" <NEW_LINE> DELETE_ERROR = "DeleteError" | Resource provisioning state
| 62598fa091f36d47f2230dbf |
class TopicDeleteView(LoginRequiredMixin, PermissionMixin, DeleteView): <NEW_LINE> <INDENT> model = Topic <NEW_LINE> permissions_required = ['edit_and_delete_topic_and_answer'] <NEW_LINE> def get_discipline(self): <NEW_LINE> <INDENT> discipline = Discipline.objects.get( slug=self.kwargs.get('slug', '') ) <NEW_LINE> ret... | View to delete a specific topic. | 62598fa0097d151d1a2c0e66 |
class MSELoss: <NEW_LINE> <INDENT> def __init__(self, reduction='mean'): <NEW_LINE> <INDENT> assert reduction in ('none', 'mean') <NEW_LINE> self.reduction = reduction <NEW_LINE> <DEDENT> def __call__(self, pred, target): <NEW_LINE> <INDENT> if target.shape[-1] == 1 and len(target.shape) - len(pred.shape) == 1: <NEW_LI... | MSE loss that sums over non-batch dimensions. | 62598fa056b00c62f0fb26ed |
class SpanOrCrossEntropyLoss(tf.keras.losses.Loss): <NEW_LINE> <INDENT> def call(self, y_true, y_pred): <NEW_LINE> <INDENT> y_pred_masked = y_pred - tf.cast(y_true < 0.5, tf.float32) * 1e6 <NEW_LINE> or_cross_entropy = ( tf.math.reduce_logsumexp(y_pred, axis=-2) - tf.math.reduce_logsumexp(y_pred_masked, axis=-2)) <NEW_... | Cross entropy loss for multiple correct answers.
See https://arxiv.org/abs/1710.10723. | 62598fa00c0af96317c561bf |
class EditableListCtrl(wx.ListCtrl, listmix.TextEditMixin): <NEW_LINE> <INDENT> def __init__(self, parent, ID=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0): <NEW_LINE> <INDENT> wx.ListCtrl.__init__(self, parent, ID, pos, size, style) <NEW_LINE> listmix.TextEditMixin.__init__(self) | TextEditMixin allows any column to be edited. | 62598fa02c8b7c6e89bd3604 |
class TournamentMakerController: <NEW_LINE> <INDENT> def __call__(self): <NEW_LINE> <INDENT> pass | Docstring | 62598fa085dfad0860cbf993 |
class Track: <NEW_LINE> <INDENT> def __init__(self, track, number, index): <NEW_LINE> <INDENT> self._track = track <NEW_LINE> self.number = number <NEW_LINE> self.index = index <NEW_LINE> self._frame_info_list = None <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def create(cls, track, number, index): <NEW_LINE> <INDENT> ... | FFMS_Track
| 62598fa0e1aae11d1e7ce742 |
class IBMLogicalDisk(LogicalDisk, IBMComponent): <NEW_LINE> <INDENT> writeCacheMode = '' <NEW_LINE> status = 1 <NEW_LINE> statusmap ={1: (DOT_GREEN, SEV_CLEAN, 'Online'), 2: (DOT_RED, SEV_CRITICAL, 'Critical'), 3: (DOT_ORANGE, SEV_ERROR, 'Offline'), 4: (DOT_YELLOW, SEV_WARNING, 'Migrating'), 5: (DOT_GREEN, SEV_CLEAN, '... | IBMLogicalDisk object | 62598fa0a79ad16197769ea1 |
class HassIODiscovery(HomeAssistantView): <NEW_LINE> <INDENT> name = "api:hassio_push:discovery" <NEW_LINE> url = "/api/hassio_push/discovery/{uuid}" <NEW_LINE> def __init__(self, hass: HomeAssistant, hassio): <NEW_LINE> <INDENT> self.hass = hass <NEW_LINE> self.hassio = hassio <NEW_LINE> <DEDENT> async def post(self, ... | Hass.io view to handle base part. | 62598fa055399d3f0562635f |
class Profile(ndb.Model): <NEW_LINE> <INDENT> displayName = ndb.StringProperty() <NEW_LINE> mainEmail = ndb.StringProperty() <NEW_LINE> teeShirtSize = ndb.StringProperty(default='NOT_SPECIFIED') <NEW_LINE> conferenceKeysToAttend = ndb.StringProperty(repeated=True) <NEW_LINE> sessionKeysToWishlist = ndb.StringProperty(r... | Profile -- User profile object | 62598fa0fbf16365ca793ef7 |
class RepoTag(GitHubCore): <NEW_LINE> <INDENT> def _update_attributes(self, tag): <NEW_LINE> <INDENT> self.name = tag.get('name') <NEW_LINE> self.zipball_url = tag.get('zipball_url') <NEW_LINE> self.tarball_url = tag.get('tarball_url') <NEW_LINE> self.commit = tag.get('commit', {}) <NEW_LINE> <DEDENT> def _repr(self): ... | The :class:`RepoTag <RepoTag>` object. This stores the information
representing a tag that was created on a repository.
See also: http://developer.github.com/v3/repos/#list-tags | 62598fa01f037a2d8b9e3f26 |
class TranslationClassesInfo(DeviceDataRecord): <NEW_LINE> <INDENT> def __init__(self, traversal, **kwargs): <NEW_LINE> <INDENT> super().__init__(**kwargs) <NEW_LINE> self.traversal = traversal <NEW_LINE> <DEDENT> def copy(self, **kwargs): <NEW_LINE> <INDENT> traversal = kwargs.pop("traversal", self.traversal) <NEW_LIN... | Interaction lists to help with for translations that benefit from
precomputing distance related values
.. attribute:: nfrom_sep_siblings_translation_classes
The number of distinct translation classes.
.. attribute:: from_sep_siblings_translation_classes
``int32 [*]``
A list, corresponding to *from_sep_s... | 62598fa056ac1b37e6302028 |
class SecureThreadedTCPServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer): <NEW_LINE> <INDENT> def __init__(self, server_address, config): <NEW_LINE> <INDENT> SocketServer.BaseServer.__init__(self, server_address, ThreadedTCPRequestHandler) <NEW_LINE> key_mgr = KeyManager('.') <NEW_LINE> key_mgr.create_keys() ... | Threaded TCP server using SSL encryption | 62598fa0097d151d1a2c0e67 |
class Score(db.Model): <NEW_LINE> <INDENT> __tablename__ = "scores" <NEW_LINE> score_id = db.Column(db.Integer, autoincrement=True, primary_key=True) <NEW_LINE> username = db.Column(db.String(64), nullable=True) <NEW_LINE> score = db.Column(db.Integer, nullable=False) <NEW_LINE> date = db.Column(db.DateTime, nullable=F... | Scores of Hangman. | 62598fa0d53ae8145f9182cb |
class CustomHandlebarsCompiler(HandlebarsCompiler): <NEW_LINE> <INDENT> def __call__(self, asset): <NEW_LINE> <INDENT> asset.attributes.path_without_suffix = asset.attributes.path_without_suffix.replace('templates/', '') <NEW_LINE> if re.search('<pre', asset.processed_source, re.I) is None: <NEW_LINE> <INDENT> asset.pr... | Handlebars compiler that strips template/ from the name | 62598fa0435de62698e9bc31 |
class UserSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = get_user_model() <NEW_LINE> fields = ('email', 'password', 'name') <NEW_LINE> extra_kwargs = {'password': {'write_only': True, 'min_length': 5}} <NEW_LINE> <DEDENT> def create(self, validated_data): <NEW_LINE>... | Serializer for user object | 62598fa01f5feb6acb162a60 |
class PHPApp(WebService): <NEW_LINE> <INDENT> php_root = "" <NEW_LINE> num_workers = 1 <NEW_LINE> def php_setup(self): <NEW_LINE> <INDENT> web_root = join(self.directory, self.php_root) <NEW_LINE> self.start_cmd = "uwsgi --protocol=http --plugin php -p {1} --force-cwd {0} --http-socket-modifier1 14 --php-index index.ht... | Class for PHP web apps | 62598fa0d268445f26639aa2 |
class FormatTest(VimivTestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> cls.init_test(cls, ["vimiv/"]) <NEW_LINE> <DEDENT> def test_format_files(self): <NEW_LINE> <INDENT> shutil.copytree("testimages/", "testimages_to_format/") <NEW_LINE> self.run_command("./testimages_to_f... | Test formatting files. | 62598fa056ac1b37e6302029 |
class NLLSequenceLoss(torch.nn.Module): <NEW_LINE> <INDENT> def __init__(self, w=[0.55, 0.45]): <NEW_LINE> <INDENT> super(NLLSequenceLoss, self).__init__() <NEW_LINE> self.criterion = torch.nn.NLLLoss(reduction='none', weight=torch.Tensor([0.8, 0.8, 0.8, 0.5]).cuda()) <NEW_LINE> <DEDENT> def forward(self, input, length... | Custom loss function.
Returns a loss that is the sum of all losses at each time step. | 62598fa0851cf427c66b8106 |
class ConfigPathsTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def test_venv(self): <NEW_LINE> <INDENT> venv = os.environ.get('VIRTUAL_ENV') <NEW_LINE> if venv: <NEW_LINE> <INDENT> self.assertIn(os.path.join(venv, 'openquake.cfg'), config.paths) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> logging.warning('To run t... | Make sure that the config path search logic is tested | 62598fa0442bda511e95c299 |
class Cleanup(object): <NEW_LINE> <INDENT> __slots__ = ( 'paths', ) <NEW_LINE> def __init__(self, root, buckets=spawn.BUCKETS): <NEW_LINE> <INDENT> self.paths = spawn.SpawnPaths(root, buckets) <NEW_LINE> fs.mkdir_safe(self.paths.cleanup_dir) <NEW_LINE> <DEDENT> def _nuke(self, scan_dir): <NEW_LINE> <INDENT> _LOGGER.deb... | Treadmill spawn cleanup. | 62598fa06aa9bd52df0d4d09 |
class _PandasPlotter: <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def create(cls, data): <NEW_LINE> <INDENT> if isinstance(data, pd.Series): <NEW_LINE> <INDENT> return _SeriesPlotter(data) <NEW_LINE> <DEDENT> elif isinstance(data, pd.DataFrame): <NEW_LINE> <INDENT> return _DataFramePlotter(data) <NEW_LINE> <DEDENT> els... | Base class for pandas plotting. | 62598fa097e22403b383ad4b |
class UITestCaseMixin: <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.assertTrue(hasattr(self, 'driver_path'), 'driver_path attribute must bet set for all classes inheriting from UITestCaseMixin.' ' Drivers can be downloaded at https://www.seleniumhq.org/download/') <NEW_LINE> self.assertTrue(hasattr(sel... | This class can be inherited by any TestCase Class with a defined driver_path and pom attributes
driver_path: refers to the path to the Chrome driver with the | 62598fa07d43ff2487427321 |
class MPMenuCallFileDialog(object): <NEW_LINE> <INDENT> def __init__(self, flags=None, title='Filename', wildcard='*.*'): <NEW_LINE> <INDENT> self.flags = flags or ('open',) <NEW_LINE> self.title = title <NEW_LINE> self.wildcard = wildcard <NEW_LINE> <DEDENT> def call(self): <NEW_LINE> <INDENT> from MAVProxy.modules.li... | used to create a file dialog callback | 62598fa063b5f9789fe84fb3 |
class OccurrenceManager(models.Manager.from_queryset(OccurrenceQuerySet), models.Manager, OccurrenceQuerySetMixin): <NEW_LINE> <INDENT> pass | Manager des récurrences d'événements | 62598fa057b8e32f5250803b |
class CollationDeleteTestCase(BaseTestGenerator): <NEW_LINE> <INDENT> scenarios = [ ('Fetch collation Node URL', dict(url='/browser/collation/obj/')) ] <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.schema_info = parent_node_dict["schema"][-1] <NEW_LINE> self.schema_name = self.schema_info["schema_name"] <NEW_LIN... | This class will delete added collation under schema node. | 62598fa021a7993f00c65dc2 |
class Tree(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.root = None <NEW_LINE> <DEDENT> def add(self, item): <NEW_LINE> <INDENT> node = Node(item) <NEW_LINE> if self.root is None: <NEW_LINE> <INDENT> self.root = node <NEW_LINE> return <NEW_LINE> <DEDENT> queue = [self.root] <NEW_LINE> while... | 二叉树 | 62598fa0379a373c97d98e55 |
class CaptialFilter(FilterBase): <NEW_LINE> <INDENT> def __init__( self, csv_path: str, category: str, indicator: str, frequency: TemporalFrequency): <NEW_LINE> <INDENT> super().__init__(csv_path=csv_path) <NEW_LINE> self.category = category <NEW_LINE> self.indicator = indicator <NEW_LINE> self.frequency = frequency <N... | Captial Filter. | 62598fa0cb5e8a47e493c095 |
class CompanyAddForm(Form): <NEW_LINE> <INDENT> name = StringField( "name", validators=[validators.DataRequired( "Please enter name." )] ) <NEW_LINE> web_page = StringField( "web_page", validators=[validators.DataRequired( "Please enter web site address." )] ) <NEW_LINE> address = TextAreaField( "address", validators=[... | Mail subject and text edit form. | 62598fa0a79ad16197769ea3 |
class EditorTabBar(QTabBar): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> QTabBar.__init__(self, parent) <NEW_LINE> self._startDragPosition = None <NEW_LINE> <DEDENT> def mousePressEvent(self, e): <NEW_LINE> <INDENT> if (e.buttons() & Qt.LeftButton): <NEW_LINE> <INDENT> self._startDragPositi... | A QTabBar with tabs that are both movable horizontally and drad-and-droppable by initiating the drag vertically. | 62598fa0a79ad16197769ea4 |
class ListManagerOrderView(ManagerOwnerMixin, ListAPIView): <NEW_LINE> <INDENT> from .serializers import OrderListSerializer <NEW_LINE> filter_fields = ('outlet', 'status') <NEW_LINE> serializer_class = OrderListSerializer <NEW_LINE> def filter_queryset(self, queryset): <NEW_LINE> <INDENT> from django.db.models import ... | get: Lists orders for Manager | 62598fa056b00c62f0fb26ef |
class VDFSerializationError(VDFError): <NEW_LINE> <INDENT> VDF_ERROR_MSG = "Unable to serialize the given data. :(" | Could not serialize the given data to VDF format. | 62598fa0e5267d203ee6b74c |
class ComputeNearestMean(BaseEstimator, TransformerMixin): <NEW_LINE> <INDENT> def __init__(self, window=5): <NEW_LINE> <INDENT> self.window = window <NEW_LINE> <DEDENT> def get_params(self, **kwargs): <NEW_LINE> <INDENT> return {'window': self.window} <NEW_LINE> <DEDENT> def fit(self, X, y): <NEW_LINE> <INDENT> X = X.... | Compute a mean price for similar vehicles.
| 62598fa055399d3f05626361 |
class BlobHandle(FileHandle): <NEW_LINE> <INDENT> def __init__(self, blob_service, container, blob, chunk_size): <NEW_LINE> <INDENT> super(BlobHandle, self).__init__() <NEW_LINE> self._blob_service = blob_service <NEW_LINE> self._container_name = container <NEW_LINE> self._blob_name = blob <NEW_LINE> self._chunk_size =... | File object for the Azure Blob files. | 62598fa0ac7a0e7691f7234a |
class TestIPIBaseNumberValid(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.ipi = special.ipi_base_number() <NEW_LINE> <DEDENT> def test_common(self): <NEW_LINE> <INDENT> code = 'I-000000229-7' <NEW_LINE> result = self.ipi.parseString(code)[0] <NEW_LINE> self.assertEqual('I-000000229-... | Tests that the IPI Base Number accepts and parses valid values. | 62598fa00a50d4780f705219 |
class TestSendMail(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> options = self.driver = webdriver.ChromeOptions() <NEW_LINE> options.add_experimental_option("prefs", {"credentials_enable_service": False, "profile.password_manager_enabled": False}) <NEW_LINE> self.driver = webdriver.Chrom... | 测试发送邮件 | 62598fa05f7d997b871f92ff |
class BulletinBoard(models.Model): <NEW_LINE> <INDENT> user = models.OneToOneField("UserProfile", null=True, blank=True, on_delete=models.CASCADE, related_name="bulletin_board_u") <NEW_LINE> organization = models.OneToOneField("Organization", null=True, blank=True, on_delete=models.CASCADE, related_name="bulletin_board... | 掲示板 スレッドの紐付け先 | 62598fa0090684286d5935fa |
class TinyMCE3x3ExampleMainWidget(TinyMCE2x2ExampleMainWidget): <NEW_LINE> <INDENT> plugin_uid = 'tinymce_memo_3x3' <NEW_LINE> cols = 3 <NEW_LINE> rows = 3 | Dummy2x2 plugin widget for Example layout (placeholder `main`). | 62598fa056ac1b37e630202b |
class Operation(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, } <NEW_LINE> def __init__( self, *, name: Optional[str] = None, display: Optional["OperationDisplay"] = None, **kwargs ): <NEW_LINE> <IND... | Microsoft.Resources operation.
:ivar name: Operation name: {provider}/{resource}/{operation}.
:vartype name: str
:ivar display: The object that represents the operation.
:vartype display: ~azure.mgmt.resource.links.v2016_09_01.models.OperationDisplay | 62598fa04527f215b58e9d23 |
class PethappyDogMedSpider(scrapy.Spider): <NEW_LINE> <INDENT> name = 'pethappy_dog_meds' <NEW_LINE> allowed_domains = ['https://www.pethappy.cl'] <NEW_LINE> start_urls = [ 'https://www.pethappy.cl/perros-2/medicamentos-2?page=%s' % page for page in range(1, 3) ] <NEW_LINE> def parse(self, response): <NEW_LINE> <INDENT... | Spider only for the dog med pages | 62598fa0be8e80087fbbee9f |
class Ellipsoid(BelongingChecker): <NEW_LINE> <INDENT> r <NEW_LINE> def __init__(): <NEW_LINE> <INDENT> pass | This checker will use the analytical representation of the ellipsoid to detect *inside*-*outside* status. | 62598fa021a7993f00c65dc4 |
class TemplateHUD(object): <NEW_LINE> <INDENT> BANNER_FONT_SIZE = 90 <NEW_LINE> SCORE_FONT_SIZE = 80 <NEW_LINE> TITLE_FONT_SIZE = 60 <NEW_LINE> HINT_FONT_SIZE = 30 <NEW_LINE> WHITE = (255, 255, 255) <NEW_LINE> BLACK = (0, 0, 0) <NEW_LINE> GRAY = (150, 150, 150) <NEW_LINE> ORANGE = (255, 132, 42) <NEW_LINE> CONTROLS_HIN... | This is a template of a HUD for the individual gamestates of the game.
It defines the rendering parameters - colors, fonts sizes, positions.
It also defines part of the update method which is to draw the controls
in the bottom left of the Display. | 62598fa057b8e32f5250803c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.