code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class WhistJeu(models.Model): <NEW_LINE> <INDENT> objects = models.Manager() <NEW_LINE> participant = models.ForeignKey(WhistParticipant, on_delete=models.CASCADE) <NEW_LINE> jeu = models.IntegerField(default=0, verbose_name='N° du tour') <NEW_LINE> carte = models.IntegerField(default=0, verbose_name='Nbre de cartes') ...
Les jeux d'une partie
62598f1c7cff6e4e811b4764
class QAudioRecorder(QMediaRecorder): <NEW_LINE> <INDENT> def audioInput(self): <NEW_LINE> <INDENT> return "" <NEW_LINE> <DEDENT> def audioInputChanged(self, p_str): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def audioInputDescription(self, p_str): <NEW_LINE> <INDENT> return "" <NEW_LINE> <DEDENT> def audioInputs(sel...
QAudioRecorder(parent: QObject = None)
62598f1cad47b63b2c5a6585
class DescribeInstanceSecurityGroupRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.InstanceIds = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.InstanceIds = params.get("InstanceIds")
DescribeInstanceSecurityGroup request structure.
62598f1c31939e2706ed111e
class AugeasCommand(object): <NEW_LINE> <INDENT> def __init__(self, command, augeas_obj, logger): <NEW_LINE> <INDENT> self._augeas = augeas_obj <NEW_LINE> self.command = command <NEW_LINE> self.entry = self.command.getparent() <NEW_LINE> self.logger = logger <NEW_LINE> <DEDENT> def get_path(self, attr="path"): <NEW_LIN...
Base class for all Augeas command objects
62598f1c187af65679d292c1
class ShowInterfacesCounters(ShowInterfacesCounters_iosxe): <NEW_LINE> <INDENT> pass
Parser for show interfaces <interface> counters
62598f1c099cdd3c63674a93
class Student(models.Model): <NEW_LINE> <INDENT> customer = models.OneToOneField(verbose_name='客户信息', to='Customer',on_delete=True) <NEW_LINE> username = models.CharField(verbose_name='用户名', max_length=32) <NEW_LINE> password = models.CharField(verbose_name='密码', max_length=64) <NEW_LINE> emergency_contract = models.Ch...
学生表(已报名)
62598f1cc4546d3d9def6923
class ElementBase(object): <NEW_LINE> <INDENT> name = "uninitialized" <NEW_LINE> _log_decode = logging.getLogger("grammar.decode") <NEW_LINE> _log_eval = logging.getLogger("grammar.eval") <NEW_LINE> def __init__(self, name=None, default=None): <NEW_LINE> <INDENT> if not name: <NEW_LINE> <INDENT> name = None <NEW_LINE> ...
Base class for all other element classes.
62598f1c26238365f5fab906
@attr.s(frozen=True) <NEW_LINE> class PathConstraints(DataModelElement): <NEW_LINE> <INDENT> startLocation = attr.ib(default=None, type=Optional[str]) <NEW_LINE> endLocation = attr.ib(default=None, type=Optional[str]) <NEW_LINE> transitLocations = attr.ib(default=None, type=Optional[str]) <NEW_LINE> forbiddenLocations ...
Constraints on the path of a flow. :ivar startLocation: Location description of where a flow is allowed to start :ivar endLocation: Location description of where a flow is allowed to terminate :ivar transitLocations: Location description of where a flow must transit :ivar forbiddenLocations: Location description of wh...
62598f1cd8ef3951e32c7513
class RoleAdmin(sqla.ModelView): <NEW_LINE> <INDENT> def is_accessible(self): <NEW_LINE> <INDENT> return is_admin(current_user) <NEW_LINE> <DEDENT> column_labels = dict(name='Name', ) <NEW_LINE> form_excluded_columns = ('users',) <NEW_LINE> column_searchable_list = ('name', 'description')
Defines the Comment administration page
62598f1c099cdd3c63674a95
class Graph: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__vertices = [] <NEW_LINE> self.__adj_list = defaultdict(set) <NEW_LINE> self.__index_to_vertex = defaultdict(Vertex) <NEW_LINE> self.__edge_set = set() <NEW_LINE> <DEDENT> def add_edge(self, u: Vertex, v: Vertex): <NEW_LINE> <INDENT> if u no...
TODO: Consider creating an O(1) look up for index to vertex
62598f1cad47b63b2c5a658c
class MonitoringParameters(FrozenClass): <NEW_LINE> <INDENT> ua_types = [ ('ClientHandle', 'UInt32'), ('SamplingInterval', 'Double'), ('Filter', 'ExtensionObject'), ('QueueSize', 'UInt32'), ('DiscardOldest', 'Boolean'), ] <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.ClientHandle = 0 <NEW_LINE> self.SamplingI...
:ivar ClientHandle: :vartype ClientHandle: UInt32 :ivar SamplingInterval: :vartype SamplingInterval: Double :ivar Filter: :vartype Filter: ExtensionObject :ivar QueueSize: :vartype QueueSize: UInt32 :ivar DiscardOldest: :vartype DiscardOldest: Boolean
62598f1c26238365f5fab90a
class NotOwnerOfChatBubble(Exception): <NEW_LINE> <INDENT> def __init__(*args, **kwargs): <NEW_LINE> <INDENT> Exception.__init__(*args, **kwargs)
- **API Code** : 3905 - **API Message** : You are not the owner of this chat bubble. - **API String** : ``Unknown String``
62598f1d091ae3566870398a
class RespuestasAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> fieldsets = [ ('Informacion Principal', {'fields': ['cod_respuesta', 'respuesta']}), ('Auditoria', {'fields': ['user_create', 'user_update']})] <NEW_LINE> list_display = ('cod_respuesta', 'respuesta') <NEW_LINE> list_filter = ['respuesta'] <NEW_LINE> search_f...
:param fieldsets: se organiza interfaz CandidatosAdmin :param list_display: Muesta el str de los campos en la vista lista :param list_filter: Crea un campo para filtrar y le decimos en que campo :param search_fields: Crea un campo para busqueda directa especificando cuales campos
62598f1d50812a4eaa6202ae
class Not(PrefixOperator): <NEW_LINE> <INDENT> operator = '!' <NEW_LINE> precedence = 230 <NEW_LINE> rules = { 'Not[True]': 'False', 'Not[False]': 'True', }
'Not' negates a logical expression. >> !True = False >> !False = True >> !b = !b
62598f1dc4546d3d9def6927
class Music(AbstractMedia): <NEW_LINE> <INDENT> media = models.FileField(upload_to="""enter valid upload path here""") <NEW_LINE> thumb = models.ImageField(upload_to="""enter valid upload path here""")
Creates the model for uploaded Music.
62598f1dad47b63b2c5a6591
class UserProfile(AbstractBaseUser,PermissionsMixin): <NEW_LINE> <INDENT> 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.BooleanField(default =False) <NEW_LINE> objects = User...
"Represents a 'user profile' inside our system
62598f1dc4546d3d9def6929
class QFCModel7(tq.QuantumModule): <NEW_LINE> <INDENT> class QLayer(tq.QuantumModule): <NEW_LINE> <INDENT> def __init__(self, arch=None): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.arch = arch <NEW_LINE> self.n_wires = 4 <NEW_LINE> self.encoder = tq.MultiPhaseEncoder(['rx'] * 4 + ['ry'] * 4 + ['rz'] * 4 + [...
difference: self.measure(self.q_device).reshape(bsz, 2, 2)
62598f1dd8ef3951e32c7519
class SwaggerProjectWithoutVCSSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> remote_vcs_account = PartialRemoteVCSAccountSerializer(read_only=True) <NEW_LINE> project_owner_id = serializers.PrimaryKeyRelatedField( source='project_owner', read_only=True ) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = ...
This serializer is used for swagger projects that are not integrated with a remote VCS account
62598f1d97e22403b3839c6b
class CompressedDataTest(unittest.TestCase): <NEW_LINE> <INDENT> def testDecomp2Packets(self): <NEW_LINE> <INDENT> comp_d = read_test_file(['pgpfiles','pkt','comp','comp.zip.sig.DSAELG1.pkt']) <NEW_LINE> pkt = CompressedData(comp_d) <NEW_LINE> cmpr = pkt.body <NEW_LINE> self.assertEqual(cmpr.alg, 1) <NEW_LINE> pkts = l...
Test CompressedData Class
62598f1d0fa83653e46f3c6d
class Histogram(JObject): <NEW_LINE> <INDENT> def __init__(self, obj): <NEW_LINE> <INDENT> JObject.__init__(self, obj) <NEW_LINE> <DEDENT> def __del__(self): <NEW_LINE> <INDENT> JObject.__del__(self)
Instances of the <code>Histogram</code> class store histogram data.
62598f1dad47b63b2c5a6597
class Border: <NEW_LINE> <INDENT> HORIZONTAL = '\u2500' <NEW_LINE> VERTICAL = '\u2502' <NEW_LINE> TOP_LEFT = '\u250c' <NEW_LINE> TOP_RIGHT = '\u2510' <NEW_LINE> BOTTOM_LEFT = '\u2514' <NEW_LINE> BOTTOM_RIGHT = '\u2518'
Box drawing characters. (Thin)
62598f1dab23a570cc2d4431
class TemplateClient(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> object.__init__(self) <NEW_LINE> self._resource = OrcResource("util-template") <NEW_LINE> <DEDENT> def get(self, p_path): <NEW_LINE> <INDENT> result = self._resource.get({"path": p_path}) <NEW_LINE> if 0 != result.code: <NEW_LINE>...
Template client
62598f1d9f2886367281757e
class FormRef(ODMElement): <NEW_LINE> <INDENT> def __init__(self, oid, order_number, mandatory): <NEW_LINE> <INDENT> self.oid = oid <NEW_LINE> self.order_number = order_number <NEW_LINE> self.mandatory = mandatory <NEW_LINE> <DEDENT> def build(self, builder): <NEW_LINE> <INDENT> params = dict( FormOID=self.oid, OrderNu...
A reference to a :class:`FormDef` as it occurs within a specific :class:`StudyEventDef` . The list of :class:`FormRef` identifies the types of forms that are allowed to occur within this type of study event. The :class:`FormRef` within a single :class:`StudyEventDef` must not have duplicate FormOIDs nor OrderNumbers.
62598f1dad47b63b2c5a6599
class Rating(models.Model): <NEW_LINE> <INDENT> article = models.ForeignKey( Article, related_name='article_ratings', on_delete=models.CASCADE, null=True) <NEW_LINE> reader = models.ForeignKey( User, on_delete=models.CASCADE, related_name="article_ratings", null=True) <NEW_LINE> score = models.IntegerField(null=True)
Model for rating an article
62598f1d97e22403b3839c6f
class array_agg(GenericFunction): <NEW_LINE> <INDENT> type = sqltypes.ARRAY <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> args = [_literal_as_binds(c) for c in args] <NEW_LINE> kwargs.setdefault('type_', self.type(_type_from_args(args))) <NEW_LINE> kwargs['_parsed_args'] = args <NEW_LINE> super(ar...
support for the ARRAY_AGG function. The ``func.array_agg(expr)`` construct returns an expression of type :class:`.types.ARRAY`. e.g.:: stmt = select([func.array_agg(table.c.values)[2:5]]) .. versionadded:: 1.1 .. seealso:: :func:`.postgresql.array_agg` - PostgreSQL-specific version that returns :class...
62598f1d50812a4eaa6202b3
@LinkState.register(_type=1050) <NEW_LINE> @LinkState.register(_type=266) <NEW_LINE> class NodeMSD(TLV): <NEW_LINE> <INDENT> TYPE_STR = 'node_msd' <NEW_LINE> @classmethod <NEW_LINE> def unpack(cls, data): <NEW_LINE> <INDENT> _type, value = struct.unpack('!BB', data) <NEW_LINE> return cls(value={"type": _type, "value": ...
node msd
62598f1d31939e2706ed1129
class AddressGeneratorException(Exception): <NEW_LINE> <INDENT> pass
Generic AddressGenerator exception
62598f1d091ae35668703998
class TestRunme(unittest.TestCase): <NEW_LINE> <INDENT> def test_main_on_sample_in(self): <NEW_LINE> <INDENT> with io.StringIO() as target_output_stream: <NEW_LINE> <INDENT> sys.stdout, old_stdout = target_output_stream, sys.stdout <NEW_LINE> runme.main("sample.in") <NEW_LINE> from_main = target_output_stream.getvalue(...
Unit Tests for the Reverse Words problem for Google Code Jam Africa 2010 Qualification
62598f1d31939e2706ed112a
class HttpRequest(object): <NEW_LINE> <INDENT> def __init__(self, content): <NEW_LINE> <INDENT> self.content = content <NEW_LINE> self.header_bytes = bytes() <NEW_LINE> self.body_bytes = bytes() <NEW_LINE> self.header_dict = {} <NEW_LINE> self.method = "" <NEW_LINE> self.url = "" <NEW_LINE> self.protocol = "" <NEW_LINE...
用户封装用户请求信息
62598f1d187af65679d292cd
class SonosBatteryEntity(SonosSensorEntity, SensorEntity): <NEW_LINE> <INDENT> @property <NEW_LINE> def unique_id(self) -> str: <NEW_LINE> <INDENT> return f"{self.soco.uid}-battery" <NEW_LINE> <DEDENT> @property <NEW_LINE> def name(self) -> str: <NEW_LINE> <INDENT> return f"{self.speaker.zone_name} Battery" <NEW_LINE> ...
Representation of a Sonos Battery entity.
62598f1d9f28863672817584
class SearchByZipCode(Choreography): <NEW_LINE> <INDENT> def __init__(self, temboo_session): <NEW_LINE> <INDENT> Choreography.__init__(self, temboo_session, '/Library/NPR/StationFinder/SearchByZipCode') <NEW_LINE> <DEDENT> def new_input_set(self): <NEW_LINE> <INDENT> return SearchByZipCodeInputSet() <NEW_LINE> <DEDENT>...
Create a new instance of the SearchByZipCode Choreography. A TembooSession object, containing a valid set of Temboo credentials, must be supplied.
62598f1d091ae3566870399c
class VerificationIPFlowParameters(Model): <NEW_LINE> <INDENT> _validation = { 'target_resource_id': {'required': True}, 'direction': {'required': True}, 'protocol': {'required': True}, 'local_port': {'required': True}, 'remote_port': {'required': True}, 'local_ip_address': {'required': True}, 'remote_ip_address': {'re...
Parameters that define the IP flow to be verified. All required parameters must be populated in order to send to Azure. :param target_resource_id: Required. The ID of the target resource to perform next-hop on. :type target_resource_id: str :param direction: Required. The direction of the packet represented as a 5-...
62598f1d50812a4eaa6202b7
class Job(models.Model): <NEW_LINE> <INDENT> namespace = models.IntegerField(choices=((0, 'RIOT'), (1, 'Thirdparty')), blank=False, null=False, default=0) <NEW_LINE> name = models.CharField(max_length=64, unique=True, blank=False, null=False) <NEW_LINE> board = models.ForeignKey('Board', related_name='boards') <NEW_LIN...
A representation of a Jenkins job.
62598f1dc4546d3d9def6930
class Error(Exception): <NEW_LINE> <INDENT> pass
Base reporter Exception.
62598f1dad47b63b2c5a65a4
class InstagramAnalytics: <NEW_LINE> <INDENT> chromedriver_location: str <NEW_LINE> quiet: bool <NEW_LINE> def __init__(self, chromedriver_location: str='', quiet: bool=False) -> None: <NEW_LINE> <INDENT> self.access = IGAccess(chromedriver_location, not quiet) <NEW_LINE> <DEDENT> def run(self, username: str, password:...
Class to handle user interactions with bot Attributes: access - IGAccess object used to gather data
62598f1d187af65679d292d0
class LeNetConvPoolLayer(object): <NEW_LINE> <INDENT> def __init__(self, rng, input, filter_shape, image_shape, poolsize=(2, 2)): <NEW_LINE> <INDENT> assert image_shape[1] == filter_shape[1] <NEW_LINE> self.input = input <NEW_LINE> fan_in = numpy.prod(filter_shape[1:]) <NEW_LINE> fan_out = (filter_shape[0] * numpy.prod...
Pool Layer of a convolutional network
62598f1dad47b63b2c5a65a5
class Utility(Project): <NEW_LINE> <INDENT> def __init__(self, utilType, numProject, rows, columns, occupiedCells): <NEW_LINE> <INDENT> super(Utility, self).__init__(numProject, rows, columns, occupiedCells) <NEW_LINE> self.utilType = utilType <NEW_LINE> <DEDENT> def isResid(self): <NEW_LINE> <INDENT> return super(Util...
Classe héritant de Project, elle s'occupe des bâtiments utilitaires
62598f1d26238365f5fab922
class PinningMasterSlaveRouter(MasterSlaveRouter): <NEW_LINE> <INDENT> def db_for_read(self, model, **hints): <NEW_LINE> <INDENT> return DEFAULT_DB_ALIAS if this_thread_is_pinned() else get_slave()
Router that sends reads to master if a certain flag is set. Writes always go to master. Typically, we set a cookie in middleware for certain request HTTP methods and give it a max age that's certain to be longer than the replication lag. The flag comes from that cookie.
62598f1dc4546d3d9def6932
@dataclass <NEW_LINE> class Student: <NEW_LINE> <INDENT> name: str <NEW_LINE> college_id: int <NEW_LINE> gpa: float
Much less typing to do here. It also allows you to explicitly define the types of fields, which is really nice to have.
62598f1d97e22403b3839c7d
@dataclass(eq=True, frozen=True) <NEW_LINE> class GaloisGroup: <NEW_LINE> <INDENT> group: Tuple[Permutation] <NEW_LINE> latex_name: str <NEW_LINE> def __iter__(self): <NEW_LINE> <INDENT> return iter(self.group)
A simple representation of a group that also includes a name for printing purposes
62598f1dad47b63b2c5a65a9
class Codelab__Music_Tiny_Orchestra_Strings_Mode_2(object): <NEW_LINE> <INDENT> Invalid = 0 <NEW_LINE> Tiny_Orchestra_Strings_Mode_2_Off = 104978871 <NEW_LINE> Tiny_Orchestra_Strings_Mode_2_On = 1209427331
Automatically-generated uint_32 enumeration.
62598f1d4c34283577619071
class TestAccounttagApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = swagger_client.api.accounttag_api.AccounttagApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_tag_router_create(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DE...
AccounttagApi unit test stubs
62598f1d31939e2706ed1130
class AlternateSemiSupervisedVariationalInference(SemiSupervisedVariationalInference): <NEW_LINE> <INDENT> def __init__(self, model, gene_dataset, n_labelled_samples_per_class=50, n_label_array=None, n_epochs_classifier=1, lr_classification=0.1, **kwargs): <NEW_LINE> <INDENT> super(AlternateSemiSupervisedVariationalInf...
The AlternateSemiSupervisedVariationalInference class for the semi-supervised training of an autoencoder. Args: :model: A model instance from class ``VAEC``, ``SVAEC``, ... :gene_dataset: A gene_dataset instance with pre-annotations like ``CortexDataset()`` :n_labelled_samples_per_class: The number of labe...
62598f1d0fa83653e46f3c81
class Diversity(Analysis): <NEW_LINE> <INDENT> def __init__(self, indir, outdir, indices, group2samples, matched, plotfmt=None, pval=1.0): <NEW_LINE> <INDENT> Analysis.__init__(self, indir, outdir) <NEW_LINE> self.indices = indices <NEW_LINE> self.group2samples = group2samples <NEW_LINE> self.matched = matched <NEW_LIN...
Calculate diversity indices for input samples. No sampling. Table: Rows=Samples; Cols=Indices If group2samples is provided: perform statistic test comparing pair of groups. If plot is True, draw plot: boxplots of: xaxis: groups, yaxis: diversity indices
62598f1d091ae356687039a8
class SlidersApp(HBox): <NEW_LINE> <INDENT> extra_generated_classes = [["SlidersApp", "SlidersApp", "HBox"]] <NEW_LINE> inputs = Instance(VBoxForm) <NEW_LINE> text = Instance(TextInput) <NEW_LINE> offset = Instance(Slider) <NEW_LINE> amplitude = Instance(Slider) <NEW_LINE> phase = Instance(Slider) <NEW_LINE> freq = Ins...
An example of a browser-based, interactive plot with slider controls.
62598f1dab23a570cc2d443c
class VesselUpdateView(PermissionRequiredMixin,UpdateView): <NEW_LINE> <INDENT> permission_required='crew.change_vessels' <NEW_LINE> model=Vessels <NEW_LINE> template_name='crew/modelform.html' <NEW_LINE> context_object_name='vessel' <NEW_LINE> success_url=reverse_lazy('crew:index') <NEW_LINE> fields=['vessel_type','na...
Update a vessel to the list of vessels.
62598f1d50812a4eaa6202bd
class InfobloxAddressRequestFactoryV2(requests.AddressRequestFactory): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def get_request(cls, context, port, ip_dict): <NEW_LINE> <INDENT> tenant_id = port.get('tenant_id') or context.tenant_id <NEW_LINE> if ip_dict.get('ip_address'): <NEW_LINE> <INDENT> if port['device_owner']...
Infoblox Address Request Factory. Introduce custom address request types specific for Infoblox IPAM Driver
62598f1e50812a4eaa6202be
class User(db.Model, UserMixin): <NEW_LINE> <INDENT> id = db.Column(db.Integer(), primary_key=True) <NEW_LINE> username = db.Column(db.String(32), nullable=False, unique=True) <NEW_LINE> real_name = db.Column(db.String(128), nullable=False) <NEW_LINE> email_personal = db.Column(db.String(128), nullable=False) <NEW_LINE...
User account details.
62598f1e9f28863672817595
class ExternalLibrary(): <NEW_LINE> <INDENT> def __init__(self, name, defines, includepath, libs): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.defines = defines <NEW_LINE> self.includepath = includepath <NEW_LINE> self.libs = libs
The encapsulation of an external library.
62598f1efbf16365ca792e45
class EmperorInputFilesError(IOError): <NEW_LINE> <INDENT> pass
Exception for missing support files
62598f1e31939e2706ed1134
class SvGetPropNode(bpy.types.Node, SverchCustomTreeNode): <NEW_LINE> <INDENT> bl_idname = 'SvGetPropNode' <NEW_LINE> bl_label = 'Get property' <NEW_LINE> bl_icon = 'FORCE_VORTEX' <NEW_LINE> sv_icon = 'SV_PROP_GET' <NEW_LINE> bad_prop: BoolProperty(default=False) <NEW_LINE> def verify_prop(self, context): <NEW_LINE> <I...
Get property
62598f1e97e22403b3839c87
class TestLU_UnpackOp(OpTest): <NEW_LINE> <INDENT> def config(self): <NEW_LINE> <INDENT> self.x_shape = [2, 12, 10] <NEW_LINE> self.unpack_ludata = True <NEW_LINE> self.unpack_pivots = True <NEW_LINE> self.dtype = "float64" <NEW_LINE> <DEDENT> def set_output(self, A): <NEW_LINE> <INDENT> sP, sL, sU = scipy_lu_unpack(A)...
case 1
62598f1e31939e2706ed1135
class PlaylistPlaceholder(object): <NEW_LINE> <INDENT> pass
An object marking an unknown entry in the playlist container.
62598f1e4c3428357761907b
class CreateIssuePayload(sgqlc.types.Type): <NEW_LINE> <INDENT> __schema__ = github_schema <NEW_LINE> __field_names__ = ('client_mutation_id', 'issue') <NEW_LINE> client_mutation_id = sgqlc.types.Field(String, graphql_name='clientMutationId') <NEW_LINE> issue = sgqlc.types.Field('Issue', graphql_name='issue')
Autogenerated return type of CreateIssue
62598f1ec4546d3d9def6939
class TestTriangles(unittest.TestCase): <NEW_LINE> <INDENT> def testEquilateralTriangles(self): <NEW_LINE> <INDENT> self.assertEqual(classifyTriangle(3,3,3),'Equilateral','3,3,3 should be equilateral') <NEW_LINE> <DEDENT> def testIsoscelesTriangles(self): <NEW_LINE> <INDENT> self.assertEqual(classifyTriangle(3, 3, 5), ...
Positive
62598f1e50812a4eaa6202c1
@versionutils.deprecated(as_of=versionutils.deprecated.KILO, in_favor_of='oslo_middleware.RequestBodySizeLimiter') <NEW_LINE> class RequestBodySizeLimiter(sizelimit.RequestBodySizeLimiter): <NEW_LINE> <INDENT> pass
Add a 'miper.context' to WSGI environ.
62598f1e9f2886367281759b
class AppGetResponse(object): <NEW_LINE> <INDENT> swagger_types = { 'more_items_remaining': 'bool', 'total_item_count': 'int', 'continuation_token': 'str', 'items': 'list[App]' } <NEW_LINE> attribute_map = { 'more_items_remaining': 'more_items_remaining', 'total_item_count': 'total_item_count', 'continuation_token': 'c...
Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition.
62598f1e0fa83653e46f3c8d
class MergeFile(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def merge_ts(self, source_dir, output_dir, des_filename): <NEW_LINE> <INDENT> if not os.path.exists(output_dir): <NEW_LINE> <INDENT> os.makedirs(output_dir) <NEW_LINE> <DEDENT> tempname = 1 <NEW_LINE> content = "" <N...
合并ts的格式: ./ffmpeg -i concat:"out002.ts|out003.ts|out004.ts" -acodec copy -vcodec copy -f mp4 cat.mp4 或者 ffmpeg -i "concat:D:/downloadmerge2/026d4c8b18b000.ts|...|D:/downloadmerge2/026d4c8b18b017.ts|D:/downloadmerge2/026d4c8b18b018.ts|D:/downloadmerge2/026d4c8b18b019.ts|D:/downloadmerge2/026d4c8b18b02 :/downloadmerge2/0...
62598f1efbf16365ca792e4b
class OptionsNotebook(wx.Notebook): <NEW_LINE> <INDENT> def __init__(self, parent, config): <NEW_LINE> <INDENT> super(OptionsNotebook, self).__init__(parent, id=wx.ID_ANY) <NEW_LINE> self.config = config <NEW_LINE> self.Setup() <NEW_LINE> <DEDENT> def Setup(self): <NEW_LINE> <INDENT> self.general = GeneralPanel(self, s...
The main notebook that holds the entire options dialog and it's pages
62598f1e26238365f5fab936
class VirtualMachineMetadata(object): <NEW_LINE> <INDENT> swagger_types = { 'name': 'str', 'value': 'str' } <NEW_LINE> attribute_map = { 'name': 'name', 'value': 'value' } <NEW_LINE> def __init__(self, name=None, value=None): <NEW_LINE> <INDENT> self._name = None <NEW_LINE> self._value = None <NEW_LINE> self.discrimina...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f1ed8ef3951e32c752c
class add_args: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.I32, 'a', None, None, ), (2, TType.I32, 'b', None, None, ), ) <NEW_LINE> def __init__(self, a=None, b=None,): <NEW_LINE> <INDENT> self.a = a <NEW_LINE> self.b = b <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBin...
Attributes: - a - b
62598f1e31939e2706ed113a
class BinaryDiceLoss(nn.Module): <NEW_LINE> <INDENT> def __init__(self, ignore_index=None, reduction='mean', **kwargs): <NEW_LINE> <INDENT> super(BinaryDiceLoss, self).__init__() <NEW_LINE> self.smooth = 1 <NEW_LINE> self.ignore_index = ignore_index <NEW_LINE> self.reduction = reduction <NEW_LINE> self.batch_dice = Fal...
Dice loss of binary class Args: ignore_index: Specifies a target value that is ignored and does not contribute to the input gradient reduction: Specifies the reduction to apply to the output: 'none' | 'mean' | 'sum' Shapes: output: A tensor of shape [N, *] without sigmoid activation function applied tar...
62598f1ed8ef3951e32c752e
class ConfigManager(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> def set_config_from_args(self): <NEW_LINE> <INDENT> desc = 'Bulk-provision AWS accounts in Halo' <NEW_LINE> args = [('halo_api_key', 'Halo API key'), ('halo_api_secret_key', 'Halo API secret'), ('csv_file...
Manage runtime configuration for bulk_provision_aws_accounts.py. All configuration values are derived from command-line arguments. Variables: halo_api_key (str): API key ID for Halo access. halo_api_secret_key (str): API key secret. csv_file_location (str): Path to CSV file. external_id (str): Externa...
62598f1e31939e2706ed113b
class Fuselage(Model): <NEW_LINE> <INDENT> @parse_variables(__doc__, globals()) <NEW_LINE> def setup(self): <NEW_LINE> <INDENT> pass
The thing that carries the fuel, engine, and payload A full model is left as an exercise for the reader. Variables --------- W 100 [lbf] weight
62598f1e187af65679d292de
class IsPartOfModifier(object): <NEW_LINE> <INDENT> implements(ISurfResourceModifier) <NEW_LINE> adapts(IDexterityContent) <NEW_LINE> def __init__(self, context): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> <DEDENT> def run(self, resource, *args, **kwds): <NEW_LINE> <INDENT> parent = self.context.getParentNod...
Adds dcterms_isPartOf information to rdf resources
62598f1e97e22403b3839c97
class IndustrySchema(Schema): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> strict = True <NEW_LINE> <DEDENT> industry_name = fields.Str(required=True)
IndustrySchema describes how industry data should be serialized and de-serialized for input/output.
62598f1e9f288636728175a7
class RecordNotFoundException(Exception): <NEW_LINE> <INDENT> pass
Requested record in database was not found
62598f1ead47b63b2c5a65c3
class HTKShortUrl(models.Model): <NEW_LINE> <INDENT> url = models.CharField(max_length=256) <NEW_LINE> creator = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='short_urls', blank=True, null=True, default=None, on_delete=models.SET_DEFAULT) <NEW_LINE> created_on = models.DateTimeField(auto_now_add=True) <NEW_...
Short URL code is traditionally duosexagesimal (base 62) C.f. http://en.wikipedia.org/wiki/List_of_numeral_systems 62 ** 3 = 238,328 62 ** 4 = 14,776,336 62 ** 5 = 916,132,832 62 ** 6 = 56,800,235,584 Freemium model - Custom domain accounts would be able to have any-length codes - Premium accounts would be able to ha...
62598f1e0fa83653e46f3c9b
class Genre(models.Model): <NEW_LINE> <INDENT> GENRE_CHOICES = ( ('unknown', 'Unknown'), ('house', 'House'), ('tech_house', 'Tech House'), ('deep_house', 'Deep House') ) <NEW_LINE> is_active = models.BooleanField(default=True) <NEW_LINE> name = models.CharField( choices=GENRE_CHOICES, default='unknown', max_length=255)...
Model for Genre data
62598f1efbf16365ca792e59
class MainPanel(): <NEW_LINE> <INDENT> def __init__(self, root): <NEW_LINE> <INDENT> self.initUserNameFrame(root) <NEW_LINE> <DEDENT> def initUserNameFrame(self, root): <NEW_LINE> <INDENT> self.userNameVar = Tk.StringVar() <NEW_LINE> self.frame4 = Tk.Frame(root) <NEW_LINE> self.frame4.pack(side=Tk.LEFT, fill=Tk.BOTH, e...
Class including visuals: entrys, labels, graphs, sliders etc.
62598f1e091ae356687039c2
class _ViewProviderRoof(ArchComponent.ViewProviderComponent): <NEW_LINE> <INDENT> def __init__(self,vobj): <NEW_LINE> <INDENT> ArchComponent.ViewProviderComponent.__init__(self,vobj) <NEW_LINE> <DEDENT> def getIcon(self): <NEW_LINE> <INDENT> import Arch_rc <NEW_LINE> return ":/icons/Arch_Roof_Tree.svg" <NEW_LINE> <DEDE...
A View Provider for the Roof object
62598f1e0fa83653e46f3c9f
class MessageEDNSQuery: <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def bytes(cls): <NEW_LINE> <INDENT> return ( b'\x00\x00' b'\x00' b'\x00' b'\x00\x01' b'\x00\x00' b'\x00\x00' b'\x00\x01' b'\x03www\x07example\x03com\x00' b'\x00\x01' b'\x00\x01' b'\x00' b'\x00\x29' b'\x10\x00' b'\x00' b'\x03' b'\x00\x00' b'\x00\x00' ) ...
A minimal EDNS query message.
62598f1ed8ef3951e32c7533
class SchoolMember(metaclass = ABCMeta): <NEW_LINE> <INDENT> def __init__(self, name, age): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.age = age <NEW_LINE> print('(Создан SchoolMember: {})'.format(self.name)) <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def tell(self): <NEW_LINE> <INDENT> print('Имя: "{}" В...
Представляет любого человека в школе.
62598f1e50812a4eaa6202cb
class IsAdmin(BasePermission): <NEW_LINE> <INDENT> def has_permission(self, request, view): <NEW_LINE> <INDENT> return request.user.is_admin
Админ ли
62598f1eab23a570cc2d444a
class TooMuchDataError(DataAPIError): <NEW_LINE> <INDENT> default_public_message = u'Too much data requested.'
Intended to be raised by *data backend API* when too much data have been requested.
62598f1ead47b63b2c5a65cc
class Movie: <NEW_LINE> <INDENT> def __init__(self, title, storyline, poster_image_url, trailer_youtube_url): <NEW_LINE> <INDENT> self.title = title <NEW_LINE> self.storyline = storyline <NEW_LINE> self.poster_image_url = poster_image_url <NEW_LINE> self.trailer_youtube_url = trailer_youtube_url <NEW_LINE> <DEDENT> def...
A class that holds information for a movie. Attributes: title: The movie's title. storyline: A summary of the movie. poster_image_url: An URL pointing to the movie's poster image trailer_youtube_url: An Youtube link to the movie trailer.
62598f1e187af65679d292e4
class JWTActivate(ActivateMixin, JWTBase): <NEW_LINE> <INDENT> model = get_user_model() <NEW_LINE> serializer_class = ActivateUserSerializer <NEW_LINE> def get_serializer_class(self): <NEW_LINE> <INDENT> if self.request.method.lower() == 'get': <NEW_LINE> <INDENT> return UserDetailSerializer <NEW_LINE> <DEDENT> return ...
Retrieves an activation key This API is typically used to pre-populate a registration form when a user was invited to the site by another user. The response is usually presented in an HTML `activate page </docs/themes/#workflow_activate>`_ as present in the default theme. **Tags: auth, visitor, usermodel **Example ...
62598f1e97e22403b3839ca3
class getBuddyTopView_args(object): <NEW_LINE> <INDENT> def __init__(self, language=None, country=None,): <NEW_LINE> <INDENT> self.language = language <NEW_LINE> self.country = country <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport...
Attributes: - language - country
62598f1e187af65679d292e5
class Mapper(object): <NEW_LINE> <INDENT> def __init__(self, idx): <NEW_LINE> <INDENT> self._idx = idx <NEW_LINE> self._progress_info = ProgressThread.init_mapper_progress_info() <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> self.enter() <NEW_LINE> return self <NEW_LINE> <DEDENT> def __exit__(self, exc_t...
Mapper class. This defines how mapper works. The methods will be called in following order:: enter (one time) -> process (many times) -> exit (one time)
62598f1efbf16365ca792e62
class AesCrypt(CryptBase): <NEW_LINE> <INDENT> def __init__( self, key_string: bytes, key_salt: Optional[bytes] = None, key_iter: int = 1, mode: int = AES.MODE_ECB ) -> None: <NEW_LINE> <INDENT> super(AesCrypt, self).__init__(mode=mode, key_string=key_string, key_salt=key_salt, key_iter=key_iter) <NEW_LINE> <DEDENT> de...
AES 加解密
62598f1ead47b63b2c5a65cf
class IPv6Mobility(IPv6ExtensionHeader): <NEW_LINE> <INDENT> __slots__ = ('_mhtype','_checksum','_data','_srcip','_dstip') <NEW_LINE> _PACKFMT = '!BBH' <NEW_LINE> _MINLEN = struct.calcsize(_PACKFMT) <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self._nextheader = IPProtocol.IPv6NoNext <NEW_LINE> self._op...
IPv6Mobility packet header. This header is incomplete, but *should* sufficiently parse any valid MIPv6 header. In particular, there is no special handling of the header type elements apart from simply making sure that all the data are encoded/decoded in the right byte sizes (see IPv6MobilityHeaderType enumeration, a...
62598f1e31939e2706ed1143
class MockableRegistry(Registry): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._instance = None <NEW_LINE> super(MockableRegistry, self).__init__()
A non-singleton version of :class:`.Registry`. For tests. Typical usage in a test:: from ievv_opensource.ievv_customsql import customsql_registry class MockCustomSql(customsql_registry.AbstractCustomSql): # ... mockregistry = customsql_registry.MockableRegistry() mockregistry.add(MockCustomS...
62598f1f091ae356687039cc
class StaffRuleCreateForm(ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = StaffRule <NEW_LINE> fields = ("staffrule_name", "daygroup", "staff") <NEW_LINE> widgets = {"staff": forms.CheckboxSelectMultiple()}
Staff Rule Create Form.
62598f1f31939e2706ed1144
class BasePageLocators: <NEW_LINE> <INDENT> LINK_MAIN_PAGE = "http://selenium1py.pythonanywhere.com/en-gb/" <NEW_LINE> LOGIN_LINK = (By.CSS_SELECTOR, "#login_link") <NEW_LINE> VIEW_BASKET = (By.XPATH, '//a[@class="btn btn-default"]') <NEW_LINE> USER_ICON = (By.CSS_SELECTOR, ".icon-user")
Локаторы главной страницы.
62598f1fc4546d3d9def6948
class Activity(object): <NEW_LINE> <INDENT> def __init__(self, name, target_age, image_url="", status=False): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.target_age = target_age <NEW_LINE> self.image_url = image_url <NEW_LINE> self.status = status <NEW_LINE> <DEDENT> def change_status(self, status): <NEW_LINE>...
This class describes the structure of the Activity object
62598f1f50812a4eaa6202cf
class Solution: <NEW_LINE> <INDENT> def isToeplitzMatrix(self, matrix): <NEW_LINE> <INDENT> if not matrix: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> topLine = 0 <NEW_LINE> leftLine = 0 <NEW_LINE> for i in range(len(matrix)): <NEW_LINE> <INDENT> topLine = i <NEW_LINE> while topLine < len(matrix) and leftLine <...
@param matrix: the given matrix @return: True if and only if the matrix is Toeplitz
62598f1f97e22403b3839ca9
class LeftParenthesis(Token): <NEW_LINE> <INDENT> regex = "( )\\(( )"
Left Parenthesis token
62598f1fd8ef3951e32c7539
class DysonDeviceListener(object): <NEW_LINE> <INDENT> def __init__(self, serial, add_device_function): <NEW_LINE> <INDENT> self._serial = serial <NEW_LINE> self.add_device_function = add_device_function <NEW_LINE> <DEDENT> def remove_service(self, zeroconf, device_type, name): <NEW_LINE> <INDENT> _LOGGER.info("Service...
Message listener.
62598f1fad47b63b2c5a65d5
class InputError(Exception): <NEW_LINE> <INDENT> pass
Program input is incorrect.
62598f1f26238365f5fab952
class TemplateError(Exception): <NEW_LINE> <INDENT> pass
Raised when there is an problem with a template. TemplateErrors are fatal.
62598f1f50812a4eaa6202d0
class CreateLiveRecordRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.StreamName = None <NEW_LINE> self.AppName = None <NEW_LINE> self.DomainName = None <NEW_LINE> self.StartTime = None <NEW_LINE> self.EndTime = None <NEW_LINE> self.RecordType = None <NEW_LINE> self.FileFormat =...
CreateLiveRecord请求参数结构体
62598f1f187af65679d292e9
class HasStatusDescription(object): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(HasStatusDescription, self).__init__(*args, **kwargs) <NEW_LINE> <DEDENT> status = sa.Column(sa.String(16), nullable=False) <NEW_LINE> status_description = sa.Column(sa.String(attr.DESCRIPTION_MAX_LEN)...
Status with description mixin.
62598f1fd8ef3951e32c753b
class MNISTDataset(object): <NEW_LINE> <INDENT> def __init__(self, data_dir, batch_size=128, shuffle=False, shuffle_buffer_size=10000, reshape=False, image_dtype=tf.float32, label_dtype=tf.int32): <NEW_LINE> <INDENT> self.batch_size = batch_size <NEW_LINE> self.shuffle = shuffle <NEW_LINE> self.shuffle_buffer_size = sh...
Wrapper class for the MNIST dataset. Used as input to a `tf.learn.Estimator.`
62598f1f091ae356687039d6
class ActivationRegularizationLoss(Loss): <NEW_LINE> <INDENT> @validated() <NEW_LINE> def __init__( self, alpha: float = 0.0, weight: Optional[float] = None, batch_axis: int = 1, time_axis: int = 0, **kwargs ): <NEW_LINE> <INDENT> super(ActivationRegularizationLoss, self).__init__( weight, batch_axis, **kwargs ) <NEW_L...
.. math:: L = \alpha \|h_t\|_2^2, where :math:`h_t` is the output of the RNN at timestep t. :math:`\alpha` is scaling coefficient. The implementation follows [MMS17]_. Computes Activation Regularization Loss. (alias: AR) Parameters ---------- alpha The scaling coefficient of the regularization. weight Gl...
62598f1fc4546d3d9def694c
class ASTResolver: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def resolve_to(node, wanted, scope): <NEW_LINE> <INDENT> if isinstance(node, ast.Name): <NEW_LINE> <INDENT> return scope.get(node.id) is wanted <NEW_LINE> <DEDENT> if not isinstance(node, ast.Attribute): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT>...
Provides helper methods to resolve AST nodes.
62598f1f26238365f5fab958
class PointGlyph(XyGlyph): <NEW_LINE> <INDENT> fill_color = String(default=DEFAULT_PALETTE[1]) <NEW_LINE> fill_alpha = Float(default=0.7) <NEW_LINE> marker = String(default='circle') <NEW_LINE> size = Float(default=8) <NEW_LINE> def __init__(self, x=None, y=None, line_color=None, fill_color=None, marker=None, size=None...
A set of glyphs placed in x,y coordinates with the same attributes.
62598f1ffbf16365ca792e70
class TestAdd(GPflowTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> with self.test_session(): <NEW_LINE> <INDENT> self.rbf = gpflow.kernels.RBF(1) <NEW_LINE> self.lin = gpflow.kernels.Linear(1) <NEW_LINE> self.k = gpflow.kernels.RBF(1) + gpflow.kernels.Linear(1) <NEW_LINE> self.rng = np.random.Rando...
add a rbf and linear kernel, make sure the result is the same as adding the result of the kernels separaetely
62598f1f187af65679d292ec
class DetailThumbnail2x(DetailThumbnail): <NEW_LINE> <INDENT> dimensions = [d * 2 for d in app_settings.THUMBNAIL_DETAIL_SIZE] <NEW_LINE> processors = [ResizeToFit(*dimensions)]
Retina version of DetailThumbnail Generated twice the size of our set dimensions.
62598f1fc4546d3d9def694e
class PreResBottleneck(HybridBlock): <NEW_LINE> <INDENT> def __init__(self, in_channels, out_channels, strides, bn_use_global_stats, conv1_stride, **kwargs): <NEW_LINE> <INDENT> super(PreResBottleneck, self).__init__(**kwargs) <NEW_LINE> mid_channels = out_channels // 4 <NEW_LINE> with self.name_scope(): <NEW_LINE> <IN...
PreResNet bottleneck block for residual path in PreResNet unit. Parameters: ---------- in_channels : int Number of input channels. out_channels : int Number of output channels. strides : int or tuple/list of 2 int Strides of the convolution. bn_use_global_stats : bool Whether global moving statistics i...
62598f1ffbf16365ca792e74
@widgets.register <NEW_LINE> class LineProfiler(Viewer): <NEW_LINE> <INDENT> _view_name = Unicode('LineProfilerView').tag(sync=True) <NEW_LINE> _model_name = Unicode('LineProfilerModel').tag(sync=True) <NEW_LINE> _view_module = Unicode('itkwidgets').tag(sync=True) <NEW_LINE> _model_module = Unicode('itkwidgets').tag(sy...
LineProfiler widget class.
62598f1fab23a570cc2d4456