Python Bytes - #219 HTMX: Dynamic and live HTML without JavaScript

Episode Date: February 3, 2021

Topics covered in this episode: Do you really need a virtualenv? Copier - like cookiecutter * Pandarallel - run pandas apply in parallel!* Stop Using Print to Debug in Python. Use icecream Instead ...HTMX: Dynamic and live HTML without JavaScript * PyLDAvis - Interactive Topic Model Visualisation* Extras Joke See the full show notes for this episode on the website at pythonbytes.fm/219

Transcript
Discussion (0)
Starting point is 00:00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds. This is episode 219, recorded February 3rd, 2021. I'm Brian Ocken. I'm Michael Kennedy. And I'm Jennifer Stark. Hiya. Yay! Yay! Welcome, Jennifer. It's so great to have you here. Thank you. It's really great to be here. Thank you.
Starting point is 00:00:20 Yeah, yeah. It's been great. It's great to have you here. You know, we had you, or I had you you as a guest over on Talk Python. And that was really fun talking about data science stuff small team of three, but we're a bigger data team for research and insights as well. We've been spending most of our time working on engineering stuff, but we've been moving gradually to include more data science tasks as well. So looking forward to doing some more of that. Yeah, sounds really fun. All right, Brian, you want to kick us off? I mean, I heard that you're supposed to use virtual environments and not mess up what you're doing, but if you don't want to, I guess you just don't do that.
Starting point is 00:01:13 Well, I use virtual environments all the time, but there was an article, so I wanted to cover this, and there was some discussion online. An article from Frost Ming titled, You Don't Really Need a Virtual Environment. So what's the story there? Yeah. Yeah. So there's a little hint in the slug of the URL that the slug is introducing PDM. So I don't know if he's really saying that you don't need it.
Starting point is 00:01:42 But PDM stands for, what does it stand for? Package Python Development Master. Well, that's cool. I think I want to put that on my business card. I'm a Python Development Master. Anyway, so let's just go back up a little bit. This is kind of a neat tool. It's sort of poetry-like, but it says it doesn't use virtual environments. It uses the
Starting point is 00:02:07 package, dunder package directory. So what is that? So there's, we do have this problem with virtual environments and I do, the main problem I think is it's hard to teach people. So if you're teaching somebody new and you want them to install something, you kind of have to say, okay, well type Python dash M V and V or, you know, Python dash M V and V space V and V. And then you have to activate it. And in the Mac, people do this, the Windows people do something else. And then after you've activated it, then if we've got requirements, you need to install them or install the requirements. And, and I, you know, that's not a fun way to start teaching people how to use Python. So I think we do need to solve that, but I'm not sure this is it, but there's. Sure. Well, like Node.js has a similar problem, but they don't necessarily have as much of a
Starting point is 00:02:58 challenge because they have this like directory structure, which I think what DunderPy package is trying to do, right? Like if you have a node modules folder, some directory up and you do something with NPM, it just goes up till it finds when it's like, well, there's the top of the project. We're good. Yeah. So there's, that's, that's kind of what, so there's a PEP 582, which we'll link to that kind of has that, has this, it's proposing to have this dunder packages, package directory and have that sort of thing. So if you're, if you're in a directory with one of those around and you do a pip install, I think this is how it works. Either you're supposed to, I think it's just going to install stuff there instead of in your global one.
Starting point is 00:03:38 So I actually think this would be cool. Even, even if it's only used for teaching, um, it would be a cool thing to have because also you could you could possibly zip this whole thing up and give somebody a directory and they'd already have all the packages and everything that'd be kind of interesting i wonder if that's kind of similar to how conda is that's not how conda works can i use conda ends instead yeah so conceptually it feels easier yeah yeah you probably live way more in the conda works can i use conda ends instead yeah so conceptually it feels easier yeah yeah you probably live way more in the conda world than the pip world right yeah i i think conda is sort of uh intermediate right so with conda you do have to say conda activate right yeah manually
Starting point is 00:04:18 but yeah you don't have to be in the right place like with pip you could be anywhere say yeah exactly you say i have an environment called this. Let's roll, like activate that and then go, right? Whereas this is, it's like, I'm in the right location, but I don't want to have to talk about environments. And it just happens to be that that environment has a directory structure that Python will know about. Yeah.
Starting point is 00:04:40 Yeah. Yeah. So there's another part of virtual environments that's a a little icky is that I guess it's type, you know, maybe, uh, it's that if you, if you create a virtual environment, you kind of tie it to a particular Python version. Yes. And if you update your Python version, then you're not, your virtual environments aren't pointing to the new one. And I don't really know, I don't know how to actually, I don't deal with't deal with that i just delete the virtual environment and recreate it um maybe there's a really good at doing that because uh you every time i brew upgrade my python for a major version it just stops working i'm like oh come on here we go you know time just time to erase everything and start
Starting point is 00:05:18 over yeah so the pep 582 might fix that also because you could just i don't know if it fixes that because it's still in the directory structure it does have uh python versions in the directory naming thing so uh i think for minor upgrades it would work but for major ones like going from 3.9 to 3.10 i don't think it would help you there i don't know um anyway i don't i don't know enough about 582 to comment on this but i do think it's cool that p PDM is around so that you can play with the Dunder packages to see what it's like. However, the workflow within PDM is way more complicated than virtual environments, in my opinion. So I don't think that it's going to fix the newbie problem, but it's still a neat thing. That's what I feel about with all of
Starting point is 00:06:05 these things is it's like it solves two problems and it adds three you're just like oh come on do i really want to trade those uh a couple comments from the the live stream hi lang says conda rocks mostly so uh right there with you jennifer yeah and then yeah yeah and then chen uh danelli says uh there was a way to set up conda things. So it automatically switches to the conda environment, see the environment.yaml file. I don't know anything about this. Have you seen that, Jennifer? I have not used that. No. It sounds like we should all check it out.
Starting point is 00:06:40 That sounds really helpful. Yeah, that sounds really good. Yeah. Thank you, Daniel. All right. Well, I guess we should jump over to the next one. Something else that's really helpful is cookie cutter, right? So often we want to go and say, well, I want to create a project and I don't want to just start from file, new project. I want to have a certain structure. I want to maybe have some of the files there. So for example, if I go and create a new Pyramid web app, I can use a cookie cutter to generate
Starting point is 00:07:03 that. And it'll say things like what template language do you want to use? Do you want to use SQL Alchemy? And you answer a couple of questions and it generates project already integrating those things with the right directory structure and the right extra dependencies and whatnot. And that's cool, right? So I think cookie cutter is really taken over as the primary way of creating projects that are structured.
Starting point is 00:07:22 It's not just Python. You could even create like Atari 2600 assembly language projects and C++, other weird stuff like that. Anything that has to do with projects, just here's a bunch of files, replace some conditionally, include others and so on. That's what cookie cutter does. And so that's not what I want to talk about. What I want to talk about is this thing called copier. Have you guys heard of copier? I have not. I have used cookie cutter, but I've not heard of this one. Yeah. Cookie cutter is cool. And it's way more popular than copier. Copier is pretty relatively unknown, but I think it's worth checking out. I don't know that I'll replace what I'm doing with cookie cutter with copier. They're not interchangeable. They
Starting point is 00:07:58 should be, that would be a great feature, but I don't think they can share each other's templates. That said, the thing that is interesting about Copier primarily is that it allows you to upgrade working with projects. So if I go and make a decision to create, say, some web application or whatever else application, it even works for data science, like structuring notebooks and whatnot.
Starting point is 00:08:19 If I make a decision and then I change my mind after I've already worked on it for a while, too bad. You don't get any choice. Like it's, you throw it away or you create another one and you kind of diff the files. You're like, ah, well, what's the difference over here? Oh, I should include this thing. But with copier, you can rerun it on the project and make changes and apply those changes and different choices to an existing project you're working on. That's why I think it's interesting. That's cool. Does it have a, like a prompt like thing also? I mean, cause cookie cutter asks you things.
Starting point is 00:08:47 I believe it does. Yeah. It will ask you questions. Uh, if you look at it, it has, um, yeah, it absolutely has prompts. I can't really see a great example here. Uh, it's, it doesn't use, I believe cookie cutters, like native Python that you program it in the scripts are Python. And then they drive arbitrary text files and whatnot with replacement, then it's kind of like Jinja. This actually uses YAML. So if you look at an example somewhere, I'm not sure exactly where a good example is,
Starting point is 00:09:18 but basically you set up YAML files and the YAML files have different types of prompts and questions. You can say like, here, I want to ask for a password and then confirm it but don't show the output so there's a lot of configurability and interesting things like that and then if you rerun it again it'll say here's the project structure that you have here's the project structure that we're creating and if it runs into a file it'll say uh this one already exists do you want to override it use the one we're about to generate things like that so it's pretty neat i think that looks pretty cool i definitely want to check it out yeah yeah it's
Starting point is 00:09:49 it seems to solve a slightly different problem than cookie cutter but it's i think cookie cutter is the right conceptualization to have when you think about it yeah i did start using i created my own cookie cutter for some um data sciencey things that i was working on and there's a data science cookie cutter that exists already, templates exist, but it wasn't completely sitting my needs, so I made my own. And then I was going to make one for projects in our team because we do some, you know, like one-off data analysis
Starting point is 00:10:16 for data science projects. And then discovered that GitHub now has, you can make a repo as a template, and you can set it as a template in GitHub, and then you just clone it and name it something else. So that's solved part of, it doesn't solve everything. You know, if you want something different,
Starting point is 00:10:32 then, you know, this might be really good, but. Yeah, yeah, yeah, that's right. So I remember if you go to your GitHub repository under settings, there's a checkbox that's off by default that says this repository is a template. That's what you're talking about, right?
Starting point is 00:10:45 Yeah. I see. So if you set up like empty, you can set up your file structure. So it's got nothing about, I guess, some of the things that you're setting up in this one are not what you set up in the GitHub template. It's just the file structure really. And if any files, you know, that you want to pre-populate with any files.
Starting point is 00:11:03 But yeah, so that solves what I was going to solve with cookie cutter. Cookie cutter would have been overkill for this. I see. Yeah, I had never really thought of those two things as being the same, but you're right. They're basically the same. Because normally when you fork a repo, it's like, well, now you can contribute back,
Starting point is 00:11:17 but the templates are just now you start from here and it's not really related back, right? Yeah. Nice. Well, yeah, that brings us to your first topic, right? Tell us about it. Yeah. So I was thinking of data science in our team.
Starting point is 00:11:34 We had a data science project that we started a couple of weeks ago, and it had a deadline. So we weren't going to make anything particularly pretty. We just wanted to get something analyzed and done. So we were using lots of tooling that we hadn't used before because we were using massive data set. I think it was a couple of gigs worth of text. So we had to use Google's AI platform notebook,
Starting point is 00:11:59 which is just Jupyter notebook on Google Cloud. But you can have different sizes of your machine. You can have as many cores as you want, different types of machines if you want, and it will just run Notebook for you. So we thought that would solve the problem. We just have all these cores, and we run our Notebook on that, and it'll be magical.
Starting point is 00:12:17 But it wasn't. And we're trying to apply, do a Pandas apply to this huge data frame. It just was not working at all um we even had the the process bar on the bottom like under the cell and it would take i think it was like 10 minutes to do and it was still on zero percent and i thought oh wow yeah don't have time for this we're already on a deadline and it's like this isn't working um and then went over to uh
Starting point is 00:12:45 terminal and just checked like uh top to see what what um processes were going on and this is like one python thing i thought well it's not yeah we could speed that up let's see what we can do even though you have a ton of cores and a lot of high machine it's still just single threaded basically right yes it is um so i looked at a few alternatives and didn't want to get too much into i think some people were suggesting um there's some desk related yeah modules we could use like i think swifter was one um but there was it didn't work instantly for me so i looked for something else and found um you have 30 seconds, Library. Work for me. I can't figure it out. Bin it. Start again. Find something else. I tried Pandarol, which just parallelizes any Pandas apply function.
Starting point is 00:13:37 You can tell it how many cores you want to use. You might not want to use all of them. And it's not like a linear or exponential improvement, is it? Like doubling your cores is not necessarily hard for time. Yeah. There's some overhead. So yeah, you can tell it how many cores you want to use. You can also opt, I think if you scroll down,
Starting point is 00:13:56 it says you can also add like a progress bar to it in the options. But it's, and again, you've got some benchmarking there as well. And it's just really easy to use um so that solved our problem again like the whole project was just quick and dirty but um to get it done quickly this is great and then going over to terminal and doing top again it's like all python just python python python yeah yeah beautiful and by default if you don't you can specify the number of workers but if if you don't, it's just the number of CPU cores. Yeah, all of them.
Starting point is 00:14:28 So just a quick question. It looks like it says it's mostly around the apply function. What does apply do as a reminder? If you specify a function somewhere, and then when you hit apply, I think there's some examples actually a bit further down of the kinds of applies that you do. So you can have where you'd normally put apply func. So you can apply a function to that whole directory of, sorry, to that whole data frame or to a specific column within that data frame. So any function you apply will be column, will be row wise in that column. Oh, okay.
Starting point is 00:15:05 So the function only has to work on a single row, essentially. So anywhere where you'd put apply, if you're using parallel, you just replace apply with parallel apply, and then it will parallelize the function. That's very cool. Yeah, that looks super cool. Daniel asks, whoops, not that one, this one. He asks, how does this compare to dask uh
Starting point is 00:15:27 i do you know i've not used to ask a lot either but i think dask can be set up to run in parallel on a given machine uh it can also be set up to run you know in a distributed uh cluster basically yeah my my feeling is... It's a few well-complied data sets, isn't it? Yeah, yeah. My first impression is probably, like, this is about, I've got to apply this function to every element.
Starting point is 00:15:51 I want that to be fast and simple. Let's just do that. That's my first thought. I think the other option I used, or looked at for 30 seconds, was Swifter. And I think that is a Dask-based module, I think. But I might be misremembering.
Starting point is 00:16:07 And then somebody else said that Apply is like Map in base Python. Yeah, absolutely. Yeah, very cool. Brian, you know what else is cool before we get on the next thing? What is? If I wanted to learn PyTest, say if I was Jennifer's team, maybe, I could get a book on PyTest, right? So this episode is brought to you by us.
Starting point is 00:16:27 Yeah. So I highly recommend a book called Python Testing with PyTest. There's a small glitch with it, though. It was written in 2017. So if you go to PyTestbook.com, there's a bunch of errata that will help you. There's just some minor changes. I forgot to pin a version of one of the libraries, stuff like that. So if you go to pytestbook.com, that page has some errata that
Starting point is 00:16:52 helps you through learning PyTest and with the book. There is a second edition on its way, but it is a long way out. So don't wait for it. That's a lot of work. Yeah. Over at TalkBytesOnTrading, we're working on a lot of work. Yeah. So I'll over talk by then trading. We're working on a bunch of courses. Breaking news. Never mentioned this before, but we may be having a desk course coming. So just so you know, and Damon also says probably more experienced than definitely me or Brian. The desk has more features.
Starting point is 00:17:19 It can do chunking on the data frame to work around the RAM size limit, for example, and whatnot, which is pretty interesting. And also notice down over here, this option, use memoryFS. It will actually use this memory file system thing, which sounds like it's good for lots of data as well. Cool. I haven't been out much. I used to love to go out and get a milkshake or something. But you wanted me to use ice cream instead for Python? Yes. What's going on here yeah so actually uh kind of love this um there's a there's an article uh from uh kuyen
Starting point is 00:17:53 tran stop using print to debug in python use ice cream instead and i think we've covered a couple of others like other print alternatives uh but yeah um i went and tried this and it's pretty cool so um with the with the new f print stuff you can there's i forget when it came in but you can do an equal sign uh to to print and it prints a nice like variable name or whatever whatever you want and then the value of it next to it so it's nice but it's still a lot of typing so if you want to print uh print something nice you you know type it's a it's a lot of typing it's not tons but when you're throwing debugging in you're probably stressed doing it quickly is good so ice cream is just a way to do this faster so ice cream is uh instead of typing print for your debugging output you type ic so first of all fewer
Starting point is 00:18:43 characters yeah right there characters no curly brackets you don't have to do quotes um it's just ic and then and then you give it whatever object or expression you want to print so that's cool that's it uh so even just at that it's worth it it's less typing i mean you do have to import it but there's that. But there's other stuff too. So you can, if you don't give it any arguments, it logs, it's kind of like easy flow control debugging without having a debugger, because if every time it hits an IC statement without any arguments, it'll by default print like the file and function and line number where it's at. So you can kind of trace through your stuff. So that's nice. Um, if you want to have that tracing, uh, be part of all of your statements, even the ones where you pass something in,
Starting point is 00:19:36 there's a way to configure that too, which is very nice. Oh, nice. Um, I, you can custom prefix, which is kind of, it's, which is like super powerful. I'm totally going to use it for this. So the example that they have is instead of course, you can just put a string in or something, but it's a callback. So you have a callback function getting called. So you can use that. Their example is to inject the date time, which is kind of neat. You can inject the date time in your print statement. But I was thinking you could use that to encode system state, like which users logged in or whatever other system state you kind of want to track while you're debugging something. This would be really cool to do since you can use a callback function. A couple other features with
Starting point is 00:20:21 it, it doesn't go to standard out, it goes to standard error by default. So it's not cluttering up your output if you're storing output somewhere. Um, and then, uh, one of the other things I'm glad they like this article lists this as a, as a feature, it's not a print statement. So when you want to clean out all your debugging, you can just search for all of your IC lines and clean those out. You don't, because you might have print statements that are supposed to be there and you don't need to clean those out. So yeah, you could even sort of cancel it out with an import statement, just define import, define IC to be a function that takes whatever and does nothing. Yeah. Yeah. That's really cool. So people who are listening, you know, you say, if I were to say IC of a function call, like plus five and give it the number four, the output would be IC colon, then actually plus five with the argument values, colon the return value. And so it's a really nice way.
Starting point is 00:21:12 Instead of just printing nine and 10, it prints, I called plus five with four and got nine. I called plus five with five and got 10. And it just, it sort of summarizes the debug information a little bit better. Jennifer, I think this might make sense inside even a Jupyter notebook. Yeah, I think it will. I was just thinking this is even less typing than if you used f strings. Yeah. Yeah.
Starting point is 00:21:33 Yeah. A little more powerful. And like Brian said, you kind of know it's intentionally a debug thing. You could even rename, you know, import IC as debug and just make it really clear if you really want it, right? Oh, yeah. Three extra letters to type. Yeah, I know. Because I'm not sure if I saw IC in my code
Starting point is 00:21:54 without being familiar with this that I know what that's about. It's your code. It's not a pun. Are they making a pun? Like, I see my errors or my output. Oh, I see, I see. Yes, they may be.
Starting point is 00:22:06 They may be. And Piling is a fan of the name. Brilliant name. Yeah, it's pretty clever. All right. Good one, Brian. So the last two, by the way, the Parallel Pandaril had a great visualization. This one has some great visuals.
Starting point is 00:22:20 And this next one I want to talk about, you know, I think might be part of the reason we love these things. It's like they communicate their values so clearly. This thing called HTMX, high power tools for HTML. So, Brian, I know you fall into this realm. I do some of the time as well. Jennifer, maybe. I'm not sure.
Starting point is 00:22:37 If you're going to write some interactive web pages, you really want to drop in and write a ton of JavaScript and do all that interaction by hand. Or would you rather just have it like magic its way into interactivity? And so that's a little bit, yeah, who doesn't want the magic, right? So this is kind of what this is like. Normally, if you have a webpage, you have two options. You can have a form and that form could like post back and submit some data and then you could write some JavaScript. So if I click on some element, something happens. But what this does is it lets you to go to almost any element in your page, a picture, paragraph, whatever. And you can say, if you interact with this, here is a CSS transition to run. Here's a WebSocket call to do. Here is a AJAX JavaScript call. And then it does something in reverse. So what I could say, for example,
Starting point is 00:23:26 is when somebody clicks on this picture, replace it with whatever HTML fragment I get back on the server that I told it to call. So the picture could be like, click this for this bit of data report. And then what it does is return actually the HTML for a graph. That's like a live graph with the data prefilled. And all you have to do is touch the picture and teach the server how to return the HTML. And now you have this interactive page that's like live with animations and stuff. It's super cool. So let me show you probably the best way to see this is through an example. So for example, there's a button. If you just include the script, that's all you got to do. And you say button, instead of having it in a form, you just say hx-post. That's the HTMLX
Starting point is 00:24:06 thing. You give it a URL. And when you click it, it says call slash clicked. And when it comes back, replace what button is, the outer HTML, like button and everything in it with whatever you got back from the server. Okay. And even has a haiku in here, which is pretty cool. JavaScript fatigue, longing for a hypertext, already in hand. But let's go look at some examples. These are cool. For example, let's do lazy load. If I go over to lazy load, which is a little slow, so
Starting point is 00:24:33 it's probably... It's lazy. It's quite lazy, it is, indeed. Here we go. So we come over here and if you just scroll down, you can see it automatically loaded in this by refreshing. See, there's a little action, boop, boop, boop, and then off it goes. And all I got to do is say is this image, it has this indicator. Here's the image to show
Starting point is 00:24:55 while you're loading. And then what you want to do is just show whatever you get from slash graph. Isn't that slick? And like, that's literally what you get have to write. Let me show you another one. I might do this just for the lazy loading. That's great. I know. Let's go do that. Yeah, look at the active search. So over here, I can type J-E.
Starting point is 00:25:13 Okay, there you go. And just as you type, all you got to do to like type in this little text box and have all these search results come up lazy is just say, here's what you call HTTP post. And the trigger is the key change. There's even a delay. So as you type really fast, it doesn't go insane on the server. It like waits. Really, really cool.
Starting point is 00:25:29 Yeah, as a little indicator. And then if you notice at the bottom, there's this thing you can show. And it shows all the requests and the responses that have gone back and forth. There's like a little debug toolbar here for the whole AJAX interaction. Oh, sweet. Isn't that sweet? Yeah. It is nice. How did you find this? Gosh, I don't remember. toolbar here for the whole ajax interaction oh sweet isn't that sweet yeah it's nice how did
Starting point is 00:25:46 you find this oh gosh i don't remember i feel like maybe maybe somebody uh some listener told us about it or i just i ran across it on twitter or something i feel like i found it from the community somewhere but i don't remember where but i'm i'm excited about this include a javascript file put one line and then it becomes this cool interactive thing all over the place so yeah definitely digging it yeah totally gonna use that yeah for sure yeah same it might might encourage me to update my website exactly you're like oh it's super interactive look at all this i rewrote it completely much fun yeah yeah cool all right what's next hi lda viz um yes this is also part of that um quick turnaround data science project that my team did a couple weeks ago we were
Starting point is 00:26:35 looking at doing um some topic analysis on text and um our first approach was to use latent derishlet derishley nobody knows how to say it just gonna say use Leighton Durishley. Nobody knows how to say it. I was going to say it with confidence. Leighton Durishley. I can't remember what the A stands for. And Alice says, maybe that's the A. We applied that.
Starting point is 00:26:59 But to understand what you're looking at, you can have it print out what the topics are and what words are contained in that topic. But it's really hard to get into the output of your model to evaluate if it's a good model or not. So what some wonderful people in the R community did was they made LDAviz, which just displays the different elements of the LDA output in a really, really intuitive way. So even if you're not too sure on the math behind LDA and what everything means,
Starting point is 00:27:33 what lambda is and what all the different complex interactions are, it's quite intuitive if you spend a bit of time exploring the visualization. So that was then ported into Python. And that's called, in Python, it's called PyLDV. But the visualization is exactly the same. Nice. Yeah. So you'd have, so in this little partial screenshot
Starting point is 00:27:58 of the visualization, we have some bars. And the blue bars and the red bars, so the blue bars are like how much of the overall, you have all the words in all the topics, like in all the documents. So baseball, how of all the words in all the documents, how much does baseball, how much does baseball represented in all those documents?
Starting point is 00:28:20 And the red bar represents how much in that topic, topic number 19, how much topic number 19 is made up of a sport. Oh, I see. So you have these different topics on the left that you can click on them and it'll generate the bars to explain more detail? Yes. Okay. You can click on all the different topics.
Starting point is 00:28:42 The number of topics is determined already in the model that you've already created. And you can change that, rerun the model, and get that main topics out. So yes, you can click on the different topics and explore the top words, either top words based on how expensive they are across all the documents or within that one topic. And then there's a slider as well. I don't know if there's an example. Let's just scroll down. But there'll be a slider which goes between zero and one um and at one it's
Starting point is 00:29:07 the the word order the topic words order um is ordered by representation across all the documents and if you slide the slider all the way down to zero it's shuffled all the words to be um more specific to show the words that more specific to words that are more specific to that topic, that are exclusive to that topic and not in other topics. Whereas if you have it to one, it's prioritizing the words in the list of words that are like everywhere. So yeah, that's just easy and nice to play around with and explore your model.
Starting point is 00:29:40 It seems like such a powerful way to explore these models around uh nlp stuff yeah it just looks it's just nice it's just well designed it makes you feel happy saying playing with it yeah these pictures and live interactions are great yeah and there's really good documentation as well so they've got links to um easy to read documents that explain way better than i did um what everything means um and how to interpret stuff. So definitely take a look at that. And there's some, I think links to some YouTube videos and whatnot as well. So yeah, the docs
Starting point is 00:30:11 are really nice. Links to academic papers explaining what everything is and topic models and yeah, good. Yeah. And there's some linked videos there. I didn't pull them out because I think they're probably like talks or something. But yeah, those look good as well. Yeah. Cool. Nice. So it says this package was ported over from R.
Starting point is 00:30:32 And I know there's a fair number of things in the Python data science world that's like that. Do you see that still happening a lot? Like what's this interplay between R and Python these days? I think I've actually not seen that in a while. To me, I'm not very aware of it, but it seemed like that was really popular a couple years ago, and I hear less of it now. Yeah, yeah. Well, yeah, same. I think R is really... Because R is a stats
Starting point is 00:30:53 language, and it's been around to stats longer, I think, than Python has been. It's much more mature when it comes to stats. And I think very specific statistical applications are more advanced in R, just because they've been around for longer.
Starting point is 00:31:10 Python is definitely catching up, though. But with something like this, I think it's nice that rather than reinventing the wheel in Python, they've just taken something that already worked and made it work in Python. Exactly. You're like, we like this. We'll just do this.
Starting point is 00:31:22 This is great. Yeah. Why change it? Yeah. Daniel Chen threw out there, going back a few topics, that there's conda-auto-env, that project, which works, I think, probably like the PDM thing that you had, Brian? What do you think? Say that again? I think we're talking about whether conda has this idea of automatically activating environments under PyPackages.
Starting point is 00:31:45 I think this project, Conda-Auto-AMV, probably does. And apparently there's a tie-in with RStudio as well. I think I agree with you. Nice. I was just looking at R. So R looks like it's been around since 93. I didn't know it was that old. Oh, wow.
Starting point is 00:32:00 Yeah. Based on S, apparently. Based on what? F? Based on S? S. Yeah. Based on S, apparently. Based on what? F? Based on S? S. Yeah. Just one character, please.
Starting point is 00:32:10 One character is all we need. See what's ahead. We'll go with something far along. Yeah. R was my first programming language for data analysis. So I'm really out of touch with it. Now that we've got TidyR, which is supposed to be like really amazing and great for um like it makes it easier for people new to programming to get you know up and running quicker um but i look at i look at r now and i think i don't know how that works or what
Starting point is 00:32:34 that is i've just been out of it for so long okay so you're completely in python now yes yeah but i'm not like uh no to r i don't i don You see it sometimes, you know, people are like, yay to Python and no to R or the other way around. And I think it's just silly. Yeah. Everything's, they're both really, really good at what they do. Yeah. If they're doing something cool like this, like LDA Viz, you know, do that here as well. Yeah.
Starting point is 00:32:57 Yeah. Speaking of visualization, I want to remind people that are listening to the podcast that we do um, we do, uh, live stream it this, so that you can hop on on Wednesdays and watch with us. Um, or you can catch it on our YouTube channel, um, so that you can see the things we're looking at. Uh, we highlight if we're looking at a webpage or a cool visualization, you can see it. So yeah, absolutely. Is that it, Brian? I think it is. Uh, do you have any extra news or anything? Nothing super exciting, but I did want to tell people about the JetBrains survey. And if you've ever gone to the JetBrains site, did you know that they have a little terminal command prompt
Starting point is 00:33:37 for agreeing to the cookie policy, which is kind of cool. Anyway. Yeah, I love it. I had to do that kind of, I'm like, oh oh i hate these kooky things but that's kind of cool i'm going to do that so they are launching the developer ecosystem survey for 2021 and you participate you get some prizes it does take a little while it took me like 15 minutes it's a non-trivial amount of questions but i'm sure that we'll cover this in three months or whenever the report comes out and there'll be all sorts of cool stuff we can talk about so you know python people get your voice heard nice yeah gotta remember to take that yeah how about you um i got a couple exciting bits um i am going to be speaking uh next week at a couple places so um i'm going to be speaking at the python user group for aberdeen which it's in the UK. That's about all I know. It's a virtual online. Yeah. It's an online thing.
Starting point is 00:34:30 And so I'm going to, I'm going to teach, there's, we kind of did a survey of the people going and there's a lot of people new to testing and new to PyTest. So I'm going to do sort of a intro to PyTest sort of a a thing or at least a topic around pi test that's introductory um and then uh i'm going to do a similar talk but targeted a little bit closer to what they're doing to noaa which i'll probably get that wrong national oceanic something something um so i'm going to talk with one of a group of those people next week. That'll be fun. And, oh, it's in Scotland. Aberdeen is in Scotland. Sorry. Thank you, Alex. I told my kids about both of the things, and they're like, yeah, Aberdeen,
Starting point is 00:35:16 that sounds neat. But no, really, you're going to be talking to them? So my kids are excited about that. Yeah, that's super cool. Jennifer, anything you want to throw out to people listening? You run a user group, right? Yeah, we've got PyData Manchester that we have going on. And our next, it's on Meetup
Starting point is 00:35:33 and it's obviously on YouTube because where else are we going to be? But then our next one coming up is on agent-based models. So that's going to be really cool. Looking forward to that one. And hopefully, and I'm not going to promise too much,
Starting point is 00:35:47 but we did put our own podcast on hold for a little bit. So hopefully we will start that up again this year. So one reason why I'm pretty interested in the tools that you guys use for your podcast, because I think this makes it really interesting and engaging. yeah well i think i think some of these tools like we're using for example stream yard for live streams and stuff i i do think there's a lot of you know a low bar to adopt those kind of things for a lot of meetups and stuff so yeah that's cool if people want to know what we're doing they can shoot us a message and we'll let them know yeah i just looked it up. Scotland is in the UK, so I wasn't completely wrong.
Starting point is 00:36:25 It is. No, you're not wrong at all. It's like squares and rectangles. Come on. You said it was a rectangle. It's all good. All right. Well, with that, you think we should close it out with a joke? Yes. What do you think, Brian? Yeah. All right. So this one comes to us from Edward Orochina
Starting point is 00:36:41 and sent us this cool picture here. And this has to do with an engineer helping a designer fix a problem. I kind of feel like I want to be the developer. Do you mind being the designer, Brian? Sure. All right. So Brian comes to me, the designer comes and says, there's a problem with this design.
Starting point is 00:37:01 So I say, oh, no problem, no problem. We can fix this here in the terminal. I pull open ZShell and I'm rolling along. Whoa, you're a hacker. No, no. It's just the terminal. But where are all the buttons and icons and dropdown menus? Is this the matrix? Yes. Have you ever had one of those experiences? I had one of those experiences at a coffee shop. I was doing something with a terminal and I had like three of them open and one of them was doing like tailing a log and one was running like a pip install script with a bunch of progress bars. And people are like, are you trying to hack us here on the wife? I'm like, no, I'm just working.
Starting point is 00:37:40 Leave me alone. So I was on the other side of it to start with. I was a grad student. I shared an office with a couple other people. And one of the women that shared the office with us was a Vim user or VI user at the time. And I was with tags and everything. And I was an Emacs person at the time with menus and stuff. And so I was watching her code once. and it's just jumping all over the place.
Starting point is 00:38:09 Like she'll go to a very – hands on the keyboard, nothing, no mouse. And the windows are popping back and forth, and she's going all over the place. I'm like, oh, my God. She's like thinking into the computer. So I learned VI because of that experience. Oh, that's awesome. Yeah. When you see people just using Vim or any of Emacs, whatever, like that,
Starting point is 00:38:32 like, mind-blowing. I still need my, I like to use my mouse. Yeah, I like a blended experience as well. Cool. Well, thanks, everybody. Yeah, thanks, Brian. Thanks, Jennifer. Thank you. Yeah, this was really fun. Thanks for having me. Thank you for listening to Python Bytes.
Starting point is 00:38:48 Follow the show on Twitter via at Python Bytes. That's Python Bytes as in B-Y-T-E-S. And get the full show notes at PythonBytes.fm. If you have a news item you want featured, just visit PythonBytes.fm and send it our way. We're always on the lookout for sharing something cool. On behalf of myself and Brian Auchcken, this is Michael Kennedy. Thank you for listening and sharing this podcast with your friends and colleagues.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.