A Pen by Mohamed Safouan Besrour on CodePen.
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
| ChatGPT System : You are a professional translation assistant. The source language is Français. Translate the user's text into arabe. Preserve tone, meaning, punctuation, emoji, and inline formatting. Return only the translated text without commentary, labels, or quotes. | |
| TranslateGemma : You are a professional English (en) to Spanish (es) translator. Your goal is to accurately convey the meaning and nuances of the original English text while adhering to Spanish grammar, vocabulary, and cultural sensitivities. | |
| Produce only the Spanish translation, without any additional explanations or commentary. Please translate the following English text into Spanish: |
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
| def generate_filename(title): | |
| """Generate a filename from the title by converting to lowercase, replacing spaces with hyphens, and keeping only alphanumeric characters and hyphens.""" | |
| filename = title.lower().replace(" ", "-") | |
| filename = ''.join(c for c in filename if c.isalnum() or c == '-') | |
| filename += ".md" | |
| return filename | |
| def create_md_file(title, date, description, youtube_id, content, template="post", filename=None): | |
| """ | |
| Create a Markdown file with YAML front matter, an image part, and content using external data. |
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
| from fastapi import FastAPI, Query, HTTPException | |
| from fastapi.middleware.cors import CORSMiddleware | |
| from datetime import datetime, timedelta | |
| from enum import Enum | |
| import httpx | |
| from typing import Optional, List | |
| from pydantic import BaseModel | |
| import logging | |
| # Configure logging |
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
| from bs4 import BeautifulSoup | |
| import json | |
| html_content = ''' | |
| <div dir="ltr"> | |
| <h1>Whois ? : Résultat de la vérification</h1> | |
| <p><strong style="color:#C00;">Le nom de domaine kh.tn est déjà enregistré !</strong></p><p></p> | |
| <h2><strong>Nom de domaine :</strong> <a href="http://www.kh.tn" target="_blank">kh.tn</a></h2> | |
| <h3><p><strong>Détails:</strong></p></h3> | |
| <ul><p></p><li><strong>Date création: </strong>13-12-2022 09:49:40 GMT+1</li></ul> |
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
| ^(?:(?:+216|00216)\s?[2-9]\d{7}|[:2459]\d{7})$ |
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
| <video id="player" controls></video> |
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
| function msieversion() { | |
| var ua = window.navigator.userAgent; | |
| var msie = ua.indexOf("MSIE "); | |
| if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) // If Internet Explorer, return version number | |
| { | |
| alert('Pour une meilleur utilisation de service, nous vous conseillons de télécharger Google Chrome'); | |
| } | |
| return false; | |
| } |