This file contains hidden or 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
#!/usr/bin/env bash | |
# sudo tee /dev/null <<'EOF' | |
# ============================================================================== | |
# Streamctl - Wayland/Wlroots Display Streaming Tool (Hardened, Parallel-Enabled) | |
# | |
# A versatile, fault-tolerant streaming control utility with support for: | |
# • HLS, MJPEG, RTSP streaming modes with graceful fallback | |
# • Custom streaming profiles (e.g. YouTube with your stream key) | |
# • OBS WebSocket configuration (port 4455) for eventual integration | |
# • Desktop recording mode |
This file contains hidden or 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
#!/bin/bash | |
# ========================================================================= | |
# Enhanced File Finder Script with FZF Integration | |
# | |
# Created by: David Cannan | |
# Email: [email protected] | |
# GitHub: https://github.com/Cdaprod | |
# YouTube: https://youtube.com/@Cdaprod | |
# | |
# Save to /usr/local/bin/f and make executable with: chmod +x /usr/local/bin/f |
This file contains hidden or 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 langchain.chains.openai_functions import create_structured_output_runnable | |
from langchain.chat_models import ChatOpenAI | |
from langchain.prompts import ChatPromptTemplate | |
from langchain.pydantic_v1 import BaseModel, Field | |
class Insight(BaseModel): | |
insight: str = Field(description="""insight""") | |
chat_model = ChatOpenAI(model_name="gpt-4-1106-preview") |
This file contains hidden or 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
1. # create new .py file with code found below | |
2. # install ollama | |
3. # install model you want “ollama run mistral” | |
4. conda create -n autogen python=3.11 | |
5. conda activate autogen | |
6. which python | |
7. python -m pip install pyautogen | |
7. ollama run mistral | |
8. ollama run codellama | |
9. # open new terminal |
This file contains hidden or 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 langchain.chat_models import ChatOpenAI | |
from langchain.prompts import ChatPromptTemplate | |
from langchain.schema.output_parser import StrOutputParser | |
import requests | |
from bs4 import BeautifulSoup | |
from langchain.schema.runnable import RunnablePassthrough, RunnableLambda | |
from langchain.utilities import DuckDuckGoSearchAPIWrapper | |
import json | |
RESULTS_PER_QUESTION = 3 |
This Python script is designed to perform several operations related to text and data processing using Minio for object storage and the Transformers library for text tokenization. The script is organized into various functions, each responsible for a specific task.
-
init_logger(log_level: str)
: Initializes the logging mechanism with a given log level. -
check_env()
: Checks for the existence of required environment variables for Minio client setup.
This file contains hidden or 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 os | |
import ast | |
from pydantic import BaseModel, Field | |
from typing import List | |
# Pydantic model for function code blocks | |
class FunctionCodeBlock(BaseModel): | |
code: str = Field(..., description="The Python code block") | |
class Config: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder