Skip to content

Instantly share code, notes, and snippets.

@tliesnham
tliesnham / guess_pattern.py
Last active August 3, 2018 13:45
A Python based guessing game that attempts to predict the user's number based on past numbers.
import random
class Guess:
correct_guesses = 0
def next_number(self, number):
"""Return the number most likely to be picked by the human.
If no candidates are found, return a random number."""
potential_numbers = []
@tliesnham
tliesnham / guess_probability.py
Last active July 30, 2018 15:00
A Python based guess the number game where the computer attempts to guess the user's number based on past input.
import random
rounds = 0
guesses = 0
numbers = []
print("Welcome to Guess! Each round a player picks a number between 1 and 10. The computer then attempts to guess this number.\n")
def success_rate():
@tliesnham
tliesnham / CoasterValetDriver.php
Last active August 10, 2017 14:02
Fixes the Responsive Filemanager when running a Coaster project locally with Laravel Valet.
<?php
class CoasterValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri