I hereby claim:
- I am lseelenbinder on github.
- I am lseelenbinder (https://keybase.io/lseelenbinder) on keybase.
- I have a public key ASDvlwStABJVfnXEvWJygSe_ibY4gniwyxwGIb03WClz6Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import time | |
import memcache | |
from bottle import route, run, default_app | |
from gevent import sleep | |
mc = memcache.Client(['127.0.0.1:11211']) | |
def reverse(name: str) -> str: | |
sleep(0.05) |
require File.expand_path(File.dirname(__FILE__) + '/edgecase') | |
# Greed is a dice game where you roll up to five dice to accumulate | |
# points. The following "score" function will be used calculate the | |
# score of a single roll of the dice. | |
# | |
# A greed roll is scored as follows: | |
# | |
# * A set of three ones is 1000 points | |
# |
#! /usr/bin/ruby | |
# This program takes a list of users, their desires, and their possessions. | |
# Then it asks for a particular user and matches them with the best user | |
# for their desires. | |
class User | |
attr_reader :has, :wants | |
attr_accessor :score | |
def initialize (has=[], wants=[]) | |
@score = 0 |
#! /usr/bin/ruby | |
# This program takes a list of users, their desires, and their possessions. | |
# Then it asks for a particular user and matches them with the best user | |
# for their desires. | |
class User | |
attr_reader :has, :wants | |
attr_accessor :score | |
def initialize (has=[], wants=[]) | |
@score = 0 |
class User(): | |
def __init__(self, has=[], wants=[]): | |
self.has = has | |
self.wants = wants | |
self.score = 0 | |
def find_best_match(users=[], user=None): | |
best = users[0] | |
for u in users: | |
for w in user.wants: |