I hereby claim:
- I am gabefair on github.
- I am gabefair (https://keybase.io/gabefair) on keybase.
- I have a public key ASDVjNBG1nwFHl8aD2wAOU-NrsUfrpQq5z4OKv7wh0C1wQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Here I share my work notes to get custom layers that were once in ArcGIS to serve on a Ubuntu web host.
# pylint: disable=unsubscriptable-object | |
import sys, os, json, datetime, platform, argparse, traceback, mechanize | |
from time import time | |
try: | |
import mechanize | |
except ImportError: | |
print("Please run `pip install mechanize` from a command line") | |
exit() |
# restore_packages.R | |
# | |
# installs each package from the stored list of packages | |
# source: http://hlplab.wordpress.com/2012/06/01/transferring-installed-packages-between-different-installations-of-r/ | |
load("~/installed_packages.rda") | |
for (count in 1:length(installedpackages)) { | |
install.packages(installedpackages[count]) | |
} |
import sys, os | |
try: | |
import pandas as pd | |
except ImportError: | |
print("Please run `pip install pandas` from a command line") | |
exit() | |
def get_file_head(file_name): |
#!/bin/bash | |
cat << EOF | |
███████╗███████╗████████╗██╗ ██╗ | |
██╔════╝██╔════╝╚══██╔══╝██║ ██║ by Adrian Vollmer | |
███████╗█████╗ ██║ ███████║ [email protected] | |
╚════██║██╔══╝ ██║ ██╔══██║ SySS GmbH, 2017 | |
███████║███████╗ ██║ ██║ ██║ https://www.syss.de | |
╚══════╝╚══════╝ ╚═╝ ╚═╝ ╚═╝ | |
EOF |
import pandas as pd | |
from pymongo import MongoClient | |
client = MongoClient("mongodb://localhost:27017") | |
db = client.database_Name | |
collection_conn = db['collection_name'] | |
collection_cursor = collection_conn.find() | |
collection_pandas_df = pd.DataFrame(list(collection_cursor)) |
# Gabriel Fair | |
# Please suggest any improvements: http://keybase.io/gabefair | |
import mmap | |
import re | |
import argparse | |
import sys | |
import progressbar | |
from time import sleep | |
import os | |
from time import clock |
import sys, os, datetime | |
from time import time | |
def update_progress(total_imported, skipped_files, current_location): | |
text = str(total_imported) + "/" + str(total_imported+skipped_files) + " imported. Looking in folder: " + current_location | |
sys.stdout.write('\r' + text) | |
sys.stdout.flush() | |
def main(): | |
start_time = datetime.datetime.fromtimestamp(time()) |
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |