Author: Sean Gillies Version: 1.0
This document describes a GeoJSON-like protocol for geo-spatial (GIS) vector data.
declare @tableName varchar(200) | |
declare @columnName varchar(200) | |
declare @nullable varchar(50) | |
declare @datatype varchar(50) | |
declare @maxlen int | |
declare @sType varchar(50) | |
declare @sProperty varchar(200) | |
DECLARE table_cursor CURSOR FOR |
#!/bin/bash | |
# Update | |
apt-get update && apt-get upgrade -y | |
# Install python+packages and curl | |
apt-get install -y python3 python3-pip python3-numpy python3-scipy python3-matplotlib ipython3 ipython3-notebook python3-pandas python3-nose curl wget | |
# Update pip | |
python3 -m easy_install -U pip | |
# Correctinng python file | |
# which causes stuck during package installation |
# -*- coding: utf-8 -*- | |
""" | |
LICENSE: BSD (same as pandas) | |
example use of pandas with oracle mysql postgresql sqlite | |
- updated 9/18/2012 with better column name handling; couple of bug fixes. | |
- used ~20 times for various ETL jobs. Mostly MySQL, but some Oracle. | |
to do: | |
save/restore index (how to check table existence? just do select count(*)?), | |
finish odbc, |
pyspark_udf.py | |
============== | |
from pyspark.sql.types import StringType | |
from pyspark.sql.functions import udf | |
maturity_udf = udf(lambda age: "adult" if age >=18 else "child", StringType()) | |
df = sqlContext.createDataFrame([{'name': 'Alice', 'age': 1}]) | |
df.withColumn("maturity", maturity_udf(df.age)) |
https://gist.github.com/amirziai/2808d06f59a38138fa2d |
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:a8c266a3e6c4963abeca1c7b7a0656aee2fb5e524912abbc1f083e942694e840" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
# http://stackoverflow.com/questions/748675/finding-duplicate-files-and-removing-them/748908#748908 | |
import sys | |
import os | |
import hashlib | |
def chunk_reader(fobj, chunk_size=1024): | |
"""Generator that reads a file in chunks of bytes""" | |
while True: | |
chunk = fobj.read(chunk_size) |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
./bin/drill-embedded
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
Apr 19, 2017 4:53:50 PM org.glassfish.jersey.server.ApplicationHandler initialize
INFO: Initiating Jersey application, version Jersey: 2.8 2014-04-29 01:25:26...
apache drill 1.10.0
"drill baby drill"
Now visit link http://localhost:8047 to open up Apache Drill explorer and configure S3 storage plugin refer