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 | |
| import csv | |
| ################################################################### | |
| # Handling inputs | |
| ################################################################### | |
| def getInput(csvFileName): | |
| with file(csvFileName) as f: | |
| reader = csv.DictReader(f, fieldnames=['Subject', 'CollectiveNoun', 'Notes', 'Source']) |
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
| from pydrive.auth import GoogleAuth | |
| from pydrive.drive import GoogleDrive | |
| """API calls to download a very large google drive file. The drive API only allows downloading to ram | |
| (unlike, say, the Requests library's streaming option) so the files has to be partially downloaded | |
| and chunked. Authentication requires a google api key, and a local download of client_secrets.json | |
| Thanks to Radek for the key functions: http://stackoverflow.com/questions/27617258/memoryerror-how-to-download-large-file-via-google-drive-sdk-using-python | |
| """ |
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
| function check_for_virtual_env { | |
| [ -d .git ] || git rev-parse --git-dir &> /dev/null | |
| if [ $? == 0 ]; then | |
| local ENV_NAME=`basename \`pwd\`` | |
| if [ "${VIRTUAL_ENV##*/}" != $ENV_NAME ] && [ -e $WORKON_HOME/$ENV_NAME/bin/activate ]; then | |
| workon $ENV_NAME && export CD_VIRTUAL_ENV=$ENV_NAME | |
| fi | |
| elif [ $CD_VIRTUAL_ENV ]; then |
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 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
| echo 'install 8192cu /sbin/modprobe --ignore-install 8192cu; /bin/echo "0df6 0077" >| /sys/bus/usb/drivers/rtl8192cu/new_id' | sudo tee /etc/modprobe.d/8192cu.conf | |
| sudo echo "8192cu" >> /etc/modules |
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
| " open ctag in tab/vertical split | |
| map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR> | |
| map <leader><C-\> :vsp <CR>:exec("tag ".expand("<cword>"))<CR> |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!