<commit_before>from __future__ import absolute_import
import os
from pgoapi.pokemon import Pokemon


def pokemonIVPercentage(pokemon):
    return ((pokemon.individual_attack + pokemon.pokemon.individual_stamina + pokemon.individual_defense + 0.0) / 45.0) * 100.0


def get_inventory_data(res, poke_names):
    inventory_delta = res['responses']['GET_INVENTORY'].get('inventory_delta', {})
    inventory_items = inventory_delta.get('inventory_items', [])
    pokemons = map(lambda x: Pokemon(x['pokemon_data'], poke_names),
                   filter(lambda x: 'pokemon_data' in x,
                          map(lambda x: x.get('inventory_item_data', {}), inventory_items)))
    inventory_items_pokemon_list = filter(lambda x: not x.is_egg, pokemons)

    return os.linesep.join(map(str, inventory_items_pokemon_list))


DISK_ENCOUNTER = {0: "UNKNOWN",
                  1: "SUCCESS",
                  2: "NOT_AVAILABLE",
                  3: "NOT_IN_RANGE",
                  4: "ENCOUNTER_ALREADY_FINISHED"}
<commit_msg>accidentally broke the web ui. fixed now<commit_after>from __future__ import absolute_import
import os
from pgoapi.pokemon import Pokemon


def pokemonIVPercentage(pokemon):
    return ((pokemon.get('individual_attack', 0) + pokemon.get('individual_stamina', 0) + pokemon.get(
        'individual_defense', 0) + 0.0) / 45.0) * 100.0


def get_inventory_data(res, poke_names):
    inventory_delta = res['responses']['GET_INVENTORY'].get('inventory_delta', {})
    inventory_items = inventory_delta.get('inventory_items', [])
    pokemons = map(lambda x: Pokemon(x['pokemon_data'], poke_names),
                   filter(lambda x: 'pokemon_data' in x,
                          map(lambda x: x.get('inventory_item_data', {}), inventory_items)))
    inventory_items_pokemon_list = filter(lambda x: not x.is_egg, pokemons)

    return os.linesep.join(map(str, inventory_items_pokemon_list))


DISK_ENCOUNTER = {0: "UNKNOWN",
                  1: "SUCCESS",
                  2: "NOT_AVAILABLE",
                  3: "NOT_IN_RANGE",
                  4: "ENCOUNTER_ALREADY_FINISHED"}

{'fraction_non_alphanumeric': 0.11952380952380952, 'fraction_numerical': 0.014761904761904763, 'mean_word_length': 3.2790224032586557, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '3907968', 'n_tokens_mistral': 747, 'n_tokens_neox': 696, 'n_words': 130}