-
Notifications
You must be signed in to change notification settings - Fork 0
/
code_similarity.html
34 lines (33 loc) · 9.24 KB
/
code_similarity.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<html>
<head>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
color: #333;
margin: 0;
padding: 20px;
}
h2 {
color: #444;
border-bottom: 2px solid #ddd;
padding-bottom: 10px;
}
pre {
background-color: #272822;
color: #f8f8f2;
padding: 20px;
border-radius: 5px;
overflow-x: auto;
font-size: 16px;
line-height: 1.5;
}
.token {
display: inline-block;
padding: 2px 5px;
border-radius: 3px;
}
</style>
</head>
<body>
<h2>Source Code 1:</h2><pre style='font-family:monospace;'><br><span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>def</span> <span class='token' style='background-color:rgb(173, 216, 230); color:#000;'>process</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>_</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>n</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>umbers</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>(</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>n</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>umbers</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>):</span><br> <span class='token' style='background-color:rgb(173, 216, 230); color:#000;'>even</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>_</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>n</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>umbers</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>=</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>[]</span><br> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>for</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>num</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>in</span> <span class='token' style='background-color:rgb(173, 216, 230); color:#000;'>numbers</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>:</span><br> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>if</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>is</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>_</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>even</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>(</span> <span class='token' style='background-color:rgb(173, 216, 230); color:#000;'>num</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>):</span><br> <span class='token' style='background-color:rgb(173, 216, 230); color:#000;'>even</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>_</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>n</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>umbers</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>.</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>append</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>(</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>cal</span> <span class='token' style='background-color:rgb(173, 216, 230); color:#000;'>cul</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>ate</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>_</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>fact</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>orial</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>(</span> <span class='token' style='background-color:rgb(173, 216, 230); color:#000;'>num</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>))</span><br> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>return</span> <span class='token' style='background-color:rgb(173, 216, 230); color:#000;'>even</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>_</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>n</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>umbers</span><br> </pre><h2>Source Code 2:</h2><pre style='font-family:monospace;'><br><span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>def</span> <span class='token' style='background-color:rgb(173, 216, 230); color:#000;'>filter</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>_</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>n</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>umbers</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>(</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>n</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>ums</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>):</span><br> <span class='token' style='background-color:rgb(173, 216, 230); color:#000;'>odd</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>_</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>n</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>umbers</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>=</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>[]</span><br> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>for</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>val</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>in</span> <span class='token' style='background-color:rgb(173, 216, 230); color:#000;'>num</span> <span class='token' style='background-color:rgb(173, 216, 230); color:#000;'>s</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>:</span><br> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>if</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>is</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>_</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>odd</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>(</span> <span class='token' style='background-color:rgb(173, 216, 230); color:#000;'>val</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>):</span><br> <span class='token' style='background-color:rgb(173, 216, 230); color:#000;'>odd</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>_</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>n</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>umbers</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>.</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>append</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>(</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>comp</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>ute</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>_</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>fact</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>orial</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>(</span> <span class='token' style='background-color:rgb(173, 216, 230); color:#000;'>val</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>))</span><br> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>return</span> <span class='token' style='background-color:rgb(173, 216, 230); color:#000;'>odd</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>_</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>n</span> <span class='token' style='background-color:rgb(255, 69, 0); color:#fff;'>umbers</span><br> </pre><h2>Final Similarity Score: 0.96</h2></body></html>