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 os | |
from enum import Enum | |
import argparse | |
from openai import OpenAI | |
import anthropic | |
import ollama | |
import google.generativeai as genai |
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 os | |
import re | |
import argparse | |
import feedparser | |
def get_arxiv_number(s): | |
p = re.compile(r"(\d{4}.\d{5})(v\d)?\.pdf") | |
result = p.search(s) |
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 time | |
import smtplib | |
import ssl | |
from email.message import EmailMessage | |
from selenium import webdriver | |
from selenium.webdriver.chrome.service import Service | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait |
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 os | |
import glob | |
import functools, operator | |
# extract image paths inside the image_dir_path including may include subdirectories using glob | |
accepted_exts = [".jpg", ".jpeg", ".png"] | |
image_files = [glob.glob(os.path.join(image_dir_path, "*"+ex)) for ex in accepted_exts] | |
if include_subdirs: | |
image_files.extend([glob.glob(os.path.join(image_dir_path + "/**/", "*"+ex)) for ex in accepted_exts]) |