code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class TimeSeries(_messages.Message): <NEW_LINE> <INDENT> class MetricKindValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> METRIC_KIND_UNSPECIFIED = 0 <NEW_LINE> GAUGE = 1 <NEW_LINE> DELTA = 2 <NEW_LINE> CUMULATIVE = 3 <NEW_LINE> <DEDENT> class ValueTypeValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> VALUE_TYPE...
A collection of data points that describes the time-varying values of a metric. A time series is identified by a combination of a fully-specified monitored resource and a fully-specified metric. This type is used for both listing and creating time series. Enums: MetricKindValueValuesEnum: The metric kind of the time...
6259907ba8370b77170f1dec
class ArgProcessor(DataProcessor): <NEW_LINE> <INDENT> def get_train_examples(self, data_dir): <NEW_LINE> <INDENT> logger.info("LOOKING AT {}".format(os.path.join(data_dir, "train_everything.tsv"))) <NEW_LINE> return self._create_examples( self._read_tsv(os.path.join(data_dir, "train_everything.tsv")), "train") <NEW_LI...
Processor for the MRPC data set (GLUE version).
6259907b796e427e53850198
class RouteErrorRange(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'start': {'key': 'start', 'type': 'RouteErrorPosition'}, 'end': {'key': 'end', 'type': 'RouteErrorPosition'}, } <NEW_LINE> def __init__( self, *, start: Optional["RouteErrorPosition"] = None, end: Optional["RouteErrorPosition"] = ...
Range of route errors. :ivar start: Start where the route error happened. :vartype start: ~azure.mgmt.iothub.v2018_04_01.models.RouteErrorPosition :ivar end: End where the route error happened. :vartype end: ~azure.mgmt.iothub.v2018_04_01.models.RouteErrorPosition
6259907b3617ad0b5ee07b6b
class Normalizer(): <NEW_LINE> <INDENT> def __init__(self, n_inputs): <NEW_LINE> <INDENT> self.n = np.zeros(n_inputs) <NEW_LINE> self.mean = np.zeros(n_inputs) <NEW_LINE> self.mean_diff = np.zeros(n_inputs) <NEW_LINE> self.var = np.zeros(n_inputs) <NEW_LINE> <DEDENT> def observe(self, x): <NEW_LINE> <INDENT> self.n += ...
Normalize input values. Args: n_inputs: Number of input values
6259907b3d592f4c4edbc86d
class Event(Model): <NEW_LINE> <INDENT> id = fields.IntField(pk=True) <NEW_LINE> name = fields.CharField(max_length=255) <NEW_LINE> created_at = fields.DatetimeField(auto_now_add=True) <NEW_LINE> tournament: fields.ForeignKeyNullableRelation[Tournament] = fields.ForeignKeyField( "models.Tournament", related_name="event...
The Event model docstring. This is multiline docs.
6259907b92d797404e38986b
class LMTextList(TextList): <NEW_LINE> <INDENT> _bunch = TextLMDataBunch <NEW_LINE> _is_lm = True <NEW_LINE> _label_cls = EmptyLabel
Special `TextList` for a language model.
6259907b5fdd1c0f98e5f99d
class TestFunctions(unittest.TestCase): <NEW_LINE> <INDENT> def testLookup_rpcsvc(self): <NEW_LINE> <INDENT> keys = common.ProgramNumbers.keys() <NEW_LINE> for key in keys: <NEW_LINE> <INDENT> entry = common.ProgramNumbers[ key ] <NEW_LINE> bunch = common.lookup_rpcsvc(key) <NEW_LINE> self.assertEquals( entry[0], bunc...
Test module functions class.
6259907b7d43ff2487428124
class SymbianPlatform(Platform): <NEW_LINE> <INDENT> def __init__(self, config): <NEW_LINE> <INDENT> Platform.__init__(self, config, "symbian") <NEW_LINE> self.requireOrdinals = True <NEW_LINE> self.exportLinkage = "__declspec(dllexport)" <NEW_LINE> self.entryLinkage = "" <NEW_LINE> self.language = "c++...
Symbian C++ platform
6259907baad79263cf4301d8
class DevConfig(BaseConfig): <NEW_LINE> <INDENT> SQLALCHEMY_DATABASE_URI = 'sqlite:////home/vagrant/skynet/skynet.db'
Local config for running the app on your local machine.
6259907b1f5feb6acb164616
class TestNetworkGroupnetsApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = isi_sdk_9_1_0.api.network_groupnets_api.NetworkGroupnetsApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_create_groupnet_subnet(self): <NEW_LINE> <INDE...
NetworkGroupnetsApi unit test stubs
6259907b656771135c48ad3f
class Document(models.Model): <NEW_LINE> <INDENT> ticket = models.ForeignKey('tracker.Ticket') <NEW_LINE> filename = models.CharField(max_length=120, help_text='Document filename', validators=[ RegexValidator(r'^[-_\.A-Za-z0-9]+\.[A-Za-z0-9]+$', message=_(u'We need a sane file name, such as my-invoice123.jpg')), ]) <NE...
Document related to particular ticket, not publicly accessible.
6259907b5fdd1c0f98e5f99e
class CmdSshMaster(ClusterCompleter): <NEW_LINE> <INDENT> names = ['sshmaster', 'sm'] <NEW_LINE> def addopts(self, parser): <NEW_LINE> <INDENT> parser.add_option("-u", "--user", dest="user", action="store", type="string", default='root', help="login as USER (defaults to root)") <NEW_LINE> parser.add_option("-X", "--for...
sshmaster [options] <cluster> [<remote-command>] SSH to a cluster's master node Example: $ sshmaster mycluster You can also execute commands without directly logging in: $ starcluster sshmaster mycluster 'cat /etc/hosts'
6259907b97e22403b383c920
@admin.register(Basin) <NEW_LINE> class BasinAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('basin_id','location') <NEW_LINE> list_filter = ('basin_id','location') <NEW_LINE> search_fields = ['basin_id','location']
docstring for BasinAdmin
6259907b1b99ca4002290245
class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): <NEW_LINE> <INDENT> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'primary': {'key': 'properties.primary', 'type': 'bool'}, 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworki...
Describes a virtual machine scale set network profile's network configurations. :ivar id: Resource Id. :vartype id: str :ivar name: The network configuration name. :vartype name: str :ivar primary: Whether this is a primary NIC on a virtual machine. :vartype primary: bool :ivar enable_accelerated_networking: Specifies...
6259907b5fc7496912d48f7a
class CreatePaymentRequest(models.Model): <NEW_LINE> <INDENT> APP_TYPE = ( ('CHILDMINDER', 'CHILDMINDER'), ('NANNY', 'NANNY'), ('PAY', 'PAY') ) <NEW_LINE> amount = models.DecimalField(max_digits=10, decimal_places=0, blank=False) <NEW_LINE> urn = models.CharField(max_length=9, blank=False) <NEW_LINE> service = models.C...
Model used for serialization of create payment JSON objects
6259907b7047854f46340dd5
class Uniform(Distribution): <NEW_LINE> <INDENT> def __init__(self, lb : np.ndarray, ub : np.ndarray, seed=None): <NEW_LINE> <INDENT> self.lb, self.ub = self._check_parameters(lb, ub) <NEW_LINE> self.rng = np.random.RandomState(seed) <NEW_LINE> <DEDENT> def set_parameters(self, params): <NEW_LINE> <INDENT> lb = params[...
This class implements a p-dimensional uniform Prior distribution in a closed interval.
6259907b8a349b6b43687c7b
class Act(NarrativeElement): <NEW_LINE> <INDENT> noun = u'act' <NEW_LINE> def _load(self): <NEW_LINE> <INDENT> super(Act, self)._load() <NEW_LINE> self.description = self.data['description'] <NEW_LINE> self.banner = self.data.get("banner", None) <NEW_LINE> self.banner_background = self.data.get("banner_background", Non...
Represents an Act in the mission.
6259907b5fcc89381b266e6b
class _PowerAction(BaseAction): <NEW_LINE> <INDENT> def Validate(self): <NEW_LINE> <INDENT> self._TypeValidator(self._args, list) <NEW_LINE> if len(self._args) not in [1, 2, 3]: <NEW_LINE> <INDENT> raise ValidationError('Invalid args length: %s' % self._args) <NEW_LINE> <DEDENT> if not isinstance(self._args[0], str) an...
Validation for Power actions.
6259907bd268445f2663a86e
class postal_record(record): <NEW_LINE> <INDENT> def __init__(self, global_context_dict, pool, pline): <NEW_LINE> <INDENT> super(postal_record, self).__init__(global_context_dict, pool, pline) <NEW_LINE> self.is_9_pos_adherent = False <NEW_LINE> <DEDENT> def validate_global_context_dict(self): <NEW_LINE> <INDENT> if _i...
Class that propose common knowledge for all postal account type
6259907b009cb60464d02f5f
class TagHelperNode(Node): <NEW_LINE> <INDENT> def __init__(self, takes_context, args, kwargs): <NEW_LINE> <INDENT> self.takes_context = takes_context <NEW_LINE> self.args = args <NEW_LINE> self.kwargs = kwargs <NEW_LINE> <DEDENT> def get_resolved_arguments(self, context): <NEW_LINE> <INDENT> resolved_args = [var.resol...
Base class for tag helper nodes such as SimpleNode and InclusionNode. Manages the positional and keyword arguments to be passed to the decorated function.
6259907b7d43ff2487428125
class RunPylint(object): <NEW_LINE> <INDENT> def test_pylint(self): <NEW_LINE> <INDENT> files_list = [] <NEW_LINE> for root, dirnames, filenames in os.walk(PROJECT_DIR): <NEW_LINE> <INDENT> if not should_check_directory(root): <NEW_LINE> <INDENT> continue <NEW_LINE> <DEDENT> for filename in fnmatch.filter(filenames, '*...
Run pylint on all Python files.
6259907b3539df3088ecdcb8
class PredictorDataSetManager(object): <NEW_LINE> <INDENT> def __init__(self, predictor_config_manager=None): <NEW_LINE> <INDENT> self.predictor_config_manager = predictor_config_manager if predictor_config_manager is not None else PredictorConfigManager() <NEW_LINE> <DEDENT> @property <NEW_LINE> ...
A collection of PredictorDataSet instances. Parameters ---------- predictor_config_manager : PredictorConfigManager, optional (default None) A predictor configuration manager. If None, instantiate a new one. Attributes ---------- datasets : dict Dict of dicts of {data: {trait: {categorical: dataset}}}. For ...
6259907bf548e778e596cfb2
class ENVI_SLayer_Socket(NodeSocket): <NEW_LINE> <INDENT> bl_idname = 'envi_sl_sock' <NEW_LINE> bl_label = 'Shade layer socket' <NEW_LINE> valid = ['GLayer', 'Tlayer'] <NEW_LINE> def draw(self, context, layout, node, text): <NEW_LINE> <INDENT> layout.label(text) <NEW_LINE> <DEDENT> def draw_color(self, context, node): ...
EnVi shade layer socket
6259907b1f5feb6acb164618
class ArtifactRepository: <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> def __init__(self, artifact_uri): <NEW_LINE> <INDENT> self.artifact_uri = artifact_uri <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def log_artifact(self, local_file, artifact_path=None): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abs...
Abstract artifact repo that defines how to upload (log) and download potentially large artifacts from different storage backends.
6259907be1aae11d1e7cf521
class TestInventoryCreateByApplyDelta(TestInventory): <NEW_LINE> <INDENT> def test_add(self): <NEW_LINE> <INDENT> inv = self.make_init_inventory() <NEW_LINE> inv = inv.create_by_apply_delta([ (None, "a", "a-id", self.make_file('a-id', 'a', 'tree-root')), ], 'new-test-rev') <NEW_LINE> self.assertEqual('a', inv.id2path('...
A subset of the inventory delta application tests. See test_inv which has comprehensive delta application tests for inventories, dirstate, and repository based inventories.
6259907b4f88993c371f1232
class AlloyCooking_Profiling: <NEW_LINE> <INDENT> def __init__(self, bounds=None,sd=None): <NEW_LINE> <INDENT> self.input_dim = 4 <NEW_LINE> if bounds == None: <NEW_LINE> <INDENT> self.bounds = OrderedDict([('Time1',(2*3600,4*3600)),('Time2',(2*3600,4*3600)),('Temp1',(175,225)),('Temp2',(225,275))]) <NEW_LINE> <DEDENT...
SVR_function: function :param sd: standard deviation, to generate noisy evaluations of the function.
6259907b32920d7e50bc7a63
class UserForm(messages.Message): <NEW_LINE> <INDENT> user_name = messages.StringField(1, required=True) <NEW_LINE> email = messages.StringField(2, required=True)
UserForm for username and email information
6259907c7cff6e4e811b7461
class Type(IntEnum): <NEW_LINE> <INDENT> PLAYLIST = 0 <NEW_LINE> SONG = 1
Enum for Playlists Notifications
6259907c97e22403b383c922
class Separator(ChildMixin, Widget): <NEW_LINE> <INDENT> _widget_name = 'ttk::separator' <NEW_LINE> tk_class_name = 'TSeparator' <NEW_LINE> def _repr_parts(self): <NEW_LINE> <INDENT> return ['orient=' + repr(self.config['orient'])]
A horizontal or vertical line, depending on an ``orient`` option. Create a horizontal separator like this... :: separator = teek.Separator(some_widget, orient='horizontal') separator.pack(fill='x') # default is side='top' ...and create a vertical separator like this:: separator = teek.Separator(some_...
6259907c4a966d76dd5f0907
class UserWidget(tw2.core.Widget): <NEW_LINE> <INDENT> resources = [photo_css, thumbnail_js] <NEW_LINE> template = 'fedoratagger.widgets.templates.user' <NEW_LINE> @property <NEW_LINE> def gravatar_tag(self): <NEW_LINE> <INDENT> return m.get_user().gravatar_md <NEW_LINE> <DEDENT> @property <NEW_LINE> def formatted_name...
Gravatar widget
6259907cf9cc0f698b1c5fdd
class KNearestNeighbor(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def train(self, X, y): <NEW_LINE> <INDENT> self.X_train = X <NEW_LINE> self.y_train = y <NEW_LINE> <DEDENT> def predict(self, X, k=1, num_loops=0): <NEW_LINE> <INDENT> if num_loops == 0: <NEW_LINE> <INDE...
a kNN classifier with L2 distance
6259907c3d592f4c4edbc86f
class PreferredSessionSyncPort(A10BaseClass): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.ERROR_MSG = "" <NEW_LINE> self.required=[] <NEW_LINE> self.b_key = "preferred-session-sync-port" <NEW_LINE> self.a10_url="/axapi/v3/vrrp-a/preferred-session-sync-port" <NEW_LINE> self.DeviceProxy = "...
Class Description:: VRRP-A preferred-session-sync-port. Class preferred-session-sync-port supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this module.` :param trunk_list: {"minItems": 1, "items": {"type": "trunk"}, "uniqueItems": true, "array": [{"required": ["...
6259907c009cb60464d02f61
class DnSet(BaseObject): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> BaseObject.__init__(self, "DnSet", "dnSet") <NEW_LINE> if kwargs: <NEW_LINE> <INDENT> for n, v in ucsgenutils.iteritems(kwargs): <NEW_LINE> <INDENT> self.attr_set(n, v)
This is DnSet class.
6259907c97e22403b383c923
class Server(Connection): <NEW_LINE> <INDENT> def __init__(self, host, port): <NEW_LINE> <INDENT> super(Server, self).__init__(b'server') <NEW_LINE> self.addr = (host, int(port)) <NEW_LINE> <DEDENT> def connect(self): <NEW_LINE> <INDENT> self.conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM) <NEW_LINE> self.conn...
Establish connection to destination server.
6259907ce1aae11d1e7cf522
class entity_keyword(parser.keyword): <NEW_LINE> <INDENT> def __init__(self, sString): <NEW_LINE> <INDENT> parser.keyword.__init__(self, sString)
unique_id = instantiated_unit : entity_keyword
6259907c2c8b7c6e89bd5208
class Instance(A10BaseClass): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.ERROR_MSG = "" <NEW_LINE> self.required = [ "name"] <NEW_LINE> self.b_key = "instance" <NEW_LINE> self.a10_url="/axapi/v3/aam/authentication/logon/http-authenticate/instance/{name}" <NEW_LINE> self.DeviceProxy = "" ...
Class Description:: HTTP-authenticate Logon. Class instance supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this module.` :param uuid: {"description": "uuid of the object", "format": "string", "minLength": 1, "modify-not-allowed": 1, "optional": true, "maxLengt...
6259907c3317a56b869bf257
class Amount2DecimalType (pyxb.binding.datatypes.decimal): <NEW_LINE> <INDENT> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'Amount2DecimalType') <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('/opt/odoo/tmp/data/datifatture/DatiFatturav2.1.xsd', 468, 2) <NEW_LINE> _Documentation = None
An atomic simple type.
6259907c32920d7e50bc7a65
class CheckFailed(ActionError): <NEW_LINE> <INDENT> pass
Raised when a check for a command failed
6259907c01c39578d7f14446
class SimilarGeneSelector(Recombinator): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(SimilarGeneSelector, self).__init__() <NEW_LINE> <DEDENT> def choose_genes(self, chr1, chr2): <NEW_LINE> <INDENT> genes = chr1.get_all_genes() <NEW_LINE> for gene1 in random.sample(genes, len(genes)): <NEW_LINE> <...
Selects similar genes from two chromosomes
6259907c71ff763f4b5e91cf
class UBXStreamer: <NEW_LINE> <INDENT> def __init__(self, port, baudrate, timeout=5, ubx_only=False): <NEW_LINE> <INDENT> self._serial_object = None <NEW_LINE> self._serial_thread = None <NEW_LINE> self._ubxreader = None <NEW_LINE> self._connected = False <NEW_LINE> self._reading = False <NEW_LINE> self._port = port <N...
UBXStreamer class.
6259907cf9cc0f698b1c5fde
class NullContext(object): <NEW_LINE> <INDENT> def __enter__(self): <NEW_LINE> <INDENT> self.old_contexts = _state.contexts <NEW_LINE> _state.contexts = () <NEW_LINE> <DEDENT> def __exit__(self, type, value, traceback): <NEW_LINE> <INDENT> _state.contexts = self.old_contexts
Resets the StackContext. Useful when creating a shared resource on demand (e.g. an AsyncHTTPClient) where the stack that caused the creating is not relevant to future operations.
6259907c3617ad0b5ee07b71
class L3(CFRegularizer): <NEW_LINE> <INDENT> def compute_norm(self, x): <NEW_LINE> <INDENT> return tf.reduce_sum(tf.abs(x)**3)
L3 regularization.
6259907c7b180e01f3e49d77
class Attributes(Base): <NEW_LINE> <INDENT> def test_path_type(self): <NEW_LINE> <INDENT> b = NonbibFile(self.invalid) <NEW_LINE> self.assertIsInstance(b.path, pathlib.Path) <NEW_LINE> <DEDENT> def test_src_txt_type(self): <NEW_LINE> <INDENT> b = NonbibFile(self.invalid) <NEW_LINE> self.assertIsInstance(b.src_txt, unic...
Test attributes of NonbibFile These tests include type checks, setting immutable attributes, etc.
6259907c67a9b606de5477b8
class UploadImageStoreForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Store <NEW_LINE> fields = ('logo',)
Form to handle the upload of product images
6259907cd486a94d0ba2d9dc
class ErrorInvalidCommand(ClientError): <NEW_LINE> <INDENT> pass
Invalid command, wrong formating of parameters etc.
6259907c7c178a314d78e8fd
class EngineConfig(object): <NEW_LINE> <INDENT> encoding = True <NEW_LINE> serializer = json <NEW_LINE> compression = False <NEW_LINE> mode = RedisMode.toplevel_blob
Configuration for the `RedisAdapter` engine.
6259907cfff4ab517ebcf23d
@view_defaults(route_name='password:reset:continue', permission=NO_PERMISSION_REQUIRED, renderer='pyramid_fullauth:resources/templates/reset.proceed.mako') <NEW_LINE> class PasswordResetContinueView(BaseView): <NEW_LINE> <INDENT> @view_config(request_method='GET') <NEW_LINE> def get(self): <NEW_LINE> <INDENT> self.requ...
Password reset views. These views display actual reset password views.
6259907c7cff6e4e811b7465
class UnityActionObjectRemove(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "group.unity_action_object_remove" <NEW_LINE> bl_label = "Remove Group Object from Unity Actions" <NEW_LINE> @classmethod <NEW_LINE> def poll(cls, context): <NEW_LINE> <INDENT> return hasattr (context, "group") and context.group != None ...
Remove group object from current action
6259907c97e22403b383c926
class WordInfo(object): <NEW_LINE> <INDENT> def __init__(self, text): <NEW_LINE> <INDENT> super(WordInfo, self).__init__() <NEW_LINE> self.text = text <NEW_LINE> self.freq = 0.0 <NEW_LINE> self.left = [] <NEW_LINE> self.right = [] <NEW_LINE> self.aggregation = 0 <NEW_LINE> self.entropy = 0 <NEW_LINE> <DEDENT> def updat...
Store information of each word, including its freqency, left neighbors and right neighbors
6259907c283ffb24f3cf52c5
class RunTests(Command): <NEW_LINE> <INDENT> description = 'run tests' <NEW_LINE> user_options = [] <NEW_LINE> def initialize_options(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def finalize_options(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> errno = call(['py.test', '...
Run all tests.
6259907c71ff763f4b5e91d1
class PeriodicNeighbor(PeriodicSite): <NEW_LINE> <INDENT> def __init__(self, species: Composition, coords: np.ndarray, lattice: Lattice, properties: dict = None, nn_distance: float = 0.0, index: int = 0, image: tuple = (0, 0, 0)): <NEW_LINE> <INDENT> self._lattice = lattice <NEW_LINE> self._frac_coords = coords <NEW_LI...
Simple PeriodicSite subclass to contain a neighboring atom that skips all the unnecessary checks for speed. Can be used as a fixed-length tuple of size 4 to retain backwards compatibility with past use cases. (site, distance, index, image). In future, usage should be to call attributes, e.g., PeriodicNeighbor.ind...
6259907c44b2445a339b7670
class ItemNotCreatedError(PredictionIOAPIError): <NEW_LINE> <INDENT> pass
Error happened when tried to create item
6259907c796e427e538501a0
class HardwareTrackerGroupConfig(TrackerGroupConfig): <NEW_LINE> <INDENT> def __init__(self, *args, device_identifier: Optional[DeviceId] = None, is_origin: bool = False, tracked_position_offset: Optional[Sequence[float]] = None, tracked_rotation_offset: Optional[Sequence[float]] = None, mimic_in_sim: bool = False, mim...
Stores group configuration for a VrTrackerComponent.
6259907c7047854f46340ddb
class BingParser(Parser): <NEW_LINE> <INDENT> search_engine = 'bing' <NEW_LINE> search_types = ['normal', 'image'] <NEW_LINE> no_results_selector = ['#b_results > .b_ans::text'] <NEW_LINE> num_results_search_selectors = ['.sb_count'] <NEW_LINE> effective_query_selector = ['#sp_requery a > strong', '#sp_requery + #sp_re...
Parses SERP pages of the Bing search engine.
6259907c3d592f4c4edbc871
class DuplicateWalFile(WALFileException): <NEW_LINE> <INDENT> pass
A duplicate WAL file has been found
6259907cdc8b845886d54fe0
class TclCommandAddPolyline(TclCommand.TclCommandSignaled): <NEW_LINE> <INDENT> aliases = ['add_polyline'] <NEW_LINE> arg_names = collections.OrderedDict([ ('name', str) ]) <NEW_LINE> option_types = collections.OrderedDict() <NEW_LINE> required = ['name'] <NEW_LINE> help = { 'main': "Creates a polyline in the given Geo...
Tcl shell command to create a polyline in the given Geometry object
6259907c2c8b7c6e89bd520c
class NoImageError(VisualSearchEngineError): <NEW_LINE> <INDENT> def __init__(self, image_id): <NEW_LINE> <INDENT> message = 'Image {} does not exist in the index'.format(image_id) <NEW_LINE> VisualSearchEngineError.__init__(self, message)
Raised when trying to delete non-existing image path from the image index.
6259907c656771135c48ad43
class PicturesMyHandler(NewebeAuthHandler): <NEW_LINE> <INDENT> def get(self, startKey=None, tag=None): <NEW_LINE> <INDENT> self.return_documents_since(PictureManager.get_owner_last_pictures, startKey, tag)
This handler handles requests that retrieve last pictures posted by Newebe owner. * GET: Retrieves last pictures posted by newebe owner. * POST: Creates a picture.
6259907c5fdd1c0f98e5f9a6
@register_test() <NEW_LINE> class media_tests(TsBase): <NEW_LINE> <INDENT> cycles = 5 <NEW_LINE> desktop = True <NEW_LINE> url = 'http://localhost:16932/startup_test/media/html/media_tests.html' <NEW_LINE> timeout = 360
Media Performance Tests
6259907ca05bb46b3848be3c
class TestEdxJsonEncoder(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.encoder = EdxJSONEncoder() <NEW_LINE> class OffsetTZ(tzinfo): <NEW_LINE> <INDENT> def utcoffset(self, _dt): <NEW_LINE> <INDENT> return timedelta(hours=4) <NEW_LINE> <DEDENT> <DEDENT> self.offset_tz = OffsetTZ() <N...
Tests for xml_exporter.EdxJSONEncoder
6259907c97e22403b383c928
class TimeoutTracer(object): <NEW_LINE> <INDENT> def __init__(self, granularity=5): <NEW_LINE> <INDENT> self.granularity = granularity <NEW_LINE> <DEDENT> def connection_raw_execute(self, connection, raw_cursor, statement, params): <NEW_LINE> <INDENT> remaining_time = self.get_remaining_time() <NEW_LINE> if remaining_t...
Provide a timeout facility for connections to prevent rogue operations. This tracer must be subclassed by backend-specific implementations that override C{connection_raw_execute_error}, C{set_statement_timeout} and C{get_remaining_time} methods.
6259907c4a966d76dd5f090d
class CIFWrapper(object): <NEW_LINE> <INDENT> _DATA = collections.OrderedDict() <NEW_LINE> def __init__(self, d, data_id=None): <NEW_LINE> <INDENT> if d is not None: <NEW_LINE> <INDENT> __dictionary = copy.deepcopy(d) <NEW_LINE> self.data_id = data_id if data_id is not None else '' <NEW_LINE> try: <NEW_LINE> <INDENT> (...
CIFWrapper is a wrapper object for the output of the MMCIF2Dict object i.e., an mmCIF-like python dictionary object. This implies that mmCIF-like dictionaries written outside this package may be used to initialize the CIFWrapper class as well. The CIFWrapper object emulates python objects by providing access to mmCIF c...
6259907c66673b3332c31e26
class VppBondInterface(VppInterface): <NEW_LINE> <INDENT> def __init__(self, test, mode, lb=0, use_custom_mac=0, mac_address=''): <NEW_LINE> <INDENT> super(VppBondInterface, self).__init__(test) <NEW_LINE> self.mode = mode <NEW_LINE> self.lb = lb <NEW_LINE> self.use_custom_mac = use_custom_mac <NEW_LINE> self.mac_addre...
VPP bond interface.
6259907c283ffb24f3cf52c8
class CommandSet(object): <NEW_LINE> <INDENT> _func_base = f'{__package__}.admin_commands' <NEW_LINE> def __init__(self, settings): <NEW_LINE> <INDENT> self._settings = settings <NEW_LINE> <DEDENT> def allows(self, command_name) -> CommandPermission: <NEW_LINE> <INDENT> return CommandPermission(name=command_name, _sett...
A config object for asking questions of `commands.json` for admin command configuration.
6259907ca8370b77170f1df6
class TopoDataFormat(VegaLiteSchema): <NEW_LINE> <INDENT> _schema = {'$ref': '#/definitions/TopoDataFormat'} <NEW_LINE> _rootschema = Root._schema <NEW_LINE> def __init__(self, feature=Undefined, mesh=Undefined, parse=Undefined, type=Undefined, **kwds): <NEW_LINE> <INDENT> super(TopoDataFormat, self).__init__(feature=f...
TopoDataFormat schema wrapper Mapping(required=[]) Attributes ---------- feature : string The name of the TopoJSON object set to convert to a GeoJSON feature collection. For example, in a map of the world, there may be an object set named ``"countries"``. Using the feature property, we can extract this se...
6259907cf9cc0f698b1c5fe0
class User: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._file = ".user.txt" <NEW_LINE> self._data = [] <NEW_LINE> self.read_from_user() <NEW_LINE> <DEDENT> def read_file(self): <NEW_LINE> <INDENT> data = [] <NEW_LINE> try: <NEW_LINE> <INDENT> with open(self._file, 'r') as f: <NEW_LINE> <INDENT> for...
Handles the input of the program.
6259907c7d43ff2487428129
class TestAnnouncement(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 testAnnouncement(self): <NEW_LINE> <INDENT> model = swagger_client.models.announcement.Announcement()
Announcement unit test stubs
6259907c56b00c62f0fb42fc
class NerProcessor(DataProcessor): <NEW_LINE> <INDENT> def get_labels(self) -> List[str]: <NEW_LINE> <INDENT> label_file = os.path.join(self.data_dir, 'labels.txt') <NEW_LINE> with open(label_file, 'r', encoding='utf-8') as f: <NEW_LINE> <INDENT> labels = f.readlines() <NEW_LINE> return labels <NEW_LINE> <DEDENT> <DEDE...
ner data process
6259907c627d3e7fe0e088af
class IFTTTRobot(cozmo.robot.Robot): <NEW_LINE> <INDENT> async def get_in_position(self): <NEW_LINE> <INDENT> if (self.lift_height.distance_mm > 45) or (self.head_angle.degrees < 40): <NEW_LINE> <INDENT> async with self.perform_off_charger(): <NEW_LINE> <INDENT> await self.set_lift_height(0.0).wait_for_completed() <NEW...
Add some methods to the base Robot class.
6259907ce1aae11d1e7cf525
class LoginForm(forms.Form): <NEW_LINE> <INDENT> username = forms.CharField(label=_("Username"), error_messages={'required': _("Please enter your username")}) <NEW_LINE> password = forms.CharField(label=_("Password"), widget=forms.PasswordInput, error_messages={'required': _("Please enter your password")}) <NEW_LINE> s...
Form implementing standard username and password authentication. The ``clean()`` method passes the provided username and password to the active authentication backend(s) and verifies the user account is not disabled.
6259907cec188e330fdfa2d1
class ProcessFrame: <NEW_LINE> <INDENT> def __init__(self, frame_height=84, frame_width=84): <NEW_LINE> <INDENT> self.frame_height = frame_height <NEW_LINE> self.frame_width = frame_width <NEW_LINE> self.frame = tf.placeholder(shape=[210, 160, 3], dtype=tf.uint8) <NEW_LINE> self.processed = tf.image.rgb_to_grayscale(se...
Resizes and converts RGB Atari frames to grayscale
6259907c23849d37ff852ae1
class Solution: <NEW_LINE> <INDENT> def sortColors(self, nums): <NEW_LINE> <INDENT> if len(nums) <= 0: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> left, right = 0, len(nums) - 1 <NEW_LINE> middle = 0 <NEW_LINE> while middle <= right: <NEW_LINE> <INDENT> if nums[middle] == 0: <NEW_LINE> <INDENT> nums[left], nums[midd...
@param nums: A list of integer which is 0, 1 or 2 @return: nothing
6259907c091ae35668706667
class SockCreator(BaseComponent): <NEW_LINE> <INDENT> def __init__(self, process, b10_init, kind, address=None, params=None): <NEW_LINE> <INDENT> BaseComponent.__init__(self, b10_init, kind) <NEW_LINE> self.__creator = None <NEW_LINE> <DEDENT> def _start_internal(self): <NEW_LINE> <INDENT> self._b10_init.curproc = 'b10...
The socket creator component. Will start and stop the socket creator accordingly. Note: _creator shouldn't be reset explicitly once created. The underlying Popen object would then wait() the child process internally, which breaks the assumption of b10-init, who is expecting to see the process die in waitpid().
6259907c32920d7e50bc7a6b
class Track(models.Model): <NEW_LINE> <INDENT> mail = models.ForeignKey(Mail) <NEW_LINE> staff = models.ForeignKey(Staff) <NEW_LINE> start_date = models.DateTimeField(auto_now_add=True, blank=True) <NEW_LINE> hard_copy_transfer_time = models.DateTimeField(null=True) <NEW_LINE> purpose = models.CharField(max_length=300)...
In this model, we will record wherever a mail went through
6259907cbf627c535bcb2ef9
class MarkdownStoryExporter(interface.StoryExporter): <NEW_LINE> <INDENT> EXPORT_FORMAT = 'markdown' <NEW_LINE> _DATAFRAM_HEADER_ROWS = 20 <NEW_LINE> _DATAFRAM_TAIL_ROWS = 5 <NEW_LINE> def _dataframe_to_markdown(self, data_frame): <NEW_LINE> <INDENT> nr_rows, _ = data_frame.shape <NEW_LINE> if not nr_rows: <NEW_LINE> <...
Markdown story exporter.
6259907c4a966d76dd5f090f
class Convertisseur: <NEW_LINE> <INDENT> def depuis_version_0(objet, classe): <NEW_LINE> <INDENT> objet.set_version(classe, 1) <NEW_LINE> objet.cle = supprimer_accents(objet._titre) <NEW_LINE> objet.titre = objet.resume <NEW_LINE> del objet._titre <NEW_LINE> del objet.resume <NEW_LINE> objet.contenu.scriptable = False
Classe pour envelopper les convertisseurs.
6259907c5fc7496912d48f7f
class AppBasePage(object): <NEW_LINE> <INDENT> def __init__(self, appium_driver): <NEW_LINE> <INDENT> self.driver = appium_driver <NEW_LINE> By.IOS_UIAUTOMATION = MobileBy.IOS_UIAUTOMATION <NEW_LINE> By.IOS_PREDICATE = MobileBy.IOS_PREDICATE <NEW_LINE> By.IOS_CLASS_CHAIN = MobileBy.IOS_CLASS_CHAIN <NEW_LINE> By.ANDROID...
BasePage封装所有页面都公用的方法,例如driver, url ,FindElement等
6259907c167d2b6e312b82a8
class QRTComponentType(Enum): <NEW_LINE> <INDENT> Component3d = 1 <NEW_LINE> Component3dNoLabels = 2 <NEW_LINE> ComponentAnalog = 3 <NEW_LINE> ComponentForce = 4 <NEW_LINE> Component6d = 5 <NEW_LINE> Component6dEuler = 6 <NEW_LINE> Component2d = 7 <NEW_LINE> Component2dLin = 8 <NEW_LINE> Component3dRes = 9 <NEW_LINE> C...
QTM Component types
6259907c4527f215b58eb6b5
class DecoderNet2d(_DecoderNetNd): <NEW_LINE> <INDENT> def __init__(self, channel, layers, out_size, kernel_size=3, in_length=2, out_planes=1): <NEW_LINE> <INDENT> super().__init__(2, channel=channel, layers=layers, out_size=out_size, kernel_size=kernel_size, in_length=in_length, out_planes=out_planes)
2D convolutional up-scale (decoder) network. This moule is a built-in model for convolutional network. The network could be used for up-scaling or generating samples. The network would up-sample and the input data according to the network depth. The depth is given by the length of the argument "layers". Different from ...
6259907c63b5f9789fe86b91
class RHContactEditingTeam(RHEditableTypeManagementBase): <NEW_LINE> <INDENT> def _process(self): <NEW_LINE> <INDENT> editors = get_editors(self.event, self.editable_type) <NEW_LINE> return jsonify_template('events/editing/management/editor_list.html', event_persons=editors, event=self.event)
Send emails to editing team.
6259907c009cb60464d02f69
class CollectedLinks: <NEW_LINE> <INDENT> def __init__( self, files, find_links, project_urls, ): <NEW_LINE> <INDENT> self.files = files <NEW_LINE> self.find_links = find_links <NEW_LINE> self.project_urls = project_urls
Encapsulates the return value of a call to LinkCollector.collect_links(). The return value includes both URLs to project pages containing package links, as well as individual package Link objects collected from other sources. This info is stored separately as: (1) links from the configured file locations, (...
6259907ce1aae11d1e7cf526
class StopSync(Exception): <NEW_LINE> <INDENT> def __init__(self, step=0): <NEW_LINE> <INDENT> self.step = step <NEW_LINE> Exception.__init__(self, "Synchronization aborted at step %s" % self.step )
Raised by the syncworker to tell the syncmanager to stop
6259907c091ae35668706669
class MNISTPlus(dense_design_matrix.DenseDesignMatrix): <NEW_LINE> <INDENT> idx = {'train': slice(0,50000), 'valid': slice(50000,60000), 'test': slice(60000,70000)} <NEW_LINE> def __init__(self, which_set, label_type=None, azimuth=False, rotation=False, texture=False, center = False, contrast_normalize=False, seed=132...
Pylearn2 wrapper for the MNIST-Plus dataset. Parameters ---------- which_set : WRITEME Dataset to load. One of ['train','valid','test']. label_type : WRITEME String specifies which contents of dictionary are used as "labels" azimuth : WRITEME Load version where lighting is a factor of variation rotation : ...
6259907c26068e7796d4e36a
class TestingConfig(Config): <NEW_LINE> <INDENT> ENV = 'testing' <NEW_LINE> DEBUG = True <NEW_LINE> TESTING = True <NEW_LINE> SQLALCHEMY_DATABASE_URI = os.getenv('TEST_DATABASE_URL') <NEW_LINE> MAIL_SUPPRESS_SEND = False <NEW_LINE> ACTIVATION_TOKEN_EXPIRY_SECONDS = 1
Configurations for Testing, with a separate test database.
6259907c442bda511e95da6d
class Test(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=50) <NEW_LINE> results = models.TextField() <NEW_LINE> release = models.BooleanField(default=False) <NEW_LINE> testPatient = models.ForeignKey(Patient, on_delete=models.CASCADE) <NEW_LINE> testDoctor = models.ForeignKey(Doctor, on_delete=m...
Tests to release to patients
6259907cbe7bc26dc9252b6b
class ThreatIndicator(object): <NEW_LINE> <INDENT> ADDED_ON = Common.ADDED_ON <NEW_LINE> CONFIDENCE = 'confidence' <NEW_LINE> DESCRIPTION = 'description' <NEW_LINE> EXPIRED_ON = 'expired_on' <NEW_LINE> ID = Common.ID <NEW_LINE> INDICATOR = 'indicator' <NEW_LINE> METADATA = Common.METADATA <NEW_LINE> PASSWORDS = 'passwo...
Vocabulary specific to searching for, adding, or modifying a Threat Indicator object.
6259907c4f6381625f19a1c3
class ExcelResponse(HttpResponse): <NEW_LINE> <INDENT> def export_excel(self, file_name, head_data=[], content_data=[]): <NEW_LINE> <INDENT> wb = Workbook() <NEW_LINE> wb.encoding = 'utf-8' <NEW_LINE> font = Font(u'DengXian', size=14, bold=True, color='000000') <NEW_LINE> body_font = Font(u'DengXian', size=14, bold=Fal...
excel文件导出 支持xls和csv格式文件 支持多sheet页导出
6259907c8a349b6b43687c87
@generate_repr("key", "value", "origin", "from_cli") <NEW_LINE> class Setting(StringConverter): <NEW_LINE> <INDENT> def __init__(self, key, value, origin="", strip_whitespaces=True, list_delimiters=(",", ";"), from_cli=False): <NEW_LINE> <INDENT> if not isinstance(from_cli, bool): <NEW_LINE> <INDENT> raise TypeError("f...
A Setting consists mainly of a key and a value. It mainly offers many conversions into common data types.
6259907c3d592f4c4edbc874
class FrontDoorNameAvailabilityOperations: <NEW_LINE> <INDENT> models = _models <NEW_LINE> def __init__(self, client, config, serializer, deserializer) -> None: <NEW_LINE> <INDENT> self._client = client <NEW_LINE> self._serialize = serializer <NEW_LINE> self._deserialize = deserializer <NEW_LINE> self._config = config ...
FrontDoorNameAvailabilityOperations async 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.frontdoor.models...
6259907c3617ad0b5ee07b79
class PublishedManager(models.Manager): <NEW_LINE> <INDENT> def get_query_set(self): <NEW_LINE> <INDENT> return super(PublishedManager, self).get_query_set().filter(publication_status='P', publication_date__lte=datetime.datetime.now()).order_by('-publication_date')
Published post manager.
6259907cdc8b845886d54fe7
class gRPCMdtDialout(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def MdtDialout(request_iterator, target, options=(), channel_credentials=None, call_credentials=None, compression=None, wait_for_ready=None, timeout=None, metadata=None): <NEW_LINE> <INDENT> return grpc.experimental.stream_stream(request_iterato...
Missing associated documentation comment in .proto file.
6259907c1f5feb6acb164624
class SbvHedVob3(Class3Graph1): <NEW_LINE> <INDENT> template_name = 'SbvHedVob3' <NEW_LINE> words_involved = {0: ('ANY', 'SBV'), 1: ('ANY', 'ATT'), 2: ('ANY', 'VOB'), 3: ('ANY', 'HED')} <NEW_LINE> relations_involved = [(3, 1), (1, 0), (1, 2)] <NEW_LINE> targets_involved = [0, 1, 2, 3] <NEW_LINE> def target(self, rule_t...
马拉多纳执教阿根廷队的开始时间;xx做xx的xx
6259907c3539df3088ecdcc4
class FakeSNMPDriver(base.BaseDriver): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> if not importutils.try_import('pysnmp'): <NEW_LINE> <INDENT> raise exception.DriverLoadError( driver=self.__class__.__name__, reason=_("Unable to import pysnmp library")) <NEW_LINE> <DEDENT> self.power = snmp.SNMPPower() ...
Fake SNMP driver.
6259907c5fdd1c0f98e5f9ac
class tile(object): <NEW_LINE> <INDENT> def __init__(self, screen_pos, grid_pos, terrain_type, tile_surface = pygame.Surface((2,2)), has_menu = False, sprite_list = [], building_list = []): <NEW_LINE> <INDENT> self.screen_pos = screen_pos <NEW_LINE> self.grid_pos = grid_pos <NEW_LINE> self.terrain_type = terrain_type <...
for map tiles, to contain everything to do with a tile, resources, sprites etc.
6259907ca05bb46b3848be3f
class ExprLT(ExprOperator): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(ExprLT, self).__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def Apply(self, value, operand): <NEW_LINE> <INDENT> return value < operand
LT node.
6259907c5fc7496912d48f81
class PythonDropSource(wx.DropSource): <NEW_LINE> <INDENT> def __init__(self, source, data, handler=None, allow_move=True): <NEW_LINE> <INDENT> self.handler = handler <NEW_LINE> self.allow_move = allow_move <NEW_LINE> clipboard.data = data <NEW_LINE> clipboard.source = source <NEW_LINE> clipboard.drop_source = self <NE...
Drop source for Python objects.
6259907cfff4ab517ebcf245
class Rescale(object): <NEW_LINE> <INDENT> def __init__(self, output_size): <NEW_LINE> <INDENT> assert isinstance(output_size, (int, tuple)) <NEW_LINE> self.output_size = output_size <NEW_LINE> <DEDENT> def __call__(self, sample): <NEW_LINE> <INDENT> image, landmarks = sample['image'], sample['landmarks'] <NEW_LINE> h,...
Rescale the image in a sample to a given size. Args: output_size (tuple or int): Desired output size. If tuple, output is matched to output_size. If int, smaller of image edges is matched to output_size keeping aspect ratio the same.
6259907c796e427e538501a8
class UserManager(object): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> self.file = os.path.join(path, 'users.json') <NEW_LINE> <DEDENT> def read(self): <NEW_LINE> <INDENT> if not os.path.exists(self.file): <NEW_LINE> <INDENT> return {} <NEW_LINE> <DEDENT> with open(self.file) as f: <NEW_LINE> <IND...
A very simple user Manager, that saves it's data as json.
6259907ca8370b77170f1dfd
class RestrictedManager(models.Manager): <NEW_LINE> <INDENT> def get(self, *args, **kwargs): <NEW_LINE> <INDENT> if 'permission__user' in kwargs: <NEW_LINE> <INDENT> if getattr(kwargs['permission__user'], 'is_superuser'): <NEW_LINE> <INDENT> kwargs.pop('permission__user') <NEW_LINE> <DEDENT> <DEDENT> return super().get...
custom manager to override QuerySet
6259907c60cbc95b06365a84
class RsatDatabaseTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> if not os.path.exists('testcache'): <NEW_LINE> <INDENT> os.mkdir('testcache') <NEW_LINE> <DEDENT> self.database = rsat.RsatDatabase(RSAT_BASE_URL, 'testcache', 'Helicobacter_pylori_26695_uid57787', 85962) <NEW_LINE> <DED...
Test class for RsatDatabase. These tests interacts with a real web service and will therefore run relatively slowly. Should be run as part of an integration test suite and not of the unit test suite. There is no real attempt to actually check the contents of the files, it is mainly a check for link availability.
6259907c5fdd1c0f98e5f9ad