Skip to content

Instantly share code, notes, and snippets.

View arunreddy's full-sized avatar
🎯
Focusing

Arun Reddy arunreddy

🎯
Focusing
View GitHub Profile
@arunreddy
arunreddy / superb_ai_image_annotations_upload.py
Created January 5, 2022 20:31
SuperbAI Image Annotation Upload
# create the client.
client = spb.sdk.Client(project_name='fitness_dataset')
DATASET = 'fitness_dataset_20210105'
img = 'img_002_f3a31eba219e2865.jpg'
try:
data_handler = next(client.get_data_page(page_idx=0, page_size=1, dataset=DATASET, data_key=img))
except StopIteration:
print('Data with this key does not exist')
,name
0,Anil
1,Rajeev Pandey
2,P. Patnaik
3,Punambhai P. Barot
4,Kiara Tehsil
5,Krishnam Raju
6,Dave
7,Sanyam Lodha
8,N.K. Kalita
@arunreddy
arunreddy / pad_packed_demo.py
Created September 27, 2022 13:44 — forked from HarshTrivedi/pad_packed_demo.py
Minimal tutorial on packing (pack_padded_sequence) and unpacking (pad_packed_sequence) sequences in pytorch.
import torch
from torch import LongTensor
from torch.nn import Embedding, LSTM
from torch.autograd import Variable
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
## We want to run LSTM on a batch of 3 character sequences ['long_str', 'tiny', 'medium']
#
# Step 1: Construct Vocabulary
# Step 2: Load indexed data (list of instances, where each instance is list of character indices)
@arunreddy
arunreddy / aws-ccm.yaml
Created April 10, 2023 21:53
aws-ccm.yaml
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: cloud-controller-manager
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
@arunreddy
arunreddy / 01_infisical_manifest.yml
Created January 3, 2024 14:24
Infisical Manfiest
apiVersion: secrets.infisical.com/v1alpha1
kind: InfisicalSecret
metadata:
# Name of of this InfisicalSecret resource
name: dolphin-infisicalsecret
spec:
# The host that should be used to pull secrets from. If left empty, the value specified in Global configuration will be used
hostAPI: https://app.infisical.com/api
resyncInterval: 60
authentication:
from prefect.filesystems import S3
s3_block = S3.load('chatbot20231012')
from prefect.blocks.system import Secret
from sellpath_test import ClientMgr
client = ClientMgr('5d143acf-2812-4fed-b4d4-6b48bd8eca4b')
from prefect import task, flow
from sellpath_test import ClientMgr
from sellpath_test.http_client import SellPathHttpClient