Programming Portfolio
AutoDesk | Windows - MacOS - Linux | C++ & Python
AutoDesk is available in C++ and Python-based solutions that allows a Windows or MacOS (Python) Desktop to function as a Dropbox for various file types such as documents, music, pictures, and videos. The tool automatically sorts files based on their extensions and moves them into the appropriate folders for Documents, Music, Pictures, and Videos, which are all located within a folder that is labeled with the year of the file's last modification date. The program also generates a new year folder if one does not already exist. The AutoDesk program ensures that no files are overwritten, instead appending a numerical count to the end of the filename, beginning at one, to ensure each file maintains its unique identity. The tool automatically runs at a thirty-seconds interval for optimal efficiency.
This functionality is achieved through: "AutoDesk.py/cpp", "ProcDocumentFiles.py/cpp", "ProcMusicFiles.py/cpp", "ProcPictureFiles.py/cpp", and "ProcVideoFiles.py/cpp". "AutoDesk.py/cpp" is the main file, which calls on the four "Process*" classes to move picture, document, music, and video files to their respective directories. "ProcDocumentFiles.py/cpp" is one of these four classes, which is used to process document files. Within "ProcDocumentFiles.py/cpp", the various methods accomplish this functionality, such as setting the key paths for the user's Desktop and Documents folders and creating a new year folder if one does not already exist. The "process_files" method/function creates a list of document files on the Desktop, extracts the year of last modification, creates the year folder within the Documents folder, renames the file with a new name, and moves the file to the appropriate year folder. The user interface is provided by the "AutoDesk.py/cpp" file, where a new thread is created to call the "process_files" methods/functions for each class, while the user interface provides a generalized explanation of the AutoDesk program and options to exit the program.
NOTE: I have implemented the code to handle file extensions of various lengths, including two, three, four, and five characters. However, in the current version of the code, the array/list of supported file extensions only includes the most commonly used ~15 extensions consisting of three and four characters.
NOTE: The Python version should work on Windows, MacOS, and Linux. However, if OneDrive is not installed on MacOS, the code that uses `os.path.expanduser()` may fail, resulting in the "~/OneDrive/..." code also failing. This should not be an issue on Windows since OneDrive is usually installed by default. Nevertheless, the "self.path_to..." code will work as expected on MacOS. In the case of Linux, the situation with OneDrive is similar, and the intended folder paths may vary, which could require code modification.
Supported file extensions with fixed values:
Documents = .doc | .docx | .pdf | .txt | .rtf | .xls | .xlsx | .ppt | .pptx | .odt | .ods | .odp | .csv | .xml | .html
Music = .mp3 | .wav | .wma | .flac | .aac | .ogg | .m4a | .mid | .midi | .aif | .aiff | .amr | .snd | .cda | .mpa | .mka
Pictures = .jpg | .jpeg | .png | .gif | .bmp | .tif | .tiff | .ico | .svg | .raw | .webp | .eps | .psd | .cdr | .wmf
Videos = .mp4 | .avi | .wmv | .mov | .flv | .mkv | .mpg | .mpeg | .m4v | .3gp | .webm | .divx | .mp2 | .mpe | .vob
Request Access
BobbyAI_RNN | Windows - MacOS - Linux | Python | Work In Progress
Currently, this Python code starts with executing the `search_PG.py` web scraper that downloads English books with UTF-8 encoding from Project Gutenberg website (http://www.gutenberg.org) and saves them in a folder named "Books". It makes HTTP requests to the website and parses the HTML content of the responses using the Requests and Beautiful Soup libraries. The scraper extracts book IDs, titles, language, and encoding information from the HTML tables and uses this information to download and save the books in the "Books" folder. The code loops over book IDs in the range 1 to 10, but this can be modified to scrape more books by adjusting the range of the for loop.
Then, the `pre_Process.py` code must be executed, which preprocesses books from the Project Gutenberg website by removing punctuations, converting to lowercase, and splitting into words. The preprocessed books are then split into training and validation datasets, tokenized, and padded. The preprocessed books are saved in the "2_Pre_Process/pre_Processed_Books" folder, and the training and validation datasets are saved in the "3_Split_Data/training_data" and "3_Split_Data/validation_data" folders, respectively. The preprocessed books are moved from the "1_Proj_Gut/Books" folder to the "1_Proj_Gut/archived_Books" folder after processing.
NOTE: The `split_Data.py` was merged with the `pre_Process.py` code and I only left this code in for historical purposes.
NOTE: The `train_BobbyAI.py` was merged with the `BobbyAI_RNN.py` code and I only left this code in for historical purposes.
Finally, the `BobbyAI_RNN.py` code can be executed, which defines a chatbot named "BobbyAI_RNN" that uses a Recurrent Neural Network (RNN) model to generate responses to user prompts. The chatbot is trained on preprocessed text data saved in the "3_Split_Data/training_data" folder. The data is tokenized and padded using the Keras Tokenizer and Sequence classes. The RNN model is defined as a subclass of the Keras Model class, and it uses an LSTM layer, an embedding layer, and a dense layer. The RNN model is trained on the training data using an Adam optimizer and a Sparse Categorical Crossentropy loss function. The chatbot generates responses by processing user prompts through the RNN model and selecting the most probable words. The chatbot's responses are stored in a SQLite database named "bobby_ai.db". The code also defines a BobbyAI class that inherits from the BobbyAI_RNN class and provides a default response when the RNN model is unable to generate a response.
NOTE: The `device_List.py` is debugging code used to diagnose issues related to the availability of CPU and GPU devices for running TensorFlow.
Request Access
(WIP)
vCardQR | Windows - MacOS - Linux | Python
This code is designed to create a vCard, which is a type of electronic business card, for a person. The vCard contains contact information, such as the person's name, title, company, phone, email, and address. The code then generates QR codes for the vCard file and a website URL, using the segno library, and saves them as images. To make the QR codes visually appealing, the qrcode-artistic library is used to create artistic versions of the QR codes, which are overlaid on a selected background image. The vCard file and QR code images are saved in a directory called "Generated Files", with the name of the user who is generating the vCard and QR codes. This code can be useful for generating contact information for networking purposes or for sharing with colleagues or clients in a convenient and visually appealing format.
Request Access
Stupid Little Game (SLG) | Windows - MacOS - Linux | Python
This is a game me and my son programmed for fun one afternoon.
This code is a Python script for a simple two-player game built using the Pygame library. The game window is set up with a specific title and size. It uses functions from various modules for rendering objects, handling movement, and loading resources. The game involves two players who can move and shoot bullets at each other while hiding behind randomly generated objects. The game ends when one of the players scores five points by shooting their opponent with bullets. The script uses a game loop to handle events, update positions, and render the game with Pygame. When a player wins, a message is displayed and the game can be reset by pressing a button.
Characters Used in this game are copyrighted works of Capcom and Nintendo respectively.
The 8-bit Mega Man character used in this game is a copyrighted work created by Capcom. The character is used with permission under the fair use doctrine for non-commercial purposes. All rights reserved to Capcom.
The 8-bit Zelda character used in this game is a copyrighted work created by Nintendo. The character is used with permission under the fair use doctrine for non-commercial purposes. All rights reserved to Nintendo.
Request Access
PySharpen | Windows - MacOS - Linux | Python
This code is designed to sharpen and resize an image using different interpolation methods. It first loads an image and sets values for blur, alpha, and beta. It then defines a scaling factor and calculates the new width and height of the resized image. The code defines a bicubic kernel and several resizing methods to use.
The code creates a dictionary of resized images, applies a Laplacian filter to each resized image, combines each Laplacian image with its corresponding resized image using a weighted sum, places each resized image on top of a blank image using a blending mode, and applies a blur filter to the composite image. Finally, it saves the final image with all adjustments as a high-resolution PNG file.
Request Access
Many more coding projects created with C++ and Python will be published as I continue to build this portfolio.
HTML, CSS, JavaScript, and PHP projects will be featured on a dedicated web development page, separate from this page.
Copyright © 2023 BLSomers.com. All rights reserved.
This website and its content are protected by copyright law. The content on this website may not be reproduced, distributed, transmitted, cached, or otherwise used, except with the prior written permission of BLSomers.com. Unauthorized use, reproduction, or distribution of any content on this website may result in severe civil and criminal penalties, and will be prosecuted to the maximum extent possible under the law.