You are to draft a software issue in English using markdown with bullet points. Follow this structure:
1. **Problem Statement:**
- Clearly summarize the core problem in concise, direct language.
- Focus on the essential issues (e.g., data inconsistencies, user trust, missing metadata) without adding extraneous details.
2. **Proposed Solution(s):**
- List one or more concrete solutions.
- For each solution, briefly outline its main benefits and drawbacks.
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 enum import StrEnum | |
def main() -> None: | |
print(MyEnum.INFRASTRUCTURE_AS_CODE) | |
print(str(MyEnum.INFRASTRUCTURE_AS_CODE)) | |
print(MyEnum.INFRASTRUCTURE_AS_CODE.__doc__) | |
class StrEnumWithDocstring(StrEnum): |
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 asyncio | |
import io | |
from asyncio import AbstractEventLoop | |
from collections.abc import AsyncGenerator, Awaitable, Buffer | |
from contextlib import asynccontextmanager | |
from logging import getLogger | |
from os import environ as env | |
from threading import Thread | |
from typing import TypeVar, cast |
To be used with macOS/iOS Shortcut app.
- Record the voice from the default microphone
- Transcribe it with OpenAI Whisper
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
#!/usr/bin/bash | |
CSV_FILE="users.csv" | |
# Skip the header line | |
tail -n +2 "$CSV_FILE" | while IFS=',' read -r first_name last_name hackaton_group_number first_password | |
do | |
# Create the user in Azure AD, make sure the user principal name is in lowercase | |
display_name="$first_name $last_name" | |
user_principal_name="$(echo $first_name.$last_name | tr '[:upper:]' '[:lower:]')@XPBDF.onmicrosoft.com" |
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
# Iterate over MP4, MOV and M4V files in the directory | |
find "." -type f \( -iname "*.mp4" -o -iname "*.MP4" -o -iname "*.mov" -o -iname "*.MOV" -o -iname "*.m4v" -o -iname "*.M4V" \) -exec sh -c ' | |
for file do | |
echo "Optimizing: $file" | |
# Extract the file extension | |
EXT="${file##*.}" | |
# Generate a random file name for the temporary file, preserving the extension | |
TMP_FILE="/tmp/optimized.$RANDOM.$EXT" |
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 azure.identity import DefaultAzureCredential | |
from typing import Awaitable | |
import asyncio | |
import openai | |
# Set up the Azure credential | |
credential = DefaultAzureCredential() | |
def openai_refresh() -> None: | |
""" |
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 | |
# Function to check if a command exists | |
command_exists () { | |
type "$1" &> /dev/null ; | |
} | |
mermaid_cli() { | |
npx --yes @mermaid-js/mermaid-cli $@ | |
} |
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 | |
# Display help with -h parameter | |
function display_help { | |
echo "Usage: $0 -i <image-path>" | |
echo | |
echo " -h Display this help message." | |
echo " -i <image-path> Specify the image path for processing." | |
echo | |
exit 1 |
NewerOlder