Skip to content

Instantly share code, notes, and snippets.

@ikkebr
Created January 14, 2016 20:15
Show Gist options
  • Save ikkebr/20d8a48d6c1d3fc165eb to your computer and use it in GitHub Desktop.
Save ikkebr/20d8a48d6c1d3fc165eb to your computer and use it in GitHub Desktop.
from sklearn import svm
X = mega_results[['D1','D2','D3','D4','D5','D6']]
y = mega_results['Sena']
clf = svm.SVC()
clf.fit(X, y)
import random
tries = 0
while 1:
tries += 1
numeros = random.sample(range(1,61), 6)
if clf.predict(sorted(numeros))[0]:
print numeros
break
print tries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment