Tag: programming

Coding

Python Learning: Automate Boring Stuff with Python | Chapter 8 : My Solution to Project: Backing Up a Folder into a Zip File

Just my solution to the project I found the solution to the project provided in the book really good, but it zipped the entire folder structure in the absolute path. Something I am not pleased with. By adding the filepath base name to the zipfile.Zipfile.write() function, after the absolute file path (of the file to […]

Coding

Python Learning: Automate Boring Stuff with Python | Chapter 8 : My Solution to Project Multiclipboard

# mcb.pyw : Saves and loads pieces of text to the clipboard # Usage: py.exe mcb.pyw save <keyword> – Saves clipboard to keyword # py.exe mcb.pyw <keyword> – Loads keyword to clipboard # py.exe mcb.pyw list – Loads all keywords to clipboard # py.exe mcb.pyw read <path text file> <keyword> import shelve import pyperclip import […]

Coding

Python Learning: Automate Boring Stuff with Python | Solution to Part II Chapter 7 Practice Project II

import re #first argument – string to be stripped #second argument – char or default ” ” def customStrip(string: str, stripChar: str=”\s”)->str: ”’ Removes specified character from the beginning and end of a given string arguments: string: str stripChar: str returns: string ”’ if stripChar == “” or stripChar == ” “: stripChar = “\s” […]

Coding, JavaScript, Software Development

What I learned today | Functional Javascript: Variables Scope and Closures

Remember the Book: Functional JavaScript   So chapter 3 right?…hm Scopes From my understanding, where a variable lives, while the extent of a scope means how long a variable holds a value. Global Scope This has the longest lifespan when you declare a variable without the var, you are defining a global variable (accessible to […]