35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
import json
|
|
|
|
|
|
def load_vacancies(filepath: str) -> list[dict]:
|
|
try:
|
|
with open(filepath,"r") as file:
|
|
return json.load(file)
|
|
except:
|
|
print()
|
|
return []
|
|
|
|
def filter_by_city(vacancies: list[dict], city: str) -> list[dict]:
|
|
return [i for i in vacancies if i.get('city').lower() == city.lower()]
|
|
def filter_by_skills(vacancies: list[dict], required_skills: list[str]) -> list[dict]:
|
|
return []
|
|
def filter_by_salary(vacancies: list[dict], min_salary: int) -> list[dict]:
|
|
return []
|
|
def extract_unique_companies(vacancies: list[dict]) -> list[str]:
|
|
return []
|
|
def extract_top_skills(vacancies: list[dict], top_n: int) -> list[tuple[str, int]]:
|
|
return []
|
|
def calculate_average_salary(vacancies: list[dict]) -> float:
|
|
return 0.0
|
|
def group_by_company(vacancies: list[dict]) -> dict[str, int]:
|
|
return {}
|
|
def format_vacancy_short(vacancy: dict) -> str:
|
|
return
|
|
def save_filtered_results(vacancies: list[dict], filename: str) -> bool:
|
|
return
|
|
def main():
|
|
print("Hello World")
|
|
|
|
if __name__ =="__main__":
|
|
#òóïî âûâîä
|
|
main() |