Skip to content

Instantly share code, notes, and snippets.

View endes0's full-sized avatar
📖
Studiying && !coding

endes0

📖
Studiying && !coding
  • Spain
View GitHub Profile
#!/usr/bin/env python3
# Download your data dump and place this file in the messages folder of your data dump.
# Then run it!
from datetime import datetime, timedelta, timezone
import dateutil.parser
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import matplotlib.dates as mdates
import csv
BooSt for SoC09S 1.0.3 (2008/08/01)
Start ARM1136JF-S ... RTOS
Start ARM926EJ-S ... Linux
MiLL for Soc09S 2.0.0 (2011/09/15)
Uncomp.done
Linux version 2.6.35.8-arm1 (gcc version 4.5.1 (epson-20130312) ) #1 Wed Aug 2 16:05:55 JST 2017
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: ARM-EPSON09
@endes0
endes0 / Decrypt_db.py
Created April 21, 2023 13:00
Decrypt ChipGenius Chips.wdb file database
key = [0x19, 0x86, 0x10, 0x18]
with open('Chips.wdb', 'rb') as f:
f.seek(0x2)
date = f.readline()
f.seek(0xE)
magic = f.read(2)
print("DB date: " + date.decode('utf-8'))
print("DB magic: " + magic.decode('utf-8'))
print("OK" if magic == b'WR' else "Invalid magic")
from TTS.api import TTS
import PyPDF2
import subprocess
import os
import torch
import re
import argparse
# helpers
@endes0
endes0 / README.md
Last active October 5, 2023 10:16
PDF File to audiobook using facebook fairseq TTS.

This script will create an audio file for each page of a PDF, reading it trought Fastspeech2 using fairseq framework. Perfect for creating audiobooks. It also reads the PDF table of contents and groups the files by the top level charapters. Finally it creates a playlist.

Tested on Ubuntu 22.04.1 and Python 3.10.6

Usage

$ pdfToAudio.py --pdf <your pdf file here>

Requeriments

You should have the conmand pdftotext from poppler-utils installed:

@endes0
endes0 / wayback-digest-gen.py
Last active September 20, 2022 16:45
Wayback Machine (web.archive.org) Digest generator
#!/usr/bin/env python3
import sys
import os
import hashlib
import base64
# Get the file name to generate the digest for
if len(sys.argv) < 2:
@endes0
endes0 / Main.java
Created August 1, 2020 20:15
Bluethoot auth nilox x2+
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
var auth = new Main();
System.out.println(auth.encryptionStringOfValue("32B81FD715C9"));
}
static char[] inv = {220, '~', 254, 7, 'q', '^', 245, 249, 217, 't', 248, 168, 205, 218, 'w', 'P'};
@endes0
endes0 / ThreadPool.hx
Created January 20, 2017 22:02 — forked from hamaluik/ThreadPool.hx
Platform-agnostic thread pool for Haxe / OpenFL
package com.blazingmammothgames.util;
#if neko
import neko.vm.Thread;
import neko.vm.Mutex;
#elseif cpp
import cpp.vm.Thread;
import cpp.vm.Mutex;
#end