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 import PromptTemplate | |
from langchain.prompts.chat import ChatPromptTemplate, HumanMessagePromptTemplate | |
from langchain.chains import LLMChain | |
from langchain.chat_models import ChatOpenAI | |
import requests | |
base_url = "http://localhost:9999/v1" | |
x = requests.get(base_url + "/models") | |
model = str(x.json()["data"][0]["id"]) |
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 import PromptTemplate | |
from langchain.chains import LLMChain | |
from langchain.llms import OpenAI | |
import requests | |
base_url = "http://localhost:9999/v1" | |
x = requests.get(base_url + "/models") | |
model = str(x.json()["data"][0]["id"]) | |
print(f"model: {model}") |
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 guidance | |
import requests | |
base_url = "http://localhost:9999/v1" | |
x = requests.get(base_url + "/models") | |
model = str(x.json()["data"][0]["id"]) | |
guidance.llm = guidance.llms.OpenAI( | |
model=model, | |
endpoint=base_url, |
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 openai | |
base_url = "http://localhost:9999/v1" | |
openai.api_key = "***" | |
openai.api_base = base_url | |
models = openai.Model.list() | |
model = models["data"][0]["id"] | |
print(f"model: {model}") |
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 openai | |
base_url = "http://localhost:9999/v1" | |
openai.api_key = "***" | |
openai.api_base = base_url | |
models = openai.Model.list() | |
model = models["data"][0]["id"] | |
print(f"model: {model}") |
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 playwright.sync_api import sync_playwright | |
from selectolax.parser import HTMLParser | |
from dataclasses import dataclass | |
import time | |
import csv | |
from loguru import logger | |
@dataclass | |
class Item: | |
asin: str |
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 mss | |
from win32gui import FindWindow, GetWindowRect, SetForegroundWindow | |
import torch | |
import cv2 as cv | |
import numpy as np | |
from time import time, sleep | |
from utils.utils import letterbox, driving_area_mask, lane_line_mask,\ | |
split_for_trace_model, non_max_suppression, plot_one_box, scale_coords, clip_coords |
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
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license | |
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..] | |
path: ../PROJECT/ready_data/train_data # dataset root dir | |
train: images/train # train images (relative to 'path') | |
val: images/val # val images (relative to 'path') | |
test: ../PROJECT/ready_data/test_data # test images (optional) | |
# Classes | |
names: |
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 mss | |
from win32gui import FindWindow, GetWindowRect, SetForegroundWindow | |
import torch | |
import cv2 as cv | |
import numpy as np | |
from time import time, sleep | |
window_handle = FindWindow(None, "Albion Online Client") | |
window_rect = GetWindowRect(window_handle) | |
SetForegroundWindow(window_handle) |
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
Iron Ore | |
Hemp | |
Flax | |
Travertine | |
Sandstone | |
Rough Logs | |
Cotton | |
Limestone | |
Copper Ore | |
Tin Ore |