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 AppendPaths(paths): | |
"""Append all the paths with DLLs to be used by the script to the Python Path""" | |
import sys | |
for p in paths: | |
sys.path.append(p) | |
def AddReferences(refs): | |
"""Add references to the required DLLs""" | |
import clr |
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
import datetime | |
import re | |
import warnings | |
def strftime(dt, fmt): | |
if dt.year < 1900: | |
# create a copy of this datetime, just in case, then set the year to | |
# something acceptable, then replace that year in the resulting string | |
tmp_dt = datetime.datetime(datetime.MAXYEAR, dt.month, dt.day, | |
dt.hour, dt.minute, |
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
Food by Deliciousness | ||
---|---|---|
Source: Andrew Parnell | ||
Metadata Notes: Things I think are yummy | ||
Food | Rating | |
Bananas | 5 | |
Green Beans | 4 | |
Egg Salad Sandwich | 7 | |
Ice Cream | 10 | |
Vegemite | 3.5 |
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
FROM ubuntu | |
MAINTAINER David Weinstein <[email protected]> | |
# install our dependencies and nodejs | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get -y install python-software-properties git build-essential | |
RUN add-apt-repository -y ppa:chris-lea/node.js | |
RUN apt-get update | |
RUN apt-get -y install nodejs |
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
#MIT License | |
# | |
#Copyright (c) 2017 Daniele Andreis | |
#Permission is hereby granted, free of charge, to any person obtaining a copy | |
#of this software and associated documentation files (the "Software"), to deal | |
#in the Software without restriction, including without limitation the rights | |
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
#copies of the Software, and to permit persons to whom the Software is | |
#furnished to do so, subject to the following conditions: | |
# |
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
import React from 'react' | |
export default class extends React.Component { | |
constructor () { | |
super() | |
this.state = { components: undefined } | |
this.markers = new WeakMap() | |
} | |
componentDidMount () { |
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
FROM python:3.6-slim-stretch | |
ADD requirements.txt /tmp/requirements.txt | |
RUN apt-get update && \ | |
apt-get install -y \ | |
build-essential \ | |
make \ | |
gcc \ | |
locales \ |
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
require 'json' | |
require 'csv' | |
hash = JSON.parse(File.read('querydata.json')) | |
CSV.open('data.csv', 'w') do |csv| | |
hash['results'].each do |result| | |
data = result['result']['data'] | |
descriptor = data['descriptor'] | |
dsr = data['dsr'] |
I had a large dataset in postgis and wanted to avoid the hassle of first exporting it to a several GB geojson file before tiling it with Tippecanoe.
ogr2ogr -f GeoJSON /dev/stdout \
PG:"host=localhost dbname=postgres user=postgres password=thepassword" \
-sql "select * from a, roi where a.geom && roi.geom" \
| docker run -i -v ${PWD}:/data tippecanoe:latest tippecanoe \
--output=/data/yourtiles.mbtiles
OlderNewer