title: How to connect my python back end to my HTML front end to create a GUI for Double hashing ? Any other means to create a GUI?
body: <p>This is for my mini project which is evaluated..basically i need a GUI to show double hashing implementation. I used html and css to create my front end but i am not able to connect my back end to the front..</p>
  
  <p>I've written my code in python and the front end part using HTML and CSS</p>
  
  <p>double hash page in html where i need to embed my python code:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;link href='style1.css' rel='stylesheet' type='text/css'&gt;
  &lt;link rel="shortcut icon" href="favicon.ico" type="image/x-icon"&gt;
  &lt;link rel="icon" href="favicon.ico" type="image/x-icon"&gt;
  &lt;!--&lt;script src="hash.js"&gt;&lt;/script&gt;--&gt;
  &lt;!-- method i tried to embed my code --&gt;    
  &lt;!--&lt;script type="text/javascript"&gt;
  function runPyScript(input){
  var jqXHR = $.ajax({
  type: "POST",
  url: "/double",
  async: false,
  data: { mydata: input }});
  return jqXHR.responseText;}
  $('#submitbutton').click(function(){
  datatosend = 'this is my matrix';
  result = runPyScript(datatosend);
  console.log('Got back ' + result);
  });
  &lt;/script&gt;--&gt;
  &lt;!-- end of method --&gt;  
  
  &lt;title&gt;DOUBLE HASHING IMPLEMENETATION&lt;/title&gt;
  &lt;/head&gt;
  &lt;br&gt;
  &lt;br&gt;
  &lt;body&gt;
  &lt;h1&gt; DOUBLE HASHING&lt;/h1&gt;
  &lt;!--&lt;h3 class="probingName"&gt;Type of Probing: &lt;/h3&gt;--&gt;
  &lt;div id="container"&gt;
  &lt;a href="fe.html"&gt;&lt;i class="icon-home"&gt;Home&lt;/a&gt;&lt;/i&gt;&lt;br&gt;
  &lt;/div&gt;
  &lt;br&gt;
  &lt;div id="instructions"&gt;
  &lt;p&gt;Enter the size of the hash table:&lt;/p&gt;
  &lt;form method="post"&gt;
  &lt;input type="text" name="size" placeholder="size" required&gt;
  &lt;input class="btn btn-primary" type="submit" name="ENTER" value="ENTER"&gt;
  &lt;/form&gt;
  &lt;/div&gt; 
  
  &lt;div id="content"&gt;
  &lt;br /&gt;
  &lt;!-- my pyhton code --&gt;     
  &lt;% def double_hashing(keys, hashtable_size, double_hash_value %&gt;
  &lt;%hashtable_list = [None] * hashtable_size %&gt;
  &lt;%for i in range(len(keys)): %&gt;
  &lt;% hashkey = keys[i] % hashtable_size %&gt;
  &lt;%if hashtable_list[hashkey] is None: %&gt;
  &lt;% hashtable_list[hashkey] = keys[i] %&gt;
  &lt;% else: %&gt;
  &lt;% new_hashkey = hashkey%&gt;
  &lt;%while hashtable_list[new_hashkey] is not None: %&gt;
  &lt;%steps = double_hash_value - (keys[i] % double_hash_value) %&gt;
  &lt;%new_hashkey = (new_hashkey + steps) % hashtable_size%&gt;
  &lt;%hashtable_list[new_hashkey] = keys[i]%&gt;
  &lt;%return hashtable_list %&gt;
  
  
  &lt;% values = [26, 54, 94, 17, 31, 77, 44, 51] %&gt;
  &lt;%=print(double_hashing(values, 21, 19))%&gt;
  &lt;!-- end code --&gt;
  &lt;/div&gt;
  &lt;/html&gt;
  </code></pre>