-
Notifications
You must be signed in to change notification settings - Fork 963
Refactor snake game #412
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
Closed
Closed
Refactor snake game #412
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5b8b1a1
Translate README files to Korean
google-labs-jules[bot] a6620c0
Translate README files to Korean
google-labs-jules[bot] af3b0fe
Update README.md
partrita b98e531
Merge pull request #1 from partrita/translate-docs
partrita 8015222
I am formatting your Python code with black and adding type hints wit...
google-labs-jules[bot] 0e90848
Merge pull request #2 from partrita/format-and-type-hint
partrita 76d0b7d
Refactor snake game code for better readability
google-labs-jules[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
ART SCRIPTS/Images to PDF/images-to-pdf.py
This file contains hidden or 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
4 changes: 2 additions & 2 deletions
ART SCRIPTS/image-ascii/image.py
This file contains hidden or 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import pywhatkit | ||
pywhatkit.image_to_ascii_art( | ||
'flo.jpg', 'flo.text') | ||
|
||
pywhatkit.image_to_ascii_art("flo.jpg", "flo.text") |
14 changes: 7 additions & 7 deletions
ART SCRIPTS/pencilSketch/main.py
This file contains hidden or 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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
import cv2 | ||
|
||
#reading image | ||
#reading image | ||
image = cv2.imread("res/girl3.jpg") | ||
|
||
#converting BGR image to grayscale | ||
#cvtColor -> https://docs.opencv.org/3.4/d8/d01/group__imgproc__color__conversions.html#ga397ae87e1288a81d2363b61574eb8cab | ||
#converting BGR image to grayscale | ||
#cvtColor -> https://docs.opencv.org/3.4/d8/d01/group__imgproc__color__conversions.html#ga397ae87e1288a81d2363b61574eb8cab | ||
gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) | ||
|
||
#image invert | ||
#image invert | ||
inverted_image = 255 - gray_image | ||
|
||
#blurring image | ||
#GaussianBlur -> https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#gaabe8c836e97159a9193fb0b11ac52cf1 | ||
#blurring image | ||
#GaussianBlur -> https://docs.opencv.org/master/d4/d86/group__imgproc__filter.html#gaabe8c836e97159a9193fb0b11ac52cf1 | ||
blurred_image = cv2.GaussianBlur(gray_image, (43, 43), 0) | ||
pencil_sketch = cv2.divide(gray_image, blurred_image, scale=250.0) | ||
|
||
cv2.imshow("Original Image", image) | ||
cv2.imshow("Pencil Sketch", pencil_sketch) | ||
cv2.waitKey(0) | ||
cv2.waitKey(0) |
7 changes: 4 additions & 3 deletions
AUDIO RELATED SCRIPTS/Audio Captcha Generator/code.py
This file contains hidden or 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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
from captcha.audio import AudioCaptcha | ||
from random import randint | ||
|
||
audio = AudioCaptcha() | ||
num = randint(100000,999999) | ||
num = randint(100000,999999) | ||
data = audio.generate(str(num)) | ||
audio.write(str(num), str(num)+'.mp3') | ||
print(num) | ||
audio.write(str(num), str(num) + ".mp3") | ||
print(num) |
This file contains hidden or 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 |
---|---|---|
|
@@ -12,4 +12,4 @@ | |
text = page.extractText() | ||
speak = pyttsx3.init() | ||
speak.say(text) | ||
speak.runAndWait() | ||
speak.runAndWait() |
This file contains hidden or 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
8 changes: 4 additions & 4 deletions
AUDIO RELATED SCRIPTS/texttoaudio/code.py
This file contains hidden or 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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
from gtts import gTTS | ||
from playsound import playsound | ||
|
||
audio='speech.mp3' | ||
audio = "speech.mp3" | ||
playsound(audio) | ||
lang='en' | ||
text="hELLO, OPEN SOURCE!" | ||
sp=gTTS(text=text,lang=lang,slow=False) | ||
lang = "en" | ||
text = "hELLO, OPEN SOURCE!" | ||
sp = gTTS(text=text,lang=lang,slow=False) | ||
sp.save(audio) |
This file contains hidden or 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
11 changes: 11 additions & 0 deletions
AUTOMATION/AutoMoveFiles/README_ko.md
This file contains hidden or 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,11 @@ | ||
# AutoMoveFiles | ||
스크립트는 추적된 폴더에서 대상 폴더로 파일을 자동으로 이동합니다. | ||
|
||
## 시작하기 | ||
- `pip install watchdog` 또는 `poetry add watchdog` | ||
- `cd AutoMoveFiles` | ||
- `python -m AutoMoveFiles.py` | ||
- 소스 폴더 경로 입력 | ||
> 예: `C:\Users\example\Downloads` | ||
- 대상 폴더 경로 입력 | ||
> 예: `C:\Users\example\Documents` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.