Whats the maximum number of virtual processor cores available in aws lambda
Memory: 3008 MB
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |
# | |
# Reading video from FFMPEG using subprocess - aka when OpenCV VideoCapture fails | |
# | |
# 2017 note: I have realized that this is similar to moviepy ffmpeg reader with the difference that here we support YUV encoding | |
# BUT we lack: bufsize in POpen and creation flags for windows | |
# https://github.com/Zulko/moviepy/blob/master/moviepy/video/io/ffmpeg_reader.py | |
# | |
# Emanuele Ruffaldi 2016 | |
import cv2 | |
import subprocess |
I followed these two blogs to install server | |
1. http://koo.fi/blog/2015/03/19/openstreetmap-nominatim-server-for-geocoding/#Compile_Nominatim | |
This explains ( and is the main blog which I followed) various steps | |
2. https://www.linuxbabe.com/linux-server/openstreetmap-tile-server-ubuntu-16-04 | |
This explains how to setup swap files and install tiles if needed. | |
I will use Ubuntu 14.04 LTS as the platform. Just a basic install with ssh server. We will install Apache to serve http requests. Make sure you have enough disk space and RAM to hold the data and serve it efficiently. I used the Finland extract, which was about a 200 MB download. The resulting database was 26 GB after importing, indexing and adding Wikipedia data. The Wikipedia data probably actually took more disk space than the OSM data. My server has 4 GB RAM, which seems to be enough for this small data set. | |
1. Sofware requirements |
import "sort" | |
ages := map[string]int{ | |
"a": 1, | |
"c": 3, | |
"d": 4, | |
"b": 2, | |
} | |
names := make([]string, 0, len(ages)) |
func buildEmailInput(source, destination, subject, message string, | |
csvFile []byte) (*ses.SendRawEmailInput, error) { | |
buf := new(bytes.Buffer) | |
writer := multipart.NewWriter(buf) | |
// email main header: | |
h := make(textproto.MIMEHeader) | |
h.Set("From", source) |