« first day (1836 days earlier)      last day (3095 days later) » 

12:19 AM
I like how someone thinks this should be upvoted.
Could we get one more on that, by the way?
 
I voted on that one already.
:)
I could not understand anything in that question
 
Neither could the asker, I suspect.
Is it possible to flag an edit? The edit on that question made substantive changes - changes that would produce syntax errors.
 
There is a rollback in the edit to bring back the original post.
 
Honestly, it's probably not worth the effort to edit. It'll be closed and deleted anyway.
 
12:42 AM
Can someone please close it? It's attracting garbage answers.
 
1:03 AM
Is Queue.put() thread safe?
(multiprocessing.queue.put() process safe?)
similarly, are the respective get() methods safe?
 
Yes, yes, yes.
@TigerhawkT3 And yes for you, too.
 
hm...
 
Hm???
 
I keep getting this random error where a dictionary (filled by one process, then added to another process-queue)
has way more entries than it should
 
@PatrickMaupin :)
 
1:16 AM
I thought that one of the get() or put() methods might not be safe, and two processes were putting something in the queue at the same time, causing a weird double-entry error or something
(i added a lock.acquire and lock.release before and after every get/put method and ran it again, but apparently this won't help :( )
 
So you're putting the dictionary on the queue? And the putting process stops doing anything with it once it queues it?
And the getting process doesn't do anything with it until it picks it up off the queue?
And two putting processes aren't dealing with the same dict?
 
the putting process stops doing anything w/ that dictionary once it queues (it starts working on filling the next dictionary), but there are a couple of threads that get from that queue whenever something's put there
two processes aren't dealing w/ the same dict, no (just the same queue)
 
Only one of the threads should be able to get the dict.
 
if i have multiple threads looking at it, is it possible that more than one of them is getting the same dict?
 
Now if you inadvertently use a queue.queue for multiprocessing, you might have a problem.
 
1:19 AM
just using multiprocessing.JoinableQueue()
it must just be a problem w/ the HTML i'm fetching :l
 
OK, not sure about multiprocessing queue with multiple threads. If you think there may be an issue there you could dedicate a thread to pulling stuff off the multiprocessing queue and stuffing it onto a process-specific queue.queue.
 
Oh, that's a pretty good idea
I've just plopped something into the code to see if it's just an HTML issue (where one page is just very weirdly formatted or something), but I will try that next in case it is a queue issue
it's always two threads that have the problem at the same time, so that could mean that two links are bunk, or it's something regarding their interaction (one that they shouldn't be having :( )
 
Mind you, the multiprocessing doc claims that "Queues are thread and process safe."
@TigerhawkT3 That post has now attracted a spurious edit as well.
It has attracted two approvals -- needs to be put out of its misery quickly.
 
1:34 AM
rejected
 
That was quick!
 
it really needs to go. :)
 
So it's definitely not the HTML being parsed, and queues and threads are process safe
... hrm
 
2:02 AM
graruguagh
but it always happens on the same page
 
2:36 AM
it seems like at some point one of the processes goes wild
always at the same point
and it continues to do so despite the dictionary being reset
HAH FOUND THE GOD DAMNED PROBLEM
 
\o/
 
 
1 hour later…
3:53 AM
Hi
print div.find('span', attrs = {'id' : 'dtfrmtX'}).text
in attrs I want X to be varing in loop
so how can I append the numeric value in place of X
 
4:20 AM
'dtfrmtX' is a str right? You can just use format string, i.e. 'dtfrmt%d' % i, where i is your int value.
 
oh yeah thanks
 
 
1 hour later…
5:25 AM
CBG all
 
Cbg!
 
How are you tiger
 
Doing all right.
Hey, do you have Pillow installed? Want to try my sliding tile puzzle?
 
No I don't have it
Is that a python module :p
Sorry already installed @TigerhawkT3 did know I had that :)
 
5:45 AM
:)
If you want to try it out, the source is here.
 
anyone would like to answer this stackoverflow.com/questions/32945668/…
 
Sucks I am using python 2.7
 
:(
 
cabbage
 
6:01 AM
Oh...
Let me cx_freeze it then, give me a few minutes.
 
guys any hint.. what it might could be.
@TigerhawkT3 sure.
 
@xK0nB1n you say after 2 hours the data reduces when queried through program .Did you check the browser data at that time ?
 
@VigneshKalai Are you on a Windows 64-bit machine?
If you do, the frozen exe is here.
 
@TigerhawkT3 32-bit :p
It is my companies machine cannot demand for more
 
Lemme wake up my 32-bit machine, then. :)
 
6:18 AM
@VigneshKalai just to be sure.. I cleared browser data before every run
 
Okay, Windows 32-bit frozen compiled exe here.
Wait, I must've put it in the wrong place...
 
I started to download :p
@xK0nB1n I think I am not being clear when you got 298 from program did you get the same value in browser
 
Wait, yes, I did have it in the right place. I entered the wrong filename to check whether it was there...
 
@VigneshKalai yes
 
So they both had the same value at that time
 
6:28 AM
yes.. the browser and the program had same values
 
pyHook alternatives for mac anyone?
 
@Pigman168 there is no alternative for mac available. As far I know
 
6:41 AM
@TigerhawkT3 I ran it through command prompt I keep getting errors pastebin.com/FVZECJdf I am doing something wrong. Thanks for you efforts mate. I was looking through your program and found that you are using all of PEP 8 rules nice and all those commenting great job :)
 
@VigneshKalai I got the same errors here
when I get it working, I might try to do a Tcl version from scratch of it just for fun :P
 
7:02 AM
You're hitting "toggle image" before there's an image to show. :)
Enter a path to a file on your machine, or a folder for random images (ending with / or ``), or a URL, then press Enter.
 
what should the file contain? I guess that's the missing puzzle piece
 
What do you mean?
 
"Enter a path to a file on your machine"
 
For an image.
 
I just created a blank file thinking some output would be written there lol
 
7:04 AM
For example, in the "Filename: " filed, enter https://upload.wikimedia.org/wikipedia/commons/a/ab/Patates.jpg.
Then hit Enter and wait a few seconds for it to download.
Then rearrange the potatoes. :)
 
ok, it worked with a local picture :D
except it was one I took for helping someone on SO and it doesn't look good as a puzzle lol
 
If the image contains some undifferentiated tiles, you can check the numbering to make sure you have it in the right order.
 
yup
oh, I just realised why the wiki image doesn't work
 
It worked for me...
 
for some reason, the company firewall blocks all connections, except for browsers and some select apps
 
7:09 AM
Ah, that would certainly do it.
 
yea, not your fault :)
that frustrates me. I had some scripts I ran periodically to check updates on some sites (they don't have rss feeds so...) and it was working until they installed new firewall
 
You can move tiles by clicking them or by clicking and dragging ("move" is bound to click and B1-motion).
 
mhm, that part is quite instinctive
 
So you can just click and hold, then sweep the mouse around for TURBO TILE SOLVING!
 
Hey up all
 
7:15 AM
The filter at my last job allowed pretty much anything - the only time I had trouble with it was when I tried to look up lyrics to a song once, and found that it was blocked as "gambling."
 
cabbage
 
Hey Fizz.
 
lol
just for nitpicking, if I were to do this, I would put something a bit more descriptive, like "Insert path or url to image file:"
and maybe create a new window for the actual puzzle
otherwise, nice job :)
 
I was considering putting the puzzle itself in a Toplevel when I was having Canvas issues, but then I resolved the Canvas issue (and by "resolve" I mean "destroy") and left it as it was.
 
yea, it's better to destroy the whole toplevel window plus the canvas and all widgets inside before creating a new one if you don't want weird stuff occurring
 
7:20 AM
The issue was that geometry managers expand or shrink to fit their contents, and the Canvas is similar except that it only expands.
Large images were leaving me with a huge board and window for subsequent small images, and sometimes with leftover numbering and other nonsense.
 
indeed
 
Solved with try: self.board.destroy(); except: pass before each new game. :)
 
yea, in tcl I usually use catch {destroy widget} which basically skips any errors if any
 
Oh, and you can either hit Enter or right-click the picture to start.
 
you mean restart, right?
 
7:37 AM
Well, to start if you just launched the app, or restart with a new image.
 
 
2 hours later…
9:45 AM
CBG all
It is still not working for me @TigerhawkT3 if fell they are blocking it at my company :)
I just answered a question on panda due to which I got a doubt
I created a data frame pd.DataFrame([True,NaN,True,NaN]) now I want to get values which are not nan and not True .That is no data match this criteria I ran a code x[pd.notnull(x[0])&x[0]!=True] but ended up getting NaN as output
but when I do x[pd.notnull(x[0])&x[0]!=False] I get the correct values which is value which are True
 
cabbage
@VigneshKalai I don't know Numpy, but the math module has a isnan function. A quick Google suggests there's a numpy.isnan, too.
 
@PM2Ring sorry but I don't get what you are trying to say
Found the issue it is because of parenthesis this worked x[(x[0].notnull()) & (x[0]!=True)]
 
10:05 AM
@VigneshKalai To test if an object is (or isn't) NaN you should use a .isnan() function.
 
I could use that if I wanted to check individual elements :) but to check a series or Data Frame I think I can not use that.
 
>>> v=float('nan');[v,v==float('nan'),v==v,v is v,v is float('nan'),math.isnan(v)]
[nan, False, False, True, False, True]
@VigneshKalai Ok.
 
@PM2Ring nice thanks :)
 
Sorry to hear the web portion of it isn't working, but at least the local part is.
 
The v==v resulting in False is a bit scary, but that's the way NaN should behave.
 
10:15 AM
Doesn't == checks for equality then for content .I don't know if I am being clear here
That is doesn't == check for is first then it's content
 
It does not check for identity at all. Identity and equality are separate.
I should say, it is possible for a given object's __eq__ to contain an identity check if the author wanted.
 
Ok that does explain it @TigerhawkT3 thanks
 
Note that a == b is syntactic sugar for a.__eq__(b). Here's a simple demo:
class A(object):
    def __init__(self, v):
        self.v = v

    def __eq__(self, other):
        print 'A __eq__'
        return self.v == other.v

class B(object):
    def __init__(self, v):
        self.v = v

    def __eq__(self, other):
        print 'B __eq__'
        return self.v == other.v

print A(1) == B(2)
print B(1) == A(1)
 
Joe and Bob both make $10 an hour, so joe_salary == bob_salary. If joe_salary is bob_salary, Joe will get a raise every time Bob does.
 
output
A __eq__
False
B __eq__
True
 
10:29 AM
Bah - __eq__ should be return random.choice((False, True)) for a laugh :p
 
Let the world burn :) @JonClements
 
BTW, if you want to explicitly test that some object is the bool object True (rather than merely testing if it's truthy) then you should do a is True rather than a == True
 
you answered and closed the question kind of selfish :p
@PM2Ring I haven't started with the class part of python but your example is pretty expressive.So this should be known as equality overriding right
 
I didn't even think it might be a dupe until someone else suggested that older question.
He didn't have VTC privilege, so it was just left as a comment, which got auto-cleaned after closure, but doesn't show in the "closed by" pane.
 
10:34 AM
It happens and I was the one to up vote it at first :)
 
And this got reopened for no apparent reason.
The question was originally 95% "here's my wonderful program" with barely a footnote at the bottom of "oh and how do I resize with PIL."
So I closed it as a dupe of "how do I resize with PIL."
 
@TigerhawkT3 Yeah, poor dupe choice. OTOH, it does have good info (which may be of interest to the new OP), but it doesn't really address the new OP's concern, which you've covered nicely in your answer.
 
I guess I'll reopen it.
Fortunately, the dupehammer is a claw hammer.
Fortunately not to the PHP hammer extent.
Oh, and you get two guesses as to who reopened the PIL question.
If people would post decent questions I wouldn't have to crush them. :)
 
shouldn't this question be don't reverse non-alphanumerics? stackoverflow.com/questions/33343070/…
 
@TigerhawkT3: BTW, I'm not quite sure what you mean by «the dict() built-in function - doesn't "know" that the keys are strings.»
 
10:47 AM
It knows that they have to be valid variable names, and it will store them all as strings.
 
10:59 AM
Ok. But the dict() constructor doesn't do the conversion from keywords to strings itself: it gets called with a dict already built in its kwargs. So from the constructor's POV it can't tell whether it was called with dict(spades=3, hearts=2) or dict(**{'spades':3, 'hearts':2})
@TigerhawkT3 I'm hoping the OP will spend some time to read the docs I linked to, and play around with it a bit so they understand what they're doing, rather than hassle people into giving him the solution on a plate.
OTOH, the suggestion to pre-process the images rather than resizing them on the fly is reasonable, even if it doesn't answer the OP's exact question. And when the OP knows Tkinter & PIL well enough to do dynamic resizing that's sensitive to the user's environment they can ask a new question if they need help with that. :)
 
11:18 AM
I think I just wrote my best-ever edit summary.
 
11:50 AM
"did I ever tell you the definition of insanity?"
 
One doesn't care about the definition when one has already embraced it :p
 
12:01 PM
cbg
 
cbg!
 
I am back!
 
@thefourtheye billa :)
 
Welcome!
Wilkommen!
nuqneH!
 
12:04 PM
cbg
 
Only 1 more vote needed for this dupe: stackoverflow.com/q/33345100/4014959
 
already closed
 
I wonder how many times that question has been selected as a dupe target.
 
@TigerhawkT3 Dunno, but it's got 760 links, and I suspect that many of those are due to it being a dupe target.
 
Hey guys! Does Anybody know what's wrong with the djangoproject.com ?
 
12:19 PM
Looks like the problem is, the page won't load.
 
Yeah :/
 
Perhaps you could use the Wayback Machine archive copy to access whatever it is you need from that page.
 
WOW. I didn't know about that page :D thanks!
 
Or Google cache.
 
@VigneshKalai: Because 0+1+2+3==6. A better question would be: "why isn't zero the first element of Output?" :)
 
12:34 PM
@PM2Ring after seeing the dupe I understood so removed my comment silently :P:) and yes you have a valid question there :)
 
Hopefully, the OP will figure it out after wading through the answers at the dupe target ...
 
@Kevin you're about early - or is it 'cos of we've got back an hour... umm... bloomin' clocks always confuse this poor puppy
 
Did you guys already do the daylight savings thing? I think ours doesn't happen until next week.
 
@Kevin we did yesterday - yeah
 
It did not occur to me that the changeover date would be different for different countries.
As if time isn't complicated enough.
 
12:39 PM
We added 1 hour for DST on the first weekend of October (which is a long weekend in this state). It always takes me a week or two to get used to it.
 
Looking at the big list, I see the UK does "01:00 GMT on last Sunday in October" and the US does "first Sunday in November"
Rather than waiting for 1:00 GMT, over here we wait until 2:00 AM local time.
 
@Kevin The optimum changeover time depends on your latitude, although socio-political factors can also have an impact.
 
So you can't even use the rule of thumb "the change overs are a week apart" because the hour varies by location
@PM2Ring Makes sense. the equatorial countries don't even bother
 
We didn't have DST in Australia when I was a young kid, but I thought it was a cool idea when I first read about it. It was re-introduced here in 1971, and it quickly lost its novelty value for me. :)
 
And it will remain that way until 2136 when scientists correct the Earth's axial tilt with tremendous rockets
 
12:45 PM
morning everyone
 
All the Oz states that have DST now do a coordinated change, but for many years Tasmania (the southernmost state) changed to DST earlier & finished later.
 
Just out of curiosity what is your educational qualification @PM2Ring
 
IMO, DST is now counter-productive. The original logic was to save an hour's worth of electric lighting in the evening. But these days, DST in the warmer parts of Oz means that people get home from work in summer when it's still quite hot, so their home aircon gets used an hour more than it otherwise would have.
 
@VigneshKalai he can say: "heya mate - fancy a barby!?" :p
(oh - and also kick beep in maths and stuff... but hey - priorities and all that:p)
 
Wouldn't the A/C just be used at work instead?
 
12:50 PM
@VigneshKalai I don't have any educational qualifications past high school level, for various complicated reasons...
 
I wonder if industrial A/C is more efficient than residential A/C. Economy of scale and all that.
 
@TigerhawkT3 Sure, but industrial / commercial scale aircon tends to be a little more efficient than residential.
OTOH, some commercial aircon is rather wasteful, judging from the amount of cold air that spills out onto the street.
 
@JonClements I just had to use Australian dictionary to understand what you just said :p :) I find that hard to accept @PM2Ring are you a self thought mathematician cum programmer :)
 
Ah, they don't teach anything useful in college that you can't get off of Wikipedia.
(kids at home, try to identify the weasel word in the previous message)
 
useful
 
12:57 PM
@VigneshKalai Yes, I'm (mostly) self-taught. I did attend some formal & semi-formal programming courses in my youth but never managed to complete the formal ones for various reasons.
 
I feel SO is more useful than Wikipedia
 
@TigerhawkT3 You have earned 15 Kevin brand Fun Bucks.
Redeemable at any Apple store. Just tell them I sent you.
 
Then I admire you @PM2Ring :) I haven't seen most of the people here answering simple question except me :P but I see you answering only mathematical questions or questions which are difficult to understand
 
I'm trying to think of a way to sound sufficiently disappointed with something that's only redeemable for Apple stuff, but words cannot convey it.
I answer simple questions. Some of my top-scoring answers are for simple questions.
Like, "0 and -0 are the same thing."
 
Well at least you have the satisfaction of a job well done, which is redeemable anywhere.
 
1:01 PM
@VigneshKalai SO & Wikipedia have different goals. Wiki can be good for some programming stuff, like describing and comparing algorithms. But SO is better for learning how to use stuff. Neither can teach you how to program, though.
 
Interestingly, true for ints but not floats:
>>> 0 is -0
True
>>> 0.0 is -0.0
False
 
Okay who's good at network based stuff? I don't get why getting devices shows a different ip than the actual device address I know is true. Something about DHCP I think?
 
Well, 0 isn't 0.0, so there's that. :)
 
You are on fire observing all the flaws in my assertions today ;-)
 
And:
>>> 0. == -0.
True
 
1:05 PM
Actually SO is the one which tough me programming basically I am Electrical student with no programming background before I started looking at SO.
 
I seem to recall something about ints below 256 being interned.
 
@TigerhawkT3 you answer those simple question with such details that even newbies can understand it clear :)
 
@TigerhawkT3 haha... that should be your avatar :)
 
From docs.python.org/2/c-api/int.html#c.PyInt_FromLong The current implementation keeps an array of integer objects for all integers between -5 and 256, when you create an int in that range you actually just get back a reference to the existing object.
 
1:12 PM
Rhubarb all :)
 
It weirds me out when Python documentation uses "I".
It's like... Finding the Monolith from 2001 on Tinder. Yes, exactly like that.
 
The equivalent Python 3 docs say the same thing
See ya, @Vignesh
 
Rhubarb. Cabbage tomorrow.
 
Night, Tigerhawk
 
The Python docs are as spaken to us by our lord Guido himself.
 
1:18 PM
I like to think of it as Python speaking itself into existence. An ouroboros barfing up its own tail.
 
Nice.
 
That's gotta be sooooooo @TigerhawkT3 :p
Looks more like a protest/road sign than a hammer... but whatever... :p
 
It's beautiful...
 
actual mythological Mjolnir doesn't look much like a hammer either, so you're just being true to the source material.
 
1:29 PM
Is there a way to set a variable in a list comprehension? For golfing purposes, I know it's bad.
 
Assignment statements absolutely cannot go inside a comprehension, so that avenue is out.
 
Eg, I want to do [x for x in range(10) if x<y;y=x-random.randint(5)] (Or something similar).
Yeah, that's what I thought.
 
Sometimes I will use a list and append values to it as I perform various computations
 
Are you thinking something like this?:
3
Q: Converting a loop with an assignment into a comprehension

TigerhawkT3Converting a loop into a comprehension is simple enough: mylist = [] for word in ['Hello', 'world']: mylist.append(word.split('l')[0]) to mylist = [word.split('l')[0] for word in ['Hello', 'world']] But I'm not sure how to proceed when the loop involves assigning a value to a reference....

 
Not quite.
I need to store a reference to the previous highest number that was added to the list.
 
1:33 PM
I don't think a comprehension can allow subsequent elements to track previous ones. That's why you never see "add it to the list if it's not in there yet" as a comprehension.
 
Monday cabbage for all!
 
What should happen if there are no elements in the list yet? How do you calculate y?
 
@Kevin If there's nothing, it should add it.
 
cbg idjaw
 
@MorganThrapp Can you show us some code using a normal for loop?
 
1:36 PM
@PM2Ring This is what I have right now.
0
A: Lossy Sorting (Implement Dropsort)

Morgan ThrappPython 3, 84 Pretty brute force. i=input().split() s=[] p=int(i[0]) for n in map(int,i): if p<=n:s+=[n];p=n print(s) Ungolfed version: input_numbers = input().split() sorted_numbers = [] previous_number = int(input_numbers[0]) for number in map(int, input_numbers): if previous_number <=...

 
seq = []
for x in range(10):
    y = seq[-1] - random.randint(0, 5) if seq else None
    if x < y or not seq:
        seq.append(x)

#is equivalent to

seq = (lambda seq: ([seq.append(x) for x in range(10) if not seq or x < seq[-1] - random.randint(0,5)], seq)[1])([])
[sorted_numbers.append(number) for number in map(int, input_numbers) if not sorted_numbers or sorted_numbers[-1] <= number]
Aaah it's too early for this
 
You mean late.
It's almost bedtime for me.
Therefore it is late.
 
No, it's only 9:44 AM :p
 
Tigerhawk is in the future. Please send us some lottery numbers.
 
But from my point of reference it's 6:44 AM, late at night.
 
1:44 PM
@Kevin Beautiful, thanks. :)
 
Your concept of scheduling is so classical-Newtonian. It's all relative!
 
hey :)
 
I suspect you can skip the not sorted_numbers condition if you initialize the list to something other than []
 
I have this right now, but it actually ends up 4 bytes longer. :/
i=input().split()
s=[int(i[0])]
[s.append(n)for n in map(int,i[1:])if s[-1]<=n]
print(s)
 
Yeah, I was about to say. Not sure if it would be an improvement size-wise
 
1:47 PM
The biggest loss is going from +=[n] to .append(n).
 
So I'm atm wondering how guys do this in python. I figure I need either constructor overloading - or a factory method and a private constructor. Neither are particularly available in python: I have an "orbit" object. To initialize the object I need some parameters. One set is the eccentricity & semimajor axis. However I could also take both peri- & apoapsis. Sometimes the first set is more logical sometimes the second. So how do I create this in python?
Hmm this question did take more than a single line to explain, maybe I should've taken it to SO...
 
@paul23 It sounds like you need keyword args.
 
Agreed. Orbit(eccentricity=1, semimajor_axis=2) and also Orbit(periapsis=3, apoapsis=4)
 
@MorganThrapp Problem is than that I'm also forcing those arguments to be "last" in the list, while typically in databases they are always the first things to note (followed by inclination etc).
 
With logic in the __init__ to raise an Exception if you pass in too many or not enough or the wrong combination of args
 
1:50 PM
@Kevin Funny how python makes things more complex here. And less readable.
 
user559633
How does Python make things more complex here?
 
@paul23 I'm confused. Why does the order in the database change what order you pass them in to the class?
 
@tristan Adding extra code to deviate between the amount & which arguments are passed
 
Such is the price of dynamic typing. (assuming what you want would be possible in a statically typed language)
 
@MorganThrapp Just for typing up quickly.
 
user559633
1:51 PM
You came in decided that you need to do "constructor overloading" or a factory method and were told you can just use variadic keyword args in your constructor and build logic based on non-null values. How does Python make this "more complex"
 
user559633
At some point, in any language, you need to look at the parameters you've passed.
 
If you're reading data from a database and putting it into objects, I think it would be complicated regardless of whether constructor overloading was possible or not
 
@tristan The extra code to test, throw an exception at the amount of parameters & which ones are passed.
 
if (row["periapsis"] != null && row["apoapsis"] != null){obj = Orbit(row["periapsis"], row["apoapsis"];}
 
user559633
Actually, never mind, my crystal ball has told me that you already have your mind made up that this is more complex than a method that dumps out objects with dynamic non-keyword argument positioning and then another method that parses the object positional args to determine what it is.
 
1:53 PM
Plus an extra if for the other data pair.
You're not losing complexity, you're just pushing it around.
 
user559633
except with keyword args, you have some chance of maintaining it
 
@Kevin Not for automatic reading lol. It's not a biggie, just when typing in the numbers. I will mess them up :P
It's like someone suddenly starts using a left-handed coordinate system. You will mess up plus and minusses for a long time.
 
Ok then, write a constructor whose arguments are all positional and exactly match the order of the columns in your DB
 
user559633
You know best dear
 
Allow some of them to be None, and decide how to calculate the orbit based on which ones are not None.
 
1:57 PM
@MorganThrapp I first tried doing something with a function, caching the max in a function attribute, but it got a bit silly. And far too big. :) Here's what I came up with:
 
I think it's time for me to rhubarb.
 
i=map(int,input().split())
s=[next(i)]
for n in i:
 if s[-1]<=n:s+=[n]
print(s)
 
@PM2Ring Oh, nice.
 
I tested it in Python 2, so I had to wrap the map call with iter()
 
Thought I've been severely outclassed on that answer. Someone else came up with this: f=lambda a:a and f(a[:-1])+a[-1:]*(a[-1]==max(a))
 

« first day (1836 days earlier)      last day (3095 days later) »