From d79549c0077fb2d2357bf784316a5583fe49bad8 Mon Sep 17 00:00:00 2001 From: Anjan Kumar Date: Sun, 17 Nov 2019 19:43:02 +0530 Subject: [PATCH 1/6] OS library:: os.system --- programs/libraries/try_os_lib.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 programs/libraries/try_os_lib.py diff --git a/programs/libraries/try_os_lib.py b/programs/libraries/try_os_lib.py new file mode 100644 index 0000000..1a82c17 --- /dev/null +++ b/programs/libraries/try_os_lib.py @@ -0,0 +1,3 @@ +import os + +os.system('ls -l') From 21a08ebca1b79e1bdd6f56985b021fd35b975a70 Mon Sep 17 00:00:00 2001 From: Anjan Kumar Date: Sun, 17 Nov 2019 19:46:37 +0530 Subject: [PATCH 2/6] Library OS, os.system --- programs/libraries/try_os_lib.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 programs/libraries/try_os_lib.py diff --git a/programs/libraries/try_os_lib.py b/programs/libraries/try_os_lib.py new file mode 100644 index 0000000..1a82c17 --- /dev/null +++ b/programs/libraries/try_os_lib.py @@ -0,0 +1,3 @@ +import os + +os.system('ls -l') From 6b08df8fbeec02fddc4e6f8bccf4d7137d832e8b Mon Sep 17 00:00:00 2001 From: Anjan Kumar Date: Sun, 17 Nov 2019 19:43:02 +0530 Subject: [PATCH 3/6] OS library:: os.system --- programs/libraries/try_os_lib.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 programs/libraries/try_os_lib.py diff --git a/programs/libraries/try_os_lib.py b/programs/libraries/try_os_lib.py new file mode 100644 index 0000000..1a82c17 --- /dev/null +++ b/programs/libraries/try_os_lib.py @@ -0,0 +1,3 @@ +import os + +os.system('ls -l') From 2673bcb4cb4ff7a7ebd21f50540b6350ce9e9768 Mon Sep 17 00:00:00 2001 From: Anjan Kumar Date: Sun, 5 Jan 2020 00:46:12 +0530 Subject: [PATCH 4/6] paramiko --- programs/libraries/external/try_paramiko.py | 28 +++++++++++++++++++++ scripts/git_functions.sh | 6 +++++ 2 files changed, 34 insertions(+) create mode 100644 programs/libraries/external/try_paramiko.py create mode 100644 scripts/git_functions.sh diff --git a/programs/libraries/external/try_paramiko.py b/programs/libraries/external/try_paramiko.py new file mode 100644 index 0000000..71f467e --- /dev/null +++ b/programs/libraries/external/try_paramiko.py @@ -0,0 +1,28 @@ +import paramiko + +myhostname = '192.168.17.128' +myusername = 'anjan' +mypassword = 'anjan4450' + +ssh_client = paramiko.SSHClient() +ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) +ssh_client.connect(hostname=myhostname, username=myusername, password=mypassword) +channel = ssh_client.invoke_shell() + +# stdin,stdout,stderr=ssh_client.exec_command("ls") +# # stdin.write('anjan4450\n') +# print(stdout.readlines()) +# +# stdin,stdout,stderr=ssh_client.exec_command("cd Documents; pwd") +# # stdin.write('anjan4450\n') +# print(stdout.readlines()) +# +# stdin,stdout,stderr=ssh_client.exec_command("ls") +# # stdin.write('anjan4450\n') +# print(stdout.readlines()) + +stdin,stdout,stderr=channel.exec_command("cd Documents; pwd") +print(stdout.readlines()) +stdin,stdout,stderr=channel.exec_command("ls") +print(stdout.readlines()) +ssh_client.close() diff --git a/scripts/git_functions.sh b/scripts/git_functions.sh new file mode 100644 index 0000000..7a17171 --- /dev/null +++ b/scripts/git_functions.sh @@ -0,0 +1,6 @@ +# https://coderwall.com/p/9idt5g/keep-your-feature-branch-up-to-date +# Add this to bashrc to hyper-automate +# https://hackernoon.com/git-merge-vs-rebase-whats-the-diff-76413c117333 +function update(){ + git checkout master && git pull && git checkout - && git rebase master +} From cbf8c606f52e4d42bb115c6ae5199873151d3671 Mon Sep 17 00:00:00 2001 From: Anjan Kumar Date: Thu, 14 May 2020 15:37:44 +0530 Subject: [PATCH 5/6] cleanup --- .idea/generic-python.iml | 11 -- .idea/misc.xml | 4 - .idea/modules.xml | 8 - .idea/vcs.xml | 6 - .idea/workspace.xml | 336 --------------------------------------- .vscode/settings.json | 6 - python.gitignore | 6 +- 7 files changed, 4 insertions(+), 373 deletions(-) delete mode 100644 .idea/generic-python.iml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml delete mode 100644 .idea/workspace.xml delete mode 100644 .vscode/settings.json diff --git a/.idea/generic-python.iml b/.idea/generic-python.iml deleted file mode 100644 index 6711606..0000000 --- a/.idea/generic-python.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index d9d93b4..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 362f62a..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index 80f77c4..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -