プラットフォーム
- Debian GNU Linux 9.3 (Stretch)
- Python 3.5.3
- OpenCV (OpenCV-Python) 3.4.0
Linuxのデフォルトインストール時にホームディレクトリに作成されるディレクトリ名が日本語である。(たとえば「ダウンロード」)
日本語名ではコマンドラインコンソールでの操作が不便なため、日本語フォルダ名(「ダウンロード」など)から英語フォルダ名(「Downloads」など)に変更する方法。
1 2 3 |
$ ls ダウンロード デスクトップ ビデオ 画像 テンプレート ドキュメント 音楽 公開 |
コンピュータ雑誌 『I/O』 2018年2月号 にタミヤのカムプログラムロボット改造の後編 〜 『機械の目』をもつロボットを作る 〜 を掲載いただきました。このブログでも何度か紹介したマシンビジョンユニット "OpenMV Cam M7" をつかった画像制御ロボットの製作方法を紹介しています。
マシンビジョンやMicroPythonにご興味がありましたら、是非ご一読ください。
1 |
$ xcrun swift -version |
1 2 3 |
$ xcrun swift -version Apple Swift version 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2) Target: x86_64-apple-macosx10.9 |
1 |
$ xcrun -find swift |
1 2 |
$ xcrun -find swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift |
-r, --recursive
: Recursively compare any subdirectories found.-x, --exclude
: Exclude files that match PAT.
1 |
$ diff -r --exclude=".DS_Store" --exclude=".git" ./foo/ ./bar/ |
MySQL 5.6以降では(シェルスクリプトなどにおいて)コマンドラインから直接パスワードを指定する(--password
)と警告が出る。
1 2 3 |
$ mysqldump -h localhost -u dbuser --password=xxxx dbname mysqldump: [Warning] Using a password on the command line interface can be insecure. |
環境変数 MYSQL_PWD を介してパスワードを指定する
1 |
$ MYSQL_PWD=xxxx mysqldump -h localhost -u dbuser dbname |
MySQLにおいて異なるバージョン間(たとえば、MySQL server 5.6.34 から 5.7.20)へ移行した(≈ sqldump結果をリストアした)結果、移行先のDBにおいて以下のようなエラーが発生する。
1 2 3 |
[ERROR] Column count of performance_schema.events_waits_current is wrong. Expected 19, found 16. Created with MySQL 50558, now running 50720. Please use mysql_upgrade to fix this error. |
mysql_upgradeを実行し、sqldを再起動する。
1 |
$ mysql_upgrade -u root -p |
1 |
$ service mysqld restart |
1 |
$ sudo yum install mysql57-server |
1 |
$ sudo chkconfig mysqld on |
1 |
$ sudo service mysqld start |
1 2 3 4 5 6 7 |
$ mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.7.20 MySQL Community Server (GPL) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. ... 後略 |
AWS S3(Simple Storage Service)のファイルをCLIで一括削除する。
1 |
$ aws s3 rm s3://mybucket/ --recursive |
--recursive
--dryrun
1 |
$ aws s3 rm s3://bucket.chihayafuru.jp/imgs/2017 --recursive |
RSTピンをグランドに落とす。
OpenMV Cam M7にはハードウェアリセットボタン(たとえばタクトスイッチ)はない。