Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Add Tobias Waldekranz's awesome little AWK script | # Calculate network address from IP and prefix len
# Tobias Waldekranz, 2017
#
# $ echo "192.168.2.232/24" | awk -f ipcalc.awk
# 192.168.2.0/24
#
# $ echo "192.168.2.232.24" | awk -f ipcalc.awk
# 192.168.2.0/24
#
# $ echo "192.168.2.232 24" | awk -f ipcalc.awk
# 192.168.2.0/24
#
BEGIN { FS="[. /]" }
{
... | |
Add an awk script used in one-vs-the-rest classification example. | BEGIN{ FS="\t"; OFS="\t"; }
{
possible_labels=$1;
rowid=$2;
label=$3;
features=$4;
label_count = split(possible_labels, label_array, ",");
for(i = 1; i <= label_count; i++) {
if (label_array[i] == label)
print rowid, label, 1, features;
else
print rowid, label_array[i], -... | |
Add crosscheck of EPISODES with SEASONS | # WebScraper has problems getting incomplete data.
#
# Crosscheck the info in EPISODES with the info in SEASONS. Count up episodes
# and compare with the number of episodes listed in the seasons file.
# For now these seem more likely a problem in scraping SEASONS than EPISODES
# so it could be these are false positive... | |
Add parser for Z3's get-model output. | #!/usr/bin/gawk -f
BEGIN{
bees="";
}
/^[ ]+\(define-fun.*Int$/{
bees = $2;
}
/^[ ]+[0-9]+\)/{
match ($0, /^[ ]+([0-9]+)\)/, arr)
print bees " " arr[1];
}
| |
Add awk solution to problem 16 | #!/usr/bin/awk -f
{
protein = ""
flag = 0 # Get rid of line with label
while (("curl -Ls http://www.uniprot.org/uniprot/"$1".fasta" | getline prot_line) > 0) {
if (flag)
# Append line to protein
protein = protein prot_line
else
# We're on the first lin... | |
Add a crosscheck for the SEASONS_SORTED_FILE | # Crosscheck the number of episodes of each show found by counting them (grep -c)
# in EPISODES_SORTED_FILE versus the number added up from SEASONS_SORTED_FILE
# Both numbers are found by processing a checkEpisodeInfo file
#
# For now these seem more likely a problem in scraping SEASONS_SORTED_FILE than EPISODES_SORTED... | |
Add AWK script to merge comma-terminated lines | #!/usr/bin/awk -f
#
# AWK script to join multiple lines if the preceeding line ends with a comma (,).
#
# For example:
#
# 1,
# 2,
# 3
#
# Turns into:
#
# 1, 2, 3
#
/,$/ {
ORS=""
print $0
do {
getline
print $0
} while ($0 ~ /,$/)
ORS="\n"
print ""
}
| |
Add Netflix specific link generator | # Helper for converting Netflix "viewing activity" into hyperlinks
#
# <a href="/title/80988960" data-reactid="68">Death in Paradise: Season 6: "Man Overboard, Part 2"
# <a href="/title/80170369" data-reactid="124">Ugly Delicious: Season 1: "Pizza"
# <a href="/title/80190361" data-reactid="100">Hin... | |
Add AWK script to compute the corrected sample standard deviation | #!/usr/bin/env awk -f
#
# Computes the corrected sample standard deviation.
#
# Usage: stdev
#
# Input:
# - a column of numbers
#
# Output:
# - corrected sample standard deviation
#
# Notes:
# - Uses [Welford's method][1].
#
# [1]: https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Online_algorithm... | |
Make script to process top level BritBox shows | BEGIN {
FS="\t"
print "Sortkey\tTitle\tSeasons\tDuration\tYear\tRating\tDescription"
}
# if needed for debugging record placment, replace "/nosuchrecord/" below
/nosuchrecord/ {
print ""
print NR " - " $0
for ( i = 1; i <= NF; i++ ) {
print "field " i " = " $i
}
}
{
for ( i = 1; i ... | |
Create helper for Netflix activity | # Helper for converting Netflix "viewing activity" into hyperlinks
#
# Since there is no way to paste an embedded hyperlink into a text filei,
# paste the link and the title on two consecutive lines, e.g.
#
# https://www.netflix.com/title/80174814
# Borderliner: Season 1: "Milla’s Future"
# https://www.netflix.com/titl... | |
Add debugging tool which prints WebScraper field names | # Print field numbers and field names from a WebScraper csv file saved in tsv format
# INVOCATION:
# awk -f printFieldNamesFrom-webscraper.awk -v maxRecordsToPrint=5 BritBoxSeasons-test-tabs.csv
BEGIN {
FS="\t"
# print 3 records unless overridden with "-v maxRecordsToPrint=<n>"
if (maxRecordsToPrint == ... | |
Add the unified pair generation script | #!/usr/bin/awk -f
BEGIN{
FS = OFS = "\t";
}
{
split($3, words, ", ");
for (i = 1; i <= length(words) - 1; i++) {
for (j = i + 1; j <= length(words); j++) {
print words[i], words[j];
print words[j], words[i];
}
}
}
| |
Add only unique reads for paired end filter | BEGIN {
OFS="\t";
lastid="";
id_counts=0;
}
{
if ( $1 ~ /^@/ )
{
# headers go straight through
print $0;
next;
}
if (lastid == "") {
lastid=$1;
r1["read"] = $0;
r1["chr"] = $3;
r1["tags"] = "";
for(i=12;i<NF;i++) { r1["tags"]=r1["tags"] $i " ";}
r1["tags"]=r1["tags"] $i... | |
Add awk script to deobfuscate wasm stack traces. | # Usage:
# awk -f deobfuscate_wasm_log.awk <wat_file> <log_file>
# Process the log file which is the 2nd argument.
FILENAME == ARGV[2] {
match($0, /<anonymous>:wasm-function\[([0-9]+)\]/, groups)
print $0, functions[groups[1]]
}
# Collects function declarations
/^\(func/ {
functions[last_function++] = $2
}
| |
Add AWK script to compute the mid-range | #!/usr/bin/env awk -f
#
# Computes the mid-range.
#
# Usage: mid-range
#
# Input:
# - a column of numbers
#
# Output:
# - mid-range
!i++ {
# Only for the first record:
max = $1
min = $1
}
{
if ($1 > max) {
max = $1
} else if ($1 < min) {
min = $1
}
}
END {
print (max + min) / 2
}
| |
Add a short program that rewrites the testdata/rsyncd.log timestamps to nowish. | BEGIN{
now = systime()
format = "%Y/%m/%d %H:%M:%S"
}
{
split($1, DATE, "/")
split($2, TIME, ":")
$1 = ""
$2 = ""
t = mktime(DATE[1] " " DATE[2] " " DATE[3] " " TIME[1] " " TIME[2] " " TIME[3])
if (delta == "") {
delta = no... | |
Add an awk script for reading CVC's output. | #!/usr/bin/awk -f
BEGIN{
outarr[0] = "";
outarr[1] = "";
outarr[2] = "";
outarr[3] = "";
idx = 0;
}
/.*sparticus.*/{
sub(/bv/, "", $12);
outarr[idx] = $12;
idx++;
if (idx == 4) {
print outarr[0] "|" outarr[1] "|" outarr[2] "|" outarr[3]
idx = 0;
}
}
| |
Improve Windows .bat launcher: waits for close, no console | @echo off
start /min java -jar %~dp0SuperTMXMerge.jar %*
| @echo off
start /b /wait java -jar %~dp0SuperTMXMerge.jar %*
|
Comment out removing stuff for now. | SET PATH=C:\Qt\5.5\mingw492_32\bin;%PATH%
SET PATH=C:\Qt\Tools\mingw492_32\bin;%PATH%
qmake.exe -makefile -win32 FLViz.pro
mingw32-make.exe clean
mingw32-make.exe mocclean
mingw32-make.exe
mingw32-make.exe distclean
| SET PATH=C:\Qt\5.5\mingw492_32\bin;%PATH%
SET PATH=C:\Qt\Tools\mingw492_32\bin;%PATH%
qmake.exe -makefile -win32 FLViz.pro
mingw32-make.exe clean
mingw32-make.exe mocclean
mingw32-make.exe
REM mingw32-make.exe distclean
|
Use the same arguments on Windows. |
:: Set $HOME to the current dir so msys runs here
set HOME=%cd%
:: Configure, build, test, and install using `nmake`.
bash -lc "make"
if errorlevel 1 exit 1
bash -lc "make PREFIX=$LIBRARY_PREFIX install"
if errorlevel 1 exit 1
|
:: Set $HOME to the current dir so msys runs here
set HOME=%cd%
:: Configure, build, test, and install using `nmake`.
bash -lc "make"
if errorlevel 1 exit 1
bash -lc "make DYNAMIC_ARCH=1 BINARY=$ARCH NO_LAPACK=0 NO_AFFINITY=1 USE_THREAD=1 PREFIX=$LIBRARY_PREFIX install"
if errorlevel 1 exit 1
|
Fix script path in win | python %RECIPE_DIR%\download-chromedriver
if errorlevel 1 exit 1
7z x chromedriver.zip -ochromedriver
if errorlevel 1 exit 1
REM Add chromedriver to PATH so chromedriver_binary install can find it
set PATH=%PATH%:%CD%\chromedriver
python -m pip install --no-deps --ignore-installed .
| python %RECIPE_DIR%\download-chromedriver.py
if errorlevel 1 exit 1
7z x chromedriver.zip -ochromedriver
if errorlevel 1 exit 1
REM Add chromedriver to PATH so chromedriver_binary install can find it
set PATH=%PATH%:%CD%\chromedriver
python -m pip install --no-deps --ignore-installed .
|
Move to Ruby 2.0 on windows. | @ECHO OFF
set GO_ROOT=%~dp0\..\..\..
set JRUBY_BASE=%GO_ROOT%\tools\jruby
set SERVER_ROOT=%GO_ROOT%\server
set RAILS_ROOT=%SERVER_ROOT%\webapp\WEB-INF\rails.new
set GEM_HOME=%RAILS_ROOT%\vendor\bundle\jruby\1.9
set GEM_PATH=%JRUBY_BASE%\lib\ruby\gems\shared;%GEM_HOME%
set PATH=%JRUBY_BASE%\bin;%PATH%
set JRUBY_OPTS="-... | @ECHO OFF
set GO_ROOT=%~dp0\..\..\..
set JRUBY_BASE=%GO_ROOT%\tools\jruby
set SERVER_ROOT=%GO_ROOT%\server
set RAILS_ROOT=%SERVER_ROOT%\webapp\WEB-INF\rails.new
set GEM_HOME=%RAILS_ROOT%\vendor\bundle\jruby\1.9
set GEM_PATH=%JRUBY_BASE%\lib\ruby\gems\shared;%GEM_HOME%
set PATH=%JRUBY_BASE%\bin;%PATH%
set JRUBY_OPTS="-... |
Fix typo in bintray upload script | @echo off
setlocal EnableDelayedExpansion
REM Uploading all modules at once (with one gradle command) does not work any more, so a separate command for each module must be issued
SET username=%1
SET apikey=%2
SET modules="Spectaculum-Core" "Spectaculum-Camera" "Spectaculum-Image" "Spectaculum-MediaPlayer" "Spectaculu... | @echo off
setlocal EnableDelayedExpansion
REM Uploading all modules at once (with one gradle command) does not work any more, so a separate command for each module must be issued
SET username=%1
SET apikey=%2
SET modules="Spectaculum-Core" "Spectaculum-Camera" "Spectaculum-Image" "Spectaculum-MediaPlayer" "Spectaculu... |
Set Java path for BMC | @set PATH="%PATH%;C:\Program Files\Java\jdk1.8.0_66\bin"
@c:\Windows\system32\cmd.exe /c %USERPROFILE%\Desktop\sh.exe -l
| @set PATH="%PATH%;C:\Program Files\Java\jdk1.7.0_25\bin"
@c:\Windows\system32\cmd.exe /c %USERPROFILE%\Desktop\sh.exe -l
|
Add --run-e2e-tests option to the script ran by Jenkins | @REM Copyright (c) Microsoft. All rights reserved.
@REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
setlocal
set build-root=%~dp0..
rem // resolve to fully qualified path
for %%i in ("%build-root%") do set build-root=%%~fi
REM -- C --
cd %build-root%\c\build_all... | @REM Copyright (c) Microsoft. All rights reserved.
@REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
setlocal
set build-root=%~dp0..
rem // resolve to fully qualified path
for %%i in ("%build-root%") do set build-root=%%~fi
REM -- C --
cd %build-root%\c\build_all... |
Allow number to be passed in to distribution build | :start
bin\nant\nant.exe -f:spark.build tools build package
pause
goto start
| if "%1"=="" build-distribution 1
:start
bin\nant\nant.exe -f:spark.build tools build package -D:build.number=%1
pause
goto start
|
Update windows proto generation script to resemble the linux script more closely | @echo off
set PROTODIR=D:\GitHub\SteamKit\Resources\Protobufs
set PROTOBUFS=base_gcmessages gcsdk_gcmessages dota_gcmessages_client
for %%X in ( %PROTOBUFS% ) do (
protoc --descriptor_set_out=%%X.desc --include_imports --proto_path=%PROTODIR% --proto_path=%PROTODIR%\dota --proto_path=%PROTODIR%\steamclient %PROTODIR... | @echo off
set PROTODIR=D:\GitHub\SteamKit\Resources\Protobufs
set PROTOBUFS=base_gcmessages gcsdk_gcmessages cstrike15_gcmessages
for %%X in ( %PROTOBUFS% ) do (
protoc --descriptor_set_out=%%X.desc --include_imports %%X.proto
)
|
Make native tests fail the build | @echo off
setlocal EnableDelayedExpansion
echo Test discovery started...
dir C:\projects\spectre\*Tests.exe /b /s | findstr /v obj > __tmp_gtest.txt
echo Testing (Google Test)...
set failures=0
FOR /F %%i IN (__tmp_gtest.txt) DO (
echo %%i
%%i --gtest_output="xml:%%i.xml"
powershell C:\projects\spectre\scripts\Up... | @echo off
setlocal EnableDelayedExpansion
echo Test discovery started...
dir C:\projects\spectre\*Tests.exe /b /s | findstr /v obj > __tmp_gtest.txt
echo Testing (Google Test)...
set failures=0
FOR /F %%i IN (__tmp_gtest.txt) DO (
echo %%i
%%i --gtest_output="xml:%%i.xml"
powershell C:\projects\spectre\scripts\Up... |
Replace absolute path to python with \%PYTHONHOME\%. | @echo off
REM Make sure to use 32 bit python for this so it runs on all machines
C:\Utils\Python\Python32-34\python ./BuildPrjExeSetup.py py2exe
C:\Utils\Python\Python32-34\python ./BuildEditorApiExeSetup.py py2exe
C:\Utils\Python\Python32-34\python ./BuildReleaseManifesterUpdaterExeSetup.py py2exe
C:\Utils\Python\Pyth... | @echo off
REM Make sure to use 32 bit python for this so it runs on all machines
%PYTHONHOME%\python ./BuildPrjExeSetup.py py2exe
%PYTHONHOME%\python ./BuildEditorApiExeSetup.py py2exe
%PYTHONHOME%\python ./BuildReleaseManifesterUpdaterExeSetup.py py2exe
%PYTHONHOME%\python ./BuildOpenInVisualStudio.py py2exe
|
Revert test code in buidpackpush.bat | SETLOCAL
SET VERSION=%1
CALL Scripts\buildpack %VERSION% || exit /B 1
ECHO this should not happen
exit /B 1
nuget push .\Artifacts\Mapsui.%VERSION%.nupkg -source nuget.org || exit /B 1
nuget push .\Artifacts\Mapsui.Forms.%VERSION%.nupkg -source nuget.org || exit /B 1
git commit -m %VERSION% -a || exit /B 1
git tag %VER... | SETLOCAL
SET VERSION=%1
CALL Scripts\buildpack %VERSION% || exit /B 1
nuget push .\Artifacts\Mapsui.%VERSION%.nupkg -source nuget.org || exit /B 1
nuget push .\Artifacts\Mapsui.Forms.%VERSION%.nupkg -source nuget.org || exit /B 1
git commit -m %VERSION% -a || exit /B 1
git tag %VERSION% || exit /B 1
git push origin %VE... |
Fix a build issue with Vista. Stop cp.exe from trying to emulate POSIX security on top of NTFS. | @echo off
setlocal
set OUTDIR=%1
set JSENG=%2
set CYGWIN_ROOT=%~dp0..\..\..\third_party\cygwin\
set GNU_ROOT=%~dp0..\..\..\third_party\gnu\files
set PATH=%CYGWIN_ROOT%bin;%GNU_ROOT%;%SystemRoot%;%SystemRoot%\system32
:: Ensure that the cygwin mount points are defined
CALL %CYGWIN_ROOT%setup_mount.bat > NUL
bash -x ... | @echo off
setlocal
set OUTDIR=%1
set JSENG=%2
set CYGWIN_ROOT=%~dp0..\..\..\third_party\cygwin\
set GNU_ROOT=%~dp0..\..\..\third_party\gnu\files
:: Fix cp.exe on vista: without this flag, the files that it creates are not accessible.
set CYGWIN=nontsec
set PATH=%CYGWIN_ROOT%bin;%GNU_ROOT%;%SystemRoot%;%SystemRoot%\s... |
Add TITSEQ to overlay exporting. | rem slink /psx /c /p /rmips=GAME/SETUP.REL @GAME/SETUP.LNK,GAME/SETUP.BIN
rem slink /psx /c /p /rmips=GAME/ANDY3.REL @GAME/ANDY3.LNK,GAME/ANDY3.BIN
rem slink /psx /c /p /rmips=GAME/JOBY5.REL @GAME/JOBY5.LNK,GAME/JOBY5.BIN
psylink /c /p /q /rmips=GAME/SETUP.REL @GAME/SETUP.LNK,GAME/SETUP.BIN
psylink /c /p /q /rmips=GAME... | rem slink /psx /c /p /rmips=GAME/SETUP.REL @GAME/SETUP.LNK,GAME/SETUP.BIN
rem slink /psx /c /p /rmips=GAME/ANDY3.REL @GAME/ANDY3.LNK,GAME/ANDY3.BIN
rem slink /psx /c /p /rmips=GAME/JOBY5.REL @GAME/JOBY5.LNK,GAME/JOBY5.BIN
rem slink /psx /c /p /rmips=GAME/TITSEQ.REL @GAME/TITSEQ.LNK,GAME/TITSEQ.BIN
psylink /c /p /q /rmi... |
Add email composer plugin in .bat file | ::
:: Create output (Cordova) directory
::
mkdir www
::
:: Install client libraries
::
bower install
::
:: Add target platform
::
:: Comment out the platform(s) your system supports
::
grunt platform:add:ios
:: grunt platform:add:android
::
:: Install cordova plugins
:: There quickest option is to ask from Ionic
:: ... | ::
:: Create output (Cordova) directory
::
mkdir www
::
:: Install client libraries
::
bower install
::
:: Add target platform
::
:: Comment out the platform(s) your system supports
::
grunt platform:add:ios
:: grunt platform:add:android
::
:: Install cordova plugins
:: There quickest option is to ask from Ionic
:: ... |
Clean the release directory after doing a static build. | @rem Copyright 2015 Google Inc. All Rights Reserved.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unl... | @rem Copyright 2015 Google Inc. All Rights Reserved.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unl... |
Print out buildlog.txt to console | @echo off
@echo ...
@echo Running reference documentation Build Script, capturing output to buildlog.txt ...
@echo Start Time: %time%
..\..\build-support\tools\nant\bin\nant %1 %2 %3 %4 %5 %6 %7 %8 %9 > buildlog.txt
@echo ...
@echo ************************
@echo Build Complete!
@echo ************************
@... | @echo off
@echo ...
@echo Running reference documentation Build Script, capturing output to buildlog.txt ...
@echo Start Time: %time%
..\..\build-support\tools\nant\bin\nant %1 %2 %3 %4 %5 %6 %7 %8 %9 > buildlog.txt
type buildlog.txt
@echo ...
@echo ************************
@echo Build Complete!
@echo *******... |
Add comment and delete temporary file after use. | @echo off
py25 setup.py --long-description | py25 web\rst2html.py --link-stylesheet --stylesheet=http://www.python.org/styles/styles.css > ~pypi.html
start ~pypi.html
| @echo off
REM
REM Convert setup.py's long description to HTML and show it.
REM
py25 setup.py --long-description | py25 web\rst2html.py --link-stylesheet --stylesheet=http://www.python.org/styles/styles.css > ~pypi.html
start ~pypi.html
del ~pypi.html
|
Fix relative dir typo in xcopy pyparsing.py command | xcopy /y .\sourceforge\svn\trunk\src\pyparsing.py .
c:\python27\python c:\python27\scripts\epydoc -v --name pyparsing -o htmldoc --inheritance listed --no-private pyparsing.py
| xcopy /y ..\sourceforge\svn\trunk\src\pyparsing.py .
c:\python27\python c:\python27\scripts\epydoc -v --name pyparsing -o htmldoc --inheritance listed --no-private pyparsing.py
|
Fix for release script error when there is space in directory path. | # Verify release
SET CURRENT_DIRECTORY=%cd%
call scripts\verifyReleaseWindowsSingleCase.bat %CURRENT_DIRECTORY%\cpp 32 STATIC || exit /b 1
call scripts\verifyReleaseWindowsSingleCase.bat %CURRENT_DIRECTORY%\cpp 32 SHARED || exit /b 1
call scripts\verifyReleaseWindowsSingleCase.bat %CURRENT_DIRECTORY%\cpp 64 STATIC |... | REM Verify release
SET CURRENT_DIRECTORY=%cd%
call scripts\verifyReleaseWindowsSingleCase.bat "%CURRENT_DIRECTORY%\cpp" 32 STATIC || exit /b 1
call scripts\verifyReleaseWindowsSingleCase.bat "%CURRENT_DIRECTORY%\cpp" 32 SHARED || exit /b 1
call scripts\verifyReleaseWindowsSingleCase.bat "%CURRENT_DIRECTORY%\cpp" 64 ... |
Add vioinput to the top-level build script | cd VirtIO
call buildall.bat
cd ..
cd NetKVM
call buildall.bat
cd ..
cd viostor
call buildall.bat
cd ..
cd vioscsi
call buildall.bat
cd ..
cd Balloon
call buildall.bat
cd ..
cd vioserial
call buildall.bat
cd ..
cd viorng
call buildall.bat
cd ..
cd pvpanic
call buildall.bat
cd ..
| cd VirtIO
call buildall.bat
cd ..
cd NetKVM
call buildall.bat
cd ..
cd viostor
call buildall.bat
cd ..
cd vioscsi
call buildall.bat
cd ..
cd Balloon
call buildall.bat
cd ..
cd vioserial
call buildall.bat
cd ..
cd viorng
call buildall.bat
cd ..
cd vioinput
call buildall.bat
cd ..
cd pvpanic
call buildall.bat
cd ... |
Use absolute path to setup.py-installed entry point | rem Won't be found because there are no shebang lines on Windows
rem python test-script-setup.py
rem if errorlevel 1 exit 1
rem python test-script-setup.py | grep "Test script setup\.py"
rem if errorlevel 1 exit 1
test-script-manual
if errorlevel 1 exit 1
test-script-manual | grep "Manual entry point"
if errorlevel 1... | rem We have to use the absolute path because there is no "shebang line" in Windows
python "%PREFIX%\Scripts\test-script-setup.py"
if errorlevel 1 exit 1
python "%PREFIX%\Scripts\test-script-setup.py" | grep "Test script setup\.py"
if errorlevel 1 exit 1
test-script-manual
if errorlevel 1 exit 1
test-script-manual | gr... |
Exclude README.md file from package | @echo off
set zipcmd=%~dp0\tools\7z\7z.exe
pushd %~dp0\..\..
%zipcmd% a -r -x!scripts -xr!.* -x!__pycache__ blenderseed-x.x.x-yyyy.zip blenderseed
popd
move ..\..\blenderseed-x.x.x-yyyy.zip .
pause
| @echo off
set zipcmd=%~dp0\tools\7z\7z.exe
pushd %~dp0\..\..
%zipcmd% a -r -x!scripts -xr!.* -x!__pycache__ -x!README.md blenderseed-x.x.x-yyyy.zip blenderseed
popd
move ..\..\blenderseed-x.x.x-yyyy.zip .
pause
|
Add missing "if errorlevel 1 exit 1" lines | rem Won't be found because there are no shebang lines on Windows
rem python test-script-setup.py
rem if errorlevel 1 exit 1
rem python test-script-setup.py | grep "Test script setup\.py"
test-script-manual
if errorlevel 1 exit 1
test-script-manual | grep "Manual entry point"
| rem Won't be found because there are no shebang lines on Windows
rem python test-script-setup.py
rem if errorlevel 1 exit 1
rem python test-script-setup.py | grep "Test script setup\.py"
rem if errorlevel 1 exit 1
test-script-manual
if errorlevel 1 exit 1
test-script-manual | grep "Manual entry point"
if errorlevel 1... |
Add batch script to remove a git submodule from a local workspace | @rem This is a simple batch script to remove a submodule reference from a
@rem working directory
@rem Call the script by
@rem 1) cd path\to\your\workspace
@rem 2) path\to\removeSubmodule.bat submoduleName
@rem See https://stackoverflow.com/questions/1260748/how-do-i-remove-a-git-submodule for more details
@echo Remo... | |
Make sure DB exists and is aligned before running the server | @echo off
setlocal
set mypath=%~dp0
set PYTHONPATH=pkgs
if "%PROCESSOR_ARCHITECTURE%"=="x86" (
set common="%COMMONPROGRAMFILES%"
) else (
set common="%COMMONPROGRAMFILES(x86)%"
)
REM Start the DbServer in background but within the same context
start "OpenQuake DB server" /B %common%\Python\2.7\pytho... | @echo off
setlocal
set mypath=%~dp0
set PYTHONPATH=pkgs
if "%PROCESSOR_ARCHITECTURE%"=="x86" (
set common="%COMMONPROGRAMFILES%"
) else (
set common="%COMMONPROGRAMFILES(x86)%"
)
REM Start the DbServer in background but within the same context
start "OpenQuake DB server" /B %common%\Python\2.7\pytho... |
Add Instructions on Downloading Mingw 64bit for Building memdb | @echo off
set GOARCH=%1
IF "%1" == "" (set GOARCH=amd64)
set ORG_PATH=github.com\hashicorp
set REPO_PATH=%ORG_PATH%\consul
set GOPATH=%cd%\gopath
rmdir /s /q %GOPATH%\src\%REPO_PATH% 2>nul
mkdir %GOPATH%\src\%ORG_PATH% 2>nul
mklink /J "%GOPATH%\src\%REPO_PATH%" "%cd%" 2>nul
%GOROOT%\bin\go build -o bin\%GOARCH%\con... | @echo off
REM Download Mingw 64 on Windows from http://win-builds.org/download.html
set GOARCH=%1
IF "%1" == "" (set GOARCH=amd64)
set ORG_PATH=github.com\hashicorp
set REPO_PATH=%ORG_PATH%\consul
set GOPATH=%cd%\gopath
rmdir /s /q %GOPATH%\src\%REPO_PATH% 2>nul
mkdir %GOPATH%\src\%ORG_PATH% 2>nul
go get .\...
mkli... |
Use the correct path for makevars. | sed -i 's/gnu/msvc/' changeforest-r/src/Makevars.win
sed -i '1s/^/export CXX_STD=CXX11\n/' Makevars.win
sed -i '1s/^/export PKG_CXXFLAGS=$(CXX_VISIBILITY)\n/' Makevars.win
"%R%" CMD INSTALL --build changeforest-r
IF %ERRORLEVEL% NEQ 0 exit 1 | sed -i 's/gnu/msvc/' changeforest-r/src/Makevars.win
sed -i '1s/^/export CXX_STD=CXX11\n/' changeforest-r/src/Makevars.win
sed -i '1s/^/export PKG_CXXFLAGS=$(CXX_VISIBILITY)\n/' changeforest-r/src/Makevars.win
"%R%" CMD INSTALL --build changeforest-r
IF %ERRORLEVEL% NEQ 0 exit 1 |
Use Windows CLASSPATH environment variable | @REM
@REM Copyright 2010-2017 Boxfuse GmbH
@REM
@REM Licensed under the Apache License, Version 2.0 (the "License");
@REM you may not use this file except in compliance with the License.
@REM You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required b... | @REM
@REM Copyright 2010-2017 Boxfuse GmbH
@REM
@REM Licensed under the Apache License, Version 2.0 (the "License");
@REM you may not use this file except in compliance with the License.
@REM You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required b... |
Add script to disable intel context menu | @echo off
setlocal EnableDelayedExpansion
set registryRoot=HKCU\Software\Classes
set key=igfxcui
reg add "%registryRoot%\Directory\Background\shellex\ContextMenuHandlers\%key%" /d "---" /f
set key=igfxDTCM
reg add "%registryRoot%\Directory\Background\shellex\ContextMenuHandlers\%key%" /d "---" /f
| |
Add build script for installation | #!/bin/bash
PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
EXEC_DIR="/usr/local/bin" # set to anywhere seen by $PATH
CONF_DIR="/etc/distributed-motion-s3" # default location to store config files (*.toml)
# build dms3 components
#
echo 'building dms3 components...'
g... | |
Change the executable from main to firstify | @echo off
if not "%1" == "" goto continue
if not exist imaginary\obj mkdir imaginary\obj
for %%i in (imaginary\*.yca) do call %0 %%~ni
goto end
:continue
echo Processing %1
main imaginary\%1.yca -mshl -o imaginary\obj\%1 > imaginary\obj\%1.txt 2>&1
goto end
:end
| @echo off
if not "%1" == "" goto continue
if not exist imaginary\obj mkdir imaginary\obj
for %%i in (imaginary\*.yca) do call %0 %%~ni
goto end
:continue
echo Processing %1
firstify imaginary\%1.yca -mshl -o imaginary\obj\%1 > imaginary\obj\%1.txt 2>&1
goto end
:end
|
Return error level from batch file. | @echo off
pushd %~dp0
dotnet publish tools\Build\Build.csproj --output tools\bin\Build --nologo --verbosity quiet
if %errorlevel% equ 0 dotnet tools\bin\Build\Build.dll %*
popd
| @echo off
pushd %~dp0
dotnet publish tools\Build\Build.csproj --output tools\bin\Build --nologo --verbosity quiet
if %errorlevel% equ 0 dotnet tools\bin\Build\Build.dll %*
popd
exit /b %errorlevel%
|
Update to visual studio 2015 | @echo off
if "%~1"=="" (
call :Usage
goto :EOF
)
call bootstrap.cmd
pushd "%~dp0"
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
set ProgramFilesDir=%ProgramFiles%
if NOT "%ProgramFiles(x86)%"=="" set ProgramFilesDir=%ProgramFiles(x86)%
set VisualStudioCmd=%ProgramFilesDir%\Microsoft Visual Studio 12.0\VC\vcv... | @echo off
if "%~1"=="" (
call :Usage
goto :EOF
)
call bootstrap.cmd
pushd "%~dp0"
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
set ProgramFilesDir=%ProgramFiles%
if NOT "%ProgramFiles(x86)%"=="" set ProgramFilesDir=%ProgramFiles(x86)%
set VisualStudioCmd=%ProgramFilesDir%\Microsoft Visual Studio 14.0\VC\vcv... |
Speed up NuGet binary download | @echo off
cls
SET BUILD_DIR=%~dp0\build
SET TOOLS_DIR=%BUILD_DIR%\tools
SET NUGET_PATH=%TOOLS_DIR%\nuget.exe
IF NOT EXIST %TOOLS_DIR%\ (
mkdir %TOOLS_DIR%
)
IF NOT EXIST %NUGET_PATH% (
echo Downloading NuGet.exe ...
powershell -Command "Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/v4.3.0/nuget.... | @echo off
cls
SET BUILD_DIR=%~dp0\build
SET TOOLS_DIR=%BUILD_DIR%\tools
SET NUGET_PATH=%TOOLS_DIR%\nuget.exe
IF NOT EXIST %TOOLS_DIR%\ (
mkdir %TOOLS_DIR%
)
IF NOT EXIST %NUGET_PATH% (
echo Downloading NuGet.exe ...
powershell -Command "Start-BitsTransfer -Source https://dist.nuget.org/win-x86-commandline/v4.3... |
Use PFX certificate file when signing msi | @echo off
set DIST_DIR=dist
set CERTIFICATE_STORE=Root
set CERTIFICATE_NAME="Nuxeo Drive SPC"
set MSI_PROGRAM_NAME="Nuxeo Drive"
set TIMESTAMP_URL=http://timestamp.verisign.com/scripts/timstamp.dll
set SIGN_CMD=signtool sign /v /s %CERTIFICATE_STORE% /n %CERTIFICATE_NAME% /d %MSI_PROGRAM_NAME% /t %TIMESTAMP_URL%
set ... | @echo off
set DIST_DIR=dist
set CERTIFICATE_PATH=%HOMEPATH%\certificates\nuxeo.com.pfx
set MSI_PROGRAM_NAME="Nuxeo Drive"
set TIMESTAMP_URL=http://timestamp.verisign.com/scripts/timstamp.dll
set SIGN_CMD=signtool sign /v /f %CERTIFICATE_PATH% /d %MSI_PROGRAM_NAME% /t %TIMESTAMP_URL%
set VERIFY_CMD=signtool verify /v ... |
Fix SQL CLI on Windows | @echo off
rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
rem or more contributor license agreements. Licensed under the Elastic License;
rem you may not use this file except in compliance with the Elastic License.
setlocal enabledelayedexpansion
setlocal enableextensions
call "%~dp0... | @echo off
rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
rem or more contributor license agreements. Licensed under the Elastic License;
rem you may not use this file except in compliance with the Elastic License.
setlocal enabledelayedexpansion
setlocal enableextensions
call "%~dp0... |
Remove dev symlinks before deleting Release and Debug dirs. | ECHO OFF
REM - Check for OS. This script works in Vista or later.
REM Running it on XP may delete the entire Brackets repo if 'Release\dev' is a junction point.
ver | findstr /i "5\.1\." > nul
IF %ERRORLEVEL% EQU 0 GOTO XPNotSupported
REM Remove existing links
rmdir Debug include lib libcef_dll Release
REM Make n... | ECHO OFF
REM - Check for OS. This script works in Vista or later.
REM Running it on XP may delete the entire Brackets repo if 'Release\dev' is a junction point.
ver | findstr /i "5\.1\." > nul
IF %ERRORLEVEL% EQU 0 GOTO XPNotSupported
REM Remove existing links to dev folder
rmdir Release\dev
rmdir Debug\dev
REM Re... |
Add batch script to run SWMM5 from command line | @echo off
REM Test SWMM5 simulation
REM This is an example script to run SWMM5 from command line
REM Syntax:
REM [PATH TO swmm5.exe] [PATH TO SWMM5 INPUT FILE (*.inp)] [PATH TO SWMM5 OUTPUT SUMMARY FILE (*.rpt)] [(OPTIONAL) PATH TO SWMM5 OUTPUT BINARY FILE (*.out)]
REM Save only the summary (text) output file (*.r... | |
Add run script for Windows | SET "AIR_SDK=%USERPROFILE%\Documents\AdobeAIRSDK"
set "STEAM_SDK=%USERPROFILE%\Documents\Steam\sdk"
SET ANE_PATH=..\..\lib\bin
set "PATH=%STEAM_SDK%\redistributable_bin;%PATH%"
"%AIR_SDK%\bin\adl.exe" -extdir "%ANE_PATH%" FRESteamWorksTest-app.xml
| |
Add comments (REM) to bat file. | echo off
php pre.php %1 %2 %3
| echo off
rem To simplify using pre on multiple sites/directories, install this bat file in the Windows path.
php pre.php %1 %2 %3
|
Disable MinGW test - currently we don't have Boost libs verified for it. | rem This script use MinGW to build the MDSP.
rem But still we use certain CygWin utilities: SVN
PATH=C:\mingw\bin\;c:\mingw\mingw32\bin\;c:\mingw\msys\1.0\bin;C:\MinGW\libexec\gcc\mingw32\4.5.0\;C:\cygwin\bin\;c:\buildbot\bin;%PATH%
set HOME=/c/buildbot/
bash mdsp_test_suite.sh mail
| rem This script use MinGW to build the MDSP.
rem But still we use certain CygWin utilities: SVN
rem Currently MingGW version is disabled - we don't have validated Boost libs version for it.
exit
PATH=C:\mingw\bin\;c:\mingw\mingw32\bin\;c:\mingw\msys\1.0\bin;C:\MinGW\libexec\gcc\mingw32\4.5.0\;C:\cygwin\bin\;c:\buildb... |
Add a Batch script for running tests on Windows | @echo off
REM Run tests on Windows.
REM
REM To run these tests, you should set up your Windows machine with the same
REM paths that are used in AppVeyor.
set tests=test/*.vader test/*/*.vader test/*/*/*.vader test/*/*/*/*.vader
REM Use the first argument for selecting tests to run.
if not "%1"=="" set tests=%1
set V... | |
Add Canvas2D to the npm release script | xcopy /Y /F "../../dist/preview release/babylon.d.ts" .
xcopy /Y /F "../../dist/preview release/babylon.js" .
xcopy /Y /F "../../dist/preview release/babylon.max.js" .
xcopy /Y /F "../../dist/preview release/babylon.noworker.js" .
xcopy /Y /F "../../dist/preview release/babylon.core.js" .
xcopy /Y /F "../../dis... | xcopy /Y /F "../../dist/preview release/babylon.d.ts" .
xcopy /Y /F "../../dist/preview release/babylon.js" .
xcopy /Y /F "../../dist/preview release/babylon.max.js" .
xcopy /Y /F "../../dist/preview release/babylon.noworker.js" .
xcopy /Y /F "../../dist/preview release/babylon.core.js" .
xcopy /Y /F "../../dis... |
Change symbols to var resolve for windows builds | curl -sSf https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe -o rust-nightly-%TARGET%.exe
rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
set PATH=%PATH%;C:\Program Files (x86)\Rust\bin
if defined MSYS_BITS set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PA... | curl -sSf https://static.rust-lang.org/dist/rust-nightly-%TARGET%.exe -o rust-nightly-%TARGET%.exe
rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
set PATH=%PATH%;C:\Program Files (x86)\Rust\bin
if defined MSYS_BITS set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH%
... |
Use a putty saved session instead of pageant | @echo off
rem This script is in use by the Windows buildslaves to upload the package to openphdguiding.org
set exitcode=1
for /F "usebackq" %%f in (`dir phd2-*-win32.exe /O-D /B` ) do (
if EXIST %%f (
(
echo cd upload
echo put %%f
echo quit
) | psftp phd2buildbot@openphdguiding.org
s... | @echo off
rem This script is in use by the Windows buildslaves to upload the package to openphdguiding.org
rem
rem Before to run this script you need to install putty and add it to PATH.
rem As we cannot use pageant from the buildbot service we need to create
rem a saved session named phd2buildbot in putty usi... |
Update command file for publishing nuget. | @echo off
echo Press any key to publish
pause
".nuget\NuGet.exe" push Rssdp.3.5.0-beta.nupkg -Source https://www.nuget.org/api/v2/package
pause | @echo off
echo Press any key to publish
pause
".nuget\NuGet.exe" push Rssdp.3.5.3.nupkg -Source https://www.nuget.org/api/v2/package
pause |
Revert "Don't do a BootDPRO but instead call the boot directly." | ECHO Clone Dolphin image environment
git clone -q --branch=master https://github.com/dolphinsmalltalk/Dolphin.git Dolphin
ECHO Copy executables
copy ..\..\Dolphin7.exe Dolphin
copy ..\..\DolphinVM7.dll Dolphin
copy ..\..\DolphinCR7.dll Dolphin
copy ..\..\DolphinDR7.dll Dolphin
copy ..\..\DolphinSureCrypto.dll Dolphin
... | ECHO Clone Dolphin image environment
git clone -q --branch=master https://github.com/dolphinsmalltalk/Dolphin.git Dolphin
ECHO Copy executables
copy ..\..\Dolphin7.exe Dolphin
copy ..\..\DolphinVM7.dll Dolphin
copy ..\..\DolphinCR7.dll Dolphin
copy ..\..\DolphinDR7.dll Dolphin
copy ..\..\DolphinSureCrypto.dll Dolphin
... |
Patch for version 0.73 update | @echo off
cls
:start
echo Starting server...
"Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.72" -password "" -tcpLobby "149.202.51.185" 25565
echo.
echo Restarting server...
echo.
goto start
| @echo off
cls
:start
echo Starting server...
"Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.73" -password "" -tcpLobby "149.202.51.185" 25565
echo.
echo Restarting server...
echo.
goto start
|
Add script to conditionally start Bridge | echo off
setlocal
tasklist /FI "IMAGENAME eq Bridge.exe" 2>NUL | find /I /N "Bridge.exe">NUL
if "%ERRORLEVEL%"=="0" (
echo The Bridge is already running.
goto running
)
pushd %~dp0
echo Building the Bridge...
call BuildWCFTestService.cmd
popd
if '%BridgeResourceFolder%' == '' (
set _bridgeResourceFolder=..\..... | |
Update to use latest KuduScript | @echo off
setlocal enabledelayedexpansion
pushd %1
set attempts=5
set counter=0
:retry
set /a counter+=1
echo Attempt %counter% out of %attempts%
cmd /c npm install https://github.com/projectkudu/KuduScript/tarball/66dd7e2a3966c06180df0eb66cc9400d4b961e5e
IF %ERRORLEVEL% NEQ 0 goto error
goto end
:error
if %coun... | @echo off
setlocal enabledelayedexpansion
pushd %1
set attempts=5
set counter=0
:retry
set /a counter+=1
echo Attempt %counter% out of %attempts%
cmd /c npm install https://github.com/projectkudu/KuduScript/tarball/254116790e41bc69bce809e46c9998f03addcfc4
IF %ERRORLEVEL% NEQ 0 goto error
goto end
:error
if %coun... |
Add bat for building solution from CLI | SET PATH=C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;%PATH%;
CALL "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"
git pull --recurse-submodules
git submodule update
msbuild /p:Configuration=Normal
gsutil cp Normal/engine/engine.exe gs://grit-engine/
gsutil cp Normal/la... | |
Fix batch file unit tests | @echo on
set config=%1
if "%config%" == "" (
set config=Release
)
set version=
if not "%PackageVersion%" == "" (
set version=-Version %PackageVersion%
)
if "%NuGet%" == "" (
set NuGet=".nuget\nuget.exe"
)
REM Package restore
call %NuGet% restore PropertyCopier\packages.config -OutputDirectory %cd%\packages -N... | @echo on
set config=%1
if "%config%" == "" (
set config=Release
)
set version=
if not "%PackageVersion%" == "" (
set version=-Version %PackageVersion%
)
if "%NuGet%" == "" (
set NuGet=".nuget\nuget.exe"
)
REM Package restore
call %NuGet% restore PropertyCopier\packages.config -OutputDirectory %cd%\packages -N... |
Add bat file for creating project with MSVC12 toolchain | call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
rmdir buildRelease /s /q
rmdir buildDebug /s /q
mkdir buildRelease
mkdir buildDebug
cd buildRelease
cmake ../ -GNinja^
-DCMAKE_BUILD_TYPE=Release^
-DCMAKE_PREFIX_PATH=c:/Qt/Qt5.5.1/msvc2013_64/^
-DGTEST_ROOT=e:/Dev/Libs/exter... | |
Remove positional parameter from bat file | @echo off
SETLOCAL enabledelayedexpansion
TITLE Elasticsearch ${project.version}
SET params='%*'
:loop
FOR /F "usebackq tokens=1* delims= " %%A IN (!params!) DO (
SET current=%%A
SET params='%%B'
SET silent=N
IF "!current!" == "-s" (
SET silent=Y
)
IF "!current!" == "--silent" (
SET silent=Y
)
... | @echo off
SETLOCAL enabledelayedexpansion
TITLE Elasticsearch ${project.version}
SET params='%*'
:loop
FOR /F "usebackq tokens=1* delims= " %%A IN (!params!) DO (
SET current=%%A
SET params='%%B'
SET silent=N
IF "!current!" == "-s" (
SET silent=Y
)
IF "!current!" == "--silent" (
SET silent=Y
)
... |
Make sure to uninstall the old pip package and install the newly built one when running windows tests on TF CI. | :: This script assumes the standard setup on tensorflow Jenkins windows machines.
:: It is NOT guaranteed to work on any other machine. Use at your own risk!
::
:: REQUIREMENTS:
:: * All installed in standard locations:
:: - JDK8, and JAVA_HOME set.
:: - Microsoft Visual Studio 2015 Community Edition
:: - Msys2
:... | :: This script assumes the standard setup on tensorflow Jenkins windows machines.
:: It is NOT guaranteed to work on any other machine. Use at your own risk!
::
:: REQUIREMENTS:
:: * All installed in standard locations:
:: - JDK8, and JAVA_HOME set.
:: - Microsoft Visual Studio 2015 Community Edition
:: - Msys2
:... |
Create a user data directory on Windows. | @echo off
call config.bat
echo Installing PIP...
%PYTHON% %BINDIR%\get-pip.py
echo Installing KCAA Python server prerequisites...
%PIP% install python-dateutil
%PIP% install requests
%PIP% install selenium
pause
| @echo off
call config.bat
echo Creating USERDATADIR: %USERDATADIR%
mkdir %USERDATADIR%
echo Installing PIP...
%PYTHON% %BINDIR%\get-pip.py
echo Installing KCAA Python server prerequisites...
%PIP% install python-dateutil
%PIP% install requests
%PIP% install selenium
pause
|
Test runner batch now takes optional command-line arguments. | @echo off
..\..\Tools\PhpNetTester.exe /compiler:..\..\Deployment\Debug\phpc.exe /php:..\..\Tools\PHP\php.exe
del /s *.pdb *.exe EmittedNodes.csv LibraryCalls.csv UnknownCalls.csv __input.txt Debug.log > nul
@echo Deleting empty log files...
for /f "delims=" %%i in ('dir /s/b/a-d *.log') do if %~zi==0 del %%i
pa... | @echo off
..\..\Tools\PhpNetTester.exe /compiler:..\..\Deployment\Debug\phpc.exe /php:..\..\Tools\PHP\php.exe %*
del /s *.pdb *.exe EmittedNodes.csv LibraryCalls.csv UnknownCalls.csv __input.txt Debug.log > nul
@rem Deleting empty log files...
for /f "delims=" %%i in ('dir /s/b/a-d *.log') do if %%~zi==0 del %%i
... |
ADd pymatgen-db to windwos build. | cd conda-skeletons
conda install conda-build anaconda-client
conda config --add channels matsci
conda config --set anaconda_upload yes
FOR %%A IN (latexcodec pybtex spglib pyhull pymatgen seekpath) DO conda build --user matsci %%A
cd ..
| cd conda-skeletons
conda install conda-build anaconda-client
conda config --add channels matsci
conda config --set anaconda_upload yes
FOR %%A IN (latexcodec pybtex spglib pyhull pymatgen pymatgen-db seekpath) DO conda build --user matsci %%A
cd ..
|
Set environment variables for current process | @echo off
set /P NVM_PATH="Enter the absolute path where the zip file is extracted/copied to: "
setx /M NVM_HOME "%NVM_PATH%"
setx /M NVM_SYMLINK "C:\Program Files\nodejs"
setx /M PATH "%PATH%;%NVM_HOME%;%NVM_SYMLINK%"
if exist "%SYSTEMDRIVE%\Program Files (x86)\" (
set SYS_ARCH=64
) else (
set SYS_ARCH=32
)
(echo roo... | @echo off
set /P NVM_PATH="Enter the absolute path where the zip file is extracted/copied to: "
set NVM_HOME=%NVM_PATH%
set NVM_SYMLINK=C:\Program Files\nodejs
setx /M NVM_HOME "%NVM_HOME%"
setx /M NVM_SYMLINK "%NVM_SYMLINK%"
setx /M PATH "%PATH%;%NVM_HOME%;%NVM_SYMLINK%"
if exist "%SYSTEMDRIVE%\Program Files (x86)\" ... |
Build script for Windows users | @echo off
:: Requirements for building
:: Download "Open Source Flex SDK" from http://www.adobe.com/devnet/flex/flex-sdk-download-all.html
:: file similar to: flex_sdk_4.1.0.16076_mpl.zip
::
:: create directory on disc e.g "C:\Program Files\FlexSdk"
:: Copy and extract downloaded .zip to this location
::
:: Go to Sta... | |
Fix SQL CLI on Windows | @echo off
rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
rem or more contributor license agreements. Licensed under the Elastic License;
rem you may not use this file except in compliance with the Elastic License.
setlocal enabledelayedexpansion
setlocal enableextensions
call "%~dp0... | @echo off
rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
rem or more contributor license agreements. Licensed under the Elastic License;
rem you may not use this file except in compliance with the Elastic License.
setlocal enabledelayedexpansion
setlocal enableextensions
call "%~dp0... |
Update Windows python binary to use py | pip install --upgrade wxPython
pip install -r requirements.txt
pip install pywin32
pyinstaller -p bundledApps --onefile --windowed --clean --version-file=build/version.txt --icon=build/icons/wail_blue.ico bundledApps/WAIL.py
::Windows shell (CMD.exe)
move /Y ".\dist\WAIL.exe" ".\WAIL.exe"
::Unix shell (e.g., from Gi... | py -m pip install --upgrade wxPython
py -m pip install -r requirements.txt
py -m pip install pywin32
pyinstaller -p bundledApps --onefile --windowed --clean --version-file=build/version.txt --icon=build/icons/wail_blue.ico bundledApps/WAIL.py
::Windows shell (CMD.exe)
move /Y ".\dist\WAIL.exe" ".\WAIL.exe"
::Unix sh... |
Disable officescan context menu on drives | @echo off
setlocal EnableDelayedExpansion
set registryRoot=HKCU\Software\Classes
set key=OfficeScan NT
reg add "%registryRoot%\*\shellex\ContextMenuHandlers\%key%" /d "---" /f
| @echo off
setlocal EnableDelayedExpansion
set registryRoot=HKCU\Software\Classes
set key=OfficeScan NT
reg add "%registryRoot%\*\shellex\ContextMenuHandlers\%key%" /d "---" /f
reg add "%registryRoot%\Drive\shellex\ContextMenuHandlers\%key%" /d "---" /f
|
Add Windows development environment creator | mkdir "C:\RestafariEnvironment"
cd "C:\RestafariEnvironment"
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
choco install wget -y
wget -c -O atom_setup.exe --no-chec... | |
Add telnet connection to qemu monitor | "C:\Program Files\qemu\qemu-system-x86_64.exe" -cdrom "C:\solutions\os_c\build\os-x86_64.iso" -d int -no-shutdown -no-reboot -s | "C:\Program Files\qemu\qemu-system-x86_64.exe" -cdrom "C:\solutions\os_c\build\os-x86_64.iso" -d int -no-shutdown -no-reboot -s -monitor telnet:127.0.0.1:2222,server,nowait |
Revert "add enable avx2 flag to windows build script" | @echo off
setlocal
set SCRIPTDIR=%~dp0
set PROJDIR=%SCRIPTDIR%..\..\
set MSBUILDBIN="C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe"
cd %PROJDIR%
@echo on
set BUILDDIR=%PROJDIR%build_win32\
set OUTPUTDIR=%PROJDIR%output\win32\
rmdir /S/Q %BUILDDIR%
mkdir %BUILDDIR%
cd %BUILDDIR%
cmake %PROJDIR% -G"Visual Studio... | @echo off
setlocal
set SCRIPTDIR=%~dp0
set PROJDIR=%SCRIPTDIR%..\..\
set MSBUILDBIN="C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe"
cd %PROJDIR%
@echo on
set BUILDDIR=%PROJDIR%build_win32\
set OUTPUTDIR=%PROJDIR%output\win32\
rmdir /S/Q %BUILDDIR%
mkdir %BUILDDIR%
cd %BUILDDIR%
cmake %PROJDIR% -G"Visual Studio... |
Change '--version' command for release | @echo off
setlocal
if "%1" == "--help" (
echo Usage: rbenv --version
echo.
echo Displays the version number of this rbenv release, including the
echo current revision from git, if available.
echo.
echo The format of the git revision is:
echo ^<version^>-^<num_commits^>-^<git_sha^>
echo where `num_commits` is the num... | @echo off
setlocal
if "%1" == "--help" (
echo Usage: rbenv --version
echo.
echo Displays the version number of this rbenv release, including the
echo current revision from git, if available.
echo.
echo The format of the git revision is:
echo ^<version^>-^<num_commits^>-^<git_sha^>
echo where `num_commits` is the num... |
Check if directory exists before trying to delete it. | @ECHO OFF
REM - Use full path of this batch file to determine root directory
set root_path=%~f0
set root_path=%root_path:~0,-27%
REM - Check for parameter
IF %1.==. GOTO Error
REM - Check for OS. This script works in Vista or later.
ver | findstr /i "5\.1\." > nul
IF %ERRORLEVEL% EQU 0 GOTO XPNotSupported
REM - Rem... | @ECHO OFF
REM - Use full path of this batch file to determine root directory
set root_path=%~f0
set root_path=%root_path:~0,-27%
REM - Check for parameter
IF %1.==. GOTO Error
REM - Check for OS. This script works in Vista or later.
ver | findstr /i "5\.1\." > nul
IF %ERRORLEVEL% EQU 0 GOTO XPNotSupported
REM - Rem... |
Stop build when an error occurs. "Peter 'Luna' Runestig" <peter+openssl-dev@runestig.com> | set OPTS=no-asm
perl Configure VC-WIN32
perl util\mk1mf.pl %OPTS% debug VC-WIN32 >d32.mak
perl util\mk1mf.pl %OPTS% VC-WIN32 >32.mak
perl util\mk1mf.pl %OPTS% debug dll VC-WIN32 >d32dll.mak
perl util\mk1mf.pl %OPTS% dll VC-WIN32 >32dll.mak
nmake -f d32.mak
nmake -f 32.mak
nmake -f d32dll.mak
nmake -f 32dll.mak
| set OPTS=no-asm
perl Configure VC-WIN32
perl util\mk1mf.pl %OPTS% debug VC-WIN32 >d32.mak
perl util\mk1mf.pl %OPTS% VC-WIN32 >32.mak
perl util\mk1mf.pl %OPTS% debug dll VC-WIN32 >d32dll.mak
perl util\mk1mf.pl %OPTS% dll VC-WIN32 >32dll.mak
nmake -f d32.mak
@if errorlevel 1 goto end
nmake -f 32.mak
@if errorlevel 1 go... |
Add a comment explaining why this path is set |
echo Current build setup MSVS="%MSVS%" PLATFORM="%PLATFORM%" TARGET="%TARGET%"
if %MSVS% == 2015 call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
if %MSVS% == 2017 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
if %MSVS%... |
echo Current build setup MSVS="%MSVS%" PLATFORM="%PLATFORM%" TARGET="%TARGET%"
if %MSVS% == 2015 call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
if %MSVS% == 2017 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
if %MSVS%... |
Fix error in version file | set MAJOR_PREVIOUS=1
set MINOR_PREVIOUS=5
set PATCH_PREVIOUS=12
set PRERELEASE_PREVIOUS=-developer
set MAJOR=1
set MINOR=5
set PATCH=13
set PRERELEASE=-developer
| set MAJOR_PREVIOUS=1
set MINOR_PREVIOUS=5
set PATCH_PREVIOUS=12
set PRERELEASE_PREVIOUS=-beta
set MAJOR=1
set MINOR=5
set PATCH=13
set PRERELEASE=-developer
|
Fix for the MyGet packaging | @echo Off
set config=%1
if "%config%" == "" (
set config=Release
)
set version=1.0.0
if not "%PackageVersion%" == "" (
set version=%PackageVersion%
)
set nuget=
if "%nuget%" == "" (
set nuget=nuget
)
set nunit="tools\nunit\nunit-console.exe"
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild src\Frankie.sl... | @echo Off
set config=%1
if "%config%" == "" (
set config=Release
)
set version=1.0.0
if not "%PackageVersion%" == "" (
set version=%PackageVersion%
)
set nuget=
if "%nuget%" == "" (
set nuget=nuget
)
set nunit="tools\nunit\nunit-console.exe"
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild src\Frankie.sl... |
Exclude ThScoreFileConverterTests from the coverage result | set CONFIGURATION=%1
set OUTPUT=%2
set OPENCOVER=".\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe"
set TARGET="%VSINSTALLDIR%\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"
set TARGET_ARGS=".\ThScoreFileConverterTests\bin\%CONFIGURATION%\ThScoreFileConverterTests.dll"
set FILTER="+[*]*"... | set CONFIGURATION=%1
set OUTPUT=%2
set OPENCOVER=".\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe"
set TARGET="%VSINSTALLDIR%\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"
set TARGET_ARGS=".\ThScoreFileConverterTests\bin\%CONFIGURATION%\ThScoreFileConverterTests.dll"
set FILTER="+[*]* ... |
Add windows .bat for automatically building foreign dependencies | @echo off
SET GENERATOR="Visual Studio 14 2015"
SET GENERATOR64="Visual Studio 14 2015 Win64"
rem SET GENERATOR"Visual Studio 15 2017"
rem SET GENERATOR64="Visual Studio 15 2017 Win64"
cd ../foreign/
cd SPIRV-Tools
mkdir build
cd build
cmake -G%GENERATOR% -DSPIRV-Headers_SOURCE_DIR=%cd%/../../SPIRV-Headers ..
cmake ... | |
Use ^ as line continuation character | @echo off
dotnet tool install --global AzureSignTool
azuresigntool sign --description-url "https://starschema.com" \
--file-digest sha256 --azure-key-vault-url https://billiant-keyvault.vault.azure.net \
--azure-key-vault-client-id %AZURE_KEY_VAULT_CLIENT_ID% \
--azure-key-vault-client-secret %AZURE_KEY_VAU... | @echo off
dotnet tool install --global AzureSignTool
azuresigntool sign --description-url "https://starschema.com" ^
--file-digest sha256 --azure-key-vault-url https://billiant-keyvault.vault.azure.net ^
--azure-key-vault-client-id %AZURE_KEY_VAULT_CLIENT_ID% ^
--azure-key-vault-client-secret %AZURE_KEY_VAU... |
Fix bat links on Windows | REM remove unneeded librar stubs
rd /S /Q %SRC_DIR%\include
rd /S /Q %SRC_DIR%\lib
rd /S /Q %SRC_DIR%\share\man
if errorlevel 1 exit 1
mkdir %SRC_DIR%\share\doc\graphviz
move %SRC_DIR%\share\graphviz\doc %SRC_DIR%\share\doc\graphviz
if errorlevel 1 exit 1
move %SRC_DIR%\bin %SRC_DIR%\graphviz
if errorlevel 1 exit 1
... | REM remove unneeded librar stubs
rd /S /Q %SRC_DIR%\include
rd /S /Q %SRC_DIR%\lib
rd /S /Q %SRC_DIR%\share\man
if errorlevel 1 exit 1
mkdir %SRC_DIR%\share\doc\graphviz
move %SRC_DIR%\share\graphviz\doc %SRC_DIR%\share\doc\graphviz
if errorlevel 1 exit 1
move %SRC_DIR%\bin %SRC_DIR%\graphviz
if errorlevel 1 exit 1
... |
Copy GLL to yc for Examples. | if exist yc (
rd /s /q yc )
mkdir yc
xcopy /Y ..\YaccConstructor\YaccConstructor\bin\Release\*.dll yc
xcopy /Y ..\YaccConstructor\YaccConstructor\bin\Release\*.exe yc
xcopy /Y ..\YaccConstructor\CYK\bin\Release\*.exe yc
xcopy /Y ..\YaccConstructor\CYK\bin\Release\*.dll yc
xcopy /Y ..\YaccConstructor\RNG... | if exist yc (
rd /s /q yc )
mkdir yc
xcopy /Y ..\YaccConstructor\YaccConstructor\bin\Release\*.dll yc
xcopy /Y ..\YaccConstructor\YaccConstructor\bin\Release\*.exe yc
xcopy /Y ..\YaccConstructor\CYK\bin\Release\*.exe yc
xcopy /Y ..\YaccConstructor\GLLGenerator\bin\Release\*.dll yc
xcopy /Y ..\YaccConstr... |
Fix handling of spaces in plugin script on Windows | @echo off
SETLOCAL enabledelayedexpansion
IF DEFINED JAVA_HOME (
set JAVA=%JAVA_HOME%\bin\java.exe
) ELSE (
FOR %%I IN (java.exe) DO set JAVA=%%~$PATH:I
)
IF NOT EXIST "%JAVA%" (
ECHO Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME 1>&2
EXIT /B 1
)
set SCRIPT_DIR=... | @echo off
SETLOCAL enabledelayedexpansion
IF DEFINED JAVA_HOME (
set JAVA="%JAVA_HOME%\bin\java.exe"
) ELSE (
FOR %%I IN (java.exe) DO set JAVA=%%~$PATH:I
)
IF NOT EXIST %JAVA% (
ECHO Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME 1>&2
EXIT /B 1
)
set SCRIPT_DIR=... |
Update windows script so cmd-c works properly | @echo off
set OLDDIR=%CD%
cd %~dp0
cd ..
set AGILE_HOME=%CD%
set CMD_LINE_ARGS=
:getArgs
if %1x==x goto doneArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto getArgs
:doneArgs
SET JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set JAVA_OPTS=-Xmx512m -Djava.awt.headless=true -Duser.timezone=UTC
cd %AGILE_HOME%
%JAVA_EXE% ... | @echo off
:: Try to get around "Terminate batch job?" - use start, which spawns a new window
:: Establish if we were launched from the command line.
:: If so, run a start /wait otherwise we want the original window to close
set SCRIPT=%0
set DQUOTE="
@echo %SCRIPT:~0,1% | findstr /l %DQUOTE% > NUL
if NOT %ERRORLEVEL% ... |
Remove old .vsi file before creating new | ..\Build\tools\7zip\7za.exe -r a CosmosBoot.zip ProjectTemplate
..\Build\tools\7zip\7za.exe a -tzip Cosmos.vsi Cosmos.vscontent CosmosBoot.zip
del CosmosBoot.zip | del Cosmos.vsi
..\Build\tools\7zip\7za.exe -r a CosmosBoot.zip ProjectTemplate
..\Build\tools\7zip\7za.exe a -tzip Cosmos.vsi Cosmos.vscontent CosmosBoot.zip
del CosmosBoot.zip |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.