Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

data-structures

.Net Dictionary out of memory exception at around 6,000,000 entries

August 29, 2022 by Magenaut

I am using a Dictionary<Int,Int> to store the frequency of colors in an image, where the key is the the color (as an int), and the value is the number of times the color has been found in the image.

Categories ASP.NET, Q&A Tags .net, asp.net, c#, data-structures Leave a comment

Splitting list in Python if two elements are next to each other

August 22, 2022 by Magenaut

how can i split a list based on neighboring elements, so if i have a list such as

Categories Python, Q&A Tags data-structures, list, python Leave a comment

What is the difference between Python’s list methods append and extend?

August 22, 2022 by Magenaut

Perfect answer, I just miss the timing of comparing adding only one element

Categories Python, Q&A Tags append, data-structures, extend, list, python Leave a comment

How do I sort a list of dictionaries by a value of the dictionary?

August 22, 2022 by Magenaut

How do I sort a list of dictionaries by a specific key’s value? Given:

Categories Python, Q&A Tags data-structures, dictionary, list, python, sorting Leave a comment

What is the best way to implement nested dictionaries?

August 22, 2022 by Magenaut

I have a data structure which essentially amounts to a nested dictionary. Let’s say it looks like this:

Categories Python, Q&A Tags autovivification, data-structures, dictionary, mapping, python Leave a comment

Python Sets vs Lists

August 20, 2022 by Magenaut

In Python, which data structure is more efficient/speedy? Assuming that order is not important to me and I would be checking for duplicates anyway, is a Python set slower than a Python list?

Categories Python, Q&A Tags data-structures, list, performance, python, set Leave a comment

How is set() implemented?

August 20, 2022 by Magenaut

I’ve seen people say that set objects in python have O(1) membership-checking. How are they implemented internally to allow this? What sort of data structure does it use? What other implications does that implementation have?

Categories Python, Q&A Tags cpython, data-structures, python, set Leave a comment

What would a “frozen dict” be?

August 19, 2022 by Magenaut

frozendict(dict_obj): Accepts obj of dict type and returns a hashable and immutable dict

Categories Python, Q&A Tags data-structures, dictionary, immutability, python Leave a comment

In Python, when to use a Dictionary, List or Set?

August 19, 2022 by Magenaut

When should I use a dictionary, list or set?

Categories Python, Q&A Tags data-structures, dictionary, list, python, set Leave a comment

Hashable, immutable

August 18, 2022 by Magenaut

From a recent SO question (see Create a dictionary in python which is indexed by lists) I realized I probably had a wrong conception of the meaning of hashable and immutable objects in python.

Categories Python, Q&A Tags data-structures, hash, immutability, python Leave a comment
Older posts
Page1 Page2 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress