<commit_before>from django.http import HttpResponse
from kubernetes import client, config


# Create your views here.
def index(request):
    return HttpResponse("Welcome! yaynayfsdfsdfxcvxcvxd!")


def first_time(request):
    # Configs can be set in Configuration class directly or using helper utility
    try:
        config.load_incluster_config()

        v1 = client.CoreV1Api()
        result = "Listing pods with their IPs:"
        ret = v1.list_pod_for_all_namespaces(watch=False)
        for i in ret.items:
            result += "\n%s\t%s\t%s" % (i.status.pod_ip, i.metadata.namespace, i.metadata.name)
        return HttpResponse(result)
    except Exception as e:
        return HttpResponse(str(e))<commit_msg>Changes pod listing to namespaced<commit_after>from django.http import HttpResponse
from kubernetes import client, config


# Create your views here.
def index(request):
    return HttpResponse("Welcome! yaynayfsdfsdfxcvxcvxd!")


def first_time(request):
    # Configs can be set in Configuration class directly or using helper utility
    try:
        config.load_incluster_config()

        v1 = client.CoreV1Api()
        result = "Listing pods with their IPs:"
        ret = v1.list_namespaced_pod("default")
        for i in ret.items:
            result += "<br>%s&nbsp;&nbsp;&nbsp;&nbsp;%s&nbsp;&nbsp;&nbsp;&nbsp;%s&nbsp;&nbsp;&nbsp;&nbsp;%s" % (i.status.pod_ip, i.metadata.namespace, i.metadata.name, str(i.metadata.labels))
        return HttpResponse(result)
    except Exception as e:
        return HttpResponse(str(e))
{'fraction_non_alphanumeric': 0.10526315789473684, 'fraction_numerical': 0.0038510911424903724, 'mean_word_length': 3.4927953890489913, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '3931692', 'n_tokens_mistral': 485, 'n_tokens_neox': 473, 'n_words': 126}