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
# Sync a subtitle file, both for offset and drift | |
# | |
# Find the time for the first and last spoken line, both in the audio and subtitles | |
# Fill in the times, in/out file names and encoding | |
# Run! | |
from datetime import timedelta | |
import srt | |
from srt import Subtitle |
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 Data from iCloud Notes to Joplin | |
# Developed and tested on Ubuntu only | |
# 1. Add a gmail connection to Notes | |
# 2. Copy all your note folders into that gmail space in Notes | |
# 3. Wait for all the notes to sync to your mailbox | |
# 4. Download all emails tagged with Notes with takeout.google.com | |
# 5. For each of the resulting mbox files, run this script | |
# 6. Import the markdown folder (with front matter) into Joplin | |
# Requires |
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
blueprint: | |
name: Control with sensor | |
description: 'Set the state based on a binary sensor' | |
domain: automation | |
input: | |
controller: | |
name: First entity | |
selector: | |
entity: | |
controllee: |
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/env python3 | |
import random | |
def remove_door(doors, win, pick1): | |
doors.remove(win) | |
try: | |
doors.remove(pick1) | |
doors = [win, pick1] | |
except ValueError: |