Skip to content

Instantly share code, notes, and snippets.

View shencan's full-sized avatar

shencan

  • china
  • beijing
  • 13:56 (UTC +08:00)
View GitHub Profile
@shencan
shencan / .env
Created November 16, 2025 12:49 — forked from jasonforte/.env
Example Python code for interacting with Amazon S3 Vectors (boto3 & langchain)
REGION_NAME = "us-east-1"
AWS_DEFAULT_PROFILE = "demo"
MODEL_ID = "amazon.titan-embed-text-v2:0"
S3_VECTOR_BUCKET_NAME = ""
S3_VECTOR_INDEX_NAME = ""
INPUT_DATASET_PATH = "dataset/occurrences.csv"
MAX_INPUT_DOCUMENTS = "200"
@shencan
shencan / ssh_term_ssh_config_proxy_command.go
Created March 30, 2021 07:05 — forked from blacknon/ssh_term_ssh_config_proxy_command.go
ssh_term_ssh_config_proxy_command.go
package main
import (
"fmt"
"io"
"io/ioutil"
"net"
"os"
"os/exec"
"os/signal"
@shencan
shencan / boto3_listinstances_example.py
Created August 14, 2018 09:25 — forked from mda590/boto3_listinstances_example.py
Example using boto3 to list running EC2 instances
import boto3
ec2 = boto3.resource('ec2')
def lambda_handler(event, context):
# create filter for instances in running state
filters = [
{
'Name': 'instance-state-name',
'Values': ['running']