Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #661

Merged
merged 1 commit into from
Apr 23, 2022
Merged

Fix typos #661

merged 1 commit into from
Apr 23, 2022

Conversation

kianmeng
Copy link
Contributor

@kianmeng kianmeng commented Apr 17, 2022

No description provided.

@donnemartin donnemartin merged commit 7a094ce into donnemartin:master Apr 23, 2022
@donnemartin
Copy link
Owner

@kianmeng thank you!

@kianmeng
Copy link
Contributor Author

🥳 🥳 🥳 🥳 🥳

spuyet added a commit to spuyet/system-design-primer that referenced this pull request Jul 25, 2022
* Fix Celery URL (donnemartin#486)

* Fixing the indieflashblog address with archive.org since website has been discontinued

* Fix LRU cache link (donnemartin#505)

* Fix capitalization of Dropbox (donnemartin#511)

* Update GitHub Engineering Blog link

* Fix memcache architecture URL (donnemartin#631)

* Fix # 650: Replace broken weighted round robin link (donnemartin#651)

* Fix typos (donnemartin#661)

Co-authored-by: Abdalla Mohamed <sharpcodex@gmail.com>
Co-authored-by: Laurent Erignoux <lerignoux@gmail.com>
Co-authored-by: Donne Martin <donne.martin@gmail.com>
Co-authored-by: Trần Tiến Đức <trantienduchn@gmail.com>
Co-authored-by: ayyjohn <alecjohnson55@gmail.com>
Co-authored-by: Lawrence Chou <lawrencechou1024@gmail.com>
Co-authored-by: Nnachevvv <44066540+Nnachevvv@users.noreply.github.com>
Co-authored-by: mleers <mleers4@gmail.com>
Co-authored-by: Kian-Meng Ang <kianmeng.ang@gmail.com>
spuyet added a commit to spuyet/system-design-primer that referenced this pull request Jul 25, 2022
* add Twitter Handles 3,000 Images Per Second

* Fix grammar in document store section (donnemartin#247)

* Fix typo in Twitter timeline and search solution (donnemartin#251)

* Update document-store to document store (donnemartin#255)

* Enable Python syntax highlighting in Pastebin sample code (donnemartin#257)

* Fix broken SQL link in Scaling AWS exercise (donnemartin#258)

Fix broken SQL link in Scaling AWS exercise

* Update HDFS design link to the latest version (donnemartin#275)

* Enable syntax highlighting in all python code snippets (donnemartin#268)

* Translate language list (donnemartin#252)

* Add Ebook generation script (donnemartin#207)

* Add availability in numbers section (donnemartin#237)

* Update language lists in translations (donnemartin#280)

* Add Hebrew translation link (donnemartin#286)

* zh-Hans: Translate Pastebin solution (donnemartin#273)

* ja: Fix typo of Big-O notation in KVS section (donnemartin#292)

* JA: Fix mistranslation in Horizontal scaling section

- The Japanese translation is ambiguous about “vertical scaling” means scaling out or scaling up.
- The word “expensive” is missing in the Japanese translation.

* JA: Fix mistranslation in Reverse proxy (web server) section

- Fix mistranslation of parallel structure. (not information/blacklist/limit, but hide/blacklist/limit)

* ja: Fix mistranslation in "Horizontal scaling"

* JA: Fix mistranslation in Weak consistency section (donnemartin#299)

* JA: Fix mistranslation in Push CDNs section (donnemartin#300)

* JA: Fix mistranslation in Federation section (donnemartin#303)

* ja: Fix translation in "Anki flashcards" (donnemartin#306)

* ja: Fix translation in “Disadvantage(s): load balancer” (donnemartin#307)

* ja: Fix translation in Service Discovery section (donnemartin#308)

* Add API security checklist (donnemartin#328)

* zh-Hans: Change translation in SQL tuning (donnemartin#318)

* ja: Fix mistranslation in SQL tuning section (donnemartin#305)

* Change raise NotImplemented to raise NotImplementedError (donnemartin#345)

* Fix broken round robin links (donnemartin#351)

* Fix broken CAP theorem link (donnemartin#355)

* Fix broken link in CAP theorem section (donnemartin#348)

* zh-cn: Sync with upstream to keep it up-to-date (donnemartin#374)

* Revert "zh-cn: Sync with upstream to keep it up-to-date (donnemartin#374)" (donnemartin#391)

This reverts commit 301b9d8.

donnemartin#374 overwrote the English version of the solutions

* zh-Hans: Translate solutions (donnemartin#392)

* Update "Scaling up to your first 10 million users" link (donnemartin#411)

* Add missing comma in Mint solution (donnemartin#399)

* Fix single point of failure typo (donnemartin#398)

* Fix layer 7 load balancers typo (donnemartin#317)

* Update contributing guidelines for translations (donnemartin#434)

* Add pull request template (donnemartin#435)

* Add status of translations (donnemartin#436)

* Highlight translation request (donnemartin#437)

* Resolve donnemartin#164 - Fix phrasing with availability and partition tolerance (donnemartin#350)

* Check dependencies in Ebook gen script (donnemartin#406)

* Fix typo: Change replication to federation (donnemartin#418)

* Update Twitter back-of-the-envelope calculations (donnemartin#414)

* Fix typos in Twitter and web crawler exercises (donnemartin#438)

* Fix donnemartin#313: Clarify availability patterns (donnemartin#439)

* Add system design template link (donnemartin#433)

* kr: Fix Korean translation link in language index (donnemartin#340)

* Fix Mint exercise bugs and typos (donnemartin#409)

* Remove redundant SQL index in Pastebin exercise (donnemartin#405)

* Additional question, build an exchange

fixes donnemartin#281

* Add CAP theorem video link (donnemartin#400)

* Fix loop bug in deck of cards exercise (donnemartin#396)

* Update dead links (donnemartin#321)

* Add links for latency based and geolocation based routing (donnemartin#319)

* Clarify CDN advantages (donnemartin#310)

* Change disk to HDD for clarity (donnemartin#295)

* Update README.md

* Remove extraneous __init__.py (donnemartin#393)

* Remove Imgur dependency by storing images locally (donnemartin#168)

* Fix donnemartin#335: Update OSI image to Open Systems Interconnection (donnemartin#447)

* Fix translations link in PR template (donnemartin#451)

* Update broken HBase architecture link (donnemartin#481)

* Fix Celery URL (donnemartin#486)

* Fixing the indieflashblog address with archive.org since website has been discontinued

* Fix LRU cache link (donnemartin#505)

* Fix capitalization of Dropbox (donnemartin#511)

* Update GitHub Engineering Blog link

* Fix memcache architecture URL (donnemartin#631)

* Fix # 650: Replace broken weighted round robin link (donnemartin#651)

* Fix typos (donnemartin#661)

Co-authored-by: fluency03 <fluency.03@gmail.com>
Co-authored-by: Chang Liu <fluency03@users.noreply.github.com>
Co-authored-by: glusa8 <glusa8@berkeley.edu>
Co-authored-by: yiksanchan <evan.chanyiksan@gmail.com>
Co-authored-by: Manas Karekar <manaskarekar@users.noreply.github.com>
Co-authored-by: Sean Han <hanxiaobow@gmail.com>
Co-authored-by: Donne Martin <donne.martin@gmail.com>
Co-authored-by: leontyr <leontyr@gmail.com>
Co-authored-by: Simon Knott <simoknott@gmail.com>
Co-authored-by: minhaz <minhazav@gmail.com>
Co-authored-by: Kevin Xu <kevin.xu.v@gmail.com>
Co-authored-by: Yuya Ma'emichi <6386129+Wintus@users.noreply.github.com>
Co-authored-by: SATO Yusuke <yusuke.sato.zz@gmail.com>
Co-authored-by: Duy Nguyen Hoang <nhduy88@gmail.com>
Co-authored-by: Brandon <brandonJY@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Dan Choi <ygdanchoi@gmail.com>
Co-authored-by: vyq <qvc246+github@gmail.com>
Co-authored-by: Danny Jung <3496334+dannyjung90@users.noreply.github.com>
Co-authored-by: 根号三 <imsqrtthree@gmail.com>
Co-authored-by: userstartupideas <64709217+userstartupideas@users.noreply.github.com>
Co-authored-by: Alexander Teno <5354921+alexanderteno@users.noreply.github.com>
Co-authored-by: panguncle <54489480+panguncle@users.noreply.github.com>
Co-authored-by: shiyujiucsb <16054786+shiyujiucsb@users.noreply.github.com>
Co-authored-by: Neesara <neethums333@gmail.com>
Co-authored-by: Sainadh Devireddy <sainadh976@gmail.com>
Co-authored-by: Kevin Liu <kevinliu23@gmail.com>
Co-authored-by: Kofi Forson <kofif7kofi@gmail.com>
Co-authored-by: Agade09 <n.sillitoe@gmail.com>
Co-authored-by: Nachiket Acharya <nachiket.acharya@microsoft.com>
Co-authored-by: Rahil <rahilrshk@gmail.com>
Co-authored-by: Youngchul Bang <youngchul@gmail.com>
Co-authored-by: Vladimir Mikhaylov <38596482+vemikhaylov@users.noreply.github.com>
Co-authored-by: John Richardson <42470533+John-Richardson@users.noreply.github.com>
Co-authored-by: Harry Moreno <morenoh149@gmail.com>
Co-authored-by: Manas Gupta <guptamanas1998@gmail.com>
Co-authored-by: Joilson Cisne <joilsoncisne@gmail.com>
Co-authored-by: Ganessh Kumar <rpganesshkumar@gmail.com>
Co-authored-by: Varsha Muzumdar <varsha.vjm@gmail.com>
Co-authored-by: Noe Brito <n.o.brito@hotmail.com>
Co-authored-by: Adam Dobrawy <ad-m@users.noreply.github.com>
Co-authored-by: Daniel Julius Lasiman <dj.lasiman@gmail.com>
Co-authored-by: Isetty Ravi Teja Kumar <iravitejakumar@gmail.com>
Co-authored-by: Ryo Shibayama <j02521@gmail.com>
Co-authored-by: Peter Yao <peteryao7@gmail.com>
Co-authored-by: Abdalla Mohamed <sharpcodex@gmail.com>
Co-authored-by: Laurent Erignoux <lerignoux@gmail.com>
Co-authored-by: Trần Tiến Đức <trantienduchn@gmail.com>
Co-authored-by: ayyjohn <alecjohnson55@gmail.com>
Co-authored-by: Lawrence Chou <lawrencechou1024@gmail.com>
Co-authored-by: Nnachevvv <44066540+Nnachevvv@users.noreply.github.com>
Co-authored-by: mleers <mleers4@gmail.com>
Co-authored-by: Kian-Meng Ang <kianmeng.ang@gmail.com>
@ritikrauniyar93
Copy link

import pygame
import random

Initialize Pygame

pygame.init()

Define the screen size and colors

SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
BACKGROUND_COLOR = (135, 206, 250)
GROUND_COLOR = (34, 139, 34)
BRICK_COLOR = (210, 105, 30)
COIN_COLOR = (255, 215, 0)
MARIO_COLOR = (255, 0, 0)

Define the game objects

mario_pos = [50, SCREEN_HEIGHT - 100]
mario_vel = [0, 0]
ground_pos = [0, SCREEN_HEIGHT - 50]
bricks = [[random.randint(0, SCREEN_WIDTH - 50), random.randint(0, SCREEN_HEIGHT - 200)] for i in range(10)]
coins = [[random.randint(0, SCREEN_WIDTH - 50), random.randint(0, SCREEN_HEIGHT - 200)] for i in range(10)]

Create the game window

screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))

Define the game loop

while True:
# Handle events
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
quit()
elif event.type == pygame.KEYDOWN:
if event.key == pygame.K_SPACE:
mario_vel[1] = -10

# Update the game objects
mario_vel[1] += 1
mario_pos[0] += mario_vel[0]
mario_pos[1] += mario_vel[1]
if mario_pos[1] > SCREEN_HEIGHT - 100:
    mario_pos[1] = SCREEN_HEIGHT - 100
    mario_vel[1] = 0
if mario_pos[0] < 0:
    mario_pos[0] = 0
if mario_pos[0] > SCREEN_WIDTH - 50:
    mario_pos[0] = SCREEN_WIDTH - 50
for brick in bricks:
    if mario_pos[0] + 50 > brick[0] and mario_pos[0] < brick[0] + 50 and mario_pos[1] + 100 > brick[1] and mario_pos[1] < brick[1] + 50:
        mario_pos[1] = brick[1] - 100
        mario_vel[1] = 0
for coin in coins:
    if mario_pos[0] + 50 > coin[0] and mario_pos[0] < coin[0] + 50 and mario_pos[1] + 100 > coin[1] and mario_pos[1] < coin[1] + 50:
        coins.remove(coin)

# Draw the game objects
screen.fill(BACKGROUND_COLOR)
pygame.draw.rect(screen, GROUND_COLOR, (ground_pos[0], ground_pos[1], SCREEN_WIDTH, 50))
for brick in bricks:
    pygame.draw.rect(screen, BRICK_COLOR, (brick[0], brick[1], 50, 50))
for coin in coins:
    pygame.draw.circle(screen, COIN_COLOR, (coin[0] + 25, coin[1] + 25), 25)
pygame.draw.rect(screen,

Godfrey-Ndungu pushed a commit to Godfrey-Ndungu/system-design-primer that referenced this pull request Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants