This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
rclone_remote_path = 'drive:/temp' | |
dirs = re.findall('\d+:\d+:\d+\ +-1\ +(.*?)\n', | |
$(rclone lsd -R @(rclone_remote_path))) | |
file_dirs = re.findall('\d+\ +(.*\/?(?=\/))', | |
$(rclone ls @(rclone_remote_path))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://stackoverflow.com/questions/10822635/get-the-number-of-rows-in-table-using-sqlalchemy | |
num_rows = session.query(MyTable).count() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find $1 -name "*.wav" -exec sh -c 'sox "$1" --bits 16 "${1%.*}.flac"; rm "$1"' _ {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# Pandoc filter that grabs the BibTeX code block from each note file | |
# and then uses bibtexparser to add a "short title" entry in the "note" field, | |
# appending finished BibTeX entry to a bibliography file. | |
from pandocfilters import toJSONFilter, CodeBlock | |
# https://github.com/sciunto/python-bibtexparser | |
import bibtexparser |
NewerOlder