based on pyimagesearch tutorial
- install XCode, homebrew
- install python3:
brew install python3brew linkapps python3
- if existing virtual environment is installed, activate it
- else activate new virtualenv
cv(usingvirtualenvwrapper):
| export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}} | |
| export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64 ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} | |
| sudo ldconfig /usr/local/cuda/lib64 |
brew install python3brew linkapps python3cv (using virtualenvwrapper):| #!/bin/bash | |
| # The IP for the server you wish to ping (8.8.8.8 is a public Google DNS server) | |
| SERVER=8.8.8.8 | |
| # Only send two pings, sending output to /dev/null | |
| ping -c2 ${SERVER} > /dev/null | |
| # If the return code from ping ($?) is not 0 (meaning there was an error) | |
| if [ $? != 0 ] |
Local notifications
import UserNotifications
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge], completionHandler: {didAllow, error in })pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'Rough notes on Remote Notifications (i.e. sent from firebase server/ console > Notifications, not Local Notifications):
New single page app - Select project -> Target capabilities -> Select ON for Background modes(check remote) and push notifications
pod init
pod 'Firebase/Core'
pod 'Firebase/Messaging'then pod install
| {"food":[{"freezer":"","name":"abruzzese sausage, dry - unopened package","pantry":"4-6 weeks","refrigerator":"6 months","shortName":"abruzzese sausage"},{"freezer":"1-2 months","name":"abruzzese sausage, dry - opened package","pantry":"","refrigerator":"2-3 weeks","shortName":"abruzzese sausage"},{"freezer":"","name":"alfalfa sprouts - fresh, raw","pantry":"","refrigerator":"2-3 days","shortName":"alfalfa sprouts"},{"freezer":"4-6 months","name":"alfredo sauce - homemade","pantry":"","refrigerator":"3-4 days","shortName":"alfredo sauce"},{"freezer":"","name":"allspice, ground, dried, commercially bottled or purchased in bulk - unopened or opened","pantry":"3-4 years","refrigerator":"","shortName":"allspice"},{"freezer":"","name":"allspice, whole, dried, commercially bottled or purchased in bulk - unopened or opened","pantry":"4 years","refrigerator":"","shortName":"allspice"},{"freezer":"","name":"almond extract, pure or imitation, commercially bottled - unopened or opened","pantry":"4 years","refrigerator": |