The mongo airbnb sample database
Import it into your local mongo with:
mongoimport -h localhost:27017 --db sample_airbnb --collection listingsAndReviews --file listingsAndReviews.json
The mongo airbnb sample database
Import it into your local mongo with:
mongoimport -h localhost:27017 --db sample_airbnb --collection listingsAndReviews --file listingsAndReviews.json
Based on this blogpost.
Install with Homebrew:
$ brew install postgresql@14(The version number 14 needs to be explicitly stated. The @ mark designates a version number is specified. If you need an older version of postgres, use postgresql@13, for example.)
| from sklearn.preprocessing import normalize | |
| # open the vectors.txt file containing all the trained word embeddings, extracting the descriptors & embeddings | |
| num_points = len(open('vectors.txt','r').read().split('\n')) | |
| first_line = True | |
| index_to_word = [] | |
| with open("vectors.txt","r") as f: | |
| for line_num, line in enumerate(f): | |
| if first_line: |
| # With help from https://aws.amazon.com/blogs/ai/build-your-own-face-recognition-service-using-amazon-rekognition/ | |
| frame_skip = 100 # analyze every 100 frames to cut down on Rekognition API calls | |
| import boto3 | |
| import cv2 | |
| from PIL import Image | |
| import io | |
| rekog = boto3.client('rekognition') |
| # Why? | |
| # To paste text into windows that normally don't allow it or have access to the clipboard. | |
| # Examples: Virtual machines that do not yet have tools installed, websites that hijack paste | |
| # | |
| # Extended vs Simple? | |
| # * Includes an initial delay to allow you to change active windows | |
| # * Adds small delay between keypresses for slower responding windows like SSH sessions | |
| # * Better handling of numbers | |
| # * VMWare bug fix | |
| # |
| """Google spreadsheet related. | |
| Packages required: oauth2client, google-api-python-client | |
| * https://gist.github.com/miohtama/f988a5a83a301dd27469 | |
| """ | |
| from oauth2client.service_account import ServiceAccountCredentials | |
| from apiclient import discovery | |
| def get_credentials(scopes: list) -> ServiceAccountCredentials: |
| container_commands: | |
| 01_install_pma: | |
| test: test -n "$PMA_VER" && test ! -f /tmp/phpmyadmin.tar.gz | |
| command: | | |
| cd /tmp | |
| wget https://files.phpmyadmin.net/phpMyAdmin/${PMA_VER}/phpMyAdmin-${PMA_VER}-all-languages.tar.gz | |
| wget https://files.phpmyadmin.net/phpMyAdmin/${PMA_VER}/phpMyAdmin-${PMA_VER}-all-languages.tar.gz.sha1 | |
| cd /tmp && sha1sum --check phpMyAdmin-${PMA_VER}-all-languages.tar.gz.sha1 | |
| if [[ $? == 0 ]] | |
| then |