Skip to content

Instantly share code, notes, and snippets.

View sammlapp's full-sized avatar

Sam Lapp sammlapp

View GitHub Profile

Use cases

Load, inspect, and manipulate audio files

``` from opensoundscape import Audio Audio.from_file('/path/audio.wav') ```

Head to the Audio tutorial notebook

Building wheels for collected packages: antlr4-python3-runtime, lmdb, tokenizers
Building wheel for antlr4-python3-runtime (setup.py) ... done
Created wheel for antlr4-python3-runtime: filename=antlr4_python3_runtime-4.9.3-py3-none-any.whl size=144554 sha256=4592393736e0f23d96921e75beb495b156d5ef90144ed466ddfbfbc29d342b58
Stored in directory: /Users/SML161/Library/Caches/pip/wheels/12/93/dd/1f6a127edc45659556564c5730f6d4e300888f4bca2d4c5a88
Building wheel for lmdb (setup.py) ... done
Created wheel for lmdb: filename=lmdb-1.4.1-cp310-cp310-macosx_11_0_arm64.whl size=93571 sha256=c35657cea497e13b71ac47d3f7cbc918c37c8f83acc739baff46ec3c418be390
Stored in directory: /Users/SML161/Library/Caches/pip/wheels/e6/00/19/a038745f7b5c39772fad66e071042f5ecbefb215235c520e03
Building wheel for tokenizers (pyproject.toml) ... error
error: subprocess-exited-with-error
@sammlapp
sammlapp / outlook_to_google_cal_sync
Created January 19, 2024 21:27
Sync Outlook to Google Calendar
1. Open Outlook _in a browser_ not in the desktop app
2. Click the calendar icon on left, and find the calendar you want to sync on the left bar; click the menu (...)
3. Click sharing and permissions
4. Send invite to your Google email address
5. In the outlook pane, right click on the calendar's link and choose copy url
6. In Google calendar, in left pane next to "Other Calendars", click + and then "from URL"
7. Paste the URL
@sammlapp
sammlapp / inreach_setup.md
Created July 6, 2024 01:00
Syncing Garmin Inreach Mini 2 with messaging settings/presents
  • add contacts and choose recipients for "Check-In" messages at https://explore.garmin.com/Messages
  • on phone, install Garmin Explore app (The Garmin Messenger app allows you to send/receive messages when paired, but doesn't allow configuration)
  • on phone, turn on bluetooth and "allow new connections" if necessary
  • if not first time using InReach Mini, go to Menu -> Settings -> Phone -> pair (enters Pairning mode); then in Garmin Explore app, go to devices tab, click through screens to connect to your device
  • Messaging settings will now sync between website and device, can take a couple minutes
  • Check on handheld: menu, check in -> should see your check in presets. Selecting one shows contact list and message content.

Note: the Garmin Explore phone app is the only way to sync messages from the website to the handheld device, and the website is the only way to set up the message settings. Various instructions mention Garmin Messenger App, but at least for iPhone as

"""this script extracts a measurement of sound pressure level from an audio file
specifically, it
(1) calculates a spectrogram
(2) subtracts a spectral noise profile based on the Nth percentile value of each spectrogram row
(3) calibrates the spectrogram to sound pressure level using a calibration curve from a csv file
(4) reconstructs a time series of rms values from the spectrogram
(5) extracts the maximum value of rms and converts to dB
"""
@sammlapp
sammlapp / Debugging in Python - lab meeting.md
Created April 10, 2025 13:49
Debugging in Python - lab meeting

how to debug, and how to ask for help debugging

warnings vs errors: know the difference

breakpoints: interactive debugging in VS Code

print everything out: check intermediate values

reading error messages carefully