16 November 2022
Webscraping of JavaScript Pages using a combination of Selenium & Beautiful Soup
15 November 2022
Intro to Python logging module - An alternative to print() function
Logging is generally used to debug our Python code. Many of us (like me) have a habit of using the print() function extensively during the development of a program. Nothing bad in that per se, just that when we want to promote this program to the production environment we must necessarily remove the print() statements.
There are other reasons too why the print statement is not recommended and its better to use the logging module:
- The print statement works only if we have access to the console
- We have no mechanism to write the print statements to a text file for further perusal
08 May 2022
pdb - The Python Debugger / breakpoint
breakpoint versus pdb
import pdb pdb.set_trace()
breakpoint() # in python 3.7 and above
27 March 2021
Create a Watchdog in Python
What is Watchdog in Python
Step 1: Import some Stuff
import os import time from watchdog.observers import Observer from watchdog.events import PatternMatchingEventHandler
Step 2: Create the event handler
if __name__ == "__main__": # patterns = "*" # the file patterns we want to handle patterns = "*.csv" # choose only csv files ignore_patterns = "" ignore_directories = True case_sensitive = True # Create the event handler my_event_handler = PatternMatchingEventHandler(patterns, ignore_patterns, ignore_directories, case_sensitive)
20 March 2021
Installation of WordPress on localhost
Why install wordpress.org locally on your computer?
Note: If you install WordPress locally on Windows, then the only person who can see that site is you. If you want to make a website that is available to the public, then you need to have a domain name and web hosting.
What do I need for running wordpress.org locally on my computer?
14 March 2021
A Primer to ib_insync - Interactive Brokers Part 8
Why ib_insync ?
Pls. note that ib_insync is very different from the TWS API provided by IB. The TWS API is the official API created by IB while ib_insync is created by a team of individuals headed by Guru Ji Ewald de Wit
08 March 2021
Developing a Trading System for TWS API - Interactive Brokers Part 7
What is a trading system?
What are the elements of a full fledged trading system that can be deployed in Production?
- An Entry Point
- A Stop Loss / Trailing Stop Loss
- An Exit Point