code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class ClouderBase(models.Model): <NEW_LINE> <INDENT> _inherit = 'clouder.base' <NEW_LINE> @api.multi <NEW_LINE> def deploy_build(self): <NEW_LINE> <INDENT> res = super(ClouderBase, self).deploy_build() <NEW_LINE> if self.application_id.type_id.name == 'mautic': <NEW_LINE> <INDENT> config_file = '/etc/nginx/sites-availa... | Add methods to manage the mautic specificities. | 62598f90ac7a0e7691f72142 |
class COLor(SCPINode, SCPIQuery, SCPISet): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> _cmd = "COLor" <NEW_LINE> args = ["1"] | SYSTem:LED:COLor
Arguments: 1 | 62598f90656771135c4892b6 |
class TbaVideosParser(ParserBase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def parse(self, html): <NEW_LINE> <INDENT> soup = BeautifulSoup(html, convertEntities=BeautifulSoup.HTML_ENTITIES) <NEW_LINE> videos = dict() <NEW_LINE> for a in soup.findAll("a", href=True): <NEW_LINE> <INDENT> parts = a["href"].split(".") ... | Facilitates building TBAVideos store from TBA. | 62598f90cad5886f8bdc4ea8 |
class ApproxQValue(nn.Module): <NEW_LINE> <INDENT> def __init__(self, input_size=4, output_size=2, activation: Callable[[Any], Any] = nn.functional.relu): <NEW_LINE> <INDENT> super(ApproxQValue, self).__init__() <NEW_LINE> hidden_size = int(np.ceil((input_size + output_size) / 2)) <NEW_LINE> self.fc1 = nn.Linear(input_... | Neural network that predicts the q-values for all actions for a given state. | 62598f90fbf16365ca793ce9 |
class AsyncCache: <NEW_LINE> <INDENT> cache: Dict[Hashable, Any] <NEW_LINE> lock: asyncio.Lock <NEW_LINE> def __init__(self) -> None: <NEW_LINE> <INDENT> self.cache = {} <NEW_LINE> self.lock = asyncio.Lock() <NEW_LINE> <DEDENT> async def _get_json( self, key: Tuple[str, str, Tuple[Tuple[str, str], ...]], ) -> Any: <NEW... | A cache for use with async functions. | 62598f9007d97122c42168e4 |
class Test(unittest.TestCase): <NEW_LINE> <INDENT> bucket = str(uuid.uuid4()) <NEW_LINE> payload = os.path.join(os.path.dirname(__file__), 'payload.json') <NEW_LINE> path = os.path.dirname(__file__) <NEW_LINE> s3path = 's3://%s/test' % bucket <NEW_LINE> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> c... | Test utilities for publishing data on AWS PDS | 62598f90a219f33f346c6452 |
@public <NEW_LINE> @implementer(IPendedKeyValue) <NEW_LINE> class PendedKeyValue(Model): <NEW_LINE> <INDENT> __tablename__ = 'pendedkeyvalue' <NEW_LINE> __table_args__ = (Index('ix_pendedkeyvalue_value', 'value', mysql_length=100), ) <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> key = Column(SAUnicode, i... | A pended key/value pair, tied to a token. | 62598f903539df3088ecbef6 |
class FilesCommentsEditResponse(BaseResponse): <NEW_LINE> <INDENT> comment = ModelField(model_class=FileComment) | Response for :meth:`~aioslackbot.FilesCommentsModule.edit`. | 62598f90dc8b845886d531f4 |
class TimeTracker(object): <NEW_LINE> <INDENT> query_timers = {} <NEW_LINE> @classmethod <NEW_LINE> def start_timing(cls, name): <NEW_LINE> <INDENT> cls.query_timers[name] = 0.0 <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def get_query_times(cls, name): <NEW_LINE> <INDENT> return cls.query_timers.get(name, 0.0) <NEW_LI... | Context manager to track separatly total time that some request took
and time spent on rpc queries.
Example::
with TimeTracker('my-code-block') as t:
product = db._product_product.serch_records([], limit=400000)
print("Query time: %s, Total time: %s" % (p.query_time,
... | 62598f908e71fb1e983bb6eb |
class Enemy: <NEW_LINE> <INDENT> def __init__(self, x, y, d, t): <NEW_LINE> <INDENT> self.posx = x <NEW_LINE> self.posy = y <NEW_LINE> self.dir = d <NEW_LINE> self.time = t <NEW_LINE> <DEDENT> def get_x(self): <NEW_LINE> <INDENT> return self.posx <NEW_LINE> <DEDENT> def get_y(self): <NEW_LINE> <INDENT> return self.posy | enemy class | 62598f90435de62698e9ba29 |
class ConfigUtils(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def read(path): <NEW_LINE> <INDENT> with open(path, "r") as f: <NEW_LINE> <INDENT> content = f.read() <NEW_LINE> config = content.replace("${%s}" % SCHEDULER_HOME, os.environ[SCHEDULER_HOME]) <NEW_LINE> <DEDENT> return yaml.load(config) <NEW_LINE> ... | ConfigUtils object that provides methods for read and write yaml configuration files. | 62598f906fb2d068a7693c4d |
@attr.s(auto_attribs=True, frozen=True) <NEW_LINE> class For(Stmt): <NEW_LINE> <INDENT> lhs: Pattern <NEW_LINE> rhs: Expr <NEW_LINE> body: Block | A for statement.
Example
-------
.. code-block:: python
for x in range(2):
pass
Here :code:`lhs` will be :code:`x`, :code:`rhs` will be :code:`range(2)`,
and :code:`body` will be :code:`pass`. | 62598f9091af0d3eaad39a3b |
class TabsExtraSortCommand(sublime_plugin.WindowCommand): <NEW_LINE> <INDENT> def run(self, group=-1, sort_by=None, reverse=False): <NEW_LINE> <INDENT> if sort_by is not None: <NEW_LINE> <INDENT> if group == -1: <NEW_LINE> <INDENT> group = self.window.active_group() <NEW_LINE> <DEDENT> self.group = group <NEW_LINE> sel... | Sort tabs. | 62598f908da39b475be02e18 |
class LightSensorError(Exception): <NEW_LINE> <INDENT> pass | Base class for exceptions in this module. | 62598f90a79ad16197769c96 |
class VlanInterface(object): <NEW_LINE> <INDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return bool(other.name == self.name) <NEW_LINE> <DEDENT> def __ne__(self, other): <NEW_LINE> <INDENT> return not self.__eq__(other) <NEW_LINE> <DEDENT> @property <NEW_LINE> def qos(self): <NEW_LINE> <INDENT> if isinstance(self... | VlanInterface is a dynamic class generated by collections referencing
interfaces with vlan interfaces. The inheriting class for a VlanInterface
is dependent on the parent interface. | 62598f9076d4e153a661c853 |
class AlphaAngleTransferEntropy(AlphaAngleBaseMetric, TransferEntropyBase): <NEW_LINE> <INDENT> pass | Mutual information calculations for alpha angles | 62598f90498bea3a75a57760 |
class Isl(Package): <NEW_LINE> <INDENT> homepage = "http://isl.gforge.inria.fr" <NEW_LINE> url = "http://isl.gforge.inria.fr/isl-0.14.tar.bz2" <NEW_LINE> version('0.14', 'acd347243fca5609e3df37dba47fd0bb') <NEW_LINE> depends_on("gmp") <NEW_LINE> def install(self, spec, prefix): <NEW_LINE> <INDENT> configure("--pre... | isl is a thread-safe C library for manipulating sets and
relations of integer points bounded by affine constraints. | 62598f90851cf427c66b7efb |
class RandomRegularLanguageGenerator(BaseGenerator): <NEW_LINE> <INDENT> distribution_type = DiscreteRandomVariable | Based off the "Recursive RGA" algorithm described in Bernardi & Giménez,
"A Linear Algorithm for the Random Generation of Regular Languages"
Algorithmica. February 2012, Volume 62, Issue 1, pp 130–145
Preprint available at: http://people.brandeis.edu/~bernardi/publications/regular-sampling.pdf
The idea is to precompu... | 62598f90442bda511e95c09a |
class HTTPFactory(protocol.ServerFactory): <NEW_LINE> <INDENT> protocol = _genericHTTPChannelProtocolFactory <NEW_LINE> logPath = None <NEW_LINE> timeOut = _REQUEST_TIMEOUT <NEW_LINE> def __init__(self, logPath=None, timeout=_REQUEST_TIMEOUT, logFormatter=None, reactor=None): <NEW_LINE> <INDENT> if not reactor: <NEW_LI... | Factory for HTTP server.
@ivar _logDateTime: A cached datetime string for log messages, updated by
C{_logDateTimeCall}.
@type _logDateTime: C{str}
@ivar _logDateTimeCall: A delayed call for the next update to the cached
log datetime string.
@type _logDateTimeCall: L{IDelayedCall} provided
@ivar _logFormatter... | 62598f9085dfad0860cbf88e |
class TPLinkProperty(Property): <NEW_LINE> <INDENT> def __init__(self, device, name, description, value): <NEW_LINE> <INDENT> Property.__init__(self, device, name, description) <NEW_LINE> self.set_cached_value(value) | TP-Link property type. | 62598f9045492302aabfc10f |
class _TestCookieHeaders(object): <NEW_LINE> <INDENT> def __init__(self, headers): <NEW_LINE> <INDENT> self.headers = headers <NEW_LINE> <DEDENT> def getheaders(self, name): <NEW_LINE> <INDENT> headers = [] <NEW_LINE> name = name.lower() <NEW_LINE> for k, v in self.headers: <NEW_LINE> <INDENT> if k.lower() == name: <NE... | A headers adapter for cookielib
| 62598f90656771135c4892b8 |
class IndexView(Admin2Mixin, generic.TemplateView): <NEW_LINE> <INDENT> default_template_name = "index.html" <NEW_LINE> registry = None <NEW_LINE> apps = None <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> data = super(IndexView, self).get_context_data(**kwargs) <NEW_LINE> data.update({ 'apps': se... | Context Variables
:apps: A dictionary of apps, each app being a dictionary with keys
being models and the value being djadmin2.types.ModelAdmin2
objects.
:request.user: The user object representing the current user.
| 62598f9076e4537e8c3ef1e9 |
class SVC(SparseBaseLibSVM, ClassifierMixin): <NEW_LINE> <INDENT> def __init__(self, C=1.0, kernel='rbf', degree=3, gamma=0.0, coef0=0.0, shrinking=True, probability=False, tol=1e-3, cache_size=200, scale_C=True, class_weight=None): <NEW_LINE> <INDENT> super(SVC, self).__init__('c_svc', kernel, degree, gamma, coef0, to... | SVC for sparse matrices (csr).
See :class:`sklearn.svm.SVC` for a complete list of parameters
Notes
-----
For best results, this accepts a matrix in csr format
(scipy.sparse.csr), but should be able to convert from any array-like
object (including other sparse representations).
Examples
--------
>>> import numpy as ... | 62598f906e29344779b00290 |
class Scalar(Serializable): <NEW_LINE> <INDENT> yaml_tag = "!Scalar" <NEW_LINE> @serializable_init <NEW_LINE> @register_xnmt_handler <NEW_LINE> def __init__(self, initial: numbers.Real = 0.0, times_updated: numbers.Integral = 0) -> None: <NEW_LINE> <INDENT> self.initial = initial <NEW_LINE> self.times_updated = times_u... | Scalar class for hyper parameter that support 1 value serialization.
This class is actually a base class and does not have any different with simple python float/int.
Args:
initial: The value being hold by the scalar.
times_updated: Is the epoch number. | 62598f90fbf16365ca793ceb |
class UnsupervisedLstm(BaseRnn, rnn.UnsupervisedLstmRecurrentNetwork, UnsupervisedBrezeWrapperBase, TransformBrezeWrapperMixin): <NEW_LINE> <INDENT> transform_expr_name = 'output' | Class implementing recurrent neural networks with LSTM cells for
unsupervised learning.
The class inherits from breze's RecurrentNetwork class and adds several
sklearn like methods. | 62598f908da39b475be02e19 |
class MainWindow(ApplicationWindow): <NEW_LINE> <INDENT> def __init__(self, **traits): <NEW_LINE> <INDENT> super(MainWindow, self).__init__(**traits) <NEW_LINE> self.menu_bar_manager = MenuBarManager( MenuManager( Action(name='E&xit', on_perform=self.close), name = '&File', ) ) <NEW_LINE> return <NEW_LINE> <DEDENT> def... | The main application window. | 62598f90d53ae8145f9180c5 |
class EditionView(FormMixin, TemplateView): <NEW_LINE> <INDENT> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> form_class = self.get_form_class() <NEW_LINE> form = self.get_form(form_class) <NEW_LINE> if form.is_valid(): <NEW_LINE> <INDENT> return self.form_valid(form) <NEW_LINE> <DEDENT> else: <NEW_LINE>... | Parse the incoming request from BERG Cloud
and respond with edition content
Satisfies:
http://remote.bergcloud.com/developers/reference/edition | 62598f9030dc7b766599f494 |
class ModelEmbeddings(nn.Module): <NEW_LINE> <INDENT> def __init__(self, embed_size, vocab): <NEW_LINE> <INDENT> super(ModelEmbeddings, self).__init__() <NEW_LINE> self.embed_size = embed_size <NEW_LINE> self.source = None <NEW_LINE> self.target = None <NEW_LINE> src_pad_token_idx = vocab.src['<pad>'] <NEW_LINE> tgt_pa... | Class that converts input words to their embeddings. | 62598f90004d5f362081ee18 |
class CatenateZipArchive(Command): <NEW_LINE> <INDENT> def __init__(self, archive, **kwargs): <NEW_LINE> <INDENT> self.archive = archive <NEW_LINE> Command.__init__(self, 'zipmerge', [archive], **kwargs) <NEW_LINE> <DEDENT> def __call__(self, target): <NEW_LINE> <INDENT> self.run_error = 'Couldn\'t append "%s" to "%s":... | Wrap zipmerge tool to catenate a zip file with the next | 62598f901f037a2d8b9e3d18 |
class ListHubVirtualNetworkConnectionsResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[HubVirtualNetworkConnection]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, value: Optional[List["HubVirtualNetworkConnection"]] =... | List of HubVirtualNetworkConnections and a URL nextLink to get the next set of results.
:param value: List of HubVirtualNetworkConnections.
:type value: list[~azure.mgmt.network.v2018_10_01.models.HubVirtualNetworkConnection]
:param next_link: URL to get the next set of operation list results if there are any.
:type n... | 62598f90d58c6744b42dc0ea |
class Bullet(GameEntity): <NEW_LINE> <INDENT> SIZE = .2 <NEW_LINE> BASE_SPEED = 40 <NEW_LINE> def __init__(self, game, resource_mgr): <NEW_LINE> <INDENT> self.bullet_image = pygame.image.load('entities/bullet/bullet.png').convert_alpha() <NEW_LINE> GameEntity.__init__(self, game, "bullet", self.bullet_image, resource_m... | Bullet is fired from the Survivor when attacking. | 62598f9045492302aabfc110 |
class PathLink(Path): <NEW_LINE> <INDENT> def __init__(self, x, y, points=(), next_path=None, next_speed=None, next_accel=None, next_decel=None, next_loop=0, z=0, visible=False, tangible=False, **kwargs): <NEW_LINE> <INDENT> super(PathLink, self).__init__( x, y, points=points, z=z, visible=visible, tangible=tangible, *... | Class for path links. Path links are just like normal paths, but
can be linked to other path links or paths to form chains.
By using a chain of path links, you can cause an object to move in
different ways at different points of the path. For example, you
can cause the object to change its speed, or you can cause it... | 62598f90f7d966606f747c1b |
class PumpScheduler(object): <NEW_LINE> <INDENT> def __init__(self, local_clock, sleep_windows): <NEW_LINE> <INDENT> self._local_clock = local_clock <NEW_LINE> self._sleep_windows = sleep_windows <NEW_LINE> <DEDENT> def is_running_pump_allowed(self): <NEW_LINE> <INDENT> current_time = self._local_clock.now().time() <NE... | Controls when the pump is allowed to run. | 62598f90cb5e8a47e493bf8e |
class Link(models.Model): <NEW_LINE> <INDENT> STATUS_NORMAL = 1 <NEW_LINE> STATUS_DELETE = 0 <NEW_LINE> STATUS_ITEMS = ( (STATUS_NORMAL, '正常'), (STATUS_DELETE, '删除') ) <NEW_LINE> title = models.CharField(max_length=50, verbose_name='标题') <NEW_LINE> href = models.URLField(verbose_name='链接') <NEW_LINE> status = models.Po... | 友链表 | 62598f90f7d966606f747c1c |
class DatabaseConnectorTestSuite(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.connector = src.databaseAPI.databaseConnector.Connector <NEW_LINE> <DEDENT> def testGetConnectionForRealConnection(self): <NEW_LINE> <INDENT> self.assertIsNotNone(self.connector.getConnection()) | Testing the databaseConnector component in the databaseAPI module
| 62598f90a8ecb03325870e3f |
class ExecuteInOrder(Module): <NEW_LINE> <INDENT> def update_upstream(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def compute(self): <NEW_LINE> <INDENT> for _, connectorList in sorted(self.inputPorts.iteritems()): <NEW_LINE> <INDENT> for connector in connectorList: <NEW_LINE> <INDENT> connector.obj.update() <NE... | Allows the user to control which sink of a pair of sinks ought to be
executed first.
Connect the "self" port of each sink to the corresponding port.
Note that if you have more than two sinks, you can string them together by
using a string of ExecuteInOrder modules. | 62598f9007f4c71912baf083 |
class FeatureMatrix(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(FeatureMatrix, self).__init__() <NEW_LINE> self.matrix = self._load_matrix() <NEW_LINE> self.user_list = self._load_list() <NEW_LINE> <DEDENT> def _load_matrix(self): <NEW_LINE> <INDENT> placeholder = np.array([[0.2, 0.1, 0.9... | docstring for FeatureMatrix | 62598f907d847024c075c00b |
class InputParser(BaseParser): <NEW_LINE> <INDENT> media_type = 'application/vnd.contentful.management.v1+json' <NEW_LINE> def parse(self, stream, media_type=None, parser_context=None): <NEW_LINE> <INDENT> return stream | parsing the custom content type to json format | 62598f904428ac0f6e658162 |
class RelationshipPostMakesNoChanges(Exception): <NEW_LINE> <INDENT> pass | Raised when a post is on a relationship that already exists, so view can return a 204 | 62598f90442bda511e95c09c |
class BaseDeleteView(DeleteView): <NEW_LINE> <INDENT> pass | This is a base class for all DeleteView pages used within the Street Art project. | 62598f90009cb60464d01169 |
class MXCURPField(RegexField): <NEW_LINE> <INDENT> default_error_messages = { 'invalid': _('Enter a valid CURP.'), 'invalid_checksum': _('Invalid checksum for CURP.'), } <NEW_LINE> def __init__(self, min_length=18, max_length=18, *args, **kwargs): <NEW_LINE> <INDENT> states_re = r'(AS|BC|BS|CC|CL|CM|CS|CH|DF|DG|GT|GR|H... | A field that validates a Mexican Clave Única de Registro de Población.
The CURP is integrated by a juxtaposition of characters following the next
pattern:
===== ====== ===================================================
Index Format Accepted Characters
===== ====== ==================================... | 62598f908e7ae83300ee8cde |
class SettingsTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> settings.Settings._file = self._file = helper.tmp_path('settings') <NEW_LINE> settings.Settings.load_dot_cola = lambda x, y: {} <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> if os.path.exists(self._file): <... | Tests the cola.settings module | 62598f9038b623060ffa8cc3 |
class WshopMiddleware(object): <NEW_LINE> <INDENT> def process_request(self, request): <NEW_LINE> <INDENT> request.shop = get_shop(request) <NEW_LINE> if not request.shop: <NEW_LINE> <INDENT> raise ImproperlyConfigured(_("No shop!")) | Handle Wshop specific tasks for each request and response.
* Sets the current shop according to the host name
``request.shop`` : :class:`wshop.core.models.Shop`
Currently active Shop. | 62598f9045492302aabfc111 |
@Metric.register("drop") <NEW_LINE> class DropEmAndF1(Metric): <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> self._total_em = 0.0 <NEW_LINE> self._total_f1 = 0.0 <NEW_LINE> self._count = 0 <NEW_LINE> <DEDENT> @overrides <NEW_LINE> def __call__(self, prediction: Union[str, List], ground_truths: Lis... | This :class:`Metric` takes the best span string computed by a model, along with the answer
strings labeled in the data, and computes exact match and F1 score using the official DROP
evaluator (which has special handling for numbers and for questions with multiple answer spans,
among other things). | 62598f9024f1403a926856cd |
class TestUser(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.new_user = User("Kellen", "Njoroge", "boo98") <NEW_LINE> self.new_user = User("Kellen", "Njoroge", "boo98") <NEW_LINE> <DEDENT> def test__init__(self): <NEW_LINE> <INDENT> self.assertEqual(self.new_user.first_name, "Kellen"... | Test class that defines test cases for the user class behaviours.
Args:
unittest.TestCase: helps in creating test cases | 62598f904e4d56256637205a |
class ZuulRole(Role): <NEW_LINE> <INDENT> def __init__(self, target_name, project_canonical_name, implicit=False): <NEW_LINE> <INDENT> super(ZuulRole, self).__init__(target_name) <NEW_LINE> self.project_canonical_name = project_canonical_name <NEW_LINE> self.implicit = implicit <NEW_LINE> <DEDENT> def __repr__(self): <... | A reference to an ansible role in a Zuul project. | 62598f90b57a9660fecd16ba |
class StatsQuery(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.solr = False <NEW_LINE> self.solr_connect() <NEW_LINE> self.solr_response = False <NEW_LINE> self.stats_fields = [] <NEW_LINE> self.q = '*:*' <NEW_LINE> self.q_op = 'AND' <NEW_LINE> self.fq = [] <NEW_LINE> <DEDENT> def solr_connect(sel... | Methods to get stats information
for 1 or more fields from Solr.
This is useful in composing queries for
numeric range facets where we don't know
the min or max of the filtered set | 62598f907b25080760ed70ea |
class HstBATCHUPLOAD(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'hstBATCHUPLOAD' <NEW_LINE> id = db.Column(db.Integer(15, unsigned=True), nullable=False, primary_key=True, autoincrement=True) <NEW_LINE> user = db.Column(db.String(50), nullable=False, index=True) <NEW_LINE> submitdate = db.Column(db.DateTime, nullab... | Represents a HstBATCHUPLOAD record. | 62598f906e29344779b00292 |
class TypeSystem(object): <NEW_LINE> <INDENT> content_type = None <NEW_LINE> database = None <NEW_LINE> python = None | Abstract base class for plugabble database type systems. | 62598f909b70327d1c57e9db |
class Place(BaseModel): <NEW_LINE> <INDENT> city_id = "" <NEW_LINE> user_id = "" <NEW_LINE> name = "" <NEW_LINE> description = "" <NEW_LINE> number_rooms = 0 <NEW_LINE> number_bathrooms = 0 <NEW_LINE> max_guest = 0 <NEW_LINE> price_by_night = 0 <NEW_LINE> latitude = 0.0 <NEW_LINE> longitude = 0.0 <NEW_LINE> amenity_ids... | new class | 62598f90596a8972361278b5 |
class LanguagesSetting(dict): <NEW_LINE> <INDENT> def get_language(self, language_code, site_id=None): <NEW_LINE> <INDENT> if site_id is None: <NEW_LINE> <INDENT> site_id = getattr(settings, 'SITE_ID', None) <NEW_LINE> <DEDENT> for lang_dict in self.get(site_id, ()): <NEW_LINE> <INDENT> if lang_dict['code'] == language... | The languages settings dictionary, with extra methods attached. | 62598f902ae34c7f260aad24 |
class archipack_slab_child(PropertyGroup): <NEW_LINE> <INDENT> child_name : StringProperty() <NEW_LINE> idx : IntProperty() <NEW_LINE> def get_child(self, context): <NEW_LINE> <INDENT> d = None <NEW_LINE> child = context.scene.objects.get(self.child_name.strip()) <NEW_LINE> if child is not None and child.data is not No... | Store child fences to be able to sync | 62598f900c0af96317c55fbf |
class TestAptSrcPreserve(TestAptSrcAbs): <NEW_LINE> <INDENT> conf_file = "examples/tests/apt_source_preserve.yaml" <NEW_LINE> boot_cloudconf = None <NEW_LINE> def test_preserved_source_list(self): <NEW_LINE> <INDENT> self.check_file_regex("sources.list", r"this file is written by cloud-init") <NEW_LINE> <DEDENT> def te... | TestAptSrcPreserve - tests valid in the preserved sources.list case | 62598f9096565a6dacd2cd97 |
class charMask: <NEW_LINE> <INDENT> _slots__ = ['name', 'regex', 'generated_space'] <NEW_LINE> def __init__(self, maskchar, chartocover): <NEW_LINE> <INDENT> if maskchar != "": <NEW_LINE> <INDENT> char_class = get_char_class_from_mask_char(maskchar) <NEW_LINE> <DEDENT> elif chartocover != "": <NEW_LINE> <INDENT> char_c... | Mask object for a single char --> charclass character to charclass, or char to charclass | 62598f90f7d966606f747c1d |
class UPNPEntry(object): <NEW_LINE> <INDENT> DESCRIPTION_CACHE = {'_NO_LOCATION': {}} <NEW_LINE> def __init__(self, values): <NEW_LINE> <INDENT> self.values = values <NEW_LINE> self.created = datetime.now() <NEW_LINE> if 'cache-control' in self.values: <NEW_LINE> <INDENT> cache_seconds = int(self.values['cache-control'... | Found uPnP entry. | 62598f90d4950a0f3b110c55 |
class RepositoryTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.testRepository = repository.Repository(2) <NEW_LINE> <DEDENT> def testInstantiateRep200(self): <NEW_LINE> <INDENT> testRepository = repository.Repository(200) <NEW_LINE> <DEDENT> def testGetNumberComponents(self): <NE... | Class created to test the Repository class | 62598f9091af0d3eaad39a3f |
class RatingDecisionIssueEditProposed(forms.ModelForm): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(RatingDecisionIssueEditProposed, self).__init__(*args, **kwargs) <NEW_LINE> self.helper = FormHelper(form=self) <NEW_LINE> self.helper.layout = Layout( Div( Div(Field('proposed_lt')... | Edit the description field of the issuer. | 62598f9063b5f9789fe84db0 |
class CifarImageDataGenerator(keras.utils.Sequence): <NEW_LINE> <INDENT> def __init__(self, list_IDs=None,batch_size=32,img_row=32,img_col=32,shuffle=True): <NEW_LINE> <INDENT> self.batch_size = batch_size <NEW_LINE> self.list_IDs = list_IDs <NEW_LINE> self.img_row = img_row <NEW_LINE> self.img_col = img_col <NEW_LINE>... | Generates data for Keras | 62598f903617ad0b5ee05d85 |
class ColorFabUI(bpy.types.Panel): <NEW_LINE> <INDENT> bl_label = "ColorFab Panel" <NEW_LINE> bl_space_type = 'VIEW_3D' <NEW_LINE> bl_region_type = 'TOOLS' <NEW_LINE> def draw(self, context): <NEW_LINE> <INDENT> layout = self.layout <NEW_LINE> row = layout.row() <NEW_LINE> row.label(text="Load file") <NEW_LINE> split =... | Creates a Custom Panel to Load and Save File, and Voxelize Models | 62598f90d486a94d0ba2bc0e |
class FilterImage(Median): <NEW_LINE> <INDENT> title = 'Filter image' <NEW_LINE> para = {'size': 5} <NEW_LINE> def load(self, ips): <NEW_LINE> <INDENT> super().load(ips) <NEW_LINE> ips.data = DuplicateNoGUI.copy(ips, ips.title) <NEW_LINE> ips.title = ips.title + '-filtered' <NEW_LINE> return True <NEW_LINE> <DEDENT> de... | Median filtering of the current image. | 62598f900a50d4780f70500f |
class IPMapping(ndb.Model): <NEW_LINE> <INDENT> ip_address = ndb.StringProperty(required=True, indexed=True) <NEW_LINE> short_url = ndb.StructuredProperty(ShortURLs, required=True) <NEW_LINE> created = ndb.DateTimeProperty(auto_now=True) | Stores IP-UID mapping. | 62598f90a79ad16197769c9a |
class RotatingHandler(logging.handlers.RotatingFileHandler): <NEW_LINE> <INDENT> def _open(self): <NEW_LINE> <INDENT> if not os.path.exists(self.baseFilename): <NEW_LINE> <INDENT> f = open(self.baseFilename, 'w') <NEW_LINE> try: <NEW_LINE> <INDENT> os.chmod(self.baseFilename, 0o644) <NEW_LINE> <DEDENT> except OSError a... | We are creating a file and set it to append mode | 62598f900fa83653e46f4b24 |
class ClosedBallotManager(models.Manager): <NEW_LINE> <INDENT> def get_query_set(self): <NEW_LINE> <INDENT> return super( ClosedBallotManager, self).get_query_set().filter( closes__gt=timezone.now()) | Custom version manager that shows only closed ballots. | 62598f904428ac0f6e658164 |
class STOP_ID(object): <NEW_LINE> <INDENT> pass | The identifier that stops all event reactors | 62598f90dd821e528d6d8b70 |
class ntp: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.running = False <NEW_LINE> self.hosts = set() <NEW_LINE> self.currenttime = "" <NEW_LINE> self.errormsg = None | class: ntp | 62598f900c0af96317c55fc0 |
class Solution: <NEW_LINE> <INDENT> def backPackII(self, m, A, V): <NEW_LINE> <INDENT> n = len(A) <NEW_LINE> dp = [[0] * (m + 1), [0] * (m + 1)] <NEW_LINE> for i in range(1, n + 1): <NEW_LINE> <INDENT> dp[i % 2][0] = 0 <NEW_LINE> for j in range(1, m + 1): <NEW_LINE> <INDENT> dp[i % 2][j] = dp[(i - 1) % 2][j] <NEW_LINE>... | @param m: An integer m denotes the size of a backpack
@param A: Given n items with size A[i]
@param V: Given n items with value V[i]
@return: The maximum value | 62598f90be8e80087fbbec98 |
@CommandProvider <NEW_LINE> class Introspection(MachCommandBase): <NEW_LINE> <INDENT> @Command('compileflags', category='devenv', description='Display the compilation flags for a given source file') <NEW_LINE> @CommandArgument('what', default=None, help='Source file to display compilation flags for') <NEW_LINE> def com... | Instropection commands. | 62598f9038b623060ffa8cc5 |
class Segno(RepeatExpressionMarker): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> RepeatExpressionMarker.__init__(self) <NEW_LINE> self._textAlternatives = ['Segno'] <NEW_LINE> self.setText(self._textAlternatives[0]) <NEW_LINE> self.useSymbol = True | The segno sign as placed in a score.
>>> rm = repeat.Segno()
>>> rm.useSymbol
True | 62598f90b5575c28eb712aea |
class NpyScpReader(collections.abc.Mapping): <NEW_LINE> <INDENT> def __init__(self, fname: Union[Path, str]): <NEW_LINE> <INDENT> assert check_argument_types() <NEW_LINE> self.fname = Path(fname) <NEW_LINE> self.data = read_2column_text(fname) <NEW_LINE> <DEDENT> def get_path(self, key): <NEW_LINE> <INDENT> return self... | Reader class for a scp file of numpy file.
Examples:
key1 /some/path/a.npy
key2 /some/path/b.npy
key3 /some/path/c.npy
key4 /some/path/d.npy
...
>>> reader = NpyScpReader('npy.scp')
>>> array = reader['key1'] | 62598f90eab8aa0e5d30b9bb |
class RestSensor(RestEntity, SensorEntity): <NEW_LINE> <INDENT> def __init__( self, coordinator, rest, name, unit_of_measurement, device_class, state_class, value_template, json_attrs, force_update, resource_template, json_attrs_path, ): <NEW_LINE> <INDENT> super().__init__(coordinator, rest, name, resource_template, f... | Implementation of a REST sensor. | 62598f90ac7a0e7691f72148 |
class ForumThreadDeleteForm(forms.Form): <NEW_LINE> <INDENT> confirm = forms.BooleanField(widget=forms.CheckboxInput, label=_('I really want to delete this thread'), error_messages={'required': _('You must check the box to confirm the deletion.')}) <NEW_LINE> def save(self, thread): <NEW_LINE> <INDENT> thread.deleted_a... | Deletion confirmation form for a thread. | 62598f90e76e3b2f99fd8672 |
class NetError(BaseIpwhoisException): <NEW_LINE> <INDENT> pass | An Exception for when a parameter provided is not an instance of
ipwhois.net.Net. | 62598f9076e4537e8c3ef1ed |
class V2MarkerItemHeader(BiopacHeader): <NEW_LINE> <INDENT> def __init__(self, file_revision, byte_order_char, **kwargs): <NEW_LINE> <INDENT> super().__init__(self.__h_elts, file_revision, byte_order_char, **kwargs) <NEW_LINE> <DEDENT> @property <NEW_LINE> def __h_elts(self): <NEW_LINE> <INDENT> return VersionedHeaderS... | Marker Items for files in Version 3, very likely down to version 2. | 62598f90c432627299fa2c0c |
class NativeBedReader(genomics_reader.GenomicsReader): <NEW_LINE> <INDENT> def __init__(self, input_path, num_fields=0): <NEW_LINE> <INDENT> super(NativeBedReader, self).__init__() <NEW_LINE> bed_path = input_path.encode('utf8') <NEW_LINE> if bed_path.endswith('.gz'): <NEW_LINE> <INDENT> options = bed_pb2.BedReaderOpti... | Class for reading from native BED files.
Most users will want to use BedReader instead, because it dynamically
dispatches between reading native BED files and TFRecord files based on the
filename's extension. | 62598f90d7e4931a7ef3bcde |
class ExtractImagePatches(tf.test.TestCase): <NEW_LINE> <INDENT> def _VerifyValues(self, image, ksizes, strides, rates, padding, patches): <NEW_LINE> <INDENT> ksizes = [1] + ksizes + [1] <NEW_LINE> strides = [1] + strides + [1] <NEW_LINE> rates = [1] + rates + [1] <NEW_LINE> with self.test_session(use_gpu=True): <NEW_L... | Functional tests for ExtractImagePatches op. | 62598f904e696a045264dc26 |
class MCNAB2(MultistepIMEX): <NEW_LINE> <INDENT> amax = 2 <NEW_LINE> bmax = 2 <NEW_LINE> cmax = 2 <NEW_LINE> @classmethod <NEW_LINE> def compute_coefficients(self, timesteps, iteration): <NEW_LINE> <INDENT> if iteration < 1: <NEW_LINE> <INDENT> return SBDF1.compute_coefficients(timesteps, iteration) <NEW_LINE> <DEDENT>... | 2nd-order modified Crank-Nicolson Adams-Bashforth scheme [Wang 2008 eqn 2.10]
Implicit: 2nd-order modified Crank-Nicolson
Explicit: 2nd-order Adams-Bashforth | 62598f900c0af96317c55fc1 |
class Corpus(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__corpus = diretorio_em_lista() <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return str(self.corpus) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return 'Corpus()' <NEW_LINE> <DEDENT> def __len__(self): <... | Classe responsável por armazenar um conjunto de documentos de texto de um determinado
diretório | 62598f90dc8b845886d531fa |
class GraphitePublisher(Publisher): <NEW_LINE> <INDENT> def __init__(self, host, port, failed_tests_counter='failed', passed_tests_counter='passed', prefix='alarmageddon', priority_threshold=None): <NEW_LINE> <INDENT> if not host: <NEW_LINE> <INDENT> raise ValueError("host parameter is required") <NEW_LINE> <DEDENT> su... | A Publisher that sends results to Graphite.
Logs the number of successes and failures, and potentially logs how long a
validation takes.
:param host: The graphite host.
:param port: The port that graphite is listening on.
:param failed_tests_counter: Name of the graphite counter for failed tests.
:param passed_tests_... | 62598f908e71fb1e983bb6f0 |
class Threshold(object): <NEW_LINE> <INDENT> __slots__ = ( 'fd', 'threshold', '_iocbuf', ) <NEW_LINE> def __init__(self, fd, threshold=1024): <NEW_LINE> <INDENT> self.fd = fd <NEW_LINE> self.threshold = threshold <NEW_LINE> self._iocbuf = array.array('i', [0]) <NEW_LINE> <DEDENT> def readable(self): <NEW_LINE> <INDENT>... | Class that indicates whether a file descriptor has reached a
threshold of readable bytes available.
This class is not thread-safe. | 62598f908c0ade5d55dc34ab |
class DfpPackerTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.packer = googleads.dfp._DfpPacker <NEW_LINE> <DEDENT> def testPackDate(self): <NEW_LINE> <INDENT> input_date = datetime.date(2017, 1, 2) <NEW_LINE> result = self.packer.Pack(input_date) <NEW_LINE> self.assertEqual(resu... | Tests for the googleads.dfp._DfpPacker class. | 62598f90f7d966606f747c1f |
class TestAccessNestedMap(TestCase): <NEW_LINE> <INDENT> @parameterized.expand([ ({'a': 1}, ('a',), 1), ({'a': {'b': 2}}, ('a',), {'b': 2}), ({'a': {'b': 2}}, ('a', 'b'), 2) ]) <NEW_LINE> def test_access_nested_map(self, map, path, expected): <NEW_LINE> <INDENT> actual = access_nested_map(map, path) <NEW_LINE> self.ass... | Testing access_nested_map | 62598f903539df3088ecbefc |
class Oper(A10BaseClass): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.ERROR_MSG = "" <NEW_LINE> self.b_key = "oper" <NEW_LINE> self.DeviceProxy = "" <NEW_LINE> self.use_gslb_state = "" <NEW_LINE> self.gslb_protocol = "" <NEW_LINE> self.ip = "" <NEW_LINE> self.dynamic = "" <NEW_LINE> self.... | This class does not support CRUD Operations please use parent.
:param use_gslb_state: {"type": "number", "format": "number"}
:param gslb_protocol: {"type": "number", "format": "number"}
:param ip: {"minLength": 1, "maxLength": 63, "type": "string", "format": "string"}
:param dynamic: {"type": "number", "format": "numb... | 62598f90b7558d589546326b |
class FloatField(Field): <NEW_LINE> <INDENT> __slots__ = ('value', 'required', 'default', 'validators') <NEW_LINE> def __init__(self, required=False, low=None, high=None, default=None, validators=None): <NEW_LINE> <INDENT> validators = validators or [] <NEW_LINE> if low or high: <NEW_LINE> <INDENT> validators.append(va... | A field that will try to coerce value to a float.
:param required: Is this field required?
:param default: Default value to be used if no incoming value is provided.
:param validators: List of validator functions to run.
:param low: Lowest value that should be enfocred.
:param high: Highest value that should be enfocr... | 62598f904428ac0f6e658166 |
class JSONFormatter(Formatter): <NEW_LINE> <INDENT> fmt = "json" <NEW_LINE> config = {"indent": None} <NEW_LINE> def __init__(self, stream, fields, **kwargs): <NEW_LINE> <INDENT> super().__init__(stream, fields, **kwargs) <NEW_LINE> self._data = {"fields": self.fields, "processes": []} <NEW_LINE> <DEDENT> def _format_p... | Format fields in JSON.
Config parameters:
- indent: the amount of spaces for indentation (no indentation if None) | 62598f908e7ae83300ee8ce2 |
class ValidatorBase(dict): <NEW_LINE> <INDENT> errors = None <NEW_LINE> @abstractmethod <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(ValidatorBase, self).__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def __call__(self, caller, *args, **kwargs): <NEW_LINE> <INDENT> self.caller = caller <NEW_... | Utility class providing error handling, parameter lookup and validation hooks.
| 62598f9038b623060ffa8cc7 |
class ContextProviderI: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.context = None <NEW_LINE> <DEDENT> def setContext(self, context): <NEW_LINE> <INDENT> self.context = context | Class for object that owns a security context | 62598f90bde94217f3707487 |
@dataclass <NEW_LINE> class AuctionBids: <NEW_LINE> <INDENT> bidTimestamp: datetime <NEW_LINE> bid: List[AuctionBidValue] <NEW_LINE> offer: List[AuctionBidValue] | Class for the Auction Bids.
Attributes:
bidTimestamp: the Auction Bids timestamp (datetime = ISO format)
bid: the Auction Bids bid
offer: the Auction Bids offer | 62598f90656771135c4892be |
class SongNote(_clad_to_engine_iface.SongNote): <NEW_LINE> <INDENT> def __init__(self, noteType=NoteTypes.C2, noteDuration=NoteDurations.Whole): <NEW_LINE> <INDENT> super(SongNote, self).__init__(noteType.id, noteDuration.id) | Represents on element in a song. Consists of a :class:`cozmo.song.NoteTypes` which specifies
either a pitch or rest, and a :class:`cozmo.song.NoteDurations` specifying the length of the
note. | 62598f9123e79379d538c142 |
class APIError(StandardError): <NEW_LINE> <INDENT> def __init__(self, error, message='', data=''): <NEW_LINE> <INDENT> super(APIError, self).__init__(message) <NEW_LINE> self.error = error <NEW_LINE> self.data = data <NEW_LINE> self.message = message | the base APIError which contains error(required), data(optional) and message(optional).
存储所有API 异常对象的数据 | 62598f9123e79379d538c143 |
class CallBack(types.Type): <NEW_LINE> <INDENT> name = validators.String(max_length=255, title=u'接口名称', description=u'接口名称') <NEW_LINE> url = validators.String(title=u'回调url', description=u'回调url') <NEW_LINE> create_time = validators.DateTime(default=cur_date_time(), title=u'创建时间', description=u'创建时间') <NEW_LINE> def _... | 回调表 | 62598f91e76e3b2f99fd8674 |
@python_2_unicode_compatible <NEW_LINE> class ProposalSectionReviewerVoteValue(AuditModel): <NEW_LINE> <INDENT> vote_value = models.SmallIntegerField() <NEW_LINE> description = models.CharField(max_length=255) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return "{} ({})".format(self.description, self.vote_value) <... | Proposal reviewer vote choices. | 62598f91d7e4931a7ef3bce0 |
class Room(dict): <NEW_LINE> <INDENT> def process_go(self, adventure, words): <NEW_LINE> <INDENT> direction = words[0] <NEW_LINE> room = self <NEW_LINE> if direction in self["doors"]: <NEW_LINE> <INDENT> room = adventure.get_room(self["doors"][direction]["destination"]) <NEW_LINE> print(room["entryDescription"]) <NEW_L... | basic room implementation | 62598f9115baa72349461bbc |
class OSDiskImage(Model): <NEW_LINE> <INDENT> _validation = { 'operating_system': {'required': True}, } <NEW_LINE> _attribute_map = { 'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'}, } <NEW_LINE> def __init__(self, operating_system): <NEW_LINE> <INDENT> self.operating_system = operating_s... | Contains the os disk image information.
:param operating_system: The operating system of the osDiskImage. Possible
values include: 'Windows', 'Linux'
:type operating_system: str or :class:`OperatingSystemTypes
<azure.mgmt.compute.models.OperatingSystemTypes>` | 62598f9130dc7b766599f49a |
class save_args: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRING, 'filebuff', None, None, ), (2, TType.STRUCT, 'meta', (Meta, Meta.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, filebuff=None, meta=None,): <NEW_LINE> <INDENT> self.filebuff = filebuff <NEW_LINE> self.meta = meta <NEW_LINE> <DEDENT> de... | Attributes:
- filebuff
- meta | 62598f91e5267d203ee6b559 |
class RSA(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def paramgen(self, secparam): <NEW_LINE> <INDENT> while True: <NEW_LINE> <INDENT> p, q = randomPrime(secparam), randomPrime(secparam) <NEW_LINE> if isPrime(p) and isPrime(q) and p != q: <NEW_LINE> <INDENT> N = p * q <NEW_L... | RSA Module | 62598f910383005118f6d33a |
class liquid_vapor(phase): <NEW_LINE> <INDENT> def __init__(self, name = '', elements = '', species = '', substance_flag = 0, initial_state = None, options = []): <NEW_LINE> <INDENT> phase.__init__(self, name, 3, elements, species, 'none', initial_state, options) <NEW_LINE> self._subflag = substance_flag <NEW_LINE> sel... | A fluid with a complete liquid/vapor equation of state.
This entry type selects one of a set of predefined fluids with
built-in liquid/vapor equations of state. The substance_flag
parameter selects the fluid. See purefluids.py for the usage
of this entry type. | 62598f918e71fb1e983bb6f3 |
class Minnesota(Graph): <NEW_LINE> <INDENT> def __init__(self, connected=True, **kwargs): <NEW_LINE> <INDENT> self.connected = connected <NEW_LINE> data = utils.loadmat('pointclouds/minnesota') <NEW_LINE> self.labels = data['labels'] <NEW_LINE> A = data['A'] <NEW_LINE> plotting = {"limits": np.array([-98, -89, 43, 50])... | Minnesota road network (from MatlabBGL).
Parameters
----------
connected : bool
If True, the adjacency matrix is adjusted so that all edge weights are
equal to 1, and the graph is connected. Set to False to get the
original disconnected graph.
References
----------
See :cite:`gleich`.
Examples
--------
>... | 62598f9110dbd63aa1c707fc |
class Assignment(base.Assignment): <NEW_LINE> <INDENT> implements(IEventsPortlet) <NEW_LINE> def __init__(self, url=u'', max_events=5, do_filter=False, cat1=u'', cat2=u'', target_blank=False, all_url=u''): <NEW_LINE> <INDENT> self.url = url <NEW_LINE> self.max_events = max_events <NEW_LINE> self.do_filter = do_filter <... | Portlet assignment.
This is what is actually managed through the portlets UI and associated
with columns. | 62598f913617ad0b5ee05d89 |
@register("morpho_tagger") <NEW_LINE> class MorphoTaggerWrapper(NNModel): <NEW_LINE> <INDENT> def __init__(self, save_path: str = None, load_path: str = None, mode: str = None, **kwargs): <NEW_LINE> <INDENT> super().__init__(save_path=save_path, load_path=load_path, mode=mode) <NEW_LINE> opt = copy.deepcopy(kwargs) <NE... | A wrapper over morphological tagger, implemented in
:class:~deeppavlov.models.morpho_tagger.network.CharacterTagger.
A subclass of :class:`~deeppavlov.core.models.nn_model.NNModel`
Args:
save_path: the path where model is saved
load_path: the path from where model is loaded
mode: usage mode
**kwargs: a... | 62598f9123849d37ff850d03 |
class BoardClicker: <NEW_LINE> <INDENT> def click(self, board_state: BoardState, coordinates: Coordinates) -> BoardState: <NEW_LINE> <INDENT> x, y = coordinates <NEW_LINE> invert_coordinates = list(filter( lambda c: board_state.valid_coordinates(c), [(x - 1, y), (x, y), (x + 1, y), (x, y - 1), (x, y + 1)] )) <NEW_LINE>... | "Clicks" the cells on the board to produce a new BoardState. | 62598f914428ac0f6e658168 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.