This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
import re | |
def permutations(code): | |
if len(code)==1: | |
return [code] | |
perms=permutations(code[1:]) | |
char=code[0] | |
result=[] | |
for perm in perms: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import math | |
import itertools | |
import numpy | |
import CryptoSolver as CS | |
import fractions | |
class Ten_Twentyfour(object): | |
def __init__(self,array): | |
self.A = array | |
def Print(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function KNN(kSize){ | |
this.kSize = kSize; | |
this.points = []; | |
} | |
KNN.prototype.train = function(set){ | |
this.points = this.points.concat(set) | |
} | |
KNN.prototype._distance =function(p1,p2){ |