code
stringlengths
3
6.57k
os.path.join(d_out, _h, _v, _tag)
os.path.join(d_ref, _h, _v, _tag)
os.path.join(_d_out, '%s_met.txt' % _tag)
os.path.join(_d_out, '%s_%s.tif' % (_tag, t)
os.path.join(_d_ref, '%s_%s.tif' % (_tag, t)
_fname('%s_n0%s' % (t, a)
file_mag.get(_f_met)
exists()
logging.info('skip non-existing result for %s' % _tag)
file_mag.get(_fname_m1('loss_year')
exists()
logging.info('skip non-existing result for %s' % _tag)
if (not _ttt)
file_mag.get(_fname_m1('esta_year')
exists()
config.getboolean('conf', 'over_write', False)
logging.info('skip processed esta result for %s' % _tag)
ge.open(_fname_m1('loss_year')
get_band()
cache()
ge.open(_fname_m1('gain_year')
get_band()
cache()
ge.open(_fname_m1('loss_prob')
get_band()
cache()
ge.open(_fname_m1('gain_prob')
get_band()
cache()
config.get('conf', 'latest_tcc')
_load_tcc(_f_tcc, _b_loss_year)
ge.open(_fname_ref('age_prob')
get_band()
cache()
logging.info('forced to use age_prob layer %s' % _fname_ref('age_prob')
ge.open(_fname_ref('age_prob')
get_band()
cache()
np.zeros(_d_forest_prob.shape, dtype=np.uint8)
np.empty(_d_forest_prob.shape, dtype=np.float32)
_d_prob.fill(100)
_b_loss_year.from_grid(_d_esta, nodata=255)
ge.load_colortable(config.get('conf', 'color')
range(1970, 2021)
astype(np.uint8)
_b_esta.from_grid(_d_test, nodata=255)
mod_filter.filter_band_mmu(_b_test, area=config.getfloat('conf', 'min_patch')
astype(np.uint8)
_b_esta.from_grid(_d_test, nodata=255)
mod_filter.filter_band_mmu(_b_test, area=config.getfloat('conf', 'min_patch')
file_unzip.file_unzip()
_zip.save(_b_esta, _fname_m1('esta_year')
_zip.save(_b_esta.from_grid(_d_prob, nodata=-9999)
_fname_m1('esta_prob')
main(opts)
config.get('conf', 'input')
config.get('conf', 'refer', _d_inp)
file_mag.get(os.path.join(_d_inp, 'tasks.txt')
global_task.load(_f_mak)
multi_task.run(_task, [(_t, os.path.join(_d_inp, 'data')
os.path.join(_d_ref, 'data')
multi_task.load(_ts, opts)
print('processed', len([_r for _r in _rs if _r])
usage()
environ_mag.usage(True)
_p.add_argument('-i', '--input', dest='input')
_p.add_argument('-r', '--refer', dest='refer')
_p.add_argument('--latest-tcc', dest='latest_tcc')
_p.add_argument('-w', '--over-write', dest='over_write', type='bool')
_p.add_argument('--min-tcc', dest='min_tcc', type=int, default=30)
_p.add_argument('-m', '--min-patch', dest='min_patch', type=float, default=100 * 100)
_p.add_argument('--test-tile', dest='test_tile')
environ_mag.init_path()
environ_mag.run(main, [environ_mag.config(usage()
get_now_with_tz()
datetime (timezone aware)
datetime.datetime.now(tz=datetime.timezone.utc)
localize_datetime(obj: datetime.datetime)
obj.astimezone()
str(error)
logging.getLogger(situation)
join(traceback.format_tb(error.__traceback__)
__init__(__self__, id=None, location=None, name=None, order_ids=None, system_data=None, tags=None, type=None)
isinstance(id, str)
TypeError("Expected argument 'id' to be a str")
pulumi.set(__self__, "id", id)
isinstance(location, str)
TypeError("Expected argument 'location' to be a str")
pulumi.set(__self__, "location", location)
isinstance(name, str)
TypeError("Expected argument 'name' to be a str")
pulumi.set(__self__, "name", name)
isinstance(order_ids, list)
TypeError("Expected argument 'order_ids' to be a list")
pulumi.set(__self__, "order_ids", order_ids)
isinstance(system_data, dict)
TypeError("Expected argument 'system_data' to be a dict")
pulumi.set(__self__, "system_data", system_data)
isinstance(tags, dict)
TypeError("Expected argument 'tags' to be a dict")