Particle background
A Pen by Kuo Ting-Kai on CodePen.
| # Import necessary libraries | |
| import numpy as np | |
| # Define fluid properties and boundary conditions | |
| density = 1.0 | |
| viscosity = 1.0 | |
| pressure_inlet = 1.0 | |
| velocity_inlet = 1.0 | |
| pressure_outlet = 0.0 |
Particle background
A Pen by Kuo Ting-Kai on CodePen.
| import requests | |
| from bs4 import BeautifulSoup | |
| def get_linear_parent_chain(entry_code = 'string net',entry_url = 'string_net'): | |
| URL = "https://errorcorrectionzoo.org/c/" | |
| url=URL+entry_url | |
| depth = 0 | |
| hasParent = True |
| while getopts n: flag | |
| do | |
| case "${flag}" in | |
| n) name=${OPTARG}$;; | |
| esac | |
| done | |
| man $name | groff -mandoc -Thtml > ${name}.html |
| # Find links to pdf files in HTML with BeautifulSoup | |
| import os | |
| import urllib | |
| from bs4 import BeautifulSoup | |
| from PyPDF2 import PdfFileMerger | |
| import numpy as np | |
| def download_file(download_url, filename): | |
| response = urllib.request.urlopen(download_url) | |
| file = open(filename, 'wb') | |
| file.write(response.read()) |