Skip to content

Instantly share code, notes, and snippets.

View koundinyad's full-sized avatar

koundinya koundinyad

View GitHub Profile
import json
cmu_dict_file = "./cmudict-0.txt" # CMU dictionary .txt file
word_data = {}
def get_stress(phonemes):
""" Extracts stress markers from phoneme list. """
stress_markers = []
for phoneme in phonemes:
if phoneme[-1].isdigit():
This file has been truncated, but you can view the full file.
aardvark=aard�vark
abattoir=ab�at�toir
abaci=ab�a�ci
abacus=ab�a�cus
abacuses=ab�a�cus�es
abalone=ab�a�lo�ne
abatis=ab�a�tis
abbacy=ab�ba�cy
abbe=ab�be
abbess=ab�bess
@koundinyad
koundinyad / b64ToFile.js
Last active July 15, 2022 14:52
Convert base64 to file
// dataurl = `data:[filetype];base4,[base64.ext]`
// filename
function dataURLtoFile(dataurl, filename) {
var arr = dataurl.split(','),
mime = arr[0].match(/:(.*?);/)[1],
bstr = atob(arr[1]),
n = bstr.length,
u8arr = new Uint8Array(n);
while (n--) {
@koundinyad
koundinyad / currencies_country_flags.json
Created February 17, 2022 09:20 — forked from demirdev/currencies_country_flags.json
Currency list with Country Flag
[
{
"name": "US Dollar",
"symbol": "$",
"symbolNative": "$",
"decimalDigits": 2,
"rounding": 0,
"code": "USD",
"namePlural": "US dollars",
"countryEmoji": "🇺🇸"