code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class ProstaticNoduleLocations(_CaseInsensitiveEnum): <NEW_LINE> <INDENT> left_anterior = 'Left Anterior' <NEW_LINE> left_lateral = 'Left Lateral' <NEW_LINE> left_posterolateral = 'Left Posterolateral' <NEW_LINE> left_posterior = 'Left Posterior' <NEW_LINE> left_apex ...
Location and extent of extraprostatic extension.
62598f10adb09d7d5dc09190
class TestConnectionApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = openapi_client.api.connection_api.ConnectionApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_create_connection(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DE...
ConnectionApi unit test stubs
62598f109f288636728173e0
@explicit_serialize <NEW_LINE> class VaspMDToDb(FiretaskBase): <NEW_LINE> <INDENT> optional_params = ["calc_dir", "calc_loc", "parse_dos", "bandstructure_mode", "additional_fields", "db_file", "fw_spec_field", "md_structures", "defuse_unsuccessful"] <NEW_LINE> def run_task(self, fw_spec): <NEW_LINE> <INDENT> calc_dir =...
Enter a VASP run into the database. Uses current directory unless you specify calc_dir or calc_loc. Optional params: calc_dir (str): path to dir (on current filesystem) that contains VASP output files. Default: use current working directory. calc_loc (str OR bool): if True will set most recent calc_loc....
62598f10fbf16365ca792c88
class ProgressBar(Control): <NEW_LINE> <INDENT> minimum = Property(Int, depends_on='_minimum') <NEW_LINE> _minimum = Int(0) <NEW_LINE> maximum = Property(Int, depends_on='_maximum') <NEW_LINE> _maximum = Int(100) <NEW_LINE> value = Bounded(0, low='minimum', high='maximum') <NEW_LINE> percentage = Property(Int, depends_...
A control which displays a value as a ticking progress bar.
62598f107b180e01f3e4863c
class ProductionCachedLoader(CachedLoader): <NEW_LINE> <INDENT> def get_template(self, *args, **kwargs): <NEW_LINE> <INDENT> if settings.DEBUG: <NEW_LINE> <INDENT> self.reset() <NEW_LINE> <DEDENT> return super().get_template(*args, **kwargs)
Template loader that caches templates only if the ``DEBUG`` settings is False.
62598f1097e22403b3839acb
class Sky2Pix_ConicEqualArea(Sky2PixProjection, Conic): <NEW_LINE> <INDENT> pass
Alber's conic equal area projection - sky to pixel. Corresponds to the ``COE`` projection in FITS WCS. See `Conic` for a description of the entire equation. The projection formulae are: .. math:: C &= \gamma / 2 \\ R_\theta &= \frac{180^\circ}{\pi} \frac{2}{\gamma} \sqrt{1 + \sin \theta_1 \sin \theta_2 - \g...
62598f10956e5f7376df4c71
class VerifyJWT(Vows.Context): <NEW_LINE> <INDENT> @Vows.capture_error <NEW_LINE> def topic(self, topic): <NEW_LINE> <INDENT> clock, sjwt = topic <NEW_LINE> clock_load(clock) <NEW_LINE> if callable(pubk): <NEW_LINE> <INDENT> return pubk(sjwt, timedelta(seconds=iat_skew)) <NEW_LINE> <DEDENT> return jwt.verify_jwt(sjwt, ...
Verify token with public key passed in
62598f10ab23a570cc2d4361
class ModifyAccountRemarkRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.DBInstanceId = None <NEW_LINE> self.UserName = None <NEW_LINE> self.Remark = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.DBInstanceId = params.get("DBInstanceId") <NEW_...
ModifyAccountRemark请求参数结构体
62598f10be7bc26dc9251456
class Gateway(IGateway): <NEW_LINE> <INDENT> router = None <NEW_LINE> sender = None <NEW_LINE> source_factory = None <NEW_LINE> def __init__(self, channel): <NEW_LINE> <INDENT> self.channel = channel <NEW_LINE> self.user_id = None <NEW_LINE> self.source = self.source_factory.create_by_runtime(self.channel.runtime) <NEW...
:type router: L{pyligaforex.services.gateways.interfaces.IRouter} :type sender: L{pycloudia.cluster.interfaces.ISender} :type source_factory: L{pycloudia.services.interfaces.IServiceChannelFactory}
62598f1055399d3f05625110
class MagneticDeclinationCalculatorSwitcher(object): <NEW_LINE> <INDENT> def set_the_models_calculator(self, use_real): <NEW_LINE> <INDENT> if use_real: <NEW_LINE> <INDENT> self.model.set_mag_dec_calc(self.real_calculator) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.model.set_mag_dec_calc(self.zero_calculator) <...
Aggregates the RealMagneticDeclinationCalculator and the ZeroMagneticDeclinationCalculator and switches them in the AstronomerModel.
62598f10d8ef3951e32c7449
class PovScore: <NEW_LINE> <INDENT> def __init__(self, relative: "Score", turn: chess.Color) -> None: <NEW_LINE> <INDENT> self.relative = relative <NEW_LINE> self.turn = turn <NEW_LINE> <DEDENT> def white(self) -> "Score": <NEW_LINE> <INDENT> return self.pov(chess.WHITE) <NEW_LINE> <DEDENT> def black(self) -> "Score": ...
A relative :class:`~chess.engine.Score` and the point of view.
62598f10a219f33f346c5417
class TablesCalculation(gennode.Node): <NEW_LINE> <INDENT> def exec_parameter_view(self, node_context): <NEW_LINE> <INDENT> if self.has_custom_widget: <NEW_LINE> <INDENT> in_table = {} <NEW_LINE> for port_idx, port in enumerate(self._input_ports): <NEW_LINE> <INDENT> if (node_context.input[port_idx].is_valid() and len(...
Calculation class taking a list of tables in and a list of tables out.
62598f10dc8b845886d521b3
class BigtableadminProjectsInstancesSetIamPolicyRequest(_messages.Message): <NEW_LINE> <INDENT> resource = _messages.StringField(1, required=True) <NEW_LINE> setIamPolicyRequest = _messages.MessageField('SetIamPolicyRequest', 2)
A BigtableadminProjectsInstancesSetIamPolicyRequest object. Fields: resource: REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. setIamPolicyRequest: A SetIamPolicyRequest resource to be passed as the request body.
62598f1031939e2706ed1058
class BinFalse_Case(Compilation_Case): <NEW_LINE> <INDENT> def createSource(self): <NEW_LINE> <INDENT> open("testtmp.i", "wt").write("int main() {}") <NEW_LINE> <DEDENT> def runtest(self): <NEW_LINE> <INDENT> if sys.platform == 'sunos5' or sys.platform.startswith ('irix6'): <NEW_LINE> <INDENT> self.runcmd(self.d...
Compiler that fails without reading input. This is an interesting case when the server is using fifos, because it has to cope with the open() on the fifo being interrupted. distcc doesn't know that 'false' is not a compiler, but it does need a command line that looks like a compiler invocation. We have to use a .i f...
62598f10be7bc26dc9251457
class WSMANSOAPResponseError(WSMANClientException): <NEW_LINE> <INDENT> pass
For error that occur during parsing
62598f10377c676e912f635c
class TicTacToeSquare(Turtle): <NEW_LINE> <INDENT> FONT = ("Arial", 12, "bold") <NEW_LINE> def __init__(self, index, grid, length, xPos, yPos, outlineColor = "black", fillColor = "white", text = ""): <NEW_LINE> <INDENT> Turtle.__init__(self, shape = "square", visible = False) <NEW_LINE> self.speed(0) <NEW_LINE> self.co...
Represent a Tic-Tac-Toe Square.
62598f107b180e01f3e4863e
class Project(object): <NEW_LINE> <INDENT> def __init__(self, attributes): <NEW_LINE> <INDENT> self.attributes = attributes <NEW_LINE> <DEDENT> def id(self): <NEW_LINE> <INDENT> return self.attributes.get('id') <NEW_LINE> <DEDENT> def name(self): <NEW_LINE> <INDENT> return self.attributes.get('name') <NEW_LINE> <DEDENT...
Project =============== This returns an instance of the Project domain model
62598f108a349b6b43684e31
class TftpIOError(TftpError): <NEW_LINE> <INDENT> pass
Base exception class for Tftp I/O errors.
62598f104a966d76dd5edac1
class operationlogapi(object): <NEW_LINE> <INDENT> def record_operation(self, session, user_name, operation, operation_ip, operation_service, request_body, request_args, operation_result, operation_message, execute_time): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> operation_message = unicode("operation_message", "utf...
操作日志记录api
62598f10ab23a570cc2d4363
class YesHandler(AbstractRequestHandler): <NEW_LINE> <INDENT> def can_handle(self, handler_input): <NEW_LINE> <INDENT> return is_intent_name("AMAZON.YesIntent")(handler_input) <NEW_LINE> <DEDENT> def handle(self, handler_input): <NEW_LINE> <INDENT> logger.info("In YesHandler") <NEW_LINE> return GetFactHandler().handle(...
If the user says Yes, they want another fact.
62598f109f288636728173e6
class RegisterImageCodeView(APIView): <NEW_LINE> <INDENT> def get(self,request,image_code_id): <NEW_LINE> <INDENT> text,image = captcha.generate_captcha() <NEW_LINE> redis_conn = get_redis_connection('code') <NEW_LINE> from . import constant <NEW_LINE> redis_conn.setex('img_%s'%image_code_id,constant.IMAGE_CODE_EXPIRE_...
# 2.接受前端的uuid # 3.生成图片验证码,保存 图片验证码的数据 # 4.返回响应
62598f10ec188e330fdf74a2
class BFSearcher(Searcher): <NEW_LINE> <INDENT> def next_state(self): <NEW_LINE> <INDENT> b = self.states[0] <NEW_LINE> self.states.remove(b) <NEW_LINE> return b
Class for searcher objects that perform breadth-first search (BFS) instead of random search.
62598f10656771135c488279
class LoggingNetwork(DefaultNetwork): <NEW_LINE> <INDENT> LOGGER_NAME = 'boxsdk.network' <NEW_LINE> REQUEST_FORMAT = '\x1b[36m%s %s %s\x1b[0m' <NEW_LINE> SUCCESSFUL_RESPONSE_FORMAT = '\x1b[32m%s\x1b[0m' <NEW_LINE> ERROR_RESPONSE_FORMAT = '\x1b[31m%s\n%s\n%s\n\x1b[0m' <NEW_LINE> STREAM_CONTENT_NOT_LOGGED = '<File downlo...
SDK Network subclass that logs requests and responses.
62598f10be7bc26dc9251458
class StatusesShow(Choreography): <NEW_LINE> <INDENT> def __init__(self, temboo_session): <NEW_LINE> <INDENT> Choreography.__init__(self, temboo_session, '/Library/Twitter/Tweets/StatusesShow') <NEW_LINE> <DEDENT> def new_input_set(self): <NEW_LINE> <INDENT> return StatusesShowInputSet() <NEW_LINE> <DEDENT> def _make_r...
Create a new instance of the StatusesShow Choreography. A TembooSession object, containing a valid set of Temboo credentials, must be supplied.
62598f10d8ef3951e32c744b
class StaticIpRouterIdConfig(RouterIdConfig): <NEW_LINE> <INDENT> address = registry_fields.IPAddressField( help_text=_( "A static IP address is not allocated from an IP pool. " + "A conflict with an IP allocated from an IP pool is possible. " + "Consider allocating it from the IP pool and use \"hint\" to suggest the w...
Static router identifier configuration.
62598f10a05bb46b38489468
@register_events <NEW_LINE> class EventObject(DefaultObject): <NEW_LINE> <INDENT> _events = { "drop": (["character", "obj"], OBJECT_DROP), "get": (["character", "obj"], OBJECT_GET), "time": (["object"], OBJECT_TIME, None, time_event), } <NEW_LINE> @lazy_property <NEW_LINE> def callbacks(self): <NEW_LINE> <INDENT> retur...
Default object with management of events.
62598f10bf627c535bcb0065
class InlineResponse2003(object): <NEW_LINE> <INDENT> def __init__(self, status=None): <NEW_LINE> <INDENT> self.swagger_types = { 'status': 'str' } <NEW_LINE> self.attribute_map = { 'status': 'status' } <NEW_LINE> self._status = status <NEW_LINE> <DEDENT> @property <NEW_LINE> def status(self): <NEW_LINE> <INDENT> retur...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f104527f215b58e8ae8
class NoPolicy(HostSelectionPolicy): <NEW_LINE> <INDENT> def __init__(self, slottable): <NEW_LINE> <INDENT> HostSelectionPolicy.__init__(self, slottable) <NEW_LINE> <DEDENT> def get_host_score(self, node, time, lease): <NEW_LINE> <INDENT> return 1
A simple host selection policy: all hosts have the same score
62598f10099cdd3c636749cf
class AstakosTestSuite(BurninTests): <NEW_LINE> <INDENT> details = Proper(value=None) <NEW_LINE> def test_001_unauthorized_access(self): <NEW_LINE> <INDENT> false_token = "12345" <NEW_LINE> self.info("Will use token %s", false_token) <NEW_LINE> client = ComputeClient(self.clients.compute_url, false_token) <NEW_LINE> cl...
Test Astakos functionality
62598f10ec188e330fdf74a4
class SuperscriptExtension(markdown.Extension): <NEW_LINE> <INDENT> def extendMarkdown(self, md, md_globals): <NEW_LINE> <INDENT> md.inlinePatterns['superscript'] = SuperscriptPattern(SUPER_RE, md)
Superscript Extension for Python-Markdown.
62598f10fbf16365ca792c90
class WindowDispatchCheck(QtGui.QDialog): <NEW_LINE> <INDENT> _backup_set = None <NEW_LINE> _bm_window = None <NEW_LINE> _combo_box_queue = None <NEW_LINE> _layout = None <NEW_LINE> def __init__(self, backup_set, bm_window): <NEW_LINE> <INDENT> super(WindowDispatchCheck, self).__init__() <NEW_LINE> self._backup_set = b...
.. :param bs.ctrl.session.BackupSetCtrl backup_set: :param bs.gui.window_backup_monitor.WindowBackupMonitor backup_set: This is a dispatch check GUI that runs several checks before dispatching the backup-set to the queue for backup and prompts for dispatch parameters.
62598f1031939e2706ed105a
class CheckState: <NEW_LINE> <INDENT> Unchecked = 0x00 <NEW_LINE> PartiallyChecked = 0x01 <NEW_LINE> Checked = 0x02
This class type is used to describe the check status. .. autosummary:: Unchecked PartiallyChecked Checked
62598f10be7bc26dc9251459
class PrivateUserApiTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.user = create_user( email='test@londonappdev.com', password='testpass', name='name' ) <NEW_LINE> self.client = APIClient() <NEW_LINE> self.client.force_authenticate(user=self.user) <NEW_LINE> <DEDENT> def test_retrieve_pr...
Test API request that require authentication
62598f104527f215b58e8aea
class AcceptLanguageList(AcceptTokenList): <NEW_LINE> <INDENT> ItemClass = AcceptLanguageItem <NEW_LINE> def __init__(self, *args): <NEW_LINE> <INDENT> super(AcceptLanguageList, self).__init__(*args) <NEW_LINE> <DEDENT> def select_token(self, token_list): <NEW_LINE> <INDENT> return str(self.select_language( list(params...
Represents an Accept-Language header
62598f10099cdd3c636749d0
class PythonOutOfRangeException(PythonUnrecognizedTokenException): <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return 'Slice out of range error near token %s on line %d:%d' % (self.token, self.line, self.column)
Error occurring when a slice is out of range
62598f10656771135c48827d
class BaseUploadDriver(BaseDriver): <NEW_LINE> <INDENT> accept_file_types = None <NEW_LINE> def accept(self, *args, **kwargs): <NEW_LINE> <INDENT> self.accept_file_types = args <NEW_LINE> return self <NEW_LINE> <DEDENT> def validate_extension(self, filename): <NEW_LINE> <INDENT> if self.accept_file_types is not None: <...
Base class that all upload drivers inherit from.
62598f10fbf16365ca792c92
class MeshSurfaceFilter(MeshFilter): <NEW_LINE> <INDENT> @MeshFilter.mesh.setter <NEW_LINE> def mesh(self, mesh): <NEW_LINE> <INDENT> cv.check_type('filter mesh', mesh, openmc.Mesh) <NEW_LINE> self._mesh = mesh <NEW_LINE> n_dim = len(mesh.dimension) <NEW_LINE> self.bins = [mesh_tuple + (surf,) for mesh_tuple, surf in p...
Filter events by surface crossings on a regular, rectangular mesh. Parameters ---------- mesh : openmc.Mesh The Mesh object that events will be tallied onto filter_id : int Unique identifier for the filter Attributes ---------- bins : Integral The Mesh ID mesh : openmc.Mesh The Mesh object that events...
62598f10283ffb24f3cf2499
class TvdbTokenexpired(BaseTVinfoAuthenticationerror, TvdbError): <NEW_LINE> <INDENT> pass
token expired or missing thetvdb.com
62598f103617ad0b5ee04d21
class DnaseSimulation(AbstractSequenceSetGenerator): <NEW_LINE> <INDENT> def __init__(self, dnaseSimulationFile, loadedMotifs, shuffler): <NEW_LINE> <INDENT> self.dnaseSimulationFile = dnaseSimulationFile <NEW_LINE> self.loadedMotifs = loadedMotifs <NEW_LINE> self.shuffler=shuffler <NEW_LINE> <DEDENT> def generateSeque...
Simulation based on a file that details the sequences (which may be shuffled) and the motifs+positions in the sequences Arguments: dnaseSimulationFile: file with a title, and columns: sequenceName<tab>sequence<tab>motif1-pos1,motif2-pos2... loadedMotifs: instance of :class:`.AbstractLoadedMotifs` s...
62598f104527f215b58e8aec
class DetailDataViewSetBlog(MyRetrieveModelMixin): <NEW_LINE> <INDENT> authentication_classes = () <NEW_LINE> permission_classes = () <NEW_LINE> msg_detail = "查看用户个人中心" <NEW_LINE> serializer_class = DetailDataSerializerBlog <NEW_LINE> queryset = models.UserData.objects.all() <NEW_LINE> lookup_field = "user__username" <...
查看data详细信息
62598f10fbf16365ca792c94
@dataclass <NEW_LINE> class Jump: <NEW_LINE> <INDENT> pointer: int
Marker for jumping to a new pointer
62598f10377c676e912f6360
class ThemeTweakerUndoCommand(sublime_plugin.ApplicationCommand): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> ThemeTweaker().undo()
Undo last tweak.
62598f10bf627c535bcb006b
class GH_LinearGraph(GH_AbstractGraph,IGH_Graph,GH_ISerializable): <NEW_LINE> <INDENT> def AddGrip(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def ClearGrips(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def CreateDerivedDuplicate(self,*args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def C...
GH_LinearGraph()
62598f104527f215b58e8aee
class UnaryRule(namedtuple("UnaryRule", ["X", "Y"])): <NEW_LINE> <INDENT> pass
A unary rule consisting of the form X->Y.
62598f10ab23a570cc2d4367
class ResourceItemTests(SpyAgency, BaseWebAPITestCase, metaclass=BasicTestsMetaclass): <NEW_LINE> <INDENT> fixtures = ['test_users'] <NEW_LINE> sample_api_url = 'hosting-service-accounts/<id>/remote-repositories/<id>/' <NEW_LINE> resource = resources.remote_repository <NEW_LINE> basic_get_use_admin = True <NEW_LINE> co...
Testing the RemoteRepositoryResource item APIs.
62598f10ec188e330fdf74aa
class AdditionalAPIPrototype: <NEW_LINE> <INDENT> NAME = "Base" <NEW_LINE> ROUTES = [] <NEW_LINE> Access_Control_Allow_Methods = {} <NEW_LINE> CACHED = [] <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.nautilus_extension = None <NEW_LINE> <DEDENT> def init_extension(self, nautilus_extension): <NEW_LINE> <INDEN...
Additional APIs classes are used to connect new APIs to the Nautilus Flask Extensions :ivar nautilus_extension: Nautilus extension :type nautilus_extension: capitains_nautilus.flask_ext.FlaskNautilus
62598f10fbf16365ca792c96
class PhotoSet(object): <NEW_LINE> <INDENT> def __init__(self, title, src, photo_list): <NEW_LINE> <INDENT> self.title = title <NEW_LINE> self.src = src <NEW_LINE> self.photo_list = photo_list
A C{PhotoSet} object holds information about a cover photo for the rideset and links to additional photos of the ride. @ivar title: title (hover) text for cover photo @type title: C{string} @ivar src: URL of cover photo @type src: C{string} @ivar photo_list: C{list} of C{Photo} objects @type photo_list: C{list} of C{P...
62598f11ab23a570cc2d4368
class Content(object): <NEW_LINE> <INDENT> root = os.path.join(ROOT, "site", "pages") <NEW_LINE> def __init__(self, node, lang_id): <NEW_LINE> <INDENT> self.cache = True <NEW_LINE> self.lang_id = lang_id <NEW_LINE> self.node = node <NEW_LINE> self.history = [] <NEW_LINE> self.xml = None <NEW_LINE> self.__build() <NEW_L...
Page content.
62598f11ec188e330fdf74ac
class ExperimentsViewTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.client = Client() <NEW_LINE> <DEDENT> def test_list_experiments(self): <NEW_LINE> <INDENT> url = reverse('app_experiments_calendar') <NEW_LINE> response = self.client.get(url) <NEW_LINE> self.assertEqual(response...
Tests for Experiments
62598f117b180e01f3e48644
class FatalError(Exception): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> Exception.__init__(self, message)
The only exception that doesn't trigger a dump of a trace server-side.
62598f118a349b6b43684e3d
class Fellow(Employee): <NEW_LINE> <INDENT> def __init__(self, name, wants_housing='N'): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.livingspace = None <NEW_LINE> self.wants_housing = True if wants_housing == 'Y' else False <NEW_LINE> <DEDENT> def allocate_livingspace(self, room): <NEW_LINE> <INDENT> self.livi...
Fellow inherits from Employee class fellow has choice of housing within Amity
62598f113346ee7daa336c5f
@base.gf2n <NEW_LINE> @base.vectorize <NEW_LINE> class mulc(base.MulBase): <NEW_LINE> <INDENT> __slots__ = [] <NEW_LINE> code = base.opcodes['MULC'] <NEW_LINE> arg_format = ['cw','c','c']
Clear multiplication $c_i=c_j \cdot c_k$.
62598f114527f215b58e8af2
class CastleWrapper: <NEW_LINE> <INDENT> def __init__(self, castle): <NEW_LINE> <INDENT> self.castle = castle <NEW_LINE> <DEDENT> def current_health(self): <NEW_LINE> <INDENT> return self.castle.current_health <NEW_LINE> <DEDENT> def get_location(self): <NEW_LINE> <INDENT> return LocationWrapper(self.castle.location) <...
this class is a wrapper for castle.
62598f1197e22403b3839adb
class frag_receiver_tx(frag_base): <NEW_LINE> <INDENT> def make_frag(self, dtag, win=None, cbit=None, bitmap=None, abort=False): <NEW_LINE> <INDENT> buffer = BitBuffer() <NEW_LINE> if (self.rule[T_RULEID] is not None and self.rule[T_RULEIDLENGTH] is not None): <NEW_LINE> <INDENT> buffer.add_bits(self.rule[T_RULEID], se...
make SCHC fragment receiver TX message.
62598f11ab23a570cc2d4369
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
62598f11a219f33f346c5425
class Movie(): <NEW_LINE> <INDENT> def __init__(self, movie_title, movie_artwork, movie_trailer_url): <NEW_LINE> <INDENT> self.title = movie_title <NEW_LINE> self.poster_image_url = movie_artwork <NEW_LINE> self.trailer_youtube_url = movie_trailer_url
Movie class object to store movie related information
62598f1131939e2706ed105f
class SecurityManagerApp(SecurityManagerBasicTest): <NEW_LINE> <INDENT> @skipUnlessPassed('test_ssh') <NEW_LINE> def test_security_manager_01_setup(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @skipUnlessPassed('test_security_manager_01_setup') <NEW_LINE> def test_security_manager_02_install(self): <NEW_LINE> <I...
Tests covering app installation. Ordering is important, therefore tests are numbered.
62598f11be7bc26dc925145e
class CMOV(Instruction): <NEW_LINE> <INDENT> def _asm(self, out_names, in_names): <NEW_LINE> <INDENT> return 'l.sfnei r0, %3\\n\\tl.cmov %0, %1, %2' <NEW_LINE> <DEDENT> def constraints(self): <NEW_LINE> <INDENT> return ('=r',), ('r', 'r', 'I') <NEW_LINE> <DEDENT> def names(self): <NEW_LINE> <INDENT> return ('rD',), ('r...
l.cmov takes two register inputs, and produces one register output based on the value of the flag.
62598f1155399d3f05625120
class hello_result: <NEW_LINE> <INDENT> thrift_spec = ( (0, TType.STRING, 'success', None, None, ), ) <NEW_LINE> def __init__(self, success=None,): <NEW_LINE> <INDENT> self.success = success <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated a...
Attributes: - success
62598f11a05bb46b38489474
class CompoundAction(Action): <NEW_LINE> <INDENT> def __init__(self, *actions): <NEW_LINE> <INDENT> self.actions = actions <NEW_LINE> <DEDENT> def perform(self, agent, patient): <NEW_LINE> <INDENT> for action in self.actions: <NEW_LINE> <INDENT> action.perform(agent, patient)
Group a set of actions
62598f1197e22403b3839add
class MultiStepLR(_LRScheduler): <NEW_LINE> <INDENT> def __init__(self, optimizer, milestones, gamma=0.1, last_epoch=-1): <NEW_LINE> <INDENT> if not list(milestones) == sorted(milestones): <NEW_LINE> <INDENT> raise ValueError('Milestones should be a list of' ' increasing integers. Got {}', milestones) <NEW_LINE> <DEDEN...
Set the learning rate of each parameter group to the initial lr decayed by gamma once the number of epoch reaches one of the milestones. When last_epoch=-1, sets initial lr as lr. Args: optimizer (Optimizer): Wrapped optimizer. milestones (list): List of epoch indices. Must be increasing. gamma (float): Mu...
62598f11ab23a570cc2d436a
class GCEBackend(UuidMixin): <NEW_LINE> <INDENT> def __init__(self, instance_group, balancing_mode='UTILIZATION', max_utilization=None, max_rate=None, max_rate_per_instance=None, capacity_scaler=1, description=None): <NEW_LINE> <INDENT> if isinstance(instance_group, GCEInstanceGroup): <NEW_LINE> <INDENT> self.instance_...
A GCE Backend. Only used for creating Backend Services.
62598f11ff9c53063f519259
class LinkedList(object, ICollection[T], IEnumerable[T], IEnumerable, ICollection, IReadOnlyCollection[T], ISerializable, IDeserializationCallback): <NEW_LINE> <INDENT> def AddAfter(self, node, *__args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def AddBefore(self, node, *__args): <NEW_LINE> <INDENT> pass <NEW_LINE>...
LinkedList[T]() LinkedList[T](collection: IEnumerable[T])
62598f119f288636728173f4
class ICMPType: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> raise TypeError('ICMPType may not be instantiated')
Represents an ICMP type, as combination of type and code ICMP Types should inherit from this class so that the code can identify them easily. This is a static class, not meant to be instantiated
62598f1131939e2706ed1060
class Artist(Model): <NEW_LINE> <INDENT> artist = CharField('Artist name', max_length=255, unique=True) <NEW_LINE> search = CharField(max_length=255, unique=True) <NEW_LINE> sort = CharField(max_length=255, db_index=True) <NEW_LINE> last_played = DateTimeField('last played at', null=True, blank=True) <NEW_LINE> times_p...
A model representing a band or musician. Most of the models have extra “search” and “sort” fields that are derived from the actual name. >>> a = Artist(artist=u"The ßand") >>> a.save() >>> a.artist u'The \xdfand' >>> a.search u'the band' >>> a.sort u'band, the'
62598f117b180e01f3e48646
class LogEnabledMixin(models.Model): <NEW_LINE> <INDENT> created = models.DateTimeField( auto_now_add=True) <NEW_LINE> modified = models.DateTimeField(auto_now=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> abstract = True
Attach created / updated fields to model
62598f1160cbc95b06362f2e
class TestJobLeverageStatsProjects(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 JobLev...
JobLeverageStatsProjects unit test stubs
62598f114a966d76dd5edad1
@parametrized(*SIMPLE_BLOCKS) <NEW_LINE> class TestSimpleBlocks(ParametrizedTestCase): <NEW_LINE> <INDENT> def setParameters(self, code, expected_complexity): <NEW_LINE> <INDENT> self.code = dedent(code) <NEW_LINE> self.expected_complexity = expected_complexity <NEW_LINE> <DEDENT> def testComplexityVisitor(self): <NEW_...
Test simple blocks.
62598f113617ad0b5ee04d2b
class Player(): <NEW_LINE> <INDENT> def __init__(self, nickname: str=None, deck: Deck=None): <NEW_LINE> <INDENT> self.nickname = nickname <NEW_LINE> self.deck = deck <NEW_LINE> <DEDENT> @property <NEW_LINE> def nickname(self): <NEW_LINE> <INDENT> return self.__nickname <NEW_LINE> <DEDENT> @nickname.setter <NEW_LINE> de...
A siimple Player class to store its name and deck of cards
62598f1197e22403b3839adf
class DescribeDBInstanceInfoResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.InstanceId = None <NEW_LINE> self.InstanceName = None <NEW_LINE> self.Encryption = None <NEW_LINE> self.KeyId = None <NEW_LINE> self.KeyRegion = None <NEW_LINE> self.DefaultKmsRegion = None <NEW_LINE> s...
DescribeDBInstanceInfo返回参数结构体
62598f11ff9c53063f51925b
class GenerateComponents(GenerateComponentsBase): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> GenerateComponentsBase.__init__(self, message="components system") <NEW_LINE> <DEDENT> def __call__(self, sourceRoot, outputRoot=None, quiet=True): <NEW_LINE> <INDENT> self.startTiming() <NEW_LINE> if self.pars...
This class can be used to generate the files modules/hardcore/opera/components.h and modules/hardcore/component/OpComponentCreate.inc from their respective template file modules/hardcore/opera/components_template.h and modules/hardcore/component/OpComponentCreate_template.inc and the module.components files of all modu...
62598f11fbf16365ca792c9d
class Report(AbstractOperationConstructor("Report")): <NEW_LINE> <INDENT> def __init__(self, *ops, **kw): <NEW_LINE> <INDENT> Report.__base__.__init__(self, *ops, **kw) <NEW_LINE> self.arity = len(ops) <NEW_LINE> self.set_precision(ML_Void)
Message reporting operation
62598f1150812a4eaa6201eb
class DustClient(DustDaemon): <NEW_LINE> <INDENT> pass
DustClient is a client for the Dust protocol. In this simplified implementation of the protocol, the client and the server are identical and both just trivially subclass DustDaemon.
62598f11d8ef3951e32c7453
class DeletePeer(neutronv20.DeleteCommand): <NEW_LINE> <INDENT> resource = 'bgp_peer'
Delete a BGP peer.
62598f11be7bc26dc9251460
class Provider(object): <NEW_LINE> <INDENT> def __init__(self, hdd): <NEW_LINE> <INDENT> self.__hdd = hdd <NEW_LINE> <DEDENT> def GetHdd(self): <NEW_LINE> <INDENT> return self.__hdd <NEW_LINE> <DEDENT> def GetCategoryList(self): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def LoadCategoryList(se...
The Provider class
62598f113617ad0b5ee04d2d
class _TypeChecker: <NEW_LINE> <INDENT> path = '' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.path = [] <NEW_LINE> self.memo = set() <NEW_LINE> <DEDENT> @contextlib.contextmanager <NEW_LINE> def recurse(self, path_elem): <NEW_LINE> <INDENT> self.path.append(path_elem) <NEW_LINE> yield <NEW_LINE> self.path.p...
Internal class for holding state
62598f114527f215b58e8af8
class ToggleAcceptingClanApplicationsRequest(GenericRequest): <NEW_LINE> <INDENT> def __init__(self, session): <NEW_LINE> <INDENT> super(ToggleAcceptingClanApplicationsRequest, self).__init__(session) <NEW_LINE> self.url = session.serverURL + "clan_admin.php?action=noapp"
Toggle whether or not the clan accepts new applications.
62598f1160cbc95b06362f32
class HandleNetworkDeltas(BaseNetworkTask): <NEW_LINE> <INDENT> def execute(self, deltas): <NEW_LINE> <INDENT> added_ports = {} <NEW_LINE> for amp_id, delta in deltas.items(): <NEW_LINE> <INDENT> added_ports[amp_id] = [] <NEW_LINE> for nic in delta[constants.ADD_NICS]: <NEW_LINE> <INDENT> interface = self.network_drive...
Task to plug and unplug networks Loop through the deltas and plug or unplug networks based on delta
62598f11ab23a570cc2d436d
class ExploringBuilder: <NEW_LINE> <INDENT> def __init__(self, __operation_data_set, __operation_mandatory_fields_set) -> None: <NEW_LINE> <INDENT> self.__info_data_builder = InfoDataBuilder(__operation_data_set, __operation_mandatory_fields_set) <NEW_LINE> <DEDENT> def info_command_data_set(self) -> InfoDataBuilder: <...
Contains all necessary data sets builders for construction exploring past payments operations
62598f11ff9c53063f51925f
class AssessmentMeasuresSerializer(NoModelSerializer): <NEW_LINE> <INDENT> measures = MeasureSerializer(many=True)
measures which are not just Yes/No.
62598f11956e5f7376df4c7d
class TaskRegistry(dict): <NEW_LINE> <INDENT> NotRegistered = NotRegistered <NEW_LINE> def __missing__(self, key): <NEW_LINE> <INDENT> raise self.NotRegistered(key) <NEW_LINE> <DEDENT> def register(self, task): <NEW_LINE> <INDENT> if task.name is None: <NEW_LINE> <INDENT> raise InvalidTaskError( 'Task class {0!r} must ...
Map of registered tasks.
62598f11a219f33f346c542d
@implementer(IAttributeAnnotatable) <NEW_LINE> class ProtectedObjectMixin: <NEW_LINE> <INDENT> def __acl__(self): <NEW_LINE> <INDENT> protected = IProtectedObject(self, None) <NEW_LINE> if protected is not None: <NEW_LINE> <INDENT> acl = protected.__acl__() <NEW_LINE> if callable(acl): <NEW_LINE> <INDENT> acl = acl(pro...
Base protected object class mixin This mixin class is only used to automatically extract ACLs from an :py:class:`IProtectedObject <pyams_security.interfaces.IProtectedObject>` interface adapter.
62598f110fa83653e46f3ae8
class ReplayData(): <NEW_LINE> <INDENT> game_pk = '' <NEW_LINE> id = '' <NEW_LINE> headline = '' <NEW_LINE> replay_url = ''
Holds data for each replay generated
62598f1160cbc95b06362f34
class SeqPrinter(object): <NEW_LINE> <INDENT> def __init__(self, kmer_len, datatype="events", transducer=False, fname=None, alphabet=DEFAULT_ALPHABET): <NEW_LINE> <INDENT> self.kmers = bio.all_kmers(kmer_len, alphabet=alphabet) <NEW_LINE> self.transducer = transducer <NEW_LINE> self.datatype = datatype <NEW_LINE> if fn...
Formats fasta strings and writes them to stdout or file The sequence is calculated on the fly from a Viterbi path of states :param kmer_len: length of kmer to use for converting states to kmers :param datatype: collective noun for data time used as model input e.g. "events" or "samples" :param transducer: if True...
62598f11a219f33f346c542f
class SharedTailCandidateSet(object): <NEW_LINE> <INDENT> __slots__ = ("cut_db", "shared_tail", "tail_length") <NEW_LINE> def __init__(self, SharedTail, DoorId_A, CutIndicesA, DoorId_B, CutIndicesB): <NEW_LINE> <INDENT> self.cut_db = { DoorId_A: CutIndicesA, DoorId_B: CutIndicesB, } <NEW_LINE> self.shared_tail = Shared...
A SharedTailCandidateSet is 1:1 associated with a shared tail command list. It contains the DoorID-s of doors that share the tail and what indices would have to be cut out of the door's command list if the shared tail was to be extracted. All this information is stored in a map: DoorId --> Cut ...
62598f11cc40096d616197dc
class EmailAuthBackend(object): <NEW_LINE> <INDENT> def authenticate(self, email=None, password=None): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> logger = logging.getLogger(__name__) <NEW_LINE> logger.debug("Authentication begins for user - %s", email); <NEW_LINE> user = get_user_model().objects.get(email=email) <...
Email Authentication Backend Allows a user to sign in using an email/password pair rather than a username/password pair.
62598f114527f215b58e8afe
class DataHandler(ABC): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def _get_context(*args, **kwargs): <NEW_LINE> <INDENT> raise NotImplementedError("This method must be implemented in the child") <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def _get_update(*args, **kwargs): <NEW_LINE> <INDENT> raise NotImplemente...
DataHandlers will standardise the interface for backtesting for different types of sources. The user may provide a list of data, they may provide a generator, a file or something else. This interface makes it simple to add more supported types to the Backtesting engine and makes it pretty easy to implement a type. It...
62598f119f288636728173fe
class Rights(BaseMetadata): <NEW_LINE> <INDENT> class Config: <NEW_LINE> <INDENT> title = 'Rights Metadata' <NEW_LINE> <DEDENT> statement: str = Field( title="Statement", description="A string containing the text of the license or rights statement" ) <NEW_LINE> url: AnyUrl = Field( title="URL", description="An object c...
A class used to represent the rights statement metadata associated with a resource
62598f11ec188e330fdf74ba
class MessageCommand: <NEW_LINE> <INDENT> name: str = "" <NEW_LINE> callable_name: str = "" <NEW_LINE> args: Tuple = tuple() <NEW_LINE> kwargs: Mapping[str, Any] = {} <NEW_LINE> def __init__(self, name: str, callable_name: str, args: Collection[Any] = None, kwargs: Optional[Mapping[str, Any]] = None): <NEW_LINE> <INDEN...
A message command. This object records a way to call a method in the module object. In case where the message has an :attr:`~.Message.author` from a different module from the :attr:`~.Message.chat`, this function MUST be called on the :attr:`~.Message.author`’s module. The method specified MUST return either a ``str`...
62598f11283ffb24f3cf24ad
class AnonUserDeniedError(FTPCmdError): <NEW_LINE> <INDENT> errorCode = ANON_USER_DENIED
Raised when an anonymous user issues a command that will alter the filesystem
62598f11bf627c535bcb007e
class TestMetrics(object): <NEW_LINE> <INDENT> def rand_super(self): <NEW_LINE> <INDENT> h_5 = rand_herm(5) <NEW_LINE> return propagator(h_5, scipy.rand(), [ create(5), destroy(5), jmat(2, 'z') ]) <NEW_LINE> <DEDENT> def test_average_gate_fidelity(self): <NEW_LINE> <INDENT> for dims in range(2, 5): <NEW_LINE> <INDENT> ...
A test class for the metrics and pseudo-metrics included with QuTiP.
62598f11099cdd3c636749db
class Date(models.Model): <NEW_LINE> <INDENT> date_completed = models.DateField(default=get_default_localtime_date) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> ordering = ['-date_completed'] <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> name = str(self.date_completed) <NEW_LINE> return name
Dates of when workout instances are completed
62598f119f28863672817400
class NoTrigger(callbacks.Plugin): <NEW_LINE> <INDENT> def __init__(self, irc): <NEW_LINE> <INDENT> self.__parent = super(NoTrigger, self) <NEW_LINE> self.__parent.__init__(irc) <NEW_LINE> if version_info[0] >= 3: <NEW_LINE> <INDENT> self.padchar = "\u200B" <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> from codecs impo...
Mods outFilter to prevent the bot from triggering other bots.
62598f117cff6e4e811b45f2
class JSONRPCProxy(object): <NEW_LINE> <INDENT> def __init__(self, host, port, service, ssl=False): <NEW_LINE> <INDENT> self.host = host <NEW_LINE> self.port = port <NEW_LINE> self.service = service <NEW_LINE> addr = (host if port is None else "%s:%s" % (self.host, self.port)) <NEW_LINE> self.url = '%s://%s/jsonrpc' % ...
Wrapper class around XML-RPC's ServerProxy to wrap method's errors into XMLRPCError class
62598f11656771135c488293
class Taper(ExplicitComponent): <NEW_LINE> <INDENT> def initialize(self): <NEW_LINE> <INDENT> self.options.declare('val', desc='Initial value for the taper ratio.') <NEW_LINE> self.options.declare('mesh', desc='Nodal mesh defining the initial aerodynamic surface.') <NEW_LINE> self.options.declare('symmetry', default=Fa...
OpenMDAO component that manipulates the mesh by altering the spanwise chord linearly to produce a tapered wing. Note that we apply taper around the quarter-chord line. Parameters ---------- taper : float Taper ratio for the wing; 1 is untapered, 0 goes to a point at the tip. Returns ------- mesh[nx, ny, 3] : nump...
62598f1131939e2706ed1066
class Bond(Timeseries): <NEW_LINE> <INDENT> def __init__(self, atoms): <NEW_LINE> <INDENT> if not len(atoms) == 2: <NEW_LINE> <INDENT> raise ValueError("Bond timeseries requires a 2 atom selection") <NEW_LINE> <DEDENT> Timeseries.__init__(self, 'r', atoms, 1)
Create a timeseries that returns a timeseries for a bond t = Bond(atoms) *atoms* must contain 2 :class:`~MDAnalysis.core.AtomGroup.Atom` instances, either as a list or an :class:`~MDAnalysis.core.AtomGroup.AtomGroup`
62598f110fa83653e46f3aee
class GrossLeverage(bt.Analyzer): <NEW_LINE> <INDENT> params = ( ('fund', None), ) <NEW_LINE> def start(self): <NEW_LINE> <INDENT> if self.p.fund is None: <NEW_LINE> <INDENT> self._fundmode = self.strategy.broker.fundmode <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self._fundmode = self.p.fund <NEW_LINE> <DEDENT> <DE...
This analyzer calculates the Gross Leverage of the current strategy on a timeframe basis Params: - ``fund`` (default: ``None``) If ``None`` the actual mode of the broker (fundmode - True/False) will be autodetected to decide if the returns are based on the total net asset value or on the fund value. Se...
62598f11377c676e912f636a
class TestSparseAncestorsRoundTrip(TestRoundTrip): <NEW_LINE> <INDENT> def verify_data_round_trip( self, genotypes, positions, alleles=None, sequence_length=None, site_times=None, individual_times=None, ): <NEW_LINE> <INDENT> sample_data = self.create_sample_data( genotypes, positions, alleles, sequence_length, site_ti...
Tests that we correctly round trip data when we generate the sparsest possible set of ancestral haplotypes.
62598f11be7bc26dc9251465
class ZipCodeRegionList(MultipleFieldLookupMixin, ListAPIView): <NEW_LINE> <INDENT> throttle_classes = (AnonRateThrottle,) <NEW_LINE> serializer_class = ZipCodeSerializer <NEW_LINE> lookup_fields = ('prefecture', 'city', 'town') <NEW_LINE> def list(self, request, *args, **kwargs): <NEW_LINE> <INDENT> add_filter = {} <N...
地域リソース
62598f11a05bb46b38489482
class Log(Transformation): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def setup(self, ws, data_provider, *args, **kwargs): <NEW_LINE> <INDENT> ws.jacobianSetFuncTransformation(transformation_func = "log") <NEW_LINE> <DEDENT> def __call__(self, x): <NEW_LINE> <INDENT> return np....
The natural logarithm transformation $f(x) = \log_{10}(x)$.
62598f119f28863672817401