code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class BioethicsSpider(scrapy.Spider): <NEW_LINE> <INDENT> name = "bioetich" <NEW_LINE> allowed_domains = ["bioethics.virginia.edu"] <NEW_LINE> start_urls = ( 'http://bioethics.virginia.edu/people', ) <NEW_LINE> def parse(self, response): <NEW_LINE> <INDENT> sel = Selector(response) <NEW_LINE> people_sel = sel.xpath('//... | Scrape all profiles from
http://www.bioethics.virginia.edu | 62598faa66656f66f7d5a365 |
class ClientApi(flask.ext.restful.Resource): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> dequeue = [str(item) for item in request_queue.queue] <NEW_LINE> return {"ok": True, "queue": dequeue}, 200 <NEW_LINE> <DEDENT> def post(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> message = request_queue.get(tim... | Client API
Send requests from server to client.
A heartbeat is emitted once every second.
GET /client
POST /client | 62598faa2c8b7c6e89bd373a |
class DeletedSecretBundle(SecretBundle): <NEW_LINE> <INDENT> _validation = { 'kid': {'readonly': True}, 'managed': {'readonly': True}, 'scheduled_purge_date': {'readonly': True}, 'deleted_date': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': 'str'}, 'id': {'key': 'id', 'type': 'st... | A Deleted Secret consisting of its previous id, attributes and its tags, as well as information on when it will be purged.
Variables are only populated by the server, and will be ignored when sending a request.
:param value: The secret value.
:type value: str
:param id: The secret id.
:type id: str
:param content_typ... | 62598faa30dc7b766599f7c1 |
class UnsupportedFunctional(ConversionError): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return "The {} interaction type is not supported in {}.".format( self.could_not_convert.__class__.__name__, self.engine.upper()) | Force functional that is not supported in a specific engine. | 62598faaf9cc0f698b1c5283 |
class Neighborhood(object): <NEW_LINE> <INDENT> def __init__(self, rows, cols): <NEW_LINE> <INDENT> self.rows = rows <NEW_LINE> self.cols = cols <NEW_LINE> self.numMonsters = 0 <NEW_LINE> self.homes = [[Home(self) for j in range(cols)] for i in range(rows)] <NEW_LINE> <DEDENT> def getRows(self): <NEW_LINE> <INDENT> ret... | Neighborhood class information | 62598faa0c0af96317c562f7 |
class RegenerateAccessKeyParameters(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'key_type': {'required': True}, } <NEW_LINE> _attribute_map = { 'key_type': {'key': 'keyType', 'type': 'str'}, 'key': {'key': 'key', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, key_type: Union[str, "KeyType"], k... | Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset.
All required parameters must be populated in order to send to Azure.
:param key_type: Required. The access key to regenerate. Possible values include: "PrimaryKey",
"SecondaryKey".
:type key_type: str or ~azure... | 62598faa7d847024c075c338 |
class UserDeviceSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = UserDevice | serializer for user device | 62598faa0a50d4780f705352 |
class TestNLPIR(unittest.TestCase): <NEW_LINE> <INDENT> def test_load_library(self): <NEW_LINE> <INDENT> self.assertTrue(isinstance(nlpir.libNLPIR, ctypes.CDLL)) | Unit tests for the pynlpir.nlpir module. | 62598faa3cc13d1c6d4656e0 |
class Connection(object): <NEW_LINE> <INDENT> default_host = 'localhost' <NEW_LINE> default_port = 8125 <NEW_LINE> default_sample_rate = 1 <NEW_LINE> default_disabled = False <NEW_LINE> @classmethod <NEW_LINE> def set_defaults( cls, host='localhost', port=8125, sample_rate=1, disabled=False): <NEW_LINE> <INDENT> cls.de... | Statsd Connection
:keyword host: The statsd host to connect to, defaults to `localhost`
:type host: str
:keyword port: The statsd port to connect to, defaults to `8125`
:type port: int
:keyword sample_rate: The sample rate, defaults to `1` (meaning always)
:type sample_rate: int
:keyword disabled: Turn off sending UDP... | 62598faa23849d37ff851029 |
class Command(BaseCommand): <NEW_LINE> <INDENT> help = '新着エピソードを取得' <NEW_LINE> def add_arguments(self, parser): <NEW_LINE> <INDENT> parser.add_argument('--verbose', action='store_true', dest='verbose', default=False, help='Print progress on command line') <NEW_LINE> <DEDENT> def handle(self, *args, **options): <NEW_LIN... | 既存チャンネルの更新をする
Cronから定期的に呼ばれることを想定 | 62598faa9c8ee8231304012b |
class instantiableclassmethod(object): <NEW_LINE> <INDENT> def __init__(self, getter): <NEW_LINE> <INDENT> self.getter = getter <NEW_LINE> <DEDENT> def __get__(self, obj, cls): <NEW_LINE> <INDENT> if obj is not None: <NEW_LINE> <INDENT> def wrapper(*args, **kargs): <NEW_LINE> <INDENT> return self.getter(obj, *args, **k... | A method that takes the class as its first argument if called on the
class and the instance as an argument if called on an instance. | 62598faa8e71fb1e983bba27 |
class BaseNumericalModel(BaseModel): <NEW_LINE> <INDENT> @keywordonly(connectivity_mapping=None) <NEW_LINE> def __init__(self, model, independent_vars=None, params=None, **kwargs): <NEW_LINE> <INDENT> connectivity_mapping = kwargs.pop('connectivity_mapping') <NEW_LINE> if (connectivity_mapping is None and independent_v... | ABC for Numerical Models. These are models whose components are generic
python callables. | 62598faa3539df3088ecc228 |
class PyMataSerial(threading.Thread): <NEW_LINE> <INDENT> arduino = serial.Serial() <NEW_LINE> port_id = "" <NEW_LINE> baud_rate = 57600 <NEW_LINE> timeout = 1 <NEW_LINE> command_deque = None <NEW_LINE> def __init__(self, port_id, command_deque, baud_rate): <NEW_LINE> <INDENT> self.port_id = port_id <NEW_LINE> self.com... | This class manages the serial port for Arduino serial communications | 62598faa99fddb7c1ca62da3 |
class ContentSessionLog(BaseLogModel): <NEW_LINE> <INDENT> user = models.ForeignKey(FacilityUser, blank=True, null=True) <NEW_LINE> content_id = UUIDField(db_index=True) <NEW_LINE> channel_id = UUIDField() <NEW_LINE> start_timestamp = models.DateTimeField() <NEW_LINE> end_timestamp = models.DateTimeField(blank=True, nu... | This model provides a record of interactions with a content item within a single visit to that content page. | 62598faad486a94d0ba2bf43 |
class Population(object): <NEW_LINE> <INDENT> def __init__( self, Ne=None, sample_size=None, initial_size=None, growth_rate=None): <NEW_LINE> <INDENT> self.Ne = Ne <NEW_LINE> self.initial_size = initial_size * self.Ne <NEW_LINE> self.growth_rate = growth_rate / (4 * Ne) <NEW_LINE> <DEDENT> def get_size(self, time): <NE... | Simple class to represent the state of a population in terms of its
demographic parameters. This is intended to be initialised from the
corresponding low-level values so that they can be rescaled back into
input units. | 62598faaeab8aa0e5d30bd00 |
class RPCClient(object): <NEW_LINE> <INDENT> JSON_RPC_VERSION = "2.0" <NEW_LINE> _ALLOWED_REPLY_KEYS = sorted(['id', 'jsonrpc', 'error', 'result']) <NEW_LINE> _ALLOWED_REQUEST_KEYS = sorted(['id', 'jsonrpc', 'method', 'params']) <NEW_LINE> def parse_reply(self, data): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> rep = ... | Client for making RPC calls to connected servers.
:param protocol: An :py:class:`~tinyrpc.RPCProtocol` instance.
:param transport: A :py:class:`~tinyrpc.transports.ClientTransport`
instance. | 62598faa442bda511e95c3cc |
class DetectionBlock(BaseModule): <NEW_LINE> <INDENT> def __init__(self, in_channels, out_channels, conv_cfg=None, norm_cfg=dict(type='BN', requires_grad=True), act_cfg=dict(type='LeakyReLU', negative_slope=0.1), init_cfg=None): <NEW_LINE> <INDENT> super(DetectionBlock, self).__init__(init_cfg) <NEW_LINE> double_out_ch... | Detection block in YOLO neck.
Let out_channels = n, the DetectionBlock contains:
Six ConvLayers, 1 Conv2D Layer and 1 YoloLayer.
The first 6 ConvLayers are formed the following way:
1x1xn, 3x3x2n, 1x1xn, 3x3x2n, 1x1xn, 3x3x2n.
The Conv2D layer is 1x1x255.
Some block will have branch after the fifth ConvLayer.
The ... | 62598faa99cbb53fe6830e4c |
class Particle: <NEW_LINE> <INDENT> def __init__(self, seed = -1, x= 0, y = 0): <NEW_LINE> <INDENT> if seed == -1: <NEW_LINE> <INDENT> seed = random.randint(2, 1000000) <NEW_LINE> <DEDENT> self.x = x <NEW_LINE> self.y = y <NEW_LINE> self.RNG = np.random.RandomState(seed) <NEW_LINE> <DEDENT> def move(self, step_size = 1... | Defines particle objects that are seeded at initialization
and move around accordingly
| 62598faaac7a0e7691f7247f |
class NotImplemented(Error): <NEW_LINE> <INDENT> pass | Raised when request is correct, but feature is not implemented
by library.
For example non-sequential blockwise transfers | 62598faa4f6381625f199479 |
class STD_ANON (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): <NEW_LINE> <INDENT> _ExpandedName = None <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('/home/gberg/code/src/fstr/darwinpush/xsd/rttiPPTForecasts_v2.xsd', 38, 5) <NEW_LINE> _Documentation = None | An atomic simple type. | 62598faa7047854f4633f34f |
class DagsterInvalidConfigDefinitionError(DagsterError): <NEW_LINE> <INDENT> def __init__(self, original_root, current_value, stack, reason=None, **kwargs): <NEW_LINE> <INDENT> self.original_root = original_root <NEW_LINE> self.current_value = current_value <NEW_LINE> self.stack = stack <NEW_LINE> super(DagsterInvalidC... | Indicates that you have attempted to construct a config with an invalid value
Acceptable values for config types are any of:
1. A Python primitive type that resolves to a Dagster config type
(:py:class:`~python:int`, :py:class:`~python:float`, :py:class:`~python:bool`,
:py:class:`~python:str`, or :... | 62598faa91af0d3eaad39d85 |
@dataclass <NEW_LINE> class FileInfo(BaseFileInfo, SerializableAttrs): <NEW_LINE> <INDENT> thumbnail_info: Optional[ThumbnailInfo] = None <NEW_LINE> thumbnail_file: Optional[EncryptedFile] = None <NEW_LINE> thumbnail_url: Optional[ContentURI] = None | Information about a document message. | 62598faa1f037a2d8b9e4063 |
class WeightedRandomSampler(Sampler): <NEW_LINE> <INDENT> def __init__(self, weights, num_samples, replacement=True): <NEW_LINE> <INDENT> if not isinstance(num_samples, _int_classes) or isinstance(num_samples, bool) or num_samples <= 0: <NEW_LINE> <INDENT> raise ValueError("num_samples should be a positi... | Samples elements from [0,..,len(weights)-1] with given probabilities (weights).
Arguments:
weights (sequence) : a sequence of weights, not necessary summing up to one
num_samples (int): number of samples to draw
replacement (bool): if ``True``, samples are drawn with replacement.
If not, they are... | 62598faa4428ac0f6e65849a |
class EZSPv6(EZSPv5): <NEW_LINE> <INDENT> COMMANDS = commands.COMMANDS <NEW_LINE> SCHEMAS = { bellows.config.CONF_EZSP_CONFIG: voluptuous.Schema(config.EZSP_SCHEMA), bellows.config.CONF_EZSP_POLICIES: voluptuous.Schema(config.EZSP_POLICIES_SCH), } <NEW_LINE> types = v6_types | EZSP Version 6 Protocol version handler. | 62598faaf548e778e596b51a |
class BuildProperties(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'provisioning_state': {'readonly': True}, 'triggered_build_result': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'relative_path': {'key': 'relativePath', 'type': 'str'}, 'builder': {'key': 'builder', 'type': 'str'}, 'agent_poo... | Build resource properties payload.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar relative_path: The relative path of source code.
:vartype relative_path: str
:ivar builder: The resource id of builder to build the source code.
:vartype builder: str
:ivar agent_pool: The ... | 62598faa4a966d76dd5eee58 |
class OntoClass(RDF_Entity): <NEW_LINE> <INDENT> def __init__(self, uri, rdftype=None, namespaces=None): <NEW_LINE> <INDENT> super(OntoClass, self).__init__(uri, rdftype, namespaces) <NEW_LINE> self.slug = "class-" + slugify(self.qname) <NEW_LINE> self.domain_of = [] <NEW_LINE> self.range_of = [] <NEW_LINE> self.domain... | Python representation of a generic class within an ontology.
Includes methods for representing and querying RDFS/OWL classes
domain_of_inferred: a list of dict
[{<Class *http://xmlns.com/foaf/0.1/Person*>:
[<Property *http://xmlns.com/foaf/0.1/currentProject*>,<Property *http://xmlns.com/foaf/0.1/fami... | 62598faa44b2445a339b692b |
class HuaweiEM770(HuaweiDBusDevicePlugin): <NEW_LINE> <INDENT> name = "Huawei EM770" <NEW_LINE> version = "0.1" <NEW_LINE> author = u"Andrew Bird" <NEW_LINE> custom = HuaweiCustomizer <NEW_LINE> __remote_name__ = "EM770" <NEW_LINE> __properties__ = { 'usb_device.vendor_id': [0x12d1], 'usb_device.product_id': [0x1001], ... | L{vmc.common.plugin.DBusDevicePlugin} for Huawei's EM770 | 62598faa379a373c97d98f89 |
class BertForSequenceClassification(PreTrainedBertModel): <NEW_LINE> <INDENT> def __init__(self, config, num_labels=2, focal_loss=False, gamma=0, alpha=None): <NEW_LINE> <INDENT> super(BertForSequenceClassification, self).__init__(config) <NEW_LINE> self.num_labels = num_labels <NEW_LINE> self.focal_loss = focal_loss <... | BERT model for classification.
This module is composed of the BERT model with a linear layer on top of
the pooled output.
Params:
`config`: a BertConfig class instance with the configuration to build a new model.
`num_labels`: the number of classes for the classifier. Default = 2.
Inputs:
`input_ids`: a t... | 62598faa4c3428357761a231 |
class CardUser(caching.base.CachingMixin, models.Model): <NEW_LINE> <INDENT> classname = models.CharField(max_length=64, editable=False, null=True) <NEW_LINE> objects = caching.base.CachingManager() <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(CardUser, self).__init__(*args, **kwargs) <NEW_... | Class to get around the limitation that Card can't be ForeignKey'd
to either Deck or CardLibrary | 62598faa38b623060ffa900f |
class InlineQueryResultCachedGif(InlineQueryCachedResult): <NEW_LINE> <INDENT> def __init__(self, id, gif_file_id, title=None, caption=None, reply_markup=None, input_message_content=None): <NEW_LINE> <INDENT> super(InlineQueryResultCachedGif, self).__init__(id, "gif") <NEW_LINE> assert(id is not None) <NEW_LINE> assert... | Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation.
https://core.telegram.org/bots/api#inlinequ... | 62598faa4428ac0f6e65849b |
class Meta: <NEW_LINE> <INDENT> model = WorkDay <NEW_LINE> fields = ["id", "start", "end", "day", "employee"] | Meta. | 62598faa7c178a314d78d414 |
class RemoteExceptionMixin(object): <NEW_LINE> <INDENT> def __init__(self, module, clazz, message, trace): <NEW_LINE> <INDENT> self.module = module <NEW_LINE> self.clazz = clazz <NEW_LINE> self.message = message <NEW_LINE> self.trace = trace <NEW_LINE> self._str_msgs = message + "\n" + "\n".join(trace) <NEW_LINE> <DEDE... | Used for constructing dynamic exception type during deserialization of
remote exception. It defines unified '__init__' method signature and
exception message format | 62598faa442bda511e95c3ce |
class BasicParser(Parser2): <NEW_LINE> <INDENT> pass | A parser without the Pythonic features for converting builtin
functions and common methods. | 62598faa67a9b606de545f43 |
class BatchCorrelator(object): <NEW_LINE> <INDENT> def __init__(self, xs, zs, size): <NEW_LINE> <INDENT> self.size = int(size) <NEW_LINE> self.dtype = xs[0].dtype <NEW_LINE> self.num_vectors = len(xs) <NEW_LINE> self.x = Array([v.ptr for v in xs], dtype=numpy.int) <NEW_LINE> self.z = Array([v.ptr for v in zs], dtype=nu... | Create a batch correlation engine
| 62598faa99cbb53fe6830e4e |
class BrowseKodiVfsCommand(sublime_plugin.WindowCommand): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> self.nodes = [["video", "library://video"], ["music", "library://music"]] <NEW_LINE> self.window.show_quick_panel(items=self.nodes, on_select=self.on_done, selected_index=0) <NEW_LINE> <DEDENT> @utils.run_as... | Allows to browse the Kodi VFS via JSON-RPC | 62598faa7d847024c075c33b |
class RequestGameStart(object): <NEW_LINE> <INDENT> __slots__ = ( '_firstRequest', ) <NEW_LINE> @property <NEW_LINE> def firstRequest(self): <NEW_LINE> <INDENT> return self._firstRequest <NEW_LINE> <DEDENT> @firstRequest.setter <NEW_LINE> def firstRequest(self, value): <NEW_LINE> <INDENT> self._firstRequest = msgbuffer... | Generated message-passing message. | 62598faa435de62698e9bd6e |
class StackedPeriodogram(Periodogram): <NEW_LINE> <INDENT> def __init__(self, lc_list, bins=None, calc_error=True, **kwargs): <NEW_LINE> <INDENT> self.periodograms = [] <NEW_LINE> for lc in lc_list: <NEW_LINE> <INDENT> self.periodograms.append(Periodogram(lc, **kwargs)) <NEW_LINE> <DEDENT> self.bins = bins <NEW_LINE> f... | pylag.StackedPeriodogram(Periodogram)
calculate the average periodogram from multiple pairs of light curves
with some frequency binning.
The periodogram is calculated for each pair of light curves in turn, then
the data points are sorted into bins. The final periodogram in each bin
is the average over all of the indi... | 62598faa8c0ade5d55dc364d |
class InvalidConfigException(Exception): <NEW_LINE> <INDENT> def __init__(self, errinfo: str): <NEW_LINE> <INDENT> self.info = errinfo | invalid configure or some errors found. | 62598faa0a50d4780f705355 |
class AuthView(InsecureAPIView): <NEW_LINE> <INDENT> def get(self, request, format=None): <NEW_LINE> <INDENT> username = request.GET.get('username') <NEW_LINE> password = request.GET.get('password') <NEW_LINE> if not (username and password): <NEW_LINE> <INDENT> return Response(status=status.HTTP_401_UNAUTHORIZED) <NEW_... | Validate `username` and `password` using `user_authentication`
handler. | 62598faabe383301e0253771 |
class AnthemAVR(MediaPlayerDevice): <NEW_LINE> <INDENT> def __init__(self, avr, name): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.avr = avr <NEW_LINE> self._name = name <NEW_LINE> <DEDENT> def _lookup(self, propname, dval=None): <NEW_LINE> <INDENT> return getattr(self.avr.protocol, propname, dval) <NEW_LINE... | Entity reading values from Anthem AVR protocol. | 62598faa8a43f66fc4bf20f4 |
class ShippingEventQuantity(models.Model): <NEW_LINE> <INDENT> event = models.ForeignKey( 'order.ShippingEvent', related_name='line_quantities', verbose_name=_("Event")) <NEW_LINE> line = models.ForeignKey( 'order.Line', related_name="shipping_event_quantities", verbose_name=_("Line")) <NEW_LINE> quantity = models.Posi... | A "through" model linking lines to shipping events.
This exists to track the quantity of a line that is involved in a
particular shipping event. | 62598faa2c8b7c6e89bd373d |
class ItemStatusForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = ItemStatus <NEW_LINE> fields = ('name', 'active', 'hidden', 'details') | ItemStatus add/edit form | 62598faabd1bec0571e1507f |
class FileMatcher(object): <NEW_LINE> <INDENT> def __init__(self, line_matchers, min_progress, max_progress, filename): <NEW_LINE> <INDENT> if not 0.0 <= min_progress <= max_progress <= 1.0: <NEW_LINE> <INDENT> raise IndexError( '%s restriction is not mat: 0.0 <= min_progress' '(%s) <= max_progress(%s) <= 1.0' % ( self... | File matcher to get the installing progress from the log file. | 62598faa30bbd72246469934 |
class EvenniaTestSuiteRunner(DjangoTestSuiteRunner): <NEW_LINE> <INDENT> def build_suite(self, test_labels, extra_tests=None, **kwargs): <NEW_LINE> <INDENT> if not test_labels: <NEW_LINE> <INDENT> test_labels = [applabel.rsplit('.', 1)[1] for applabel in settings.INSTALLED_APPS if (applabel.startswith('src.') or applab... | This test runner only runs tests on the apps specified in src/ and game/ to
avoid running the large number of tests defined by Django | 62598faa63d6d428bbee2723 |
class OverridableTemplate(object): <NEW_LINE> <INDENT> @property <NEW_LINE> def template(self): <NEW_LINE> <INDENT> return self.index | Subclasses of this class must set the template they want to use
as the default template as the ``index`` attribute, not the
``template`` attribute that's normally used for forms.
Users of this package may override the template used by one of the
forms by using the ``browser`` directive and specifying their own
templat... | 62598faad268445f26639b3f |
class _DependencyNode(object): <NEW_LINE> <INDENT> def __init__( self, system: str, target_distribution: str, parent: typing.Optional[_DependencyNode], exec_obj_list: typing.List[ExecObject], ) -> None: <NEW_LINE> <INDENT> assert system <NEW_LINE> assert len(exec_obj_list) >= 1 <NEW_LINE> self.parent = parent <NEW_LINE... | Node of the dependency tree of all systems. | 62598faa167d2b6e312b6ee9 |
class VPGBuffer: <NEW_LINE> <INDENT> def __init__(self, obs_dim, act_dim, size, gamma=0.99, lam=0.95): <NEW_LINE> <INDENT> self.obs_buf = np.zeros(core.combined_shape(size, obs_dim), dtype=np.float32) <NEW_LINE> self.act_buf = np.zeros(core.combined_shape(size, act_dim), dtype=np.float32) <NEW_LINE> self.adv_buf = np.z... | A buffer for storing trajectories experienced by a VPG agent interacting
with the environment, and using Generalized Advantage Estimation (GAE-Lambda)
for calculating the advantages of state-action pairs. | 62598faa7d43ff24874273be |
class EabiCheck(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.flag = "FAIL" <NEW_LINE> self.tag = True <NEW_LINE> self.info = "" <NEW_LINE> <DEDENT> def checkEnv(self): <NEW_LINE> <INDENT> self.checkInstall() <NEW_LINE> if self.tag: <NEW_LINE> <INDENT> self.checkEabiVersion() <NEW_LINE> <DED... | check the requirement for arm-eabi-gcc compiler | 62598faabaa26c4b54d4f22a |
class SecretsManager(object): <NEW_LINE> <INDENT> barbican_driver = driver.BarbicanDriver() <NEW_LINE> def create(self, secret_doc): <NEW_LINE> <INDENT> encryption_type = secret_doc['metadata']['storagePolicy'] <NEW_LINE> secret_type = self._get_secret_type(secret_doc['schema']) <NEW_LINE> if encryption_type == ENCRYPT... | Internal API resource for interacting with Barbican.
Currently only supports Barbican. | 62598faa32920d7e50bc5fcd |
class ImageUri(AnyUri): <NEW_LINE> <INDENT> pass | A special kind of String that holds the uri of an image. | 62598faa627d3e7fe0e06e25 |
class BrowserWidget(QWidget): <NEW_LINE> <INDENT> def __init__(self, url, process=None, parent=None): <NEW_LINE> <INDENT> QWidget.__init__(self, parent) <NEW_LINE> self._process = process <NEW_LINE> vbox = QVBoxLayout(self) <NEW_LINE> self.webFrame = QWebView(self) <NEW_LINE> self.webFrame.setAcceptDrops(False) <NEW_LI... | openProject(QString)
openPreferences()
dontOpenStartPage() | 62598faa3cc13d1c6d4656e4 |
class Actor(): <NEW_LINE> <INDENT> def __init__(self, state_size, action_size, action_low, action_high): <NEW_LINE> <INDENT> self.state_size = state_size <NEW_LINE> self.action_size = action_size <NEW_LINE> self.action_low = action_low <NEW_LINE> self.action_high = action_high <NEW_LINE> self.action_range = self.action... | Actor policy model | 62598faa4a966d76dd5eee5a |
class AsyncJSONMessage(botornado.sqs.message._AsyncMessage, JSONMessage): <NEW_LINE> <INDENT> pass | Acts like a dictionary but encodes it's data as a Base64 encoded JSON payload. | 62598faa23849d37ff85102d |
class Config: <NEW_LINE> <INDENT> UPLOADED_PHOTOS_DEST = "app/static/photos" <NEW_LINE> SECRET_KEY = os.environ.get("SECRET_KEY") <NEW_LINE> SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://ryan:12345@localhost/pitch' <NEW_LINE> MAIL_SERVER = "smtp.gmail.com" <NEW_LINE> MAIL_PORT = 587 <NEW_LINE> MAIL_USE_TLS = True <N... | This is the parent class which will have the general configurations | 62598faa4c3428357761a233 |
class LoginForm(FlaskForm): <NEW_LINE> <INDENT> email = StringField('邮箱', description='邮箱用于登录', validators=[DataRequired(), Email()]) <NEW_LINE> password = PasswordField('密码', validators=[DataRequired()]) <NEW_LINE> remember_me = BooleanField('记住密码') <NEW_LINE> submit = SubmitField('登录') | 登录表单 | 62598faa38b623060ffa9011 |
class CityDataBase: <NEW_LINE> <INDENT> DOWNLOAD_URL = 'https://datanova.legroupe.laposte.fr/api/records/1.0/download' <NEW_LINE> _logger = _module_logger.getChild('FrenchZipCodeDataBase') <NEW_LINE> def __init__(self, json_path=None): <NEW_LINE> <INDENT> if json_path: <NEW_LINE> <INDENT> json_data = self._load_json(js... | Class for the French City Database. | 62598faa8da39b475be0315d |
class glancesGrabHDDTemp: <NEW_LINE> <INDENT> cache = "" <NEW_LINE> address = "127.0.0.1" <NEW_LINE> port = 7634 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) <NEW_LINE> sck.connect((self.address, self.port)) <NEW_LINE> sck.close() <N... | Get hddtemp stats using a socket connection | 62598faa63b5f9789fe850de |
class PermuteLayer(caffe.Layer): <NEW_LINE> <INDENT> def setup(self, bottom, top): <NEW_LINE> <INDENT> self.top_names = ['top'] <NEW_LINE> params = eval(self.param_str) <NEW_LINE> self.permuteIndex = np.asarray(params['permuteIndex']) <NEW_LINE> self.bottomShape = bottom[0].data.shape <NEW_LINE> if len(self.permuteInde... | classdocs | 62598faa1f5feb6acb162b99 |
class ServiceForm(forms.ModelForm): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(ServiceForm, self).__init__(*args, **kwargs) <NEW_LINE> self.helper = FormHelper() <NEW_LINE> self.helper.form_id = 'service-form' <NEW_LINE> self.helper.form_class = 'form-horizontal' <NEW_LINE> self.... | Add/Edit service form | 62598faae5267d203ee6b883 |
class TeacherViewset(viewsets.GenericViewSet, mixins.CreateModelMixin, mixins.ListModelMixin, mixins.UpdateModelMixin, mixins.DestroyModelMixin, mixins.RetrieveModelMixin): <NEW_LINE> <INDENT> serializer_class = TeacherSerializer <NEW_LINE> pagination_class = P1 <NEW_LINE> queryset = Teacher.objects.all() <NEW_LINE> fi... | 指导老师逻辑 | 62598faa442bda511e95c3d0 |
class FgmsHandler: <NEW_LINE> <INDENT> def __init__(self, aircraft): <NEW_LINE> <INDENT> self.aircraft = aircraft <NEW_LINE> self.start() <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.socket = socket(AF_INET, SOCK_DGRAM) <NEW_LINE> self.socket.setsockopt(SOL_SOCKET, SO_REUSEADDR... | Creates sockets and starts the fgms connection for each aircraft. | 62598faaac7a0e7691f72483 |
class Comment(models.Model): <NEW_LINE> <INDENT> text = models.CharField(max_length=100) <NEW_LINE> track = models.ForeignKey(Track, related_name="comments") | Represent comment to any track measure.
| 62598faa2ae34c7f260ab05b |
class SSHClient(object): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> for k, v in kwargs.items(): <NEW_LINE> <INDENT> setattr(self, k, v) <NEW_LINE> <DEDENT> <DEDENT> def run(self, cmd): <NEW_LINE> <INDENT> t = paramiko.SSHClient() <NEW_LINE> t.set_missing_host_key_policy(paramiko.AutoAddPolicy... | SSH warapper around the paramiko library that can run commands and return the results in string. | 62598faae5267d203ee6b884 |
class OsPlugin(UserAgentPlugin): <NEW_LINE> <INDENT> slug = 'os' <NEW_LINE> title = _('Operating Systems') <NEW_LINE> tag = 'os' <NEW_LINE> tag_label = _('Operating System') <NEW_LINE> def get_tag_from_ua(self, ua): <NEW_LINE> <INDENT> if 'flavor' in ua: <NEW_LINE> <INDENT> tag = ua['flavor']['name'] <NEW_LINE> if 'ver... | Adds additional support for showing information about operating systems including:
* A panel which shows all operating systems a message was seen on.
* A sidebar module which shows the operating systems most actively seen on. | 62598faa435de62698e9bd6f |
class ExportReadGroupSetRequest(_messages.Message): <NEW_LINE> <INDENT> exportUri = _messages.StringField(1) <NEW_LINE> projectId = _messages.StringField(2) <NEW_LINE> referenceNames = _messages.StringField(3, repeated=True) | The read group set export request.
Fields:
exportUri: Required. A Google Cloud Storage URI for the exported BAM file.
The currently authenticated user must have write access to the new file.
An error will be returned if the URI already contains data.
projectId: Required. The Google Developers Console proje... | 62598faa796e427e5384e70d |
class IReader(Reader): <NEW_LINE> <INDENT> SECTION = re.compile(r'(\[)([^]]+)(])') <NEW_LINE> PROPERTY = re.compile(r'(:|=)') <NEW_LINE> def __init__(self, fp): <NEW_LINE> <INDENT> self.fp = fp <NEW_LINE> <DEDENT> def __call__(self): <NEW_LINE> <INDENT> d = {} <NEW_LINE> fp = self.fp <NEW_LINE> section = None <NEW_LINE... | INI Reader | 62598faa99cbb53fe6830e51 |
class LuigiTests(unittest.TestCase): <NEW_LINE> <INDENT> def test_mwa_fornax_pg(self): <NEW_LINE> <INDENT> self._test_graph('mwa_fornax_pg') <NEW_LINE> <DEDENT> def test_testGraphLuigiDriven(self): <NEW_LINE> <INDENT> self._test_graph('testGraphLuigiDriven') <NEW_LINE> <DEDENT> def test_chiles_pg(self): <NEW_LINE> <IND... | A class with one testing method for each of the graphs created by the
graphsRepository module. Although I could have written a single method that
executes automatically all graphs contained in the graphsRepository module
I preferred to have explicit separated methods for each graph to be able to
pinpoint failures more ... | 62598faabe383301e0253773 |
class UploadPinForm(Form): <NEW_LINE> <INDENT> file = forms.ImageField(required=True) | Pin resource upload form. | 62598faa4e4d56256637239f |
class AndroidPackager(DistTarball): <NEW_LINE> <INDENT> def __init__(self, config, package, store): <NEW_LINE> <INDENT> DistTarball.__init__(self, config, package, store) <NEW_LINE> <DEDENT> def files_list(self, package_type, force): <NEW_LINE> <INDENT> if self.config.target_arch != Architecture.UNIVERSAL: <NEW_LINE> <... | Creates a distribution tarball for Android | 62598faa45492302aabfc44b |
class TestNonlin(object): <NEW_LINE> <INDENT> def _check_nonlin_func(self, f, func, f_tol=1e-2): <NEW_LINE> <INDENT> x = func(f, f.xin, f_tol=f_tol, maxiter=200, verbose=0) <NEW_LINE> assert_(np.absolute(f(x)).max() < f_tol) <NEW_LINE> <DEDENT> def _check_root(self, f, method, f_tol=1e-2): <NEW_LINE> <INDENT> res = roo... | Check the Broyden methods for a few test problems.
broyden1, broyden2, and newton_krylov must succeed for
all functions. Some of the others don't -- tests in KNOWN_BAD are skipped. | 62598faa63d6d428bbee2725 |
class TestCheck(Check): <NEW_LINE> <INDENT> __test__ = True <NEW_LINE> @property <NEW_LINE> def this_check(self): <NEW_LINE> <INDENT> return chk <NEW_LINE> <DEDENT> def setUp(self): <NEW_LINE> <INDENT> self.l = [['colour', 'color']] <NEW_LINE> self.err = 'error message' <NEW_LINE> self.msg = 'inconsistent form of {} vs... | The test class for tools.consistency_check. | 62598faa71ff763f4b5e76e8 |
class Dict(dict): <NEW_LINE> <INDENT> def __init__(self, names=(), values=(), **kw): <NEW_LINE> <INDENT> super(Dict, self).__init__(**kw) <NEW_LINE> for k, v in zip(names, values): <NEW_LINE> <INDENT> self[k] = v <NEW_LINE> <DEDENT> <DEDENT> def __getattr__(self, item): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> retu... | Simple dict but support access as x.y style. | 62598faa30dc7b766599f7c7 |
class FinderContextManager: <NEW_LINE> <INDENT> extensions = tuple() <NEW_LINE> _position = 0 <NEW_LINE> finder = FileFinder <NEW_LINE> @property <NEW_LINE> def loader(self): <NEW_LINE> <INDENT> return type(self) <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> id, details = get_loader_details() <NEW_LINE> ... | FinderContextManager is the base class for the notebook loader. It provides
a context manager that replaces `FileFinder` in the `sys.path_hooks` to include
an instance of the class in the python findering system.
>>> with FinderContextManager() as f:
... id, ((loader_cls, _), *_) = get_loader_details()
... ... | 62598faa32920d7e50bc5fcf |
class AggregateAddressCfg(A10BaseClass): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.ERROR_MSG = "" <NEW_LINE> self.b_key = "aggregate-address-cfg" <NEW_LINE> self.DeviceProxy = "" <NEW_LINE> self.aggregate_address = "" <NEW_LINE> for keys, value in kwargs.items(): <NEW_LINE> <INDENT> set... | This class does not support CRUD Operations please use parent.
:param aggregate_address: {"type": "string", "description": "Set aggregate RIP route announcement (Aggregate network)", "format": "ipv6-address-plen"}
:param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_pr... | 62598faa8da39b475be0315f |
class CustomLayerFromClusterableLayerNoWeights(layers.Reshape): <NEW_LINE> <INDENT> pass | A custom layer class that does not have any weights.
Derived from a built-in clusterable layer. | 62598faaeab8aa0e5d30bd06 |
class DebComponent(ContentUnit): <NEW_LINE> <INDENT> TYPE_ID = 'deb_component' <NEW_LINE> UNIT_KEY_DEB_COMPONENT = ('name', 'distribution', 'repoid') <NEW_LINE> meta = { 'collection': "units_deb_component", 'indexes': list(UNIT_KEY_DEB_COMPONENT), } <NEW_LINE> unit_key_fields = UNIT_KEY_DEB_COMPONENT <NEW_LINE> name = ... | This unittype represents a deb release/distribution component. | 62598faa5fc7496912d48240 |
class CPUContainerMetric(ContainerMetric): <NEW_LINE> <INDENT> pass | stores values from the container cgroup | 62598faa1f5feb6acb162b9b |
class RPng(RPackage): <NEW_LINE> <INDENT> homepage = "http://www.rforge.net/png/" <NEW_LINE> url = "https://cran.r-project.org/src/contrib/png_0.1-7.tar.gz" <NEW_LINE> list_url = "https://cran.r-project.org/src/contrib/Archive/png" <NEW_LINE> version('0.1-7', '1ebc8b8aa5979b12c5ec2384b30d649f') <NEW_LINE> depends_... | This package provides an easy and simple way to read, write and display
bitmap images stored in the PNG format. It can read and write both files
and in-memory raw vectors. | 62598faa99cbb53fe6830e52 |
class StopwordCountTransformer(TransformerMixin): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.language = kwargs['language'] <NEW_LINE> <DEDENT> def fit(self, X, y=None): <NEW_LINE> <INDENT> self.stop_words_ = set(stopwords.words(self.language)) <NEW_LINE> return self <NEW_LINE> <DEDENT> d... | Class used to transform a text feature into the count of stopwords
present in the text | 62598faa4f6381625f19947c |
class Elf(Being): <NEW_LINE> <INDENT> _elf_count = 0 <NEW_LINE> _vitality = 5 <NEW_LINE> _dexterity = 6 <NEW_LINE> _agility = 4 <NEW_LINE> def __init__(self, name, home): <NEW_LINE> <INDENT> super().__init__(name, home) <NEW_LINE> Elf._elf_count += 1 | Being subclass for creating player characters. Is highly skilled. | 62598faa009cb60464d0149b |
class ForeignKey(BaseType): <NEW_LINE> <INDENT> def stringify(self, value): <NEW_LINE> <INDENT> return str(self.validate(data=value)) <NEW_LINE> <DEDENT> def destringify(self, value): <NEW_LINE> <INDENT> return self.validate(data=value) <NEW_LINE> <DEDENT> def validate(self, data): <NEW_LINE> <INDENT> model_code = self... | 外键类型 | 62598faa8e7ae83300ee901d |
class Facebook(OAuth2): <NEW_LINE> <INDENT> user_authorization_url = 'https://www.facebook.com/dialog/oauth' <NEW_LINE> access_token_url = 'https://graph.facebook.com/oauth/access_token' <NEW_LINE> user_info_url = 'https://graph.facebook.com/me' <NEW_LINE> user_info_scope = ['user_about_me', 'email'] <NEW_LINE> same_or... | Facebook |oauth2| provider.
* Dashboard: https://developers.facebook.com/apps
* Docs: http://developers.facebook.com/docs/howtos/login/server-side-login/
* API reference: http://developers.facebook.com/docs/reference/api/
* API explorer: http://developers.facebook.com/tools/explorer | 62598faa8e7ae83300ee901e |
class BackupUsageSummariesOperations(object): <NEW_LINE> <INDENT> 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.api_version = "2016-12-01" <NEW_LINE> self.config ... | BackupUsageSummariesOperations operations.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An objec model deserializer.
:ivar api_version: Client Api Version. Constant value: "2016-12-01". | 62598faa6e29344779b005d8 |
class Hand(pygame.sprite.Sprite): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pygame.sprite.Sprite.__init__(self) <NEW_LINE> self.image, self.rect = load_image('Hand.png', 'Mouse') <NEW_LINE> self.image.set_colorkey((255,242,0)) <NEW_LINE> self.punching = 0 <NEW_LINE> <DEDENT> def update(self): <NEW_LIN... | moves a hand on the screen, following the mouse | 62598faa4e4d5625663723a1 |
class FakeTime(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._current_time = 1e9 <NEW_LINE> self._delta = 0.001 <NEW_LINE> <DEDENT> def __call__(self): <NEW_LINE> <INDENT> self._current_time = self._current_time + self._delta <NEW_LINE> return self._current_time <NEW_LINE> <DEDENT> def set_e... | "Allow to mock time.time for tests
`time.time` returns a defined `current_time` instead.
Any `time.time` call also increase the `current_time` of `delta` seconds. | 62598faadd821e528d6d8eb1 |
class Command: <NEW_LINE> <INDENT> __slots__ = ('cmd', 'cwd', 'env', 'shell') <NEW_LINE> def __init__(self, cmd, *, cwd, env=None, shell=False): <NEW_LINE> <INDENT> self.cmd = cmd <NEW_LINE> self.cwd = cwd <NEW_LINE> self.env = env <NEW_LINE> self.shell = shell <NEW_LINE> <DEDENT> def to_string(self): <NEW_LINE> <INDEN... | An event containing an invoked command. | 62598faa01c39578d7f12cfb |
class PacketPort: <NEW_LINE> <INDENT> def __init__(self, device, baud=3000000): <NEW_LINE> <INDENT> self.serial = serial.Serial(device, baud, timeout=2) <NEW_LINE> self._rxBuffer = [] <NEW_LINE> self._escBuffer = '' <NEW_LINE> <DEDENT> def _escape(self, data): <NEW_LINE> <INDENT> return data.replace('}', '}]').replace(... | Low-level serial port with packet framing semantics.
This implements a 'byte stuffing' framing mechanism,
based on RFC1622.
This isn't actually as complicated as it looks..
A lot of the string processing acrobatics here are
so we can properly unescape received packets without
any slow character-by-character loops in P... | 62598faa30bbd72246469936 |
class SwiftStorageSaveChecksumTests(trove_testtools.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(SwiftStorageSaveChecksumTests, self).setUp() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> super(SwiftStorageSaveChecksumTests, self).tearDown() <NEW_LINE> <DEDENT> def test_swift_... | SwiftStorage.save is used to save a backup to Swift. | 62598faa63d6d428bbee2727 |
class Downloader(_Downloader): <NEW_LINE> <INDENT> ok = True <NEW_LINE> def __init__(self, cache=None, account_accessor=None, logger=None, working_dir='', callback=None): <NEW_LINE> <INDENT> from rowgenerators import get_cache <NEW_LINE> super().__init__(cache or get_cache('metapack'), account_accessor, logger, working... | "Local version of the downloader. Also should be used as the source of the cache | 62598faa2c8b7c6e89bd3742 |
@resources.register('emr-security-configuration') <NEW_LINE> class EMRSecurityConfiguration(QueryResourceManager): <NEW_LINE> <INDENT> class resource_type(TypeInfo): <NEW_LINE> <INDENT> service = 'emr' <NEW_LINE> arn_type = 'emr' <NEW_LINE> permission_prefix = 'elasticmapreduce' <NEW_LINE> enum_spec = ('list_security_c... | Resource manager for EMR Security Configuration
| 62598faaa8370b77170f0357 |
@implementer(IDictionaryInheritance) <NEW_LINE> class InheritingDictionary(Inheritance, dict): <NEW_LINE> <INDENT> def __setitem__(self, name, value): <NEW_LINE> <INDENT> if ILocaleInheritance.providedBy(value): <NEW_LINE> <INDENT> value.__parent__ = self <NEW_LINE> value.__name__ = name <NEW_LINE> <DEDENT> super(Inher... | Implementation of a dictionary that can also inherit values.
Example::
>>> from zope.i18n.locales.tests.test_docstrings import \
... LocaleInheritanceStub
>>> root = LocaleInheritanceStub()
>>> root.data = InheritingDictionary({1: 'one', 2: 'two', 3: 'three'})
>>> root.data2 = AttributeInheritance()
... | 62598faaa8370b77170f0358 |
class Document(File): <NEW_LINE> <INDENT> document = models.FileField(upload_to='docs') | Other file types. | 62598faa3cc13d1c6d4656e8 |
class Review(BaseModel): <NEW_LINE> <INDENT> place_id = "" <NEW_LINE> user_id = "" <NEW_LINE> text = "" <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) | Review's class | 62598faa92d797404e388b23 |
class Solution: <NEW_LINE> <INDENT> def isUnique(self, str): <NEW_LINE> <INDENT> dict ={} <NEW_LINE> for i in str: <NEW_LINE> <INDENT> if i in dict: <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> dict[i]=1 <NEW_LINE> <DEDENT> <DEDENT> return True | @param: str: A string
@return: a boolean | 62598faa4e4d5625663723a2 |
class InfoRefsContainer(RefsContainer): <NEW_LINE> <INDENT> def __init__(self, f): <NEW_LINE> <INDENT> self._refs = {} <NEW_LINE> self._peeled = {} <NEW_LINE> for l in f.readlines(): <NEW_LINE> <INDENT> sha, name = l.rstrip("\n").split("\t") <NEW_LINE> if name.endswith("^{}"): <NEW_LINE> <INDENT> name = name[:-3] <NEW_... | Refs container that reads refs from a info/refs file. | 62598faa9c8ee8231304012f |
class DrsObject: <NEW_LINE> <INDENT> def __init__( self, id: str, size: int, created: str, checksums: Iterable[Checksum], access_methods: Iterable[AccessMethod], name: str = '', updated: str = '', version: str = '', mime_type: str = '', description: str = '', aliases: Iterable[str] = [], ) -> None: <NEW_LINE> <INDENT> ... | Schema describing DRS object metadata and access methods. | 62598faae76e3b2f99fd89b3 |
class Policy: <NEW_LINE> <INDENT> def select_action(self, values): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def __call__(self, values): <NEW_LINE> <INDENT> return self.select_action(values) | Decides which action to take. | 62598faa8da39b475be03161 |
class TransitionProbabilitiesProperty( ProcessingPlasmaProperty, metaclass=ABCMeta ): <NEW_LINE> <INDENT> @abstractproperty <NEW_LINE> def transition_probabilities_outputs(self): <NEW_LINE> <INDENT> pass | Used for plasma properties that have unnormalized transition
probabilities as one of their outputs. This makes it possible to easily
track all transition probabilities and to later combine them. | 62598faaaad79263cf42e751 |
class DepartmentViewSet(ViewSet): <NEW_LINE> <INDENT> queryset = Department.objects.all() <NEW_LINE> fields = ('id', 'name', 'description', 'members', 'organization') <NEW_LINE> def create(self, request): <NEW_LINE> <INDENT> data = request.data <NEW_LINE> serializer = DepartmentSerializer(data=data) <NEW_LINE> if seria... | Department viewset class. | 62598faa99fddb7c1ca62da7 |
class Authenticator: <NEW_LINE> <INDENT> def __init__(self, keyfile=None): <NEW_LINE> <INDENT> self.passwords = {} <NEW_LINE> if keyfile is not None: <NEW_LINE> <INDENT> for line in open(keyfile): <NEW_LINE> <INDENT> if '#' in line: <NEW_LINE> <INDENT> line = line[:line.index("#")] <NEW_LINE> <DEDENT> line = line.strip... | MAC authentication manager for NTP packets. | 62598faacb5e8a47e493c137 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.