Last active
October 25, 2018 14:03
-
-
Save felipessalvatore/3750e45b5443e9daa93f7cc040bcff05 to your computer and use it in GitHub Desktop.
nips pool data and manipulation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
I should like to say two things, one intellectual and one moral: | |
The intellectual thing I should want to say to them is this: | |
When you are studying any matter or considering any philosophy, ask yourself only what are the facts | |
and what is the truth that the facts bear out. Never let yourself be diverted either | |
by what you wish to believe or by what you think would have beneficent social effects | |
if it were believed, but look only and solely at what are the facts. | |
That is the intellectual thing that I should wish to say. | |
The moral thing I should wish to say to them is very simple. | |
I should say: Love is wise, hatred is foolish. | |
In this world, which is getting more and more closely interconnected, we have to learn to tolerate each other. | |
We have to learn to put up with the fact that some people say things that we don't like. | |
We can only live together in that way, and if we are to live together and not die together we must learn | |
a kind of charity and a kind of tolerance which is absolutely vital to the continuation of human life on this | |
https://youtu.be/1bZv3pSaLtY | |
""" | |
import numpy as np | |
female = np.array([76, 41, 47, 56, 74]) | |
male = np.array([593, 436, 322, 317, 213]) | |
other = np.array([50, 22, 9, 8, 6]) | |
fem_n = np.sum(female) | |
male_n = np.sum(male) | |
other_n = np.sum(other) | |
print("female total =", fem_n) | |
print("male total =", male_n) | |
print("other total =", other_n) | |
print() | |
female_pref = female/fem_n | |
male_pref = male/male_n | |
other_pref = other/other_n | |
print("female_pref =", female_pref) | |
print("male_pref =",male_pref) | |
print("other_pref =",other_pref) | |
print() | |
male_minus = np.array([int(i) for i in (male_pref * fem_n)]) | |
male_minus_n = np.sum(male_minus) | |
print("New pool for {} males\n".format(male_minus_n)) | |
print(male_minus) | |
print() | |
new_pool = male_minus + female + other | |
print("New pool with equal number of male and females\n") | |
print(new_pool) | |
print() | |
print("Total votes for disagree (-1 and -2) = ", new_pool[0] + new_pool[1]) | |
print("Total votes for neutral (0) = ", new_pool[2]) | |
print("Total votes for agree (1 + 2) = ", new_pool[3] + new_pool[4]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment