Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
AVVR-Pipeline-GDP4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GDP Project 4
AVVR-Pipeline-GDP4
Commits
795efd19
Commit
795efd19
authored
6 months ago
by
las1g21
Browse files
Options
Downloads
Patches
Plain Diff
Added Sending Files and Connect to Iridis
parent
8b140465
Branches
Branches containing commit
No related tags found
1 merge request
!9
GDP 4.4.5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+2
-1
2 additions, 1 deletion
.gitignore
mona-ssc
+1
-0
1 addition, 0 deletions
mona-ssc
scripts/scene_completion.py
+63
-0
63 additions, 0 deletions
scripts/scene_completion.py
with
66 additions
and
1 deletion
.gitignore
+
2
−
1
View file @
795efd19
...
@@ -2,3 +2,4 @@ scripts/360monodepthexecution/rgb.jpg
...
@@ -2,3 +2,4 @@ scripts/360monodepthexecution/rgb.jpg
scripts/shifted_t.png
scripts/shifted_t.png
scripts/config.ini
scripts/config.ini
*.pyc
*.pyc
.env
\ No newline at end of file
This diff is collapsed.
Click to expand it.
mona-ssc
@
a0816610
Subproject commit a0816610da9fa1ed52674240d8343b5643f0e25c
This diff is collapsed.
Click to expand it.
scripts/scene_completion.py
0 → 100644
+
63
−
0
View file @
795efd19
import
paramiko
from
dotenv
import
load_dotenv
from
scp
import
SCPClient
import
os
load_dotenv
()
hostname
=
os
.
getenv
(
"
HOSTNAME
"
)
username
=
os
.
getenv
(
"
USERNAME
"
)
password
=
os
.
getenv
(
"
PASSWORD
"
)
def
send_files
(
shifted_disparity_path
,
shifted_t_path
):
command
=
[
"
scp
"
,
shifted_disparity_path
,
f
"
{
username
}
@
{
hostname
}
:
{
os
.
getenv
(
"
REMOTE_INPUT_PATH
"
)
}
"
]
try
:
subprocess
.
run
(
command
,
check
=
True
)
except
subprocess
.
CalledProcessError
as
e
:
print
(
f
"
Error during SCP:
{
e
}
"
)
return
False
command
=
[
"
scp
"
,
shifted_t_path
,
f
"
{
username
}
@
{
hostname
}
:
{
os
.
getenv
(
"
REMOTE_INPUT_PATH
"
)
}
"
]
try
:
subprocess
.
run
(
command
,
check
=
True
)
except
subprocess
.
CalledProcessError
as
e
:
print
(
f
"
Error during SCP:
{
e
}
"
)
return
False
return
True
def
get_completed_scene
(
shifted_disparity_path
,
shifted_t_path
):
if
send_files
(
shifted_disparity_path
,
shifted_t_path
):
client
=
paramiko
.
SSHClient
()
client
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
# Connect to the server
client
.
connect
(
hostname
,
username
=
username
,
password
=
password
)
# Execute commands on the server
stdin
,
stdout
,
stderr
=
client
.
exec_command
(
"
ls -l
"
)
print
(
"
AHAHAHAHAHAHAH
\n
"
)
# Print the output of the command
print
(
stdout
.
read
())
# Close the SSH connection
client
.
close
()
else
:
return
False
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment