Skip to content

Instantly share code, notes, and snippets.

View wanghaoLisa's full-sized avatar

Lisa wanghaoLisa

  • Beijing
View GitHub Profile
"""
http://sciience.tumblr.com/post/101026151217/quick-python-script-for-making-voronoi-polygons
"""
import os, osgeo, math, numpy as np
from osgeo import gdal, ogr, osr
from scipy.spatial import Delaunay
import scipy
root = 'E:/google_places/' # directory with input point shp
input_shp_full = root+'cafe.shp' # point shp
fieldUID = 'Field1' # field in point shp with pt IDs
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2"> <Document><name><![CDATA[results_add20ceil]]></name><Snippet maxLines='1'>Earth Point Excel To KML</Snippet><open>1</open><Style><IconStyle><Icon></Icon></IconStyle><BalloonStyle><text><![CDATA[$[description]]]></text></BalloonStyle></Style><description><![CDATA[<table style="width: 300px;"><tr><td style="vertical-align: top;">Source</td><td style="width: 100%;">results_add20ceil.csv</td></tr><tr><td>DateTime</td><td>2016-07-20 05:32:59 UTC <br/></td></tr></table><br/>&copy;2016 Earth Point<br/><a target='_blank' href='http://www.earthpoint.us'>www.earthpoint.us</a><br/><br/>For illustration only.&nbsp; User to verify all information. ]]></description><StyleMap id="Sheet1Map1"><Pair><key>normal</key><styleUrl>#NormalSheet1Map1</styleUrl></Pair><Pair><key>highlight</key><styleUrl>#HighlightSheet1Map1</styleUrl></Pair></StyleMap><Style id="NormalSheet1Map1"><IconStyle><scale>1</s
@wanghaoLisa
wanghaoLisa / cafe.kml
Created July 20, 2016 11:48
cafe in Melbourne
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2"> <Document><name><![CDATA[2016-06-30 08-08-11_results -200]]></name><Snippet maxLines='1'>Earth Point Excel To KML</Snippet><open>1</open><Style><IconStyle><Icon></Icon></IconStyle><BalloonStyle><text><![CDATA[$[description]]]></text></BalloonStyle></Style><description><![CDATA[<table style="width: 300px;"><tr><td style="vertical-align: top;">Source</td><td style="width: 100%;">2016-06-30 08-08-11_results -200.xlsx</td></tr><tr><td>DateTime</td><td>2016-07-20 11:41:46 UTC <br/></td></tr></table><br/>&copy;2016 Earth Point<br/><a target='_blank' href='http://www.earthpoint.us'>www.earthpoint.us</a><br/><br/>For illustration only.&nbsp; User to verify all information. ]]></description><StyleMap id="Sheet1Map1"><Pair><key>normal</key><styleUrl>#NormalSheet1Map1</styleUrl></Pair><Pair><key>highlight</key><styleUrl>#HighlightSheet1Map1</styleUrl></Pair></StyleMap><Style id="NormalShe
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wanghaoLisa
wanghaoLisa / rank_metrics.py
Created July 4, 2017 02:14 — forked from bwhite/rank_metrics.py
Ranking Metrics
"""Information Retrieval metrics
Useful Resources:
http://www.cs.utexas.edu/~mooney/ir-course/slides/Evaluation.ppt
http://www.nii.ac.jp/TechReports/05-014E.pdf
http://www.stanford.edu/class/cs276/handouts/EvaluationNew-handout-6-per.pdf
http://hal.archives-ouvertes.fr/docs/00/72/67/60/PDF/07-busa-fekete.pdf
Learning to Rank for Information Retrieval (Tie-Yan Liu)
"""
import numpy as np
@wanghaoLisa
wanghaoLisa / sklearn-auprc.ipynb
Created July 5, 2017 10:54 — forked from agitter/sklearn-auprc.ipynb
Precision recall curves in scikit-learn with ties
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.