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
| %macro Calculs_Trimestriels(trimestre); | |
| /* Début de la macro */ | |
| /* Extraction des informations nécessaires de la table */ | |
| data TempData; | |
| set NOM_TABLE; | |
| format DateDepot datetime27.6; | |
| trimestre_date = intnx('quarter', input(put(&trimestre., yymmn6.), yymmn6.), 0, 'b'); | |
| run; |
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
| import os | |
| import psutil | |
| def get_files_in_use(directory): | |
| files_in_use = set() | |
| # Iterate through all files in the directory and its subdirectories | |
| for root, dirs, files in os.walk(directory): | |
| for file in files: | |
| file_path = os.path.join(root, file) |
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
| import pandas as pd | |
| from difflib import SequenceMatcher | |
| import csv | |
| import re | |
| # Charger le fichier CSV dans un dataframe | |
| df = pd.read_csv('votre_fichier.csv') | |
| # Charger le fichier texte | |
| with open('votre_fichier.txt', 'r', encoding='utf-8') as file: |
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
| import pandas as pd | |
| import spacy | |
| # Charger le modèle spaCy pour le traitement du langage naturel (fr_core_news_sm est un modèle léger pour le français) | |
| nlp = spacy.load('fr_core_news_sm') | |
| # Charger le fichier CSV dans un dataframe | |
| df = pd.read_csv('votre_fichier.csv') | |
| # Charger le fichier texte |
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
| data resultats; | |
| set votre_table; | |
| array colonnes[*] col1-col20; | |
| terme1_present = 0; | |
| terme2_present = 0; | |
| terme3_present = 0; | |
| do i = 1 to dim(colonnes); |
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
| # Liste de tous les produits uniques | |
| all_products = set(df['PRODUIT']) | |
| # Grouper les produits achetés par CLIENT | |
| grouped = df.groupby('CLIENT')['PRODUIT'].apply(set) | |
| # Générer toutes les combinaisons de 3 à 5 produits | |
| unique_combos = [] | |
| used_products = set() |
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
| import tkinter as tk | |
| from tkinter import simpledialog, messagebox | |
| class NestedDictManager: | |
| def __init__(self, root, data): | |
| self.root = root | |
| self.root.title("Nested Dictionary Manager") | |
| self.data = data # Use the provided dictionary | |
| self.tree = tk.ttk.Treeview(self.root) |
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
| import tkinter as tk | |
| from tkinter import simpledialog, messagebox | |
| class NestedDictManager: | |
| def __init__(self, root, data): | |
| self.root = root | |
| self.root.title("Nested Dictionary Manager") | |
| self.data = data # Use the provided dictionary | |
| self.tree = tk.ttk.Treeview(self.root) |
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
| import tkinter as tk | |
| from tkinter import simpledialog, messagebox | |
| class NestedDictManager: | |
| def __init__(self, root): | |
| self.root = root | |
| self.root.title("Nested Dictionary Manager") | |
| self.data = { | |
| 'key1': 'value1', |
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
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Wed Nov 29 15:02:06 2023 | |
| @author: Lenovo | |
| """ | |
| nested_dict = { | |
| 'rule1': { | |
| 'name': 'xy1z11111', | |
| 'Reccurence': { |