Skip to content

Instantly share code, notes, and snippets.

import neat
import pickle
import os
import operator
from matplotlib import pyplot as plt
import pygame
import random
import numpy as np
@AOrtizDZ
AOrtizDZ / mister_bot.py
Created September 5, 2018 07:58
Best lineup for playmister.com
from selenium import webdriver
from time import time
from bs4 import BeautifulSoup
import requests
from unidecode import unidecode
start_time = time()
def current_time():
@AOrtizDZ
AOrtizDZ / knapsack_problem.py
Created July 18, 2018 12:58
Solution to the knapsack problem iterating all possibilities in python
import random
def generate_items(n, valor_max, peso_max):
items = list()
for i in range(n):
item = list()
item.append(random.randint(1, valor_max))
item.append(random.randint(1, peso_max))
items.append(item)