ここに書いてある.
System Preferences > General > Prefer tabsでalwaysを選択する.
ここに書いてある.
System Preferences > General > Prefer tabsでalwaysを選択する.
Kindle for Macをインストールして,以下のファイルを取得.
$HOME/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/Cache/KindleSyncMetadataCache.xml
Kindle Cloud Readerからダウンロードする方法はjavascriptが期待通り動作しなかったので諦めた.
漫画の一覧はこれでイケたので,Kindle Cloud Readerの問題なのかな. Kindle Cloud ReaderでDeveloper Toolのコンソールを開いたときに『DevTools failed to load source map: Could not load content for https://m.media-amazon.com/images/I/style.css.map: HTTP error: status code 400, net::ERR_HTTP_RESPONSE_CODE_FAILURE』というワーニングが出ており,問題はKindle Cloud Readerにあるのかなという雰囲気がプンプン漂う.
ソフトウェアの権限設定の問題だった.
System preference > Security & Privacy > Privacy > Input Monitoring
でOBSにチェックを入れることで,OBSに各ウィンドウをキャプチャできる権限を付与できる.
sqlalchemyでDB中のテーブルのデータを検索したり数を数えたりする方法.
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker engine = create_engine('') my_session = sessionmaker(bind=engine) session = my_session() # TableAの全データを取得 all_rows_of_TableA = session.query(TableA).all() # TableAの全データの数を取得 number_of_rows_of_TableA = session.query(TableA).count() # TableAの全データのIDを取得 list_of_all_rows_of_TableA = session.query(TableA.id).all() # TableAの全データのID(重複なし)を取得 unique_list_of_all_rows_of_TableA = session.query(TableA.id).distinct().all()
ここを読めば何となく分かる.
from sqlalchemy.orm import declarative_base from sqlalchemy import Column, Integer, String from sqlalchemy import func from sqlalchemy.orm import sessionmaker Base = declarative_base() class User(Base): __tablename__ = 'users' id = Column(Integer, primary_key=True) name = Column(String) fullname = Column(String) nickname = Column(String) engine = create_engine('sqlite:///test.db', future=True) Base.metadata.create_all(bind=engine) inspector = inspect(engine) my_session = sessionmaker(bind=engine) session = my_session() print('#Data:', session.query(func.count('*')).select_from(User).scalar())
% conda install pytorch torchvision torchaudio -c pytorch Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: / Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed UnsatisfiableError: The following specifications were found to be incompatible with each other: Output in format: Requested package -> Available versions Package six conflicts for: torchvision -> six pytorch -> mkl-service[version='>=2,<3.0a0'] -> six Package pytorch conflicts for: pytorch torchaudio -> pytorch[version='1.2.0|1.3.0|1.3.1|1.4.0|1.5.0|1.5.1|1.6.0|1.7.0|1.7.1|1.8.0|1.8.1|1.9.0'] torchvision -> pytorch[version='1.2.0|1.3.0|1.3.1|1.4.0|1.5.0|1.5.1|1.6.0|1.7.0|1.7.1|1.8.0|1.8.1|1.9.0|>=1.1.0|>=1.0.0|>=0.4|>=0.3|>=0.2|1.7.1.*|1.3.1.*']
% pip3 install torch torchvision torchaudio Collecting torch Downloading torch-1.9.0-cp39-none-macosx_10_9_x86_64.whl (127.9 MB) |████████████████████████████████| 127.9 MB 1.8 MB/s Collecting torchvision Downloading torchvision-0.10.0-cp39-cp39-macosx_10_9_x86_64.whl (13.8 MB) |████████████████████████████████| 13.8 MB 1.0 MB/s Collecting torchaudio Downloading torchaudio-0.9.0-cp39-cp39-macosx_10_9_x86_64.whl (1.5 MB) |████████████████████████████████| 1.5 MB 1.5 MB/s Collecting typing-extensions Downloading typing_extensions-3.10.0.0-py3-none-any.whl (26 kB) Requirement already satisfied: numpy in /SOMEWHERE/anaconda3/envs/py39/lib/python3.9/site-packages (from torchvision) (1.20.2) Requirement already satisfied: pillow>=5.3.0 in /SOMEWHERE/anaconda3/envs/py39/lib/python3.9/site-packages (from torchvision) (8.2.0) Installing collected packages: typing-extensions, torch, torchvision, torchaudio Successfully installed torch-1.9.0 torchaudio-0.9.0 torchvision-0.10.0 typing-extensions-3.10.0.0
% conda list | grep torch torch 1.9.0 pypi_0 pypi torchaudio 0.9.0 pypi_0 pypi torchvision 0.10.0 pypi_0 pypi