Search Results

Search found 2 results on 1 pages for 'mtasic'.

Page 1/1 | 1 

  • Problem with hash function: hash(1) == hash(1.0)

    - by mtasic
    I have an instance of dict with ints, floats, strings as keys, but the problem is when there are a as int and b as float, and float(a) == b, then their hash values are the same, and thats what I do NOT want to get because I need unique hash vales for this cases in order to get corresponding values. Example: d = {1:'1', 1.0:'1.0', '1':1, '1.0':1.0} d[1] == '1.0' d[1.0] == '1.0' d['1'] == 1 d['1.0'] == 1.0 What I need is: d = {1:'1', 1.0:'1.0', '1':1, '1.0':1.0} d[1] == '1' d[1.0] == '1.0' d['1'] == 1 d['1.0'] == 1.0

    Read the article

  • users authentication and dht

    - by mtasic
    Lets say that I have only DHT (distributed hash table) implemented (in Python), and I want to build authentication service over P2P network, but without introducing centralized authentication server with such a service. Can it be done, and if so how can I achieve this? I'm familiar with how Skype and Wuala have done this, but I am looking for decentralized solution without single point of failure.

    Read the article

1