Skip to content

Magenaut

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

python

TransactionManagementError “You can’t execute queries until the end of the ‘atomic’ block” while using signals, but only during Unit Testing

August 14, 2022 by Magenaut

I am getting TransactionManagementError when trying to save a Django User model instance and in its post_save signal, I’m saving some models that have the user as the foreign key.

Categories Python, Q&A Tags django, django-signals, python, unit-testing Leave a comment

Add multiple empty columns to pandas DataFrame

August 14, 2022 by Magenaut

How do I add multiple empty columns to a DataFrame from a list?

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

Django 1.7 – makemigrations not detecting changes

August 14, 2022 by Magenaut

As the title says, I can’t seem to get migrations working.

Categories Python, Q&A Tags django, django-1.7, django-migrations, python Leave a comment

Python & Ctypes: Passing a struct to a function as a pointer to get back data

August 14, 2022 by Magenaut

I’ve looked through other answers but can’t seem to get this to work. I’m trying to call a function within a DLL for communicating with SMBus devices. This function takes a pointer to a struct, which has an array as one of it’s fields. so…

Categories Python, Q&A Tags ctypes, pointers, python, struct Leave a comment

Filtering os.walk() dirs and files

August 14, 2022 by Magenaut

I’m looking for a way to include/exclude files patterns and exclude directories from a os.walk() call.

Categories Python, Q&A Tags filtering, os.walk, python Leave a comment

Can’t use SURF, SIFT in OpenCV

August 14, 2022 by Magenaut

I’m trying a simple thing like

Categories Python, Q&A Tags opencv, python, sift, surf Leave a comment

Unittest setUp/tearDown for several tests

August 14, 2022 by Magenaut

Is there a function that is fired at the beginning/end of a scenario of tests? The functions setUp and tearDown are fired before/after every single test.

Categories Python, Q&A Tags python, unit-testing Leave a comment

Sort filenames in directory in ascending order

August 14, 2022 by Magenaut

I have a directory with jpgs and other files in it.

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

AttributeError: ‘datetime’ module has no attribute ‘strptime’

August 14, 2022 by Magenaut

Here is my Transaction class:

Categories Python, Q&A Tags class, python, python-2.7 Leave a comment

How to remove lines in a Matplotlib plot

August 14, 2022 by Magenaut

How can I remove a line (or lines) of a matplotlib axes in such a way as it actually gets garbage collected and releases the memory back? The below code appears to delete the line, but never releases the memory (even with explicit calls to gc.collect())

Categories Python, Q&A Tags matplotlib, plot, python Leave a comment
Older posts
Newer posts
← Previous Page1 … Page647 Page648 Page649 … 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