more changes
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import os
|
||||
import inspect
|
||||
import sqlite3 as sql
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
from src import settings
|
||||
from typing import Any, Dict, List, Optional, Tuple, Union
|
||||
from omegaconf import OmegaConf
|
||||
from typing import Any, List, Optional, Tuple, Union
|
||||
import datetime
|
||||
from src import logger
|
||||
from src.backend.db import (
|
||||
@@ -1499,7 +1497,7 @@ class Database:
|
||||
else: return None
|
||||
|
||||
def getElsaProfs(self)->list[str]:
|
||||
query = f"SELECT fullname FROM elsa_prof"
|
||||
query = "SELECT fullname FROM elsa_prof"
|
||||
data = self.query_db(query)
|
||||
if data:
|
||||
return [i[0] for i in data]
|
||||
|
||||
@@ -9,7 +9,7 @@ def delete_temp_contents():
|
||||
"""
|
||||
delete_temp_contents deletes the contents of the temp directory.
|
||||
"""
|
||||
path = database.tempdir
|
||||
path = database.temp
|
||||
path = path.replace("~", str(Path.home()))
|
||||
path = Path(path)
|
||||
path = path.resolve()
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
from enum import Enum
|
||||
|
||||
APP_NRS = [i for i in range(1, 181)]
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
from src import logger
|
||||
# import sleep_and_retry decorator to retry requests
|
||||
from ratelimit import limits, sleep_and_retry
|
||||
|
||||
@@ -21,7 +21,7 @@ AUTHOR = "RDS_PERSON"
|
||||
|
||||
HEADERS = {
|
||||
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 \
|
||||
(KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36",
|
||||
(HTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36",
|
||||
"Accept-Language": "en-US, en;q=0.5",
|
||||
}
|
||||
RATE_LIMIT = 20
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
|
||||
import pandas as pd
|
||||
from docx import Document
|
||||
import re
|
||||
letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
|
||||
|
||||
def word_docx_to_csv(path) -> pd.DataFrame:
|
||||
|
||||
Reference in New Issue
Block a user