<commit_before>"""
Command line interface to the grid generation code.
"""
from __future__ import print_function

import sys,os,getopt

try:
    import stompy
except ImportError:
    sys.path.append(os.path.join(os.path.dirname(__file__),'..','..'))

try:
    from osgeo import ogr
except ImportError:
    import ogr

import shapely.wkb
import matplotlib

# Cairo doesn't play well with some conda installations.
import pylab 
import numpy as np

# no relative imports here, since we're trying to make this a
# command line program.
from stompy.grid import (trigrid, paver)
from stompy.spatial import (field, join_features, wkb2shp)

# Maybe we have CGAL, and can use the constrained delaunay field -
try:
    from stompy.spatial import constrained_delaunay
except ImportError:
    constrained_delaunay = False

from stompy.grid import optimize_grid
from stompy.grid.geom_types import ogr2text

class FileNotFound(Exception):
    pass

class ExitException(Exception):
    """ raised to signal the command line 
    app to exit
    """
    def __init__(self,val):
        super(ExitException,self).__init__(val)
        self.value=val
def exit(val):
    raise ExitException(val)

class Tom(object):
    scale_shps = None
    tele_scale_shps = None
    # NB: this is adjusted by scale_factor before being handed to ApolloniusGraph
    effective_tele_rate = 1.1
    boundary_shp = None
    plot_interval = None
    checkpoint_interval = None
    smooth = 1
    simplify_tolerance=1.0 # length scale for geometry simplification before smoothing
    resume_checkpoint_fn = None<commit_msg>Set simplification default to 0.0<commit_after>"""
Command line interface to the grid generation code.
"""
from __future__ import print_function

import sys,os,getopt

try:
    import stompy
except ImportError:
    sys.path.append(os.path.join(os.path.dirname(__file__),'..','..'))

try:
    from osgeo import ogr
except ImportError:
    import ogr

import shapely.wkb
import matplotlib

# Cairo doesn't play well with some conda installations.
import pylab 
import numpy as np

# no relative imports here, since we're trying to make this a
# command line program.
from stompy.grid import (trigrid, paver)
from stompy.spatial import (field, join_features, wkb2shp)

# Maybe we have CGAL, and can use the constrained delaunay field -
try:
    from stompy.spatial import constrained_delaunay
except ImportError:
    constrained_delaunay = False

from stompy.grid import optimize_grid
from stompy.grid.geom_types import ogr2text

class FileNotFound(Exception):
    pass

class ExitException(Exception):
    """ raised to signal the command line 
    app to exit
    """
    def __init__(self,val):
        super(ExitException,self).__init__(val)
        self.value=val
def exit(val):
    raise ExitException(val)

class Tom(object):
    scale_shps = None
    tele_scale_shps = None
    # NB: this is adjusted by scale_factor before being handed to ApolloniusGraph
    effective_tele_rate = 1.1
    boundary_shp = None
    plot_interval = None
    checkpoint_interval = None
    smooth = 1
    simplify_tolerance=0.0 # length scale for geometry simplification before smoothing
    resume_checkpoint_fn = None
{'fraction_non_alphanumeric': 0.0705771643663739, 'fraction_numerical': 0.005018820577164366, 'mean_word_length': 3.9365325077399382, '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': '6393727', 'n_tokens_mistral': 1001, 'n_tokens_neox': 957, 'n_words': 323}