code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
@yaml_serializable <NEW_LINE> class MiniSse(NamedTuple): <NEW_LINE> <INDENT> is_sse: bool <NEW_LINE> console_compat: bool = False
A stripped-down Sse object.
62598f957cff6e4e811b56f6
class GitConnectionTestResult(object): <NEW_LINE> <INDENT> def __init__(self, id=None, status=None, message=None, can=None): <NEW_LINE> <INDENT> self.swagger_types = { 'id': 'str', 'status': 'str', 'message': 'str', 'can': 'dict(str, bool)' } <NEW_LINE> self.attribute_map = { 'id': 'id', 'status': 'status', 'message': ...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f9529b78933be269f49
class PeakRedshiftProxy(BaseProxy): <NEW_LINE> <INDENT> name = 'zmpeak_proxy' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.halo_params = ['mvir', 'mpeak_scale'] <NEW_LINE> <DEDENT> def __call__(self, halos, theta): <NEW_LINE> <INDENT> zcutoff = theta.pop('zcutoff', None) <NEW_LINE> if zcutoff is None: <NEW_L...
A pre-selection proxy that eliminates all halos whose peak mass redshift is above ``zcutoff``. The remaining halos are ranked by the present virial mass.
62598f95d99f1b3c44d05388
class plainformatter(baseformatter): <NEW_LINE> <INDENT> def __init__(self, ui, topic, opts): <NEW_LINE> <INDENT> baseformatter.__init__(self, ui, topic, opts) <NEW_LINE> if ui.debugflag: <NEW_LINE> <INDENT> self.hexfunc = hex <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.hexfunc = short <NEW_LINE> <DEDENT> <DEDEN...
the default text output scheme
62598f950a50d4780f7050af
class ManabaTaskStatus(ManabaModel): <NEW_LINE> <INDENT> def __init__(self, task_status: ManabaTaskStatusFlag, your_status: Optional[ManabaTaskYourStatusFlag]): <NEW_LINE> <INDENT> self._task_status = task_status <NEW_LINE> self._your_status = your_status <NEW_LINE> <DEDENT> def __str__(self) -> str: <NEW_LINE> <INDENT...
manaba タスク(小テスト・アンケート・レポート)のステータス
62598f95a219f33f346c64f3
class LearningAgent(Agent): <NEW_LINE> <INDENT> def __init__(self, env, learning=False, epsilon=1.0, alpha=0.5): <NEW_LINE> <INDENT> super(LearningAgent, self).__init__(env) <NEW_LINE> self.planner = RoutePlanner(self.env, self) <NEW_LINE> self.valid_actions = self.env.valid_actions <NEW_LINE> self.learning = learning ...
An agent that learns to drive in the Smartcab world. This is the object you will be modifying.
62598f950a50d4780f7050b0
class Log4py(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.logger = None <NEW_LINE> self.logMode = logging.DEBUG <NEW_LINE> <DEDENT> def init_config(self): <NEW_LINE> <INDENT> self.logger = logging.getLogger('clinicSoft') <NEW_LINE> self.logger.setLevel(self.logMode) <NEW_LINE> fh = logging....
clase utilizada para controlar el sistema de log de la aplicacion
62598f9523e79379d538c1da
class ColumnElement(ClauseElement, _CompareMixin): <NEW_LINE> <INDENT> __visit_name__ = 'column' <NEW_LINE> primary_key = False <NEW_LINE> foreign_keys = [] <NEW_LINE> quote = None <NEW_LINE> _label = None <NEW_LINE> @property <NEW_LINE> def _select_iterable(self): <NEW_LINE> <INDENT> return (self, ) <NEW_LINE> <DEDENT...
Represent an element that is usable within the "column clause" portion of a ``SELECT`` statement. This includes columns associated with tables, aliases, and subqueries, expressions, function calls, SQL keywords such as ``NULL``, literals, etc. :class:`.ColumnElement` is the ultimate base class for all such elements. ...
62598f95dd821e528d6d8c0d
class Command(BaseCommand): <NEW_LINE> <INDENT> help = _('Lists available Review Board extensions.') <NEW_LINE> def add_arguments(self, parser): <NEW_LINE> <INDENT> parser.add_argument( '--enabled', action='store_true', default=False, dest='list_enabled', help=_('List only enabled extensions')) <NEW_LINE> <DEDENT> def ...
Management command for listing extensions.
62598f95097d151d1a2c0cfb
class PublicUserApiTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.client = APIClient() <NEW_LINE> <DEDENT> def test_create_valid_user_success(self): <NEW_LINE> <INDENT> payload = { 'email': 'test@me.com', 'password': 'testpassword1234', 'name': 'Test Name' } <NEW_LINE> res = self.client....
Test the users api public
62598f95d53ae8145f918166
class Actor(nn.Module): <NEW_LINE> <INDENT> def __init__(self, pred_state_size, state_size, action_size, seed, fc1_units=600, fc2_units=300): <NEW_LINE> <INDENT> super(Actor, self).__init__() <NEW_LINE> self.seed = torch.manual_seed(seed) <NEW_LINE> self.fc1 = nn.Linear(pred_state_size + state_size, fc1_units) <NEW_LIN...
Actor (Policy) Model.
62598f95be8e80087fbbed37
class Bridge(Node): <NEW_LINE> <INDENT> def __init__(self, id='br0', *args, **kwargs): <NEW_LINE> <INDENT> require_cmd('brctl', 'Look for package bridge-utils in your package manager') <NEW_LINE> super(Bridge, self).__init__(id, *args, **kwargs) <NEW_LINE> if self.id in subprocess.check_output(['brctl', 'show']): <NEW_...
A Layer-2 hub
62598f9524f1403a9268571e
class DistributedObject(metaclass=DistributedObjectMetaclass): <NEW_LINE> <INDENT> id = Field(str) <NEW_LINE> owner = Field(str) <NEW_LINE> zone = Field(str) <NEW_LINE> def __init__(self, *, zone=None, **kwargs): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._deleted = False <NEW_LINE> self._dirty_field_data =...
A very simple implementation of the DistributedObjectMetaclass.
62598f95a8ecb03325870ee3
class Expand(BooleanOption, metaclass=OptionType): <NEW_LINE> <INDENT> option = 'expand' <NEW_LINE> requires = [] <NEW_LINE> excludes = [] <NEW_LINE> @classmethod <NEW_LINE> def default(cls): <NEW_LINE> <INDENT> return True
``expand`` option to polynomial manipulation functions.
62598f95009cb60464d011ff
class TestReadBoundaries: <NEW_LINE> <INDENT> def test_multisurface_reading(self): <NEW_LINE> <INDENT> boundaries = example_multisurface_with_semantics[0]["boundaries"] <NEW_LINE> surfaces = example_multisurface_with_semantics[0]["semantics"]["surfaces"] <NEW_LINE> values = example_multisurface_with_semantics[0]["seman...
A class to test the read_boundaries function
62598f950c0af96317c5605d
class BatchGenerator(object): <NEW_LINE> <INDENT> def __init__(self, X, y, shuffle=False): <NEW_LINE> <INDENT> if type(X) != np.ndarray: <NEW_LINE> <INDENT> X = np.asarray(X) <NEW_LINE> <DEDENT> if type(y) != np.ndarray: <NEW_LINE> <INDENT> y = np.asarray(y) <NEW_LINE> <DEDENT> self._X = X <NEW_LINE> self._y = y <NEW_L...
Construct a Data generator. The input X, y should be ndarray or list like type. Example: Data_train = BatchGenerator(X=X_train_all, y=y_train_all, shuffle=True) Data_test = BatchGenerator(X=X_test_all, y=y_test_all, shuffle=False) X = Data_train.X y = Data_train.y or: X_batch, y_batch = Data_tr...
62598f956e29344779b00334
class MultiRNNCell(core_rnn_cell.RNNCell): <NEW_LINE> <INDENT> def __init__(self, cells, state_is_tuple=True): <NEW_LINE> <INDENT> if not cells: <NEW_LINE> <INDENT> raise ValueError("Must specify at least one cell for MultiRNNCell.") <NEW_LINE> <DEDENT> self._cells = cells <NEW_LINE> <DEDENT> @property <NEW_LINE> def s...
RNN cell composed sequentially of multiple simple cells. Create a RNN cell composed sequentially of a number of RNNCells. Args: cells: list of RNNCells that will be composed in this order. Raises: ValueError: Cell state should be tuple of states
62598f95a17c0f6771d5bf15
class TimeoutException(Exception): <NEW_LINE> <INDENT> pass
Exception thrown when a running command exceeds the timeout value
62598f95b830903b9686e2e1
class VolumeMask(FSCommand): <NEW_LINE> <INDENT> _cmd = 'mris_volmask' <NEW_LINE> input_spec = VolumeMaskInputSpec <NEW_LINE> output_spec = VolumeMaskOutputSpec <NEW_LINE> def run(self, **inputs): <NEW_LINE> <INDENT> if self.inputs.copy_inputs: <NEW_LINE> <INDENT> self.inputs.subjects_dir = os.getcwd() <NEW_LINE> if 's...
Computes a volume mask, at the same resolution as the <subject>/mri/brain.mgz. The volume mask contains 4 values: LH_WM (default 10), LH_GM (default 100), RH_WM (default 20), RH_GM (default 200). The algorithm uses the 4 surfaces situated in <subject>/surf/ [lh|rh].[white|pial] and labels voxels based on the signed-di...
62598f9599cbb53fe6830baa
class michaelTest(ScriptedLoadableModuleTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> slicer.mrmlScene.Clear(0) <NEW_LINE> <DEDENT> def runTest(self): <NEW_LINE> <INDENT> self.setUp() <NEW_LINE> self.test_michael1() <NEW_LINE> <DEDENT> def test_michael1(self): <NEW_LINE> <INDENT> alphaFids = slicer.vt...
This is the test case for your scripted module. Uses ScriptedLoadableModuleTest base class, available at: https://github.com/Slicer/Slicer/blob/master/Base/Python/slicer/ScriptedLoadableModule.py
62598f95097d151d1a2c0cfc
class RollingSpearman(_RollingCorrelation): <NEW_LINE> <INDENT> def compute(self, today, assets, out, factor_data, slice_data): <NEW_LINE> <INDENT> slice_data_column = slice_data[:, 0] <NEW_LINE> for i in range(len(out)): <NEW_LINE> <INDENT> out[i] = spearmanr(factor_data[:, i], slice_data_column)[0]
A Factor that computes spearman rank correlation coefficients between a single column of data and the columns of another Factor. Parameters ---------- target_factor : zipline.pipeline.factors.Factor The factor for which to compute correlations of each of its columns with `target_slice`. target_slice : zipline....
62598f957047854f4633f0bb
class Motor(pygame.sprite.Sprite): <NEW_LINE> <INDENT> def __init__(self, speed = 0, engine_state = True): <NEW_LINE> <INDENT> super(Motor, self).__init__() <NEW_LINE> if speed > 11 : <NEW_LINE> <INDENT> speed = 11 <NEW_LINE> <DEDENT> if speed < -11 : <NEW_LINE> <INDENT> speed = -11 <NEW_LINE> <DEDENT> self.speed = spe...
docstring for Car
62598f95a219f33f346c64f5
class Post(models.Model): <NEW_LINE> <INDENT> user = models.ForeignKey(User, on_delete=models.CASCADE) <NEW_LINE> title = models.CharField(max_length=255) <NEW_LINE> photo = models.ImageField(upload_to='posts/photos') <NEW_LINE> created = models.DateTimeField(auto_now_add=True) <NEW_LINE> modified = models.DateTimeFiel...
Post model.
62598f954e4d5625663720fc
class My_Subreddits_Listing(Listing): <NEW_LINE> <INDENT> def __init__(self,generator): <NEW_LINE> <INDENT> super().__init__( "Your suscribed Subreddits:", "subreddits>", generator ) <NEW_LINE> <DEDENT> def format_count(self,count): <NEW_LINE> <INDENT> if count>9999999: <NEW_LINE> <INDENT> return str(count//1000000)+"M...
Listing of the user's subscribed subreddits
62598f9576e4537e8c3ef28e
class Printer(object): <NEW_LINE> <INDENT> printers = {} <NEW_LINE> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.visible = False <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def get(cls, name, window_id=None): <NEW_LINE> <INDENT> if not window_id: window_id = sublime.active_window().id(...
Based on printer of Mavensmate
62598f950a50d4780f7050b2
class DistrictTypeResultsObject(AbstractCiceroObject): <NEW_LINE> <INDENT> def __init__(self, district_type_result_dict): <NEW_LINE> <INDENT> self.district_types = [DistrictTypeObject(dt) for dt in district_type_result_dict['district_types']]
# DistrictTypeResultsObject The DistrictTypeResultsObject is a container for a list of DistrictTypeObjects. [Cicero documentation](https://cicero.azavea.com/docs/district_type.html) ## Available Attributes: + .district_types (list of DistrictTypeObjects) ### Nongeocoded response structure: + response + r...
62598f95c432627299fa2caf
class ClientMixin: <NEW_LINE> <INDENT> @call(protocol.Hello) <NEW_LINE> def hello(self): <NEW_LINE> <INDENT> assert False <NEW_LINE> <DEDENT> @call(protocol.Exists) <NEW_LINE> def exists(self): <NEW_LINE> <INDENT> assert False <NEW_LINE> <DEDENT> @call(protocol.WhoMaster) <NEW_LINE> def who_master(self): <NEW_LINE> <IN...
Mixin providing client actions for standard cluster functionality This can be mixed into any class implementing :class:`AbstractClient`.
62598f95cb5e8a47e493bfe1
class Wavecar: <NEW_LINE> <INDENT> def __init__(self, kb_array, wavefunctions, ngrid_factor): <NEW_LINE> <INDENT> self.kb_array = kb_array <NEW_LINE> self.wavefunctions = wavefunctions <NEW_LINE> self.ngrid_factor = ngrid_factor <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def from_file(filepath, kb_array, ngrid_factor...
Class that reads VASP WAVECAR files
62598f95bd1bec0571e14f32
class TaurusTreeSimpleDeviceItem(TaurusTreeDbBaseItem): <NEW_LINE> <INDENT> def hasChildren(self): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def childCount(self): <NEW_LINE> <INDENT> return 0 <NEW_LINE> <DEDENT> def data(self, index): <NEW_LINE> <INDENT> column, model = index.column(), index.model() <NEW_LIN...
A node designed to represent a device (without any child nodes)
62598f959c8ee8231303ffdc
class SuperDuperManager: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._cars = {} <NEW_LINE> <DEDENT> def add_car(self, id_, fuel): <NEW_LINE> <INDENT> if id_ not in self._cars: <NEW_LINE> <INDENT> self._cars[id_] = Car(id_, fuel) <NEW_LINE> <DEDENT> <DEDENT> def move_car(self, id_, new_x, new_y): <N...
A class responsible for keeping track of all cars in the system. === Private Attributes === @type _cars: dict[str, Car] A map of unique string identifiers to the corresponding Car. For example, _cars['a01'] would be a Car object corresponding to the id 'a01'.
62598f9530bbd722464697e4
class MigrationSettings(Updateable, NavigatableMixin): <NEW_LINE> <INDENT> def __init__(self, appliance): <NEW_LINE> <INDENT> self.appliance = appliance <NEW_LINE> <DEDENT> @property <NEW_LINE> def migration_throttling(self): <NEW_LINE> <INDENT> return MigrationThrottling(self.appliance, self)
Migration Settings page that has throttling tab
62598f953c8af77a43b67da9
class _NativeWindowWin32(object): <NEW_LINE> <INDENT> def __init__(self, windowHandle, _win32=None): <NEW_LINE> <INDENT> self._handle = windowHandle <NEW_LINE> try: <NEW_LINE> <INDENT> from shellfash.view.native.Win32API import Win32API <NEW_LINE> self._win32 = _win32 or Win32API() <NEW_LINE> <DEDENT> except ValueError...
Class representing a native window in the Microsoft Windows operating system. Use NativeWindow instead of using this class directly. Performs actions on native windows that are not explicitly built into Python or other cross-platform libraries that could be found.
62598f95e76e3b2f99fd870f
class Category(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=15)
Categories organize WeakAuras into related groups. Examples would be "Abilities", "Buff/Debuff Timers"
62598f9556b00c62f0fb258c
class UserViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = User.objects.all().order_by('date_joined') <NEW_LINE> serializer_class = UserSerializer
API endpoint that allows users to be viewed
62598f95d6c5a102081e1e1f
class License(File): <NEW_LINE> <INDENT> indirect = BooleanField(required=True) <NEW_LINE> text = StringField() <NEW_LINE> def create_or_update(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> licenses = [license.strip("\"").strip() for license in self.licenses] <NEW_LINE> existing_document = Documents.License.objec...
A License document contains the path to a file with the complete text for a license. If :attr:`indirect` is true, the file doesn't contain the whole text but rather a text referencing the license. License names are cleaned - stripped of string delimiters (") and extra whitespace before saving them in db.
62598f95f7d966606f747cc0
class TemperatureType(models.Model): <NEW_LINE> <INDENT> temprature_type = models.CharField(null=True, blank=True, max_length=100) <NEW_LINE> country = models.ForeignKey(Country, on_delete=models.CASCADE) <NEW_LINE> created_at = models.DateTimeField(default=timezone.now)
docstring for Country
62598f95f8510a7c17d7dfe5
class StringSeriesWeld: <NEW_LINE> <INDENT> def __init__(self, expr, weld_type, df=None, column_name=None): <NEW_LINE> <INDENT> self.expr = expr <NEW_LINE> self.weld_type = weld_type <NEW_LINE> self.dim = 1 <NEW_LINE> self.df = df <NEW_LINE> self.column_name = column_name <NEW_LINE> <DEDENT> def slice(self, start, size...
Summary Attributes: column_name (TYPE): Description df (TYPE): Description dim (int): Description expr (TYPE): Description weld_type (TYPE): Description
62598f9567a9b606de545cb0
class UsgsProcessor(SabxProcessor): <NEW_LINE> <INDENT> def get_template_data(self): <NEW_LINE> <INDENT> SabxProcessor.get_template_data(self) <NEW_LINE> count = 0 <NEW_LINE> for seg in self.template_data['seg_list']: <NEW_LINE> <INDENT> for pt in seg.waypoints: <NEW_LINE> <INDENT> pt.usgs = get_usgs(pt.lat, pt.lon) <N...
Add USGS elevations to all the points in an SABX 1.0 file.
62598f9526068e7796d4c63d
class TestRandoms( ): <NEW_LINE> <INDENT> def test_builtin(self): <NEW_LINE> <INDENT> num_tests = 10000 <NEW_LINE> vals = [0 for i in range(10)] <NEW_LINE> for i in range(num_tests): <NEW_LINE> <INDENT> tmp = random.randint(0, 9) <NEW_LINE> vals[tmp] = vals[tmp] + 1 <NEW_LINE> <DEDENT> chi2, p = scipy.stats.chisquare(s...
This is the main class. Normally it would hold all the tests, plus and setup and teardown fixtures.
62598f9510dbd63aa1c70891
class GclientUtilsUnittest(GclientUtilBase): <NEW_LINE> <INDENT> def testMembersChanged(self): <NEW_LINE> <INDENT> members = [ 'Annotated', 'AutoFlush', 'CheckCallAndFilter', 'CheckCallAndFilterAndHeader', 'Error', 'ExecutionQueue', 'FileRead', 'FileWrite', 'FindFileUpwards', 'FindGclientRoot', 'GetGClientRootAndEntrie...
General gclient_utils.py tests.
62598f95379a373c97d98cee
class Fixture(object): <NEW_LINE> <INDENT> __metaclass__ = registry.make_registry_metaclass(_FIXTURES) <NEW_LINE> REGISTERED_NAME = "Fixture" <NEW_LINE> def __init__(self, logger, job_num, dbpath_prefix=None): <NEW_LINE> <INDENT> if not isinstance(logger, logging.Logger): <NEW_LINE> <INDENT> raise TypeError("logger mus...
Base class for all fixtures.
62598f95851cf427c66b7fa2
class Meta: <NEW_LINE> <INDENT> model = NewsItem <NEW_LINE> fields = ('id', 'source_id', 'title', 'author', 'picture_url', 'summary', 'story','news_item_source', 'article_url')
meta for the model and fields that the serializer class will use
62598f953cc13d1c6d465449
class EntryIndex(EntryArchiveMixin, EntryQuerysetArchiveTodayTemplateResponseMixin, BaseArchiveIndexView): <NEW_LINE> <INDENT> context_object_name = 'entry_list'
View returning the archive index.
62598f950fa83653e46f4bc5
class VFunction(chainer.Chain): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(VFunction, self).__init__( v_fc1=L.Linear(200, 100), v_fc2=L.Linear(100, 1)) <NEW_LINE> <DEDENT> def __call__(self, x, test=False): <NEW_LINE> <INDENT> h = F.relu(self.v_fc1(x)) <NEW_LINE> h = F.relu(self.v_fc2(h)) <NEW_LI...
V関数部分のネットワーク
62598f954527f215b58e9bc0
class TestCaesarCipher(unittest.TestCase): <NEW_LINE> <INDENT> def test_encrypt_with_one_shift_right(self): <NEW_LINE> <INDENT> cipher = "abcdefghijklmnopqrstuvwxyz " <NEW_LINE> plaintext = "no more segrets" <NEW_LINE> assert_that("mnzlnqdzrdfqdsr", equal_to(encrypt(plaintext, cipher, 1))) <NEW_LINE> <DEDENT> def test_...
Testing caesar cipher.
62598f959b70327d1c57ea7e
class test_async03(wttest.WiredTigerTestCase): <NEW_LINE> <INDENT> table_name1 = 'test_async03' <NEW_LINE> conn_config = 'async=(ops_max=50,threads=3)' <NEW_LINE> def test_ops(self): <NEW_LINE> <INDENT> tablearg = 'table:' + self.table_name1 <NEW_LINE> self.session.create(tablearg, 'key_format=S,value_format=S') <NEW_L...
Test basic operations
62598f95498bea3a75a577fc
class StateMoveTowards(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self
Constructor
62598f95adb09d7d5dc0a264
class Bib75x(db.Model): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> __tablename__ = 'bib75x' <NEW_LINE> id = db.Column(db.MediumInteger(8, unsigned=True), primary_key=True, autoincrement=True) <NEW_LINE> tag = db.Column(db.String(6), nullable=False, index=True, server_default=''...
Represents a Bib75x record.
62598f95a17c0f6771d5bf17
class SSHClient(object): <NEW_LINE> <INDENT> def __init__(self, c_path=os.path.join(syspaths.CONFIG_DIR, 'master'), mopts=None): <NEW_LINE> <INDENT> if mopts: <NEW_LINE> <INDENT> self.opts = mopts <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> if os.path.isdir(c_path): <NEW_LINE> <INDENT> log.warning( '{0} expects a fil...
Create a client object for executing routines via the salt-ssh backend
62598f9545492302aabfc1b5
class ServiceBindingError(Exception): <NEW_LINE> <INDENT> def __init__(self, vcap_services, message): <NEW_LINE> <INDENT> self.expression = vcap_services <NEW_LINE> self.message = message
Exception raised for errors binding to a service Attributes: vcap_services -- input expression in which the error occurred message -- explanation of the error
62598f95379a373c97d98cef
class Tray(BaseModel): <NEW_LINE> <INDENT> identifier = models.UUIDField(null=True)
A tray (also known as a 1020 flat) holds the product. You can find a really good tray from the Bootstrap Farmer: https://www.bootstrapfarmer.com/products/1020-trays-multi-color?variant=302800109582
62598f95d99f1b3c44d0538c
class UseCaseBase(UCBase): <NEW_LINE> <INDENT> def __init__(self, tc_conf, global_config): <NEW_LINE> <INDENT> UCBase.__init__(self, tc_conf, global_config)
Base class for all use case implementation
62598f957047854f4633f0bd
class S3BucketInfo(ComponentInfo): <NEW_LINE> <INDENT> implements(IS3BucketInfo) <NEW_LINE> adapts(S3Bucket) <NEW_LINE> creation_date = ProxyProperty('creation_date') <NEW_LINE> @property <NEW_LINE> @info <NEW_LINE> def account(self): <NEW_LINE> <INDENT> return self._object.device()
API Info adapter factory for S3Bucket.
62598f954428ac0f6e658207
class CPWSGIServer(wsgiserver.CherryPyWSGIServer): <NEW_LINE> <INDENT> def __init__(self, server_adapter=cherrypy.server): <NEW_LINE> <INDENT> self.server_adapter = server_adapter <NEW_LINE> self.max_request_header_size = self.server_adapter.max_request_header_size or 0 <NEW_LINE> self.max_request_body_size = self.serv...
Wrapper for wsgiserver.CherryPyWSGIServer. wsgiserver has been designed to not reference CherryPy in any way, so that it can be used in other frameworks and applications. Therefore, we wrap it here, so we can set our own mount points from cherrypy.tree and apply some attributes from config -> cherrypy.server -> wsgise...
62598f9576e4537e8c3ef290
class MemMapped(object): <NEW_LINE> <INDENT> def __init__(self, fid, lock): <NEW_LINE> <INDENT> self.mm = mmap.mmap(fid, 0) <NEW_LINE> self._lock = lock <NEW_LINE> <DEDENT> def lock(self): <NEW_LINE> <INDENT> self._lock.acquire() <NEW_LINE> <DEDENT> def unlock(self): <NEW_LINE> <INDENT> self._lock.release() <NEW_LINE> ...
Reads and writes data from mem-mapped file
62598f9523e79379d538c1de
class ListActiveAnnouncements(ListAPIView): <NEW_LINE> <INDENT> queryset = Announcements.objects.filter(status='active') <NEW_LINE> permission_classes = [AllowAny] <NEW_LINE> serializer_class = AnnouncementsListSerializer
Список всех объявлений доступный для просмотра всем
62598f9560cbc95b06364025
class Cloner(object): <NEW_LINE> <INDENT> def clone(cls, original): <NEW_LINE> <INDENT> type = original.__class__ <NEW_LINE> clone = type.__new__(type) <NEW_LINE> clone.__init__() <NEW_LINE> return clone <NEW_LINE> <DEDENT> clone = classmethod(clone)
An object used to clone other objects.
62598f95627d3e7fe0e06b85
class MyRange(): <NEW_LINE> <INDENT> def __init__(self, start, end): <NEW_LINE> <INDENT> self.start = start <NEW_LINE> self.end = end <NEW_LINE> self.pos = self.start <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> self.pos = self.start <NEW_LINE> return self <NEW_LINE> <DEDENT> def __next__(self): <NEW_LIN...
An iterable AND iterator class
62598f95b7558d589546330b
class Action65(Action): <NEW_LINE> <INDENT> def execute(self, instance): <NEW_LINE> <INDENT> raise NotImplementedError('%s not implemented' % ( self.__class__.__name__))
On Draw Changes->Set Leading of Current Line... Parameters: 0: Enter Leading (EXPRESSION, ExpressionParameter)
62598f95dd821e528d6d8c11
class OAuth2RequestValidator(provider.OAuth2RequestValidator): <NEW_LINE> <INDENT> def __init__(self, app): <NEW_LINE> <INDENT> from flaskapp.app.app.modules.oauth.models import OAuth2Client, OAuth2Grant, OAuth2Token <NEW_LINE> self._client_class = OAuth2Client <NEW_LINE> self._grant_class = OAuth2Grant <NEW_LINE> self...
A project-specific implementation of OAuth2RequestValidator, which connects our User and OAuth2* implementations together.
62598f958e7ae83300ee8d7a
class TfExampleDetectionAndGTParser(data_parser.DataToNumpyParser): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.items_to_handlers = { fields.DetectionResultFields.key: StringParser(fields.TfExampleFields.source_id), fields.InputDataFields.groundtruth_boxes: (BoundingBoxParser( fields.TfExampleField...
Tensorflow Example proto parser.
62598f9573bcbd0ca4bc9f36
class Thing(WADStruct): <NEW_LINE> <INDENT> _flags_ = [ ("easy", 1), ("medium", 1), ("hard", 1), ("deaf", 1), ("multiplayer", 1) ] <NEW_LINE> _fields_ = [ ("x", ctypes.c_int16), ("y", ctypes.c_int16), ("angle", ctypes.c_uint16), ("type", ctypes.c_uint16), ("flags", WADFlags(_flags_)) ...
Represents a map thing.
62598f95d53ae8145f91816a
class PointAdder(EdgePropogator): <NEW_LINE> <INDENT> def __init__(self, point_node, **kwargs): <NEW_LINE> <INDENT> super(PointAdder, self).__init__(name=point_node, **kwargs) <NEW_LINE> self.point = point_node <NEW_LINE> self.geom = Point(point_node.geom) <NEW_LINE> self.seen = set() <NEW_LINE> <DEDENT> def on_default...
point_node Node with geom such that intersects an edge that edge will be split by the point_to add
62598f953617ad0b5ee05e2a
class Station(PathElement): <NEW_LINE> <INDENT> geometry = Field('Point', required=True) <NEW_LINE> def __init__(self, objDict, **kwargs): <NEW_LINE> <INDENT> kwargs['schemaParams'] = kwargs['schema'].stationParamsLookup <NEW_LINE> super(Station, self).__init__(objDict, **kwargs)
Implements the Station type from the XPJSON spec.
62598f9524f1403a92685720
@dataclass <NEW_LINE> class RestBinarySensorDescription(RestEntityDescription, BinarySensorEntityDescription): <NEW_LINE> <INDENT> pass
Class to describe a REST binary sensor.
62598f954a966d76dd5eebbe
class ListTicketsByUserResultSet(ResultSet): <NEW_LINE> <INDENT> def getJSONFromString(self, str): <NEW_LINE> <INDENT> return json.loads(str) <NEW_LINE> <DEDENT> def get_Response(self): <NEW_LINE> <INDENT> return self._output.get('Response', None) <NEW_LINE> <DEDENT> def get_NextPage(self): <NEW_LINE> <INDENT> return s...
A ResultSet with methods tailored to the values returned by the ListTicketsByUser Choreo. The ResultSet object is used to retrieve the results of a Choreo execution.
62598f9507d97122c421698f
class TestOccurrences(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 testOccurrences(self): <NEW_LINE> <INDENT> pass
Occurrences unit test stubs
62598f95baa26c4b54d4ef8d
class RequiredPackageNotInstalledError(SetupError): <NEW_LINE> <INDENT> pass
Error related to required package not installed.
62598f95fff4ab517ebcd4cb
class AdminUser(utils.BaseModelView): <NEW_LINE> <INDENT> column_sortable_list = ['email'] <NEW_LINE> column_list = ['email'] <NEW_LINE> form = forms.AdminUserForm <NEW_LINE> def create_model(self, form): <NEW_LINE> <INDENT> form.password.data = generate_password_hash(form.password.data) <NEW_LINE> return super(AdminUs...
Custom flask-admin blueprint for AdminUser
62598f954e4d5625663720ff
class ObjectStoreTestCase(CompatTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(ObjectStoreTestCase, self).setUp() <NEW_LINE> self._repo = import_repo('server_new.export') <NEW_LINE> self.addCleanup(tear_down_repo, self._repo) <NEW_LINE> <DEDENT> def _run_git(self, args): <NEW_LINE> <INDENT> r...
Tests for git repository compatibility.
62598f95fbf16365ca793d93
class Xid(object): <NEW_LINE> <INDENT> def __init__(self, format_id, global_transaction_id, branch_qualifier): <NEW_LINE> <INDENT> self.format_id = format_id <NEW_LINE> self.global_transaction_id = global_transaction_id <NEW_LINE> self.branch_qualifier = branch_qualifier
Represent a transaction identifier compliant with the XA specification.
62598f95009cb60464d01202
class PrivateLessonCustomer(models.Model): <NEW_LINE> <INDENT> customer = models.ForeignKey(Customer,verbose_name=_('Customer')) <NEW_LINE> lesson = models.ForeignKey(PrivateLessonEvent,verbose_name=_('Lesson')) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return str(_('Private lesson customer: %s for lesson #%s' ...
For private lessons that go through registration and payment, the customers are the individuals who are registered. For private lessons that are booked without payment, this just provides a record that they signed up for the lesson.
62598f957b25080760ed717f
class ToyMontezumaRevengeEnv(gym.Env): <NEW_LINE> <INDENT> action_space = gym.spaces.Discrete(5) <NEW_LINE> observation_space = gym.spaces.Box(low=0, high=1, shape=[11, 11, 5], dtype=np.uint8) <NEW_LINE> def _to_obs(self, observation): <NEW_LINE> <INDENT> hallway = observation.layers[' '] | observation.layers['.'] | ob...
Wrapper to adapt to OpenAI's gym interface.
62598f9532920d7e50bc5d3f
class CartViewlet(ViewletBase): <NEW_LINE> <INDENT> def render(self): <NEW_LINE> <INDENT> if self.request.URL.split('/')[-1] != 'review-cart': <NEW_LINE> <INDENT> return '<div class="jaz-shop-cart-wrapper"></div>' <NEW_LINE> <DEDENT> return ''
Display the shopping cart in the site header
62598f95498bea3a75a577fe
class TraitAdapter(ABCAdapter): <NEW_LINE> <INDENT> def get_input_tree(self): <NEW_LINE> <INDENT> traited = TestTrait() <NEW_LINE> traited.trait.bound = 'attributes-only' <NEW_LINE> return traited.interface['attributes'] <NEW_LINE> <DEDENT> def get_output(self): <NEW_LINE> <INDENT> return [] <NEW_LINE> <DEDENT> def lau...
Adapter for tests, using a traited defined interface.
62598f956fb2d068a7693ca2
class UserAbort(Exception): <NEW_LINE> <INDENT> pass
Exception is raised if user decides to abort.
62598f95b57a9660fecd1759
class GenericObject(Widget): <NEW_LINE> <INDENT> @decorate_constructor_parameter_types([str]) <NEW_LINE> def __init__(self, filename, **kwargs): <NEW_LINE> <INDENT> super(GenericObject, self).__init__(**kwargs) <NEW_LINE> self.type = 'object' <NEW_LINE> self.attributes['data'] = filename
GenericObject widget - allows to show embedded object like pdf,swf..
62598f952ae34c7f260aadc2
class NetstringParser(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.results = [] <NEW_LINE> self.reset() <NEW_LINE> return <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT> self._data = '' <NEW_LINE> self._length = 0 <NEW_LINE> self._parse = self._parse_len <NEW_LINE> return <NEW_LINE...
Decodes a netstring to a list of Python strings. >>> parser = NetstringParser() >>> parser.feed('3:456,') >>> parser.results ['456'] >>> NetstringParser.parse('3:abc,4:defg,') ['abc', 'defg']
62598f9582261d6c5272fd46
class Identity(BasicAccessionMixin): <NEW_LINE> <INDENT> name = models.CharField(max_length=255, **opt) <NEW_LINE> part_of = models.ForeignKey('IdentitySystem', on_delete=models.CASCADE, related_name='identities') <NEW_LINE> confidence = models.FloatField(default=1.0, blank=True, null=True) <NEW_LINE> concepts = models...
An identity proposition about a set of concepts.
62598f950c0af96317c56062
class PrettyJsonCommand(PrettyJsonBaseCommand, sublime_plugin.TextCommand): <NEW_LINE> <INDENT> def run(self, edit): <NEW_LINE> <INDENT> self.view.erase_regions('json_errors') <NEW_LINE> for region in self.view.sel(): <NEW_LINE> <INDENT> selected_entire_file = False <NEW_LINE> if region.empty() and s.get("use_entire_fi...
Pretty Print JSON
62598f95596a89723612795d
class XenapiMock(mock.Mock): <NEW_LINE> <INDENT> @property <NEW_LINE> def pool(self): <NEW_LINE> <INDENT> return XenapiPoolMock() <NEW_LINE> <DEDENT> @property <NEW_LINE> def host(self): <NEW_LINE> <INDENT> return XenapiHostMock() <NEW_LINE> <DEDENT> @property <NEW_LINE> def host_metrics(self): <NEW_LINE> <INDENT> retu...
session.xenapi lib mock class. As all lib are referred from session.xenapi, this needs to be mocked. This only replicate all required xenapi component as properties.
62598f95a17c0f6771d5bf1a
class VirtualMachineScaleSetVMExtensionsSummary(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'name': {'readonly': True}, 'statuses_summary': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'statuses_summary': {'key': 'statusesSummary', 'type': '[VirtualMac...
Extensions summary for virtual machines of a virtual machine scale set. Variables are only populated by the server, and will be ignored when sending a request. :ivar name: The extension name. :vartype name: str :ivar statuses_summary: The extensions information. :vartype statuses_summary: list[~azure.mgmt.compute.v2...
62598f9521a7993f00c65c5e
class ZoneAirContaminantBalance(DataObject): <NEW_LINE> <INDENT> _schema = {'extensible-fields': OrderedDict(), 'fields': OrderedDict([(u'carbon dioxide concentration', {'name': u'Carbon Dioxide Concentration', 'pyname': u'carbon_dioxide_concentration', 'default': u'No', 'required-field': False, 'autosizable': False, '...
Corresponds to IDD object `ZoneAirContaminantBalance` Determines which contaminant concentration will be simulates.
62598f9523e79379d538c1e0
class EntryActorCache(object): <NEW_LINE> <INDENT> def __init__(self, entry_or_id, pattern): <NEW_LINE> <INDENT> self.__r = redis.StrictRedis(connection_pool=BLOG_REDIS_CONN_POOL) <NEW_LINE> self.__entry = entry_adapter.adapt(entry_or_id) <NEW_LINE> self.__key = pattern % self.__entry.id <NEW_LINE> <DEDENT> @property <...
Cache key of entry's actor.
62598f95cc0a2c111447acf4
class PeriodicalRenewal(threading.Thread): <NEW_LINE> <INDENT> @typed <NEW_LINE> def __init__(self, servers: collections.abc.Set, key_store: MasterKeyStore, interval: datetime.timedelta, bits: int=2048, start: bool=True): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.servers = servers <NEW_LINE> self.key_store...
Periodically renew the master key in the separated background thread. :param servers: servers to renew the master key. every element has to be an instance of :class:`~.remote.Remote` :type servers: :class:`collections.abc.Set` :param key_store: the master key store to update :type key_s...
62598f953eb6a72ae038a31b
class TestReadSdsFromXRiteFile(unittest.TestCase): <NEW_LINE> <INDENT> def test_read_sds_from_xrite_file(self): <NEW_LINE> <INDENT> colour_checker_xrite = os.path.join( RESOURCES_DIRECTORY, "X-Rite_Digital_Colour_Checker.txt" ) <NEW_LINE> sds = read_sds_from_xrite_file(colour_checker_xrite) <NEW_LINE> for sd in sds.val...
Define :func:`colour.io.xrite.read_sds_from_xrite_file` definition unit tests methods.
62598f9530dc7b766599f531
class TagMultiMethods(ast.NodeVisitor): <NEW_LINE> <INDENT> def __init__(self, spec): <NEW_LINE> <INDENT> self.spec = spec <NEW_LINE> self.methods = {} <NEW_LINE> <DEDENT> def visit_FunctionDef(self, node): <NEW_LINE> <INDENT> nodes = self.methods.setdefault(node.name, []) <NEW_LINE> if node.decorator_list: <NEW_LINE> ...
Tag @when-decorated methods in a spec.
62598f9538b623060ffa8d6b
class PythonValuesTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def test_optimizeflag(self): <NEW_LINE> <INDENT> opt = c_int.in_dll(pythonapi, "Py_OptimizeFlag").value <NEW_LINE> self.assertEqual(opt, sys.flags.optimize) <NEW_LINE> <DEDENT> def test_frozentable(self): <NEW_LINE> <INDENT> class struct_frozen(Structur...
This test only works when python itself is a dll/shared library
62598f9507f4c71912baf12a
@graphql_interface('Character', 'A character in the Star Wars Trilogy') <NEW_LINE> @graphql_attr_field( 'character_id', 'id', 'String!', 'The id of the character.') <NEW_LINE> @graphql_attr_field('name', 'name', 'String', 'The name of the character.') <NEW_LINE> @graphql_attr_field( 'appears_in', 'appearsIn', '[Episode...
A character in the Star Wars universe. Public attributes: list<int> appears_in - A list of the SwEpisode constants indicating the films of the original trilogy in which the character appears, in chronological order. basestring character_id - The ID of the character. basestring name - The name of the character...
62598f95cb5e8a47e493bfe3
class HelloApiView(APIView): <NEW_LINE> <INDENT> serializer_class = serializers.HelloSerializer <NEW_LINE> def get(self, request, format=None): <NEW_LINE> <INDENT> an_apiview = [ 'Uses HTTP methods as functions (get, post, patch, put, delete)', 'Is similar to a traditional Django View', 'Gives you the most control over...
Test API View
62598f958da39b475be02ec2
class TestFilterListPhoneNumbersRegions(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 testFilterListPhoneNumbersRegions(self): <NEW_LINE> <INDENT> pass
FilterListPhoneNumbersRegions unit test stubs
62598f951f037a2d8b9e3dc2
class Database(object): <NEW_LINE> <INDENT> def __init__(self, db_file): <NEW_LINE> <INDENT> self.db_file = db_file <NEW_LINE> self.rand = random.Random() <NEW_LINE> self.rand.seed() <NEW_LINE> pass <NEW_LINE> <DEDENT> def read(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def write(self, fortune): <NEW_LINE> <IN...
Class containing a database implementation.
62598f9524f1403a92685721
class MyUserAgentMiddleware(UserAgentMiddleware): <NEW_LINE> <INDENT> def __init__(self, user_agent): <NEW_LINE> <INDENT> self.user_agent = user_agent <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_crawler(cls, crawler): <NEW_LINE> <INDENT> return cls( user_agent=crawler.settings.get('USER_AGENT_POOLS') ) <NEW_LI...
randomly set user-agent
62598f95baa26c4b54d4ef8f
class CNN_Simple(Base_Learner): <NEW_LINE> <INDENT> def __init__(self, learning_rate=0.0001, hidden_neurons=(1000,), dropout=(0.5,), feature_dropout=0.5, n_classes=15, use_spatial_pooling=False, pool_dims=[2, 1], size=28): <NEW_LINE> <INDENT> Base_Learner.__init__(self) <NEW_LINE> input_var = T.ftensor4('inputs') <NEW...
Implements the baseline models (CNN and SPP)
62598f951b99ca400228f39c
class ProductionFluentAPISelector(FluentAPISelector): <NEW_LINE> <INDENT> def __init__( self, plotting: ABCElementPlotting, agg: ResultAnalyzer, network: str, name: str, node: str, kind: str, ): <NEW_LINE> <INDENT> FluentAPISelector.__init__(self, plotting, agg) <NEW_LINE> self.name = name <NEW_LINE> self.node = node <...
Production level of fluent api
62598f95a8ecb03325870ee9
class IdentitySet(object): <NEW_LINE> <INDENT> index_is_efficient = True <NEW_LINE> __slots__ = ['len'] <NEW_LINE> def __init__(self, len): <NEW_LINE> <INDENT> self.len = len <NEW_LINE> <DEDENT> def __repr__(self): return 'IdentitySet(%d)' % (self.len,) <NEW_LINE> def __len__(self): return self.len <NEW_LINE> def __get...
An object that behaves like an :class:`OrderedSet`, but simply contains the range of numbers up to *len*. Thus, every number is its own index. IdentitySets were used in Divisi1 classes to label :class:`Tensors <divisi.tensor.Tensor>` on axes where labels would be meaningless or unnecessary. In Divisi2, using "None" a...
62598f95d7e4931a7ef3bd83
@ddt.ddt <NEW_LINE> @unittest.skip <NEW_LINE> class CrossStoreXMLRoundtrip(unittest.TestCase): <NEW_LINE> <INDENT> perf_test = True <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> super(CrossStoreXMLRoundtrip, self).setUp() <NEW_LINE> self.export_dir = mkdtemp() <NEW_LINE> self.addCleanup(rmtree, self.export_dir, ignor...
This class exists to time XML import and export between different modulestore classes with different amount of asset metadata.
62598f9599cbb53fe6830baf
class makeDictionary: <NEW_LINE> <INDENT> def __init__(self, filename): <NEW_LINE> <INDENT> self.filename = filename <NEW_LINE> <DEDENT> def makeUnjumbleKey(self, string): <NEW_LINE> <INDENT> return "".join(sorted(string.lower())) <NEW_LINE> <DEDENT> def getLinesFromFile(self): <NEW_LINE> <INDENT> lines = open(self.fil...
Takes a textfile and creates a dictionary of words with the key as the jumbled word and the value pair as all words that can be made from the jumbled word.
62598f953cc13d1c6d46544d
class FileVideoStream: <NEW_LINE> <INDENT> def __init__(self, path, queue_size=128): <NEW_LINE> <INDENT> self.stream = cv2.VideoCapture(path) <NEW_LINE> self.stopped = False <NEW_LINE> self.queue = Queue(maxsize=queue_size) <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <INDENT> thread = Thread(target=self.update, arg...
Allows fast video streaming with OpenCV by using multithreading.
62598f9691f36d47f2230d0e
class SubAreaAutocomplete(autocomplete.Select2QuerySetView): <NEW_LINE> <INDENT> def get_queryset(self): <NEW_LINE> <INDENT> if not self.request.user.is_authenticated(): <NEW_LINE> <INDENT> return SubAreaConocimiento.objects.none() <NEW_LINE> <DEDENT> area = self.forwarded.get('id_area_conocimiento_edit', None) <NEW_LI...
Servicio de auto completado para el modelo SubArea
62598f960c0af96317c56063