Skip to content

Instantly share code, notes, and snippets.

@jlmalone
jlmalone / TextExtract.py
Created April 17, 2024 15:23
Extract the text out of an ePub
# pip install ebooklib beautifulsoup4 python-dotenv
import ebooklib
from dotenv import load_dotenv
import os
from ebooklib import epub
from bs4 import BeautifulSoup
def extract_text_from_epub(file_path):
book = epub.read_epub(file_path)
@jlmalone
jlmalone / whisperpy.py
Last active June 22, 2023 08:54
The script will transcribe the audio and create an SRT file with the same name as the input file (or YouTube video title) in the current directory. The name of the SRT file will be printed as the output.
# Usage
# python3 whisperpy.py [filename_input or youtube url]
# The script will transcribe the audio and create an SRT file with the same name as the input file
# (or YouTube video title) in the current directory. The name of the SRT file will be printed as the output.
import sys
import whisper
import hashlib
from pytube import YouTube

Keybase proof

I hereby claim:

  • I am jlmalone on github.
  • I am jlawrenceiv (https://keybase.io/jlawrenceiv) on keybase.
  • I have a public key ASCAWsoIc8Fgv4vI1mGEAjD6vKBug_pyJ-DlJULrSW9Q8wo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am jlmalone on github.
  • I am jlawrenceiv (https://keybase.io/jlawrenceiv) on keybase.
  • I have a public key ASCAWsoIc8Fgv4vI1mGEAjD6vKBug_pyJ-DlJULrSW9Q8wo

To claim this, I am signing this object:

package com.example.retrofit;
import java.lang.annotation.Annotation;
import at.rags.morpheus.Morpheus;
import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
import com.google.gson.reflect.TypeToken;
import com.squareup.okhttp.RequestBody;
import com.squareup.okhttp.ResponseBody;
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Matrix;
import android.os.Build;
import android.util.AttributeSet;
import android.widget.ImageView;
public class ImageViewTopCrop extends ImageView
{
@jlmalone
jlmalone / legibility.xml
Last active August 31, 2016 07:01
Legibility Java Code Style - for Android Studio or Intellij
<code_scheme name="Legibility">
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="true" />
<option name="SMART_TABS" value="true" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />