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
| #!/usr/bin/env python3 | |
| """ | |
| Export shared links from a Telegram group topic to a markdown file. | |
| Usage: | |
| python3 export_telegram_links.py "https://t.me/+InviteHash" --topic 13287 | |
| python3 export_telegram_links.py list | |
| Authentication: | |
| Get API credentials at https://my.telegram.org/apps then set: |
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
| #!/usr/bin/env python3 | |
| """ | |
| Export GitHub star lists to markdown files using browser session cookies. | |
| Usage: | |
| python3 export_github_lists.py [username] [output_dir] | |
| Authentication (pick one): | |
| GITHUB_COOKIES="<full cookie string>" python3 export_github_lists.py | |
| GITHUB_TOKEN="ghp_..." python3 export_github_lists.py |
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
| services: | |
| ollama: | |
| image: ollama/ollama:latest | |
| container_name: ollama | |
| gpus: all | |
| environment: | |
| - TERM=dumb | |
| - NO_COLOR=1 # some CLIs respect this | |
| - CI=1 # some CLIs simplify output in CI | |
| # - OLLAMA_NUM_GPU=0 # force CPU |
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
| #!/usr/bin/env python3 | |
| import argparse | |
| import os.path | |
| from collections import defaultdict | |
| from google.auth.transport.requests import Request | |
| from google.oauth2.credentials import Credentials | |
| from google_auth_oauthlib.flow import InstalledAppFlow |
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
| #!/usr/bin/env python3 | |
| import argparse | |
| import datetime as dt | |
| import os.path | |
| from google.auth.transport.requests import Request | |
| from google.oauth2.credentials import Credentials | |
| from google_auth_oauthlib.flow import InstalledAppFlow |
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
| version: '3.5' | |
| services: | |
| postgres: | |
| container_name: postgres_container | |
| image: postgres | |
| environment: | |
| POSTGRES_USER: ${POSTGRES_USER:-postgres} | |
| POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} | |
| POSTGRES_DB: ${POSTGRES_DB:-app_db} |
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
| [tool.poetry] | |
| name = "airflow-dbt2" | |
| version = "0.1.0" | |
| description = "" | |
| authors = ["Your Name <you@example.com>"] | |
| readme = "README.md" | |
| [tool.poetry.dependencies] | |
| python = "^3.10" |
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
| select format_datetime(current_timestamp, 'YYYY-MM-dd''T''HH:mm''Z''') |
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
| WITH CTE AS ( | |
| SELECT | |
| concat( | |
| substr('20220416T070044.243Z', 1, 4), '-', | |
| substr('20220416T070044.243Z', 5, 2), '-', | |
| substr('20220416T070044.243Z', 7, 2), 'T', | |
| substr('20220416T070044.243Z', 10, 2), ':', | |
| substr('20220416T070044.243Z', 12, 2), ':', | |
| substr('20220416T070044.243Z', 14) | |
| ) as ts |
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 logging | |
| from sqlalchemy.sql import text | |
| _logger = logging.getLogger(__name__) | |
| class ArchivableMixin: | |
| """Model which can be duplicated via one special materialized view""" |
NewerOlder