- Download the SDK from ESRI's website http://resources.arcgis.com/content/geodatabases/10.0/file-gdb-api
- Extract the SDK, and put the contents of the directory in a known location, I used
~/local/filegdb
. Here's an example path to one of the files:~/local/filegdb/lib/libFileGDBAPI.dylib
- I use
~/local/filegdb
so it can stay isolated in it's own place. You can put it anywhere, but the next few steps might be different. - Go into the directory containing the FileGDB SDK, e.g.
~/local/filegdb
- ESRI built these dylib's using
@rpath
's, so to avoid needing to mess withDYLD_LIBRARY_PATH
, I updated the@rpath
's usinginstall_name_tool
. There might be a more elegant way to handle this. If so, comments are welcome! - Here are the commands I used to patch the dylibs, this is not required if you want to use
DYLD_LIBRARY_PATH
yourself:
- Download the SDK from ESRI's website http://www.esri.com/apps/products/download/index.cfm?fuseaction=#File_Geodatabase_API_1.3
- Extract the SDK, and put the contents of the directory in a known location, I used
~/local/filegdb
. Here's an example path to one of the files:~/local/filegdb/FileGDB_API/lib/libFileGDBAPI.dylib
- I use
~/local/filegdb
so it can stay isolated in it's own place. You can put it anywhere, but the next few steps might be different. - Go into the directory containing the FileGDB SDK, e.g.
~/local/filegdb/FileGDB_API
- ESRI built these dylib's using
@rpath
's, so to avoid needing to mess withDYLD_LIBRARY_PATH
, I updated the@rpath
's usinginstall_name_tool
. There might be a more elegant way to handle this. If so, comments are welcome! - Here are the commands I used to patch the dylibs, this is not required if you want
Steps: | |
Set up EBS | |
21Created 1 TB EBS | |
Created 64 Bit Amazon Linux AMI 2012.09 M1 Medium 3.7 gb ram, 2 ECUs | |
Connect to ec2 instance via ssh | |
chmod 400 IFS-KeyPair.pem | |
ssh -v -i IFS-KeyPair.pem [email protected] | |
Note: Do not replace ec2-user with your user id. This is a AWS Amazon AMI requirement. |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html
'''Provides utility functions for encoding and decoding linestrings using the | |
Google encoded polyline algorithm. | |
''' | |
def encode_coords(coords): | |
'''Encodes a polyline using Google's polyline algorithm | |
See http://code.google.com/apis/maps/documentation/polylinealgorithm.html | |
for more information. | |
In this tutorial, I will be going over to how to deploy a Django app from start to finish using AWS and EC2. Recently, my partner Tu and I launched our app Hygge Homes (a vacation home rental app for searching and booking vacation homes based off Airbnb) and we wanted to share with other developers some of the lessons we learned along the way.
Following this tutorial, you will have an application that has:
- An AWS EC2 server configured to host your application
- SSL-certification with Certbot
- A custom domain name
- Continuous deployment with Github Actions/SSM Agent
''' | |
get the dock status and compute summary statistics for tweeting | |
''' | |
#need to wrap in try-catch | |
r = requests.get('http://www.citibikenyc.com/stations/json') | |
totalDocks_sum = 0 | |
avail_bikes_sum = 0 | |
in_service_station_sum = 0 | |
for station in r.json()['stationBeanList']: | |
if station['statusKey'] == 1: |
#user1 account | |
Host github.com-user1 | |
HostName github.com | |
User git | |
AddKeysToAgent yes | |
UseKeychain yes | |
IdentityFile ~/.ssh/id_rsa | |
#user2 account | |
Host github.com-user2 |
# Download the proto files | |
wget http://datamine.mta.info/sites/all/files/pdfs/nyct-subway.proto.txt | |
wget https://developers.google.com/transit/gtfs-realtime/gtfs-realtime.proto | |
# rename the NYCT proto file to drop the .txt extension | |
mv nyct-subway.proto.txt nyct-subway.proto | |
# install the protobuf-compiler | |
sudo yum install protobuf-compiler |
The Problem:
If you follow the open data scene, you'll often hear about how the "feedback loop" for making corrections, comments, or asking questions about datasets is either fuzzy, disjointed, or nonexistent. If I know for a fact that something in a government dataset is wrong, how do I get that record fixed? Do I call 311? Will the operator even know what I am talking about if I say I want to make a correction to a single record in a public dataset? There's DAT. There's storing your data as a CSV in Github. These approaches work, but are very much developer-centric. (Pull requests and diffs are hard to wrap your head around if you spend your day analyzing data in Exce