# reddit's stories are created by its users

[–] 0 points1 point  (0 children)

Very elegant. I learned something new today :-)

[–] 0 points1 point  (0 children)

Read this very good introduction on using `turtle` to get started.

Here is a simple example that draws a christmas tree:

``````n = 50.

from turtle import *
speed("fastest")
left(90)
forward(3*n)
color("orange", "yellow")
begin_fill()
left(126)
for i in range(5):
forward(n/5)
right(144)
forward(n/5)
left(72)
end_fill()
right(126)

color("dark green")
backward(n*4.8)
def tree(d, s):
if d <= 0: return
forward(s)
tree(d-1, s*.8)
right(120)
tree(d-3, s*.5)
right(120)
tree(d-3, s*.5)
right(120)
backward(s)
tree(15, n)
backward(n/2)
``````

[–] 2 points3 points  (0 children)

Or, again using list comprehensions:

``````x = [[i[1:] if i[0] in ['<', '>'] else i for i in sublist] for sublist in x]
``````

[–] 1 point2 points  (0 children)

Yes that's possible:

``````y = []

for sublist in x:
new_sublist = []
for i in sublist:
if i[0] in ['<', '>']:
i = i[1:]
new_sublist.append(i)
y.append(new_sublist)
``````

`y` is then `[['1', '2.22'], ['2', '2.34'], ['5', '3.54'], ['10', '6.54']]`

[–] 1 point2 points  (0 children)

Sure, it is just a bit more verbose then:

``````y = []
for i in x:
if i[0] in ['<', '>']:
i = i[1:]
y.append(i)
``````

[–] 3 points4 points  (0 children)

Not using a loop but a list comprehension:

``````x = [i[1:] if i[0] in ['<', '>'] else i for i in x]
``````

[–] 0 points1 point  (0 children)

I liked the explanation in Code Like a Pythonista: Idiomatic Python.

[–] 8 points9 points  (0 children)

• We conclude, that a multi- stage ultra-endurance run over 338 km within 5 days leads to no changes of body mass or body fat mass, but a statistically significant decrease of skeletal muscle mass of 0.63 ± 0.79 kg by the end of the race in well-trained and well-experienced ultra-endurance runners. (J Sports Sci Med. 2007 Dec 1;6(4):401-7)
• A race diet with higher percentage fat and higher intake rates of fat and fluid may protect ultramarathoners from [gastrointestinal] distress. However, these associations do not indicate cause and effect, and factors other than race diet may have contributed to [gastrointestinal] distress. (Int J Sport Nutr Exerc Metab. 2013 Apr;23(2):103-9.)
• Twenty-two to 24 h after the last marathon [after running seven marathons in 7 days], subjects had increased mRNA levels of DNA repair enzymes Ku70 and Ku80 (P < 0.05) in both skeletal muscle and peripheral blood mononuclear cells (PBMCs). [...] We have provided the first evidence that, in humans, proteins within and associated with the shelterin complex increase at the mRNA level in response to a physiological stress differentially in PBMCs and skeletal muscle. (J Appl Physiol (1985). 2012 Mar;112(5):773-81.)
• [Female ultra-runners] [g]eneral health orientation (mean ± SD) (4.71 ± 1.06) and psychological coping (4.71 ± 1.03) were the 2 strongest motivational factors. Participants were higher in task orientation (1.38 ± 0.68) (e.g., finishing the race or accomplishing various goals) than ego orientation (3.38 ± 1.01) (e.g., placing in the top 3 overall or beating an opponent). Women trained an average of 12.49 h·wk(-1) and spent 64% of their time training alone. Training information came from their own experience, blogs, websites, and the Ultra List Serve. Over three-fourths of the participants (80%) did not use a coach because of cost and a perceived lack of necessity. (J Strength Cond Res. 2011 Oct;25(10):2835-42.)
• Can neuromuscular fatigue explain running strategies and performance in ultra-marathons?: the flush model. [...] This model has the following four components: (i) the ball-cock (or buoy), which can be compared with the rate of perceived exertion, and can increase or decrease based on (ii) the filling rate and (iii) the water evacuated through the waste pipe, and (iv) a security reserve that allows the subject to prevent physiological damage. We are suggesting that central regulation is not only based on afferent signals arising from the muscles and peripheral organs, but is also dependent on peripheral fatigue and spinal/supraspinal inhibition (or disfacilitation) since these alterations imply a higher central drive for a given power output. This holistic model also explains how environmental conditions, sleep deprivation/mental fatigue, pain-killers or psychostimulants, cognitive or nutritional strategies may affect ultra-running performance.(Sports Med. 2011 Jun 1;41(6):489-506.)

[–] 0 points1 point  (0 children)

Recently it was in the news here in Belgium that they had observed an increase in throat cancer caused by HPV transmitted during oral sex. Should I be concerend now if I have oral sex?

[–] 8 points9 points  (0 children)

From Wikipedia:

Manning the yards

When coming into port, especially during the Tall Ships' Races many modern square riggers will 'man the yards'. All the crew not required on deck to handle the ship will go aloft and spread out along the yards. This manoeuvre was originally used to display the whole crew to the harbour authorities and the other ships present, to show that the ship's guns were not manned and hence her intentions were peaceful.

The Mexican Navy's training ship Cuauhtémoc is famous for manning its yards with its crew standing on the yards themselves, rather than in footropes.

[–] 6 points7 points  (0 children)

I liked Dive into Python. It doesn't waste time explaining what a variable is or teaching you about for loops. Instead each chapter starts with a fully functional program that will then be dissected line by line.

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

The image on Wikipedia is indeed very similar!
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}