Week09: Neural Network

Colour predictor. Powerd by Daniel Shiffman’s Toy-Neural-Network library. Inspired by Jabril’s SEFD Science. I actually tried to deal with more interesting subjects such as a facial expression predictor, but soon realized that one of the biggest problems to do those things is collecting the training data set. So I just made a simple colour predictor system. This […]

Week08: Genetic Algorithm

Although there are different sketches using a genetic algorithm, I wanted to make an interactive one rather than the ones that only give you a fixed result or the ones that only allow users(?) watch what they are doing. Therefore, the most interesting one for me among the genetic algorithm examples was Interactive Selection. In this […]

[DTW] Week09

I made a bot that tells you today’s fortune based on your horoscope. [fortune.py] import requests from bs4 import BeautifulSoup def get_horoscope(s): signs = [“ARIES”, “TAURUS”, “GEMINI”, “CANCER”, “LEO”, “VIRGO”, “LIBRA”, “SCORPIO”, “SAGITTARIUS”, “CAPRICORN”, “AQUARIUS”, “PISCES”] sign = signs.index(s) + 1 url = ‘https://www.horoscope.com/us/horoscopes/general/horoscope-general-daily-today.aspx?sign=’ + str(sign) html = requests.get(url).text soup = BeautifulSoup(html, ‘html.parser’) f = […]