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
| # execute kubectl proxy | |
| # go to http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/ | |
| # Copyright 2017 The Kubernetes Authors. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 |
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
| apiVersion: apps/v1 | |
| kind: ReplicaSet | |
| metadata: | |
| name: web | |
| labels: | |
| env: dev | |
| role: web | |
| spec: | |
| replicas: 4 | |
| selector: |
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
| apiVersion: v1 | |
| kind: Pod | |
| metadata: | |
| name: nginx | |
| labels: | |
| app: nginx | |
| spec: | |
| containers: | |
| - name: nginx | |
| image: nginx:1.14.2 |
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
| Les agrégations dans MongoDB permettent de traiter et de transformer des documents à l'aide de pipelines, où chaque étape applique des opérations sur les données. Voici les principales étapes d'agrégation, avec des exemples pour chacune. | |
| 1. $match | |
| Filtre les documents pour ne conserver que ceux qui correspondent aux critères spécifiés. Semblable à la clause WHERE en SQL. | |
| db.collection.aggregate([ | |
| { $match: { status: "active" } } | |
| ]) | |
| 2. $group |
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
| // 1. Modélisation des entités | |
| // Interface pour un produit | |
| interface Product { | |
| id: number; | |
| name: string; | |
| price: number; | |
| stock: number; | |
| } |
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
| Contexte | |
| Vous travaillez dans une entreprise de commerce en ligne. Votre équipe développe un module de gestion des commandes qui doit respecter certaines contraintes fonctionnelles et techniques, comme l'optimisation des types, la validation de données, ainsi que la gestion des erreurs de manière robuste. | |
| Votre objectif est de créer un système permettant de : | |
| Gérer des produits (nom, prix, stock, etc.). | |
| Créer et valider des commandes pour des clients (qui contiennent plusieurs produits). | |
| Calculer le montant total d'une commande. | |
| Implémenter une logique de validation pour vérifier que la commande est conforme (par exemple, les produits doivent être en stock). | |
| Ajouter un système de réduction avec des règles dynamiques (réduction en pourcentage, en montant fixe, ou sur certains produits uniquement). |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
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
| titre;auteur;genre;description;isbn | |
| La Terre;David Attenborough;Géographie;Documentaire sur la planète Terre;978-2-07-033384-4 | |
| Le Monde;Yann Arthus-Bertrand;Géographie;Documentaire aérien sur le monde;978-2-85621-222-9 | |
| Le Guide du Routard;Le Routard;Géographie;Guides de voyage;978-2-07-033385-1 |
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
| prompt = """ | |
| Input: Print the current directory | |
| Output: pwd | |
| Input: List files | |
| Output: ls -l | |
| Input: Change directory to /tmp | |
| Output: cd /tmp |