This script uses RCurl and RJSONIO to download data from Google's API to get the latitude, longitude, location type, and formatted address
library(RCurl)
library(RJSONIO)
library(plyr)
###Creating a REST API using Node.js, Express, and MongoDB
####Installing Node.js
Go to http://nodejs.org, and click the Install button. Run the installer that you just downloaded. When the installer completes, a message indicates that Node was installed at /usr/local/bin/node and npm was installed at /usr/local/bin/npm. At this point node.js is ready to use. Let’s implement the webserver application from the nodejs.org home page. We will use it as a starting point for our project: a RESTful API to access data (retrieve, create, update, delete) in a wine cellar database.
Create a folder named nodecellar anywhere on your file system. In the wincellar folder, create a file named server.js.
import os | |
import json | |
from flask import Flask, request | |
import requests | |
import traceback | |
''' | |
Estrutura do json carregado pelo app | |
{ | |
"tokens": { |
import os | |
from bs4 import BeautifulSoup | |
import json | |
def get_filepaths(path): | |
return [os.path.join(path, talk) for talk in os.listdir(path)] | |
def extract_questions_talk(filepath): |