- Open Automator
- Create a new document
- Select Quick Action
- Set “Service receives selected” to
files or folders
inany application
- Add a
Run Shell Script
action- your default shell should already be selected, otherwise use
/bin/zsh
for macOS 10.15 (”Catalina”) or later - older versions of macOS use
/bin/bash
- your default shell should already be selected, otherwise use
- if you're using something else, you probably know what to do 😉
Loading
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
def get_ticker(company_name): | |
yfinance = "https://query2.finance.yahoo.com/v1/finance/search" | |
user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36' | |
params = {"q": company_name, "quotes_count": 1, "country": "United States"} | |
res = requests.get(url=yfinance, params=params, headers={'User-Agent': user_agent}) | |
data = res.json() | |
company_code = data['quotes'][0]['symbol'] | |
return company_code |
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
curl -s https://api.github.com/users/milanboers/repos | grep \"clone_url\" | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g' | xargs -n1 git clone |
sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0
sudo apt-get install ffmpeg libav-tools
sudo pip install pyaudio