code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Get_content_dynamic_module(Resource): <NEW_LINE> <INDENT> def get(self, user_name, subfolder): <NEW_LINE> <INDENT> return jsonify(manage_files.get_directory_content(manage_files.ret_path(user_name, 'Dinamico', subfolder,'\0'))) | Obtiene el contenido de los directorios generados por la ejecucion del modulo dinamico. | 62598f8c82261d6c5272fca6 |
class StreamInfoData(StreamInfoBase): <NEW_LINE> <INDENT> def __init__(self, file: str, data: Any): <NEW_LINE> <INDENT> super().__init__(file) <NEW_LINE> self._data = data <NEW_LINE> <DEDENT> @property <NEW_LINE> def data(self) -> Any: <NEW_LINE> <INDENT> return self._data | Contains information about results that are streamed back from ServiceX.
Used when data (`pandas` or `awkward`) is requested. The data is downloaded from
ServiceX, converted into the requested format, and then streamed to the user in these
chunks. There is a single chunk per file. | 62598f8c8da39b475be02d80 |
class AnonymousUserGetViewTestMixin(DatamadViewTestCase): <NEW_LINE> <INDENT> def test_anonymous_user(self): <NEW_LINE> <INDENT> if type(self) is AnonymousUserGetViewTestMixin: <NEW_LINE> <INDENT> self.skipTest("Dont run test on mixin") <NEW_LINE> <DEDENT> response = self.client.get(self.VIEW_URL) <NEW_LINE> self.asser... | Mixin to check that anonymous users are not able
to view the selected views.
Should be used with a DatamadViewTestCase | 62598f8cd4950a0f3b110c07 |
@attr.s(slots=True, frozen=True, eq=False, hash=False, str=False, auto_attribs=True) <NEW_LINE> class StatementSnippet(Snippet): <NEW_LINE> <INDENT> content: str <NEW_LINE> kind: Optional[str] <NEW_LINE> reads: FrozenSet[str] <NEW_LINE> writes: FrozenSet[str] <NEW_LINE> declares: FrozenSet[str] <NEW_LINE> requires_synt... | A snippet of code that may be inserted into a program. | 62598f8ca05bb46b3848a41d |
class InlineResponse20013(object): <NEW_LINE> <INDENT> swagger_types = { 'success': 'bool', 'payload': 'InlineResponse20013Payload' } <NEW_LINE> attribute_map = { 'success': 'success', 'payload': 'payload' } <NEW_LINE> def __init__(self, success=True, payload=None): <NEW_LINE> <INDENT> self._success = None <NEW_LINE> s... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 62598f8cf7d966606f747b80 |
@add_start_docstrings( BERT_START_DOCSTRING, BERT_INPUTS_DOCSTRING, ) <NEW_LINE> class TFBertForQuestionAnswering(TFBertPreTrainedModel): <NEW_LINE> <INDENT> def __init__(self, config, *inputs, **kwargs): <NEW_LINE> <INDENT> super().__init__(config, *inputs, **kwargs) <NEW_LINE> self.num_labels = config.num_labels <NEW... | Outputs: `Tuple` comprising various elements depending on the configuration (config) and inputs:
**start_scores**: ``Numpy array`` or ``tf.Tensor`` of shape ``(batch_size, sequence_length,)``
Span-start scores (before SoftMax).
**end_scores**: ``Numpy array`` or ``tf.Tensor`` of shape ``(batch_size, seq... | 62598f8c94891a1f408b94c0 |
class UserChangeForm(forms.ModelForm): <NEW_LINE> <INDENT> password = ReadOnlyPasswordHashField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = models.UserProfile <NEW_LINE> fields = ('email', 'password', 'name', 'is_admin') <NEW_LINE> <DEDENT> def clean_password(self): <NEW_LINE> <INDENT> return self.initial["pas... | A form for updating users. Includes all the fields on
the user, but replaces the password field with admin's
password hash display field. | 62598f8cb7558d58954631d7 |
class TestTypeGeneration(TestCase): <NEW_LINE> <INDENT> def test_simple(self): <NEW_LINE> <INDENT> dt = np.dtype('i') <NEW_LINE> out, format = sel.read_dtypes(dt, ()) <NEW_LINE> self.assertEqual(out, format) <NEW_LINE> self.assertEqual(out, np.dtype('i')) <NEW_LINE> <DEDENT> def test_simple_fieldexc(self): <NEW_LINE> <... | Internal feature: Determine output types from dataset dtype and fields. | 62598f8c15fb5d323ce7e8cf |
class TestKatexBlockEquationComponentTokenize(testing.MooseDocsTestCase): <NEW_LINE> <INDENT> EXTENSIONS = [MooseDocs.extensions.core, MooseDocs.extensions.katex] <NEW_LINE> def testToken(self): <NEW_LINE> <INDENT> ast = self.ast(u'\\begin{equation}\nfoo\n\\end{equation}') <NEW_LINE> self.assertIsInstance(ast(0), token... | Test tokenization of KatexBlockEquationComponent | 62598f8c0a50d4780f704f72 |
class MasteryLog(BaseLogModel): <NEW_LINE> <INDENT> morango_model_name = "masterylog" <NEW_LINE> user = models.ForeignKey(FacilityUser) <NEW_LINE> summarylog = models.ForeignKey(ContentSummaryLog, related_name="masterylogs") <NEW_LINE> mastery_criterion = JSONField(default={}) <NEW_LINE> start_timestamp = DateTimeTzFie... | This model provides a summary of a user's engagement with an assessment within a mastery level | 62598f8cd6c5a102081e1ce6 |
class InvalidCredentialsException(TwitchException): <NEW_LINE> <INDENT> pass | An authentication error occurred because of bad credentials. | 62598f8c91af0d3eaad399a2 |
class FileSolutionQueryByTaskIdAPIDemo(object): <NEW_LINE> <INDENT> API_URL = "http://as-file.dun.163.com/v1/file/query" <NEW_LINE> VERSION = "v1.1" <NEW_LINE> def __init__(self, secret_id, secret_key): <NEW_LINE> <INDENT> self.secret_id = secret_id <NEW_LINE> self.secret_key = secret_key <NEW_LINE> <DEDENT> def gen_si... | 文档解决方案结果获取接口 | 62598f8c8e71fb1e983bb654 |
class StreamSensorDataInputSet(InputSet): <NEW_LINE> <INDENT> def set_Async(self, value): <NEW_LINE> <INDENT> super(StreamSensorDataInputSet, self)._set_input('Async', value) <NEW_LINE> <DEDENT> def set_ClientID(self, value): <NEW_LINE> <INDENT> super(StreamSensorDataInputSet, self)._set_input('ClientID', value) <NEW_L... | An InputSet with methods appropriate for specifying the inputs to the StreamSensorData
Choreo. The InputSet object is used to specify input parameters when executing this Choreo. | 62598f8c8a43f66fc4bf1d28 |
class _FastFieldUsageChecker(_FieldUsageCheckerBase): <NEW_LINE> <INDENT> def __init__(self, indented_writer, fields): <NEW_LINE> <INDENT> super(_FastFieldUsageChecker, self).__init__(indented_writer) <NEW_LINE> self._writer.write_line('std::bitset<%d> usedFields;' % (len(fields))) <NEW_LINE> bit_id = 0 <NEW_LINE> for ... | Check for duplicate fields, and required fields as needed.
Does not detect duplicate extra fields. Only works for strict parsers.
Generates code with a C++ std::bitset to maintain a record each field seen while parsing a
document. The std::bitset has O(1) lookup, and allocates a single int or similar on the stack. | 62598f8c1f037a2d8b9e3c7d |
class Dovecot(PluginBase): <NEW_LINE> <INDENT> def _define_subscription_regex(self): <NEW_LINE> <INDENT> self._subscriptionRegex = re.compile(' dovecot\:') <NEW_LINE> <DEDENT> def _define_data_regex(self): <NEW_LINE> <INDENT> self._dataRegex = [ re.compile(r'(?P<servicename_login>(imap|pop3)-login)') ] | Dovecot statistics plugin. | 62598f8c63b5f9789fe84d15 |
class BA: <NEW_LINE> <INDENT> def __init__(self, basis, data, sigma=None, setup=None): <NEW_LINE> <INDENT> self.M = len(basis) <NEW_LINE> self.N = len(data) <NEW_LINE> self.basis = basis <NEW_LINE> self.absc = data[:,0] <NEW_LINE> self.smpls = data[:,1] <NEW_LINE> if shape(data)[1] != 2 and sigma != None: <NEW_LINE> <I... | Implement the Bretthorst algorithm using a list of functions of the
nonlinear parameters and an array of abscissas, a data array (abscissas and
samples, with error sigmas as a 3rd dimension or as a separate, single sigma
value), and an optional setup function.
The setup function should take the nonlinear parameters as... | 62598f8cdc8b845886d5315c |
class TestLaTeX(unittest.TestCase): <NEW_LINE> <INDENT> def testHeading(self): <NEW_LINE> <INDENT> hd = Heading("# Das ist ein Titel #") <NEW_LINE> print(hd.run_to_output()) <NEW_LINE> hd = Heading("## Das ist ein untertile") <NEW_LINE> print(hd.run_to_output()) <NEW_LINE> return | TestLaTeX
=========
Information
-----------
Testcase for Latex render objects. Test every object once. Possible objects are:
- Heading
- Paragraph | 62598f8c07f4c71912baefe8 |
class Sqlite3Config(DriverConfig): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def get_options(cls): <NEW_LINE> <INDENT> return { "db_path": str, ConfigOption("connect_at_start", default=True): bool, } | Configuration object for
:py:class:`~testplan.testing.multitest.driver.sqlite.Sqlite3` resource. | 62598f8c23e79379d538c0a2 |
class Contains(object): <NEW_LINE> <INDENT> def __init__(self, item, msg=None): <NEW_LINE> <INDENT> self.item = item <NEW_LINE> self.msg = msg <NEW_LINE> <DEDENT> def __call__(self, v): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> check = self.item not in v <NEW_LINE> <DEDENT> except TypeError: <NEW_LINE> <INDENT> chec... | Validate that the given schema element is in the sequence being validated.
>>> s = Contains(1)
>>> s([3, 2, 1])
[3, 2, 1]
>>> with raises(ContainsInvalid, 'value is not allowed'):
... s([3, 2]) | 62598f8c8c0ade5d55dc345d |
class BotManager(models.Manager): <NEW_LINE> <INDENT> def get_bot_id_by_type(self, bot_type: int) -> int: <NEW_LINE> <INDENT> return self.get(bot_type=bot_type).id <NEW_LINE> <DEDENT> def get_bot_type_by_id(self, bot_id: int) -> int: <NEW_LINE> <INDENT> return self.get(bot_id=bot_id).bot_type | Класс менеджеров модели bot.
Содержит методы для автоматизированного соотнесения идентификаторов ботов
и обработчиков соответствующих социальных платформ. | 62598f8c16aa5153ce4000a8 |
class Filter(object): <NEW_LINE> <INDENT> def __init__(self, type, regex_list=None, description=None): <NEW_LINE> <INDENT> self.description = description <NEW_LINE> self.type = type <NEW_LINE> self.set_regex_list(regex_list) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "%s, %s filter with: %s" % (s... | Class represents a 'blacklist' or 'whitelist' filter type that can be
applied when syncing a local repository
regex_list is a list of regex strings to be applied to package 'filename'
(see below); if any regex matches, the Filter.test() will be true for
whitelists or false for blacklists
use the set_regex_list method... | 62598f8c26068e7796d4c501 |
class TestPlugin(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 testPlugin(self): <NEW_LINE> <INDENT> pass | Plugin unit test stubs | 62598f8c24f1403a92685680 |
class DiffHighlighter(E5GenericDiffHighlighter): <NEW_LINE> <INDENT> def __init__(self, doc): <NEW_LINE> <INDENT> super(DiffHighlighter, self).__init__(doc) <NEW_LINE> <DEDENT> def generateRules(self): <NEW_LINE> <INDENT> diffHeaderBold = self.makeFormat(fg=self.textColor, bg=self.headerColor, bold=True) <NEW_LINE> dif... | Class implementing a diff highlighter for Git. | 62598f8c442bda511e95c001 |
class ForemanTask(Entity, EntityReadMixin): <NEW_LINE> <INDENT> class Meta(object): <NEW_LINE> <INDENT> api_path = 'foreman_tasks/api/tasks' <NEW_LINE> server_modes = ('sat') <NEW_LINE> <DEDENT> def path(self, which=None): <NEW_LINE> <INDENT> if which == 'bulk_search': <NEW_LINE> <INDENT> return '{0}/bulk_search'.forma... | A representation of a Foreman task. | 62598f8c38b623060ffa8c3a |
class Hooks(idaapi.UI_Hooks): <NEW_LINE> <INDENT> def __init__(self, state, gui): <NEW_LINE> <INDENT> super(Hooks, self).__init__() <NEW_LINE> self.s = state <NEW_LINE> self.gui = gui <NEW_LINE> <DEDENT> def ready_to_run(self): <NEW_LINE> <INDENT> self.gui.show_windows() <NEW_LINE> <DEDENT> def updating_actions(self, c... | Class Hooks for BinCAT menu | 62598f8cd6c5a102081e1ce7 |
class WebExperiment(): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.pipe, pipe_child = Pipe() <NEW_LINE> self.proc = Process(target=train_process, kwargs={ 'pipe': pipe_child, 'exp_kwargs': kwargs }) <NEW_LINE> self.proc.start() <NEW_LINE> self.pipe.send(['gen_clip']) <NEW_LINE> self.last_... | Handle web-specific details of experiment management | 62598f8cfb3f5b602db47f83 |
class Paddle(GameObject): <NEW_LINE> <INDENT> def __init__(self, window, length, player = 1, diff = randrange(1,10)): <NEW_LINE> <INDENT> self.window = window <NEW_LINE> if type(window) != type(()): <NEW_LINE> <INDENT> self.width = window.getWidth() / 20 <NEW_LINE> self.height = window.getHeight() <NEW_LINE> <DEDENT> ... | class that controls the paddle objects for the pong game
| 62598f8c96565a6dacd2cd4a |
class Interpreter(NodeVisitor): <NEW_LINE> <INDENT> GLOBAL_SCOPE = {} <NEW_LINE> def __init__(self, parser): <NEW_LINE> <INDENT> self.parser = parser <NEW_LINE> <DEDENT> def interpret(self): <NEW_LINE> <INDENT> tree = self.parser.parse() <NEW_LINE> return self.visit(tree) <NEW_LINE> <DEDENT> def visit_program(self, nod... | Interpreter using node visitor pattern. | 62598f8c9b70327d1c57e943 |
class NoCandidatePeers(BaseHeliosError): <NEW_LINE> <INDENT> pass | Raised when there are no peers to send a request to | 62598f8cc432627299fa2b71 |
class ActionSpecification(GR1Specification): <NEW_LINE> <INDENT> def __init__(self, name = '', preconditions = {}): <NEW_LINE> <INDENT> super(ActionSpecification, self).__init__(spec_name = name, env_props = [], sys_props = []) <NEW_LINE> self.preconditions = preconditions <NEW_LINE> self.all_actions = list() <NEW_LINE... | LTL Specification containing the robot safety requirements and environment
assumptions that govern the activation and completion of the robot actions.
It does not handle topology-type formulas. Those require special treatment.
Arguments:
preconditions dict Dictionary encoding action preconditions.
Attributes:
p... | 62598f8c45492302aabfc07b |
class OSColumn(ToJSONCapable): <NEW_LINE> <INDENT> impl = String <NEW_LINE> def process_bind_param(self, value, dialect): <NEW_LINE> <INDENT> return super().process_bind_param(value.serialize(), dialect) <NEW_LINE> <DEDENT> def process_result_value(self, value, dialect): <NEW_LINE> <INDENT> os_info = super().process_re... | Enables OS class storage by encoding and decoding on the fly. | 62598f8c507cdc57c63a4934 |
class FlashLabel(Button): <NEW_LINE> <INDENT> def __init__(self, delay_time=0.5, **kwargs): <NEW_LINE> <INDENT> super(FlashLabel, self).__init__(**kwargs) <NEW_LINE> self.background_normal = '' <NEW_LINE> self.delay_time = delay_time <NEW_LINE> self.color = [1, 1, 1, 1] <NEW_LINE> self.background_color = [0, 0, 0, 0] <... | a label that flashes for delay_time=0.5 sec when text is added by
add_text. can be turned off with boolean do_flash | 62598f8c26068e7796d4c503 |
class BTCompanyActivateParams(object): <NEW_LINE> <INDENT> openapi_types = { 'plan_id': 'str', 'seats': 'int', 'user_id': 'str', 'payment_type': 'int' } <NEW_LINE> attribute_map = { 'plan_id': 'planId', 'seats': 'seats', 'user_id': 'userId', 'payment_type': 'paymentType' } <NEW_LINE> def __init__(self, plan_id=None, se... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually. | 62598f8c23e79379d538c0a5 |
class RewindingIO(Generic[I], AbstractContextManager): <NEW_LINE> <INDENT> def __init__(self, io: I): <NEW_LINE> <INDENT> self.io = io <NEW_LINE> self.rewind() <NEW_LINE> <DEDENT> def rewind(self): <NEW_LINE> <INDENT> self.io.seek(0) <NEW_LINE> <DEDENT> def __enter__(self) -> I: <NEW_LINE> <INDENT> return self.io <NEW_... | A self-rewinding (binary) IO.
Useful because there are a lot of places where a (usually temporary) file
is passed over a number of times. | 62598f8c24f1403a92685681 |
class ILaunchpadUsage(Interface): <NEW_LINE> <INDENT> official_answers = Bool( title=_('People can ask questions in Launchpad Answers'), required=True) <NEW_LINE> official_blueprints = Bool( title=_('This project uses blueprints'), required=True) <NEW_LINE> official_codehosting = Bool( title=_('Code for this project is... | How the project uses Launchpad. | 62598f8c66656f66f7d59f9e |
class Operation(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, 'origin': {'key': 'origin', 'type': 'str'}, 'properties': {'key': 'properties'... | REST API operation supported by resource provider.
:param name: Name of the operation with format: {provider}/{resource}/{operation}.
:type name: str
:param is_data_action: If the operation is a data action. (for data plane rbac).
:type is_data_action: bool
:param display: The object that describes the operation.
:typ... | 62598f8c7cff6e4e811b55b9 |
class LoadBalancerSku(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, name: Optional[Union[str, "LoadBalancerSkuName"]] = None, **kwargs ): <NEW_LINE> <INDENT> super(LoadBalancerSku, self).__init__(**kwargs) <NEW_LINE> self.... | SKU of a load balancer.
:param name: Name of a load balancer SKU. Possible values include: "Basic", "Standard".
:type name: str or ~azure.mgmt.network.v2020_03_01.models.LoadBalancerSkuName | 62598f8c38b623060ffa8c3c |
class PasswordAuth(BaseAuth): <NEW_LINE> <INDENT> provider = "password" <NEW_LINE> setupFields = [ ('password', str) ] <NEW_LINE> loginFields = [ ('email', str), ('password', str) ] <NEW_LINE> def getUser(self, email, password): <NEW_LINE> <INDENT> session = db.session <NEW_LINE> ua = None <NEW_LINE> try: <NEW_LINE> <I... | Standard hashed password login | 62598f8c0a50d4780f704f75 |
class ClassLevelDocumenter(Documenter): <NEW_LINE> <INDENT> def resolve_name(self, modname, parents, path, base): <NEW_LINE> <INDENT> if modname is None: <NEW_LINE> <INDENT> if path: <NEW_LINE> <INDENT> mod_cls = path.rstrip('.') <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> mod_cls = None <NEW_LINE> if hasattr(self.en... | Specialized Documenter subclass for objects on class level (methods,
attributes). | 62598f8c8da39b475be02d84 |
class Mass(Translational1D): <NEW_LINE> <INDENT> def __init__(self, name, m=1.0, x=None, xp=None, v=None, vp=None, a=None, f1=None, f2=None): <NEW_LINE> <INDENT> Translational1D.__init__(self, name, locals()) <NEW_LINE> self.eqs=[Eq(self.m*self.a, self.f1+self.f2), Eq(self.a, (self.v-self.vp)/dt), Eq(self.v, (self.x-se... | Mass concentrated at a point, which has translational motion | 62598f8cd53ae8145f918037 |
class MainHandler(webapp2.RequestHandler): <NEW_LINE> <INDENT> def get(self, *args): <NEW_LINE> <INDENT> self.response.write( "LOCAL" if self.app.config.get('is_local', False) else "GLOBAL" ) | Catches unsupported URLs. Tells if this instance is running locally or online. | 62598f8c6e29344779b001fb |
class Ball: <NEW_LINE> <INDENT> def __init__(self, color): <NEW_LINE> <INDENT> self.color = color <NEW_LINE> self.x = 0 <NEW_LINE> self.y = 0 <NEW_LINE> self.change_x = 0 <NEW_LINE> self.change_y = 0 | Class to keep track of a ball's location and vector. | 62598f8c498bea3a75a576cb |
class TransformerEncoder(EncoderBase): <NEW_LINE> <INDENT> def __init__(self, num_layers, d_model, heads, d_ff, dropout, attention_dropout, embeddings, max_relative_positions): <NEW_LINE> <INDENT> super(TransformerEncoder, self).__init__() <NEW_LINE> self.embeddings = embeddings <NEW_LINE> self.transformer = nn.ModuleL... | The Transformer encoder from "Attention is All You Need"
:cite:`DBLP:journals/corr/VaswaniSPUJGKP17`
.. mermaid::
graph BT
A[input]
B[multi-head self-attn]
C[feed forward]
O[output]
A --> B
B --> C
C --> O
Args:
num_layers (int): number of encoder layers
d_model (... | 62598f8cd7e4931a7ef3bc44 |
@paramunittest.parametrized(*user_center_xls) <NEW_LINE> class User_center(TestCase): <NEW_LINE> <INDENT> def setParameters(self,case_name,method,token,result,code,success,msg,account,attentionOtherCount_attentionMeCount,ableBalance,huoyanWallet): <NEW_LINE> <INDENT> self.case_name=str(case_name) <NEW_LINE> self.method... | 资讯查询接口 | 62598f8c0a50d4780f704f76 |
class BorisUserCreationForm(UserCreationForm): <NEW_LINE> <INDENT> def save(self, commit=True): <NEW_LINE> <INDENT> self.instance.is_staff = True <NEW_LINE> return super(BorisUserCreationForm, self).save(commit) | Set administration access to always ``True`` since whole app is based
on administration, right? | 62598f8c45492302aabfc07c |
class PurgeEvent(PubSubEvent): <NEW_LINE> <INDENT> pass | A publish-subscribe event that signifies the purging of a node. | 62598f8c7b25080760ed7052 |
class DeleteMountTargetRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.FileSystemId = None <NEW_LINE> self.MountTargetId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.FileSystemId = params.get("FileSystemId") <NEW_LINE> self.MountTargetId = ... | DeleteMountTarget请求参数结构体
| 62598f8cdc8b845886d53160 |
class IRepositoryManager(IIterableMapping): <NEW_LINE> <INDENT> redis = Attribute('Redis connection') | Utility for managing in-memory GIT-repositories
mapping repository URIs to repositories | 62598f8c435de62698e9b996 |
class DbStorePluginWidget(BaseDbStorePluginWidget): <NEW_LINE> <INDENT> theme_uid = UID <NEW_LINE> view_entries_icon_class = 'fi-list' <NEW_LINE> export_entries_icon_class = 'fi-page-export' <NEW_LINE> view_saved_form_data_entries_template_name = 'db_store_foundation5_widget/view_saved_form_data_entries.html' | DbStore plugin widget for Foundation 5. | 62598f8c004d5f362081edcd |
class AciN9KServiceList(NxosServiceList): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.execute = aci_svc.Execute <NEW_LINE> self.reload = aci_svc.Reload <NEW_LINE> self.configure = aci_svc.Configure <NEW_LINE> self.attach_console = aci_svc.AttachModuleConsole | aci services. | 62598f8c23e79379d538c0a7 |
class ImageLabel(tkinter.Label): <NEW_LINE> <INDENT> def load(self, im): <NEW_LINE> <INDENT> if isinstance(im, str): <NEW_LINE> <INDENT> im = Image.open(im) <NEW_LINE> frames = [] <NEW_LINE> <DEDENT> try: <NEW_LINE> <INDENT> for i in count(1): <NEW_LINE> <INDENT> frames.append(ImageTk.PhotoImage(im.copy())) <NEW_LINE> ... | A Label that displays images, and plays them if they are gifs
:im: A PIL Image instance or a string filename | 62598f8c82261d6c5272fca9 |
class RackspaceArchImage(Image): <NEW_LINE> <INDENT> images = {"Arch 2015.7 (PVHVM)": {"minRam": 512, "minDisk": 20, "OS-DCF:diskConfig": "MANUAL", "OS-EXT-IMG-SIZE:size": Image.image_size(), "id": Image.image_id()}} <NEW_LINE> def metadata_json(self): <NEW_LINE> <INDENT> return { "flavor_classes": "*,!onmetal", "image... | A Rackspace Arch image object representation | 62598f8c0fa83653e46f4a97 |
class domain_transform(object): <NEW_LINE> <INDENT> def __init__(self, mapping, affine): <NEW_LINE> <INDENT> self.mapping = mapping <NEW_LINE> self.affine = affine <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return self.mapping == other.mapping and self.affine == other.affine | Simple helper class to keep track of transform variables to test for
equality | 62598f8c6aa9bd52df0d4a78 |
class Stack(object,ICollection,IEnumerable,ICloneable): <NEW_LINE> <INDENT> def Clear(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def Clone(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def Contains(self,obj): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def CopyTo(self,array,index): <NEW_LINE> <INDENT> p... | Represents a simple last-in-first-out (LIFO) non-generic collection of objects.
Stack()
Stack(initialCapacity: int)
Stack(col: ICollection) | 62598f8cfb3f5b602db47f85 |
class ThreadProcCounter: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.path = Path(tmpdir_factory.mktemp("base")) <NEW_LINE> <DEDENT> def get_log_name(self): <NEW_LINE> <INDENT> proc = psutil.Process().pid <NEW_LINE> thread = threading.get_ident() <NEW_LINE> return self.path / f"{proc}_{thread}.txt" ... | Sample class to log current thread/proc. | 62598f8cb830903b9686e246 |
class UserSettingsSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> first_name = serializers.CharField(required=False, max_length=30) <NEW_LINE> last_name = serializers.CharField(required=False, max_length=30) <NEW_LINE> token = serializers.Field(source='token') <NEW_LINE> class Meta: <NEW_LINE> <INDENT> mod... | Serializer that handles user settings endpoint. | 62598f8cf7d966606f747b87 |
class Solution: <NEW_LINE> <INDENT> def numIslands(self, grid): <NEW_LINE> <INDENT> if not grid or not grid[0]: <NEW_LINE> <INDENT> return 0 <NEW_LINE> <DEDENT> count = 0 <NEW_LINE> for i in range(len(grid)): <NEW_LINE> <INDENT> for j in range(len(grid[0])): <NEW_LINE> <INDENT> if grid[i][j] == "1": <NEW_LINE> <INDENT>... | @param grid: a boolean 2D matrix
@return: an integer
@ Time: O(m*n) Space O(1)
@ DFS | 62598f8cd99f1b3c44d05252 |
class Dataset(base.ImageDataset): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def num_train_examples(): return 60000 <NEW_LINE> @staticmethod <NEW_LINE> def num_test_examples(): return 10000 <NEW_LINE> @staticmethod <NEW_LINE> def num_classes(): return 10 <NEW_LINE> @staticmethod <NEW_LINE> def get_train_set(use_augme... | The MNIST dataset. | 62598f8c76d4e153a661c7bf |
class UserProfileCreateView(FormView): <NEW_LINE> <INDENT> http_method_names = [u'get', u'post'] <NEW_LINE> def get(self, request): <NEW_LINE> <INDENT> current_user = request.user <NEW_LINE> if current_user.is_anonymous(): <NEW_LINE> <INDENT> form = UserProfileCreateForm() <NEW_LINE> response = render(request, 'sign_up... | Class for User registration view. | 62598f8c07d97122c4216851 |
class Path: <NEW_LINE> <INDENT> raw_data = os.getcwd() + "\\materials\\raw_data.csv" <NEW_LINE> features = os.getcwd() + "\\materials\\features.pkl" <NEW_LINE> labels = os.getcwd() + "\\materials\\labels.pkl" <NEW_LINE> lexicon = os.getcwd() + "\\lexicon.pkl" <NEW_LINE> dir_dataset = os.getcwd() + "\\dataset" <NEW_LINE... | Locations of the various essential files. | 62598f8c0a50d4780f704f78 |
class Packet(BasePacket): <NEW_LINE> <INDENT> def can_handle(self, data): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> def parse(self, data): <NEW_LINE> <INDENT> packet_length = data[0] <NEW_LINE> packet_type = data[1] <NEW_LINE> sub_type = data[2] <NEW_LINE> return { 'packet_length': packet_length, 'packet_type... | The Packet class is a base class that can be used for all data packets.
It is a dumb class that accepts any data and doesn't validate it. However,
it means that unrecognised packets can be handled in a similar way to those
that are seen to be from a particular type of device. | 62598f8c45492302aabfc07e |
class MLPLayer(object): <NEW_LINE> <INDENT> def __init__(self, n_nodes, input_layer=None, act_func=default_act_func): <NEW_LINE> <INDENT> self.n_nodes = n_nodes <NEW_LINE> self.n_outputs = n_nodes + 1 <NEW_LINE> self.outputs = np.zeros(self.n_outputs, dtype=np.float) <NEW_LINE> self.outputs[0] = 1.0 <NEW_LINE> self.inp... | Multi-layer perceptron neural network layer class
Arguments:
n_nodes -- the number of nodes in the layer (excluding the
bias term).
Keyword arguments:
input_layer -- a reference to an MLPLayer object that provides
the inputs to this layer. If this layer is the
network's input... | 62598f8cc432627299fa2b75 |
class RemoteNotConnected(RemoteError): <NEW_LINE> <INDENT> pass | Raise if a request need connection and we are not ready. | 62598f8cdd821e528d6d8ae5 |
class analysis: <NEW_LINE> <INDENT> def __init__(self, merged, year): <NEW_LINE> <INDENT> self.merged = merged <NEW_LINE> self.year = year <NEW_LINE> <DEDENT> def histogram_by_region(self): <NEW_LINE> <INDENT> for region in self.merged['Region'].unique(): <NEW_LINE> <INDENT> plt.hist(self.merged[self.merged["Region"]==... | Provide a class that draws histograms and boxplots to explore
the distribution of the income per person by region for a given year,
and save figures to files | 62598f8cb5575c28eb712a9e |
class ChangeRecipientMilter(Milter.Base): <NEW_LINE> <INDENT> mapping = {'test@whyscream.net': 'tom@whyscream.net'} <NEW_LINE> replacements = [] <NEW_LINE> def envrcpt(self, rcpt, *params): <NEW_LINE> <INDENT> if params: <NEW_LINE> <INDENT> logger.info("Received recipient address '{}' with params '{}'".format(rcpt, " "... | An e-mail milter that changes the envelope recipient of messages passed trough it.
The milter can be used to redirect messages from one user to another, or from
spamtrap address to a single spam storage account. | 62598f8ca79ad16197769c0e |
@admin.register(User) <NEW_LINE> class UserAdmin(DjangoUserAdmin): <NEW_LINE> <INDENT> fieldsets = ( (None, {'fields': ('email', 'password',)}), (_('Personal info'), {'fields': ('name', 'phone','isBest')}), (_('Permissions'), {'fields': ('is_active', 'is_staff', 'is_superuser', 'groups', 'user_permissions')}), (_('Impo... | Define admin model for custom User model with no email field. | 62598f8c8e05c05ec3f6ec1d |
class StructuralVariation(Mutation): <NEW_LINE> <INDENT> id = Column(Integer, ForeignKey("mutation.id"), primary_key=True) <NEW_LINE> chrom1 = Column(String(length=50)) <NEW_LINE> pos1 = Column(Integer) <NEW_LINE> strand1 = Column(String(length=1)) <NEW_LINE> chrom2 = Column(String(length=50)) <NEW_LINE> pos2 = Column(... | Model for structural variations | 62598f8c5f7d997b871f91ae |
class PluginConfig(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__ids = [] <NEW_LINE> self.__plugin_names = {} <NEW_LINE> self.__argstrs = {} <NEW_LINE> self.__orderings = {} <NEW_LINE> <DEDENT> def __default_id(self, plugin_name): <NEW_LINE> <INDENT> id = plugin_name <NEW_LINE> i = 1 <NEW_... | Store plugin configuration | 62598f8c8c0ade5d55dc3460 |
class Parameters(object): <NEW_LINE> <INDENT> def __init__(self, md): <NEW_LINE> <INDENT> val = md.find(util.nspath_eval('dif:Category', namespaces)) <NEW_LINE> self.category = util.testXMLValue(val) <NEW_LINE> val = md.find(util.nspath_eval('dif:Topic', namespaces)) <NEW_LINE> self.topic = util.testXMLValue(val) <NEW_... | Process Parameters | 62598f8c596a897236127820 |
class Ridge(Regressor): <NEW_LINE> <INDENT> def __init__(self, intercept=0, coefs=[], alpha=1.0, verbose=False): <NEW_LINE> <INDENT> self.intercept = intercept <NEW_LINE> self.coefs = coefs <NEW_LINE> self.alpha = alpha <NEW_LINE> self.verbose = verbose <NEW_LINE> <DEDENT> def fit(self, X, y): <NEW_LINE> <INDENT> X, y ... | L2 regularized Linear Regression model.
Ridge regression is a way to create a parsimonious model when the number
of predictor variables in a set exceeds the number of observations, or
when a data set has multicollinearity (correlations between predictor variables).
Parameters:
-----------
intercept : float number, op... | 62598f8c66656f66f7d59fa2 |
class DuplicateGroupsIgen(object): <NEW_LINE> <INDENT> def __init__(self, pytfpath, duplicates_fpath, tname=None, min_vids=1): <NEW_LINE> <INDENT> self.pytables_gen = PyTablesDaoIterator(pytfpath, tname) <NEW_LINE> self.duplicates_fpath = duplicates_fpath <NEW_LINE> self.min_vids = min_vids <NEW_LINE> <DEDENT> def __it... | Given a h5 PyTables VideoDAO file and a file with a list of duplicate videos
(one group of duplicates per line), this generator will yield the referrer
information for each group. | 62598f8c38b623060ffa8c40 |
class ApiListCronJobApprovalsHandlerTest(api_test_lib.ApiCallHandlerTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(ApiListCronJobApprovalsHandlerTest, self).setUp() <NEW_LINE> self.handler = user_plugin.ApiListCronJobApprovalsHandler() <NEW_LINE> <DEDENT> def testRendersRequestedCronJobApproval(s... | Test for ApiListCronJobApprovalsHandler. | 62598f8c596a897236127821 |
class GitTreeEntryRef(Model): <NEW_LINE> <INDENT> _attribute_map = { 'git_object_type': {'key': 'gitObjectType', 'type': 'object'}, 'mode': {'key': 'mode', 'type': 'str'}, 'object_id': {'key': 'objectId', 'type': 'str'}, 'relative_path': {'key': 'relativePath', 'type': 'str'}, 'size': {'key': 'size', 'type': 'long'}, '... | GitTreeEntryRef.
:param git_object_type: Blob or tree
:type git_object_type: object
:param mode: Mode represented as octal string
:type mode: str
:param object_id: SHA1 hash of git object
:type object_id: str
:param relative_path: Path relative to parent tree object
:type relative_path: str
:param size: Size of conten... | 62598f8c6e29344779b00200 |
class ContactsViewTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> user_details = { 'username': 'test_user@demo.com', 'password': 'test_pass', 'email': 'test_user@demo.com', 'first_name': 'Johnny', 'last_name': 'Energy', } <NEW_LINE> self.user = User.objects.create_user(**user_details) <NEW_LIN... | Tests of the SEED project views: get_project, get_projects, create_project,
delete_project, update_project, add_buildings_to_project,
remove_buildings_from_project, get_project_count | 62598f8cd4950a0f3b110c0b |
class ArchiveContainer(BaseArchive): <NEW_LINE> <INDENT> implements(IWeblogArchiveContainer) <NEW_LINE> def __init__(self, id): <NEW_LINE> <INDENT> self.id = str(id) <NEW_LINE> self._years = None <NEW_LINE> super(ArchiveContainer, self).__init__(self, id) <NEW_LINE> <DEDENT> def getId(self): <NEW_LINE> <INDENT> return ... | >>> from zope.interface.verify import verifyClass
>>> verifyClass(IWeblogArchive, ArchiveContainer)
True | 62598f8ca05bb46b3848a426 |
class KNearestNeighbor(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def train(self, X, y): <NEW_LINE> <INDENT> self.X_train = X <NEW_LINE> self.y_train = y <NEW_LINE> <DEDENT> def predict(self, X, k=1, num_loops=0): <NEW_LINE> <INDENT> if num_loops == 0: <NEW_LINE> <INDE... | a kNN classifier with L2 distance | 62598f8cd6c5a102081e1cee |
class Counterexample(): <NEW_LINE> <INDENT> def __init__(self, text: str, *, created: datetime = None, updated: datetime = None) -> None: <NEW_LINE> <INDENT> self.text = text <NEW_LINE> self.created = created <NEW_LINE> self.updated = updated <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_dict(cls, _dict: Dict) -... | Counterexample.
:attr str text: The text of a user input marked as irrelevant input. This string
must conform to the following restrictions:
- It cannot contain carriage return, newline, or tab characters.
- It cannot consist of only whitespace characters.
:attr datetime created: (optional) The times... | 62598f8c8e71fb1e983bb65c |
class ShowOspfDatabaseLsaidDetail(ShowOspfDatabaseAdvertisingRouterSelfDetail): <NEW_LINE> <INDENT> cli_command = 'show ospf database lsa-id {ipaddress} detail' <NEW_LINE> def cli(self, output=None, ipaddress=None): <NEW_LINE> <INDENT> if not output: <NEW_LINE> <INDENT> out = self.device.execute( self.cli_command.forma... | Parser for:
- show ospf database lsa-id {ipaddress} detail | 62598f8c9b70327d1c57e949 |
class Category(object): <NEW_LINE> <INDENT> def __init__(self,params): <NEW_LINE> <INDENT> self.name = params.get('media$name',None) <NEW_LINE> self.scheme = params.get('media$scheme',None) <NEW_LINE> <DEDENT> def getFeed(self,feedId = config.ALLDATA_FEEDID): <NEW_LINE> <INDENT> from Feed import Feed <NEW_LINE> return ... | 62598f8cc432627299fa2b77 | |
class CsvCleanup( DatastoreContinuationFSMAction ): <NEW_LINE> <INDENT> def getQuery(self, context, obj): <NEW_LINE> <INDENT> counterKey = context[COUNTER_KEY_PARAM] <NEW_LINE> return CsvIntermediateResults.all(keys_only=True).ancestor(counterKey) <NEW_LINE> <DEDENT> def getBatchSize(self, context, obj): <NEW_LINE> <IN... | Cleans up all the intermediate data and counters | 62598f8cdd821e528d6d8ae7 |
class Connection(object): <NEW_LINE> <INDENT> transport_schema = 'http' <NEW_LINE> def __init__(self, host='localhost', port=9200, url_prefix='', timeout=10, **kwargs): <NEW_LINE> <INDENT> self.host = '%s://%s:%s' % (self.transport_schema, host, port) <NEW_LINE> if url_prefix: <NEW_LINE> <INDENT> url_prefix = '/' + url... | Class responsible for maintaining a connection to an Elasticsearch node. It
holds persistent connection pool to it and it's main interface
(`perform_request`) is thread-safe.
Also responsible for logging. | 62598f8c23e79379d538c0aa |
class itkAccumulateImageFilterID3ID3(itkImageToImageFilterAPython.itkImageToImageFilterID3ID3): <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++ itkAccumulateImageFilterID3ID3 class | 62598f8c435de62698e9b99b |
class Cookie(object): <NEW_LINE> <INDENT> attributes = [ ("Comment", "comment"), ("Domain", "domain"), ("Expires", "expires"), ("Max-Age", "maxage"), ("Path", "path"), ("Secure", "secure"), ("Version", "version"), ] <NEW_LINE> attribute_dict = dict(attributes) <NEW_LINE> def __init__( self, name, value, maxage=None, ex... | Represents an HTTP cookie.
See rfc2109, HTTP State Management Mechanism
>>> from pesto.cookie import Cookie
>>> c = Cookie('session_id', 'abc123')
>>> c.path = '/cgi-bin'
>>> c.domain = '.ucl.ac.uk'
>>> c.path
'/cgi-bin'
>>> print str(c)
session_id=abc123;Domain=.ucl.ac.uk;Path=/cgi-bin;Version=1 | 62598f8c004d5f362081edcf |
class Phone(AttrDict): <NEW_LINE> <INDENT> def __init__(self, voice, data): <NEW_LINE> <INDENT> self.voice = voice <NEW_LINE> super(Phone, self).__init__(data) <NEW_LINE> <DEDENT> def enable(self,): <NEW_LINE> <INDENT> return self.__call_forwarding() <NEW_LINE> <DEDENT> def disable(self): <NEW_LINE> <INDENT> return sel... | Wrapper for phone objects used for phone specific methods
Attributes are:
* id: int
* phoneNumber: i18n phone number
* formattedNumber: humanized phone number string
* we: data dict
* wd: data dict
* verified: bool
* name: strign label
* smsEnabled: bool
* scheduleSet: bool
* policyBitmask: int
* weekdayTim... | 62598f8c0c0af96317c55f38 |
class SQLAlchemyIndex (Index): <NEW_LINE> <INDENT> def __init__(self, database=None): <NEW_LINE> <INDENT> if database is None: <NEW_LINE> <INDENT> cfg = config.load() <NEW_LINE> database = cfg.sqlalchemy_index_database <NEW_LINE> <DEDENT> self._database = database <NEW_LINE> self._engine = sqlalchemy.create_engine(data... | Maintain an index of repository data
The index is a dictionary. The keys are
'{namespace}/{repository}' strings, and the values are description
strings. For example:
index['library/ubuntu'] = 'An ubuntu image...' | 62598f8c23e79379d538c0ab |
class Gene: <NEW_LINE> <INDENT> def __init__(self, my_placements: List[Tuple[int, int]]=None, enemy_placements: List[Tuple[int, int]]=None): <NEW_LINE> <INDENT> self.NUM_MY_PLACEMENTS = 11 <NEW_LINE> self.NUM_ENEMY_PLACEMENTS = 2 <NEW_LINE> self.MUTATION_CHANCE = 0.10 <NEW_LINE> self.ending_state: GameState = None <NEW... | Gene
A gene for the genetic algorithm.
Authors: Alex Hadi and Andrew Ripple
Date: November 9, 2018 | 62598f8cfbf16365ca793c5a |
class ArcEntity: <NEW_LINE> <INDENT> def __init__(self, start, end, center, radius, angdir): <NEW_LINE> <INDENT> self.startangle = start <NEW_LINE> self.endangle = end <NEW_LINE> self.center = center <NEW_LINE> self.radius = radius <NEW_LINE> self.angdir = angdir <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDEN... | Used in convert.bulge_to_cubic() since bulges define how much a straight polyline segment should be transformed to
an arc. ArcEntity is just used to call do.arc() without having a real Arc-Entity from dxfgrabber. | 62598f8c3617ad0b5ee05cf1 |
class PromptNewBuffer(object): <NEW_LINE> <INDENT> def __init__(self, ctx, force_new_buffer=False): <NEW_LINE> <INDENT> self.ctx = ctx <NEW_LINE> self.new_buffer = force_new_buffer or current_prefix_arg() == (4,) <NEW_LINE> <DEDENT> def __bool__(self): <NEW_LINE> <INDENT> return self.new_buffer <NEW_LINE> <DEDENT> def ... | An object to automatically handle current prefix arg in a prompt
to open in a new buffer. | 62598f8cd6c5a102081e1cef |
class _OrderedSet(collections.MutableSet): <NEW_LINE> <INDENT> def __init__(self, iterable=None): <NEW_LINE> <INDENT> self.end = end = [] <NEW_LINE> end += [None, end, end] <NEW_LINE> self.map = {} <NEW_LINE> if iterable is not None: <NEW_LINE> <INDENT> self |= iterable <NEW_LINE> <DEDENT> <DEDENT> def __len__(self): <... | This is taken from the OrderedSet recipe link in the Python 2 docs.
See:
- https://docs.python.org/2/library/collections.html
- https://code.activestate.com/recipes/576694/ | 62598f8c0a50d4780f704f7b |
class card19(unittest.TestCase): <NEW_LINE> <INDENT> def testPlayable(self): <NEW_LINE> <INDENT> app = Labyrinth(1, 1, testBlankScenarioSetup) <NEW_LINE> self.assertTrue(app.deck["19"].playable("US", app)) <NEW_LINE> <DEDENT> def testEvent(self): <NEW_LINE> <INDENT> app = Labyrinth(1, 1, testBlankScenarioSetup) <NEW_LI... | Kemalist Republic | 62598f8c4e696a045264dbdb |
class SimpleBand(object): <NEW_LINE> <INDENT> def __init__(self, size, dtype, initval=None): <NEW_LINE> <INDENT> self.size = size <NEW_LINE> if initval is None: <NEW_LINE> <INDENT> self._array = np.empty(size, dtype=dtype) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self._array = np.full(size, initval, dtype=dtype) <... | SimpleBand wraps a numpy.ndarray for storage. | 62598f8c45492302aabfc082 |
class TestCheckPackageTestCases(unittest.TestCase): <NEW_LINE> <INDENT> pass | Test cases for checking a package | 62598f8c91af0d3eaad399ac |
class DescribeWhiteBoxDeviceFingerprintsResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.DeviceFingerprints = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("DeviceFingerprints") is not None: <NEW_LINE>... | DescribeWhiteBoxDeviceFingerprints返回参数结构体
| 62598f8c1f037a2d8b9e3c87 |
class TestDurationInterval(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 testDurationInterval(self): <NEW_LINE> <INDENT> pass | DurationInterval unit test stubs | 62598f8c23849d37ff850c6c |
class VectorFieldData(object): <NEW_LINE> <INDENT> def __init__(self, name, numberOfComponents= 3, scaleFactor= 1.0): <NEW_LINE> <INDENT> super(VectorFieldData,self).__init__() <NEW_LINE> self.name= name <NEW_LINE> self.scaleFactor= scaleFactor <NEW_LINE> self.points= vtk.vtkPoints() <NEW_LINE> self.vectors= vtk.vtkDou... | Vectors defined at points. | 62598f8c435de62698e9b99c |
class CourseViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Course.objects.get_queryset().order_by('id') <NEW_LINE> serializer_class = CourseSerializer | API endpoint that allows courses to be viewed or edited. | 62598f8c73bcbd0ca4bc9dfd |
class SharedAdam(optim.Adam): <NEW_LINE> <INDENT> def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0): <NEW_LINE> <INDENT> super(SharedAdam, self).__init__(params, lr, betas, eps, weight_decay) <NEW_LINE> for group in self.param_groups: <NEW_LINE> <INDENT> for p in group['params']: <NEW_LI... | Implements Adam algorithm with shared states.
| 62598f8c435de62698e9b99d |
class QuotationColumn(column.LinkColumn): <NEW_LINE> <INDENT> header = IQuotation['quotation'].title <NEW_LINE> weight = 210 <NEW_LINE> def getLinkContent(self, item): <NEW_LINE> <INDENT> source = zope.component.createObject( item.source_type, item.quotation) <NEW_LINE> renderer = zope.component.getMultiAdapter( (remov... | The quotation. | 62598f8c596a897236127824 |
class ServeAPIView(APIView): <NEW_LINE> <INDENT> permission_classes = (AllowAny,) <NEW_LINE> def get(self, request, path): <NEW_LINE> <INDENT> return serve(request, path, document_root=settings.MEDIA_ROOT) | Serve api view | 62598f8c4e4d562566371fd3 |
class Asterisk(Marker): <NEW_LINE> <INDENT> __example__ = "tests/glyphs/Asterisk.py" | Render asterisk '*' markers. | 62598f8c009cb60464d010da |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.