-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from SunIBAS/master
2020年中合并
- Loading branch information
Showing
258 changed files
with
1,600 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# 西瓜书里面的符号说明 | ||
|
||
![](./pic/统计错误.png) | ||
|
||
``` | ||
Ⅱ(f(x)≠y) | ||
这个 Ⅱ 符号指的是,如果等式成立取 1 不成立取 0 | ||
Ⅱ(1 = 1) = 1 Ⅱ(1 = 2) = 0 | ||
E(f;D) = ... | ||
表示将D用f进行测试之后的错误率 | ||
D 是原始数据集,(x1,y1) (x2,y2) ... | ||
f 是通过 xn 求得 yn 的方法(函数) | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# cshap 读取栅格数据 | ||
|
||
- imagePath 对应的文件在 ```实验材料\1.tif``` 中可以找到 | ||
|
||
```c# | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using GDAL = OSGeo.GDAL; | ||
|
||
namespace GdalDev | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
string imagePath = @"C:\Users\HUZENGYUN\Desktop\1.tif"; | ||
// 配置,暂时不用那个 ogr,那个是矢量的 | ||
GdalConfiguration.ConfigureGdal(); | ||
GdalConfiguration.ConfigureOgr(); | ||
// 这个像c 那个注册 | ||
GDAL.Gdal.AllRegister(); | ||
// 只读模式打开一个图片 | ||
//GDAL.Dataset ds = GDAL.Gdal.Open(imagePath,GDAL.Access.GA_ReadOnly); | ||
//ds.Dispose(); | ||
// c#的语法,等同上面 | ||
using (GDAL.Dataset ds = GDAL.Gdal.Open(imagePath, GDAL.Access.GA_ReadOnly)) | ||
{ | ||
// 这个序号依旧是从1开始 | ||
GDAL.Band band = ds.GetRasterBand(1); | ||
int xsize = band.XSize; | ||
int ysize = band.YSize; | ||
// 我的图片是 uint8 格式的 | ||
int[] buf = new int[xsize]; | ||
for (int i = 0;i < ysize;i++) | ||
{ | ||
// buf 只能是 int byte short float double | ||
band.ReadRaster(0, i, xsize, 1, buf, xsize, 1, 0, 0); | ||
for (int j = 0;j < xsize;j++) | ||
{ | ||
Console.Write(buf[j] + "\t"); | ||
} | ||
Console.WriteLine(); | ||
} | ||
} | ||
Console.ReadKey(); | ||
} | ||
} | ||
} | ||
|
||
``` |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// curl -# -H "Authorization: Bearer 授权码" "https://ladsweb.modaps.eosdis.nasa.gov/链接" -o MOD09.A2019210.0200.006.2019212020245.hdf | ||
const fs = require('fs') | ||
const q = require('./query.json') | ||
|
||
let getCmd = url => { | ||
let surl = url.split('/'); | ||
return `curl -# -H "Authorization: Bearer 授权码" "https://ladsweb.modaps.eosdis.nasa.gov${url}" -o ${surl[surl.length - 1]}` | ||
} | ||
let out = []; | ||
for (let i in q) { | ||
if (q[i].url) { | ||
out.push(getCmd(q[i].url)) | ||
} | ||
} | ||
|
||
fs.writeFileSync('bat.bat', out.join('\r\n'), 'utf-8'); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
https://gadm.org/download_country_v3.html | ||
|
||
http://srtm.csi.cgiar.org/srtmdata/ dem |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
package utils | ||
|
||
import ( | ||
"fmt" | ||
"strconv" | ||
"strings" | ||
|
||
"os" | ||
"os/exec" | ||
"syscall" | ||
) | ||
|
||
type EqBar struct { | ||
Total int | ||
Percent int | ||
Size int | ||
} | ||
func (eb * EqBar)ShowPlusOne() { | ||
eb.Percent++ | ||
eb.Show() | ||
} | ||
func (eb EqBar)Show() { | ||
str := "[" + eqBar(eb.Size * eb.Percent / eb.Total, eb.Size) + "] " + | ||
strconv.Itoa(100 * eb.Percent / eb.Total) + "%" | ||
fmt.Printf("\r%s", str) | ||
} | ||
func (eb * EqBar)ShowNumPlusOne() { | ||
eb.Percent++ | ||
eb.ShowNum() | ||
} | ||
func (eb EqBar)ShowNum() { | ||
cur := eb.Size * eb.Percent / eb.Total | ||
str := "[" + eqBar(cur, eb.Size) + "] " + | ||
strconv.Itoa(eb.Percent) + "/" + strconv.Itoa(eb.Total) | ||
fmt.Printf("\r%s", str) | ||
} | ||
func eqBar(count, size int) string { | ||
str := "" | ||
for i := 0; i < size; i++ { | ||
if i < count { | ||
str += "=" | ||
} else { | ||
str += " " | ||
} | ||
} | ||
return str | ||
} | ||
|
||
|
||
/// color | ||
type Color struct { | ||
Black int // 黑色 | ||
Blue int // 蓝色 | ||
Green int // 绿色 | ||
Cyan int // 青色 | ||
Red int // 红色 | ||
Purple int // 紫色 | ||
Yellow int // 黄色 | ||
Light_gray int // 淡灰色(系统默认值) | ||
Gray int // 灰色 | ||
Light_blue int // 亮蓝色 | ||
Light_green int // 亮绿色 | ||
Light_cyan int // 亮青色 | ||
Light_red int // 亮红色 | ||
Light_purple int // 亮紫色 | ||
Light_yellow int // 亮黄色 | ||
White int // 白色 | ||
} | ||
var ( | ||
kernel32 *syscall.LazyDLL = syscall.NewLazyDLL(`kernel32.dll`) | ||
proc *syscall.LazyProc = kernel32.NewProc(`SetConsoleTextAttribute`) | ||
CloseHandle *syscall.LazyProc = kernel32.NewProc(`CloseHandle`) | ||
|
||
// 给字体颜色对象赋值 | ||
FontColor Color = Color{0, 1, 2, 3, 4, | ||
5, 6, 7, 8, | ||
9, 10, 11, 12, | ||
13, 14, 15} | ||
) | ||
func ColorPrint(s string, i int) { | ||
handle, _, _ := proc.Call(uintptr(syscall.Stdout), uintptr(i)) | ||
print(s) | ||
CloseHandle.Call(handle) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
https://blog.csdn.net/qq_30260357/article/details/103256717 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
(YouTube搬运)Discover NASA’s Near Real-Time Data using LANCE置顶评论 | ||
|
||
Brief Description: This webinar provides an overview of NASA's Land Atmosphere Near real-time Capability for EOS (LANCE) system and available data, describes the difference between NRT data and standard quality data and shows you how to discover and access LANCE NRT data. | ||
|
||
Detailed Description: NASA is well known for providing high-quality satellite data for long-term scientific research, but application users, operational agencies, and even researchers often need data much sooner than routine science processing offers. Since 2009, NASA’s LANCE has provided data and data products generally within three hours of satellite instrument observations. The more than 200 Near Real-Time (NRT) data products available through LANCE, along with the services and data distribution strategies developed by the LANCE team, have helped transform how Earth-observing data are used. | ||
|
||
As the LANCE celebrates its tenth anniversary, this webinar provides an opportunity to look back on its history, accomplishments, and provide users with an overview of the what is available. | ||
|
||
To learn more about NASA LANCE: | ||
https://www.youtube.com/redirect?redir_token=REkbpV_ImglPIbTnYE2FEp7CppB8MTU4Mzg5NjA3NUAxNTgzODA5Njc1&event=video_description&v=bMunftvU4r0&q=https%3A%2F%2Fearthdata.nasa.gov%2Fearth-observation-data%2Fnear-real-time | ||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* 将文字复制到谷歌翻译之后总是换行,这里写个代码解决这个问题 | ||
* */ | ||
// ==UserScript== | ||
// @name New Userscript | ||
// @namespace http://tampermonkey.net/ | ||
// @version 0.1 | ||
// @description try to take over the world! | ||
// @author You | ||
// @match https://translate.google.cn/ | ||
// @grant none | ||
// ==/UserScript== | ||
|
||
(function () { | ||
'use strict'; | ||
var btn = document.createElement('div') | ||
btn.style.position = "absolute"; | ||
btn.style.top = "10px"; | ||
btn.style.left = "100px"; | ||
btn.innerText = "ToLine" | ||
btn.style.zIndex = 10000; | ||
btn.style.background = "black"; | ||
btn.style.color = "white"; | ||
btn.style.fontSize = "xx-large"; | ||
btn.style.fontWeight = "bold"; | ||
document.body.appendChild(btn) | ||
btn.onclick = function () { | ||
source.value = source.value.split(/[\r\n]/).join(' '); | ||
} | ||
// Your code here... | ||
})(); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
String.prototype.toUnicode = function () { | ||
let s = this; | ||
let out = []; | ||
for (let i = 0; i < s.length; i++) { | ||
out.push(s.charCodeAt(i).toString(16)); | ||
} | ||
return "\\u" + out.join("\\u"); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
setInterval(function () { | ||
var tx = document.getElementsByClassName('textLayer'); | ||
for (var i = 0; i < tx.length; i++) { | ||
tx[i].style.background = "#58796d"; | ||
} | ||
}, 5000) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
// ==UserScript== | ||
// @name Google Translate | ||
// @namespace http://tampermonkey.net/ | ||
// @version 0.1 | ||
// @description try to take over the world! | ||
// @require https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js | ||
// @author You | ||
// @match *://*/* | ||
// @grant none | ||
// ==/UserScript== | ||
|
||
(function () { | ||
'use strict'; | ||
const requestUrl = location.protocol === "https:" ? "https://www.sunibas.cn/api" : "http://www.sunibas.cn/api"; | ||
window.$jq = jQuery; | ||
window.$tran = function (list) { | ||
return fetch(requestUrl, { | ||
headers: { | ||
"Content-Type": "application/json", | ||
}, | ||
method: "post", | ||
body: JSON.stringify({ | ||
api: "GoogleTranslate", | ||
method: "fetchTran", | ||
data: { | ||
list: list | ||
} | ||
}) | ||
}).then(_ => _.text()).then(JSON.parse).then(_ => _.data.data); | ||
} | ||
let tasks = []; | ||
window.$tranPElement = function (tar) { | ||
let ps = $jq(tar || 'p'); | ||
for (let i = 0; i < ps.length; i++) { | ||
tasks.push((function (node) { | ||
$tran(node.innerText) | ||
.then(_ => { | ||
$jq(node).after($jq(`<p class="ibas_tran">${_}</p>`)); | ||
if (tasks.length) { | ||
tasks.shift()(); | ||
} else { | ||
alert("完成"); | ||
} | ||
}) | ||
.catch(_ => { | ||
console.log(_); | ||
if (tasks.length) { | ||
tasks.shift()(); | ||
} else { | ||
alert("完成"); | ||
} | ||
}) | ||
}).bind(null, ps[i])); | ||
} | ||
if (tasks.length) { | ||
tasks.shift()(); | ||
} else { | ||
alert("完成"); | ||
} | ||
} | ||
window.onload = function () { | ||
let dom = jQuery(`<div style="position: absolute;top: 10px;right: 100px;font-weight: bold; | ||
z-index: 10000000;background: black;font-size: xx-large;color: #fff;"> | ||
<div style="padding: 5px;"> | ||
<div id="_ibas_tran_exit_" style="display: inline-block; | ||
cursor:pointer;background:darkturquoise;" | ||
onclick="_tran_ToRemove()">X</div> | ||
<div id="_ibas_tran_p_" style="display: inline-block; | ||
cursor:pointer;background: darkorange;" | ||
onclick="_tran_ToTran()">TranslateP</div> | ||
</div> | ||
<div style="overflow: hidden;"> | ||
<input id="_ibas_tran_inp_" | ||
style="width: 100%;background: #ceff95;color: #000;" | ||
type="text" | ||
onchange="_tran_changeSession()"> | ||
</div> | ||
</div>`); | ||
jQuery('body').append(dom); | ||
window._tran_changeSession = function () { | ||
sessionStorage.setItem('_ibas_tran_', document.getElementById('_ibas_tran_inp_').value); | ||
} | ||
window._tran_ToTran = function () { | ||
$tranPElement(document.getElementById('_ibas_tran_inp_').value); | ||
} | ||
window._tran_ToRemove = (function (dom) { | ||
dom.css({ | ||
display: "none" | ||
}); | ||
}).bind(null, dom); | ||
setTimeout(function () { | ||
document.getElementById('_ibas_tran_inp_').value = sessionStorage.getItem('_ibas_tran_'); | ||
}, 500); | ||
} | ||
// Your code here... | ||
})(); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extName": ".HDF", | ||
"csvSplitChar": ",", | ||
"csvColunm": 0, | ||
"csvFromFirstLine": true, | ||
"csvFileName": "C:\\Users\\HUZENGYUN\\Documents\\git\\文档\\kaoyan\\data_download\\nasa\\test.txt", | ||
"outPath": "E:\\lins", | ||
"toAppend": false, | ||
"appkey": "A064EFD6-57A5-11EA-BEA6-FB455AF066A1", | ||
"numWhat": "分为几个批次", | ||
"num": 1 | ||
} |
Oops, something went wrong.