Skip to content

Instantly share code, notes, and snippets.

kiang kiang

Block or report user

Report or block kiang

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View simple.php
<?php
while(true) {
$curl = exec("curl ...");
$json = json_decode($curl);
print_r($json);
sleep(1);
}
View pcc-tainan.php
<?php
$units = json_decode(file_get_contents(__DIR__ . '/unit.json'), true);
$tmpPath = __DIR__ . '/tmp';
if(!file_exists($tmpPath)) {
mkdir($tmpPath, 0777, true);
}
$pagePath = $tmpPath . '/page';
if(!file_exists($pagePath)) {
mkdir($pagePath, 0777, true);
View result.txt
Array
(
[嘉義市] => Array
(
[latMax] => 23.473873067184
[latMin] => 23.468333973012
[lngMax] => 120.43811433737
[lngMin] => 120.43229470138
)
@kiang
kiang / city.csv
Created Jul 12, 2018
compare income values for each city in cunli bases
View city.csv
縣市 中位數上升 中位數下降 平均數上升 平均數下降
臺北市 289 167 169 287
臺中市 446 179 379 246
基隆市 96 61 98 59
臺南市 562 190 489 263
高雄市 514 377 414 477
新北市 753 279 642 390
宜蘭縣 163 70 149 84
桃園市 347 148 310 185
新竹縣 121 70 123 68
@kiang
kiang / cunli.csv
Created Jul 11, 2018
income data in cunli bases
View cunli.csv
We can't make this file beautiful and searchable because it's too large.
0,澎湖縣馬公市復興里,https://goo.gl/nz3N1T#2016/mid/1001601-002
335,澎湖縣湖西鄉白坑村,https://goo.gl/nz3N1T#2016/mid/1001602-004
379,南投縣國姓鄉長福村,https://goo.gl/nz3N1T#2016/mid/1000810-006
387,高雄市田寮區鹿埔里,https://goo.gl/nz3N1T#2016/mid/6402200-001
392,南投縣水里鄉郡坑村,https://goo.gl/nz3N1T#2016/mid/1000811-013
398,嘉義縣東石鄉下揖村,https://goo.gl/nz3N1T#2016/mid/1001009-010
404,屏東縣車城鄉射寮村,https://goo.gl/nz3N1T#2016/mid/1001323-010
404,臺東縣東河鄉尚德村,https://goo.gl/nz3N1T#2016/mid/1001407-004
405,新北市瑞芳區?新里,https://goo.gl/nz3N1T#2016/mid/6501200-027
406,嘉義縣番路鄉公興村,https://goo.gl/nz3N1T#2016/mid/1001016-010
@kiang
kiang / councilor.csv
Created Jan 8, 2018
to have a list about specified keyword '建設' in experience field
View councilor.csv
縣市 姓名 政黨 選舉年度 詳細資訊網址
金門縣 陳滄江 民主進步黨 2009 https://councils.g0v.tw/councilors/info/a07eac483f81450480ef7b92430c0681/2009/
金門縣 陳滄江 民主進步黨 2014 https://councils.g0v.tw/councilors/info/a07eac483f81450480ef7b92430c0681/2014/
新北市 鄭登文 1982 https://councils.g0v.tw/councilors/info/5137d739b69a463ca1933eefc3854e1f/1982/
新北市 謝隆盛 1973 https://councils.g0v.tw/councilors/info/c6ff54ac1739405098763e176706e55a/1973/
新北市 謝隆盛 1977 https://councils.g0v.tw/councilors/info/c6ff54ac1739405098763e176706e55a/1977/
新北市 林阿仁 1958 https://councils.g0v.tw/councilors/info/9b8e0abbdd134fde804cb5524cce031e/1958/
新北市 林阿仁 1961 https://councils.g0v.tw/councilors/info/9b8e0abbdd134fde804cb5524cce031e/1961/
花蓮縣 孫永昌 中國國民黨 2009 https://councils.g0v.tw/councilors/info/2ca5cf35a98b4fcf87033b6ae420f3ed/2009/
新北市 鄭水枝 1964 https://councils.g0v.tw/councilors/info/a8a7ac92273c40268ec1c5fb84448fd4/1964/
@kiang
kiang / points.csv
Created Oct 4, 2017
taiwan polling places
View points.csv
We can't make this file beautiful and searchable because it's too large.
投開票所編號,投開票所名稱,投開票所地址,address,X,Y
臺北市北投區第0001投開票所,中正高中護理教室,臺北市北投區建民里15鄰文林北路77號,臺北市北投區建民里15鄰文林北路77號,121.516566006,25.104496745631
臺北市北投區第0002投開票所,中正高中活動中心介壽廳,臺北市北投區建民里15鄰文林北路77號,臺北市北投區建民里15鄰文林北路77號,121.516566006,25.104496745631
臺北市北投區第0003投開票所,中正高中活動中心中正廳,臺北市北投區建民里15鄰文林北路77號,臺北市北投區建民里15鄰文林北路77號,121.516566006,25.104496745631
臺北市北投區第0004投開票所,明德國中801教室,臺北市北投區建民里17鄰明德路50號,臺北市北投區建民里17鄰明德路50號,121.51831689145,25.107559629621
臺北市北投區第0005投開票所,明德國中803教室,臺北市北投區建民里17鄰明德路50號,臺北市北投區建民里17鄰明德路50號,121.51831689145,25.107559629621
臺北市北投區第0006投開票所,明德國中804教室,臺北市北投區建民里17鄰明德路50號,臺北市北投區建民里17鄰明德路50號,121.51831689145,25.107559629621
臺北市北投區第0007投開票所,明德國中806教室,臺北市北投區建民里17鄰明德路50號,臺北市北投區建民里17鄰明德路50號,121.51831689145,25.107559629621
臺北市北投區第0008投開票所,明德國中英語領域教室,臺北市北投區建民里17鄰明德路50號,臺北市北投區建民里17鄰明德路50號,121.51831689145,25.107559629621
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kiang
kiang / missing_meta_list.csv
Created Mar 22, 2017
Records in kml that couldn't find matched meta data in xml
View missing_meta_list.csv
city section land no
A 0621 545-1地號
A 0239 178-1地號
A 0018 74地號
A 0432 14地號
A 0513 316-1地號
A 0069 6-16地號
A 0129 367地號
A 0713 8-1地號
A 0486 7地號
View lands_convert.php
<?php
include __DIR__ . '/libs/geoPHP/geoPHP.inc';
//keys = 國有, 省市有, 縣市有, 鄉鎮市有
$pool = array();
foreach(glob(__DIR__ . '/raw/*/*/*.xml') AS $xmlFile) {
$c = mb_convert_encoding(file_get_contents($xmlFile), 'utf-8', 'big5');
$c = str_replace('<?xml version="1.0" encoding="BIG5"?>', '<?xml version="1.0" encoding="UTF-8"?>', $c);
$objs = (array)new SimpleXMLElement($c);
foreach($objs AS $obj) {
You can’t perform that action at this time.