Skip to content

Instantly share code, notes, and snippets.

View arunreddy's full-sized avatar
🎯
Focusing

Arun Reddy arunreddy

🎯
Focusing
View GitHub Profile
from agentifyme import get_logger, workflow
from pydantic import BaseModel
class SimpleResponse(BaseModel):
output: str
logger = get_logger()
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
@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:
@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 / 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)
,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 / 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')
@arunreddy
arunreddy / .bashrc
Last active December 8, 2018 04:34
STARLAB server bash configuration
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@arunreddy
arunreddy / virtual_keyboard
Last active October 3, 2023 07:24
QT Virtualkeyboard
import sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.Qt import Qt
from PyQt5.QtWidgets import *
class VKQLineEdit(QLineEdit):
def __init__(self, parent=None, name=None, mainWindowObj=None):
super(VKQLineEdit, self).__init__(parent)
@arunreddy
arunreddy / clean_audio.sh
Created October 22, 2017 20:35 — forked from devoncrouse/clean_audio.sh
Using Sox (http://sox.sourceforge.net) to remove background noise and/or silence from audio files (individually, or in batch).
# Create background noise profile from mp3
/usr/bin/sox noise.mp3 -n noiseprof noise.prof
# Remove noise from mp3 using profile
/usr/bin/sox input.mp3 output.mp3 noisered noise.prof 0.21
# Remove silence from mp3
/usr/bin/sox input.mp3 output.mp3 silence -l 1 0.3 5% -1 2.0 5%
# Remove noise and silence in a single command