code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class QueryLogsRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.JobName = None <NEW_LINE> self.Cluster = None <NEW_LINE> self.StartTime = None <NEW_LINE> self.EndTime = None <NEW_LINE> self.Limit = None <NEW_LINE> self.Context = None <NEW_LINE> <DEDENT> def _deserialize(self, par...
QueryLogs请求参数结构体
62598eef3539df3088ecaa74
class TopicDefnDeserialModule(ITopicDefnDeserializer): <NEW_LINE> <INDENT> def __init__(self, moduleName: str, searchPath: Sequence[str] = None): <NEW_LINE> <INDENT> if searchPath is not None: <NEW_LINE> <INDENT> old_path = sys.path <NEW_LINE> sys.path = searchPath <NEW_LINE> <DEDENT> try: <NEW_LINE> <INDENT> from impo...
Deserialize a module containing Python source code defining a topic tree. This loads the module and gives it to an instance of TopicDefnDeserialClass.
62598eef627d3e7fe0e0564c
@mock.patch('requests.get', local_get) <NEW_LINE> @mock.patch('dlstats.fetchers.esri.Esri.make_url',make_url) <NEW_LINE> class EsriFixSeriesTestCase(BaseTestCase): <NEW_LINE> <INDENT> def test_fix_series_name(self): <NEW_LINE> <INDENT> for d in dataset_codes: <NEW_LINE> <INDENT> if re.match('.*',d): <NEW_LINE> <INDENT>...
ESRI fixing series names
62598eef091ae356687033da
class AsyncEventsThread(threading.Thread): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.daemon = True <NEW_LINE> self.terminate = False <NEW_LINE> self.eventQueue = queue.Queue() <NEW_LINE> self.queueNotEmpty = threading.Condition() <NEW_LINE> <DEDENT> def run(self): <N...
This class is used to execute the pipeline for events asynchronously. This should not be invoked directly by callers; instead, they should use girder.events.daemon.trigger().
62598eefbe7bc26dc9251243
class RPCInterface: <NEW_LINE> <INDENT> def __init__(self, function, serialiser_info): <NEW_LINE> <INDENT> self._function_call = function.__call__ <NEW_LINE> self._function_name = function.__qualname__ <NEW_LINE> self._function_signature = signature(function) <NEW_LINE> update_wrapper(self, function) <NEW_LINE> self.ta...
Mediates RPC calls to/from peers
62598eefe5267d203ee6a0ca
class FollowingManager(models.Manager): <NEW_LINE> <INDENT> def followers(self, user): <NEW_LINE> <INDENT> key = cache_key('followers', user.pk) <NEW_LINE> followers = cache.get(key) <NEW_LINE> if followers is None: <NEW_LINE> <INDENT> qs = Follow.objects.filter(followee=user).all() <NEW_LINE> followers = [u.follower f...
Following manager
62598eef2c8b7c6e89bd1f83
class dgamma_gen(rv_continuous): <NEW_LINE> <INDENT> def _rvs(self, a): <NEW_LINE> <INDENT> u = mtrand.random_sample(size=self._size) <NEW_LINE> return (gamma.rvs(a, size=self._size)*where(u >= 0.5, 1, -1)) <NEW_LINE> <DEDENT> def _pdf(self, x, a): <NEW_LINE> <INDENT> ax = abs(x) <NEW_LINE> return 1.0/(2*special.gamma(...
A double gamma continuous random variable. %(before_notes)s Notes ----- The probability density function for `dgamma` is:: dgamma.pdf(x, a) = 1 / (2*gamma(a)) * abs(x)**(a-1) * exp(-abs(x)) for ``a > 0``. %(example)s
62598eeffff4ab517ebcbf99
class Helper(object): <NEW_LINE> <INDENT> def getAngledPoint(angle,longueur,cx,cy): <NEW_LINE> <INDENT> x = (math.cos(angle)*longueur)+cx <NEW_LINE> y = (math.sin(angle)*longueur)+cy <NEW_LINE> return (x,y) <NEW_LINE> <DEDENT> getAngledPoint = staticmethod(getAngledPoint) <NEW_LINE> def calcAngle(x1,y1,x2,y2): <NEW_LIN...
cette classe est utilise de facon statique sans creer d'objet
62598eef796e427e5384cf5a
class RefreshConfig(ContextCommand): <NEW_LINE> <INDENT> def do(self): <NEW_LINE> <INDENT> self.cfg.update()
Refresh the git config cache
62598eef5fdd1c0f98e5c763
class WaveGlowDataset(Dataset): <NEW_LINE> <INDENT> def __init__(self, audio_dir, sample_rate, local_condition_enabled=False, local_condition_dir=None): <NEW_LINE> <INDENT> self.audio_dir = audio_dir <NEW_LINE> self.sample_rate = sample_rate <NEW_LINE> self.local_condition_enabled = local_condition_enabled <NEW_LINE> s...
WaveGlow dataset.
62598eef442bda511e95ac25
class UserModel(list): <NEW_LINE> <INDENT> db = 0 <NEW_LINE> @limitable <NEW_LINE> def filter_gen(self, audience, exclude=False): <NEW_LINE> <INDENT> for u in sorted(self.db.users, key=rand): <NEW_LINE> <INDENT> match = all([u.get(dim, None) == b for dim, b in audience.items()]) <NEW_LINE> if match + exclude == 1: <NE...
A list of User dicts
62598eeff9cc0f698b1c46b0
class Event(DynamicModelBase): <NEW_LINE> <INDENT> name = models.CharField(max_length=255) <NEW_LINE> slug = models.SlugField() <NEW_LINE> summary = models.TextField() <NEW_LINE> description = models.TextField() <NEW_LINE> event_type = models.ForeignKey(EventType, related_name="events") <NEW_LINE> tags = TagField() <NE...
A scheduled event.
62598eef57b8e32f525074e5
class ConfigurationDataType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): <NEW_LINE> <INDENT> BOOLEAN = "Boolean" <NEW_LINE> NUMERIC = "Numeric" <NEW_LINE> INTEGER = "Integer" <NEW_LINE> ENUMERATION = "Enumeration"
Data type of the configuration.
62598eef7d847024c075ab91
class sha256_crypt(_SHA2_Common): <NEW_LINE> <INDENT> name = "sha256_crypt" <NEW_LINE> ident = u("$5$") <NEW_LINE> checksum_size = 43 <NEW_LINE> default_rounds = 80000 <NEW_LINE> @classproperty <NEW_LINE> def _has_backend_os_crypt(cls): <NEW_LINE> <INDENT> return test_crypt("test", "$5$rounds=1000$test$QmQADEXMG8POI5W"...
This class implements the SHA256-Crypt password hash, and follows the :ref:`password-hash-api`. It supports a variable-length salt, and a variable number of rounds. The :meth:`~passlib.ifc.PasswordHash.encrypt` and :meth:`~passlib.ifc.PasswordHash.genconfig` methods accept the following optional keywords: :type salt...
62598eef66656f66f7d58ba5
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.BETA) <NEW_LINE> class Remove(base.Command): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(Remove, self).__init__(*args, **kwargs) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def Args(parser): <NEW_LINE> <INDENT> additi...
Remove an SSH Public Key from an OS Login Profile.
62598eef2ae34c7f260a98aa
class InlineResponse20046(object): <NEW_LINE> <INDENT> swagger_types = { 'count': 'int', 'next': 'str', 'previous': 'str', 'results': 'list[RIR]' } <NEW_LINE> attribute_map = { 'count': 'count', 'next': 'next', 'previous': 'previous', 'results': 'results' } <NEW_LINE> def __init__(self, count=None, next=None, previous=...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598eef4f88993c371ef8ca
class ModelValidator(HasAModelManager): <NEW_LINE> <INDENT> def __init__(self, app, *args, **kwargs): <NEW_LINE> <INDENT> super(ModelValidator, self).__init__(app, **kwargs) <NEW_LINE> self.app = app <NEW_LINE> <DEDENT> def type(self, key, val, types): <NEW_LINE> <INDENT> if not isinstance(val, types): <NEW_LINE> <INDE...
An object that inspects a dictionary (generally meant to be a set of new/updated values for the model) and raises an error if a value is not acceptable.
62598eefd486a94d0ba2a790
class ItemUpdateForm(BaseItemProcessForm): <NEW_LINE> <INDENT> def clean_sku(self): <NEW_LINE> <INDENT> return self._validate_sku(self.cleaned_data['sku'], self.instance.company)
Form for item update page
62598eefadb09d7d5dc08d8c
class configuration(lib_config): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> lib_config.__init__(self, "cppunit", "TestCaller.h", debug=False) <NEW_LINE> <DEDENT> def download(self, environ, version, strict=False): <NEW_LINE> <INDENT> if version is None: <NEW_LINE> <INDENT> version = '1.12.1' <NEW_LINE>...
Find/install CPP unit test library
62598eefb7558d5895461e09
class TwoLayerNet(object): <NEW_LINE> <INDENT> def __init__(self, input_dim=3*32*32, hidden_dim=100, num_classes=10, weight_scale=1e-3, reg=0.0): <NEW_LINE> <INDENT> self.params = {} <NEW_LINE> self.reg = reg <NEW_LINE> self.params['W1'] = np.random.normal(scale = weight_scale, size=(np.prod(input_dim), hidden_dim)) <N...
A two-layer fully-connected neural network with ReLU nonlinearity and softmax loss that uses a modular layer design. We assume an input dimension of D, a hidden dimension of H, and perform classification over C classes. The architecure should be affine - relu - affine - softmax. Note that this class does not implemen...
62598eefd58c6744b42db697
class VerticalProfile: <NEW_LINE> <INDENT> def __init__(self, data, altitude, dtime, var_name, data_err, var_unit, altitude_unit): <NEW_LINE> <INDENT> self.var_name = var_name <NEW_LINE> self.dtime = dtime <NEW_LINE> self.data = data <NEW_LINE> self.data_err = data_err <NEW_LINE> self.altitude = altitude <NEW_LINE> sel...
Object representing single variable profile data
62598eef7d43ff24874267dd
class CSETracker(Code): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(CSETracker, self).__init__() <NEW_LINE> self.cse_depends = {} <NEW_LINE> <DEDENT> def track(self, expr): <NEW_LINE> <INDENT> self.track_stack = [None, 0] <NEW_LINE> self.to_cache = [] <NEW_LINE> try: <NEW_LINE> <INDENT> self(expr)...
Helper object that tracks common sub-expressions
62598eef4527f215b58e86c2
class Zipalign(AndroidTask): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def prepare(cls, options, round_manager): <NEW_LINE> <INDENT> super(Zipalign, cls).prepare(options, round_manager) <NEW_LINE> round_manager.require_data('release_apk') <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def is_zipaligntarget(target): <NE...
Task to run zipalign, an archive alignment tool.
62598eefd486a94d0ba2a791
class MIP(DP): <NEW_LINE> <INDENT> def __init__(self, string): <NEW_LINE> <INDENT> self._half_palindrome = string <NEW_LINE> self._res_matrix = [[0 for _ in range(len(self._half_palindrome))] for _ in range(len(self._half_palindrome))] <NEW_LINE> <DEDENT> def _preset(self): <NEW_LINE> <INDENT> tmp_palindrome = self._ha...
Dynamic Programming The problem's description is as below. http://www.geeksforgeeks.org/dynamic-programming-set-28-minimum-insertions-to-form-a-palindrome/
62598eef32920d7e50bc47f0
class TodoList(generics.ListCreateAPIView): <NEW_LINE> <INDENT> serializer_class = TodoSerializer <NEW_LINE> authentication_classes = [BasicAuthentication, TokenAuthentication] <NEW_LINE> permission_classes = [permissions.IsAuthenticated, IsOwner] <NEW_LINE> def get_queryset(self, *args, **kwargs): <NEW_LINE> <INDENT> ...
List all todos, or create new
62598eef7047854f4633db95
@square <NEW_LINE> @inplace <NEW_LINE> class NormalizeOperator(Operator): <NEW_LINE> <INDENT> def __init__(self, dtype=float, **keywords): <NEW_LINE> <INDENT> Operator.__init__(self, dtype=dtype, **keywords) <NEW_LINE> <DEDENT> def direct(self, input, output): <NEW_LINE> <INDENT> np.divide(input, np.sqrt(np.sum(input**...
Normalize a cartesian vector. Example ------- >>> n = NormalizeOperator() >>> n([1, 1]) array([ 0.70710678, 0.70710678])
62598eef167d2b6e312b575d
class ThoughtBody(PropositionalConcept): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super().__init__(**kwargs) <NEW_LINE> self._namespace = ONTOLOGY_NS <NEW_LINE> self._project_id = PROJECT_ID <NEW_LINE> self._name = "ThoughtBody"
. Labels: Gedankengut (de) / body of thought (en)
62598eef4e4d562566370bd8
class BlogPost(Displayable, Ownable, RichText, AdminThumbMixin): <NEW_LINE> <INDENT> categories = models.ManyToManyField("BlogCategory", verbose_name=_("Categories"), blank=True, related_name="blogposts") <NEW_LINE> allow_comments = models.BooleanField(verbose_name=_("Allow comments"), default=True) <NEW_LINE> comments...
A blog post.
62598eef26068e7796d4b120
class MySQLNativePasswordAuthPlugin(BaseAuthPlugin): <NEW_LINE> <INDENT> requires_ssl = False <NEW_LINE> plugin_name = 'mysql_native_password' <NEW_LINE> def prepare_password(self): <NEW_LINE> <INDENT> if not self._auth_data: <NEW_LINE> <INDENT> raise errors.InterfaceError("Missing authentication data (seed)") <NEW_LIN...
Class implementing the MySQL Native Password authentication plugin
62598eef56ac1b37e63009b0
class InstanceExists(EventBaseModel): <NEW_LINE> <INDENT> kwarg_map = {'audit_period_beginning': 'audit_period_beginning', 'audit_period_ending': 'audit_period_ending', 'bandwidth': 'bandwidth'} <NEW_LINE> kwarg_map.update(BASE_KWARG_MAP) <NEW_LINE> def __init__(self, access_ip_v4, access_ip_v6, architecture, audit_per...
Compute Instance Exists Response Model @summary: Response model for a compute.instance.exists event notification @note: Represents a single event notification JSON Example: { "access_ip_v4": "10.10.0.0", "access_ip_v6": null, "architecture": "x64", "audit_period_beginning": "20...
62598eefe5267d203ee6a0cb
class AbstractPythonEnv(object): <NEW_LINE> <INDENT> executable = '' <NEW_LINE> def __init__(self, s): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @property <NEW_LINE> def name(self): <NEW_LINE> <INDENT> pass
Abstraction of list of Pythons to run against -- e.g.: - Travis: 2.5, 2.6, 2.7, 3.2, pypy - Tox: py25, py26, py27, py32, pypy, jython
62598eefaad79263cf42cfd0
class Keyword: <NEW_LINE> <INDENT> REQUIRED_CONFIG_ATTRS = ['vm_name', 'snapshot_name'] <NEW_LINE> @exception_interceptor <NEW_LINE> def main(self): <NEW_LINE> <INDENT> self.vm_name = self.vm_name <NEW_LINE> self.snapshot_name = self.snapshot_name <NEW_LINE> if self.check_vm_status(): <NEW_LINE> <INDENT> raise Exceptio...
This keyword allows to create a snapshot of the VirtualMachine. Arguments of user configuration file: vm_name = name of the VirtualMachine in Virtual Box (example: vm_name = ubuntu1610-amd64) snapshot_name = name of the snapshot (example: snapshot_name = base)
62598eefe5267d203ee6a0cc
class IntroAbstract(scene.Scene): <NEW_LINE> <INDENT> def __init__(self, world, image, next_scene, must_interpolate=True): <NEW_LINE> <INDENT> scene.Scene.__init__(self, world) <NEW_LINE> self.background = common.load(image, False) <NEW_LINE> self.counter = 0 <NEW_LINE> self.next_scene = next_scene <NEW_LINE> self.must...
Representa una etapa de la presentación, por ejemplo la primer imagen.
62598eef60cbc95b06362b03
class SampleMaterial(object): <NEW_LINE> <INDENT> OTHER = "Annat" <NEW_LINE> BIO = "Bio" <NEW_LINE> BLOD = "Blod" <NEW_LINE> BRONK = "Bronk" <NEW_LINE> FECES = "Feces" <NEW_LINE> LIKV = "Likv" <NEW_LINE> LYMF = "Lymf" <NEW_LINE> NFARY = "Nfary" <NEW_LINE> NASA = "Nasa" <NEW_LINE> PLEUR = "Pleur" <NEW_LINE> SEKR = "Sekr...
Avser undersökningsmatrial. (Notera att det är tillåtet att byta ut 'å' och 'ä' mot 'a' samt att 'ö' kan bytas ut mot 'o'. Detta alternativ finns om det skulle bli problem med valideringen pga konstigheter i teckentabeller.)
62598eef8e7ae83300ee7853
class RelatedUserOnly(permissions.BasePermission): <NEW_LINE> <INDENT> def has_object_permission(self, request, view, obj): <NEW_LINE> <INDENT> return request.user == obj.user
Full rights granted only to related user
62598eef7c178a314d78bc59
class TftpPacketWithOptions(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.options = [] <NEW_LINE> <DEDENT> def setoptions(self, options): <NEW_LINE> <INDENT> logger.debug("in TftpPacketWithOptions.setoptions") <NEW_LINE> logger.debug("options: " + str(options)) <NEW_LINE> myoptions = {} <NEW...
This class exists to permit some TftpPacket subclasses to share code regarding options handling. It does not inherit from TftpPacket, as the goal is just to share code here, and not cause diamond inheritance.
62598eeffff4ab517ebcbf9c
class DeleteLinkView(DeleteView): <NEW_LINE> <INDENT> model = Link <NEW_LINE> success_url = reverse_lazy('home')
A view that deletes a link.
62598eef435de62698e9a595
class snapshot_details: <NEW_LINE> <INDENT> def __init__(self,instance): <NEW_LINE> <INDENT> self.instance = instance <NEW_LINE> self.project = '' <NEW_LINE> self.id = self.instance['SnapshotId'] <NEW_LINE> if 'Tags' in instance.keys(): <NEW_LINE> <INDENT> for t in self.instance['Tags']: <NEW_LINE> <INDENT> if t['Key']...
Snapshot details class
62598eef5fdd1c0f98e5c766
class Pod(AbstractActionBase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def subparser(cls, parent): <NEW_LINE> <INDENT> pod_parser = parent.add_parser( 'pod', help='pod commands.' ' For subcommands, see: %(prog)s pod --help') <NEW_LINE> subparser = pod_parser.add_subparsers() <NEW_LINE> for name, obj in inspect.getm...
Class for creating a pod.
62598eefa219f33f346c4ffe
class PointInTimeRecoveryUnavailableException(ClientError): <NEW_LINE> <INDENT> pass
Please check DynamoDB docs for documentation.
62598eeff548e778e5969d50
class InsufficientOverlapError(Exception): <NEW_LINE> <INDENT> pass
An exception raised if an error occurs during extent calculation because the bounding boxes do not overlap.
62598eefa79ad161977687e5
class DownloadQueue(object): <NEW_LINE> <INDENT> def __init__(self, length: int = 5, logger: LoggerOrTruthyType = None): <NEW_LINE> <INDENT> self.max_length, self.length = length, 0 <NEW_LINE> self._downloads_s = BoundedSemaphore(length) <NEW_LINE> self._available_s = BoundedSemaphore(length) <NEW_LINE> for X in range(...
queue like data structure allowing concurrent downloading. This class provides the main interface to the DownloadQueue API. Whenever you wish to download something concurrently, simply pass your arguments to queue.add or queue.enqueue and the appropriate downloader will be instantiated and subsequently started. If the...
62598eef99cbb53fe682f673
class ReferencePattern(LinkPattern): <NEW_LINE> <INDENT> NEWLINE_CLEANUP_RE = re.compile(r'[ ]?\n', re.MULTILINE) <NEW_LINE> def handleMatch(self, m): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> id = m.group(9).lower() <NEW_LINE> <DEDENT> except IndexError: <NEW_LINE> <INDENT> id = None <NEW_LINE> <DEDENT> if not id: ...
Match to a stored reference and return link element.
62598eef5fcc89381b26550a
class FlappingInfo(object): <NEW_LINE> <INDENT> def __init__(self, attempts=2, window=1., retry_in=7., max_retry=5): <NEW_LINE> <INDENT> self.attempts = attempts <NEW_LINE> self.window = window <NEW_LINE> self.retry_in = retry_in <NEW_LINE> self.max_retry = max_retry <NEW_LINE> self.history = deque(maxlen = max_retry) ...
object to keep flapping infos
62598eef7d43ff24874267de
class AccountManager(BaseUserManager): <NEW_LINE> <INDENT> def create_user(self, **kwargs): <NEW_LINE> <INDENT> email = kwargs.get('email') <NEW_LINE> if not email: <NEW_LINE> <INDENT> raise ValueError('Users must have a valid email address.') <NEW_LINE> <DEDENT> username = kwargs.get('username') <NEW_LINE> if not user...
Manager to handle creation of accounts and superuser accounts for a custom User model
62598eefb7558d5895461e0b
class AmendAllocation(AllocationShowOne): <NEW_LINE> <INDENT> log = logging.getLogger(__name__ + '.AmendAllocation') <NEW_LINE> def take_action(self, parsed_args): <NEW_LINE> <INDENT> self.log.debug('take_action(%s)', parsed_args) <NEW_LINE> client = self.app.client_manager.allocation <NEW_LINE> allocation = get_alloca...
Amend allocation
62598eefd486a94d0ba2a793
class SizeRenderer(Renderer): <NEW_LINE> <INDENT> def __init__(self, dc=None): <NEW_LINE> <INDENT> Renderer.__init__(self, dc, 0, 0) <NEW_LINE> <DEDENT> def renderCharacterData(self, data, x, y): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def start_angle(self, attrs): <NEW_LINE> <INDENT> self.characterData("M") <NEW_...
Processes text as if rendering it, but just computes the size.
62598eef7b180e01f3e4842a
class AutoPaginateNode(template.Node): <NEW_LINE> <INDENT> def __init__(self, queryset_var, paginate_by=None, orphans=DEFAULT_ORPHANS, context_var=None): <NEW_LINE> <INDENT> self.queryset_var = template.Variable(queryset_var) <NEW_LINE> if (paginate_by == None): <NEW_LINE> <INDENT> self.paginate_by = paginate_by <NEW_L...
Emits the required objects to allow for Digg-style pagination. First, it looks in the current context for the variable specified, and using that object, it emits a simple ``Paginator`` and the current page object into the context names ``paginator`` and ``page_obj``, respectively. It will then replace the variable s...
62598eef627d3e7fe0e05650
class DefaultDeleteForm(TileForm, form.Form): <NEW_LINE> <INDENT> name = "delete_tile" <NEW_LINE> tileType = None <NEW_LINE> tileId = None <NEW_LINE> ignoreContext = True <NEW_LINE> schema = None <NEW_LINE> def __init__(self, context, request): <NEW_LINE> <INDENT> super(DefaultDeleteForm, self).__init__(context, reques...
Standard tile delete form, which is wrapped by DefaultDeleteView (see below).
62598eefe5267d203ee6a0cd
class S2Describe(APIView): <NEW_LINE> <INDENT> schema = AutoSchema ( manual_fields=[ coreapi.Field (name='Authorization', required=True, location='header', description='', type='string'), coreapi.Field (name='s2_id', required=False, location='query', description='', type='string'), ] ) <NEW_LINE> @method_decorator (tok...
get: 获取共享存储服务器
62598eefbd1bec0571e144ad
class Operations(object): <NEW_LINE> <INDENT> models = _models <NEW_LINE> def __init__(self, client, config, serializer, deserializer): <NEW_LINE> <INDENT> self._client = client <NEW_LINE> self._serialize = serializer <NEW_LINE> self._deserialize = deserializer <NEW_LINE> self._config = config <NEW_LINE> <DEDENT> def l...
Operations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. :type models: ~azure.mgmt.network.v2017_10_01.models :param client: Clien...
62598eef460517430c430c4e
class RESTFormInvalidError(RESTException): <NEW_LINE> <INDENT> def __init__(self, form): <NEW_LINE> <INDENT> super(RESTFormInvalidError, self).__init__("Form is invalid", 400) <NEW_LINE> self.form = form
Thrown when a form is invalid, and holds all the errors.
62598eef796e427e5384cf5e
class FrozenUnit(object): <NEW_LINE> <INDENT> def __init__(self, unit): <NEW_LINE> <INDENT> self.unit = dict( source_f=unit.source_f, target_f=unit.target_f, context=unit.context, revision=unit.revision, submitter=unit.submitted_by, state=unit.state, pk=unit.pk, translator_comment=unit.translator_comment) <NEW_LINE> <D...
Freeze unit vars for comparison
62598eef3d592f4c4edb96b3
class AbstractActivityEntry(models.Model): <NEW_LINE> <INDENT> published = models.DateTimeField(null=False, blank=False) <NEW_LINE> title = models.CharField(max_length=255, null=True, blank=True) <NEW_LINE> link = models.URLField(max_length=255, verify_exists=False, null=True, blank=True) <NEW_LINE> timelineentry = gen...
An abstract base class which encapsulates the common information which describes activities from all sources of online activity.
62598eef92d797404e387f5e
class TipParser: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.mylist = [] <NEW_LINE> self.skip = False <NEW_LINE> self.tlist = [] <NEW_LINE> parser = ParserCreate() <NEW_LINE> parser.StartElementHandler = self.startElement <NEW_LINE> parser.EndElementHandler = self.endElement <NEW_LINE> parser.Chara...
Interface to the document template file
62598eef8a43f66fc4bf093a
@dataclasses.dataclass <NEW_LINE> class MotionModel: <NEW_LINE> <INDENT> measurements: int <NEW_LINE> states: int <NEW_LINE> A: np.ndarray <NEW_LINE> H: np.ndarray <NEW_LINE> P: np.ndarray <NEW_LINE> G: np.ndarray <NEW_LINE> R: np.ndarray <NEW_LINE> dt: float = 1.0 <NEW_LINE> accuracy: float = 2.0 <NEW_LINE> max_lost: ...
The `btrack` motion model. Parameters ---------- name : str A name identifier for the model. measurements : int The number of measurements of the system (e.g. 3 for x, y, z). states : int The number of states of the system (typically >= measurements). A : array (states, states) State transition matrix....
62598eef91f36d47f2230287
class Page(db.Model): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> title = db.Column(db.String, nullable=False) <NEW_LINE> datetime = db.Column(db.DateTime, default=datetime.utcnow) <NEW_LINE> source = db.Column(db.String) <NEW_LINE> private = db.Column(db.Boolean, server_default='f', def...
Model for Page
62598eef66656f66f7d58ba9
class InventoryDictPlugin(BaseInventoryPlugin): <NEW_LINE> <INDENT> NAME = "host_dict" <NEW_LINE> _load_name = NAME <NEW_LINE> _original_path = "" <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(InventoryDictPlugin, self).__init__() <NEW_LINE> self._hosts = set() <NEW_LINE> <DEDENT> def verify_file(self, sourc...
参照原生插件: script Host inventory parser for ansible using Dict data. as inventory scripts.
62598eef2ae34c7f260a98ae
class CommunityImageInline(TabularDynamicInlineAdmin): <NEW_LINE> <INDENT> model = CommunityImage
An Inline Table Row representing a :class:`~.models.CommunityImage`.
62598eefa79ad161977687e7
class SceneUIActionSet(ActionSet): <NEW_LINE> <INDENT> groups = [scene_group, view_group] <NEW_LINE> menus = [new_menu, save_scene_as_menu] <NEW_LINE> actions = [ new_scene, save_scene, save_scene_to_png, save_scene_to_jpeg, save_scene_to_bmp, save_scene_to_tiff, save_scene_to_ps, save_scene_to_gl2ps, save_scene_to_...
The default action set for the scene UI plugin.
62598eef99cbb53fe682f675
class MachineLocal( Machine ): <NEW_LINE> <INDENT> def __init__( self ): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def job_run( self, com, nodes, ppn, log ): <NEW_LINE> <INDENT> return jobid <NEW_LINE> <DEDENT> def job_wait( self, jobid ): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> def job_complete( self, jobid ...
Local machine definition. We use one node and one process, and use subprocess to run jobs.
62598eef4f88993c371ef8cc
class UnacceptedTypeInContainerError(Exception): <NEW_LINE> <INDENT> def __init__(self, index, string, type): <NEW_LINE> <INDENT> string = "'{}' Has An Unaccepted Value of Type '{}' At Index '{}'".format( string, type, index ) <NEW_LINE> super().__init__(string)
Thrown when value in container is of undesired type
62598eef5fcc89381b26550b
class LdapAuthProviderModule(LdapAuthProvider): <NEW_LINE> <INDENT> def __init__(self, config, api: "ModuleApi"): <NEW_LINE> <INDENT> super().__init__(config, account_handler=api) <NEW_LINE> api.register_password_auth_provider_callbacks( auth_checkers={ (SUPPORTED_LOGIN_TYPE, SUPPORTED_LOGIN_FIELDS): self.wrapped_check...
Wrapper for the LDAP Authentication Provider that supports the new generic module interface, rather than the Password Authentication Provider module interface.
62598eef851cf427c66b6a8b
class UnknownMode(Exception): <NEW_LINE> <INDENT> pass
Heimdall.write_to_database() has received an unknown mode
62598eef009cb60464cffd16
class NatService(service_description.ServiceDescription): <NEW_LINE> <INDENT> supported_versions = { '2': _proxy.Proxy }
The NAT service.
62598eefb7558d5895461e0e
class PermanentWorkIDStressTestGenerationScript(Script): <NEW_LINE> <INDENT> def __init__(self, destination_file): <NEW_LINE> <INDENT> self.destination_file = destination_file <NEW_LINE> self.out = open(self.destination_file, "w") <NEW_LINE> self.writer = csv.writer(self.out) <NEW_LINE> self.writer.writerow(["Original ...
Generate a stress test to use as the benchmark for the permanent work ID generation algorithm.
62598eefcc0a2c11144797cd
class ComputerFacade: <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> self.cpu = CPU() <NEW_LINE> self.ram = RAM() <NEW_LINE> self.ssd = SSD() <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <INDENT> self.cpu.freeze() <NEW_LINE> self.ram.load('0x00', self.ssd.read('0x100', '1024')) <NEW_LINE> self.c...
把一大堆零件组装成计算机
62598eef30dc7b766599e050
class PredictionFormatter (object): <NEW_LINE> <INDENT> outputFields = [ {'fn' : 'ID' , 'format':'%s'}, {'fn' : 'Pred Class' , 'format':'%s'}, {'fn' : 'Confidence' , 'format':'%5.3f'}, {'fn' : 'Abs Value' , 'format':'%5.3f'}, {'fn' : 'True Class' , 'format':'%s'}, {'fn' : 'FP/FN' , 'format':'%s'}, ] <NEW_...
IS an object that knows how to format predictions from a DocumentSet to write to a prediction output file HAS docSet, pipeline, fields to include in prediction output file DOES iterator to return formated predictions
62598eef091ae356687033e0
class TreeLogEntry(LogEntry): <NEW_LINE> <INDENT> def __init__(self,itemlist): <NEW_LINE> <INDENT> self.treeItemList = itemlist <NEW_LINE> if debug: print ('Logging press on tree: '+itemlist) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> treeList = self.treeItemList[:] <NEW_LINE> if type(treeList[0]) is tu...
Object to track when tree items are pressed in the main window
62598eef3d592f4c4edb96b5
class Scheduler: <NEW_LINE> <INDENT> __instance = None <NEW_LINE> @classmethod <NEW_LINE> def setup(cls, db_engine:Type[Engine], store_in_memory=False): <NEW_LINE> <INDENT> cls.__instance = cls(db_engine, store_in_memory) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def get(cls): <NEW_LINE> <INDENT> if not cls.__instanc...
Only one instance of this class should exist in the Showergel process: call :ref:`setup` once, then access the instance with :ref:`get`.
62598eef32920d7e50bc47f5
class DataInfo(models.Model): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return self.ip <NEW_LINE> <DEDENT> ip = models.GenericIPAddressField(protocol="IPv4", null=True) <NEW_LINE> time = models.DateTimeField(default=timezone.now, null=True) <NEW_LINE> article_id = models.ForeignKey(Article, on_delete=m...
跟踪数据表
62598eefaad79263cf42cfd5
class GetBlockTransactionListForUserResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.TotalCount = None <NEW_LINE> self.TransactionList = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.TotalCount = params.get("To...
GetBlockTransactionListForUser返回参数结构体
62598eef63b5f9789fe83925
class Blur(View): <NEW_LINE> <INDENT> LIGHTER = 0 <NEW_LINE> SAME = 1 <NEW_LINE> DARKER = 2 <NEW_LINE> def __init__(self, style=SAME, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(self, **kwargs) <NEW_LINE> self.touch_enabled = False <NEW_LINE> self._style = style <NEW_LINE> self.effect_view = None <NEW_LINE> ...
Applies a blurring effect to the content layered behind the view.
62598eef4a966d76dd5ed6a3
class Solution: <NEW_LINE> <INDENT> def romanToInt(self, string: str) -> int: <NEW_LINE> <INDENT> sequence = Stack() <NEW_LINE> for char in string: <NEW_LINE> <INDENT> sequence.push(char) <NEW_LINE> <DEDENT> total_value, prev_char = sequence.pop() <NEW_LINE> while True: <NEW_LINE> <INDENT> current_value, current_char =...
思路: 利用 Stack 先进后出对字符串进行排序,之后将头部数据比较大小得出结果
62598eeff9cc0f698b1c46b3
class AzureFirewallRCActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): <NEW_LINE> <INDENT> ALLOW = "Allow" <NEW_LINE> DENY = "Deny"
The action type of a rule collection.
62598eef1b99ca400228e8f2
class SeqControl(enum.IntEnum): <NEW_LINE> <INDENT> SEQ_DISABLE = 0 <NEW_LINE> SEQ_ENABLE = 1
Sequencer: Control.
62598eef71ff763f4b5e5f27
class Auth(BaseAuth): <NEW_LINE> <INDENT> def get_connection(self, host, port, secure, imaps): <NEW_LINE> <INDENT> ssl_context = ssl.create_default_context() <NEW_LINE> try: <NEW_LINE> <INDENT> if secure and imaps: <NEW_LINE> <INDENT> connection = imaplib.IMAP4_SSL( host=host, port=port, ssl_context=ssl_context) <NEW_L...
Authenticate user with IMAP. Configuration: [auth] type = radicale_imap imap_host = imap.server.tld imap_secure = True imaps = True # for "old"-style imap over tls
62598eef91f36d47f2230288
class GroupViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Group.objects.all() <NEW_LINE> serializer_class = GroupSerializer
查看、编辑群组数据的API接口
62598eef76e4537e8c3edd7e
class NullMemory(Memory): <NEW_LINE> <INDENT> pass
Represents a null memory (RAM) bank
62598eef7d43ff24874267e0
class Validatable(utils.Protocol): <NEW_LINE> <INDENT> def isValid(self) -> bool: <NEW_LINE> <INDENT> ...
An object with an isValid() method (e.g. QUrl).
62598eef7b180e01f3e4842c
class ActivityLogEmails(ModelBase): <NEW_LINE> <INDENT> messageid = models.CharField(max_length=255, unique=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> db_table = 'log_activity_emails'
A log of message ids of incoming emails so we don't duplicate process them.
62598eef55399d3f05624cf0
@dataclass <NEW_LINE> class G2pError(Message): <NEW_LINE> <INDENT> error: str <NEW_LINE> site_id: str = "default" <NEW_LINE> context: typing.Optional[str] = None <NEW_LINE> session_id: typing.Optional[str] = None <NEW_LINE> @classmethod <NEW_LINE> def topic(cls, **kwargs) -> str: <NEW_LINE> <INDENT> return "rhasspy/err...
Error from G2P component. .. admonition:: MQTT message Topic ``rhasspy/error/g2p`` Payload (JSON) .. list-table:: :widths: 10 10 80 :header-rows: 1 * - Key - Type - Description * - error - String - A description of the error that occurred. * ...
62598eefe5267d203ee6a0d2
class ExportX3D(bpy.types.Operator, ExportHelper): <NEW_LINE> <INDENT> bl_idname = "export_scene.x3d" <NEW_LINE> bl_label = 'Export X3D' <NEW_LINE> bl_options = {'PRESET'} <NEW_LINE> filename_ext = ".x3d" <NEW_LINE> filter_glob = StringProperty(default="*.x3d", options={'HIDDEN'}) <NEW_LINE> use_selection = BoolPropert...
Export selection to Extensible 3D file (.x3d)
62598eef7c178a314d78bc5f
class NotSupportedError(NotImplementedError): <NEW_LINE> <INDENT> def __init__(self, operation, message): <NEW_LINE> <INDENT> super(NotSupportedError, self).__init__() <NEW_LINE> self.operation = operation <NEW_LINE> self.message = message <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "Unsupported R...
We intentionally do not support this feature we may support it in the future, but it requires pretty big thinking
62598eef5fdd1c0f98e5c76b
class DynLengthMember(DataMember): <NEW_LINE> <INDENT> any_length = NamedObject("any_length") <NEW_LINE> def __init__(self, length): <NEW_LINE> <INDENT> type_ok = False <NEW_LINE> if (type(length) in (int, str)) or (length is self.any_length): <NEW_LINE> <INDENT> type_ok = True <NEW_LINE> <DEDENT> if callable(length): ...
a member that can have a dynamic length.
62598eefe1aae11d1e7cdc25
class L1Loss(Layer): <NEW_LINE> <INDENT> def __init__(self, in_layers=None, **kwargs): <NEW_LINE> <INDENT> super(L1Loss, self).__init__(in_layers, **kwargs) <NEW_LINE> <DEDENT> def create_tensor(self, in_layers=None, set_tensors=True, **kwargs): <NEW_LINE> <INDENT> inputs = self._get_input_tensors(in_layers, True) <NEW...
Compute the mean absolute difference between the elements of the inputs. This layer should have two or three inputs. If there is a third input, the difference between the first two inputs is multiplied by the third one to produce a weighted error.
62598eef3539df3088ecaa7d
class PropertySerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Property <NEW_LINE> fields = ('id', 'address', 'owner', 'status', 'type', 'parentProperty') <NEW_LINE> <DEDENT> owner = serializers.ReadOnlyField(source='owner.username')
Serializer for our Property model.
62598eef85dfad0860cbee4c
class DriveAuth(models.Model): <NEW_LINE> <INDENT> email = models.EmailField(default=GOOGLE_USER) <NEW_LINE> credentials = models.TextField() <NEW_LINE> stored_at = models.DateTimeField(auto_now=True) <NEW_LINE> @staticmethod <NEW_LINE> def get(email=GOOGLE_USER): <NEW_LINE> <INDENT> return DriveAuth.objects.filter(ema...
stored google drive authentication and refresh token used for interacting with google drive
62598eef8a43f66fc4bf093e
class FileNotFound(ARTSException): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> super().__init__( {"desc": "file not found", "data": path})
WASM file is missing.
62598eef7d847024c075ab99
class PublicationDownloadError(Exception): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return repr(self.value)
Publication download error
62598eef4a966d76dd5ed6a5
class BareosFdPluginLocalFileset (BareosFdPluginBaseclass): <NEW_LINE> <INDENT> def parse_plugin_definition(self,context, plugindef): <NEW_LINE> <INDENT> BareosFdPluginBaseclass.parse_plugin_definition(self, context, plugindef); <NEW_LINE> if (not 'filename' in self.options): <NEW_LINE> <INDENT> DebugMessage(context, 1...
Simple Bareos-FD-Plugin-Class that parses a file and backups all files listed there Filename is taken from plugin argument 'filename'
62598eefa8370b77170eebaf
class NotificationHandlerTest(MasuTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.notification_headers = list(sns_helper.sns_notification_headers) <NEW_LINE> self.notification_body_dict = dict(sns_helper.sns_notification_body_dict) <NEW_LINE> <DEDENT> def test_initializer(self): <NEW_LINE> <IND...
Test Cases for the NotificationHandler object.
62598eef7b25080760ed5c65
class TabootMissingKrbTkt(TabootException): <NEW_LINE> <INDENT> pass
Exception raised when an action that requires a kerberos ticket can't find one ahead of time.
62598eef57b8e32f525074e9
class StaticRootFinder(BaseFinder): <NEW_LINE> <INDENT> def find(self, file_path, all=False): <NEW_LINE> <INDENT> base_dir = getattr(settings, 'BASE_DIR', '') <NEW_LINE> static_root = getattr(settings, 'STATIC_ROOT', '') <NEW_LINE> if not static_root: <NEW_LINE> <INDENT> raise ImproperlyConfigured( 'django_static_root_...
A static files finder to find files in the STATIC_ROOT directory
62598eefa219f33f346c5002
class HTTPConfiguration(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'method': {'key': 'method', 'type': 'str'}, 'headers': {'key': 'headers', 'type': '[HTTPHeader]'}, 'valid_status_codes': {'key': 'validStatusCodes', 'type': '[int]'}, } <NEW_LINE> def __init__( self, *, method: Optional[Union[st...
HTTP configuration of the connectivity check. :param method: HTTP method. Possible values include: "Get". :type method: str or ~azure.mgmt.network.v2018_04_01.models.HTTPMethod :param headers: List of HTTP headers. :type headers: list[~azure.mgmt.network.v2018_04_01.models.HTTPHeader] :param valid_status_codes: Valid ...
62598eef71ff763f4b5e5f29
class PITViewRefList(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swagger_types = { 'pit_view_ref': 'list[str]' } <NEW_LINE> self.attribute_map = { 'pit_view_ref': 'pitViewRef' } <NEW_LINE> self._pit_view_ref = None <NEW_LINE> <DEDENT> @property <NEW_LINE> def pit_view_ref(self): <NEW_LINE>...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598eefa8370b77170eebb0
class ReportForm(FlaskForm): <NEW_LINE> <INDENT> status = SelectField( 'Status', choices=[('Uko bihagaze', 'Uko bihagaze'), ('Byararangiye', 'Byararangiye'), ('Biracyakomeje', 'Biracyakomeje'), ('Ntibiratangira gukorwaho', 'Ntibiratangira gukorwaho')]) <NEW_LINE> project = StringField('Izina ry umushinga', validators=[...
Form for admin to add or edit a role
62598eefbe8e80087fbbd81b
class SlowBadSpawner(MockSpawner): <NEW_LINE> <INDENT> @gen.coroutine <NEW_LINE> def start(self): <NEW_LINE> <INDENT> yield gen.sleep(0.1) <NEW_LINE> raise RuntimeError("I don't work!")
Spawner that fails after a short delay
62598eef1f5feb6acb16141e
class TestSysctl: <NEW_LINE> <INDENT> user = "UT" <NEW_LINE> key = "kernel.randomize_va_space" <NEW_LINE> def test_get_sysctl(self): <NEW_LINE> <INDENT> sysctl = Sysctl(self.user) <NEW_LINE> value = sysctl.get(self.key) <NEW_LINE> assert value is not None
test sysctl
62598eef63d6d428bbee0f98
class ClassificationPredictionsResult(PredictionsResult): <NEW_LINE> <INDENT> def __init__(self, preds, names=None): <NEW_LINE> <INDENT> self.names = names <NEW_LINE> if self.names is None: <NEW_LINE> <INDENT> pred_class = UnamedClassificationPredictionItem <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> pred_class = par...
List of model classification predictions
62598eefadb09d7d5dc08d94