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
class Table1(Base): | |
__tablename__ = 'table1' | |
id = sa.Column(UUID, primary_key=True, server_default=sa.text("uuid_generate_v4()")) | |
class Table2(Base): | |
__tablename__ = 'table2' | |
id = sa.Column(UUID, primary_key=True, default=uuid.uuid4) |
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 TYPE_CHECKING | |
from sqlalchemy import create_engine | |
if TYPE_CHECKING: | |
from flask import Flask | |
from sqlalchemy.orm import scoped_session | |
class FlaskSQLAlchemy: |
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
find . -type f | xargs -n 1 md5sum -b > all_md5.txt | |
cat all_md5.txt | awk '{print $1}' | sort | uniq -d | xargs -n 1 -I '{}' grep '{}' all_md5.txt |
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 argparse | |
import os | |
import select | |
import socket | |
import sys | |
import threading | |
parser = argparse.ArgumentParser( | |
description='Transparent TCP proxy and logger') | |
parser.add_argument('-a', '--host', required=True, |