code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class Generator(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def _gen_one(cls): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def gen_many(cls, session, num): <NEW_LINE> <INDENT> pass
Some common methods for *Generator classes to inherit.
6259907c67a9b606de5477bd
class Project(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'project' <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> project_name = db.Column(db.String(64), unique=True, index=True) <NEW_LINE> project_address = db.Column(db.String(256), unique=True, index=True) <NEW_LINE> user_id = db.Column(db.Int...
项目类
6259907ce1aae11d1e7cf528
class Viewport(object): <NEW_LINE> <INDENT> def __init__(self, width, height): <NEW_LINE> <INDENT> self.w = width <NEW_LINE> self.h = height <NEW_LINE> self.zoom = 0 <NEW_LINE> self.c = (width/2, height/2) <NEW_LINE> <DEDENT> def zoomIn(self): <NEW_LINE> <INDENT> self.zoom += 1 <NEW_LINE> <DEDENT> def zoomOut(self): <N...
Create a viewport.
6259907c091ae3566870666d
@requires(ProcessTrainData) <NEW_LINE> class GBTLearn(luigi.Task): <NEW_LINE> <INDENT> n_evals = luigi.IntParameter(default=75, description="XGB rounds") <NEW_LINE> desired_sample_size = luigi.IntParameter(default=30000, description="Sample size for XGB watchlist") <NEW_LINE> features = luigi.ListParameter(default=DEFA...
Train model on the training dataset and save the model afterwards.
6259907c23849d37ff852ae7
class dstat_plugin(dstat): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.name = 'most expensive' <NEW_LINE> self.vars = ('memory process',) <NEW_LINE> self.type = 's' <NEW_LINE> self.width = 17 <NEW_LINE> self.scale = 0 <NEW_LINE> <DEDENT> def extract(self): <NEW_LINE> <INDENT> self.val['max'] = 0.0 ...
Most expensive CPU process. Displays the process that uses the CPU the most during the monitored interval. The value displayed is the percentage of CPU time for the total amount of CPU processing power. Based on per process CPU information.
6259907c5fdd1c0f98e5f9ae
@unittest.skipUnless(luchador.get_nn_backend() == 'theano', 'Theano backend') <NEW_LINE> class TestGetVariable(_ScopeTestCase): <NEW_LINE> <INDENT> def test_get_variable_reuse_variable(self): <NEW_LINE> <INDENT> scope = self.get_scope() <NEW_LINE> var1 = nn.make_variable(scope, shape=[3, 1]) <NEW_LINE> be._set_flag(Tru...
Test if get_variable correctly retrieve/create Variable
6259907c44b2445a339b7675
class displayTradersData(BrowserView): <NEW_LINE> <INDENT> pass
display all informations about traders, including private data like email adress or phone
6259907c9c8ee82313040e9f
class PipeConnection(Connection): <NEW_LINE> <INDENT> def connect(self, pipe_socket): <NEW_LINE> <INDENT> self._conn = pipe_socket <NEW_LINE> self._conn.connect() <NEW_LINE> return self
Connection type for pipes.
6259907c3617ad0b5ee07b7d
class MreIdlm(MelRecord): <NEW_LINE> <INDENT> rec_sig = b'IDLM' <NEW_LINE> _flags = Flags.from_names('runInSequence', None, 'doOnce') <NEW_LINE> melSet = MelSet( MelEdid(), MelBounds(), MelUInt8Flags(b'IDLF', u'flags', _flags), MelPartialCounter(MelTruncatedStruct( b'IDLC', [u'B', u'3s'], 'animation_count', 'unused', o...
Idle Marker.
6259907c60cbc95b06365a85
class RoleModeViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> serializer_class = RoleSerializer <NEW_LINE> queryset = Role.objects.all()
查看和编辑角色实例的视图集。
6259907c7b180e01f3e49d7d
class LeaseClientManager(base.BaseClientManager): <NEW_LINE> <INDENT> def create(self, name, start, end, reservations, events): <NEW_LINE> <INDENT> values = {'name': name, 'start_date': start, 'end_date': end, 'reservations': reservations, 'events': events} <NEW_LINE> return self._create('/leases', values, 'lease') <NE...
Manager for the lease connected requests.
6259907c76e4537e8c3f0faf
class rowtransposition(): <NEW_LINE> <INDENT> def __init__(self, key, text, to_encrypt): <NEW_LINE> <INDENT> self.key = str(key) <NEW_LINE> self.text = list(text) <NEW_LINE> self.textLength = len(self.text) <NEW_LINE> self.keyLength = len(self.key) <NEW_LINE> self.rowNum = math.ceil(self.textLength / self.keyLength) <N...
Row Transposition Cipher
6259907c23849d37ff852ae9
class DiscoverProcessTrees: <NEW_LINE> <INDENT> def __init__(self, settings): <NEW_LINE> <INDENT> self.settings = settings <NEW_LINE> self.cmd = "/Applications/ProM-6.7.app/Contents/Resources/ProM67cli.sh -f /Applications/ProM-6.7.app/Contents/Resources/xes-inductive-miner.sh" <NEW_LINE> <DEDENT> def mineTree(self, nam...
Call the inductive miner available in Prom using the cli see readme file from github
6259907c3317a56b869bf25e
class SplitsComponentStateRefMut(SplitsComponentStateRef): <NEW_LINE> <INDENT> def __init__(self, ptr): <NEW_LINE> <INDENT> self.ptr = ptr
The state object that describes a single segment's information to visualize.
6259907c4f88993c371f123a
class OldEvent(models.Model): <NEW_LINE> <INDENT> type = models.ForeignKey(OldEventType) <NEW_LINE> shortDescription = models.CharField(max_length=255, verbose_name="Short Description", help_text="This text is displayed on the events index.") <NEW_LINE> location = models.ForeignKey(OldLocation) <NEW_LINE> longDescripti...
Represents a single event
6259907c26068e7796d4e370
class DiffuserWifiSensor(DiffuserEntity, SensorEntity): <NEW_LINE> <INDENT> _attr_device_class = SensorDeviceClass.SIGNAL_STRENGTH <NEW_LINE> _attr_native_unit_of_measurement = PERCENTAGE <NEW_LINE> _attr_entity_category = EntityCategory.DIAGNOSTIC <NEW_LINE> def __init__( self, diffuser: Diffuser, coordinator: Rituals...
Representation of a diffuser wifi sensor.
6259907c167d2b6e312b82ac
class G0W0Work(Work): <NEW_LINE> <INDENT> def __init__(self, scf_input, nscf_input, scr_input, sigma_inputs, workdir=None, manager=None, spread_scr=False, nksmall=None): <NEW_LINE> <INDENT> super(G0W0Work, self).__init__(workdir=workdir, manager=manager) <NEW_LINE> if isinstance(scf_input, (list, tuple)): <NEW_LINE> <I...
Work for G0W0 calculations.
6259907c7047854f46340de6
class Heap(object): <NEW_LINE> <INDENT> def __init__(self, pc): <NEW_LINE> <INDENT> self.__array__ = list() <NEW_LINE> self.__array__.append(0) <NEW_LINE> self.__pc__ = pc <NEW_LINE> self.__size__ = 0 <NEW_LINE> <DEDENT> def isEmpty(self): <NEW_LINE> <INDENT> if self.__size__ == 0: <NEW_LINE> <INDENT> return True <NEW_...
Heap Class. This heap class is used for Priority Queue. And this class is consist of array.
6259907c4f6381625f19a1c6
class NpmCommand(Command): <NEW_LINE> <INDENT> description = 'run npm install command' <NEW_LINE> user_options = [ ('executable=', 'e', 'executable path'), ('instance-dir=', 'i', 'instance dir of the project'), ] <NEW_LINE> def initialize_options(self): <NEW_LINE> <INDENT> self.executable = 'npm' <NEW_LINE> self.instan...
Run npm install command
6259907c8a349b6b43687c8d
class ProofOfAgeCodeSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = ProofOfAgeCode <NEW_LINE> fields = ( 'code', 'description' ) <NEW_LINE> <DEDENT> def to_internal_value(self, data): <NEW_LINE> <INDENT> if 'code' in data and data['code'] is not None: <NEW_LINE> <IND...
Serializes ProofOfAgeCode fields.
6259907c3d592f4c4edbc877
class TestDataverseGenericTravisNot(object): <NEW_LINE> <INDENT> def test_dataverse_from_json_to_json_valid(self): <NEW_LINE> <INDENT> data = [ ({json_upload_min()}, {}), ({json_upload_full()}, {}), ({json_upload_min()}, {"data_format": "dataverse_upload"}), ({json_upload_min()}, {"validate": False}), ({json_upload_min...
Generic tests for Dataverse(), not running on Travis (no file-write permissions).
6259907c3617ad0b5ee07b7f
class ViEnG(bpy.types.NodeSocket): <NEW_LINE> <INDENT> bl_idname = 'ViEnG' <NEW_LINE> bl_label = 'EnVi Geometry' <NEW_LINE> valid = ['EnVi Geometry'] <NEW_LINE> link_limit = 1 <NEW_LINE> def draw(self, context, layout, node, text): <NEW_LINE> <INDENT> layout.label(text) <NEW_LINE> <DEDENT> def draw_color(self, context,...
Energy geometry out socket
6259907c3346ee7daa33837a
class Student(models.Model): <NEW_LINE> <INDENT> customer = models.ForeignKey("CustomerInfo") <NEW_LINE> class_grades = models.ManyToManyField("ClassList") <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return "%s" % self.customer
学员表
6259907c92d797404e389875
class LogOp(Op): <NEW_LINE> <INDENT> def __call__(self, node): <NEW_LINE> <INDENT> new_node = Op.__call__(self) <NEW_LINE> new_node.inputs = [node] <NEW_LINE> new_node.name = 'Log({})'.format(node.name) <NEW_LINE> return new_node <NEW_LINE> <DEDENT> def compute(self, node, input_vals): <NEW_LINE> <INDENT> assert(len(in...
Op that performs log function(base e)
6259907c76e4537e8c3f0fb1
class ModelLanguageEdamId(str, enum.Enum): <NEW_LINE> <INDENT> BNGL = 'format_3972' <NEW_LINE> CellML = 'format_3240' <NEW_LINE> CopasiML = 'format_9003' <NEW_LINE> GENESIS = 'format_9056' <NEW_LINE> GINML = 'format_9009' <NEW_LINE> HOC = 'format_9005' <NEW_LINE> Kappa = 'format_9006' <NEW_LINE> LEMS = 'format_9004' <N...
Model language EDAM id
6259907cf548e778e596cfc4
class NoFilterDiffOpcodeGenerator(DiffOpcodeGenerator): <NEW_LINE> <INDENT> def _apply_processors(self, opcodes): <NEW_LINE> <INDENT> for opcode in opcodes: <NEW_LINE> <INDENT> yield opcode
A DiffOpcodeGenerator which does not filter interdiffs
6259907c26068e7796d4e372
class TestFunctionalCapabilityListResult(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 testFunctionalCapabilityListResult(self): <NEW_LINE> <INDENT> pass
FunctionalCapabilityListResult unit test stubs
6259907ca05bb46b3848be42
class IconBlurb(Orderable): <NEW_LINE> <INDENT> homepage = models.ForeignKey(HomePage, related_name="blurbs") <NEW_LINE> icon = models.CharField(max_length=100, help_text="A font awesome icon name. i.e. icon-compass. More here: " "http://fortawesome.github.io/Font-Awesome/icons/") <NEW_LINE> title = models.CharField(m...
An icon box on a HomePage
6259907c167d2b6e312b82ad
class ImageUpload(models.Model): <NEW_LINE> <INDENT> img = models.ImageField(upload_to="images", null=True, blank=True, max_length=255)
Model used to upload images to server, and have server generate thumbnails Upload path defaults to "images" folder but will change during POST; use specified "deployment" to get Campaign and Deployment names e.g. deployment id = 2, look up Deployment short_name = "r20110612_033752_st_helens_01_elephant_rock_deep_repeat...
6259907c7cff6e4e811b7473
class Superlu(Package): <NEW_LINE> <INDENT> homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/#superlu" <NEW_LINE> url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_5.2.1.tar.gz" <NEW_LINE> version('5.2.1', '3a1a9bff20cb06b7d97c46d337504447') <NEW_LINE> version('4.3', 'b72c6309f25e9660133007b82621ba7c')...
SuperLU is a general purpose library for the direct solution of large, sparse, nonsymmetric systems of linear equations on high performance machines. SuperLU is designed for sequential machines.
6259907ca8370b77170f1e02
class TbModel(accelerators_model.TLineModel): <NEW_LINE> <INDENT> pv_module = _pvs_tb <NEW_LINE> model_module = pv_module.model <NEW_LINE> device_names = pv_module.device_names <NEW_LINE> prefix = device_names.section.upper() <NEW_LINE> database = pv_module.get_database() <NEW_LINE> nr_bunches = LiModel.nr_bunches <NEW...
Definition of TB area structure.
6259907c7d847024c075de11
class HttpVersionMatchConditionParameters(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'odata_type': {'required': True, 'constant': True}, 'operator': {'required': True}, } <NEW_LINE> _attribute_map = { 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, 'operator': {'key': 'operator', 'type': 's...
Defines the parameters for HttpVersion match conditions. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :ivar odata_type: Required. Default value: "#Microsoft.Azure.Cdn.Models.DeliveryRuleHttpVersionCondit...
6259907c7047854f46340de8
class Bot: <NEW_LINE> <INDENT> def __init__(self, name, content): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> functions = getSections(content) <NEW_LINE> self.functions = {} <NEW_LINE> for i in functions.keys(): <NEW_LINE> <INDENT> parts = getParts(functions[i]) <NEW_LINE> temp = {} <NEW_LINE> for j in parts.keys()...
Representaion of a Bot
6259907c1b99ca400229024f
class TranslateToLearnedQuestion(TranslateQuestion): <NEW_LINE> <INDENT> def _check_answer(self, current_answer): <NEW_LINE> <INDENT> return self._check_translated_word_answer(current_answer) <NEW_LINE> <DEDENT> def _get_question_word(self): <NEW_LINE> <INDENT> return self._current_word.native_word.get_most_common_spel...
A translate question from native language to learned language.
6259907c55399d3f05627f47
class Proc_Component_Attr_Spec(STRINGBase): <NEW_LINE> <INDENT> subclass_names = ['Access_Spec', 'Proc_Component_PASS_Arg_Name'] <NEW_LINE> def match(string): return STRINGBase.match(['POINTER','PASS','NOPASS'], string) <NEW_LINE> match = staticmethod(match)
<proc-component-attr-spec> = POINTER | PASS [ ( <arg-name> ) ] | NOPASS | <access-spec>
6259907c4f6381625f19a1c7
class FooController(Controller): <NEW_LINE> <INDENT> model = Instance(FooModel) <NEW_LINE> def _model_default(self): <NEW_LINE> <INDENT> return FooModel(my_str="meh")
Test dialog that does nothing useful.
6259907c3d592f4c4edbc878
class Graph: <NEW_LINE> <INDENT> def __init__(self, edges=[], directed=True, root=None): <NEW_LINE> <INDENT> self.directed = directed <NEW_LINE> self.graph = {} <NEW_LINE> self.root = root <NEW_LINE> if root: <NEW_LINE> <INDENT> self.graph[tuple(root)] = set([]) <NEW_LINE> <DEDENT> self.add_edges_from(edges) <NEW_LINE>...
This class implements a simple graph structure.
6259907c76e4537e8c3f0fb3
class SapOpenHubTableDataset(Dataset): <NEW_LINE> <INDENT> _validation = { 'type': {'required': True}, 'linked_service_name': {'required': True}, 'open_hub_destination_name': {'required': True}, } <NEW_LINE> _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, 'type': {'key': 'type', 'type': 'st...
Sap Business Warehouse Open Hub Destination Table properties. All required parameters must be populated in order to send to Azure. :param additional_properties: Unmatched properties from the message are deserialized to this collection. :type additional_properties: dict[str, object] :param type: Required. Type of dat...
6259907c67a9b606de5477c0
@pytest.mark.usefixtures('db') <NEW_LINE> class TestUser: <NEW_LINE> <INDENT> def test_get_by_id(self): <NEW_LINE> <INDENT> user = create_user('foo@bar.com') <NEW_LINE> retrieved = get_user_by_id(user.id) <NEW_LINE> assert retrieved == user <NEW_LINE> <DEDENT> def test_created_at_defaults_to_datetime(self): <NEW_LINE> ...
User tests.
6259907c56b00c62f0fb4308
class FastTemporaryFile(object): <NEW_LINE> <INDENT> __slots__ = ['_stream', '_isFile', '_smallFileSize'] <NEW_LINE> def __init__(self, smallFileSize=65536): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> import cStringIO as StringIO <NEW_LINE> <DEDENT> except ImportError: <NEW_LINE> <INDENT> import StringIO <NEW_LINE> <...
A file-like stream object for writing temporary data efficiently. Stores the file contents in-memory for small files and uses a temporary file on the file system for large files (the temporary file is cleaned up when the stream is closed). You may read/write from this file as you would a normal file object.
6259907cd486a94d0ba2d9ec
class UnionPayRefundSerializer(serializers.Serializer): <NEW_LINE> <INDENT> accNo = serializers.CharField() <NEW_LINE> accessType = serializers.CharField() <NEW_LINE> currencyCode = serializers.CharField() <NEW_LINE> encoding = serializers.CharField() <NEW_LINE> merId = serializers.CharField() <NEW_LINE> orderId = seri...
银联退款单返回
6259907c5fdd1c0f98e5f9b4
class Job(Thread): <NEW_LINE> <INDENT> def __init__(self, function, *args, **kargs): <NEW_LINE> <INDENT> Thread.__init__(self) <NEW_LINE> self.daemon = True <NEW_LINE> self.function = function <NEW_LINE> self.args = args <NEW_LINE> self.kargs = kargs <NEW_LINE> self.error = None <NEW_LINE> <DEDENT> def run(self): <NEW_...
Threaded job class
6259907ca05bb46b3848be43
class Subject(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=200) <NEW_LINE> begin_date = models.IntegerField() <NEW_LINE> end_date = models.IntegerField()
Subject is an entity which controls global time limits of class and connects its name to Cell Fields: name (str): name of the subject begn_date, end_date (int): epoch seconds, when this or that class is being held
6259907c97e22403b383c936
class Record(object): <NEW_LINE> <INDENT> def __init__(self, data=None, permissions=None): <NEW_LINE> <INDENT> self.swagger_types = { 'data': 'object', 'permissions': 'RecordPermissions' } <NEW_LINE> self.attribute_map = { 'data': 'data', 'permissions': 'permissions' } <NEW_LINE> self._data = data <NEW_LINE> self._perm...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
6259907c283ffb24f3cf52d6
class AudioRecord(): <NEW_LINE> <INDENT> def __init__(self, filename="output.wav", interval=1): <NEW_LINE> <INDENT> self.outputFilename = filename <NEW_LINE> self.rate = 22050 <NEW_LINE> self.interval = interval <NEW_LINE> self.chunk = 1024 <NEW_LINE> self.format = pyaudio.paInt16 <NEW_LINE> self.channels = 1 <NEW_LINE...
Class to record audio data.
6259907c71ff763f4b5e91e1
class CreateRatingSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Rating <NEW_LINE> fields = ("star", "product") <NEW_LINE> <DEDENT> def create(self, validated_data): <NEW_LINE> <INDENT> rating, _ = Rating.objects.update_or_create( ip=validated_data.get('ip', None), ...
Добавление рейтинга пользователем
6259907c7047854f46340dea
class InvalidInputError(Exception): <NEW_LINE> <INDENT> pass
raised when invalid input is received
6259907ca8370b77170f1e05
class Browser(StaticLiveServerTestCase): <NEW_LINE> <INDENT> port = 12345 <NEW_LINE> fixtures = [ "page_fixtures.json", "footer_fixtures.json", "social_fixtures.json", "alert_fixtures.json", "button_fixtures.json", "placeholder_fixtures.json", "aboutapp_fixtures.json", "portfolioapp_fixtures.json", "blogapp_fixtures.js...
Browser for the tests
6259907c76e4537e8c3f0fb5
class STSHI(BinaryStream): <NEW_LINE> <INDENT> def __init__(self, bytes, mainStream, offset, size): <NEW_LINE> <INDENT> BinaryStream.__init__(self, bytes, mainStream=mainStream) <NEW_LINE> self.pos = offset <NEW_LINE> self.size = size <NEW_LINE> <DEDENT> def dump(self): <NEW_LINE> <INDENT> print('<stshi type="STSHI" of...
The STSHI structure specifies general stylesheet and related information.
6259907c67a9b606de5477c1
class QuerySinglePaymentResultResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.ErrCode = None <NEW_LINE> self.ErrMessage = None <NEW_LINE> self.Result = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.ErrCode = p...
QuerySinglePaymentResult返回参数结构体
6259907c7d43ff2487428130
class JavaClassPath: <NEW_LINE> <INDENT> def __init__(self, class_path=None): <NEW_LINE> <INDENT> self.package = JavaPackage() <NEW_LINE> self.jclass = JavaClass() <NEW_LINE> if isinstance(class_path, str) and class_path: <NEW_LINE> <INDENT> match = RE().match("class_path_match", class_path) <NEW_LINE> if match: <NEW_L...
A class represents a Java class path
6259907c97e22403b383c937
class PyWinCFFIError(Exception): <NEW_LINE> <INDENT> pass
The base class for all custom exceptions that pywincffi can throw.
6259907c32920d7e50bc7a79
class ListKeysVerb(ListEnclavesVerb): <NEW_LINE> <INDENT> def main(self, *, args) -> int: <NEW_LINE> <INDENT> warnings.warn( 'list_keys is deprecated and will be removed in a future release. Use list_enclaves ' 'instead.', FutureWarning) <NEW_LINE> return super().main(args=args)
DEPRECATED: List enclaves in keystore. Use list_enclaves instead.
6259907c4a966d76dd5f091d
class TestPtBr(_SimpleAutomotiveTestMixin): <NEW_LINE> <INDENT> license_plate_pattern: Pattern = re.compile(r"[A-Z]{3}-\d{4}")
Test pt_BR automotive provider methods
6259907c7cff6e4e811b7477
class UserUnReadNotifications(ListAPIView): <NEW_LINE> <INDENT> permission_classes = (IsAuthenticatedOrReadOnly,) <NEW_LINE> serializer_class = NotificationSerializer <NEW_LINE> def get(self, request): <NEW_LINE> <INDENT> serializer_context = {'request': request} <NEW_LINE> user = request.user <NEW_LINE> if user.is_sub...
Get all unread notifications class
6259907c283ffb24f3cf52d8
class TenantsCommand(base.ListCommand): <NEW_LINE> <INDENT> columns = ['domain_count', 'id'] <NEW_LINE> def execute(self, parsed_args): <NEW_LINE> <INDENT> return self.client.reports.tenants_all()
Get list of tenants and domain count for each
6259907caad79263cf4301f1
class Plant(Transparent): <NEW_LINE> <INDENT> def makeObject(self, x, y, z, metadata): <NEW_LINE> <INDENT> mesh = bpy.data.meshes.new(name="Block") <NEW_LINE> mesh.from_pydata([[-0.5,-0.5,-0.5],[0.5,-0.5,-0.5],[-0.5,0.5,-0.5],[0.5,0.5,-0.5],[-0.5,-0.5,0.5],[0.5,-0.5,0.5],[-0.5,0.5,0.5],[0.5,0.5,0.5]], [], [[0,3,7,4], [...
Plants that are X shaped
6259907c009cb60464d02f77
class CategoryTypeViewSet(viewsets.ReadOnlyModelViewSet): <NEW_LINE> <INDENT> queryset = CategoryType.types.all() <NEW_LINE> serializer_class = CategoryTypeSerializer
This viewset automatically provides `list`, `detail` actions.
6259907c7b180e01f3e49d81
class ListCreateUsers(ListCreateResource): <NEW_LINE> <INDENT> login_required = True <NEW_LINE> model = User <NEW_LINE> filterable_fields = () <NEW_LINE> searchable_fields = ('name',) <NEW_LINE> serializer_class = UserSerializer <NEW_LINE> def perform_create(self,req,db,posted_data): <NEW_LINE> <INDENT> tenant_id = s...
We expect client_id to be passed for non authorized logins.
6259907c5fdd1c0f98e5f9b7
class City(BaseModel, Base): <NEW_LINE> <INDENT> __tablename__ = "cities" <NEW_LINE> state_id = Column(String(60), ForeignKey('states.id'), nullable=False) <NEW_LINE> name = Column(String(128), nullable=False) <NEW_LINE> places = relationship('Place', backref='cities', cascade='all, delete, delete-orphan')
Define the class City that inherits from BaseModel.
6259907c5166f23b2e244e10
class KeychainMetric(Metric): <NEW_LINE> <INDENT> DISPLAY_NAME = 'OSX_Keychain_Access' <NEW_LINE> HISTOGRAM_NAME = 'OSX.Keychain.Access' <NEW_LINE> @staticmethod <NEW_LINE> def _CheckKeychainConfiguration(): <NEW_LINE> <INDENT> warning_suffix = ('which will cause some Telemetry tests to stall when run' ' on a headless ...
KeychainMetric gathers keychain statistics from the browser object. This includes the number of times that the keychain was accessed.
6259907c091ae35668706677
class IllegalConfig(BoggartException): <NEW_LINE> <INDENT> def __init__(self, reason: str) -> None: <NEW_LINE> <INDENT> super().__init__(reason)
Used to indicate that a given configuration is syntatically correct but that it describes an illegal configuration.
6259907c4f88993c371f123e
class SheetStatus(Enum): <NEW_LINE> <INDENT> draft = '0' <NEW_LINE> submit = '1' <NEW_LINE> recall = '2' <NEW_LINE> approve = '5' <NEW_LINE> discard = '9'
单据状态
6259907c167d2b6e312b82b0
class ImplicationExpert(object): <NEW_LINE> <INDENT> def __init__(self, formal_context): <NEW_LINE> <INDENT> self.formal_context = formal_context <NEW_LINE> self.implication_query_count = 0 <NEW_LINE> <DEDENT> def is_valid(self, implication): <NEW_LINE> <INDENT> return self.provide_counterexample(implication) is None <...
Answers to two types of queries: is_valid, request of counterexample.
6259907ca8370b77170f1e08
class Edge: <NEW_LINE> <INDENT> __slots__ = '_origin', '_destination' <NEW_LINE> def __init__(self, u, v): <NEW_LINE> <INDENT> self._origin = u <NEW_LINE> self._destination = v <NEW_LINE> <DEDENT> def endpoints(self): <NEW_LINE> <INDENT> return (self._origin, self._destination) <NEW_LINE> <DEDENT> def opposite(self, v)...
Lightweight edge structure for a graph.
6259907c97e22403b383c93a
class TestListDirectoryTSKWindows(base.TestVFSPathExists): <NEW_LINE> <INDENT> platforms = ["Windows"] <NEW_LINE> flow = filesystem.ListDirectory.__name__ <NEW_LINE> args = { "pathspec": rdf_paths.PathSpec( path="C:\\Windows", pathtype=rdf_paths.PathSpec.PathType.TSK) } <NEW_LINE> test_output_path = "/fs/tsk/.*/C:/Wind...
Tests if ListDirectory works on Windows using Sleuthkit.
6259907c796e427e538501b3
class Stats(ProcessEvent): <NEW_LINE> <INDENT> def my_init(self): <NEW_LINE> <INDENT> self._start_time = time.time() <NEW_LINE> self._stats = {} <NEW_LINE> self._stats_lock = threading.Lock() <NEW_LINE> <DEDENT> def process_default(self, event): <NEW_LINE> <INDENT> self._stats_lock.acquire() <NEW_LINE> try: <NEW_LINE> ...
Compute and display trivial statistics about processed events.
6259907c3617ad0b5ee07b87
class UpdateFilmSchema(CreateFilmSchema): <NEW_LINE> <INDENT> title = SchemaNode(String(), missing=None)
A schema to validate input parameters intended to UPDATE an existing film.
6259907c3346ee7daa33837e
class StylesView(StylesBase, ViewletBase): <NEW_LINE> <INDENT> pass
Styles Viewlet
6259907cf548e778e596cfcb
class ServiceHostTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.service = service_create('example.com', 'nopass') <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> Service.objects.all().delete() <NEW_LINE> <DEDENT> def get_service(self): <NEW_LINE> <INDENT> return Service.objec...
Test Service model, more specifically the hosts functionality. This is not exposed via the API.
6259907c1f5feb6acb164632
class KeyValue(Data): <NEW_LINE> <INDENT> aliases = ['keyvalue'] <NEW_LINE> _settings = { 'storage-type' : 'sqlite3' } <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return repr(self) <NEW_LINE> <DEDENT> def data(self): <NEW_LINE> <INDENT> raise Exception("No data method for KeyValue type data.") <NEW_LINE> <DE...
Data class for key-value data.
6259907c5fdd1c0f98e5f9b9
class PapermillRateLimitException(PapermillException): <NEW_LINE> <INDENT> pass
Raised when an io request has been rate limited
6259907c56b00c62f0fb430e
class _HistoryEditor(Editor): <NEW_LINE> <INDENT> def init(self, parent): <NEW_LINE> <INDENT> self.control = control = QtGui.QComboBox() <NEW_LINE> control.setEditable(True) <NEW_LINE> control.setInsertPolicy(QtGui.QComboBox.InsertAtTop) <NEW_LINE> if self.factory.entries > 0: <NEW_LINE> <INDENT> signal = QtCore.SIGNAL...
Simple style text editor, which displays a text field and maintains a history of previously entered values, the maximum number of which is specified by the 'entries' trait of the HistoryEditor factory.
6259907c23849d37ff852af3
class Orcid(ArticleScraper): <NEW_LINE> <INDENT> aliases = ['orcid'] <NEW_LINE> _settings = { 'orcid' : ("ORCID of author to process, or a list of ORCIDS.", None), "period" : ("Custom setting for article 'period'.", "manual"), 'orcid-data-file' : ("File to save data under.", "orcid.pickle") } <NEW_LINE> def scrape(self...
Generate lists of articles for authors based on ORCID.
6259907c3317a56b869bf263
class Comment(models.Model): <NEW_LINE> <INDENT> nid = models.AutoField(primary_key=True) <NEW_LINE> user = models.ForeignKey(to='UserInfo', to_field='nid') <NEW_LINE> article = models.ForeignKey(to='Article', to_field='nid') <NEW_LINE> content = models.CharField(max_length=256) <NEW_LINE> create_time = models.DateTime...
评论表
6259907c4a966d76dd5f0921
class TechIndicator(models.Model): <NEW_LINE> <INDENT> standard = models.CharField('standard', max_length=20) <NEW_LINE> description = models.TextField() <NEW_LINE> tech_standards = models.ManyToManyField("TechnologyStandard") <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return self.standard <NEW_LINE> <DEDENT...
Tech Indicator class.
6259907c7cff6e4e811b747b
class Blog(models.Model): <NEW_LINE> <INDENT> user_id=models.ForeignKey(BloggerLogin, on_delete=models.CASCADE) <NEW_LINE> com_id=models.ForeignKey(Company, on_delete=models.CASCADE,default=-1) <NEW_LINE> cat_id=models.ForeignKey(Category, on_delete=models.CASCADE) <NEW_LINE> subcat_id=models.ForeignKey(SubCategory, on...
This is for the writing of the blog.
6259907cbe7bc26dc9252b73
class TrafficAnalyticsProperties(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'network_watcher_flow_analytics_configuration': {'key': 'networkWatcherFlowAnalyticsConfiguration', 'type': 'TrafficAnalyticsConfigurationProperties'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> su...
Parameters that define the configuration of traffic analytics. :param network_watcher_flow_analytics_configuration: Parameters that define the configuration of traffic analytics. :type network_watcher_flow_analytics_configuration: ~azure.mgmt.network.v2020_04_01.models.TrafficAnalyticsConfigurationProperties
6259907c4f6381625f19a1cb
class Monoid: <NEW_LINE> <INDENT> def __init__(self, one: T, elements: set[T], function: Callable[[T, T], T]): <NEW_LINE> <INDENT> assert one in elements <NEW_LINE> self.one = one <NEW_LINE> self.elements = elements <NEW_LINE> self.function = function <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def monoid_from_generat...
We use the multiplicative notation, e.g: 1, S, f where: for all a,b in S: f(1,a)=f(a,1)=a f(a,b) in S
6259907c55399d3f05627f4f
class TiledGrid3D(GridBase): <NEW_LINE> <INDENT> def _init(self): <NEW_LINE> <INDENT> ver_pts, tex_pts = self._calculate_vertex_points() <NEW_LINE> self.vertex_list = pyglet.graphics.vertex_list(self.grid.x * self.grid.y * 4, "t2f", "v3f/stream", "c4B") <NEW_LINE> self.vertex_points = ver_pts[:] <NEW_LINE> self.vertex_...
`TiledGrid3D` is a 3D grid implementation. It differs from `Grid3D` in that the tiles can be separated from the grid. The vertex array will be built with:: self.vertex_list.vertices: x,y,z (floats) self.vertex_list.tex_coords: x,y (floats) self.vertex_list.colors: RGBA, with values from 0 - 255
6259907c5fcc89381b266e79
class Linear(Kern): <NEW_LINE> <INDENT> def __init__(self, input_dim, variance=1.0, active_dims=None, ARD=False, name=None): <NEW_LINE> <INDENT> Kern.__init__(self, input_dim, active_dims, name=name) <NEW_LINE> self.ARD = ARD <NEW_LINE> if ARD: <NEW_LINE> <INDENT> variance = np.ones(self.input_dim) * variance <NEW_LINE...
The linear kernel
6259907c442bda511e95da75
class Globalarrays(CMakePackage): <NEW_LINE> <INDENT> homepage = "http://hpc.pnl.gov/globalarrays/" <NEW_LINE> url = "https://github.com/GlobalArrays/ga" <NEW_LINE> version('master', git='https://github.com/GlobalArrays/ga', branch='master') <NEW_LINE> depends_on('blas') <NEW_LINE> depends_on('lapack') <NEW_LINE> ...
The Global Arrays (GA) toolkit provides a shared memory style programming environment in the context of distributed array data structures.
6259907c3617ad0b5ee07b89
class HTTPUploader(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, i, request, start, size, timeout, opener=None, shutdown_event=None): <NEW_LINE> <INDENT> threading.Thread.__init__(self) <NEW_LINE> self.request = request <NEW_LINE> self.request.data.start = self.starttime = start <NEW_LINE> self.size = size ...
Thread class for putting a URL
6259907c3346ee7daa33837f
class BooleanMetric(Metric): <NEW_LINE> <INDENT> def _populate_value(self, metric, value, start_time): <NEW_LINE> <INDENT> metric.boolean_value = value <NEW_LINE> <DEDENT> def set(self, value, fields=None, target_fields=None): <NEW_LINE> <INDENT> if not isinstance(value, bool): <NEW_LINE> <INDENT> raise errors.Monitori...
A metric whose value type is a boolean.
6259907c5fdd1c0f98e5f9bb
class InvalidControlType(ProtoError): <NEW_LINE> <INDENT> pass
Invalid Control Type. Invalid control type provided for Fast Operate, must be member of: ['REMOTE_BIT', 'BREAKER_BIT'].
6259907cdc8b845886d54ff7
@TwoCompatibleThree <NEW_LINE> @classbuilder( bases=( DeepClass("_aor_", { "username": {dck.check: lambda x: isinstance(x, bytes)}, "host": { dck.descriptor: ParsedPropertyOfClass(Host), dck.gen: Host}}), Parser, TupleRepresentable, ValueBinder ) ) <NEW_LINE> class AOR: <NEW_LINE> <INDENT> parseinfo = { Parser.Pattern:...
A AOR object.
6259907c7d43ff2487428133
class ViewPollResults(DetailView): <NEW_LINE> <INDENT> context_object_name = 'poll' <NEW_LINE> template_name = 'voting/poll_results.html' <NEW_LINE> def dispatch(self, request, *args, **kwargs): <NEW_LINE> <INDENT> space = get_object_or_404(Space, url=kwargs['space_url']) <NEW_LINE> if request.user.has_perm('view_space...
Displays an specific poll results. The results are always available even after the end_date. .. versionadded:: 0.1.7 beta :context: get_place
6259907cf548e778e596cfce
class AcqSvProfile(object): <NEW_LINE> <INDENT> _parser = Embedded(Struct("AcqSvProfile", ULInt8('job_type'), ULInt8('status'), ULInt16('cn0'), ULInt8('int_time'), Struct('sid', GnssSignal._parser), ULInt16('bin_width'), ULInt32('timestamp'), ULInt32('time_spent'), SLInt32('cf_min'), SLInt32('cf_max'), SLInt32('cf'), U...
AcqSvProfile. Profile for a specific SV for debugging purposes The message describes SV profile during acquisition time. The message is used to debug and measure the performance. Parameters ---------- job_type : int SV search job type (deep, fallback, etc) status : int Acquisition status 1 is S...
6259907cd486a94d0ba2d9f4
class LatestProblemResponseTaskMapLegacyKeysTest(InitializeLegacyKeysMixin, LatestProblemResponseTaskMapTest): <NEW_LINE> <INDENT> pass
Also test with legacy keys
6259907c656771135c48ad4e
@tf.keras.utils.register_keras_serializable(package='Text') <NEW_LINE> class BertPretrainer(tf.keras.Model): <NEW_LINE> <INDENT> def __init__(self, network, num_classes, num_token_predictions, activation=None, initializer='glorot_uniform', output='logits', **kwargs): <NEW_LINE> <INDENT> self._self_setattr_tracking = Fa...
BERT network training model. This is an implementation of the network structure surrounding a transformer encoder as described in "BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding" (https://arxiv.org/abs/1810.04805). The BertPretrainer allows a user to pass in a transformer stack, and ...
6259907c5fdd1c0f98e5f9bc
class TargetNotFoundError(Exception): <NEW_LINE> <INDENT> pass
An internal use exception that indicates the lack of a valid pixel from a selection operation e.g. see `FloofillOperation._spiral()`
6259907c627d3e7fe0e088c3
class GesturePerformer: <NEW_LINE> <INDENT> def perform(self, *gestures): <NEW_LINE> <INDENT> for gesture in gestures: <NEW_LINE> <INDENT> gesture(self)
A mixin for performing human gestures
6259907c7c178a314d78e909
class PAResponseUsedNFVIPops(Model): <NEW_LINE> <INDENT> def __init__(self, nfvi_po_pid=None, mapped_vn_fs=None): <NEW_LINE> <INDENT> self.swagger_types = { 'nfvi_po_pid': str, 'mapped_vn_fs': List[str] } <NEW_LINE> self.attribute_map = { 'nfvi_po_pid': 'NFVIPoPID', 'mapped_vn_fs': 'mappedVNFs' } <NEW_LINE> self._nfvi_...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
6259907c167d2b6e312b82b2
class GameState(): <NEW_LINE> <INDENT> def __init__(self, model): <NEW_LINE> <INDENT> self.__model = model <NEW_LINE> self.__is_a_clone = False <NEW_LINE> <DEDENT> def get_falling_block_position(self): <NEW_LINE> <INDENT> return self.__model.falling_block_position <NEW_LINE> <DEDENT> def get_falling_block_angle(self): ...
GameState maintains the API to be used by an AutoPlayer to communicate with the game
6259907c5fc7496912d48f89
class Float(Typed): <NEW_LINE> <INDENT> _type = float
.
6259907c7d847024c075de1a
class MalletClassifier(mallet.Mallet): <NEW_LINE> <INDENT> def _basic_params(self): <NEW_LINE> <INDENT> self.dry_run = False <NEW_LINE> self.name = 'mallet_train-classifier' <NEW_LINE> self.dfr = False <NEW_LINE> <DEDENT> def process(self): <NEW_LINE> <INDENT> self._setup_mallet_instances(sequence=False) <NEW_LINE> sel...
Train a classifier
6259907c4f6381625f19a1cc
class NewsletterRouter(object): <NEW_LINE> <INDENT> def db_for_read(self, model, **hints): <NEW_LINE> <INDENT> if model._meta.app_label == 'newsletter': <NEW_LINE> <INDENT> return 'newsletter' <NEW_LINE> <DEDENT> return None <NEW_LINE> <DEDENT> def db_for_write(self, model, **hints): <NEW_LINE> <INDENT> if model._meta....
A router to control all database operations on models in the auth application.
6259907c66673b3332c31e3c
class DiskFreeMonitor(Monitor): <NEW_LINE> <INDENT> type = 'diskfree' <NEW_LINE> verbose_name = 'Disk free space' <NEW_LINE> average_fields = ['total', 'used', 'free', 'use_per_cent'] <NEW_LINE> cmd = ( 'DATA=$(df -k / | tail -n 1 | sed "s/%//"); ' 'echo $DATA | awk {\'print "{' ' \\"total\\": "$2",' ' \\"used\\": "$3"...
Show the disk usage and warn when free is near to the limit defined by rabbitmq (#326, #337)
6259907c8a349b6b43687c99
class UnitParseError(UnitError): <NEW_LINE> <INDENT> def __init__(self, expression, message, lineno=None): <NEW_LINE> <INDENT> self.expression = expression <NEW_LINE> self.message = message <NEW_LINE> self.lineno = lineno <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> if self.lineno: <NEW_LINE> <INDENT> ret...
Class for unit parsing errors.
6259907c3346ee7daa338380
class TestObject(object): <NEW_LINE> <INDENT> def __init__(self, name, typename): <NEW_LINE> <INDENT> self.var_name = name <NEW_LINE> self.var_typename = typename <NEW_LINE> <DEDENT> def getName(self): <NEW_LINE> <INDENT> return self.var_name <NEW_LINE> <DEDENT> def getTypeName(self): <NEW_LINE> <INDENT> return self.va...
Substitution for Aimsun's GKObject class
6259907c91f36d47f2231bad