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
| ## DirXPath | |
| ## -------- | |
| ## | |
| ## Requirements: | |
| ## ============= | |
| ## Ensure that XMLStarlet is installed on your machine (http://xmlstar.sourceforge.net/) | |
| ## | |
| ## Install | |
| ## ======= | |
| ## Put the following in your .bashrc (Linux/Unix/Cygwin/MinGW) or .bash_profile (Mac) file. Then source the file. |
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 time | |
| def timeit(func=None,loops=1,verbose=False): | |
| if func != None: | |
| def inner(*args,**kwargs): | |
| sums = 0.0 | |
| mins = 1.7976931348623157e+308 | |
| maxs = 0.0 |
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
| ######################################### | |
| ## DAVID'S BASH_PROFILE | |
| ######################################### | |
| # Sys Vars | |
| user='' | |
| pass='' | |
| # XMLStarlet |
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
| set nu | |
| set smarttab | |
| set expandtab | |
| set autoindent | |
| set nocompatible " choose no compatibility with legacy vi | |
| syntax enable | |
| set encoding=utf-8 | |
| set showcmd " display incomplete commands | |
| filetype plugin indent on " load file type plugins + indentation |
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
| # More Info: http://davydany.com/post/32287214449/matplotlibs-basemap-plotting-a-list-of-latitude | |
| def show_map(self, a): | |
| # 'a' is of the format [(lats, lons, data), (lats, lons, data)... (lats, lons, data)] | |
| lats = [ x[0] for x in a ] | |
| lons = [ x[1] for x in a ] | |
| data = [ x[2] for x in a ] | |
| lat_min = min(lats) | |
| lat_max = max(lats) |
NewerOlder