Quick Tips
Python Shortcuts
*args and **kwargs Combine lists with zip() For Else and While Else Inline conditions Unpack a collection of items and assign them to variables Assign multiple variables in one line Initialize a collection in one line Itertools
How to Create a Table of Contents in Jupyter Notebooks
Create a markdown link as usual; but set its destination as a # sign and the id you will assign to the target text, as you would in an HTML link. Then put any HTML tag around the text where your link should go, and give it an id: So yes, you can use some…
How to Create HTML and PDF Files from Jupyter Notebooks
Converting to HTML You can convert the notebook named test.ipynb to HTML using the following command: Converting to PDF You can convert the notebook named test.ipynb to PDF using the following command: If you get an error saying “Please check that pandoc is installed”, you’ll need to install it by: Hiding the Code If you…
Data Sources for Data Science Projects
1. UC Irvine Machine Learning Repository They provide ~600 datasets for machine learning applications. 2. Airbnb They provide datasets by cities that include pricing, listing details, reviews. 3. Zillow Housing Data Zillow provides their “typical home value” measures by region and housing types. They also provide a forecast dataset.
How to Enable the Context Menu Option “Open Folder as a VSCode Project” on Windows
Problem I generally like to keep my context menu clean and don’t allow any programs to add additional items. That’s what I did while installing VSCode only to realize it would be very useful to be able to right-click on a folder and open it in VSCode from there as below. I could reinstall it…
How to Solve “File [scriptName].ps1 cannot be loaded because running scripts is disabled on this system.” Error on Windows
Open the PowerShell as an administrator and run: Source: https://stackoverflow.com/a/4038991/1937377
Running Solver Silently and Handling Its Responses with VBA
UserFinish:=True option runs solver silently. You can assign SolverSolve to a variable: Then evaluate the “answer”: Source
How to Backdate Git Commits
Changing Dates for the Most Recent Commit You can backdate the author date and commit date of your last commit and then push it. To change the author date: To change the commit date: See both dates of the commits: Push If you have the commit pushed to remote, you will need to force push…
How to Use ddclient to Update Dynamic DNS Settings on Google Domains
If you are running a web server, VPN, or any other device at home which you want to access over the internet using a domain or subdomain name, you either need a static IP address (which many ISPs do not provide or charge extra for) or you will need a Dynamic DNS setup that changes your DNS records every time your IP address changes.
How to Mount a Windows Network Drive On Boot as Systemd Service on Ubuntu
Assuming you want to mount 192.168.1.9/files to /home/username/files, create a file matching the name of your local directory where you want to mount to as below: Its content should be the following with the remote (assuming you want 755 file permissions): Then create another file with the same name but with automount extension: Add this…