This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# clone https://github.com/yomagroup/paramiko/tree/add-socks-proxy | |
# checkout to the branch add-socks-proxy `git checkout add-socks-proxy` | |
# Build python package, python setup.py bdist-wheel | |
# Install newly build package `pip install --force-reinstall dist/paramiko-2.7.2-py2.py3-none-any.whl` | |
#Usage | |
import paramiko | |
import requests | |
ssh_client = paramiko.SSHClient() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python 3 code. | |
from datetime import datetime | |
import pytz | |
#b -> rep 3 char month format. | |
# expected timeformat "07/Jun/2021:22:59:31 +0000" | |
def convert_input_time_to_est_zone(time_entry): | |
time_entry = datetime.strptime(time_entry, "%d/%b/%Y:%H:%M:%S %z") | |
new_timezone_format = pytz.timezone('US/Eastern') | |
est_formated_time = time_entry.astimezone(new_timezone_format).strftime("%d/%b/%Y:%H:%M:%S %z") |