adriens / auptitcafe-sdk Goto Github PK
View Code? Open in Web Editor NEW😋 SDK Python pour accéder aux menus du restaurant "Au p'tit café" - Nouméa, Nouvelle-Calédonie
Home Page: https://dev.to/adriens/series/23071
😋 SDK Python pour accéder aux menus du restaurant "Au p'tit café" - Nouméa, Nouvelle-Calédonie
Home Page: https://dev.to/adriens/series/23071
Prices now come in various formats:
input_strings = [
"Plat côté Terre - 3300 F",
"Plat côté Mer - 3300 F",
"Plat Végétarien - 2950 Frs",
"Suggestion du mois - 2650 Frs",
"Suggestion du soir - 3300 F",
"POE BANANE - 1 200F",
"GATEAU BASQUE CHOCOLAT - 1 200F",
"L'incontournable - 1200 F",
"Le café gourmand - 1100 F"
]
... this results in manual patches :
Create a function that get the right prices.
Créer le fichier si non existant
Appender les données (avec ajout colone de date)
Parfois, le SDK renvoie des NULLs sur les plats à emporter : pas de titre, pas de prix, pas de tittre...
Récupérer le nombre de personnes
import re
chaine = "Risotto nerone-citrouille-noisette Prix : 1800 Frs BARQUETTE 2 PERSONNES"
# Utiliser une expression régulière pour trouver le nombre de personnes
resultat = re.search(r'(\d+)\s+PERSONNES', chaine)
if resultat:
nombre_personnes = int(resultat.group(1))
print("Nombre de personnes :", nombre_personnes)
else:
print("Aucun nombre de personnes trouvé dans la chaîne.")
Hello,
Informations potentiellement intéressantes (http://auptitcafe.nc/a-emporter/) en plus du prix dans la description :
velouté de carotte, coco et citronnelle. 1000 F le bocal de 750 ml
Cookies aux pépites de chocolat, noisette, macadamia. 900 F les 6 pièces
Petits biscuit sablé au chocolat et fleur de sel. 1000 F les 200 g
Linked to :
HuggingFace has just announced the availability of Hugging Chat Assistant❣️:
The purpose of this issue it to prepare a premium quality SYSTEM prompt to improve LLM pertinence (better than csv
and directives).
First manual attempts have proven a tremendous improvement in LLMs answers while providing a very well redacted markdown
document.
llama_index
, with [Markdown Loader
](https://llamahub.ai/l/file-markdown)langchain
with its markdown supportmarkdown
filemd
file on the repo so anyone can use itFrom scratch on Kaggle (for example), show how to generate the menu markdown:
!pip install auptitcafe --upgrade
from auptitcafe.menus import Menus
Menus.save_to_markdown()
%%markdown
menus.md
Publication cette semaine
import re
chaine = """Bo Bun de boeuf, concombre, salade verte, vermicel, boeuf
mariné sauté, sauce nioc mam, cacahuète. Prix : 1500 Frs BARQUETTE 1 PERSONNE"""
# Utiliser une expression régulière pour trouver le prix
resultat = re.search(r'Prix : (\d+) Frs', chaine)
if resultat:
prix = int(resultat.group(1))
print("Prix :", prix, "Frs")
else:
print("Aucun prix trouvé dans la chaîne.")
title : <~ à l'ardoise, du mardi 23 au 26 MAI 2023 ~> name : <Plat côté Terre - 3300 F> Titre plat : <Plat côté Terre> recette : <> Prix : <3300> Catgory : <PLAT>
❯ ./menus.py title : <~ à l'ardoise, du mardi 23 au 26 MAI 2023 ~> Traceback (most recent call last): File "/home/adriens/./menus.py", line 21, in <module> image = menu.find('img')['src'] ~~~~~~~~~~~~~~~~^^^^^^^ TypeError: 'NoneType' object is not subscriptable
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.