Skip to content

Commit

Permalink
Merge 4fd32e6 into 9343fb5
Browse files Browse the repository at this point in the history
  • Loading branch information
hedyhli committed Jan 28, 2024
2 parents 9343fb5 + 4fd32e6 commit 51091c8
Show file tree
Hide file tree
Showing 95 changed files with 1,123 additions and 396 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Our projects on Python Discord are open source and [available on GitHub](https:/
<!-- Project cards -->
<div class="columns is-multiline is-centered is-3 is-variable">
<div class="column is-one-third-desktop is-half-tablet">
<div class="card github-card">
<div class="card-header">
<div class="card github-card has-background-white">
<div class="card-header has-background-white">
<div class="card-header-title is-centered">
<a class="is-size-5" href="https://github.com/python-discord/sir-lancebot">
<i class="fab fa-github"></i>&ensp;<strong >Sir Lancebot</strong>
Expand All @@ -22,11 +22,11 @@ Our projects on Python Discord are open source and [available on GitHub](https:/
Sir Lancebot has a collection of self-contained, for-fun features. If you're new to Discord bots or contributing, this is a great place to start!
</div>
</div>
<div class="card-footer">
<div class="card-footer has-background-white">
<a href="https://github.com/python-discord/sir-lancebot/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc" class="card-footer-item"><i class="fas fa-exclamation-circle"></i>&ensp;Issues</a>
<a href="https://github.com/python-discord/sir-lancebot/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc" class="card-footer-item"><i class="fas fa-code-merge"></i>&ensp;PRs</a>
</div>
<div class="card-footer">
<div class="card-footer has-background-white">
<a href="/pages/guides/pydis-guides/contributing/sir-lancebot" class="card-footer-item"><i class="fas fa-cogs"></i>&ensp;Setup and Configuration Guide</a>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ It just returns a new one.
Let's examine what's going on here.
At first, the variable `s` refers to some object, the string `'hello'`.

![s refers to the string "hello"](/static/images/content/mutability/s_refers_hello.png)
![s refers to the string "hello"](/static/images/content/mutability/s_refers_hello.png){: class="has-dark-mode-background" }

When you call `s.upper()`, a new string, which contains the characters `'HELLO'`, gets created.

![s.upper creates "HELLO"](/static/images/content/mutability/s_upper_creates_HELLO.png)
![s.upper creates "HELLO"](/static/images/content/mutability/s_upper_creates_HELLO.png){: class="has-dark-mode-background" }

This happens even if you just call `s.upper()` without any assignment, on its own line:
```python
Expand All @@ -44,12 +44,12 @@ In this case, a new object will be created and discarded right away.

Then the assignment part comes in: the name `s` gets disconnected from `'hello'`, and gets connected to `'HELLO'`.

![s gets assigned to "HELLO"](/static/images/content/mutability/s_gets_assigned_to_HELLO.png)
![s gets assigned to "HELLO"](/static/images/content/mutability/s_gets_assigned_to_HELLO.png){: class="has-dark-mode-background" }

Now we can say that `'HELLO'` is stored in the `s` variable.

Then, because no variables refer to the _object_ `'hello'`, it gets eaten by the garbage collector.

!["hello" Gets Eaten](/static/images/content/mutability/hello_gets_eaten.png)
!["hello" Gets Eaten](/static/images/content/mutability/hello_gets_eaten.png){: class="has-dark-mode-background" }

It means that the memory reserved for that object will be freed. If that didn't happen, the 'garbage' would accumulate over time and fill up all the RAM.
3 changes: 2 additions & 1 deletion pydis_site/apps/resources/resources/adafruit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ description: Adafruit is an open-source electronics manufacturer
Their official community host regular show-and-tells,
provide help with your projects,
and the Adafruit devs do all the CircuitPython Development right out in the open.
title_image: https://www.mouser.com/images/suppliers/logos/adafruit.png
title_image: /static/images/resources/adafruit.png
title_image_dark: /static/images/resources_dark/adafruit.png
title_url: https://adafruit.com/
urls:
- icon: branding/discord
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title_url: https://automatetheboringstuff.com/
urls:
- icon: branding/goodreads
url: https://www.goodreads.com/book/show/22514127-automate-the-boring-stuff-with-python
color: black
color: dark
tags:
topics:
- general
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: We have listed our favourite communities,
An awesome list collating the best programming related Discord servers is available on GitHub
and has all sorts of topics from blockchain to virtual reality!
title_icon: branding/github
title_icon_color: black
title_icon_color: dark
title_url: https://github.com/mhxion/awesome-programming-discord
name: awesome-programming-discord
tags:
Expand Down
4 changes: 2 additions & 2 deletions pydis_site/apps/resources/resources/byte_of_python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ title_url: https://python.swaroopch.com/
urls:
- icon: regular/book
url: https://www.lulu.com/shop/swaroop-c-h/a-byte-of-python/paperback/product-21142968.html
color: black
color: dark
- icon: branding/goodreads
url: https://www.goodreads.com/book/show/6762544-a-byte-of-python
color: black
color: dark
tags:
topics:
- general
Expand Down
2 changes: 1 addition & 1 deletion pydis_site/apps/resources/resources/code_combat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title_url: https://codecombat.com/
urls:
- icon: branding/github
url: https://github.com/codecombat/codecombat
color: black
color: dark
tags:
topics:
- general
Expand Down
1 change: 1 addition & 0 deletions pydis_site/apps/resources/resources/corey_schafer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ description: 'Corey has a number of exceptionally high quality tutorial series
Check out his channel for more video series!
'
title_image: https://i.imgur.com/KIfWw3b.png
title_image_dark: /static/images/resources_dark/coreyschafer.png
title_url: https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g
urls:
- icon: solid/external-link-alt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ title_url: https://www.oreilly.com/library/view/data-science-from/9781492041122/
urls:
- icon: branding/goodreads
url: https://www.goodreads.com/en/book/show/52059715-data-science-from-scratch
color: black
color: dark
- icon: branding/github
url: https://github.com/joelgrus/data-science-from-scratch
color: black
color: dark
tags:
topics:
- data science
Expand Down
4 changes: 2 additions & 2 deletions pydis_site/apps/resources/resources/effective_python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ title_url: https://effectivepython.com/
urls:
- icon: branding/goodreads
url: https://www.goodreads.com/book/show/48566725-effective-python
color: black
color: dark
- icon: branding/github
url: https://github.com/bslatkin/effectivepython
color: black
color: dark
tags:
topics:
- general
Expand Down
2 changes: 1 addition & 1 deletion pydis_site/apps/resources/resources/exercism.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title_url: https://exercism.org/
urls:
- icon: branding/github
url: https://github.com/exercism/python
color: black
color: dark
tags:
topics:
- general
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ title_url: http://shop.oreilly.com/product/0636920031116.do
urls:
- icon: branding/goodreads
url: https://www.goodreads.com/book/show/18774655-flask-web-development
color: black
color: dark
- icon: branding/github
url: https://github.com/miguelgrinberg/flasky
color: black
color: dark
tags:
topics:
- web development
Expand Down
4 changes: 2 additions & 2 deletions pydis_site/apps/resources/resources/fluent_python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ title_url: https://www.oreilly.com/library/view/fluent-python/9781491946237/
urls:
- icon: branding/goodreads
url: https://www.goodreads.com/book/show/22800567-fluent-python
color: black
color: dark
- icon: branding/github
url: https://github.com/fluentpython
color: black
color: dark
tags:
topics:
- general
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title_url: https://python-guide.org/
urls:
- icon: branding/goodreads
url: https://www.goodreads.com/book/show/28321007-the-hitchhiker-s-guide-to-python
color: black
color: dark
tags:
topics:
- general
Expand Down
7 changes: 3 additions & 4 deletions pydis_site/apps/resources/resources/kivy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@ name: Kivy
description: The Kivy project, through the Kivy framework and its sister projects,
aims to provide all the tools to create desktop and mobile applications in Python.
Allowing rapid development of multitouch applications with custom and exciting user interfaces.
icon_image: https://raw.githubusercontent.com/kivy/kivy-website/master/content/logos/kivy-logo-black-256.png
icon_size: 50
title_image: https://i.imgur.com/EVP3jZR.png
title_image: /static/images/resources/kivy.png
title_image_dark: /static/images/resources_dark/kivy.png
title_url: https://kivy.org/
urls:
- icon: branding/discord
url: https://discord.gg/djPtTRJ
color: blurple
- icon: branding/github
url: https://github.com/kivy
color: black
color: dark
tags:
topics:
- user interface
Expand Down
1 change: 1 addition & 0 deletions pydis_site/apps/resources/resources/microsoft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Microsoft Python
description: Microsoft Python is a Discord server for discussing all things relating to using Python with Microsoft products,
they have channels for Azure, VS Code, IoT, Data Science and much more!
title_image: https://1000logos.net/wp-content/uploads/2017/04/Microsoft-Logo.png
title_image_dark: /static/images/resources_dark/microsoft.png
title_url: https://www.microsoft.com/en-us/boards/pycon2020.aspx
urls:
- icon: branding/discord
Expand Down
2 changes: 1 addition & 1 deletion pydis_site/apps/resources/resources/mission_python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title_url: https://www.sean.co.uk/books/mission-python/index.shtm
urls:
- icon: branding/goodreads
url: https://www.goodreads.com/book/show/35545850-mission-python
color: black
color: dark
tags:
topics:
- general
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title_url: https://nnfs.io/
urls:
- icon: branding/goodreads
url: https://www.goodreads.com/book/show/55927899-neural-networks-from-scratch-in-python
color: black
color: dark
tags:
topics:
- data science
Expand Down
1 change: 1 addition & 0 deletions pydis_site/apps/resources/resources/pallets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ description: The Pallets Projects develop Python libraries such as the Flask web
the Jinja templating library, and the Click command line toolkit. Join to discuss
and get help from the Pallets community.
title_image: https://i.imgur.com/sV9Ypdf.png
title_image_dark: /static/images/resources_dark/pallets.png
title_url: https://www.palletsprojects.com/
urls:
- icon: branding/discord
Expand Down
3 changes: 2 additions & 1 deletion pydis_site/apps/resources/resources/panda3d.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Panda3D
description: Panda3D is a Python-focused 3-D framework for rapid development of games,
visualizations, and simulations, written in C++ with an emphasis on performance and flexibility.
title_image: https://www.panda3d.org/wp-content/uploads/2019/01/panda3d_logo.png
title_image: /static/images/resources/panda3d.png
title_image_dark: /static/images/resources_dark/panda3d.png
title_url: https://www.panda3d.org/
position: 9
urls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: People, Postgres, Data specializes in building users of Postgres
They take a holistic approach to their community inviting not only technical topics but Professional Development
and Life in general including movies, games, books and travel.
title_image: https://media.discordapp.net/attachments/748954447857844318/750519488268730377/people_postgres_data.png
title_image_dark: /static/images/resources_dark/people_postgres_data.png
title_url: https://postgresconf.org/
urls:
- icon: branding/discord
Expand Down
1 change: 1 addition & 0 deletions pydis_site/apps/resources/resources/pyglet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: Pyglet is a powerful,
loading images and videos, and playing sounds and music. All of this with a friendly Pythonic API,
that's simple to learn and doesn't get in your way.
title_image: https://i.imgur.com/LfQwXUe.png
title_image_dark: /static/images/resources_dark/pyglet.png
title_url: http://pyglet.org/
urls:
- icon: branding/discord
Expand Down
4 changes: 2 additions & 2 deletions pydis_site/apps/resources/resources/python_cookbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ title_url: http://shop.oreilly.com/product/0636920027072.do
urls:
- icon: branding/goodreads
url: https://www.goodreads.com/book/show/17152735-python-cookbook
color: black
color: dark
- icon: branding/github
url: https://github.com/dabeaz/python-cookbook
color: black
color: dark
tags:
topics:
- general
Expand Down
4 changes: 2 additions & 2 deletions pydis_site/apps/resources/resources/python_crash_course.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ title_url: https://nostarch.com/pythoncrashcourse2e
urls:
- icon: branding/goodreads
url: https://www.goodreads.com/book/show/23241059-python-crash-course
color: black
color: dark
- icon: branding/github
url: https://ehmatthes.github.io/pcc/
color: black
color: dark
tags:
topics:
- general
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title_url: https://www.python-graph-gallery.com/
urls:
- icon: branding/github
url: https://github.com/holtzy/The-Python-Graph-Gallery
color: black
color: dark
tags:
topics:
- data science
Expand Down
1 change: 1 addition & 0 deletions pydis_site/apps/resources/resources/python_org.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: The Python Tutorial
description: The official Python tutorial by Python.org
title_image: https://www.python.org/static/community_logos/python-logo-master-v3-TM.png
title_image_dark: /static/images/resources_dark/python.png
title_url: https://docs.python.org/3/tutorial/
tags:
topics:
Expand Down
2 changes: 1 addition & 1 deletion pydis_site/apps/resources/resources/python_tricks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title_url: https://realpython.com/products/python-tricks-book/
urls:
- icon: branding/goodreads
url: https://www.goodreads.com/book/show/36990732-python-tricks
color: black
color: dark
tags:
topics:
- general
Expand Down
1 change: 1 addition & 0 deletions pydis_site/apps/resources/resources/sentdex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ description: 'An enormous amount of Python content for all skill levels
Check out his channel for more video series!
'
title_image: https://i.imgur.com/kJgWZIu.png
title_image_dark: /static/images/resources_dark/sentdex.png
title_url: https://www.youtube.com/user/sentdex
urls:
- icon: solid/external-link-alt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ description: A simple, no-nonsense guide to the basics of using Git.
name: A Simple Guide to Git
title_url: https://rogerdudler.github.io/git-guide/
title_icon: branding/github
title_icon_color: black
title_icon_color: dark
tags:
topics:
- tooling
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ title_url: https://third-bit.com/sdxpy/
urls:
- icon: branding/goodreads
url: https://www.goodreads.com/book/show/199430059-software-design-by-example
color: black
color: dark
- icon: branding/github
url: https://github.com/gvwilson/sdxpy
color: black
color: dark
tags:
topics:
- general
Expand Down
4 changes: 2 additions & 2 deletions pydis_site/apps/resources/resources/think_python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ title_url: https://greenteapress.com/wp/think-python-2e/
urls:
- icon: branding/goodreads
url: https://www.goodreads.com/book/show/14514306-think-python
color: black
color: dark
- icon: branding/github
url: https://github.com/AllenDowney/ThinkPython2
color: black
color: dark
tags:
topics:
- general
Expand Down
4 changes: 2 additions & 2 deletions pydis_site/apps/resources/resources/two_scoops_of_django.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ title_url: https://www.feldroy.com/books/two-scoops-of-django-3-x
urls:
- icon: branding/goodreads
url: https://www.goodreads.com/book/show/55822151-two-scoops-of-django-3-x
color: black
color: dark
- icon: branding/github
url: https://github.com/twoscoops/two-scoops-of-django-2.0-code-examples
color: black
color: dark
tags:
topics:
- web development
Expand Down
4 changes: 2 additions & 2 deletions pydis_site/context_processors.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.conf import settings
from django.template import RequestContext
from django.http import HttpRequest


def git_sha_processor(_: RequestContext) -> dict:
def git_sha_processor(_: HttpRequest) -> dict:
"""Expose the git SHA for this repo to all views."""
return {'git_sha': settings.GIT_SHA}
Loading

0 comments on commit 51091c8

Please sign in to comment.