Skip Navigation
Python Big O: the time complexities of different data structures in Python
www.pythonmorsels.com Python Big O: the time complexities of different data structures in Python

The time complexity of common operations on Python's many data structures.

Python Big O: the time complexities of different data structures in Python

Trey Hunner writes:

> This article is primarily meant to act as a Python time complexity cheat sheet for those who already understand what time complexity is and how the time complexity of an operation might affect your code. For a more thorough explanation of time complexity see Ned Batchelder's article/talk on this subject.

Read Python Big O: the time complexities of different data structures in Python

4
Vercel completes $250 mln Series E round at $3.25 bln valuation
  • Does this mean that they're going to stop funding the development of Next.js and Sveltekit?

  • NeoVim 0.10 Released!
  • Lots of breaking changes. It seems like all of the changes are breaking something according to these release notes.

  • ???
  • I'm not saying that $150/hr is a reasonable floor for your situation. I'm saying that $150/hr is not out of line with what other contractors charge in large metro areas.

  • ???
  • You shouldn't be negotiating a fee until you have found out what they want you to build, fix, or update. You need to asses how valuable that project is to them, then charge accordingly. Set a floor for yourself and walk away from the deal if they value the project lower than your floor.

    If you're in a major metro area $150/hr isn't bad.

  • Raspberry Pi Ltd is considering an IPO
  • I hope this brings economies of scale that bringe better value to customers, but I fear it will bring a shortsighted mindset that will reduce value for customers.

    I hope employees get some benefit of the IPO windfall too.

  • Start learning at 50
  • Should be Scrimba.com

  • Start learning at 50
  • Languages that caught my attention were Julia, Clojure and Go.

    What about these languages caught your attention?

    What are some good resources for someone like me who likes to learn by doing things?

    Check out https://inventwithpython.com/

  • How being FOSS fan/advocate annoy you at work/school?
  • Every job has parts that you don't like. You need to learn the skills that you get paid to use or find someone to pay you for the skills you have.

    Linux is as frustrating to someone that has built up a skill set with Windows centric knowledge base.

  • Your backend is too complicated | Using Gleam to Simplify Your Backend

    Isaac Harris-Holt writes:

    > Modern software engineering can be a bit of a nightmare. You've got all these different third-party services to keep track of, and often many first-party microservices too! As it turns out, things can be made more simple using Gleam. Let me show you how.

    0
    Cmdline - Neovim docs | Command-line window | In the command-line window the command line can be edited just like editing text in any window.
    neovim.io Cmdline - Neovim docs

    Neovim user documentation

    In the command-line window the command line can be edited just like editing text in any window. It is a special kind of window, because you cannot leave it in a normal way.

    There are two ways to open the command-line window:

    1. From Command-line mode, use the key specified with the 'cedit' option (default CTRL-F).

    2. From Normal mode, use the "q:", "q/" or "q?" command.

    • This starts editing an Ex command-line ("q:") or search string ("q/" or "q?"). Note that this is not possible while recording is in progress (the "q" stops recording then).

    When the window opens it is filled with the command-line history. The last line contains the command as typed so far. The left column will show a character that indicates the type of command-line being edited

    0
    Do you use Firefox Sync? Why or why not?
  • I used to use that until I noticed that all open tabs for all logged in sessions are easily accessible through the menu or the "Firefox View"

  • Featured
    A Blog to Satisfy Your Monthly COSMIC Fix(es)
  • Pop!_OS is going to stand out with this new desktop environment. System76 is clearly giving it enough attention to make it as good or better than other Linux desktop environments.

  • What projects should I do to gain applied development skills?
  • If your goal is to complete a task, then using what exists is typically the best path. But that's not the only goal to strive for.

  • The search for easier safe systems programming (blog post + language)
  • This seems to address the criticisms people have with using rust for prototyping. Simplifying the mental model of lifetimes and ownership, incorporating what amounts to a manually called garbage collector, and making the level of compiler enforced strictness flexible for different phases of development all sounds promising. I look forward to what this project develops into and what use of the language reveals about software development.

  • Filling in gaps in the Overview documentation on odin-lang.org

    I'm sharing this Discord Message from someone that was doing their best to fill in their gaps in understanding Odin after reading the Overview documentation on odin-lang.org.

    > This was somewhat confusing, I could change the package foo at the top of the file and it makes no difference and everything works. > > From reading this Server, I learned a lot, like this: > > - 1 - The package is only linked to the directory name (folder) and nothing else, except; > - 2 - The files in the package directory must all have the same package foo header with the same name, but it does not have to be the same as the package directory name, just unique (see below); and > - 3 - No two packages can have the same directory/folder name (globaly unique); and > - 4 - No two packages can have the same package foo header names (i.e., must be globally unique but not tied to any package (directory) name needed - but would be a good idea, I mean why not...); > - 5 - You cannot have cyclical imports - ever; > - 6 - The package foo header seems powerless for the most part as far as programmer use, but I read it is used by the ABI as a prefix for symbols in the final binary; > - 7 - Sub-packages do not exist, so even nested directories are standalone packages and also do not infer dependence; > - 8 - In Odin you should put as much in one package as possible and do not use packages for namespaces since it will not work (see using) and do not use packages to organize your files, see 9 for proper reason to use packages; > - 9 - Use separate packages only as reusable (stand alone) libraries; > - 10 - Organize files within a package directory by their filenames (ala Java) and not subdirectors for all the reasons above; which is what I will do using snake case for the file names. > > If I blew it above let me know. > > imho the Overview would do better to include a little more detail like some of the stuff above. When I searched this server I found a huge amount of the above and just cobbled it together from 6-7 posts. I think what was not clear from the overview was: 1, 5, 6, 7 (its there but not clear), 9. It is clear that many people are confused by this, but on the bright side searching the Discord was very useful.

    gingerBill indicated this is a common source of confusion for newcomers to Odin: > package name has nothing to do with the thing you import. > > This is probably one of the most confusing things about Odin's packages. The exist for stable ABI and consistent linking names.

    Hopefully, I can create a minimum working example that can be illustrative for others and have a PR merged into the Overview documentation. Until then I just want something that can be found outside of Discord for other learners.

    0
    How do you handle family requests that you disagree with?
  • You can use this as an opportunity to have a conversation about what it is about those movies that she likes. This could open up to a larger conversation where you can connect and grow your relationship as mother and child. Or she might just say something vague and simple and you can ignore the movies while they sit in a separate library.

  • Defaulting to Zero · Our Machinery | Niklas Gray | Archived 1 Jul 2017

    Niklas Gray writes:

    > I often find that when I work on the low level implementation of something I discover ideas that I can bring back and use to inform the high level design — to make it easier to work with, more performant, more orthogonal, etc. Thus, the flow goes back and forth from high-level to low-level, instead of just in one direction. If I’m stuck in some part of the high-level design, starting to work on the implementation is often the best way to get unstuck. > > One such idea, which is really simple, but tends to lead to better and simpler code, is the idea of defaulting to zero. I.e. to always use 0 as the default or nil value. For example...

    Read Defaulting to Zero

    0
    Preview builds for the Zed editor now available on Linux
  • In that case, why aren't you using any other editor that can do the same? Why not just use VSCode?

  • Multicollinearity in Logistic Regression Models : Anesthesia & Analgesia

    Bayman, Emine Ozgur PhD*; Dexter, Franklin MD, PhD, FASA†. Multicollinearity in Logistic Regression Models. Anesthesia & Analgesia 133(2):p 362-365, August 2021. | DOI: 10.1213/ANE.0000000000005593

    0
    Possibly stupid question: is automated testing actually a common practice?
  • Maybe it's time to start looking at other employers. The culture there doesn't seem to fit with your values.

  • North Yorkshire Council to phase out apostrophe use on street signs
  • "All punctuation will be considered but avoided where possible because street names and addresses, when stored in databases, must meet the standards set out in BS7666.

    "This restricts the use of punctuation marks and special characters (e.g. apostrophes, hyphens and ampersands) to avoid potential problems when searching the databases as these characters have specific meanings in computer systems."

    This seems like a dumb line of reasoning. The problem has never been the signs or punctuation in a database. It's that the people in charge don't even know what BS7666 even says.

  • Possibly stupid question: is automated testing actually a common practice?
  • You mean things going over estimates or SM/EM complaining about it?

    The combination is bad.

    Whenever I argue ... , I quickly “lose”,

    If you see it as an argument, you're not going to make headway. I would also question your assumption that you are correct about what their terms are. By this, I mean are you sure you understand what they value and prioritize? People often say that something is important, but show that something else is even more important.

    If I want any meaningful change, I think it will need to be be something I work around management on.

    It may need to start that way, but getting the team to buy in will take building trust. Which might be eroded down due to the consistent failure to meet estimates.

  • Possibly stupid question: is automated testing actually a common practice?
  • scrum master and managers are already constantly complaining about everything going over estimates

    This is a bigger problem than tests.

    I just don’t really know how to advocate for this without looking like an annoying asshole, after trying for so long.

    You're presenting a solution for a problem that the team either does not see as important or doesn't think exists at all.

    You need to demonstrate the value the solution can bring to them on their terms.

  • Jeremy Soller 🦀 (@soller@fosstodon.org) | Is reaching out to the KDE developer community to assist in planning interoperability between COSMIC, Plasma and KDE.
    fosstodon.org Jeremy Soller 🦀 (@soller@fosstodon.org)

    If you are a #KDE developer, I want to talk to you about: - How can COSMIC apps better fit in when running a Plasma session - How can KDE apps better fit in when running a COSMIC session Please feel free to reply or DM!

    Jeremy Soller 🦀 (@soller@fosstodon.org) [System76 Principal engineer, Pop!_OS Maintainer, and Redox OS BDFL] writes:

    > If you are a #KDE developer, I want to talk to you about: > > - How can COSMIC apps better fit in when running a Plasma session > - How can KDE apps better fit in when running a COSMIC session

    1
    POSETTE: An Event for Postgres 2024 | 3rd annual virtual event organized by the Postgres team at Microsoft | 48 Hours of Virtual Presentations and Meetings Starting Tue, June 11 @ 3:00 PM UTC
    www.citusdata.com POSETTE: An Event for Postgres 2024

    Join us at POSETTE: An Event for Postgres (formerly Citus Con), a virtual and free developer event happening on Jun 11-13, 2024. Come learn what you can do with the world’s most advanced open source relational database—from the nerdy to the sublime. Organized by the Postgres team at Microsoft.

    POSETTE: An Event for Postgres 2024
    0
    POSETTE: An Event for Postgres 2024 | 3rd annual virtual event organized by the Postgres team at Microsoft | 48 Hours of Virtual Presentations and Meetings Starting Tue, June 11 @ 3:00 PM UTC
    www.citusdata.com POSETTE: An Event for Postgres 2024

    Join us at POSETTE: An Event for Postgres (formerly Citus Con), a virtual and free developer event happening on Jun 11-13, 2024. Come learn what you can do with the world’s most advanced open source relational database—from the nerdy to the sublime. Organized by the Postgres team at Microsoft.

    POSETTE: An Event for Postgres 2024
    0
    What's with all of the empty communities being created?

    Recently, every time I click on a "Trending Communities" link there's an entirely empty community moderated by the @Vacant@programming.dev account.

    What's going on?

    What's the motivation?

    9
    Fedify: ActivityPub server framework
    fedify.dev Fedify

    Fedify is a TypeScript library for building federated server apps powered by ActivityPub and other standards, so-called fediverse.

    Fedify

    cross-posted from: https://lemmy.ml/post/14845042

    > Fedify is an ActivityPub server framework in TypeScript & JavaScript. It aims to eliminate the complexity and redundant boilerplate code when building a federated server app, so that you can focus on your business logic and user experience. > > The key features it provides currently are: > > - Type-safe objects for Activity Vocabulary (including some vendor-specific extensions) > - WebFinger client and server > - HTTP Signatures > - Middleware for handling webhooks > - NodeInfo protocol > - Node.js, Deno, and Bun support > > If you're curious, take a look at the Fedify website! There's comprehensive docs, a demo, a tutorial, example code, and more.

    0
    Configuring NeoVim as a Python IDE (2023) | Siddharta Govindaraj | Sun 07 May 2023
    www.siddharta.me Configuring NeoVim as a Python IDE (2023)

    As I blogged about in the previous two articles, I recently updated my NeoVim configuration for the fourth time. Although it might sound like a...

    Siddharta Govindaraj writes:

    > As I blogged about in the previous two articles, I recently updated my NeoVim configuration for the fourth time. Although it might sound like a lot of config updates, keep in mind that it happened over a period of four years. > >- The first version was a port of my existing Vim configuration. Because NeoVim is backward compatible with Vim, you can just move the configuration over and it will work >- In the second version, I migrated my plugin manager to Packer. This config was a mix of old style Vim config and the newer NeoVim style with some plugins migrated to Lua equivalents >- Then I decided to go 100% Lua config and started using Kickstart.nvim and LazyVim. >- This fourth time around I used Kickstart and LazyVim as guides to write my own from scratch. > > You can find my NeoVim configuration on Github. > > In this article I am going to go through and explain my configuration step-by-step. I have a terrible memory, so this post will also serve as a guide when I inevitably need to look through this file in the future.

    Read Configuring NeoVim as a Python IDE (2023)

    0
    Configuring NeoVim as a Python IDE (2023) | Siddharta Govindaraj | Sun 07 May 2023
    www.siddharta.me Configuring NeoVim as a Python IDE (2023)

    As I blogged about in the previous two articles, I recently updated my NeoVim configuration for the fourth time. Although it might sound like a...

    Siddharta Govindaraj writes:

    > As I blogged about in the previous two articles, I recently updated my NeoVim configuration for the fourth time. Although it might sound like a lot of config updates, keep in mind that it happened over a period of four years. > >- The first version was a port of my existing Vim configuration. Because NeoVim is backward compatible with Vim, you can just move the configuration over and it will work >- In the second version, I migrated my plugin manager to Packer. This config was a mix of old style Vim config and the newer NeoVim style with some plugins migrated to Lua equivalents >- Then I decided to go 100% Lua config and started using Kickstart.nvim and LazyVim. >- This fourth time around I used Kickstart and LazyVim as guides to write my own from scratch. > > You can find my NeoVim configuration on Github. > > In this article I am going to go through and explain my configuration step-by-step. I have a terrible memory, so this post will also serve as a guide when I inevitably need to look through this file in the future.

    Read Configuring NeoVim as a Python IDE (2023)

    0
    ericjmorey ericjmorey @programming.dev

    Data Science

    Posts 212
    Comments 516
    Moderates