code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Chain(object): <NEW_LINE> <INDENT> def __init__(self, index, topology, id): <NEW_LINE> <INDENT> self.index = index <NEW_LINE> self.topology = topology <NEW_LINE> self.id = id <NEW_LINE> self._residues = [] <NEW_LINE> <DEDENT> def residues(self): <NEW_LINE> <INDENT> return iter(self._residues) <NEW_LINE> <DEDENT> ... | A Chain object represents a chain within a Topology. | 625990707d847024c075dc79 |
class WKST_CopyLink(bpy.types.Menu): <NEW_LINE> <INDENT> bl_label = "Instance" <NEW_LINE> bl_idname = "wkst.copy_link" <NEW_LINE> def draw(self, context): <NEW_LINE> <INDENT> layout = self.layout <NEW_LINE> layout.operator("object.make_links_data", "Set Instance", icon="LINKED").type = 'OBDATA' <NEW_LINE> layout.operat... | Instance Tools | 625990701f5feb6acb164492 |
class Movie(): <NEW_LINE> <INDENT> valid_ratings = ["G", "PG", "PG-13", "R"] <NEW_LINE> def __init__(self, movie_title, movie_storyline, poster_image, trailer_youtube): <NEW_LINE> <INDENT> self.title = movie_title <NEW_LINE> self.storyline = movie_storyline <NEW_LINE> self.poster_image_url = poster_image <NEW_LINE> sel... | This class provides a way to store movie related information | 62599070ec188e330fdfa143 |
class HighlightsMenu(ABCMenu): <NEW_LINE> <INDENT> def __init__(self, sender): <NEW_LINE> <INDENT> ABCMenu.__init__(self, title2=sender.itemTitle) <NEW_LINE> self.AddMenu(FeaturedHighlightsMenu, 'Featured Highlights') <NEW_LINE> self.AddMenu(TeamListMenu, 'Team Highlights', submenu="HighlightsSearchMenu") <NEW_LINE> se... | The highlights/ Menu | 6259907032920d7e50bc78e8 |
class ReceiveService(BaseService): <NEW_LINE> <INDENT> def __init__(self, connection, context, **kwargs): <NEW_LINE> <INDENT> super().__init__(connection, context, **kwargs) <NEW_LINE> <DEDENT> def pre_service(self, *args, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def post_service(self, *args, **kwargs): ... | match a pattern from spawn buffer
Arguments:
pattern: regular expression pattern to match. If r'nopattern^' is used then
no pattern is match and all data till timeout period will be matched.
timeout: time to wait for the pattern to match.
size: read size in bytes for reading the buffer.
tr... | 6259907076e4537e8c3f0e25 |
class PhpBase(object): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self._php_construct(*args, **kwargs) <NEW_LINE> <DEDENT> def _php_construct(self, *args, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "Object" | The base class for all "php" classes"
| 625990704e4d562566373ca7 |
class CPPIntegrationTestCase(interface.ProcessTestCase): <NEW_LINE> <INDENT> REGISTERED_NAME = "cpp_integration_test" <NEW_LINE> def __init__(self, logger, program_executable, program_options=None): <NEW_LINE> <INDENT> interface.ProcessTestCase.__init__(self, logger, "C++ integration test", program_executable) <NEW_LIN... | A C++ integration test to execute. | 625990701b99ca4002290186 |
class SoftwareOrdersViewSet(mixins.ListModelMixin, viewsets.GenericViewSet, generics.CreateAPIView): <NEW_LINE> <INDENT> queryset = SoftwareOrder.objects.all() <NEW_LINE> serializer_class = SoftwareOrdersSerializer <NEW_LINE> pagination_class = SoftwareOrderPagination | List all snippets, or create a new snippet. | 62599070bf627c535bcb2d6d |
class ContactDetail(element.Element): <NEW_LINE> <INDENT> resource_type = "ContactDetail" <NEW_LINE> def __init__(self, jsondict=None, strict=True, **kwargs): <NEW_LINE> <INDENT> self.name = None <NEW_LINE> self.telecom = None <NEW_LINE> super(ContactDetail, self).__init__(jsondict=jsondict, strict=strict, **kwargs) <N... | Contact information.
Specifies contact information for a person or organization. | 625990701f037a2d8b9e54bb |
class BinaryCELoss(Loss): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__(name='binary_crossentropy') <NEW_LINE> <DEDENT> def __call__(self, gt, pr): <NEW_LINE> <INDENT> return F.binary_crossentropy(gt, pr, **self.submodules) | Creates a criterion that measures the Binary Cross Entropy between the
ground truth (gt) and the prediction (pr).
.. math:: L(gt, pr) = - gt \cdot \log(pr) - (1 - gt) \cdot \log(1 - pr)
Returns:
A callable ``binary_crossentropy`` instance. Can be used in ``model.compile(...)`` function
or combined with other ... | 62599070be8e80087fbc0930 |
class PagesRenderer(object): <NEW_LINE> <INDENT> def __init__(self, rendered_items: List[T.html_tag], page_css: bytes=None): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.rendered_items = rendered_items <NEW_LINE> self.pages = {} <NEW_LINE> self.resources = { _NAVBAR_CSS: load_resource(Path(_NAVBAR_CSS)), _STY... | :type rendered_items: list[tags.html_tag]
:type pages: dict[str, tags.html]
:type resources: dict[str, bytes] | 62599070a8370b77170f1c6a |
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 | 625990705fdd1c0f98e5f828 |
class ShortTable(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.authors = [] <NEW_LINE> self.change_history = [] <NEW_LINE> self.contact = None <NEW_LINE> self.contributors = [] <NEW_LINE> self.label = None <NEW_LINE> self.name = None <NEW_LINE> self.properties = [] <NEW_LINE> <DEDENT> def __... | Wraps s short-table, i.e. a grouped subset of specializations.
| 625990708e7ae83300eea932 |
class room_long(base_room): <NEW_LINE> <INDENT> pass | Large narrow room of random orientation | 625990700a50d4780f706a12 |
class RPC(WrapperPimpl): <NEW_LINE> <INDENT> class InnerWrapper(Wrapper): <NEW_LINE> <INDENT> def __init__(self, flux_handle, topic, payload=None, nodeid=flux.constants.FLUX_NODEID_ANY, flags=0, handle=None): <NEW_LINE> <INDENT> self._handle = flux_handle <NEW_LINE> dest = raw.flux_future_destroy <NEW_LINE> super(self.... | An RPC state object | 6259907016aa5153ce401d7c |
@keras_export('keras.layers.experimental.preprocessing.RandomContrast') <NEW_LINE> class RandomContrast(Layer): <NEW_LINE> <INDENT> def __init__(self, factor, seed=None, name=None, **kwargs): <NEW_LINE> <INDENT> self.factor = factor <NEW_LINE> if isinstance(factor, (tuple, list)): <NEW_LINE> <INDENT> self.lower = facto... | Adjust the contrast of an image or images by a random factor.
Contrast is adjusted independently for each channel of each image during
training.
For each channel, this layer computes the mean of the image pixels in the
channel and then adjusts each component `x` of each pixel to
`(x - mean) * contrast_factor + mean`.... | 625990703346ee7daa3382b0 |
class Player(object): <NEW_LINE> <INDENT> def __init__(self, index): <NEW_LINE> <INDENT> super(Player, self).__init__() <NEW_LINE> self.index = index <NEW_LINE> self.wealth = 0 <NEW_LINE> self.active_round = 0 | docstring for Player | 625990701f5feb6acb164494 |
class MediaAiAnalysisFrameTagSegmentItem(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.StartTimeOffset = None <NEW_LINE> self.EndTimeOffset = None <NEW_LINE> self.TagSet = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.StartTimeOffset = params.get("S... | 按帧标签片段列表
| 62599070ec188e330fdfa145 |
class MakeVideo(QuickApp): <NEW_LINE> <INDENT> def define_options(self, params): <NEW_LINE> <INDENT> params.add_string('dir', help='Directory containing logs') <NEW_LINE> params.add_string('tmpdir', help='Working directory ', default='tmp') <NEW_LINE> <DEDENT> def define_jobs_context(self, context): <NEW_LINE> <INDENT>... | Simplest app example | 62599070e76e3b2f99fda2a5 |
class AnonymousSurvey(): <NEW_LINE> <INDENT> def __init__(self,question): <NEW_LINE> <INDENT> self.question = question <NEW_LINE> self.responses = [] <NEW_LINE> <DEDENT> def show_question(self): <NEW_LINE> <INDENT> print(self.question) <NEW_LINE> <DEDENT> def store_response(self,new_response): <NEW_LINE> <INDENT> self.... | 收集匿名调查问卷的答案 | 62599070097d151d1a2c2914 |
class GithubSpider(scrapy.Spider): <NEW_LINE> <INDENT> name = 'GithubRepos' <NEW_LINE> @property <NEW_LINE> def start_urls(self): <NEW_LINE> <INDENT> url_templ = 'https://github.com/shiyanlou?page={}&tab=repositories' <NEW_LINE> urls = (url_templ.format(i) for i in range(1, 5)) <NEW_LINE> return urls <NEW_LINE> <DEDENT... | 所有 scrapy 爬蟲需要寫一個 Spider 類,這個類要繼承 scrapy.Spider 類。在這個類中定義要請求的網站和鏈接、如何從返回的網頁提取數據等等。 | 62599070796e427e5385001b |
class ProdConfig(Config): <NEW_LINE> <INDENT> pass <NEW_LINE> SQLALCHEMY_DATABASE_URI = os.environ.get("DATABASE_URL") | Production configuration child class
Args:
Config: The parent configuration class with General configuration settings | 62599070d486a94d0ba2d862 |
class NumRecord(object): <NEW_LINE> <INDENT> def __init__( self, time_ns=0, value=0 ): <NEW_LINE> <INDENT> self.time_ns = time_ns <NEW_LINE> self.value = value <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "%s(%s, %s)" % ( self.__class__.__name__, repr( self.time_ns ), repr( self.value ) ) <NEW_LIN... | Numeric record object definition. A record contains:
- the measurement time in nanoseconds
- the measured value (a integer, long or float) | 6259907001c39578d7f14386 |
class Meta(Ice.Object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> if __builtin__.type(self) == _M_Murmur.Meta: <NEW_LINE> <INDENT> raise RuntimeError('Murmur.Meta is an abstract class') <NEW_LINE> <DEDENT> <DEDENT> def ice_ids(self, current=None): <NEW_LINE> <INDENT> return ('::Ice::Object', '::Murmur... | This is the meta interface. It is primarily used for retrieving the [Server] interfaces for each individual server. | 62599070fff4ab517ebcf0bd |
class App(PlaybookApp): <NEW_LINE> <INDENT> def __init__(self, _tcex: TcEx): <NEW_LINE> <INDENT> super().__init__(_tcex) <NEW_LINE> self.pretty_json = {} <NEW_LINE> <DEDENT> def run(self) -> None: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> indent: str = self.tcex.playbook.read(self.args.indent) <NEW_LINE> indent = in... | Playbook App | 62599070a8370b77170f1c6c |
class StorageObjectsGetIamPolicyRequest(_messages.Message): <NEW_LINE> <INDENT> bucket = _messages.StringField(1, required=True) <NEW_LINE> generation = _messages.IntegerField(2) <NEW_LINE> object = _messages.StringField(3, required=True) <NEW_LINE> userProject = _messages.StringField(4) | A StorageObjectsGetIamPolicyRequest object.
Fields:
bucket: Name of the bucket in which the object resides.
generation: If present, selects a specific revision of this object (as
opposed to the latest version, the default).
object: Name of the object. For information about how to URL encode object
names ... | 6259907099cbb53fe683278c |
class BaseBaker(object): <NEW_LINE> <INDENT> timestamp_format = "%Y%m%dT%H%M%S" <NEW_LINE> def __init__(self, **filter_kwargs): <NEW_LINE> <INDENT> self.filter_kwargs = filter_kwargs <NEW_LINE> <DEDENT> def default_outputdir(self): <NEW_LINE> <INDENT> return os.path.join(COUNTRY_DIR, 'bakery') <NEW_LINE> <DEDENT> def f... | Base class for classes that write election and candidate data to structured files | 6259907099fddb7c1ca63a24 |
class Route(object): <NEW_LINE> <INDENT> def __init__(self, operator=None, route=None): <NEW_LINE> <INDENT> self.swagger_types = { 'operator': 'str', 'route': 'str' } <NEW_LINE> self.attribute_map = { 'operator': 'operator', 'route': 'route' } <NEW_LINE> self._operator = operator <NEW_LINE> self._route = route <NEW_LIN... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 625990702ae34c7f260ac98d |
class AbstractTxtLineParserFieldsStrategy(AbstractTxtLineParserTargetStrategy): <NEW_LINE> <INDENT> default_field_handler_prefix = 'parse_fields' <NEW_LINE> def field_targets(self): <NEW_LINE> <INDENT> for f in self.fields: <NEW_LINE> <INDENT> f_ = f.split(':') <NEW_LINE> if len(f_) > 2: yield f_[2] <NEW_LINE> else: yi... | ~FieldsStrategy adds a concrete `run_field_parse` for AbstractTxtLineParser
based on a three-part spec, and get/set descriptors provided for by
~TargetStrategy.
This basic field strategy uses the 'parse_fields_*' signature for methods
using this spec, to be distinguished from other res.txt list based parsers
with diff... | 62599070a219f33f346c80ad |
class RPCArgumentJSONDecodeError(Exception): <NEW_LINE> <INDENT> HTTP_status_code = 400 <NEW_LINE> pass | Tried to JSON decode an argument which was not JSON encoded
| 62599070009cb60464d02ddb |
class Mongo(object): <NEW_LINE> <INDENT> _client = None <NEW_LINE> _config = None <NEW_LINE> def __init__(self, Config=None): <NEW_LINE> <INDENT> if Config and isinstance(Config, Configuration): <NEW_LINE> <INDENT> self._config = Config <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self._config = Configuration() <NEW_L... | MongoDB Connection Class
Attributes:
_client (pymongo.MongoClient): The actual PyMongo Connection
_config (Configuration): Configuration Object | 625990704a966d76dd5f078e |
class SecretPage(models.Model): <NEW_LINE> <INDENT> name = models.CharField( unique=True, max_length=150, ) <NEW_LINE> slug = models.SlugField(unique=True) <NEW_LINE> template = models.CharField( max_length=300, help_text="File extension (.html) is not required." ) <NEW_LINE> active = models.BooleanField(default=False)... | Model for a secret page. | 62599070379a373c97d9a8c4 |
class LimitedMemoryBfgs(ScipyBaseSolver): <NEW_LINE> <INDENT> def __init__(self, objective: ObjectiveBaseClass, **kwargs): <NEW_LINE> <INDENT> super(LimitedMemoryBfgs, self).__init__(objective, method="L-BFGS-B", **kwargs) | Limited memory variant of BFGS (L-BFGS)
See the documentation of scipy for the parameter list and description.
Parameters
----------
jac: None
Is set automatically to objective gradient method. However, if no gradient function
is available, e.g., for a custom distance function, then jac can be set to None.
ca... | 62599070d268445f2663a7af |
class Options(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> print("create Option object") <NEW_LINE> self.emb_dim = FLAGS.embedding_size <NEW_LINE> self.train_data = FLAGS.train_data <NEW_LINE> self.num_samples = FLAGS.num_neg_samples <NEW_LINE> self.learning_rate = FLAGS.learning_rate <NEW_LINE>... | Options used by our word2vec model. | 6259907021bff66bcd72450d |
class DhtNode: <NEW_LINE> <INDENT> def __init__(self, myNode, pred, succ, nodeList): <NEW_LINE> <INDENT> self.myNode = myNode <NEW_LINE> self.pred = pred <NEW_LINE> self.succ = succ <NEW_LINE> self.data = {} <NEW_LINE> self.totalNodesNum = 2 ** 160 <NEW_LINE> self.nodeList = nodeList <NEW_LINE> self.ft = self.build_ft(... | Higher level of abstraction to include BaseNode instance for itself, its predecessor, its succesor and the list of
the nodes in the chord ring | 62599070b7558d5895464b85 |
class KeysTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def testSpecTables(self): <NEW_LINE> <INDENT> for klass in _SPEC_CLASSES: <NEW_LINE> <INDENT> methods = frozenset(klass.MethodNames) <NEW_LINE> self.assertEqual(methods, frozenset(klass.INPUT_SIGS.keys())) <NEW_LINE> self.assertEqual(methods, frozenset(klass.OU... | Test that every map contains all the designated keys. | 625990704a966d76dd5f078f |
class SomePage(): <NEW_LINE> <INDENT> def __init__(self, id): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.url = __class__.__makePageUrl__(self) <NEW_LINE> self.contents = None <NEW_LINE> <DEDENT> def __makePageUrl__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def getUrl(self): <NEW_LINE> <INDENT> return se... | Represents a page from Box Office Mojo
id is the id of the page (a string) | 62599070adb09d7d5dc0be10 |
class MethodMetaView(type): <NEW_LINE> <INDENT> def __init__(cls, name, bases, d): <NEW_LINE> <INDENT> super().__init__(name, bases, d) <NEW_LINE> if "methods" not in d: <NEW_LINE> <INDENT> methods = set() <NEW_LINE> for m in HTTP_METHODS: <NEW_LINE> <INDENT> if hasattr(cls, m): <NEW_LINE> <INDENT> if not iscoroutinefu... | A meta used by class based class to collect the implemented methods. | 625990704e4d562566373cac |
class ProviderUserState(object): <NEW_LINE> <INDENT> def __init__(self, enabled_provider, user, association): <NEW_LINE> <INDENT> self.has_account = association is not None <NEW_LINE> if self.has_account: <NEW_LINE> <INDENT> self.association_id = association.id <NEW_LINE> self.remote_id = enabled_provider.get_remote_id... | Object representing the provider state (attached or not) for a user.
This is intended only for use when rendering templates. See for example
lms/templates/dashboard.html. | 62599070bf627c535bcb2d71 |
class Aggregator: <NEW_LINE> <INDENT> def generate_score(self, entry): <NEW_LINE> <INDENT> _diff = (datetime.datetime.timestamp(datetime.datetime.utcnow()) - datetime.datetime.timestamp(entry["date"])) / 25 <NEW_LINE> _rank = { "BBC News - World": 0, "World News - Breaking international news and headlines | Sky News": ... | Basic aggregation functionality, parent class for Aggregator classes.
| 625990701f037a2d8b9e54bd |
class Knight(ChessPiece): <NEW_LINE> <INDENT> def __init__(self, row, col, color, board): <NEW_LINE> <INDENT> self.char = '♞' if color == Color.WHITE else '♘' <NEW_LINE> super().__init__(row, col, color, board) <NEW_LINE> <DEDENT> def generate_possible_moves(self): <NEW_LINE> <INDENT> possible_moves = [] <NEW_LINE> for... | This class will represent a knight piece in chess game
The knight (♘ ♞) is a piece in the game of chess, representing a knight (armored cavalry). It is normally
represented by a horse's head and neck. Each player starts with two knights, which begin on the row closest
to the player, between the rooks and bishops.
The... | 6259907066673b3332c31ca3 |
class URL(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.routemap = () <NEW_LINE> <DEDENT> def add(self, route, handler): <NEW_LINE> <INDENT> self.routemap = self.routemap + (route + '(/\w*)?(/\w*/?)?', handler) <NEW_LINE> <DEDENT> def get_map(self): <NEW_LINE> <INDENT> return self.routemap | Construye las URL de los nodos del API | 62599070f9cc0f698b1c5f1d |
class Network(NetworkBase): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> extract_values = True <NEW_LINE> debug = False <NEW_LINE> if "extract_values" in kwargs: <NEW_LINE> <INDENT> extract_values = kwargs.pop("extract_values") <NEW_LINE> <DEDENT> if "debug" in kwargs: <NEW_LINE> <INDENT> debug... | Class representing the Adafruit RGB Matrix Portal.
:param status_neopixel: The pin for the status NeoPixel. Use ``board.NEOPIXEL`` for the on-board
NeoPixel. Defaults to ``None``, not the status LED
:param esp: A passed ESP32 object, Can be used in cases where the ESP32 chip needs to be used
... | 6259907097e22403b383c7a8 |
class DataVariable(VariableInstance): <NEW_LINE> <INDENT> def __init__(self,source,name,units,data): <NEW_LINE> <INDENT> VariableInstance.__init__(self,source,name,units) <NEW_LINE> self._data = data <NEW_LINE> <DEDENT> def get_data(self,period,extent): <NEW_LINE> <INDENT> new_extent = extent.translate_to_origin(global... | Wrapper for creation of AWRA variables around existing data | 625990705fc7496912d48ebb |
class SpawnLocationGrader(CompoundGrader): <NEW_LINE> <INDENT> def __init__(self, timeout_seconds=8.0): <NEW_LINE> <INDENT> super().__init__([ PassOnSpawn(), FailOnTimeout(timeout_seconds), ]) | Checks that the car gets to the ball in a reasonable amount of time. | 625990700a50d4780f706a14 |
class SOURce(SCPINode): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> _cmd = "SOURce" <NEW_LINE> args = [] <NEW_LINE> class ALC(SCPINode): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> _cmd = "ALC" <NEW_LINE> args = [] <NEW_LINE> class BANDwidth(SCPINode, SCPISet): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> _cmd = "... | AMPLitude:SOURce
Arguments: | 62599070dd821e528d6da5d4 |
class VATINValidator: <NEW_LINE> <INDENT> messages = { 'country_code': _('%(country_code)s is not a valid country code.'), 'vatin': _('%(vatin)s is not a valid VAT identification number.'), } <NEW_LINE> def __call__(self, value): <NEW_LINE> <INDENT> country_code, number = self.clean(value) <NEW_LINE> try: <NEW_LINE> <I... | A validator for VAT identification numbers.
Currently only supports European VIES VAT identification numbers.
See See https://en.wikipedia.org/wiki/VAT_identification_number | 6259907067a9b606de5476f6 |
class TestContentSchema(unittest.TestCase): <NEW_LINE> <INDENT> layer = YOUNGLIVES_RESEARCH_TYPES_INTEGRATION_TESTING <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.portal = self.layer['portal'] <NEW_LINE> setRoles(self.portal, TEST_USER_ID, ['Manager']) <NEW_LINE> self.portal.invokeFactory('ResearchDatabase', 'r... | Test content type schema | 625990704a966d76dd5f0790 |
class StubProductDirectory(StubCertificateDirectory, ProductDirectory): <NEW_LINE> <INDENT> path = "this/is/a/stub/product/cert/dir" <NEW_LINE> def __init__(self, certificates=None, pids=None): <NEW_LINE> <INDENT> if pids is not None: <NEW_LINE> <INDENT> certificates = [] <NEW_LINE> for pid in pids: <NEW_LINE> <INDENT>... | Stub for mimicing behavior of an on-disk certificate directory.
Can be used for both entitlement and product directories as needed. | 625990704f88993c371f1173 |
class AggregateServiceMixin(object): <NEW_LINE> <INDENT> def aggregate(self, output, group_by=None, filter=None, rules=None, sorts=None): <NEW_LINE> <INDENT> data = { 'output': output } <NEW_LINE> if group_by is not None: <NEW_LINE> <INDENT> data['groupBy'] = group_by <NEW_LINE> <DEDENT> if filter is not None: <NEW_LIN... | A mixin to support aggregation. | 625990707d847024c075dc7f |
class TwitterUserKind(db.Model): <NEW_LINE> <INDENT> integerId = db.IntegerProperty() <NEW_LINE> screenName = db.StringProperty() <NEW_LINE> accessToken = db.StringProperty() | Twitter user is identified by integerId. | 62599070ec188e330fdfa149 |
class HostCorrection(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Delta_M = 0.08 <NEW_LINE> <DEDENT> def H_low(self, SNe): <NEW_LINE> <INDENT> H = np.zeros((3*len(SNe), 1)) <NEW_LINE> selection = np.where((SNe['3rdvar'] >= 9) & (SNe['3rdvar'] < 10))[0] <NEW_LINE> H[3*selection] = 1. <NEW_LI... | functions to contruct covariance matrix for uncertainty in host mass correction | 62599070796e427e5385001f |
class PublisherClient(object): <NEW_LINE> <INDENT> def __init__( self, project_id: Text, topic_name: Text, credentials: Optional[google.auth.credentials.Credentials] = None ) -> None: <NEW_LINE> <INDENT> self._publisher = pubsub_v1.PublisherClient(credentials=credentials) <NEW_LINE> self._topic = self._publisher.topic_... | Pub/Sub publisher client using google.cloud.pubsub_v1. | 625990704e4d562566373cad |
class AlbumInfoForm(forms.Form): <NEW_LINE> <INDENT> COUNTRY_CHOICES = [(i, i) for i in COUNTRIES] <NEW_LINE> YEAR_CHOICES = [(i, i) for i in range(1955, datetime.now().year)] <NEW_LINE> artist = forms.CharField(label=_("Artist"), max_length=128, required=True) <NEW_LINE> album = forms.CharField(label=_("Album"), max_l... | Album Info form search
| 625990704a966d76dd5f0791 |
class CorsBypassPageSet(page_set_module.PageSet): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(CorsBypassPageSet, self).__init__( archive_data_file='../data/chrome_proxy_bypass.json') <NEW_LINE> urls_list = [ 'http://aws1.mdw.la/test/cors/', ] <NEW_LINE> for url in urls_list: <NEW_LINE> <INDENT> se... | Chrome proxy test sites | 62599070d486a94d0ba2d865 |
class SimpleStringState(object): <NEW_LINE> <INDENT> insert_sre_methods(locals(), 'simple') <NEW_LINE> def __init__(self, string, start=0, end=-1): <NEW_LINE> <INDENT> self.string = string <NEW_LINE> if end < 0: <NEW_LINE> <INDENT> end = len(string) <NEW_LINE> <DEDENT> self.start = start <NEW_LINE> self.end = end <NEW_... | Prebuilt state for matching strings, for testing and for
stand-alone RPython applictions that don't worry about unicode. | 6259907076e4537e8c3f0e2b |
class CheckuserCmd(CmdRouter): <NEW_LINE> <INDENT> optional_args = [] <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(CheckuserCmd, self).__init__() <NEW_LINE> self.parser = ThrowingArgumentParser(prog='checkuser', usage='%(prog)s') <NEW_LINE> <DEDENT> def registe_parser(self): <NEW_LINE> <INDENT> pass <NEW_LI... | the 'checkuser' command: check the current users
Command usage:
:> 'checkuser' | 62599070442bda511e95d9ab |
class handleexcel: <NEW_LINE> <INDENT> def __init__(self,filename,sheetname): <NEW_LINE> <INDENT> self.filename = filename <NEW_LINE> self.sheetname = sheetname <NEW_LINE> <DEDENT> def open(self): <NEW_LINE> <INDENT> self.wb = openpyxl.load_workbook(self.filename) <NEW_LINE> self.sh = self.wb[self.sheetname] <NEW_LINE>... | 初始化函数:类中的实例方法都会用到实例属性实例属性的值不一样 | 62599070bf627c535bcb2d73 |
class Question(UpstreamAdapter): <NEW_LINE> <INDENT> _adapter_name = "question" <NEW_LINE> _output_format = "text+code" <NEW_LINE> _cache_needed = True <NEW_LINE> def _get_page(self, topic, request_options=None): <NEW_LINE> <INDENT> if not os.path.exists(CONFIG["path.internal.bin.upstream"]): <NEW_LINE> <INDENT> self._... | Answer to a programming language question, using Stackoverflow
as the main data source. Heavy lifting is done by an external
program `CONFIG["path.internal.bin.upstream"]`.
If the program is not found, fallback to the superclass `UpstreamAdapter`,
which queries the upstream server (by default https://cheat.sh/)
for th... | 625990701b99ca4002290189 |
class Resume(AbstractCommand): <NEW_LINE> <INDENT> def setup(self, subparsers): <NEW_LINE> <INDENT> parser = subparsers.add_parser( "resume", help="Pause a cluster by shutting down existing " "VMs, retaining disks and configuration.") <NEW_LINE> parser.set_defaults(func=self) <NEW_LINE> parser.add_argument('cluster', h... | Pause the nodes in the cluster, retaining disks and configuration. | 6259907055399d3f05627dc0 |
class Address(BaseModel): <NEW_LINE> <INDENT> user = models.ForeignKey('User', on_delete=models.CASCADE, verbose_name='所属账户') <NEW_LINE> receiver = models.CharField(max_length=20, verbose_name='收件人') <NEW_LINE> addr = models.CharField(max_length=256, verbose_name='收件地址') <NEW_LINE> zip_code = models.CharField(max_lengt... | 地址模型 | 62599070fff4ab517ebcf0c1 |
class TimedQueue: <NEW_LINE> <INDENT> def __init__(self, queue, time_limit): <NEW_LINE> <INDENT> self.__queue = queue <NEW_LINE> self.__time_limit = time_limit / 1000 <NEW_LINE> self.__stop_time = None <NEW_LINE> self.agent = None <NEW_LINE> <DEDENT> def start_timer(self): <NEW_LINE> <INDENT> self.__stop_time = self.__... | Modified Queue class to block .put() after a time limit expires,
and to include both a context object & action choice in the queue. | 62599070f548e778e596ce34 |
class Alternation(ParseItem): <NEW_LINE> <INDENT> def __init__(self, optional=False): <NEW_LINE> <INDENT> self.optional = optional <NEW_LINE> self.options = [] <NEW_LINE> self.add_alternate() <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> seps = "[]" if self.optional else "()" <NEW_LINE> return seps[0] + "|... | Matches any of a list of alternative Sequence items.
Alternation instances can also be marked optional by setting the
``optional`` parameter to ``True`` in the constructor - this menas that if
none of the options match, they'll return success without consuming any
items instead of raising :class:`MatchError`.
Note th... | 62599070e1aae11d1e7cf460 |
class ControllerGraph(object): <NEW_LINE> <INDENT> def __init__(self, params, starts, goal, controller, state_dim=3): <NEW_LINE> <INDENT> self._params = params <NEW_LINE> self._controller = controller <NEW_LINE> self._starts = starts <NEW_LINE> self._goal = goal <NEW_LINE> self._g = StateGraph(state_dim=state_dim) <NEW... | A Controller Graph
A graph based representation of continuous state MDPs by sampling a few
states and connecting them using local controllers (which can be seen as
Markov options). Generates a very sparse representation which is efficient
and also allows for task constraints to be modeled directly into the MDP
action ... | 62599070627d3e7fe0e0872f |
class Block(Sprite): <NEW_LINE> <INDENT> def __init__(self, screen, settings, color, x, y): <NEW_LINE> <INDENT> super(Block, self).__init__() <NEW_LINE> self.screen = screen <NEW_LINE> self.settings = settings <NEW_LINE> self.image = pygame.Surface((20, 20)) <NEW_LINE> self.image.fill(color) <NEW_LINE> self.rect = self... | A class representing the snake. | 625990703539df3088ecdb44 |
class BaseQuery(DotAccessDict): <NEW_LINE> <INDENT> pass | Object to represent an any RFQ. | 62599070a8370b77170f1c71 |
class LibvirtAOEVolumeDriver(libvirt_volume.LibvirtBaseVolumeDriver): <NEW_LINE> <INDENT> def __init__(self, host): <NEW_LINE> <INDENT> super(LibvirtAOEVolumeDriver, self).__init__(host, is_block_dev=True) <NEW_LINE> self.connector = connector.InitiatorConnector.factory( 'AOE', utils.get_root_helper(), device_scan_atte... | Driver to attach AoE volumes to libvirt. | 6259907097e22403b383c7ab |
class UserDeleteEquipTest(APITestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> td_john = TestData.user['john'] <NEW_LINE> self.superuser = User.objects.create_superuser(**td_john) <NEW_LINE> self.client.login(**td_john) <NEW_LINE> td_Haulotte = TestData.manufacture['Haulotte'] <NEW_LINE> self.client.p... | Non-admin user can not delete equip. | 625990704f6381625f19a0fc |
class TensorFlowRNNRegressor(TensorFlowEstimator, _sklearn.RegressorMixin): <NEW_LINE> <INDENT> def __init__(self, rnn_size, cell_type='gru', num_layers=1, input_op_fn=null_input_op_fn, initial_state=None, bidirectional=False, sequence_length=None, n_classes=0, batch_size=32, steps=50, optimizer='Adagrad', learning_rat... | TensorFlow RNN Regressor model.
Parameters:
rnn_size: The size for rnn cell, e.g. size of your word embeddings.
cell_type: The type of rnn cell, including rnn, gru, and lstm.
num_layers: The number of layers of the rnn model.
input_op_fn: Function that will transform the input tensor, such as
creating word... | 6259907099cbb53fe6832791 |
class LBaseHessianModel(object): <NEW_LINE> <INDENT> def __init__(self, maxsize, diag0=1.0): <NEW_LINE> <INDENT> self.maxsize = maxsize <NEW_LINE> self.diag0 = diag0 <NEW_LINE> self.reset() <NEW_LINE> <DEDENT> @property <NEW_LINE> def size(self): <NEW_LINE> <INDENT> return len(self.history) <NEW_LINE> <DEDENT> def rese... | Base class for all low-memory Hessian models
The base functionality is the storage and management of previous steps and
corresponding gradient changes. | 62599070009cb60464d02ddf |
class FFmpegAudio(AudioSource): <NEW_LINE> <INDENT> def __init__(self, source, *, executable='ffmpeg', args, **subprocess_kwargs): <NEW_LINE> <INDENT> self._process = self._stdout = None <NEW_LINE> args = [executable, *args] <NEW_LINE> kwargs = {'stdout': subprocess.PIPE} <NEW_LINE> kwargs.update(subprocess_kwargs) <NE... | Represents an FFmpeg (or AVConv) based AudioSource.
User created AudioSources using FFmpeg differently from how :class:`FFmpegPCMAudio` and
:class:`FFmpegOpusAudio` work should subclass this.
.. versionadded:: 1.3 | 6259907067a9b606de5476f7 |
class LoginForm(Form): <NEW_LINE> <INDENT> username = TextField('Username', [validators.Required('사용자명을 입력하세요.'), validators.Length( min=4, max=50, message='4자리 이상 50자리 이하로 입력하세요.')]) <NEW_LINE> password = PasswordField('New Password', [validators.Required('비밀번호를 입력하세요.'), validators.Length( min=4, max=50, messa... | 로그인 화면에서 사용자명과 비밀번호 입력값을 검증함 | 625990708a43f66fc4bf3a3d |
class Bond(_object): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> __setattr__ = lambda self, name, value: _swig_setattr(self, Bond, name, value) <NEW_LINE> __swig_getmethods__ = {} <NEW_LINE> __getattr__ = lambda self, name: _swig_getattr(self, Bond, name) <NEW_LINE> def __init__(self, *args): <NEW_LINE> <IN... | Proxy of C++ uni10::Bond class | 62599070adb09d7d5dc0be14 |
class Paginator(object): <NEW_LINE> <INDENT> def __init__(self, *args, **params): <NEW_LINE> <INDENT> from disqusapi import InterfaceNotDefined <NEW_LINE> if len(args) == 2: <NEW_LINE> <INDENT> self.method = args[0] <NEW_LINE> self.endpoint = args[1] <NEW_LINE> <DEDENT> elif len(args) == 1: <NEW_LINE> <INDENT> self.met... | Paginate through all entries:
>>> paginator = Paginator(api, 'trends.listThreads', forum='disqus')
>>> for result in paginator:
>>> print result
Paginate only up to a number of entries:
>>> for result in paginator(limit=500):
>>> print result | 62599070aad79263cf43005f |
class LazyDict(collections.abc.Mapping): <NEW_LINE> <INDENT> class Entry(SlotStruct): <NEW_LINE> <INDENT> __slots__ = ( 'lam', 'val', 'isset') <NEW_LINE> <DEDENT> class LazyView(collections.abc.MutableMapping): <NEW_LINE> <INDENT> def __init__(self, dict): <NEW_LINE> <INDENT> self._entries = dict <NEW_LINE> <DEDENT> de... | A dictionary that stores values that will be later lazily evaluated. | 625990701b99ca400229018a |
class User(db.Model, CRUDMixin): <NEW_LINE> <INDENT> __tablename__ = 'user' <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> username = db.Column(db.String(32), index=True) <NEW_LINE> email = db.Column(db.String(255), unique=True) <NEW_LINE> password = db.Column(db.String(255)) <NEW_LINE> created = db... | Used for both users and applications.
http://blog.miguelgrinberg.com/post/restful-authentication-with-flask | 6259907056b00c62f0fb4178 |
class JSONEncodedList(MutableType, JSONEncodedDict): <NEW_LINE> <INDENT> def copy_value(self, value): <NEW_LINE> <INDENT> if value : return value[:] <NEW_LINE> else : return [] | Adds mutability to list type JSONEncodedDict. Use scarsely | 625990704527f215b58eb5f4 |
class Grouper(object): <NEW_LINE> <INDENT> def __init__(self, stream, max_size=1000): <NEW_LINE> <INDENT> self.max_size = max_size <NEW_LINE> self.stream = stream <NEW_LINE> self.dict = collections.OrderedDict() <NEW_LINE> <DEDENT> @property <NEW_LINE> def size(self): <NEW_LINE> <INDENT> return len(self.dict) <NEW_LINE... | Utility for grouping events and sub-events together.
Events fed into a Grouper are joined by their common 'id'. Encountering the
parent event type will trigger emitting a list of all events and sub events
for that single id.
This assumes that the parent event will be the last encountered.
So for example, you might ... | 62599070a8370b77170f1c72 |
class XEP_0280(BasePlugin): <NEW_LINE> <INDENT> name = 'xep_0280' <NEW_LINE> description = 'XEP-0280: Message Carbons' <NEW_LINE> dependencies = set(['xep_0030', 'xep_0297']) <NEW_LINE> stanza = stanza <NEW_LINE> def plugin_init(self): <NEW_LINE> <INDENT> self.xmpp.register_handler( Callback('Carbon Received', StanzaPa... | XEP-0280 Message Carbons | 625990703539df3088ecdb46 |
class MultipleSecretStoreLookupFailed(BarbicanException): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> msg = u._("Plugin lookup property 'stores_lookup_suffix' is not " "defined in service configuration") <NEW_LINE> super(MultipleSecretStoreLookupFailed, self).__init__(msg) | Raised when a plugin lookup suffix is missing during config read. | 625990702ae34c7f260ac993 |
class DeleteLayerVersionResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RequestId = params.get("RequestId") | DeleteLayerVersion返回参数结构体
| 62599070435de62698e9d6af |
class Troubleshoot(object): <NEW_LINE> <INDENT> title = None <NEW_LINE> message = None <NEW_LINE> template = 'geosafe/analysis/troubleshoot/generic.html' <NEW_LINE> suggested_actions = [] | Base class of troubleshoot.
This class is reserved as barebones for suggestion generations. | 62599070091ae356687064e0 |
class PrototypeForm(FlaskForm): <NEW_LINE> <INDENT> supported_functions = [('abc_def', 'Visible Command as Seen By User'), ('abc_xxx', 'Delete an Existing User'), ('abc_xxx', 'Add a New User'), ('abc_xxx', 'Modify an Existing User')] <NEW_LINE> work_function = SelectField(label='Select Function', choices=supported_func... | Use this a a base for creating a new Form.
| 62599070a17c0f6771d5d7ff |
class BingoSquare(BingoLabel): <NEW_LINE> <INDENT> style_name = 'square-label' <NEW_LINE> highlight_names = [None, 'bingo-highlight', 'bingo-bad-highlight'] <NEW_LINE> def __init__(self, name, card, offset, number): <NEW_LINE> <INDENT> super(BingoSquare, self).__init__(name, card, offset, number) <NEW_LINE> self.is_cal... | A square on a bingo card | 625990705166f23b2e244c7e |
class MovingDotEnv(gym.Env): <NEW_LINE> <INDENT> metadata = {'render.modes': ['human']} <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(gym.Env, self).__init__() <NEW_LINE> self.dot_size = [2, 2] <NEW_LINE> self.random_start = True <NEW_LINE> self.max_steps = 1000 <NEW_LINE> self.observation_space = spaces.Box... | Base class for MovingDot game | 6259907021bff66bcd724513 |
class SellarImplicitDis2(ImplicitComponent): <NEW_LINE> <INDENT> def __init__(self, units=None, scaling=None): <NEW_LINE> <INDENT> super(SellarImplicitDis2, self).__init__() <NEW_LINE> self.execution_count = 0 <NEW_LINE> self._units = units <NEW_LINE> self._scaling = scaling <NEW_LINE> <DEDENT> def setup(self): <NEW_LI... | Component containing Discipline 2 -- implicit version. | 625990705fcc89381b266dac |
class precipitation(object): <NEW_LINE> <INDENT> legal_units = [ "IN", "CM" ] <NEW_LINE> legal_gtlt = [ ">", "<" ] <NEW_LINE> def __init__( self, value, units=None, gtlt=None ): <NEW_LINE> <INDENT> if not units: <NEW_LINE> <INDENT> self._units = "IN" <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> if not units.upper() in... | A class representing a precipitation value. | 625990703346ee7daa3382b4 |
class Generic(exceptions.Exception): <NEW_LINE> <INDENT> def __init__(self, err_msg=None): <NEW_LINE> <INDENT> self.err_msg = err_msg <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.err_msg <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return self.__class__.__name__ + '(' + self.err... | Base class error handlers
| 625990707047854f46340c63 |
class Organisation(object): <NEW_LINE> <INDENT> def __init__(self, etree, dataset=None, schema=None): <NEW_LINE> <INDENT> self.etree = etree <NEW_LINE> self.dataset = dataset <NEW_LINE> self._schema = schema <NEW_LINE> self.version = self.schema.version <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> id_ = ... | Class representing an IATI organisation. | 625990704e4d562566373cb1 |
class EffectGiveNode(EffectCmdNode): <NEW_LINE> <INDENT> def __init__(self, selector, effect_id, duration=None, level=None, hide_particles=True): <NEW_LINE> <INDENT> assert_type(selector, SelectorNode) <NEW_LINE> assert_type(effect_id, Token) <NEW_LINE> assert_type(duration, Token, optional=True) <NEW_LINE> assert_type... | Attributes:
selector (SelectorNode)
effect_id (Token)
duration (Token or None)
level (Token or None)
hide_particles (bool) | 625990704c3428357761bb5f |
class TPUDistributionStrategy(object): <NEW_LINE> <INDENT> def __init__(self, tpu_cluster_resolver=None, using_single_core=False): <NEW_LINE> <INDENT> if tpu_cluster_resolver is None: <NEW_LINE> <INDENT> tpu_cluster_resolver = tpu_cluster_resolver_lib.TPUClusterResolver('') <NEW_LINE> <DEDENT> metadata = get_tpu_system... | The strategy to run Keras model on TPU. | 62599070283ffb24f3cf5154 |
class XOR: <NEW_LINE> <INDENT> def __init__(self, literals): <NEW_LINE> <INDENT> assert(len(literals) >= 2) <NEW_LINE> self.__literals = literals <NEW_LINE> self.__index = 2 <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> return len(self.__literals) <NEW_LINE> <DEDENT> def __getitem__(self, idx): <NEW_LINE> ... | A XOR constraint maintains the following invariants:
1. there are at least two literals, and
2. the first two literals are unassigned, or all literals are assigned and
the first two literals have been assigned last on the same decision
level.
Furthermore, an index pointing to the literal after the literal assigne... | 6259907001c39578d7f1438a |
class ImportVenuesRawForm(forms.Form): <NEW_LINE> <INDENT> venues_raw = forms.CharField(widget=forms.Textarea(attrs={'rows': 20})) <NEW_LINE> def clean_venues_raw(self): <NEW_LINE> <INDENT> lines = self.cleaned_data['venues_raw'].split('\n') <NEW_LINE> venues = [] <NEW_LINE> for i, line in enumerate(csv.reader(lines), ... | Form that takes in a CSV-style list of venues, splits it and stores the
split data. | 6259907099cbb53fe6832795 |
class ProcessInfo: <NEW_LINE> <INDENT> def __init__(self, process_id=os.getpid(), program_name='python{}.{} {}'.format( sys.version_info.major, sys.version_info.minor, program_name()), arguments=copy.copy(sys.argv), start_time=process_start_time(), executing_user=None, rsb_version=rsb.version.get_version()): <NEW_LINE>... | Stores information about operating system processes.
The stored information can describe the current process, a
different process on the local machine or a remote process.
.. codeauthor:: jmoringe | 625990703317a56b869bf19a |
class VelocityEstimator(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> from collections import deque <NEW_LINE> self.positions=deque([],2) <NEW_LINE> <DEDENT> def append(self, time, new_position): <NEW_LINE> <INDENT> from copy import deepcopy <NEW_LINE> self.positions.append((time, deepcopy(new_po... | Calculates a series of points based on the historic set of time,positions | 625990704428ac0f6e659ddf |
class LastCountryOfUserMapperTestCase(MapperTestMixin, TestCase): <NEW_LINE> <INDENT> user_id = 1 <NEW_LINE> timestamp = '2013-12-17T15:38:32.805444' <NEW_LINE> ip_address = FakeGeoLocation.ip_address_1 <NEW_LINE> course_id = 'DummyX/Course/ID' <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.task_class = LastCount... | Tests of LastCountryOfUser.mapper() | 62599070dd821e528d6da5d7 |
class Result(Enum): <NEW_LINE> <INDENT> UNKNOWN = 0 <NEW_LINE> SUCCESS = 1 <NEW_LINE> IN_PROGRESS = 2 <NEW_LINE> BUSY = 3 <NEW_LINE> DENIED = 4 <NEW_LINE> ERROR = 5 <NEW_LINE> TIMEOUT = 6 <NEW_LINE> WRONG_ARGUMENT = 7 <NEW_LINE> NO_SYSTEM = 8 <NEW_LINE> def translate_to_rpc(self): <NEW_LINE> <INDENT> if self == CameraR... | Possible results returned for camera commands
Values
------
UNKNOWN
Unknown result
SUCCESS
Command executed successfully
IN_PROGRESS
Command in progress
BUSY
Camera is busy and rejected command
DENIED
Camera denied the command
ERROR
An error has occurred while executing the command
... | 62599070435de62698e9d6b1 |
class HTTPHeaders(dict): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> dict.__init__(self) <NEW_LINE> for k in kwargs.keys(): <NEW_LINE> <INDENT> self.__setitem__(k, kwargs[k]) <NEW_LINE> <DEDENT> <DEDENT> def add(self, key, value): <NEW_LINE> <INDENT> if not isinstance(key, str): <NEW_LINE> <IN... | a dictionary of strings mapped to values
useful for loading MIME headers from a file-like object | 62599070460517430c432cad |
class NotAuthenticatedError(Error): <NEW_LINE> <INDENT> pass | Authentication failed. | 625990705166f23b2e244c80 |
class EEADM_File_State(EEADM): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> tic = time.perf_counter() <NEW_LINE> args = ["eeadm", "file", "state", "-s", path] <NEW_LINE> proc = subprocess.run( args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10, check=True, universal_newlines=True, ) <... | Wrapper around eeadm file state -s <path>.
path - Absolute path to files on filesystem
Wild cards are accepted (TODO)
returns list of LtfseeFile objects | 625990705fcc89381b266dad |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.