<commit_before><!DOCTYPE html>
<html>
<head>
  <title>play with SVG</title>
  <link type="text/css" rel="stylesheet" href="../../vendor/jquery/css/themes/base/jquery-ui.min.css"/>
  <link type="text/css" rel="stylesheet" href="../../lib/css/bokeh.css"/>
  <!-- Your project file goes here -->
  <script type="text/javascript" src="../../vendor/d3/d3.v2.js"></script>
  <script type="text/javascript" src="../../vendor/jquery/js/jquery-1.6.4.min.js"></script>
  <script type="text/javascript" src="../../vendor/jquery/js/jquery-ui.min.js"></script>
  <script type="text/javascript" src="../../vendor/underscore/underscore.js"></script>
  <script type="text/javascript" src="../../vendor/backbone/backbone.js"></script>
  <script type="text/javascript" src="../../vendor/buckets/buckets.js"></script>  
  <script type="text/javascript" src="../../lib/js/custom.js"></script>
  <script type="text/javascript" src="../../lib/js/continuum.js"></script>
  <script type="text/javascript" src="../../lib/js/bokeh.js"></script>
  <script>
    <!-- xscale = d3.scale.linear().domain([0, 10]).range([0, 400]); -->
    <!-- yscale = d3.scale.linear().domain([0, 10]).range([400, 0]); -->
    
    xscale = d3.scale.linear().domain([0, 10]).range([0, 200]);
    yscale = d3.scale.linear().domain([0, 10]).range([200, 0]);
    
    data = [{'x' : 0, 'y' : 0}, {'x' : 4, 'y' : 9}, {'x' : 5, 'y': 0}, {'x': 9, 'y' : 9}];
    $(function(){
    
    line = d3.svg.line()
      .x(function(d){ return xscale(d['x'])})
      .y(function(d){ return yscale(d['y'])});
    
    path = d3.select("#chart").append("svg").attr('height', 500).attr('width', 500).attr('id', 'gridcontainer')
    .append("svg").attr('height', 260).attr('width', 260).attr('id', 'plotcontainer')
    .append("g").attr('transform', 'translate(30, 30)').attr('id', 'plot')
    .append("svg").attr('height', 200).attr('width', 260).attr('id', 'rendercontainer')
    path.append("rect").attr('width', 200).attr('height', 200).attr('stroke', '#000').attr('fill', 'none')
    
    path = path.selectAll('path').data([data])
    
    path.attr('stroke', '#000').attr('fill', 'none').attr('d', line);
    path.enter().append('path').attr('stroke', '#000').attr('fill', 'none').attr('d', line);
    
    });
  </script>
</head>
<body>
  <p>
    adhoc test to play around and see what SVG things look like
  </p>
  <div id="chart">
  </div>
</body>
</html><commit_msg>experimental script<commit_after><!DOCTYPE html>
<html>
<head>
  <title>play with SVG</title>
  <link type="text/css" rel="stylesheet" href="../../vendor/jquery/css/themes/base/jquery-ui.min.css"/>
  <link type="text/css" rel="stylesheet" href="../../lib/css/bokeh.css"/>
  <!-- Your project file goes here -->
  <script type="text/javascript" src="../../vendor/d3/d3.v2.js"></script>
  <script type="text/javascript" src="../../vendor/jquery/js/jquery-1.6.4.min.js"></script>
  <script type="text/javascript" src="../../vendor/jquery/js/jquery-ui.min.js"></script>
  <script type="text/javascript" src="../../vendor/underscore/underscore.js"></script>
  <script type="text/javascript" src="../../vendor/backbone/backbone.js"></script>
  <script type="text/javascript" src="../../vendor/buckets/buckets.js"></script>  
  <script type="text/javascript" src="../../lib/js/custom.js"></script>
  <script type="text/javascript" src="../../lib/js/continuum.js"></script>
  <script type="text/javascript" src="../../lib/js/bokeh.js"></script>
  <script>
    <!-- xscale = d3.scale.linear().domain([0, 10]).range([0, 400]); -->
    <!-- yscale = d3.scale.linear().domain([0, 10]).range([400, 0]); -->
    
    xscale = d3.scale.linear().domain([0, 10]).range([0, 200]);
    yscale = d3.scale.linear().domain([0, 10]).range([200, 0]);
    
    data = [{'x' : 0, 'y' : 0}, {'x' : 4, 'y' : 9}, {'x' : 5, 'y': 0}, {'x': 9, 'y' : 9}];
    $(function(){
    
    line = d3.svg.line()
      .x(function(d){ return xscale(d['x'])})
      .y(function(d){ return yscale(d['y'])});
    
    path = d3.select("#chart").append("svg").attr('height', 500).attr('width', 500).attr('id', 'gridcontainer')
    .append("svg").attr('height', 260).attr('width', 260).attr('id', 'plotcontainer')
    .append("g").attr('transform', 'translate(30, 30)').attr('id', 'plot')
    .append("svg").attr('height', 200).attr('width', 260).attr('id', 'rendercontainer')
    path.append("rect").attr('width', 200).attr('height', 200).attr('stroke', '#000').attr('fill', 'none')
    
    path = path.selectAll('path').data([data])
    
    path.attr('stroke', '#000').attr('fill', 'none').attr('d', line);
    path.enter().append('path').attr('stroke', '#000').attr('fill', 'none').attr('d', line);
    d3.select('#rendercontainer').attr("pointer-events", "all")
    d3.select('#rendercontainer').on("mousedown.drag", function(){
    console.log('MOUSEDOWNDRAG')
    });
    d3.select('#rendercontainer').on("mouseup.drag", function(){
    console.log('MOUSEUPDRAG')
    });
    d3.select('#rendercontainer').on("mousedown.brush", function(){
    console.log('MOUSEDOWNBRUSH')
    });
    d3.select('#rendercontainer').on("mouseup.brush", function(){
    console.log('MOUSEUPBRUSH')
    });

    <!-- drag = d3.behavior.drag() -->
    <!-- .on('dragstart', function(){ -->
    <!-- console.log('dragstart') -->
    <!-- }) -->
    <!-- .on('dragend', function(){ -->
    <!-- console.log('dragend') -->
    <!-- }); -->
    
    <!-- d3.select('#rendercontainer').call(drag) -->
    <!-- brush = d3.svg.brush() -->
    <!-- .on('brushstart', function(){ -->
    <!-- console.log('brushstart') -->
    <!-- }) -->
    <!-- .on('brushend', function(){ -->
    <!-- console.log('brushend') -->
    <!-- }); -->
    <!-- d3.select('#rendercontainer').call(brush) -->
    });
  </script>
</head>
<body>
  <p>
    adhoc test to play around and see what SVG things look like
  </p>
  <div id="chart">
  </div>
</body>
</html>
{'fraction_non_alphanumeric': 0.28146764056395446, 'fraction_numerical': 0.030405979276371665, 'mean_word_length': 3.3940298507462687, 'pattern_counts': {'":': 0, '<': 95, '<?xml version=': 0, '>': 95, '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': '780468', 'n_tokens_mistral': 2149, 'n_tokens_neox': 2003, 'n_words': 320}