code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class Fields(BoxLayout): <NEW_LINE> <INDENT> paths = { "address": ["hostInput", "address"], "port": ["hostInput", "port"], "localhost": ["localhostOption", "enabled"], "playerID": ["playerInput", "playerID"], "name": ["playerInput", "name"], "master": ["masterOption", "enabled"] } <NEW_LINE> hostInput = ObjectProperty(... | Panneau de configuration pour renseigner les valeurs par défauts des zones de saisie de la page d'accueil. | 62598ef62ae34c7f260a9986 |
class BoggleAppTestCase(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.client = app.test_client() <NEW_LINE> app.config['TESTING'] = True <NEW_LINE> <DEDENT> def test_homepage(self): <NEW_LINE> <INDENT> with self.client as client: <NEW_LINE> <INDENT> response = client.get('/') <NEW_LINE> html ... | Test flask app of Boggle. | 62598ef67b180e01f3e48498 |
class TempBufShufl: <NEW_LINE> <INDENT> def __init__(self, elem_size, elem_count): <NEW_LINE> <INDENT> assert elem_size > 0, elem_size <NEW_LINE> assert elem_count > 0, elem_count <NEW_LINE> self.elem_size = elem_size <NEW_LINE> self.elem_count = elem_count <NEW_LINE> self.buffer = bytearray(elem_size * elem_count) <NE... | 开辟缓存数据,并将缓存中的数据打乱. | 62598ef62c8b7c6e89bd2069 |
class Throttler(object): <NEW_LINE> <INDENT> def __and__(self, other): <NEW_LINE> <INDENT> return LatestGroupThrottler([self, other]) <NEW_LINE> <DEDENT> def __or__(self, other): <NEW_LINE> <INDENT> return SoonestGroupThrottler([self, other]) <NEW_LINE> <DEDENT> def wait(self): <NEW_LINE> <INDENT> to_wait = self.check(... | Base throttler. Should never be instantiated directly.
Provides basic throttler behavior (such as grouping)
and a protocol for descendants to implement. | 62598ef6167d2b6e312b583f |
class EqMixin(object): <NEW_LINE> <INDENT> def compare_value(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> if not isinstance(other, self.__class__): <NEW_LINE> <INDENT> return NotImplemented <NEW_LINE> <DEDENT> return self.compare_value() == other.... | Compare and hash objects by custom values. | 62598ef69f288636728170a2 |
class TestServer(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 testServer(self): <NEW_LINE> <INDENT> pass | Server unit test stubs | 62598ef63539df3088ecab51 |
class MemberPerm(Enum): <NEW_LINE> <INDENT> Member = "MEMBER" <NEW_LINE> Administrator = "ADMINISTRATOR" <NEW_LINE> Owner = "OWNER" | 描述群成员在群组中所具备的权限 | 62598ef630bbd722464684da |
class OAuth2AuthenticationTests(TestCase): <NEW_LINE> <INDENT> def test_returns_proper_user_on_request_object(self): <NEW_LINE> <INDENT> user = User.objects.create_user('test') <NEW_LINE> req_factory = RequestFactory() <NEW_LINE> app = Application.objects.create(name='test app', user=user) <NEW_LINE> token = AccessToke... | Tests for OAuth2Authentication | 62598ef691f36d47f22302f6 |
class ObjectCkeckedIdMixin: <NEW_LINE> <INDENT> def __init__(self, id=None): <NEW_LINE> <INDENT> if id is None: <NEW_LINE> <INDENT> self._id = self.new_id() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.check_id(id) <NEW_LINE> self._id = id <NEW_LINE> <DEDENT> <DEDENT> @property <NEW_LINE> def id(self): <NEW_LINE>... | Mixin for object with id | 62598ef623849d37ff84f962 |
class bdist_rpm_custom(bdist_rpm): <NEW_LINE> <INDENT> def finalize_package_data (self): <NEW_LINE> <INDENT> if self.release is None: <NEW_LINE> <INDENT> self.release = lsfversion <NEW_LINE> <DEDENT> if self.vendor is None: <NEW_LINE> <INDENT> self.vendor = 'IBM Corporation' <NEW_LINE> <DEDENT> if self.packager is None... | bdist_rpm that sets custom RPM options | 62598ef667a9b606de544874 |
class Bucket(object): <NEW_LINE> <INDENT> def __init__(self, slack, cfg): <NEW_LINE> <INDENT> self.cfg = cfg <NEW_LINE> self.slack = slack <NEW_LINE> self.listening = False <NEW_LINE> self._pre_start_hooks = [] <NEW_LINE> self._post_start_hooks = [] <NEW_LINE> self.user_id = '' <NEW_LINE> self.bot_id = '' <NEW_LINE> se... | Single-threaded blocking version of Bucket which listens with the real-time api. | 62598ef6a17c0f6771d5aafb |
class BaseModel(Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> database = IPdb("%s/core/knowledge.db" % WORLDMAP_PATH, check_same_thread=False) | Basic database model, uses IPdb as the database object. | 62598ef6851cf427c66b6b6b |
class InQueryBasedOrder(OrderStretagy): <NEW_LINE> <INDENT> def __init__(self,queryset): <NEW_LINE> <INDENT> self.queryset = self.limitResultCount(queryset) <NEW_LINE> self.__idList = None <NEW_LINE> <DEDENT> def __getIdList(self): <NEW_LINE> <INDENT> if self.__idList == None: <NEW_LINE> <INDENT> self.__idList = [x[0]... | 采用in查询来做排序 | 62598ef660cbc95b06362bdb |
class LicensePageValidator(MarkdownValidator): <NEW_LINE> <INDENT> def _run_tests(self): <NEW_LINE> <INDENT> expected_hash = '051a04b8ffe580ba6b7018fb4fd72a50' <NEW_LINE> m = hashlib.md5() <NEW_LINE> try: <NEW_LINE> <INDENT> m.update(self.markdown) <NEW_LINE> <DEDENT> except TypeError: <NEW_LINE> <INDENT> m.update(self... | Validate LICENSE.md: user should not edit this file | 62598ef663d6d428bbee1073 |
class Post(models.Model): <NEW_LINE> <INDENT> author = models.ForeignKey('senate.Appointment') <NEW_LINE> title = models.CharField(max_length=80) <NEW_LINE> body = models.TextField() <NEW_LINE> posted = models.DateTimeField(editable=True) <NEW_LINE> slug = models.SlugField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> o... | A blog post (attached to a senator via Appointment) | 62598ef6dc8b845886d51e6a |
class ComponentMask(object): <NEW_LINE> <INDENT> component_mask = 0 <NEW_LINE> def __init__(self,obj,mask=0): <NEW_LINE> <INDENT> object.__setattr__(self,"component_mask",mask); <NEW_LINE> object.__setattr__(self,"_obj",obj); <NEW_LINE> <DEDENT> @property <NEW_LINE> def payload(self): <NEW_LINE> <INDENT> return self._o... | This is a wrapper class for managing IBA structures with a component
mask. Attribute access is overridden and tracked by mapping the attribute
name to the component mask bit index to build up a component mask value as
the class is used. | 62598ef64527f215b58e87a7 |
class SecureCipher(object): <NEW_LINE> <INDENT> def __init__(self, key): <NEW_LINE> <INDENT> self.block_size = 32 <NEW_LINE> self.key = hashlib.sha256(SecureCipher.str_to_bytes(key)).digest() <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def str_to_bytes(data): <NEW_LINE> <INDENT> u_type = type(b''.decode('utf8')) <NEW_... | An AES Cipher class used for encrypting and decrypting an address hash.
Attributes:
key (str): The secret key to use when encrypting/decrypting | 62598ef6a219f33f346c50d5 |
class ShowAuthenticationSessionsMACDetails(ShowAuthenticationSessionsDetailsSuperParser): <NEW_LINE> <INDENT> cli_command = ['show authentication sessions mac {mac_address} details', 'show authentication sessions mac {mac_address} details switch {switch} r0'] <NEW_LINE> def cli(self, mac_address='', s... | Parser for:
* 'show authentication sessions mac {mac_address} details'
* 'show authentication sessions mac {mac_address} details switch {switch} r0' | 62598ef610dbd63aa1c6f421 |
class PublicRecipeApiTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.client = APIClient() <NEW_LINE> <DEDENT> def test_auth_required(self): <NEW_LINE> <INDENT> res = self.client.get(RECIPES_URL) <NEW_LINE> self.assertEqual(res.status_code, status.HTTP_401_UNAUTHORIZED) | Test unauthenticated recipe API | 62598ef699cbb53fe682f755 |
class UserPermissions(BasePermission): <NEW_LINE> <INDENT> def has_permission(self, request, view): <NEW_LINE> <INDENT> if request.method in SAFE_METHODS: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> if request.method == POST: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> if request.method == PATCH: <NEW_L... | User permissions. | 62598ef6460517430c430d2e |
class EclipseTocNode(TocNode): <NEW_LINE> <INDENT> def render(self, pathto): <NEW_LINE> <INDENT> if not self.children: <NEW_LINE> <INDENT> return u'<topic label="%s" href="%s" />' % (self.text, self.link) <NEW_LINE> <DEDENT> out = [u'<%s label="%s" href="%s">' % ( 'topic' if self.parent else 'toc', self.text, self.link... | Sphinx ToC with ability to be rendered in eclpise help ToC | 62598ef6be383301e0252084 |
class TestInlineResponseDefault2PreprocAddress(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 testInlineResponseDefault2PreprocAddress(self): <NEW_LINE> <INDENT> pass | InlineResponseDefault2PreprocAddress unit test stubs | 62598ef6aad79263cf42d0b4 |
class Hand: <NEW_LINE> <INDENT> def __init__(self, deck, isCrib=False): <NEW_LINE> <INDENT> self.isCrib = isCrib <NEW_LINE> if isCrib: <NEW_LINE> <INDENT> self.cards = [] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.cards = deck.getCards(count=6) | Defines a players hand | 62598ef623849d37ff84f964 |
class CmdSkills(Command): <NEW_LINE> <INDENT> key = "skills" <NEW_LINE> aliases = ["sk"] <NEW_LINE> lock = "cmd:all()" <NEW_LINE> help_Category = "General" <NEW_LINE> def func(self): <NEW_LINE> <INDENT> skillnames = [] <NEW_LINE> skilllevels = [] <NEW_LINE> for key in self.caller.db.skills: <NEW_LINE> <INDENT> skillnam... | List Skills
Usage:
skills or sk
Displays list of skills this character has | 62598ef601c39578d7f11649 |
class ACustomParamType(click.ParamType): <NEW_LINE> <INDENT> name = 'my_custom_type' <NEW_LINE> def convert(self, value, param, ctx): <NEW_LINE> <INDENT> if value.lower() == 'spamspam': <NEW_LINE> <INDENT> return value <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.fail(f'{value} is not valid', param, ctx) | Just a stupid custom param type | 62598ef676e4537e8c3ede5e |
class BaseConfig: <NEW_LINE> <INDENT> DATA_FOLDER = env("BASE_DATA_PATH") <NEW_LINE> MOVIE_LENS_FOLDERS = env("MOVIE_LENS") <NEW_LINE> FRIENDS_DATASET = env("FRIENDS") <NEW_LINE> TEMP_1800S = env("TEMP_1800S") <NEW_LINE> WORD_COUNT = env("WORD_COUNT") <NEW_LINE> CONSUMER_SPENDING = env("CONSUMER_SPENDING") <NEW_LINE> H... | Holds environment variables from the .env | 62598ef6851cf427c66b6b6d |
class Collections(enum.Enum): <NEW_LINE> <INDENT> OPERATIONS = ( 'operations', 'operations/{operationsId}', {}, [u'operationsId'], True ) <NEW_LINE> SERVICES = ( 'services', 'services/{serviceName}', {}, [u'serviceName'], True ) <NEW_LINE> SERVICES_CONFIGS = ( 'services.configs', 'services/{serviceName}/configs/{config... | Collections for all supported apis. | 62598ef6097d151d1a2bf8ca |
class Config(object): <NEW_LINE> <INDENT> DEBUG = True <NEW_LINE> SECRET_KEY = os.environ.get('SECRET_KEY') <NEW_LINE> MAIL_SERVER = "mail.privateemail.com" <NEW_LINE> MAIL_PORT = 587 <NEW_LINE> MAIL_USE_TLS = 1 <NEW_LINE> MAIL_USERNAME = os.environ.get('FLASK_MAIL_USERNAME') <NEW_LINE> MAIL_PASSWORD = os.environ.get('... | Default configuration for production and development | 62598ef660cbc95b06362bdd |
class Rate: <NEW_LINE> <INDENT> CYCLE_1_25_HZ = 0 <NEW_LINE> CYCLE_5_HZ = 1 <NEW_LINE> CYCLE_20_HZ = 2 <NEW_LINE> CYCLE_40_HZ = 3 | Allowed values for `cycle_rate`.
- ``Rate.CYCLE_1_25_HZ``
- ``Rate.CYCLE_5_HZ``
- ``Rate.CYCLE_20_HZ``
- ``Rate.CYCLE_40_HZ`` | 62598ef67c178a314d78bd3f |
class SnipMateFileSource(SnippetFileSource): <NEW_LINE> <INDENT> def _get_all_snippet_files_for(self, ft): <NEW_LINE> <INDENT> return snipmate_files_for(ft) <NEW_LINE> <DEDENT> def _parse_snippet_file(self, filedata, filename): <NEW_LINE> <INDENT> if filename.lower().endswith("snippet"): <NEW_LINE> <INDENT> for event, ... | Manages all snipMate snippet definitions found in rtp. | 62598ef626068e7796d4b203 |
class NetworkClient: <NEW_LINE> <INDENT> def __init__(self, credentials): <NEW_LINE> <INDENT> if "profile" in credentials: <NEW_LINE> <INDENT> boto3.setup_default_session(profile_name=credentials["profile"]) <NEW_LINE> <DEDENT> self.network = cloudless.providers.aws.impl.network.NetworkClient(boto3, mock=False) <NEW_LI... | Cloudless Network Client Object for AWS
This is the object through which all network related calls are made for AWS. | 62598ef64a966d76dd5ed782 |
class Tile(sdk_board.TileListener): <NEW_LINE> <INDENT> def __init__(self, grid: graphics.grid.Grid, model: sdk_board.Tile, scan=False): <NEW_LINE> <INDENT> self.grid = grid <NEW_LINE> self.model = model <NEW_LINE> self.row = model.row <NEW_LINE> self.col = model.col <NEW_LINE> self.scan = scan <NEW_LINE> self.grid.sub... | View of a single tile | 62598ef6bf627c535bcafd19 |
class TestPagedResponseRelation(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 testPagedResponseRelation(self): <NEW_LINE> <INDENT> pass | PagedResponseRelation unit test stubs | 62598ef67d847024c075ac76 |
class ApiAddition(BaseHandler, RequestHandler): <NEW_LINE> <INDENT> @admin_required <NEW_LINE> def get(self): <NEW_LINE> <INDENT> self.render( f"{APP_NAME}/api/api_addition.html", result=None, form=ApiForm() ) <NEW_LINE> <DEDENT> @admin_required <NEW_LINE> def post(self): <NEW_LINE> <INDENT> form = HandlersHelper.build... | API addition handler for rendering API addition form and saving new API
record. | 62598ef67047854f4633dc70 |
class Path(): <NEW_LINE> <INDENT> def __init__(self, drive): <NEW_LINE> <INDENT> def dummy(): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> self.drive = drive <NEW_LINE> self.startFunc = dummy <NEW_LINE> self.stopFunc = dummy <NEW_LINE> self.go = True <NEW_LINE> self.lock = False <NEW_LINE> return None <NEW_LINE> <DEDEN... | Path: A class to implement open loop paths using timed thread. This
class is not meant to be sufficient for controlled operation of
the vehicle, so care in selecting path specifications should be
exercised. | 62598ef63d592f4c4edb9796 |
class Plugin(object): <NEW_LINE> <INDENT> name = "http" <NEW_LINE> description = "HTTP integration" <NEW_LINE> author = "MHub" <NEW_LINE> default_config = { "pages": ["http://www.google.co.uk"], "poll_interval": 60 } <NEW_LINE> def on_init(self): <NEW_LINE> <INDENT> self.tasks = [(self.cfg.get("poll_interval", 60), sel... | HTTP Plugin | 62598ef6cc0a2c11144798a9 |
class EmptyParserTester(ParserTester) : <NEW_LINE> <INDENT> def __init__(self, n='runTest') : <NEW_LINE> <INDENT> ParserTester.__init__(self, n, []) <NEW_LINE> <DEDENT> def exec_basic(self, p) : <NEW_LINE> <INDENT> return p.parse_empty() <NEW_LINE> <DEDENT> def test_successes(self) : <NEW_LINE> <INDENT> self.run_test_s... | test the parse_parse_empty method | 62598ef7aad79263cf42d0b7 |
class PaymentManagementPage(SuperPage): <NEW_LINE> <INDENT> def __init__(self, testcase, driver, logger): <NEW_LINE> <INDENT> super(PaymentManagementPage, self).__init__(testcase, driver, logger) <NEW_LINE> <DEDENT> def validSelf(self): <NEW_LINE> <INDENT> API().assertElementByResourceId(self.testcase, self.driver, sel... | 作者 乔佳溪
首页=>我的飞凡=>设置=>支付设置 | 62598ef7a17c0f6771d5aaff |
@attr.s(auto_attribs=True, frozen=True) <NEW_LINE> class CompareConfig: <NEW_LINE> <INDENT> common: CommonConfig <NEW_LINE> num_procs: int = 1 <NEW_LINE> min_cov: int = DEFAULT_MIN_COV <NEW_LINE> @classmethod <NEW_LINE> def from_namespace( cls, ns: typing.Union[argparse.Namespace, types.SimpleNamespace] ) -> _TCompareC... | Configuration for the ``compare`` command. | 62598ef623849d37ff84f966 |
class RandomCrop(object): <NEW_LINE> <INDENT> def __init__(self, output_size): <NEW_LINE> <INDENT> assert isinstance(output_size, (int, tuple)) <NEW_LINE> if isinstance(output_size, int): <NEW_LINE> <INDENT> self.output_size = (output_size, output_size) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> assert len(output_si... | Crop randomly the image in a sample
Args:
output_size (tuple or int): Desired output size.
If int, square crop is made. | 62598ef7d268445f26638fe4 |
class Gaussian(BooleanOption, metaclass=OptionType): <NEW_LINE> <INDENT> option = 'gaussian' <NEW_LINE> requires = [] <NEW_LINE> excludes = ['field', 'greedy', 'domain', 'split', 'extension', 'modulus', 'symmetric'] <NEW_LINE> @classmethod <NEW_LINE> def postprocess(cls, options): <NEW_LINE> <INDENT> if 'gaussian' in o... | ``gaussian`` option to polynomial manipulation functions. | 62598ef77c178a314d78bd41 |
class PathRegistry(TrajectRegistry): <NEW_LINE> <INDENT> factory_arguments = { 'reg_registry': RegRegistry, 'converter_registry': ConverterRegistry } <NEW_LINE> def __init__(self, reg_registry, converter_registry): <NEW_LINE> <INDENT> super(PathRegistry, self).__init__() <NEW_LINE> self.reg_registry = reg_registry <NEW... | A registry for routes.
Subclasses :class:`morepath.traject.TrajectRegistry`.
Used by :meth:`morepath.App.path` and :meth:`morepath.App.mount`
directives to register routes. Also used byt he
:meth:`morepath.App.defer_links` directive.
:param reg_registry: a :class:`reg.Registry` instance.
:param converter_registry: a... | 62598ef7e1aae11d1e7cdc96 |
class InvalidNotAfter(TestCaseImmed): <NEW_LINE> <INDENT> def __init__(self, fqdn, info): <NEW_LINE> <INDENT> metadata = TestMetadata(self.__class__.__name__, "RFC5280 4.1.2.5", SEV_MED, EASE_HIGH, chainable=True) <NEW_LINE> super(self.__class__, self).__init__(fqdn, metadata, info) <NEW_LINE> self.getServCert().securi... | A basic certificate that contains a NotAfter time before now. | 62598ef73617ad0b5ee049d0 |
class MissingBrowserOptionError(Exception): <NEW_LINE> <INDENT> pass | Raised when there's a missing browser option | 62598ef766656f66f7d58c8e |
class OffPolicyRLModel(BaseRLModel): <NEW_LINE> <INDENT> def __init__(self, policy, env, replay_buffer=None, _init_setup_model=False, verbose=0, *, requires_vec_env=False, policy_base=None, policy_kwargs=None, policy_phi=None, policy_phi_kwargs=None): <NEW_LINE> <INDENT> super(OffPolicyRLModel, self).__init__(policy, e... | The base class for off policy RL model
:param policy: (BasePolicy) Policy object
:param env: (Gym environment) The environment to learn from
(if registered in Gym, can be str. Can be None for loading trained models)
:param replay_buffer: (ReplayBuffer) the type of replay buffer
:param verbose: (int) the ve... | 62598ef7236d856c2adc886d |
class AfterTurnEffect(object): <NEW_LINE> <INDENT> message = "" <NEW_LINE> def attemptAfterTurn(self, pkmn): <NEW_LINE> <INDENT> if self.faintHandler.cantHandle(user = pkmn, effect = self): <NEW_LINE> <INDENT> return [] <NEW_LINE> <DEDENT> return self.afterTurn(pkmn) <NEW_LINE> <DEDENT> def afterTurn(self, pkmn): <NEW_... | Represents any Effect with the capability to occur after a turn | 62598ef72ae34c7f260a998c |
class PrimitiveTypePrinter(TypePrinter): <NEW_LINE> <INDENT> def to_string(self): <NEW_LINE> <INDENT> return f"{self._format_type()}()" | Pretty-printer for non-parametric types. | 62598ef77047854f4633dc72 |
class DescribeBackupSynchronicitiesRequest(JDCloudRequest): <NEW_LINE> <INDENT> def __init__(self, parameters, header=None, version="v1"): <NEW_LINE> <INDENT> super(DescribeBackupSynchronicitiesRequest, self).__init__( '/regions/{regionId}/backupSynchronicities', 'GET', header, version) <NEW_LINE> self.parameters = par... | 查询跨区域备份同步服务 | 62598ef73d592f4c4edb9798 |
class OperationImpact(Model): <NEW_LINE> <INDENT> _validation = { 'name': {'readonly': True}, 'unit': {'readonly': True}, 'change_value_absolute': {'readonly': True}, 'change_value_relative': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'unit': {'key': 'unit', 'type': 'str... | The impact of an operation, both in absolute and relative terms.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar name: The name of the impact dimension.
:vartype name: str
:ivar unit: The unit in which estimated impact to dimension is measured.
:vartype unit: str
:ivar ch... | 62598ef756ac1b37e6300a95 |
class TableHandlerInterface(object): <NEW_LINE> <INDENT> def __init__(self, cursor, model, module_name=None, history=False): <NEW_LINE> <INDENT> super(TableHandlerInterface, self).__init__() <NEW_LINE> self.cursor = cursor <NEW_LINE> if history: <NEW_LINE> <INDENT> self.table_name = model._table + '__history' <NEW_LINE... | Define generic interface to handle database table | 62598ef72c8b7c6e89bd2070 |
class LenClass(): <NEW_LINE> <INDENT> def __len__(self): <NEW_LINE> <INDENT> return 0 | Custom class with __len__. | 62598ef78a43f66fc4bf0a1f |
class Vector3dField(Field): <NEW_LINE> <INDENT> def ValueAsObject(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> Value=property(lambda self: object(),lambda self,v: None,lambda self: None) | Vector3d field value class | 62598ef73539df3088ecab57 |
class ListPropertiesResponse(SdkResponse): <NEW_LINE> <INDENT> sensitive_list = [] <NEW_LINE> openapi_types = { 'response': 'object' } <NEW_LINE> attribute_map = { 'response': 'response' } <NEW_LINE> def __init__(self, response=None): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._response = None <NEW_LINE> se... | Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition. | 62598ef7cc40096d6161962d |
class COFF(AbstractOperation): <NEW_LINE> <INDENT> P = () <NEW_LINE> def convert(self): <NEW_LINE> <INDENT> return [FOFF(Token.Int(8))] | COFF()
Turn the carry flag off. See also CON. | 62598ef7be7bc26dc92512b8 |
class BasicModel(object): <NEW_LINE> <INDENT> def __init__(self,filename,sheet): <NEW_LINE> <INDENT> self.filename = filename <NEW_LINE> self.sheet = sheet <NEW_LINE> <DEDENT> def insert(self): <NEW_LINE> <INDENT> table = getData(self.filename,self.sheet) <NEW_LINE> nrows = table.nrows <NEW_LINE> for i in range(3,nrows... | 基础数据入库模块 | 62598ef75166f23b2e241c86 |
class Operations: <NEW_LINE> <INDENT> models = _models <NEW_LINE> def __init__(self, client, config, serializer, deserializer) -> None: <NEW_LINE> <INDENT> self._client = client <NEW_LINE> self._serialize = serializer <NEW_LINE> self._deserialize = deserializer <NEW_LINE> self._config = config <NEW_LINE> <DEDENT> @dist... | Operations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
:type models: ~azure.mgmt.compute.v2021_03_01.models
:param client:... | 62598ef766673b3332c2ec58 |
class ValueContainsFilterSpecification(CriterionFilterSpecification): <NEW_LINE> <INDENT> operator = CONTAINS | Concrete value contains specification. | 62598ef791f36d47f22302f9 |
class EmployeeViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> serializer_class = serializers.EmployeeSerializer <NEW_LINE> queryset = Employee.objects.all() <NEW_LINE> authentication_classes = (TokenAuthentication,) <NEW_LINE> permission_classes = (permissions.Permission,IsAuthenticated,) <NEW_LINE> filter_backends... | edit delete patch put get methods are allow to users based on the level | 62598ef7a8370b77170eec8f |
class SOURce(SCPINode, SCPIQuery, SCPISet): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> _cmd = "SOURce" <NEW_LINE> args = ["AUTO", "EGATed", "EXT_gated", "EXTern", "EXTernal", "SINGle"] | TRIGger:PULSe:SOURce
Arguments: AUTO, EGATed, EXT_gated, EXTern, EXTernal, SINGle | 62598ef77d43ff2487426850 |
class redirectList (pyxb.binding.basis.complexTypeDefinition): <NEW_LINE> <INDENT> _TypeDefinition = None <NEW_LINE> _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY <NEW_LINE> _Abstract = False <NEW_LINE> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'redirectList') <NEW_LINE> _XSDL... | Complex type {urn:vpro:api:2013}redirectList with content type ELEMENT_ONLY | 62598ef757b8e32f52507559 |
class RequestStatistics(Model): <NEW_LINE> <INDENT> _attribute_map = { 'documents_count': {'key': 'documentsCount', 'type': 'int'}, 'valid_documents_count': {'key': 'validDocumentsCount', 'type': 'int'}, 'erroneous_documents_count': {'key': 'erroneousDocumentsCount', 'type': 'int'}, 'transactions_count': {'key': 'trans... | RequestStatistics.
:param documents_count: Number of documents submitted in the request.
:type documents_count: int
:param valid_documents_count: Number of valid documents. This excludes
empty, over-size limit or non-supported languages documents.
:type valid_documents_count: int
:param erroneous_documents_count: Num... | 62598ef73317a56b869bd9ba |
class NoVarySessionMiddleware(SessionMiddleware): <NEW_LINE> <INDENT> def process_response(self, request, response): <NEW_LINE> <INDENT> if settings.READ_ONLY: <NEW_LINE> <INDENT> return response <NEW_LINE> <DEDENT> vary = None <NEW_LINE> if hasattr(response, 'get'): <NEW_LINE> <INDENT> vary = response.get('Vary', None... | SessionMiddleware sets Vary: Cookie anytime request.session is accessed.
request.session is accessed indirectly anytime request.user is touched.
We always touch request.user to see if the user is authenticated, so every
request would be sending vary, so we'd get no caching.
We skip the cache in Zeus if someone has an ... | 62598ef74a966d76dd5ed786 |
class SuiteVisibility(Enum): <NEW_LINE> <INDENT> never = 0 <NEW_LINE> always = 1 <NEW_LINE> parent = 2 <NEW_LINE> parent_priority = 3 | Defines what suites on $PATH stay visible when a new rez environment is
resolved. | 62598ef7d268445f26638fe5 |
class MentionTextarea(forms.Textarea): <NEW_LINE> <INDENT> class Media: <NEW_LINE> <INDENT> css = { 'all': ('css/jquery.mentions.css',) } <NEW_LINE> js = ('js/jquery.mentions.js',) <NEW_LINE> <DEDENT> def render(self, name, value, attrs=None): <NEW_LINE> <INDENT> extra_attrs = { 'id': uuid.uuid4().hex, 'data-source': r... | Required: jQuery | 62598ef7d486a94d0ba2a874 |
class UserDB(db.Document): <NEW_LINE> <INDENT> username = db.StringField(db_field='u', required=True, unique=True) <NEW_LINE> password = db.StringField(db_field='p', required=True, unique=True) <NEW_LINE> email = db.EmailField(db_field='e', required=True, unique=True) <NEW_LINE> email_confirmed = db.BooleanField(db_fie... | Allows the user to save their details to the database | 62598ef7ec188e330fdf7154 |
class PileupReweight(EventFilter): <NEW_LINE> <INDENT> def __init__(self, year, tool, tool_high, tool_low, tree, passthrough=False, **kwargs): <NEW_LINE> <INDENT> if not passthrough: <NEW_LINE> <INDENT> self.tree = tree <NEW_LINE> self.tool = tool <NEW_LINE> self.tool_high = tool_high <NEW_LINE> self.tool_low = tool_lo... | Currently only implements hadhad reweighting | 62598ef72ae34c7f260a998e |
class Task(object): <NEW_LINE> <INDENT> def __init__(self,type=None): <NEW_LINE> <INDENT> self.connector=None <NEW_LINE> self.type=type <NEW_LINE> self.startTime=time.time() <NEW_LINE> self.totalTime=0 <NEW_LINE> self.progressFraction=0 <NEW_LINE> self.progress=0 <NEW_LINE> self.status="NP" <NEW_LINE> self.id=-1 <NEW_L... | Base class for tasks (3dprinting , sensor data capture etc) | 62598ef72c8b7c6e89bd2072 |
class BinaryClassDataLoader(object): <NEW_LINE> <INDENT> def __init__(self, flags, data_processor, clean_data=None, classes=None): <NEW_LINE> <INDENT> self.__flags = flags <NEW_LINE> self.__data_processor = data_processor <NEW_LINE> self.__clean_data = clean_data <NEW_LINE> self.__classes = classes <NEW_LINE> <DEDENT> ... | Load binary classification data from two files (positive and negative) and
split data into train and dev. | 62598ef797e22403b383979c |
class TestMain(BaseTaskTestCase): <NEW_LINE> <INDENT> def test_tag_pending_signing_builds(self): <NEW_LINE> <INDENT> update = self.db.query(models.Update).first() <NEW_LINE> pending_signing_tag = update.release.pending_signing_tag <NEW_LINE> tag_update_builds_main(pending_signing_tag, update.builds) <NEW_LINE> koji = b... | This class contains tests for the main() function. | 62598ef799cbb53fe682f75b |
class DevCard(SplendorCard): <NEW_LINE> <INDENT> def __init__(self, prestige, cost, bonus): <NEW_LINE> <INDENT> super().__init__(prestige, cost, bonus) <NEW_LINE> <DEDENT> def canBuy(self, mony, bonus, gold): <NEW_LINE> <INDENT> return (mony+bonus)-self.cost <= gold | This class is a SplendorCard subclass for development cards. | 62598ef7be383301e025208a |
class WORD(DataTypeBaseClass): <NEW_LINE> <INDENT> def __init__(self, value = 0, endianness = "<", signed = False, shouldPack = True): <NEW_LINE> <INDENT> DataTypeBaseClass.__init__(self, value, endianness, signed, shouldPack) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return pack(self.endianness + ... | Word object. | 62598ef75fc7496912d476c9 |
class CredentialCreateOrUpdateParameters(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'name': {'required': True}, 'user_name': {'required': True}, 'password': {'required': True}, } <NEW_LINE> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'user_name': {'key': 'properties.userName', 'type... | The parameters supplied to the create or update credential operation.
All required parameters must be populated in order to send to Azure.
:param name: Required. Gets or sets the name of the credential.
:type name: str
:param user_name: Required. Gets or sets the user name of the credential.
:type user_name: str
:par... | 62598ef730bbd722464684e2 |
class Blackboard: <NEW_LINE> <INDENT> SOLDIERS = "soldiers" <NEW_LINE> ARMIES = "armies" <NEW_LINE> TARGET = "target" <NEW_LINE> WAYPOINT = "waypoint" <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self._bb = { Blackboard.SOLDIERS: {}, Blackboard.ARMIES: {}, Blackboard.TARGET: {}, Blackboard.WAYPOINT: {}, } <NEW_LI... | Holds references to game objects needed by Behaviors | 62598ef78a349b6b43684aee |
class EmptyRequestDropper: <NEW_LINE> <INDENT> def process_request(self, req, resp): <NEW_LINE> <INDENT> log.debug("EmptyRequestDropper.process_request(%s, %s)", req, resp) <NEW_LINE> if req.content_length in (None, 0): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> content = get_stashed_content(req) <NEW_LINE> if not ... | Check and drop empty requests | 62598ef7a8370b77170eec90 |
class Error(Model): <NEW_LINE> <INDENT> _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, 'details': {'key': 'details', 'type': '[ErrorDetails]'}, 'inner_error': {'key': 'innerError', 'type': 'str'}, } <NEW_LINE> def __in... | Error.
:param code:
:type code: str
:param message:
:type message: str
:param target:
:type target: str
:param details:
:type details: list[~azure.mgmt.network.v2017_10_01.models.ErrorDetails]
:param inner_error:
:type inner_error: str | 62598ef7956e5f7376df4acf |
class HPSWorker(Worker, Key): <NEW_LINE> <INDENT> def __init__(self, **kwargs: dict): <NEW_LINE> <INDENT> Worker.__init__(self, kwargs['config'], kwargs['channel_id']) <NEW_LINE> <DEDENT> def reset_attributes(self): <NEW_LINE> <INDENT> self.sampling_rate = self.config.get_config('sampling_rate') <NEW_LINE> <DEDENT> def... | Worker responsible for analysing pitch using the harmonic-product-spectrum method.
Kwargs:
- config (Config): Configuration options to use.
- channel_id: id of channel being analysed.
Attributes:
- sampling_rate: sampling_rate of source being analysed. | 62598ef7a219f33f346c50dc |
class Parser: <NEW_LINE> <INDENT> baseUrl = None <NEW_LINE> endUrl = None <NEW_LINE> startNum = None <NEW_LINE> endNum = None <NEW_LINE> pDW = 5 <NEW_LINE> digit = 2 <NEW_LINE> outDir = "./listDownload/" <NEW_LINE> quite = None <NEW_LINE> urlParam = [] <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> return <NEW_LINE... | The Parser class contain data and function to read the parameter and create the url
The 2 son class are used for the specific purpose | 62598ef732920d7e50bc48db |
class BookEditor(models.Model): <NEW_LINE> <INDENT> _name = "book.editor" <NEW_LINE> image = fields.Binary("Image") <NEW_LINE> name = fields.Char('Name', required=True, index=True) <NEW_LINE> biography = fields.Text('Biography') <NEW_LINE> note = fields.Text('Notes') <NEW_LINE> phone = fields.Char('Phone') <NEW_LINE> m... | Book Editor Information | 62598ef77d43ff2487426851 |
class Rnn(DecoderNetwork): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_module_id(): <NEW_LINE> <INDENT> return 'rnn' <NEW_LINE> <DEDENT> def __init__(self, args): <NEW_LINE> <INDENT> super().__init__(args) <NEW_LINE> self.rnn_cell = None <NEW_LINE> self.project_key = None <NEW_LINE> <DEDENT> def build(self): <... | Predict a keyboard configuration at step t
Use a RNN to predict the next configuration | 62598ef73317a56b869bd9bb |
class CourseModeAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> form = CourseModeForm <NEW_LINE> fields = ( 'course_id', 'mode_slug', 'mode_display_name', 'min_price', 'currency', '_expiration_datetime', 'verification_deadline', 'sku' ) <NEW_LINE> search_fields = ('course_id',) <NEW_LINE> list_display = ( 'id', 'course_id... | Admin for course modes | 62598ef79c8ee8231303f5b2 |
class Solution(object): <NEW_LINE> <INDENT> r <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.__dict__['objective'] = None <NEW_LINE> self.__dict__['NumIteration'] = 0 <NEW_LINE> self.__dict__['NumFuncEval'] = 0 <NEW_LINE> self.__dict__['x'] = None <NEW_LINE> self.__dict__['success'] = False <NEW_LINE> self.__d... | A class to keep outcome and details of the optimization run. | 62598ef7d486a94d0ba2a876 |
class UninitializedInstanceAttributeMixin(DataDocumenterMixinBase): <NEW_LINE> <INDENT> def is_uninitialized_instance_attribute(self, parent: Any) -> bool: <NEW_LINE> <INDENT> annotations = get_type_hints(parent, None, self.config.autodoc_type_aliases) <NEW_LINE> if self.objpath[-1] in annotations: <NEW_LINE> <INDENT> ... | Mixin for AttributeDocumenter to provide the feature for supporting uninitialized
instance attributes (PEP-526 styled, annotation only attributes).
Example:
class Foo:
attr: int #: This is a target of this mix-in. | 62598ef74a966d76dd5ed788 |
class HookFinder(object): <NEW_LINE> <INDENT> def __init__(self, *hook_paths): <NEW_LINE> <INDENT> self.hook_paths = hook_paths <NEW_LINE> <DEDENT> def _find_pyfile(self, hook_name): <NEW_LINE> <INDENT> for path in self.hook_paths: <NEW_LINE> <INDENT> hook_path = paths.normalize(path, hook_name + '.py') <NEW_LINE> if o... | Find python hooks by name in the provided path.
usage::
>>> hook_finder = HookFinder('~/.cpenv/hooks')
>>> hook = hook_finder('precreate')
>>> hook.run(env=VirtualEnvironment('path/to/env')) | 62598ef763d6d428bbee107b |
class MakeCases(Component): <NEW_LINE> <INDENT> vartrees = VarTree(HAWC2VarTrees(), iotype='in') <NEW_LINE> wsp = Array(iotype='in', desc='array of wind speeds for which to compute the power curve') <NEW_LINE> ti = Float(iotype='in', desc='turbulence intensity') <NEW_LINE> cases = List(iotype='out') <NEW_LINE> case_id... | build case vartrees
inputs
-------
wsp: array-like
array of wind speeds for which to compute loads under normal operational conditions
user_cases: list of dict
list of off design cases e.g. stand still extreme wind conditions. the syntax is:
{"wsp": 70, "pitch": 0., "rpm": 0.001}
outputs
--------
cases: ... | 62598ef7627d3e7fe0e0573b |
class Config(Constants): <NEW_LINE> <INDENT> DATEFORMAT = u'%d/%m/%Y' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> Constants.__init__(self) <NEW_LINE> <DEDENT> from Common.models import Organization, Version <NEW_LINE> try: <NEW_LINE> <INDENT> DB_VERS = Version.get(id=1) <NEW_LINE> <DEDENT> except: <NEW_LINE> <IN... | docstring for Config
| 62598ef799fddb7c1ca6225a |
class NgramModelWithInterpolation(NgramModel): <NEW_LINE> <INDENT> def __init__(self, n, k): <NEW_LINE> <INDENT> NgramModel.__init__(self, n, k) <NEW_LINE> self.lambdas = [1 / (n + 1)] * (n + 1) <NEW_LINE> <DEDENT> def get_vocab(self): <NEW_LINE> <INDENT> return self.vocab <NEW_LINE> <DEDENT> def update(self, text): <N... | An n-gram model with interpolation | 62598ef7fff4ab517ebcc085 |
class ProfileUpdateForm(forms.ModelForm): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> user = kwargs.pop('user') <NEW_LINE> self.helper.layout = Layout( Field( 'language' ), Div( FormActions( Submit('submit', _('Save changes'), css_class=''), Reset('reset', _('Cancel'), css_class='') ), ... | Form for registering a new account. | 62598ef71f5feb6acb161501 |
class LoginView(NeverCacheMixin, LogoutUserMixin, FormView): <NEW_LINE> <INDENT> template_name = 'mama_cas/login.html' <NEW_LINE> form_class = LoginForm <NEW_LINE> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> service = request.GET.get('service') <NEW_LINE> renew = bool(request.GET.get('renew')) <NEW_LIN... | (2.1 and 2.2) Credential requestor and acceptor.
This view operates as a credential requestor when a GET request
is received, and a credential acceptor for POST requests. | 62598ef756ac1b37e6300a99 |
class ComposableSchema: <NEW_LINE> <INDENT> def transform_operation(self, operation, resolver): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def composeWith(self, schema): <NEW_LINE> <INDENT> op = self.transform_operation <NEW_LINE> class _Wrapper(ComposableSchema): <NEW_LINE> <INDENT> def transform_operation(self, ope... | A composable schema defines a transformation on drf_yasg Operation. These
schema can then be composed with another composable schema using the composeWith method
yielding a new composable schema whose transformation is defined as the function composition
of the transformation of the two source schema. | 62598ef756ac1b37e6300a9a |
@tf_export('train.experimental.FixedLossScale') <NEW_LINE> class FixedLossScale(LossScale): <NEW_LINE> <INDENT> def __init__(self, loss_scale_value): <NEW_LINE> <INDENT> super(FixedLossScale, self).__init__() <NEW_LINE> if not isinstance(loss_scale_value, six.integer_types + (float,)): <NEW_LINE> <INDENT> raise ValueEr... | Loss scale with a fixed value.
The loss scale is not updated for the lifetime of instances of this class.
A given instance of this class always returns the same number when called. | 62598ef744b2445a339b5dc4 |
class Test(): <NEW_LINE> <INDENT> def Prediction(self,model_address,data): <NEW_LINE> <INDENT> XGB_model = joblib.load(model_address+'/model/XGB.pkl') <NEW_LINE> if XGB_model.predict(data) == 1: <NEW_LINE> <INDENT> return "is UBP" <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> return "is non-UBP" | ########################################################################
get the result of prediction
Usage:
Input:820-dimensional feature of a protein
result= Prediction(self,model_address,data)
Output:
######################################################################## | 62598ef767a9b606de54487e |
class AutoGenerateCode(Entity): <NEW_LINE> <INDENT> TYPE_INFO = 'AUTO_GENERATE_CODE' <NEW_LINE> def __init__(self, profile): <NEW_LINE> <INDENT> Entity.__init__(self, 'auto_generate_code', profile, is_global=False, is_proxy=False, supports_documents=False) <NEW_LINE> self.user_editable = False <NEW_LINE> self.auto_gene... | Hierarchy of administrative spatial units. | 62598ef75fc7496912d476ca |
class Type(models.Model): <NEW_LINE> <INDENT> name = models.CharField(u"名称", max_length=32) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.name <NEW_LINE> <DEDENT> def shops(self): <NEW_LINE> <INDENT> return self.shop_set.all() <NEW_LINE> <DEDENT> def list_json(self): <NEW_LINE> <INDENT> return { "name":... | 类型 | 62598ef7cc40096d6161962f |
class Donorlist: <NEW_LINE> <INDENT> def __init__(self, init_list=None): <NEW_LINE> <INDENT> self._donor_objects = {} <NEW_LINE> self._short_template = "Dear {}, thank you for your generous donation of ${:.2f}\n" <NEW_LINE> self._long_template = ('Dear {},\n' '\n' ' Thank you for your kind donations totaling ${:... | Instance of a list of donors, implemented as a dictionary. Implements
methods used in mailroom5. | 62598ef760cbc95b06362be4 |
class TestSplit(unittest.TestCase): <NEW_LINE> <INDENT> def test_everything(self): <NEW_LINE> <INDENT> tests=[ (['hello', 'world'], []), ([], []), (['[title]', 'text'], [('title',['text'])]), (['[title]', 'text', 'more'], [('title',['text', 'more'])]), (['text', '[title]'], [('title',[])]), (['[title]', '[title]'], [('... | Tests for split.py. | 62598ef73539df3088ecab5c |
class AzureFirewallIPConfiguration(SubResource): <NEW_LINE> <INDENT> _validation = { 'etag': {'readonly': True}, 'private_ip_address': {'readonly': True}, 'provisioning_state': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'etag': {'key':... | IP configuration of an Azure Firewall.
Variables are only populated by the server, and will be ignored when sending a request.
:param id: Resource ID.
:type id: str
:param name: Name of the resource that is unique within a resource group. This name can be used
to access the resource.
:type name: str
:ivar etag: A un... | 62598ef7498bea3a75a563e2 |
class CouplingLayer1d(CouplingLayerNd): <NEW_LINE> <INDENT> def _get_spatial_ndims(self) -> int: <NEW_LINE> <INDENT> return 1 | 1D convolutional coupling layer flow. | 62598ef7956e5f7376df4ad0 |
class IsotropicHmcSampler(AbstractHmcSampler): <NEW_LINE> <INDENT> def kinetic_energy(self, pos, mom, mass, cache={}): <NEW_LINE> <INDENT> mom = mom.cuda() <NEW_LINE> if mass.shape[0]==1: <NEW_LINE> <INDENT> return (0.5 * mom*mom)/mass <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> mass_inv = torch.inverse(mass).cuda() ... | Standard unconstrained HMC sampler with identity mass matrix. | 62598ef74527f215b58e87b0 |
class TwistedIOLoop(tornado.ioloop.IOLoop): <NEW_LINE> <INDENT> def initialize(self): <NEW_LINE> <INDENT> from twisted.internet import reactor <NEW_LINE> self.reactor = reactor <NEW_LINE> self.fds = {} <NEW_LINE> <DEDENT> def close(self, all_fds=False): <NEW_LINE> <INDENT> self.reactor.removeAll() <NEW_LINE> for c in s... | IOLoop implementation that runs on Twisted.
Uses the global Twisted reactor. It is possible to create multiple
TwistedIOLoops in the same process, but it doesn't really make sense
because they will all run in the same thread.
Not compatible with `tornado.process.Subprocess.set_exit_callback`
because the ``SIGCHLD`` ... | 62598ef73317a56b869bd9bc |
class FaceBrow(rigFaceAvarGrps.AvarGrpOnSurface): <NEW_LINE> <INDENT> _CLS_CTRL = CtrlBrow <NEW_LINE> SHOW_IN_UI = True <NEW_LINE> IS_SIDE_SPECIFIC = False <NEW_LINE> CREATE_MACRO_AVAR_HORIZONTAL = True <NEW_LINE> CREATE_MACRO_AVAR_VERTICAL = False <NEW_LINE> CREATE_MACRO_AVAR_ALL = False <NEW_LINE> def _create_avar_ma... | AvarGrp customized for Brow rigging. | 62598ef7e5267d203ee6a1b3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.