Skip to content

Instantly share code, notes, and snippets.

View mshavliuk's full-sized avatar
🍤
H̷̹̝͝ë̴̙̤́͋y̸̓̐́́̀͜ ̸̨̝̱̺̟̏̇̅̕t̴̠͗̇̊͠h̵̺͎̙̆̒͜͝e̷̲͇̞̦̎r̸̨̰̪̉͜e̷͎͇̟̓͂̀͝!̷̞̦̾

Mikhail mshavliuk

🍤
H̷̹̝͝ë̴̙̤́͋y̸̓̐́́̀͜ ̸̨̝̱̺̟̏̇̅̕t̴̠͗̇̊͠h̵̺͎̙̆̒͜͝e̷̲͇̞̦̎r̸̨̰̪̉͜e̷͎͇̟̓͂̀͝!̷̞̦̾
View GitHub Profile
# -*- coding: utf-8 -*-
from itertools import product
from nltk.corpus import wordnet
def test_words(word1: str, word2: str):
meanings1 = wordnet.synsets(word1, lang="eng")
meanings2 = wordnet.synsets(word2, lang="eng")
similarities = []
@mshavliuk
mshavliuk / audacity.rb
Last active January 12, 2021 08:40 — forked from hacfi/audacity.rb
Unofficial Hombrew Cask for Audacity 2.3.3 (recent 64-bit version). Get around Fosshub's limitations
# Unofficial Hombrew Cask for Audacity 2.3.3 (recent 64-bit version)
# Made entirely for fun and to demonstrate how to get around fosshub's limitations.
# Problem: Audacity's binary is hosted on fosshub and they don't provide a fixed url! The seems to intentionally try to prevent "hot-linking".
# Solution: Make a request to fosshub's special XHR endpoint to get the signed download url. Then just pass that URL to Homebrew
require 'net/http'
require 'json'
require 'uri'
@mshavliuk
mshavliuk / startup.sh
Last active November 17, 2019 21:56
This script will help you initialized workplace just at once
#!/usr/bin/env bash
# you can run this script with -y option to install all optional packages automatically
while getopts ":y" opt; do
case $opt in
y)
echo "-y was triggered, will install all optional packages"
YES=true
;;
\?)
@mshavliuk
mshavliuk / getMethods.js
Created August 16, 2019 11:22
getMethods js function
const getMethods = (obj) => {
let properties = new Set()
let currentObj = obj
do {
Object.getOwnPropertyNames(currentObj).map(item => properties.add(item))
} while ((currentObj = Object.getPrototypeOf(currentObj)))
return [...properties.keys()].filter(item => typeof obj[item] === 'function')
};