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
""" | |
FCC license search utility. | |
By ThreeSixes (https://gist.github.com/ThreeSixes/d80299a3e53ef3bf9ac14d0445cc75d3) 3 Oct, 2022. | |
""" | |
import requests | |
class FCCAPIError(RuntimeError): | |
""" |
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
# This goes into your ~/.bash_profile in OS X, otheriwse it will typically be your ~/.bashrc. | |
# This can be called and put in your prompt (PS1 variable) using $(parse_nvm). | |
parse_nvm() { | |
nvm_status='' | |
nvm which > /dev/null 2>&1 | |
if [ "$?" -eq "0" ]; then | |
nvm_status=`nvm which | grep "Found '" | sed "s/^Found .* with version <\(.*\)>/\1/g"` | |
nvm_status=" <nvm-$nvm_status>" |
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
# This goes into your ~/.bash_profile in OS X, otheriwse it will typically be your ~/.bashrc. | |
# This can be called and put in your prompt (PS1 variable) using $(parse_python). | |
parse_python() { | |
python_status='' | |
pipenv_data=`pipenv --venv 2> /dev/null` | |
if [ "$?" -eq "0" ]; then | |
echo "$pipenv_data" | grep 'No virtualenv has been created for this project yet!' > /dev/null 2>&1 | |
if [ "$?" -ne "0" ]; then |
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
# This goes into your ~/.bash_profile in OS X, otheriwse it will typically be your ~/.bashrc. | |
# This can be called and put in your prompt (PS1 variable) using $(parse_git). | |
parse_git() { | |
git_status_flags='' | |
git status > /dev/null 2>&1 | |
if [ "$?" -eq "0" ]; then | |
current_branch=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` | |
git status | grep 'Your branch is ' > /dev/null 2>&1 |
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
def getImoCheck(imo): | |
""" | |
Check a given IMO number to make sure the check value is accurate and if the IMO is good. Accepts the 7-digit IMO number as an integer argument, and returs a boolean value where True indicates a good IMO. | |
By ThreeSixes (https://github.com/ThreeSixes) | |
""" | |
# Set our return value. | |
retVal = False | |
# Starting divisor to get digits staring at the seventh. | |
divisor = 1000000 |