code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class WMGetResourcePlanResponse: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRUCT, 'resourcePlan', (WMFullResourcePlan, WMFullResourcePlan.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, resourcePlan=None,): <NEW_LINE> <INDENT> self.resourcePlan = resourcePlan <NEW_LINE> <DEDENT> def read(self, iprot):...
Attributes: - resourcePlan
62598f8a0a50d4780f704f31
class ListAllTicketsInputSet(InputSet): <NEW_LINE> <INDENT> def set_Email(self, value): <NEW_LINE> <INDENT> InputSet._set_input(self, 'Email', value) <NEW_LINE> <DEDENT> def set_Number(self, value): <NEW_LINE> <INDENT> InputSet._set_input(self, 'Number', value) <NEW_LINE> <DEDENT> def set_Page(self, value): <NEW_LINE> ...
An InputSet with methods appropriate for specifying the inputs to the ListAllTickets Choreo. The InputSet object is used to specify input parameters when executing this Choreo.
62598f8ad53ae8145f917ff3
@functional_datapipe('legacy_transforms') <NEW_LINE> class TransformsIterDataPipe(MapIterDataPipe): <NEW_LINE> <INDENT> def __init__(self, datapipe: IterDataPipe, transforms: Callable, ) -> None: <NEW_LINE> <INDENT> transforms_types: Tuple = (nn.Module, ) <NEW_LINE> try: <NEW_LINE> <INDENT> import torchvision.transform...
:class:`TransformsIterDataPipe`. Iterable DataPipe to use transform(s) from torchvision or torchaudio to transform data from datapipe. args: datapipe: Iterable DataPipe being transformed transforms: A transform or a sequence of transforms from torchvision or torchaudio.
62598f8a24f1403a9268565f
@implementer(IListeningPort) <NEW_LINE> class FakePort: <NEW_LINE> <INDENT> deferred = None <NEW_LINE> def stopListening(self): <NEW_LINE> <INDENT> self.deferred = Deferred() <NEW_LINE> return self.deferred <NEW_LINE> <DEDENT> def getHost(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def startListening(self): <NE...
Fake L{IListeningPort} implementation. @ivar deferred: The L{Deferred} returned by C{stopListening}.
62598f8ad99f1b3c44d0520c
class PredicatedExpression(object): <NEW_LINE> <INDENT> def __init__(self, base, predicates=None): <NEW_LINE> <INDENT> self.base = base <NEW_LINE> self.predicates = predicates or [] <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return '<%s %s>' % (self.__class__.__name__, serialize(self)) <NEW_LINE> <DEDE...
A filtered XPath expression. $var[1]; (a or b)[foo][@bar].
62598f8a23e79379d538c061
class PublicRecipeApiTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.client = APIClient() <NEW_LINE> <DEDENT> def test_auth_required(self): <NEW_LINE> <INDENT> res = self.client.get(RECIPES_URL) <NEW_LINE> self.assertEqual(res.status_code, status.HTTP_401_UNAUTHORIZED)
Test public recipe API access
62598f8aa8ecb03325870d65
class FindPopularItemsInputSet(InputSet): <NEW_LINE> <INDENT> def set_AppID(self, value): <NEW_LINE> <INDENT> super(FindPopularItemsInputSet, self)._set_input('AppID', value) <NEW_LINE> <DEDENT> def set_CategoryIDExclude(self, value): <NEW_LINE> <INDENT> super(FindPopularItemsInputSet, self)._set_input('CategoryIDExclu...
An InputSet with methods appropriate for specifying the inputs to the FindPopularItems Choreo. The InputSet object is used to specify input parameters when executing this Choreo.
62598f8a0a366e3fb87dc534
class AggregatedDuplicatesNumpyDict(MostRecentValidValueNumpyDict): <NEW_LINE> <INDENT> def __init__(self, np_dict, dedupe_key, most_recent_key, valid_values_dict, dict_arrays_are_presorted=False): <NEW_LINE> <INDENT> super(AggregatedDuplicatesNumpyDict, self).__init__(np_dict, dedupe_key, most_recent_key, valid_values...
Creates a new record for duplicates where the value of each array is the most recent valid value. Other duplicate values are not removed, meaning the array must be appended. For large arrays, this can be time consuming.
62598f8a16aa5153ce400067
class UpdatedMedia(object): <NEW_LINE> <INDENT> swagger_types = { 'id': 'str', 'updated_time': 'datetime', 'updates': 'list[str]' } <NEW_LINE> attribute_map = { 'id': 'id', 'updated_time': 'updated_time', 'updates': 'updates' } <NEW_LINE> def __init__(self, id=None, updated_time=None, updates=None): <NEW_LINE> <INDENT>...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f8a3617ad0b5ee05ca7
class SummaryStatementRecruimentForm(forms.Form): <NEW_LINE> <INDENT> date_start = forms.CharField(widget=forms.TextInput(attrs={ 'class': 'form-control datepicker', 'id': 'date_start' })) <NEW_LINE> date_end = forms.CharField(widget=forms.TextInput(attrs={ 'class': 'form-control datepicker', 'id': 'date_end' })) <NEW_...
period = forms.CharField(widget=forms.TextInput(attrs={ 'class': 'date-picker', 'id': 'period' }))
62598f8a004d5f362081edab
@dataclass <NEW_LINE> class Channel: <NEW_LINE> <INDENT> name: str <NEW_LINE> _events: Dict[str, Event] = field(default_factory=dict) <NEW_LINE> @property <NEW_LINE> def events(self): <NEW_LINE> <INDENT> return tuple((e.name for e in self._events.values())) <NEW_LINE> <DEDENT> def __len__(self) -> int: <NEW_LINE> <INDE...
A websocket channel
62598f8ad53ae8145f917ff4
class Response: <NEW_LINE> <INDENT> def __init__( self, resp_code = None, resp_desc = '', header_params = [], body = bytearray(), serialized_data = None ): <NEW_LINE> <INDENT> if serialized_data is None: <NEW_LINE> <INDENT> self.code = int( resp_code ) <NEW_LINE> self.what = str( resp_desc ) <NEW_LINE> self.head_params...
Класс ответа HTTP 1.1
62598f8a507cdc57c63a48f2
class LowestResponse(BaseBetStrategy, metaclass=Singleton): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__("Lowest Response") <NEW_LINE> logging.debug("lowest response initialized") <NEW_LINE> <DEDENT> def get_decisions(self, gamble_info_list: [GambleInfo]): <NEW_LINE> <INDENT> lowest_resp...
Bet the lowest response side.
62598f8acad5886f8bdc4e3d
class WindowsProcessCollector(ProcessCollector): <NEW_LINE> <INDENT> def __init__(self, min_pcpu): <NEW_LINE> <INDENT> super(WindowsProcessCollector, self).__init__(min_pcpu) <NEW_LINE> <DEDENT> def GetProcesses(self): <NEW_LINE> <INDENT> data = [] <NEW_LINE> for p in psutil.process_iter(): <NEW_LINE> <INDENT> try: <NE...
Class for collecting information about processes on Windows. Windows does not have a fast and simple command to list processes, so psutil package is used instead.
62598f8a82261d6c5272fc87
class CrashList(api.APIRequest): <NEW_LINE> <INDENT> def __init__(self, api_key, app_id, page=1): <NEW_LINE> <INDENT> api.APIRequest.__init__(self, api_key) <NEW_LINE> self._key = None <NEW_LINE> self._app_id = app_id <NEW_LINE> self._page = page <NEW_LINE> <DEDENT> @property <NEW_LINE> def parameters(self): <NEW_LINE>...
This API lets you receive the list of crashes for an app.
62598f8a10dbd63aa1c7071a
class IOshkoshScholarsLayer(IDefaultBrowserLayer): <NEW_LINE> <INDENT> pass
Marker interface that defines a browser layer.
62598f8a379a373c97d98b78
class ChunkedBashTaskChain(NodeGeneratorChain, bapp.plugin_type()): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(ChunkedBashTaskChain, self).__init__() <NEW_LINE> self.set_head(BashExecuteTaskGenerator()) <NEW_LINE> self.prepend_head(FrameSequenceGenerator()) <NEW_LINE> <D...
Simple bash batch commands with chunking support
62598f8ab7558d5895463198
class Circle: <NEW_LINE> <INDENT> def __init__(self, radius = 1): <NEW_LINE> <INDENT> self.radius = radius <NEW_LINE> <DEDENT> @property <NEW_LINE> def area(self): <NEW_LINE> <INDENT> return self._area <NEW_LINE> <DEDENT> @property <NEW_LINE> def radius(self): <NEW_LINE> <INDENT> return self._radius <NEW_LINE> <DEDENT>...
setting either the radius or area attribute sets the other as a dependent value. Initialized with radius only, unit circle by default.
62598f8a8a349b6b43685daa
class SpeakersUnitController(Resource): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.object_name = "{}".format(self.__class__.__name__) <NEW_LINE> <DEDENT> @Controller.abort_if_path_doesnt_exist <NEW_LINE> def get(self, unit_id, *args, **kwargs): <NEW_LINE> <INDENT> fro...
Speakers Unit Controllers Objects
62598f8a8e05c05ec3f6ebfa
class Eq(BinPredicate): <NEW_LINE> <INDENT> def __init__(self, vars): <NEW_LINE> <INDENT> BinPredicate.__init__(self, vars, "eq") <NEW_LINE> self.lb = int((self.get_lb(0) == self.get_ub(0)) and (self.get_lb(1) == self.get_ub(1)) and (self.get_lb(0) == self.get_lb(1))) <NEW_LINE> self.ub = int(not(lt_with_none(self.get_...
Equality expression between two expressions, or an expression and a constant. It can be used as either a top-level hard constraint or reified as a sub-expression. .. code-block:: python var1 = Variable(0, 10) var2 = Variable(0, 100) var3 = Variable() model.add(var1 == var2) model.add(var1 == 5) ...
62598f8ab830903b9686e224
class NSGAProblem(Problem): <NEW_LINE> <INDENT> def __init__(self, nb_params, nb_objs): <NEW_LINE> <INDENT> super().__init__(n_var=nb_params, n_obj=nb_objs, n_constr=0, xl=-1, xu=1) <NEW_LINE> <DEDENT> def _evaluate(self, x, out, *args, **kwargs): <NEW_LINE> <INDENT> out["F"], out["F_std"] = runner(x) <NEW_LINE> return...
Defines a problem for the pymoo library
62598f8a07d97122c421680c
class LefuCancelOrderPage(SuperPage): <NEW_LINE> <INDENT> def __init__(self, testcase, driver, logger): <NEW_LINE> <INDENT> super(LefuCancelOrderPage, self).__init__(testcase, driver, logger); <NEW_LINE> <DEDENT> def clickOnConfirmBtn(self): <NEW_LINE> <INDENT> API().clickElementByText(self.testcase, self.driver, self....
作者 刘涛 首页=>乐付=>输入乐付消费金额页=>选择支付方式页=>取消订单提示确定页
62598f8a0fa83653e46f4a54
class ColumnMapper(TransformerMixin): <NEW_LINE> <INDENT> def __init__(self,column=None,func=None,name=None,drop=False,**kwargs): <NEW_LINE> <INDENT> self.func = func <NEW_LINE> self.name = name <NEW_LINE> self.column = column <NEW_LINE> self.drop = drop <NEW_LINE> <DEDENT> def fit(self,X,y=None,**kwargs): <NEW_LINE> <...
stores lambda func, target column for pd.Series.map(func) transforms
62598f8a3c8af77a43b67ce8
class Column(BaseClass): <NEW_LINE> <INDENT> def __iter__(self): <NEW_LINE> <INDENT> return ColIterator(self._impl) <NEW_LINE> <DEDENT> def to_string(self): <NEW_LINE> <INDENT> return str(self.to_list()) <NEW_LINE> <DEDENT> def to_list(self): <NEW_LINE> <INDENT> return self._impl.toPyList() <NEW_LINE> <DEDENT> toString...
Represents a column in a :class:`~amplpy.DataFrame`.
62598f8ad99f1b3c44d0520e
class SASInclude(SASBaseObject): <NEW_LINE> <INDENT> def __init__(self, rawStr, startLine): <NEW_LINE> <INDENT> reFlags = re.DOTALL | re.IGNORECASE <NEW_LINE> self.startLine = startLine <NEW_LINE> self.endLine = rawStr.count('\n') + startLine <NEW_LINE> self._path = re.findall( r"include ['\"](.*?)['\"]", rawStr, flags...
SAS Include Object This object represents a SAS include statement. This path can be followed programmatically to find additionl extra-project code. Attributes: path: Path defined in the include statement posixPath: Web-friendly version of path StartLine (optional): The inital line in the parent code whe...
62598f8a8da39b475be02d4e
class LabeledImg(QFrame): <NEW_LINE> <INDENT> Syncing = pyqtSignal(list) <NEW_LINE> def __init__(self, Filename, *args, **kwargs): <NEW_LINE> <INDENT> QFrame.__init__(self, *args, **kwargs) <NEW_LINE> self.FileName = Filename <NEW_LINE> self.Img = Img(self.FileName, self) <NEW_LINE> _,name=os.path.split(self.FileName) ...
给Img添加上标签
62598f8ab57a9660fecd15e2
class Four(Button): <NEW_LINE> <INDENT> def __init__(self, frame: Frame, action: Action) -> None: <NEW_LINE> <INDENT> self._button: Button = CalculatorButton(row=2, column=0, text='4', frame=frame, command=lambda: action.click(number='4')) <NEW_LINE> <DEDENT> def grid(self) -> None: <NEW_LINE> <INDENT> self._button.gri...
Number ``four`` in a calculator.
62598f8a0a366e3fb87dc536
class Loader(yamlLoader): <NEW_LINE> <INDENT> def __init__(self, stream): <NEW_LINE> <INDENT> super().__init__(stream) <NEW_LINE> try: <NEW_LINE> <INDENT> self._root = ResourcePath(stream.name) <NEW_LINE> <DEDENT> except AttributeError: <NEW_LINE> <INDENT> self._root = ResourcePath("no-file.yaml") <NEW_LINE> <DEDENT> L...
YAML Loader that supports file include directives. Uses ``!include`` directive in a YAML file to point to another YAML file to be included. The path in the include directive is relative to the file containing that directive. storageClasses: !include storageClasses.yaml Examples -------- >>> with open("document.y...
62598f8ad6c5a102081e1ca8
class SeriesBoxPanel(wx.Panel): <NEW_LINE> <INDENT> def __init__(self, parent, box_label, labels, widget_clss, widget_codes, tooltips): <NEW_LINE> <INDENT> wx.Panel.__init__(self, parent, -1) <NEW_LINE> self.staticbox = wx.StaticBox(self, -1, box_label) <NEW_LINE> self.labels = [wx.StaticText(self, -1, label) for label...
Box panel that contains labels and widgets Parameters ---------- * panel_label: String Label that is displayed left of the widget * labels: List of strings Widget labels * widgets: List of class instances Widget instance list must be as long as labels
62598f8a9b70327d1c57e903
class TimeoutRequestHandler(BaseHTTPRequestHandler): <NEW_LINE> <INDENT> def do_POST(self): <NEW_LINE> <INDENT> self.server.SHARED['count'] += 1 <NEW_LINE> time.sleep(5)
HTTP handler for use with TestingHTTPServer updates the shared counter and waits so that the client times out
62598f8a50485f2cf55daadb
class InvestUser(AbstractUser): <NEW_LINE> <INDENT> nickname = models.CharField("닉네임",max_length=100) <NEW_LINE> money = models.IntegerField(default=100000) <NEW_LINE> take_price = models.IntegerField(default=0, help_text="보유 주식 가치") <NEW_LINE> take_count = models.PositiveIntegerField(default=0, help_text="보유 주식의 수") <...
모의 투자 유저
62598f8ad10714528d69da36
class AdaGrad(LearningRule): <NEW_LINE> <INDENT> def __init__(self, max_scaling=1e5): <NEW_LINE> <INDENT> assert max_scaling > 0 <NEW_LINE> self.eps = 1. / max_scaling <NEW_LINE> <DEDENT> def get_updates(self, learning_rate, grads, lr_scalers=None): <NEW_LINE> <INDENT> updates = OrderedDict() <NEW_LINE> for param in gr...
Implements the AdaGrad learning rule as described in: "Adaptive subgradient methods for online learning and stochastic optimization", Duchi J, Hazan E, Singer Y. Parameters ---------- max_scaling: float, optional Restrict the gradient scaling coefficient to values below `max_scaling`. This prevents corner case...
62598f8ab57a9660fecd15e3
class FileUnit(Unit): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return self.path <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "<FileUnit path:{!r}, role:{!r}>".format(self.path, self.role) <NEW_LINE> <DEDENT> @property <NEW_LINE> def path(self): <NEW_LINE> <INDENT> return self.get...
Unit that describes a single file. Every file that is a part of a provider has a corresponding file unit. Units like this are automatically generated by the provider itself. The file unit can be still defined to provide any additional meta-data. The file unit is used for contextual validation of job definitions and o...
62598f8a8e05c05ec3f6ebfb
class NSNitroNserrIntmaxval(NSNitroCliErrors): <NEW_LINE> <INDENT> pass
Nitro error code 1108 Integer value exceeds maximum
62598f8a29b78933be269e8e
class LogisticSystem: <NEW_LINE> <INDENT> def __init__(self, vehicles: List[Vehicle], orders: List[Order]=[] ): <NEW_LINE> <INDENT> self.orders = orders <NEW_LINE> self.vehicles = vehicles <NEW_LINE> <DEDENT> def placeOrder(self, order: Order): <NEW_LINE> <INDENT> for vehicle in self.vehicles: <NEW_LINE> <INDENT> if ve...
This class contains information about the user, one's order and transportation vehicles.
62598f8a71ff763f4b5e72d6
class MicrositeOrganizationMapping(models.Model): <NEW_LINE> <INDENT> organization = models.CharField(max_length=63, db_index=True, unique=True) <NEW_LINE> microsite = models.ForeignKey(Microsite, db_index=True) <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return u'{microsite_key}: {organization}'.format( micr...
Mapping of Organization to which Microsite it belongs
62598f8ab830903b9686e225
class Angle(Composite): <NEW_LINE> <INDENT> thickness = param.Number(default=0.05,bounds=(0.0,None),softbounds=(0.0,0.5), precedence=0.60,doc="Thickness of the rectangle.") <NEW_LINE> smoothing = param.Number(default=0.015,bounds=(0.0,None),softbounds=(0.0,0.5), precedence=0.61,doc="Width of the Gaussian fall-off aroun...
Angle composed of two line segments.
62598f8a94891a1f408b94a2
class LineChart(interface.BaseChart): <NEW_LINE> <INDENT> NAME = 'linechart' <NEW_LINE> def generate(self): <NEW_LINE> <INDENT> chart = self._get_chart_with_transform() <NEW_LINE> self._add_url_href(self.encoding) <NEW_LINE> if self.chart_title: <NEW_LINE> <INDENT> chart = chart.mark_line().properties(title=self.chart_...
Line Chart object.
62598f8ae76e3b2f99fd8596
class PrefixNotKnownException(Exception): <NEW_LINE> <INDENT> pass
The prefix used is not in the list of known Namespaces - the namespace can be added before serialisation however.
62598f8af7d966606f747b45
class FractionalExtensionOps(FractionalOps): <NEW_LINE> <INDENT> def restore(self, col: pd.Series) -> pd.Series: <NEW_LINE> <INDENT> return col.astype(self.dtype)
The class for binary operations of pandas-on-Spark objects with one of the - spark types: FloatType, DoubleType and DecimalType - dtypes: Float32Dtype, Float64Dtype
62598f8a3c8af77a43b67ce9
class UserEmailVerificationView(LoginRequiredMixin, View): <NEW_LINE> <INDENT> template_name = 'accounts/email_edit_complete.html' <NEW_LINE> def get(self, request, uidb64, token): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> uid = force_text(urlsafe_base64_decode(uidb64)) <NEW_LINE> user = User.objects.get(pk=uid) <NE...
Verifies a new email address for existing user
62598f8ad4950a0f3b110be9
class ImageFallbackField(ImageField): <NEW_LINE> <INDENT> descriptor_class = FallbackFieldDescriptor <NEW_LINE> def __init__(self, fallback_path, *args, **kwargs): <NEW_LINE> <INDENT> kwargs.update(blank=True, null=True) <NEW_LINE> super(ImageFallbackField, self).__init__(*args, **kwargs) <NEW_LINE> self.fallback_path ...
A special ``ImageField`` subclass for defining an image field capable of falling back to the value of another field if empty.
62598f8a07f4c71912baefac
class MessageView(LoginRequiredMixin, ListView): <NEW_LINE> <INDENT> model = Message <NEW_LINE> paginate_by = 30 <NEW_LINE> paginate_orphans = 2 <NEW_LINE> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> self.c = get_object_or_404(Conversation, pk=kwargs['pk']) <NEW_LINE> if request.user not in self.c.part...
Display conversation list of messages
62598f8a8da39b475be02d50
class MyMetrics(Callback): <NEW_LINE> <INDENT> def on_train_begin(self, logs={}): <NEW_LINE> <INDENT> self.val_f1s = [] <NEW_LINE> self.val_recalls = [] <NEW_LINE> self.val_precisions = [] <NEW_LINE> <DEDENT> def on_epoch_end(self, epoch, logs={}): <NEW_LINE> <INDENT> val_predict = (np.asarray(self.model.predict(self.m...
metrics
62598f8a7cff6e4e811b5579
class Meta: <NEW_LINE> <INDENT> ordering = ['-sent_timestamp']
Order by sent timestamp.
62598f8a26068e7796d4c4c5
@patch("kolibri.core.content.utils.channel_import.Bridge") <NEW_LINE> @patch("kolibri.core.content.utils.channel_import.ChannelImport.find_unique_tree_id") <NEW_LINE> @patch("kolibri.core.content.utils.channel_import.apps") <NEW_LINE> class BaseChannelImportClassGenTableMapperTestCase(TestCase): <NEW_LINE> <INDENT> def...
Testcase for the base channel import class table mapper generator
62598f8a3617ad0b5ee05cab
class Coupon(models.Model): <NEW_LINE> <INDENT> code = models.CharField(max_length=50, unique=True) <NEW_LINE> valid_from = models.DateTimeField() <NEW_LINE> valid_to = models.DateTimeField() <NEW_LINE> discount = models.IntegerField(validators=[MinValueValidator(0), MaxValueValidator(100)]) <NEW_LINE> active = models....
优惠卷模型类
62598f8aa8ecb03325870d69
class BaseRecipeAttributeViewSet(viewsets.GenericViewSet, mixins.ListModelMixin, mixins.CreateModelMixin): <NEW_LINE> <INDENT> authentication_classes = (TokenAuthentication,) <NEW_LINE> permission_classes = (IsAuthenticated,) <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> assigned_only = bool( int(self.request....
Manage generic recipe attributes in database
62598f8ad6c5a102081e1caa
class RecursiveFilesInput (Input): <NEW_LINE> <INDENT> def __init__ (self, path, cwd=None): <NEW_LINE> <INDENT> self.path = os.path.join(cwd, os.path.expanduser(path)) <NEW_LINE> <DEDENT> def __iter__ (self): <NEW_LINE> <INDENT> if os.path.isfile(self.path): <NEW_LINE> <INDENT> yield self.path <NEW_LINE> <DEDENT> else:...
Recursively search a directory for files. path: directory to search cwd: path that `path` is relative to, if not absolute (default: the process working directory) Attributes: path: as passed to the constructor
62598f8a004d5f362081edad
class Data(VegaLiteSchema): <NEW_LINE> <INDENT> _schema = {'$ref': '#/definitions/Data'} <NEW_LINE> def __init__(self, *args, **kwds): <NEW_LINE> <INDENT> super(Data, self).__init__(*args, **kwds)
Data schema wrapper anyOf(:class:`DataSource`, :class:`Generator`)
62598f8a435de62698e9b956
class Output: <NEW_LINE> <INDENT> u <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.csv_dirpath = os.getcwd() + '/csv' <NEW_LINE> <DEDENT> def write_in_csv(self, my_hand, tile, dora): <NEW_LINE> <INDENT> csv_filepath = self.csv_dirpath + '/results.csv' <NEW_LINE> csvlist = [] <NEW_LINE> for hand in my_hand: <NE...
出力層のクラスです
62598f8a91af0d3eaad39965
class ChosenMultiSelectionWidget(MultiChosenBase): <NEW_LINE> <INDENT> populate_select = True <NEW_LINE> klass = u'chosen-multiselection-widget'
widget that allows multiple selection
62598f8a30dc7b766599f3c0
class CreateUserAPIView(APIView): <NEW_LINE> <INDENT> permission_classes = (AllowAny,) <NEW_LINE> def post(self, request): <NEW_LINE> <INDENT> user=request.data <NEW_LINE> serializer=UserSerializer(data=user) <NEW_LINE> serializer.is_valid(raise_exception=True) <NEW_LINE> serializer.save() <NEW_LINE> return Response(se...
Рзазрешить пользователю доступ в URL
62598f8a3cc13d1c6d4652cf
class InstekAFG2225(GenericAWG): <NEW_LINE> <INDENT> _exclude_commands={"output_polarity","output_sync","trigger_output","output_trigger_slope"} <NEW_LINE> _supported_functions={"sine","square","noise","ramp","pulse","user"} <NEW_LINE> _set_angle_unit=False <NEW_LINE> _force_channel_source_pfx=True <NEW_LINE> _channels...
Instek AFG2225 AWG. Compared to 2000/2100 series, has one extra channel and a bit more capabilities (burst trigger, pulse function)
62598f8a8c0ade5d55dc343f
class FlumeSensor(Entity): <NEW_LINE> <INDENT> def __init__(self, flume_device, name, device_id): <NEW_LINE> <INDENT> self._flume_device = flume_device <NEW_LINE> self._name = name <NEW_LINE> self._device_id = device_id <NEW_LINE> self._undo_track_sensor = None <NEW_LINE> self._available = False <NEW_LINE> self._state ...
Representation of the Flume sensor.
62598f8a656771135c4891e4
class TreeNode(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.column = None <NEW_LINE> self.value = None <NEW_LINE> self.categorical = True <NEW_LINE> self.name = None <NEW_LINE> self.left = None <NEW_LINE> self.right = None <NEW_LINE> self.leaf = False <NEW_LINE> self.classes = Counter() <NE...
A node class for a decision tree.
62598f8a07d97122c421680f
class ContrastBiasStretch(BaseStretch): <NEW_LINE> <INDENT> def __init__(self, contrast, bias): <NEW_LINE> <INDENT> super(ContrastBiasStretch, self).__init__() <NEW_LINE> self.contrast = contrast <NEW_LINE> self.bias = bias <NEW_LINE> <DEDENT> def __call__(self, values, out=None, clip=True): <NEW_LINE> <INDENT> values ...
A stretch that takes into account contrast and bias. The stretch is given by: .. math:: y = (x - {\rm bias}) * {\rm contrast} + 0.5 and the output values are clipped to the [0:1] range.
62598f8a442bda511e95bfc6
class NonExistingDaysHandling: <NEW_LINE> <INDENT> WRAP = 0 <NEW_LINE> SKIP = 1 <NEW_LINE> RAISE = 2
Способы обработки несуществующих дат
62598f8a07f4c71912baefad
class PointcloudFromOBJ(Pointcloud): <NEW_LINE> <INDENT> def __init__(self, obj_file): <NEW_LINE> <INDENT> self.obj_file = obj_file <NEW_LINE> self._points = None <NEW_LINE> <DEDENT> @property <NEW_LINE> def points(self): <NEW_LINE> <INDENT> if self._points is None: <NEW_LINE> <INDENT> lines = [] <NEW_LINE> with open(s...
Create a point cloud from a .OBJ file
62598f8a8e71fb1e983bb619
class MemoClass(type): <NEW_LINE> <INDENT> def __new__(metacls, nom, bases, dict): <NEW_LINE> <INDENT> print(metacls, nom) <NEW_LINE> return type.__new__(metacls, nom, bases, dict) <NEW_LINE> <DEDENT> def __init__(cls, nom, bases, dict): <NEW_LINE> <INDENT> cls.instance_set = [] <NEW_LINE> type.__init__(cls, nom, bases...
Exemple d'une metaclasse.
62598f8aa05bb46b3848a3e4
class DependencyInputConnection(InputConnection): <NEW_LINE> <INDENT> def __init__(self, input_name, node_name, output_name): <NEW_LINE> <INDENT> super(DependencyInputConnection, self).__init__(input_name) <NEW_LINE> self.node_name = node_name <NEW_LINE> self.output_name = output_name <NEW_LINE> <DEDENT> def add_parame...
Represents a connection from one node's output to another node's input
62598f8af7d966606f747b47
class Cproperty: <NEW_LINE> <INDENT> def __init__(self,node=None,type='NAF'): <NEW_LINE> <INDENT> self.type = type <NEW_LINE> if node is None: <NEW_LINE> <INDENT> self.node = etree.Element('property') <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.node = node <NEW_LINE> <DEDENT> <DEDENT> def get_node(self): <NEW_LI...
This class encapsulates the property element in KAF/NAF
62598f8a63b5f9789fe84cda
class PDFLiteral(PDFObject): <NEW_LINE> <INDENT> def __init__(self, text): <NEW_LINE> <INDENT> self.text = text <NEW_LINE> <DEDENT> def save(self, file): <NEW_LINE> <INDENT> file.write(self.text + LINEEND)
a ready-made one you wish to quote
62598f8aa4f1c619b294e150
class LoadError(Exception): <NEW_LINE> <INDENT> pass
Error raised in case serializing or unserializing went wrong
62598f8ac432627299fa2b35
class FoursquareListed: <NEW_LINE> <INDENT> def __init__(self, base): <NEW_LINE> <INDENT> if base: <NEW_LINE> <INDENT> self.base = base <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.base = {} <NEW_LINE> <DEDENT> <DEDENT> def getCount(self): <NEW_LINE> <INDENT> return self.base.get("count", []) <NEW_LINE> <DEDENT> ...
Contains a count of lists that contain this venue
62598f8a287bf620b6271720
class SimpleHTTPAuthHandler(SimpleHTTPRequestHandler): <NEW_LINE> <INDENT> username = "" <NEW_LINE> password = "" <NEW_LINE> def __init__(self, request, client_address, server): <NEW_LINE> <INDENT> key = "{}:{}".format(self.username, self.password).encode("ascii") <NEW_LINE> self.key = base64.b64encode(key) <NEW_LINE> ...
Main class to present webpages and authentication.
62598f8a0383005118f6d264
class GPyPiNoSetupFile(GPyPiException): <NEW_LINE> <INDENT> pass
Raised if no setup.py was found.
62598f8abe383301e0253366
class QueueSink(Sink): <NEW_LINE> <INDENT> def __init__(self, name=None): <NEW_LINE> <INDENT> Sink.__init__(self, name=name) <NEW_LINE> self.q = six.moves.queue.Queue() <NEW_LINE> <DEDENT> def push(self, msg): <NEW_LINE> <INDENT> self.q.put(msg) <NEW_LINE> <DEDENT> def high_push(self, msg): <NEW_LINE> <INDENT> self.q.p...
Collect messages from high and low entries and queue them. Messages are unqueued with the .recv() method. # noqa: E501 +-------+ >>-|--. |->> | queue | >-|--' |-> +-------+
62598f8a004d5f362081edae
class SelfDestructionException(Exception): <NEW_LINE> <INDENT> pass
Base exception for board-related errors, such as moving the head past the board limits, or attempting to take stones when there are no stones.
62598f8a76d4e153a661c77f
class excel_tab(excel): <NEW_LINE> <INDENT> delimiter = str('\t')
Describe the usual properties of Excel-generated TAB-delimited files.
62598f8ad7e4931a7ef3bc06
class b2FrictionJoint(b2Joint): <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_LINE> __repr__ = _swig_repr <NEW_LINE> def GetLocalAnchorA(self)...
Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction.
62598f8aeab8aa0e5d30b8e3
class Macro(BaseMacro, EqlNode): <NEW_LINE> <INDENT> __slots__ = 'name', 'parameters', 'expression' <NEW_LINE> template = Template('macro $name($parameters) $expression') <NEW_LINE> delims = {'parameters': ', '} <NEW_LINE> def __init__(self, name, parameters, expression): <NEW_LINE> <INDENT> BaseMacro.__init__(self, na...
Class for a macro on a node, to allow for client-side expansion.
62598f8a8a349b6b43685db0
@python_2_unicode_compatible <NEW_LINE> class Division(Audit, ActiveModel): <NEW_LINE> <INDENT> name = models.CharField(max_length=320) <NEW_LINE> slug = models.SlugField(help_text=_("The acronym of the name.")) <NEW_LINE> director = models.ForeignKey( settings.AUTH_USER_MODEL, related_name='leads_divisions', blank=Tru...
Departmental divisions. Divisions are structured into programs. The work of Biodiversity and Conservation Science is a service provided to output programs like Parks and Visitor Services, Nature Cons, Sustainable Forest Management and potentially other Divisions.
62598f8ae76e3b2f99fd8599
class ConfigSanityError(ConfigFormatError): <NEW_LINE> <INDENT> pass
Same as ConfigFormatError, raised when config is written by Spack.
62598f8a596a8972361277df
class File( object ): <NEW_LINE> <INDENT> def __init__( self, name, mode ): <NEW_LINE> <INDENT> self.__dataFile = None <NEW_LINE> self.__name = name <NEW_LINE> self.__bufferLength = 10000 <NEW_LINE> self.__header = "" <NEW_LINE> self.__data = "" <NEW_LINE> self.__open( mode ) <NEW_LINE> <DEDENT> @property <NEW_LINE> de...
Parent class to handle CSV and BIN files
62598f8a38b623060ffa8c00
class APINetwork(object): <NEW_LINE> <INDENT> def __init__(self, config, loop, host_control): <NEW_LINE> <INDENT> self.config = config <NEW_LINE> self.loop = loop <NEW_LINE> self.host_control = host_control <NEW_LINE> <DEDENT> @api_process <NEW_LINE> async def info(self, request): <NEW_LINE> <INDENT> return { ATTR_HOST...
Handle rest api for network functions.
62598f8abaa26c4b54d4ee1e
class JsonReportPlugin(PluginProvider): <NEW_LINE> <INDENT> PLUGIN_NAME = 'JsonReport' <NEW_LINE> EXTENSION_SET = '.json' <NEW_LINE> def __init__(self, target, data, directory=None): <NEW_LINE> <INDENT> PluginProvider.__init__(self, target, data) <NEW_LINE> try: <NEW_LINE> <INDENT> if None is directory: <NEW_LINE> <IND...
JsonReportPlugin class
62598f8a29b78933be269e90
class GetQueryParamsTestCase(TestCase): <NEW_LINE> <INDENT> longMessage = True <NEW_LINE> def test_tag(self): <NEW_LINE> <INDENT> req = RequestFactory().get('/?foobar=1&barfoo=2') <NEW_LINE> result = tags.get_query_params(req, 'foobar', 2) <NEW_LINE> self.assertEqual(result, 'foobar=2&barfoo=2', msg=( 'Should change th...
Tests for the ``get_query_params`` templatetag.
62598f8a07d97122c4216811
class _ReloadException(Exception): <NEW_LINE> <INDENT> pass
The user has requested a source code reload.
62598f8a07d97122c4216812
class HistogramPlot(wx.Panel): <NEW_LINE> <INDENT> def __init__(self, parent, columns, df_list_ctrl): <NEW_LINE> <INDENT> wx.Panel.__init__(self, parent) <NEW_LINE> columns_with_neutral_selection = [''] + list(columns) <NEW_LINE> self.columns = columns <NEW_LINE> self.df_list_ctrl = df_list_ctrl <NEW_LINE> self.figure ...
Panel providing a histogram plot.
62598f8ae76e3b2f99fd859a
@dataclass <NEW_LINE> class AzureEventHubClientConnectionString(AzureEventHubClient): <NEW_LINE> <INDENT> event_hub_connection_string: str <NEW_LINE> @property <NEW_LINE> def client(self) -> EventHubProducerClient: <NEW_LINE> <INDENT> return EventHubProducerClient.from_connection_string( conn_str=self.event_hub_connect...
Class for Connection String based Azure Event Hub Client.
62598f8ab830903b9686e227
class AdminEmailHandler(logging.Handler): <NEW_LINE> <INDENT> def emit(self, record): <NEW_LINE> <INDENT> import traceback <NEW_LINE> from django.conf import settings <NEW_LINE> from django.core import mail <NEW_LINE> try: <NEW_LINE> <INDENT> if sys.version_info < (2,5): <NEW_LINE> <INDENT> request = record.exc_info[2]...
An exception log handler that emails log entries to site admins If the request is passed as the first argument to the log record, request data will be provided in the
62598f8a07f4c71912baefaf
class Auth: <NEW_LINE> <INDENT> REGISTER = BASE_URL+'/auth/register' <NEW_LINE> LOGIN = BASE_URL+'/auth/login' <NEW_LINE> RESET_PASSWORD = BASE_URL+'/auth/reset-password' <NEW_LINE> LOGOUT = BASE_URL+'/auth/logout'
Authentication endpoints
62598f8ad53ae8145f917ffb
class LikeCommentAjax(LoginRequiredMixin, View): <NEW_LINE> <INDENT> def post(self, request): <NEW_LINE> <INDENT> comment_id = request.POST.get('cid', None) <NEW_LINE> action = request.POST.get('action', None) <NEW_LINE> if comment_id and action: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> comment = Comment.objects.ge...
采用Ajax进行喜欢书评操作 允许条件: 用户已登录和只能通过post方式提交
62598f8a5f7d997b871f918e
class UKey(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.unique_key = 1 <NEW_LINE> <DEDENT> def next(self): <NEW_LINE> <INDENT> self.unique_key = self.unique_key + random.randint(1, 5) <NEW_LINE> return self.unique_key
Unique key generator. Used to give all elements in the game a unique id. This makes it easier to compute what happened after name changes by the players. Could have used uuid here, but that would have been overkill.
62598f8a50485f2cf55daae0
class ResponseFactory(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.response = Response( output_speech=None, card=None, reprompt=None, directives=None, should_end_session=None, can_fulfill_intent=None) <NEW_LINE> <DEDENT> def speak(self, speech): <NEW_LINE> <INDENT> ssml = "<speak>{}</speak>...
ResponseFactory is class which provides helper functions to help building a response.
62598f8a8a43f66fc4bf1cf0
class RouteFilterRulePaged(Paged): <NEW_LINE> <INDENT> _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, 'current_page': {'key': 'value', 'type': '[RouteFilterRule]'} } <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(RouteFilterRulePaged, self).__init__(*args, **kwargs)
A paging container for iterating over a list of :class:`RouteFilterRule <azure.mgmt.network.v2018_02_01.models.RouteFilterRule>` object
62598f8a6fece00bbaccb4f6
class TestOrganizationDocument(BaseOrganizationDocument): <NEW_LINE> <INDENT> pass
Implementation for testing of BaseOrganizationDocument
62598f8a15fb5d323ce7e898
class GitHubIssuesMetrics(): <NEW_LINE> <INDENT> DS_NAME = "github_issues" <NEW_LINE> def __init__(self, index, start, end): <NEW_LINE> <INDENT> self.query = Issues(index) <NEW_LINE> self.start = start <NEW_LINE> self.end = end <NEW_LINE> self.query.since(self.start).until(self.end) <NEW_LINE> <DEDENT> def timeseries(s...
Root of all metric classes based on queries to a github enriched issues index. This class is not intended to be instantiated, but to be extened by child classes that will populate self.query with real queries. :param index: index object :param start: start date to get the data from :param end: end date to get the dat...
62598f8a45492302aabfc041
class Function(object): <NEW_LINE> <INDENT> u <NEW_LINE> def __init__(self, namespace, row, column, rtype, args, doc): <NEW_LINE> <INDENT> self.namespace = namespace <NEW_LINE> self.row = row <NEW_LINE> self.column = column <NEW_LINE> self.return_type = rtype <NEW_LINE> self.args = args <NEW_LINE> self.doc = doc
関数定義
62598f8adc8b845886d53123
class retryable(object): <NEW_LINE> <INDENT> def __init__(self, num_tries=1, sleep_time=0.1): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __call__(self, func: F) -> F: <NEW_LINE> <INDENT> return func
Fake retryable function
62598f8aeab8aa0e5d30b8e5
class KeyMaster(object): <NEW_LINE> <INDENT> def __init__(self, app, conf): <NEW_LINE> <INDENT> self.app = app <NEW_LINE> keymaster_config_path = conf.get('keymaster_config_path') <NEW_LINE> if keymaster_config_path: <NEW_LINE> <INDENT> if any(opt in conf for opt in ('encryption_root_secret',)): <NEW_LINE> <INDENT> rai...
Middleware for providing encryption keys. The middleware requires its ``encryption_root_secret`` option to be set. This is the root secret from which encryption keys are derived. This must be set before first use to a value that is a base64 encoding of at least 32 bytes. The security of all encrypted data critically d...
62598f8a0a50d4780f704f3a
class RieglFileInfo(generic.LiDARFileInfo): <NEW_LINE> <INDENT> def __init__(self, fname): <NEW_LINE> <INDENT> generic.LiDARFileInfo.__init__(self, fname) <NEW_LINE> if not isRieglFile(fname): <NEW_LINE> <INDENT> msg = 'not a riegl file' <NEW_LINE> raise generic.LiDARFormatNotUnderstood(msg) <NEW_LINE> <DEDENT> self.he...
Class that gets information about a Riegl file and makes it available as fields. The underlying C++ _riegl module does the hard work here
62598f8acad5886f8bdc4e41
class SelectionEventArgs(EventArgs): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def cast(arg): <NEW_LINE> <INDENT> return SelectionEventArgs() <NEW_LINE> <DEDENT> @property <NEW_LINE> def selection(self): <NEW_LINE> <INDENT> return Selection() <NEW_LINE...
Provides a set of arguments from a firing SelectionEvent to a SelectionEventHandler's notify callback method.
62598f8a63d6d428bbee2325
class FireWallRule: <NEW_LINE> <INDENT> def __init__(self, items): <NEW_LINE> <INDENT> self.__dict__.update(items) <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def create(cls, apiclient, ipaddressid, protocol, cidrlist=None, startport=None, endport=None, projectid=None, vpcid=None): <NEW_LINE> <INDENT> cmd = createFirew...
Manage Firewall rule
62598f8a1f037a2d8b9e3c45
class Output: <NEW_LINE> <INDENT> report = FileField(label='RRBS summary metrics') <NEW_LINE> detailed_report = FileField(label='Detailed RRBS report') <NEW_LINE> plot = FileField(label='QC plots') <NEW_LINE> species = StringField(label='Species') <NEW_LINE> build = StringField(label='Build')
Output fields for CollectRrbsMetrics.
62598f8aec188e330fdf840b
class LCSPlagiarist(Plagiarist): <NEW_LINE> <INDENT> def __init__(self, top_N=1, aggregate=True): <NEW_LINE> <INDENT> self.top_N = top_N <NEW_LINE> self.aggregate = aggregate <NEW_LINE> self.matchers = [] <NEW_LINE> self.pool = mp.Pool() <NEW_LINE> <DEDENT> def observe(self, document): <NEW_LINE> <INDENT> results = [] ...
Find the N longest common substrings in previous documents and compute max/mean statistics. Example: from kztk.plagiarist import LCSPlagiarist lcsp = LCSPlagiarist() print(lcsp.observe("hello world")) print(lcsp.observe("hello world 2")) # high score print(lcsp.observe("this is a novel idea")) # l...
62598f8ae64d504609df9168
class _VarLenFeatureHandler(object): <NEW_LINE> <INDENT> def __init__(self, name, feature_spec): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> self._np_dtype = feature_spec.dtype.as_numpy_dtype <NEW_LINE> self._value_fn = _make_feature_value_fn(feature_spec.dtype) <NEW_LINE> <DEDENT> @property <NEW_LINE> def name(se...
Handler for `VarLenFeature` values. `VarLenFeature` values will be parsed as an array of the corresponding dtype.
62598f8a8c0ade5d55dc3441
class AnsiblePlaybookClientPlugin: <NEW_LINE> <INDENT> def __init__( self, environment, instance_id, inventory_path: str, ansiblecfg_path: str = "", ): <NEW_LINE> <INDENT> self._environment: Environment = environment <NEW_LINE> self._instance_id: str = instance_id <NEW_LINE> self._ansibleplaybook = AnsiblePlaybookClien...
Ansible Playbook client plugin. Client plugin that allows control of and interaction with a ansible cluster using ansible-playbook cli ## Requirements 1. this plugin uses subprocess to call a ansible binary, so you have to install ansible in the environment ## Usage
62598f8a29b78933be269e91
class wait_chain(wait_base): <NEW_LINE> <INDENT> def __init__(self, *strategies): <NEW_LINE> <INDENT> self.strategies = list(strategies) <NEW_LINE> <DEDENT> def __call__(self, previous_attempt_number, delay_since_first_attempt): <NEW_LINE> <INDENT> wait_func = self.strategies[0] <NEW_LINE> if len(self.strategies) > 1: ...
Chain two or more waiting strategies. If all strategies are exhausted, the very last strategy is used thereafter. For example:: @retry(wait=wait_chain(*[wait_fixed(1) for i in range(3)] + [wait_fixed(2) for j in range(5)] + [wait_fixed(5) for k in range(4))) ...
62598f8a07d97122c4216813