Skip to content

Instantly share code, notes, and snippets.

View iCUE-Solutions's full-sized avatar

dliebich iCUE-Solutions

View GitHub Profile
@iCUE-Solutions
iCUE-Solutions / deepgram_ttt.py
Last active June 18, 2024 14:42
deepgramm (text to text)
from deepgram import DeepgramClient, PrerecordedOptions, AnalyzeOptions
DEEPGRAM_API_KEY = "c54089a7b3d72c96a9f880d9e3a00aaf26322021"
TEXT = {
"buffer": "Enter your text here."
}
def dg_ttt():
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iCUE-Solutions
iCUE-Solutions / vid.py
Created February 19, 2024 20:45
jump_video
import streamlit as st
data = "video.mp4"
st.write("Click to go to that moment in video.")
time_stamps = [
(st.button("Part A", "a"), 1), # bool, moment (seconds)
(st.button("Part B", "b"), 20),
(st.button("Part C", "c"), 40),
@iCUE-Solutions
iCUE-Solutions / fishial.py
Created February 3, 2024 21:49
fishail models
import os
import requests
def download_models():
# Create MODELS folder if it doesn't exist
if not os.path.exists('../com.docker.devenvironments.code/MODELS'):
os.makedirs('../com.docker.devenvironments.code/MODELS')
# Dictionary of URLs and corresponding filenames
urls = {
@iCUE-Solutions
iCUE-Solutions / chromadb-sum.py
Last active December 4, 2023 17:55
chromadb-sum
"""
Filename: /home/dirk/dev/iCUE/iCUE-SmartScribe/langchain_sum.py
Path: /home/dirk/dev/iCUE/iCUE-SmartScribe
Created Date: Friday, April 21st 2023, 2:20:37 pm
Author: Dirk Liebich
Copyright (c) 2023 iCUE Solutions GmbH
"""
import os
import glob
'''
Filename: /home/dirk/dev/iCUE/iCUE-SmartScribe/langchain.py
Path: /home/dirk/dev/iCUE/iCUE-SmartScribe
Created Date: Monday, April 24th 2023, 12:37:32 pm
Author: Dirk Liebich
Copyright (c) 2023 iCUE Solutions GmbH
Example
https://github.com/hwchase17/langchain/issues/2491
@iCUE-Solutions
iCUE-Solutions / tiktoken
Last active October 7, 2023 12:12
Token count for embedding
# FILEPATH: /tiktoken
import tiktoken
def num_tokens_from_string(string: str, encoding_name: str) -> int:
"""
Returns the number of tokens in a text string.
Args:
string (str): The text string to count tokens in.
encoding_name (str): The name of the encoding to use.
import streamlit as st
from PIL import Image
import sys
from PIL import Image
# from termcolor import colored
ascii_variations = {
"variation1": ["B", "S", "#", "&", "@", "$", "%", "*", "!", ":", "."],
"variation2": ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K"],
"variation3": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-"],
@iCUE-Solutions
iCUE-Solutions / video-subtitles-via-whisper.py
Created September 19, 2023 21:14 — forked from rasbt/video-subtitles-via-whisper.py
Script that creates subtitles (closed captions) for all MP4 video files in your current directory
# Sebastian Raschka 09/24/2022
# Create a new conda environment and packages
# conda create -n whisper python=3.9
# conda activate whisper
# conda install mlxtend -c conda-forge
# Install ffmpeg
# macOS & homebrew
# brew install ffmpeg
# Ubuntu
@iCUE-Solutions
iCUE-Solutions / role_models
Created September 18, 2023 13:57
Role models and descriptions
role_models = {
"For Boys": [
{"name": "Lebron James", "description": "Famous African-American basketballer."},
{"name": "MrBeast", "description": "Famous American YouTuber."},
{"name": "Barack Obama", "description": "First Black president of the United States."},
{"name": "Neil Armstrong", "description": "First man to walk on the moon."},
{"name": "Jackie Chan", "description": "Famous martial artist and actor from Hong Kong."},
{"name": "Mark Rober", "description": "Famous American former NASA Engineer and YouTuber."},
{"name": "Kobe Bryant", "description": "Famous African-American basketballer."},
{"name": "Rafael Nadal", "description": "Famous Spanish tennis player."},