Chadrick's Blog

  • Posts

python

python

python interrupt, sigterm, sigkill, exception handling experiments

When thinking both Exceptions and interrupts at the same time, things can get confusing so here I write down some simple experiments that I did to clear some confusing concepts.

(more…)
By admin, 7 months7 months ago
python

web scraping many pdf files from websites for dataset preparation using python

There are good websites which store a lot of pdf files that can be used for data. However, it can be quite difficult to automate the downloading process with a simple web scraping tool because the data download url that the user wants resides behind another webpage. I will use IMF website for example.

(more…)
By chadrick_author, 9 months9 months ago
python

get git short hash in python

By chadrick_author, 1 year1 year ago
python

list of python double underscores

https://docs.python.org/3/reference/datamodel.html

By chadrick_author, 1 year ago
python

get rotation angle between two vectors

Getting the angle between two vectors is well known. But finding the ‘rotation angle’ from one vector to another needs a bit more consideration. The following functions can handle this. This function will use cross product between two vectors to identify if the rotation direction is CW or CCW. This Read more…

By chadrick_author, 2 years2 years ago
python

visual code python debugging configuration

creating the most basic launch.json file is explained well in official docs. changing execution path However what I really wanted to know was how to configure it to make it run debugging on a file from a specific directory path. For example, I have a workspace structure like this. And Read more…

By chadrick_author, 2 years2 years ago
python

adding pip config file in virtualenv

after creating a virtualenv, one can setup pip.conf file right inside the created virtualenv directory. Here’s an example An example of pip.conf that I use commonly is shown below. The “index-url” may not be necessary since it is the default value, but in case it is overwritten by the system Read more…

By chadrick_author, 2 years ago
python

apply proxy settings to python requests

you can apply proxy settings to python requests like this:

By chadrick_author, 2 years2 years ago
python

reading yaml files in python

instlal PyYAML in python file, load file like the following the data in yaml file will be saved in data variable as a python dict.

By chadrick_author, 2 years2 years ago
python

python encode string to percent encoded(urlencode) format

reference: https://www.urlencoder.io/python/

By chadrick_author, 2 years ago

Posts navigation

1 2 … 5 Next
Recent Posts
  • fix blank plot when using plotly in jupyter lab
  • pylance stuck on “Searching for source files”
  • paper review: “Graph Attention Networks”
  • fix “Certificate verification failed” error in apt update of docker container
  • fixing “Could not handshake: An unexpected TLS packet was received” error while apt update in docker container behind corporate proxy
Categories
  • algorithm
  • c/c++
  • cuda
  • data science
  • deep learning
  • error fix
  • kicad
  • kotlin
  • linux
  • postgres
  • python
  • pytorch
  • tensorflow
  • Uncategorized
  • web
Recent Comments
  • Andrew Mellinger on python implementation of rotating caliper algorithm
  • minhln14 on get rotation angle between two vectors
  • Anonymous on fix ‘certificate apiserver-kubelet-client not signed by CA certificate ca: crypto/rsa: verification error’ error during minikube start
  • Kartik on fix ‘certificate apiserver-kubelet-client not signed by CA certificate ca: crypto/rsa: verification error’ error during minikube start
  • radu on ssh local port forwarding and error fix for “channel 3: open failed: connect failed: Connection refused”
Archives
  • September 2022
  • July 2022
  • June 2022
  • May 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • 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