code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class CmdPuiser(Commande): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Commande.__init__(self, "puiser", "draw") <NEW_LINE> self.nom_categorie = "objets" <NEW_LINE> self.schema = "<nom_objet>" <NEW_LINE> self.aide_courte = "puise de l'eau" <NEW_LINE> self.aide_longue = "Cette commande rem...
Commande 'puiser'
6259907899cbb53fe6832886
class FunctionalTestCase(ptc.FunctionalTestCase): <NEW_LINE> <INDENT> layer = bbb.plone <NEW_LINE> def afterSetUp(self): <NEW_LINE> <INDENT> self.loginAsPortalOwner() <NEW_LINE> roles = ('Member', 'Contributor') <NEW_LINE> self.portal.portal_membership.addMember('contributor', 'secret', roles, [])
We use this class for functional integration tests that use doctest syntax. Again, we can put basic common utility or setup code in here.
625990785fdd1c0f98e5f91e
class MetaResource(ABCMeta): <NEW_LINE> <INDENT> def __new__(cls, name, bases, body): <NEW_LINE> <INDENT> body['resource'] = name.lower() <NEW_LINE> return super().__new__(cls, name, bases, body)
Metaclass for Crossref Resources. Sets the `resources` attribute with __new__ constructor from class name.
6259907897e22403b383c8a3
class NN(DAGraph, ShowGraph): <NEW_LINE> <INDENT> def __init__(self, leaves, roots, create_connection=True): <NEW_LINE> <INDENT> nodes = self.get_subgraph(leaves, roots) <NEW_LINE> super(NN, self).__init__(nodes) <NEW_LINE> if create_connection: <NEW_LINE> <INDENT> self.create_connections() <NEW_LINE> <DEDENT> <DEDENT>...
神经网络 由若干起始节点和若干结束节点组成 ATTRIBUTE nodes : 神经元结点 METHOD forward(*args, **kwargs) : 前向传播 x, parameters --> y backward() : 反向传播 grad_upper_layer --> grad_this_layer, grad_params_this_layer optimize(lr, algorithm="SGD") : 应用相应的优化算法,更新参数的梯度 zero_grad() : 将所有结点的 _grad 清零,默认不清除 local_grad create_connections(): (初始化调用)将网络中所有有关...
62599078ec188e330fdfa248
class Condition(object): <NEW_LINE> <INDENT> def __init__(self, checks): <NEW_LINE> <INDENT> self.checks = checks <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return str(self.checks) <NEW_LINE> <DEDENT> def evaluate(self): <NEW_LINE> <INDENT> all_conditions_met = True <NEW_LINE> for entry in self.checks: ...
Keeps track of all of the necessary states of relevant components for its Event
625990782ae34c7f260aca88
class BookGenAddonProperties(bpy.types.PropertyGroup): <NEW_LINE> <INDENT> outline = BookGenShelfOutline() <NEW_LINE> def update_outline_active(self, context): <NEW_LINE> <INDENT> properties = context.scene.BookGenAddonProperties <NEW_LINE> if properties.outline_active and properties.active_shelf != -1: <NEW_LINE> <IND...
This store the current state of the bookGen add-on.
6259907855399d3f05627eb5
class User(models.Model): <NEW_LINE> <INDENT> phone = models.CharField(max_length=15, blank=True) <NEW_LINE> email = models.EmailField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> app_label = "mrwolfe" <NEW_LINE> <DEDENT> def __unicode__(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return self.contact.__unicode_...
Mr. Wolfe user
625990783539df3088ecdc39
class PurchaseRoad(PurchaseAction): <NEW_LINE> <INDENT> name = "purchase_road" <NEW_LINE> def __init__(self, data): <NEW_LINE> <INDENT> self.__data: Dict[str, object] = data <NEW_LINE> super().__init__(PurchaseRoad.name) <NEW_LINE> <DEDENT> @property <NEW_LINE> def data(self) -> Dict[str, object]: <NEW_LINE> <INDENT> r...
Example js to trigger this class: ws.send(JSON.stringify({'typeName':'action', 'group':'purchase', 'name':'purchase_road'}))
6259907876e4537e8c3f0f21
class InfiniteGenDict: <NEW_LINE> <INDENT> def __init__(self, Gens): <NEW_LINE> <INDENT> self._D = dict(zip([(hasattr(X,'_name') and X._name) or repr(X) for X in Gens],Gens)) <NEW_LINE> <DEDENT> def __cmp__(self,other): <NEW_LINE> <INDENT> if isinstance(other,InfiniteGenDict): <NEW_LINE> <INDENT> return cmp(self._D,oth...
A dictionary-like class that is suitable for usage in ``sage_eval``. The generators of an Infinite Polynomial Ring are not variables. Variables of an Infinite Polynomial Ring are returned by indexing a generator. The purpose of this class is to return a variable of an Infinite Polynomial Ring, given its string represe...
62599078091ae356687065dd
class ImplicitTape(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.tensors = {} <NEW_LINE> self.variables = {} <NEW_LINE> self.gradients = [] <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return self is other <NEW_LINE> <DEDENT> def __hash__(self): <NEW_LINE> <INDENT> return...
Global object which can watch tensors and wrap them with autograd.
625990788a349b6b43687bfd
class Revision(models.Model): <NEW_LINE> <INDENT> date_created = models.DateTimeField( db_index=True, verbose_name=_("date created"), help_text="The date and time this revision was created.", ) <NEW_LINE> user = models.ForeignKey( settings.AUTH_USER_MODEL, blank=True, null=True, on_delete=models.SET_NULL, verbose_name=...
A group of related serialized versions.
6259907871ff763f4b5e914e
class UsersTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.order = app <NEW_LINE> self.client = self.order.test_client <NEW_LINE> <DEDENT> def test_update_status(self): <NEW_LINE> <INDENT> results = self.client().put('/api/v2/order/2', content_type='application/json', data=json.du...
Users Test Case
625990787b180e01f3e49d36
class IntAttribute(Attribute): <NEW_LINE> <INDENT> def __init__(self, type_, name, long_value): <NEW_LINE> <INDENT> super(IntAttribute, self).__init__(type_, name) <NEW_LINE> self.long_value = long_value <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> str_attriute = 'Name: ' + str(self.name) <NEW_LINE> str...
The Attribute class for storing an integer attribute.
62599078e1aae11d1e7cf4e1
class Weakness(Effect): <NEW_LINE> <INDENT> def apply_effect(self): <NEW_LINE> <INDENT> self.stats['strength'] = max(self.stats['strength'] - 2, 1) <NEW_LINE> self.stats['endurance'] = max(self.stats['endurance'] - 2, 1)
. reduces strength, and endurance by 2
625990785166f23b2e244d7a
class Xci: <NEW_LINE> <INDENT> class CartType(enum.IntEnum): <NEW_LINE> <INDENT> GB1 = 0xfA <NEW_LINE> GB2 = 0xf8 <NEW_LINE> GB4 = 0xf0 <NEW_LINE> GB8 = 0xe0 <NEW_LINE> GB16 = 0xe1 <NEW_LINE> GB32 = 0xe2 <NEW_LINE> <DEDENT> def __init__(self, file_or_path: Union[File, str], parse: bool=False): <NEW_LINE> <INDENT> i...
Class representing an Xci
62599078ad47b63b2c5a91f2
class TomlFileUserOptionReader(AbstractUserOptionReader): <NEW_LINE> <INDENT> section_name = "importlinter" <NEW_LINE> potential_config_filenames = ["pyproject.toml"] <NEW_LINE> def _read_config_filename(self, config_filename: str) -> Optional[UserOptions]: <NEW_LINE> <INDENT> if not _HAS_TOML: <NEW_LINE> <INDENT> retu...
Reader that looks for and parses the contents of TOML files.
62599078aad79263cf43015c
class CNNRE(nn.Module): <NEW_LINE> <INDENT> def __init__(self, hidden_size, out_size, voc): <NEW_LINE> <INDENT> super(CNNRE, self).__init__() <NEW_LINE> pe_size = 10 <NEW_LINE> self.word_embedding = torch.nn.Embedding(voc.num_words, hidden_size) <NEW_LINE> self.pos_embedding = torch.nn.Embedding(300 * 2, pe_size) <NEW_...
CNN模型 1. 将index转换为embedding 2. 使用3*hidden_size的卷积核进行卷积 3. 进行max pooling 4. 与relation embedding 拼接后喂入全连接 5. 返回out
62599078a8370b77170f1d72
class Colormap(Choice): <NEW_LINE> <INDENT> _icons = {} <NEW_LINE> size = (32, 12) <NEW_LINE> def __init__(self, setn, document, parent): <NEW_LINE> <INDENT> names = sorted(ckeys(document.colormaps)) <NEW_LINE> icons = Colormap._generateIcons(document, names) <NEW_LINE> Choice.__init__(self, setn, True, names, parent, ...
Give the user a preview of colormaps. Based on Choice to make life easier
6259907892d797404e38982d
class BountyStage(Enum): <NEW_LINE> <INDENT> Draft = 0 <NEW_LINE> Active = 1 <NEW_LINE> Dead = 2
Python enum class that matches up with the Standard Bounties BountyStage enum. Attributes: Draft (int): Bounty is a draft. Active (int): Bounty is active. Dead (int): Bounty is dead.
625990783539df3088ecdc3b
class TemporalReference(object): <NEW_LINE> <INDENT> begin = None <NEW_LINE> end = None <NEW_LINE> publication = None <NEW_LINE> revision = None <NEW_LINE> creation = None <NEW_LINE> def __init__(self, begin, end, publication, revision, creation): <NEW_LINE> <INDENT> self.begin = begin <NEW_LINE> self.end = end <NEW_LI...
Element 16
62599078cc0a2c111447c7a3
class LatticeApply(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "retopo.latticeapply" <NEW_LINE> bl_label = "Apply E-Lattice and delete it" <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> bpy.ops.object.modifier_apply(apply_as='DATA', modifier="latticeeasytemp") <NEW_LINE> bpy.ops.object.select_patte...
Apply E-Lattice and delete it
6259907856ac1b37e63039b4
class MemberList(A10BaseClass): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.ERROR_MSG = "" <NEW_LINE> self.b_key = "member-list" <NEW_LINE> self.DeviceProxy = "" <NEW_LINE> self.status = "" <NEW_LINE> self.passive = "" <NEW_LINE> self.connect_success = "" <NEW_LINE> self.member_name = "" ...
This class does not support CRUD Operations please use parent. :param status: {"minLength": 1, "maxLength": 63, "type": "string", "format": "string"} :param passive: {"type": "number", "format": "number"} :param connect_success: {"type": "number", "format": "number"} :param member_name: {"minLength": 1, "maxLength": 6...
6259907860cbc95b06365a3f
class DatasetSubvolumeObj(Base): <NEW_LINE> <INDENT> __tablename__ = "dataset_subvolumes" <NEW_LINE> subvolume_id =PKColumn(sqlalchemy.Integer) <NEW_LINE> dataset_id = Column( sqlalchemy.Integer, ForeignKey(DatasetObj.dataset_id), doc="The parent dataset of the volume") <NEW_LINE> volume_id=Column( sqlalchemy.Integer, ...
each row is a subvolume within a dataset Note that a dataset subvolume might encompass the entire volume of the dataset.
6259907876e4537e8c3f0f23
class QLearningAgent(ReinforcementAgent): <NEW_LINE> <INDENT> def __init__(self, **args): <NEW_LINE> <INDENT> ReinforcementAgent.__init__(self, **args) <NEW_LINE> "*** YOUR CODE HERE ***" <NEW_LINE> self.q_values = util.Counter() <NEW_LINE> <DEDENT> def getQValue(self, state, action): <NEW_LINE> <INDENT> if not self.q_...
Q-Learning Agent Functions you should fill in: - computeValueFromQValues - computeActionFromQValues - getQValue - getAction - update Instance variables you have access to - self.epsilon (exploration prob) - self.alpha (learning rate) - self.discount (discount rate) Functions you should use - self.getLegalActions(sta...
62599078d486a94d0ba2d95c
class InstitutePricing(models.Model): <NEW_LINE> <INDENT> institution = models.OneToOneField(Institution, models.PROTECT, verbose_name=_('Institution')) <NEW_LINE> discount_rate = models.DecimalField(_('Discount rate'), max_digits=6, decimal_places=2, null=True, blank=True) <NEW_LINE> use_alt_pricing = models.BooleanFi...
base price discounts per institute
6259907816aa5153ce401e7f
class User(dict): <NEW_LINE> <INDENT> def __init__(self, dict=None): <NEW_LINE> <INDENT> for key in ['username', 'name', 'passphrase', 'email']: <NEW_LINE> <INDENT> self[key] = '' <NEW_LINE> <DEDENT> for key in ['groups']: <NEW_LINE> <INDENT> self[key] = [] <NEW_LINE> <DEDENT> if dict: <NEW_LINE> <INDENT> for key in di...
Every user must have keys for a username, name, passphrase (this is a md5 hash of the password), groups, and an email address. They can be blank or None, but the keys must exist.
625990785fdd1c0f98e5f922
class MechMode: <NEW_LINE> <INDENT> def __init__(self, confDict, mechMode_entry): <NEW_LINE> <INDENT> self.name = confDict[mechMode_entry]['name'] <NEW_LINE> self.type = confDict[mechMode_entry]['type'] <NEW_LINE> self.f0 = readentry(confDict,confDict[mechMode_entry]["f0"]) <NEW_LINE> self.Q = readentry(confDict,confDi...
Contains parameters specific to a mechanical mode. Information concerning couplings with electrical modes and Piezos is contained in ElecMode and Piezo objects respectively.
6259907832920d7e50bc79ed
class RoomsList(ListAPIView): <NEW_LINE> <INDENT> queryset = Room.objects.all() <NEW_LINE> serializer_class = RoomSerializer <NEW_LINE> def get(self, *args, **kwargs): <NEW_LINE> <INDENT> get_only_free_rooms = Room.objects.filter(room_status='Free').values() <NEW_LINE> return Response( get_only_free_rooms )
This serializer gives a list of available rooms for booking.
625990781b99ca4002290208
class MissingContainers(Exception): <NEW_LINE> <INDENT> def __init__(self, container_name): <NEW_LINE> <INDENT> self.message = f"No instance of {container_name} is running!" <NEW_LINE> super().__init__(self.message)
Exception raised when not one containers of expected type are running. Inspired from: https://www.programiz.com/python-programming/user-defined-exception :param container_name: Name of container image. message -- explanation of the error
62599078fff4ab517ebcf1bc
@profiler.trace_cls("rpc") <NEW_LINE> class Handler(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Handler, self).__init__() <NEW_LINE> <DEDENT> def sign_certificate(self, context, cluster, certificate): <NEW_LINE> <INDENT> LOG.debug("Creating self signed x509 certificate") <NEW_LINE> signed...
Magnum CA RPC handler. These are the backend operations. They are executed by the backend service. API calls via AMQP (within the ReST API) trigger the handlers to be called.
62599078a8370b77170f1d73
class SaleOrder(models.Model): <NEW_LINE> <INDENT> _inherit = 'sale.order' <NEW_LINE> commitment_date = fields.Datetime(compute='_compute_commitment_date', string='Commitment Date', store=True, help="Date by which the products are sure to be delivered. This is " "a date that you can promise to the customer, based on th...
Add several date fields to Sales Orders, computed or user-entered
6259907892d797404e38982e
class l1MHT: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def make_obj(tree): <NEW_LINE> <INDENT> _pt = getattr(tree, "l1MHT_pt", None) <NEW_LINE> _phi = getattr(tree, "l1MHT_phi", None) <NEW_LINE> return l1MHT(_pt, _phi) <NEW_LINE> <DEDENT> def __init__(self, pt,phi): <NEW_LINE> <INDENT> self.pt = pt <NEW_LINE> self.p...
625990788e7ae83300eeaa32
class PredicateRule(object): <NEW_LINE> <INDENT> __slots__ = ("predicate", "message_template") <NEW_LINE> def __init__(self, predicate, message_template=None): <NEW_LINE> <INDENT> self.predicate = predicate <NEW_LINE> self.message_template = message_template or _( "Required to satisfy validation predicate condition." )...
Fails if predicate return False. Predicate is any callable of the following contract:: def predicate(model): return True
625990782c8b7c6e89bd5190
class ReportItemForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = DailyReportItem <NEW_LINE> exclude = ('daily_report',) <NEW_LINE> <DEDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> kwargs.setdefault('label_suffix', '') <NEW_LINE> super(ReportItemForm, self).__init__(*ar...
Form class for adding ReportItem for a report as ther can be multiple work done by single person. He/she can add as many form entity required.
6259907867a9b606de547778
class CircleMarkerDetectionTask(TaskInterface): <NEW_LINE> <INDENT> zmq_ctx = None <NEW_LINE> capture_source_path = None <NEW_LINE> notify_all = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._process_pipe = None <NEW_LINE> self._progress = 0.0 <NEW_LINE> <DEDENT> @property <...
The actual marker detection is in launchabeles.marker_detector because OpenCV needs a new and clean process and does not work with forked processes. This task requests the start of the launchable via a notification and retrieves results from the background. It does _not_ run in background itself, but does its work in ...
62599078a05bb46b3848bdfd
class ConsultRecord(models.Model): <NEW_LINE> <INDENT> customer = models.ForeignKey('Customer', verbose_name="所咨询客户",on_delete=models.CASCADE) <NEW_LINE> note = models.TextField(verbose_name="跟进内容...") <NEW_LINE> status = models.CharField("跟进状态", max_length=8, choices=seek_status_choices, help_text="选择客户此时的状态") <NEW_LI...
跟进记录表
62599078627d3e7fe0e0882e
class TestMultiomeSummary(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.wd = tempfile.mkdtemp(suffix='TestMultiomeSummary') <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> if REMOVE_TEST_OUTPUTS: <NEW_LINE> <INDENT> shutil.rmtree(self.wd) <NEW_LINE> <DEDENT> <DEDENT> def ...
Tests for the 'MultiomeSummary' class
62599078a8370b77170f1d74
class AddItemImageView(RESTDispatch): <NEW_LINE> <INDENT> @user_auth_required <NEW_LINE> @admin_auth_required <NEW_LINE> def POST(self, request, item_id): <NEW_LINE> <INDENT> item = Item.objects.get(pk=item_id) <NEW_LINE> if "image" not in request.FILES: <NEW_LINE> <INDENT> raise RESTException("No image", 400) <NEW_LIN...
Saves a ItemImage for a particular Item on POST to /api/v1/item/<item id>/image.
62599078adb09d7d5dc0bf10
class CifcodcheckParser(CiffilterParser): <NEW_LINE> <INDENT> def _check_calc_compatibility(self,calc): <NEW_LINE> <INDENT> from aiida.common.exceptions import ParsingError <NEW_LINE> if not isinstance(calc,CifcodcheckCalculation): <NEW_LINE> <INDENT> raise ParsingError("Input calc must be a CifcodcheckCalculation") <N...
Specific parser for the output of cif_cod_check script.
6259907871ff763f4b5e9152
@final <NEW_LINE> @dataclass(frozen=True, slots=True) <NEW_LINE> class GetOrganizations(object): <NEW_LINE> <INDENT> _brreg_base_url: str <NEW_LINE> _get: Callable <NEW_LINE> _entities = 'enheter/' <NEW_LINE> _sub_entities = 'underenheter/' <NEW_LINE> _log = logging.getLogger('api.brreg.GetOrganizations') <NEW_LINE> de...
Get a list of organizations with the given criteria.
6259907897e22403b383c8a8
class radialBasisFunctions(object): <NEW_LINE> <INDENT> def __init__(self, stateSpace, meanList, varianceList): <NEW_LINE> <INDENT> self.stateSpace=self.stateSpaceGen(stateSpace) <NEW_LINE> self.meanList=meanList <NEW_LINE> self.varianceList=varianceList <NEW_LINE> <DEDENT> def stateSpaceGen(self,stateSpace): <NEW_LINE...
classdocs
6259907866673b3332c31da5
class ParcelProtectionQuoteRequestShipmentInfoParcelInfo(object): <NEW_LINE> <INDENT> openapi_types = { 'commodity_list': 'list[ParcelProtectionQuoteRequestShipmentInfoParcelInfoCommodityList]' } <NEW_LINE> attribute_map = { 'commodity_list': 'commodityList' } <NEW_LINE> def __init__(self, commodity_list=None, local_va...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually.
6259907899cbb53fe683288c
class EditCommentHandler(BlogHandler): <NEW_LINE> <INDENT> @post_exists <NEW_LINE> def post(self, post_id, post): <NEW_LINE> <INDENT> if not self.user: <NEW_LINE> <INDENT> return self.redirect("/signin") <NEW_LINE> <DEDENT> comment_data = self.request.get("comment") <NEW_LINE> comment_id = self.request.get("comment-id"...
Edit comment to post request handler If we receive request for a post that doesn't exist we would return 404
6259907801c39578d7f14408
class OWindow(Obit.OWindow): <NEW_LINE> <INDENT> def __init__(self) : <NEW_LINE> <INDENT> super(OWindow, self).__init__() <NEW_LINE> Obit.CreateOWindow (self.this) <NEW_LINE> <DEDENT> def __del__(self, DeleteOWindow=_Obit.DeleteOWindow): <NEW_LINE> <INDENT> if _Obit!=None: <NEW_LINE> <INDENT> DeleteOWindow(self.this) <...
Python Obit Image descriptor class This contains information about the Tables associated with an image or dataset Image Members with python interfaces: List - (virtual) Python list of table names and numbers
62599078e1aae11d1e7cf4e3
class RedirectMiddleware(BaseRedirectMiddleware): <NEW_LINE> <INDENT> def process_response(self, request, response, spider): <NEW_LINE> <INDENT> if (request.meta.get('dont_redirect', False) or response.status in getattr(spider, 'handle_httpstatus_list', []) or response.status in request.meta.get('handle_httpstatus_list...
Handle redirection of requests based on response status and meta-refresh html tag
6259907856ac1b37e63039b6
class ActiveProductManager(models.Manager): <NEW_LINE> <INDENT> def get_query_set(self): <NEW_LINE> <INDENT> return super(ActiveProductManager, self).get_query_set().filter(is_active=True)
Manager class to return only those products where each instance is active
62599078460517430c432d2d
class MyThread(Thread): <NEW_LINE> <INDENT> def __init__(self, group=None, target=None, name=None, args=(), kwargs={}, Verbose=None): <NEW_LINE> <INDENT> Thread.__init__(self, group, target, name, args, kwargs) <NEW_LINE> self._return = None <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> if self._target is not ...
defines the threads for multi threaded file search.
6259907867a9b606de547779
class AllSiteSearch(View): <NEW_LINE> <INDENT> pass
分apps 展示内容 提供连接
625990782ae34c7f260aca8e
class AuthAuditRemote(RemoteModel): <NEW_LINE> <INDENT> properties = ("id", "datasource_id", "date_time", "client_ip", "operation", "created_at", "updated_at", "record_id", "message", "field_changes", "user_name", "event_type", "DeviceID", )
The user audit log information defined within NetMRI. | ``id:`` The internal NetMRI identifier of this user audit log information. | ``attribute type:`` number | ``datasource_id:`` The internal NetMRI identifier for the collector NetMRI that collected this data record. | ``attribute type:`` number | ``date_tim...
625990784c3428357761bc60
class ApiKeys(handler_utils.AdminOnlyHandler): <NEW_LINE> <INDENT> @xsrf_utils.RequireToken <NEW_LINE> @handler_utils.RequirePermission(constants.PERMISSIONS.CHANGE_SETTINGS) <NEW_LINE> def post(self, key_name): <NEW_LINE> <INDENT> value = self.request.get('value', None) <NEW_LINE> if value is None: <NEW_LINE> <INDENT>...
Set/update the value of an API key.
62599078be7bc26dc9252b29
class Logout(View): <NEW_LINE> <INDENT> @method_decorator(login_required) <NEW_LINE> def get(self, request): <NEW_LINE> <INDENT> logout(request) <NEW_LINE> return redirect('top:index')
ログアウト処理を行うクラス
6259907863b5f9789fe86b0e
class PolicyType( str, MultiValueEnum ): <NEW_LINE> <INDENT> OAUTH_AUTHORIZATION_POLICY = "OAUTH_AUTHORIZATION_POLICY", "oauth_authorization_policy" <NEW_LINE> OKTA_SIGN_ON = "OKTA_SIGN_ON", "okta_sign_on" <NEW_LINE> PASSWORD = "PASSWORD", "password" <NEW_LINE> IDP_DISCOVERY = "IDP_DISCOVERY", "idp_discovery" <NEW_LINE...
An enumeration class for PolicyType.
625990787047854f46340d63
class MathModf(MathFunctionBase): <NEW_LINE> <INDENT> pass
modf(x) Return the fractional and integer parts of x. Both results carry the sign of x and are floats.
62599078796e427e53850123
class LogFile(object): <NEW_LINE> <INDENT> def __init__(self, name, append=False, developer=False, flush=True): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.append = append <NEW_LINE> self.developer = developer <NEW_LINE> self.flush = flush <NEW_LINE> self.file = None <NEW_LINE> self.softspace = 0 <NEW_LINE> se...
This manages one of our logfiles.
625990783539df3088ecdc41
class VersionedDependency(object): <NEW_LINE> <INDENT> def __init__(self, name, version=None, min_version=None, max_version=None): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> if version is not None: <NEW_LINE> <INDENT> self._min_version = version <NEW_LINE> self._max_version = version <NEW_LINE> <DEDENT> else: <NE...
DependencyVersion specifies the versions
625990782c8b7c6e89bd5194
class UrlPackage: <NEW_LINE> <INDENT> def __init__(self, url): <NEW_LINE> <INDENT> if ':' in url: <NEW_LINE> <INDENT> self.url = url <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.url = posixpath.join('git+git://github.com', url) <NEW_LINE> <DEDENT> <DEDENT> @property <NEW_LINE> def installAs(self): <NEW_LINE> <IND...
Represents a package specified as a Url
625990782c8b7c6e89bd5193
class UpdateNotificationReadView(APIView): <NEW_LINE> <INDENT> authentication_classes = (authentication.TokenAuthentication,) <NEW_LINE> permission_classes = (IsAuthenticated,) <NEW_LINE> parser_classes = (JSONParser,) <NEW_LINE> lookup_url_kwarg = "user_id" <NEW_LINE> def get(self, request, user_id): <NEW_LINE> <INDEN...
Change read notification variable of a user
625990784a966d76dd5f0895
class GovernmentPosting(CreateView): <NEW_LINE> <INDENT> model = Job <NEW_LINE> form_class = JobForm <NEW_LINE> template_name = 'main/government_list.html' <NEW_LINE> def form_valid(self, form): <NEW_LINE> <INDENT> job = form.save(commit=False) <NEW_LINE> job.user = self.request.user <NEW_LINE> job.category = 'Governme...
Allow users to post government jobs
6259907899fddb7c1ca63aab
class near_pivot_args(object): <NEW_LINE> <INDENT> def __init__(self, device_uuid=None, access_token=None,): <NEW_LINE> <INDENT> self.device_uuid = device_uuid <NEW_LINE> self.access_token = access_token <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot._fast_decode is not None and isinstance(ipro...
Attributes: - device_uuid - access_token
62599078a05bb46b3848bdff
class UnsafeArchive(ArchiveException): <NEW_LINE> <INDENT> pass
Error raised when passed file contains paths that would be extracted outside of the target directory.
62599078aad79263cf430163
class VolumeAPIContext(InternalEndpointContext): <NEW_LINE> <INDENT> def __init__(self, pkg): <NEW_LINE> <INDENT> super(VolumeAPIContext, self).__init__() <NEW_LINE> self._ctxt = None <NEW_LINE> if not pkg: <NEW_LINE> <INDENT> raise ValueError('package name must be provided in order to ' 'determine current OpenStack ve...
Volume API context. This context provides information regarding the volume endpoint to use when communicating between services. It determines which version of the API is appropriate for use. This value will be determined in the resulting context dictionary returned from calling the VolumeAPIContext object. Informatio...
6259907897e22403b383c8ad
class bolacha(httplib2): <NEW_LINE> <INDENT> cls = 'Bolacha'
Wrapper for bolacha.
6259907856b00c62f0fb427d
class SeedHypervisorHostUpgrade(KayobeAnsibleMixin, VaultMixin, Command): <NEW_LINE> <INDENT> def take_action(self, parsed_args): <NEW_LINE> <INDENT> self.app.LOG.debug("Upgrading seed hypervisor host services") <NEW_LINE> playbooks = _build_playbook_list("kayobe-target-venv") <NEW_LINE> self.run_kayobe_playbooks(parse...
Upgrade the seed hypervisor host services. Performs the changes necessary to make the host services suitable for the configured OpenStack release.
625990785166f23b2e244d82
class UpdateMessagePoll(TLObject): <NEW_LINE> <INDENT> __slots__: List[str] = ["poll_id", "results", "poll"] <NEW_LINE> ID = 0xaca1657b <NEW_LINE> QUALNAME = "types.UpdateMessagePoll" <NEW_LINE> def __init__(self, *, poll_id: int, results: "raw.base.PollResults", poll: "raw.base.Poll" = None) -> None: <NEW_LINE> <INDEN...
This object is a constructor of the base type :obj:`~pyrogram.raw.base.Update`. Details: - Layer: ``122`` - ID: ``0xaca1657b`` Parameters: poll_id: ``int`` ``64-bit`` results: :obj:`PollResults <pyrogram.raw.base.PollResults>` poll (optional): :obj:`Poll <pyrogram.raw.base.Poll>`
625990787047854f46340d65
@python_2_unicode_compatible <NEW_LINE> class Trip(Base): <NEW_LINE> <INDENT> route = models.ForeignKey('Route', related_name="trips") <NEW_LINE> service = models.ForeignKey('Service', null=True, blank=True) <NEW_LINE> trip_id = models.CharField( max_length=255, db_index=True, help_text="Unique identifier for a trip.")...
A trip along a route This implements trips.txt in the GTFS feed
62599078a8370b77170f1d79
class AiAnalysisTaskTagResult(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Status = None <NEW_LINE> self.ErrCodeExt = None <NEW_LINE> self.ErrCode = None <NEW_LINE> self.Message = None <NEW_LINE> self.Input = None <NEW_LINE> self.Output = None <NEW_LINE> <DEDENT> def _deserialize(sel...
智能标签结果类型
62599078097d151d1a2c2a21
class Link(Interface): <NEW_LINE> <INDENT> switch = models.ForeignKey(Switch, related_name="links", null=False, editable=False) <NEW_LINE> next_link = models.ForeignKey('self', null=False) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> unique_together = (('switch', 'next_link')) <NEW_LINE> <DEDENT> def clean(self): <NEW_LI...
{ "uuid": integer, "name": string, "number": integer, "switch": reference, "next_link": reference, }
625990783317a56b869bf21b
class Assets(systemservices.Assets): <NEW_LINE> <INDENT> def getContentItem(self, avatar, storeSession, id, version): <NEW_LINE> <INDENT> d = storeSession.getItemById(id) <NEW_LINE> return d
Generic serve up a poop item
625990784a966d76dd5f0896
class QueryInfo(object): <NEW_LINE> <INDENT> def __init__(self, entry=None, op=None, *args, **kwargs): <NEW_LINE> <INDENT> self.entry = [] if entry is None else entry <NEW_LINE> self.op = op <NEW_LINE> self.args = args <NEW_LINE> self.kwargs = kwargs
Used to pass query info from client to server
625990784f88993c371f11f7
@deprecated_class(deprecated_date="2022-08-23") <NEW_LINE> @dataclass <NEW_LINE> class Inspection(DataClassJsonMixin): <NEW_LINE> <INDENT> project_id: str <NEW_LINE> task_id: str <NEW_LINE> input_data_id: str <NEW_LINE> inspection_id: str <NEW_LINE> phase: TaskPhase <NEW_LINE> phase_stage: int <NEW_LINE> commenter_acco...
検査コメント .. deprecated:: 2022-08-23以降に廃止する予定です。
625990784a966d76dd5f0897
class GoogleTranslation(MachineTranslation): <NEW_LINE> <INDENT> name = 'Google Translate' <NEW_LINE> max_score = 90 <NEW_LINE> language_map = { 'he': 'iw', 'jv': 'jw', 'nb': 'no', } <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(GoogleTranslation, self).__init__() <NEW_LINE> if settings.MT_GOOGLE_KEY is None...
Google Translate API v2 machine translation support.
625990782ae34c7f260aca92
class Tag: <NEW_LINE> <INDENT> __slots__ = ["_interpreter", "_abi", "_platform", "_hash"] <NEW_LINE> def __init__(self, interpreter: str, abi: str, platform: str) -> None: <NEW_LINE> <INDENT> self._interpreter = interpreter.lower() <NEW_LINE> self._abi = abi.lower() <NEW_LINE> self._platform = platform.lower() <NEW_LIN...
A representation of the tag triple for a wheel. Instances are considered immutable and thus are hashable. Equality checking is also supported.
625990784527f215b58eb676
class Distribution(object): <NEW_LINE> <INDENT> def __init__(self, df: "DataFrame({Index: 'States', Columns: ['Prob', 'Pct_Move', 'Relative_Price']}") -> 'Distribution object': <NEW_LINE> <INDENT> self.distribution_df = df <NEW_LINE> <DEDENT> @property <NEW_LINE> def mean_move(self): <NEW_LINE> <INDENT> return math.sqr...
DataFrame({Index: 'States', Columns: ['Prob', 'Pct_Move', 'Price'] }) -> 'Distribution() object'
62599078a8370b77170f1d7a
class ValidatorAll(CompoundValidator): <NEW_LINE> <INDENT> def validate(self, option_dict: TypeOptionMap) -> ReportItemList: <NEW_LINE> <INDENT> report_list = [] <NEW_LINE> for validator in self._validator_list: <NEW_LINE> <INDENT> report_list.extend(validator.validate(option_dict)) <NEW_LINE> <DEDENT> return report_li...
Run all validators and return all their reports
625990785fc7496912d48f40
class UserInterface(BaseHoleInterface): <NEW_LINE> <INDENT> def __init__(self, requester, ordered_kwargs): <NEW_LINE> <INDENT> if requester is None: <NEW_LINE> <INDENT> requester = self <NEW_LINE> <DEDENT> super().__init__(requester, ordered_kwargs) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> async def get(cls, **kwarg...
A user created in the master
6259907832920d7e50bc79f4
class Solution: <NEW_LINE> <INDENT> @timeit <NEW_LINE> def criticalConnections(self, n: int, connections: List[List[int]]) -> List[List[int]]: <NEW_LINE> <INDENT> from collections import defaultdict <NEW_LINE> graph = defaultdict(list) <NEW_LINE> for a,b in connections: <NEW_LINE> <INDENT> graph[a].append(b) <NEW_LINE>...
[1192. 查找集群内的「关键连接」](https://leetcode-cn.com/problems/critical-connections-in-a-network)
62599078a05bb46b3848be00
class DiscountPricingUpdate(object): <NEW_LINE> <INDENT> swagger_types = { 'discount_percentage': 'float' } <NEW_LINE> attribute_map = { 'discount_percentage': 'discountPercentage' } <NEW_LINE> def __init__(self, discount_percentage=None): <NEW_LINE> <INDENT> self._discount_percentage = None <NEW_LINE> self.discriminat...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62599078379a373c97d9a9cf
class NapView(View): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def as_view(cls, **initkwargs): <NEW_LINE> <INDENT> return except_response(super().as_view(**initkwargs))
Base view for Nap CBV. Catches any http exceptions raised, and returns them instead.
6259907866673b3332c31dab
class ScanEntropy(strelka.Scanner): <NEW_LINE> <INDENT> def scan(self, data, file, options, expire_at): <NEW_LINE> <INDENT> self.event['entropy'] = entropy.shannon_entropy(data)
Calculates entropy of files.
625990787b180e01f3e49d3b
class Ownership(object): <NEW_LINE> <INDENT> def create(self, pixmap): <NEW_LINE> <INDENT> self.mask = pixmap.selectionMask().getInitializedCopy(value=3) <NEW_LINE> <DEDENT> def isOwned(self, pixelelID): <NEW_LINE> <INDENT> maskValue = self.mask[pixelelID.coord] <NEW_LINE> isOwned = maskValue != 3 <NEW_LINE> selfOwned...
PixMapMask that knows the channel that owns a Pixel Value of mask byte is 3 if unowned, else the index of owning channel in range [0,2]
6259907832920d7e50bc79f5
class UserEvent(Request): <NEW_LINE> <INDENT> deserialized_types = { 'object_type': 'str', 'request_id': 'str', 'timestamp': 'datetime', 'locale': 'str', 'token': 'str', 'arguments': 'list[object]', 'source': 'object', 'components': 'object' } <NEW_LINE> attribute_map = { 'object_type': 'type', 'request_id': 'requestId...
:param request_id: Represents the unique identifier for the specific request. :type request_id: (optional) str :param timestamp: Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. :type timestamp: (optional) dateti...
62599078a8370b77170f1d7b
class MeasureS18(MeasureActiveReactive): <NEW_LINE> <INDENT> @property <NEW_LINE> def values(self): <NEW_LINE> <INDENT> values = {} <NEW_LINE> try: <NEW_LINE> <INDENT> get = self.objectified.get <NEW_LINE> values.update({ 'order_datetime': self._get_timestamp('Fh'), 'orden': get_integer_value(get('Orden')), }) <NEW_LIN...
Class for a set of measures of report S18.
62599078aad79263cf430166
class Scheduler(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.runnable_tasks = deque() <NEW_LINE> self.completed_task_results = {} <NEW_LINE> self.failed_task_results = {} <NEW_LINE> <DEDENT> def add(self, routine): <NEW_LINE> <INDENT> task = Task(routine) <NEW_LINE> self.runnable_tasks.appe...
`Scheduler()` is just a fancy queue.
62599078f548e778e596cf3e
class ChunkSizeTooBigError(Error): <NEW_LINE> <INDENT> pass
Raised when chunk header has what appears to be an invalid size.
625990784a966d76dd5f0898
class TwoLayerNet(object): <NEW_LINE> <INDENT> def __init__(self, input_dim=3 * 32 * 32, hidden_dim=100, num_classes=10, weight_scale=1e-3, reg=0.0): <NEW_LINE> <INDENT> self.params = {} <NEW_LINE> self.reg = reg <NEW_LINE> self.weight_scale=weight_scale <NEW_LINE> self.input_dim = input_dim <NEW_LINE> self.hidden_dim ...
A two-layer fully-connected neural network with ReLU nonlinearity and softmax loss that uses a modular layer design. We assume an input dimension of D, a hidden dimension of H, and perform classification over C classes. The architecure should be affine - relu - affine - softmax. Note that this class does not implemen...
625990783539df3088ecdc45
class QueryBuilder(object): <NEW_LINE> <INDENT> def __init__(self, q_type='solr', tokenizer=None): <NEW_LINE> <INDENT> self.q_type = q_type <NEW_LINE> if not tokenizer: <NEW_LINE> <INDENT> tokenizer_class = DEFAULTS['tokenizer'] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> tokenizer_class = tokenizers.get_class(tokeni...
given query string (e.g. question body), build an expanded query string with respect to the retrieval types (e.g. solr or bioasq data services)
625990782c8b7c6e89bd5197
class VectorStrategy(object): <NEW_LINE> <INDENT> __metaclass__ = SingletonMeta <NEW_LINE> def is_correct_type(self, w_obj): <NEW_LINE> <INDENT> raise NotImplementedError("abstract base class") <NEW_LINE> <DEDENT> def immutable(self, w_vector): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def ref(self, w_vector...
works for any W_VectorSuper that has get/set_strategy, get/set_storage
625990784428ac0f6e659edd
class TestSWGOHGG(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> server_address = ('127.0.0.1', 0) <NEW_LINE> httpd = HTTPServer(server_address, BaseHTTPRequestHandler) <NEW_LINE> port = httpd.server_port <NEW_LINE> httpd.server_close() <NEW_LINE> url = 'http://127.0.0.1:{}/swgohgg_guild.html'.form...
Tests for SWGOHGG class
625990789c8ee82313040e5e
class CustomFilter(RFPDupeFilter): <NEW_LINE> <INDENT> def __getid(self, url): <NEW_LINE> <INDENT> if 'searchterm' in url: <NEW_LINE> <INDENT> url_list = url.split("=") <NEW_LINE> url_list = filter(None, url_list) <NEW_LINE> mm = url_list[1] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> url_list = url.split("/") <NEW_L...
A dupe filter that considers specific ids in the url
625990782ae34c7f260aca94
class TestElementwisePow(APIBase): <NEW_LINE> <INDENT> def hook(self): <NEW_LINE> <INDENT> self.types = [np.float32] <NEW_LINE> self.debug = False <NEW_LINE> self.enable_backward = False
test
625990784527f215b58eb677
class TestFivePhaseRecipeController(BaseTestCase): <NEW_LINE> <INDENT> def test_recipe_five_phase_gridbased_post(self): <NEW_LINE> <INDENT> recipe = FivePhaselGridBasedSchema() <NEW_LINE> response = self.client.open( '/api/recipe/five_phase/gridbased', method='POST', data=json.dumps(recipe), content_type='application/j...
FivePhaseRecipeController integration test stubs
625990784a966d76dd5f0899
class LabelEntry(): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def CreateFrame(parent, type_dict, entry_width=60): <NEW_LINE> <INDENT> zframe = Frame(parent) <NEW_LINE> return LabelEntry.AddFields(zframe, type_dict, entry_width=entry_width) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def CreateLframe(parent, type_di...
Create a Tkinter native-type, data-entry display. Returns an unpacked frame sporting a grid layout of your dictionary-defined fields. Tags are field names, entries are rvalues for same. (Using Tkinter's smart-variables for the later.)
62599078aad79263cf430167
class ResidualBlock(nn.Module): <NEW_LINE> <INDENT> def __init__(self, num, use_cuda=False): <NEW_LINE> <INDENT> super(ResidualBlock, self).__init__() <NEW_LINE> if use_cuda: <NEW_LINE> <INDENT> self.c1 = nn.Conv2d(num, num, kernel_size=3, stride=1, padding=1).cuda(device_id=0) <NEW_LINE> self.c2 = nn.Conv2d(num, num, ...
Residual blocks as implemented in [1]
6259907856b00c62f0fb4281
class Rates( Base ): <NEW_LINE> <INDENT> __tablename__ = 't_region_city_rates' <NEW_LINE> max_weight = Column( Integer ) <NEW_LINE> city_id = Column( Integer, primary_key=True ) <NEW_LINE> cost = Column( Float )
Стоимость доставки в ДПД регионы
62599078d486a94d0ba2d966
class VersionPlugin(plugin.APRSDRegexCommandPluginBase): <NEW_LINE> <INDENT> command_regex = "^[vV]" <NEW_LINE> command_name = "version" <NEW_LINE> short_description = "What is the APRSD Version" <NEW_LINE> email_sent_dict = {} <NEW_LINE> @trace.trace <NEW_LINE> def process(self, packet): <NEW_LINE> <INDENT> LOG.info("...
Version of APRSD Plugin.
625990787d847024c075dd8a
class KlDivergence( Error ): <NEW_LINE> <INDENT> def __init__( self ): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def f( self, target, predicted ): <NEW_LINE> <INDENT> if isinstance( predicted, Dual ): <NEW_LINE> <INDENT> target = type(predicted)( target, 0, predicted.n_ ) <NEW_LINE> return target * ( target / predic...
Kullback-Liebler
6259907816aa5153ce401e89
class Viewer(): <NEW_LINE> <INDENT> _activity = None <NEW_LINE> _process = None <NEW_LINE> _ui = None <NEW_LINE> def __init__(self,activity): <NEW_LINE> <INDENT> self._activity = activity <NEW_LINE> self._process = ViewerProcess() <NEW_LINE> self._ui = ViewerUI(self._activity, self._process) <NEW_LINE> <DEDENT> def loa...
Viewer component for Classroom Kit Activity
62599078442bda511e95da2f
class Dependency: <NEW_LINE> <INDENT> def __init__(self, collapseDependencies=False, filterRegex=".*", positiveFilter=True): <NEW_LINE> <INDENT> self.dependencies = dict([]) <NEW_LINE> self.collapseDependencies = collapseDependencies <NEW_LINE> self.filterRegex = filterRegex <NEW_LINE> self.positiveFilter = positiveFil...
Consumes raw formatted RPM dependencies. Either accumulates them or collapses them so the first/gerneral ones get overwritten by the later/specific ones
6259907897e22403b383c8b1
class SimplePngFileField(factory.LazyAttribute): <NEW_LINE> <INDENT> def __init__(self, method=None, *args, **kwargs): <NEW_LINE> <INDENT> if not method: <NEW_LINE> <INDENT> def png_file(a): <NEW_LINE> <INDENT> return File(simple_png()) <NEW_LINE> <DEDENT> method = png_file <NEW_LINE> <DEDENT> super(SimplePngFileField,...
A factory file field class that creates an image in memory. Suitable for using as a FileField or ImageField. class ATestFactory(factory.Factory): file = SimplePngFileField()
6259907801c39578d7f1440c
class DBTextMsg(models.Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> verbose_name = u'回复管理(文字消息)' <NEW_LINE> verbose_name_plural = u'回复管理(文字消息)' <NEW_LINE> <DEDENT> name = models.CharField(blank=True, max_length=50, verbose_name=u"消息名字", help_text=u"可以为空,仅用来标识消息") <NEW_LINE> content = models.TextField(bla...
msg in database
62599078be8e80087fbc0a43