repo_name string | dataset string | owner string | lang string | func_name string | code string | docstring string | url string | sha string |
|---|---|---|---|---|---|---|---|---|
nodite-light | github_2023 | nodite | typescript | RoleService.selectMenuPerms | public async selectMenuPerms(roleId: number): Promise<Pick<IMenu, 'menuId' | 'perms'>[]> {
if (await RoleMenuModel.hasFullPerms(roleId)) {
return [{ menuId: '*', perms: '*:*:*' }];
}
const role = await RoleModel.findOne({
attributes: [],
where: { roleId },
include: [
{
... | /**
* Select menu list.
* @param roleId
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/role/role.service.ts#L110-L128 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | RoleService.updateMenuPerms | public async updateMenuPerms(roleId: number, menuIds: string[]): Promise<void> {
if (roleId === 1) {
throw new AppError(httpStatus.UNPROCESSABLE_ENTITY, 'Role is not allow update!');
}
// start transaction.
const transaction = await RoleMenuModel.sequelize.transaction();
// role menu associa... | /**
* Save menu perms.
* @param roleId
* @param menuIds
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/role/role.service.ts#L135-L174 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | RoleService.selectUsersOfRole | public async selectUsersOfRole(roleId: number): Promise<IUserWithRoles[]> {
const userAttrs = ['userId', 'username', 'nickname', 'email', 'status', 'createTime'];
const roleAttrs = ['roleId'];
const users = await UserModel.findAll({
attributes: userAttrs,
include: [
{
model: R... | /**
* Select role's users.
* @param roleId
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/role/role.service.ts#L181-L198 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | RoleService.assignRoleToUsers | public async assignRoleToUsers(
roleId: number,
userIds: number[],
transaction?: Transaction,
): Promise<void> {
if (lodash.isEmpty(userIds)) return;
// start transaction.
const tac = transaction || (await RoleUserModel.sequelize.transaction());
// role user associate.
await RoleUser... | /**
* Assign role to users.
* @param roleId
* @param userIds
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/role/role.service.ts#L205-L228 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | RoleService.unassignRoleOfUsers | public async unassignRoleOfUsers(
roleId: number,
userIds: number[],
transaction?: Transaction,
): Promise<void> {
if (lodash.isEmpty(userIds)) return;
// start transaction.
const tac = transaction || (await RoleUserModel.sequelize.transaction());
// role user associate.
await RoleUs... | /**
* Unassign role of users.
* @param roleId
* @param userIds
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/role/role.service.ts#L235-L255 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | RoleMenuModel.hasFullPerms | public static async hasFullPerms(roleId: number): Promise<boolean> {
const count = await this.count({ where: { roleId, menuId: '*' } });
return count > 0;
} | /**
* Check if the role has full permissions.
* @param roleId
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/role/role_menu.model.ts#L31-L34 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | UserModel.bcryptPassword | bcryptPassword(): void {
if (this.skipBcryptPassword) return;
const salt = bcrypt.genSaltSync(10, 'a');
const pass = this.getDataValue('password');
if (!pass) return;
this.setDataValue('password', bcrypt.hashSync(this.getDataValue('password'), salt));
} | /**
* bcryptPassword.
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/user/user.model.ts#L101-L107 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | UserModel.validPassword | static validPassword(rawPassword: string, encodedPassword: string): boolean {
if (!bcrypt.compareSync(rawPassword, encodedPassword)) {
throw new AppError(httpStatus.UNAUTHORIZED, 'Invalid password');
}
return true;
} | /**
* validPassword.
* @param rawPassword
* @param encodedPassword
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/user/user.model.ts#L115-L120 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | UserService.selectUserList | public async selectUserList(params?: QueryParams): Promise<SequelizePagination<IUser>> {
const page = await UserModel.paginate({
attributes: ['userId', 'username', 'nickname', 'email', 'status', 'createTime'],
where: UserModel.buildQueryWhere(params),
...lodash.pick(params, ['itemsPerPage', 'page'... | /**
* Search users.
* @param user
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/user/user.service.ts#L37-L48 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | UserService.selectUserById | public async selectUserById(id?: number): Promise<IUser> {
const user = await UserModel.findOne({ where: { userId: id } });
if (!user) {
throw new AppError(httpStatus.UNPROCESSABLE_ENTITY, 'User not found');
}
return user.toJSON();
} | /**
* Select user by id
* @param id
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/user/user.service.ts#L55-L61 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | UserService.selectProfile | public async selectProfile(id: number): Promise<IProfile> {
const user = await UserModel.findOne({
where: { userId: id },
include: [{ model: RoleModel, required: false }],
});
if (!user) {
throw new AppError(httpStatus.UNPROCESSABLE_ENTITY, 'User not found');
}
const userJson = u... | /**
* Select user profile.
* @param id
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/user/user.service.ts#L68-L89 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | UserService.getByUsername | public async getByUsername(username: string): Promise<IUser> {
const user = await UserModel.findOne({ where: { username } });
if (!user) {
throw new AppError(httpStatus.UNPROCESSABLE_ENTITY, 'User not found');
}
return user.toJSON();
} | /**
* Get by Username.
* @param username
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/user/user.service.ts#L96-L102 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | UserService.getByEmail | public async getByEmail(email: string): Promise<IUser> {
const user = await UserModel.findOne({ where: { email } });
if (!user) {
throw new AppError(httpStatus.UNPROCESSABLE_ENTITY, 'User not found');
}
return user.toJSON();
} | /**
* Get by Email.
* @param email
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/user/user.service.ts#L109-L115 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | UserService.create | public async create(user: IUserCreate): Promise<IUser> {
return UserModel.create(user);
} | /**
* Create.
* @param user
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/user/user.service.ts#L122-L124 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | UserService.update | public async update(id: number, body: IUserUpdate): Promise<IUser> {
const preUser = await UserModel.findOne({ where: { userId: id } });
if (!preUser) {
throw new AppError(httpStatus.UNPROCESSABLE_ENTITY, 'User not found');
}
preUser.skipBcryptPassword = true;
// update user.
const user... | /**
* Update.
* @param id
* @param body
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/user/user.service.ts#L132-L145 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | UserService.resetPassword | public async resetPassword(id: number, data: IPasswordReset): Promise<IUser> {
if (data.password === '') {
throw new AppError(
httpStatus.BAD_REQUEST,
'Password cannot be empty string, please set null or remove it if you want to keep the old password',
);
}
const user = await Us... | /**
* Reset password.
* @param id
* @param data
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/user/user.service.ts#L153-L174 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | UserService.delete | public async delete(id: number): Promise<void> {
if (await this.isAdmin(id)) {
throw new AppError(httpStatus.UNPROCESSABLE_ENTITY, 'Cannot delete admin user!');
}
const requester = httpContext.get('user') as AuthorizedRequest['user'];
if (id === requester.userId) {
throw new AppError(httpS... | /**
* Delete.
* @param id
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/user/user.service.ts#L181-L203 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | UserService.selectRolesWithUser | public async selectRolesWithUser(userId: number): Promise<IRoleWithUsers[]> {
const roleAttrs = ['roleId', 'roleName', 'roleKey', 'orderNum', 'status', 'createTime'];
const userAttrs = ['userId'];
const roles = await RoleModel.findAll({
attributes: roleAttrs,
include: [
{
mode... | /**
* Select user's roles.
* @param userId
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/user/user.service.ts#L210-L227 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | UserService.assignRolesToUser | public async assignRolesToUser(
roleIds: number[],
userId: number,
transaction?: Transaction,
): Promise<void> {
if (lodash.isEmpty(roleIds)) return;
// start transaction.
const tac = transaction || (await RoleUserModel.sequelize.transaction());
// role user associate.
await RoleUser... | /**
* Assign roles to user.
* @param roleIds
* @param userId
* @param transaction
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/user/user.service.ts#L236-L257 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | UserService.unassignRolesOfUser | public async unassignRolesOfUser(
roleIds: number[],
userId: number,
transaction?: Transaction,
): Promise<void> {
if (lodash.isEmpty(roleIds)) return;
// start transction.
const tac = transaction || (await RoleUserModel.sequelize.transaction());
// role user associate.
await RoleUse... | /**
* Unassign roles of user.
* @param roleIds
* @param userId
* @param transaction
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/user/user.service.ts#L266-L284 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | UserService.isAdmin | public async isAdmin(userId?: number): Promise<boolean> {
if (userId === 1) return true;
const hasAdminRole = await RoleUserModel.findOne({ where: { userId, roleId: 1 } });
return !!hasAdminRole;
} | /**
* Is admin?
* @param userId
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/user/user.service.ts#L291-L295 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | UserService.validPassword | public validPassword(rawPassword: string, encodedPassword: string): boolean {
return UserModel.validPassword(rawPassword, encodedPassword);
} | /**
* Valid password.
* @param user
* @param rawPassword
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/services/admin-api/src/components/user/user.service.ts#L303-L305 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | initCharts | const initCharts = () => {
const el = unref(elRef);
if (!el || !unref(el)) {
return;
}
chartInstance = echarts.init(el, theme);
}; | // 初始化echart | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/websites/admin-web/src/plugins/echarts.ts#L82-L88 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | setOption | const setOption = (option: EChartsOption) => {
nextTick(() => {
if (!chartInstance) {
initCharts();
if (!chartInstance) return;
}
chartInstance.setOption(option);
hideLoading();
});
}; | // 更新/设置配置 | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/websites/admin-web/src/plugins/echarts.ts#L91-L101 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | getInstance | function getInstance(): echarts.ECharts | null {
if (!chartInstance) {
initCharts();
}
return chartInstance;
} | // 获取echart实例 | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/websites/admin-web/src/plugins/echarts.ts#L104-L109 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | resize | function resize() {
chartInstance?.resize();
} | // 更新大小 | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/websites/admin-web/src/plugins/echarts.ts#L112-L114 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | watchEl | function watchEl() {
// 给元素添加过渡
if (animation) {
elRef.value.style.transition = 'width 1s, height 1s';
}
const resizeObserver = new ResizeObserver((entries) => resize());
resizeObserver.observe(elRef.value);
} | // 监听元素大小 | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/websites/admin-web/src/plugins/echarts.ts#L117-L124 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | showLoading | function showLoading() {
if (!chartInstance) {
initCharts();
}
chartInstance?.showLoading();
} | // 显示加载状态 | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/websites/admin-web/src/plugins/echarts.ts#L127-L132 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | hideLoading | function hideLoading() {
if (!chartInstance) {
initCharts();
}
chartInstance?.hideLoading();
} | // 显示加载状态 | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/websites/admin-web/src/plugins/echarts.ts#L134-L139 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | getCurrLang | function getCurrLang(): string {
let langcode = document.querySelector('html')?.getAttribute('lang');
if (langcode) return langcode;
try {
const { 0: navLangcode } = navigator.language.split('-');
if (Object.keys(messages).includes(navLangcode)) langcode = navLangcode;
if (navLangcode == 'zh') langc... | /**
* Get current langcode.
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/websites/admin-web/src/utils/locale.ts#L15-L29 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
nodite-light | github_2023 | nodite | typescript | getDefLang | function getDefLang(): string {
return document.querySelector('html')?.getAttribute('def-lang') || getCurrLang() || 'en';
} | /**
* Get default langcode.
* @returns
*/ | https://github.com/nodite/nodite-light/blob/f8827d69f0c67e7c59042fd0f3e246a67e80e0ec/websites/admin-web/src/utils/locale.ts#L35-L37 | f8827d69f0c67e7c59042fd0f3e246a67e80e0ec |
project-lakechain | github_2023 | awslabs | typescript | DocumentIndexPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline extracting metadata from documents and indexing them in OpenSearch.',
...env
});
// The VPC in which OpenSearch will be deployed.
const vpc = this.createVpc('Vpc');
// The OpenS... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/end-to-end-use-cases/building-a-document-index/stack.ts#L56-L223 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | DocumentIndexPipeline.createOpenSearchDomain | private createOpenSearchDomain(vpc: ec2.IVpc) {
const openSearch = new OpenSearchDomain(this, 'Domain', {
vpc
});
// Create the OpenSearch index.
new OpenSearchIndex(this, 'Index', {
indexName: OPENSEARCH_INDEX_NAME,
endpoint: openSearch.domain,
vpc,
body: {
mappin... | /**
* Creates a new OpenSearch domain for this example,
* and automatically creates the index and dashboard
* for visualizing the documents.
* @param vpc the VPC in which the OpenSearch domain
* should be deployed.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/end-to-end-use-cases/building-a-document-index/stack.ts#L232-L267 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | DocumentIndexPipeline.createVpc | private createVpc(id: string): ec2.IVpc {
return (new ec2.Vpc(this, id, {
enableDnsSupport: true,
enableDnsHostnames: true,
ipAddresses: ec2.IpAddresses.cidr('10.0.0.0/20'),
maxAzs: 1,
subnetConfiguration: [{
name: 'public',
subnetType: ec2.SubnetType.PUBLIC,
ci... | /**
* @param id the VPC identifier.
* @returns a new VPC with a public, private and isolated
* subnets for the pipeline.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/end-to-end-use-cases/building-a-document-index/stack.ts#L274-L290 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | PodcastGeneratorStack.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline creating AWS news podcast episodes on the new releases of the day.',
...env
});
// The VPC in which the FFMPEG processor will be deployed.
const vpc = this.createVpc('Vpc');
///... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/end-to-end-use-cases/building-a-podcast-generator/stack.ts#L64-L248 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | PodcastGeneratorStack.createVpc | private createVpc(id: string): ec2.IVpc {
return (new ec2.Vpc(this, id, {
enableDnsSupport: true,
enableDnsHostnames: true,
ipAddresses: ec2.IpAddresses.cidr('10.0.0.0/20'),
maxAzs: 1,
subnetConfiguration: [{
// Used by NAT Gateways to provide Internet access
// to the ... | /**
* @param id the VPC identifier.
* @returns a new VPC with a public, private and isolated
* subnets for the pipeline.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/end-to-end-use-cases/building-a-podcast-generator/stack.ts#L255-L279 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | RagPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'An end-to-end RAG pipeline using Amazon Bedrock and Amazon OpenSearch.',
...env
});
// The VPC in which OpenSearch will be deployed.
const vpc = this.createVpc('Vpc');
// The OpenSearch do... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/end-to-end-use-cases/building-a-rag-pipeline/stack.ts#L45-L201 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | RagPipeline.createVpc | private createVpc(id: string): ec2.IVpc {
return (new ec2.Vpc(this, id, {
enableDnsSupport: true,
enableDnsHostnames: true,
ipAddresses: ec2.IpAddresses.cidr('10.0.0.0/20'),
maxAzs: 1,
subnetConfiguration: [{
name: 'public',
subnetType: ec2.SubnetType.PUBLIC,
ci... | /**
* @param id the VPC identifier.
* @returns a new VPC with a public, private and isolated
* subnets for the pipeline.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/end-to-end-use-cases/building-a-rag-pipeline/stack.ts#L208-L228 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | getContent | const getContent = (question: string, chunks: string[]) => {
const content = [{
text: USER_PROMPT.replace('{{ question }}', question)
}];
// Add the document to the prompt.
for (const chunk of chunks) {
content.push({
text: `<document>${chunk}</document>`
});
}
return (content);
} | /**
* Creates the content array to pass to the model.
* @param question The question to ask the model.
* @param chunks The chunks to pass to the model.
* @returns a promise to an array of messages to pass to the model.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/end-to-end-use-cases/building-a-rag-pipeline/cli/src/common/query-llm.ts#L50-L63 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | SearchEnginePipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'An end-to-end search engine multi-modal ingestion pipeline using Amazon OpenSearch.',
...env
});
// The VPC in which OpenSearch will be deployed.
const vpc = this.createVpc('Vpc');
// The ... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/end-to-end-use-cases/building-a-search-engine/stack.ts#L46-L228 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | SearchEnginePipeline.createVpc | private createVpc(id: string): ec2.IVpc {
return (new ec2.Vpc(this, id, {
enableDnsSupport: true,
enableDnsHostnames: true,
ipAddresses: ec2.IpAddresses.cidr('10.0.0.0/20'),
maxAzs: 1,
subnetConfiguration: [{
name: 'public',
subnetType: ec2.SubnetType.PUBLIC,
ci... | /**
* @param id the VPC identifier.
* @returns a new VPC with a public, private and isolated
* subnets for the pipeline.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/end-to-end-use-cases/building-a-search-engine/stack.ts#L235-L255 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | VideoChapteringStack.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline extracting chapters associated with key moments in videos.',
...env
});
// The VPC in which the FFMPEG processor will be deployed.
const vpc = this.createVpc('Vpc');
///////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/end-to-end-use-cases/building-a-video-chaptering-service/stack.ts#L59-L189 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | VideoChapteringStack.createVpc | private createVpc(id: string): ec2.IVpc {
return (new ec2.Vpc(this, id, {
enableDnsSupport: true,
enableDnsHostnames: true,
ipAddresses: ec2.IpAddresses.cidr('10.0.0.0/20'),
maxAzs: 1,
subnetConfiguration: [{
// Used by NAT Gateways to provide Internet access
// to the ... | /**
* @param id the VPC identifier.
* @returns a new VPC with a public, private and isolated
* subnets for the pipeline.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/end-to-end-use-cases/building-a-video-chaptering-service/stack.ts#L196-L220 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | vttTimeToSeconds | const vttTimeToSeconds = (time: string) => {
const parts = time.split(':');
const seconds = parseInt(parts[0]) * 3600 + parseInt(parts[1]) * 60 + parseFloat(parts[2]);
return (seconds);
}; | /**
* Converts the given VTT time in 'HH:MM:SS.sss' format to seconds
* relative to the start of the video.
* @param time the VTT time to convert.
* @returns an integer representing the time in seconds relative to
* the start of the video.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/end-to-end-use-cases/building-a-video-chaptering-service/funclets/ffmpeg.ts#L53-L57 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | VideoSubtitlingStack.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline creating multi-lingual subtitles for videos.',
...env
});
// The VPC in which the FFMPEG processor will be deployed.
const vpc = this.createVpc('Vpc');
/////////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/end-to-end-use-cases/building-a-video-subtitle-service/stack.ts#L58-L220 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | VideoSubtitlingStack.createVpc | private createVpc(id: string): ec2.IVpc {
return (new ec2.Vpc(this, id, {
enableDnsSupport: true,
enableDnsHostnames: true,
ipAddresses: ec2.IpAddresses.cidr('10.0.0.0/20'),
maxAzs: 1,
subnetConfiguration: [{
// Used by NAT Gateways to provide Internet access
// to the ... | /**
* @param id the VPC identifier.
* @returns a new VPC with a public, private and isolated
* subnets for the pipeline.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/end-to-end-use-cases/building-a-video-subtitle-service/stack.ts#L227-L251 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | DeflatePipelineStack.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline storing documents into Zip and Tar archives.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
////////////////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/archive-processing-pipelines/deflate-pipeline/stack.ts#L49-L159 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | InflatePipelineStack.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline inflating ZIP and TAR archives.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
///////////////////////////////////////////
... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/archive-processing-pipelines/inflate-pipeline/stack.ts#L55-L135 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | KnowledgeGraphPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline extracting semantic ontology from documents.',
...env
});
if (!process.env.NEO4J_URI) {
throw new Error(`
Missing the NEO4J_URI environment variable.
`);
}
i... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/data-extraction-pipelines/knowledge-graph-pipeline/stack.ts#L61-L174 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | MetadataStack.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A simple pipeline extracting metadata from audio, image and video files.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
///////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/data-extraction-pipelines/metadata-extraction-pipeline/stack.ts#L55-L146 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | StructuredDataExtractionPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline extracting structured data from documents.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
//////////////////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/data-extraction-pipelines/structured-data-extraction-pipeline/stack.ts#L50-L145 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | TopicModelingStack.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline using topic modeling on text documents using the KeyBERT model.',
...env
});
// The VPC in which the EFS cache for the KeyBERT model will be deployed.
const vpc = this.createVpc('Vpc... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/data-extraction-pipelines/topic-modeling-pipeline/stack.ts#L45-L126 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | TopicModelingStack.createVpc | private createVpc(id: string): ec2.IVpc {
return (new ec2.Vpc(this, id, {
enableDnsSupport: true,
enableDnsHostnames: true,
ipAddresses: ec2.IpAddresses.cidr('10.0.0.0/20'),
maxAzs: 3,
subnetConfiguration: [{
// Used by NAT Gateways to provide Internet access
// to the ... | /**
* @param id the VPC identifier.
* @returns a new VPC with a public, private and isolated
* subnets for the pipeline.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/data-extraction-pipelines/topic-modeling-pipeline/stack.ts#L133-L157 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | BedrockLanceDbPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'An embedding storage pipeline using Amazon Bedrock and LanceDB.',
...env
});
// The VPC required by the EFS storage.
const vpc = this.createVpc('Vpc');
////////////////////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/embedding-pipelines/bedrock-lancedb-pipeline/stack.ts#L53-L161 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | BedrockLanceDbPipeline.createVpc | private createVpc(id: string): ec2.IVpc {
return (new ec2.Vpc(this, id, {
enableDnsSupport: true,
enableDnsHostnames: true,
maxAzs: 1,
ipAddresses: ec2.IpAddresses.cidr('10.0.0.0/20'),
subnetConfiguration: [{
// Used by NAT Gateways to provide Internet access
// to the ... | /**
* @param id the VPC identifier.
* @returns a new VPC with a public, private and isolated
* subnets for the pipeline.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/embedding-pipelines/bedrock-lancedb-pipeline/stack.ts#L168-L192 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | BedrockMultimodalPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'An embedding storage pipeline using Amazon Bedrock multimodal embedding models.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/embedding-pipelines/bedrock-multimodal-pipeline/stack.ts#L44-L131 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | BedrockEmbeddingPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'An embedding storage pipeline using Amazon Bedrock and OpenSearch.',
...env
});
// The VPC in which OpenSearch will be deployed.
const vpc = this.createVpc('Vpc');
// The OpenSearch domain... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/embedding-pipelines/bedrock-opensearch-pipeline/stack.ts#L54-L168 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | BedrockEmbeddingPipeline.createVpc | private createVpc(id: string): ec2.IVpc {
return (new ec2.Vpc(this, id, {
enableDnsSupport: true,
enableDnsHostnames: true,
ipAddresses: ec2.IpAddresses.cidr('10.0.0.0/20'),
maxAzs: 1,
subnetConfiguration: [{
name: 'public',
subnetType: ec2.SubnetType.PUBLIC,
ci... | /**
* @param id the VPC identifier.
* @returns a new VPC with a public, private and isolated
* subnets for the pipeline.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/embedding-pipelines/bedrock-opensearch-pipeline/stack.ts#L175-L191 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | BedrockPineconePipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'An embedding storage pipeline using Amazon Bedrock and Pinecone.',
...env
});
// Checking whether environment variables are defined.
if (!process.env.PINECONE_API_KEY_SECRET_NAME) {
throw... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/embedding-pipelines/bedrock-pinecone-pipeline/stack.ts#L53-L138 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | BedrockQdrantPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'An embedding storage pipeline using Amazon Bedrock and Qdrant.',
...env
});
// Checking whether environment variables are defined.
if (!process.env.QDRANT_API_KEY_SECRET_NAME) {
throw new... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/embedding-pipelines/bedrock-qdrant-pipeline/stack.ts#L53-L138 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | ClipEmbeddingsPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline creating embeddings for images using CLIP.',
...env
});
// The VPC required by sentence transformers models.
const vpc = this.createVpc('Vpc');
/////////////////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/embedding-pipelines/clip-embeddings-pipeline/stack.ts#L46-L124 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | ClipEmbeddingsPipeline.createVpc | private createVpc(id: string): ec2.IVpc {
return (new ec2.Vpc(this, id, {
enableDnsSupport: true,
enableDnsHostnames: true,
maxAzs: 1,
ipAddresses: ec2.IpAddresses.cidr('10.0.0.0/20'),
subnetConfiguration: [{
// Used by NAT Gateways to provide Internet access
// to the ... | /**
* @param id the VPC identifier.
* @returns a new VPC with a public, private and isolated
* subnets for the pipeline.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/embedding-pipelines/clip-embeddings-pipeline/stack.ts#L131-L155 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | CohereEmbeddingPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline storage pipeline using Cohere models and OpenSearch.',
...env
});
// The VPC in which OpenSearch will be deployed.
const vpc = this.createVpc('Vpc');
// The OpenSearch collectio... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/embedding-pipelines/cohere-opensearch-pipeline/stack.ts#L47-L145 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | CohereEmbeddingPipeline.createVpc | private createVpc(id: string): ec2.IVpc {
return (new ec2.Vpc(this, id, {
enableDnsSupport: true,
enableDnsHostnames: true,
ipAddresses: ec2.IpAddresses.cidr('10.0.0.0/20'),
maxAzs: 1,
subnetConfiguration: [{
name: 'public',
subnetType: ec2.SubnetType.PUBLIC,
ci... | /**
* @param id the VPC identifier.
* @returns a new VPC with a public and private subnet
* for the pipeline.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/embedding-pipelines/cohere-opensearch-pipeline/stack.ts#L152-L168 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | OllamaLancedbPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'An embedding storage pipeline using Ollama and LanceDB.',
...env
});
// The VPC required by the EFS storage.
const vpc = this.createVpc('Vpc');
///////////////////////////////////////////
... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/embedding-pipelines/ollama-lancedb-pipeline/stack.ts#L57-L174 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | OllamaLancedbPipeline.createVpc | private createVpc(id: string): ec2.IVpc {
return (new ec2.Vpc(this, id, {
enableDnsSupport: true,
enableDnsHostnames: true,
maxAzs: 1,
ipAddresses: ec2.IpAddresses.cidr('10.0.0.0/20'),
subnetConfiguration: [{
// Used by NAT Gateways to provide Internet access
// to the ... | /**
* @param id the VPC identifier.
* @returns a new VPC with a public, private and isolated
* subnets for the pipeline.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/embedding-pipelines/ollama-lancedb-pipeline/stack.ts#L181-L205 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | PannsEmbeddingPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'An audio embedding pipeline using PANNS and OpenSearch.',
...env
});
// The VPC in which OpenSearch will be deployed.
const vpc = this.createVpc('Vpc');
// The OpenSearch domain.
const... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/embedding-pipelines/panns-opensearch-pipeline/stack.ts#L46-L124 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | PannsEmbeddingPipeline.createVpc | private createVpc(id: string): ec2.IVpc {
return (new ec2.Vpc(this, id, {
enableDnsSupport: true,
enableDnsHostnames: true,
ipAddresses: ec2.IpAddresses.cidr('10.0.0.0/20'),
maxAzs: 1,
subnetConfiguration: [{
name: 'public',
subnetType: ec2.SubnetType.PUBLIC,
ci... | /**
* @param id the VPC identifier.
* @returns a new VPC with a public, private and isolated
* subnets for the pipeline.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/embedding-pipelines/panns-opensearch-pipeline/stack.ts#L131-L151 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | SentenceTransformersPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline creating embeddings using sentence transformers.',
...env
});
// The VPC required by sentence transformers models.
const vpc = this.createVpc('Vpc');
// The OpenSearch collectio... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/embedding-pipelines/sentence-transformers-pipeline/stack.ts#L48-L146 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | SentenceTransformersPipeline.createVpc | private createVpc(id: string): ec2.IVpc {
return (new ec2.Vpc(this, id, {
enableDnsSupport: true,
enableDnsHostnames: true,
maxAzs: 1,
ipAddresses: ec2.IpAddresses.cidr('10.0.0.0/20'),
subnetConfiguration: [{
// Used by NAT Gateways to provide Internet access
// to the ... | /**
* @param id the VPC identifier.
* @returns a new VPC with a public, private and isolated
* subnets for the pipeline.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/embedding-pipelines/sentence-transformers-pipeline/stack.ts#L153-L177 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | ConditionalPipelineStack.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline demonstrating how to use conditionals.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
//////////////////////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/flow-control-pipelines/conditional-pipeline/stack.ts#L46-L134 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | DelayPipelineStack.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline showing how to delay a pipeline execution.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
//////////////////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/flow-control-pipelines/delay-pipeline/stack.ts#L45-L113 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | ImageOutpaintingPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline using Amazon Bedrock and Amazon Titan to perform color guided image generation.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/generative-pipelines/color-guided-image-pipeline/stack.ts#L50-L162 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | ImageArticlePipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline generating images associated with articles.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
/////////////////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/generative-pipelines/image-article-pipeline/stack.ts#L51-L181 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | ImageConditioningPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline using Amazon Bedrock and Amazon Titan to perform image conditioning generation.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/generative-pipelines/image-conditioning-pipeline/stack.ts#L51-L154 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | time | const time = (offset = 5): Date => {
const date = new Date();
date.setMinutes(date.getMinutes() + offset);
return (date);
}; | /**
* @returns a date based on the local timezone
* with a given offset which is by default 5 minutes.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/generative-pipelines/image-generation-pipeline/stack.ts#L37-L41 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | ImageGenerationPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline generating images using multiple Bedrock models.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
////////////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/generative-pipelines/image-generation-pipeline/stack.ts#L52-L149 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | ImageOutpaintingPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline using Amazon Bedrock and Amazon Titan to perform image outpainting.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
/////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/generative-pipelines/image-outpainting-pipeline/stack.ts#L48-L143 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | ImageToImageStack.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline using Amazon Bedrock and SDXL to transform input images.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/generative-pipelines/image-to-image-pipeline/stack.ts#L47-L144 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | SdxlImageInpainting.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline using Amazon Bedrock and SDXL to perform image inpainting.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
//////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/generative-pipelines/sdxl-inpainting-pipeline/stack.ts#L47-L163 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | TitanInpaintingPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline using Amazon Bedrock and Amazon Titan to perform image inpainting.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
//////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/generative-pipelines/titan-inpainting-pipeline/stack.ts#L48-L144 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | CannyEdgeDetectionPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline performing canny edge detection on images.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
//////////////////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/image-processing-pipelines/canny-edge-detection-pipeline/stack.ts#L44-L123 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | FaceDetectionStack.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline using computer vision to detect faces on images.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
////////////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/image-processing-pipelines/face-detection-pipeline/stack.ts#L46-L136 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | FaceExtractionPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline using computer vision to extract faces from images.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
/////////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/image-processing-pipelines/face-extraction-pipeline/stack.ts#L75-L162 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | ImageBackgroundRemovalStack.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline demonstrating how to automatically remove image backgrounds using Rembg.',
...env
});
// The VPC in which the Rembg middleware will be deployed.
const vpc = this.createVpc('Vpc');
... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/image-processing-pipelines/image-background-removal/stack.ts#L44-L122 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | ImageBackgroundRemovalStack.createVpc | private createVpc(id: string): ec2.IVpc {
return (new ec2.Vpc(this, id, {
enableDnsSupport: true,
enableDnsHostnames: true,
ipAddresses: ec2.IpAddresses.cidr('10.0.0.0/20'),
maxAzs: 1,
subnetConfiguration: [{
// Used by NAT Gateways to provide Internet access
// to the ... | /**
* @param id the VPC identifier.
* @returns a new VPC with a public, private and isolated
* subnets for the pipeline.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/image-processing-pipelines/image-background-removal/stack.ts#L129-L153 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | ImageCaptioning.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline demonstrating how to implement image captioning using the BLIP2 model.',
...env
});
// The VPC in which the BLIP2 model will be deployed.
const vpc = this.createVpc('Vpc');
////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/image-processing-pipelines/image-captioning-pipeline/stack.ts#L44-L122 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | ImageCaptioning.createVpc | private createVpc(id: string): ec2.IVpc {
return (new ec2.Vpc(this, id, {
enableDnsSupport: true,
enableDnsHostnames: true,
ipAddresses: ec2.IpAddresses.cidr('10.0.0.0/20'),
maxAzs: 1,
subnetConfiguration: [{
// Used by NAT Gateways to provide Internet access
// to the ... | /**
* @param id the VPC identifier.
* @returns a new VPC with a public, private and isolated
* subnets for the pipeline.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/image-processing-pipelines/image-captioning-pipeline/stack.ts#L129-L153 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | ImageHashingPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline computing the hash of images using different algorithms.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/image-processing-pipelines/image-hashing-pipeline/stack.ts#L44-L124 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | ImageModerationPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline demonstrating how to classify moderated images.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
/////////////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/image-processing-pipelines/image-moderation-pipeline/stack.ts#L38-L149 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | ImageResizePipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline resizing images.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
///////////////////////////////////////////
// The sour... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/image-processing-pipelines/image-resize-pipeline/stack.ts#L43-L133 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | ImageTransformsStack.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline applying transformations on images.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
/////////////////////////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/image-processing-pipelines/image-transforms-pipeline/stack.ts#L43-L126 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | ImageWatermarkingPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline applying watermarks on images.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
///////////////////////////////////////////
... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/image-processing-pipelines/image-watermarking-pipeline/stack.ts#L45-L140 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | LaplacianVariancePipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline computing the Laplacian variance of images.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
/////////////////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/image-processing-pipelines/laplacian-variance-pipeline/stack.ts#L49-L147 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | TitanImageBackgroundRemovalStack.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline demonstrating how to remove image backgrounds using the Amazon Titan model.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
/... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/image-processing-pipelines/titan-image-background-removal/stack.ts#L49-L143 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | TitanObjectRemovalPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline using Amazon Bedrock and Amazon Titan to perform object removal in images.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
//... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/image-processing-pipelines/titan-object-removal-pipeline/stack.ts#L49-L144 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | EncryptionPipelineStack.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline using KMS to encrypt a pipeline.',
...env
});
// The customer managed key (CMK) used to encrypt
// the storage buckets.
const bucketKey = new kms.Key(this, 'BucketKey', {
e... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/security-hardened-pipelines/pipeline-encryption/stack.ts#L46-L142 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | VpcPrivatePipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline deployed within a private VPC.',
...env
});
// The VPC in which the EFS cache for the KeyBERT model will be deployed.
const vpc = this.createVpc('Vpc');
////////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/security-hardened-pipelines/vpc-private-pipeline/stack.ts#L47-L144 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | VpcPrivatePipeline.createVpc | private createVpc(id: string): ec2.IVpc {
const vpc = new ec2.Vpc(this, id, {
enableDnsSupport: true,
enableDnsHostnames: true,
ipAddresses: ec2.IpAddresses.cidr('10.0.0.0/20'),
maxAzs: 1,
natGateways: 0,
subnetConfiguration: [{
// Used by KeyBERT containers.
name... | /**
* @param id the VPC identifier.
* @returns a new VPC with a public, private and isolated
* subnets for the pipeline.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/security-hardened-pipelines/vpc-private-pipeline/stack.ts#L151-L192 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
project-lakechain | github_2023 | awslabs | typescript | MultiOutputPipeline.constructor | constructor(scope: Construct, id: string, env: cdk.StackProps) {
super(scope, id, {
description: 'A pipeline forwarding its results to multiple AWS services.',
...env
});
///////////////////////////////////////////
/////// S3 Storage ///////
////////////////////////////... | /**
* Stack constructor.
*/ | https://github.com/awslabs/project-lakechain/blob/4285173e80584eedfc1a8424d3d1b6c1a7038088/examples/simple-pipelines/storage-connector-pipeline/stack.ts#L57-L180 | 4285173e80584eedfc1a8424d3d1b6c1a7038088 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.