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 logging | |
| import pickle | |
| from typing import List, TypedDict, Annotated, Optional | |
| from pathlib import Path | |
| # PDF processing | |
| import PyPDF2 | |
| from io import BytesIO |
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 com.google.gson.GsonBuilder; | |
| import com.google.gson.Gson; | |
| public class ObjectMapper { | |
| public static <T> T map(Object object, Class<T> clazz) { | |
| Gson gson = new GsonBuilder().create(); | |
| String json = gson.toJson(object); | |
| return gson.fromJson(json, clazz); | |
| } | |
| } |
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
| public class HttpCode { | |
| // Informational 1xx | |
| public static final int CONTINUE = 100; | |
| public static final int SWITCHING_PROTOCOLS = 101; | |
| // Successful 2xx | |
| public static final int OK = 200; | |
| public static final int CREATED = 201; | |
| public static final int ACCEPTED = 202; |