anthonywritescode

anthonywritescode

Various videos about programming and related topics. Most videos will feature open source software and programming best practices. For now, most videos will deal with python.

All slides and associated code are on github: github.com/anthonywritescode

my thoughts on ruff

my thoughts on ruff

Пікірлер

  • @parlor3115
    @parlor3115Күн бұрын

    Bro, you don't have to "do this over and over". You can cache your creds either globally (if you plan to only have one GitHub account per pc account) or per repo (recommended). The command creates the file ".git-credentials" in the home directory and it maps the GitHub account to its creds and also configures the repo to reference the right credentials in the file.

  • @bigmacbeta
    @bigmacbetaКүн бұрын

    Thanks @anthony

  • @vancomchick
    @vancomchick2 күн бұрын

    hi Anthony! great video, as always, thank you so much! i have a small question regarding the semantics of the exit code of your program (non-zero for number of files changed instead of error indication). wouldn't it break some usage scenarios that involve pipes for example? or is this expected behavior for such tools?

  • @anthonywritescode
    @anthonywritescode2 күн бұрын

    I think it was specifically nonzero on changes and pipes work just fine with nonzero exit codes (and I doubt such a tool would be useful in a pipeline anyway)

  • @Spitfire5592
    @Spitfire55923 күн бұрын

    I wish there was -warn=trace

  • @Bregylais
    @Bregylais4 күн бұрын

    Loving your channel. Keep it up!

  • @Tamilselvan-hw2qf
    @Tamilselvan-hw2qf5 күн бұрын

    Thank you its working

  • @jake115577
    @jake1155775 күн бұрын

    If Anthony has paid tutorial courses, I will buy every single one of them even if I go broke.

  • @glichking6812
    @glichking68126 күн бұрын

    I know nothing about any code or programming but I keep getting this video and still have no idea what's being said or how the solution worked

  • @replikvltyoutube3727
    @replikvltyoutube37277 күн бұрын

    Seems like the performance is not worth it compared to headache of configuring it in CICD 😅😅

  • @bernardodc9631
    @bernardodc96318 күн бұрын

    What about PDM?

  • @SodalisUK
    @SodalisUK8 күн бұрын

    I actually had this happen on a real production IT system that I was working towards taking over the management of. I was working for an outsourcing company, and the system was in production and being operated and managed by the application vendor. The reason we hadn't taken it over was because there was zero operational documentation and zero scripted operations. So the vendor was operating it manually based on instructions scribbled on a scrap of paper. These instructions said: 1. "cd /tmp"; 2. "rm -yr *"; 3. "reboot". Unfortunately, one evening having done step one, the operator received a telephone support call and as part of answering that he went root (presumably with "sudo -i" which put him back in the root directory). When he finished the call he executed steps 2 and 3 without exiting root thus doing EXACTLY what this video shows. D'UH!!! To cap it all, it then turned out that the system backups hadn't been working either and hadn't been tested and it took them 2 or 3 weeks to rebuild this production system. DOUBLE D'UH!!!!!! I might add that this was one of two similar screw ups (the other resulting from deletion of the production SQL database) at the end of a disastrous fixed price application development where the system has already been rejected and redeveloped from scratch and where the initial go live was abandoned twice, once because an untested system timezone change caused it to fail, and once because the system has never been tested on a production sized database, and several missing indexes resulted in use response times on a linked production customer call healing system going from 1sec to over 30mins. Put simply a fiasco from start to finish from a MAJOR MAJOR software house.

  • @saeidzafari6870
    @saeidzafari687010 күн бұрын

    Hi , I wanna shred my picture in my phone but does have an error , permission denied , how can I solve that? Thanks

  • @Cohnan13
    @Cohnan1310 күн бұрын

    Oh, I had missed to understand that leaving the slowest task last made so that we couldn't schedule anything else in the meantime, since there isn't anything else to begin with

  • @urknidoj422
    @urknidoj42212 күн бұрын

    Interesting! Out of curiosity, I tried creating a directory named '-', and found that it cannot be accessed using 'cd -'. Therefore, it can only be accessed using a longer relative or absolute path.😆

  • @amir.hessam
    @amir.hessam14 күн бұрын

    Very well-said Anthony -- have you ever had the chance to talk to David Cramer himself ? I can see his name as one of the investors 😬

  • @AlexGeorge
    @AlexGeorge14 күн бұрын

    The CPython implementation detail about object address reuse mentioned in *explains **#343* makes a prominent appearance in this episode! I can't help but notice it since obtaining that bit of knowledge.

  • @dmytroparfeniuk2670
    @dmytroparfeniuk267014 күн бұрын

    Oh, nice)

  • @user-jo4ij9fg1d
    @user-jo4ij9fg1d15 күн бұрын

    \o/ ... That's cool!

  • @447xpro
    @447xpro18 күн бұрын

    Thanks!

  • @ccos218
    @ccos21818 күн бұрын

    PDM is the way

  • @Xavi-s2i
    @Xavi-s2i19 күн бұрын

    I thought it was true triple yoru

  • @maxmax-mn1vg
    @maxmax-mn1vg19 күн бұрын

    you did the project very good!!! i really appreciate it , but i have one bugs when working on your project : that it appears Connecting to programmer: . avrdude: butterfly_recv(): programmer is not responding Found programmer: Id = "1023 �"; type = Software Version = 1.0; Hardware Version = 2.3 avrdude: error: buffered memory access not supported. Maybe it isn't a butterfly/AVR109 but a AVR910 device? avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check. avrdude: error: programmer did not respond to command: leave prog mode avrdude: error: programmer did not respond to command: exit bootloader i hope you can help me to take it look, really thanks

  • @cool-jg2050
    @cool-jg205020 күн бұрын

    I have a question in pycharm I have interpreter 3.10 do I have to check the checkbox code inspections have incompatible with other Python versions then it produces red underlines with like tkinter it says incompatible with Python 2.7 version? Thanks

  • @cool-jg2050
    @cool-jg205020 күн бұрын

    So there is no way to use braces like in Java

  • @jared8411
    @jared841120 күн бұрын

    Thanks, I was trying to learn this from a book and I needed to see it in action.

  • @jakubtybinski9246
    @jakubtybinski924620 күн бұрын

    Pog

  • @oliversheridan-methven8906
    @oliversheridan-methven890621 күн бұрын

    Something comparing submodules with subtrees would be nice.

  • @kmacdowe
    @kmacdowe21 күн бұрын

    Thanks! What kind of keyboard/mouse set up is that? It looks useful.

  • @JorgeAnais
    @JorgeAnais21 күн бұрын

    I typically watch videos at 2x speed, but this time I'm watching at 0.5x speed.

  • @anthonywritescode
    @anthonywritescode21 күн бұрын

    .5x speed but only 5% of the time?

  • @slavapasedko3139
    @slavapasedko313922 күн бұрын

    Hi Anthony. Thank you for such great content. It’s really hard to find intermediate/advanced python topics on youtube because most of the content is created for beginners and there’s no point to watch it if you already have at least some production experience. Keep up the great work. I’d like to ask you to record a video about Python memory management, how to write cpu/ram efficient code, tips & tricks, what to avoid and all python memory-cpu-related stuff, memory leaks, profiling, etc. (I watched a video about preloading & gc.freeze() it was really fun and cool stuff you did.)

  • @anthonywritescode
    @anthonywritescode22 күн бұрын

    it's difficult to pinpoint a strategy specifically -- at least when writing pure python you don't really have much control over it other than not globally caching things forever (and not using buggy C libraries!) -- that said here's a few others I've done about memory (explains videos are collected at github.com/anthonywritescode/explains) - using memray to debug a memory leak in krb5: kzread.info/dash/bejne/lKtpo6qdiqSdlZc.html - don't lru_cache a method: kzread.info/dash/bejne/pYqe1tJvpKrVYMo.html - fixing a 9GB memory leak in cargo: kzread.info/dash/bejne/p6x-yqORlKXSksY.html

  • @senseikoudai6186
    @senseikoudai618622 күн бұрын

    Maybe an obvious question, but why were there two None values in the first place?

  • @slavapasedko3139
    @slavapasedko313922 күн бұрын

    Generator can yield, return and accept value using .send() Hence three typings for each of those possibilities

  • @anthonywritescode
    @anthonywritescode22 күн бұрын

    I cover this in the video linked in the description in more detail as well!

  • @bashirabdelwahed40
    @bashirabdelwahed4023 күн бұрын

    oh finally!!!!!!

  • @hansdietrich1496
    @hansdietrich149623 күн бұрын

    Yeah, that always caused eye cancer.

  • @AceofSpades5757
    @AceofSpades575723 күн бұрын

    That's fantastic. It's ugly and most people don't understand the other 2 anyhow

  • @madhan1926
    @madhan192623 күн бұрын

    Is it possible to achieve git like functionality here? Like creating commit through one api, then using push api to push commits to github.

  • @anthonywritescode
    @anthonywritescode23 күн бұрын

    that is... exactly what this video is?

  • @sillybuttons925
    @sillybuttons92523 күн бұрын

    wow that is great. Always found that annoying.

  • @Quarky_
    @Quarky_23 күн бұрын

    Is there a difference between importing Generator from collections.abc and typing?

  • @iamcurrentlypooping
    @iamcurrentlypooping23 күн бұрын

    typing.Generator is a deprecated alias to collections.abc.Generator

  • @Quarky_
    @Quarky_23 күн бұрын

    @@iamcurrentlypooping thanks! I was recently going through the docs, and I don't recall seeing any deprecation warning, that's why I was confused. Looks I just overlooked it :⁠-⁠P

  • @ArcRCG
    @ArcRCG23 күн бұрын

    This is cool, this decorator-context manager equivalence reflects that a decorator what basically is doing is "managing" the "context" of the wrapped function and that a context manager is basically is "decorating" an annonymous IIFE. One really beautiful abstraction.

  • @bennyyouknow
    @bennyyouknow23 күн бұрын

    Love your energy in this one 😊 Indeed a nice QoL improvement 🎉

  • @kRySt4LGaMeR
    @kRySt4LGaMeR23 күн бұрын

    really cool, but it highlights how foreign type hints are to the core language

  • @bswck
    @bswck23 күн бұрын

    So excited about that change. I often violated the rule of maximum specificity in the return type and simply used a higher-in-hierarchy `Iterator[T]`, which is obviously not an equivalent: it was only suitable for cases where I didn't have to access `.send()`, `.throw()` or `.close()`; but that was the majority of cases. Nevertheless, so cool I can just use `Generator[T]` now. There are lots of other use cases, for example `textual.App[T]` with the `T` defaulting to `None`.

  • @lukajeliciclux3074
    @lukajeliciclux307423 күн бұрын

    YESSSS!!!!! Generator[int,None,None] is just WHY?!

  • @guscardvs
    @guscardvs23 күн бұрын

    This could be true for Coroutine also

  • @anthonywritescode
    @anthonywritescode23 күн бұрын

    indeed! though I'm not sure Coroutine got the same treatment :(

  • @danielmajer1648
    @danielmajer164823 күн бұрын

    Everytime I write something else than python I wish it was python. Unfortunately mypy is still not standard for most of the folks like typescript

  • @ColtinC
    @ColtinC23 күн бұрын

    This is my second favorite hackathon shirt! Eco Hack shirt finally beat it, but still a favorite. Very happy to see you still making these videos! KZread has not put them in my feed for awhile.

  • @DavidDellsperger
    @DavidDellsperger23 күн бұрын

    alternative title: Nerd gets excited he doesn't have to type ", None" as often

  • @anthonywritescode
    @anthonywritescode23 күн бұрын

    it's true!

  • @samuelgunter
    @samuelgunter22 күн бұрын

    @@anthonywritescode isn't it True?

  • @ayhanfuat
    @ayhanfuat23 күн бұрын

    It was so fun to watch you get happy about this. 😀

  • @flamendless
    @flamendless23 күн бұрын

    696.... It is nice

  • @s-h-f
    @s-h-f23 күн бұрын

    Didn't understand much as I am still a beginner. But seems like they get rid of ugly (unnecessary) annotations. Thanks for demo.

  • @bswck
    @bswck23 күн бұрын

    annotations are beautiful, not ugly.

  • @victordvickie
    @victordvickie23 күн бұрын

    I never seen a grown man more happy than this, good addition btw lol