-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from paulipotter/main
update branch
- Loading branch information
Showing
6 changed files
with
55 additions
and
196 deletions.
There are no files selected for viewing
This file contains 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
Binary file not shown.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
layout: post | ||
author: paulipotter | ||
tags: Python | ||
--- | ||
|
||
Introducing Python-Projects: A Collection of Python Snippets | ||
|
||
In the quest to expand my coding skills and showcase my expertise, I have created a repository called python-projects on GitHub. This repository houses various small Python snippets that I have worked on over time. | ||
|
||
Let's take a closer look at some of the projects featured in this repository: | ||
|
||
| Name | Description | URL | | ||
|---|---|---| | ||
| Binary Trees | Various binary tree sorting and trimming activities | [π](https://github.com/paulipotter/python-projects/tree/main/binary-tree) | | ||
| Implementing a data structure | Write a set of procedures that create and manipulate instances of said structure. | [π](https://github.com/paulipotter/python-projects/tree/main/implement-data-structure) | | ||
| Pascal Triangle | Given an integer numRows, return the first numRows of Pascal's triangle. | [π](https://github.com/paulipotter/python-projects/tree/main/pascal-triangle) | | ||
| Two Sum | Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. | [π](https://github.com/paulipotter/python-projects/tree/main/two-sum) | |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
layout: post | ||
author: paulipotter | ||
tags: Python venv zsh | ||
--- | ||
Simplify Your Virtual Environment Workflow with Zsh Aliases | ||
|
||
Managing virtual environments is an essential part of many development workflows. However, constantly typing out the full command to activate or create a virtual environment can be time-consuming and cumbersome. Thankfully, there's a solution that can streamline your workflow in the Zsh shell. | ||
|
||
By adding a few lines to your `.zshrc` file, you can create custom aliases that simplify the process. Inspired by a helpful gist found at [this link](https://gist.github.com/haridas/4966347), I have created [my own version](https://gist.github.com/paulipotter/3d4fe8b17ec18faad1336fbcdcc10e66) of these aliases. At the end of your `.zshrc`, add the following: | ||
```shell | ||
alias activate='source .venv/bin/activate || echo "no venv available in current folder"' | ||
alias mkenv='python3 -m venv .venv 2>/dev/null && echo "Virtual environment created." || echo "venv already exists"' | ||
alias rmenv='rm -rf .venv && echo "venv removed." || echo "No venv available in current folder"' | ||
``` | ||
Make sure you restart your terminal before you test it out. | ||
|
||
### Usage | ||
|
||
| Command | Description | Longer Command | | ||
|---|---|---| | ||
| `mkenv` | Creates a new virtual environment | `python3 -m venv .venv` | | ||
| `activate` | Activate your virtual environment | `source ./.venv/bin/activate`| | ||
| `rmenv` | Removes the virtual environment if it exists. | `rm -rf .venv` | | ||
|
||
By simplifying the process of working with virtual environments, these aliases can save you valuable time and keystrokes. | ||
|
||
Give these aliases a try and experience a more efficient virtual environment workflow in your Zsh shell! |