Commands MSI

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

for D in countries_s2; do for G in backward_unknown2_2 backward_unknown2_3; do for

M in dcr sbr r2n; do for S in [0,1,2,3,4]; do python runner.py --d $D --g $G --m
$M --s $S; done; done; done; done

for D in countries_s2; do for G in backward_unknown3_1 backward_unknown3_2


backward_unknown3_3; do for M in dcr sbr r2n; do for S in [0,1,2,3,4]; do python
runner.py --d $D --g $G --m $M --s $S; done; done; done; done

countries_s1 countries_s2 countries_s3 nations pharmkg_small pharmkg_full


kinship_family FB15k237
relationentity backward_1 backward_2 backward_3 domainbody
dcr sbr r2n no_reasoner
@echo off
setlocal enabledelayedexpansion

for %%D in (kinship_family_reason_2 countries_s2 countries_s3) do (


for %%M in (no_reasoner sbr rnm dcr r2n) do (
for %%S in (0 1 2 3 4) do (
python runner.py -d %%D -m %%M -s %%S > output_%%D_%%M_%%S.txt
)
)
)

----------------------------------------------
CHANGE USERNAME
git config --global user.email rodrigo.castellano@unisi.it
git config --global user.name rodrigo-castellano
git config --global --list
--------------------
CLONE REPO
clone a repo:git clone
https://rodrigocastellano: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@github.com/nesy-
deep/keras-ns.git
clone a repo: git clone
https://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@github.com/rodrigo-castellano/
keras_ns_grounders.git
---------------------------------
RESTORE REPO AND CHANGE BRANCH
git branch
git checkout dcr_r2n_with_neural_grounder

#restore repo:
git stash # to undo all the tracked changes
git fetch origin
git reset --hard origin/main # this is for the main branch!!!!!!
git clean -fdx # to remove also untracked files

------------------------------------------------------------------------------
CONFLICTS WITH GIT

you have your changes in you server, and have the same file hparam.txt in both
places, but dont want to sybcronise that one.
git pull origin branch_name --skip hparam.txt
if you have your changes in you server,and you only want to push to the server all
the files except for two, how can you do it?
git add . # to add all the files
git reset -- file # to remove the file you dont want to update
git stash # to remove all the not added files (in this case only the file)
git commit and also git push
-----------------------------------
GLOBAL TARGET
# it is better not to have any global target
pip config list # to see the current path to global (there should be none, because
otherwise libs are always installed there even if we are in a env)
config unset global.target
pip config set global.target C:\Users\rodri\Downloads\PhD\Review_grounders\
Env_ns_311\Lib\site-packages
pip install --target=C:\Users\rodri\Downloads\PhD\Review_grounders\Env_ns_311\Lib\
site-packages numpy

add path to environment variable


c:\users\rcastellano\downloads\rodrigo\env_old\scripts\python.exe -m pip install -r
req_cpu_pyvhr.txt
pip show fastdtw
pip list
------------------------------------------------
ADDING PATHS
https://stackoverflow.com/questions/7901373/configuring-python-to-use-additional-
locations-for-site-packages
http://net-informations.com/python/intro/path.htm
https://www.makeuseof.com/windows-not-recognized-as-an-internal-or-external-
command-error/#:~:text=You%20can%20resolve%20this%20issue,files%20to%20the
%20System32%20folder.
command -m
https://stackoverflow.com/questions/50821312/meaning-of-python-m-flag
python t
python -m venv name_env
---------------------------------------------------------
-git clone https://146.140.228.23:30443/nils/mask-rcnn.git
-The first time I may have an error with the certificate. In that case: `git config
--global http.sslVerify false`
This may appear the first time you install it on a computer `git config --
global user.email "rodrigo.castellano.ontiveros@desion.de"` `git config --global
user.name "Rodrigo Castellano Ontiveros"`
-To see the changes, `git status`
-To add files with changes, `git add .\mask_rcnn_edu.py`. If I want to add more
changes, `git add .\'filename'.py`. If I want to add all the files that are
proposed to be commited, `git add -u`
-To do commit, `git commit -m "comments, such as: Removed unnecessary line from
mask_rcnn_edu.py"`
-To upload everything to the repository, `git push`

GIT:
git add .
git commit -m 'huk'

git status

git diff pacp.py unstaged file with the last commit


git diff -r HEAD pacp.py staged (means git add has been done) file versus the
last commit
git diff -r HEAD all staged files versus the last commit

git log see all the commits


If the output doesn't fit in the terminal window, there will be a colon at the end
of the output, indicating there are more commits. We can move through the history
by pressing the space bar. When we want to exit the log we can press q to return to
the terminal.
9. Finding a particular commit. We only need to note the first six-to-eight
characters of the hash. We can then run git show followed by the start of the hash
for each commit in turn, until we find the commit we are looking for.

git show can be used with HEAD and tilde to show what changed in a specific commit.
git diff hash1 hash2 will display changes between two commits, as will git diff and
different HEAD paths.
Lastly, git annotate file will show line-by-line changes to a file and its
associated metadata.

----------------------------------------------------------------------
making changes
To unstage a single file, we can use the command git reset HEAD followed by the
filename
to move all files in the staging area back to the repo, then we execute git reset
HEAD without specifying any filenames.

Undo changes to an unstaged file


git checkout file

10. Unstaging and undoing


To unstage one or more files and then undo changes we can combine the commands we
have learned.
So, first we unstage all files using git reset HEAD.
Then we execute git checkout dot to checkout the last commit, replacing all
versions of files in the repo.
To save the repo in this state we then need to add all files to the staging area,
and make a commit.

unestages file: git checkout -- report.md


staged file:
git reset HEAD file to unstage it
git checkout --file
add all files to the staging area, and make a commit

restore to specific version of the log


git checkout hash file

git clean -N,git clean -f

-------------------------------------------------------------workflows
git branch
git checkout -b 'newbranch'
git diff main newbranch to see the diff
git checkout newbranch to change to this branch
git merge source destination
-----------------------------------------
git fecht origin main to see the changes between main branch and the remote rrepo
called origin
fetch+merge =pull git pull origin main

You might also like