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
""" | |
Async pipeline framework for concurrent data processing in Python. | |
This module provides a flexible, memory-safe pipeline system that supports: | |
- Asynchronous generator stages | |
- Asynchronous and synchronous (threaded) single-value functions | |
- Bounded concurrency and memory usage via a semaphore | |
- Easy composition of complex pipelines with a simple API | |
Example usage: |
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 requests | |
from datetime import datetime, timedelta | |
from typing import Optional | |
from sqlalchemy import create_engine, Column, Integer, String, DateTime | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.orm import sessionmaker | |
from sqlalchemy.sql import exists | |
from flask import Flask, request, jsonify | |
from cpu_heavy_module import calculate_subscription # Placeholder function (assume it's CPU-heavy) |
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 shutil | |
import filecmp | |
import hashlib | |
import argparse | |
import difflib | |
import json | |
from pathlib import Path | |
from cookiecutter.main import cookiecutter |
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
# Define the archive name | |
$ArchiveName = "output.tar.gz" | |
# Define the current directory and input folder | |
$InputDir = Get-Location | |
# List of folders to exclude | |
$Excludes = @(".git", ".github", ".idea") | |
# Build the `--exclude` arguments for the tar command |