« first day (4034 days earlier)      last day (1138 days later) » 

00:53
@AndrewMicallef no need to fast-track a trivial question. We ask that you don't ask for help here with fresh questions on the main site sopython.com/chatroom
01:11
@AndrasDeak My bad, sorry. The rules were not fresh in my mind.
01:27
cbg all
@Aran-Fey what else is better that seeing this on a new month :D
 
5 hours later…
06:40
Cabbage
How to pass several folders to ignore on a command line?
`$ pyreverse -k -o png -p <project> --ignore backend --ignore _utils`
only ignores the last folder (here _utils), but I want to ignore several.
How to pass a list of folders to ignore?
This raises a folder not exists error:
`$ pyreverse -k -o png -p <project> --ignore backend _utils`
07:35
comma separated...
`$ pyreverse -k -o png -p <project> --ignore backend,_utils`
That worked; thanks everyone! ;)
took me a while to find but you already did github.com/PyCQA/pylint/issues/564#issuecomment-163177779
Thanks @python_user, appreciate the effort. :)
no probs :D
In fact, a careful reading of the MAN page revealed it.
--ignore=<file[,file...]>
I would never have guessed the usage with that
07:41
With enough frustration, you would have guessed it too! :D
 
4 hours later…
11:20
Is there any way to log things in python?
The logging module?
12:16
morning cabbages, folks
evening cabbages
 
3 hours later…
15:08
what a quiet monday
anyone know how to embed an altair chart into a wiki.js page?
15:29
Did you end up registering for AltitudeX @holdenweb?
15:53
Incompetent users are the best testers :D
16:09
_logger.exception("Scheduler failed and should not")
:D
16:36
_logger.exception("Should not failed, you will do it better next run.")
programming alone for an extend period of time leads to funny anthropomorphized error messages. And the word anthropomorphized is unwriteable without the help of google. I just hit approximately the right characters and let it autocorrect the word :D
I find that I tend to get very conversant with sys logs when that happens
16:58
Ugh... had forgotten how annoying it is to successfully catch certain exceptions from requests...
17:17
ugh and except (requests.exceptions.Timeout, requests.exceptions.ConnectionError, requests.exceptions.RequestException) as e still isn't enough... Tomato it.
17:39
except Exception as e --> go have a celebratory cup of tea
@roganjosh you'd have thought... but no... it doesn't work...
Wait, wut?
Something blah blah blah to do with urllib3 not quite following the traditional exception hierarchy ...
18:00
fantastic... looks like I have to add yet another exception to the except clause...
could you perhaps use a bare except and fish out the exception from the stack?
It's sorely tempting :(
18:39
@JonClements doesn't it have any hierarchy?
also guys, aren't you excited about nogil yet?!
Ummm... bare except still lets it escape as well... I've got this to work before but can't remember how... oh well... worry about it after a bite to eat... bbiab
@JonClements did you try nogil yet?!? :D
ouch! bone apetit, puppy
import sys
from concurrent.futures import ThreadPoolExecutor

print(f"nogil={getattr(sys.flags, 'nogil', False)}")

def fib(n):
    if n < 2: return 1
    return fib(n-1) + fib(n-2)

threads = 8
if len(sys.argv) > 1:
    threads = int(sys.argv[1])

with ThreadPoolExecutor(max_workers=threads) as executor:
    for _ in range(threads):
        executor.submit(lambda: print(fib(34)))
% time python3.9 fib.py
nogil=False
...
python3.9 fib.py  12.29s user 0.08s system 101% cpu 12.146 total
% time /opt/nogilpy/bin/python3.9 fib.py
nogil=True
/opt/nogilpy/bin/python3.9 fib.py  14.81s user 0.04s system 716% cpu 2.071 total
that's pretty awesome. Any idea how it'd benchmark against @lrucache and a = b = 1; for _ in range(n): a,b = a+b, a?
18:50
:'D
the point is a well-known CPU intensive code and demonstrates that it uses multiple cores, not that it would be particularly efficient :D
sorry; yes, I understand that, and I should have probably clarified: I wonder if horizontal scaling can yield a faster solution than an otherwise efficient algorithm. As a generic statement, that's quite broad and we immediately run into overheaads and tradeoffs. I was just wondering what would happen in the case of this problem (more idle curiosity than anything else)
isn't nogil a cython thing? What am I missing?
@EliadL you're missing about everything
@inspectorG4dget of course it does not. Completely different complexity classes
A quick googling didn't surface anything, so please, do tell.
@AnttiHaapala touché! good ol' big-O!
19:29
does anyone know of a tree comparator tool that I can use to detect different keys in an arbitrarily nested JSON object?
ooh! cool tool: jsondiff.com
 
1 hour later…
20:48
Thanks @AnttiHaapala

« first day (4034 days earlier)      last day (1138 days later) »