Generating an SSH key in OpenSSH involves a few simple steps. Here’s how you can do it: 1. Open a Terminal If you're on Linux or macOS, you can use the built-in terminal. On Windows, you can use the Command Prompt, PowerShell, or Git Bash if you have Git installed. 2. Generate the SSH Key Pair Run the following command: bash Copy code ssh-keygen -t rsa -b 4096 -C "your_email@example.com" Here’s what each option means: -t rsa : Specifies the type of key to create, in this case, RSA. -b 4096 : Specifies the number of bits in the key, 4096 bits is a good choice for strong encryption. -C "your_email@example.com" : Adds a label to the key, usually your email address. 3. Choose a File Location After running the above command, you'll be prompted to choose a location to save the key. By default, it will be saved in ~/.ssh/id_rsa (on Linux or macOS) or in C:\Users\YourUserName\.ssh\id_rsa (on Windows). Press Enter to accept the default location, or specify a diff...
import os # Path to the directory containing the downloaded packages package_dir = '/path/to/my_packages' # List to hold the package names and versions requirements = [] # Iterate over all files in the directory for filename in os.listdir(package_dir): # Process .whl files if filename.endswith('.whl'): # Split the filename by dashes and underscores to extract the package name and version parts = filename.split('-') package_name = parts[0] version = parts[1] requirements.append(f'{package_name}=={version}') # Process .tar.gz files elif filename.endswith('.tar.gz'): # Remove the .tar.gz and split the filename by dashes to extract the package name and version parts = filename.replace('.tar.gz', '').split('-') packa...
Comments
Post a Comment