Faire un traducteur en cli avec https://ollama.com/
Modelfile
FROM llama3
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)) |
import json | |
import requests | |
from bs4 import BeautifulSoup | |
import sys | |
with open('voc.json') as f: | |
voc = json.load(f) | |
for m in voc['fr']['3']['favoris']: | |
mot = m['favori']['graphie'].capitalize() |
# SSL & LB PodamNG | |
# https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/keymanager_container_v1 | |
resource "openstack_keymanager_secret_v1" "certificate_1" { | |
name = "certificate" | |
payload = "${file("cert.pem")}" | |
secret_type = "certificate" | |
payload_content_type = "text/plain" | |
} |
from email.message import EmailMessage | |
import configparser | |
from random import random | |
import sys | |
from abc import ABC, abstractmethod | |
class MdaOptions: | |
pass |
from abc import ABC, abstractmethod | |
from urllib.parse import urlparse | |
class InfoSource(object): | |
def get_vacation(self): | |
pass | |
def set_vacation(self): | |
pass |
from datetime import datetime, timedelta | |
import errno | |
from os import rename | |
from airflow import DAG | |
from airflow.operators.bash import BashOperator | |
from airflow.operators.dummy import DummyOperator | |
# | |
# Operator qui test si un DAG n'est pas déjà en cours d'exécution avec la meme configuration |
nixify . $(nixos-version --revision) |