Mengqi's Tech Land


  • Home

  • Archives

  • Tags

[Reading Notes] Effective Python | Part II

Posted on 2020-11-11 |

Notes

cont’d

6. Metaclasses and Attributes

  • A class decorator is a simple function that receives a class instance as a parameter and returns either a new class or a modified version of the original class

This could be best practice unless it breaks class API contract, since decorator is easily interchangeable and the details are hidden from class code. So user can easily observe no compatible upgrades w/o notice.

Read more »

[Reading Notes] Effective Python | Part I

Posted on 2020-11-11 |

Introduction

About This Book

Title: Effective Python: 90 Specific Ways to Write Better Python, 2nd Edition

Authors: Brett Slatkin

Overview

This book introduces many features and libraries for modern Python, and tries to organize them by their helpfulness. Some of them I found especially helpful when trying to draw object hierarchy, define API boundaries, and normalize memory management strategies.

Given it’s a lengthy note, I’d divided it to two parts. I’ll first publish all my in-place notes, then based on my availiability, I’d add small comments on my opinions.

Read more »

Enabling Pycharm remote debugging in VirtualBox VMs

Posted on 2018-02-08 |

Set up port forwarding on Virtual box VM network setting

  • stop the vm if already running
  • in network setting, under NAT, click port forwarding
  • create forwarding rule to link port 22 in guest to arbitrary your-port-number (e.g. 2222) in host, & leave other columns blank
  • save configs, test by:
  • start the vm instance
  • ping 127.0.0.1:<your-port-number>

If using connecting to VM on remote server

  • make sure open the port with firewall rule
  • e.g. in CentOS
  • sudo firewall-cmd --zone=public --add-port=<your-port-number>/tcp --permanent

Enable remote debugging on PyCharm

  • under Tools -> deployment -> configurations, add sftp
  • put remote-ip-address as the address, host port configured in previous step as port, alongside with other configurations necessary
  • test in configuration setup page
Read more »

Site Released

Posted on 2017-02-03 |

Today my site is finally released. I've been considering writing my own blog starting from last semester. However, the effort failed at that time due to heavy loads of job hunting and semester long projects. Now that everything is settled, it is possible to launch this site.

Main purpose for this site is to share some insights, ideas, and notes on my professional interest, not limited to Software Engineering, Computer Science, and Data Science. Blog provides with a relatively large space for detailed logical explaination. It is also my hope that through such format can I express myself clearly and carefully. Hope anyone read my blog learn something, and exchange thoughts with me. I'm more than glad to discuss with you.

Another purpose is to have the most fundamental ideas on front-end. Those ideas require frequent practices to be prefect. For an entry level SE personnel, it's more than vital to have a routine practices.

This site includes a brief bio, a slightly out-of-date resume, and most importantly, blogs. Future iteration may include brief intro on my git repos, prettified format, etc.

The site is managed by Jekyll. Credit to this tutorial.

Around 15:00 PT from Culver City, CA

Read more »
Mengqi Wang

Mengqi Wang

4 posts
RSS
GitHub LinkedIn
© 2017 - 2020 Mengqi Wang
Powered by Jekyll
Theme - NexT.Pisces