« first day (3637 days earlier)      last day (1294 days later) » 

12:25 AM
(marginally ontopic, re SE network moderation in general) A very useful 2017 definition of "good faith". (This was cited in recent Politics.SE moderator election).
 
 
2 hours later…
2:28 AM
For the past few months, I have been learning a lot of python. Once I finish a python intermediate tutorial and I'm really comfortable with these concepts, I'm thinking about learning machine learning in python. Do any of you have any tips for starting machine learning, any necessary skills required?
 
2:58 AM
I dont think normal python can help you much with machine learning, unless you know numpy and pandas already
most of the modules (TensorFlow, Keras etc) work on numpy arrays and basic python data structures are not used much afaik, I took a small course in college (meaning I only know the basic)so take my suggestion with a grain of salt
 
 
1 hour later…
4:08 AM
hello
in django, how can I add model Charfield can submit 1 time not multiple time the name
class Plan(models.Model):
name = models.CharField(max_length=255)
 
4:49 AM
cbg, does collections.Counter do a sort? Because when I print the object I always get the element with highest frequency as the first key, I thought Counter was just an if...else incrementing values in a dict
 
5:46 AM
@python_learner nope, it doesn't
 
thanks, but how is it showing in a sorted manner?
 
How can I access an object initiated in one process from a completely different process?
 
I get it if I use most_common() some sort happens
 
Hmm, it looks like the repr sorts the keys in descending order
Haven't found anything about that behavior in the docs, though...
@libby Serialize it (pickle, json, xml, whatever) then send it to the other process (through a file, socket, stdin, whatever)
 
@Aran-Fey, I'm initializing a selenium instance and need to access this from the other processes. I assume I'd do this with a socket, just not sure which libraries to go for?
 
5:55 AM
uhhhhh... probably none, and instead rethink your design. I doubt selenium objects are serializable
 
6:09 AM
@Aran-Fey ohh yeah, it only does so on repr, doing .items() gives the output I expect
 
hello , anyone know about python tkinter with threads?
 
you can ask
there are devs here who use that, not me though
 
I tried to dynamically display multi live camera in python tkinter with threads. But I have a FPS problem and performance unfortunately bad. The program use to ip camera links dynamically create ui and then frame using in threads. But despite to using threads, performance not satisfactory. How can I improve performance ?
 
6:23 AM
Why would vagrant command not be found even after installing it? Every time I `vagrant --version` or `which vagrant`, I get the message `Command 'vagrant' cannot be found.` Anyone experienced this, and how did you solve it?

To give the full context of my problem, please check this out https://stackoverflow.com/questions/64129477/command-vagrant-not-found
 
deleting the executable isn't the same thing as uninstalling
apt is literally telling you that it's not installing vagrant because it's already installed
use apt to uninstall, then reinstall
 
Thank you. Running `sudo apt remove vagrant` removed the vagrant package. `sudo apt install ./vagrant_2.2.x_x86_64.deb` worked.

`vagrant --version` works. Much appreciated.
 
 
1 hour later…
7:41 AM
Hey guys when i am running the app with an app_factory i am running into this weird error dpaste.com/BU3PRHANC however when placing the line on the bottom it isnt working to stop the circular imports
 
is app something you wrote or something installed?
 
Anyone have any ideas on how to avoid relaunching selenium webdriver every time I make a change to the code that makes calls to that driver?
 
Thats the init this is something that i have written I am trying to do as advised yesterday
and use application factory from the start and in trying to do this I have run into this error
which makes me think i have got circular imports but not sure if it is in the init or routes.py
 
@libby I could be wrong, but I don't think selenium can connect to a browser that's already running. So you have to relaunch it every time
 
7:50 AM
Right, hence the question
Obviously I don't have to relaunch it every time
HAVE to is a very strong statement ahhaha
@Aran-Fey, I've set it up currently so that it runs in the python interpreter, so I don't have to relaunch each time, but it's gotten really annoying to debug the code
 
I'm not following at all
 
Okay, so I have a test suite that I run wth selenium
My test suite essentially tells selenium what to do
But I'm making changes to the code of my test suite
And it's really difficult to make changes when I keep having to relaunch selenium every time
 
...why?
 
because it takes +15 seconds every time I want to make a trivial change
...
what was your "why" to?
 
So it's not difficult, it just takes a while. Fair enough. Still, I stand by what I said. I don't think there's another way.
 
7:56 AM
dpaste.com/E2H8P63L5 this is the routes it is rather simple still as have been working in models going through to use roganjosh's form of setting the database so have yet to actually implement the registration point, I was busy testing in python shell when running into the above error
 
@libby you don't need to run your full test suite for a trivial change
 
@Hakaishin I'm not running my entire test suite, I'm just trying to running the code, but the test suite depends on launching selenium webdriver.
 
@libby I don't get it
Are you running tests or code?
 
Code that runs thests
*tests
 
so tests xD
 
8:04 AM
I am writing a custom "test runner"
 
ah, I see
 
It maybe can be done with a Unix Domain Socket, but I'm having a hard time understanding how it works
 
How do I edit the records on multiple tables provided that I don't know in which of the tables the data exists?
 
@HASANKAYA I’m not quite following what this has to do with threads. The big picture of threads is that they reduce worst-case latency in concurrent programs by preventing individual tasks from blocking all others. Threads do not make anything faster, they just make it easy to do useful things instead of pausing.
@libby a unix domain socket is basically a regular socket restricted to a local address. Do you understand, say, tcp sockets?
 
I don't understand tcp sockets, no
 
8:11 AM
but your goal is to connect to a running application which keeps the webdriver alive, yes?
 
@MisterMiyagi yes, precisely
What are your thoughts on this?
 
Sockets are pretty low-level, so be prepared to learn a bit on it. The python docs have a Socket HowTo which should show you everything you need.
Be aware that TCP and UNIX type sockets behave pretty much the same for your case, but the former have more docs available. Might want to start with TCP.
 
@Kwsswart you have got a circular import because you have from app import app in your routes
This is the standard layout I use. Note that the entry point main_app is 1 level higher than the app factory
 
8:28 AM
@MisterMiyagi there is a python shared_memory module that may help, but now I need to figure out how to upgrade to python 3.8.5 so I can use it
 
Odd i have similar to this in a file called academy.py which is in the top level directory
How do you use the app.route without importing app?
Unless maybe I should import app from academy?
 
I won't have time to help you until lunch sorry, but I've given you my repo so you'll have time to try piece it together before then
 
No problem mate will look through it and try figure it out
 
8:45 AM
cbg
 
Cabbages :)
 
you should have given it at least 48 hours after posting @αԋɱҽԃ
 
in case if the delete done according for the following rule If your question is eligible for a bounty (>= 48 hours old) and hasn't received a useful response, then you may link to it. i thought there will be an exception for old member of room as we discussed that early. but anyway it's fine for me.
 
9:43 AM
I just upgraded my python version to the download on python.org and now all of my imports are gone and pip3 doesn't let me download anything. I upgraded by downloading the package and gunzipping, followed by ./configure, make, make test, sudo make install. Now nothing works. Any ideas on how to revert back?
 
Find out where your new python is with which python and delete it
or maybe which python3
 
Delete the py -3 version from the system.
@libby Does the pip2 still work or that's broken too?
 
I had python3.7.2 before, it was working fine :(
now pip3 is not found
 
Really? Installing python removed the pip3 command? I find that highly unlikely
 
@libby I highly doubt that
 
9:50 AM
No I probably screwed something up
 
maybe just reinstall python3
and python3-pip or whatever it's called on your system
 
brew won't let me
Okay
So pip3 is back and python3 defaults to python3.2.7, which is fine.
 
@libby I don't know what's that as I'm on Windows. Try py -3.7.2 on the terminal
 
that's fine, I'm just confused by the error given by pip3.8
Does anyone know how to install python3.8 from the command line, rather than by downloading the package from the website?
 
btw, can someone unstar the apt thing please?
 
9:54 AM
brew upgrade python3 says I'm at the earliest version at 3.2.7
 
no clue what that's doing on the starboard
 
@Aran-Fey I have no idea how I starred that message. I didn't even star a single msg yesterday. Sometimes the chat beats the hell outta me. But there is one more culprit along side me ;)
 
@libby I've literally never used brew before, but I think you need to do brew install python@3.8?
 
Nah, that doesn't work. Just tried it
Would have been really impressive though
 
Huh, I remember back when trying to coax brew to install the snakes I needed...
gave up and use `pyenv` instead.
 
10:00 AM
@libby Do you need py3.8 for a project only (or a few)? If yes, you can try venv (I'm not a fan of venv though but it's worth a shot)
 
I need it for a project only
Yes
 
Then try virtual environment. it installs version specific dependencies for a project and doesn't mess up with the global python install (i hv never used it though - this is from what i know)
 
You still need python 3.8 though
 
IIRC venv can only use already-installed python interpreters. So if one wants to use a certain python interpreter of a certain version, pyenv is the tool to use.
 
a virtualenv doesn't help you with installing that
 
10:05 AM
hmm.. That's unfortunate.
 
github.com/pyenv/pyenv <= this is not venv / virtualenv.
👆 there's a HOWTO on installing pyenv using brew in there
 
This was interesting
 
github.com/gpoore/pythontex/blob/master/README.rst Can someone tell how to install this? I installed it with pip but I keep getting 'pdflatex' is not recognized as an internal or external command, operable program or batch file..
 
99% sure pdflatex is a different tool
 
I even did choco install pandoc and choco install rsvg-convert python miktex.
@Aran-Fey Sorry couldn't get it.
 
10:13 AM
Yep It's not included in the github repo. And that's something related to latex itself.
 
@VisheshMangla Do pip install pdflatex
 
I did that already
oh latex
just a sec
 
Is today international installation problems day or something?
 
@Aran-Fey xD
Looks like it is :D
 
some env variable must be set I guess but I can't find the pandoc folder in Program Files
 
10:18 AM
Oh, apparently that's the wrong pdflatex. You don't need the one from pypi, you need the command line one. See tex.stackexchange.com/questions/49569/…
 
I ve texlive installed
C:\texlive
but there is no pdflatex.exe there inside it
 
as per this answer - https://tex.stackexchange.com/a/49571
pdflatex can be found in installation directory of MiKTeX install not texlive.
 
choco installed mikitex somewhere and I ve closed the powershell with which I ran that command Any ideas on how to find where is mikitex?
 
btw my boss keeps using email, even though we have teams and I showed him how to use it and that it has benefits. He is over 60 though. Any ideas how to get him to actually use teams?
 
@VisheshMangla Try C:\Program Files\MiKTeX 2.9\miktex\bin according to the same answer. If not I don't think there is some other way than manual search
 
10:28 AM
ah, strangely there were two folders in C/textlive namely 2019 and 2020. I couldn't find pdflatex in 2020 but running a search there is one in 2019. Thanks now it might be solved
 
Great
@Hakaishin umm.. Is he using Outlook (i have seen a lot of people using it) ?
 
10:55 AM
@Aran-Fey done
 
@PSSolanki not sure, how is that relevant?
 
@roganjosh ty
 
Hey guys quick one how could we use how can you use @app.route without importing app? in the routes? thus to avoid circular routing
is it an acceptable solution importing it from the toplevel app_main instead? or is that bad practice?
just asking because it fixes my issue but not sure if it is good practice
 
That isn't the issue. The issue is that you also import routes into the app factory
Sorry, you import them on the top level of the module. Try the import inside the function
Tis lunch hour, may as well spend it fixing a different coding problem from work :P Let me go grab my laptop
 
11:15 AM
@roganjosh lol
@roganjosh so you shouldn't import routes into the app factory?
 
11:27 AM
Hmm actually just removed the import from the init and placed it in the toplevel or academdy.py and seems to have gone through with the flask shell
 
@Kwsswart ok, and the routes are working?
 
@roganjosh well just sorting out the models at the moment and will check theres a problem with the join that i did trying to implement the many-to-many relationship we spoke about yesterday
trying to figure where it is wrong
 
The structure of the app factory makes more sense if you're using blueprints but this might help you
 
@roganjosh would it be better if I just setup things into blueprints as i go from the atuh bp, ain, bp and just go from there instead of messing with the circular routing?
 
Yes
 
11:39 AM
Hi, is it possible that this still throws an exception?
    def make_and_log_http_call(self, url, code_str):
    self.log.info("Calling: " + str(url))
    try:
        response = requests.get(url)
        self.log.info(code_str + " code: " + str(response.status_code))
        self.log.info(code_str + " text: " + response.text)
        return response.json()
    except Exception as e:
        self.log.warning("Request failed")
        self.log.exception(str(e))
because I get:
    Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/urllib3/connection.py", line 157, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/usr/local/lib/python3.6/dist-packages/urllib3/util/connection.py", line 84, in create_connection
    raise err
  File "/usr/local/lib/python3.6/dist-packages/urllib3/util/connection.py", line 74, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:
It looks like I catch an exception but something in the background pops another one?
 
@roganjosh alright will get to work
 
@Hakaishin I don't see make_and_log_http_call anywhere in that traceback
 
@Aran-Fey it's later in the stacktrace. I didn't copy everything. Also it kinda repeats itself
 
Well, except for special thingies that don't inherit from Exception like SystemExit you're catching everything there
 
@Aran-Fey oh, but thanks your comment made me find it :P
@Aran-Fey man, preconceived notions are so dangerous :P
 
11:52 AM
Hello everyone!!
 
12:07 PM
Hmm interesting, local files take priority over pip installed files
 
 
1 hour later…
1:08 PM
how to use pygments in vscode? I already installed it with pip . But I m unable to see the syntax highlighting
I want to use pythontex.
 
1:26 PM
@roganjosh Thanks for all the assistance it is now working well having just starting using the blueprint system with the factory function
 
@libby if you are having problems to grok sockets, I recommend keeping a strict safety distance to shared memory.
 
Is there even a reason to use regular sockets now that websockets are a thing?
As far as I can tell, they're the same thing except more convenient
 
FWIW, I’m still asking myself the same question - just the other way around
 
Whaaaaaa O.o
websockets have a concept of messages! Regular sockets are just... shudder... data
 
@Aran-Fey and they work everywhere. Literally any sensor works with sockets and not websockets
 
1:39 PM
Admittedly, the main thing that puts me off about websockets is the name. “Just add The Web” is usually not a selling point.
something like proxyable-message-pseudo-socket, now that’s the deal!
 
add quantum
Ooh crypto sockets
 
I’m all for messket = message socket
 
meerkat you say?
 
Certainly cuter than DaWebz
 
@Hakaishin I mean sure, that's always the case when a new technology replaces an old one
 
1:55 PM
Give it another five years and I’d concede that websockets are here to stay, unlike the rest of the fad parade
Don’t see them replacing sockets other than for message based TCP
 
IMO sockets should've been replaced with a more convenient interface ages ago
It's like, on the low-level end, there's sockets. On the high-level end, there's stuff like zeromq and RPC. And inbetween, there's a whole lot of nothing (except for websockets)
 
@Kwsswart you're welcome, glad to hear it
 
morning cabbages, folks
 
2:11 PM
@roganjosh can i pick you brain about what this means: <sqlalchemy.orm.dynamic.AppenderBaseQuery object at 0x000002082A01B400> been researching it comes from the result of the association table i have adapted when seting and checking the user.access_groups and the PermissionGroups.user_access it is what is printed to terminal
 
2:28 PM
@Aran-Fey Sounds about right. Large jumps in the evolution seem smart. I don't want to learn something new every few months for marginal gains. Better build on sockets and have your own good stuff. And then once there is a big breaktrough switch to the new system
That's pretty much what I did and now I'm enjoying zeromq
Looking forward to ROS2, but it's not yet too well supported
I'm never again touching ROS
 
Should I research what that is or is it better if I don't?
 
2:41 PM
it's main thing are a pubSub module, a fileformat to define objects(urdf) a neat simulator(gazebo), good drivers for many sensors, a good way to store and replay and visualize them(rosbags and rviz). That's about it.
 
that's a lot
 
Now that it's written out, it sounds like more than I imagined in my head
I wonder if somebody else had experience with ros2 already in here
 
@Kwsswart I don't know, you'd have to show me what you printed to get that
 
> The site at twitter.com has experienced a network protocol violation that cannot be repaired.
hmmmm
 
@AndrasDeak ?
 
2:47 PM
that's what firefox tells me when I try to load twitter.com
it starts with "Oops."
 
works for me
 
it also works for me in a private window
guess some cookies broke
yeah, clearing cookies fixed it
 
@AndrasDeak I didn't read the site not found in so long. It's more of an image which triggers certain things in my brain, than actual text I try to parse :D I wonder if this happens to people that listen too often to other people who repeat themselves alot: google.com/…
 
@Hakaishin sorry, I didn't quite get that
I mean I'm familiar with the alot but I don't understand any of the rest
 
@roganjosh dpaste.com/9EVHADSN5 Well that is the models how i have implemented it I managed to use a lot from yours by adapting parts. and the route in question is dpaste.com/4FXQ7DK4C and when accessing the route it throws up the following error dpaste.com/CJPDWVVMN
which leads me to think the problem is in the def has_auth function
when checking in python i found the following dpaste.com/7UFT42DSU
which is why i am trying to figure out where it is going wrong, if i am accessing the variables wrong or what?
 
2:55 PM
@AndrasDeak the error message when you don't reach a site of firefox has text. But because it never changed and reading it doesn't help in solving the problem. It transformed in my minds eye from text to image. Which is an interesting thing to happen.
 
@Hakaishin and how does alot come into play?
 
@AndrasDeak oh I mistyped and then fondly remembered it and left the typo :)
 
I, too, barely ever actually read the "can't reach site" error page. For quite a while I was convinced that the "no internet" dinosaur game was playable in Firefox.
I mean, duh, it's moZILLA, and there's a little dinosaur guy on the 404 page. Dinosaurs are extremely on-brand. Surely clicking on it or something will open the minigame.
As a big important adult I was far too busy to actually try to play it, you understand
 
@Hakaishin also a google search link?
 
3:12 PM
@AndrasDeak I was too lazy to download and add the image :P Excuse my laziness
 
OK, so we can agree that you're being weird and not me? :P
 
As chief executive weirdo I arbitrate that Andras is the less weird party in this interaction
Incidentally the artist that popularized the alot has returned to the Internet after abruptly vanishing for like five years, which is good news
 
@Kevin that's all I need to know!
@Kevin oh, nice, I was only aware of her departure
 
Since so much of her work related to anxiety and doubt etc etc, there was much concern about her fate... But she seems to be fine, and is/was working on a new book
Ah, definitively "was working", as the book is now out
 
@Kwsswart The first issue is probably due to the user not having any access permissions set. If the route is open to anyone logged in, then you can just use the default @login_required. What you're seeing is the object representation of the many-to-many relationship. I think you need to put .all() on the end to print the collection
 
3:20 PM
@roganjosh the route is only viewed to those with management position.
also a small bit confused as to which line you are referening to with the .all()
 
Ok, but you haven't actually given that user any permissions, which is why it's sasying NoneType...
 
@roganjosh hmm I thought I had... I guess must have assigned it wrong will attempt to redo it with new user creation
 
There is no need to keep pinging me if you're replying directly below
 
if self.current_speed is not None: is such beautiful syntax, it's how program languages should be <3 python
 
I'll take a proper look in 30 mins or so, got something to finish at the moment sorry
 
3:26 PM
no worries man got to go do a class now anyway... sorry such a pain just trying to understand this better
 
@Kevin I imagine your wearing a cyberpunk themed clown costume and hat while floating on an antigravity ball :D
Has anybody read Iain Banks? What a strange name
 
Mental image approved
 
It's quite entertaining
 
I've read a couple Iain Banks stories, yeah. Player of Games I remember most clearly
Let me introduce you to the crew: Steve, Betty, Carl, A Series Of Unlikely Explanations, and taller Carl
 
4:03 PM
too bad Bob the Drag Queen couldn't make it :P
 
@Kwsswart You need to so something like this:
user = User(name='Mr Potato')
user.set_password('1234')
db.session.add(user)
db.session.commit()
user_id = user.id

new_permission = PermissionGroups(name='Test')
db.session.add(permission)
db.session.commit()

permission = PermissionGroups.query.filter_by(name='Test').first()
user.add_access(permission)
db.session.commit()
 
Bob the Drag Queen is very busy defending zir master's thesis on warp drive analytics, so we'll just have to soldier on without zem
In the meantime A Series Of Unlikely Explanations can handle engineering by themselves, although it means they don't have time to be dungeon master for our weekly burning wheel session.
 
Oops, that needs to be db.session.add(new_permission)
 
@roganjosh came down to i was doing everything but forgetting to commit
 
4:22 PM
Your User <-> Lessons relationship looks to be the wrong way around
Actually, nm, I guess it makes sense if the users are just the teachers
 
4:40 PM
Hmm, one one hand I appreciate that the twitter api guide uses descriptive alt text for their images in case the user can't see them, but on the other hand I'm annoyed that I can't see the images.
404'd page resources are not a good sign of well-maintained documentation
 
4:53 PM
Ugh, I have to prove that I'm not using the API for evil purposes. Why even bother then
 
How does one prove that?
A letter from your mother, perhaps
 
I'm not sure, I didn't get that far in the developer account application process. I'm going to guess, a five paragraph essay
 
Just write to them that you intend to use it for good purposes and add a validation url lol.
 
To be fair it just says that you have to get "your use case approved" which doesn't necessarily mean your use case can't be evil. It just can't be contrary to Twitter's own cryptic goals
 
You are getting a bunch of stuff about the user anyways, why ask to write then?
 
4:57 PM
You aren't allowed to geolocate users and grind their bones into bread, but you are allowed to hypnotize them into following your every command as long as their tweet rate doesn't decline
 
@roganjosh yeah the app will never be used by the students so should work
 
5:49 PM
I don't know but jupyter is giving me strange characters here. If you w'd see the jupter notebook you w'd be able to see strange characters.
Can someone tell what is strange here?
hmm, strange, in the dpaste a sec ago I could see the strange characters
in the jupyter notebook, the strange characters still appear
I printed the string using repr and got dpaste.com/8RQZLKR55
 
Change titlepage = ''' to titlepage = r'''
 
6:06 PM
hi guys, when I receive text in a flask request using request.get_data(), should I pass it through str() method? I found that text and str(text) have different lengths
 
How is the text being sent to you?
 
in the body as plain text
 
Sounds like you need request.get_data(as_text=True)
 
I'm just wondering why passing it through str() would change the text itself for example
text = request.get_data()
len(text) = 906
len(str(text)) = 965
 
What is type(text)?
 
6:10 PM
because it originally wasn't text, it was a byte string
 
@erotavlas so the answer is no. str(bytestring) is always wrong
 
ah, ok
 
yeah, the correct solution (if as_text=True didn't exist) would be request.get_data().decode(insert_encoding_here)
 
thanks, as_text=true solved the issue
 
6:19 PM
@Aran-Fey thanks but what magic did this r or raw string did? There are no backslashes here right?
 
Good afternoon,
I am trying to read an excel file using pandas.
Cols are in OrderedDict
Looking for a way to filter rows by a col name.

My code so far:
 
...there's like 3 dozen of them.
 
# Read excel
read_excel = pandas.read_excel('C://my_project//my_excel.xlsx', sheet_name=['Employees'])

# Get rows where username is johns (Username is a col in the excel sheet)
filter_rows = read_excel.query('Username == "johns"')

# Print
print(filter_rows)

Error:
AttributeError: 'collections.OrderedDict' object has no attribute 'query'
 
another thing is, is it possible to use jinja templating here instead of what I 'm doing? The { } syntax is common to latex and python which disables me to use jinja
 
@LinuxUser pay close attention to what the error message is telling you. Have you printed read_excel?
 
6:23 PM
@Aran-Fey oh yes \begin, I never feel actually that I ever wrote a \ in latex. It has become so usual writing that for me.
 
@roganjosh Thanks for replying.
Yes, it prints my excel as the dataframe.
 
@LinuxUser read_excel is an OrderedDict. An element of the ordered dict is a dataframe. You need to get the dataframe first
 
I would have assumed that sheet_name=['Employees'] would fix this btw, but I guess not. I don't normally read the file and specify the sheet name at the same time
 
@roganjosh pandas.pydata.org/pandas-docs/stable/reference/api/… This happens because they're giving sheet_name as a list
It returns a dataframe if you pass just the string
 
Fun times :)
 
6:38 PM
@PranavHosangadi I like how your top network post is always my go-to example of an interview question that I got horribly wrong (though it started with just "a balloon" and my failure originated in not even checking what it was filled with :P )
 
Haha, well I'd suggest it was a badly posed question if they didn't mention what it was filled with, given that it's a tad bit relevant absolutely essential to the answer!
How do you strikethrough in chat?
 
That was the point of the question - to see whether I'd jump in with an answer or first ask for basic clarification. I failed because I injected all my own assumptions through eagerness to answer
@PranavHosangadi put --- before and after the text
 
Alright! Thanks!
 
In the same code that I shared I 'm using `substitutions["GROUP-MEMBERS"] = df.to_latex(header=None, index=None, caption="Group Members")
` and getting `TypeError: to_latex() got an unexpected keyword argument 'caption'`
`
the docs clearly state there is a caption argument pandas.pydata.org/pandas-docs/stable/reference/api/…
 
> Changed in version 1.0.0: Added caption and label arguments.
Time to upgrade
 
6:48 PM
am I using old docs or old pandas?
I just installed the pandas.
 
old pandas
 
oh damn its the global pandas
thanks again
 
 
2 hours later…
8:33 PM
is brew install python3 broken for anyone else?
```
==> Pouring python@3.8-3.8.5.mojave.bottle.tar.gz
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall python@3.8`
```
brew postinstall python@3.8 fails pretty quickly
Now pip3 won't install, I don't have access to any of my previously installed packages from 3.7.*
Okay, so I fixed this with brew uninstall --force --ignore-dependencies python@3.8
And then installed @3.7 and linked everything to get all my installed packages back.
I guess I just don't understand why python3.8 pip3 does not upgrade properly
 
I'm a bit confused about 3.8 because I don't know what we've won over 3.7 that's worth it. It's breaking some dependencies at my new place... but for what?
 
8:49 PM
@roganjosh they've introduced some new stuff in the multiprocessing package which is what drew me to try it out, but I should have done this in a venv
Caused me a huge headache
 
@libby nice shout, though. Thanks. It's around shared memory?
 
Oh crap, there were changes to the __reduce__ method. That means I need to fix my serializer...
 
9:05 PM
how to capture what print() gives to a str?
 
Option 1: Don't.
Option 2: contextlib.redirect_stdout
 
don't?
contextlib, hmm never heard of this module. Thanks again.
 
Yeah, don't. If you need to intercept output that's meant to be shown to the user, that's a massive red flag and a sign that you're doing something wrong
 
let me progress a little bit in my code with this info , and I will try to observe the vulnerability.
 
"Vulnerability"?
 
9:17 PM
^red flag
@roganjosh oops I misunderstood it for sure, it simply meant that outputs are meant to be shown to the users not capturing. Now I get it
 
Did everyone see the tweet about pip 20.3 coming out this month, with stricter dependency resolution (intended to prevent inconsistent package version installs instead of installing wrong versions and crossing fingers)? 2-minute YouTube video: youtu.be/B4GQCBBsuNU
 
 
1 hour later…
10:29 PM
folks, is there an easy way of adding (dumping) variables (objects, lists) into a log. I'd like to do something along the lines of:
logger.critical("Invalid directory.", sys.argv)
 
logger.critical("Invalid directory. %r", sys.argv)?
 
Thanks
 
10:56 PM
I want to find two rows in my dataframe where row1.column <myval <row2.column. Plz help. Today is a busy day!
I need row1 and row2
 

« first day (3637 days earlier)      last day (1294 days later) »