This goes with the Traversy Media Scrapy tutorial on YouTube
pip install scrapy
| # NOTE: While AdGuard Home may be configured as a DHCP server, this is out | |
| # out of scope for this docker-compose.yml file. Configuring the DHCP | |
| # server requires using 'network_mode: host'. | |
| # | |
| # If you want to use the DHCP server feature, delete the 'network:' | |
| # section (lines 20 & 21), as well as the entire 'ports:' section | |
| # (lines 30 - 47). Then, just below the 'restart:' section (line 19) | |
| # insert a line that reads 'network_mode: host'. The container will | |
| # still reserve all the ports listed below, as well as 67 and 68 for | |
| # DHCP, but there's no need to map them in the docker-compose.yml file |
| { | |
| "countries": [ | |
| { | |
| "country": "Afghanistan", | |
| "states": ["Badakhshan", "Badghis", "Baghlan", "Balkh", "Bamian", "Daykondi", "Farah", "Faryab", "Ghazni", "Ghowr", "Helmand", "Herat", "Jowzjan", "Kabul", "Kandahar", "Kapisa", "Khost", "Konar", "Kondoz", "Laghman", "Lowgar", "Nangarhar", "Nimruz", "Nurestan", "Oruzgan", "Paktia", "Paktika", "Panjshir", "Parvan", "Samangan", "Sar-e Pol", "Takhar", "Vardak", "Zabol"] | |
| }, | |
| { | |
| "country": "Albania", | |
| "states": ["Berat", "Dibres", "Durres", "Elbasan", "Fier", "Gjirokastre", "Korce", "Kukes", "Lezhe", "Shkoder", "Tirane", "Vlore"] | |
| }, |
| { | |
| "AL": "Alabama", | |
| "AK": "Alaska", | |
| "AS": "American Samoa", | |
| "AZ": "Arizona", | |
| "AR": "Arkansas", | |
| "CA": "California", | |
| "CO": "Colorado", | |
| "CT": "Connecticut", | |
| "DE": "Delaware", |
This goes with the Traversy Media Scrapy tutorial on YouTube
pip install scrapy
| /** | |
| * Changes value to past tense. | |
| * Simple filter does not support irregular verbs such as eat-ate, fly-flew, etc. | |
| * http://jsfiddle.net/bryan_k/0xczme2r/ | |
| * | |
| * @param {String} value The value string. | |
| */ | |
| Vue.filter('past-tense', function(value) { | |
| // Slightly follows http://www.oxforddictionaries.com/us/words/verb-tenses-adding-ed-and-ing | |
| var vowels = ['a', 'e', 'i', 'o', 'u']; |
| from PIL import Image, ImageDraw | |
| import face_recognition | |
| image_file = 'obama.jpg' | |
| # Load the jpg file into a numpy array | |
| image = face_recognition.load_image_file(image_file) | |
| # Find all facial features in all the faces in the image | |
| face_landmarks_list = face_recognition.face_landmarks(image) |
This assumes you are now connected to the server via SSH.
sudo -s Enter root mode for admin accessgroupadd devgroup Create new group to be later granted access to /var/www/htmluseradd -G root,devgroup masterdev Create new root user. Also add to the devgrouppasswd masterdev Change password for the new root user| let | |
| # Wrap a nginx server block in an HTTPS site | |
| wrapSSL = site: cert: key: block: '' | |
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name ${site}; | |
| location /nginx_status { | |
| stub_status on; |
| const express = require('express'); | |
| const fetch = require('node-fetch'); | |
| const redis = require('redis'); | |
| const PORT = process.env.PORT || 5000; | |
| const REDIS_PORT = process.env.PORT || 6379; | |
| const client = redis.createClient(REDIS_PORT); | |
| const app = express(); |