Chadrick's Blog

  • Posts

python

python

matplotlib draw heatmap figure with colorbar

here is the sample code for drawing a single axis in a figure. The above is the result. I have tried to create several subplots and add heatmap to each one with individual colorbars on its side, but it seems this is hard to implement.

By chadrick_author, 3 weeks3 weeks ago
python

None index in python list?

while looking through some deep learning implementation code, I found some strange list indexing in python code. Here is an example. It was using None as an index when indexing a python object. First I thought is this indexing None on a python list and tested it. But it gave Read more…

By admin, 3 months3 months ago
python

various properties of cairo `text_extent`

when using cairo with python, the text_extent function call is powerful because it returns coordinate information of the text the user wants to print. However, the information depends on the Context which will be used when calling this function and this context may have different properties. Effected by order of Read more…

By chadrick_author, 3 months ago
python

python operator precedence

https://docs.python.org/3/reference/expressions.html#operator-precedence

By chadrick_author, 4 months ago
error fix

allowing utf8 characters in python csv writer

reference: https://stackoverflow.com/questions/46551955/python-3-csv-utf-8-encoding do this at the start of csv writer to ad BOM

By chadrick_author, 4 months ago
algorithm

python implementation of rotating caliper algorithm

Rotating caliper algorithm is used to find a rectangle that fits a convex hull. Below is a python implementation that finds all rotated rectangles for a given convex hull points. It is up to the user to select which rectangle to use since it returns all possible rotating caliper rectangles. Read more…

By chadrick_author, 7 months ago
error fix

error fix: “OpenBLAS blas_thread_init: pthread_create failed for thread 27 of 36: Resource temporarily unavailable”

Problem When I tried to run a python script using numpy, it gave the following error. Solution found a solution from here from the shell, execute the following

By chadrick_author, 7 months7 months ago
python

python script to convert dir or file of image to png

here is a simple code to convert dir/file of images to png in batch. for installing imagemagick, use this command:

By chadrick_author, 11 months ago
python

get attribute/inner html of html element in python selenium

If we had the following html, we can extract ‘value’ attribute and innerhtml with the following sample python code.

By admin, 11 months11 months ago
python

set pip config file in windows and basic configurations

Setup create pip.ini file in C:\Users\Username\pip directory. This directory may not exist, if so, then create one manually. here are some common configurations that I add to the config file. if multiple values should be set for one key, add a space between items like I did with trusted-host. check Read more…

By chadrick_author, 11 months11 months ago

Posts navigation

1 2 … 4 Next
Recent Posts
  • is it okay to calculate loss in cpu and backpropagate in torch?
  • paper review: “High-Performance Large-Scale Image Recognition Without Normalization”
  • gitignore ignore config files except sample config file
  • convert subquery columns into array of json objects
  • postgres database backup and restoring
Categories
  • algorithm
  • c/c++
  • cuda
  • data science
  • deep learning
  • error fix
  • kicad
  • kotlin
  • linux
  • postgres
  • python
  • pytorch
  • tensorflow
  • Uncategorized
  • web
Recent Comments
  • Anonymous on solving “‘grub-efi-amd64-signed’ package failed to install into /target/.” error while installing ubuntu 20.04
  • Anonymous on how to install cudnn(from tar file)
  • Vaishal on solving “‘grub-efi-amd64-signed’ package failed to install into /target/.” error while installing ubuntu 20.04
  • Anonymous on paper review: Intriguing properties of neural networks (getting adversarial samples using L-BGFS method)
  • Shraddha on cv2 resize interpolation methods
Archives
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
Meta
  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
  • Posts
Hestia | Developed by ThemeIsle