Skip to content

Instantly share code, notes, and snippets.

@me-suzy
me-suzy / py
Created July 5, 2024 09:23
iulia-FINAL-docx-FINAL-engleza
import os
import re
import unidecode
from docx import Document
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
from datetime import datetime
def extract_data_from_docx(file_path):
doc = Document(file_path)
articles = []
@me-suzy
me-suzy / py
Last active July 3, 2024 19:41
Parsing WEBSITE NOU BUN 2024 en
import os
import re
def read_text_from_file(file_path):
"""
Aceasta functie returneaza continutul unui fisier.
file_path: calea catre fisierul din care vrei sa citesti
"""
with open(file_path, 'r', encoding='utf-8', errors='ignore') as f:
text = f.read()
@me-suzy
me-suzy / py
Created July 3, 2024 15:26
Afiseaza diferente intre numerele din categorii, din RO si EN
import json
import os
def load_json(file_path):
with open(file_path, 'r', encoding='utf-8') as file:
return json.load(file)
def compare_json_files(file1_path, file2_path):
data1 = load_json(file1_path)
data2 = load_json(file2_path)
@me-suzy
me-suzy / py
Created July 3, 2024 15:14
Schimba Categorii
import os
import json
import re
# Calea către folderul cu fișierele HTML
folder_path = r'e:\Carte\BB\17 - Site Leadership\Principal 2022\ro'
# Calea către fișierul categorii.json
json_file_path = os.path.join(folder_path, 'categorii.json')
# Deschide fișierul categorii.json și încarcă conținutul
@me-suzy
me-suzy / txt
Created July 3, 2024 14:33
Heidegger
- Chestia este ca...
- Totusi, mai cuget.
- IN mare parte
- este de dorit ca
- cand spunem * avem in vedere,
- Este de așteptat că operele vor avea fie un caracter interdisciplinar
- Tocmai asta e castigul pe care ni-l dau inimile reci.
- Pornind de la aceasta conceptie..
- In fond, este vorba de un nou fel de a privi lucrurile
- Odata sincronizat sufletul cu locul,
@me-suzy
me-suzy / py
Created July 3, 2024 13:28
extradge data si afiseaza in json
import os
import re
import json
# Specifică calea către folderul cu fișierele HTML
folder_path = r'e:\Carte\BB\17 - Site Leadership\Principal 2022\en'
# Lista fișierelor HTML de procesat
html_files = [
'leadership-and-attitude.html','leadership-magic.html','successful-leadership.html','hr-human-resources.html','leadership-laws.html','total-leadership.html','leadership-that-lasts.html','leadership-principles.html','leadership-plus.html','qualities-of-a-leader.html','top-leadership.html','leadership-impact.html','personal-development.html','leadership-skills-and-abilities.html','real-leadership.html','basic-leadership.html','leadership-360.html','leadership-pro.html','leadership-expert.html','leadership-know-how.html','leadership-journal.html','alpha-leadership.html','leadership-on-off.html','leadership-deluxe.html','leadership-xxl.html','leadership-50-extra.html','leadership-fusion.html','leadership-v8.html','leadership-x3-silver.html','leadership-q2-sensitive.html','leadership-t7-hybrid.html','leadershi
@me-suzy
me-suzy / py
Created July 3, 2024 13:28
inlocuire categorii
import os
import json
import re
# Calea către folderul cu fișierele HTML
folder_path = r'e:\Carte\BB\17 - Site Leadership\Principal 2022\en'
# Calea către fișierul categorii.json
json_file_path = os.path.join(folder_path, 'categorii.json')
@me-suzy
me-suzy / py
Created July 3, 2024 09:52
Parsing website
#-------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: Castel
#
# Created: 22/01/2022
# Copyright: (c) Castel 2022
# Licence: <your licence>
#-------------------------------------------------------------------------------
@me-suzy
me-suzy / js
Created July 3, 2024 09:08
Search maker
, translate, search, result, info, into, your, language
StrYourSearch="Your search"; //Your search
StrNewSearch="New Search"; //New Search
StrCloseWindow="Close Window"; //Close Window
StrFind="Found"; //Find
StrItems="item(s)"; //items
strResultPage="Result Page"; //Result Page
strPrevious="Previous"; //Previous
strNext="Next"; //Next
@me-suzy
me-suzy / py
Created July 2, 2024 16:49
replace_increment
import os
import re
def get_list_dir(path, depth=False, type='all', inc=True, exclude=[], max=95):
list = []
if not path or not os.path.isdir(path):
return False
base_path = os.getcwd()
if base_path != path: