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 openai # pip install openai | |
import typer # pip install "typer[all]" | |
from rich import print # pip install rich | |
from rich.table import Table | |
""" | |
Webs de interés: | |
- Módulo OpenAI: https://github.com/openai/openai-python | |
- Documentación API ChatGPT: https://platform.openai.com/docs/api-reference/chat | |
- Typer: https://typer.tiangolo.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
function deepl(value1, value2, value3) { | |
var url = `https://api-free.deepl.com/v2/translate?auth_key=xxxx-xxxx-xxxx-xxxx-xxxx&text=${value1}&target_lang=${value3}&source_lang=${value2}`; | |
var response = UrlFetchApp.fetch(url); | |
var json = response.getContentText(); | |
var data = JSON.parse(json); | |
return data.translations && data.translations.length > 0 ? data.translations[0].text : "No value"; | |
// replace auth_key with a "Deepl for developer" API key | |
// source : this script is a modified version of | |
// http://5.9.10.113/67485395/google-sheets-custom-function-to-translate-with-deepl-api-not-working-as-expecte | |
} |
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
const MY_DOMAIN = 'rezaarkan.com'; | |
const SLUG_TO_PAGE = { | |
'': '882cd6dd6e1e482d823b464f326213e5', | |
'now': '25b7df64071d420d8f609bf76d9f4114', | |
'portfolio': '6000547bed0d441793bfba1498c063e2', | |
'resume': '0934b80d2d1544f99dedadb00be9d146', | |
'recommendations': '29115129efa44f1a870f390dd2c0a6c0', | |
'photos': 'e78c0492a5ec486aa51f4cdb2c6f4603', | |
'blog': '29bb193c1a104ba2b832788b57d58cd6', |
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
/* General */ | |
div.notion-topbar > div > div:nth-child(1n).toggle-mode { | |
display: none !important; | |
} | |
div.notion-topbar-mobile > div:nth-child(1n).toggle-mode { | |
display: none !important; | |
} | |
div.notion-topbar-mobile > div:nth-child(5) { | |
display: none !important; | |
} |