# パーティション拡張するための[growpart]使用のため、[cloud-guest-utils]をインストール
sudo apt install cloud-guest-utils
# パーティションの一覧を表示
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
# -*- coding: utf-8 -*- | |
""" get lastpass data. | |
1. install python library. | |
- pip install boto3 lastpass-python | |
- pipenv install boto3 lastpass-python | |
""" | |
import boto3 |
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 boto3 | |
client = boto3.client("ec2") | |
def main(): | |
response = client.describe_snapshots( | |
OwnerIds=[ | |
get_account_id(), | |
], |
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
<video id="video" width="640" height="480" autoplay></video> | |
<script> | |
var video = document.getElementById("video"); | |
var media = navigator.mediaDevices.getUserMedia({ | |
video: true, | |
audio: true, | |
}); | |
media.then((stream) => { | |
video.srcObject = stream; | |
}); |
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
#!/usr/bin/python | |
#coding: utf-8 | |
import cv2 | |
def main(): | |
#Webカメラの映像表示 | |
capture = cv2.VideoCapture(0) | |
if capture.isOpened() is False: | |
raise("IO Error") |