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 random | |
print(random.rand(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
import random | |
print(random.rand(1)) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
: 1619210991:0;/usr/sbin/softwareupdate --install-rosetta --agree-to-license | |
: 1619210991:0;xcode-select --install | |
: 1619210991:0;/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
: 1619210991:0;brew analytics off | |
: 1619210991:0;mkdir -p ~/Documents/screenshots | |
: 1619210991:0;defaults write com.apple.screencapture location /Users/berk/Documents/screenshots && killall SystemUIServer | |
: 1619210991:0;sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
: 1619210991:0;echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/berk/.zprofile | |
: 1619210991:0;eval "$(/opt/homebrew/bin/brew shellenv)" | |
: 1619210991:0;brew update |
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
def delete_samples_by_shapley(dataset, | |
shapley_values, | |
percentage, | |
strategy='best2worst'): | |
''' | |
select samples according to shapley | |
Args: | |
dataset: audio_dataset | |
shapley_values: shapley values dict {'Clip Path': shapley_value} |
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
""" | |
Original Code from: Dr Richard Lord - http://resource.npl.co.uk/acoustics/techguides/speedair/ | |
Based on the approximate formula found in | |
Cramer, Owen. "The variation of the specific heat ratio and the speed of sound | |
in air with temperature, pressure, humidity, and CO2 concentration." | |
The Journal of the Acoustical Society of America 93.5 (1993): 2510-2516. | |
Saturation vapour pressure found in Richard S. Davis, "Equation for the | |
Determination of the Density of Moist Air (1981/91)", Metrologia, |
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 | |
""" | |
Export WAMD metadata from wav files to csv. | |
usage: | |
python3 wamd2csv.py --folder /path/to/folder --csv_file /path/to/output.csv | |
Adopted from https://github.com/riggsd/guano-py/blob/master/bin/wamd2guano.py | |
""" |
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
# source for Grouse description: https://birdsoftheworld.org/bow/species/wilpta/cur/introduction#vocal | |
{ | |
'default': | |
'write an audio caption describing the sound', | |
'label_in_prompt': | |
'', | |
'grouse01': | |
"""provide labels for the audio file, could it be a Grouse? | |
here is detailed information on Grouse call types: | |
Both Sexes. (1) Kok is a short (50 ms) clucking call; \ |
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
#!/bin/bash | |
# Check if an IP address is provided | |
if [ -z "$1" ]; then | |
echo "Usage: $0 <IP>" | |
exit 1 | |
fi | |
# Check if the provided argument is a valid IP address | |
if ! echo "$1" | grep -Pq '^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'; then |