Skip to content

Instantly share code, notes, and snippets.

abubelinha /
Created April 25, 2024 17:09 — forked from rudolfbyker/
Split WAV files at silence
#!/usr/bin/env python
from import wavfile
import os
import numpy as np
import argparse
from tqdm import tqdm
# Utility functions
abubelinha /
Created April 21, 2024 23:25 — forked from BlueNexus/
Python to Pseudocode converter
import os.path
import re
1. Create a file with the following code
2. Put the file you want to convert into the same folder as it, and rename it to ""
3. Add a "#F" comment to any lines in the code which have a function call that doesn't assign anything (so no =),
as the program cannot handle these convincingly
4. Run the converter file
abubelinha / wikidata+pandas.ipynb
Created March 31, 2024 22:49 — forked from sirex/wikidata+pandas.ipynb
Wikidata + Python Pandas.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
abubelinha / Vob2Mp4.bat
Created March 6, 2024 19:16 — forked from andreasbotsikas/Vob2Mp4.bat
Convert DVD to mp4 using ffmpeg
REM Download ffmpeg from
REM Place ffmpeg.exe in the folder with the vob files
REM Merge all vob files into one
REM VTS_01_0.VOB is usually the menu which you may not want
if exist VTS_01_7.VOB (
copy /b VTS_01_1.VOB+VTS_01_2.VOB+VTS_01_3.VOB+VTS_01_4.VOB+VTS_01_5.VOB+VTS_01_6.VOB+VTS_01_7.VOB ConCat.vob
) else if exist VTS_01_6.VOB (
copy /b VTS_01_1.VOB+VTS_01_2.VOB+VTS_01_3.VOB+VTS_01_4.VOB+VTS_01_5.VOB+VTS_01_6.VOB ConCat.vob
) else if exist VTS_01_5.VOB (
abubelinha / annotorious-firebase.html
Created December 16, 2023 20:19 — forked from rsimon/annotorious-firebase.html
Using Firebase as Annotation Backend for Annotorious
<!DOCTYPE html>
<meta charset="utf-8" />
<title>Annotorious | Firebase Demo</title>
<link href="" rel="stylesheet">
html, body {
abubelinha / annotorious-opencv-find-contours.js
Created December 16, 2023 20:00 — forked from rsimon/annotorious-opencv-find-contours.js
Sample code for AnnotoriousOSD that automates polygon selection by tracing contours in the selected image section.
import OpenSeadragon from 'openseadragon';
import * as Annotorious from '@recogito/annotorious-openseadragon';
import '@recogito/annotorious-openseadragon/dist/annotorious.min.css';
* Basic concept for this is from the official OpenCV docs:
abubelinha / Caddyfile
Created December 16, 2023 12:45 — forked from jpoehls/Caddyfile
Caddyfile PHP on Windows
http://localhost:8080 {
startup php.cmd &
fastcgi / php
abubelinha /
Created November 27, 2023 13:18 — forked from alanorth/
Checking if GPS points are in a polygon with Shapely
#!/usr/bin/env python
# Given the three points below, this code prints:
# $ ~/src/
# True
# True
# False
# Requires shapely to be installed in the virtual environment.
abubelinha /
Created November 27, 2023 13:15 — forked from alanorth/
POSTing items to the DSpace 6 REST API

POSTing an item to /collections

First log in to get the JSESSIONID cookie and then post the item (I'm using httpie instead of curl):

$ http -f POST password=fuuuu
$ http POST Cookie:JSESSIONID=EABAC9EFF942028AA52DFDA16DBCAFDE < item-object.json
HTTP/1.1 200 OK
Connection: keep-alive
Content-Encoding: gzip
abubelinha /
Created April 10, 2023 08:24 — forked from phillipkent/
Python code using the python-docx module to convert a DOCX file to HTML
# Converts a docx file with tables and images to (simple) HTML
# Requires the Python module 'python-docx' <>
# Example use:
# >>> s = convert('./SOURCEDIR', 'SAMPLE.docx')
# >>> print(s)
# or
# $ python .\ > temp.html