<commit_before><?php

namespace Atotrukis\MainBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class DefaultController extends Controller
{

    public function locateCityAction()
    {
        $city = $this->get('maxmind.geoip')->lookup('172.16.17.32')->getCity();
        $user = $this->get('security.context')->getToken()->getUser()->getId();
        $this->get('cityService')->setCity($city, $user);
        return $this->redirect($this->generateUrl('atotrukis_hello_world'));
    }

    /**
     * shows all events
     *
     * @return \Symfony\Component\HttpFoundation\Response
     */
    public function indexAction()
    {
        $userIp = $this->get('cityService')->getUserIP();
        $geoip = $this->get('maxmind.geoip')->lookup($userIp);<commit_msg>user ip gets from script<commit_after><?php

namespace Atotrukis\MainBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class DefaultController extends Controller
{

    public function locateCityAction()
    {
        $userIp = $this->get('cityService')->getUserIP();
        $city = $this->get('maxmind.geoip')->lookup($userIp)->getCity();
        $user = $this->get('security.context')->getToken()->getUser()->getId();
        $this->get('cityService')->setCity($city, $user);
        return $this->redirect($this->generateUrl('atotrukis_hello_world'));
    }

    /**
     * shows all events
     *
     * @return \Symfony\Component\HttpFoundation\Response
     */
    public function indexAction()
    {
        $userIp = $this->get('cityService')->getUserIP();
        $geoip = $this->get('maxmind.geoip')->lookup($userIp);
{'fraction_non_alphanumeric': 0.17433414043583534, 'fraction_numerical': 0.005447941888619854, 'mean_word_length': 3.553719008264463, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '1561078', 'n_tokens_mistral': 493, 'n_tokens_neox': 487, 'n_words': 69}