repo stringlengths 7 90 | file_url stringlengths 81 315 | file_path stringlengths 4 228 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:38:15 2026-01-05 02:33:18 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/love_turtle.py | love_turtle.py | import turtle
def heart_red():
t = turtle.Turtle()
turtle.title("I Love You")
screen = turtle.Screen()
screen.bgcolor("white")
t.color("red")
t.begin_fill()
t.fillcolor("red")
t.left(140)
t.forward(180)
t.circle(-90, 200)
t.setheading(60) # t.left
t.circle(-90, 200)
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/totaldigits.py | totaldigits.py | # To Find The Total Number Of Digits In A Number
N = int(input("Enter The number")) # To remove zeros before the number
count = len(str(N))
print(count)
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Battery_notifier.py | Battery_notifier.py | from plyer import notification # pip install plyer
import psutil # pip install psutil
# psutil.sensors_battery() will return the information related to battery
battery = psutil.sensors_battery()
# battery percent will return the current battery prcentage
percent = battery.percent
charging = battery.power_plugged
#... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/ftp_send_receive.py | ftp_send_receive.py | """
File transfer protocol used to send and receive files using FTP server.
Use credentials to provide access to the FTP client
Note: Do not use root username & password for security reasons
Create a seperate user and provide access to a home directory of the user
Use login id and password of the u... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/cricket_live_score.py | cricket_live_score.py | from urllib.request import urlopen as uReq
from bs4 import BeautifulSoup as soup
my_url = "http://www.cricbuzz.com/"
Client = uReq(my_url)
html_page = Client.read()
Client.close()
soup_page = soup(html_page, "html.parser")
score_box = soup_page.findAll("div", {"class": "cb-col cb-col-25 cb-mtch-blk"})
score_box_le... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/osinfo.py | osinfo.py | # Script Name : osinfo.py
# Authors : {'geekcomputers': 'Craig Richards', 'dmahugh': 'Doug Mahugh','rutvik1010':'Rutvik Narayana Nadimpally','y12uc231': 'Satyapriya Krishna', 'minto4644':'Mohit Kumar'}
# Created : 5th April 2012
# Last Modified : July 19 2016
# Version : 1.0
# Modification 1 : Changed the ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/decimal to binary.py | decimal to binary.py | def decimalToBinary(num):
"""This function converts decimal number
to binary and prints it"""
if num > 1:
decimalToBinary(num // 2)
print(num % 2, end="")
# decimal number
number = int(input("Enter any decimal number: "))
decimalToBinary(number)
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Infix_to_Postfix.py | Infix_to_Postfix.py | # Python program to convert infix expression to postfix
# Class to convert the expression
class Conversion:
# Constructor to initialize the class variables
def __init__(self, capacity):
self.top = -1
self.capacity = capacity
# This array is used a stack
self.array = []
#... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Armstrong_number.py | Armstrong_number.py | """
In number theory, a narcissistic number (also known as a pluperfect digital invariant (PPDI), an Armstrong number (after Michael F. Armstrong) or a plus perfect number),
in a given number base b, is a number that is the total of its own digits each raised to the power of the number of digits.
Source: https://en.wik... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Crack_password.py | Crack_password.py | from random import *
user_pass = input("Enter your password: ")
password = [
"a",
"b",
"c",
"d",
"e",
"f",
"g",
"h",
"i",
"j",
"k",
"l",
"m",
"n",
"o",
"p",
"q",
"r",
"s",
"t",
"u",
"v",
"w",
"x",
"y",
"z",
"A",... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/calci2.py | calci2.py | prices = [22.3, 6.66, 9.22]
total = sum(prices)
print(total)
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/fibonacci.py | fibonacci.py | # Fibonacci tool
# This script only works with Python3!
import time
def getFibonacciIterative(n: int) -> int:
"""
Calculate the fibonacci number at position n iteratively
"""
a = 0
b = 1
for _ in range(n):
a, b = b, a + b
return a
def getFibonacciRecursive(n: int) -> int:
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/loader.py | loader.py | """
Shaurya Pratap Singh
@shaurya-blip
Shows loading message while doing something.
"""
import itertools
import threading
import time
import sys
# The task is not done right now
done = False
def animate(message="loading", endmessage="Done!"):
for c in itertools.cycle(["|", "/", "-", "\\"]):
if done:
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/diamond.py | diamond.py | def draw_diamond(n):
if n % 2 != 0:
k = 1
while k <= n:
print(" " * int((n - k) / 2) + "*" * k + " " * int((n - k) / 2))
k += 2
j = 1
while (n - 2 * j) >= 1:
print(" " * j + "*" * (n - 2 * j) + " " * (j))
j += 1
else:
print... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/bookstore_manangement_system.py | bookstore_manangement_system.py | import os
import mysql.connector as mys
mycon = mys.connect(
host="localhost", user="root", passwd="Yksrocks", database="book_store_management"
)
if mycon.is_connected():
print()
print("successfully connected")
mycur = mycon.cursor()
def DBZ():
# IF NO. OF BOOKS IS ZERO(0) THAN DELE... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/nslookup_check.py | nslookup_check.py | # Script Name : nslookup_check.py
# Author : Craig Richards
# Created : 5th January 2012
# Last Modified :
# Version : 1.0
# Modifications :
# Description : This very simple script opens the file server_list.txt and then does a nslookup for each one to check the DNS entry
import subprocess # Import th... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Pomodoro (tkinter).py | Pomodoro (tkinter).py | from tkinter import *
# ---------------------------- CONSTANTS & GLOBALS ------------------------------- #
PINK = "#e2979c"
GREEN = "#9bdeac"
FONT_NAME = "Courier"
DEFAULT_WORK_MIN = 25
DEFAULT_BREAK_MIN = 5
# Background color options
bg_colors = {
"Pink": "#e2979c",
"Green": "#9bdeac",
"Blue": "#1f75fe",... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Sanke-water-gun game.py | Sanke-water-gun game.py | # author: slayking1965 (refactored for Python 3.13.7 with typing & doctests)
"""
Snake-Water-Gun Game.
Rules:
- Snake vs Water → Snake drinks water → Snake (computer) wins
- Gun vs Water → Gun sinks in water → Water (user) wins
- Snake vs Gun → Gun kills snake → Gun wins
- Same choice → Draw
This module implements a... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/four_digit_num_combination.py | four_digit_num_combination.py | """small script to learn how to print out all 4-digit num"""
# ALL the combinations of 4 digit combo
def four_digit_combinations():
"""print out all 4-digit numbers in old way"""
numbers = []
for code in range(10000):
code = str(code).zfill(4)
print(code)
numbers.append(code)
# S... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/psunotify.py | psunotify.py | from __future__ import print_function
import re
import mechanize
import urllib2
br = mechanize.Browser()
br.addheaders = [
(
"User-Agent",
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36",
)
]
br.set_handle_robots(False)
# For page ex... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Guessing_Game.py | Guessing_Game.py | from random import randint
from time import sleep
def guessing_game(GUESS_RANGE, GUESS_LIMIT):
# Set the initial values.
RANDOM = randint(1, GUESS_RANGE)
GUESS = int(input("What is your guess? "))
ATTEMPTS_ALLOWED = GUESS_LIMIT
done = False
# Validate the inputted guess.
GUESS = InputVali... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Web_Scraper.py | Web_Scraper.py | """
Author: Chayan Chawra
git: github.com/Chayan-19
Requirements: selenium, BeautifulSoup
"""
from bs4 import BeautifulSoup
from selenium import webdriver
import time
# url of the page we want to scrape
url = "https://www.naukri.com/top-jobs-by-designations# desigtop600"
# initiating the webdriver. Parameter include... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Extract_Text_from_image.py | Extract_Text_from_image.py | # extract text from a img and its coordinates using the pytesseract module
import cv2
import pytesseract
# You need to add tesseract binary dependency to system variable for this to work
img = cv2.imread("img.png")
# We need to convert the img into RGB format
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
hI, wI, k = im... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/sqlite_table_check.py | sqlite_table_check.py | # Script Name : sqlite_table_check.py
# Author : Craig Richards
# Created : 07 June 2013
# Last Modified :
# Version : 1.0
# Modifications :
# Description : Checks the main SQLITE database to ensure all the tables should exist
import os
import sqlite3
dropbox = os.getenv("dropbox")
config = os.getenv("my_config... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/ping_servers.py | ping_servers.py | from __future__ import print_function
import os # Load the Library Module
import subprocess # Load the Library Module
import sys # Load the Library Module
# Script Name : ping_servers.py
# Author : Craig Richards
# Created : 9th May 2012
# Last Modified : 14th May 2012
# Version : 1.1
# Modifications :... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/binary_search_tree.py | binary_search_tree.py | class Node:
"""Class for node of a tree"""
def __init__(self, info):
"""Initialising a node"""
self.info = info
self.left = None
self.right = None
# self.level = None
def __str__(self):
return str(self.info)
def __del__(self):
del self
class B... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/AREA OF TRIANGLE.py | AREA OF TRIANGLE.py | # Python Program to find the area of triangle
# calculates area of traingle in efficient way!!
a = 5
b = 6
c = 7
# Uncomment below to take inputs from the user
# a = float(input('Enter first side: '))
# b = float(input('Enter second side: '))
# c = float(input('Enter third side: '))
# calculate the semi-perimeter
s =... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/QuadraticCalc.py | QuadraticCalc.py | # GGearing
# 02/10/2017
# Simple script to calculate the quadratic formula of a sequence of numbers and
# recognises when the sequence isn't quadratic
def findLinear(numbers): # find a & b of linear sequence
a = numbers[1] - numbers[0]
a1 = numbers[2] - numbers[1]
if a1 == a:
b = numbers[0] - a
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Multiply.py | Multiply.py | def product(a, b):
if a < b:
return product(b, a)
elif b != 0:
return a + product(a, b - 1)
else:
return 0
a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
print("Product is: ", product(a, b))
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/To find the largest number between 3 numbers.py | To find the largest number between 3 numbers.py | # Python program to find the largest number among the three input numbers
a = []
for i in range(3):
a.append(int(input()))
print("The largest among three numbers is:", max(a))
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/FizzBuzz.py | FizzBuzz.py | # FizzBuzz
# A program that prints the numbers from 1 to num (User given number)!
# For multiples of ‘3’ print “Fizz” instead of the number.
# For the multiples of ‘5’ print “Buzz”.
# If the number is divisible by both 3 and 5 then print "FizzBuzz".
# If none of the given conditions are true then just print the number!... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/loops.py | loops.py | # 2 loops
# for loop:
"""
Syntax..
-> "range" : starts with 0.
-> The space after the space is called as identiation, python generally identifies the block of code with the help of indentation,
indentation is generally 4 spaces / 1 tab space..
for <variable> in range(<enter the range>):
statements you want to e... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/length.py | length.py | # User inputs the string and it gets stored in variable str
str = input("Enter a string for str leangth : ")
# counter variable to count the character in a string
counter = 0
for s in str:
counter = counter + 1
print("Length of the input string is:", counter)
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/serial_scanner.py | serial_scanner.py | import sys
import serial
# A serial port-scanner for linux and windows platforms
# Author: Julio César Echeverri Marulanda
# e-mail: julio.em7@gmail.com
# blog: blogdelingeniero1.wordpress.com
# You should have installed the PySerial module to use this method.
# You can install pyserial with the following line:... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/mobilePhoneSpecsScrapper.py | mobilePhoneSpecsScrapper.py | import requests
from bs4 import BeautifulSoup
# import csv
import os
# import time
import json
class Phonearena:
def __init__(self):
self.phones = []
self.features = ["Brand", "Model Name", "Model Image"]
self.temp1 = []
self.phones_brands = []
self.url = "https://www.pho... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Generate a random number between 0 to 9.py | Generate a random number between 0 to 9.py | # Program to generate a random number between 0 and 9
# importing the random module
import random
print(random.randint(0, 9))
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/TaskPlanner.py | TaskPlanner.py | import csv
def load_tasks(filename="tasks.csv"):
tasks = []
with open(filename, "r", newline="") as file:
reader = csv.reader(file)
for row in reader:
tasks.append({"task": row[0], "deadline": row[1], "completed": row[2]})
return tasks
def save_tasks(tasks, filename="tasks.cs... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/heap_sort.py | heap_sort.py | # This program is a comparison based sorting technique.
# It is similar to selection sort in the sense that it first identifies the maximum element,
# and places it at the end. We repeat the process until the list is sorted.
# The sort algorithm has a time complexity of O(nlogn)
def refineHeap(arr, n, i):
# Initi... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/gcd.py | gcd.py | """
although there is function to find gcd in python but this is the code which
takes two inputs and prints gcd of the two.
"""
a = int(input("Enter number 1 (a): "))
b = int(input("Enter number 2 (b): "))
i = 1
gcd = -1
while i <= a and i <= b:
if a % i == 0 and b % i == 0:
gcd = i
i = i + 1
print("... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/largestno.py | largestno.py | # Python Program to find Largest of two Numbers using if-else statements
a = int(input("Enter the first number: "))
b = int(input("Enter the second number: "))
if a >= b:
print(a, "is greater")
else:
print(b, "is greater")
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/FindingResolutionOfAnImage.py | FindingResolutionOfAnImage.py | def jpeg_res(filename):
""" "This function prints the resolution of the jpeg image file passed into it"""
# open image for reading in binary mode
with open(filename, "rb") as img_file:
# height of image (in 2 bytes) is at 164th position
img_file.seek(163)
# read the 2 bytes
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/memorygame.py | memorygame.py | from random import *
from turtle import *
from freegames import path
car = path("car.gif")
tiles = list(range(32)) * 2
state = {"mark": None}
hide = [True] * 64
def square(x, y):
"Draw white square with black outline at (x, y)."
up()
goto(x, y)
down()
color("black", "white")
begin_fill()
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/facebook-autologin-bot.py | facebook-autologin-bot.py | import pyttsx3
import time
from selenium import webdriver
tts = pyttsx3.init()
rate = tts.getProperty("rate")
newVoiceRate = 160
tts.setProperty("rate", newVoiceRate)
def welcome():
print(">")
print("Welcome to Autobot created by Vijay.Use exit or quite to exit.")
text = "Welcome to Autobot created by Vi... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/RandomNumberGame.py | RandomNumberGame.py | """
Random Number Guessing Game
---------------------------
This is a simple multiplayer game where each player tries to guess a number
chosen randomly by the computer between 1 and 100. After each guess, the game
provides feedback whether the guess is higher or lower than the target number.
The winner is the player wh... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/meme_maker.py | meme_maker.py | import sys
from PIL import ImageDraw, ImageFont, Image
def input_par():
print("Enter the text to insert in image: ")
text = str(input())
print("Enter the desired size of the text: ")
size = int(input())
print("Enter the color for the text(r, g, b): ")
color_value = [int(i) for i in input().sp... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/chaos.py | chaos.py | # A simple program illustrating chaotic behaviour
def main():
print("This program illustrates a chaotic function")
while True:
try:
x = float((input("Enter a number between 0 and 1: ")))
if 0 < x and x < 1:
break
else:
print("Please ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Exception_Handling_in_Python.py | Exception_Handling_in_Python.py | # Exception handling using python
a = 12
b = 0
# a = int(input())
# b = int(input())
try:
c = a / b
print(c)
# trying to print an unknown variable d
print(d)
except ZeroDivisionError:
print("Invalid input. Divisor cannot be zero.")
except NameError:
print("Name of variable not defined.")
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/python Space Invader game.py | python Space Invader game.py | import pygame
import random
import math
from pygame import mixer
# initialization
pygame.init()
# create the screen
screen = pygame.display.set_mode((800, 620))
# background
background = pygame.image.load("background.png")
# bg sound
mixer.music.load("background.wav")
mixer.music.play(-1)
# title and icon
pygame... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Tweet Pre-Processing.py | Tweet Pre-Processing.py | #!/usr/bin/env python
# coding: utf-8
# In[10]:
from nltk.corpus import twitter_samples
import random
# In[ ]:
# analysing tweets from the corpus
# In[14]:
positive_tweets = twitter_samples.strings("positive_tweets.json")
# In[15]:
negative_tweets = twitter_samples.strings("negative_tweets.json")
# In[... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/NumPy Array Exponentiation.py | NumPy Array Exponentiation.py | """
NumPy Array Exponentiation
Check if two arrays have the same shape and compute element-wise powers
with and without np.power.
Example usage:
>>> import numpy as np
>>> x = np.array([1, 2])
>>> y = np.array([3, 4])
>>> get_array(x, y) # doctest: +ELLIPSIS
Array of powers without using np.power: [ 1 16]
Array of ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/recyclebin.py | recyclebin.py | from __future__ import print_function
import os # Load the Module
from _winreg import * # Load the Module
# Script Name : recyclebin.py
# Author : Craig Richards
# Created : 07th June 2013
# Last Modified :
# Version : 1.0
# Modifications :
# Description : Scans the recyclebin and displays the files... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/folder_size.py | folder_size.py | # Script Name : folder_size.py
# Author : Craig Richards
# Created : 19th July 2012
# Last Modified : 22 February 2016
# Version : 1.0.1
# Modifications : Modified the Printing method and added a few comments
# Description : This will scan the current directory and all subdirectories and displa... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/PDFtoAudiobook.py | PDFtoAudiobook.py | import pyttsx3
import pyPDF2
book = open("book.pdf", "rb")
pdfreader = pyPDF2.PdfFileReader(book)
pages = pdfreader.numPages
print(pages)
speaker = pyttsx3.init()
page = pdfreader.getpage(7)
text = page.extractText()
speaker.say(text)
speaker.runAndWait()
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/portscanner.py | portscanner.py | from __future__ import print_function
import optparse # Import the module
from socket import * # Import the module
from threading import * # Import the module
# Script Name : portscanner.py
# Author : Craig Richards
# Created : 20 May 2013
# Last Modified :
# Version : 1.0
# Modifications :
# Description : Port... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/sendemail.py | sendemail.py | from __future__ import print_function
import base64
import mimetypes
import os
from email.mime.audio import MIMEAudio
from email.mime.base import MIMEBase
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import httplib2
import oauth2client
from ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/helloworld.py | helloworld.py | # master
# This program prints Hello, world!
import time
print("Hello I'm Geek! Let's Execute Your Code!")
time.sleep(1)
print("Starting Our Code!")
time.sleep(1)
print("Always Remember Python Is Case Sensitive!")
time.sleep(1)
print("Here We Go!")
time.sleep(1)
# master
print("Hello World!")
time.sleep(1)
print("A ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Voice Command Calculator.py | Voice Command Calculator.py | import operator
import speech_recognition as s_r
print("Your speech_recognition version is: " + s_r.__version__)
r = s_r.Recognizer()
my_mic_device = s_r.Microphone(device_index=1)
with my_mic_device as source:
print("Say what you want to calculate, example: 3 plus 3")
r.adjust_for_ambient_noise(source)
au... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/googlemaps.py | googlemaps.py | import requests
import geocoder
g = geocoder.ip("me")
lat = g.latlng[0]
longi = g.latlng[1]
query = input("Enter the query")
key = "your_api_key"
url = (
"https://maps.googleapis.com/maps/api/place/nearbysearch/json?location="
+ str(lat)
+ ","
+ str(longi)
+ "radius=1000"
)
r = requests.get(url... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Rotate_Linked_List.py | Rotate_Linked_List.py | class Node:
def __init__(self, data):
self.data = data
self.next = None
class Linked_List:
def __init__(self):
self.head = None
def Insert_At_Beginning(self, new_data):
new_node = Node(new_data)
if self.head is None:
self.head = new_node
ret... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/magic8ball.py | magic8ball.py | import random
from colorama import Fore, Style
import inquirer
responses = [
"It is certain",
"It is decidedly so",
"Without a doubt",
"Yes definitely",
"You may rely on it",
"As I see it, yes",
"Most likely",
"Outlook good",
"Yes",
"Signs point to yes",
"Do not count on it"... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Insert_operation_on_Linked_List.py | Insert_operation_on_Linked_List.py | class Node:
def __init__(self, data):
self.data = data
self.next = None
class Linked_List:
def __init__(self):
self.head = None
def Insert_At_Beginning(self, new_data):
new_node = Node(new_data)
new_node.next = self.head
self.head = new_node
def Insert... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/factorial_perm_comp.py | factorial_perm_comp.py | # Script Name : factorial_perm_comp.py
# Author : Ebiwari Williams
# Created : 20th May 2017
# Last Modified :
# Version : 1.0
# Modifications :
# Description : Find Factorial, Permutation and Combination of a Number
def factorial(n):
fact = 1
while n >= 1:
fact = fact * n
n = n - ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/8_puzzle.py | 8_puzzle.py | from queue import PriorityQueue
from typing import List, Tuple, Optional, Set
class PuzzleState:
"""Represents a state in 8-puzzle solving with A* algorithm."""
def __init__(
self,
board: List[List[int]],
goal: List[List[int]],
moves: int = 0,
previous: Optional["Puzzl... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/puttylogs.py | puttylogs.py | # Script Name : puttylogs.py
# Author : Craig Richards
# Created : 13th October 2011
# Last Modified : 29th February 2012
# Version : 1.2
# Modifications : 1.1 - Added the variable zip_program so you can set it for the zip program on whichever OS, so to run on a different OS just change the locations of th... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/chicks_n_rabs.py | chicks_n_rabs.py | """
Author Anurag Kumar(mailto:anuragkumarak95@gmail.com)
Module to solve a classic ancient Chinese puzzle:
We count 35 heads and 94 legs among the chickens and rabbits in a farm.
How many rabbits and how many chickens do we have?
"""
def solve(num_heads, num_legs):
ns = "No solutions!"
for i in range(num_h... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Gregorian_Calendar.py | Gregorian_Calendar.py | # An extra day is added to the calendar almost every four years as February 29, and the day is called a leap day. It corrects the calendar for the fact that our planet takes approximately 365.25 days to orbit the sun. A leap year contains a leap day.
# In the Gregorian calendar, three conditions are used to identify l... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/pscheck.py | pscheck.py | # Script Name : pscheck.py
# Author : Craig Richards
# Created : 19th December 2011
# Last Modified : 17th June 2013
# Version : 1.1
# Modifications : 1.1 - 17/06/13 - CR - Changed to functions, and check os before running the program
# Description : Process check on Nix boxes, diplsay formatted output ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/string_palin.py | string_palin.py | #
# With slicing -> Reverses the string using string[::-1]
string = input("enter a word to check.. ")
copy = string[::-1]
if string == copy:
print("Plaindrome")
else:
print("!")
# Without slicing –> Reverses the string manually using a loop
reverse_string = ""
for i in string:
reverse_string = i + rever... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/password_cracker.py | password_cracker.py | from __future__ import print_function
from sys import platform as _platform
# Script Name : password_cracker.py
# Author : Craig Richards
# Created : 20 May 2013
# Last Modified :
# Version : 1.0
# Modifications :
# Description : Old school password cracker using python
# Check the current operating system to imp... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/power_of_two.py | power_of_two.py | # Simple and efficient python program to check whether a number is series of power of two
# Example:
# Input:
# 8
# Output:
# It comes in power series of 2
a = int(input("Enter a number"))
if a & (a - 1) == 0:
print("It comes in power series of 2")
else:
print("It does not come in power series of 2")
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/soundex_algorithm.py | soundex_algorithm.py | def soundex_al(word):
cap_word = word.upper() # convert the word to uppercase
return_val = ""
return_val = "" + cap_word[0] # get the first letter of the word
# dictonary to give values to the letters
code_dict = {"BFPV": "1", "CGJKQSXZ": "2", "DT": "3", "L": "4", "MN": "5", "R": "6"}
# arr... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/binary search.py | binary search.py | def binarySearchAppr(arr, start, end, x):
# check condition
if end >= start:
mid = start + (end - start) // 2
# If element is present at the middle
if arr[mid] == x:
return mid
# If element is smaller than mid
elif arr[mid] > x:
return binarySearch... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/get_youtube_view.py | get_youtube_view.py | """
Created on Thu Apr 27 16:28:36 2017
@author: barnabysandeford
"""
# Currently works for Safari, but just change to whichever
# browser you're using.
import time
# Added pafy to get video length for the user
import pafy
# Changed the method of opening the browser.
# Selenium allows for the page to be refreshed.
f... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/find_prime.py | find_prime.py | """Author Anurag Kumar(mailto:anuragkumara95@gmail.com)
A prime number is a natural number that has exactly two distinct natural number divisors: 1 and itself.
#USAGE:
- $pythonfind_prime.py <num:int>
##THEORY
-Sieve of Eratosthenes(source:wikipedia.com)
In mathematics, the sieve of Eratosthenes is a simple, a... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/powerdown_startup.py | powerdown_startup.py | # Script Name : powerdown_startup.py
# Author : Craig Richards
# Created : 05th January 2012
# Last Modified : 21th September 2017
# Version : 1.0
# Modifications :
# Description : This goes through the server list and pings the machine, if it's up it will load the putty session, if its not it w... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Type of angles of a triangle.py | Type of angles of a triangle.py | # This program will return the type of the triangle.
# User has to enter the angles of the triangle in degrees.
def angle_type():
angles = []
myDict = {
"All angles are less than 90°.": "Acute Angle Triangle",
"Has a right angle (90°)": "Right Angle Triangle",
"Has an angle more than 90... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/internet_connection_py3.py | internet_connection_py3.py | from __future__ import print_function
import os
import urllib.request
from selenium import webdriver
print("Testing Internet Connection")
print()
try:
urllib.request.urlopen(
"http://google.com", timeout=2
) # Tests if connection is up and running
print("Internet is working fine!")
print()
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/rock_paper_scissors.py | rock_paper_scissors.py | """
Rock, Paper, Scissors Game
Author: DEVANSH-GAJJAR
"""
import random
def get_user_choice():
"""Prompt the user to enter their choice."""
choice = input("Enter your choice (rock, paper, scissors): ").lower()
if choice in ["rock", "paper", "scissors"]:
return choice
else:
print("Inva... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/sorting_algos.py | sorting_algos.py | """Contains some of the Major Sorting Algorithm"""
def selection_sort(arr: list) -> list:
"""Sorts a list in ascending order using the selection sort algorithm.
Args:
arr: List of comparable elements (e.g., integers, strings).
Returns:
The sorted list (in-place modification).
Exampl... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Credit_Card_Validator.py | Credit_Card_Validator.py | # luhn algorithm
class CreditCard:
def __init__(self, card_no):
self.card_no = card_no
@property
def company(self):
comp = None
if str(self.card_no).startswith("4"):
comp = "Visa Card"
elif str(self.card_no).startswith(
(
"50",
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/qrdecoder.py | qrdecoder.py | # Importing Required Modules
import cv2
# QR Code Decoder
filename = input()
image = cv2.imread(filename) # Enter name of the image
detector = cv2.QRCodeDetector()
data, vertices_array, binary_qrcode = detector.detectAndDecode(image)
if vertices_array is not None:
print(data)
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/recursiveStrings.py | recursiveStrings.py | """author: Ataba29
code has a matrix each list inside of the matrix has two strings
the code determines if the two strings are similar or different
from each other recursively
"""
def CheckTwoStrings(str1, str2):
# function takes two strings and check if they are similar
# returns True if they are identical a... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/new_script.py | new_script.py | from __future__ import print_function
import datetime # Load the library module
import os # Load the library module
import sys # Load the library module
# Script Name : new_script.py
# Author : Craig Richards
# Created : 20th November 2012
# Last Modified :
# Version : 1.0
# Modifications :
# Description : ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Letter_Counter.py | Letter_Counter.py | import tkinter as tk
root = tk.Tk()
root.geometry("400x260+50+50")
root.title("Welcome to Letter Counter App")
message1 = tk.StringVar()
Letter1 = tk.StringVar()
def printt():
message = message1.get()
letter = Letter1.get()
message = message.lower()
letter = letter.lower()
# Get the count and di... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/sierpinski_triangle.py | sierpinski_triangle.py | """Author Anurag Kumar | anuragkumarak95@gmail.com | git/anuragkumarak95
Simple example of Fractal generation using recursive function.
What is Sierpinski Triangle?
>>The Sierpinski triangle (also with the original orthography Sierpinski), also called the Sierpinski gasket or the Sierpinski Sieve,
is a fractal and at... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/kilo_to_miles.py | kilo_to_miles.py | user = float(input("enter kilometers here.. "))
miles = user * 0.621371
print(f"{user} kilometers equals to {miles:.2f} miles")
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/convert celsius into fahrenheit.py | convert celsius into fahrenheit.py | cels = float(input("enter temp in celsius"))
print("temprature in celsius is :", cels)
fahr = cels * 9 / 5 + 32
print("temprature in fahrenhite is :", fahr)
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/videodownloder.py | videodownloder.py | from pytube import YouTube
# location where you save.
PATH = "E:/" # to_do
# link of video.
link = [
"https://www.youtube.com/watch?v=p8FuTenSWPI",
"https://www.youtube.com/watch?v=JWbnEt3xuos",
] # list of video links.
for i in link:
try:
yt = YouTube(i)
except:
print("Connection Er... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Luhn_Algorithm.py | Luhn_Algorithm.py | #!/usr/bin/env python3
"""
Python Program using the Luhn Algorithm
This program uses the Luhn Algorithm, named after its creator
Hans Peter Luhn, to calculate the check digit of a 10-digit
"payload" number, and output the final 11-digit number.
To prove this program correctly calculates the check digit,
the input 79... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/HangMan Game.py | HangMan Game.py | # Program for HangMan Game.
import random
import HangMan_Includes as incl
while True:
chances = 6
inp_lst = []
result_lst = []
name = random.choice(incl.names).upper()
# print(name)
[result_lst.append("__ ") for i in range(len(name))]
result_str = str().join(result_lst)
print(f"\nYou h... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/twitter_post_scraper.py | twitter_post_scraper.py | import requests
from bs4 import BeautifulSoup
import re
re_text = r"\:|\.|\!|(https|http)?:\/\/(\w|\.|\/|\?|\=|\&|\%)*\b|(.twitter.com\/)\w*|\&"
re_text_1 = r"(pictwittercom)\/\w*"
def tweeter_scrapper():
list_of_dirty_tweets = []
clear_list_of_tweets = []
base_tweeter_url = "https://twitter.com/{}"
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/recursive-fibonacci.py | recursive-fibonacci.py | def fib(n):
if n == 0 or n == 1:
return n
else:
return fib(n - 1) + fib(n - 2)
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/alexa_news_headlines.py | alexa_news_headlines.py | import json
import time
import requests
import unidecode
from flask import Flask
from flask_ask import Ask, question, statement
app = Flask(__name__)
ask = Ask(app, "/reddit_reader")
def get_headlines():
user_pass_dict = {"user": "USERNAME", "passwd": "PASSWORD", "api_type": "json"}
sess = requests.Session(... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/snake_case_renamer_depth_one.py | snake_case_renamer_depth_one.py | import os
import argparse
def generate_unique_name(directory: str, name: str) -> str:
"""
Generate a unique name for a file or folder in the specified directory.
Parameters:
----------
directory : str
The path to the directory.
name : str
The name of the file or folder.
R... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/linear search.py | linear search.py | # Author : ShankRoy
def linearsearch(arr, x):
for i in range(len(arr)):
if arr[i] == x:
return i
return -1
arr = ["t", "u", "t", "o", "r", "i", "a", "l"]
x = "a"
print("element found at index " + str(linearsearch(arr, x)))
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Strings.py | Strings.py | String1 = "Welcome to Malya's World"
print("String with the use of Single Quotes: ")
print(String1)
# Creating a String
# with double Quotes
String1 = "I'm a TechGeek"
print("\nString with the use of Double Quotes: ")
print(String1)
# Creating a String
# with triple Quotes
String1 = '''I'm Malya and I live in a world... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/webcam.py | webcam.py | # Requirements:
# pip install numpy
# pip install opencv-python
# Program:
# Opens your webcam and records.
# Improve this program and make it suitable for general module like use in another programs
import cv2
from colorama import Fore
cap = cv2.VideoCapture(0)
# Obtain resolutions, convert resolutions ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/SpeechToText.py | SpeechToText.py | import pyttsx3
engine = pyttsx3.init()
voices = engine.getProperty("voices")
for voice in voices:
print(voice.id)
print(voice.name)
id = r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_EN-US_DAVID_11.0"
engine.setProperty("voices", id)
engine.setProperty("rate", 165)
engine.say("jarivs") ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/numeric_password_cracker.py | numeric_password_cracker.py | import itertools
def generate_password_permutations(length):
# Generate numeric password permutations of the given length
digits = "0123456789"
for combination in itertools.product(digits, repeat=length):
password = "".join(combination)
yield password
def password_cracker(target_password... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/greaterno.py | greaterno.py | # Python program to find the largest number among the three input numbers
# change the values of num1, num2 and num3
# for a different result
num1 = 10
num2 = 14
num3 = 12
# uncomment following lines to take three numbers from user
# num1 = float(input("Enter first number: "))
# num2 = float(input("Enter second numbe... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.