text
stringlengths 0
834k
|
|---|
shift
|
if [%1]==[] goto param_afterloop
|
set _LINE_PARAMS=%_LINE_PARAMS% %1
|
goto param_loop
|
:param_afterloop
|
if ""%OS%"" NEQ ""Windows_NT"" (
|
echo ""Warning, your version of Windows is not supported. Attempting to start scala anyway.""
|
)
|
@setlocal
|
call :set_home
|
rem We use the value of the JAVACMD environment variable if defined
|
set _JAVACMD=%JAVACMD%
|
if not defined _JAVACMD (
|
if not ""%JAVA_HOME%""=="""" (
|
if exist ""%JAVA_HOME%\bin\java.exe"" set ""_JAVACMD=%JAVA_HOME%\bin\java.exe""
|
)
|
)
|
if ""%_JAVACMD%""=="""" set _JAVACMD=java
|
rem We use the value of the JAVA_OPTS environment variable if defined
|
set _JAVA_OPTS=%JAVA_OPTS%
|
if not defined _JAVA_OPTS set _JAVA_OPTS=-Xmx256M -Xms32M
|
set _TOOL_CLASSPATH=
|
if ""%_TOOL_CLASSPATH%""=="""" (
|
for %%f in (""!_SCALA_HOME!\lib\*"") do call :add_cpath ""%%f""
|
for /d %%f in (""!_SCALA_HOME!\lib\*"") do call :add_cpath ""%%f""
|
)
|
if not ""%_LINE_TOOLCP%""=="""" call :add_cpath ""%_LINE_TOOLCP%""
|
set _PROPS=-Dscala.home=""!_SCALA_HOME!"" -Denv.emacs=""%EMACS%"" -Dscala.usejavacp=true
|
rem echo ""%_JAVACMD%"" %_JAVA_OPTS% %_PROPS% -cp ""%_TOOL_CLASSPATH%"" scala.tools.nsc.Main %*
|
""%_JAVACMD%"" %_JAVA_OPTS% %_PROPS% -cp ""%_TOOL_CLASSPATH%"" scala.tools.nsc.Main %*
|
goto end
|
rem ##########################################################################
|
rem # subroutines
|
:add_cpath
|
if ""%_TOOL_CLASSPATH%""=="""" (
|
set _TOOL_CLASSPATH=%~1
|
) else (
|
set _TOOL_CLASSPATH=%_TOOL_CLASSPATH%;%~1
|
)
|
goto :eof
|
rem Variable ""%~dps0"" works on WinXP SP2 or newer
|
rem (see http://support.microsoft.com/?kbid=833431)
|
rem set _SCALA_HOME=%~dps0..
|
:set_home
|
set _BIN_DIR=
|
for %%i in (%~sf0) do set _BIN_DIR=%_BIN_DIR%%%~dpsi
|
set _SCALA_HOME=%_BIN_DIR%..
|
goto :eof
|
:end
|
@endlocal
|
REM exit code fix, see http://stackoverflow.com/questions/4632891/exiting-batch-with-exit-b-x-where-x-1-acts-as-if-command-completed-successfu
|
@%COMSPEC% /C exit %errorlevel% >nul
|
",28.5483870968,143,0.6335216573
|
154,d015b8ad5d12f7a5447e3b1899ed34dc47056e9d,5308,bat,Batchfile,scripts/Data Export/previous/2a.create_psra_outputs_by_economic_region.bat,anthonyfok/opendrr-data-store,3c4b609de03ec5aa061ed6f3c7c7396820d83b82,['MIT'],1.0,2020-09-07T17:17:22.000Z,2020-09-07T17:17:22.000Z,scripts/Data Export/previous/2a.create_psra_outputs_by_economic_region.bat,anthonyfok/opendrr-data-store,3c4b609de03ec5aa061ed6f3c7c7396820d83b82,['MIT'],47.0,2020-01-02T19:12:56.000Z,2022-01-18T18:23:24.000Z,scripts/Data Export/previous/2a.create_psra_outputs_by_economic_region.bat,anthonyfok/opendrr-data-store,3c4b609de03ec5aa061ed6f3c7c7396820d83b82,['MIT'],3.0,2020-01-02T18:13:00.000Z,2021-04-06T20:40:26.000Z,"REM Export PSRA views from postgis db into Geopackage by economic region. Change ogr2ogr path, location paths, db information if needed.
|
REM Geopackage BC PSRA
|
FOR %%x IN (psra_bc_all_indicators_b,psra_bc_all_indicators_s) DO (FOR %%y IN (5910,5920,5930,5940,5950,5960,5970,5980) DO ogr2ogr -f ""gpkg"" D:\Workspace\data\view_outputs\all_indicators\seismic_risk\economic_region\bc\%%x_%%y.gpkg PG:""host=localhost user=postgres dbname=opendrr_allscenarios password=admin"" -sql ""SELECT * FROM results_psra_bc.%%x WHERE eruid = '%%y'"" -nln %%x_%%y)
|
REM Geopackage NL PSRA
|
FOR %%x IN (psra_nl_all_indicators_b,psra_nl_all_indicators_s) DO (FOR %%y IN (1010,1020,1030,1040) DO ogr2ogr -f ""gpkg"" D:\Workspace\data\view_outputs\all_indicators\seismic_risk\economic_region\nl\%%x_%%y.gpkg PG:""host=localhost user=postgres dbname=opendrr_allscenarios password=admin"" -sql ""SELECT * FROM results_psra_nl.%%x WHERE eruid = '%%y'"" -nln %%x_%%y)
|
REM Geopackage PE PSRA
|
FOR %%x IN (psra_pe_all_indicators_b,psra_pe_all_indicators_s) DO (FOR %%y IN (1110) DO ogr2ogr -f ""gpkg"" D:\Workspace\data\view_outputs\all_indicators\seismic_risk\economic_region\pe\%%x_%%y.gpkg PG:""host=localhost user=postgres dbname=opendrr_allscenarios password=admin"" -sql ""SELECT * FROM results_psra_pe.%%x WHERE eruid = '%%y'"" -nln %%x_%%y)
|
REM Geopackage NS PSRA
|
FOR %%x IN (psra_ns_all_indicators_b,psra_ns_all_indicators_s) DO (FOR %%y IN (1210,1220,1230,1240,1250) DO ogr2ogr -f ""gpkg"" D:\Workspace\data\view_outputs\all_indicators\seismic_risk\economic_region\ns\%%x_%%y.gpkg PG:""host=localhost user=postgres dbname=opendrr_allscenarios password=admin"" -sql ""SELECT * FROM results_psra_ns.%%x WHERE eruid = '%%y'"" -nln %%x_%%y)
|
REM Geopackage NB PSRA
|
FOR %%x IN (psra_nb_all_indicators_b,psra_nb_all_indicators_s) DO (FOR %%y IN (1310,1320,1330,1340,1350) DO ogr2ogr -f ""gpkg"" D:\Workspace\data\view_outputs\all_indicators\seismic_risk\economic_region\nb\%%x_%%y.gpkg PG:""host=localhost user=postgres dbname=opendrr_allscenarios password=admin"" -sql ""SELECT * FROM results_psra_nb.%%x WHERE eruid = '%%y'"" -nln %%x_%%y)
|
REM Geopackage QC PSRA
|
FOR %%x IN (psra_qc_all_indicators_b,psra_qc_all_indicators_s) DO (FOR %%y IN (2410,2415,2420,2425,2430,2433,2435,2440,2445,2450,2455,2460,2465,2470,2475,2480,2490) DO ogr2ogr -f ""gpkg"" D:\Workspace\data\view_outputs\all_indicators\seismic_risk\economic_region\qc\%%x_%%y.gpkg PG:""host=localhost user=postgres dbname=opendrr_allscenarios password=admin"" -sql ""SELECT * FROM results_psra_qc.%%x WHERE eruid = '%%y'"" -nln %%x_%%y)
|
REM Geopackage ON PSRA
|
FOR %%x IN (psra_on_all_indicators_b,psra_on_all_indicators_s) DO (FOR %%y IN (3510,3515,3520,3530,3540,3550,3560,3570,3580,3590,3595) DO ogr2ogr -f ""gpkg"" D:\Workspace\data\view_outputs\all_indicators\seismic_risk\economic_region\on\%%x_%%y.gpkg PG:""host=localhost user=postgres dbname=opendrr_allscenarios password=admin"" -sql ""SELECT * FROM results_psra_on.%%x WHERE eruid = '%%y'"" -nln %%x_%%y)
|
REM Geopackage MB PSRA
|
FOR %%x IN (psra_mb_all_indicators_b,psra_mb_all_indicators_s) DO (FOR %%y IN (4610,4620,4630,4640,4650,4660,4670,4680) DO ogr2ogr -f ""gpkg"" D:\Workspace\data\view_outputs\all_indicators\seismic_risk\economic_region\mb\%%x_%%y.gpkg PG:""host=localhost user=postgres dbname=opendrr_allscenarios password=admin"" -sql ""SELECT * FROM results_psra_mb.%%x WHERE eruid = '%%y'"" -nln %%x_%%y)
|
REM Geopackage SK PSRA
|
FOR %%x IN (psra_sk_all_indicators_b,psra_sk_all_indicators_s) DO (FOR %%y IN (4710,4720,4730,4740,4750,4760) DO ogr2ogr -f ""gpkg"" D:\Workspace\data\view_outputs\all_indicators\seismic_risk\economic_region\sk\%%x_%%y.gpkg PG:""host=localhost user=postgres dbname=opendrr_allscenarios password=admin"" -sql ""SELECT * FROM results_psra_sk.%%x WHERE eruid = '%%y'"" -nln %%x_%%y)
|
REM Geopackage AB PSRA
|
FOR %%x IN (psra_ab_all_indicators_b,psra_ab_all_indicators_s) DO (FOR %%y IN (4810,4820,4830,4840,4850,4860,4870,4880) DO ogr2ogr -f ""gpkg"" D:\Workspace\data\view_outputs\all_indicators\seismic_risk\economic_region\ab\%%x_%%y.gpkg PG:""host=localhost user=postgres dbname=opendrr_allscenarios password=admin"" -sql ""SELECT * FROM results_psra_ab.%%x WHERE eruid = '%%y'"" -nln %%x_%%y)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.