code stringlengths 3 6.57k |
|---|
gif (Deprecated) |
png (Deprecated) |
find_packages() |
admin.site.register(Profile) |
Classes (base and inherited) |
Copyright (c) |
Perez (RP) |
Creation (RP, 2008) |
Geometry(object) |
ListAttributes(self) |
ListAttributes(self) |
__str__(self) |
return ('name \n'+' '+str(self.name) |
center(9) |
ListAttributes(self) |
print('\n') |
print('Attributes List of: ' + repr(self.__dict__['name']) |
self.__dict__.keys() |
self_keys.sort() |
print(str(key) |
repr(self.__dict__[key]) |
print('\n') |
print('Testing ...') |
Geometry(name = 'test') |
geo.ListAttributes() |
print(geo) |
device(Host, numpy_module_arg='xp') |
create_array_init_5_at_host(shape, dtype, order, xp) |
xp.full(shape, 5, dtype=dtype, order=order) |
device(CUDAGPU, numpy_module_arg='xp') |
create_array_init_5_at_gpu(shape, dtype, order, xp) |
xp.full(shape, 5, dtype=dtype, order=order) |
device(VE, numpy_module_arg='xp') |
create_array_init_5_at_ve(shape, dtype, order, xp) |
xp.full(shape, 5, dtype=dtype, order=order) |
pytest.mark.parametrize('shape', [(2) |
pytest.mark.parametrize('order', ['C', 'F']) |
test_device_args_host(self, shape, dtype, order) |
create_array_init_5_at_host(shape, dtype, order) |
assert(isinstance(y, np.ndarray) |
np.full(shape, 5, dtype=dtype, order=order) |
assert((y == expected) |
all() |
test_device_args_gpu(self, shape, dtype, order) |
create_array_init_5_at_gpu(shape, dtype, order) |
assert(isinstance(y, cp.ndarray) |
cp.full(shape, 5, dtype=dtype, order=order) |
assert((y == expected) |
all() |
test_device_args_ve(self, shape, dtype, order) |
create_array_init_5_at_ve(shape, dtype, order) |
assert(isinstance(y, vp.ndarray) |
vp.full(shape, 5, dtype=dtype, order=order) |
assert((y == expected) |
all() |
BindSession(SessionBase) |
__init__(self, db, autocommit=False, autoflush=True, **options) |
db.get_app() |
options.pop("bind", None) |
options.pop("binds", db.get_binds(self.app) |
get_bind(self, mapper=None, **kwargs) |
getattr(persist_selectable, "info", {}) |
info.get("bind_key") |
self.db.get_engine(self.app, bind=bind_key) |
super() |
get_bind(mapper, **kwargs) |
__init__(self, sa, app, bind=None) |
Lock() |
get_uri(self) |
self._app.config.get("SQLALCHEMY_BINDS") |
or () |
RuntimeError(f"Bind {self._bind!r} is not configure in 'SQLALCHEMY_BINDS'.") |
get_engine(self) |
self.get_uri() |
self.get_options(make_url(uri) |
self._sa.create_engine(sa_url, options) |
dispose(self) |
self._engine.dispose() |
get_options(self, sa_url) |
options.update(self._app.config["SQLALCHEMY_ENGINE_OPTIONS"]) |
options.update(self._sa._engine_options) |
__init__(self, sa) |
__get__(self, obj, cls) |
orm.class_mapper(cls) |
cls.query_class(mapper, session=self.sa.session() |
_include_sqlalchemy(obj, _) |
hasattr(obj, key) |
setattr(obj, key, getattr(module, key) |
self.create_scoped_session(session_options) |
self.make_declarative_base(model_class, metadata) |
Lock() |
_include_sqlalchemy(self, query_class) |
self.init_app(app) |
engine(self) |
self.get_engine() |
get_engine(self, app: t.Optional["Mask"] = None, bind: str = None) |
self.get_app(app) |
self.connectors.get(bind) |
_EngineConnector(self, self.get_app(app) |
connector.get_engine() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.