code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Table(BaseModel): <NEW_LINE> <INDENT> uuid = CharField(db_column='UUID', max_length=64, primary_key=True) <NEW_LINE> database = ForeignKeyField(Database, db_column='DATABASE_UUID', default=None) <NEW_LINE> folder = ForeignKeyField(Folder, db_column='FOLDER_UUID') <NEW_LINE> name = CharField(db_column='NAME', max_... | 分类目录数据表 | 62598f0e97e22403b3839a83 |
class StructureReasonsTests(SynchronousTestCase): <NEW_LINE> <INDENT> def test_exception(self): <NEW_LINE> <INDENT> exc_info = raise_to_exc_info(ZeroDivisionError('foo')) <NEW_LINE> reason = ErrorReason.Exception(exc_info) <NEW_LINE> expected_tb = ''.join(traceback.format_exception(*exc_info)) <NEW_LINE> self.assertEqu... | Tests for :func:`structure_reason`. | 62598f0e31939e2706ed1033 |
class Args: <NEW_LINE> <INDENT> def __init__(self, input: str, output: str, parallel: bool) -> None: <NEW_LINE> <INDENT> self.input = input <NEW_LINE> self.output = output <NEW_LINE> self.parallel = parallel | Represents arguments that can be passed to the application
### Fields
* input - str
* output - str
* parallel - bool | 62598f0ea05bb46b3848941c |
@optendersresource(name='aboveThresholdEU:Tender Award Documents', collection_path='/tenders/{tender_id}/awards/{award_id}/documents', path='/tenders/{tender_id}/awards/{award_id}/documents/{document_id}', procurementMethodType='aboveThresholdEU', description="Tender award documents") <NEW_LINE> class TenderAwardDocume... | Tender Award Document | 62598f0ed8ef3951e32c7425 |
class CustomerClientServiceGrpcTransport(object): <NEW_LINE> <INDENT> _OAUTH_SCOPES = () <NEW_LINE> def __init__(self, channel=None, credentials=None, address='googleads.googleapis.com:443'): <NEW_LINE> <INDENT> if channel is not None and credentials is not None: <NEW_LINE> <INDENT> raise ValueError( 'The `channel` and... | gRPC transport class providing stubs for
google.ads.googleads.v1.services CustomerClientService API.
The transport provides access to the raw gRPC stubs,
which can be used to take advantage of advanced
features of gRPC. | 62598f0ebe7bc26dc9251432 |
class Config(object): <NEW_LINE> <INDENT> pass | Konfigurasi umum | 62598f0e091ae356687037bd |
class Iterator(object): <NEW_LINE> <INDENT> def __init__(self, objToIterate, numFunc, getFunc): <NEW_LINE> <INDENT> self.__obj = objToIterate <NEW_LINE> self.__index = 0 <NEW_LINE> self.__num = numFunc(objToIterate) <NEW_LINE> self.__getter = getFunc <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> return se... | Universal iterator for many of BLPAPI objects.
It can be used to iterate any sub-items in an item which has
the following methods:
* method returning the number of sub-items
* method returning the 'index'ed sub-item
For example, it is currently used as an iterator for Service's event
definition in the followi... | 62598f0e50812a4eaa6201bd |
class StackHookClear(command.Command): <NEW_LINE> <INDENT> log = logging.getLogger(__name__ + '.StackHookClear') <NEW_LINE> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(StackHookClear, self).get_parser(prog_name) <NEW_LINE> parser.add_argument( 'stack', metavar='<stack>', help=_('Stack to display... | Clear resource hooks on a given stack. | 62598f0e4a966d76dd5eda77 |
class TestUnderlyingAssetAccumulationCase00(TestPortfolio): <NEW_LINE> <INDENT> operations = OPERATION_SEQUENCE20 <NEW_LINE> state = { ASSET.symbol: STATE07, OPTION1.symbol: STATE06, } | Test the accumulation of one operation with underlying assets. | 62598f0e7cff6e4e811b458c |
class OneSideHelper(object): <NEW_LINE> <INDENT> def __init__( self, config_name, exp_uid, config_name_classifier, exp_uid_classifier, ): <NEW_LINE> <INDENT> config = common.load_config(config_name) <NEW_LINE> this_config_is_wavegan = common.config_is_wavegan(config) <NEW_LINE> if this_config_is_wavegan: <NEW_LINE> <IN... | The helper that manages model and classifier in dataspace for joint model.
Attributes:
config_name: A string representing the name of config for model in
dataspace.
exp_uid: A string representing the unique id of experiment used in
the model in dataspace.
config_name_classifier: A string representing... | 62598f0e4527f215b58e8a9c |
class InstrumentParameters(DriverParameter): <NEW_LINE> <INDENT> SYS_CLOCK = 'sys_clock' <NEW_LINE> NOTE1 = 'note1' <NEW_LINE> NOTE2 = 'note2' <NEW_LINE> NOTE3 = 'note3' <NEW_LINE> VELOCITY_FRAME ... | Device parameters for MAVS-4. | 62598f0e3d592f4c4edb9a89 |
class OAuth(BaseModel): <NEW_LINE> <INDENT> @property <NEW_LINE> def is_challenge(self) -> bool: <NEW_LINE> <INDENT> return hasattr(self, "challenge") <NEW_LINE> <DEDENT> @property <NEW_LINE> def is_mfa(self) -> bool: <NEW_LINE> <INDENT> return hasattr(self, "mfa_required") <NEW_LINE> <DEDENT> @property <NEW_LINE> def ... | The OAuth response model. | 62598f0e5fdd1c0f98e5cb44 |
class TelZone(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=255, unique=True, verbose_name=_(u"Telzone name")) <NEW_LINE> group = models.ForeignKey(TelZoneGroup, verbose_name=_(u"Telzone group")) <NEW_LINE> ru_RU = models.CharField(max_length=255, verbose_name=_(u"Russian telzone name"), blank=T... | Модель - телефонная зона со своим id и именем. Так же тут предполагаю хранить локализованные названия зон | 62598f0ed8ef3951e32c7426 |
class ReviewDetails(PistonResponseObject): <NEW_LINE> <INDENT> pass | A detailed review description.
This class will be automatically populated with JSON retrieved from the
server. Each ReviewDetails object will have the following fields:
* id
* package_name
* app_name
* language
* date_created
* rating
* reviewer_username
* summary
* review_text
* hide
* version | 62598f0eff9c53063f519202 |
class _KexDHBase(Kex): <NEW_LINE> <INDENT> _replytype = None <NEW_LINE> def __init__(self, alg, conn, hash_alg): <NEW_LINE> <INDENT> super().__init__(alg, conn, hash_alg) <NEW_LINE> self._g = None <NEW_LINE> self._p = None <NEW_LINE> self._q = None <NEW_LINE> self._x = None <NEW_LINE> self._e = None <NEW_LINE> self._f ... | Abstract base class for Diffie-Hellman key exchange | 62598f0ebf627c535bcb001b |
class ExcludeTypes(SEToolsWidget, QDialog): <NEW_LINE> <INDENT> def __init__(self, parent, policy): <NEW_LINE> <INDENT> super(ExcludeTypes, self).__init__(parent) <NEW_LINE> self.log = logging.getLogger(self.__class__.__name__) <NEW_LINE> self.parent = parent <NEW_LINE> self.policy = policy <NEW_LINE> self.excluded_lis... | Dialog for choosing excluded types. | 62598f0e8a349b6b43684de8 |
class qsigns(rtest.FortranTestCase): <NEW_LINE> <INDENT> FILES = ["strings/qsigns.f90"] <NEW_LINE> def runTest(self): <NEW_LINE> <INDENT> file = self.getFile("qsigns.f90") | Question sign inside string.
| 62598f0e7cff6e4e811b458e |
class AttributeDict(dict): <NEW_LINE> <INDENT> def __getattr__(self, key): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return self[key] <NEW_LINE> <DEDENT> except KeyError: <NEW_LINE> <INDENT> raise AttributeError(key) <NEW_LINE> <DEDENT> <DEDENT> def __setattr__(self, key, value): <NEW_LINE> <INDENT> if key.startswit... | Lexicon's AttributeDict
https://github.com/bitprophet/lexicon/blob/master/lexicon/attribute_dict.py | 62598f0ea219f33f346c53d0 |
class KeywordDashboardForm(forms.Form): <NEW_LINE> <INDENT> id = forms.IntegerField(required=True) <NEW_LINE> format = FormatField() <NEW_LINE> width = forms.IntegerField(required=False) <NEW_LINE> height = forms.IntegerField(required=False) <NEW_LINE> step = forms.IntegerField(required=False) <NEW_LINE> def clean(self... | Form for querying the Keyword Dashboard | 62598f0e3d592f4c4edb9a8c |
class UpdateExample(UpdateScript): <NEW_LINE> <INDENT> title = 'Convert schema widget titles to string' <NEW_LINE> creation_date = 'Jun 8, 2010' <NEW_LINE> authors = ['Alex Morega'] <NEW_LINE> description = ("Convert any Schema widget title from " "LocalProperty to normal string") <NEW_LINE> security = ClassSecurityInf... | Convert any Schema widget title from LocalProperty to normal string | 62598f0ead47b63b2c5a63c0 |
class IIolApp(Interface): <NEW_LINE> <INDENT> iol_app = Attribute("Application Name") | marker interface for iol document | 62598f0e656771135c488232 |
class Binary(GpioSensor): <NEW_LINE> <INDENT> def __init__(self, name, gpioType, pin, ioMode, pullUpMode): <NEW_LINE> <INDENT> super(Binary, self).__init__(name, gpioType, pin) <NEW_LINE> gpio.setmode(gpio.BCM) <NEW_LINE> gpio.setup(pin, ioMode, pull_up_down=pullUpMode) | Gets data from binary sensor | 62598f0e091ae356687037c1 |
class RoundThermostat(ClimateDevice): <NEW_LINE> <INDENT> def __init__(self, client, zone_id, master, away_temp): <NEW_LINE> <INDENT> self.client = client <NEW_LINE> self._current_temperature = None <NEW_LINE> self._target_temperature = None <NEW_LINE> self._name = 'round connected' <NEW_LINE> self._id = zone_id <NEW_L... | Representation of a Honeywell Round Connected thermostat. | 62598f0e60cbc95b06362edb |
class Sample(_Base): <NEW_LINE> <INDENT> id = wtypes.text <NEW_LINE> meter = wtypes.text <NEW_LINE> type = wtypes.Enum(str, *sample.TYPES) <NEW_LINE> unit = wtypes.text <NEW_LINE> volume = float <NEW_LINE> user_id = wtypes.text <NEW_LINE> project_id = wtypes.text <NEW_LINE> resource_id = wtypes.text <NEW_LINE> source =... | One measurement. | 62598f0e8a349b6b43684dec |
class SememeElement: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.id = '-1' <NEW_LINE> self.father = [] <NEW_LINE> self.sememe_zh = '' <NEW_LINE> self.depth = -1 <NEW_LINE> <DEDENT> def parse(self, line): <NEW_LINE> <INDENT> if not line: <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> items = l... | 义原条目 | 62598f0efbf16365ca792c48 |
class AnimatedSpriteComponent(BaseComponent): <NEW_LINE> <INDENT> def __init__(self, spritesheet_path, rows, cols): <NEW_LINE> <INDENT> BaseComponent.__init__(self) <NEW_LINE> self.animated_sprite = AnimatedSprite(spritesheet_path, rows, cols) <NEW_LINE> <DEDENT> def draw(self, pos): <NEW_LINE> <INDENT> self.animated_s... | Spritesheet based animation for your blobs! | 62598f0e31939e2706ed1037 |
@tf.keras.utils.register_keras_serializable(package='tensorflow_ranking') <NEW_LINE> class DCGLambdaWeight(losses_impl.DCGLambdaWeight): <NEW_LINE> <INDENT> def __init__(self, topn=None, gain_fn=None, rank_discount_fn=None, normalized=False, smooth_fraction=0., **kwargs): <NEW_LINE> <INDENT> gain_fn = gain_fn or utils.... | Keras serializable class for DCG. | 62598f0e656771135c488236 |
class Modulo(ModuloBase): <NEW_LINE> <INDENT> @requiere_mesa_abierta <NEW_LINE> def __init__(self, nombre): <NEW_LINE> <INDENT> self.web_template = "apertura" <NEW_LINE> self.rampa = Apertura(self) <NEW_LINE> self.controlador = Controlador(self) <NEW_LINE> self._mensaje = None <NEW_LINE> ModuloBase.__init__(self, nombr... | Modulo de Apertura de votos.
Este módulo permite generar el acta de apertura de una mesa.
El usuario debe ingresar el acta en la maquina, agregar y confirmar sus
datos e imprimirla. | 62598f0e97e22403b3839a8d |
class OutputStream(object): <NEW_LINE> <INDENT> def __init__(self, conn, req, type, buffered=False): <NEW_LINE> <INDENT> self._conn = conn <NEW_LINE> self._req = req <NEW_LINE> self._type = type <NEW_LINE> self._buffered = buffered <NEW_LINE> self._buffers = [] <NEW_LINE> self.data_written = False <NEW_LINE> self.close... | File-like object for STDOUT and STDERR FastCGI output streams.
If buffered is set to False, calls to write() or writelines() immediately
result in Records being sent back to the server. | 62598f0e31939e2706ed1038 |
class BaiIndex(CoordinateIndex): <NEW_LINE> <INDENT> def parse_header(self, reader: BinReader) -> int: <NEW_LINE> <INDENT> return reader.read_int() <NEW_LINE> <DEDENT> def create_ref_index(self, reader: BinReader, reference_id: int) -> RefIndex: <NEW_LINE> <INDENT> return BaiRefIndex(reader, reference_id) <NEW_LINE> <D... | Index subclass for BAI format.
See:
* https://samtools.github.io/hts-specs/SAMv1.pdf | 62598f0ebe7bc26dc9251437 |
class BaseStructType(Aggregate): <NEW_LINE> <INDENT> _packed = False <NEW_LINE> @property <NEW_LINE> def packed(self): <NEW_LINE> <INDENT> return self._packed <NEW_LINE> <DEDENT> @packed.setter <NEW_LINE> def packed(self, val): <NEW_LINE> <INDENT> self._packed = bool(val) <NEW_LINE> <DEDENT> def __len__(self): <NEW_LIN... | The base type for heterogenous struct types. | 62598f0e60cbc95b06362edf |
class MonthlyLocationReportTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_pre_format(self): <NEW_LINE> <INDENT> input_file_name = "../data/2017.3_location.csv" <NEW_LINE> self.data = MonthlyLocationReport( input_file_name=input_file_name, output_file_name="") ... | The test cases to test code in monthly.py. | 62598f0e55399d3f056250d2 |
class SimpleClass(object): <NEW_LINE> <INDENT> cls_attr = SimpleDescriptor() <NEW_LINE> visit = TopLevelVisitor.visit <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.inst_attr = SimpleDescriptor() <NEW_LINE> def submethod1(): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> <DEDENT> @classmethod <NEW_LINE> def meth... | Example:
>>> pass | 62598f0e377c676e912f633c |
class Mapping(Container): <NEW_LINE> <INDENT> typename = 'mapping' <NEW_LINE> container = dict <NEW_LINE> complaint = 'could not coerce {0.value!r} to a mapping' <NEW_LINE> def _coerce(self, value, **kwds): <NEW_LINE> <INDENT> if isinstance(value, str): <NEW_LINE> <INDENT> raise NotImplementedError( "class {.__name__} ... | The base class for type declarators that map strings to other types | 62598f0eec188e330fdf7461 |
class KeventDescriptorSet(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._descriptors = set() <NEW_LINE> self._descriptor_for_path = dict() <NEW_LINE> self._descriptor_for_fd = dict() <NEW_LINE> self._kevents = list() <NEW_LINE> self._lock = threading.Lock() <NEW_LINE> <DEDENT> @property <NEW... | Thread-safe kevent descriptor collection. | 62598f0eadb09d7d5dc09159 |
class sfp_XXX(SpiderFootPlugin): <NEW_LINE> <INDENT> opts = { } <NEW_LINE> optdescs = { } <NEW_LINE> baseDomain = None <NEW_LINE> results = dict() <NEW_LINE> def setup(self, sfc, target, userOpts=dict()): <NEW_LINE> <INDENT> global sf <NEW_LINE> sf = sfc <NEW_LINE> self.baseDomain = target <NEW_LINE> self.results = dic... | Description | 62598f0edc8b845886d52176 |
class StudentReadOnlyForm(StudentForm): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(StudentReadOnlyForm, self).__init__(*args, **kwargs) <NEW_LINE> for field in self.fields: <NEW_LINE> <INDENT> self.fields[field].disabled = True | Read-only form available to coordinators and adjudicators who are viewing students | 62598f0ea05bb46b38489428 |
class ComplexDoubleBufferedField(DoubleBufferedField): <NEW_LINE> <INDENT> InternalClass = None <NEW_LINE> def _init(self, state, mm_ptr, offset): <NEW_LINE> <INDENT> offset = super(ComplexDoubleBufferedField, self)._init( state, mm_ptr, offset) <NEW_LINE> self._init_internal(state) <NEW_LINE> return offset <NEW_LINE> ... | Base Class for fields with complex internal state like Counters
Set InternalClass in your subclass | 62598f0e50812a4eaa6201c3 |
class end_keyword(parser.keyword): <NEW_LINE> <INDENT> def __init__(self, sString): <NEW_LINE> <INDENT> parser.keyword.__init__(self, sString) | unique_id = package_body : end_keyword | 62598f0eff9c53063f51920c |
class BotoflowFilter(logging.Filter): <NEW_LINE> <INDENT> def __init__(self, name='', filter_replaying=True): <NEW_LINE> <INDENT> super(BotoflowFilter, self).__init__(name) <NEW_LINE> self._filter_replaying = filter_replaying <NEW_LINE> <DEDENT> def filter(self, record): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> if ... | You can use this filter with Python's :py:mod:`logging` module to filter out
botoflow logs that are being replayed by the decider.
For example::
import logging
from botoflow.logging_filters import BotoflowFilter
logging.basicConfig(level=logging.DEBUG,
format='%(filename)s:%(lineno)d (%(funcName)... | 62598f0eec188e330fdf7463 |
class AR_Coefs(parametertools.MultiParameter): <NEW_LINE> <INDENT> NDIM, TYPE, TIME, SPAN = 2, float, None, (None, None) <NEW_LINE> def update(self): <NEW_LINE> <INDENT> pars = self.subpars.pars <NEW_LINE> coefs = pars.control.responses.ar_coefs <NEW_LINE> self.shape = coefs.shape <NEW_LINE> self(coefs) <NEW_LINE> pars... | AR coefficients of the different responses [-].
Example:
>>> from hydpy.models.arma import *
>>> parameterstep('1d')
>>> responses(((1., 2.), (1.,)), th_3=((1.,), (1., 2., 3.)))
>>> derived.ar_coefs.update()
>>> derived.ar_coefs
ar_coefs(1.0, 2.0,
1.0, nan)
Note that updating parameter `ar_coefs` sets the s... | 62598f0eadb09d7d5dc0915b |
class PrintingForAsciiArt(PrintingFor): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> rvl = self._warnOverlap() <NEW_LINE> if self._tasks_binding.tasks > 296: <NEW_LINE> <INDENT> rvl += "ERROR - AsciiArt representation unsupported if more than 296 tasks !" <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> rvl ... | Printing for an artist, ie a special human being
# placement 4 4 --ascii-art
S0-------- S1--------
P AAAABBBB.. CCCCDDDD..
| 62598f0e956e5f7376df4c54 |
class ExcelHandler: <NEW_LINE> <INDENT> def __init__(self, path, sheet=0, title_line=False): <NEW_LINE> <INDENT> if os.path.exists(path): <NEW_LINE> <INDENT> self.excel = path <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> raise FileNotFoundError('文件不存在!') <NEW_LINE> <DEDENT> self.sheet = sheet <NEW_LINE> self.title_lin... | 读取excel文件中的内容。返回list。
如:
excel中内容为:
| A | B | C |
| A1 | B1 | C1 |
| A2 | B2 | C2 |
如果 print(ExcelReader(excel, title_line=True).data),输出结果:
[{A: A1, B: B1, C:C1}, {A:A2, B:B2, C:C2}]
如果 print(ExcelReader(excel, title_line=False).data),输出结果:
[[A,B,C], [A1,B1,C1], [A2,B2,C2]]
可以指定sheet,通过index或者name:
ExcelReader(... | 62598f0e31939e2706ed103a |
class Inflation(): <NEW_LINE> <INDENT> DEFAULT_FILENAME = 'inflation.json' <NEW_LINE> def __init__(self, inflation_dict=None): <NEW_LINE> <INDENT> pass | Inflation class | 62598f0e851cf427c66b6e7a |
class PieChart(Chart): <NEW_LINE> <INDENT> chart_type = 'pie' <NEW_LINE> def updated(self): <NEW_LINE> <INDENT> fields = self.get_fields() <NEW_LINE> items = self.get_objects() <NEW_LINE> self.chart_data = { 'labels': [self.render_field(fields[0], item) for item in items], 'datasets': [{ 'label': fields[1]['label'], 'd... | BarChart | 62598f0e656771135c48823c |
class AjaxModelFormView(AjaxValidModelFormViewMixin, AjaxInvalidFormViewMixin, FormView): <NEW_LINE> <INDENT> pass | A mixin that handles AJAX form submissions for views that use a ModelForm.
See: https://docs.djangoproject.com/en/1.6/topics/class-based-views/generic-editing/#model-forms | 62598f0e0fa83653e46f3a96 |
class UploadCertificateRequest(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'certificate': {'required': True}, } <NEW_LINE> _attribute_map = { 'authentication_type': {'key': 'properties.authenticationType', 'type': 'str'}, 'certificate': {'key': 'properties.certificate', 'type': 'str'}, } <NEW_LINE>... | The upload certificate request.
All required parameters must be populated in order to send to Azure.
:param authentication_type: The authentication type. Possible values include: "Invalid",
"AzureActiveDirectory".
:type authentication_type: str or ~azure.mgmt.databoxedge.v2019_07_01.models.AuthenticationType
:param ... | 62598f0eff9c53063f51920e |
class addNewConnect(object): <NEW_LINE> <INDENT> def __init__(self, root): <NEW_LINE> <INDENT> self.root = root <NEW_LINE> self.SelectSerial() <NEW_LINE> self.SelectTestCase() <NEW_LINE> <DEDENT> def SelectSerial(self): <NEW_LINE> <INDENT> L1 = ttk.Label(self.root, text="选择串口") <NEW_LINE> L1.pack(side=TOP,pady = 2) <NE... | docstring for ClassName | 62598f0e4527f215b58e8aaa |
class StratisCliUnknownInterfaceError(StratisCliRuntimeError): <NEW_LINE> <INDENT> def __init__(self, interface_name): <NEW_LINE> <INDENT> self._interface_name = interface_name <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "unexpected interface name %s" % self._interface_name | Error raised when code encounters an unexpected D-Bus interface name. | 62598f0eab23a570cc2d4345 |
class MI1x1ConvNet(nn.Module): <NEW_LINE> <INDENT> def __init__(self, n_input, n_units): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.block_nonlinear = nn.Sequential( nn.Conv2d(n_input, n_units, kernel_size=1, stride=1, padding=0, bias=False), nn.BatchNorm2d(n_units), nn.ReLU(), nn.Conv2d(n_units, n_units, ke... | Simple custorm 1x1 convnet.
| 62598f0efbf16365ca792c50 |
class UpdateChatLastMessage(Object): <NEW_LINE> <INDENT> ID = "updateChatLastMessage" <NEW_LINE> def __init__(self, chat_id, last_message, order, **kwargs): <NEW_LINE> <INDENT> self.chat_id = chat_id <NEW_LINE> self.last_message = last_message <NEW_LINE> self.order = order <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> d... | The last message of a chat was changed. If last_message is null, then the last message in the chat became unknown. Some new unknown messages might be added to the chat in this case
Attributes:
ID (:obj:`str`): ``UpdateChatLastMessage``
Args:
chat_id (:obj:`int`):
Chat identifier
last_message (:c... | 62598f0e3d592f4c4edb9a98 |
class IncorrectSerializer(DocumentSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = CustomIdModel | This serializer doesn't override id field, thus it is incorrect. | 62598f0e3617ad0b5ee04cdf |
class CassandraViewResource(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'id': {'required': True}, 'view_definition': {'required': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'view_definition': {'key': 'viewDefinition', 'type': 'str'}, } <NEW_LINE> def __init__( self, ... | Cosmos DB Cassandra view resource object.
All required parameters must be populated in order to send to Azure.
:ivar id: Required. Name of the Cosmos DB Cassandra view.
:vartype id: str
:ivar view_definition: Required. View Definition of the Cosmos DB Cassandra view.
:vartype view_definition: str | 62598f0edc8b845886d5217a |
class FixedHawkResponseMiddleware(MiddlewareMixin, HawkResponseMiddleware): <NEW_LINE> <INDENT> pass | Makes HawkResponseMiddleware compatible with Django's new middleware API.
Remove when `MiddlewareMixin` has been added upstream:
https://github.com/kumar303/hawkrest/issues/38 | 62598f0e50812a4eaa6201c5 |
class DocumenVersionCreatedActivity(BaseActivity): <NEW_LINE> <INDENT> kind = 'document-version-created' <NEW_LINE> @property <NEW_LINE> def summary(self): <NEW_LINE> <INDENT> return self.translate_to_all_languages( _(u'summary_document_version_created', u'New document version created by ${user}', mapping={'user': Acto... | Activity representation for adding a new document version.
| 62598f0e55399d3f056250d8 |
class Page(models.Model): <NEW_LINE> <INDENT> title = models.CharField(('Title'), max_length=255) <NEW_LINE> subtitle = models.CharField(('Subtitle'), max_length=255, blank=True) <NEW_LINE> content = HTMLField(('Content'), blank=True) <NEW_LINE> image = models.FileField('Image or video', blank=True) <NEW_LINE> slug = m... | A page on the website
| 62598f0ea219f33f346c53de |
class LED: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> if LED._onDevice(): <NEW_LINE> <INDENT> LED._init(0) <NEW_LINE> LED._init(1) <NEW_LINE> <DEDENT> <DEDENT> def setGreenOn(self): <NEW_LINE> <INDENT> if LED._onDevice(): <NEW_LINE> <INDENT> LED._set(0, 1) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> ... | Class for managing LEDs on the raspberry pi. On construction, it overloads the CPU and SD
access indicator lights. | 62598f0e7b180e01f3e48622 |
class BaseSR04(base_calvinsys_object.BaseCalvinsysObject): <NEW_LINE> <INDENT> init_schema = { "type": "object", "properties": { "echo_pin": { "description": "Pin to use for echo detection", "type": "integer", "minimum": 1 }, "trigger_pin":{ "description": "Pin to use to trigger measurement", "type": "integer", "minimu... | Measuring distance | 62598f0e9f288636728173ad |
class Order(models.Model): <NEW_LINE> <INDENT> item = models.ForeignKey(Item, related_name='orders') <NEW_LINE> purchase = models.ForeignKey(Purchase, related_name='orders') <NEW_LINE> price = models.DecimalField(max_digits=8, decimal_places=2) <NEW_LINE> quantity = models.IntegerField() <NEW_LINE> def __str__(self): <... | An order in the shop. | 62598f0e4527f215b58e8aae |
class MOUSEINPUT(ctypes.Structure): <NEW_LINE> <INDENT> _pack_ = 2 <NEW_LINE> _fields_ = [ ('dx', LONG), ('dy', LONG), ('mouseData', DWORD), ('dwFlags', DWORD), ('time', DWORD), ('dwExtraInfo', DWORD), ] | Needed for complete definition of INPUT structure - not used | 62598f0ea219f33f346c53e0 |
class IntegerListSetting(Setting): <NEW_LINE> <INDENT> def set_value(self, v): <NEW_LINE> <INDENT> self.value = unicode(v) <NEW_LINE> self.save() <NEW_LINE> <DEDENT> def get_value(self): <NEW_LINE> <INDENT> l = [] <NEW_LINE> for n in self.value.split(): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> l.append(int(n)) <NEW... | Setting storing integer values as strings | 62598f0f3617ad0b5ee04ce3 |
class ReplicasOperations(object): <NEW_LINE> <INDENT> models = models <NEW_LINE> def __init__(self, client, config, serializer, deserializer): <NEW_LINE> <INDENT> self._client = client <NEW_LINE> self._serialize = serializer <NEW_LINE> self._deserialize = deserializer <NEW_LINE> self.api_version = "2017-12-01" <NEW_LIN... | ReplicasOperations operations.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: The API version to use for the request. Constant value: "2017-12-01". | 62598f0fa05bb46b38489430 |
class CreateDisk(Endpoint): <NEW_LINE> <INDENT> ENDPOINTS = [(Verbs.POST, 'resources/disk')] <NEW_LINE> ALL_DATA = {'fetchParameters', 'when', 'skeletonDisk'} <NEW_LINE> REQUIRED_DATA = {'skeletonDisk'} <NEW_LINE> OPTIONAL_DATA = {'fetchParameters', 'when'} <NEW_LINE> DATA_TYPES = {'fetchParameters': cobjects.FetchPara... | FCO REST API createDisk endpoint.
This function will create a disk, and optionally attach it to a
server.
Remarks:
The call may be scheduled for a future date by setting the 'when'
parameter. On successful execution, a Job object will be returned.
On an exception, the resource is not created or attached.
Data (type ... | 62598f0f283ffb24f3cf2464 |
class LoggerCommand(BaseCommand): <NEW_LINE> <INDENT> name = 'fedmsg-logger' <NEW_LINE> extra_args = [ (['--message'], { 'dest': 'logger_message', 'help': "The message to send.", }), (['--json-input'], { 'dest': 'json_input', 'action': 'store_true', 'default': False, 'help': "Take each line of input as JSON.", }), (['-... | Emit log messages to the FI bus.
If the fedmsg-relay service is not running at the address specified in
the config, then this command will *hang* until that service becomes
available.
If --message is not specified, this command accepts messages from stdin.
Some examples::
$ echo '{"a": 1}' | fedmsg-logger --jso... | 62598f0fec188e330fdf746b |
class TestDeleteCustomerCardRequest(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 testDeleteCustomerCardRequest(self): <NEW_LINE> <INDENT> model = squareconnect.models.delete_customer_card_reques... | DeleteCustomerCardRequest unit test stubs | 62598f0f3d592f4c4edb9a9e |
class itkHConvexImageFilterIUS3IUS3(itkImageToImageFilterAPython.itkImageToImageFilterIUS3IUS3): <NEW_LINE> <INDENT> thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') <NEW_LINE> def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") <NEW... | Proxy of C++ itkHConvexImageFilterIUS3IUS3 class | 62598f0fdc8b845886d52180 |
class cardHundredNineteen(unittest.TestCase): <NEW_LINE> <INDENT> def testPlayable(self): <NEW_LINE> <INDENT> app = Labyrinth(1, 1, testBlankScenarioSetup) <NEW_LINE> self.assertTrue(app.deck["119"].playable("Jihadist", app)) <NEW_LINE> self.assertTrue(app.deck["119"].playable("US", app)) <NEW_LINE> <DEDENT> def testPu... | Saleh | 62598f0f60cbc95b06362eeb |
@ClassFactory.register(SearchSpaceType.CONNECTIONS) <NEW_LINE> class Cells(Module): <NEW_LINE> <INDENT> def __init__(self, desc, C_curr, C, auxiliary=False, auxiliary_layer=0): <NEW_LINE> <INDENT> super(Cells, self).__init__() <NEW_LINE> self.C_prev_prev = C_curr <NEW_LINE> self.C_prev = C_curr <NEW_LINE> self.C_curr =... | Cells Connection. | 62598f0f283ffb24f3cf2465 |
class Collections(object): <NEW_LINE> <INDENT> interface.implements(ICollections) <NEW_LINE> component.adapts(IArticle) <NEW_LINE> def __init__(self, context): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> <DEDENT> def getCollections(self, **kwargs): <NEW_LINE> <INDENT> catalog = getToolByName(self.context, 'po... | Provider for collections contained in an article
| 62598f0f3617ad0b5ee04ce8 |
class Test_CityModel(unittest.TestCase): <NEW_LINE> <INDENT> def test_save(self): <NEW_LINE> <INDENT> test_state = {'updated_at': datetime(2017, 2, 12, 00, 31, 50, 331997), 'id': "001", 'created_at': datetime(2017, 2, 12, 00, 31, 55, 331997), 'name': "TEST STATE FOR CITY"} <NEW_LINE> state = State(test_state) <NEW_LINE... | Test the city model class | 62598f0fbf627c535bcb0031 |
class SMTMatchMED(SMTMatchAttribute): <NEW_LINE> <INDENT> def __init__(self, value, announcements, ctx): <NEW_LINE> <INDENT> super(SMTMatchMED, self).__init__('med', value, announcements, ctx) <NEW_LINE> <DEDENT> def get_config(self): <NEW_LINE> <INDENT> return MatchMED(self.value.get_value()) | Short cut to match on Announcement.med | 62598f0fff9c53063f519219 |
class TestBasic(TestSetup): <NEW_LINE> <INDENT> def test_root(self): <NEW_LINE> <INDENT> response = self.app.test_client().get("/") <NEW_LINE> self.assertEqual(response.status_code, 200) <NEW_LINE> <DEDENT> def test_ping(self): <NEW_LINE> <INDENT> response = self.app.test_client().get("/ping") <NEW_LINE> self.assertEqu... | Basic default tests. | 62598f0f50812a4eaa6201c9 |
class TestPositionalsNargs2(ParserTestCase): <NEW_LINE> <INDENT> argument_signatures = [Sig('foo', nargs=2)] <NEW_LINE> failures = ['', 'a', '-x', 'a b c'] <NEW_LINE> successes = [ ('a b', NS(foo=['a', 'b'])), ] | Test a Positional that specifies an nargs of 2 | 62598f0fec188e330fdf746f |
class UserModuleAuthUI(QWidget): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(UserModuleAuthUI, self).__init__(*args, **kwargs) <NEW_LINE> self.current_user_id = None <NEW_LINE> main_layout = QVBoxLayout() <NEW_LINE> info_layout = QHBoxLayout() <NEW_LINE> info_layout.addWidget(QLab... | 用户模块权限管理 | 62598f0f8a349b6b43684dfe |
class MethodNames(enum.Enum): <NEW_LINE> <INDENT> ConfigureSimulator = "ConfigureSimulator" <NEW_LINE> CreatePool = "CreatePool" <NEW_LINE> DestroyPool = "DestroyPool" <NEW_LINE> GetCacheObjectPath = "GetCacheObjectPath" <NEW_LINE> GetDevObjectPath = "GetDevObjectPath" <NEW_LINE> GetDevTypes = "GetDevTypes" <NEW_LINE> ... | The method names of the manager interface. | 62598f0f97e22403b3839a9d |
class HtmlNode(Mu): <NEW_LINE> <INDENT> inline_tags = semantics.phrasing_tags <NEW_LINE> void_tags = semantics.void_tags <NEW_LINE> ws_sensitive_tags = semantics.ws_sensitive_tags <NEW_LINE> tag_types:Dict[str,Type[Mu]] = {} <NEW_LINE> @classmethod <NEW_LINE> def parse(Class:Type[_Mu], source:_AnyStr, **kwargs:Any) -> ... | Abstract HTML node; root class of the hierarchy. For the HTML tag, use `Html`. | 62598f0f956e5f7376df4c5a |
class Ipv6ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'primary_peer_address_prefix': {'key': 'primaryPeerAddressPrefix', 'type': 'str'}, 'secondary_peer_address_prefix': {'key': 'secondaryPeerAddressPrefix', 'type': 'str'}, 'microsoft_peering_config': {'key': 'mi... | Contains IPv6 peering config.
:param primary_peer_address_prefix: The primary address prefix.
:type primary_peer_address_prefix: str
:param secondary_peer_address_prefix: The secondary address prefix.
:type secondary_peer_address_prefix: str
:param microsoft_peering_config: The Microsoft peering configuration.
:type m... | 62598f0f31939e2706ed1040 |
class _model(type): <NEW_LINE> <INDENT> def __init__(cls, name, bases, adict): <NEW_LINE> <INDENT> cls._fields = {} <NEW_LINE> for (key, value) in adict.items(): <NEW_LINE> <INDENT> if isinstance(value, Field): <NEW_LINE> <INDENT> fdel_name = '_%s_fdel' % key <NEW_LINE> if fdel_name in adict.keys(): <NEW_LINE> <INDENT>... | Metaclass for Model. We parse Model instance namespace looking for Field
instances, every found instance is added to Model instance as a property.
Each field can have custom fset and fget functions, they are defined
as a function named _%field_{fset, fget}, where %field is name of the field.
Example:
class User(Model)... | 62598f0f7cff6e4e811b45a6 |
class TokenAuth(object): <NEW_LINE> <INDENT> def __init__(self, secret_key, realm=None): <NEW_LINE> <INDENT> def default_error_handler(): <NEW_LINE> <INDENT> return "Access Denied" <NEW_LINE> <DEDENT> self.token_manager = TokenManager(secret_key=secret_key) <NEW_LINE> self.realm = realm or "Authentication Token Require... | Authenticate a token
Takes X-Auth-Token header and extracts a user name value from it using a
given TokenManager. | 62598f0fec188e330fdf7471 |
class tokenView(CsrfExemptMixin, OAuthLibMixin, generics.GenericAPIView): <NEW_LINE> <INDENT> server_class = oauth2_settings.OAUTH2_SERVER_CLASS <NEW_LINE> validator_class = oauth2_settings.OAUTH2_VALIDATOR_CLASS <NEW_LINE> oauthlib_backend_class = OAuthLibCore <NEW_LINE> permission_classes = (permissions.AllowAny,) <N... | Provide access token for grant type 'password'. | 62598f0f4a966d76dd5eda91 |
class BinaryModel(BinaryModelBase): <NEW_LINE> <INDENT> def getScalingFactor(self): <NEW_LINE> <INDENT> return BinaryModelBase.getScalingFactor(self) <NEW_LINE> <DEDENT> def setScalingFactor(self, sf): <NEW_LINE> <INDENT> BinaryModelBase.setScalingFactor(self, sf) <NEW_LINE> <DEDENT> def fixScalingFactor(self): <NEW_LI... | Encapsulates a simple 2-state Markov model with scaling_factor
parameter, which whem multiplied by the edge length determines
the forward rate (state 0 -> 1), and a forward/reverse rate ratio,
rho, which when multiplied by both scaling_factor and the edge length
determines the reverse rate. | 62598f0f956e5f7376df4c5b |
class HEPCNNClassifier(nn.Module): <NEW_LINE> <INDENT> def __init__(self, input_shape, conv_sizes, dense_sizes, dropout): <NEW_LINE> <INDENT> super(HEPCNNClassifier, self).__init__() <NEW_LINE> conv_layers = [] <NEW_LINE> in_size = input_shape[0] <NEW_LINE> for conv_size in conv_sizes: <NEW_LINE> <INDENT> conv_layers.a... | HEP-CNN RPV classifier model. | 62598f0fadb09d7d5dc0916a |
class EvaluationEnvironment(patsy.eval.EvalEnvironment): <NEW_LINE> <INDENT> flags: int <NEW_LINE> _namespaces: List[Data] <NEW_LINE> def subset(self, _: Any) -> patsy.eval.EvalEnvironment: <NEW_LINE> <INDENT> return self.__class__(self._namespaces, self.flags) <NEW_LINE> <DEDENT> def eval(self, string: str, **_: Any) ... | Execution environment that parses SymPy expressions from strings and evaluates them at values from a data mapping
represented as a namespace. | 62598f0fdc8b845886d52186 |
class IgnoredField(HiddenField): <NEW_LINE> <INDENT> def _validate(self, value): <NEW_LINE> <INDENT> super(IgnoredField, self)._validate(value) <NEW_LINE> return twc.EmptyField | A hidden field. The value is never included in validated data. | 62598f0f851cf427c66b6e88 |
class ScorePeopleViewSet(viewsets.ViewSet): <NEW_LINE> <INDENT> permission_classes = (IsAuthenticated,) <NEW_LINE> def list(self, request): <NEW_LINE> <INDENT> to_score_project = request.query_params.get('to_score_project') <NEW_LINE> is_deal = request.query_params.get('is_deal', 0) <NEW_LINE> result = [] <NEW_LINE> us... | List:
查询当前用户需要打分的用户列表 | 62598f0f31939e2706ed1041 |
class Question: <NEW_LINE> <INDENT> question = "" <NEW_LINE> ans = "" <NEW_LINE> def __init__(self, question, choice, rand=True): <NEW_LINE> <INDENT> self.question = question <NEW_LINE> self.ans = choice[0] <NEW_LINE> self.choice = Choices(choice, rand) <NEW_LINE> <DEDENT> def askQuestion(self): <NEW_LINE> <INDENT> pri... | Question object assumes that the first multiple choice answer is the correct answer | 62598f0f377c676e912f6345 |
class EventViewSet(viewsets.ViewSet): <NEW_LINE> <INDENT> queryset = Event.objects.all() <NEW_LINE> permission_classes = (IsAuthenticated,) <NEW_LINE> def list(self, request): <NEW_LINE> <INDENT> events = EventFilterSet(request.query_params) <NEW_LINE> serializer = serializers.EventSerializer(events, many=True) <NEW_LI... | API V2: api/2/events/
api/2/events/:id/ | 62598f0fbe7bc26dc9251440 |
class BooleanType(wtypes.UserType): <NEW_LINE> <INDENT> basetype = wtypes.text <NEW_LINE> name = 'boolean' <NEW_LINE> @staticmethod <NEW_LINE> def validate(value): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return strutils.bool_from_string(value, strict=True) <NEW_LINE> <DEDENT> except ValueError as e: <NEW_LINE> <IN... | A simple boolean type. | 62598f0f0fa83653e46f3aa4 |
class FloatField(Control): <NEW_LINE> <INDENT> CMD = cmds.floatField <NEW_LINE> _ATTRIBS = ['editable', 'precision', 'value', 'maxValue', 'step', 'minValue'] <NEW_LINE> _CALLBACKS = ['changeCommand', 'dragCommand', 'enterCommand', 'receiveFocusCommand'] <NEW_LINE> _BIND_TRIGGER = 'changeCommand' <NEW_LINE> _BIND_SRC = ... | Wrapper class for cmds.floatField | 62598f0ffbf16365ca792c5e |
class ConversionActionServiceServicer(object): <NEW_LINE> <INDENT> def GetConversionAction(self, request, context): <NEW_LINE> <INDENT> context.set_code(grpc.StatusCode.UNIMPLEMENTED) <NEW_LINE> context.set_details('Method not implemented!') <NEW_LINE> raise NotImplementedError('Method not implemented!') <NEW_LINE> <DE... | Proto file describing the Conversion Action service.
Service to manage conversion actions. | 62598f0f4527f215b58e8ab8 |
@parser(Specs.hosts, [IsRhel6, IsRhel7]) <NEW_LINE> class ParseRhelAll(HostParser): <NEW_LINE> <INDENT> pass | Parser only processes content for Rhel 6, 7 Hosts, if not
Rhel 6, 7 the parser will not fire
Arguments:
hp (HostParser): Parser object for the custom parser in this
module. | 62598f0f97e22403b3839aa1 |
class UpdateGuard: <NEW_LINE> <INDENT> def __init__(self, name, dataIdentifier): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.dataIdentifier = dataIdentifier <NEW_LINE> self.messageAlarms = [] <NEW_LINE> self.periodicAlarms = [] <NEW_LINE> <DEDENT> def addAlarm(self, alarm): <NEW_LINE> <INDENT> if alarm.alarmTy... | !
Checking single update. | 62598f0f3346ee7daa336c43 |
class InstanceNotReadyException(Exception): <NEW_LINE> <INDENT> pass | Instance is not ready | 62598f0fad47b63b2c5a63d9 |
class PageList: <NEW_LINE> <INDENT> class Page: <NEW_LINE> <INDENT> TYPES = {'front', 'normal', 'special'} <NEW_LINE> def __init__(self, name, href, type='normal', klass=None, id=None): <NEW_LINE> <INDENT> self.name = str(name) <NEW_LINE> self.href = urlnormalize(href) <NEW_LINE> self.type = type if type in self.TYPES ... | Collection of named "pages" to mapped positions within an OEB data model
book's textual content.
Provides list-like access to the pages. | 62598f0f656771135c48824c |
class Config: <NEW_LINE> <INDENT> NEWS_API_BASE_URL = 'https://newsapi.org/v2/{}?language=en&category={}&sources={}&q={}&apiKey={}' <NEW_LINE> NEWS_API_KEY = os.environ.get('NEWS_API_KEY') | General configuration parent class | 62598f0f7cff6e4e811b45aa |
class Sentence(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.hash_value = '' <NEW_LINE> self.value = '' <NEW_LINE> self.splitted = [] <NEW_LINE> self.words = [] <NEW_LINE> self.matched = False <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return str(id(self)) <NEW_LINE> <DEDENT... | classdocs | 62598f0fbe7bc26dc9251441 |
class HassIO: <NEW_LINE> <INDENT> def __init__(self, loop, websession, ip): <NEW_LINE> <INDENT> self.loop = loop <NEW_LINE> self.websession = websession <NEW_LINE> self._ip = ip <NEW_LINE> <DEDENT> @_api_bool <NEW_LINE> def is_connected(self): <NEW_LINE> <INDENT> return self.send_command("/supervisor/ping", method="get... | Small API wrapper for Hass.io. | 62598f0f283ffb24f3cf246e |
class InvalidSearchFilter(SMCException): <NEW_LINE> <INDENT> pass | Thrown by collections when using invalid search sequences. | 62598f0f9f288636728173b9 |
class ExtractSchedulerSpecTask(CinderTask): <NEW_LINE> <INDENT> def __init__(self, db): <NEW_LINE> <INDENT> super(ExtractSchedulerSpecTask, self).__init__() <NEW_LINE> self.db = db <NEW_LINE> self.requires.update(['image_id', 'request_spec', 'snapshot_id', 'volume_id']) <NEW_LINE> self.provides.update(['request_spec'])... | Extracts a spec object from a partial and/or incomplete request spec.
Reversion strategy: N/A | 62598f0f4527f215b58e8aba |
class DataFetcher(): <NEW_LINE> <INDENT> def __init__(self, url=None, params=None): <NEW_LINE> <INDENT> self.url = url <NEW_LINE> self.params = params <NEW_LINE> self.data_requests = None <NEW_LINE> <DEDENT> def get_params(self): <NEW_LINE> <INDENT> return self.params <NEW_LINE> <DEDENT> def get_url(self): <NEW_LINE> <... | A class to fetch or download data from the url.
Inputs
======
url: str
The url of the archive or dataset
params: dict
The dict hosts required parameters, e.g., "Name": name
Methods
=======
get_params_update: update the params
get_url: get the constructed url
get_reponse: get data with 'requests.get' method
sa... | 62598f0f099cdd3c636749b8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.