code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class TestSubmissionOrder(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def testSubmissionOrder(self): <NEW_LINE> <INDENT> pass
SubmissionOrder unit test stubs
62599084fff4ab517ebcf352
class DescribeStackRequest(JDCloudRequest): <NEW_LINE> <INDENT> def __init__(self, parameters, header=None, version="v1"): <NEW_LINE> <INDENT> super(DescribeStackRequest, self).__init__( '/regions/{regionId}/stacks/{stackId}', 'GET', header, version) <NEW_LINE> self.parameters = parameters
查询资源栈详情
62599084a8370b77170f1f08
class TimeStampedModel(models.Model): <NEW_LINE> <INDENT> date_created = AutoCreatedField(_('created')) <NEW_LINE> date_modified = AutoLastModifiedField(_('modified')) <NEW_LINE> is_valid = models.BooleanField(_('is_valid'), default=True) <NEW_LINE> is_private = models.BooleanField(_('is_private')) <NEW_LINE> class Met...
An abstract base class model that provides self-updating ``created`` and ``modified`` fields.
625990847c178a314d78e988
class FlipbookPagePolyLineAnnotator(FlipbookPageAnnotator): <NEW_LINE> <INDENT> TYPE_FIELD_CLASSES = FlipbookPageAnnotator.TYPE_FIELD_CLASSES.copy() <NEW_LINE> TYPE_FIELD_CLASSES[PolyLinePointPicker.POINT_LIST_TYPE] = _PointListField <NEW_LINE> def closeEvent(self, e): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> del s...
Ex: from ris_widget.ris_widget import RisWidget from ris_widget.examples.flipbook_page_poly_line_annotator import PolyLinePointPicker, FlipbookPagePolyLineAnnotator import numpy rw = RisWidget() xr = numpy.linspace(0, 2*numpy.pi, 65536, True) xg = xr + 2*numpy.pi/3 xb = xr + 4*numpy.pi/3 im = (((numpy.dstack(list(map(...
625990843346ee7daa338400
class BinaryExpr(Expr): <NEW_LINE> <INDENT> def __init__(self, e1, e2): <NEW_LINE> <INDENT> self.e1 = e1 <NEW_LINE> self.e2 = e2 <NEW_LINE> <DEDENT> def Eval(self, context): <NEW_LINE> <INDENT> evaled_e1 = self.e1.Eval(context) <NEW_LINE> evaled_e2 = self.e2.Eval(context) <NEW_LINE> method_name = self.__class__.method_...
A general expression for binary operations like +, *, etc. This class should be extended with a class field 'method_name' containing the name of the attribute that should be called.
62599084099cdd3c63676198
class NewTicketForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Ticket <NEW_LINE> fields = ('subject', 'description', 'fk_status', 'fk_priority', 'fk_requester', 'fk_agent', 'fk_attachments')
New ticket form
62599084bf627c535bcb300f
class Usuario(AbstractBaseUser, PermissionsMixin): <NEW_LINE> <INDENT> email = models.EmailField(max_length=255, unique=True) <NEW_LINE> name = models.CharField(max_length=255) <NEW_LINE> is_active = models.BooleanField(default=True) <NEW_LINE> is_staff = models.BooleanField(default=False) <NEW_LINE> nombre = models.Ch...
A user profile in our system.
625990843317a56b869bf2e2
class CreatePort(CreateCommand): <NEW_LINE> <INDENT> resource = 'port' <NEW_LINE> log = logging.getLogger(__name__ + '.CreatePort') <NEW_LINE> def add_known_arguments(self, parser): <NEW_LINE> <INDENT> parser.add_argument( '--name', help='name of this port') <NEW_LINE> parser.add_argument( '--admin-state-down', default...
Create a port for a given tenant.
625990845fdd1c0f98e5fabd
class Profile(object): <NEW_LINE> <INDENT> def __init__(self, name='New Profile', path=None, current=False): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.tracks = [] <NEW_LINE> self.path = path <NEW_LINE> self.to_delete = False <NEW_LINE> <DEDENT> def new_track(self, options): <NEW_LINE> <INDENT> new = Track(op...
Contains the name, location and tracks of a profile Allows to import and export to files, and also import from conf Tracks can be created Other features are reordering tracks
6259908426068e7796d4e47e
class email_type(models.Model): <NEW_LINE> <INDENT> TYPE_LIST = ( ('internet', _('Internet')), ('x400', _('x400')), ('pref', _('Preferred')), ('other', _('Other IANA address type')), ) <NEW_LINE> name = models.CharField( _('Email type'), max_length=8, choices=TYPE_LIST, default='internet' ) <NEW_LINE> class Meta: <NEW_...
Represents a type of email in the hCard microformat. See: http://microformats.org/wiki/hcard#adr_tel_email_types Also see: http://www.ietf.org/rfc/rfc2426.txt (quoted below) Used to specify the format or preference of the electronic mail address. The TYPE parameter values can include: "internet" to indicate an Int...
6259908450812a4eaa621963
class TestImageUsage(DefaultSiteTestCase): <NEW_LINE> <INDENT> cached = True <NEW_LINE> @property <NEW_LINE> def imagepage(self): <NEW_LINE> <INDENT> if hasattr(self.__class__, '_image_page'): <NEW_LINE> <INDENT> return self.__class__._image_page <NEW_LINE> <DEDENT> mysite = self.get_site() <NEW_LINE> page = pywikibot....
Test cases for Site.imageusage method.
62599084d8ef3951e32c8bfd
class LogEntry(): <NEW_LINE> <INDENT> __slots__ = ['_timestamp', '_key', '_node_id', '_src', '_path', ] <NEW_LINE> def __init__(self, timestamp, key, node_id, source, pathToDoc): <NEW_LINE> <INDENT> self._timestamp = timestamp <NEW_LINE> if key is None: <NEW_LINE> <INDENT> raise UpaxError('LogEntry key may not be None'...
The entry made upon adding a file to the Upax content-keyed data store. This consists of a timestamp; an SHA content key, the hash of the contents of the file, the NodeID identifying the contributor, its source (which may be a program name, and a UNIX/POSIX path associated with the file. The path will normally be rel...
625990847c178a314d78e989
class FindSymbolSystemFunction(SystemFunction): <NEW_LINE> <INDENT> def __new__(cls, *args, **kwargs): <NEW_LINE> <INDENT> cls.__name__ = 'FIND-SYMBOL' <NEW_LINE> return object.__new__(cls) <NEW_LINE> <DEDENT> def __call__(self, forms, var_env, func_env, macro_env): <NEW_LINE> <INDENT> args = self.eval_forms(forms, var...
FindSymbol locates a symbol whose name is symbol_designator in a package. If a symbol named symbol_designator is found in package, directly or by inheritance, the symbol found is returned as the first value; the second value is as follows: :INTERNAL If the symbol is present in package as an internal symbol. :EXTER...
625990843346ee7daa338401
class PersonModelViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Person.objects.all() <NEW_LINE> serializer_class = PersonModelSerializer <NEW_LINE> permission_classes = (IsAuthenticated,) <NEW_LINE> filter_backends = (DjangoFilterBackend, filters.SearchFilter, filters.OrderingFilter) <NEW_LINE> search_f...
API endpoint that allows users to be viewed or edited.
62599084099cdd3c63676199
class OpenStorageClusterServicer(object): <NEW_LINE> <INDENT> def InspectCurrent(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!')
OpenStorageCluster service provides the methods to manage the cluster
62599084be7bc26dc9252bf5
class ResearchMeasurementYearListAPIView(ListAPIView): <NEW_LINE> <INDENT> queryset = ResearchMeasurementYear.objects.all() <NEW_LINE> serializer_class = research_measurement_year_serializers['ResearchMeasurementYearListSerializer'] <NEW_LINE> filter_backends = (DjangoFilterBackend,) <NEW_LINE> filter_class = ResearchM...
API list view. Gets all records API.
62599084283ffb24f3cf53df
class ObjectViewSet(ViewSet, ListObjectMixin, CreateObjectMixin, UpdateObjectMixin, DeleteObjectMixin): <NEW_LINE> <INDENT> pass
Interactions for database objects: List, Create, Update, Delete.
62599084aad79263cf4302f9
class LinearClassifier(BinaryClassifier): <NEW_LINE> <INDENT> def __init__(self, opts): <NEW_LINE> <INDENT> self.opts = opts <NEW_LINE> self.reset() <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT> self.weights = 0 <NEW_LINE> <DEDENT> def online(self): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> def __...
This class defines an arbitrary linear classifier parameterized by a loss function and a ||w||^2 regularizer.
625990847b180e01f3e49e04
class APIClientArgs: <NEW_LINE> <INDENT> def __init__(self, port=None, fingerprint=None, sid=None, server="127.0.0.1", http_debug_level=0, api_calls=None, debug_file="", proxy_host=None, proxy_port=8080, api_version="1.1", unsafe=False, unsafe_auto_accept=False): <NEW_LINE> <INDENT> self.port = port <NEW_LINE> self.fin...
This class provides arguments for APIClient configuration. All the arguments are configured with their default values.
625990844c3428357761bdf9
class ComponentTests(ossie.utils.testing.ScaComponentTestCase): <NEW_LINE> <INDENT> def testScaBasicBehavior(self): <NEW_LINE> <INDENT> execparams = self.getPropertySet(kinds=("execparam",), modes=("readwrite", "writeonly"), includeNil=False) <NEW_LINE> execparams = dict([(x.id, any.from_any(x.value)) for x in execpara...
Test for all component implementations in skiphead_cc
6259908492d797404e3898fc
class GraphQLNonNull(GraphQLWrappingType): <NEW_LINE> <INDENT> is_non_null_type = True <NEW_LINE> kind = "NON_NULL" <NEW_LINE> def __eq__(self, other: Any) -> bool: <NEW_LINE> <INDENT> return self is other or ( isinstance(other, GraphQLNonNull) and self.gql_type == other.gql_type ) <NEW_LINE> <DEDENT> def __repr__(self...
Definition of a GraphQL non-null container.
6259908455399d3f05628054
class DataFormatCreator(DataFormatReader): <NEW_LINE> <INDENT> implements(IDataFormatReader, IDataFormatCreator) <NEW_LINE> __allow_loadable__ = True <NEW_LINE> def serialize(self, request): <NEW_LINE> <INDENT> collection = self.__parent__ <NEW_LINE> model = collection.create_transient_subitem() <NEW_LINE> return self....
A data format which can create subitems in a collection. It also implements IDataFormatReader because the client needs to be able to load defaults etc.
62599084a05bb46b3848bec7
class WritableSerializerMethodField(serializers.SerializerMethodField): <NEW_LINE> <INDENT> def __init__(self, get_method_name, set_method_name, *args, **kwargs): <NEW_LINE> <INDENT> self.read_only = False <NEW_LINE> self.get_method_name = get_method_name <NEW_LINE> self.method_name = get_method_name <NEW_LINE> self.se...
A field that gets and sets its value by calling a method on the serializer it's attached to.
6259908444b2445a339b76fc
class ControllerStates(object): <NEW_LINE> <INDENT> STATE_STOPPED = 0 <NEW_LINE> STATE_RUNNING = 1
The various states that an interface can experience.
6259908499fddb7c1ca63b7a
class TerraSimpleUserSerializer(TerraStaffUserSerializer): <NEW_LINE> <INDENT> is_staff = serializers.BooleanField(read_only=True)
A simple user cannot edit is_staff and is_superuser status
62599084a8370b77170f1f0c
class Inference(object): <NEW_LINE> <INDENT> def __init__(self, output_layer, parameters): <NEW_LINE> <INDENT> topo = topology.Topology(output_layer) <NEW_LINE> gm = api.GradientMachine.createFromConfigProto( topo.proto(), api.CREATE_MODE_TESTING, [api.PARAMETER_VALUE]) <NEW_LINE> for param in gm.getParameters(): <NEW_...
Inference combines neural network output and parameters together to do inference. :param outptut_layer: The neural network that should be inferenced. :type output_layer: paddle.v2.config_base.Layer or the sequence of paddle.v2.config_base.Layer :param parameters: The parameters dictionary. :type pa...
625990845fdd1c0f98e5fac0
class ResourceIdentifier(HeatIdentifier): <NEW_LINE> <INDENT> RESOURCE_NAME = 'resource_name' <NEW_LINE> def __init__(self, tenant, stack_name, stack_id, path, resource_name=None): <NEW_LINE> <INDENT> if resource_name is not None: <NEW_LINE> <INDENT> if '/' in resource_name: <NEW_LINE> <INDENT> raise ValueError(_('Reso...
An identifier for a resource.
625990844527f215b58eb740
class TestIsotropicGaussian(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.model = IsotropicGaussian() <NEW_LINE> [gx, gy] = np.meshgrid(np.arange(35.5, 40., 0.5), np.arange(40.5, 45., 0.5)) <NEW_LINE> ngp = np.shape(gx)[0] * np.shape(gx)[1] <NEW_LINE> gx = np.reshape(gx, [ngp, 1]) <N...
Simple tests the of Isotropic Gaussian Kernel (as implemented by Frankel (1995))
62599084656771135c48add1
class Network(object): <NEW_LINE> <INDENT> def __init__(self, neurons, links, num_inputs): <NEW_LINE> <INDENT> if not neurons: <NEW_LINE> <INDENT> neurons = [] <NEW_LINE> <DEDENT> self.neurons = neurons <NEW_LINE> self.synapses = [] <NEW_LINE> self._num_inputs = num_inputs <NEW_LINE> if links is not None: <NEW_LINE> <I...
A neural network has a list of neurons linked by synapses
6259908471ff763f4b5e92ee
@functools.total_ordering <NEW_LINE> class User(object): <NEW_LINE> <INDENT> def __init__(self, nick, user, host): <NEW_LINE> <INDENT> assert isinstance(nick, Identifier) <NEW_LINE> self.nick = nick <NEW_LINE> self.user = user <NEW_LINE> self.host = host <NEW_LINE> self.channels = {} <NEW_LINE> self.account = None <NEW...
A representation of a user Sopel is aware of.
625990845fcc89381b266efe
class OrganisationAdmin(reversion.VersionAdmin): <NEW_LINE> <INDENT> def queryset(self, request): <NEW_LINE> <INDENT> qs = self.model.objects <NEW_LINE> ordering = self.get_ordering(request) <NEW_LINE> if ordering: <NEW_LINE> <INDENT> qs = qs.order_by(*ordering) <NEW_LINE> <DEDENT> return qs
Admin for the organisation model.
625990844a966d76dd5f0a28
class TestV1CephFSVolumeSource(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def testV1CephFSVolumeSource(self): <NEW_LINE> <INDENT> pass
V1CephFSVolumeSource unit test stubs
62599084bf627c535bcb3015
class Solution(object): <NEW_LINE> <INDENT> def isValidSudoku(self, board): <NEW_LINE> <INDENT> if board is None or len(board) == 0 or len(board[0]) == 0: <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> l = len(board) <NEW_LINE> row = [0 for i in xrange(l)] <NEW_LINE> col = [0 for i in xrange(l)] <NEW_LINE> box = ...
Idea: (1) separate checking: - check 3 booleans: row, col, box - have a set to keep track for each row, col, box checking - return 3 booleans AND together - Runtime: O(N^2), Space: O(1) (2) bitmap checking: - 3 int arrays for bitmaps
625990848a349b6b43687da1
class LocalizedMusicInfo(object): <NEW_LINE> <INDENT> deserialized_types = { 'prompt_name': 'str', 'aliases': 'list[ask_smapi_model.v1.skill.manifest.music_alias.MusicAlias]', 'features': 'list[ask_smapi_model.v1.skill.manifest.music_feature.MusicFeature]', 'wordmark_logos': 'list[ask_smapi_model.v1.skill.manifest.musi...
Defines the structure of localized music information in the skill manifest. :param prompt_name: Name to be used when Alexa renders the music skill name. :type prompt_name: (optional) str :param aliases: Defines the structure of the music prompt name information in the skill manifest. :type aliases: (optional) list[as...
62599084656771135c48add2
class PhotovoltaicSystemNumberOfArrays(BSElement): <NEW_LINE> <INDENT> element_type = "xs:integer"
Number of arrays in a photovoltaic system.
625990844c3428357761bdfd
class TSOverScore(object): <NEW_LINE> <INDENT> def __init__(self, bucket_size=100, a=1, b=1): <NEW_LINE> <INDENT> self.bucket_size = bucket_size <NEW_LINE> self.buckets = [{'a': a, 'b': b} for i in range(bucket_size)] <NEW_LINE> self.exp_times_each = [0 for i in range(bucket_size)] <NEW_LINE> self.exp_times = 0 <NEW_LI...
Thompson Sampling over scores policy.
6259908460cbc95b06365b0d
class DeleteAddressHandler(AbstractAddressHandler): <NEW_LINE> <INDENT> @tornado.gen.coroutine <NEW_LINE> def post(self): <NEW_LINE> <INDENT> result = SUCCESS <NEW_LINE> try: <NEW_LINE> <INDENT> ownerEmail = self.get_argument("email","") <NEW_LINE> addressID = self.get_argument("addressID", "") <NEW_LINE> self.db.delet...
-Requests are posted here when a user is creating an account. -All arguments are submitted as strings.
6259908423849d37ff852bfd
class AccountManager(BaseManager): <NEW_LINE> <INDENT> endpoint = '/accounts' <NEW_LINE> @autoparse <NEW_LINE> def all(self, page=None): <NEW_LINE> <INDENT> if page: <NEW_LINE> <INDENT> return self._client.get('/accounts?page=%s' % page) <NEW_LINE> <DEDENT> return self._client.get('/accounts') <NEW_LINE> <DEDENT> @auto...
This class handles all of the API calls for Account objects. You most likely don't want to instantiate it directly, as it is made available automatically when you create a Recurly API client and is exposed through a client instance's client.accounts member.
62599084a05bb46b3848bec9
class VMWareVlanBridgeDriver(vif.VIFDriver): <NEW_LINE> <INDENT> def plug(self, instance, network, mapping): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def ensure_vlan_bridge(self, session, network): <NEW_LINE> <INDENT> vlan_num = network['vlan'] <NEW_LINE> bridge = network['bridge'] <NEW_LINE> vlan_interface = FLAGS...
VIF Driver to setup bridge/VLAN networking using VMWare API.
6259908499fddb7c1ca63b7c
class SessionFactory(Session): <NEW_LINE> <INDENT> def request( self, method, url, params=None, data=None, headers=None, cookies=None, files=None, auth=None, timeout=None, allow_redirects=True, proxies=None, hooks=None, stream=None, verify=None, cert=None, json=None): <NEW_LINE> <INDENT> req = Request( method=method.up...
SessionFactory. Class overides requests.sessions Session.request method to return the PreparedRequest object instead of attempting to send it. useful for testing with django.test client
6259908463b5f9789fe86cac
class ImageRemoveEvent(Event): <NEW_LINE> <INDENT> pass
This event is emitted when an |image| is removed. :param image: the removed |image|
625990845fc7496912d4900d
class SingleClientWithAKickPerspective(pb.Perspective): <NEW_LINE> <INDENT> client = None <NEW_LINE> def __getstate__(self): <NEW_LINE> <INDENT> state = styles.Versioned.__getstate__(self) <NEW_LINE> try: <NEW_LINE> <INDENT> del state['client'] <NEW_LINE> <DEDENT> except KeyError: <NEW_LINE> <INDENT> pass <NEW_LINE> <D...
One client may attach to me at a time. If a new client requests to be attached to me, any currently connected perspective will be disconnected.
62599084bf627c535bcb3017
class Missile_rtilt(Collider): <NEW_LINE> <INDENT> image = games.load_image("missile_rtilt.bmp") <NEW_LINE> sound = games.load_sound("missile.wav") <NEW_LINE> SPEED = 10 <NEW_LINE> def __init__(self, ship): <NEW_LINE> <INDENT> Missile.sound.play() <NEW_LINE> games.Sprite.__init__(self, image = Missile.image, x = ship.x...
A missile launched by the player's ship to the right diagonal.
625990845fdd1c0f98e5fac4
class TestPageRepr(TestPageBaseUnicode): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(TestPageRepr, self).setUp() <NEW_LINE> self._old_encoding = config.console_encoding <NEW_LINE> config.console_encoding = 'utf8' <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> config.console_encoding = se...
Test for Page's repr implementation.
6259908450812a4eaa621967
class Connection(MongoClient): <NEW_LINE> <INDENT> def __init__(self, host=None, port=None, max_pool_size=None, network_timeout=None, document_class=dict, tz_aware=False, _connect=True, **kwargs): <NEW_LINE> <INDENT> if network_timeout is not None: <NEW_LINE> <INDENT> if (not isinstance(network_timeout, (int, float)) o...
Connection to MongoDB.
625990844428ac0f6e65a073
class Scale(object): <NEW_LINE> <INDENT> def __init__(self, n, inters): <NEW_LINE> <INDENT> self.name = n <NEW_LINE> self.intervals = inters <NEW_LINE> <DEDENT> def voice(self, key): <NEW_LINE> <INDENT> chromatic = Scales.make_chromatic(key) <NEW_LINE> steps = [] <NEW_LINE> for i in self.intervals: <NEW_LINE> <INDENT> ...
Defines a collection of intervals
6259908455399d3f0562805a
class ApplicationViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Application.objects.all() <NEW_LINE> serializer_class = ApplicationSerializer
API endpoint that allows groups to be viewed or edited.
62599084a05bb46b3848beca
class AccessLogReader(Reader): <NEW_LINE> <INDENT> def __init__(self, filename, headers=None, http_ver='1.1', use_cache=True, **kwargs): <NEW_LINE> <INDENT> super(AccessLogReader, self).__init__(filename, use_cache) <NEW_LINE> self.warned = False <NEW_LINE> self.headers = set(headers) if headers else set() <NEW_LINE> s...
Missiles from access log
6259908499fddb7c1ca63b7d
class TeamRobot(object): <NEW_LINE> <INDENT> swagger_types = { 'year': 'int', 'robot_name': 'str', 'key': 'str', 'team_key': 'str' } <NEW_LINE> attribute_map = { 'year': 'year', 'robot_name': 'robot_name', 'key': 'key', 'team_key': 'team_key' } <NEW_LINE> def __init__(self, year=None, robot_name=None, key=None, team_ke...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62599084167d2b6e312b8339
class ExactInference(InferenceModule): <NEW_LINE> <INDENT> def initializeUniformly(self, gameState): <NEW_LINE> <INDENT> self.beliefs = util.Counter() <NEW_LINE> for p in self.legalPositions: self.beliefs[p] = 1.0 <NEW_LINE> self.beliefs.normalize() <NEW_LINE> <DEDENT> def observe(self, observation, gameState): <NEW_LI...
The exact dynamic inference module should use forward-algorithm updates to compute the exact belief function at each time step.
625990847cff6e4e811b7587
class UserLevel(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_null(self): <NEW_LINE> <INDENT> nullUserLevel_data = 'code=&name=&enable=' <NEW_LINE> nullUserLevel_res = requests.request('POST', insertUserLevel_url, data=nullUserLevel_data, headers=headers)...
會員級別新增
6259908476e4537e8c3f10c5
class IContactInfo(form.Schema): <NEW_LINE> <INDENT> contactName = schema.TextLine( title=_(u"Contact Name"), description=u"", required=False, ) <NEW_LINE> contactEmail = schema.TextLine( title=_(u"Contact Email"), description=u"", required=False, ) <NEW_LINE> contactPhone = schema.TextLine( title=_(u"Contact Phone"), ...
Marker/Form interface for Contact Info
625990847047854f46340efb
class Record(object): <NEW_LINE> <INDENT> def __init__ (self): <NEW_LINE> <INDENT> self.sequences = [] <NEW_LINE> self.version = "" <NEW_LINE> self.database = "" <NEW_LINE> self.diagrams = {} <NEW_LINE> self.alphabet = None <NEW_LINE> self.motifs = [] <NEW_LINE> <DEDENT> def get_motif_by_name (self, name): <NEW_LINE> <...
The class for holding the results from a MAST run. A MAST.Record holds data about matches between motifs and sequences. The motifs held by the Record are objects of the class MEMEMotif. Methods: get_motif_by_name (motif_name): returns a MEMEMotif with the given name.
625990844a966d76dd5f0a2c
class TransformNode(VLibNode): <NEW_LINE> <INDENT> def __init__(self, func=None, **kwargs): <NEW_LINE> <INDENT> VLibNode.__init__(self, **kwargs) <NEW_LINE> self._func = func <NEW_LINE> <DEDENT> def next(self): <NEW_LINE> <INDENT> done = 0 <NEW_LINE> parent = self.GetParents()[0] <NEW_LINE> args = [] <NEW_LINE> try: <N...
base class for nodes which filter their input Assumptions: - transform function takes a number of arguments equal to the number of inputs we have. We return whatever it returns - inputs (parents) can be stepped through in lockstep Usage Example: >>> from rdkit.VLib.Supply import SupplyNode >>> def func...
6259908466673b3332c31f46
class OnSessionInitRequest(object): <NEW_LINE> <INDENT> def __init__(self, sess): <NEW_LINE> <INDENT> _check_type(sess, (session.BaseSession, monitored_session.MonitoredSession)) <NEW_LINE> self.session = sess
Request to an on-session-init callback. This callback is invoked during the __init__ call to a debug-wrapper session.
625990843617ad0b5ee07c97
class DistortedSliceModel(object): <NEW_LINE> <INDENT> def __init__(self, flat_slices, slice_lower_edges, slice_upper_edges, normalize_factor=None, auto_normalize_threshold=5000, degree=5): <NEW_LINE> <INDENT> self.slice_model = np.zeros_like(flat_slices) <NEW_LINE> for slice_lower, slice_upper in zip(slice_lower_edges...
Class to make a distorted slice model for fitting Parameters ---------- flat_slices: ~np.ndarray slice_lower_edges: ~np.ndarray lower edges of the slices slice_upper_edges: ~np.ndarray upper edges of the slices normalize_factor: ~float
62599084be7bc26dc9252bf9
class CaseHandler(BaseInteractiveCaseHandler): <NEW_LINE> <INDENT> def handle_case(self, i): <NEW_LINE> <INDENT> n = int(self.read()) <NEW_LINE> moves_str = self.read() <NEW_LINE> soln = self.solve(n, moves_str) <NEW_LINE> self.write('Case #{}: {}'.format(i, soln)) <NEW_LINE> <DEDENT> def solve(self, n, moves): <NEW_LI...
https://codingcompetitions.withgoogle.com/codejam/round/0000000000051705/00000000000881da
62599084283ffb24f3cf53e7
class _BaseImageServiceTests(test.TestCase): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(_BaseImageServiceTests, self).__init__(*args, **kwargs) <NEW_LINE> self.service = None <NEW_LINE> self.context = None <NEW_LINE> <DEDENT> def test_create(self): <NEW_LINE> <INDENT> fixture = s...
Tasks to test for all image services
625990845fdd1c0f98e5fac7
class User(models.Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> verbose_name = "Użytkownika" <NEW_LINE> verbose_name_plural = "Użytkownicy" <NEW_LINE> <DEDENT> login = models.CharField(max_length=30, verbose_name="Nazwa użytkownika") <NEW_LINE> password = models.CharField(max_length=30, verbose_name="Hasł...
Klasa użytkownika wysyłającego testy - nauczyciela Opis pól: **login** Login, identyfikator nauczyciela (30 znaków) **password** Hasło (30 znaków) **full_name** Imię i nazwisko (100 znaków)
6259908426068e7796d4e488
class StdErrToHTMLConverter(): <NEW_LINE> <INDENT> formatChars = { '\e[1m': '<strong>', '\e[21m': '</strong>', '\e[2m': '<span class="dark">', '\e[22m': '</span>', '\n': '<br>', '\x1b[34m': '<span class="alert alert-info" style="overflow-wrap: break-word">', '\x1b[35m': '<span class="alert alert-warning" style="overfl...
Converts stderr, stdout messages of TaskJuggler to html :param error: An exception
625990844c3428357761be01
class BackgroundSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = models.Background <NEW_LINE> fields = "__all__"
Serializer class for the Background model
6259908460cbc95b06365b0f
class Meta: <NEW_LINE> <INDENT> model = User <NEW_LINE> fields = ["id", "email", "password", "current_password", "is_staff"]
Serializer meta information.
6259908497e22403b383ca3f
class Entries(Base): <NEW_LINE> <INDENT> __tablename__ = 'entries' <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> title = Column(Text) <NEW_LINE> body = Column(Text) <NEW_LINE> creation_date = Column(DateTime, default=datetime.datetime.now()) <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return '<Ent...
Class for journal entries.
6259908492d797404e389900
class Solution: <NEW_LINE> <INDENT> def findMin(self, nums): <NEW_LINE> <INDENT> start, end = 0, len(nums) - 1 <NEW_LINE> target = nums[len(nums) - 1] <NEW_LINE> while start + 1 < end: <NEW_LINE> <INDENT> mid = start + (end - start) // 2 <NEW_LINE> if nums[mid] < target: <NEW_LINE> <INDENT> end = mid <NEW_LINE> <DEDENT...
@param: nums: a rotated sorted array @return: the minimum number in the array
62599084adb09d7d5dc0c0a2
class FunctionFieldIdeal_rational(FunctionFieldIdeal): <NEW_LINE> <INDENT> def __init__(self, ring, gen): <NEW_LINE> <INDENT> FunctionFieldIdeal.__init__(self, ring) <NEW_LINE> self._gen = gen <NEW_LINE> <DEDENT> def __hash__(self): <NEW_LINE> <INDENT> return hash( (self._ring, self._gen) ) <NEW_LINE> <DEDENT> def __co...
Fractional ideals of the maximal order of a rational function field. INPUT: - ``ring`` -- the maximal order of the rational function field. - ``gen`` -- generator of the ideal, an element of the function field. EXAMPLES:: sage: K.<x> = FunctionField(QQ) sage: O = K.maximal_order() sage: I = O.ideal(1/(...
625990847cff6e4e811b7589
class TextService(QtCore.QObject): <NEW_LINE> <INDENT> change_img = QtCore.Signal() <NEW_LINE> def __init__(self, text, window, lang_en, def_counter): <NEW_LINE> <INDENT> QtCore.QObject.__init__(self) <NEW_LINE> self.word_list = re.split('\s', text) <NEW_LINE> self.window = window <NEW_LINE> self.sentence_list = regex....
A TextService which handles all text processing including the fetching of images and voice
62599084e1aae11d1e7cf5b7
class BlobInventoryPolicy(Resource): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'system_data': {'readonly': True}, 'last_modified_time': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'nam...
The storage account blob inventory policy. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{reso...
62599084aad79263cf430302
class BudgetLevel(Choice): <NEW_LINE> <INDENT> zero_five = "0-500k" <NEW_LINE> five_one = "500k-1M" <NEW_LINE> one = "1M+"
For search affiliates by budget
625990843617ad0b5ee07c99
class TestBuyerParticipant(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def make_instance(self, include_optional): <NEW_LINE> <INDENT> if include_optional : <NEW_LINE> <INDENT> return BuyerParticipa...
BuyerParticipant unit test stubs
6259908597e22403b383ca41
class Order(BaseModel, db.Model): <NEW_LINE> <INDENT> __tablename__ = "ih_order_info" <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> user_id = db.Column(db.Integer, db.ForeignKey("ih_user_profile.id"), nullable=False) <NEW_LINE> house_id = db.Column(db.Integer, db.ForeignKey("ih_house_info.id"), nul...
订单
6259908592d797404e389901
class Region(object): <NEW_LINE> <INDENT> __slots__ = ('id', 'nodes', 'anchors') <NEW_LINE> def __init__(self, id, *anchors): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.nodes = [] <NEW_LINE> self.anchors = anchors <NEW_LINE> if len(anchors) == 1: <NEW_LINE> <INDENT> raise ValueError('Regions must be defined by at...
The area in the text file being annotated. A region is defined by a sequence of anchor values.
6259908544b2445a339b7701
class StartUpPage(Frame): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.username= " " <NEW_LINE> self.password=" " <NEW_LINE> Frame.__init__(self) <NEW_LINE> self.master.title("Start Up Page") <NEW_LINE> self.master.rowconfigure( 0, weight = 1 ) <NEW_LINE> self.master.columnconfigure( 0, weight = 1 )...
This is the initial start up page
625990857cff6e4e811b758b
class ExitStatus: <NEW_LINE> <INDENT> OK = 0 <NEW_LINE> ERROR = 1 <NEW_LINE> ERROR_TIMEOUT = 2
Exit status code constants.
62599085099cdd3c6367619f
class aMSNGroupInputWindow(object): <NEW_LINE> <INDENT> def __init__(self, message, callback, contactviews, title = "aMSN Group Input"): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def set_title(self, title): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def show(self): <NEW_LI...
This Interface represent a window used to get a new group.
625990858a349b6b43687da9
class SqlManagedInstanceK8SSpec(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, 'scheduling': {'key': 'scheduling', 'type': 'K8SScheduling'}, 'replicas': {'key': 'replicas', 'type': 'int'}, } <NEW_LINE> def __init__( self, *, additional_prope...
The kubernetes spec information. :param additional_properties: Unmatched properties from the message are deserialized to this collection. :type additional_properties: dict[str, any] :param scheduling: The kubernetes scheduling information. :type scheduling: ~azure_arc_data_management_client.models.K8SScheduling :para...
6259908597e22403b383ca43
class ComponentContext(object): <NEW_LINE> <INDENT> __slots__ = ("factory_context", "name", "properties", "__hidden_properties") <NEW_LINE> def __init__(self, factory_context, name, properties): <NEW_LINE> <INDENT> self.factory_context = factory_context <NEW_LINE> self.name = name <NEW_LINE> properties[constants.IPOPO_...
Represents the data stored in a component instance
6259908592d797404e389902
class LoadModel: <NEW_LINE> <INDENT> def __init__(self, model_name): <NEW_LINE> <INDENT> self.model_name = model_name <NEW_LINE> <DEDENT> def load_model(self): <NEW_LINE> <INDENT> model_load = joblib.load(os.path.dirname(__file__) + self.model_name) <NEW_LINE> return model_load
Class to load model
6259908599fddb7c1ca63b80
class AuctionAuctionPeriod(Period): <NEW_LINE> <INDENT> @serializable(serialize_when_none=False) <NEW_LINE> def shouldStartAfter(self): <NEW_LINE> <INDENT> if self.endDate: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> auction = self.__parent__ <NEW_LINE> if auction.status not in ['active.tendering', 'active.auction']...
The auction period.
625990852c8b7c6e89bd5331
class BitFlips(OneOf): <NEW_LINE> <INDENT> def __init__(self, value, bits_range=range(1, 5), fuzzable=True, name=None): <NEW_LINE> <INDENT> field_name = name + '_%d' if name else 'bitflip_%d' <NEW_LINE> fields = [BitFlip(value, i, fuzzable, field_name % i) for i in bits_range] <NEW_LINE> super(BitFlips, self).__init__(...
Perform bit-flip mutations of (N..) sequential bits on the value
625990855fcc89381b266f03
@GlueDevEndpoint.action_registry.register('delete') <NEW_LINE> class DeleteDevEndpoint(BaseAction): <NEW_LINE> <INDENT> schema = type_schema('delete') <NEW_LINE> permissions = ('glue:DeleteDevEndpoint',) <NEW_LINE> def delete_dev_endpoint(self, client, endpoint_set): <NEW_LINE> <INDENT> for e in endpoint_set: <NEW_LINE...
Deletes public Glue Dev Endpoints :example: .. code-block:: yaml policies: - name: delete-public-dev-endpoints resource: glue-dev-endpoint filters: - PublicAddress: present actions: - type: delete
625990853346ee7daa338408
class Meta: <NEW_LINE> <INDENT> verbose_name = u"Login Attempts" <NEW_LINE> verbose_name_plural = u"Login Attempts"
App labels.
6259908526068e7796d4e48e
class EpisodeFinish(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { "reason": {"key": "reason", "type": "str"}, } <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(EpisodeFinish, self).__init__(**kwargs) <NEW_LINE> self.reason = kwargs.get("reason", None)
EpisodeFinish event signalling current episode is finished. :param reason: Reason for episodeFinish. Possible values include: "Invalid", "Unspecified", "LessonChanged", "Terminal", "Interrupted", "InvalidStateValue", "InternalError", "EpisodeComplete", "TrainingComplete". :type reason: str or ~microsoft_bonsai_api.s...
625990854527f215b58eb746
class FormulaInvalidOperator(Exception): <NEW_LINE> <INDENT> pass
Raise when an invalid operator is encountered.
6259908523849d37ff852c07
class Keywords(object): <NEW_LINE> <INDENT> def __init__(self, md): <NEW_LINE> <INDENT> self.theme = [] <NEW_LINE> self.place = [] <NEW_LINE> self.temporal = [] <NEW_LINE> for i in md.findall('theme'): <NEW_LINE> <INDENT> theme = {} <NEW_LINE> val = i.find('themekt') <NEW_LINE> theme['themekt'] = util.testXMLValue(val)...
Process keywords
62599085dc8b845886d55107
class GetValueTests(unittest.TestCase, AssertIsMixin): <NEW_LINE> <INDENT> def assertNotFound(self, item, key): <NEW_LINE> <INDENT> self.assertIs(_get_value(item, key), _NOT_FOUND) <NEW_LINE> <DEDENT> def test_dictionary__key_present(self): <NEW_LINE> <INDENT> item = {"foo": "bar"} <NEW_LINE> self.assertEquals(_get_val...
Test context._get_value().
62599085a05bb46b3848bece
@toolbar_pool.register <NEW_LINE> class PersonExtensionToolbar(BaseExtensionToolbar): <NEW_LINE> <INDENT> model = Person
This extension class customizes the toolbar for the person page extension
62599085d486a94d0ba2db04
class RZThetaReactorMeshConverterByRingCompositionAxialBins( _RZThetaReactorMeshConverterByRingComposition, _RZThetaReactorMeshConverterByAxialBins, ): <NEW_LINE> <INDENT> pass
Generate a new mesh based on the radial compositions and axial bins in the core. See Also -------- _RZThetaReactorMeshConverterByRingComposition _RZThetaReactorMeshConverterByAxialBins
62599085a8370b77170f1f1a
class BrennerImageQuality(Filter): <NEW_LINE> <INDENT> def __init__(self, image, options, physical=False, verbal=False): <NEW_LINE> <INDENT> Filter.__init__(self, image, options, physical, verbal) <NEW_LINE> self.data.crop_to_rectangle() <NEW_LINE> <DEDENT> def calculate_brenner_quality(self): <NEW_LINE> <INDENT> data ...
Our implementation of the Brenner autofocus metric Brenner, J. F. et al (1976). An automated microscope for cytologic research a preliminary evaluation. Journal of Histochemistry & Cytochemistry, 24(1), 100–111. http://doi.org/10.1177/24.1.1254907
62599085fff4ab517ebcf364
class PdfInfo: <NEW_LINE> <INDENT> def __init__(self, infile): <NEW_LINE> <INDENT> self._infile = infile <NEW_LINE> self._pages = _pdf_get_all_pageinfo(infile) <NEW_LINE> <DEDENT> @property <NEW_LINE> def pages(self): <NEW_LINE> <INDENT> return self._pages <NEW_LINE> <DEDENT> @property <NEW_LINE> def min_version(self):...
Get summary information about a PDF
625990857cff6e4e811b758f
class DeviceInfo(object): <NEW_LINE> <INDENT> def __init__(self, _fastboot_device_controller, serial_number, location=None, provision_status=ProvisionStatus.IDLE, provision_state=ProvisionState()): <NEW_LINE> <INDENT> self._fastboot_device_controller = _fastboot_device_controller <NEW_LINE> self.serial_number = serial_...
The class to wrap the information about a fastboot device. Attributes: serial_number: The serial number for the device. location: The physical USB location for the device.
625990855fc7496912d49012
@base.Deprecate( is_removed=False, warning=('This command is deprecated. ' 'Please use `gcloud beta ml versions delete` instead.'), error=('This command has been removed. ' 'Please use `gcloud beta ml versions delete` instead.')) <NEW_LINE> @base.ReleaseTracks(base.ReleaseTrack.BETA) <NEW_LINE> class BetaDelete(delete....
Delete an existing Cloud ML version.
62599085bf627c535bcb3021
class KeyMappingCondition(ISingleCsvFilter): <NEW_LINE> <INDENT> def __init__(self, condition: Callable[[KS001], bool]): <NEW_LINE> <INDENT> self.condition = condition <NEW_LINE> <DEDENT> def is_valid(self, path: PathStr, csv_ks001str: KS001Str, csv_ks001: "KS001", data_type: DataTypeStr, index: int) -> bool: <NEW_LINE...
Accepts a csv only if the condition is valid for the KS001 structure representing the datasource considered
625990855fdd1c0f98e5face
class PCUProtocolType(Row): <NEW_LINE> <INDENT> table_name = 'pcu_protocol_type' <NEW_LINE> primary_key = 'pcu_protocol_type_id' <NEW_LINE> join_tables = [] <NEW_LINE> fields = { 'pcu_protocol_type_id': Parameter(int, "PCU protocol type identifier"), 'pcu_type_id': Parameter(int, "PCU type identifier"), 'port': Paramet...
Representation of a row in the pcu_protocol_type table. To use, instantiate with a dict of values.
6259908566673b3332c31f4e
class Boss(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=200) <NEW_LINE> respawn_rate = models.IntegerField('respawn rate in seconds') <NEW_LINE> zone = models.ForeignKey(Zone) <NEW_LINE> def next_spawn(self, server): <NEW_LINE> <INDENT> deaths = DeathCount.objects.in_spawn_range(self, server) <...
Object for an individual boss.
62599085283ffb24f3cf53ef
class Clipper2D(object): <NEW_LINE> <INDENT> def difference(self, poly): <NEW_LINE> <INDENT> clipper = self._prepare_clipper(poly) <NEW_LINE> if not clipper: <NEW_LINE> <INDENT> return [] <NEW_LINE> <DEDENT> differences = clipper.Execute(pc.CT_DIFFERENCE, pc.PFT_NONZERO, pc.PFT_NONZERO) <NEW_LINE> return self._process(...
This class is used to add clipping functionality to the Polygon2D class.
625990854c3428357761be09
class RequiredError(BormError): <NEW_LINE> <INDENT> pass
require error
6259908592d797404e389904
class VMwareHTTPFile(object): <NEW_LINE> <INDENT> def __init__(self, file_handle): <NEW_LINE> <INDENT> self.eof = False <NEW_LINE> self.file_handle = file_handle <NEW_LINE> <DEDENT> def set_eof(self, eof): <NEW_LINE> <INDENT> self.eof = eof <NEW_LINE> <DEDENT> def get_eof(self): <NEW_LINE> <INDENT> return self.eof <NEW...
Base class for HTTP file.
62599085a05bb46b3848becf
class ProjectManagerCli(): <NEW_LINE> <INDENT> def get_proj_list(self, root, sort_reverse=False): <NEW_LINE> <INDENT> proj_util = get_proj_util_mod(root) <NEW_LINE> python_path = _python_path <NEW_LINE> cmd = [python_path, "-E", join(root, "apps_dev", "project.py"), "--no-colorama"] <NEW_LINE> cmd.append("list") <NEW_L...
Abstraction layer to project manager cli
6259908571ff763f4b5e92fd
class DBUtils(): <NEW_LINE> <INDENT> def convertAttributesToDict(self, object): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> adict = dict((key, value) for key, value in object.__dict__.iteritems() if not callable(value) and not key.startswith('_')) <NEW_LINE> return adict <NEW_LINE> <DEDENT> except: <NEW_LINE> <INDENT>...
Help functions
62599085fff4ab517ebcf366
class JobOfferComment(models.Model): <NEW_LINE> <INDENT> text = models.TextField(verbose_name=_('Texto')) <NEW_LINE> comment_type = models.CharField( max_length=32, choices=CommentType.choices, verbose_name=_('Tipo')) <NEW_LINE> created_at = models.DateTimeField( auto_now_add=True, verbose_name=_('Rango salarial') ) <N...
A comment on a JobOffer.
625990854a966d76dd5f0a36