This file contains hidden or 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
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "os" | |
| "strings" | |
| "sync" | |
| ) |
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 hidden or 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
| package main | |
| import ( | |
| "bufio" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "log" | |
| "net/http" | |
| "net/url" |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "unsafe" | |
| ) | |
| func main() { | |
| table := [2][2]uint8{{0, 1}, {2, 3}} | |
| fmt.Printf("%T, %d\n", table, table) |
This file contains hidden or 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
| import glob | |
| import pandas as pd | |
| df = pd.read_csv("/g/data1/ep1_2/z00/prl900/L8_AU_WGS84_A25/original_scene_list.csv") | |
| print(len(df.index)) | |
| total_files = 0 | |
| size = 0.0 | |
| scenes = glob.glob(df['filepath'][1] + "/*") |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "io/ioutil" | |
| "os" | |
| "os/exec" | |
| "path/filepath" | |
| "runtime" | |
| "sync" |
This file contains hidden or 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
| # 1.- Band datasets don't have attributes | |
| # 2.- Timestamp is missing from GDAL conversions | |
| import h5py | |
| import numpy as np | |
| import argparse | |
| def aggregator(location): | |
| id = location.split("/")[-1] | |
| with h5py.File(location + ".nc", 'w') as aggfile: |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "io/ioutil" | |
| "os" | |
| "os/exec" | |
| "path/filepath" | |
| "runtime" | |
| "sync" |
This file contains hidden or 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
| import os | |
| import h5py | |
| # Returns min_lat, min_lon, max_lat, max_lon from NetCDF file | |
| def extent_extractor(path): | |
| with h5py.File(path, 'r') as band: | |
| geot = [float(x) for x in band["crs"].attrs["GeoTransform"].decode('UTF-8').split(", ")] | |
| shape = band["Band2"].shape |
This file contains hidden or 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
| import pandas as pd | |
| #Scene list from AWS | |
| df_aws = pd.read_csv("/Users/pablo/Desktop/scene_list (1)") | |
| #Scene list from NCI | |
| df_nci = pd.read_csv("/Users/pablo/Desktop/out.csv") | |
| print(len(df_aws.index)) | |
| df_aws = df_aws.drop_duplicates() | |
| print(len(df_aws.index)) |