This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use Python’s built-in zipfile module: | |
# This will zip all files and folders in the current directory, including subfolders, into archive_name.zip. | |
import zipfile | |
import os | |
def zip_all_files(zip_name='archive_name.zip'): | |
with zipfile.ZipFile(zip_name, 'w', zipfile.ZIP_DEFLATED) as archive: | |
for foldername, subfolders, filenames in os.walk('.'): | |
for filename in filenames: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
import os | |
import argparse | |
def print_directory_structure(directory_path, show_size=False, prefix=""): | |
""" | |
Generate a tree-like directory structure visualization. | |
Args: | |
directory_path (str): The path to the directory to visualize. | |
show_size (bool, optional): If True, display the size of each file in bytes. Defaults to False. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"public_identifier": "prasanthntu", | |
"profile_pic_url": "https://media.licdn.com/dms/image/C5103AQEAsdNFh2IAzA/profile-displayphoto-shrink_800_800/0/1571295051197?e=1726099200&v=beta&t=mXzMdvg99gjyH7jXXUMmqwZV6nC2zenjzVDf1a-wVQs", | |
"background_cover_image_url": "https://media.licdn.com/dms/image/C4D16AQEaHZAJFwrPgQ/profile-displaybackgroundimage-shrink_350_1400/0/1656497479168?e=1726099200&v=beta&t=J-KlreWZve6q9PzzuBsq-D1iDoX2wjILN8WCN1iZHnM", | |
"first_name": "Prasanth", | |
"last_name": "Thangavel", | |
"full_name": "Prasanth Thangavel", | |
"follower_count": 1118, | |
"occupation": "Senior Data Scientist", | |
"headline": "Senior Data Scientist", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"public_identifier": "johnrmarty", | |
"profile_pic_url": "https://s3.us-west-000.backblazeb2.com/proxycurl/person/johnrmarty/profile?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0004d7f56a0400b0000000001%2F20240713%2Fus-west-000%2Fs3%2Faws4_request&X-Amz-Date=20240713T140821Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=93a1411fc7203f58b9e8dac7083648c02ad0ce0bbaf6d8456f2837bb3ba2baa1", | |
"background_cover_image_url": null, | |
"first_name": "John", | |
"last_name": "Marty", | |
"full_name": "John Marty", | |
"follower_count": 261142, | |
"occupation": "Co-Founder at FF Real Estate", | |
"headline": "LinkedIn Top Voice", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
american_number_system = { | |
'zero': 0, | |
'one': 1, | |
'two': 2, | |
'three': 3, | |
'four': 4, | |
'five': 5, | |
'six': 6, | |
'seven': 7, | |
'eight': 8, |