This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from agentifyme import get_logger, workflow | |
from pydantic import BaseModel | |
class SimpleResponse(BaseModel): | |
output: str | |
logger = get_logger() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: cloud-controller-manager | |
namespace: kube-system | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
,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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
NewerOlder