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/replacetext.py | replacetext.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Replace all spaces in a string with hyphens.
Example:
>>> replacetext("Hello World")
'Hello-World'
>>> replacetext("Python 3.13 is fun")
'Python-3.13-is-fun'
"""
def replacetext(text: str) -> str:
"""
Replace spaces in a string with hyphens.
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/lcm.py | lcm.py | def lcm(x, y):
"""
Find least common multiple of 2 positive integers.
:param x: int - first integer
:param y: int - second integer
:return: int - least common multiple
>>> lcm(8, 4)
8
>>> lcm(5, 3)
15
>>> lcm(15, 9)
45
>>> lcm(124, 23)
2852
>>> lc... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/slack_message.py | slack_message.py | from __future__ import print_function
# Created by sarathkaul on 11/11/19
import json
import urllib.request
# Set the webhook_url to the one provided by Slack when you create the webhook at https://my.slack.com/services/new/incoming-webhook/
webhook_url = (
"https://hooks.slack.com/services/T00000000/B00000000/X... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/LETTER GUESSER.py | LETTER GUESSER.py | import random
import string
ABCS = string.ascii_lowercase
ABCS = list(ABCS)
play = True
compChosse = random.choice(ABCS)
print(":guess the letter (only 10 guesses):")
userInput = input("guess:")
failed = 10
while failed > 0:
if userInput == compChosse:
print("---------->")
print("You are corre... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/calculator.py | calculator.py | """
Written by : Shreyas Daniel - github.com/shreydan
Description : Uses Pythons eval() function
as a way to implement calculator.
Functions available are:
--------------------------------------------
+ : addition
- : subtraction
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/changemac.py | changemac.py | # Author- RIZWAN AHMAD
# Simple python Script to change mac address of linux generate random or enter mac address
import random
from subprocess import PIPE, Popen
# function for returning terminal command
def cret(command):
process = Popen(args=command, stdout=PIPE, shell=True)
return process.communicate()... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/daily_horoscope.py | daily_horoscope.py | from bs4 import BeautifulSoup
import requests
"""
this check_sign function checks and returns the zodiac sign
by day and month of your birth
"""
def check_sign():
your_birth_day = input("enter your birthday day number> ")
your_birth_month = input("cool, and the month number, please> ")
if (int(you... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Hotel-Management.py | Hotel-Management.py | def menu():
options = {
1: {"title": "Add new customer details", "method": lambda: add()},
2: {
"title": "Modify already existing customer details",
"method": lambda: modify(),
},
3: {"title": "Search customer details", "method": lambda: search()},
4: ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/longest_increasing_subsequence_length.py | longest_increasing_subsequence_length.py | """
Author- DIWAKAR JAISWAL
find lenth Longest increasing subsequence of given array.
"""
def lis(a):
n = len(a)
# initialize ans array same lenth as 1
ans = [1] * n
for i in range(1, n):
# now compare with first index to that index
for j in range(i):
if a[i] > a[j] and ans... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/rotate_string.py | rotate_string.py | def left_rotate(s, val):
s1 = s[0:val]
s2 = s[val:]
return s2 + s1
def right_rotate(s, val):
s1 = s[0 : len(s) - val]
s2 = s[len(s) - val :]
return s2 + s1
def circular_rotate(s):
s = list(s)
idx = 0
mid = len(s) // 2
for i in reversed(range(mid, len(s))):
s[idx], s[i... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Email-Automation.py | Email-Automation.py | import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
fro_add = "dilipvijjapu@gmail.com"
to_add = "vijjapudilip@gmail.com"
message = MIMEMultipart()
message["From"] = fro_add
message["To"] = ",".join(to_add)
message["subject"] = "Testinf mail"
body = "Hai this is dilip ,H... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/printing_hello_world.py | printing_hello_world.py | print("Hello world")
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/happy_num.py | happy_num.py | # Way2 1:
# isHappyNumber() will determine whether a number is happy or not
def isHappyNumber(num):
rem = sum = 0
# Calculates the sum of squares of digits
while num > 0:
rem = num % 10
sum = sum + (rem * rem)
num = num // 10
return sum
num = 82
result = num
while result != ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/encrypter_decrypter_gui.py | encrypter_decrypter_gui.py | # ==================== Importing Libraries ====================
# =============================================================
import tkinter as tk
from tkinter import ttk
from tkinter.messagebox import showerror
from tkinter.scrolledtext import ScrolledText
# =========================================================... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/classicIndianCardMatch.py | classicIndianCardMatch.py | import random
import time
SUITS = ("C", "S", "H", "D")
RANKS = ("A", "2", "3", "4", "5", "6", "7", "8", "9", "T", "J", "Q", "K")
VALUES = {
"A": 1,
"2": 2,
"3": 3,
"4": 4,
"5": 5,
"6": 6,
"7": 7,
"8": 8,
"9": 9,
"T": 10,
"J": 10,
"Q": 10,
"K": 10,
}
class card:
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/password guessing.py | password guessing.py | # Author: Slayking1965
# Email: kingslayer8509@gmail.com
"""
Brute-force password guessing demonstration.
This script simulates guessing a password using random choices from
printable characters. It is a conceptual demonstration and is **not
intended for real-world password cracking**.
Example usage (simulated):
>>>... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Split_Circular_Linked_List.py | Split_Circular_Linked_List.py | class Node:
def __init__(self, data):
self.data = data
self.next = None
class Circular_Linked_List:
def __init__(self):
self.head = None
def Push(self, data):
temp = Node(data)
temp.next = self.head
temp1 = self.head
if self.head is not None:
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/automail.py | automail.py | # find documentation for ezgmail module at https://pypi.org/project/EZGmail/
# simple simon says module that interacts with google API to read the subject line of an email and respond to "Simon says:"
# DO NOT FORGET TO ADD CREDENTIALS.JSON AND TOKEN.JSON TO .GITIGNORE!!!
import ezgmail
import re
import time
check = ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Divide Operator.py | Divide Operator.py | class DivisionOperation:
INT_MAX = float("inf")
def __init__(self, num1, num2):
self.num1 = num1
self.num2 = num2
def perform_division(self):
if self.num1 == 0:
return 0
if self.num2 == 0:
return self.INT_MAX
neg_result = False
# Ha... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/simple_calculator.py | simple_calculator.py | """
Simple Calculator Module.
Provides basic operations: add, subtract, multiply, divide.
Example usage:
>>> add(2, 3)
5
>>> subtract(10, 4)
6
>>> multiply(3, 4)
12
>>> divide(8, 2)
4.0
"""
def add(x: float, y: float) -> float:
"""Return the sum of x and y."""
return x + y
def subtract(x: float, y: float)... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/PONG_GAME.py | PONG_GAME.py | # Pong Game in Codeskulptor
import random
import simplegui
WIDTH = 600
HEIGHT = 400
BALL_RADIUS = 20
PAD_WIDTH = 8
PAD_HEIGHT = 80
HALF_PAD_WIDTH = PAD_WIDTH / 2
HALF_PAD_HEIGHT = PAD_HEIGHT / 2
LEFT = False
RIGHT = True
score1 = 0
score2 = 0
paddle1_pos = 0
paddle2_pos = 0
paddle1_vel = 0
paddle2_vel = 0
def spaw... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/TTS.py | TTS.py | from tkinter import *
from platform import system
if system() == "Windows" or "nt":
import win32com.client as wincl
else:
print("Sorry, TTS client is not supported on Linux or MacOS")
exit()
def text2Speech():
text = e.get()
speak = wincl.Dispatch("SAPI.SpVoice")
speak.Speak(text)
# window ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/invisible_clock.py | invisible_clock.py | # Hey you need red color cloak
import cv2
# superinposing two images
import numpy as np
import time
cap = cv2.VideoCapture(0)
time.sleep(2) # 2 sec time to adjust cam with time
background = 0
# capturing the background
for i in range(30): # 30 times
ret, background = cap.read()
while cap.isOpened():
r... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/blackjack.py | blackjack.py | # BLACK JACK - CASINO
import random
deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11] * 4
random.shuffle(deck)
print(
" ********************************************************** "
)
print(
" Welcome to the game ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/colour spiral.py | colour spiral.py | # import turtle
import turtle
# defining colors
colors = ["red", "yellow", "green", "purple", "blue", "orange"]
# setup turtle pen
t = turtle.Pen()
# changes the speed of the turtle
t.speed(10)
# changes the background color
turtle.bgcolor("black")
# make spiral_web
for x in range(200):
t.pencolor(colors... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Caesar Cipher Encoder & Decoder.py | Caesar Cipher Encoder & Decoder.py | # PROJECT1
# CAESAR CIPHER ENCODER/DECODER
# Author: InTruder
# Cloned from: https://github.com/InTruder-Sec/caesar-cipher
# Improved by: OfficialAhmed (https://github.com/OfficialAhmed)
def get_int() -> int:
"""
Get integer, otherwise redo
"""
try:
key = int(input("Enter number of characte... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Job_scheduling.py | Job_scheduling.py | #!/usr/bin/env python3
"""
Author : Mohit Kumar
Job Sequencing Problem implemented in python
"""
from collections import namedtuple
from typing import List
class Scheduling:
def __init__(self, jobs: List[int]) -> None:
"""
Assign jobs as instance of class Scheduling
"""
self.jobs... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/agecalculator.py | agecalculator.py | from _datetime import datetime
import tkinter as tk
from tkinter import ttk
from _datetime import *
win = tk.Tk()
win.title("Age Calculate")
win.geometry("310x400")
# win.iconbitmap('pic.png') this is use extention ico then show pic
############################################ Frame ##############################... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/work_connect.py | work_connect.py | # Script Name : work_connect.py
# Author : Craig Richards
# Created : 11th May 2012
# Last Modified : 31st October 2012
# Version : 1.1
# Modifications : 1.1 - CR - Added some extra code, to check an argument is passed to the script first of all, then check it's a valid input
# Description : This simple... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/text_file_replace.py | text_file_replace.py | """
Author: Linjian Li (github.com/LinjianLi)
Created: 2020-04-09
Last Modified: 2020-10-17
Description: A script that replace specified text string in a text file.
How to use: `-f` specifying the text file,
`-e` specifying the encoding (optional),
`-o` specifying ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Python_swapping.py | Python_swapping.py | # Python3 program to swap first
# and last element of a list
# Swap function
def swapList(newList):
size = len(newList)
# Swapping
temp = newList[0]
newList[0] = newList[size - 1]
newList[size - 1] = temp
return newList
# Driver code
newList = [12, 35, 9, 56, 24]
print(swapList(newList))
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/scrap_file.py | scrap_file.py | # Author : RIZWAN AHMAD
# pip3 install requests
import requests
# Function for download file parameter taking as url
def download(url):
f = open(
"file_name.jpg", "wb"
) # opening file in write binary('wb') mode with file_name.ext ext=extension
f.write(requests.get(url).content) # Writing F... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/quiz_game.py | quiz_game.py | print("Welcome to AskPython Quiz")
answer = input("Are you ready to play the Quiz ? (yes/no) :")
score = 0
total_questions = 3
if answer.lower() == "yes":
answer = input("Question 1: What is your Favourite programming language?")
if answer.lower() == "python":
score += 1
print("correct")
el... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/iprint.py | iprint.py | from time import sleep
txt = input("")
ap = ""
for let in range(len(txt) - 1):
ap += txt[let]
print(ap, end="\r")
sleep(0.1)
print(txt, end="")
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/CSV_file.py | CSV_file.py | import pandas as pd
# loading the dataset
df = pd.read_csv(
r"c:\PROJECT\Drug_Recommendation_System\drug_recommendation_system\Drugs_Review_Datasets.csv"
)
print(df) # prints Dataset
# funtions
print(df.tail())
print(df.head())
print(df.info())
print(df.describe())
print(df.column)
print(df.shape())
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/russian_roulette.py | russian_roulette.py | """author: Ataba29
the code is just a russian roulette game against
the computer
"""
from random import randrange
import time
def main():
# create the gun and set the bullet
numOfRounds = 6
gun = [0, 0, 0, 0, 0, 0]
bullet = randrange(0, 6)
gun[bullet] = 1
player = False # is player dead
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/nDigitNumberCombinations.py | nDigitNumberCombinations.py | # ALL the combinations of n digit combo
def nDigitCombinations(n):
try:
npow = 10**n
numbers = []
for code in range(npow):
code = str(code).zfill(n)
numbers.append(code)
except Exception:
# handle all other exceptions
pass
return numbers
# An... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/digital_clock.py | digital_clock.py | # master
# importing whole module
# use Tkinter to show a digital clock
# using python code base
import time
# because we need digital clock , so we are importing the time library.
# master
from tkinter import *
from tkinter.ttk import *
# importing strftime function to
# retrieve system's time
from time import str... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/check_internet_con.py | check_internet_con.py | from sys import argv
try:
# For Python 3.0 and later
from urllib.error import URLError
from urllib.request import urlopen
except ImportError:
# Fall back to Python 2's urllib2
from urllib2 import URLError, urlopen
def checkInternetConnectivity():
try:
url = argv[1]
print(url)
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/file_ext_changer.py | file_ext_changer.py | """' Multiple extension changer"""
import time
from pathlib import Path as p
import random as rand
import hashlib
def chxten_(files, xten):
chfile = []
for file in files:
ch_file = file.split(".")
ch_file = ch_file[0]
chfile.append(ch_file)
if len(xten) == len(chfile):
chx... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Pc_information.py | Pc_information.py | import platform # built in lib
print(f"System : {platform.system()}") # Prints type of Operating System
print(f"System name : {platform.node()}") # Prints System Name
print(f"version : {platform.release()}") # Prints System Version
# TO get the detailed version number
print(
f"detailed version number : {platfo... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/passwordGenerator.py | passwordGenerator.py | # PasswordGenerator GGearing 314 01/10/19
# modified Prince Gangurde 4/4/2020
from random import randint
case = randint(1, 2)
number = randint(1, 99)
specialCharacters = (
"!",
"@",
"#",
"$",
"%",
"/",
"?",
":",
"<",
">",
"|",
"&",
"*",
"-",
"=",
"+",
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/personal_translator.py | personal_translator.py | # -*- coding: utf-8 -*-
"""Personal_translator.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1lHb0mCvF6Ie3QaTt3VfqlNjNs6vuV5qJ
"""
# uncomment the line to intall googletrans library
# ! pip install googletrans
from googletrans import Translato... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/date-timeclient.py | date-timeclient.py | import socket
soc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
soc.connect((socket.gethostname(), 2905))
recmsg = soc.recv(1024)
soc.close()
print("The time got from the server is %s" % recmsg.decode("ascii"))
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/cartesian_product.py | cartesian_product.py | """Cartesian Product of Two Lists."""
# Import
# Cartesian Product of Two Lists
def cartesian_product(list1, list2):
"""Cartesian Product of Two Lists."""
for _i in list1:
for _j in list2:
print((_i, _j), end=" ")
# Main
if __name__ == "__main__":
list1 = input().split()
list2 =... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/power_of_n.py | power_of_n.py | # Assign values to author and version.
__author__ = "Himanshu Gupta"
__version__ = "1.0.0"
__date__ = "2023-09-03"
def binaryExponentiation(x: float, n: int) -> float:
"""
Function to calculate x raised to the power n (i.e., x^n) where x is a float number and n is an integer and it will return float value
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Python Voice Generator.py | Python Voice Generator.py | # install and import google text-to-speech library gtts
from gtts import gTTS
import os
# provide user input text
text = input("enter the text: ")
# covert text into voice
voice = gTTS(text=text, lang="en")
# save the generated voice
voice.save("output.mp3")
# play the file in windows
os.system("start output.mp3")
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/ARKA.py | ARKA.py | def sumOfSeries(n):
x = n * (n + 1) / 2
return (int)(x * x)
# Driver Function
n = 5
print(sumOfSeries(n))
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Audio_Summarizer.py | Audio_Summarizer.py | import whisper
import re
import openai
import os
def transcript_generator():
# Load Whisper model
model = whisper.load_model("base")
# Transcribe audio file
result = model.transcribe("audio.mp4")
# Send the transcript to the summarizer
provide_summarizer(result)
def provide_summarizer(Text... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Timetable_Operations.py | Timetable_Operations.py | """
Tkinter Clock Difference Calculator.
Compute difference between two times (HH:MM:SS) with midnight wrap-around.
Doctests:
>>> clock_diff("12:00:00", "14:30:15")
'02:30:15'
>>> clock_diff("23:50:00", "00:15:30")
'00:25:30'
>>> clock_diff("00:00:00", "00:00:00")
'00:00:00'
"""
import tkinter as tk
from tkinter im... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/sensors_information.py | sensors_information.py | import argparse
import sys
import socket
import psutil
def python_version():
return sys.version_info
def ip_addresses():
hostname = socket.gethostname()
addresses = socket.getaddrinfo(hostname, None)
address_info = []
for address in addresses:
address_info.append((address[0].name, address[4... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/youtubedownloader.py | youtubedownloader.py | # modules for Using of app
from tkinter import Button, Entry, Label, Tk, filedialog, messagebox # Gui Modules
from threading import Thread # modules for multi threding
from pytube import YouTube # Module for Youtube service
# this function for mulple code runes at a time
def threading():
# Call work function
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Add_two_Linked_List.py | Add_two_Linked_List.py | class Node:
def __init__(self, data):
self.data = data
self.next = None
class LinkedList:
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
retu... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Prime_number.py | Prime_number.py | # Author: Tan Duc Mai
# Email: tan.duc.work@gmail.com
# Description: Three different functions to check whether a given number is a prime.
# Return True if it is a prime, False otherwise.
# Those three functions, from a to c, decreases in efficiency
# (takes longe... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/remove a character from a file and rewrite.py | remove a character from a file and rewrite.py | # Remove all the lines that contain the character `a' in a file and write it to another file.
f = open("test1.txt", "r") # opening file test1.txt
lines = f.readlines() # saved lines
print("Original file is :")
print(lines)
f.close()
# Rewriting lines
e = open("test3.txt", "w") # file containing lines with 'a'
f = ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/mathfunctions.py | mathfunctions.py | x = min(65, 90, 65)
y = max(2, 8, 10)
print(x)
print(y)
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/testlines.py | testlines.py | # Script Name : testlines.py
# Author : Craig Richards
# Created : 08th December 2011
# Last Modified :
# Version : 1.0
# Modifications : beven nyamande
# Description : This is a very simple script that opens up a file and writes whatever is set "
def write_to_file(filename, txt):
with open(filename, "w"... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/wifi hack by brutefore.py | wifi hack by brutefore.py | """
Introduction Description
The machine operating environment: system environment Win10, the operating environment Python3.6, run the tool Pycharm
Python packages need to have: pywifi
This is a brute wifi mode, the time required is longer, this paper provides a break ideas
Second, the idea of introduction
Mr. int... | 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 | num = int(input("Enter size of list: \t"))
list = [int(input("Enter any number: \t")) for _ in range(num)]
x = int(input("\nEnter number to search: \t"))
for position, number in enumerate(list):
if number == x:
print(f"\n{x} found at position {position}")
else:
print(f"list: {list}")
print(f"{x} i... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/dec_to_hex.py | dec_to_hex.py | dec_num = input("Enter the decimal number\n")
print(hex(int(dec_num)))
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/simpleInterest.py | simpleInterest.py | principle = float(input("Enter the principle amount:"))
time = int(input("Enter the time(years):"))
rate = float(input("Enter the rate:"))
simple_interest = (principle * time * rate) / 100
print("The simple interest is:", simple_interest)
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Calculate resistance.py | Calculate resistance.py | def res(R1, R2):
sum = R1 + R2
if option == "series":
return sum
elif option == "parallel":
return (R1 * R2) / sum
return 0
Resistance1 = int(input("Enter R1 : "))
Resistance2 = int(input("Enter R2 : "))
option = input("Enter series or parallel :")
print("\n")
R = res(Resistance1, Resi... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/passwordGen.py | passwordGen.py | import random
lChars = "abcdefghijklmnopqrstuvwxyz"
uChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
digits = "1234567890"
specialChars = "!@#$%^&*-_+=()[]"
myPass = ""
# Generate 3 lowercase letters
for _ in range(3):
myPass += random.choice(lChars)
# Generate 3 digits
for _ in range(3):
myPass += random.choice(digits)
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/encrypter-decrypter-gui.py | encrypter-decrypter-gui.py | # ==================== Importing Libraries ====================
# =============================================================
import tkinter as tk
from tkinter import ttk
from tkinter.messagebox import showerror
from tkinter.scrolledtext import ScrolledText
# =========================================================... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/reading_csv.py | reading_csv.py | import pandas as pd
# reading csv file into python
df = pd.read_csv(
r"c:\PROJECT\Drug_Recommendation_System\drug_recommendation_system\Drugs_Review_Datasets.csv"
) # Replace the path with your own file path
print(df)
# Basic functions
print(df.info()) # Provides a short summary of the DataFrame
print(df.head(... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/FibonacciNumbersWithGenerators.py | FibonacciNumbersWithGenerators.py | def fibonacci_generator(n=None):
"""
Generating function up to n fibonacci numbers iteratively
Params:
n: int
Return:
int
"""
f0, f1 = 0, 1
yield f1
while n == None or n > 1:
fn = f0 + f1
yield fn
f0, f1 = f1, fn
n -= 1
for n_fibo in fibo... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/tf_idf_generator.py | tf_idf_generator.py | """@Author: Anurag Kumar(mailto:anuragkumarak95@gmail.com)
This module is used for generating a TF-IDF file or values from a list of files that contains docs.
What is TF-IDF : https://en.wikipedia.org/wiki/Tf%E2%80%93idf
python:
- 3.5
pre-requisites:
- colorama==0.3.9
sample file format of input:
##START(N... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/check_input.py | check_input.py | def get_user_input(start, end):
"""
input: two integer values
lower limit 'start' and maximum 'end'
the arguments aren't inclusive.
output: if reading successful then returns the read integer.
purpose: reads from command-line a integer in the given bounds.
while inpu... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Mp3_media_player.py | Mp3_media_player.py | # its very amazing
import os
from tkinter.filedialog import askdirectory
import pygame
from mutagen.id3 import ID3
from tkinter import *
root = Tk()
root.minsize(300, 300)
listofsongs = []
realnames = []
v = StringVar()
songlabel = Label(root, textvariable=v, width=35)
index = 0
def directorychooser():
dire... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Organise.py | Organise.py | from __future__ import print_function
import os
import shutil
import sys
EXT_VIDEO_LIST = ["FLV", "WMV", "MOV", "MP4", "MPEG", "3GP", "MKV", "AVI"]
EXT_IMAGE_LIST = ["JPG", "JPEG", "GIF", "PNG", "SVG"]
EXT_DOCUMENT_LIST = [
"DOC",
"DOCX",
"PPT",
"PPTX",
"PAGES",
"PDF",
"ODT",
"ODP",
... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/leap year.py | leap year.py | # Python program to check if year is a leap year or not
year = 2000
# To get year (integer input) from the user
# year = int(input("Enter a year: "))
if (year % 4) == 0:
if (year % 100) == 0:
if (year % 400) == 0:
print("{0} is a leap year".format(year))
else:
print("{0} i... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/convert_wind_direction_to_degrees.py | convert_wind_direction_to_degrees.py | def degrees_to_compass(degrees):
directions = ["N", "NE", "E", "SE", "S", "SW", "W", "NW"]
index = round(degrees / 45) % 8
return directions[index]
# Taking input from the user
while True:
try:
degrees = float(input("Enter the wind direction in degrees (0-359): "))
if degrees < 0 or de... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/reversed_pattern3.py | reversed_pattern3.py | # Simple inverted number triangle piramid
# 11111
# 2222
# 333
# 44
# 5
def main():
lines = int(input("Enter no.of lines: "))
pattern(lines)
def pattern(lines):
t = 1
for i in reversed(range(1, (lines + 1))):
format = str(t) * i
print(format)
t = t + 1
if __name__ == "__mai... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/fastapi.py | fastapi.py | from fastapi import FastAPI
from pydantic import BaseModel
from typing import Optional
app = FastAPI()
# temp database
fakedb = []
# course model to store courses
class Course(BaseModel):
id: int
name: str
price: float
is_early_bird: Optional[bool] = None
# Home/welcome route
@app.get("/")
def rea... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/translation_of_sizes_of_underwear_RU.py | translation_of_sizes_of_underwear_RU.py | # coding: utf-8
def my_found(req):
my_dict = {
"XXS": [42, 36, 8, 38, 24],
"XS": (2),
"S": (4),
"M": (6),
"L": (8),
"XL": (10),
"XXL": (12),
"XXXL": (14),
}
if req[0] != "XXS":
answ = my_dict["XXS"][req[1] - 1] + my_dict[req[0]]
els... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/calc_area.py | calc_area.py | # Author: PrajaktaSathe
# Program to calculate the area of - square, rectangle, circle, and triangle -
import math as m
def main():
shape = int(
input(
"Enter 1 for square, 2 for rectangle, 3 for circle, 4 for triangle, 5 for cylinder, 6 for cone, or 7 for sphere: "
)
)
if shape ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Decimal number to binary function.py | Decimal number to binary function.py | # decimal number
number = int(input("Enter any decimal number: "))
# print equivalent binary number
print("Equivalent Binary Number: ", bin(number))
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/two_num.py | two_num.py | """
Author: Anurag Kumar (mailto:anuragkumarak95@gmail.com)
Description:
This function finds two numbers in a given list that add up to a specified target.
It returns the indices of those two numbers.
Constraints:
- Each input will have exactly one solution.
- The same element cannot be used twice.
E... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/CountMillionCharacters-2.0.py | CountMillionCharacters-2.0.py | """Get the number of each character in any given text.
Inputs:
A txt file -- You will be asked for an input file. Simply input the name
of the txt file in which you have the desired text.
"""
import collections
import pprint
def main():
file_input = input("File Name: ")
try:
with open(file_input, "r"... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/input matrice,product any order!.py | input matrice,product any order!.py | # inputing 2 matrices:
# matrice 1:
rows = int(input("Enter the number of rows of the matrice 1"))
coloumns = int(input("Enter the coloumns of the matrice 1"))
matrice = []
rowan = []
for i in range(0, rows):
for j in range(0, coloumns):
element = int(input("enter the element"))
rowan.append(elem... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/get_crypto_price.py | get_crypto_price.py | import ccxt
def getprice(symbol, exchange_id):
symbol = symbol.upper() # BTC/USDT, LTC/USDT, ETH/BTC, LTC/BTC
exchange_id = exchange_id.lower() # binance, #bitmex
symbol_1 = symbol.split("/")
exchange = getattr(ccxt, exchange_id)(
{
# https://github.com/ccxt/ccxt/wiki/Manual#rate... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/count the numbers of two vovels.py | count the numbers of two vovels.py | # Program to count the number of each vowels
# string of vowels
vowels = "aeiou"
ip_str = "Hello, have you tried our tutorial section yet?"
# make it suitable for caseless comparisions
ip_str = ip_str.casefold()
# make a dictionary with each vowel a key and value 0
count = {}.fromkeys(vowels, 0)
# count the vowels... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/movie_details.py | movie_details.py | import urllib.request
import mechanize
from bs4 import BeautifulSoup
# Create a Browser
browser = mechanize.Browser()
# Disable loading robots.txt
browser.set_handle_robots(False)
browser.addheaders = [("User-agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98;)")]
movie_title = input("Enter movie title: ")
mo... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/turtle_shapes_made.py | turtle_shapes_made.py | import turtle
class ShapeDrawer:
def __init__(self, color, pensize):
self.turtle = turtle.Turtle()
self.turtle.color(color)
self.turtle.pensize(pensize)
def draw_rectangle(self, width, height):
for _ in range(2):
self.turtle.forward(width)
self.turtle.l... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/sudoku.py | sudoku.py | board = [
[7, 8, 0, 4, 0, 0, 1, 2, 0],
[6, 0, 0, 0, 7, 5, 0, 0, 9],
[0, 0, 0, 6, 0, 1, 0, 7, 8],
[0, 0, 7, 0, 4, 0, 2, 6, 0],
[0, 0, 1, 0, 5, 0, 9, 3, 0],
[9, 0, 4, 0, 6, 0, 0, 0, 5],
[0, 7, 0, 3, 0, 0, 0, 1, 2],
[1, 2, 0, 0, 0, 7, 4, 0, 0],
[0, 4, 9, 2, 0, 6, 0, 0, 7],
]
def solve... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/square_root.py | square_root.py | import math
def square_root(number):
if number >= 0:
print(f"Square root {math.sqrt(number)}")
else:
print("Cannot find square root for the negative numbers..")
while True:
square_root(int(input("enter any number")))
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Fibonacci_sequence_recursive_sol.py | Fibonacci_sequence_recursive_sol.py | def fib(term):
if term <= 1:
return term
else:
return fib(term - 1) + fib(term - 2)
# Change this value to adjust the number of terms in the sequence.
number_of_terms = int(input())
for i in range(number_of_terms):
print(fib(i))
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/diceV2_dynamic.py | diceV2_dynamic.py | import random
# Class that that holds dice-functions. You can set the amount of sides and roll with each dice object.
class Dice:
def __init__(self):
self.sideCount = 6
def setSides(self, sides):
if sides > 3:
self.sides = sides
else:
print(
"Th... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/time_delta.py | time_delta.py | """
Time Delta Calculator
This module provides functionality to calculate the absolute difference
in seconds between two timestamps in the format: Day dd Mon yyyy hh:mm:ss +xxxx
"""
# -----------------------------------------------------------------------------
# You are givent two timestams in the format: Day dd Mon ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Find current weather of any city using openweathermap API.py | Find current weather of any city using openweathermap API.py | # Python program to find current
# weather details of any city
# using openweathermap api
# import required modules
import requests
# Enter your API key here
api_key = "Your_API_Key"
# base_url variable to store url
base_url = "http://api.openweathermap.org/data/2.5/weather?"
# Give city name
city_name = input("Ent... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Web Socket.py | Web Socket.py | # Program to print a data & it's Metadata of online uploaded file using "socket".
import socket
from colorama import Fore # this module for Color the font
# handling the exceptions
try:
skt_c = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
skt_c.connect(("data.pr4e.org", 80))
link = "GET http://data.p... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/StringToBinary.py | StringToBinary.py | text = input("Enter Text : ")
for chr in text:
bin = ""
asciiVal = int(ord(chr))
while asciiVal > 0:
if asciiVal % 2 == 0:
bin = bin + "0"
else:
bin = bin + "1"
asciiVal = int(asciiVal / 2)
print(bin + " : " + bin[::-1])
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/magic_8_ball.py | magic_8_ball.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/move_files_over_x_days.py | move_files_over_x_days.py | # Script Name : move_files_over_x_days.py
# Author(s) : Craig Richards ,Demetrios Bairaktaris
# Created : 8th December 2011
# Last Modified : 25 December 2017
# Version : 1.1
# Modifications : Added possibility to use command line arguments to specify source, destination, and days.
# Description : T... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Grocery calculator.py | Grocery calculator.py | """This will be a Python script that functions as a grocery calculator. It will take in key-value pairs for items
and their prices, and return the subtotal and total, and can print out the list for you for when you're ready to
take it to the store!"""
"""Algorithm:
1. User enters key-value pairs that are added into a ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Type_of_angles_of_triangle.py | Type_of_angles_of_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 ... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/simple_calcu.py | simple_calcu.py | while True:
print(int(input("enter first number..")) + int(input("enter second number..")))
q = input("press q to quit or press anu key to continue").lower()
if q == " q":
break
| python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/check_for_sqlite_files.py | check_for_sqlite_files.py | # Script Name : check_for_sqlite_files.py
# Author : Craig Richards
# Created : 07 June 2013
# Last Modified : 14 February 2016
# Version : 1.0.1
# Modifications : 1.0.1 - Remove unecessary line and variable on Line 21
# Description : Scans directories to check if there are any sqlite files in there
from __future... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/sqlite_check.py | sqlite_check.py | from __future__ import print_function
import os
import sqlite3 as lite
import sys
# Script Name : sqlite_check.py
# Author : Craig Richards
# Created : 20 May 2013
# Last Modified :
# Version : 1.0
# Modifications :
# Description : Runs checks to check my SQLITE database
dropbox = os.getenv("dropbox")
dbfile = r"D... | python | MIT | 21cbdf223aadd1c28293570d1106fe47af6e9434 | 2026-01-04T14:42:18.827821Z | false |
geekcomputers/Python | https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/script_listing.py | script_listing.py | # Script Name : script_listing.py
# Author : Craig Richards
# Created : 15th February 2012
# Last Modified : 29th May 2012
# Version : 1.2
# Modifications : 1.1 - 28-02-2012 - CR - Added the variable to get the logs directory, I then joined the output so the file goes to the logs directory
# : 1.2 -... | 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.