@jpp thanks again, I've been thinking about your suggestion but I have doubts that it's necessary. Have you really seen instances where newbies didn't know if/how they could create ndarrays?
@AndrasDeak, Yep, I am an instance :). For a long time I had no idea with np.ndarray meant.. because it's not often referenced (apart from in the docs). I'm also aware there are lot of non-programmers who use Pandas / NumPy without knowing what a class is. We may think that's sad, but it's the truth :S
@AkhilAlexander it's not impossible, but it is a complex task. Fetching a stream of images, doing classification (which needs a training process beforehand), things like that. Separate parts are surely available as tutorials. But it's not even clear what libraries you'd want to use, and any tutorial would depend on the library.
Unless you're in luck and someone wrote a blog post somewhere about this exact subject. But this is both complex and specific so odds are we'd have to google as much as you do.
@AkhilAlexander Like Andras said it's a complex subject and you will have to break it down into pieces, then maybe you can find tutorials for each of those pieces. Either start with getting Python to read a video feed from a camera. Or by doing face recognition on a video file.
Also, you need to define the exact inputs and outputs. The input is real-time video, but what do you want as output exactly? To recognize the person (like, the particular individual) in front of the camera? To recognize whether or not there is a face in there? To track the position of the face?... Depending on that, and your skills/data/resources/etc you will find different techniques you may apply.
Other questions (to consider down the line after you get something working) could be whether you want it to work in different light conditions, with different cameras, from different distances, from different head positions (profile, upside-down, etc.)
I think the main problem is the need for instant gratification (that +25 when you answer a question) to encourage the base of answerers.
If there was an in-built delay of 1-day before any answer could be upvoted or accepted, it would give more opportunity for judicious voting / ppl genuinely finding the question helpful.
But that would also be asymmetric, since we need the ability to downvote incorrect answers.
@marxin it's often hard to wade through the garbage to find a proper solution to a problem. And if it were easy enough to find the good ones there wouldn't be so many new crap dupes
in a library's test code, I'd like to replace a print and instead log an exception with logger.exception, but it's not showing up when the tests run (- print does though). Do test libraries usually avoid calling basicConfig or doing any other logging setup? here's the code: github.com/pypa/auditwheel/pull/113
I suppose I can do traceback.print_exc() but I'd rather use logging...
@AndrasDeak Indeed. These days I spend my time grinding gear in a video game, and it's frankly much more fulfilling than struggling to find good duplicates on SO
problem statement: test file had a VERBOSE=True global with lots of if VERBOSE: print(... - I don't think it ever changes to False but what was being printed (mostly commands, e.g. docker, prefixed by $) seemed better off behind a logger.info call. The maintainers want to see commands though. When I do --log-cli-level=INFO then it seems like a whole lot more gets printed... probably more than the maintainers will want. Possible solutions: back to conditional printing, level=25, ???
I'm leaning towards a TEST=25 global and calls to logger.log(TEST, ...)
@AndrasDeak Everything is open to abuse. Some systems have more holes to exploit than others. For whatever reason Stack Overflow, Inc thinks the current configuration comes closer to an optimal solution than anything else presented thus far
but what happened was a particular string ad an embedded single quote like this
('Fname X Lname' MD',{'entities':[(0,13,'PERSON')]})
after Lname'
so it prematurely ends the string there and the rest of the strings is treated like python code including the # in the string which ends up as a comment indicator
so my next question is how do I deal with the single quote in my string?
I think triple quote around entire string?
('''Fname X Lname' MD''',{'entities':[(0,13,'PERSON')]})
uh gross now I found a string that has a double quote at the end of it and my triple quote becomes a quadruple quote messing things up again
Since I stumbled on this answer, and it greatly helped me, but I found a minor syntactic issue, I felt I should save others possible frustration. The triple quoted string works for this scenario as described, but note that if the " you want in the string occurs at the end of the string itself:
s...
I'm encountering the quadruple quote scenario as indicated by the 5th answer
that means I have to detect when there is a quote at the end of my string and precede it with backslash before surrounding with triple quote...that's way too much work :)
I ask because I've ended up doing a lot of scraping stuff recently using scrapy, and while I quite like it, I've had to adjust it quite a bit, so quite a while back, I started developing my own
I have to calculate a parameter, in a pandasDF, that's based on around 15 different conditions (mostly &). It's basically the 'status' of real time data. What should I be looking up?