Skip to content

Instantly share code, notes, and snippets.

View pingyangtiaer's full-sized avatar

DynamicPacific pingyangtiaer

View GitHub Profile
@pingyangtiaer
pingyangtiaer / index.html
Created November 1, 2017 21:46
Snap Interaction
<div id="map" class="map"></div>
<form id="options-form" automplete="off">
<div class="radio">
<label>
<input type="radio" name="interaction" value="draw" id="draw" checked>
Draw &nbsp;
</label>
</div>
<div class="radio">
<label>
@pingyangtiaer
pingyangtiaer / sqlite2pg.sh
Created June 20, 2017 22:07 — forked from eclubb/sqlite2pg.sh
Script to import SQLite3 database into PostgreSQL
#!/bin/sh
# This script will migrate schema and data from a SQLite3 database to PostgreSQL.
# Schema translation based on http://stackoverflow.com/a/4581921/1303625.
# Some column types are not handled (e.g blobs).
SQLITE_DB_PATH=$1
PG_DB_NAME=$2
PG_USER_NAME=$3
@pingyangtiaer
pingyangtiaer / upload-gp-proxy-test
Created January 25, 2017 21:45 — forked from phpmaps/upload-gp-proxy-test
Upload file to Geoprocessing Service
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>Upload Proxy Issue</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<style>
html, body, #map {
height: 100%;
@pingyangtiaer
pingyangtiaer / pandas_dbms.py
Created June 1, 2016 16:56 — forked from catawbasam/pandas_dbms.py
Python PANDAS : load and save Dataframes to sqlite, MySQL, Oracle, Postgres
# -*- 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,