Skip to content

Instantly share code, notes, and snippets.

View Pro496951's full-sized avatar
🎯
Busy

Pro496951

🎯
Busy
View GitHub Profile
@melmsie
melmsie / items.txt
Last active April 15, 2021 02:49
Loot Box Possible Items + Amounts:
Normie box:
sand: 1
cookie: 3
banknote: 1
Meme box:
phone: 1
tidepod: 1
fakeid: 1
sand: 1
@Pro496951
Pro496951 / Recursion
Last active July 3, 2020 14:04
This is a small gist about Recursion in python
# Definition OF Recusrsion
Recursion is a common mathematical and programming concept. It means that a function calls itself. This has the benefit of meaning that you can loop through data to reach a result.
The developer should be very careful with recursion as it can be quite easy to slip into writing a function which never terminates, or one that uses excess amounts of memory or processor power. However, when written correctly recursion can be a very efficient and mathematically-elegant approach to programming.
In this example, tri_recursion() is a function that we have defined to call itself ("recurse"). We use the k variable as the data, which decrements (-1) every time we recurse. The recursion ends when the condition is not greater than 0 (i.e. when it is 0).
To a new developer it can take some time to work out how exactly this works, best way to find out is by testing and modifying it.
Here"s An Example Code :
def tri_recursion(k):
@Pro496951
Pro496951 / Auto Clicker.py
Last active May 12, 2020 11:59
This is an Auto Clicker Created Using Python.Don't Forget To Star this Gist And Follow Me This is My First Ever program in Python. But It will take an synatx error.To Fix it go here : https://nitratine.net/blog/post/how-to-setup-pythons-pip/
import time
import threading
from pynput.mouse import Button, Controller
from pynput.keyboard import Listener, KeyCode
delay = 0.001
button = Button.left
start_stop_key = KeyCode(char='s')
exit_key = KeyCode(char='e')
@Pro496951
Pro496951 / Flappy Bird.html
Last active March 20, 2024 14:55
Basic Flappy bird game.this is not missing anything except the score counter
<html>
<head>
<title>Flappy Bird</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Permanent Marker' rel='stylesheet'>
@straker
straker / README.md
Last active February 24, 2024 15:01
Basic Bomberman HTML and JavaScript Game

Basic Bomberman HTML and JavaScript Game

This is a basic implementation of the NES game Bomberman, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Player death
  • The player should die when it is hit by an explosion from a bomb
@sanchitgangwar
sanchitgangwar / snake.py
Created March 22, 2012 12:38
Snakes Game using Python
# SNAKES GAME
# Use ARROW KEYS to play, SPACE BAR for pausing/resuming and Esc Key for exiting
import curses
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN
from random import randint
curses.initscr()
win = curses.newwin(20, 60, 0, 0)