code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class FeaturesFeed(object): <NEW_LINE> <INDENT> openapi_types = { 'title': 'str', 'pub_date': 'str' } <NEW_LINE> attribute_map = { 'title': 'title', 'pub_date': 'pubDate' } <NEW_LINE> def __init__(self, title=None, pub_date=None, local_vars_configuration=None): <NEW_LINE> <INDENT> if local_vars_configuration is None: <... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually. | 62598f7d287bf620b6271584 |
class HandleSigTrap(GenericCommand): <NEW_LINE> <INDENT> _cmdline_ = "handlesigtrap" <NEW_LINE> _syntax_ = "{:s}".format(_cmdline_) <NEW_LINE> @only_if_gdb_running <NEW_LINE> def do_invoke(self, argv): <NEW_LINE> <INDENT> print("sigtrap pc = {:#x}".format(current_arch.pc)) <NEW_LINE> pc = current_arch.pc - 1 <NEW_LINE>... | Handle breakpoints that were added by 'coveragestart'. | 62598f7d45492302aabfbeab |
class CleanupTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> from letsencrypt.client.continuity_auth import ContinuityAuthenticator <NEW_LINE> self.auth = ContinuityAuthenticator( mock.MagicMock(server="demo_server.org")) <NEW_LINE> self.mock_cleanup = mock.MagicMock(name="rec_token_cl... | Test the Authenticator cleanup function. | 62598f7dec188e330fdf826b |
class Dimension(object): <NEW_LINE> <INDENT> thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> raise AttributeError("No constructor defined") <NEW_LINE> <DEDENT> __repr__ = _swig_repr <NEW_LINE> __swig_de... | Proxy of C++ GDALDimensionHS class. | 62598f7d0a366e3fb87dc397 |
class RecipeDetailSerializer(RecipeSerializer): <NEW_LINE> <INDENT> ingredients = IngredientSerializer(many=True, read_only=True) <NEW_LINE> tags = TagSerializer(many=True, read_only=True) | Serialize recipe details | 62598f7d15baa7234946194a |
class GermanySpecProvider(BaseSpecProvider): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self._data = pull('builtin.json', 'de') <NEW_LINE> <DEDENT> class Meta: <NEW_LINE> <INDENT> name = 'germany_provider' <NEW_LINE> <DEDENT> def noun(self, ... | Specific-provider of misc data for Germany. | 62598f7d63b5f9789fe84b3d |
class Sweep(object): <NEW_LINE> <INDENT> def __init__(self, rays=360, gates=CONSTANTS.MAX_GATES): <NEW_LINE> <INDENT> self.name = 'RadarKit' <NEW_LINE> self.configId = 0 <NEW_LINE> self.rayCount = 0 <NEW_LINE> self.gateCount = 0 <NEW_LINE> self.sweepAzimuth = 0.0 <NEW_LINE> self.sweepElevation = 0.0 <NEW_LINE> self.gat... | An object that encapsulate a sweep | 62598f7dc432627299fa29a5 |
class SmtpServerHarness(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setup_class(cls): <NEW_LINE> <INDENT> smtp_server = config.get('test_smtp_server') or config['smtp_server'] <NEW_LINE> if ':' in smtp_server: <NEW_LINE> <INDENT> host, port = smtp_server.split(':') <NEW_LINE> <DEDENT> else: <NEW_LINE> <IN... | Derive from this class to run MockSMTP - a test harness that
records what email messages are requested to be sent by it. | 62598f7ddc8b845886d52f82 |
class TestConstants(unittest.TestCase): <NEW_LINE> <INDENT> def test_sample_data(self): <NEW_LINE> <INDENT> self.assertTrue(os.path.isfile(c.io.FILE_DATA_SAMPLE)) | Test constants | 62598f7d0383005118f6d0cd |
class Solution: <NEW_LINE> <INDENT> def totalNQueens(self, n): <NEW_LINE> <INDENT> if n < 1: <NEW_LINE> <INDENT> return [] <NEW_LINE> <DEDENT> res = self.search(n, []) <NEW_LINE> return len(res) <NEW_LINE> <DEDENT> def isValid(self, cols, row): <NEW_LINE> <INDENT> m = len(cols) <NEW_LINE> for i in range(m): <NEW_LINE> ... | Calculate the total number of distinct N-Queen solutions.
@param n: The number of queens.
@return: The total number of distinct solutions. | 62598f7d9b70327d1c57e770 |
class Rule4(Rule): <NEW_LINE> <INDENT> min_len_check = 14 <NEW_LINE> min_len_continuation_check = 1 <NEW_LINE> min_len_positivity_check = 2 <NEW_LINE> rule_number = 4 <NEW_LINE> @staticmethod <NEW_LINE> def check(data: List[float], **stats_data) -> bool: <NEW_LINE> <INDENT> return all(((a > b) - (a < b)) * ((b > c) - (... | excessive oscillation
positive trends start increasing->decreasing | 62598f7d0383005118f6d0ce |
class TransformerFitTransformPanelMultivariate(TransformerTestScenario): <NEW_LINE> <INDENT> _tags = { "X_scitype": "Panel", "X_univariate": False, "has_y": False, "pre-refactor": False, } <NEW_LINE> args = { "fit": { "X": _make_panel_X( n_instances=7, n_columns=2, n_timepoints=10, random_state=RAND_SEED ) }, "transfor... | Fit/transform, multivariate Panel X. | 62598f7dbde94217f370734c |
class Role(models.Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> app_label = 'user_map' <NEW_LINE> <DEDENT> id = models.IntegerField(primary_key=True) <NEW_LINE> name = models.CharField( help_text='How would you define your participation?', max_length=100, null=False, blank=False, unique=True) <NEW_LINE> b... | Role for users e.g. developer, trainer, user. | 62598f7d63f4b57ef0085a54 |
class InvalidPackage(IpkgException): <NEW_LINE> <INDENT> def __init__(self, spec): <NEW_LINE> <INDENT> self.spec = spec <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return 'Invalid package: %s' % self.spec | Failed parse a package spec or argument is not package like.
| 62598f7dd10714528d69d89c |
class _defer_name(_truncated_label): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> def __new__(cls, value): <NEW_LINE> <INDENT> if value is None: <NEW_LINE> <INDENT> return _NONE_NAME <NEW_LINE> <DEDENT> elif isinstance(value, conv): <NEW_LINE> <INDENT> return value <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> return ... | Mark a name as 'deferred' for the purposes of automated name
generation. | 62598f7dac7a0e7691f71ee6 |
class DownloadTests(HTMLTestCase): <NEW_LINE> <INDENT> layer = STATIC_WD_SELENESE_LAYER <NEW_LINE> @pytest.mark.skipif( os.environ.get('GOCEPT_WEBDRIVER_BROWSER').lower() == 'edge', reason='Edge currently does not support using a custom download dir.') <NEW_LINE> def test_webdriver__Layer__setUp__1(self): <NEW_LINE> <I... | Testing downloading of files. | 62598f7d73bcbd0ca4bc9c1d |
class theta_m_no_error_gen(rv_continuous): <NEW_LINE> <INDENT> def _pdf(self, x, n, S0, N0, E0, c, a): <NEW_LINE> <INDENT> beta = get_beta(S0, N0) <NEW_LINE> lambda2 = get_lambda2(S0, N0, E0) <NEW_LINE> lambda1 = beta - lambda2 <NEW_LINE> sigma = beta + (E0 - 1) * lambda2 <NEW_LINE> x = np.array(x) <NEW_LINE> pdf = lam... | Intraspecific mass distribution when constraint is E0.
Lower truncated at (1/c) ** (1/a) and upper truncated at (E0/c) ** (1/a). | 62598f7db57a9660fecd144b |
class RTopgo(RPackage): <NEW_LINE> <INDENT> homepage = "https://www.bioconductor.org/packages/topGO/" <NEW_LINE> git = "https://git.bioconductor.org/packages/topGO.git" <NEW_LINE> version('2.30.1', commit='b1469ce1d198ccb73ef79ca22cab81659e16dbaa') <NEW_LINE> version('2.28.0', commit='066a975d460046cce33fb27e74e6a... | topGO package provides tools for testing GO terms while accounting
for the topology of the GO graph. Different test statistics and
different methods for eliminating local similarities and dependencies
between GO terms can be implemented and applied. | 62598f7dbaa26c4b54d4ec80 |
class ViewFieldCollection(BaseEntityCollection): <NEW_LINE> <INDENT> def __init__(self, context, resource_path=None): <NEW_LINE> <INDENT> super(ViewFieldCollection, self).__init__(context, str, resource_path) <NEW_LINE> <DEDENT> @property <NEW_LINE> def schema_xml(self): <NEW_LINE> <INDENT> return self.properties.get('... | Represents a collection of Field resources. | 62598f7d45492302aabfbead |
class ValidateViews(TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpTestData(cls): <NEW_LINE> <INDENT> load_test_rules() <NEW_LINE> <DEDENT> def test_validate_account_view_valid(self): <NEW_LINE> <INDENT> response = self.client.post('/accounts/validate/', {'sort_code': '500000', 'account_number': '12312... | Test templates Views | 62598f7d15baa7234946194c |
class Place(Element): <NEW_LINE> <INDENT> __tablename__ = 'place' <NEW_LINE> place_id = Column(Integer, ForeignKey(Element.element_id), primary_key=True) <NEW_LINE> country = Column(String) <NEW_LINE> state = Column(String) <NEW_LINE> county = Column(String) <NEW_LINE> city = Column(String) <NEW_LINE> street = Column(S... | Physical location. | 62598f7d15fb5d323ce7e6f9 |
class sigmoid(actfunc): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def activation(x): <NEW_LINE> <INDENT> return 1.0/(1+np.exp(-x)) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def gradient(x): <NEW_LINE> <INDENT> e = np.exp(x) <NEW_LINE> return e/((1+e)**2) | The sigmoid activation. | 62598f7d15baa7234946194d |
class TestBackupJobSummary(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def make_instance(self, include_optional): <NEW_LINE> <INDENT> if include_optional : <NEW_LINE> <INDENT> return BackupJobSumma... | BackupJobSummary unit test stubs | 62598f7d63b5f9789fe84b3f |
class TestsTests(TestCase): <NEW_LINE> <INDENT> def test_tail(self): <NEW_LINE> <INDENT> assert_allclose(tail(0.25, 'a' == 'a'), 0.25 / 2) <NEW_LINE> assert_allclose(tail(0.25, 'a' != 'a'), 1 - (0.25 / 2)) <NEW_LINE> <DEDENT> def test_fisher(self): <NEW_LINE> <INDENT> assert_allclose(fisher([0.073, 0.086, 0.10, 0.080, ... | Tests miscellaneous functions. | 62598f7d1d351010ab8f350c |
class Geometric(Discrete): <NEW_LINE> <INDENT> def __init__(self, p, *args, **kwargs): <NEW_LINE> <INDENT> super(Geometric, self).__init__(*args, **kwargs) <NEW_LINE> self.p = p = tt.as_tensor_variable(p) <NEW_LINE> self.mode = 1 <NEW_LINE> <DEDENT> def random(self, point=None, size=None): <NEW_LINE> <INDENT> p = draw_... | Geometric log-likelihood.
The probability that the first success in a sequence of Bernoulli
trials occurs on the x'th trial.
The pmf of this distribution is
.. math:: f(x \mid p) = p(1-p)^{x-1}
.. plot::
import matplotlib.pyplot as plt
import numpy as np
import scipy.stats as st
plt.style.use('seabo... | 62598f7d10dbd63aa1c7057f |
class SurfaceRingQueryEngine(SurfaceQueryEngine): <NEW_LINE> <INDENT> @borrowkwargs(SurfaceQueryEngine) <NEW_LINE> def __init__(self, inner_radius, include_center=False, **kwargs): <NEW_LINE> <INDENT> self.inner_radius = inner_radius <NEW_LINE> self.include_center = include_center <NEW_LINE> SurfaceQueryEngine.__init__... | Query-engine that maps center nodes to indices of features
(nodes) that are inside a ring around each center node. | 62598f7da4f1c619b294dfba |
class UrlTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> musicbrainzngs.set_useragent("a", "1") <NEW_LINE> musicbrainzngs.set_rate_limit(rate_limit=False) <NEW_LINE> <DEDENT> def testSearchArtist(self): <NEW_LINE> <INDENT> musicbrainzngs.search_artists("Dynamo Go") <NEW_LINE> self.asse... | Test that the correct URL is generated when a search query is made | 62598f7dbde94217f370734d |
class VADAudio(Audio): <NEW_LINE> <INDENT> def __init__(self, aggressiveness=3, device=None, input_rate=None, file=None): <NEW_LINE> <INDENT> super().__init__(device=device, input_rate=input_rate, file=file) <NEW_LINE> self.vad = webrtcvad.Vad(aggressiveness) <NEW_LINE> <DEDENT> def frame_generator(self): <NEW_LINE> <I... | Filter & segment audio with voice activity detection. | 62598f7dd10714528d69d89d |
class check_configuration_discover(): <NEW_LINE> <INDENT> TITLE = 'Discovery Requests' <NEW_LINE> CATEGORY = 'Configuration' <NEW_LINE> TYPE = 'clp' <NEW_LINE> SQL = '' <NEW_LINE> CMD = ['db2', '-tn', 'get', 'database', 'manager', 'configuration'] <NEW_LINE> verbose = False <NEW_LINE> skip = Fals... | check_configuration_discover:
The discover parameter determines what kind of discovery requests, if any, the DB2
serverwill fulfill.It is recommended that the DB2 server only fulfill requests from clients
that know the given instance name. | 62598f7d21a7993f00c6593f |
class User(AbstractBaseUser, PermissionsMixin): <NEW_LINE> <INDENT> index_list = models.ManyToManyField(SearchIndex) <NEW_LINE> email = models.EmailField(max_length=255, unique=True) <NEW_LINE> name = models.CharField(max_length=255) <NEW_LINE> is_active = models.BooleanField(default=True) <NEW_LINE> is_staff = models.... | User has many index permissions | 62598f7dd10714528d69d89e |
class ParseData(object): <NEW_LINE> <INDENT> def __init__(self, data_paths): <NEW_LINE> <INDENT> train_data, train_label, test_data, test_label = self.__parse(data_paths) <NEW_LINE> self.train_data = train_data <NEW_LINE> self.train_label = train_label <NEW_LINE> self.test_data = test_data <NEW_LINE> self.te... | Preprocess target data
- Put all data together
- Split them into 'train' and 'test'
Parameter
--------------------------
data_paths: list of paths of experiment data
Attribute
--------------------------
train_data: eeg signal of train data
train_label: labels of train data
test_data: eeg signal of test data
test_l... | 62598f7dd164cc6175820947 |
class Bin(object): <NEW_LINE> <INDENT> def __init__(self, *outcomes): <NEW_LINE> <INDENT> self.outcomes = set(outcomes) <NEW_LINE> <DEDENT> def add(self, outcome): <NEW_LINE> <INDENT> self.outcomes |= set([outcome]) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return ', '.join(map(str, self.outcomes)) | bin in a roulette. Each bin class with have
a collection of outcomes that win if the ball
falls over that bin. | 62598f7d50485f2cf55da941 |
class CredentialCheckAPIView(rest_views.APIView): <NEW_LINE> <INDENT> queryset = User.objects.all() <NEW_LINE> permission_classes = (rest_permissions.AllowAny,) <NEW_LINE> def get(self, request): <NEW_LINE> <INDENT> email = request.QUERY_PARAMS.get('email') <NEW_LINE> uname = request.QUERY_PARAMS.get('uname') <NEW_LINE... | Widok pozwalający w prosty sposób sprawdzić, czy podany adres email lub
nazwa użytkownika zostały już zarejestrowane w systemie.
#### Przykład zapytania o adres email:
```/api-userspace/credentials/?email=tester@test.pl```
#### Przykład zapytania o nazwę użytkownika:
```/api-userspace/credentials/?uname=tester```
... | 62598f7d1d351010ab8f350f |
class TableNames: <NEW_LINE> <INDENT> T_USER = "t_user" <NEW_LINE> T_TOKEN = "t_access_tokens" <NEW_LINE> S_ROLES = "s_roles" <NEW_LINE> S_RIGHTS = "s_rights" <NEW_LINE> T_USER_ROLES = "t_user_roles" <NEW_LINE> T_USER_RIGHTS = "t_user_rights" <NEW_LINE> T_ROLES_RIGHTS = "t_roles_rights" | Name of structures (S) or tables (T) in your database.
Important: The names must match the table's name in your database. | 62598f7da05bb46b3848a24b |
class MultiplexingObserver(Observer): <NEW_LINE> <INDENT> def __init__(self, *components): <NEW_LINE> <INDENT> self.components = components <NEW_LINE> super(MultiplexingObserver, self).__init__() <NEW_LINE> <DEDENT> def start(self, max_value): <NEW_LINE> <INDENT> for o in self.components: <NEW_LINE> <INDENT> o.start(ma... | Combine multiple observers into one.
| 62598f7d66656f66f7d59dc3 |
class GetTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.client = Client() <NEW_LINE> <DEDENT> def test_GetIndex(self): <NEW_LINE> <INDENT> response = self.client.get(reverse("index")) <NEW_LINE> self.assertEqual(response.status_code, 200) <NEW_LINE> <DEDENT> def test_GetServerIndex(self)... | Unit Tests that exercise HTTP GET. | 62598f7dc432627299fa29a7 |
class HasGroupPermission(permissions.BasePermission): <NEW_LINE> <INDENT> ADMIN = "Admin" <NEW_LINE> def has_permission(self, request, view): <NEW_LINE> <INDENT> required_groups_mapping = getattr(view, 'required_groups', {}) <NEW_LINE> required_groups = required_groups_mapping.get(request.method, []) <NEW_LINE> return ... | USUALLY WE WILL JUST USE DjangoModelPermissions from DRF
Ensure user is in ALL of the listed required groups
- unless they are have is_superuser = True.
Set the required groups on the view as an attribute i.e.
required_groups = { 'GET' : "Admins" } | 62598f7db830903b9686e159 |
class VideoProcessorCV(VideoProcessor): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(VideoProcessorCV, self).__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def get_video(self): <NEW_LINE> <INDENT> return cv2.VideoCapture(self.fname) <NEW_LINE> <DEDENT> def get_info(self): <NEW_LINE>... | OpenCV implementation of VideoProcessor
requires opencv-python==3.4.0.12 | 62598f7d0383005118f6d0d2 |
class IntelXed(Package): <NEW_LINE> <INDENT> homepage = "https://intelxed.github.io/" <NEW_LINE> url = "https://github.com/intelxed/xed" <NEW_LINE> version('2018.02.14', git='https://github.com/intelxed/xed', commit='44d06033b69aef2c20ab01bfb518c52cd71bb537') <NEW_LINE> resource(name='mbuild', git='https://github.com/i... | The Intel X86 Encoder Decoder library for encoding and decoding x86
machine instructions (64- and 32-bit). Also includes libxed-ild,
a lightweight library for decoding the length of an instruction.
This version built for Rice HPCToolkit. | 62598f7dfb3f5b602db47e98 |
@method_decorator(user_passes_test(is_center), name="dispatch") <NEW_LINE> class CenterTfgDetailView(DetailView): <NEW_LINE> <INDENT> model = Tfgs <NEW_LINE> teamplate_name = "tfgs/tfgs_detail" <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> queryset = super().get_queryset().filter( carrers__centers=self.request... | Controlador para mostrar un TFG en detalle.
Atributos:
model(model.Model): Modelo que se va a mostrar en la vista.
template_name(str): Nombre del template donde se va a renderizar la vista. | 62598f7d3eb6a72ae038a012 |
class Connection(models.Model): <NEW_LINE> <INDENT> sourceUser = models.ForeignKey(Sharer) <NEW_LINE> destUser = models.ForeignKey(Getter) <NEW_LINE> conStatus = models.BinaryField() <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return self.conStatus | This class is about the relationship status between users | 62598f7d94891a1f408b93d7 |
class CTD_ANON_3 (pyxb.binding.basis.complexTypeDefinition): <NEW_LINE> <INDENT> _TypeDefinition = None <NEW_LINE> _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY <NEW_LINE> _Abstract = False <NEW_LINE> _ExpandedName = None <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('http://www.sa... | Nodo opcional para asentar los impuestos retenidos aplicables al presente concepto. | 62598f7d07d97122c4216673 |
class InconsistentRepeats(StandardError): <NEW_LINE> <INDENT> pass | Bad repeat data | 62598f7d8e71fb1e983bb488 |
class Asset(Asset): <NEW_LINE> <INDENT> swagger_types = {**Asset.swagger_types, "owner_id": "EntityId"} <NEW_LINE> attribute_map = {**Asset.attribute_map, "owner_id": "ownerId"} <NEW_LINE> def __init__(self, additional_info=None, created_time=None, customer_id=None, id=None, label=None, name=None, owner_id=None, tenant... | NOTE: This class is auto generated by the swagger code generator program.
| 62598f7d7b25080760ed6e74 |
class SublimeBlockFormatter(BlockHtmlFormatter): <NEW_LINE> <INDENT> def wrap(self, source, outfile): <NEW_LINE> <INDENT> if self.linenos == 2 and self.pymdownx_inline: <NEW_LINE> <INDENT> source = self._wrap_customlinenums(source) <NEW_LINE> <DEDENT> return self._wrap_code(source) <NEW_LINE> <DEDENT> def _wrap_code(se... | Format the code blocks. | 62598f7dd53ae8145f917e69 |
class Record(object): <NEW_LINE> <INDENT> pass | Represents a record in the ORegAnno database. | 62598f7d7c178a314d78ce7b |
class ShopDate(): <NEW_LINE> <INDENT> std_format = "%Y-%m-%d" <NEW_LINE> def __init__(self, filename: str): <NEW_LINE> <INDENT> self._filename = filename <NEW_LINE> self._today = self._read() <NEW_LINE> <DEDENT> @property <NEW_LINE> def today(self): <NEW_LINE> <INDENT> return self._today <NEW_LINE> <DEDENT> @today.sett... | Everthing for dates | 62598f7d596a897236127642 |
class PackageExist(GraphManagerMixin, APIView): <NEW_LINE> <INDENT> def get(self, request, **kwargs): <NEW_LINE> <INDENT> response_text = {} <NEW_LINE> if kwargs.get('package_name'): <NEW_LINE> <INDENT> package = kwargs['package_name'] <NEW_LINE> response_text = {package: self.graph_manager.package_manager.is_package_e... | Package Exist API | 62598f7dbaa26c4b54d4ec84 |
class MailServer(object): <NEW_LINE> <INDENT> def __init__(self, username, password): <NEW_LINE> <INDENT> self.username = username <NEW_LINE> self.server = smtplib.SMTP('smtp.gmail.com:587') <NEW_LINE> self.server.ehlo() <NEW_LINE> self.server.starttls() <NEW_LINE> self.server.login(username, password) <NEW_LINE> <DEDE... | A mail server facade. Immediately connects to the mail server upon
instantiation. Do not create needlessly. | 62598f7d23e79379d538becb |
class NehushtanUDPSocketClient: <NEW_LINE> <INDENT> def __init__(self, host: str, port: int): <NEW_LINE> <INDENT> self.__server_address = (host, port) <NEW_LINE> self.__socket_instance: socket.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) <NEW_LINE> <DEDENT> def get_socket_instance(self): <NEW_LINE> <INDENT... | Since 0.4.16 | 62598f7d21bff66bcd722639 |
class OperationFailure(PyMongoError): <NEW_LINE> <INDENT> def __init__(self, error, code=None, details=None, max_wire_version=None): <NEW_LINE> <INDENT> error_labels = None <NEW_LINE> if details is not None: <NEW_LINE> <INDENT> error_labels = details.get('errorLabels') <NEW_LINE> <DEDENT> super(OperationFailure, self).... | Raised when a database operation fails.
.. versionadded:: 2.7
The :attr:`details` attribute. | 62598f7d8a349b6b43685c15 |
@implementer(ISearchResponse) <NEW_LINE> @adapter(IResponse) <NEW_LINE> class SearchResponse(base.SearchResponse): <NEW_LINE> <INDENT> _spelling_suggestion = None <NEW_LINE> _facets = None <NEW_LINE> def __iter__(self): <NEW_LINE> <INDENT> for doc in self.context: <NEW_LINE> <INDENT> yield SearchResult(doc, self) <NEW_... | A search response object | 62598f7de76e3b2f99fd8405 |
class MemberGroupSharedItem(object): <NEW_LINE> <INDENT> swagger_types = { 'error_details': 'ErrorDetails', 'group': 'Group', 'shared': 'str' } <NEW_LINE> attribute_map = { 'error_details': 'errorDetails', 'group': 'group', 'shared': 'shared' } <NEW_LINE> def __init__(self, _configuration=None, **kwargs): <NEW_LINE> <I... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598f7d9b70327d1c57e776 |
class IUndirectLayoutProvider(Interface): <NEW_LINE> <INDENT> pass | An object providing layout informations through its context.
| 62598f7d50485f2cf55da944 |
class GetRegionTests(TestCase, HeaderTestsMixin): <NEW_LINE> <INDENT> def get_callable(self): <NEW_LINE> <INDENT> return get_region <NEW_LINE> <DEDENT> def get_params(self, **kwargs): <NEW_LINE> <INDENT> params = { "token": "12345", "region": "US-NV", } <NEW_LINE> params.update(kwargs) <NEW_LINE> return params <NEW_LIN... | Tests for the get_region() API call. | 62598f7dfb3f5b602db47e99 |
class OperationEntityListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, 'value': {'key': 'value', 'type': '[OperationEntity]'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(OperationEntityListResult, self).__init__(**... | The list of storage sync operations.
:param next_link: The link used to get the next page of operations.
:type next_link: str
:param value: The list of operations.
:type value: list[~azure.mgmt.storagesync.models.OperationEntity] | 62598f7dd4950a0f3b110b1e |
class AuthLevel(str, Enum): <NEW_LINE> <INDENT> Basic = AuthLevel('basic', 0) <NEW_LINE> Moderator = AuthLevel('moderator', 1) <NEW_LINE> Admin = AuthLevel('admin', 2) <NEW_LINE> Developer = AuthLevel('developer', 3) <NEW_LINE> def __init__(s: str = '', priority: int = 0): <NEW_LINE> <INDENT> super().__init__(s) <NEW_L... | Stores level of authorization as an enum. | 62598f7d26068e7796d4c32d |
class MesosDnsHTTPRequestHandler(RecordingHTTPRequestHandler): <NEW_LINE> <INDENT> SRV_QUERY_REGEXP = re.compile('^/v1/services/_([^_]+)._tcp.marathon.mesos$') <NEW_LINE> def _calculate_response(self, base_path, url_args, body_args=None): <NEW_LINE> <INDENT> if base_path == '/v1/reflect/me': <NEW_LINE> <INDENT> return ... | Request handler that mimics MesosDNS
Depending on how it was set up, it will respond with different SRV
entries for preset services. | 62598f7d16aa5153ce3ffed2 |
class MetaField(argiope.utils.Container): <NEW_LINE> <INDENT> _positions = ["node", "element"] <NEW_LINE> def __init__(self, label = None, position = "node", step_num = None, step_label = None, part = None, frame = None, frame_value = None, data = None, **kwargs): <NEW_LINE> <INDENT> self.label = label <NEW_LINE> self.... | A field mother class.
:param label: field label
:type label: str
:param position: physical position
:type position: in ["node", "element"] | 62598f7d097d151d1a2c09fa |
class EndOfFiles(Message): <NEW_LINE> <INDENT> def id(self): <NEW_LINE> <INDENT> return MsgType.EndOfFiles <NEW_LINE> <DEDENT> def encode(self): <NEW_LINE> <INDENT> return bytes() <NEW_LINE> <DEDENT> def decode(self, data): <NEW_LINE> <INDENT> pass | EndOfFiles Message. | 62598f7d73bcbd0ca4bc9c23 |
class Content(models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=100) <NEW_LINE> post = models.TextField() <NEW_LINE> data = models.FileField(upload_to='uploads/', null=True) <NEW_LINE> topics = models.ManyToManyField(Topic) <NEW_LINE> owner = models.ForeignKey(Person, on_delete=models.CASCADE, rela... | The shared content on the page | 62598f7d7c178a314d78ce7d |
class MovieReviewDataset: <NEW_LINE> <INDENT> def __init__(self, dataset_path=None, max_length=None, remake=False, new_review=None, new_labels=None): <NEW_LINE> <INDENT> if remake: <NEW_LINE> <INDENT> self.reviews = new_review <NEW_LINE> self.labels = new_labels <NEW_LINE> return <NEW_LINE> <DEDENT> data_review = os.pa... | 영화리뷰 데이터를 읽어서, tuple (데이터, 레이블)의 형태로 리턴하는 파이썬 오브젝트 입니다. | 62598f7db57a9660fecd1451 |
class ContentApiTestCasesFridgeContentItem(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.factory = RequestFactory() <NEW_LINE> test_utils.setup() <NEW_LINE> test_utils.create_dummyuser() <NEW_LINE> test_utils.create_dummyfridge() <NEW_LINE> test_utils.connect_fridge_user() <NEW_LINE> test_uti... | TestCase for fridge content item view | 62598f7d596a897236127645 |
class VariableSelectorInfo(VariableSelector): <NEW_LINE> <INDENT> def __init__( self, parent, variables, daterange, frequency, cellmethods, rows=10, **kwargs ): <NEW_LINE> <INDENT> self.session = parent.session <NEW_LINE> self.experiment = parent.experiment_name <NEW_LINE> super(VariableSelectorInfo, self).__init__(var... | Subclass of VariableSelector to display more info in a separate widget | 62598f7dbaa26c4b54d4ec86 |
class FieldValuesContextManager(object): <NEW_LINE> <INDENT> def __init__(self, block, field_name, field_values_callback): <NEW_LINE> <INDENT> self._block = block <NEW_LINE> self._field_name = field_name <NEW_LINE> self._callback = field_values_callback <NEW_LINE> self._old_values_value = None <NEW_LINE> <DEDENT> @lazy... | Allow using bound methods as XBlock field values provider.
Black wizardy to workaround the fact that field values can be callable, but that callable should be
parameterless, and we need current XBlock to get a list of values | 62598f7d23e79379d538becd |
class FRRegistrationInfo(EURegistrationInfoMixin, RegistrationInfo): <NEW_LINE> <INDENT> COUNTRY_CODE = 'FR' <NEW_LINE> DEFAULT_TAXES = ( (Decimal('0.20'), 'TVA'), (Decimal('0.10'), 'TVA'), (Decimal('0.055'), 'TVA'), (Decimal('0.021'), 'TVA') ) <NEW_LINE> siret = fields.StringField(required=True, verbose_name=_('SIRET'... | France registration infos
Currently adds:
- SIRET number
- RCS number | 62598f7d45492302aabfbeb3 |
class TempSplitFileArg(Arg,SplitMergeArg): <NEW_LINE> <INDENT> def __init__(self, db, name, node, axes, axes_origin=None, **kwargs): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.node = node <NEW_LINE> self.axes = axes <NEW_LINE> self.axes_origin = self.get_axes_origin(axes_origin) <NEW_LINE> self.is_split = len... | Temp output file arguments from a split
Resolves to a filename callback that can be used to create a temporary filename for each chunk of the split on the
given axis. Finalizes with resource manager to move from temporary filename to final filename. | 62598f7d82261d6c5272fbbd |
class Url(object): <NEW_LINE> <INDENT> def __init__(self, request, path = ''): <NEW_LINE> <INDENT> self.request = request <NEW_LINE> self.vars = [] <NEW_LINE> self.rewrite = self.request.get_data().get_bool('rewrite') <NEW_LINE> self.set_path(path) <NEW_LINE> if self.rewrite: <NEW_LINE> <INDENT> self.set_var('rewrit... | Represents an URL, retrieve via the request handler API. | 62598f7de76e3b2f99fd8407 |
class InboxSession(object): <NEW_LINE> <INDENT> def __init__(self, engine, versioned=True, ignore_soft_deletes=True, namespace_id=None): <NEW_LINE> <INDENT> assert engine, "Must set the database engine" <NEW_LINE> args = dict(bind=engine, autoflush=True, autocommit=False) <NEW_LINE> self.ignore_soft_deletes = ignore_so... | Inbox custom ORM (with SQLAlchemy compatible API).
Parameters
----------
engine : <sqlalchemy.engine.Engine>
A configured database engine to use for this session
versioned : bool
Do you want to enable the transaction log?
ignore_soft_deletes : bool
Whether or not to ignore soft-deleted objects in query res... | 62598f7dd6c5a102081e1b1b |
class VmbTransformParameterDebayer(ctypes.Structure): <NEW_LINE> <INDENT> _fields_ = [ ('Method', VmbUint32) ] | Sadly c_header contains no more documentation | 62598f7d30c21e258be981dd |
class res_partner(orm.Model): <NEW_LINE> <INDENT> _inherit = 'res.partner' <NEW_LINE> _columns = { 'airline': fields.boolean('Airline'), } <NEW_LINE> _defaults = { 'airline': 0, } | Inherits partner and adds airline : boolean in the partner form | 62598f7d66656f66f7d59dc7 |
class Personality(AutoMarshallingModel): <NEW_LINE> <INDENT> ROOT_TAG = 'personality' <NEW_LINE> def __init__(self, type): <NEW_LINE> <INDENT> self.type = type <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def _obj_to_json(self): <NEW_LINE> <INDENT> ret = self._auto_to_dict() <NEW_LINE> return json.dumps(ret) <NEW_LINE> ... | @summary: Personality Request Object for Server | 62598f7d1d351010ab8f3513 |
class NumpyAwareJSONEncoder(json.JSONEncoder): <NEW_LINE> <INDENT> def default(self, obj): <NEW_LINE> <INDENT> if isinstance(obj, numpy.ndarray) and obj.ndim == 1: <NEW_LINE> <INDENT> return obj.tolist() <NEW_LINE> <DEDENT> return json.JSONEncoder.default(self, obj) | override JsonEncoder to deal with numpy.darray | 62598f7d9b70327d1c57e778 |
class Radio(object): <NEW_LINE> <INDENT> def __init__(self, devid=0, sshclient=None, hostapd_restart_command=['sudo','ifdown br0',';','sudo','ifup','br0']): <NEW_LINE> <INDENT> self.executor = Executor(sshclient) <NEW_LINE> phy_dev = "phy" + str(devid) <NEW_LINE> wlan_dev = "wlan" + str(devid) <NEW_LINE> self.minstrel_... | Wrapper class for radio in Debian Linux with ath9k and wireless-tools | 62598f7d1f037a2d8b9e3abe |
class IncomingSignalTest(TestCase): <NEW_LINE> <INDENT> subject = crocodoc_signals.send_to_crocodoc <NEW_LINE> @httpretty.activate <NEW_LINE> def test_signal_provides_a_new_model(self): <NEW_LINE> <INDENT> httpretty.register_uri(httpretty.POST, "https://crocodoc.com/api/v2/document/upload", body='{"success": true, "uui... | Test we can issue a signal and have that signal provide us with an appropriate model | 62598f7d287bf620b627158d |
class MyListener(StreamListener): <NEW_LINE> <INDENT> def __init__(self, data_dir, query, max_tweets): <NEW_LINE> <INDENT> super(MyListener, self).__init__() <NEW_LINE> self.num_tweets = 0 <NEW_LINE> self.max_tweets = int(max_tweets) <NEW_LINE> query_fname = format_filename(query) <NEW_LINE> self.outfile = "%s/stream_%... | Custom StreamListener for streaming data. | 62598f7d8c3a8732951f5f1b |
class Import(object): <NEW_LINE> <INDENT> def __init__(self, obj, filename, package_root): <NEW_LINE> <INDENT> self.raw = obj <NEW_LINE> self.imports = [] <NEW_LINE> if hasattr(obj, 'module') and obj.module != None: <NEW_LINE> <INDENT> self.module = obj.module <NEW_LINE> <DEDENT> elif hasattr(obj, 'level'): <NEW_LINE> ... | Standardizes ast.Import and ast.ImportFrom objects into a common format | 62598f7da4f1c619b294dfc1 |
class song: <NEW_LINE> <INDENT> def __init__(self, songname, songinfo, album, spotifylink, youtubelink, prio, addstatus): <NEW_LINE> <INDENT> self.songname = songname <NEW_LINE> self.songinfo = songinfo <NEW_LINE> self.album = album <NEW_LINE> self.spotifylink = spotifylink <NEW_LINE> self.youtubelink = youtubelink <NE... | A class that contains all kind of informations about a song.
| 62598f7df7d966606f7479bc |
class CF_spot4take5_n2a_pente_Processor(CFProcessor): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> CFProcessor.__init__(self) | CloudFree processor for the MUSCAT Landsat 5 (Level 2A) dataset | 62598f7d07d97122c4216677 |
class Image(models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=128) <NEW_LINE> description = models.CharField(max_length=2048, blank=True, null=True) <NEW_LINE> image = FilerImageField(related_name="gallery_image") <NEW_LINE> alt = models.CharField(max_length=128, blank=True, null=True) <NEW_LINE> g... | Image objects for the galleries | 62598f7dd53ae8145f917e6d |
class _BaseKVCoder(CacheCoder): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._lengths_prefix_format = 'qq' <NEW_LINE> self._lengths_prefix_length = struct.calcsize(self._lengths_prefix_format) <NEW_LINE> super().__init__() <NEW_LINE> <DEDENT> def encode_cache(self, accumulator): <NEW_LINE> <INDENT> ... | Coder for key-value based accumulators. | 62598f7dec188e330fdf8275 |
class PyReadmeRenderer(PythonPackage): <NEW_LINE> <INDENT> homepage = "https://github.com/pypa/readme_renderer" <NEW_LINE> url = "https://pypi.python.org/packages/f2/6e/ef1bc3a24eb14e14574aba9dc1bd50bc9a5e7cc880e8ff9cadd385b4fb37/readme_renderer-16.0.tar.gz" <NEW_LINE> version('16.0', '70321cea986956bcf2deef998156... | readme_renderer is a library for rendering "readme" descriptions
for Warehouse. | 62598f7d15fb5d323ce7e701 |
class ReflexAgent(Agent): <NEW_LINE> <INDENT> def getAction(self, gameState): <NEW_LINE> <INDENT> legalMoves = gameState.getLegalActions() <NEW_LINE> scores = [self.evaluationFunction(gameState, action) for action in legalMoves] <NEW_LINE> bestScore = max(scores) <NEW_LINE> bestIndices = [index for index in range(len(s... | A reflex agent chooses an action at each choice point by examining
its alternatives via a state evaluation function.
The code below is provided as a guide. You are welcome to change
it in any way you see fit, so long as you don't touch our method
headers. | 62598f7d96565a6dacd2cc64 |
class StudentManager(PersonManager): <NEW_LINE> <INDENT> def get_query_set(self): <NEW_LINE> <INDENT> return super(StudentManager, self).get_query_set().filter( is_student=True) | Filter Person objects to those who take/took at least one 'true' course. | 62598f7d50485f2cf55da948 |
class AffiliationViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Affiliation.objects.all() <NEW_LINE> serializer_class = AffiliationSerializerV1 <NEW_LINE> permission_classes = [IsOwnerOrAuthReadOnly] <NEW_LINE> parser_classes = (JSONParser, MultiPartParser, ) | A simple viewSet for viewing Afflication of the given profile id.
create:
Create a new profile id's affliation.
update:
updating the existing profile id's affliation
list:
return the list of all existing profile id's affliation
retrieve:
return the given profile id's affliation
partial_update:
updating partial val... | 62598f7dbde94217f3707351 |
class OneLineTag(Element): <NEW_LINE> <INDENT> def render(self,file_out,cur_ind=''): <NEW_LINE> <INDENT> file_out.write(cur_ind+'<'+self.tag) <NEW_LINE> if self.kwargs != {}: <NEW_LINE> <INDENT> for style, name in self.kwargs.items(): <NEW_LINE> <INDENT> file_out.write(' '+style+'="'+name+'"') <NEW_LINE> <DEDENT> <DEDE... | Create a class for making a single line tag | 62598f7dfb3f5b602db47e9b |
class Graph(object): <NEW_LINE> <INDENT> def __init__(self, vertices=[], edges=[]): <NEW_LINE> <INDENT> self.vertices = set() <NEW_LINE> self.adjacent = {} <NEW_LINE> for v in vertices: <NEW_LINE> <INDENT> self.add_vertex(v) <NEW_LINE> <DEDENT> for v1, v2 in edges: <NEW_LINE> <INDENT> self.add_edge(v1, v2) <NEW_LINE> <... | Graph class | 62598f7d004d5f362081ece6 |
class Celsius: <NEW_LINE> <INDENT> def __init__(self, temperature=0): <NEW_LINE> <INDENT> self.temperature = temperature <NEW_LINE> <DEDENT> def to_fahrenheit(self): <NEW_LINE> <INDENT> return (self.temperature * 1.8) + 32 <NEW_LINE> <DEDENT> def get_temperature(self): <NEW_LINE> <INDENT> return self._temperature <NEW_... | property sample | 62598f7d29b78933be269dc6 |
class Status(object): <NEW_LINE> <INDENT> OK = httplib.OK <NEW_LINE> CREATED = httplib.CREATED <NEW_LINE> ACCEPTED = httplib.ACCEPTED <NEW_LINE> NO_CONTENT = httplib.NO_CONTENT <NEW_LINE> BAD_REQUEST = httplib.BAD_REQUEST <NEW_LINE> UNAUTHORIZED = httplib.UNAUTHORIZED <NEW_LINE> FORBIDDEN = httplib.FORBIDDEN <NEW_LINE>... | Result HTTP Status. | 62598f7d23e79379d538bed0 |
class TestDevfreqPower(BaseTestThermal): <NEW_LINE> <INDENT> def test_devfreq_inp_dataframe(self): <NEW_LINE> <INDENT> devfreq_in_power = trappy.Run().devfreq_in_power <NEW_LINE> self.assertTrue("freq" in devfreq_in_power.data_frame.columns) <NEW_LINE> <DEDENT> def test_devfreq_outp_dataframe(self): <NEW_LINE> <INDENT>... | Tests for the DevfreqInPower and DevfreqOutPower classes | 62598f7d1f5feb6acb16260b |
class TestingConfig(Config): <NEW_LINE> <INDENT> TESTING = True <NEW_LINE> DATABASE_URI = 'testing URL for the test DB' <NEW_LINE> DEBUG = True | Configurations for Testing, with a separate test
database. | 62598f7d9b70327d1c57e77b |
class FullBatchLBFGS(LBFGS): <NEW_LINE> <INDENT> def __init__(self, params, lr=1, history_size=10, line_search='Wolfe', dtype=torch.float, debug=False): <NEW_LINE> <INDENT> super(FullBatchLBFGS, self).__init__(params, lr, history_size, line_search, dtype, debug) <NEW_LINE> <DEDENT> def step(self, options=None): <NEW_LI... | Implements full-batch or deterministic L-BFGS algorithm. Compatible with
Powell damping. Can be used when evaluating a deterministic function and
gradient. Wraps the LBFGS optimizer. Performs the two-loop recursion,
updating, and curvature updating in a single step.
Implemented by: Hao-Jun Michael Shi and Dheevatsa Mud... | 62598f7e76d4e153a661c5e9 |
class GetMetricTypesArg(object): <NEW_LINE> <INDENT> def __init__(self, config=None): <NEW_LINE> <INDENT> self._pb = PbGetMetricTypesArg() <NEW_LINE> if isinstance(config, (list, tuple)): <NEW_LINE> <INDENT> self._config = ConfigMap(pb=self._pb.config, *config) <NEW_LINE> <DEDENT> elif isinstance(config, dict): <NEW_LI... | GetMetricTypesrArg
This is the arg for the RPC method GetMetricTypes.
Args:
config (:py:class:`snap_plugin.v1.config_map.ConfigMap`): config map. | 62598f7e73bcbd0ca4bc9c27 |
class AxiSlaveTimeout(BusBridge): <NEW_LINE> <INDENT> def __init__(self, intfCls, hdl_name_override:Optional[str]=None): <NEW_LINE> <INDENT> self.intfCls = intfCls <NEW_LINE> super(AxiSlaveTimeout, self).__init__(hdl_name_override=hdl_name_override) <NEW_LINE> <DEDENT> def _config(self): <NEW_LINE> <INDENT> self.TIMEOU... | Component witch has internal timeout for r/b channel and responds
with the error code if the slave does not respond in specified time
:note: blocks the overlapping transactions, it allows only
a single pending transaction per type
.. hwt-autodoc:: _example_AxiSlaveTimeout | 62598f7e711fe17d825e00c0 |
class OffCampusEvent(AbstractEvent): <NEW_LINE> <INDENT> class Meta(AbstractEvent.Meta): <NEW_LINE> <INDENT> verbose_name = '校外培训活动' <NEW_LINE> verbose_name_plural = '校外培训活动' <NEW_LINE> default_permissions = () | Events that are created by individual users. | 62598f7e82261d6c5272fbbf |
class UnregisteredEnv(Error): <NEW_LINE> <INDENT> pass | Raised when the user requests an env from the registry that does
not actually exist. | 62598f7e66656f66f7d59dcb |
class ListenerMixin(object): <NEW_LINE> <INDENT> _EVENTS = None <NEW_LINE> _WM_PROCESS = 0x410 <NEW_LINE> _WM_NOTIFICATIONS = [] <NEW_LINE> def suppress_event(self): <NEW_LINE> <INDENT> raise SystemHook.SuppressException() <NEW_LINE> <DEDENT> def _run(self): <NEW_LINE> <INDENT> self._message_loop = MessageLoop() <NEW_L... | A mixin for *win32* event listeners.
Subclasses should set a value for :attr:`_EVENTS` and implement
:meth:`_handle`.
Subclasses must also be decorated with a decorator compatible with
:meth:`pynput._util.NotifierMixin._receiver` or implement the method
``_receive()``. | 62598f7ea05bb46b3848a253 |
class EntityManagerTest(colony.Test): <NEW_LINE> <INDENT> def get_bundle(self): <NEW_LINE> <INDENT> return ( EntityManagerBaseTestCase, EntityManagerRsetTestCase ) <NEW_LINE> <DEDENT> def set_up(self, test_case): <NEW_LINE> <INDENT> colony.Test.set_up(self, test_case) <NEW_LINE> system = self.plugin.system <NEW_LINE> t... | The entity manager class. | 62598f7e287bf620b6271591 |
class Student: <NEW_LINE> <INDENT> def __init__(self, studentid, name, clockindate=None, room=None, clockintime=None, clockouttime=None): <NEW_LINE> <INDENT> self.studentid = studentid <NEW_LINE> self.name = name <NEW_LINE> self.clockindate = clockindate <NEW_LINE> self.room = room <NEW_LINE> self.clockintime = clockin... | Handles student objects populates StudentCollection | 62598f7ea4f1c619b294dfc5 |
class Pencil(tool.Tool): <NEW_LINE> <INDENT> x, y = 0, 0 <NEW_LINE> scribble = False <NEW_LINE> def select(self): <NEW_LINE> <INDENT> images = [resources.Pencil, resources.Pencil_scribble] <NEW_LINE> functions = [self.select_normal, self.select_scribble] <NEW_LINE> self.bg = tool.generate_button_row(images, functions) ... | Simple pencil tool | 62598f7eb57a9660fecd1456 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.