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
FROM python:3.12.3 | |
RUN pip install \ | |
pandas \ | |
scikit-learn \ | |
fastapi \ | |
aiofiles |
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
from typing import Any | |
from pydantic import BaseModel, root_validator | |
import json | |
# this dictionary will collect all classes constructors | |
class_registry: dict[str, Any] = dict() | |
# base class | |
class Creature(BaseModel): |
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
from sqlalchemy import create_engine | |
from sqlalchemy import select, insert, func | |
from tables import Base, Record | |
from time import time | |
import ray | |
import uuid |
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
from multiprocessing import Queue, Process | |
import random | |
import time | |
import signal | |
stop_sentinel = "STOP" | |
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
from pydantic import BaseModel | |
from enum import Enum | |
import json | |
class Season(str, Enum): | |
SPRING = 'spring' | |
SUMMER = 'summer' | |
AUTUMN = 'autumn' |
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 multiprocessing | |
import signal | |
from multiprocessing import Event | |
class W(multiprocessing.Process): | |
def __init__(self, i: int, event: Event) -> None: | |
super().__init__() |
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
package utility; | |
import java.time.Duration; | |
import java.util.Collections; | |
/** | |
* Author: Claudio "Dna" Bonesana | |
* Project: SimpleProgressBar | |
* Date: 06.10.2021 14:27 | |
*/ |
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
#!/bin/bash | |
docker run -it --rm -v "$(pwd)":"/w" -w "/w" python:3.8-slim python scripty.py |
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 logging | |
import os | |
import sys | |
import lxml.etree as etree | |
from openpyxl import load_workbook | |
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) |
NewerOlder