Skip to content

Instantly share code, notes, and snippets.

@dimagalat
dimagalat / norm_text_v0.1.py
Last active November 16, 2023 18:07
A cleaning function suitable for deep learning applications
import re
import string
import unicodedata
from typing import Optional
class TextNorm:
def __init__(self):
pass
@dimagalat
dimagalat / wsl.md
Created March 5, 2022 16:54 — forked from alyleite/wsl.md
Failed to connect to bus: Host is down - WSL 2

» sudo systemctl daemon-reload

System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down

just try:

sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig

sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target

#!/usr/bin/env sh
# This script downloads the Google News word2vec negative 300 model.
# Script code was taken from https://gist.github.com/yanaiela/cfef50380de8a5bfc8c272bb0c91d6e1
WMDDATA=pycocoevalcap/wmd/data
MODEL=GoogleNews-vectors-negative300
DIR="$( cd "$(dirname "$0")" ; pwd -P )"
cd $DIR
@dimagalat
dimagalat / introrx.md
Created March 24, 2016 00:41 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing