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
| regex notepad++ gaseste toate fisierele html care nu contin asta: <!-- SASA-2 --> | |
| Pentru a găsi toate fișierele HTML care NU conțin textul <!-- SASA-2 -->, trebuie să folosești funcția Find in Files (Caută în fișiere) din Notepad++ cu o expresie regulată de tip "negative lookahead". | |
| Iată pașii exacți și setările necesare: | |
| ## Pașii de configurare în Notepad++ | |
| 1. Apasă Ctrl + Shift + F pentru a deschide fereastra Find in Files. | |
| 2. Completează câmpurile exact așa: | |
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
| from __future__ import annotations | |
| import argparse | |
| import ftplib | |
| import getpass | |
| import os | |
| import posixpath | |
| import re | |
| import socket | |
| import sys |
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
| from __future__ import annotations | |
| import html | |
| import os | |
| import re | |
| import shutil | |
| from dataclasses import dataclass | |
| from datetime import datetime | |
| from pathlib import Path |
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
| #!/usr/bin/env python3 | |
| r"""Replace the English Categories -> BOOKS START block in 2022 ART pages. | |
| Defaults are set for this folder: | |
| source: ..\en\your-painted-smile.html | |
| target: .\2022 - en | |
| Usage: | |
| python replace-flags-en.py --dry-run | |
| python replace-flags-en.py |
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
| #!/usr/bin/env python3 | |
| r"""Replace the Categories -> BOOKS START block in Romanian 2022 ART pages. | |
| Defaults are set for this folder: | |
| source: ..\ro\profetia-ghicitoarei-din-desert.html | |
| target: .\2022 - ro | |
| Usage: | |
| python replace-flags.py --dry-run | |
| python replace-flags.py |
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
| from google import google | |
| num_page = 3 | |
| search_results = google.search("This is my query", num_page) | |
| for result in search_results: | |
| print(result.description) |
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 sys | |
| import time | |
| import random | |
| # import pprint | |
| import codecs | |
| sys.path.append(os.path.dirname(os.path.dirname(__file__))) | |
| # https://github.com/howie6879/magic_google | |
| # pip install magic_google |
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 codecs | |
| from gsearch.googlesearch import search | |
| # results = search('Github') | |
| results = search('Github', num_results=100) | |
| # print(results) | |
| file = codecs.open("result.txt", "w", "utf-8") |
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
| from googleapiclient.discovery import build | |
| api_key = "**************************************" | |
| cse_id = "***************" | |
| def google_search(search_term, api_key, cse_id, **kwargs): | |
| service = build("customsearch", "v1", developerKey=api_key) | |
| res = service.cse().list(q=search_term, cx=cse_id, **kwargs).execute() | |
| return res |
NewerOlder