CSPythonForScience
CSPythonForScience
  • Видео 17
  • Просмотров 38 104
Building Beautiful and Intuitive CLI in Python with Typer
In this video I''ll show you how to set up your CLI (command line interface) game in python by using the Typer package with some help from Rich thrown into the mix. If you are using argparse to create your CLI's, you definitely want to check out this video.
Source code available on the GitHub.
github.com/acswindle/cli_example
0:00 Introduction
1:10 Project Setup
3:00 Building Commands
6:00 Adding Arguments and Options
12:05 Styling Output with Richer
16:00 Setting up Passwords
25:47 Setting up Environment Vars
27:50 Progress Bars
30:41 Outputting Tables
32:28 Packing CLI Utility
Просмотров: 164

Видео

FastAPI Dashboard Python
Просмотров 7315 месяцев назад
In this video we will build a simple dashboard using FastAPI, Plotly, TailWindCSS, HTMX, Pandas, and python's builtin os and pathlib modules. This dashboard will Github Repo with the source code github.com/acswindle/memory_dashboard 0:00 Introduction 1:08 Project Setup 3:12 OS File Sizes 10:54 Setting Up Templates 15:25 TailWindCSS Setup 23:07 HTMX Setup 27:27 Dashboard Directory Size 31:04 Das...
Fullstack Python FastAPI and HTMX Part 9
Просмотров 6495 месяцев назад
In this final part of the series on FastAPI and HTMX, I will show you some nice features of HTMX that enhances the client side user experience when interacting with our sample social media app. Source code: github.com/acswindle/simple_social 0:00 Introduction 0:35 hx-boost 3:44 hx-disabled 6:07 hx-indicator 10:20 infinite scroll 17:52 popup modal 22:17 Conclusion
Fullstack Python with FastAPI and HTMX Part 8: Uploading Pictures
Просмотров 1,2 тыс.5 месяцев назад
In part 8 of our simple social media web application, we add an upload picture feature to our posts. Source Code github.com/acswindle/simple_social 0:00 Introduction 0:30 Single Page Comments 6:18 Hide Comments 12:37 Post Picture 31:30 Rendering Uploaded Pictures 37:26 Outro
Fullstack Python with FastAPI and HTMX Part 7: Adding Comments
Просмотров 4435 месяцев назад
In part 7 of our simple social media fullstack python application, we add in a user feature to add comments on a post. Source code : github.com/acswindle/simple_social
Fullstack Python With FastAPI and HTMX Part 6: Adding Like Feature
Просмотров 5106 месяцев назад
In this video we expand our features for the simple social media site by adding a like feature. 0:00 Introduction 0:21 Updating Database Schema 5:00 Posting Like to Database 10:35 Pulling Like Count per Post 20:11 Like Counter HTML 23:03 Add Like Button HTML 30:39 Updating Post after Liked HTMX 41:43 Disabling Like Unlogged Users 44:31 Showing Used Liked 57:51 Unlike Feature 1:03:18 Conclusion
Full Stack Python with FastAPI and HTMX Part 5: Frontend Refactor
Просмотров 1 тыс.6 месяцев назад
In this part 5 of our python full stack social media site with FastAPI and HTMX, we go through and refactor our front end to make it more "dry". This will allow us to add new features much quicker in later parts. We also add some more capabilities to our sign up, log out, and log in features. Source code github.com/acswindle/simple_social 0:00 Introduction 1:26 Base Template 7:07 Resuable User ...
Full Stack Python with FastAPI and HTMX Part 4: Security
Просмотров 1,5 тыс.6 месяцев назад
This is part 4 our our FastAPI w/ HTMX series. Strap up for this one, because in this video we go deep into the discussion of setting up security with user authentication and sessions. Github Repo: github.com/acswindle/simple_social 0:00 Introduction 0:39 Adding Users to Database 4:32 Adding Signup Backend 20:32 Signup Frontend 35:20 Login Authentication 42:00 Login Session Creation 52:50 Using...
Four Reasons Choosing Polars Over Pandas
Просмотров 1516 месяцев назад
In this video I want to make the case for why I am choosing to switch to Polars from Pandas and why I think you should consider it as well. Github repo w/ code github.com/acswindle/polars_youtube 0:00 Introduction 2:05 Indexing and Multi-indexing 9:58 Better Declarative API 18:23 Parallelism 23:11 Query Optimization
Full Stack Python FastAPI HTMX Part 3
Просмотров 1,6 тыс.6 месяцев назад
This is the second in a series of videos detailing making a simple full stack web application using SQLite as a back end database, FastAPI for the HTTP server, and HTMX for the browser front end. In this video we make our draft web page look better by adding CSS using Bulma. Full access to the code available on GitHub. github.com/acswindle/simple_social.git 0:00 Introduction 1:54 Bulma Overview...
Full Stack Python FastAPI HTMX SQLite Part 2
Просмотров 2 тыс.6 месяцев назад
This is the second in a series of videos detailing making a simple full stack web application using SQLite as a back end database, FastAPI for the HTTP server, and HTMX for the browser front end. In this video we dive deeper in Jinja 2 templating and getting our front end set up with HTMX. Full access to the code available on GitHub. github.com/acswindle/simple_social.git 0:00 Introduction 0:24...
Full Stack Python Application FastAPI, HTMX, SQLite Part 1
Просмотров 8 тыс.6 месяцев назад
This is the first in a series of videos detailing making a simple full stack web application using sqlite as a backend database, FastAPI for the HTTP server, and HTMX for the browser frontend. Part 2 ruclips.net/video/oHy4YeMp6Zo/видео.html Full access to the code available on github. github.com/acswindle/simple_social.git 0:00 Introduction 0:19 Setting up project 1:10 Setting up database 3:34 ...
KNN Regression Using Python and Numpy
Просмотров 4072 года назад
In this video I will create a KNN regressor using python and numpy with confidence bands via bootstrapping. I will also use pytest and the python pdb to test and debug the code as I go along. The generated dataset and idea came from The Elements of Statistical Learning: Data Mining, Inference, and Prediction. Second Edition. 00:00 Intro 00:20 Project Setup 04:10 Creating dataset 13:05 Creating ...
Asset Allocation Simulation Using Python and Numpy
Просмотров 6843 года назад
In this video I show how you can use numpy to generate random variables. The application of interest is asset allocation for a profolio made up of hypothetical stocks and bonds. Edit: After uploading I realized I only forcasted to year 24. In order to go to year 25 I should have specified years to 26 due to python's zero based indexing.
Multivariate Normal Modeling in Python Using Numpy
Просмотров 6 тыс.3 года назад
In this video I will go over how to write your own class to to fit data to a multivariate normal distribution. This will be useful for future videos when I cover unsupervised learning topics such as clustering and anomaly detection.
Radial Basis Function Interpolation Nd
Просмотров 2,6 тыс.3 года назад
Radial Basis Function Interpolation Nd
Radial Basis Interpolation From Scratch Using Python
Просмотров 10 тыс.3 года назад
Radial Basis Interpolation From Scratch Using Python

Комментарии

  • @sukhumpuengnim
    @sukhumpuengnim 8 дней назад

    can you share your vim setting environment . Thanks

    • @cspythonforscience
      @cspythonforscience 8 дней назад

      It has changed a bit since I made this video, but here is the current LazyVim config. github.com/acswindle/nvim-config

  • @kylereilly3259
    @kylereilly3259 20 дней назад

    Amazing series so far really appreciate you!

  • @wahi80
    @wahi80 Месяц назад

    Awesome series !! Any videos on how to integrate signup with Google SSO or something similar ?

    • @cspythonforscience
      @cspythonforscience Месяц назад

      Thank you! Yes I would like to. Looking around Google SSO sounds like it can be hard to set up, but I think GitHub’s SSO is far more streamlined so I may try that first.

  • @dunklerKurfurstDesDeepstat
    @dunklerKurfurstDesDeepstat 2 месяца назад

    I had the exact same idea. Currently, I was thinking "What's the best way to set up my login with tokens?" I Googled it and found this. Let's see how much our ideas overlap.

  • @RamanKumar-hm2xq
    @RamanKumar-hm2xq 2 месяца назад

    what are you using for IntelliSense suggestions?

  • @luchinilvp
    @luchinilvp 2 месяца назад

    Muy buen video, solo te pediria si puedes hacer uno mas profesional con BD, o un ejemplo en github. pero este video excelente, gracias por tu tiempo, Saludos desde Chile.

    • @cspythonforscience
      @cspythonforscience 2 месяца назад

      Thank you! Yes I might do a full production grade project with a database and everything here soon. Just need to figure out a cool use case, maybe like a budgeting or financial app. Also the source code is on GitHub, link is in the description. Thanks for checking out the video!

  • @nejathakan5521
    @nejathakan5521 3 месяца назад

    Nice

  • @nejathakan5521
    @nejathakan5521 3 месяца назад

    Excellent

  • @resistentemente
    @resistentemente 3 месяца назад

    What are the minimum requirements needed to follow the series of the project?

    • @cspythonforscience
      @cspythonforscience 3 месяца назад

      You can check the requirements.txt file on the GitHub, but the main ones are python 3.10 or later, fastapi, and Jinja 2. Htmx and Bulma css can be added using a CDN link. For the security portion you might need to download form cryptography packages but can't remember off hand if it's a standard library package or not.

  • @valdavid1829
    @valdavid1829 3 месяца назад

    i deeply appreciate you debugging in real time.

    • @valdavid1829
      @valdavid1829 3 месяца назад

      day 2 of my gratitude for this video. i just finished setting up my prototype following this vid!

    • @cspythonforscience
      @cspythonforscience 3 месяца назад

      Thank you for the kind words! Agree I've seen too many tutorial videos that don't show running into issues or having to debug problems and that's not how programming works in practice.

  • @CodingforMachine
    @CodingforMachine 3 месяца назад

    Leetcode clone

  • @zemania4535
    @zemania4535 4 месяца назад

    Thank you very much sir.

  • @MrRbc33
    @MrRbc33 4 месяца назад

    nice video, do you have tha code in github? im having an issue, the pie_chart doesnt show because there are no petitions to /pie_cart endpoitn, thanks

    • @cspythonforscience
      @cspythonforscience 4 месяца назад

      Sorry I forgot to add it when I uploaded the video. I just created it, you can check it out github.com/acswindle/memory_dashboard

    • @cspythonforscience
      @cspythonforscience 4 месяца назад

      Sorry I forgot to upload it to github. Here is the github.com/acswindle/memory_dashboard

  • @tarikcelik9055
    @tarikcelik9055 4 месяца назад

    hey man, I got this recommended. I just want to give you advice which is to put all of these parts into a single video. because when I got this recommended I was not interested in this because it's part 8 of the project and I was interested in htmx before but not right now. A big single video works better for the algorithm because of it's length it will have big average view duration (this is why you see a lot of long project videos with high views) and people can come back to it to continue watching and it works better for the recommendation algorithm since people will get to see the whole project's context in one video rather than a random part which they will scroll fast past it. best of luck

    • @cspythonforscience
      @cspythonforscience 4 месяца назад

      That’s a great idea! I’ve been meaning to do so, kind of like freecodecamp type of video. I originally just posted single videos to keep myself motivated, but I should go and collate them into a single vid now that it’s done. Glad you enjoy the content and thank you for the great suggestion!

  • @MrRbc33
    @MrRbc33 4 месяца назад

    im following, good content!

  • @MrRbc33
    @MrRbc33 4 месяца назад

    you know that you can comment a selection with Ctrl + /

    • @cspythonforscience
      @cspythonforscience 4 месяца назад

      Yes, but I had to remap my vscode key bindings awhile back. But I need to go back and correct it so I can quickly comment like you said

    • @MrRbc33
      @MrRbc33 3 месяца назад

      @@cspythonforscience later oi notice you use noevim and vscode vim extension!

  • @Jakub1989YTb
    @Jakub1989YTb 5 месяцев назад

    Cdn js at the end of a body?

    • @cspythonforscience
      @cspythonforscience 4 месяца назад

      Agreed not the best place for it. In general it’s best to just host your own css and js instead of using cdn. I moved this js cdn into the head in the final vid of the series and show how to use HTMX to cache it so you don’t reload it on every request.

  • @rogerkohler6806
    @rogerkohler6806 5 месяцев назад

    I like this series. The snafu cut on the video is confusing. If I look at step 3 it backs up the posts into temp_posts and then drops and recreates the original posts with foreign keys and. cascades - that makes sense but then why drop the temp_posts table? The Posts are never added back from temp_posts before dropping it! Am I missing something?

    • @cspythonforscience
      @cspythonforscience 4 месяца назад

      Sorry about that. Yes I think you are correct, I never moved the data back from the temp table to the permanent one. I was mainly trying to show how to do the db migration, but forgot that important step!

  • @scarysticks66
    @scarysticks66 5 месяцев назад

    have you ever tried golang?

    • @cspythonforscience
      @cspythonforscience 5 месяцев назад

      No I haven’t but I’ve heard good things about it and would like to try it out sometime. Currently I am learning rust on the side and using it with axum for some hobby projects.

  • @abdomagdy
    @abdomagdy 5 месяцев назад

    ❤❤

  • @karibusafari1877
    @karibusafari1877 5 месяцев назад

    first time for me to use bulma. interesting framework!

    • @cspythonforscience
      @cspythonforscience 5 месяцев назад

      I like it since you can quickly style the website without too much thought put into it. For a more custom experience, Tailwind is the way to go. I am using that for my next project that I hope to have uploaded here in a couple days, so be to check that out if interested!

  • @angeloj.willems4362
    @angeloj.willems4362 5 месяцев назад

    What the hell happened at 4:29? Now I'm lost and cannot follow the rest of the vids...

    • @cspythonforscience
      @cspythonforscience 5 месяцев назад

      Sorry looks like I accidentally made a cut in post production where I didn’t intend to. All i did was recreate the post table then drop the temp table. It’s the sql statements after the “drop table posts”

  • @karibusafari1877
    @karibusafari1877 5 месяцев назад

    very detailed explanation, with full exposure of the developing route. Thank you!

  • @teddyfulk
    @teddyfulk 5 месяцев назад

    What’s your opinion on fastHtml?

    • @cspythonforscience
      @cspythonforscience 5 месяцев назад

      I haven't tried it out yet, but my initial impression isn't too strong. It seems like the main selling point is that everything is done using only python, however I don't see a huge advantage in that. I usually like abstractions when it hides implementation details by exposing a declarative API. That's why I prefer to stick with straight SQL instead of ORM. SQL is a declarative way of dealing with a database while the implementation details are left to the DBMS. I feel like an ORM just tries to abstract something that's already been abstracted away to begin with. Same applies to HTML. Its a declarative way to state how you want a webpage to be displayed, and the implementation details are left to the browser. Trying to abstract HTML into python just doesn't make sense to me. Plus looking at the codebase for FastHTML, it doesn't look like its written in a manner to provide decent type hinting when making the HTML components. They use *args and **kwargs, which makes less than an ideal developer experience when you forget an attribute name. Whereas writing HTML in a modern IDE basically just writes itself due to the really great code completion.

  • @adamwasserman4934
    @adamwasserman4934 5 месяцев назад

    I tried to add some corrections, but youtube will not let me post code. There are number of spots that could really benefit from clarification. In several places code just appears that we did not see you type out. and it is only when things do not work that you realize that it is on screen somewhere.

    • @cspythonforscience
      @cspythonforscience 5 месяцев назад

      Yes there a few spots where I detected a minor bug from one video to the next. Unfortunately since these videos go quite long, I decided to make some corrections off camera. Overall I tried to minimize this where possible. My hope is that since the code is available on GitHub, that can be referenced as a “source of truth” so to speak. I will try to improve this as I make future videos. Or if there are spots were I do change the code off camera I will at the least annotate it on the screen .

    • @adamwasserman4934
      @adamwasserman4934 5 месяцев назад

      @@cspythonforscience yes annotations on screen is what I was thinking too. Something like see file.py on github/bahba;h, line xx to xx before continuing. Very happy to help with the effort by sending you time stamps and missing lines. This is a great series and I would like to support your effort.

    • @cspythonforscience
      @cspythonforscience 5 месяцев назад

      @@adamwasserman4934 That would be awesome!

  • @adamwasserman4934
    @adamwasserman4934 5 месяцев назад

    And thanks for a great tutorial

  • @adamwasserman4934
    @adamwasserman4934 5 месяцев назад

    A tip for people who are getting just the h1 and not content at 4:00 minutes: on line 24 change `context={}` to `context = context`

    • @cspythonforscience
      @cspythonforscience 5 месяцев назад

      Thanks for pointing this out.

    • @adamwasserman4934
      @adamwasserman4934 5 месяцев назад

      @@cspythonforscience My pleasure. There are few spots in the other episode where I will fill in something I think is missing. I really appreciate you making this. Just what I needed, and not that easy to find.

  • @thiernoibrahimalo667
    @thiernoibrahimalo667 5 месяцев назад

    Interesting

  • @sehriyarmemmedli26
    @sehriyarmemmedli26 6 месяцев назад

    Discovered these while searching for interesting new fastapi tutorials. Looks informative tbh. Haven't watched yet but planning to start. Thanks.

    • @cspythonforscience
      @cspythonforscience 6 месяцев назад

      Hope you enjoy them! I think fastapi and htmx are a killer combo to get something off the ground fast. I also have the source code uploaded on GitHub. Cheers!

  • @ralphlagos4210
    @ralphlagos4210 6 месяцев назад

    Loving this tutorial!

  • @ralphlagos4210
    @ralphlagos4210 6 месяцев назад

    Love this series!

  • @iwswordpress
    @iwswordpress 6 месяцев назад

    Really good - been following. Will code for this video be uploaded?

    • @cspythonforscience
      @cspythonforscience 6 месяцев назад

      Yes! Sorry I forgot, I will upload when I get back home today. I currently am a bit ahead of this video on my codebase, but you can go through the git history to get back to the code at this point of the series.

    • @cspythonforscience
      @cspythonforscience 6 месяцев назад

      Github updated. github.com/acswindle/simple_social

  • @intelpakistan
    @intelpakistan 6 месяцев назад

    loving this series! please keep it coming.

    • @cspythonforscience
      @cspythonforscience 6 месяцев назад

      Glad you have enjoyed it, hoping to post part 5 soon!

  • @second1799
    @second1799 6 месяцев назад

    I enjoyed it. Keep it up brother!

  • @swoopsavvy7560
    @swoopsavvy7560 6 месяцев назад

    Again great tutorial. I'll keep coming back!

    • @cspythonforscience
      @cspythonforscience 6 месяцев назад

      Thank you for the kind words. I hope to have part four uploaded soon

  • @swoopsavvy7560
    @swoopsavvy7560 6 месяцев назад

    Good job! Clear explanation and the right pace!

  • @swoopsavvy7560
    @swoopsavvy7560 6 месяцев назад

    Very good tutorial. Great!

  • @2v4vendetta
    @2v4vendetta 7 месяцев назад

    one of the best and most well-paced videos I've ever seen on the topic. Please post more often!

    • @cspythonforscience
      @cspythonforscience 7 месяцев назад

      Thank you for the kind words! I hope to have part 3 uploaded within the next few days

  • @aleksdizhe
    @aleksdizhe 7 месяцев назад

    Well, when is the part 3? :))

  • @aleksdizhe
    @aleksdizhe 7 месяцев назад

    When will part 2 be? :)

    • @cspythonforscience
      @cspythonforscience 7 месяцев назад

      Part 2 is out! Full Stack Python FastAPI HTMX SQLite Part 2 ruclips.net/video/oHy4YeMp6Zo/видео.html Sorry still a RUclips noobie, I will try to add a card and link it to this video when I get home

    • @aleksdizhe
      @aleksdizhe 7 месяцев назад

      @@cspythonforscience thx!

  • @Sankhyan00
    @Sankhyan00 Год назад

    You can't understand!. I really mean (thankyou).

  • @hu5116
    @hu5116 Год назад

    I love that you showed a example of RBF interpolation! Bravo! But you gave me yet another example of why I HATE Python! I could’ve done the same thing in half as many lines with Matlab (Octave if you are poor or cheap), and a human could actually read it and understand what was going on. But nonetheless thanks for the example! Oh, also turn up your volume! I could only barely hear you! That made the video actually a bit painful😢

  • @damiangames1204
    @damiangames1204 Год назад

    useful, thank you

  • @jparks6544
    @jparks6544 2 года назад

    this does not make sense at all. the voiceover doesn't match what is being typed.

  • @mberoakoko24
    @mberoakoko24 2 года назад

    This is amazing

  • @richardgillies8794
    @richardgillies8794 2 года назад

    Thank you for sharing this. I was able to follow well but I got confused near the end. The plot_interp function contains the line y = func(data) and func contains the function that generated the data. To me it looks like there is no interpolation happening. Instead, the 'target' function is being used to generate more data.

    • @ayomideosetoba5765
      @ayomideosetoba5765 2 года назад

      The 'func' has been passed as an argument in the plot_interp function. RBF 'interp' was then called into the plot_interp function in the last cell.

  • @ajaisingh9129
    @ajaisingh9129 2 года назад

    Will this code work with multi-dimensional data?

    • @cspythonforscience
      @cspythonforscience 2 года назад

      No this is only for one dimensional data. However I do have another video with this same algorithm in multidimensional space

  • @suparki123
    @suparki123 2 года назад

    Nice video! Could you please post the code as a link in the description? Much appreciated!

  • @chonky_ollie
    @chonky_ollie 2 года назад

    You are a legend. Thank you!

  • @mohamedamineelmaaoui9026
    @mohamedamineelmaaoui9026 2 года назад

    I'm using pycharm and following along, interpreter didn't give me any issues but I can't see anything, turns out I need to add a plt.show() after plotting, hope this helps anyone else .