Skip to content

Commit

Permalink
Merge pull request #384 from bozhodimitrov/main
Browse files Browse the repository at this point in the history
Examples for episodes 557 - 559
  • Loading branch information
asottile authored Oct 28, 2023
2 parents 54f0305 + caa6c19 commit 60b051e
Show file tree
Hide file tree
Showing 11 changed files with 82 additions and 0 deletions.
15 changes: 15 additions & 0 deletions sample_code/ep557/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# [don't delete from pypi! (yank instead) (intermediate)](https://youtu.be/lUFA_WklFII)

Today we talk about pypi -- and why you shouldn't delete from it! yanking is the way and we show how it works and what effects it has on people attempting to install!

## Interactive examples

### Bash

```bash
virtualenv -ppython3.11 venv
. venv/bin/activate

pip install codecov-cli'<0.3.7'
pip install codecov-cli==0.3.6
```
24 changes: 24 additions & 0 deletions sample_code/ep558/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# [git: --first-parent (intermediate)](https://youtu.be/nsSj7snqODM)

Today we talk about a helpful argument in `git` for visualizing histories (and diffs!)

## Interactive examples

### Bash

```bash
git clone [email protected]:anthonywritescode/twitch-chat-bot
cd twitch-chat-bot/

git log
git log --oneline
git log --oneline --graph

git show <commit_hash>
git log --oneline --first-parent
git show --first-parent <commit_hash>

git clone [email protected]:pre-commit/pre-commit
cd pre-commit/
git log --oneline --first-parent --decorate
```
21 changes: 21 additions & 0 deletions sample_code/ep559/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# [I don't use backslashes (with one exception) (beginner - intermediate)](https://youtu.be/Y_gfBcjS5EY)

Today I talk about the backslash character in python and why I avoid it -- but also the one case where I do use it :)

## Interactive examples

### Python

```python
x
x.lstrip()
x.lstrip('\n')
```

### Bash

```bash
python t.py
python -m tokenize t.py
python -i t.py
```
2 changes: 2 additions & 0 deletions sample_code/ep559/rev01/t.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
x =
3
2 changes: 2 additions & 0 deletions sample_code/ep559/rev02/t.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
x = \
3
2 changes: 2 additions & 0 deletions sample_code/ep559/rev03/t.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
x = \
3 \
2 changes: 2 additions & 0 deletions sample_code/ep559/rev04/t.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
x = \
3 \
3 changes: 3 additions & 0 deletions sample_code/ep559/rev05/t.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
x = (
3
)
4 changes: 4 additions & 0 deletions sample_code/ep559/rev06/t.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
x = """
hello
hello
"""
4 changes: 4 additions & 0 deletions sample_code/ep559/rev07/t.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
x = """\
hello
hello
"""
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,6 @@ per-file-ignores =
*/ep546/rev01/t.py:E999
*/ep548/rev03/t.py:E999
*/ep548/rev05/t4.py:W605
*/ep559/rev01/t.py:E999
*/ep559/rev03/t.py:E999
*/ep559/rev04/t.py:E999

0 comments on commit 60b051e

Please sign in to comment.