Faire un traducteur en cli avec https://ollama.com/
Modelfile
FROM llama3| # -*- coding: utf-8 -*- | |
| from setuphelpers import * | |
| from common import * | |
| DRY_RUN = True # Passer à False pour exécuter réellement | |
| WAPT = Wapt() | |
| # Paquets gérés par ce script | |
| ALL_PACKAGES = [ |
| #!/usr/bin/env python3 | |
| """ | |
| Script de fusion des exports CSV de gestionnaires de mots de passe. | |
| Supporte : iCloud Keychain et Proton Pass | |
| Usage: | |
| python merge_passwords.py icloud.csv protonpass.csv -o merged.csv | |
| python merge_passwords.py icloud.csv protonpass.csv -o merged.csv --format proton | |
| """ |
| # -*- coding: utf-8 -*- | |
| from setuphelpers import * | |
| import platform | |
| uninstallkey = [] | |
| def is_linux(): | |
| """Détecte si le système est Linux de manière fiable.""" | |
| return platform.system() == 'Linux' |
| import os | |
| import re | |
| import argparse | |
| def parse_metadata(lines): | |
| """Extraire les métadonnées Markdown du début du fichier.""" | |
| metadata = {} | |
| if len(lines) == 0: # Vérifier si le fichier est vide | |
| return metadata | |
| if lines[0].strip() == "---": |
| import os | |
| import shutil | |
| import re | |
| import logging | |
| import argparse | |
| from urllib.parse import unquote | |
| from datetime import datetime # Importation de datetime pour la gestion des dates | |
| # Configuration du logger | |
| logging.basicConfig(filename='migration_log.txt', level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') |
| #!/bin/bash | |
| symfony_cache_dir="/app/var/cache" | |
| pgadmin_data_dir="/app/data/pgadmin-data" | |
| mkdir -p $symfony_cache_dir | |
| chmod -R g+rw $symfony_cache_dir | |
| chown -R 1000:33 $symfony_cache_dir | |
| mkdir -p $pgadmin_data_dir |
Faire un traducteur en cli avec https://ollama.com/
Modelfile
FROM llama3| import asyncio | |
| shared_list = [] | |
| list_lock = asyncio.Lock() | |
| async def add_to_list(item): | |
| async with list_lock: | |
| shared_list.append(item) | |
| async def remove_from_list(item): |
| from email.utils import parseaddr | |
| import re | |
| _, mail = parseaddr("Alexandre Px <titi.-.tata@toto.fr>") | |
| if mail == '': | |
| print("Adresse mail non valide") | |
| else: | |
| match = re.split(r'\.-\.', mail, 1) | |
| if len(match) == 2: |
| from typing import Union | |
| import re | |
| class Reject(object): | |
| def __init__(self, reason: str): | |
| self.reason = reason | |
| def run(self): | |
| print("[REJECT] Mail reject: {}".format(self.reason)) |