<commit_before>import globalvars
from gheatae import color_scheme, provider#, dot
#from gheatae.dot import dot
from pngcanvas import PNGCanvas
from random import random, Random
import logging
import gmerc
import math

from google.appengine.api import users
log = logging.getLogger('space_level')

rdm = Random()

LEVEL_MAX = 450
ZOOM_MAX = 20 # NOTE that this must also be in the static wdyg.js file
DOT_MULT = 3

cache_levels = []
for i in range(LEVEL_MAX - 1, -1, -1):
  cache_levels.append(int(((-(pow(float(i) - LEVEL_MAX, 2))/LEVEL_MAX) + LEVEL_MAX) / LEVEL_MAX * 255))

class BasicTile(object):

  def __init__(self, user, lat_north, lng_west, range_lat, range_lng):
    self.color_scheme = color_scheme.fire#classic#cyan_red

    if not globalvars.provider:
      globalvars.provider = provider.DBProvider()

    self.tile_img = self.plot_image(globalvars.provider.get_user_data(user, #self.layer,
                            lat_north, lng_west,range_lat, range_lng))

  def plot_image(self, points):
    space_level = self.__create_empty_space()
    for point in points:
      self.__merge_point_in_space(space_level, point)<commit_msg>exponential curve on dots is working, trying to fix log function for fire<commit_after>import globalvars
from gheatae import color_scheme, provider#, dot
#from gheatae.dot import dot
from pngcanvas import PNGCanvas
from random import random, Random
import logging
import gmerc
import math

from google.appengine.api import users
log = logging.getLogger('space_level')

rdm = Random()

LEVEL_MAX = 450
ZOOM_MAX = 20 # NOTE that this must also be in the static wdyg.js file
DOT_MULT = 3

cache_levels = []
for i in range(LEVEL_MAX - 1, -1, -1):
  cache_levels.append(int(((-(pow(float(i) - LEVEL_MAX, 2))/LEVEL_MAX) + LEVEL_MAX) / LEVEL_MAX * 255))

class BasicTile(object):

  def __init__(self, user, lat_north, lng_west, range_lat, range_lng):
    self.color_scheme = color_scheme.sjl_fire#classic#cyan_red

    if not globalvars.provider:
      globalvars.provider = provider.DBProvider()

    self.tile_img = self.plot_image(globalvars.provider.get_user_data(user, #self.layer,
                            lat_north, lng_west,range_lat, range_lng))

  def plot_image(self, points):
    space_level = self.__create_empty_space()
    for point in points:
      self.__merge_point_in_space(space_level, point)
{'fraction_non_alphanumeric': 0.09388275276125743, 'fraction_numerical': 0.011045029736618521, 'mean_word_length': 4.316027088036117, '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': '4352856', 'n_tokens_mistral': 830, 'n_tokens_neox': 778, 'n_words': 209}