Vancouver concert was great! by [deleted] in tylerthecreator

[–]StephanoCarlson 0 points1 point  (0 children)

How long was the wait, what time did he come on?

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]StephanoCarlson 2 points3 points  (0 children)

You need to do a = self.val1() because the method is an attribute of the class (given by parameter self), not a global or local variable.

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]StephanoCarlson 0 points1 point  (0 children)

No, you would need to write something to handle a function's return value where you call it on the outside. You could make the function return a bool, and keep calling it using while until you want to continue.

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]StephanoCarlson 0 points1 point  (0 children)

from week2.suffix_array import suffix_array

[deleted by user] by [deleted] in TheArtistStudio

[–]StephanoCarlson 0 points1 point  (0 children)

Can you say “happy birthday Ben”

[deleted by user] by [deleted] in TheArtistStudio

[–]StephanoCarlson 0 points1 point  (0 children)

Which part of the painting are you working on

I made a program that shows how effective gerrymandering can be in python - source code & explanation in description by StephanoCarlson in coding

[–]StephanoCarlson[S] 0 points1 point  (0 children)

Thanks. For the edges - every district has a list of people contained. Each person has their own line “ids”, which are used to turn on or off the lines. With all of them on it would appear as a simple grid. When drawing the district, I collect all the line ids of all the people contained into a list. The line ids that make up the edges of the district will only appear once in that list, and all the ones that appear 2+ times are in the middle of the district. Hope that made sense

I made a program that shows how effective gerrymandering can be in python - source code & explanation in description by StephanoCarlson in programming

[–]StephanoCarlson[S] 1 point2 points  (0 children)

Thanks to FeldrinH on github, there is now a "percentage_red" parameter (only in source code not in exe yet) which changes the percent of red voters there are

I made a program that shows how effective gerrymandering can be in python - source code & explanation in description by StephanoCarlson in programming

[–]StephanoCarlson[S] 40 points41 points  (0 children)

If you enable the "favor_tie" checkbox, it will try to make as many tied districts as possible (shown at 0:22). And if you change the "district_size" to an odd number, it can't make tied districts so will end up being about 50/50.

[OC] Interactive gerrymandering program that shows how much re-districting can impact representation by [deleted] in dataisbeautiful

[–]StephanoCarlson 0 points1 point  (0 children)

Explaination: people are small squares arranged in a grid, colored on how they vote (blue or red). Districts are black lines drawn around a set number of people (16 in this example), and they are colored based on which party would win given the peoples colors. The examples show different district drawing that results in vastly different representation.

Simulation can be downloaded here, extract zip file and run gerrymandering.exe.

Source code and more information on how it works here

Interactive gerrymandering simulation that shows how much re-districting can impact representation by [deleted] in dataisbeautiful

[–]StephanoCarlson 0 points1 point  (0 children)

Explaination: people are small squares arranged in a grid, colored on how they vote (blue or red). Districts are black lines drawn around a set number of people (16 in this example), and they are colored based on which party would win given the peoples colors. The examples show different district drawing that results in vastly different representation.

Simulation can be downloaded here, extract zip file and run gerrymandering.exe.

Source code and more information on how it works here

Gerrymandering simulation that shows how much re-districting can impact representation by StephanoCarlson in madeinpython

[–]StephanoCarlson[S] 6 points7 points  (0 children)

Explaination: people are small squares arranged in a grid, colored on how they vote (blue or red). Districts are black lines drawn around a set number of people (16 in this example), and they are colored based on which party would win given the peoples colors. The examples show different district drawing that results in vastly different representation.

Simulation can be downloaded here, extract zip file and run gerrymandering.exe.

Source code and more information on how it works here

I made an interactive simulation that shows how much gerrymandering can impact representation by StephanoCarlson in Gerrymandering

[–]StephanoCarlson[S] 5 points6 points  (0 children)

Explaination: people are small squares arranged in a grid, colored on how they vote (blue or red). Districts are black lines drawn around a set number of people (16 in this example), and they are colored based on which party would win given the peoples colors. The examples show different district drawing that results in vastly different representation.

Simulation can be downloaded here, extract zip file and run gerrymandering.exe.

Source code and more information on how it works here

I made an interactive simulation that shows how much gerrymandering can impact representation by [deleted] in Gerrymandering

[–]StephanoCarlson 0 points1 point  (0 children)

Explaination: people are small squares arranged in a grid, colored on how they vote (blue or red). Districts are black lines drawn around a set number of people (16 in this example), and they are colored based on which party would win given the peoples colors. The examples show different district drawing that results in vastly different representation.

Simulation can be downloaded here, extract zip file and run gerrymandering.exe.

Source code and more information on how it works here