1/21
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Virtual Environment
An isolated workspace for a Python project that keeps dependencies separate to avoid conflicts
python -m venv myenv
Command to create a virtual environment named 'myenv'
pip freeze > requirements.txt
Command to save installed packages and versions to a text file
pip install -r requirements.txt
Command to install all dependencies listed in a requirements file
Jupyter Notebook
Interactive computing environment combining live code
.ipynb
The file extension for Jupyter Notebooks (IPython Notebook)
Markdown
Lightweight markup language used in Jupyter for text formatting and documentation
Shift+Enter
Jupyter shortcut to run the current cell and move to the next one
NumPy
Fundamental package for scientific computing in Python offering fast array operations
np.array(list)
Function to convert a standard Python list into a NumPy array
Vectorized operations
Applying operations to an entire array at once without using loops
np.arange(start
stop
np.linspace(start
stop
arr.shape
NumPy property that returns the dimensions (rows
arr.ndim
NumPy property that returns the number of dimensions of an array
Broadcasting
NumPy mechanism allowing arithmetic operations on arrays of different shapes
Matplotlib
The standard plotting library in Python for creating static
plt.plot(x
y)
plt.scatter(x
y)
plt.hist(x)
Matplotlib command to create a histogram to visualize data distribution
%time
Line magic command to measure the execution time of a single line
%%time
Cell magic command to measure the execution time of an entire cel