sudo yum -y update
sudo yum-config-manager --enable epel
sudo yum -y install make automake gcc gcc-c++ libcurl-devel proj-devel geos-devel
cd /tmp
curl -L http://download.osgeo.org/gdal/2.0.0/gdal-2.0.0.tar.gz | tar zxf -
cd gdal-2.0.0/
./configure --prefix=/usr/local --without-python
make -j4
sudo make install
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
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear! | |
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy. | |
* Off the top of my head * | |
1. Fork their repo on Github | |
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it | |
git remote add my-fork [email protected] |
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
/* | |
Taken and cribbed from blog.datalicious.com/free-download-all-australian-postcodes-geocod | |
May contain errors where latitude and longitude are off. Use at own non-validated risk. | |
*/ | |
SET NAMES utf8; | |
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; | |
DROP TABLE IF EXISTS postcodes_geo; |
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 find_all_cycles(G, source=None, cycle_length_limit=None): | |
"""forked from networkx dfs_edges function. Assumes nodes are integers, or at least | |
types which work with min() and > .""" | |
if source is None: | |
# produce edges for all components | |
nodes=[i[0] for i in nx.connected_components(G)] | |
else: | |
# produce edges for components with source | |
nodes=[source] | |
# extra variables for cycle detection: |
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 python | |
import numpy | |
from mpi4py import MPI | |
NUMARRAYS = 100 | |
ARRAYSIZE = 10000 | |
ASK_FOR_WORK_TAG = 1 | |
WORK_TAG = 2 | |
WORK_DONE_TAG = 3 |
Push an individual file from a repo to a new repo and keep command history associated with that file:
git clone <original repo url> temp-repo
cd temp-repo
git remote rm origin
git rm -rf .
git checkout HEAD -- <filename>
git commit -m "<commit message>"
git remote add origin <new repo url> # comments
git pull
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
sudo yum-config-manager --enable epel | |
sudo yum install gdal-python | |
sudo yum -y update | |
sudo yum -y install make automake gcc gcc-c++ libcurl-devel proj-devel geos-devel | |
cd /tmp | |
curl -L http://download.osgeo.org/gdal/2.2.4/gdal-2.2.4.tar.gz | tar zxf - | |
cd gdal-2.2.4/ | |
./configure --prefix=/usr/local --with-python | |
make -j4 | |
sudo make install |