This file contains hidden or 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 sys | |
debug = True | |
def exceptionHandler(exception_type, exception, traceback, debug_hook=sys.excepthook): | |
'''Print user friendly error messages normally, full traceback if DEBUG on. | |
Adapted from http://stackoverflow.com/questions/27674602/hide-traceback-unless-a-debug-flag-is-set | |
''' | |
if debug: | |
print('\n*** Error:') | |
# raise |
This file contains hidden or 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
# Save a dictionary into a pickle file. | |
# https://wiki.python.org/moin/UsingPickle | |
import pickle | |
favorite_color = { "lion": "yellow", "kitty": "red" } | |
pickle.dump( favorite_color, open( "test.pickle", "wb" )) | |
# Load the dictionary back from the pickle file. | |
more_favorite_colors = pickle.load(open( "test.pickle", "rb" )) | |
# favorite_color is now { "lion": "yellow", "kitty": "red" } |
OneDrive for Mac is having huge issues so I'm trying to move the files out of its folder and start over again... but I'm being blocked by extended attributes named: com.apple.fileutil.PlaceholderData
.
You can see them with: ls -alh@e
or xattr <dir name>
Example: https://www.reddit.com/r/onedrive/comments/dk8hcx/onedrive_on_macos_is_adding_extendedfile/
Remove them:
sudo xattr -rd com.apple.fileutil.PlaceholderData <dir name>
This file contains hidden or 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 python | |
""" | |
Stitch multiple files worth of AWS transcripts together. | |
Does not attempt to match speakers across filesm but does label all speaker changes. | |
Usage: | |
python stitch_transcript.py *.mp3.json -o out.txt | |
See blog post: http://turtlemonvh.github.io/aws-transcribe-for-long-zoom-meetings.html |
Donkey Car Install on Raspberry Pi3
Following these instructions: https://docs.donkeycar.com/guide/robot_sbc/setup_raspberry_pi/
When you get this far...
pip install opencv-python
And this fails....
python -c "import cv2"
This file contains hidden or 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
(* | |
Use AppleScript to repeatedly click some part of the screen on a Mac 50 times with a 2 second pause between clicks (use on poorly designed applications that don't let you repeat a certain action). | |
https://apple.stackexchange.com/questions/266784/how-do-i-make-the-mouse-click-at-current-location-using-applescript | |
Comment: To supplement @jksoegaard's answer: one can also find cursor positions using "Screenshot" tool, which may be activated by Cmd+Shift+4 shortcut. Then just point the cursor to any area and remember the numbers that is shown near the pointer. | |
*) | |
repeat 50 times | |
tell application "System Events" | |
click at {1073, 373} |
Install ffmpeg (on a Mac):
brew install ffmpeg --with-libvorbis --with-sdl2 --with-theora
Use ffmpeg for the conversion:
This file contains hidden or 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
# Add to .bashrc for Python binaries: | |
# Python and pip3 | |
export PATH="${PATH}:/home/{username}/.local/bin" |