Skip to content

Instantly share code, notes, and snippets.

View quicksilver0's full-sized avatar
🐢
Am I super slow or super fast

Vladimir Kuzmenkov quicksilver0

🐢
Am I super slow or super fast
  • saber
View GitHub Profile
@quicksilver0
quicksilver0 / languagetool.py
Created July 12, 2025 08:28
Check for grammatical, style and spelling errors
# Поддерживает русский язык, находит грамматические, стилистические и орфографические ошибки.
pip install language-tool-python
import language_tool_python
# Создаём инструмент для русского языка
tool = language_tool_python.LanguageTool('ru-RU')
text = "Он пошол в школу. Я будеть дома."
# find abbreviations and their positions (start and end indexes) in the text
import re
text = "США и ООН обсуждали события на G20 и 2FA. Также упоминался NASA."
# Regular expression for abbreviations
pattern = r'\b[A-ZА-ЯЁ0-9]{2,}\b'
# Use re.finditer to get match objects with position info
@quicksilver0
quicksilver0 / rapidfuzz_matches.py
Created July 12, 2025 08:17
rapidfuzz usage example
pip install rapidfuzz
from rapidfuzz import process
import re
def suggest_names_fuzzy(text, name_database, score_cutoff=80):
suggestions = []
# Here re.finditer(r'\b\w+\b', text) change to the list of tokens found with spacy.
# Example how to create a list of tokens from text with spacy: https://habr.com/ru/articles/531940/
for match in re.finditer(r'\b\w+\b', text):
@quicksilver0
quicksilver0 / difflib_matches.py
Created July 12, 2025 07:59
Finding identical matches in text
import difflib
#Finding identical matches in text with number of characters >=5. Min length should be adjusted for real case.
def find_overlaps(text1, text2, min_length=5):
matcher = difflib.SequenceMatcher(None, text1, text2)
matches = []
for match in matcher.get_matching_blocks():
if match.size >= min_length:
overlap = text1[match.a: match.a + match.size]
matches.append(overlap)
@quicksilver0
quicksilver0 / open_powershell_here.md
Created July 7, 2024 22:07 — forked from davecan/open_powershell_here.md
How to enable "Open PowerShell Here" context menu in Windows 10
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.