Artificial Intelligence Programs For Programming in Python

Traveling Salesman Problem ( TSP )] Artificial Intelligence Programs For Master Leval Programming in Python from iter tools import permutations def distance(point1, point2): >>> distance([3,4],[0,0]) 5.0 >>> distance([3,6],[10,6]) 7.0 return ((point1[0] - point2[0])**2 + (point1[1] - point2[1])**2) ** 0.5 def total_distance(points): all the points are in the given order. >>> total_distance([[1,2],[4,6]]) 5.0 >>> total_distance([[3,6],[7,6],[12,6]]) 9.0 return sum([distance(point, points[index + 1]) for index, point in enumerate(points[:-1])]) def travelling_salesman(points, start=None): Time complexity is O(N!), so never use on long lists. >>> travelling_salesman([[0,0],[10,0],[6,0]]) ([0, 0], [6, 0], [10, 0]) >>> travelling_salesman([[0,0],[6,0],[2,3],[3,7],[0.5,9],[3,5],[9,1]]) ([0, 0], [6, 0], [9, 1], [2, 3], [3, 5], [3, 7], [0.5, 9]) """ if the start is None: start = points[0] return min([perm for perm ...

Create Image Slider Using JavaScript, HTML5, And CSS3 - CodingPoint

Create Image Slider
HTML CSS Slider
1. Index.html

<!DOCTYPE >
<html xml:lang="en" lang="en">
<head>
<link rel="stylesheet" type="text/css" href="images/styles.css" />



<script src="images/jquery-latest.js" type="text/javascript"></script>

<script src="images/shBrushXml.js" type="text/javascript"></script>

<script src="images/jquery.bxslider2.min.js" type="text/javascript"></script>

<script src="images/scripts.js" type="text/javascript"></script>



<script type="text/javascript" charset="utf-8">

SyntaxHighlighter.all();

</script>

<title>bxSlider | jQuery Content Slider Plugin</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
<body>
<!-- end header_inner, header -->
<div id="content"><div id="content_inner">
<!-- end intro -->
<!-- end sidebar_right -->
<ul id="slides1">
<li>

<img src="images/pic_mgmt.jpg" width="209" height="209" alt="Pic Mgmt" />

<div class="content">

<h3>MGMT</h3>

<h4>Congratulations</h4>

<p>Recording the follow-up to your critically-acclaimed debut album has to be a nerve-wracking affair. As a band, do you go with the same sound/formula you used on the first record? On MGMT’s sophomore album Congratulations, they successfully manage to do both.</p>

</div>

<div class="clear"></div>

</li>

<li>

<img src="images/pic_lcd0.jpg" width="209" height="209" alt="Pic Lcd" />

<div class="content">

<h3>LCD Soundsystem</h3>

<h4>This is Happening</h4>

<p>If This Is Happening does end up being the final LCD Soundsystem release, Murphy certainly picked the right way to end it. “Home” hints at lyrical retrospection while

adopting a musical collage that sums up the album, if not LCD’s three full-length releases, fittingly. </p>

</div>

<div class="clear"></div>

</li>

<li>

<img src="images/pic_mont.jpg" width="209" height="209" alt="Pic Montreal" />

<div class="content">

<h3>of Montreal</h3>

<h4>Skeletal Lamping</h4>

<p>Kevin Barnes said about the title: "This record is my attempt to bring all of my puzzling, contradicting, disturbing, humorous...fantasies, ruminations and observations to

the surface, so that I can better dissect and understand their reason for being in my head. Hence the title, Skeletal Lamping."</p>

</div>

<div class="clear"></div>

</li>

<li>

<img src="images/pic_gori.jpg" width="209" height="209" alt="Pic Gorillaz" />

<div class="content">

<h3>Gorillaz</h3>

<h4>Demon Days</h4>

<p>Demon Days is the second studio album by British band Gorillaz, released in May 2005. The album features contributions from De La Soul, Neneh Cherry, Martina Topley-Bird, Roots

Manuva, MF DOOM, Ike Turner, Bootie Brown of the Pharcyde, and Dennis Hopper.</p>

</div>

<div class="clear"></div>

</li>

</ul>

</div>

</div><!-- end content_inner, content -->

<script type="text/javascript">

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");

document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

</script>

<script type="text/javascript">

try {

var pageTracker = _gat._getTracker("UA-7965261-3");

pageTracker._trackPageview();

} catch(err) {}</script>





</body>

</html>

Get Source Code from Here:

Comments

Popular posts from this blog

MongoDB Exercises Practice Solution Exercise First

Simple Basic Commands For MongoDB

Artificial Intelligence Programs For Programming in Python