https://haydenjames.io/raspberry-pi-3-overclock/
arm_freq=1350
core_freq=500
over_voltage=4
disable_splash=1
#force_turbo=1 #Voids Warranty! (uncomment to avoid CPU scaling down to 600Mhz)
#boot_delay=1 #helps to avoid sdcard corruption when force_turbo is enabled.
#sdram_freq=500 #uncomment to test. Works only with some boards.
2017年9月27日 星期三
2017年9月24日 星期日
[Python] ImportError: cannot import name HashMissing
不知道為什麼 virtualEnv 爛掉了, 只要執行 pip 就會出現 ImportError: cannot import name HashMissing
假設 virtural env 的名稱為 ve, 就砍掉重鍊吧
https://stackoverflow.com/questions/43047336/how-to-solve-hashmissing-using-pip-in-python-2-7
假設 virtural env 的名稱為 ve, 就砍掉重鍊吧
rm -r ve/lib/python2.7/site-packages/{pip,setuptools} ve/lib/python2.7/site-packages/setuptools-* ve/lib/python2.7/site-packages/pip-* virtualenv ve source ve/bin/activate pip install -U pip setuptools
https://stackoverflow.com/questions/43047336/how-to-solve-hashmissing-using-pip-in-python-2-7
2017年9月23日 星期六
[Python] Enter another shell execute program
簡單說就是使用 subprocss 模組, 這篇寫得非常詳細, 這篇也可以看一下
Python Subprocess Module - Running external programs
但是使用上還是會有些問題, 雖然是寫說要用 communicate 才能避免 deadlock, 而不要直接寫 stdin, 但搭配這篇才能動 QQ
Understanding Popen.communicate
Python Subprocess Module - Running external programs
但是使用上還是會有些問題, 雖然是寫說要用 communicate 才能避免 deadlock, 而不要直接寫 stdin, 但搭配這篇才能動 QQ
Understanding Popen.communicate
2017年9月19日 星期二
[AWS] 一些術語
設定新的 instance 會問網路設定該用哪種?
* What is the difference between EC2-Classic and EC2-VPC?
* AWS VPC 心得
結論, 選 EC2-VPC
---
剛設完如果沒有 public DNS, 就參考這篇吧
* EC2 instance has no public DNS
---
之後用 ssh 測試可能會連不上, 第一個先修改 security group 的 inbound rules, 將 source 放寬看有沒有改善
然後用 ssh 連可能會失敗, 記得要修改 pem 的權限像這樣
Platform | Introduced in | Description |
---|---|---|
EC2-Classic | The original release of Amazon EC2 | Your instances run in a single, flat network that you share with other customers. |
EC2-VPC | The original release of Amazon VPC | Your instances run in a virtual private cloud (VPC) that's logically isolated to your AWS account. |
* What is the difference between EC2-Classic and EC2-VPC?
* AWS VPC 心得
結論, 選 EC2-VPC
---
剛設完如果沒有 public DNS, 就參考這篇吧
* EC2 instance has no public DNS
---
之後用 ssh 測試可能會連不上, 第一個先修改 security group 的 inbound rules, 將 source 放寬看有沒有改善
然後用 ssh 連可能會失敗, 記得要修改 pem 的權限像這樣
instance:
- Open an SSH client. (find out how to connect using PuTTY)
- Locate your private key file (ricelee.pem). The wizard automatically detects the key you used to launch the instance.
- Your key must not be publicly viewable for SSH to work. Use this command if needed:
chmod 400 foo.pem
- Connect to your instance using its Public DNS:
ec2-1-2-3-4.ap-northeast-1.compute.amazonaws.com
Example:
ssh -i "foo.pem" ubuntu@ec2-1-2-3-4.ap-northeast-1.compute.amazonaws.comPlease note that in most cases the username above will be correct, however please ensure that you read your AMI usage instructions to ensure that the AMI owner has not changed the default AMI username.
2017年9月17日 星期日
[AWS] 測試與轉移
做什麼都要先備份或測試
1. snapshot
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-snapshot.html
---
2. 測試 snapshot
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-launch-snapshot.html
---
1. snapshot
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-snapshot.html
---
To create a snapshot using the console
- Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
- Choose Snapshots in the navigation pane.
- Choose Create Snapshot.
- In the Create Snapshot dialog box, select the volume to create a snapshot for, and then choose Create.
2. 測試 snapshot
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-launch-snapshot.html
---
To create an AMI from your root volume using the console
- Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
- In the navigation pane, choose Elastic Block Store, Snapshots.
- Choose Create Snapshot.
- For Volumes, start typing the name or ID of the root volume, and then select it from the list of options.
- Choose the snapshot that you just created, and then choose Actions, Create Image.
- In the Create Image from EBS Snapshot dialog box, provide the following information and then choose Create. If you're re-creating a parent instance, then choose the same options as the parent instance.
- Architecture: Choose i386 for 32-bit or x86_64 for 64-bit.
- Root device name: Enter the appropriate name for the root volume. For more information, see Device Naming on Linux Instances.
- Virtualization type: Choose whether instances launched from this AMI use paravirtual (PV) or hardware virtual machine (HVM) virtualization. For more information, see Linux AMI Virtualization Types.
- (PV virtualization type only) Kernel ID and RAM disk ID: Choose the AKI and ARI from the lists. If you choose the default AKI or don't choose an AKI, you'll be required to specify an AKI every time you launch an instance using this AMI. In addition, your instance may fail the health checks if the default AKI is incompatible with the instance.
- (Optional) Block Device Mappings: Add volumes or expand the default size of the root volume for the AMI. For more information about resizing the file system on your instance for a larger volume, see Extending a Linux File System after Resizing the Volume.
- In the navigation pane, choose AMIs.
- Choose the AMI that you just created, and then choose Launch. Follow the wizard to launch your instance. For more information about how to configure each step in the wizard, see Launching an Instance.
2017年9月16日 星期六
[MySQL] Error establishing a database connection
太久沒有管 MySQL 就會有奇怪的問題, 所以也不太確定問題的由來, 只能用土法解決
先直接講解法好了, 就是在 my.cnf 多設定一行
nnodb_force_recovery = 1
重啟 MySQL 後再註解掉就可以了
參考: http://linux-server-tutorial.blogspot.tw/2014/02/mysql-is-not-starting-operating-system.html
InnoDB: The error means the system cannot find the path specified. InnoDB: If you are installing InnoDB, remember that you must create InnoDB: directories yourself, InnoDB does not create them. InnoDB: Error: could not open single-table tablespace file ./mysql/innodb_index_stats.ibd InnoDB: We do not continue the crash recovery, because the table may become InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it. InnoDB: To fix the problem and start mysqld: InnoDB: 1) If there is a permission problem in the file and mysqld cannot InnoDB: open the file, you should modify the permissions. InnoDB: 2) If the table is not needed, or you can restore it from a backup, InnoDB: then you can remove the .ibd file, and InnoDB will do a normal InnoDB: crash recovery and ignore that table. InnoDB: 3) If the file system or the disk is broken, and you cannot remove InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf InnoDB: and force InnoDB to continue crash recovery here.
先直接講解法好了, 就是在 my.cnf 多設定一行
nnodb_force_recovery = 1
重啟 MySQL 後再註解掉就可以了
參考: http://linux-server-tutorial.blogspot.tw/2014/02/mysql-is-not-starting-operating-system.html
2017年9月13日 星期三
2017年9月12日 星期二
2017年9月5日 星期二
[RPi] Duckietown
Duckietown an Open, Inexpensive and Flexible Platform for Autonomy Education and Research
http://duckietown.nctu.edu.tw/materials/paull-2017-icra-duckietown.pdf
這也有翻譯欸
http://blog.csdn.net/robocoder/article/details/53098753
http://duckietown.nctu.edu.tw/materials/paull-2017-icra-duckietown.pdf
這也有翻譯欸
http://blog.csdn.net/robocoder/article/details/53098753
2017年9月4日 星期一
[資訊科學] 如何在嵌入式系統中使用 IMU (加速度計與陀螺儀)
A Guide To using IMU (Accelerometer and Gyroscope Devices) in Embedded Applications.
有人翻譯了這篇文章, 紀錄一下
http://silverwind1982.pixnet.net/blog/post/280287502
有人翻譯了這篇文章, 紀錄一下
http://silverwind1982.pixnet.net/blog/post/280287502
2017年9月3日 星期日
[Python] 用 NumPy 做影像處理
這兩篇寫得很好
http://www.jianshu.com/p/6dcb1c1af2a7
http://www.jianshu.com/p/f8811ecf14f7
看來也是參考別人的
http://www.degeneratestate.org/posts/2016/Oct/23/image-processing-with-numpy/
這篇是慢動作做2D的convolution
http://www.songho.ca/dsp/convolution/convolution2d_example.html
從定義開始講起
http://www.songho.ca/dsp/convolution/convolution.html
http://www.jianshu.com/p/6dcb1c1af2a7
http://www.jianshu.com/p/f8811ecf14f7
看來也是參考別人的
http://www.degeneratestate.org/posts/2016/Oct/23/image-processing-with-numpy/
這篇是慢動作做2D的convolution
http://www.songho.ca/dsp/convolution/convolution2d_example.html
從定義開始講起
http://www.songho.ca/dsp/convolution/convolution.html
[資訊科學] Convolution(卷積)
視覺化 convolution 和 cross-correlation
https://www.youtube.com/watch?v=Ma0YONjMZLI
這篇的圖文也不錯,
http://mengqi92.github.io/2015/10/06/convolution/
這篇是慢動作教學,
https://stackoverflow.com/questions/20036663/understanding-numpys-convolve
https://dsp.stackexchange.com/questions/2654/what-is-the-difference-between-convolution-and-cross-correlation
訂閱:
文章 (Atom)