Skip to content

Magenaut

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

python

Search for a file using a wildcard

August 12, 2022 by Magenaut

I want get a list of filenames with a search pattern with a wildcard. Like:

Categories Python, Q&A Tags file, python, wildcard Leave a comment

imshow(img, cmap=cm.gray) shows a white for 128 value

August 12, 2022 by Magenaut

I’m moving from MatLab to python and playing around with the imshow function.

Categories Python, Q&A Tags matplotlib, python Leave a comment

Why Python is so slow for a simple for loop?

August 12, 2022 by Magenaut

We are making some kNN and SVD implementations in Python. Others picked Java. Our execution times are very different. I used cProfile to see where I make mistakes but everything is quite fine actually. Yes, I use numpy also. But I would like to ask simple question.

Categories Python, Q&A Tags jit, performance, python Leave a comment

Scraping dynamic content in a website

August 12, 2022 by Magenaut

I need to scrape news announcements from this website, Link.
The announcements seem to be generated dynamically. They dont appear in the source. I usually use mechanize but I assume it wouldnt work. What can I do for this? I’m ok with python or perl.

Categories Python, Q&A Tags perl, python, web-scraping Leave a comment

“RuntimeError: generator raised StopIteration” every time I try to run app

August 12, 2022 by Magenaut

I am trying to run this code:

Categories Python, Q&A Tags python, python-3.7, python-3.x, runtime-error, stopiteration Leave a comment

python: restarting a loop

August 12, 2022 by Magenaut

i have:

Categories Python, Q&A Tags loops, python Leave a comment

Is there anything faster than dict()?

August 12, 2022 by Magenaut

I need a faster way to store and access around 3GB of k:v pairs. Where k is a string or an integer and v is an np.array() that can be of different shapes.

Categories Python, Q&A Tags dictionary, numpy, python, python-3.x, python-internals Leave a comment

How can I make silent exceptions louder in tkinter?

August 12, 2022 by Magenaut

If I run the following code from a terminal, I get a helpful error message in the terminal:

Categories Python, Q&A Tags exception, python, tkinter, user-interface, warnings Leave a comment

Get all combinations of elements from two lists?

August 12, 2022 by Magenaut

If I have two lists

Categories Python, Q&A Tags pandas, python Leave a comment

Travel directory tree with limited recursion depth

August 12, 2022 by Magenaut

I need to process all files in a directory tree recursively, but with a limited depth.

Categories Python, Q&A Tags directory-structure, os.walk, python, python-3.x, subdirectory Leave a comment
Older posts
Newer posts
← Previous Page1 … Page742 Page743 Page744 … Page830 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