<commit_before># -*- coding: utf-8 -*-

from django.conf import settings
from django.http import HttpResponse
from django.views.generic import View, TemplateView

import forecastio
import requests
import twilio.twiml

from .mixins import CsrfExemptMixin


class ConferenceView(CsrfExemptMixin, View):

    def post(self, request, *args, **kwargs):
        response = twilio.twiml.Response()
        response.say('Now joining conference.', voice='woman')
        response.dial().conference('MyRoom')
        return HttpResponse(response, content_type='text/xml')


class WeatherView(CsrfExemptMixin, View):

    def post(self, request, *args, **kwargs):
        # from_zip = request.values.get('FromZip', None)
        body = request.values.get('Body', None)

        r = requests.get("http://maps.googleapis.com/maps/api/geocode/json?address=%s" % body)
        location = r.json()['results'][0]['geometry']['location']
        latitude = location['lat']
        longitude = location['lng']<commit_msg>Post request values are in POST dictionary<commit_after># -*- coding: utf-8 -*-

from django.conf import settings
from django.http import HttpResponse
from django.views.generic import View, TemplateView

import forecastio
import requests
import twilio.twiml

from .mixins import CsrfExemptMixin


class ConferenceView(CsrfExemptMixin, View):

    def post(self, request, *args, **kwargs):
        response = twilio.twiml.Response()
        response.say('Now joining conference.', voice='woman')
        response.dial().conference('MyRoom')
        return HttpResponse(response, content_type='text/xml')


class WeatherView(CsrfExemptMixin, View):

    def post(self, request, *args, **kwargs):
        # from_zip = request.values.get('FromZip', None)
        body = request.POST.get('Body', None)

        r = requests.get("http://maps.googleapis.com/maps/api/geocode/json?address=%s" % body)
        location = r.json()['results'][0]['geometry']['location']
        latitude = location['lat']
        longitude = location['lng']
{'fraction_non_alphanumeric': 0.13687838503200395, 'fraction_numerical': 0.0019694731659281144, 'mean_word_length': 3.826603325415677, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '337206', 'n_tokens_mistral': 610, 'n_tokens_neox': 588, 'n_words': 139}