Calculate time dilation with python

In this example imagine two object one is Earth And another object is traveling in the space

\[ t_0 = t \sqrt{1 – \frac{v^2}{c^2}} \]
  • t0: Represents the dilated time experienced by the object which is traveling or seems traveling from earth
  • t: Time passed on earth
  • v: Velocity of the traveling object.
  • c: Speed of light in the vacuum.

Now back to our example. Here user will enter the time passed on earth and the speed of the traveling object. The program will calculate the time dilation.


from math import sqrt
c=299792458 #speed of light in m/s

t=eval(input("Enter the time passed on earth in year: "))
v=c
while not v<c:
	v=eval(input("Enter the speed of the object in m/s: "))
	if v>c:
		print("Speed of the object must be less than the speed of light:",c)
def time_dilation(c,v,t):
	t_0=t*sqrt(1-(v**2/c**2))
	return t_0
time_passed_to_object=time_dilation(c,v,t)
print("time passed to the object",time_passed_to_object," year")
print("time difference",t-time_passed_to_object," year")


For example if time pass on earth 20 years and the object is traveling in speed 7497924 m/s

The program will print this result based on user input

Enter the time passed on earth in year: 20
Enter the speed of the object in m/s: 7497924
time passed to the object 19.993743829255635  year
time difference 0.006256170744364908  year

How to convert text to sentence with python and nltk

We can easily convert text to sentence in python with nltk by tokenize sentence..

First install nltk

pip install nltk

Download nltk data .

NLTK requires data files for tokenization. run the code in a python program to download the data.


import nltk
nltk.download('punkt')


After download the necessary data


from nltk import tokenize

text="In the symphony of existence, we discover our interconnectedness and the boundless spiritual power within us. Together, we build a world where empathy thrives, sparking hope and lighting the way to a future filled with harmony and peace."

sentence_list=tokenize.sent_tokenize(text)
print(sentence_list)


#for sentence in sentence_list:
#	print(sentence)

for i, sentence in enumerate(sentence_list, start=1):
    print(f"Sentence {i}: {sentence}")


this will print the the result like this

['In the symphony of existence, we discover our interconnectedness and the boundless spiritual power within us.', 'Together, we build a world where empathy thrives, sparking hope and lighting the way to a future filled with harmony and peace.']
Sentence 1: In the symphony of existence, we discover our interconnectedness and the boundless spiritual power within us.
Sentence 2: Together, we build a world where empathy thrives, sparking hope and lighting the way to a future filled with harmony and peace.

How to get all possible combinations with python

Python is rich with wonderful standard library so you do not have to writ everything from the very beginning. With permutations from iterators we can get wonderful and useful result with less code

>In this example code we get the user input as string

> Get the user input length

> Then run a for loop based on the user input str length

> get the combinations with permutation with store the combination in a list

Like this

Enter your word or sentence or number: 123
['1', '2', '3', '12', '13', '21', '23', '31', '32', '123', '132', '213', '231', '312', '321']



from itertools import permutations
user_input=str(input("Enter your word or sentence or number: "))
l=len(user_input)+1
combinations=[]
for i in range(1,l):
	a=list(permutations(user_input,i))
	for element in a:
		x=(''.join(element))
		combinations.append(x)
print(combinations)


We can make this more wonderful to print out with pprint. Also print out all combinations from a list.


from itertools import permutations
from pprint import pprint
# flower names
flower_names = ["rose","orchid", "sunflower"]

l=len(flower_names)+1
combinations=[]
for i in range(1,l):
	a=list(permutations(flower_names,i))
	combinations.append(a)
pprint(combinations)


You will get this result on running this code

[[('rose',), ('orchid',), ('sunflower',)],
 [('rose', 'orchid'),
  ('rose', 'sunflower'),
  ('orchid', 'rose'),
  ('orchid', 'sunflower'),
  ('sunflower', 'rose'),
  ('sunflower', 'orchid')],
 [('rose', 'orchid', 'sunflower'),
  ('rose', 'sunflower', 'orchid'),
  ('orchid', 'rose', 'sunflower'),
  ('orchid', 'sunflower', 'rose'),
  ('sunflower', 'rose', 'orchid'),
  ('sunflower', 'orchid', 'rose')]]

Easy Temperature Conversions with Python: A Beginner’s Guide (Celsius, Fahrenheit, Kelvin)

Basic Temperature Conversion Program

This program takes a temperature input from the user, identifies the scale (Celsius, Fahrenheit, Kelvin), and converts it to the other two scales. Let’s break down the code step-by-step.

For higher accuracy in the Kelvin scale use 273.15 instead of 273


x = str(input("Enter in which scale you measured temperature (Celsius, Fahrenheit, Kelvin)? Enter C or F or K: "))
# 160 is 5*32  .... equations are simplified
if x=="C" or x=="c":
    c=eval(input("Enter your temperature in Celsius scale: "))
    to_fahrenheit=(9*c+160)/5
    to_kelvin=c+273
    print("Celsius :", c,  "\nFahrenheit :", to_fahrenheit,  "\nKelvin: ", to_kelvin)
    
elif x=="F" or x=="f":
    f=eval(input("Enter your temperature in Fahrenheit scale: "))
    to_celsius=(5*f-160)/9
    to_kelvin=((5*f-160)/9)+273
    print("Celsius :", to_celsius,  "\nFahrenheit :", f,  "\nKelvin: ", to_kelvin)
    

elif x== "K" or x=="k":
    k=eval(input("Enter your temperature in Kalvin scale: "))
    to_celsius=k-273
    to_fahrenheit=(9*(k-273)+160)/5
    print("Celsius :", to_celsius,  "\nFahrenheit :", to_fahrenheit,  "\nKelvin: ", k)



Explanation

>Firstly the this code takes input from user in which scale user measured the temperature

>Then user asked for another input in which scale they want to convert

  • The user is prompted to enter the temperature scale: ‘C’ for Celsius, ‘F’ for Fahrenheit, or ‘K’ for Kelvin.
  • Conversion Calculations:
  • Depending on the input scale, the program calculates the temperature in the other two scales using the following formulas:

Celsius to Fahrenheit:

\[ F = \frac{9}{5}C + 32 \]

Celsius to Kelvin:

\[ K = C + 273 \]

Fahrenheit to Celsius:

\[ C = \frac{5}{9}(F – 32) \]

Fahrenheit to Kelvin:

\[ K = \frac{5}{9}(F – 32) + 273 \]

Kelvin to Celsius:

\[ C = K – 273 \]

Kelvin to Fahrenheit:

\[ F = \frac{9}{5}(K – 273) + 32 \]

Complete code with some added feature


x = str(input("Enter in which scale you measured temperature (Celsius, Fahrenheit, Kelvin)? Enter C or F or K: "))
# 160 is 5*32  .... equations are simplified
if x == "C" or x == "c":
    c = eval(input("Enter your temperature in Celsius scale: "))
    to_fahrenheit = (9 * c + 160) / 5
    to_kelvin = c + 273
    while to_kelvin < 0:
        print("Temperature cannot be less than absolute zero")
        c = eval(input("Enter your temperature in Celsius scale: "))
        to_fahrenheit = (9 * c + 160) / 5
        to_kelvin = c + 273
    print("Celsius:", c, "\nFahrenheit:", to_fahrenheit, "\nKelvin:", to_kelvin)
    
elif x == "F" or x == "f":
    f = eval(input("Enter your temperature in Fahrenheit scale: "))
    to_celsius = (5 * f - 160) / 9
    to_kelvin = ((5 * f - 160) / 9) + 273
    while to_kelvin < 0:
        print("Temperature cannot be less than absolute zero")
        f = eval(input("Enter your temperature in Fahrenheit scale: "))
        to_celsius = (5 * f - 160) / 9
        to_kelvin = ((5 * f - 160) / 9) + 273
    print("Celsius:", to_celsius, "\nFahrenheit:", f, "\nKelvin:", to_kelvin)
    
elif x == "K" or x == "k":
    k = eval(input("Enter your temperature in Kelvin scale: "))
    while k < 0:
        print("Temperature cannot be less than absolute zero")
        k = eval(input("Enter your temperature in Kelvin scale: "))
    to_celsius = k - 273
    to_fahrenheit = (9 * (k - 273) + 160) / 5
    print("Celsius:", to_celsius, "\nFahrenheit:", to_fahrenheit, "\nKelvin:", k)




How to get current time from browser in JavaScript

Current Time From Browser

The current time is:



We can get the current time with built- in JavaScript object Date

To get the time we have to create the Date object first simply like this

let currentDateTime = new Date();

As we created the date object

we can console.log to get the result

console.log(currentDateTime);

We get the result like this.

Sun Jun 16 2024 10:26:41 GMT+0600 (Bangladesh Standard Time)

we can separate the date in hour minute and seconds

let currentDateTime = new Date();

// Extract hours, minutes, and seconds from the current date and time


let currentHours = currentDateTime.getHours();
let currentMinutes = currentDateTime.getMinutes();
let currentSeconds = currentDateTime.getSeconds();

example code

// Step 1: Create a Date object
let currentDateTime = new Date();

// Step 2: Display the current date and time
console.log(currentDateTime);

// Step 3: Get the current hour, minute, and second
let currentHours = currentDateTime.getHours();
let currentMinutes = currentDateTime.getMinutes();
let currentSeconds = currentDateTime.getSeconds();

// Step 4: Display the hour, minute, and second
console.log('Current Hours: ' + currentHours);
console.log('Current Minutes: ' + currentMinutes);
console.log('Current Seconds: ' + currentSeconds);

A complete example where time gets from browser and update every second



<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Real-Time Current Time Display Example</title>
    <script>
        // Function to retrieve and display the current time
        function getCurrentTimeAndDisplay() {
            // Create a new Date object to get the current date and time
            let currentDateTime = new Date();

            // Extract hours, minutes, and seconds from the current date and time
            let currentHours = currentDateTime.getHours();
            let currentMinutes = currentDateTime.getMinutes();
            let currentSeconds = currentDateTime.getSeconds();

            // Format hours, minutes, and seconds to ensure they are always two digits
            currentHours = currentHours < 10 ? '0' + currentHours : currentHours;
            currentMinutes = currentMinutes < 10 ? '0' + currentMinutes : currentMinutes;
            currentSeconds = currentSeconds < 10 ? '0' + currentSeconds : currentSeconds;

            // Construct the time string in HH:MM:SS format
            let formattedTimeString = currentHours + ':' + currentMinutes + ':' + currentSeconds;

            // Display the formatted time string in an HTML element with id "currentTimeDisplay"
            document.getElementById('currentTimeDisplay').textContent = formattedTimeString;
        }

        // Update the displayed time every second (1000 milliseconds)
        setInterval(getCurrentTimeAndDisplay, 1000);
    </script>
</head>
<body>
    <h1>Real-Time Current Time Display</h1>
    <p>The current time is: <span id="currentTimeDisplay"></span></p>
</body>
</html>


    
    
    

You can Copy the example code and practice the code directly here

Expiring Links Tutorial: Python Flask One-Time Link Generator

One time links are essential where users want to share resources with co-worker or friend’s effortlessly but at the same time restrict other from access.

Its works best because the link automatically inactive if some one go to the link for the first time. That means the same link will not work for the second time. or for other user.

Also we can set time so if no one enters the link it will automatically inactive after the specific time.

Now begin our program

  1. first the user will generate the link. and share..
  2. Other user will go to link and get access.
  3. the link(token) will be deleted from the active token list so it will not work anymore
  4. If no one access the link it will automatically remove from the shared link after specific time.

Generate link

we will use python secrets library to generate the unique token for the link

def generate_token():
    return secrets.token_urlsafe(16)

this is existing users list.( its example for the users who have account)


main_user_ids = ['user1', 'user2', 'user3']

So this users will be able to create the link for friends and co-workers

we will store the active token in python dictionary right now. For real world application you can use database like sql, mongodb or whatever you want

active_tokens = {}

This is code what the main users will get in the browser. You can use render template and place hte index.html in the template folder. but for simplicity we applied it directly.

@app.route('/', methods=['GET'])
def index():
    #return render_template('index.html')
    return """
    <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Generate Connection Link</title>
</head>
<body>
    <h1>Generate Connection Link</h1>
    <form action="/generate_link" method="post">
        <label for="user_id">Enter User ID:</label><br>
        <input type="text" id="user_id" name="user_id"><br><br>
        <input type="submit" value="Generate Link">
    </form>
</body>
</html>
"""

Here the main users will enter the user name and generate the link on behalf of them

This is the second part of the code where generate the key from the previous code form action generate link

from datetime import datetime, timedelta
TOKEN_EXPIRY_DURATION = timedelta(hours=1)

# Route to generate a connection link
@app.route('/generate_link', methods=['POST'])
def generate_link():
    user_id = request.form.get('user_id') if request.form.get('user_id') in main_user_ids else None
    if user_id:
        token = generate_token()
        expiry_time = datetime.now() + TOKEN_EXPIRY_DURATION
        active_tokens[token] = (user_id, expiry_time)
        return f"Generated link from user {user_id}: <a href='/connect/{token}'>Click here to connect</a>"  # Return the generated token to the user
    else:
        return "Invalid user ID"

Here in the server side get the user name from the user . if user name exists then create an unique token and link on behalf of the user

Next part Verify the users access



# Route to handle the connection link
@app.route('/connect/<token>', methods=['GET'])
def connect(token):
    if token in active_tokens:
        user_id, expiry_time = active_tokens[token]
        if datetime.now() < expiry_time:
            # Connection successful, do something with the user_id
            del active_tokens[token]  # Mark the token as used
            return f"You have grant access by {user_id}"
        else:
            return "Token expired"
    else:
        return "Invalid token"

In this part the link is received from the user and verify if that exist. if exist and have expiration time . It grant the permission to that user and delete link(token) from the active tokens.

The complete code


from flask import Flask, request, redirect, url_for, render_template
from datetime import datetime, timedelta
import secrets

app = Flask(__name__)

# Active tokens and their expiry times
active_tokens = {}

# Duration for the token to remain valid (e.g., 1 hour)
TOKEN_EXPIRY_DURATION = timedelta(hours=1)

# Main user IDs
main_user_ids = ['user1', 'user2', 'user3']

# Function to generate a unique token
def generate_token():
    return secrets.token_urlsafe(16)

# Route to render the form
@app.route('/', methods=['GET'])
def index():
    #return render_template('index.html')
    return """
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Generate Connection Link</title>
</head>
<body>
    <h1>Generate Connection Link</h1>
    <form action="/generate_link" method="post">
        <label for="user_id">Enter Your User ID( this represents the main users in the main usrs list. enter a name from the uses list main_user_id for example <b>user1</b> :</label><br>
        <input type="text" id="user_id" name="user_id"><br><br>
        <input type="submit" value="Generate Link">
    </form>
</body>
</html>
"""

# Route to generate a connection link
@app.route('/generate_link', methods=['POST'])
def generate_link():
    user_id = request.form.get('user_id') if request.form.get('user_id') in main_user_ids else None
    if user_id:
        token = generate_token()
        expiry_time = datetime.now() + TOKEN_EXPIRY_DURATION
        active_tokens[token] = (user_id, expiry_time)
        return f"Generated link from user {user_id}: <a href='/connect/{token}'>Click here to connect</a>"  # Return the generated token to the user
    else:
        return "Invalid user ID"



# Route to handle the connection link
@app.route('/connect/<token>', methods=['GET'])
def connect(token):
    if token in active_tokens:
        user_id, expiry_time = active_tokens[token]
        if datetime.now() < expiry_time:
            # Connection successful
            del active_tokens[token]  # Mark the token as used
            return f"You have grant access by {user_id}"
        else:
            return "Token expired"
    else:
        return "Invalid token"

if __name__ == '__main__':
    app.run(debug=True)



Converting Between Python Dictionaries and JSON

We will use json.dums() function to convert to json from python dictionary and json.loads() to convert from json to python dictionary.

In this example code we used flower details data in python dictionary and converted it to json.


import json

# flowers in python dictionary
flowers = {
    "rose": {
        "scientific_name": "Rosa",
        "grows_in": ["gardens", "wild"],
        "colors": ["red", "pink", "white"]
    },
    "sunflower": {
        "scientific_name": "Helianthus annuus",
        "grows_in": ["fields", "gardens"],
        "colors": ["yellow"]
    }
}

# Converting Python dictionary to JSON

flowers_json = json.dumps(flowers)
# converted to json
print(flowers_json)



# we can add indent to make it more readable
flowers_json = json.dumps(flowers, indent=4)
print(flowers_json)





# Now convert json to python dictionary
#fowers_json is alreay in json

flowers_dict = json.loads(flowers_json)
#converted to python dictionary
print(flowers_dict)



Exporting Python Dictionaries to JSON Files

we can also export this python dictionary data to json


import json

# flowers in python dictionary
flowers = {
    "rose": {
        "scientific_name": "Rosa",
        "grows_in": ["gardens", "wild"],
        "colors": ["red", "pink", "white"]
    },
    "sunflower": {
        "scientific_name": "Helianthus annuus",
        "grows_in": ["fields", "gardens"],
        "colors": ["yellow"]
    }
}

# Converting Python dictionary to JSON

flowers_json = json.dumps(flowers)

# Exporting Python dictionary to a JSON file
with open("flowers.json", "w") as json_file:
    json.dump(flowers, json_file, indent=4)


Loading JSON Data from Files into Python Dictionaries


# Loading JSON data from a file into Python dictionary
import json
with open("flowers.json", "r") as json_file:
	#convert to python dictionary with json.load()
    loaded_flowers_dictionary = json.load(json_file)

print(loaded_flowers_dictionary)



Optimize Website Performance: Pause Media Playback on Inactive Tabs

How pause media playback on inactive tabs can be very very useful?

By using visibilitychange event, its possible stop playback when user move to another browser tab or inactive. So we can save bandwidth and which can be used for active users to give them the best quality uninterrupted media playback. Because in streaming platform high bandwidth is the main challenging issue.

The Big Benefit of Pausing Media in Inactive Tabs

Pausing media playback in inactive tabs can be a surprisingly useful feature, especially for streaming platforms. Here’s how it benefits both users and the platform itself.

Reduced Bandwidth Consumption

By stopping media playback when a user switches to another tab, you can significantly reduce bandwidth usage. This is particularly important for streaming services, where high bandwidth is crucial for maintaining smooth playback. Lower overall bandwidth consumption frees up resources for active users, ensuring they experience uninterrupted high-quality streams.

Improved User Experience (For Most)

While some users might prefer media to continue playing in the background, many appreciate the ability to conserve bandwidth. This is especially true for users on limited data plans or those with unreliable internet connections. Pausing inactive tabs also helps to prevent unnecessary battery drain on mobile devices.

Making the Choice – User Research is Key

As a developer, it’s important to understand your user base. Conducting user research can help you determine whether implementing this feature aligns with your target audience’s needs. You can then offer the option to enable or disable pausing media in inactive tabs, giving users more control over their experience.

This is the example code you can test by yourself. This code shows when the tab is visible and when not. By determining the tab visibility its easy to pause and resume media. … You have to write simple function for this..



<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tab Activity Detection</title>
<script>
  // Function to handle tab visibility change
  function handleVisibilityChange() {
    var listElement = document.getElementById('activityList');
    var activity = document.hidden ? 'Inactive' : 'Active';
    var entry = document.createElement('li');
    entry.textContent = activity + ' - ' + new Date().toLocaleString();
    listElement.appendChild(entry);
  }

  // Add event listener for visibility change
  document.addEventListener('visibilitychange', handleVisibilityChange);

  // Initial setup based on tab visibility
  window.onload = handleVisibilityChange;
</script>
</head>
<body>
  <h1>Tab Activity Detection</h1>
  <p>This page logs tab activity as a list.</p>
  <ul id="activityList"></ul>
</body>
</html>



To test this. copy the code and run this code.

This code shows the result when the tab is visible and when not. And with this result we can pause and resume media playback and also other functions.

Go to another tab and back to this tab to get the result… tab visibility( when the tab was visible or not)

Tab Activity Detection

Tab Activity Detection

This page logs tab activity as a list.

    Play the audio and go to another tab and it will pause automatically

    Media Playback Example

    The complete code for this

    
    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Media Playback Example</title>
    </head>
    <body>
    
      <!-- Audio element with controls -->
      <audio id="myAudio" controls>
        <!-- Source of the audio file -->
        <source src="https://upload.wikimedia.org/wikipedia/commons/5/5b/Ludwig_van_Beethoven_-_symphony_no._5_in_c_minor%2C_op._67_-_iii._allegro.ogg" type="audio/mpeg"> 
      </audio>
    
    <script>
      // Wait for DOM content to be loaded
      document.addEventListener("DOMContentLoaded", function() {
        // Get the audio element by its ID
        const audio = document.getElementById("myAudio");
        let playingOnHide = false;
    
        // Event listener for visibility change
        document.addEventListener("visibilitychange", () => {
          // Check if document is hidden
          if (document.hidden) {
            // Pause audio when document is hidden
            playingOnHide = !audio.paused; // Check if audio was playing before hiding
            audio.pause(); // Pause audio playback
          } else {
            // Resume audio playback when document becomes visible
            if (playingOnHide) {
              audio.play(); // Resume playback if audio was playing before hiding
            }
          }
        });
      });
    </script>
    
    </body>
    </html>
    
    
    

    Add, Delete, and Update Accounts in Ubuntu from Terminal

    Single user account on a shared computer can be a security issue? Using multiple user accounts in Ubuntu is a powerful way to improve both security and workflow organization. Separating work documents from personal files, restricting access to sensitive data for different users, and simplifying collaboration with colleagues. Most importantly, using a single root account for everyday tasks creates a significant security risk. Accidental data deletion or accidental compromised program installation with root privileges could have devastating consequences.

    Adding new user

    Set your username.

    
    sudo adduser username
    
    
    

    When adding new user you can just add the password and skip other requirements like complete name and address and other things if thats not necessary for you.

    Removing user

    
    sudo userdel username
    
    
    

    Delete everything of the user including files

    
    sudo userdel -r username
    
    
    

    Grant the user sudo privilege ( user can install and and change everything)

    
    sudo usermod -aG sudo username
    
    
    

    To remove sudo privilege

    
    sudo deluser username sudo
    
    
    

    Update username of a user

    
    sudo usermod -l newname previousname
    
    
    

    Send Desktop notification from pygame

    For notification handling we will use plyer library

    pip install plyer

    We will add this functionality in our pygame code

    • When the user add ther notification button it will show the notification

    The complete code

    
    import pygame
    import sys
    from pygame.locals import *
    from plyer import notification
    
    pygame.init()
    
    clock = pygame.time.Clock()
    user_display = pygame.display.Info()
    width, height = 800, 600
    screen = pygame.display.set_mode((width, height))
    
    background = (255, 255, 255)
    red = (255, 0, 0)
    cornflower_blue = (128, 149, 255)
    button_color = cornflower_blue
    button_width, button_height = 250, 40
    button_x = (width - button_width) // 2
    button_y = (height - button_height) // 2
    
    button_rect = pygame.Rect(button_x, button_y, button_width, button_height)
    
    
    def button():
        pygame.draw.rect(screen, button_color, button_rect, border_radius=10)
        button_font = pygame.font.Font(pygame.font.get_default_font(), 20)
        button_text = button_font.render('Notification Button', True, (0, 0, 0))
        text_rect = button_text.get_rect(center=button_rect.center)
        screen.blit(button_text, text_rect)
    
    
    game_running = True
    while game_running:
        clock.tick(60)
        for event in pygame.event.get():
            if event.type == QUIT:
                pygame.quit()
                sys.exit()
            if event.type == pygame.MOUSEBUTTONDOWN and event.button == 1:
                if button_rect.collidepoint(event.pos):
                    notification.notify(title='Notification', message='Notification From Pygame')
                    print("notification sent")
    
            if event.type == pygame.MOUSEMOTION:
                if button_rect.collidepoint(event.pos):
                    button_color = red
                else:
                    button_color = cornflower_blue
    
        screen.fill(background)
        button()
        pygame.display.update()
    
    
    

    Get More pygame examples including this example from github

    https://github.com/01one/pygameExamples