<commit_before>'use strict';

const rp = require('request-promise');
const Q = require('q');
const config = require('../config');

console.log(config);

const  location = '51.240595,6.7738589';
const city = "cologne";

const CITY_URL= 'https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=:location&name=:city&key=' + config.GOOGLE_API;
const PICTURE_URL = 'https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photoreference=:reference&key=' + config.GOOGLE_API;
const SUMMARY_URL = "https://en.wikipedia.org/w/api.php?action=query&prop=extracts&format=json&exintro=&titles=:city";

module.exports = function(location, city) {
	let deferred = Q.defer();

	console.log(location);
	console.log(city);
	Q.spawn(function *() {
		
		let photoRef;
		
		try {

			let res = yield rp({
				url: CITY_URL.replace(/:location/, location).replace(/:city/, city),
				json: true
			});

			if (res.results && res.results.length > 0 && res.results[0].photos &&
				res.results[0].photos.length > 0 && res.results[0].photos[0].photo_reference)
				photoRef = res.results[0].photos[0].photo_reference;
		}
		catch(err) {
			console.log(err);
			deferred.reject(err);<commit_msg>increased size of the picture from google api<commit_after>'use strict';

const rp = require('request-promise');
const Q = require('q');
const config = require('../config');

console.log(config);

const  location = '51.240595,6.7738589';
const city = "cologne";

const CITY_URL= 'https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=:location&name=:city&key=' + config.GOOGLE_API;
const PICTURE_URL = 'https://maps.googleapis.com/maps/api/place/photo?maxwidth=999&photoreference=:reference&key=' + config.GOOGLE_API;
const SUMMARY_URL = "https://en.wikipedia.org/w/api.php?action=query&prop=extracts&format=json&exintro=&titles=:city";

module.exports = function(location, city) {
	let deferred = Q.defer();

	console.log(location);
	console.log(city);
	Q.spawn(function *() {
		
		let photoRef;
		
		try {

			let res = yield rp({
				url: CITY_URL.replace(/:location/, location).replace(/:city/, city),
				json: true
			});

			if (res.results && res.results.length > 0 && res.results[0].photos &&
				res.results[0].photos.length > 0 && res.results[0].photos[0].photo_reference)
				photoRef = res.results[0].photos[0].photo_reference;
		}
		catch(err) {
			console.log(err);
			deferred.reject(err);
{'fraction_non_alphanumeric': 0.17759336099585063, 'fraction_numerical': 0.022406639004149378, 'mean_word_length': 4.713270142180095, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6684763', 'n_tokens_mistral': 962, 'n_tokens_neox': 830, 'n_words': 134}