code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class DatasetCreate(BaseModel): <NEW_LINE> <INDENT> id: str <NEW_LINE> name: str <NEW_LINE> type: str <NEW_LINE> created_at: Optional[str] <NEW_LINE> description: Optional[str]
Fields information needed for POST
62598fc0a219f33f346c6a38
class MnistNet(nn.Module): <NEW_LINE> <INDENT> def __init__(self, pretrained=False): <NEW_LINE> <INDENT> super(MnistNet, self).__init__() <NEW_LINE> self.conv1 = nn.Conv2d(1, 20, 5, 1) <NEW_LINE> self.conv2 = nn.Conv2d(20, 50, 5, 1) <NEW_LINE> self.fc1 = nn.Linear(4 * 4 * 50, 500) <NEW_LINE> self.fc2 = nn.Linear(500, 1...
Small network designed for Mnist debugging
62598fc056ac1b37e630241e
class SeleniumTestCase(BasicTestCase): <NEW_LINE> <INDENT> driver = None <NEW_LINE> utils = None <NEW_LINE> @classmethod <NEW_LINE> def tearDownClass(cls): <NEW_LINE> <INDENT> super(SeleniumTestCase, cls).tearDownClass() <NEW_LINE> DriverWrappersPool.close_drivers_and_download_videos(cls.get_subclass_name()) <NEW_LINE>...
A class whose instances are Selenium test cases. Attributes: driver: webdriver instance utils: test utils instance :type driver: selenium.webdriver.remote.webdriver.WebDriver :type utils: toolium.utils.Utils
62598fc0a05bb46b3848aa9d
class PicsTable(BaseDataBase): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__('pic') <NEW_LINE> <DEDENT> def has_url(self, pic_url: str) -> bool: <NEW_LINE> <INDENT> row = self.session.query(self.table_name).filter(self.table_name.pic_url == pic_url).first() <NEW_LINE> result = True if row...
图片信息的一些方法
62598fc066656f66f7d5a624
class UtteranceTarget: <NEW_LINE> <INDENT> action_id: int <NEW_LINE> def __init__(self, action_id): <NEW_LINE> <INDENT> self.action_id = action_id
the DTO-like class storing the training target of a single utterance of a dialog (to feed the GO-bot policy model)
62598fc03346ee7daa337761
class NSNitroNserrHostdown(NSNitroBaseErrors): <NEW_LINE> <INDENT> pass
Nitro error code 320 Host is down
62598fc04527f215b58ea100
class EntryKey(object): <NEW_LINE> <INDENT> def __init__(self, confkey, year, auth=None, dis=""): <NEW_LINE> <INDENT> self.confkey = confkey <NEW_LINE> self.auth = auth <NEW_LINE> self.year = int(year) % 100 <NEW_LINE> self.dis = dis <NEW_LINE> <DEDENT> _str_regexp = re.compile("^([a-zA-Z]+)(?::([a-zA-Z-_']+))?(\d+)(.*...
Model an entry key in our bibliographies
62598fc0a8370b77170f0613
class NoType(object): <NEW_LINE> <INDENT> pass
Superclass for ``StrType`` and ``NumType`` classes. This class is the default type of ``Column`` and provides a base class for other data types.
62598fc0aad79263cf42ea07
class RequestCancelledError(StorageProtocolError): <NEW_LINE> <INDENT> pass
The request was cancelled.
62598fc055399d3f05626748
class File(Resource): <NEW_LINE> <INDENT> def __init__(self, name, content=None, **kwargs): <NEW_LINE> <INDENT> super(File, self).__init__('file', name, **kwargs) <NEW_LINE> self.content = content <NEW_LINE> <DEDENT> def dumps(self, inline=False): <NEW_LINE> <INDENT> if inline: <NEW_LINE> <INDENT> if self.content is no...
Special Chef file or cookbook_file resource.
62598fc071ff763f4b5e79ae
class CalendarBase(object): <NEW_LINE> <INDENT> parser = NotImplemented <NEW_LINE> def __init__(self, source): <NEW_LINE> <INDENT> self.source = source <NEW_LINE> <DEDENT> def get_date(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> date_obj, period = self.parser.parse(self.source, settings) <NEW_LINE> return {'dat...
Base setup class for non-Gregorian calendar system. :param source: Date string passed to calendar parser. :type source: str|unicode
62598fc04c3428357761a4ef
class ContainerPropertiesInstanceView(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'restart_count': {'readonly': True}, 'current_state': {'readonly': True}, 'previous_state': {'readonly': True}, 'events': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'restart_count': {'key': 'restartCount', 't...
The instance view of the container instance. Only valid in response. Variables are only populated by the server, and will be ignored when sending a request. :ivar restart_count: The number of times that the container instance has been restarted. :vartype restart_count: int :ivar current_state: Current container insta...
62598fc04f6381625f1995db
class BashConfigParser(EnvironmentConfiguration): <NEW_LINE> <INDENT> COMMENT_LINE_SIGN = '#' <NEW_LINE> KEY_FIELD = 'key' <NEW_LINE> VALUE_FIELD = 'value' <NEW_LINE> def __init__(self, config_file=None): <NEW_LINE> <INDENT> EnvironmentConfiguration.__init__(self) <NEW_LINE> self.__config_basepath = os.curdir <NEW_LINE...
Implementation of commons.config_extension_if.Configuration that parses bash-style scripts that contain definitions of shell/environment variables
62598fc0a219f33f346c6a3a
class BrokenTrafficLightMachine(StateMachine): <NEW_LINE> <INDENT> green = State('Green', initial=True) <NEW_LINE> yellow = State('Yellow') <NEW_LINE> blue = State('Blue') <NEW_LINE> cycle = green.to(yellow) | yellow.to(green)
A broken traffic light machine
62598fc05fcc89381b266266
class TeradataTableDataset(Dataset): <NEW_LINE> <INDENT> _validation = { 'type': {'required': True}, 'linked_service_name': {'required': True}, } <NEW_LINE> _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, 'type': {'key': 'type', 'type': 'str'}, 'description': {'key': 'description', 'type': ...
The Teradata database dataset. All required parameters must be populated in order to send to Azure. :param additional_properties: Unmatched properties from the message are deserialized to this collection. :type additional_properties: dict[str, object] :param type: Required. Type of dataset.Constant filled by server....
62598fc056ac1b37e6302420
class CancelOrStopIntentHandler(AbstractRequestHandler): <NEW_LINE> <INDENT> def can_handle(self, handler_input): <NEW_LINE> <INDENT> return (is_intent_name("AMAZON.CancelIntent")(handler_input) or is_intent_name("AMAZON.StopIntent")(handler_input)) <NEW_LINE> <DEDENT> def handle(self, handler_input): <NEW_LINE> <INDEN...
Single handler for Cancel and Stop Intent.
62598fc0851cf427c66b84e9
class EncryptionAdapter(Adapter): <NEW_LINE> <INDENT> def _encode(self, obj, context): <NEW_LINE> <INDENT> return Utils.encrypt(json.dumps(obj).encode('utf-8') + b'\x00', context['_']['token']) <NEW_LINE> <DEDENT> def _decode(self, obj, context): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> decrypted = Utils.decrypt(ob...
Adapter to handle communication encryption.
62598fc04f88993c371f0623
class VUserGroup(db.Model): <NEW_LINE> <INDENT> name = db.StringProperty()
Описание группы пользователей
62598fc07cff6e4e811b5c57
class CardNotInHandException(RegnancyException): <NEW_LINE> <INDENT> pass
The card can not be accessed, due it is not in the hand of the player
62598fc0dc8b845886d537ee
class PostgresqlSession(Session): <NEW_LINE> <INDENT> pickle_protocol = pickle.HIGHEST_PROTOCOL <NEW_LINE> def __init__(self, id=None, **kwargs): <NEW_LINE> <INDENT> Session.__init__(self, id, **kwargs) <NEW_LINE> self.cursor = self.db.cursor() <NEW_LINE> <DEDENT> def setup(cls, **kwargs): <NEW_LINE> <INDENT> for k, v ...
Implementation of the PostgreSQL backend for sessions. It assumes a table like this:: create table session ( id varchar(40), data text, expiration_time timestamp ) You must provide your own get_db function.
62598fc023849d37ff8512e7
class WavelengthExplicitFile(ExplicitFile): <NEW_LINE> <INDENT> def get_explicit_axis(self): <NEW_LINE> <INDENT> return self._spectral_indices <NEW_LINE> <DEDENT> def get_secondary_axis(self): <NEW_LINE> <INDENT> return self.observations() <NEW_LINE> <DEDENT> def get_data_row(self, index): <NEW_LINE> <INDENT> return []...
Represents a wavelength explicit file
62598fc097e22403b383b13c
class TestNcase0: <NEW_LINE> <INDENT> def test_ncase1(self): <NEW_LINE> <INDENT> assert ncase0(0, 100, 4, 5, 6, 7) == 4 <NEW_LINE> <DEDENT> def test_ncase2(self): <NEW_LINE> <INDENT> assert ncase0(2, 100, 4, 5, 6, 7) == 6 <NEW_LINE> <DEDENT> def test_ncase3(self): <NEW_LINE> <INDENT> assert ncase0(9, 100, 4, 5, 6, 7) =...
Выбор по индексу от нуля
62598fc07d847024c075c5f0
class SMSResponse(object): <NEW_LINE> <INDENT> def __init__(self, sms, id, error_code, error_message, success): <NEW_LINE> <INDENT> self.sms = sms <NEW_LINE> self.id = id <NEW_LINE> self.error_code = error_code <NEW_LINE> self.error_message = error_message <NEW_LINE> self.success = success
An wrapper around an SMS reponse
62598fc050812a4eaa620d03
class TestSeekInfo(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 make_instance(self, include_optional): <NEW_LINE> <INDENT> if include_optional : <NEW_LINE> <INDENT> return SeekInfo( count = 56, ...
SeekInfo unit test stubs
62598fc05fc7496912d48395
class FreteBase(BaseModel): <NEW_LINE> <INDENT> nome: str = Field(..., description="Nome do frete.", example="Entrega Ninja") <NEW_LINE> valor_frete: float = Field(..., description="Valor final do frete.", example=12.00) <NEW_LINE> prazo_dias: int = Field(..., description="Prazo final do frete.", example=6)
Modelo base para resposta de frete
62598fc00fa83653e46f5119
class DefaultTransfer(Transfer): <NEW_LINE> <INDENT> def _initialize_transfer(self, in_vec, out_vec): <NEW_LINE> <INDENT> in_inds = self._in_inds <NEW_LINE> out_inds = self._out_inds <NEW_LINE> outs = {} <NEW_LINE> ins = {} <NEW_LINE> for key in in_inds: <NEW_LINE> <INDENT> if len(in_inds[key]) > 0: <NEW_LINE> <INDENT>...
Default NumPy transfer.
62598fc071ff763f4b5e79b0
class Gateway (models.Model): <NEW_LINE> <INDENT> lat = models.FloatField(max_length = 25, null = False) <NEW_LINE> lng = models.FloatField(max_length = 25, null = False) <NEW_LINE> gateway_id = models.IntegerField(null = False) <NEW_LINE> description = models.CharField(max_length = 250, null = True)
A gateway is a connection between a DRT subnet and the rail or BRT network. Basically it is a rail or BRT station. lat : latitute of the gateway lng : longitude of the gateway gateway_id : unidque identifier of the gateway description : (optional) description of the gatway (e.g., Midtown Marta Station)
62598fc0bf627c535bcb16db
class Timer(object): <NEW_LINE> <INDENT> def __init__(self, max_number_seconds): <NEW_LINE> <INDENT> self._start_time = None <NEW_LINE> self.timeout_seconds = max_number_seconds <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <INDENT> self._start_time = time.time() <NEW_LINE> <DEDENT> def stop(self): <NEW_LINE> <INDENT...
A generic timer. Implementation of the DICOM Upper Layer's ARTIM timer as per PS3.8 Section 9.1.5. The ARTIM timer is used by the state machine to monitor connection and response timeouts. This class may also be used as a general purpose expiry timer.
62598fc0656771135c4898a4
class TestAuthenticationRequest(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 testAuthenticationRequest(self): <NEW_LINE> <INDENT> model = swagger_client.models.authentication_request.Authenticat...
AuthenticationRequest unit test stubs
62598fc0ad47b63b2c5a7a8a
class Feed(Point): <NEW_LINE> <INDENT> _type = R_FEED <NEW_LINE> def get_template(self): <NEW_LINE> <INDENT> return self._client._get_point_data_handler_for(self).get_template() <NEW_LINE> <DEDENT> def share(self, data, mime=None, time=None): <NEW_LINE> <INDENT> evt = self.share_async(data, mime=mime, time=time) <NEW_L...
`Feeds` are advertised when a Thing has data to share. They are for out-going data which will get shared with any remote Things that have followed them. Feeds are one-to-many.
62598fc05166f23b2e243615
class WeatherView(View): <NEW_LINE> <INDENT> def dispatch_request(self): <NEW_LINE> <INDENT> api_key = app.config['OWM_API_KEY'] <NEW_LINE> city_id = app.config['OWM_CITY_ID'] <NEW_LINE> cache_file = app.config['OWM_CACHE_FILE'] <NEW_LINE> weather_data = get_owm_weather(api_key, city_id, cache_file) <NEW_LINE> app.logg...
View class for openweathermap data.
62598fc07d43ff248742751f
class PoolHistory(View): <NEW_LINE> <INDENT> def render(self): <NEW_LINE> <INDENT> user = User.by_id(self.session, int(self.request.matchdict['user_id'])) <NEW_LINE> if self.user.has_no_role: <NEW_LINE> <INDENT> if user.id != self.user.id: <NEW_LINE> <INDENT> return HTTPFound(location=route_url('list_request', self.req...
Display pool history balance changes for given user
62598fc04f88993c371f0624
class BaseViewlet(grok.Viewlet): <NEW_LINE> <INDENT> grok.baseclass() <NEW_LINE> grok.context(IItem) <NEW_LINE> grok.layer(ISantaTemplatesLayer) <NEW_LINE> grok.require('zope2.View') <NEW_LINE> grok.viewletmanager(SantaTopViewletManager)
Base Viewlet Class.
62598fc0a8370b77170f0616
class CMSPageListResponse(object): <NEW_LINE> <INDENT> def __init__(self, data=None, pagination=None): <NEW_LINE> <INDENT> self.swagger_types = { 'data': 'list[CMSPage]', 'pagination': 'Pagination' } <NEW_LINE> self.attribute_map = { 'data': 'data', 'pagination': 'pagination' } <NEW_LINE> self._data = data <NEW_LINE> s...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fc07cff6e4e811b5c59
class ProjectAPI(APIBase): <NEW_LINE> <INDENT> __class__ = Project <NEW_LINE> reserved_keys = set(['id', 'created', 'updated', 'completed', 'contacted']) <NEW_LINE> def _create_instance_from_request(self, data): <NEW_LINE> <INDENT> inst = super(ProjectAPI, self)._create_instance_from_request(data) <NEW_LINE> default_ca...
Class for the domain object Project. It refreshes automatically the cache, and updates the project properly.
62598fc09f28863672818996
class TLBControlCheck(scan.ScannerCheck): <NEW_LINE> <INDENT> def __init__(self, address_space, **kwargs): <NEW_LINE> <INDENT> scan.ScannerCheck.__init__(self, address_space) <NEW_LINE> <DEDENT> def check(self, offset): <NEW_LINE> <INDENT> field_offset, field_size = vmcb_offsets.control_area["TLB_CONTROL"] <NEW_LINE> t...
TLB_CONTROL bits must be: 0x00: Do Nothing 0x01: Flush all TLB Entries 0x03: Flush this guest's TLB entries 0x07: Flush this guest's non-global TLB entries. All other values are reserved.
62598fc092d797404e388c7d
class TrainModel(object): <NEW_LINE> <INDENT> def __init__(self, data, labels, emb_keep, rnn_keep): <NEW_LINE> <INDENT> self.data = data <NEW_LINE> self.labels = labels <NEW_LINE> self.emb_keep = emb_keep <NEW_LINE> self.rnn_keep = rnn_keep <NEW_LINE> self.global_step <NEW_LINE> self.cell <NEW_LINE> self.predict <NEW_L...
训练模型
62598fc0fff4ab517ebcda1b
class BlockResponse: <NEW_LINE> <INDENT> VALIDATOR = Draft7Validator( json.loads( ( importlib_resources.files("checkmatelib.resource") / "response_schema.json" ).read_bytes() ) ) <NEW_LINE> def __init__(self, payload): <NEW_LINE> <INDENT> for error in self.VALIDATOR.iter_errors(payload): <NEW_LINE> <INDENT> raise Check...
A response from the Checkmate service with reasons to block.
62598fc0a8370b77170f0617
class FlujoSecuencia(models.Model): <NEW_LINE> <INDENT> actual = models.IntegerField() <NEW_LINE> siguiente = models.IntegerField() <NEW_LINE> proceso = models.ForeignKey(Proceso)
Modelo Flujo Contiene las secuencias de los flujos para cada proceso creado -> Nota Importante: el actual y el siguiente son relacion del objeto Flujo <- Descripcion: - actual: posicion actual del flujo en la secuencia - siguiente: posicion que deberia ir en la secuencia - proceso: proceso que pertenece est...
62598fc05fc7496912d48396
class Size(IntEnum): <NEW_LINE> <INDENT> TINY = 0 <NEW_LINE> SMALL = 1 <NEW_LINE> MEDIUM = 2 <NEW_LINE> LARGE = 3 <NEW_LINE> HUGE = 4 <NEW_LINE> def __lt__(self, other): <NEW_LINE> <INDENT> if self.__class__ is other.__class__: <NEW_LINE> <INDENT> return self.value < other.value <NEW_LINE> <DEDENT> return NotImplemente...
Component Enum detailing Size of an Entity TODO: comparisons will be used for Ramming actions
62598fc05fdd1c0f98e5e1c8
class TestPawnMoves(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.chess_board = ChessBoard() <NEW_LINE> <DEDENT> def test_pawn_can_move_forward(self): <NEW_LINE> <INDENT> self.assertIsNone(self.chess_board[(2, 3)]) <NEW_LINE> ends = list(self.chess_board.valid_moves((1, 3)).keys()) <...
Chess movement unit tests.
62598fc07047854f4633f60a
class Injector(): <NEW_LINE> <INDENT> mark_id = None <NEW_LINE> only = None <NEW_LINE> def __init__(self, only: dict = None): <NEW_LINE> <INDENT> self.mark_id = 1 <NEW_LINE> self.only = only <NEW_LINE> <DEDENT> def inject(self, result: ParseResult): <NEW_LINE> <INDENT> with open(result.filename) as f: <NEW_LINE> <INDEN...
Custom class for injecting perfpoint banners into a codebase.
62598fc04a966d76dd5ef10b
class GlobalGrokker(GrokkerBase): <NEW_LINE> <INDENT> def grok(self, name, obj, **kw): <NEW_LINE> <INDENT> raise NotImplementedError
Grokker that groks once per module.
62598fc04428ac0f6e65875a
class DeleteSecurityGroupsRuleRequest(JDCloudRequest): <NEW_LINE> <INDENT> def __init__(self, parameters, header=None, version="v1"): <NEW_LINE> <INDENT> super(DeleteSecurityGroupsRuleRequest, self).__init__( '/regions/{regionId}/vpc_securityGroups/{id}/rule', 'DELETE', header, version) <NEW_LINE> self.parameters = par...
删除安全组规则
62598fc057b8e32f52508239
class StorageExistsRequest(object): <NEW_LINE> <INDENT> def __init__(self, storage_name): <NEW_LINE> <INDENT> self.storage_name = storage_name
Request model for storage_exists operation. :param storage_name Storage name
62598fc04f88993c371f0625
class Column(object): <NEW_LINE> <INDENT> def __init__(self, field_name, read_format=None, primary_key=-1): <NEW_LINE> <INDENT> if not field_name: <NEW_LINE> <INDENT> raise HbaseException("column name must not be null") <NEW_LINE> <DEDENT> if read_format is not None: <NEW_LINE> <INDENT> if not hasattr(read_format,'__ca...
hbase column definition class
62598fc056ac1b37e6302424
class Proposal(models.Model): <NEW_LINE> <INDENT> id_num = models.AutoField(primary_key=True) <NEW_LINE> author = models.ForeignKey(Person, related_name="author") <NEW_LINE> title = models.CharField(max_length=70) <NEW_LINE> problem = models.CharField(max_length=300) <NEW_LINE> solution = models.CharField(max_length=30...
This class represents a suggestion that's started by a Person and voted by other Persons. A proposal is backed up by the author's arguments and other Persons' Opinions.
62598fc08a349b6b43686475
class ServiceVistax86(obj.ProfileModification): <NEW_LINE> <INDENT> before = ['WindowsOverlay', 'WindowsObjectClasses', 'ServiceBase'] <NEW_LINE> conditions = {'os': lambda x: x == 'windows', 'major': lambda x: x == 6, 'minor': lambda x: x < 2, 'memory_model': lambda x: x == '32bit'} <NEW_LINE> def modification(self, p...
Override the base with vtypes for x86 Vista, 2008, and 7
62598fc03d592f4c4edbb0f4
class SNS_HTTPRequestHandler(BaseHTTPRequestHandler): <NEW_LINE> <INDENT> def do_POST(self): <NEW_LINE> <INDENT> if self.path != self.server.fs.http_listen_path: <NEW_LINE> <INDENT> self.send_response(404) <NEW_LINE> return <NEW_LINE> <DEDENT> content_len = int(self.headers.getheader('content-length')) <NEW_LINE> post_...
HTTP Request Handler to receive SNS notifications via HTTP
62598fc07cff6e4e811b5c5b
class stock_picking_mezzo(orm.Model): <NEW_LINE> <INDENT> _name = "stock.picking.mezzo" <NEW_LINE> _description = "Spedizione mezzo" <NEW_LINE> _columns = { 'name':fields.char('Spedizione mezzo', size=64, readonly=False), 'note': fields.text('Note'), }
Mezzo
62598fc099fddb7c1ca62f08
class Zero(EquationTerm): <NEW_LINE> <INDENT> def __init__(self, operator: Callable = None): <NEW_LINE> <INDENT> super().__init__( sources=set([]), sinks=set([]), operations=OperationsSet([], operator=operator), operator=operator) <NEW_LINE> <DEDENT> def __mul__(self, anext: Category) -> Category: <NEW_LINE> <INDENT> r...
>>> I, O, C = from_operator(debug) >>> (C(1) - C(1)) == O True >>> O ==(I) False >>> O ==(O) True >>> O ==(I*I) False >>> O ==(I+I) False >>> O ==(I-I) True >>> O ==(I-O) False >>> O ==(O*I) False >>> O ==(O+I) False >>> O ==(O-I) True >>> O ==(O+O) True
62598fc050812a4eaa620d05
class MainHandler(StaticFileHandler): <NEW_LINE> <INDENT> async def get(self, *args, **kwargs): <NEW_LINE> <INDENT> await super().get('index.html', *args, **kwargs)
为了使用Vue Router的history模式,把所有请求转发到index.html
62598fc05fdd1c0f98e5e1ca
class RMSWriter(object): <NEW_LINE> <INDENT> def __init__(self, output_directory=''): <NEW_LINE> <INDENT> super(RMSWriter, self).__init__() <NEW_LINE> self.output_directory = output_directory <NEW_LINE> make_output_subdirectory(output_directory, 'rms') <NEW_LINE> <DEDENT> def update(self, rmg): <NEW_LINE> <INDENT> solv...
This class listens to a RMG subject and writes an rms file with the current state of the RMG model, to a rms subfolder. A new instance of the class can be appended to a subject as follows: rmg = ... listener = RMSWriter(outputDirectory) rmg.attach(listener) Whenever the subject calls the .notify() method, the .upda...
62598fc0167d2b6e312b71ae
class FindFriendsService(object): <NEW_LINE> <INDENT> def __init__(self, service_root, session, params): <NEW_LINE> <INDENT> callee = inspect.stack()[2] <NEW_LINE> module = inspect.getmodule(callee[0]) <NEW_LINE> logger = logging.getLogger(module.__name__).getChild('http') <NEW_LINE> self.session = session <NEW_LINE> s...
The 'Find my Friends' iCloud service This connects to iCloud and returns friend data including the near-realtime latitude and longitude.
62598fc07047854f4633f60c
class NoAuthenticatedUser(Exception): <NEW_LINE> <INDENT> pass
Missing profile
62598fc05fdd1c0f98e5e1cb
class StadtzhdwhdropzoneHarvester(StadtzhHarvester): <NEW_LINE> <INDENT> DATA_PATH = '/usr/lib/ckan/DWH' <NEW_LINE> METADATA_DIR = 'dwh-metadata' <NEW_LINE> def info(self): <NEW_LINE> <INDENT> return { 'name': 'stadtzhdwhdropzone', 'title': 'Stadtzhdwhdropzone', 'description': 'Harvests the Stadtzhdwhdropzone data', 'f...
The harvester for the Stadt ZH DWH Dropzone
62598fc0442bda511e95c697
class ArbiterLink(SatelliteLink): <NEW_LINE> <INDENT> my_type = 'arbiter' <NEW_LINE> my_name_property = "%s_name" % my_type <NEW_LINE> properties = SatelliteLink.properties.copy() <NEW_LINE> properties.update({ 'type': StringProp(default=u'arbiter', fill_brok=[FULL_STATUS], to_send=True), 'arbiter_name': StringProp(def...
Class to manage the link to Arbiter daemon. With it, a master arbiter can communicate with a spare Arbiter daemon
62598fc066673b3332c3060b
class UndefinedRegexError(IOBSBaseException): <NEW_LINE> <INDENT> pass
Undefined Regex Error
62598fc0cc40096d6161a2f5
class Graph: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.nodes = {} <NEW_LINE> self.edges = None <NEW_LINE> <DEDENT> def from_edges(self, edge_list: List[Tuple[int, int]]): <NEW_LINE> <INDENT> self.nodes = set(list(chain(*list(zip(*edge_list))))) <NEW_LINE> self.edges = edge_list <NEW_LINE> return ...
Class representing a graph
62598fc0283ffb24f3cf3abc
class IScene(model.Schema): <NEW_LINE> <INDENT> pass
Schema for Scene content type.
62598fc07c178a314d78d6d8
class RHAPIRegistrants(RH): <NEW_LINE> <INDENT> @oauth.require_oauth('registrants') <NEW_LINE> def _checkProtection(self): <NEW_LINE> <INDENT> if not self.event.can_manage(request.oauth.user, role='registration'): <NEW_LINE> <INDENT> raise Forbidden() <NEW_LINE> <DEDENT> <DEDENT> def _checkParams(self): <NEW_LINE> <IND...
RESTful registrants API
62598fc0adb09d7d5dc0a7b6
class QuizInterface: <NEW_LINE> <INDENT> def __init__(self, quiz: QuizBrain): <NEW_LINE> <INDENT> self.quiz = quiz <NEW_LINE> self.window = Tk() <NEW_LINE> self.window.title('Quizzler') <NEW_LINE> self.window.config(bg=THEME_COLOR, padx=20, pady=20) <NEW_LINE> self.canvas = Canvas(width=300, height=250, highlightthickn...
will be the class that creates the quiz interface window when an object is created
62598fc063d6d428bbee29eb
@cromlech.content.factored_component <NEW_LINE> @cromlech.content.factory(BakerJoe) <NEW_LINE> @implementer(IBread, ISweet) <NEW_LINE> @name('JoePastry') <NEW_LINE> class Croissant(object): <NEW_LINE> <INDENT> pass
A crusty bread.
62598fc0aad79263cf42ea0e
class ShareItemInternal(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'name': {'required': True}, 'properties': {'required': True}, } <NEW_LINE> _attribute_map = { 'name': {'key': 'Name', 'type': 'str'}, 'snapshot': {'key': 'Snapshot', 'type': 'str'}, 'deleted': {'key': 'Deleted', 'type': 'bool'}, 'v...
A listed Azure Storage share item. All required parameters must be populated in order to send to Azure. :ivar name: Required. :vartype name: str :ivar snapshot: :vartype snapshot: str :ivar deleted: :vartype deleted: bool :ivar version: :vartype version: str :ivar properties: Required. Properties of a share. :vartype...
62598fc02c8b7c6e89bd39fb
class AWSStorageView(ReportView): <NEW_LINE> <INDENT> permission_classes = [AwsAccessPermission] <NEW_LINE> report = 'storage' <NEW_LINE> provider = 'aws'
Get inventory storage data. @api {get} /cost-management/v1/reports/aws/storage/ Get inventory storage data @apiName getAWSStorageData @apiGroup AWS Report @apiVersion 1.0.0 @apiDescription Get inventory data. @apiHeader {String} token User authorization token. @apiParam (Query Param) {Object} filter The filter to ap...
62598fc03d592f4c4edbb0f6
class Profiler(object): <NEW_LINE> <INDENT> _file_count = count(0) <NEW_LINE> _profiler = None <NEW_LINE> _profiler_owner = None <NEW_LINE> def __init__(self, s3_bucket, s3_prefix, output_local_path, enable_profiling=False): <NEW_LINE> <INDENT> self._enable_profiling = enable_profiling <NEW_LINE> self.s3_bucket = s3_bu...
Class to profile the specific code.
62598fc056ac1b37e6302427
class TestUserResolver(NotificationUserScopeResolver): <NEW_LINE> <INDENT> def resolve(self, scope_name, scope_context, instance_context): <NEW_LINE> <INDENT> user_id = scope_context.get('user_id') <NEW_LINE> return [ 'testemail@sdc.com', { 'user_id': user_id, 'email': 'dummy@dummy.com', 'first_name': 'Joe', 'last_name...
UserResolver for test purposes
62598fc097e22403b383b143
@python_2_unicode_compatible <NEW_LINE> class AddressComponent(models.Model, TagSearchable): <NEW_LINE> <INDENT> type = models.CharField(_(u'Component Type'), max_length=50, db_index=True) <NEW_LINE> short_name = models.CharField(_(u'Short Name'), max_length=255, db_index=True) <NEW_LINE> long_name = models.C...
Stores an address component record.
62598fc0d8ef3951e32c7f7b
class Status(object): <NEW_LINE> <INDENT> AuthorizationExpired = "authorization_expired" <NEW_LINE> Authorized = "authorized" <NEW_LINE> Authorizing = "authorizing" <NEW_LINE> Failed = "failed" <NEW_LINE> GatewayRejected = "gateway_rejected" <NEW_LINE> ProcessorDeclined ...
Constants representing transaction statuses. Available statuses are: * braintree.Transaction.Status.Authorized * braintree.Transaction.Status.Authorizing * braintree.Transaction.Status.Failed * braintree.Transaction.Status.GatewayRejected * braintree.Transaction.Status.ProcessorDeclined * braintree.Transaction.Status....
62598fc066673b3332c3060d
class TextAnnotation(enum.Enum): <NEW_LINE> <INDENT> NONE = ('', 'bpe.32000.bin', 'bpe.32000') <NEW_LINE> def __init__(self, identifier, ext, vocab_ext): <NEW_LINE> <INDENT> self.ext = ext <NEW_LINE> self.vocab_ext = vocab_ext <NEW_LINE> self.identifier = identifier <NEW_LINE> <DEDENT> def data_path(self, split, direct...
An enumeration of text annotation types
62598fc04f6381625f1995df
class TestPBSConfig(TestFunctional): <NEW_LINE> <INDENT> snapdirs = [] <NEW_LINE> snaptars = [] <NEW_LINE> def test_config_for_snapshot(self): <NEW_LINE> <INDENT> pbs_snapshot_path = os.path.join( self.server.pbs_conf["PBS_EXEC"], "sbin", "pbs_snapshot") <NEW_LINE> if not os.path.isfile(pbs_snapshot_path): <NEW_LINE> <...
Test cases for pbs_config tool
62598fc0656771135c4898aa
class UserProfile(AbstractBaseUser, PermissionsMixin): <NEW_LINE> <INDENT> email = models.EmailField(max_length=256, unique=True, null=False) <NEW_LINE> first_name = models.CharField(max_length=256) <NEW_LINE> last_name = models.CharField(max_length=256) <NEW_LINE> is_active = models.BooleanField(default=True) <...
Represents a user's profile
62598fc056ac1b37e6302428
class ZODBLayer(ZopeComponentLayer): <NEW_LINE> <INDENT> db = None <NEW_LINE> @classmethod <NEW_LINE> def setUp(cls): <NEW_LINE> <INDENT> db = cls.db = ZODB.DB(DemoStorage()) <NEW_LINE> component.getGlobalSiteManager().registerUtility(db, IDatabase) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def tearDown(cls): <NEW_LI...
Test layer that creates a ZODB database using :class:`ZODB.DemoStorage.DemoStorage` and registers it as the no-name :class:`ZODB.interfaces.IDatabase` in the global component registry. It is also available in the :attr:`db` attribute of this object.
62598fc0851cf427c66b84f1
class DerBitString(DerObject): <NEW_LINE> <INDENT> def __init__(self, value=b(''), implicit=None): <NEW_LINE> <INDENT> DerObject.__init__(self, 0x03, b(''), implicit, False) <NEW_LINE> self.value = value <NEW_LINE> <DEDENT> def encode(self): <NEW_LINE> <INDENT> self.payload = b('\x00') + self.value <NEW_LINE> return De...
Class to model a DER BIT STRING. An example of encoding is: >>> from Crypto.Util.asn1 import DerBitString >>> from binascii import hexlify, unhexlify >>> bs_der = DerBitString(b'\xaa') >>> bs_der.value += b'\xbb' >>> print hexlify(bs_der.encode()) which will show ``040300aabb``, the DER encoding for the bit string `...
62598fc0d486a94d0ba2c20c
class CommonPrefix: <NEW_LINE> <INDENT> def __init__ ( self, name = "", bucket = None ): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.bucket = bucket <NEW_LINE> <DEDENT> def __repr__ ( self ): <NEW_LINE> <INDENT> return "<CommonPrefix: \"%s\">" % self.name <NEW_LINE> <DEDENT> @property <NEW_LINE> def short_name...
通用前缀 也就是代表目录,只有读取的操作用到,写操作根据名字来分割,自己不用管。 :ivar name: 目录名 :ivar bucket: 目录所属的Bucket对象
62598fc07cff6e4e811b5c5f
class PokemonSimpleListAPIView(ListAPIView): <NEW_LINE> <INDENT> queryset = Pokemon.objects.all() <NEW_LINE> serializer_class = serializers.PokemonSimpleSerializer
Uses generic ListAPIView, but shows only one endpoint for listing
62598fc0e1aae11d1e7ce943
class TestReview(unittest.TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> cls.rev = Review() <NEW_LINE> cls.rev.user_id = "Adriel and Melissa 123" <NEW_LINE> cls.rev.place_id = "Amy and Victor's room at SF" <NEW_LINE> cls.rev.text = "Team Awesome includes Adekunle" <NEW_L...
Testing Review class
62598fc063b5f9789fe853ae
class GeometricConstraints(om.ExplicitComponent): <NEW_LINE> <INDENT> def initialize(self): <NEW_LINE> <INDENT> self.options.declare("nPoints") <NEW_LINE> self.options.declare("diamFlag", default=True) <NEW_LINE> <DEDENT> def setup(self): <NEW_LINE> <INDENT> nPoints = self.options["nPoints"] <NEW_LINE> self.add_input("...
Compute the minimum diameter-to-thickness ratio and taper constraints. Parameters ---------- d : numpy array[nPoints], [m] Sectional tower diameters t : numpy array[nPoints-1], [m] Sectional tower wall thicknesses min_d_to_t : float Minimum diameter-to-thickness ratio, dictated by ability to roll steel max...
62598fc0099cdd3c63675500
class ResourceProtector(_ResourceProtector): <NEW_LINE> <INDENT> def __init__(self, app=None, query_client=None, query_token=None, exists_nonce=None): <NEW_LINE> <INDENT> self.query_client = query_client <NEW_LINE> self.query_token = query_token <NEW_LINE> self._exists_nonce = exists_nonce <NEW_LINE> self.app = app <NE...
A protecting method for resource servers. Initialize a resource protector with the query_token method:: from authlib.integrations.flask_oauth1 import ResourceProtector, current_credential from authlib.integrations.flask_oauth1 import create_exists_nonce_func from authlib.integrations.sqla_oauth1 import ( ...
62598fc0f9cc0f698b1c53ee
class Donor(BaseModel): <NEW_LINE> <INDENT> donor_name = CharField(primary_key = True, max_length = 30) <NEW_LINE> home_address = CharField(max_length=40) <NEW_LINE> town_and_zip = CharField(max_length = 40)
This class defines Donor person, which maintains details of name, address, town, and zip code
62598fc03317a56b869be66e
class get_count_result(object): <NEW_LINE> <INDENT> def __init__(self, success=None, ire=None, ue=None, te=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> self.ire = ire <NEW_LINE> self.ue = ue <NEW_LINE> self.te = te <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot._fast_decode is ...
Attributes: - success - ire - ue - te
62598fc067a9b606de546208
class KegSessionChunk(_AbstractChunk): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> unique_together = ('session', 'keg') <NEW_LINE> get_latest_by = 'starttime' <NEW_LINE> ordering = ('-starttime',) <NEW_LINE> <DEDENT> objects = managers.SessionManager() <NEW_LINE> site = models.ForeignKey(KegbotSite, related_nam...
A specific keg's contribution to a session (spans all users).
62598fc07d43ff2487427523
class Model372ServiceRequestEnable(RegisterBase): <NEW_LINE> <INDENT> bit_names = [ "warmup_heater_ramp_done", "valid_reading_control_input", "valid_reading_measurement_input", "alarm", "sensor_overload", "event_summary", "", "sample_heater_ramp_done" ] <NEW_LINE> def __init__(self, warmup_heater_ramp_done, valid_readi...
Class representing the status byte register.
62598fc05fcc89381b26626b
class Eras (object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.run2_common = cms.Modifier() <NEW_LINE> self.run2_25ns_specific = cms.Modifier() <NEW_LINE> self.run2_50ns_specific = cms.Modifier() <NEW_LINE> self.run2_HI_specific = cms.Modifier() <NEW_LINE> self.stage1L1Trigger = cms.Modifier() <N...
Dummy container for all the cms.Modifier instances that config fragments can use to selectively configure depending on what scenario is active.
62598fc0091ae35668704e63
class JfBranchCfg(schema.SectionCfg): <NEW_LINE> <INDENT> KEYS = [ 'version', 'remote', 'upstream', 'fork', 'lreview', 'review', 'ldebug', 'debug', 'hidden', 'protected', 'tested', 'sync', 'debug_prefix', 'debug_suffix', ] <NEW_LINE> version = schema.Value(schema.IntType, ['version'], default=0) <NEW_LINE> remote = sch...
Jflow configuration for a branch.
62598fc0851cf427c66b84f3
class Zoo: <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> self.zoo_name = name <NEW_LINE> self.animals = set() <NEW_LINE> self.habitats = set() <NEW_LINE> self.visitors = list() <NEW_LINE> self.habitat_population = dict() <NEW_LINE> <DEDENT> def build_habitat(self, habitat): <NEW_LINE> <INDENT> self....
Contains methods for maintaining a Zoo Methods: -------- build_habitat sell_family_ticket purchase_animal
62598fc0aad79263cf42ea12
@Atlas.subcommand("args") <NEW_LINE> class AtlasArgs(cli.Application): <NEW_LINE> <INDENT> target = cli.SwitchAttr( ['-t', '--target'], cli.ExistingFile, help='target image', mandatory=True) <NEW_LINE> fusions = cli.SwitchAttr( ['--fusion'], cli.Set("avg", "wavg", "antsJointFusion", case_sensitive=False), help='Also cr...
Specify training images and labelmaps via commandline arguments.
62598fc060cbc95b0636457a
class TSDBAlreadyExistsError(TSDBError): <NEW_LINE> <INDENT> pass
The TSDB creation request would overwrite an exisiting TSDB.
62598fc03346ee7daa337767
class memoizer(object): <NEW_LINE> <INDENT> def __init__(self, func): <NEW_LINE> <INDENT> self.memo = [[], []] <NEW_LINE> self.func = func <NEW_LINE> <DEDENT> def __call__(self, *args, **kwargs): <NEW_LINE> <INDENT> key = (args, kwargs) <NEW_LINE> index = None <NEW_LINE> for x in xrange(0, len(self.memo[0])): <NEW_LINE...
A Memoized Function.
62598fc023849d37ff8512f1
class _CommandSectionPlane: <NEW_LINE> <INDENT> def GetResources(self): <NEW_LINE> <INDENT> return {'Pixmap' : 'Arch_SectionPlane', 'Accel': "S, E", 'MenuText': QT_TRANSLATE_NOOP("Arch_SectionPlane","Section Plane"), 'ToolTip': QT_TRANSLATE_NOOP("Arch_SectionPlane","Creates a section plane object, including the select...
the Arch SectionPlane command definition
62598fc050812a4eaa620d08
class IAF(Neuron): <NEW_LINE> <INDENT> Params = recordclass('params', ('bias','kappa','delta', 'reset')) <NEW_LINE> States = recordclass('states', ('V','I')) <NEW_LINE> initStates = States(V=-65., I=0.0) <NEW_LINE> defaultParams = Params(bias=1.0, kappa=0.01, delta=-60., reset=-70.) <NEW_LINE> @classmethod <NEW_LINE> d...
Integrate-and-Fire Neuron
62598fc07b180e01f3e4916e
class ModelBase: <NEW_LINE> <INDENT> _serialized_names = {} <NEW_LINE> def __init__(self, args): <NEW_LINE> <INDENT> parameter_types = get_type_hints(self.__class__.__init__) <NEW_LINE> field_values = {k: v for k, v in args.items() if k != 'self' and not k.startswith('_')} <NEW_LINE> for k, v in field_values.items(): <...
Base class for types that can be converted to JSON-like dict structures or constructed from such structures. The object fields, their types and default values are taken from the __init__ method arguments. Override the _serialized_names mapping to control the key names of the serialized structures. The derived class ob...
62598fc0be7bc26dc9251f7b
class MyFavCourseView(LoginRequiredMixin, View): <NEW_LINE> <INDENT> def get(self, request): <NEW_LINE> <INDENT> course_list = [] <NEW_LINE> userfav_ids = UserFavorite.objects.filter(user=request.user, fav_type=1) <NEW_LINE> for userfav_id in userfav_ids: <NEW_LINE> <INDENT> course_id = userfav_id.fav_id <NEW_LINE> org...
我的收藏课程
62598fc055399d3f05626754
class Pan(PointEvent): <NEW_LINE> <INDENT> event_name = 'pan' <NEW_LINE> def __init__(self, model, delta_x=None, delta_y=None, direction=None, **kwargs): <NEW_LINE> <INDENT> self.delta_x = delta_x <NEW_LINE> self.delta_y = delta_y <NEW_LINE> self.direction = direction <NEW_LINE> super().__init__(model, **kwargs)
Announce a pan event on a Bokeh plot. Attributes: delta_x (float) : the amount of scroll in the x direction delta_y (float) : the amount of scroll in the y direction direction (float) : the direction of scroll (1 or -1) sx (float) : x-coordinate of the event in *screen* space sy (float) : y-coordin...
62598fc0bf627c535bcb16e5
class Melo: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.tracks = [] <NEW_LINE> self.ts_numerator = 4 <NEW_LINE> self.ts_denominator = 4
A list of Track. This class is a lot easier to handle than vanilla MidiFile because Melo uses absolute time and has only note information.
62598fc05fdd1c0f98e5e1d1
class FakeRegisters(Registers): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.registers = [0] * (BANK_SIZE * 2) <NEW_LINE> self.writes = [] <NEW_LINE> self.reset() <NEW_LINE> <DEDENT> def write_register(self, reg, value): <NEW_LINE> <INDENT> self.writes.append((reg, value)) <NEW_LINE> if reg in (IOCO...
Note - does not simulate effect of the IPOL{A,B} registers.
62598fc03317a56b869be66f
class IContactListing(IViewletManager): <NEW_LINE> <INDENT> pass
Viewlet manager registration for contact view
62598fc0283ffb24f3cf3ac2
class ActivateColors: <NEW_LINE> <INDENT> def __init__(self, enable=True, flavor=None): <NEW_LINE> <INDENT> if enable is True and DEV.current_test(): <NEW_LINE> <INDENT> enable = "testing" <NEW_LINE> <DEDENT> self.enable = enable <NEW_LINE> self.flavor = flavor <NEW_LINE> self.prev = None <NEW_LINE> <DEDENT> def __ente...
Context manager for temporarily overriding coloring
62598fc0ec188e330fdf8ad2
class TuyaLight(TuyaDevice, LightEntity): <NEW_LINE> <INDENT> def __init__(self, tuya, platform): <NEW_LINE> <INDENT> super().__init__(tuya, platform) <NEW_LINE> self.entity_id = ENTITY_ID_FORMAT.format(tuya.object_id()) <NEW_LINE> <DEDENT> @property <NEW_LINE> def brightness(self): <NEW_LINE> <INDENT> if self._tuya.br...
Tuya light device.
62598fc0cc40096d6161a2f8
class User(Base): <NEW_LINE> <INDENT> __tablename__ = 'user' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> state = Column(String) <NEW_LINE> first_name = Column(String) <NEW_LINE> last_name = Column(String) <NEW_LINE> name = Column(String) <NEW_LINE> type = Column(String) <NEW_LINE> username = Column(Str...
Class which represents the User table in users' states db. This is the original class which is used in DbAdapter, but custom User class could be inherited from this one and passed as user_class parameter in DbAdapter initialization
62598fc05166f23b2e24361f