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
import paramiko | |
with paramiko.SSHClient() as client: | |
HOSTNAME = '127.0.0.1' | |
USERNAME = 'ashitaka1963' | |
PASSWORD = 'password' | |
REMOTE_PATH = '/home/ashitaka1963/test.txt' | |
LOCAL_PATH = '.\\bk\\bk_test.txt' |
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
import paramiko | |
with paramiko.SSHClient() as client: | |
HOSTNAME = '127.0.0.1' | |
USERNAME = 'ashitaka1963' | |
KEY_FILENAME = 'C:\\ssh\\wsl_ubuntu' | |
PASSWORD = 'password' | |
LINUX_COMMAND = 'pwd' # カレントディレクトリを表示 |
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
# {key1:value1,key2:value2,key3:value3} | |
# 宣言 | |
mydict = {"apple":1, "orange":2, "banana":3} | |
# キーから値を取得 | |
val = mydict["apple"] | |
print(val) # 1 | |
print(mydict) # {'apple': 1, 'orange': 2, 'banana': 3} |
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
list = [1, 1, 2, 3, 3, 4] | |
print(set(list)) # {1, 2, 3, 4} | |
print(len(set(list))) # 4 | |
# 参考 | |
# [配列の重複を削除・抽出する|Python - suzu6](https://www.suzu6.net/posts/97-python-duplication/) |
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
s = "ZABCDBABCQ" | |
cnt = s.count("ABC") | |
print(cnt) # 2 |
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
function createWindow () { | |
// Create the browser window. | |
win = new BrowserWindow({ | |
width: 800, | |
height: 600, | |
webPreferences: { | |
nodeIntegration: true | |
} | |
}) |
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
n=2 | |
for i in range(10): | |
print(n**i, end="") | |
print(" ", end="") | |
print(pow(n,i), end="") | |
print() | |
# 2 2 | |
# 4 4 |
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
#nav{ | |
background: #1F2123; /* ナビゲーションバー全体の背景色 */ | |
} | |
#globalmenu{ | |
width: 60%; /* ナビゲーションバークリック部分の背景色 */ | |
margin: 0 auto 40px; | |
height: 50px; /* 高さ */ | |
padding: 0; | |
list-style-type: none; /* リストのマーク非表示 */ |
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
# 文字列 | |
s='abc' | |
print(s[::-1]) # cba | |
# リスト | |
s=['a','b','c'] | |
print(s[::-1]) # ['c', 'b', 'a'] |
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
a = 2.2 | |
b = 3.5 | |
print(math.ceil(a)) # 3 | |
print(math.ceil(b)) # 4 |
NewerOlder