jvalleroy.fbx.one is a Fediverse instance that uses the ActivityPub protocol. In other words, users at this host can communicate with people that use software like Mastodon, Pleroma, Friendica, etc. all around the world.

This server runs the snac software and there is no automatic sign-up process.

Admin email
jvalleroy@mailbox.org
Admin account
@james@jvalleroy.fbx.one

Search results for tag #python

[?]Eric Matthes » 🌐
@ehmatthes@fosstodon.org

people, I have a question about names. In the following example, what do you call the first line of this function (everything from `def` through the colon)?

Followup question: When someone refers to the "function definition" does that make you think of the entire function, or just part of it?

def report_observation(bird: str) -> str:
    """Report a birding observation."""
    return f"A {bird} was seen during the count period."

msg = report
print(msg)

Alt...def report_observation(bird: str) -> str: """Report a birding observation.""" return f"A {bird} was seen during the count period." msg = report print(msg)

    [?]Jack William Bell » 🌐
    @jackwilliambell@rustedneuron.com

    I haven't posted much with the or hashtags lately. I need to do something about that.

    > Zero-Dependency Python: Building Tools That Avoid External Libraries. medium.com/@CodeWithHannan/zer

      [?]Jens Kutílek » 🌐
      @jenskutilek@typo.social

      Is there a best practice around setting up a modern Python module repo with pyproject.toml, uv, linting, tox, pytest, coverage, GitHub actions ...? There are so many different approaches, I'm struggling to bring it all together.

        James boosted

        [?]andros » 🌐
        @andros@activity.andros.dev

        Based on the latest tests I've published [1], Django LiveView [2] appears to be the fastest dynamic frontend (I'm sure more variables can be measured). OK...

        How can I test its limits? By drawing a Snake? A Pac-Man?... No... let's crank up the difficulty to Nightmare! Let's run DOOM inside Django 😈

        Django starts ViZDoom and sends one <div> per pixel with its color. The game runs at 100x100 pixels at 60 FPS = 600.000 divs/second! 😵‍💫

        Furthermore, since the data is sent via broadcast, all players can see the same thing in real time.

        Crazy

        [1] https://github.com/tanrax/django-interactive-frameworks-benchmark
        [2] https://django-liveview.andros.dev/

        #django #python #doom

          0 ★ 0 ↺

          [?]James [he/him] » 🌐
          @james@jvalleroy.fbx.one

          uv also provides a command "uvx", which is an alias for "uv tool run". You can use this to run tools like the ruff formatter/linter.

          But note that tools installed using uvx do not have access to the dependencies of your project. They are run in a separate environment with only their own dependencies installed. So for things that need to import the project's dependencies, such as pytest or mypy, you will need to use "uv run ..." instead of uvx.


            [?]Joseph Nuthalapati :fbx: » 🌐
            @njoseph@social.masto.host

            There was a time when I wrote Scala function names in Telugu, because it allowed full Unicode support.

            Felienne Hermans, a professor from Netherlands implemented a subset of in various natural languages for teaching programming to 12 year-old children. It's called Hedy.

            corecursive.com/hedy-with-feli

            I think it's a great step in the direction of decolonializing computer programming.

            Does computer programming have colonial values baked in? It's not something we give much though to. 🤔

              4 ★ 2 ↺

              [?]James [he/him] » 🌐
              @james@jvalleroy.fbx.one

              For my latest (personal) Python project, I'm using:
              • uv for package management
              • pytest
              • ruff for linting and formatting

                James boosted

                [?]Joseph Nuthalapati :fbx: » 🌐
                @njoseph@social.masto.host

                Using Python uv tool as a replacement for Poetry for a small Python utility I'm writing. It feels a lot like Rust's Cargo.

                All that I can say for now is that it is certainly a better experience than setting up a virtualenv manually.

                I am writing this proprietary tool for a team of JavaScript developers. I think they will feel that it is just as easy to use as npm/yarn or whatever is the new hotness this week.