Skip to content

Instantly share code, notes, and snippets.

View thiscantbeserious's full-sized avatar
👾
I may be slow to respond.

Simon thiscantbeserious

👾
I may be slow to respond.
  • Germany
View GitHub Profile
@thiscantbeserious
thiscantbeserious / translate_missing.py
Last active January 26, 2024 17:19
Compare two translation bundles and translate missing keys via deep_translator (Google) by key = value || value logic ...
import json
import requests
import concurrent.futures
import os
import time
from tqdm import tqdm
from deep_translator import GoogleTranslator
def load_json_file(file_path):
@thiscantbeserious
thiscantbeserious / gmail_extractor.py
Last active January 3, 2023 10:59
OpenSource Gmail Takeout MBox extractor (with Label to Folder structure into seperate .eml files)
#!/usr/bin/env python3
# This will extract an mbox in seperate eml files from google takeout (manually unzip it first)
# Will try to create a folder structure based on the labels
# Emails will be formatted like this:
# 221104_110405_sender@mail.com_subject_in_45_chars.eml
# e.g. ./Inbox/2022/10/Special/221104_110405_sender@mail.com_subject_in_45_chars.eml
#
# Should work for all languages, but has been tested on German with a 14 GB large mbox file (with 169039 messages)
# Result: 169039 messages processed, 167591 messages saved
@thiscantbeserious
thiscantbeserious / install-kde-neon-on-ubuntu-2004.bash
Last active December 16, 2021 02:56 — forked from tmarkettos/install-kde-neon-on-ubuntu-2004.bash
Install KDE Neon on top of vanilla Ubuntu 20.04
#!/bin/bash
# SPDX-License-Identifier: BSD-2-Clause
# SPDX-FileCopyrightText: 2020 Theo Markettos <git@markettos.org.uk>
# Script to install KDE Neon on top of Ubuntu 20.04
#
# The KDE Neon site says "A web search should quickly give you relevant information on how to do this. "
# but I didn't find any, so worked it out from first principles