<commit_before>import re
import time
import json
import datetime
import base64, pickle

from django import template
register = template.Library()

from django.contrib.auth.models import User
from userprofile.models import Profile

import pymongo
from pymongo import MongoClient
from pymongo import ASCENDING, DESCENDING
client = MongoClient('localhost', 27017)

mongo = client.cloudly
from vms.models import Cache

def _seconds_since_epoch(d):

	date_time = d.isoformat().split('.')[0].replace('T',' ')
	pattern = '%Y-%m-%d %H:%M:%S'
	seconds_since_epoch = int(time.mktime(time.strptime(date_time, pattern)))

	return seconds_since_epoch


@register.filter(name='dict_get')
def dict_get(h, key):

	try: return h[key]
	except: pass
		
	return None

@register.filter(name='replace')
def replace(str, x):

    try: 
        y = x[y]
        x = x[x]
        return str.replace(x,y)
    except: pass

	return None


@register.filter(name="count_list")
def count_list(x):
	return len(x)	

@register.filter(name="times_hundred")
def times_hundred(x):
	try:
		return float(x)*100
	except:
		return "error"

@register.filter(name="times_hundred_rounded")
def times_hundred_rounded(x):
	try:
		return int(float(x)*100)
	except:
		return "error"

@register.filter(name='clear_filename')
def clear_filename(f):
	try:
		return str(f)[20:]
	except:
		return f

<commit_msg>fixing unexpected intend<commit_after>import re
import time
import json
import datetime
import base64, pickle

from django import template
register = template.Library()

from django.contrib.auth.models import User
from userprofile.models import Profile

import pymongo
from pymongo import MongoClient
from pymongo import ASCENDING, DESCENDING
client = MongoClient('localhost', 27017)

mongo = client.cloudly
from vms.models import Cache

def _seconds_since_epoch(d):

	date_time = d.isoformat().split('.')[0].replace('T',' ')
	pattern = '%Y-%m-%d %H:%M:%S'
	seconds_since_epoch = int(time.mktime(time.strptime(date_time, pattern)))

	return seconds_since_epoch


@register.filter(name='dict_get')
def dict_get(h, key):

	try: return h[key]
	except: pass
		
	return None

@register.filter(name='replace')
def replace(str, x):

    try: 
        y = x[y]
        x = x[x]
        return str.replace(x,y)
    except: pass

    return None


@register.filter(name="count_list")
def count_list(x):
	return len(x)	

@register.filter(name="times_hundred")
def times_hundred(x):
	try:
		return float(x)*100
	except:
		return "error"

@register.filter(name="times_hundred_rounded")
def times_hundred_rounded(x):
	try:
		return int(float(x)*100)
	except:
		return "error"

@register.filter(name='clear_filename')
def clear_filename(f):
	try:
		return str(f)[20:]
	except:
		return f


{'fraction_non_alphanumeric': 0.1250914411119239, 'fraction_numerical': 0.011704462326261888, 'mean_word_length': 4.894396551724138, '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': '348877', 'n_tokens_mistral': 1012, 'n_tokens_neox': 944, 'n_words': 232}