code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class TestUpdateOnSalesChannel(TestRequest): <NEW_LINE> <INDENT> request_class = range.UpdateRangeOnSalesChannel <NEW_LINE> RESPONSE = [] <NEW_LINE> RANGE_ID = "4355752" <NEW_LINE> REQUEST_TYPE = "select" <NEW_LINE> ACT = "update" <NEW_LINE> VALUE = "Test Value" <NEW_LINE> OPTION_ID = "32129" <NEW_LINE> CHANNEL_IDS = [...
Test the UpdateRangeOnSalesChannel request.
6259900a462c4b4f79dbc5bc
class Value(TimeStampedModel): <NEW_LINE> <INDENT> val = models.CharField(blank=False, max_length=100, unique=True) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return "{val}".format(val=self.val)
Represent values of all cases and fieldgroups.
6259900a21a7993f00c66b33
class Feature(object): <NEW_LINE> <INDENT> def __init__(self, ogr_feature): <NEW_LINE> <INDENT> if isinstance(ogr_feature, Feature): <NEW_LINE> <INDENT> ogr_feature = ogr_feature._source <NEW_LINE> <DEDENT> assert isinstance(ogr_feature, ogr.Feature), "%s is not a ogr.Feature" % (ogr_feature,) <NEW_LINE> self.__dict__[...
a simple wrapper that makes OGR Features objects pythonic
6259900a0a366e3fb87dd5aa
class TestRequests(CodeHandler): <NEW_LINE> <INDENT> @unittest.expectedFailure <NEW_LINE> @unittest.skipIf(requests is None, 'Install ``requests`` if you would like' + ' to test ``requests`` + future compatibility (issue #19)') <NEW_LINE> def test_requests(self): <NEW_LINE> <INDENT> with open(self.t...
This class tests whether the requests module conflicts with the standard library import hooks, as in issue #19.
6259900a56b00c62f0fb3478
class InputSerialGnss(InputModule): <NEW_LINE> <INDENT> def __init__(self, data_hub, port, baud_rate): <NEW_LINE> <INDENT> super().__init__(data_hub=data_hub) <NEW_LINE> self._logger = logging.getLogger('InputSerialGnss') <NEW_LINE> self._logger.info('Initializing') <NEW_LINE> self._port = port <NEW_LINE> self._baud_ra...
Input module that connects to serial GNSS device to get NMEA position data.
6259900a507cdc57c63a5958
class BodyDetectResult(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Confidence = None <NEW_LINE> self.BodyRect = None <NEW_LINE> self.BodyAttributeInfo = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Confidence = params.get("Confidence") <NEW_LINE>...
图中检测出来的人体框。
6259900a15fb5d323ce7f8fb
class SinFriction(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __call__(self, X): <NEW_LINE> <INDENT> return torch.sin(X[:, 0:1])
The friction function is sin function only with the frist dimension.
6259900a0a366e3fb87dd5ac
class EncoderRNN(nn.Module): <NEW_LINE> <INDENT> def __init__( self, hidden_size=22, n_layers=1, num_labels=4, model_dim=22, dropout=0, bidirectional=True ): <NEW_LINE> <INDENT> super(EncoderRNN, self).__init__() <NEW_LINE> self.n_layers = n_layers <NEW_LINE> self.num_labels = num_labels <NEW_LINE> self.hidden_size = h...
:Args: hidden_size: number of the positions n_layers: number of the rnn layers
6259900a925a0f43d25e8bfa
class RockpaperscissorsTest(PluginTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.test = self.load_plugin(rockpaperscissors) <NEW_LINE> <DEDENT> def test_1_r_vs_p(self): <NEW_LINE> <INDENT> umove = "r" <NEW_LINE> jmove = "p" <NEW_LINE> result = self.test.game(umove, jmove) <NEW_LINE> self.assertEqu...
This class is testing the rockpaperscissors plugin
6259900a0a366e3fb87dd5ae
class LogForwardingProfileMatchList(VersionedPanObject): <NEW_LINE> <INDENT> ROOT = Root.VSYS <NEW_LINE> SUFFIX = ENTRY <NEW_LINE> CHILDTYPES = ( "objects.LogForwardingProfileMatchListAction", ) <NEW_LINE> def _setup(self): <NEW_LINE> <INDENT> self._xpaths.add_profile(value='/match-list') <NEW_LINE> params = [] <NEW_LI...
A log forwarding profile match list entry. Note: This is valid for PAN-OS 8.0+ Args: name (str): The name description (str): Description log_type (str): Log type. Valid values are traffic, threat, wildfire, url, data, gtp, tunnel, auth, or sctp (PAN-OS 8.1+). filter (str): The filter. send...
6259900a21a7993f00c66b39
class ExitTests(StashTestCase): <NEW_LINE> <INDENT> def test_help(self): <NEW_LINE> <INDENT> output = self.run_command("exit --help", exitcode=0) <NEW_LINE> self.assertIn("-h", output) <NEW_LINE> self.assertIn("--help", output) <NEW_LINE> self.assertIn("status", output) <NEW_LINE> self.assertIn("exit", output) <NEW_LIN...
Tests for the 'exit' command.
6259900a0a366e3fb87dd5b2
class PoliticalSpot(MildModeratedModel): <NEW_LINE> <INDENT> document = models.ForeignKey(PoliticalBuy, verbose_name="Political Buy") <NEW_LINE> airing_start_date = models.DateField(blank=True, null=True) <NEW_LINE> airing_end_date = models.DateField(blank=True, null=True) <NEW_LINE> airing_days = wf_fields.WeekdayFiel...
Information particular to a political ad spot (e.g., a candidate ad)
6259900abf627c535bcb206f
class Bot8(Bot,metaclass=Bot8Meta): <NEW_LINE> <INDENT> def response(self,name,evaluation,history,slot_ctrs,current_budget, initial_budget): <NEW_LINE> <INDENT> step = len(history) <NEW_LINE> if step == 0: <NEW_LINE> <INDENT> return evaluation <NEW_LINE> <DEDENT> if evaluation > 6: <NEW_LINE> <INDENT> return Bot4().res...
Combination of the above bots based on the current badget or the advertiser value for the current query
6259900a627d3e7fe0e07a5c
class CachedProject(object): <NEW_LINE> <INDENT> def __init__(self, cache, loader, m): <NEW_LINE> <INDENT> self.m = m <NEW_LINE> self.inst_dir = loader.get_project_install_dir(m) <NEW_LINE> self.project_hash = loader.get_project_hash(m) <NEW_LINE> self.ctx = loader.ctx_gen.get_context(m.name) <NEW_LINE> self.loader = l...
A helper that allows calling the cache logic for a project from both the build and the fetch code
6259900a3cc13d1c6d46630b
class LearnerNotFoundError(BaseError): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> course_id = kwargs.pop('course_id') <NEW_LINE> username = kwargs.pop('username') <NEW_LINE> super(LearnerNotFoundError, self).__init__(*args, **kwargs) <NEW_LINE> self.message = self.message_template.form...
Raise learner not found for a course.
6259900a507cdc57c63a5962
class d: <NEW_LINE> <INDENT> pass
integrates field with respect to withRespectTo. arguments must be 1 dimensional numpy arrays. assumes elements in these arrays represent points on a continuous mathmatical function. returns result as an array. c is the constant of integration and defaults to zero
6259900a462c4b4f79dbc5cb
class Aq_Species (Species): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> Species.__init__(self, name) <NEW_LINE> self.f_act_coef = 'Davis' <NEW_LINE> <DEDENT> def set_charge(self, charge): <NEW_LINE> <INDENT> self.charge = charge <NEW_LINE> <DEDENT> def set_gfw(self, molar_weight): <NEW_LINE> <INDE...
properties: f_act_coef e.g. Type of function for calculating the activity coefficient charge e.g. Value of charge for instance H+ is 1, Mg+2 is 2, Cl- is -1, ... gfw e.g. The gram formula weight for the species 1 gram of X equal to 1 mol of X ...
6259900a0a366e3fb87dd5b6
class TestTypes(object): <NEW_LINE> <INDENT> def check_type(self, result, expected, msg): <NEW_LINE> <INDENT> eq_(set(result.keys()), set(expected.keys()), 'Mismatch: %s keys' % msg) <NEW_LINE> for key in expected: <NEW_LINE> <INDENT> eq_(set(result[key]), set(expected[key]), 'Mismatch: %s - %s' % (msg, key)) <NEW_LINE...
Test autolysis.types
6259900a507cdc57c63a5964
class TestDygraphIfElseNet(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.x = np.random.random([10, 16]).astype('float32') <NEW_LINE> self.Net = NetWithControlFlowIf <NEW_LINE> <DEDENT> def _run_static(self): <NEW_LINE> <INDENT> return self._run(to_static=True) <NEW_LINE> <DEDENT> def...
TestCase for the transformation from control flow `if/else` dependent on tensor in Dygraph into Static `fluid.layers.cond`.
6259900a0a366e3fb87dd5b8
class Cellule() : <NEW_LINE> <INDENT> def __init__(self, data, aretes) : <NEW_LINE> <INDENT> self.cellid = data['cellid'] <NEW_LINE> self.x = data['x'] <NEW_LINE> self.y = data['y'] <NEW_LINE> self.radius = data['radius'] <NEW_LINE> self.player = -1 <NEW_LINE> self.offunits = 0 <NEW_LINE...
Initialise une cellule @param data : informations sur les cellules et obtenues grâce à la chaine d'initialisation qui a été récupérée puis parsée @param aretes : informations sur les voisins de chaque cellule
6259900a925a0f43d25e8c06
@graphql_scalar('ID') <NEW_LINE> class GraphQlLaxIdDescriptor(GraphQlScalarDescriptor): <NEW_LINE> <INDENT> def graphql_to_python(self, value): <NEW_LINE> <INDENT> if isinstance(value, bool): <NEW_LINE> <INDENT> raise TypeError('Input is not a string or an integer') <NEW_LINE> <DEDENT> elif isinstance(value, (int, long...
Lax GraphQlScalarDescriptor for the "ID" type. A non-strictly validating GraphQlScalarDescriptor for the built-in ID type.
6259900b0a366e3fb87dd5bc
class YeelightDevice: <NEW_LINE> <INDENT> def __init__(self, hass, ipaddr, config): <NEW_LINE> <INDENT> self._hass = hass <NEW_LINE> self._config = config <NEW_LINE> self._ipaddr = ipaddr <NEW_LINE> self._name = config.get(CONF_NAME) <NEW_LINE> self._model = config.get(CONF_MODEL) <NEW_LINE> self._bulb_device = None <N...
Represents single Yeelight device.
6259900b627d3e7fe0e07a64
class Patient(object): <NEW_LINE> <INDENT> def __init__(self, viruses, maxPop): <NEW_LINE> <INDENT> self.viruses = viruses <NEW_LINE> self.maxPop = maxPop <NEW_LINE> <DEDENT> def getViruses(self): <NEW_LINE> <INDENT> return self.viruses <NEW_LINE> <DEDENT> def getMaxPop(self): <NEW_LINE> <INDENT> return self.maxPop <NE...
Representation of a simplified patient. The patient does not take any drugs and his/her virus populations have no drug resistance.
6259900b3cc13d1c6d466313
class Problem10(TwoPointBVP): <NEW_LINE> <INDENT> m = [2]*256 <NEW_LINE> a = 0 <NEW_LINE> b = 1 <NEW_LINE> n_a = 256 <NEW_LINE> linear = False <NEW_LINE> homogenous = True <NEW_LINE> vectorized = True <NEW_LINE> def f(self, x, u): <NEW_LINE> <INDENT> return np.zeros((self.n_a, x.size)) <NEW_LINE> <DEDENT> def df(self, ...
A big trivial test problem:: y'' = 0 y(0) = 0, y(1) = 1
6259900b462c4b4f79dbc5d3
class GymDiscreteProblem(problem.Problem): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(GymDiscreteProblem, self).__init__(*args, **kwargs) <NEW_LINE> self._env = None <NEW_LINE> <DEDENT> @property <NEW_LINE> def env_name(self): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_...
Gym environment with discrete actions and rewards.
6259900b925a0f43d25e8c0c
class FractionalOverheadSuite: <NEW_LINE> <INDENT> def setup(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> from time import process_time <NEW_LINE> self.time = process_time <NEW_LINE> <DEDENT> except ImportError: <NEW_LINE> <INDENT> from time import clock <NEW_LINE> self.time = clock <NEW_LINE> <DEDENT> from tqdm...
An example benchmark that times the performance of various kinds of iterating over dictionaries in Python.
6259900b56b00c62f0fb348b
class ExportOpenGLRenderImageOperator(bpy.types.Operator, ExportHelper): <NEW_LINE> <INDENT> bl_idname = "photogrammetry_importer.export_opengl_render_image" <NEW_LINE> bl_label = "Export Point Cloud Rendering as Image" <NEW_LINE> bl_description = "Use a single camera to render the point cloud." <NEW_LINE> filename_ext...
An Operator to save a rendering of the point cloud to disk.
6259900b15fb5d323ce7f90d
class KaraokeView(drf_generics.RetrieveUpdateAPIView): <NEW_LINE> <INDENT> queryset = models.Karaoke.objects.all() <NEW_LINE> serializer_class = serializers.KaraokeSerializer <NEW_LINE> permission_classes = [ IsAuthenticated, permissions.IsPlaylistManager | internal_permissions.IsReadOnly, ] <NEW_LINE> def perform_upda...
Get or edit the kara status.
6259900b56b00c62f0fb348d
class _EBLFile: <NEW_LINE> <INDENT> def __init__(self, file_path, page_size): <NEW_LINE> <INDENT> self._file_path = file_path <NEW_LINE> self._page_size = page_size <NEW_LINE> self._page_index = 0 <NEW_LINE> self._num_pages = os.path.getsize(file_path) // self._page_size <NEW_LINE> if os.path.getsize(file_path) % self....
Helper class that represents a local firmware file in 'ebl' format.
6259900b15fb5d323ce7f90f
class ManagedClusterListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'next_link': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[ManagedCluster]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, value: Optional[Lis...
The response from the List Managed Clusters operation. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of managed clusters. :vartype value: list[~azure.mgmt.containerservice.v2018_08_01_preview.models.ManagedCluster] :ivar next_link: The URL to get the nex...
6259900b627d3e7fe0e07a6a
class DebuggerClient: <NEW_LINE> <INDENT> def __init__(self, server_host, server_port): <NEW_LINE> <INDENT> self.host = server_host <NEW_LINE> self.port = int(server_port) <NEW_LINE> <DEDENT> def breakpoint(self): <NEW_LINE> <INDENT> import pydevd <NEW_LINE> from app.config.DevelopmentConfig import ENVIRONMENT <NEW_LIN...
Shell class that stores properties to be used by the debugger Exposes methods to be used for debugging purposes
6259900b507cdc57c63a5970
class GolemResourceReservation(models.Model): <NEW_LINE> <INDENT> _inherit = 'golem.resource.reservation' <NEW_LINE> resource_option_ids = fields.One2many(related="resource_id.option_ids") <NEW_LINE> selected_option_ids = fields.Many2many( 'golem.resource.option', string='Selected options', index=True, readonly=True, d...
GOLEM Resource Reservation Option Model
6259900b21a7993f00c66b4c
class StudentListView(ListView): <NEW_LINE> <INDENT> queryset = Student.objects.all().filter(gender="nan") <NEW_LINE> template_name = "student_list.html"
需要设置俩个主要内容 1.queryset:数据来源集合 2.template_name:模板名称
6259900bd164cc6175821b4e
@Seq2SeqEncoder.register("PointerNet") <NEW_LINE> class PointerNet(Seq2SeqEncoder): <NEW_LINE> <INDENT> def __init__(self, input_size: int, hidden_dim: int, lstm_layers: int = 2, dropout: float = 0.2, bidirectional=False): <NEW_LINE> <INDENT> super(PointerNet, self).__init__() <NEW_LINE> self.bidir = bidirectional <NEW...
Pointer-Net
6259900b3cc13d1c6d46631b
class SenseVoltageSensor(SensorEntity): <NEW_LINE> <INDENT> _attr_native_unit_of_measurement = ELECTRIC_POTENTIAL_VOLT <NEW_LINE> _attr_extra_state_attributes = {ATTR_ATTRIBUTION: ATTRIBUTION} <NEW_LINE> _attr_icon = ICON <NEW_LINE> _attr_should_poll = False <NEW_LINE> _attr_available = False <NEW_LINE> def __init__( s...
Implementation of a Sense energy voltage sensor.
6259900b15fb5d323ce7f915
class StockState(models.Model): <NEW_LINE> <INDENT> section_id = models.CharField(max_length=100, db_index=True) <NEW_LINE> case_id = models.CharField(max_length=100, db_index=True) <NEW_LINE> product_id = models.CharField(max_length=100, db_index=True) <NEW_LINE> stock_on_hand = models.DecimalField(max_digits=20, deci...
Read only reporting model for keeping computed stock states per case/product
6259900bd164cc6175821b51
class PublicLawRestrictionBase(Base): <NEW_LINE> <INDENT> __tablename__ = 'public_law_restriction_base' <NEW_LINE> __table_args__ = {'schema': 'regional_land_use_plans'} <NEW_LINE> id = sa.Column(sa.String, primary_key=True, autoincrement=False) <NEW_LINE> public_law_restriction_id = sa.Column( sa.String, sa.ForeignKey...
Meta bucket (join table) for public law restrictions which acts as a base for other public law restrictions. Attributes: id (int): The identifier. This is used in the database only and must not be set manually. If you don't like it - don't care about. public_law_restriction_id (int): The foreign key t...
6259900b627d3e7fe0e07a72
class Chassis(ResourceInfo): <NEW_LINE> <INDENT> NAME_TEMPLATE = "Chassis {}" <NEW_LINE> FAMILY_NAME = "L1 Switch" <NEW_LINE> def __init__(self, resource_id, address, model_name, serial_number=None): <NEW_LINE> <INDENT> self._address = address <NEW_LINE> name = self.NAME_TEMPLATE.format( EntityValidator.validate_id_for...
Chassis resource entity.
6259900bbf627c535bcb2087
class Votes(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.vote_records = VOTES <NEW_LINE> <DEDENT> def find_vote(self, id): <NEW_LINE> <INDENT> response = None <NEW_LINE> for item in self.vote_records: <NEW_LINE> <INDENT> if item['meetup_id'] == id: <NEW_LINE> <INDENT> response = item <NEW_LINE> <...
Map vote models and data relations
6259900b627d3e7fe0e07a74
@export <NEW_LINE> class FatturaPrivati12(Fattura): <NEW_LINE> <INDENT> def get_versione(self): <NEW_LINE> <INDENT> return "FPR12"
Fattura privati 1.2
6259900b0a366e3fb87dd5cc
class RootWindow(Manager): <NEW_LINE> <INDENT> def __init__(self, screen): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._screen = screen <NEW_LINE> self._children = [] <NEW_LINE> self.clock = pygame.time.Clock() <NEW_LINE> self.running = True <NEW_LINE> <DEDENT> def render(self, *args): <NEW_LINE> <INDENT> se...
This class 'owns' the connection to the screen and is the root propagator of all events and render requests. It allows for a single child to be attached. This is recommended to be a manager, although any `Griddable` element is accepted. TODO: Allow for multiple stacked children.
6259900b56b00c62f0fb3499
class MultipleButtonControl(object): <NEW_LINE> <INDENT> def __init__(self, *, commands, **kwargs): <NEW_LINE> <INDENT> self._command_buttons_config = commands <NEW_LINE> self._orientation = Qt.Horizontal <NEW_LINE> self.buttons = [] <NEW_LINE> self.create_buttons() <NEW_LINE> super(MultipleButtonControl, self).__init_...
The MultipleButtonControl class adds multiple PyDMPushButton instances to the widget for controls. Parameters ---------- commands : list List of dictionaries containing the specifications for the buttons. Required keys for now are: - suffix: str suffix to be used along with the channelPrefix from ...
6259900b507cdc57c63a597a
class Throttle: <NEW_LINE> <INDENT> def __init__(self, delay): <NEW_LINE> <INDENT> self.delay = delay <NEW_LINE> self.domains = {} <NEW_LINE> <DEDENT> def wait(self, url): <NEW_LINE> <INDENT> domain = urlparse.urlparse(url).netloc <NEW_LINE> last_accessed = self.domains.get(domain) <NEW_LINE> if self.delay > 0 and last...
Throttle downloading by sleeping between requests to same domain
6259900bbf627c535bcb2089
class BillingAccount(_messages.Message): <NEW_LINE> <INDENT> displayName = _messages.StringField(1) <NEW_LINE> masterBillingAccount = _messages.StringField(2) <NEW_LINE> name = _messages.StringField(3) <NEW_LINE> open = _messages.BooleanField(4)
A billing account in [GCP Console](https://console.cloud.google.com/). You can assign a billing account to one or more projects. Fields: displayName: The display name given to the billing account, such as `My Billing Account`. This name is displayed in the GCP Console. masterBillingAccount: If this account is ...
6259900b462c4b4f79dbc5e3
class SegregationSimulation(dworp.TwoStageSimulation): <NEW_LINE> <INDENT> def __init__(self, params, observer): <NEW_LINE> <INDENT> self.params = params <NEW_LINE> self.rng = random <NEW_LINE> self.rng.seed(params.seed) <NEW_LINE> factory = HouseholdFactory(self.rng, params.similarity, params.colors[0], params.colors[...
Simulation with two stages (moving and then happiness test)
6259900bbf627c535bcb208b
class SynapticElementIntegrator(object): <NEW_LINE> <INDENT> def __init__(self, tau_ca=10000.0, beta_ca=0.001): <NEW_LINE> <INDENT> self.tau_ca = tau_ca <NEW_LINE> self.beta_ca = beta_ca <NEW_LINE> self.t_minus = 0 <NEW_LINE> self.ca_minus = 0 <NEW_LINE> self.se_minus = 0 <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE>...
Generic class which describes how to compute the number of Synaptic Element based on Ca value Each derived class should overwrite the get_se(self, t) method
6259900b462c4b4f79dbc5e7
class WechatUserInfo(models.Model): <NEW_LINE> <INDENT> add_time = models.DateTimeField('添加时间', auto_now=True) <NEW_LINE> openId = models.CharField('openId', max_length=128, blank=True) <NEW_LINE> nickName = models.CharField('昵称', max_length=128, blank=True) <NEW_LINE> avatarUrl = models.CharField('头像', max_length=128,...
微信用户信息
6259900b3cc13d1c6d466329
class TimelineHandler (util.TemplatingBaseHandler): <NEW_LINE> <INDENT> @util.oauth_decorator.oauth_aware <NEW_LINE> def get(self): <NEW_LINE> <INDENT> if not util.oauth_decorator.has_credentials(): <NEW_LINE> <INDENT> self.redirect("/") <NEW_LINE> <DEDENT> self._render_template("timeline.html", {}) <NEW_LINE> <DEDENT>...
Request handler for directly pushing (fake) quake cards to the user's Glass timeline.
6259900bd164cc6175821b5e
class IdentityProofModel(QObject): <NEW_LINE> <INDENT> def __init__(self, app, connection): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.app = app <NEW_LINE> self.connection = connection <NEW_LINE> self._connections_processor = ConnectionsProcessor.instanciate(self.app) <NEW_LINE> self._identities_processor =...
The model of Certification component
6259900b21a7993f00c66b5e
class NXPyroSession(object): <NEW_LINE> <INDENT> def __init__(self, user, hostname, localPort): <NEW_LINE> <INDENT> self.user = user <NEW_LINE> self.hostname = hostname <NEW_LINE> self.localPort = localPort <NEW_LINE> self.sshService = None <NEW_LINE> self.sshTunnel = None <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> ...
Sets up a NXPyro session on given host
6259900b3cc13d1c6d46632b
class Exponential(gamma.Gamma): <NEW_LINE> <INDENT> def __init__(self, lam, validate_args=False, allow_nan_stats=True, name="Exponential"): <NEW_LINE> <INDENT> with ops.name_scope(name, values=[lam]) as ns: <NEW_LINE> <INDENT> self._lam = ops.convert_to_tensor(lam, name="lam") <NEW_LINE> super(Exponential, self).__init...
The Exponential distribution with rate parameter lam. The PDF of this distribution is: ```prob(x) = (lam * e^(-lam * x)), x > 0``` Note that the Exponential distribution is a special case of the Gamma distribution, with Exponential(lam) = Gamma(1, lam).
6259900bbf627c535bcb2091
class NoopAnonymizer(object): <NEW_LINE> <INDENT> def ProcessPath(self, path): <NEW_LINE> <INDENT> return path <NEW_LINE> <DEDENT> def ProcessAccount(self, account): <NEW_LINE> <INDENT> return account <NEW_LINE> <DEDENT> def ProcessProject(self, project): <NEW_LINE> <INDENT> return project <NEW_LINE> <DEDENT> def Proce...
Noop anonymizer.
6259900b507cdc57c63a5984
class MergeForm(forms.Form): <NEW_LINE> <INDENT> how_merge_choices = [ ('', _('- Choose row selection method -')), ('outer', _('1) Select all rows in both the existing and new table')), ('inner', _( '2) Select only the rows with keys present in both the ' + 'existing and new table')), ('left', _('3) Select only the r...
Form to choose the merge method for data frames.
6259900b56b00c62f0fb34a3
class historic_ExtDBServAttr(BaseModel): <NEW_LINE> <INDENT> real_db_id = -1 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> BaseModel.__init__(self) <NEW_LINE> self.server_db_id = None <NEW_LINE> self.location = "" <NEW_LINE> self.owner = "" <NEW_LINE> self.description = "" <NEW_LINE> self.unmapped_attributes_list ...
Model object of extra Attributes to a server. IN DB_CACHE, this is stored in an own table
6259900b462c4b4f79dbc5ed
class Role(BASE): <NEW_LINE> <INDENT> __tablename__ = 'role' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> name = Column(String, unique=True) <NEW_LINE> target_system = Column(String) <NEW_LINE> description = Column(Text) <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(Role, self).__in...
The Role table stores avaiable roles of one target system. .. note:: the host can be deployed to one or several roles in the cluster. :param id: int, identity as primary key. :param name: role name. :param target_system: str, the target_system. :param description: str, the description of the role.
6259900b21a7993f00c66b62
class FirstLoginPage(BasePage): <NEW_LINE> <INDENT> PAGE_NAME = "First login page---" <NEW_LINE> def __init__(self, driver): <NEW_LINE> <INDENT> super(FirstLoginPage, self).__init__(driver) <NEW_LINE> <DEDENT> def get_login_button_by_id(self, id=None): <NEW_LINE> <INDENT> logger.info(self.PAGE_NAME + " get login button...
Flow: Main page login
6259900b56b00c62f0fb34a5
class State(object): <NEW_LINE> <INDENT> def __init__(self, pos, random=None): <NEW_LINE> <INDENT> self.pos = pos <NEW_LINE> if random is not None: <NEW_LINE> <INDENT> self.random_state = random <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.random_state = np.random.get_state() <NEW_LINE> <DEDENT> <DEDENT> def __re...
This is a class to hold the current state and handle state updating for the Gibbs Sampler Object Its main purposes is to hold the params list and whatever point in parameter space the markov chain is currently at Will also contain methods used in the sampler object
6259900b0a366e3fb87dd5da
class EvolvedLookerUp(LookerUp): <NEW_LINE> <INDENT> name = "EvolvedLookerUp" <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> plays = 2 <NEW_LINE> opponent_start_plays = 2 <NEW_LINE> self_histories = [''.join(x) for x in product('CD', repeat=plays)] <NEW_LINE> other_histories = [''.join(x) for x in product('CD', rep...
A LookerUp strategy that uses a lookup table generated using an evolutionary algorithm.
6259900b507cdc57c63a5988
class IndexView(Auth, Throttle, APIView): <NEW_LINE> <INDENT> def get(self, request): <NEW_LINE> <INDENT> print('permission_classes', self.throttle_classes) <NEW_LINE> print(request.user) <NEW_LINE> return HttpResponse('网站首页')
所有人都能访问 节流:匿名用户10/m, 登录用户20/m
6259900b21a7993f00c66b64
class XYZSnapshot(Snapshot): <NEW_LINE> <INDENT> def read(self, path_or_file): <NEW_LINE> <INDENT> with stream_safe_open(path_or_file) as f: <NEW_LINE> <INDENT> line = f.readline() <NEW_LINE> if not line: raise NoSnapshotError <NEW_LINE> number_of_atoms = int(line) <NEW_LINE> if not number_of_atoms > 0: raise NoSnapsho...
Snapshot of a system of particles in XYZ (.xyz) file format. Interface defined in parent class Snapshot. Further documentation can be found there.
6259900b15fb5d323ce7f929
class ElectionPosition(polymodel.PolyModel): <NEW_LINE> <INDENT> election = db.ReferenceProperty(Election, required=True) <NEW_LINE> position = db.ReferenceProperty(Position, required=True) <NEW_LINE> vote_required = db.BooleanProperty(required=True) <NEW_LINE> write_in_slots = db.IntegerProperty(required=True) <NEW_LI...
A position for a specific election within an organization.
6259900c627d3e7fe0e07a84
class FutureResult(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._result = AsyncResult() <NEW_LINE> self.created_at = time.time() <NEW_LINE> <DEDENT> def get(self, timeout=None): <NEW_LINE> <INDENT> return self._result.get(block=True, timeout=timeout) <NEW_LINE> <DEDENT> def set(self, value)...
Future results for asynchronous operations.
6259900c5166f23b2e243fbe
class IEditableMenuSettings(model.Schema): <NEW_LINE> <INDENT> form.widget(menu_tabs_json=EditableMenuSettingsFieldWidget) <NEW_LINE> menu_tabs_json = schema.Text( title=_('config_tabs_label', u'Menu configuration.'), required=False, default=u'{"/":{"items":[]}}', )
Settings used in the control panel for cookiecosent: unified panel
6259900c925a0f43d25e8c2d
class SatelliteNumber(_VSOSimpleAttr): <NEW_LINE> <INDENT> pass
The GOES Satellite Number
6259900cd164cc6175821b6a
class _LanguageType(type): <NEW_LINE> <INDENT> def __repr__(cls): <NEW_LINE> <INDENT> return '{}.{}'.format(cls.__module__, cls.__name__)
Language meta type that prints a customized repr string.
6259900c21a7993f00c66b6a
class Quiz(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=255, unique=True) <NEW_LINE> video = models.ForeignKey(Video, on_delete=models.CASCADE) <NEW_LINE> points = models.IntegerField() <NEW_LINE> question = ArrayModelField(model_container=Question) <NEW_LINE> is_deleted = models.BooleanField(d...
"Represents Quiz details in Table
6259900c56b00c62f0fb34ad
class CatCommand(clinix.ClinixCommand): <NEW_LINE> <INDENT> def __init__(self, args, options): <NEW_LINE> <INDENT> super().__init__(options) <NEW_LINE> self.filenames = args <NEW_LINE> <DEDENT> def parse_options(self, options): <NEW_LINE> <INDENT> self.number = options.get('number', False) or options.get('n', False) <N...
Class to represent a cat command
6259900cbf627c535bcb209e
class DEMove(RedBlueMove): <NEW_LINE> <INDENT> def __init__(self, sigma, gamma0=None, **kwargs): <NEW_LINE> <INDENT> self.sigma = sigma <NEW_LINE> self.gamma0 = gamma0 <NEW_LINE> super(DEMove, self).__init__(**kwargs) <NEW_LINE> <DEDENT> def setup(self, ensemble): <NEW_LINE> <INDENT> self.g0 = self.gamma0 <NEW_LINE> if...
A `differential evolution <http://www.stat.columbia.edu/~gelman/stuff_for_blog/cajo.pdf>`_ proposal implemented following `Nelson et al. (2013) <http://arxiv.org/abs/1311.5229>`_. :param sigma: The standard deviation of the Gaussian used to stretch the proposal vector. :param gamma0: (optional) The mean s...
6259900c3cc13d1c6d466337
class CharacterFeatures(Model): <NEW_LINE> <INDENT> skin = IntegerField(default = 0) <NEW_LINE> face = IntegerField(default = 0) <NEW_LINE> hair_style = IntegerField(default = 0) <NEW_LINE> hair_color = IntegerField(default = 0) <NEW_LINE> facial_hair = IntegerField(default = 0) <NEW_LINE> class Meta(ob...
Features specific to a player character.
6259900c21a7993f00c66b6c
class TraitementMessages(BaseCallback): <NEW_LINE> <INDENT> def __init__(self, contexte: ContexteRessourcesDocumentsMilleGrilles, gateway: GatewayBlynk): <NEW_LINE> <INDENT> super().__init__(contexte) <NEW_LINE> self._gateway = gateway <NEW_LINE> self.__timezone = pytz.timezone('America/Montreal') <NEW_LINE> <DEDENT> d...
Recoit les messages d'evenements et changements de configuration SenseursPassifs
6259900c21a7993f00c66b6e
class ExtractSingleCfgTarget(InvariantAwareCommand): <NEW_LINE> <INDENT> _verbose_ = True <NEW_LINE> dll = None <NEW_LINE> _dll = None <NEW_LINE> class DllArg(PathInvariant): <NEW_LINE> <INDENT> _help = "Path to the DLL (e.g. C:\\Windows\\System32\\ntdll.dll)" <NEW_LINE> _mandatory = True <NEW_LINE> <DEDENT> base_outpu...
TBD.
6259900c56b00c62f0fb34b1
class Corpus(object): <NEW_LINE> <INDENT> def __init__(self,dir_name): <NEW_LINE> <INDENT> self.dir_name = dir_name <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> for file_name in os.listdir(self.dir_name): <NEW_LINE> <INDENT> if os.path.isdir(os.path.join(self.dir_name, file_name)): <NEW_LINE> <INDENT> fi...
语料库的generator
6259900cbf627c535bcb20a2
class ContainerRepairer(Tool): <NEW_LINE> <INDENT> DEFAULT_REBUILD_BASES = True <NEW_LINE> DEFAULT_SYNC_BASES = True <NEW_LINE> DEFAULT_UPDATE_ACCOUNT = True <NEW_LINE> def __init__(self, conf, containers=None, **kwargs): <NEW_LINE> <INDENT> super(ContainerRepairer, self).__init__(conf, **kwargs) <NEW_LINE> self.contai...
Repair containers.
6259900c15fb5d323ce7f933
class DebugControl(object): <NEW_LINE> <INDENT> def __init__(self, options, output): <NEW_LINE> <INDENT> self.options = options <NEW_LINE> self.output = output <NEW_LINE> <DEDENT> def should(self, option): <NEW_LINE> <INDENT> return (option in self.options or option in FORCED_DEBUG) <NEW_LINE> <DEDENT> def write(self, ...
Control and output for debugging.
6259900cd164cc6175821b70
class HardBrakeEvent(Base): <NEW_LINE> <INDENT> __tablename__ = 'hard_brake_events' <NEW_LINE> hard_brake_event_id = Column(Integer, primary_key=True) <NEW_LINE> trip_id = Column(Integer, ForeignKey('trips.trip_id')) <NEW_LINE> lat = Column(Float) <NEW_LINE> lon = Column(Float) <NEW_LINE> ts = Column(BigInteger) <NEW_L...
Database table for hard braking events, child of relation from trips table.
6259900c925a0f43d25e8c35
class AESCipher(object): <NEW_LINE> <INDENT> def __init__(self, key): <NEW_LINE> <INDENT> self.key = key <NEW_LINE> self.iv = bytes(16*'\x00'.encode()) <NEW_LINE> <DEDENT> def encrypt_file(self, in_filename, out_filename=None, chunksize=64*1024): <NEW_LINE> <INDENT> key = self.key <NEW_LINE> if out_filename is None: <N...
https://github.com/dlitz/pycrypto
6259900cd164cc6175821b72
class ClientError(Exception): <NEW_LINE> <INDENT> pass
接口调用发起端的错误
6259900c507cdc57c63a5998
class Component(ApplicationSession): <NEW_LINE> <INDENT> @inlineCallbacks <NEW_LINE> def onJoin(self, details): <NEW_LINE> <INDENT> print("session attached") <NEW_LINE> self.received = 0 <NEW_LINE> sub = yield self.subscribe(self.on_event, 'com.myapp.topic1') <NEW_LINE> print("Subscribed to com.myapp.topic1 with {}".fo...
An application component that subscribes and receives events, and stop after having received 5 events.
6259900cd164cc6175821b76
class FdfsStorage(FileSystemStorage): <NEW_LINE> <INDENT> def _save(self, name, content): <NEW_LINE> <INDENT> client = Fdfs_client('/dailyfresh/utils/fastdfs/client.conf') <NEW_LINE> try: <NEW_LINE> <INDENT> data = content.read() <NEW_LINE> json = client.upload_by_buffer(data) <NEW_LINE> print(json.get('Status')) <NEW_...
自定义文件存储
6259900c507cdc57c63a599a
class _BaseInstances(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def GetDatabaseInstances(limit=None, batch_size=None): <NEW_LINE> <INDENT> client = api_util.SqlClient(api_util.API_VERSION_DEFAULT) <NEW_LINE> sql_client = client.sql_client <NEW_LINE> sql_messages = client.sql_messages <NEW_LINE> project_id = ...
Common utility functions for sql instances.
6259900c21a7993f00c66b76
class SharedPartitionTemplateNotSupported(acos_errors.FeatureNotSupported): <NEW_LINE> <INDENT> def __init__(self, resource, template_key): <NEW_LINE> <INDENT> msg = ('Shared partition template lookup for [{0}] is not supported' ' on template `{1}`').format(resource, template_key) <NEW_LINE> super(SharedPartitionTempla...
Occurs when shared partition lookup for templates is not supported on acos client
6259900c15fb5d323ce7f93b
class PosixPollSerial(Serial): <NEW_LINE> <INDENT> def read(self, size=1): <NEW_LINE> <INDENT> if self.fd is None: <NEW_LINE> <INDENT> raise portNotOpenError <NEW_LINE> <DEDENT> read = bytearray() <NEW_LINE> poll = select.poll() <NEW_LINE> poll.register(self.fd, select.POLLIN | select.POLLERR | select.POLLHUP | select....
Poll based read implementation. Not all systems support poll properly. However this one has better handling of errors, such as a device disconnecting while it's in use (e.g. USB-serial unplugged).
6259900c627d3e7fe0e07a96
class DefaultOpenStruct(collections.defaultdict): <NEW_LINE> <INDENT> def __init__(self, *args, **keywords): <NEW_LINE> <INDENT> collections.defaultdict.__init__(self, None, *args, **keywords) <NEW_LINE> self.__dict__ = self <NEW_LINE> <DEDENT> def __getattr__(self, name): <NEW_LINE> <INDENT> if name not in self.__dict...
The fusion of dict and struct, with default values
6259900c0a366e3fb87dd5ef
class conf(object): <NEW_LINE> <INDENT> def __init__(self, ini_filename): <NEW_LINE> <INDENT> self.data = {} <NEW_LINE> self.load(ini_filename) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def _check_type_(v): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> a = int(v) <NEW_LINE> <DEDENT> except ValueError: <NEW_LINE> <IND...
Configuration file loader
6259900cd164cc6175821b78
class Config(object): <NEW_LINE> <INDENT> DEBUG = False <NEW_LINE> SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') <NEW_LINE> SQLALCHEMY_TRACK_MODIFICATIONS = False <NEW_LINE> SECRET = os.getenv('SECRET')
Parent configuration class.
6259900c3cc13d1c6d466345
class Workspace(models.Model): <NEW_LINE> <INDENT> name = models.CharField( max_length=100, null=False, blank=False, validators=[validate_name]) <NEW_LINE> owner = models.ForeignKey(User) <NEW_LINE> description = models.TextField(null=True, blank=True) <NEW_LINE> creation_date = models.DateTimeField(auto_now_add=True) ...
The workspace entity. A workspace is designed so that it provides an independent sandbox for storing and working with various kinds of workspace items and related entities. A workspace is identified by the user+name.
6259900c21a7993f00c66b7a
class ConfigDataRevision(object): <NEW_LINE> <INDENT> __slots__ = ( '_data', '_hash', '__weakref__' ) <NEW_LINE> def __init__(self, data): <NEW_LINE> <INDENT> self._data = data <NEW_LINE> self._hash = self._hash_data(data) <NEW_LINE> <DEDENT> @property <NEW_LINE> def data(self): <NEW_LINE> <INDENT> return self._data <N...
Holds a specific snapshot of the local configuration for config node. It shall be treated as an immutable object, although in Python this is very difficult to enforce! As such, we can compute a unique hash based on the config data which can be used to establish equivalence. It also has a time-stamp to track changes. T...
6259900c56b00c62f0fb34bd
class DisablersInFile: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.lastblock = -1 <NEW_LINE> self.lines = set() <NEW_LINE> self.blocks = [] <NEW_LINE> <DEDENT> def copy(self): <NEW_LINE> <INDENT> return deepcopy(self)
Container for file disablers
6259900c3cc13d1c6d466347
class manager: <NEW_LINE> <INDENT> def __init__(self, sub_mgr_list = []): <NEW_LINE> <INDENT> self._sub = {} <NEW_LINE> if isinstance(sub_mgr_list, sub_manager): <NEW_LINE> <INDENT> for mem in sub_mgr_list: <NEW_LINE> <INDENT> self._sub[mem.system_name] = mem <NEW_LINE> <DEDENT> <DEDENT> <DEDENT> def __str__(self): <NE...
GNSS全ての測位衛星に関するエフェメリスを管理するマネージャークラス 2014/2/16時点では汎用性を重視しています。 今後、利用頻度と汎用性が高いメソッドがあれば実装したいと思います。
6259900c627d3e7fe0e07a9c
class DataContext: <NEW_LINE> <INDENT> server = {'host': '127.0.0.1', 'port': 3306 } <NEW_LINE> user = {'username': 'cwork', 'password': '7HgMoGl7N6FDyP9mIbCp' } <NEW_LINE> database = 'cwork' <NEW_LINE> def __enter__(self): <NEW_LINE> <INDENT> self.connection = pymysql.connect( host = self.server['host'], port ...
Класс-обертка для использования подключения к СУБД
6259900c5166f23b2e243fd4
class JsonUtil: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def itemToStr(item): <NEW_LINE> <INDENT> item = JSONEncoder().encode(item) <NEW_LINE> return ast.literal_eval(item) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def listToStr(items): <NEW_LINE> <INDENT> collection = [] <NEW_LINE> for item in items: <NEW_LINE>...
json.dumps(obj) -- Serialize obj to a JSON formatted str json.loads(str) -- Unserialize a JSON object from a string s
6259900c3cc13d1c6d46634b
class MB_inter_IAMB_Lner(MB_BasedLner): <NEW_LINE> <INDENT> def __init__(self, states_df, alpha, verbose=False, vtx_to_states=None, learn_later=False): <NEW_LINE> <INDENT> MB_BasedLner.__init__(self, states_df, alpha, verbose, vtx_to_states, learn_later) <NEW_LINE> <DEDENT> def find_MB(self, vtx=None): <NEW_LINE> <INDE...
The MB_inter_IAMB_Lner (Interleaved Incremental Association Markov Blanket Learner) is a subclass of MB_BasedLner. See docstring for MB_BasedLner for more info about this type of algo. Interleaved refers to the fact that the growing and shrinking phases ( growing = adding true positives, shrinking = removing false pos...
6259900c0a366e3fb87dd5f9
class ShareProtocolSettings(Model): <NEW_LINE> <INDENT> _attribute_map = { 'smb': {'key': 'Smb', 'type': 'ShareSmbSettings', 'xml': {'name': 'SMB'}}, } <NEW_LINE> _xml_map = { } <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(ShareProtocolSettings, self).__init__(**kwargs) <NEW_LINE> self.smb = kwarg...
Protocol settings. :param smb: Settings for SMB protocol. :type smb: ~azure.storage.fileshare.models.ShareSmbSettings
6259900c5166f23b2e243fd8
class Machine: <NEW_LINE> <INDENT> def __init__(self, r, delta, mat): <NEW_LINE> <INDENT> self.r = r <NEW_LINE> self.delta = delta <NEW_LINE> self.mat = mat <NEW_LINE> self.L = NotImplementedError <NEW_LINE> <DEDENT> @property <NEW_LINE> def V_r(self): <NEW_LINE> <INDENT> return np.pi * self.r ** 2 * self.L <NEW_LINE> ...
Class defines a Machine object Attributes: TODO
6259900c462c4b4f79dbc60f
class ChoiceInline(admin.TabularInline): <NEW_LINE> <INDENT> model = Choice <NEW_LINE> extra = 3
Class for choice in admin.
6259900c627d3e7fe0e07aa2
class TensorBundleCoords(VectorBundleCoords): <NEW_LINE> <INDENT> def __init__ (self, value:np.ndarray, *, chart:'CotangentBundleChart') -> None: <NEW_LINE> <INDENT> VectorBundleCoords.__init__(self, value, chart=chart)
Instances of this class each represent a coordinatized point in a particular trivialized chart (i.e. direct product of base and fiber charts) in a particular tensor bundle. Users should not construct instances of this class directly; use the corresponding TensorBundleChart instance instead. The `value` attribute is t...
6259900c0a366e3fb87dd5fd
class ModuleManager: <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.modules = OrderedDict() <NEW_LINE> self.module_instance = None <NEW_LINE> self.module_name = '' <NEW_LINE> self.module_parameters = [] <NEW_LINE> <DEDENT> def register(self, module): <NEW_LINE> <INDEN...
Class which manage modules A module can be any class, as long as it implement the static method get_module_id and has a compatible constructor. The role of the module manager is to ensure that only one of the registered classes are used on the program. The first added module will be the one used by default. For now the...
6259900dd164cc6175821b86
class Customer(models.Model): <NEW_LINE> <INDENT> qq = models.CharField(verbose_name='qq', max_length=64, unique=True, help_text='QQ号必须唯一') <NEW_LINE> name = models.CharField(verbose_name='学生姓名', max_length=16) <NEW_LINE> gender_choices = ((1, '男'), (2, '女')) <NEW_LINE> gender = models.SmallIntegerField(verbose_name='性...
客户表
6259900dbf627c535bcb20ba
class ConsistencyFilter(Filter): <NEW_LINE> <INDENT> def filter(self, parses, explanations): <NEW_LINE> <INDENT> parses = self.validate(parses) <NEW_LINE> if not parses: return [], [] <NEW_LINE> explanations = explanations if isinstance(explanations, list) else [explanations] <NEW_LINE> explanation_dict = {exp.name: ex...
Filters out parses that incorrectly label their accompanying candidate.
6259900d56b00c62f0fb34c9
class Migration(migrations.Migration): <NEW_LINE> <INDENT> dependencies = [ ('core', '0009_course'), ] <NEW_LINE> operations = [ migrations.RunPython(forward_course_abc_to_mti, backward_course_abc_to_mti) ]
- For each course ABC (Abstract Base Class), instanciate an MTI (Multi Table Inheritance - Save MTI - Associate speakers from ABC to MTI - Delete ABC
6259900d925a0f43d25e8c4b