code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
@resource(collection_path=ALL_URLS['product_version_builds_collection'], path=ALL_URLS['product_version_build'], cors_policy=CORS_POLICY) <NEW_LINE> class ProductVersionBuilds: <NEW_LINE> <INDENT> def __init__(self, request, context=None): <NEW_LINE> <INDENT> self.request = request <NEW_LINE> self.build_info = BuildInf...
Handle the 'product versions builds' endpoints
62598fe526238365f5fad261
class NeptuneLogger(): <NEW_LINE> <INDENT> def __init__(self, project_name, token=RAEYO_TOKEN, tags=None): <NEW_LINE> <INDENT> self.run = neptune.init(project=project_name, api_token=token, tags=tags) <NEW_LINE> <DEDENT> def save_metric(self, name, value): <NEW_LINE> <INDENT> self.run[name].log(value) <NEW_LINE> <DEDEN...
logging metric using neptune.ai - one exp has one logger
62598fe5ad47b63b2c5a7f51
class Solution: <NEW_LINE> <INDENT> def missingNumber(self, nums): <NEW_LINE> <INDENT> n = len(nums) <NEW_LINE> expected_sum = int((n * (n + 1)) / 2) <NEW_LINE> return expected_sum - sum(nums) <NEW_LINE> <DEDENT> def missingNumber(self, nums): <NEW_LINE> <INDENT> missing = len(nums) <NEW_LINE> for i in range(len(nums))...
1) Math. Sum of consective nums = n*(n+1) / 2 2) XOR 1 2 3 ... 10 Start with 3) Incrementingally sum-subtract 0 1 2 ... 10 iterativey add these [....] iteratively subtract these
62598fe5d8ef3951e32c81dc
class CharPGPPublicKeyField(PGPPublicKeyFieldMixin, models.CharField): <NEW_LINE> <INDENT> pass
Char PGP public key encrypted field.
62598fe5091ae35668705321
class PyMpmath(PythonPackage): <NEW_LINE> <INDENT> homepage = "http://mpmath.org" <NEW_LINE> pypi = "mpmath/mpmath-1.0.0.tar.gz" <NEW_LINE> version('1.1.0', sha256='fc17abe05fbab3382b61a123c398508183406fa132e0223874578e20946499f6') <NEW_LINE> version('1.0.0', sha256='04d14803b6875fe6d69e6dccea87d5ae5599802e4b1df7997bdd...
A Python library for arbitrary-precision floating-point arithmetic.
62598fe5c4546d3d9def7608
class OutputChannel(iointerface.OutputInterface): <NEW_LINE> <INDENT> _GPIO_DRIVER = None <NEW_LINE> def activate(self): <NEW_LINE> <INDENT> self._state = True <NEW_LINE> return self.state <NEW_LINE> <DEDENT> def deactivate(self): <NEW_LINE> <INDENT> self._state = False <NEW_LINE> return self.state <NEW_LINE> <DEDENT> ...
Mock concrete implementation of iointerface defined by the stage package
62598fe5187af65679d29f79
class State(models.Model): <NEW_LINE> <INDENT> session = models.ForeignKey(Session, on_delete=models.CASCADE, related_name='state') <NEW_LINE> turn = models.PositiveIntegerField() <NEW_LINE> game_state = models.TextField()
Модель состояния игровой сессии
62598fe5c4546d3d9def7609
class UserHouseListView(generic.ListView): <NEW_LINE> <INDENT> model = House <NEW_LINE> paginate_by = 6 <NEW_LINE> name = 'profile-house-list' <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> query_houses = House.objects.filter(user__username = self.kwargs['slug']).prefetch_related('user') <NEW_LINE> return query...
Houses List by User
62598fe5d8ef3951e32c81e1
class NumArray(object): <NEW_LINE> <INDENT> def __init__(self, nums): <NEW_LINE> <INDENT> self.accumulate = [0] <NEW_LINE> for n in nums: <NEW_LINE> <INDENT> self.accumulate += [self.accumulate[-1] + n] <NEW_LINE> <DEDENT> <DEDENT> def sumRange(self, i, j): <NEW_LINE> <INDENT> return self.accumulate[j+1] - self.accumul...
Thanks Python version in https://leetcode.com/discuss/68725/5-lines-c-4-lines-python
62598fe64c3428357761a9b9
class Date(validators.Validator): <NEW_LINE> <INDENT> def __call__(self, value): <NEW_LINE> <INDENT> if value is None: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> try: <NEW_LINE> <INDENT> datetime.strptime(value, '%Y-%m-%d') <NEW_LINE> return value <NEW_LINE> <DEDENT> except ValueError: <NEW_LINE> <INDENT> rais...
Validates Date option values.
62598fe6ad47b63b2c5a7f5e
class Event(UserDict): <NEW_LINE> <INDENT> schema = { "$schema": "http://json-schema.org/schema#", "type": "object", "properties": { "event_id": {"type": "string"}, "event_type": {"type": "string"}, "title": {"type": "string"}, "body": {"type": "string"}, "timestamp": {"type": "number"}, "sender": {"type": "string"}, "...
Event is a signal which models a type of notification. It's fully customizable and allow to represent the business model by extending it.
62598fe6c4546d3d9def760d
class Pluses(Shapes): <NEW_LINE> <INDENT> def __init__(self, hatch, density): <NEW_LINE> <INDENT> verts = [ (0.4, 0.8), (0.4, 0.0), (0.0, 0.4), (0.8, 0.4), ] <NEW_LINE> codes = [Path.MOVETO, Path.LINETO, Path.MOVETO, Path.LINETO, ] <NEW_LINE> path = Path(verts, codes, closed=False) <NEW_LINE> self.shape_vertices = path...
Attempt at USGS pattern 721, 327
62598fe626238365f5fad274
class Snapshot(datatype([('directory_digest', Digest), ('files', tuple), ('dirs', tuple)])): <NEW_LINE> <INDENT> @property <NEW_LINE> def is_empty(self): <NEW_LINE> <INDENT> return self == EMPTY_SNAPSHOT
A Snapshot is a collection of file paths and dir paths fingerprinted by their names/content. Snapshots are used to make it easier to isolate process execution by fixing the contents of the files being operated on and easing their movement to and from isolated execution sandboxes.
62598fe6ad47b63b2c5a7f62
class CNNGeometricDecoder(nn.Module): <NEW_LINE> <INDENT> def __init__(self, sample, output_dim=6, fr_kernel_sizes=[3,3,3], fr_channels=[128,64,32], corr_type='3D'): <NEW_LINE> <INDENT> super(CNNGeometricDecoder, self).__init__() <NEW_LINE> assert len(fr_channels)==len(fr_kernel_sizes), 'The list of channels must match...
This is the code written with reference to https://github.com/ignacio-rocco/cnngeometric_pytorch
62598fe64c3428357761a9c1
class UnknownBackupIdException(Exception): <NEW_LINE> <INDENT> pass
The searched backup_id doesn't exists
62598fe6fbf16365ca7947d8
@register_storage("storage", "0.0.1", {"root": str}) <NEW_LINE> class StorageStorage(AbstractStorage): <NEW_LINE> <INDENT> def __init__(self, root: str) -> None: <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.__root = Path(root) <NEW_LINE> self.__head = _STORAGE_HEAD <NEW_LINE> self.__list_file = _STORAGE_LIST ...
storageのstorage /path/to/storage/{_STORAGE_HEAD}: storage hash /path/to/storage/{_STORAGE_LIST}: {"hash": ..., "type": ..., "version": ..., "args": {"key": val}} {"hash": ..., "type": "storage", "version": ..., "args": {"root": /path/to/other_storage}}
62598fe64c3428357761a9c3
class StorageSamplesContainer(StorageLayoutContainer): <NEW_LINE> <INDENT> implements(IStorageSamplesContainer) <NEW_LINE> schema = schema <NEW_LINE> default_samples_capacity = 1 <NEW_LINE> def is_object_allowed(self, object_brain_uid): <NEW_LINE> <INDENT> obj = api.get_object(object_brain_uid) <NEW_LINE> return IAnaly...
Container for the storage of samples
62598fe64c3428357761a9c5
class UserSerializerFetch(serializers.ModelSerializer): <NEW_LINE> <INDENT> email_id = serializers.EmailField(max_length=255) <NEW_LINE> password = serializers.CharField(max_length=255, write_only=True, required=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = User <NEW_LINE> fields = ['email_id', 'password']
serializer for user model
62598fe6fbf16365ca7947dc
class InquiryPriceRunInstancesResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Price = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("Price") is not None: <NEW_LINE> <INDENT> self.Price = Price() <NEW_...
InquiryPriceRunInstances返回参数结构体
62598fe6187af65679d29f84
class BuildThriftClients(setuptools.Command): <NEW_LINE> <INDENT> user_options = [] <NEW_LINE> def initialize_options(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def finalize_options(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> _log.info('Build Thrift code') <NEW_LINE> ...
Build command for generating Thrift client code
62598fe6091ae3566870533b
class JobCredential(ProxyResource): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'username': {'required': True}, 'password': {'required': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 's...
A stored credential that can be used by a job to connect to target databases. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :ivar id: Resource ID. :vartype id: str :ivar name: Resource name. :vartype name: ...
62598fe6ad47b63b2c5a7f6e
class Tournament(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=255) <NEW_LINE> description = models.TextField(blank=True) <NEW_LINE> type = models.CharField(max_length=1, choices=TOURNAMENT_TYPES) <NEW_LINE> game = models.ForeignKey(Game) <NEW_LINE> started = models.DateTimeField(auto_now_add=Tr...
Currently assumes allocations are only powers of 2
62598fe6c4546d3d9def7615
class ClusterUpgradeRequest(base.APIBase): <NEW_LINE> <INDENT> max_batch_size = wtypes.IntegerType(minimum=1) <NEW_LINE> nodegroup = wtypes.StringType(min_length=1, max_length=255) <NEW_LINE> cluster_template = wtypes.StringType(min_length=1, max_length=255)
API object for handling upgrade requests. This class enforces type checking and value constraints.
62598fe6091ae3566870533f
class createLocalUser_result: <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRUCT, 'ouch1', (AccumuloException, AccumuloException.thrift_spec), None, ), (2, TType.STRUCT, 'ouch2', (AccumuloSecurityException, AccumuloSecurityException.thrift_spec), None, ), ) <NEW_LINE> def __init__(self, ouch1=None, ouch2=None,)...
Attributes: - ouch1 - ouch2
62598fe6c4546d3d9def7617
class KaleidoscopeImport(bpy.types.Operator, ImportHelper): <NEW_LINE> <INDENT> bl_idname = "kaleidoscope.install_files" <NEW_LINE> bl_label = "Install Files" <NEW_LINE> filename_ext = ".kal" <NEW_LINE> filter_glob = bpy.props.StringProperty( default="*.kal;*.zip", options={'HIDDEN'}, ) <NEW_LINE> def execute(self, con...
Install .zip or .kal file in the add-on
62598fe6091ae35668705341
class TestFrameGetAllNodesInformationRequest(unittest.TestCase): <NEW_LINE> <INDENT> def test_bytes(self): <NEW_LINE> <INDENT> frame = FrameGetAllNodesInformationRequest() <NEW_LINE> self.assertEqual(bytes(frame), b"\x00\x03\x02\x02\x03") <NEW_LINE> <DEDENT> def test_frame_from_raw(self): <NEW_LINE> <INDENT> frame = fr...
Test class for FrameGetAllNodesInformationRequest.
62598fe6ad47b63b2c5a7f74
class BlockingReadTest(RTCBaseTest): <NEW_LINE> <INDENT> PREREQUISITES = [qatest.PreReq("ReadTimeTest")] <NEW_LINE> def test_method(self): <NEW_LINE> <INDENT> self.info("RTC Driver (and Python rtc module) Test.") <NEW_LINE> self.irqcount = 0 <NEW_LINE> rtc = self.config.rtc <NEW_LINE> def _rtc_counter(): <NEW_LINE> <IN...
Normal blocking read. Use scheduler to force a timeout.
62598fe6187af65679d29f89
class Production(Default): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.DEBUG = False <NEW_LINE> self.SECRET_KEY = os.environ["SECRET_KEY"] <NEW_LINE> self.LOGGING["root"]["level"] = "INFO" <NEW_LINE> self.ROOT_URL = "https://caffeine.dd-decaf.eu"
Production settings.
62598fe6ad47b63b2c5a7f76
class Family: <NEW_LINE> <INDENT> def __init__(self, letter, words): <NEW_LINE> <INDENT> self.letter = letter.upper() <NEW_LINE> self.words = [word for word in words if word.family == self.letter]
A class of a group of words
62598fe6c4546d3d9def7619
class OkexAccountBalance(AccountBalance): <NEW_LINE> <INDENT> def normalize_response(self, json_response): <NEW_LINE> <INDENT> return { 'symbol': json_response['currency'], 'amount': json_response['amount'] }
Response items format: { 'amount': 0.162, 'currency': 'btc', }
62598fe6ab23a570cc2d5102
class Reservation(core_models.TimeStampedModel): <NEW_LINE> <INDENT> STATUS_PENDING = "pending" <NEW_LINE> STATUS_CONFIRMED = "confirmed" <NEW_LINE> STATUS_CANCELED = "canceled" <NEW_LINE> STATUS_CHOICES = ( (STATUS_PENDING, "Pending"), (STATUS_CONFIRMED, "Confirmed"), (STATUS_CANCELED, "Canceled"), ) <NEW_LINE> object...
Reservation Definition
62598fe626238365f5fad28e
class LogsPane(Pane): <NEW_LINE> <INDENT> def fetch(self): <NEW_LINE> <INDENT> args = ['docker', 'logs', '-t'] <NEW_LINE> if self.last_timestamp: <NEW_LINE> <INDENT> args.extend(['--since', self.last_timestamp]) <NEW_LINE> <DEDENT> args.append(self.name) <NEW_LINE> try: <NEW_LINE> <INDENT> output = subprocess.check_out...
A LogsPane streams its data from a subprocess so the paint method is completely different and we need to make sure we clean up files and processes left over.
62598fe6187af65679d29f8c
class TransferRateAnalyzer(object): <NEW_LINE> <INDENT> def __init__(self, data=None, xmin=None, ymin=None, zmin=None, xmax=None, ymax=None, zmax=None): <NEW_LINE> <INDENT> self.data = data <NEW_LINE> uinput = "" <NEW_LINE> self.data = [] <NEW_LINE> try: <NEW_LINE> <INDENT> self.data.extend(data) <NEW_LINE> <DEDENT> ex...
Analyzes a trajectory for number of molecules of a specified type that go in or out of a region. Provides both the number of molecules in the region over time as well as a transfer rate in and out. Attributes: data (list of TrajectorySet): Raw trajectories to analyze _calc (dict str->numpy 2D array): Analyzed ...
62598fe64c3428357761a9d9
class RecipeCommentViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = RecipeComment.objects.all() <NEW_LINE> serializer_class = RecipeCommentSerializer <NEW_LINE> pagination_class = StandardResultsSetPagination <NEW_LINE> filter_class = RecipeCommentFilter <NEW_LINE> ordering_filter = OrderingFilter() <NEW_...
API endpoint that allows comments to be viewed or edited.
62598fe6fbf16365ca7947f0
class IHelloServiceServicer(object): <NEW_LINE> <INDENT> def findHello(self, request, context): <NEW_LINE> <INDENT> context.set_code(grpc.StatusCode.UNIMPLEMENTED) <NEW_LINE> context.set_details('Method not implemented!') <NEW_LINE> raise NotImplementedError('Method not implemented!')
活动服务
62598fe726238365f5fad292
class LogCollector(object): <NEW_LINE> <INDENT> ERROR_LOG_FILE = '/var/log/apache2/error.log' <NEW_LINE> def __init__(self, hostname, username, password): <NEW_LINE> <INDENT> self.hostname = hostname <NEW_LINE> self.username = username <NEW_LINE> self.password = password <NEW_LINE> self.apache_error_log_lines = None <N...
Collects the error logs during a test's execution.
62598fe7c4546d3d9def761f
class glogistic_gen(dist.rv_continuous): <NEW_LINE> <INDENT> numargs = 1 <NEW_LINE> def _argcheck(self, k): <NEW_LINE> <INDENT> return (k == k) <NEW_LINE> <DEDENT> def _cdf(self, x, k): <NEW_LINE> <INDENT> u = where(k == 0, exp(-x), (1. - k * x) ** (1. / k)) <NEW_LINE> return 1. / (1. + u) <NEW_LINE> <DEDENT> def _pdf(...
The CDF is given by .. math:: F(x;k) = \frac{1}{1 + \left[1 - kx\right]^{1/k}}
62598fe74c3428357761a9e1
class UserProfile(models.Model): <NEW_LINE> <INDENT> user = models.OneToOneField(User, verbose_name=_('User')) <NEW_LINE> profile_photo = models.ImageField(upload_to=profile_photo_upload_path, validators=[file_size_limit], null=True, blank=True, verbose_name=_('Profile photo')) <NEW_LINE> c_time = models.DateTimeField(...
登录用户
62598fe7091ae35668705353
class Trifid(Bifid): <NEW_LINE> <INDENT> def __init__(self, key, period=0): <NEW_LINE> <INDENT> if not isinstance(key, util.Polybius): <NEW_LINE> <INDENT> key = util.Polybius('', key, 3) <NEW_LINE> <DEDENT> if key.dimensions != 3: <NEW_LINE> <INDENT> raise ValueError('Key must be a Polybius cube!') <NEW_LINE> <DEDENT> ...
The trifid cipher is another cipher by Felix Delastelle. It extends the concept of his bifid cipher into the third dimension; where the bifid cipher uses a Polybius square as the key, the trifid cipher uses a stack of n n x n Polybius squares (where n is canonically 3) as a Polybius cube. Other than dealing with three...
62598fe7ab23a570cc2d5109
class UserAgentMiddleware(object): <NEW_LINE> <INDENT> def process_request(self, request, spider): <NEW_LINE> <INDENT> agent = random.choice(Agents) <NEW_LINE> request.headers["User-Agent"] = agent
换User-Agent
62598fe7c4546d3d9def7622
class MissingRepoError(Exception): <NEW_LINE> <INDENT> pass
Use this if a repo at a path is missing in a script
62598fe7ad47b63b2c5a7f8a
class Cursor: <NEW_LINE> <INDENT> def __init__(self, scr): <NEW_LINE> <INDENT> self.screen = scr <NEW_LINE> self.x, self.y = 1, 1 <NEW_LINE> self.last_screen_dimensions = { "width": int(self.screen.get_width()), "height": int(self.screen.get_height()) } <NEW_LINE> self.saved_positions = {} <NEW_LINE> <DEDENT> def corre...
Cursor class is just to make my life easier by positioning the cursor within menus and other stuff needed. It automatically defaults the x and y for certain reasons that break the command prompt. It has input function that finds simply returns the arrow or wasd keys that will be used to position the cursor. pos is u...
62598fe74c3428357761a9e9
class Item(metaclass=abc.ABCMeta): <NEW_LINE> <INDENT> def __init__(self, name, packing, price): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.packing = packing <NEW_LINE> self.price = price <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> print("{}价格:{}".format(self.name, self.price))
表示食物条目:汉堡 / 冷饮等
62598fe7091ae3566870535b
class line(myObject): <NEW_LINE> <INDENT> def __init__(self, p1, p2): <NEW_LINE> <INDENT> typeTest([point, p1.__class__], p1, p2) <NEW_LINE> self.para = ("p1", "p2") <NEW_LINE> self.p1 = p1 <NEW_LINE> self.p2 = p2 <NEW_LINE> <DEDENT> def offset(self, dis): <NEW_LINE> <INDENT> typeTest([Num.const], dis) <NEW_LINE> v = v...
2D/3D line P1 to P2
62598fe7187af65679d29f96
class CancerRecord(db.Model): <NEW_LINE> <INDENT> __tablename__ = "cancer_history" <NEW_LINE> id = db.Column(db.Integer, primary_key=True, autoincrement=True) <NEW_LINE> patient_id = db.Column(db.Integer, db.ForeignKey('patients.id')) <NEW_LINE> age = db.Column(db.Integer) <NEW_LINE> bmi = db.Column(db.Float) <NEW_LINE...
Cancer object to store patient diabetes data
62598fe7091ae3566870535d
class Character(DefaultCharacter): <NEW_LINE> <INDENT> def at_object_creation(self): <NEW_LINE> <INDENT> self.db.desc = "a wide-eyed villager" <NEW_LINE> self.db.evscaperoom_standalone = True <NEW_LINE> <DEDENT> def at_post_puppet(self, **kwargs): <NEW_LINE> <INDENT> from evscaperoom.menu import run_evscaperoom_menu <N...
The Character defaults to reimplementing some of base Object's hook methods with the following functionality: at_basetype_setup - always assigns the DefaultCmdSet to this object type (important!)sets locks so character cannot be picked up and its commands only be called by itself, not a...
62598fe7ab23a570cc2d510d
class Ls(CommandLine): <NEW_LINE> <INDENT> def process_with_json(self, json): <NEW_LINE> <INDENT> if 'path' in json: <NEW_LINE> <INDENT> path = json['path'] <NEW_LINE> if not self.execute_command(['ls', '-l', path]): <NEW_LINE> <INDENT> if not hasattr(self, 'error'): <NEW_LINE> <INDENT> self.error = 400 <NEW_LINE> <DED...
Class to process ls entry and to format the reply
62598fe7187af65679d29f9b
class APNSUnknownError(APNSServerError): <NEW_LINE> <INDENT> code = 255 <NEW_LINE> description = 'Unknown'
Exception for APNS unknown error.
62598fe7ad47b63b2c5a7f9a
class ProgressBar: <NEW_LINE> <INDENT> def __init__(self, minValue = 0, maxValue = 10, totalWidth=12): <NEW_LINE> <INDENT> self.progBar = "[]" <NEW_LINE> self.min = minValue <NEW_LINE> self.max = maxValue <NEW_LINE> self.span = maxValue - minValue <NEW_LINE> self.width = totalWidth <NEW_LINE> self.amount = 0 <NEW_LINE>...
originally posted by Randy Pargman modified by Children's Hospital of Boston
62598fe7ab23a570cc2d5113
class NonparameterizedConvolution2D(function.Function): <NEW_LINE> <INDENT> def __init__(self, stride=1, pad=0, use_cudnn=True): <NEW_LINE> <INDENT> self.stride = stride <NEW_LINE> self.pad = pad <NEW_LINE> self.use_cudnn = use_cudnn <NEW_LINE> <DEDENT> def check_type_forward(self, in_types): <NEW_LINE> <INDENT> type_c...
Two-dimensional nonparameterized convolution class. Args: stride (int or (int, int)): Stride of filter applications. ``stride=s`` and ``stride=(s, s)`` are equivalent. pad (int or (int, int)): Spatial padding width for input arrays. ``pad=p`` and ``pad=(p, p)`` are equivalent. use_cudnn (bo...
62598fe726238365f5fad2b0
class Tags: <NEW_LINE> <INDENT> pattern = "pattern" <NEW_LINE> srai = "srai" <NEW_LINE> scene = "scene" <NEW_LINE> template = "template" <NEW_LINE> category = "category" <NEW_LINE> that = "that" <NEW_LINE> insert = "insert"
The known xml tags of AIML, just to group this info together, and give aditional documentation
62598fe826238365f5fad2b2
class V1HTTPGetAction(object): <NEW_LINE> <INDENT> swagger_types = { 'host': 'str', 'http_headers': 'list[V1HTTPHeader]', 'path': 'str', 'port': 'object', 'scheme': 'str' } <NEW_LINE> attribute_map = { 'host': 'host', 'http_headers': 'httpHeaders', 'path': 'path', 'port': 'port', 'scheme': 'scheme' } <NEW_LINE> def __i...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fe8091ae3566870536f
class DvTable(AbstractOrderderTable): <NEW_LINE> <INDENT> _id = Columns.SerialColumn() <NEW_LINE> _runid = Columns.FloatColumn() <NEW_LINE> _source_system = Columns.TextColumn() <NEW_LINE> _valid = Columns.BoolColumn(default_value=True) <NEW_LINE> _validation_msg = Columns.TextColumn() <NEW_LINE> _insert_date = Columns...
Basis abstracte tabel voor alle datavault tabellen. Deze bevat de vast velden die in alle datavault tabellen nodig zijn.
62598fe84c3428357761a9ff
class YahooWeeklyWeatherSpider(scrapy.Spider): <NEW_LINE> <INDENT> name = 'yahoo_weekly_weather' <NEW_LINE> allowed_domains = ['weather.yahoo.co.jp'] <NEW_LINE> start_urls = [] <NEW_LINE> urls_file_path = './data/urls/{}.csv'.format(name) <NEW_LINE> output_file_name = name <NEW_LINE> channel = 0 <NEW_LINE> now = dateti...
Yahoo!天気の週間天気予報を取得するスパイダー。
62598fe8187af65679d29fa0
class RaidOperationError(errors.RESTError): <NEW_LINE> <INDENT> message = ('Raid operation error!')
Error raised when raid operation error
62598fe84c3428357761aa03
class History(BaseTest): <NEW_LINE> <INDENT> def __init__(self, test_parms_dict, connection_instance, input_arg_dict): <NEW_LINE> <INDENT> BaseTest.__init__(self, test_parms_dict, connection_instance, input_arg_dict) <NEW_LINE> self.dict_parms = test_parms_dict <NEW_LINE> self.connection = connection_instance <NEW_LINE...
This class inherits from BaseTest and contains methods that interact with the historical interval functionality of products.
62598fe8ab23a570cc2d5119
class DayListView(generic.ListView): <NEW_LINE> <INDENT> queryset = Day.objects.active()
List of days.
62598fe8187af65679d29fa3
class HiddenCroppedImageFileInput(CroppedImageFileInput): <NEW_LINE> <INDENT> def __init__(self, attrs=None): <NEW_LINE> <INDENT> super(HiddenCroppedImageFileInput, self).__init__(attrs) <NEW_LINE> self.widgets = (HiddenInput(attrs=attrs), ImageCropCoordinatesInput(attrs=attrs), ) <NEW_LINE> for widget in self.widgets:...
Splits the cropped image file input into two hidden inputs
62598fe84c3428357761aa05
class SchemaResponseDetailPermission(SchemaResponseParentPermission, permissions.BasePermission): <NEW_LINE> <INDENT> REQUIRED_PERMISSIONS = {'DELETE': 'admin', 'PATCH': 'write'}
Permissions for top-level `schema_response` detail endpoints. See SchemaResponseParentPermission for GET permission requirements To PATCH to a SchemaResponse, a user must have "write" permissions on the parent resource. To DELETE a SchemaResponse, a user must have "admin" permissions on the parent resource.
62598fe8ad47b63b2c5a7faa
class FunctionFieldVectorSpaceIsomorphism(Morphism): <NEW_LINE> <INDENT> def _repr_(self): <NEW_LINE> <INDENT> s = "Isomorphism:" <NEW_LINE> s += "\n From: {}".format(self.domain()) <NEW_LINE> s += "\n To: {}".format(self.codomain()) <NEW_LINE> return s <NEW_LINE> <DEDENT> def is_injective(self): <NEW_LINE> <INDENT...
Base class for isomorphisms between function fields and vector spaces. EXAMPLES:: sage: K.<x> = FunctionField(QQ); R.<y> = K[] sage: L.<y> = K.extension(y^2 - x*y + 4*x^3) sage: V, f, t = L.vector_space() sage: isinstance(f, sage.rings.function_field.maps.FunctionFieldVectorSpaceIsomorphism) True
62598fe8fbf16365ca79481e
class LastInstanceOutputFilesResource(Resource): <NEW_LINE> <INDENT> @jwt_required <NEW_LINE> def get(self, asset_instance_id, temporal_entity_id): <NEW_LINE> <INDENT> asset_instance = assets_service.get_asset_instance(asset_instance_id) <NEW_LINE> entity = entities_service.get_entity(asset_instance["asset_id"]) <NEW_L...
Last revisions of output files for given instance grouped by output type and file name.
62598fe84c3428357761aa09
class LinkBot(irc.Bot): <NEW_LINE> <INDENT> def __init__(self, *data): <NEW_LINE> <INDENT> self.others = [] <NEW_LINE> self.fora = None <NEW_LINE> if data: <NEW_LINE> <INDENT> irc.Bot.__init__(self, *data) <NEW_LINE> <DEDENT> <DEDENT> def handle_cooked(self, op, sender, forum, addl): <NEW_LINE> <INDENT> if self.fora an...
Linkbot stuff. The strategy here is to relay messages to the others, then get the others to act as if they had just seen the message from their server.
62598fe8c4546d3d9def7635
class IrTestCase(ModuleTestCase): <NEW_LINE> <INDENT> module = 'ir' <NEW_LINE> @with_transaction() <NEW_LINE> def test_sequence_substitutions(self): <NEW_LINE> <INDENT> pool = Pool() <NEW_LINE> Sequence = pool.get('ir.sequence') <NEW_LINE> SequenceType = pool.get('ir.sequence.type') <NEW_LINE> Date = pool.get('ir.date'...
Test ir module
62598fe8091ae3566870537c
class Dep(object): <NEW_LINE> <INDENT> def __init__(self,g,d,t,flag="l1"): <NEW_LINE> <INDENT> self.gov=g <NEW_LINE> self.dep=d <NEW_LINE> self.type=t <NEW_LINE> self.flag=flag <NEW_LINE> <DEDENT> def __eq__(self,other): <NEW_LINE> <INDENT> return (self.gov==other.gov and self.dep==other.dep and self.type==other.type a...
Simple class to represent dependency.
62598fe8c4546d3d9def7636
class TimeExpression: <NEW_LINE> <INDENT> def __init__(self,text,value): <NEW_LINE> <INDENT> self.text = text <NEW_LINE> self.value = value
simple record class
62598fe8187af65679d29fa7
class SubjectField(forms.MultiValueField): <NEW_LINE> <INDENT> required_oids = (NameOID.COMMON_NAME,) <NEW_LINE> def __init__(self, **kwargs: typing.Any) -> None: <NEW_LINE> <INDENT> fields = tuple(forms.CharField(required=v in self.required_oids) for v in ADMIN_SUBJECT_OIDS) <NEW_LINE> kwargs.setdefault("widget", Subj...
A MultiValue field for a :py:class:`~django_ca.subject.Subject`.
62598fe84c3428357761aa0d
class TreeWatchHandler(pyinotify.ProcessEvent): <NEW_LINE> <INDENT> METAFILE_EXT = (".torrent", ".load", ".start", ".queue") <NEW_LINE> def my_init(self, **kw): <NEW_LINE> <INDENT> self.job = kw["job"] <NEW_LINE> <DEDENT> def handle_path(self, event): <NEW_LINE> <INDENT> self.job.LOG.debug("Notification %r" % event) <N...
inotify event handler for rTorrent folder tree watch. See https://github.com/seb-m/pyinotify/.
62598fe8ad47b63b2c5a7fb2
class Pool: <NEW_LINE> <INDENT> def __init__(self, connections, picker_class=RoundRobinPicker): <NEW_LINE> <INDENT> self.connections = connections <NEW_LINE> self.picker = picker_class() <NEW_LINE> <DEDENT> def get_connection(self): <NEW_LINE> <INDENT> if len(self.connections) > 1: <NEW_LINE> <INDENT> return self.picke...
Pool of connections.
62598fe826238365f5fad2c8
class MarkdownPreviewListener(object): <NEW_LINE> <INDENT> def on_post_save(self, filename): <NEW_LINE> <INDENT> settings = load_settings('MarkdownPreview.sublime-settings') <NEW_LINE> if settings.get('enable_autoreload', True): <NEW_LINE> <INDENT> filetypes = settings.get('markdown_filetypes') <NEW_LINE> if filetypes ...
auto update the output html if markdown file has already been converted once
62598fe84c3428357761aa11
class ImportCoursePage(ImportMixin, TemplateCheckMixin, CoursePage): <NEW_LINE> <INDENT> pass
Import page for Courses
62598fe8fbf16365ca79482b
class ResNetV1(ResNet): <NEW_LINE> <INDENT> def __init__(self, block, layers, channels, classes=1000, thumbnail=False, **kwargs): <NEW_LINE> <INDENT> super(ResNetV1, self).__init__(channels, classes, **kwargs) <NEW_LINE> assert len(layers) == len(channels) - 1 <NEW_LINE> self.features.add(nn.BatchNorm(scale=False, epsi...
ResNet V1 model from `"Deep Residual Learning for Image Recognition" <http://arxiv.org/abs/1512.03385>`_ paper. Parameters ---------- block : HybridBlock Class for the residual block. Options are BasicBlockV1, BottleneckV1. layers : list of int Numbers of layers in each block channels : list of int Numbers...
62598fe8091ae35668705386
class ExportCatalogStart(ModelView): <NEW_LINE> <INDENT> __name__ = 'amazon.export_catalog.start'
Export Catalog to Amazon View
62598fe8c4546d3d9def763b
class UserConfig: <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.vardir = kwargs['vardir'] <NEW_LINE> self.id = kwargs['user_id'] <NEW_LINE> self.format = kwargs['format'] <NEW_LINE> self.language = kwargs['language'] <NEW_LINE> self.advance = kwargs['advance'] <NEW_LINE> self.config_parser ...
Per-user configuration parameters.
62598fe8ab23a570cc2d5123
class DatesListView(generic.ListView): <NEW_LINE> <INDENT> model = Dates <NEW_LINE> context_object_name = 'dates' <NEW_LINE> template_name = "dates/dates_list.html" <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super(DatesListView, self).get_context_data(**kwargs) <NEW_LINE> context['mo...
@Desc: Devuelve la lista de Citas por usuario autenticado
62598fe84c3428357761aa19
class ChannelAccessEnv: <NEW_LINE> <INDENT> def __init__(self, pv_values): <NEW_LINE> <INDENT> self._pv_values = pv_values <NEW_LINE> self._old_values = None <NEW_LINE> self._old_index = None <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> global PV_TEST_DICT, PV_TEST_DICT_CALL_INDEX <NEW_LINE> self._old_v...
Channel access environment setup. Use this to create a channel access environment that can return different values depending on the number of times a PV is accessed. This will also track how many times a PV has been accessed.
62598fe8fbf16365ca794831
class IdentityCodeValidator(object): <NEW_LINE> <INDENT> def __init__(self, validation_exception_type=ValidationError): <NEW_LINE> <INDENT> self.validation_exception_type = validation_exception_type <NEW_LINE> <DEDENT> @UnicodeArguments(skip=['self', 0]) <NEW_LINE> def __call__(self, value): <NEW_LINE> <INDENT> try: <N...
Validates if given string represents correct identity code.
62598fe84c3428357761aa1b
class TestBaseModelDictStorage(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.ikea = FileStorage() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> if os.path.exists("file.json"): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> os.remove("file.json") <NEW_LINE> <DEDENT> except...
class testing File Storage
62598fe9091ae3566870538c
class overlayworkingfilectx(committablefilectx): <NEW_LINE> <INDENT> def __init__(self, repo, path, filelog=None, parent=None): <NEW_LINE> <INDENT> super(overlayworkingfilectx, self).__init__(repo, path, filelog, parent) <NEW_LINE> self._repo = repo <NEW_LINE> self._parent = parent <NEW_LINE> self._path = path <NEW_LIN...
Wrap a ``workingfilectx`` but intercepts all writes into an in-memory cache, which can be flushed through later by calling ``flush()``.
62598fe9187af65679d29fb0
class DefaultListView(QtGui.QListView): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> QtGui.QListView.__init__(self, parent) <NEW_LINE> self.__verticalOffset = 0 <NEW_LINE> <DEDENT> def keyPressEvent(self, keyEvent): <NEW_LINE> <INDENT> if keyEvent.key() == Qt.Key_Return: <NEW_LINE> <INDENT> ...
Customize the given L{QtGui.QListView}.
62598fe9ab23a570cc2d5127
class MessageUpdate(Update): <NEW_LINE> <INDENT> update_type = 'message' <NEW_LINE> def __init__(self, update): <NEW_LINE> <INDENT> super().__init__(update) <NEW_LINE> message = update['message'] <NEW_LINE> self.message_id = message['message_id'] <NEW_LINE> self.from_user = message.get('from', None) <NEW_LINE> self.dat...
Telegram Bot API message update.
62598fe926238365f5fad2da
class newstr(str): <NEW_LINE> <INDENT> def isidentifier(self): <NEW_LINE> <INDENT> return utils.isidentifier(self)
Fix for :class:`~future.types.newstr.newstr`. This implements :meth:`isidentifier`, which currently raises a `NotImplementedError` in `future`.
62598fe94c3428357761aa23
class AnotherClass(MyClass): <NEW_LINE> <INDENT> pass
This another class. Check the nice inheritance diagram. See :class:`MyClass`.
62598fe9fbf16365ca79483d
class Expr: <NEW_LINE> <INDENT> def __init__(self, model, comp): <NEW_LINE> <INDENT> self._model = model <NEW_LINE> self._comp = comp <NEW_LINE> <DEDENT> def get_model(self): <NEW_LINE> <INDENT> return self._model <NEW_LINE> <DEDENT> def read(self, transact_comp): <NEW_LINE> <INDENT> return '(' + self._comp + ' ' + tra...
The expression that may depend on the current modeling time or transact attributes.
62598fe9187af65679d29fb4
class FakeHTTPConnection: <NEW_LINE> <INDENT> def __init__(self, _1, _2): <NEW_LINE> <INDENT> self._req = None <NEW_LINE> options = dict(plugin_provider='quantum.plugins.SamplePlugin.FakePlugin') <NEW_LINE> self._api = server.APIRouterV1(options) <NEW_LINE> <DEDENT> def request(self, method, action, body, he...
stub HTTP connection class for CLI testing
62598fe926238365f5fad2de
class P4(_VCS): <NEW_LINE> <INDENT> def __init__(self, port=None, user=None, client=None, password=None): <NEW_LINE> <INDENT> command_prefix = ['p4', '-z', 'tag'] <NEW_LINE> if client is not None: <NEW_LINE> <INDENT> command_prefix += ['-c', client] <NEW_LINE> <DEDENT> if password is not None: <NEW_LINE> <INDENT> comma...
Wrapper for P4 calls
62598fe94c3428357761aa27
class J5(ObjectiveFunction): <NEW_LINE> <INDENT> def __call__(self, coordinates): <NEW_LINE> <INDENT> return j5(coordinates[0], coordinates[1])
Plateaus function Function containing multiple plateaus with equal objective function values (Singh et al. 2004).
62598fe9091ae3566870539a
class RasterTranslatorMixin(object): <NEW_LINE> <INDENT> dataModelType = 'Raster' <NEW_LINE> @classmethod <NEW_LINE> def createLayer(cls, topicName, rosMessages=None, **kwargs): <NEW_LINE> <INDENT> if rosMessages: <NEW_LINE> <INDENT> msg = rosMessages[0] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> msg = rospy.wait_fo...
Translate input raster data to a GeoTIFF format. Does not support subscription because we have not implemented a rosrasterprovider.
62598fe9187af65679d29fb6
class CMDUnregisteredError(ValueError): <NEW_LINE> <INDENT> unregistered: List[str] <NEW_LINE> def __init__(self, unregistered): <NEW_LINE> <INDENT> self.unregistered = unregistered <NEW_LINE> super().__init__(f"Some commands were not registered in a group above: {unregistered!r}")
raised if commands have not been assigned to a command group
62598fe9ad47b63b2c5a7fd2
class MockSPISelectPin(MockPin): <NEW_LINE> <INDENT> def __init__(self, number): <NEW_LINE> <INDENT> super(MockSPISelectPin, self).__init__() <NEW_LINE> if not hasattr(self, 'spi_device'): <NEW_LINE> <INDENT> self.spi_device = None <NEW_LINE> <DEDENT> <DEDENT> def _set_state(self, value): <NEW_LINE> <INDENT> super(Mock...
This derivative of :class:`MockPin` is intended to be used as the select pin of a mock SPI device. It is not intended for direct construction in tests; rather, construct a :class:`MockSPIDevice` with various pin numbers, and this class will be used for the select pin.
62598fe9c4546d3d9def7648
class IC_7420(Base_14pin): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.pins = [None, 0, 0, 0, 0, 0, None, 0, None, 0, 0, 0, 0, 0, 0] <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> output = {} <NEW_LINE> output[6] = NAND( self.pins[1], self.pins[2], self.pins[4], self.pins[5]).output() <NEW_...
This is a dual 4-input NAND gate
62598fe926238365f5fad2e8
class CountDown(object): <NEW_LINE> <INDENT> __slots__ = ("_canceled", "count", "_lock", "_on_zero") <NEW_LINE> def __init__(self, count, on_zero): <NEW_LINE> <INDENT> assert count > 0 <NEW_LINE> self.count = count <NEW_LINE> self._canceled = False <NEW_LINE> self._lock = threading.Lock() <NEW_LINE> self._on_zero = on_...
Decrements a count, calls a callback when it reaches 0. This is used to wait for queries to complete without storing & sorting their results.
62598fe9ab23a570cc2d5130
class SubDataset(SimpleVideoDataset): <NEW_LINE> <INDENT> def __init__(self, sub_meta, cl, split='train', clip_len=16, min_size=50): <NEW_LINE> <INDENT> self.all_videos = sub_meta <NEW_LINE> if len(self.all_videos) < min_size: <NEW_LINE> <INDENT> idxs = [i % len(self.all_videos) for i in range(min_size)] <NEW_LINE> sel...
根据类别建立这个类别下的dataset
62598fe9fbf16365ca79484d
class TestCase(object): <NEW_LINE> <INDENT> desc = "" <NEW_LINE> name = "" <NEW_LINE> platforms = [] <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.components = [] <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> successes = 0 <NEW_LINE> failures = 0 <NEW_LINE> if self.platforms and blive...
A TestCase is a way of grouping related TestCaseComponent objects together into a single place. It provides a way of iterating through all these components, running each, and tabulating the results. If any component fails, the entire TestCase fails. Class attributes: desc -- A description of what this test ...
62598fe9627d3e7fe0e07631
class Key(object): <NEW_LINE> <INDENT> def __init__(self, *names): <NEW_LINE> <INDENT> self._names = names <NEW_LINE> self._names_upper = tuple([v.upper() for v in names]) <NEW_LINE> <DEDENT> @property <NEW_LINE> def name(self): <NEW_LINE> <INDENT> return self._names[0] <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE...
Represent the identity of a certain key. This represents one or more names that the key in question is known by. A Key object can be compared to one of its string names (case insensitive), to the integer ordinal of the key (only for keys that represent characters), and to another Key instance.
62598fe9fbf16365ca79484f
class Exploit(exploits.Exploit): <NEW_LINE> <INDENT> __info__ = { 'name': 'Cisco IOS HTTP Unauthorized Administrative Access', 'description': 'HTTP server for Cisco IOS 11.3 to 12.2 allows attackers ' 'to bypass authentication and execute arbitrary commands, ' 'when local authorization is being used, by specifying a hi...
This exploit targets a vulnerability in the Cisco IOS HTTP Server. By sending a GET request for the url "http://ip_address/level/{num}/exec/..", it is possible to bypass authentication and execute any command. Example: http://10.0.0.1/level/99/exec/show/startup/config
62598fe9c4546d3d9def764d
class Segment: <NEW_LINE> <INDENT> current_point = None <NEW_LINE> cache_x = dict() <NEW_LINE> def __init__(self, points): <NEW_LINE> <INDENT> self.endpoints = points <NEW_LINE> <DEDENT> def copy(self): <NEW_LINE> <INDENT> return Segment([p.copy() for p in self.endpoints]) <NEW_LINE> <DEDENT> def length(self): <NEW_LIN...
oriented segment between two points. for example: - create a new segment between two points: segment = Segment([point1, point2]) - create a new segment from coordinates: segment = Segment([Point([1.0, 2.0]), Point([3.0, 4.0])]) - compute intersection point with other segment: intersection = segment1....
62598fe9627d3e7fe0e07637
class LayeredNeurons(Neurons): <NEW_LINE> <INDENT> def __init__(self, layers): <NEW_LINE> <INDENT> self.layers = layers <NEW_LINE> self.inputs = self.layers[0].inputs <NEW_LINE> self.output = self.layers[-1].output <NEW_LINE> if self.inputs[self.MAIN_INPUT].connected: <NEW_LINE> <INDENT> log.warning( 'Creating layers w...
Class representing groups of neurons.
62598fe9187af65679d29fbf
class Particle: <NEW_LINE> <INDENT> def __init__( self, m: float, x: numpy.array, v: numpy.array = numpy.zeros(3), damping: float = 0.9, isMovable: bool = True): <NEW_LINE> <INDENT> self.m = m <NEW_LINE> self.x = x <NEW_LINE> self.xold = x <NEW_LINE> self.isMovable = isMovable <NEW_LINE> self.damping = damping <NEW_LIN...
Represents a single point mass on the cloth
62598fea4c3428357761aa3f
class Kangaroo: <NEW_LINE> <INDENT> def __init__(self, name, contents=None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> if contents == None: <NEW_LINE> <INDENT> contents = [] <NEW_LINE> <DEDENT> self.pouch_contents = contents <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> t = [self.name + ' has pouch c...
A Kangaroo is a marsupial.
62598fea627d3e7fe0e0763d
class SimpleTask(object): <NEW_LINE> <INDENT> def __init__(self, inp): <NEW_LINE> <INDENT> self.inp = inp <NEW_LINE> <DEDENT> def __call__(self): <NEW_LINE> <INDENT> return self.inp
Simply return the input argument
62598fea26238365f5fad2f9