« first day (2977 days earlier)      last day (1963 days later) » 
00:00 - 22:0022:00 - 00:00

10:02 PM
^^^^ I'm with that guy
 
@FĂ©lixGagnon-Grenier I detect a subtle inference that telling the French what to do is a bad thing?
 
@toonarmycaptain no! The scale is reversed and it is actually an invitation for Trump to tell the French what to do.
 
10:18 PM
^^^^^ I'm with you guys
@toonarmycaptain Yes! Glad my subtlety doesn't go unnoticed ;)
OOOOHHHH!!! that's what that cryptic (for me) answer was actually saying with __enter__ and __exit__ hooks.
 
those sound a lot like context managers
 
Let's Golf: I have a list of strings listy = ['ABC', 'DEF', 'GHI', 'JKL', 'MNOP']
What is the most succint way to generate a dictionary of single characters referencing the string they came from?
 
excellent, I think I can go on with that :)
 
{'A': 'ABC',
 'B': 'ABC',
 'C': 'ABC',
 'D': 'DEF',
 'E': 'DEF',
 'F': 'DEF',
 'G': 'GHI',
 'H': 'GHI',
 'I': 'GHI',
 'J': 'JKL',
 'K': 'JKL',
 'L': 'JKL',
 'M': 'MNOP',
 'N': 'MNOP',
 'O': 'MNOP',
 'P': 'MNOP'}
{c: s for s in listy for c in s} this seems pretty short and uneventful.
 
10:40 PM
so, iiuc, I could wrap a flask app in a with call and python would magically handle connection and disconnection for me (and hopefully that would not be the worse way to do it):
with connect() as db:
    service = Service(db)
    app = Flask()
    @app.route('/')
    def home():
        handler = Handler(service)
        return handler.home()
in that case, I think the connection would happen on server creation and stop when the server goes down, which maybe is not for the best...
 
can reduce be applied to a list like: [[1, 10], [1.2, 20], [4.3, 30]] to stop on on element when the accumulated sum of the elements in the second position reaches a certain threshold. For example, if threshold is 5 then we get back index 0 because the second element of the first list is 10. If threshold is 15 we stop on the second list, since threshold: 15 is less than accumulated sum: 20?
*on an element
and thus in the second case, we get back index 1
believe this answers my question: stackoverflow.com/questions/3130352/…
 
I was going to comment that you should figure it out first using scalars
 
Holiday cgb.
 
11:09 PM
It's 11pm... and Im running out of time to hand this project in and have been banging my head against the wall for the past 5 hours.. Can someone help me?
 
When did you get the assignment?
 
Can I not answer that
 
sure
 
haha its my bad, I'm new to programming. I should have given myself more time for it
 
Unfortunately we ask that users don't ask for help with their fresh questions here. Please see the room rules for details.
 
11:19 PM
:(
 
11:35 PM
I'm not new to programming and I have to give myself more time for tasks than I think it will take.
 
Does anyone else get that weird I-feel-like-I-know-things-about-politicks feeling while reading PEP 8000. Yes, that was an intentional misspelling, by the way.
 
@isquared-KeepitReal yes...but you would be better off breaking this into a for loop rather than trying to build a clever one-liner
@Mr.Zeus What are ploticks?
oh...politics?
 
lemme edit, that was to far from the politics
 
almost an international misspelling, at that
 
yah, the intentional misspelling wasn't exactly clear about what the original word was.
 
00:00 - 22:0022:00 - 00:00

« first day (2977 days earlier)      last day (1963 days later) »