Skip to content

Instantly share code, notes, and snippets.

View 2af's full-sized avatar

Anton Frolov 2af

  • Georgia
View GitHub Profile
@2af
2af / levenshtein.py
Created July 22, 2024 12:31
Levenshtein (editor) distance weighted.
import Levenshtein
def levenshtein(s1: str, s2: str) -> float:
'''
0.0 means perfect match
0.1 very possible match
0.2 less possible match
0.3 likely not a match
'''
def processor(_string: str) -> str:
_string = _string.upper()
@jpmens
jpmens / tim-books-two.txt
Created May 26, 2018 20:09
Tim booked two
A priest and a shepherd from Australia participate in a TV game. After answering all the questions, there is a tie.
So both are given one final assignment. It is to write a poem in three minutes, using the word "Timbuktu".
It is a city in Africa.
The priest returns with the fruit of his inspiration:
"I was a father all my life,
I had no children, had no wife,
I read the bible through and through
on my way to Timbuktu ... "
@guycalledseven
guycalledseven / manual-uninstall-paragon-ntfs.sh
Last active April 19, 2025 20:03
Manually remove Paragon NTFS v15 leftovers MacOS
# after appcleaner does his magic, do this
sudo rm -rf "/Library/Application Support/Paragon Software/"
sudo rm /Library/LaunchDaemons/com.paragon-software.installer.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfs.loader.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfsd.plist
sudo rm /Library/LaunchAgents/com.paragon-software.ntfs.notification-agent.plist
sudo rm -rf /Library/Filesystems/ufsd_NTFS.fs/
sudo rm -rf /Library/PrivilegedHelperTools/com.paragon-software.installer
sudo rm -rf /Library/Extensions/ufsd_NTFS.kext/
@leom
leom / create_mp4.py
Created July 13, 2012 17:19
A python script to loop through a directory's video files to create .mp4 files (using HandbrakeCLI)
#!/usr/bin/python
#
# A simple python script to convert a directory full of avi, mp4, and mkv to
# iPad compatible videos
#
# Copyright Leo Mendoza (2012), released as is.
#
import glob
import os