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 wandb | |
run = wandb.init(project=f"{project_name}", entity=f"{organization_name}", resume_from=f"{run_id}?_step={step}") | |
run.finish() | |
print(run.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
conda create -n vllm python=3.10 | |
conda activate vllm | |
export VLLM_VERSION=0.4.0 | |
export PYTHON_VERSION=310 | |
pip install https://github.com/vllm-project/vllm/releases/download/v${VLLM_VERSION}/vllm-${VLLM_VERSION}+cu118-cp${PYTHON_VERSION}-cp${PYTHON_VERSION}-manylinux1_x86_64.whl | |
# Re-install PyTorch with CUDA 11.8. | |
pip uninstall torch -y | |
pip install torch==2.1.2+cu118 --index-url https://download.pytorch.org/whl/cu118 |
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 requests | |
import numpy as np | |
from collections import Counter | |
#from googlesearch import search as google_search | |
import wikipedia as wikipedia_api | |
DEFAULT_IGNORED_NS = ('wikipedia:', 'file:', 'portal:', 'template:', 'mediawiki:', 'user:', | |
'help:', 'book:', 'draft:', 'module:', 'timedtext:') |
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 sys | |
import time | |
from typing import List | |
import logging | |
import shortuuid | |
from vllm import AsyncEngineArgs, AsyncLLMEngine, SamplingParams | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 typing import Optional, Union, List, Dict, Tuple | |
from pydantic import Field | |
import ast | |
import astunparse | |
import logging | |
import pandas as pd | |
from langchain.utilities import GoogleSearchAPIWrapper | |
from langchain.tools import Tool | |
from langchain.python import PythonREPL | |
from langchain.tools.base import BaseTool |
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 re | |
import json | |
import logging | |
import threading | |
from typing import Union | |
from abc import ABC, abstractmethod | |
from langchain.chains.conversation.memory import ( | |
ConversationBufferMemory, | |
# ConversationBufferWindowMemory, |
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 time | |
import requests | |
import logging | |
headers = { | |
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36', | |
'Content-Type': 'application/json', | |
"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0", | |
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", |
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 json | |
import requests | |
import telegram | |
from telethon import TelegramClient, sync | |
============================================================================================================ | |
msg = { | |
"symbol": "BTC", | |
"action": "BUY", |
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 python | |
# coding: utf-8 | |
# In[59]: | |
import pdb | |
import time | |
import pickle | |
import ccxt |
NewerOlder