« first day (2483 days earlier)      last day (2689 days later) » 

16:00
I don't see why the Kevins should have all the fun...
@MooingRawr actually you're the only one who tends to abbreviate names, so the plural seems unnecessary
@wim I assume you've seen Bobby G's deleted answer on the SO Meta "Documentation Sunset" question...
Yeah I really don't like to type full names out, for the fear of mistyping a letter and disrespecting the person's name :\ So short forms = less chance I suppose
@ -> tab -> remove @
rhubarb for a while
:\ didn't think of that AndrasDeak but then it looks weird with out the space... just can't win :\ \o rbrb sir
wim
wim
16:06
@PM2Ring No I didn't
everything about SO docs annoys me, even the way they called shutting it down "Sunsetting"
sunsetting?? wtf?
wim
wim
old yeller?
Something like that, I guess.
wim
wim
they are talking about keeping the rep earned from it, and a badge for it
bleh. subtract all the rep, remove the badges, just burn all
what do you guys think of this?
0
Q: Suppress NameError and provide default value without changing the original code

xxbidiaoSo this is the default behavior when you give a bad variable name: >>> foo Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'foo' is not defined >>> what I'm looking for is something like: >>> set_name_error_handling('assign_default',None) >>> foo >>> ...

It is actually possible what he wants to do by using sys.excepthook
specifically, what's the etiquette about showing how to do something that you are pretty sure is a terrible idea in the first place
Jun 15 '16 at 14:18, by Kevin
Teaching a new user how to use __import__() is like teaching your son how to light a cigarette using the stove.
3
16:21
Suppose that's more responsible that a flame-thrower at least? :)
DSM
DSM
Lunchtime cabbage for all.
What's for lunch DSM (or is it actually cabbage with something)? also \o cbg
PM, who is not PMG, who is not KMG, who is not Kevin, who is not Kevin.
DSM
DSM
Don't know yet! Probably a turkey wrap, which is not a turkey sub, which is not a tuna sub, which is not a tuna casserole.
@KevinMGranger given the number of people on the planet - you're going to find life extremely difficult if you need to clarify who you mean by excluding everyone else known :)
16:24
Onion rings? which are not french fries, which is not a potato, which is not a mash potato.
DSM
DSM
No, onion rings have too many calories to eat at lunch, more's the pity.
I found out my local cafe near my house serves onion rings, I didn't know they did, and have been ordering fries on the side all this time.
cbg fellas
can anyone recommend a good tool for writing python integration tests ?
I usually just use py.test and mark my tests as test_01, test_02, etc., to get them to run in the specified order, but I'm wondering if there are any alternatives/better ways...
16:41
py.test is fine
when it comes to testing it's about what and how you are testing
so if you are properly categorizing an integration test as an integration test, then you just got 90% of the task done.
the rest of it is writing the code for that, and it would be beneficial to use a more commonly used framework
py.test is one of those good ones
Here read this
and check this
thanks, I'll check those out
I am testing an API that I wrote
or I should say I am testing the python wrapper that interacts with my API
so doing things like creating a user, getting a token, doing action x, y, z
hence the ordering part
I should get into the habit of testing.
DSM
DSM
We have a lot of @pytest.mark.integration use in our tests.
@Kevin in my experience, writing the tests are the least fun part, but it is a beautiful sight when they are all done and kicked off by CI :)
@DSM do your tests run in a specific order?
How do y'all integrate testing into your workflow? In particular I'm interested in when and how testing first becomes part of one's project. Like, do you start writing tests five minutes before you put down your first line of code? Or do you reach a critical mass of complexity and say "I guess this has become big enough to warrant testing"? Or what?
16:49
For me its been the critical mass of complexity
DSM
DSM
@Jfach: no. I mock and patch as needed to limit dependencies, and if I absolutely need a few things to happen in a given order, then I put them in said order within a function.
trying to turn over a new leaf now though by writing my tests earlier than usual
So, that's a bit of a tough one to answer. I always try to jump to writing a test first, however depending on complexity I try to work out things with how my brain wants to.
although I would say writing tests TOO early can be just as bad
i.e. If I am starting a project from scratch, I start with at least a project skeleton, and a quick integration test to make sure things are wired. e.g. API I'm building.
16:51
I know test-driven development works on the principle of "write a test verifying that a feature works, before you being writing the feature itself"
DSM
DSM
@Kevin: depends on the task. I don't do strict TDD at the "middle" layers of a project, because that's where things change the most rapidly and I don't want to overarchitect.
If I am adding features to an existing project, I first analyze the code base by reading the tests, looking at where my solution works....what I do sometimes is deliberately break the test
to see what my changes will bring to the system
and then I start working back and forth between tests and real-code
I've trained myself to respect and love the testing process and find it a critical part of my software development process.
for me, it's not before or after. It's during.
Why doesn’t Slack support markdown links. What a terrible chat platform.
@MooingRawr where there's a will, there's a way
@poke oddly enough I think they use their own syntax for that which is sooooo frustrating
hold on...I think I once looked this up
does this work for you?
16:55
@poke it also breaks copy-paste in my firefox somehow, I need to first paste to a text editor and then copy-paste from there into slack, and even then newlines are removed
also, direct image links can't be un-oneboxed
@DSM That makes sense to me. It seems to me that the requirements for a project are fuzziest at the center, so that's where it's most difficult to write tests that verify requirements are being satisfied.
@AndrasDeak I will myself to learn numpy and pyTest every weekend. My way never leads me to either goals. I guess that statement should have provided a quantity of will as a requirement. Time to send back to business team.
@idjaw One of the upvoted answers is about the API (which syntax doesn’t work on the client) and the other answer says it doesn’t work, which is true.
"center" both in terms of temporally and architecturally. When you begin writing a project, you can bang out the parts that have coalesced most sharply in your mind, and only later encounter the bits you glossed over in your initial brainstorm. At the end of a project, you've necessarily nailed down those bits, or else you wouldn't be at the end of your project.
Everybody says Slack and stuff are increasing productivity but they feel so terrible to me in terms of UX.
Especially those side threads that can happen next to the normal chat
And all that unboxing, and the odd stuff
And the notifications suck
meh
meh meh meh
16:58
well threads should be ostracized
TIL ostracize
When you're writing the low-level bits of your project that interface with external APIs and such, you have a good idea of how you ought to interface with them, because the APIs are hopefully already well-documented and consistent. And the user-facing bits aren't too bad if you know what you want your project to actually do. But there's a combinatorially huge number of ways to tie the low level into the high level.
and at least oneboxes can be disabled on your side, AFAIK
@poke oh sorry. I read "Slack Markdown Links work in the following way: <http://someurl|like this>" and thought that would work.
should have tried it first. sorry.
ostricize is when you stick your head in the sand, right?
16:59
no. it's when you think you are an ostrich
@idjaw No worries, I actually found the same thing and also tried it in chat.
if you measure its height at the same time
I don’t even know what it was like on the other end watching me try to format this link with multiple edits and failing so hard
you can test in direct messages aimed at yourself
co-worker is experiencing a funny issue with slack where they receive late mobile (android) notifications that were already checked on desktop
17:01
Well, I posted [a link](http://example) like that, and that didn’t work, so I had to edit it anyway to fix it.
@idjaw I might have seen the same thing
I also have the same thing
Alternatively: No notifactions on either.
I was mentioned while I was sleeping last night, and had no special notification on any of my devices.
Hello everyone
I just started learning pythong and am facing a -I guess- beginners issue
My function called "recgnize" doesn't get executed more than once inside an infinite loop in my main and I don't see why
how can you have "just started python" when you've been asking questions here for weeks if not more?
First step is to make sure you are wearing your pythong correctly
17:04
I’m surprised and yet not surprised at the same time.
@AndrasDeak "for weeks" lol...
I asked a question 2 times so far afai can remember
disclaimer: my sense of time is awful
and the first time you didn't even wanted to answer
if you post an MCVE we'll gladly take a look
@trilolil well you had been asking questions in the matlab room for months(?) :P
So... This is the entire code: paste.ubuntu.com/25234352 and the function that only gets executed once is on line 271
17:06
*sigh*
Ooof! "M" is for "Minimal"
okay okay okay ...
the most likely reason is this:
    if nrPicsSaved ==-2:
but you will I think in either case not be able to run it as it requires many AI related libs
@trilolil that's why you need to create the MCVE, with actual work
17:07
Not sure if this is related to the problem, but the line for i, bb in enumerate(bbs): is indented with a tab while every other line is indented with spaces.
@Kevin nice catch
This can often be the cause of seemingly impossible code paths
@AndrasDeak Credit goes to Notepad++ for having a visible whitespace option :-)
Are you familiar with pdb? Can be useful for stepping through code that should zig when in reality it zags
"Show whitespace" in PyCharm is buried about 3 menus deep hate
I think in this context the tab is not actively harmful since it evaluates to the intended indentation level anyway, but it should still be replaced with spaces on principle
@PaulMcG How often do you toggle that setting though? Once every three months?
17:12
@AndrasDeak ok I found it... :) I double checked the variable in question. I think that it is due to the fact that pressing a key triggers a bunch of complex functions, some of those keyporesses are then buffered in the meantime that the function finishes its execution
and the buffer gets flushed once those functions are done.
Which is why my vairable suddenly jumps from -2 to -5
@poke wat....
@idjaw same thing happens to me all the time on ios
It is now pretty sad that the code runs so slowly... The videoframes being rendered are not fluent at all!
17:14
@Jfach interesting. iOS was the one device I haven't noticed this happen on. Interesting....
I guess because the needed computation time is too high
between every frame which is processed
What are some ways to solve this you think? I can't modify the algorithm, it is doing very basic stuff so far @AndrasDeak
@idjaw Surprised that this is a thing but also not surprised because this is the internet…
yeah @idjaw not sure if theres any relationship, but I feel like I notice it more with our slack bots that bark at us when we make new commits/PR/etc
Independently analyzing consecutive frames seems like something that could be parallelized effectively. In short: try multiprocessing.
Assuming you've got a properly beefy number of cores
Does anybody have an idea about how to solve the issue I briefly described?
related to the speed of my python script
17:21
@trilolil my previous message was directed at your problem, if that wasn't clear
@Kevin hmm didn t think of multiprocessing in that way...
I have some basic knoledge of multiprocessing in cpp
I didn't ping you directly because I figured talking about frames would be enough of an indication, since none of the other conversations going on had anything to do with frames
@Kevin so does vim, yet I usually don't check that
@Kevin yhea sorry I simply didn;t read it
I have a feeling of deja vu right now
17:23
@Kevin the second such mistake of yours today(?)
Well, not today ;-)
I've come to the conclusion that, in a medium with multiple overlapping conversations, identifying which messages belong to the conversation you care about is an acquired skill
I'm pretty rubbish at it in real life. Once more than two people in a room are talking, it's all just static to me. It's much easier in textual mediums
Is that so? I think it's easy. I just assume that nobody's talking to me and usually I'm right ;(
My neurotypical sources inform me that eye contact is a helpful clue. Shame that I'm too busy admiring the speaker's shoelaces, then.
@poke is it official merch or someone else just making snek things?
@Kevin - at a previous job we learned that an extroverted developer looks at your shoes when they talk to you
17:36
I answered a question, then came to my senses and realized of course there's a dupe for that.
lol
Guys, need some help here
Can you check whether the dupe target is correct?
I really don't understand how people can take a well structured traceback, quote it, look at the results, and think it's acceptable.
@vaultah still seems fine to me
17:53
@Kevin I mixed multiprocessing andmutithreading. Didi you really mean the former one?
@davidism thanks a lot :)
I am interfacing with a webcam. So not sure eg 2 independent processes can access the same camera
multithreading is going to make your program slower, so...
@Rawing I don't see why it would become slower.
@vaultah that question is awful. There's literally no explanation, just an error message.
17:55
@trilolil multithreading doesn't give you truly parallel code execution in Python thanks to the Global Interpreter Lock.
(most of the time.)
@Kevin :). OK, but is multiprocessing going to allow me to use the same camera in every one of those processes simultaneously?
I'm afraid I don't know anything about that.
@trilolil you can edit and delete messages
My current guess is that this is not going to work...
Perhaps you could have one single process get the image data and hand it out to the processes doing the analysis.
17:57
hmm...
@davidism yeah, and yet it attracted 3 reopen-votes... Probably shouldn't have closed it as a duplicate
and then all of those processes will have to return their results to the main process in order to render the results on the videoframes
looks like that's going to take too much time...
Sounds like classic map-reduce
@Rawing uh, that comment is wrong.
It's importing "traceback" not "token".
Yeah. My expectation is that the expense of moving around frame data and result data between processes will be dwarfed by the gain in efficiency of the analysis
17:59
@Kevin indeed I think so as well
@davidism Yes, but that's not where the problem is? As I see it, the problem is that tokenize from the stdlib is trying to import token from the stdlib, but it's importing the OP's token.py instead
Ah, you're right.
So it's definitely a dupe.
I'm not sure if I got my point across. I think multiprocessing isn't going to take too much time.
18:03
It's unclear to me whether you're agreeing with me or not because you said it will take too much time, then I said that it wouldn't take too much time, then you agreed with me, then you petitioned the room for general ideas to improve your code. If you really agreed with me, you wouldn't need tips, you could move forward with the multiprocessing plan on your own. But in any case, I don't have anything further to add since I don't have all that much practical experience with multiprocessing
I don't understand why this ends up happening
that user started off perfectly fine....why did it fall out all of a sudden
@Kevin What I meant based on how I interpeted your message: Yes I agree on the fact that moving the passing from one process to another may cause too much of an overhead. Which is why multiprocessing may not be the best solution for real-time applications
@idjaw they complained remarked that I didn't answer them the first time they asked here. It was because I had seen them interact in the matlab room.
18:07
Maybe "X is dwarfed by Y" is a confusing phrasing. I meant that X is considerably smaller than Y. In other words, the overhead of interprocess communication is small compared to the time you save.
... Theoretically. Only benchmarking the different approaches can prove it for certain.
Maybe they should try experimenting rather than guessing about things and running in hypothetical circles for pages and pages of chat.
brb
anyone here dive in to any plugin management similar to stevedore
it's a bit of a challenge to test to bypass setup.py and load up your own fake plugins for testing
but oddly interesting diving in to this to try to figure it out
@idjaw I literally just googled for “pythong”, but it appears to be something real at least.
cafepress.com/+pythong,70630906 – 15 dollars. In stock. Get yours now!
but you know what poke...you completely passed over the best one
a real pythong!
18:21
yeah, there was also a not-so SFW one with a woman
But I really laughed at the description of this one: pypi.python.org/pypi/pythong
> Set up a minimal, yet comfortable structure for a Python project
Such a good name
also the Hoff showed up in that search too.
@poke lol
I’m gonna do something useful tonight and reverse engineer my wifi speakers… for the second time.
reverse engineer it in to a toaster?
No, reverse engineer the overloaded app to control it, so I can do fancier shit with it.
like..toa....ok nvm I'll stop
:P
18:33
I actually have a dedicated toaster so no need.
did I miss it or is there no apparent reason for why he was taken in?
How do I down-star?
you can't
room owners can cancel every star on a given post
Oh shoot, I was joking... there really is a down-star
18:42
what?
I assumed you meant "remove a star" :)
clearly not the case
I was leading to teasing @idjaw about his taste in undergarment
he likes to feel the breeze on his skin
Why? It's real sneksy
18:45
"sneksy" a lil milk came out of my nose on that one
I would appreciate no judgement being passed on my sneksiness
I'm sneksy and I know it.
I should be hearing the rest of that song by LMFAO in my head but for some reason it's the star wars cantina theme. Relatively close.
now that you mention it, the latter is in my head quite a lot
haha that happens to me sometimes. I start one song in my head and morphs in to other song
the songs constantly in my head
mario nes
mario 2 nes
mario 3 nes
mario dungeon music nes
super mario world snes
jingle bells
Zelda theme song and Chopin Prelude Op. 28, No. 15 "Raindrop"
18:56
No. 15 "Raindrop, Droptop, this earworm has got to StopStop"
Hi there, I want some suggestion
an apple a day keeps the doctor away
Don't touch fire.
surprisingly, not a rickroll
19:01
I want to create dashboard in python by extracting data from an excel sheet and plot two parameters. What module will be the best
Package I mean
Define "dashboard"
Define "best".
Well, performance rank vs date will be plotted on it
Did you consider doing even a cursory search for "python plot data"?
Or "Python read Excel"?
Or anything?
My data is getting generated everyday.
19:02
oh.
so it has to be dynamic. I did some search but not sure what is the best.
coz there are some limitations for some
Did you try anything? What problem did you have?
I recommend matplotlib because it has "plot" in the name and so is probably pretty good for plotting things
I recommend Flask because I need a drink.
aye, how many times have you pulled that one out ? :D
19:05
I recommend against making your own dashboard, almost every single time. It's been done a billion times before and winds up being a huge waste of time
not enough
Davidism wished for a flask that would never go empty and the wicked genie burdened him with maintaining a framework with an infinite issues list
17
DSM
DSM
It's new to me! (the flask joke, I mean -- I might have seen it before but I don't remember it)
You can write a script that generates pgfplots source files for you. It's gorgeous!
@Kevin not to mention the Sisyphean burden of incoming SO questions
Okay. Thank you guys!
19:08
According to the search he didn't even say it right then and there, so who knows.
DSM
DSM
Chat search is.. not impressive.
@KevinMGranger Why is it so?
@DSM speak for yourself, I'm always amazed by how useless it is
Because everyone thinks their use case is unique and none of the other ones are good enough when that's probably not the case
DSM
DSM
Constructive laziness comes in very handy.
19:10
Chat search's effectiveness is inversely proportional to how important it is that I find the thing I'm looking for.
@KevinMGranger We're all individuals in our problems and needs!
stackoverflow.com/q/45492531 mcve, hit typo by mistake
oh goodness...plugin manager I'm using is using setup.py to load all its references. For my testing I want to get it to point to a bogus test class instead of going to the "real" thing
something is very wrong in how I want to do this
so... do it right, man
haha yeah. that's what I'm fighting with
19:16
glad to help
once I find a way that is "oh that was easy". I'm sure that was the right now. But the fact that I'm looking through this package to find the point it loads the setup.py stuff and I want to inject my stuff...it doesn't feel right
It's using entry points and you want to monkeypatch what entry points are loaded?
but I can't think of any other way than really just shoving things in the thing
Unfortunately, overriding entry points or making new ones is not trivial.
[entry_points]
event_processor =
    FOO = a.b.c:ClassName
19:17
is what you're talking about akin to replacing an if __name__ == '__main__': block?
That's an example of something in setup.cfg
I'd dig around until I found where the entry points were being loaded and monkeypatch that.
^^ yes
I'm going to try something out based on that..
oooh wait a minute. we have something interesting inside the Driver class for this plugin manager
        """Construct a test DriverManager

        Test instances are passed a list of extensions to work from rather
        than loading them from entry points.
very interesting. I might be able to avoid this whole mess now
> <body class="performant_gui">
Something is lying.
lol
19:29
The code never lies
Except perhaps when you bootstrap a compiler with a hidden payload in the binary that propagates itself into executables it creates if it detects it's compiling a new version of itself
3
as the saga continues. Looks like entry_points.txt is directly being read.
Getting closer
my goodness...Kevin's insanity is quite beautiful.
I can't take credit for the idea since I read about the theory in an article written by some security industry hotshot, which I unfortunately can't find right now
Oops well there it is I guess
It... it finally happened? I Kevin'd Kevin?
19:42
As time goes to infinity, p(Kevinning Kevin) approaches 1
:O
wait....Other Kevin Kevin'd Kevin in the present timeline....what kind of rift is this going to cause?
It's the Kevin rift....
is a fourth Kevin going to show up now?
dear god no, we already have enough of those :p
there is, and he's going to break the fourth Kevin barrier, who knows what he will open our eyes too
19:45
Quantum cats
Turtle cats ?
quantum turtle cats
DSM
DSM
We talk about turtles a lot more than we used to. I approve of this change.
It's almost time to please them by wearing turtle necks :D
19:48
The person responsible for this, is the one who first introduced the turtle cat yesterday
2 days ago, by davidism
user image
davidism
and so concludes my journey for injecting my change....it requires actually playing with entry_points.txt which I'm going to refrain from doing and conclude that this test is good enough.
I won't do that.
How do I daemonize Bottle app properly? I have no root and sudo access, and yeah I have tried BottleDaemon, it doesn't work with bottle.run() arguments
@KevinMGranger :|
I don't know how infosec guys sleep at night
@Kevin needs 1 more vote
I regret that I had but one to give.
and done
DSM
DSM
20:00
I'm not allowed to say it, but I'm allowed to think it -- it's been a while..
well now I'm curious about something when it comes to this testing of things that depend on entry points
and my debate with myself is on practice and separation of concern
Now. The tools I am using are tested on their own right. So I should not have to test their functionality. But, if I want to test my factory to ensure things are loaded properly
I thought it would be nice to say "here is my bogus entry point" and "here is a bogus class this entry point points to"....now kiss
it seems to me I should mock out all things around that, and return back my "expected result" instead.
to remove all that noise of wanting to do this funny injection.
yes...I think that would be the correct approach here.
20:29
whats the quickie to remove all files in a directory that match "*_t.bin" pattern?
rm *_t.bin
glob?
ah, thats works too
DSM
DSM
Are we doing this in Python or *sh?
I don't think any of us are sure
python i was thinking
but either way works lol
20:31
my suspicion is that Kcvin is currently at a deprecated stage of subprocess.call(['rm','*_t.bin'])
DSM
DSM
os.remove + glob.glob would be my first thought, then.
I'm not sure that call with a string to be globbed would work, actually -- I think that bypasses shell-level globbing.
ah, as if it was passed within single quotes, right
$ python3 -c 'import subprocess; subprocess.call(["ls","*.tex"])'
ls: cannot access '*.tex': No such file or directory
yup
(there's a tex file there)
Use pathlib.Path for globbing, plus rglob, plus all manner of file naming, pathing, existence, update, and overall lifecycle
How do I daemonize Bottle app properly? I have no root and sudo access, and yeah I have tried BottleDaemon, it doesn't support server argument. supervisor throws permission denied errors on subprocess.Popen, and this only occurs if I try to start my Bottle app via supervisor.
Don't take not answering your question as missing it or ignoring it. No one probably knows. That's why no one addressed it.
20:40
some votes are worth more than others
DSM
DSM
@PaulMcG: oh, fine, for p in pathlib.Path(".").glob("*"): p.unlink() or whatever. :-)
how did you get +11?
was it a weird downvote upvote count that did that?
i assume accepted answer and 2 downvote
wasn't me this time
I can't be sure... but it has something to do with bumping up against the cap and maybe a post that I downvoted got deleted
20:43
oh that makes sense.
rep cap shenanigans
So, two upvotes... but I was capped after first. Then a post that I downvoted got deleted and I get one rep back and it has to go somewhere..
My theory... I don't really know
DSM
DSM
What's that link that shows you exactly your account rep changes? I've seen the results before.
DSM is on it
DSM
DSM
Ah, https://stackoverflow.com/reputation is the one I was thinking of.
> earned 0 reputation from suggested edits
holy crap I had no idea that existed
20:54
that is super cool
nice

« first day (2483 days earlier)      last day (2689 days later) »