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
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/test_migrate.py
libs/chatchat-server/tests/test_migrate.py
import os import shutil import sys from pathlib import Path from pprint import pprint root_path = Path(__file__).parent.parent sys.path.append(str(root_path)) from chatchat.server.knowledge_base.kb_service.base import KBServiceFactory from chatchat.server.knowledge_base.migrate import ( folder2db, prune_db_do...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/conftest.py
libs/chatchat-server/tests/conftest.py
"""Configuration for unit tests.""" import logging from importlib import util from typing import Dict, List, Sequence import pytest from chatchat.utils import ( get_config_dict, get_log_file, get_timestamp_ms, ) from pytest import Config, Function, Parser def pytest_addoption(parser: Parser) -> None: ...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/test_qwen_agent.py
libs/chatchat-server/tests/test_qwen_agent.py
import sys from pathlib import Path sys.path.append(str(Path(__file__).parent.parent)) import asyncio import json from pprint import pprint from langchain import globals from langchain.agents import AgentExecutor from chatchat.server.utils import get_ChatOpenAI # globals.set_debug(True) # globals.set_verbose(True...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/document_loader/test_pdfloader.py
libs/chatchat-server/tests/document_loader/test_pdfloader.py
import sys from pathlib import Path root_path = Path(__file__).parent.parent.parent sys.path.append(str(root_path)) from pprint import pprint test_files = { "ocr_test.pdf": str(root_path / "tests" / "samples" / "ocr_test.pdf"), } def test_rapidocrpdfloader(): pdf_path = test_files["ocr_test.pdf"] from d...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/document_loader/test_imgloader.py
libs/chatchat-server/tests/document_loader/test_imgloader.py
import sys from pathlib import Path root_path = Path(__file__).parent.parent.parent sys.path.append(str(root_path)) from pprint import pprint test_files = { "ocr_test.jpg": str(root_path / "tests" / "samples" / "ocr_test.jpg"), } def test_rapidocrloader(): img_path = test_files["ocr_test.jpg"] from docu...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/unit_tests/test_sdk_import.py
libs/chatchat-server/tests/unit_tests/test_sdk_import.py
def test_sdk_import_unit(): from langchain_chatchat import ChatPlatformAI, PlatformToolsRunnable def test_mcp_import() -> None: """Test that the code can be imported""" from langchain_chatchat.agent_toolkits.mcp_kit import client, prompts, tools # noqa: F401
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/unit_tests/test_mcp_prompts.py
libs/chatchat-server/tests/unit_tests/test_mcp_prompts.py
from unittest.mock import AsyncMock import pytest from langchain_core.messages import AIMessage, HumanMessage from mcp.types import ( EmbeddedResource, ImageContent, PromptMessage, TextContent, TextResourceContents, ) from langchain_chatchat.agent_toolkits.mcp_kit.prompts import ( convert_mcp_...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/integration_tests/test_sdk_import.py
libs/chatchat-server/tests/integration_tests/test_sdk_import.py
def test_sdk_import_unit(): from langchain_chatchat.settings import Settings, XF_MODELS_TYPES
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/integration_tests/platform_tools/test_platform_tools.py
libs/chatchat-server/tests/integration_tests/platform_tools/test_platform_tools.py
# -*- coding: utf-8 -*- import logging import logging.config import pytest from langchain.agents import tool from chatchat.server.agents_registry.agents_registry import agents_registry from chatchat.server.utils import get_ChatPlatformAIParams from langchain_chatchat import ChatPlatformAI from langchain_chatchat.agen...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/integration_tests/mcp_platform_tools/test_mcp_platform_tools.py
libs/chatchat-server/tests/integration_tests/mcp_platform_tools/test_mcp_platform_tools.py
# -*- coding: utf-8 -*- from mcp import ClientSession, StdioServerParameters, stdio_client from chatchat.server.agents_registry.agents_registry import agents_registry from chatchat.server.utils import get_ChatPlatformAIParams from langchain_chatchat import ChatPlatformAI from langchain_chatchat.agent_toolkits.mcp_kit....
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/integration_tests/mcp_platform_tools/math_server.py
libs/chatchat-server/tests/integration_tests/mcp_platform_tools/math_server.py
# math_server.py from mcp.server.fastmcp import FastMCP mcp = FastMCP("Math") @mcp.tool() def add(a: int, b: int) -> int: """Add two numbers""" return a + b @mcp.tool() def multiply(a: int, b: int) -> int: """Multiply two numbers""" return a * b if __name__ == "__main__": mcp.run(transport="s...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/api/test_kb_summary_api.py
libs/chatchat-server/tests/api/test_kb_summary_api.py
import json import sys from pathlib import Path import requests root_path = Path(__file__).parent.parent.parent sys.path.append(str(root_path)) from chatchat.server.utils import api_address api_base_url = api_address() kb = "samples" file_name = "/media/gpt4-pdf-chatbot-langchain/langchain-ChatGLM/knowledge_base/sa...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/api/test_openai_wrap.py
libs/chatchat-server/tests/api/test_openai_wrap.py
import sys from pathlib import Path sys.path.append(str(Path(__file__).parent.parent.parent)) import openai import requests from chatchat.server.utils import api_address, get_default_llm, get_default_embedding api_base_url = f"{api_address()}/v1" client = openai.Client( api_key="EMPTY", base_url=api_base_ur...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/api/test_stream_chat_api_thread.py
libs/chatchat-server/tests/api/test_stream_chat_api_thread.py
import json import sys from pathlib import Path import requests sys.path.append(str(Path(__file__).parent.parent.parent)) import time from concurrent.futures import ThreadPoolExecutor, as_completed from pprint import pprint from chatchat.server.utils import api_address api_base_url = api_address() def dump_input(...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/api/test_tools.py
libs/chatchat-server/tests/api/test_tools.py
import sys from pathlib import Path sys.path.append(str(Path(__file__).parent.parent.parent)) from pprint import pprint import requests from chatchat.server.utils import api_address api_base_url = f"{api_address()}/tools" def test_tool_list(): resp = requests.get(api_base_url) assert resp.status_code == ...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/api/test_kb_api_request.py
libs/chatchat-server/tests/api/test_kb_api_request.py
import json import sys from pathlib import Path import requests root_path = Path(__file__).parent.parent.parent sys.path.append(str(root_path)) from pprint import pprint from chatchat.settings import Settings from chatchat.server.knowledge_base.utils import get_file_path, get_kb_path from chatchat.server.utils impor...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/api/test_server_state_api.py
libs/chatchat-server/tests/api/test_server_state_api.py
import sys from pathlib import Path root_path = Path(__file__).parent.parent.parent sys.path.append(str(root_path)) from pprint import pprint from typing import List import pytest from chatchat.webui_pages.utils import ApiRequest api = ApiRequest() @pytest.mark.parametrize("type", ["llm_model"]) def test_get_pro...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/api/test_stream_chat_api.py
libs/chatchat-server/tests/api/test_stream_chat_api.py
import json import sys from pathlib import Path import requests sys.path.append(str(Path(__file__).parent.parent.parent)) from pprint import pprint from chatchat.server.utils import api_address api_base_url = api_address() api="/chat/chat/completions" url = f"{api_base_url}{api}" def dump_input(d, title): pr...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/api/test_kb_api.py
libs/chatchat-server/tests/api/test_kb_api.py
import json import sys from pathlib import Path import requests root_path = Path(__file__).parent.parent.parent sys.path.append(str(root_path)) from pprint import pprint from chatchat.settings import Settings from chatchat.server.knowledge_base.utils import get_file_path, get_kb_path from chatchat.server.utils impor...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/kb_vector_db/test_milvus_db.py
libs/chatchat-server/tests/kb_vector_db/test_milvus_db.py
from chatchat.server.knowledge_base.kb_service.faiss_kb_service import FaissKBService from chatchat.server.knowledge_base.kb_service.milvus_kb_service import MilvusKBService from chatchat.server.knowledge_base.kb_service.pg_kb_service import PGKBService from chatchat.server.knowledge_base.migrate import create_tables f...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/kb_vector_db/__init__.py
libs/chatchat-server/tests/kb_vector_db/__init__.py
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/kb_vector_db/test_pg_db.py
libs/chatchat-server/tests/kb_vector_db/test_pg_db.py
from chatchat.server.knowledge_base.kb_service.faiss_kb_service import FaissKBService from chatchat.server.knowledge_base.kb_service.pg_kb_service import PGKBService from chatchat.server.knowledge_base.migrate import create_tables from chatchat.server.knowledge_base.utils import KnowledgeFile kbService = PGKBService("...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/kb_vector_db/test_faiss_kb.py
libs/chatchat-server/tests/kb_vector_db/test_faiss_kb.py
from chatchat.server.knowledge_base.kb_service.faiss_kb_service import FaissKBService from chatchat.server.knowledge_base.migrate import create_tables from chatchat.server.knowledge_base.utils import KnowledgeFile kbService = FaissKBService("test") test_kb_name = "test" test_file_name = "README.md" testKnowledgeFile =...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/kb_vector_db/test_relyt_db.py
libs/chatchat-server/tests/kb_vector_db/test_relyt_db.py
from server.knowledge_base.kb_service.relyt_kb_service import RelytKBService from server.knowledge_base.migrate import create_tables from server.knowledge_base.utils import KnowledgeFile kbService = RelytKBService("test") test_kb_name = "test" test_file_name = "README.md" testKnowledgeFile = KnowledgeFile(test_file_n...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
chatchat-space/Langchain-Chatchat
https://github.com/chatchat-space/Langchain-Chatchat/blob/49165d6af4438aa7e8a1f71ce276db55f4405151/libs/chatchat-server/tests/custom_splitter/test_different_splitter.py
libs/chatchat-server/tests/custom_splitter/test_different_splitter.py
import os import sys from transformers import AutoTokenizer sys.path.append("../..") from chatchat.settings import Settings from chatchat.server.knowledge_base.utils import make_text_splitter def text(splitter_name): from langchain import document_loaders # 使用DocumentLoader读取文件 filepath = "../../knowle...
python
Apache-2.0
49165d6af4438aa7e8a1f71ce276db55f4405151
2026-01-04T14:41:43.908377Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Randomnumber.py
Randomnumber.py
# Program to generate a random number between 0 and 9 # importing the random module from random import randint print(randint(0, 9))
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/WikipediaModule.py
WikipediaModule.py
""" Created on Sat Jul 15 01:41:31 2017 @author: Albert """ from __future__ import print_function import wikipedia as wk from bs4 import BeautifulSoup def wiki(): """ Search Anything in wikipedia """ word = input("Wikipedia Search : ") results = wk.search(word) for i in enumerate(results):...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/avg_xdspam_confidence.py
avg_xdspam_confidence.py
fh = open("mbox-short.txt") # The 'mbox-short.txt' file can be downloaded from the link: https://www.py4e.com/code3/mbox-short.txt sum = 0 count = 0 for fx in fh: fx = fx.rstrip() if not fx.startswith("X-DSPAM-Confidence:"): continue fy = fx[19:] count = count + 1 sum = sum + float(fy) print...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/login.py
login.py
import os from getpass import getpass # Devloped By Black_angel # This is Logo Function def logo(): print(" ──────────────────────────────────────────────────────── ") print(" | | ") print(" | ######## ## ######### ## ## ### | "...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/password_manager.py
password_manager.py
import sqlite3 from getpass import getpass import os # set the environment variable ADMIN_PASS to your desired string, which will be your password. ADMIN_PASSWORD = os.environ["ADMIN_PASS"] connect = getpass("What is your admin password?\n") while connect != ADMIN_PASSWORD: connect = getpass("What is your admin ...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/get_likes_on_FB.py
get_likes_on_FB.py
from __future__ import print_function import json import sys import urllib accessToken = "TOKENVALUE" # YOUR ACCESS TOKEN GETS INSERTED HERE userId = sys.argv[1] # USERID limit = 100 url = ( "https://graph.facebook.com/" + userId + "/posts?access_token=" + accessToken + "&limit=" + str(limi...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/CliYoutubeDownloader.py
CliYoutubeDownloader.py
from pytube import * import sys class YouTubeDownloder: def __init__(self): self.url = str(input("Enter the url of video : ")) self.youtube = YouTube( self.url, on_progress_callback=YouTubeDownloder.onProgress ) self.showTitle() def showTitle(self): print("...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/singly_linked_list.py
singly_linked_list.py
class Node: def __init__(self, data): self.data = data self.next = None class LinkedList: def __init__(self): self.head = None def length(self): curr = self.head count = 0 while curr.next != None: count += 1 curr = curr.next ...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Python Distance.py
Python Distance.py
# Display the powers of 2 using anonymous function terms = 10 # Uncomment code below to take input from the user # terms = int(input("How many terms? ")) # use anonymous function result = list(map(lambda x: 2**x, range(terms))) print("The total terms are:", terms) for i in range(terms): print("2 raised to power...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/factors.py
factors.py
import math print("The factors of the number you type when prompted will be displayed") a = int(input("Type now // ")) b = 1 while b <= math.sqrt(a): if a % b == 0: print("A factor of the number is ", b) print("A factor of the number is ", int(a / b)) b += 1
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/WeatherGUI.py
WeatherGUI.py
import tkinter as tk import requests from bs4 import BeautifulSoup url = "https://weather.com/en-IN/weather/today/l/32355ced66b7ce3ab7ccafb0a4f45f12e7c915bcf8454f712efa57474ba8d6c8" root = tk.Tk() root.title("Weather") root.config(bg="white") def getWeather(): page = requests.get(url) soup = BeautifulSoup(page....
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/calculator-gui.py
calculator-gui.py
# ==================== Libraries ==================== import tkinter as tk from tkinter import ttk from tkinter import messagebox # =================================================== # ==================== Classes ====================== class Inside: def __init__(self, parent): self.parent = parent ...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Todo_GUi.py
Todo_GUi.py
from tkinter import messagebox import tkinter as tk # Function to be called when button is clicked def add_Button(): task = Input.get() if task: List.insert(tk.END, task) Input.delete(0, tk.END) def del_Button(): try: task = List.curselection()[0] List.delete(task) ex...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/JsonParser.py
JsonParser.py
import json class JsonParser: """ this class to handle anything related to json file [as implementation of facade pattern] """ def convert_json_to_python(self, par_json_file): """ this function to convert any json file format to dictionary args: the json file return: d...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/calci.py
calci.py
a = int(input("enter first value")) b = int(input("enter second value")) add = a + b print(add)
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Mad Libs Generator.py
Mad Libs Generator.py
# Loop back to this point once code finishes loop = 1 while loop < 10: # All the questions that the program asks the user noun = input("Choose a noun: ") p_noun = input("Choose a plural noun: ") noun2 = input("Choose a noun: ") place = input("Name a place: ") adjective = input("Choose an adjecti...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/multiplication_table.py
multiplication_table.py
""" The 'multiplication table' Implemented in Python 3 Syntax: python3 multiplication_table.py [rows columns] Separate filenames with spaces as usual. Updated by Borys Baczewski (BB_arbuz on GitHub) - 06/03/2022 """ from sys import argv # import argument variable ( script, rows, columns, ) = argv # de...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/whatsapp-monitor.py
whatsapp-monitor.py
#! /usr/bin/python3 """ Author- Tony Stark download https://github.com/mozilla/geckodriver/releases set path paste binary file /usr/local/bin install requirements: python -m pip install selenium """ from selenium import webdriver import time driver = webdriver.Firefox() driver.get("http://web.whatsapp.com") name...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/triangles.py
triangles.py
max_size = 10 print( "(a)" + " " * (max_size) + "(b)" + " " * (max_size) + "(c)" + " " * (max_size) + "(d)" + " " * (max_size) ) for i in range(1, max_size + 1): print("*" * i, end=" " * (max_size - i + 3)) print("*" * (max_size - i + 1), end=" " * (i - 1 + 3)) print(" " ...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/how to display the fibonacci sequence up to n-.py
how to display the fibonacci sequence up to n-.py
# Program to display the Fibonacci sequence up to n-th term nterms = int(input("How many terms? ")) # first two terms n1, n2 = 0, 1 count = 0 # check if the number of terms is valid if nterms <= 0: print("Please enter a positive integer") elif nterms == 1: print("Fibonacci sequence upto", nterms, ":") pr...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/diction.py
diction.py
from difflib import get_close_matches import pyttsx3 import json import speech_recognition as sr data = json.load(open("data.json")) engine = pyttsx3.init() voices = engine.getProperty("voices") engine.setProperty("voice", voices[0].id) def speak(audio): engine.say(audio) engine.runAndWait() def takeComman...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/ASCIIvaluecharacter.py
ASCIIvaluecharacter.py
# Program to find the ASCII value of the given character c = "p" print("The ASCII value of '" + c + "' is", ord(c))
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/fibonici series.py
fibonici series.py
nterms = int(input("How many terms? ")) # first two terms n1, n2 = 0, 1 count = 0 # check if the number of terms is valid if nterms <= 0: print("Please enter a positive integer") elif nterms == 1: print("Fibonacci sequence upto", nterms, ":") print(n1) else: print("Fibonacci sequence:") while coun...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/python_webscraper.py
python_webscraper.py
import requests from bs4 import BeautifulSoup # Make a request on to your website page = requests.get("Paste your Website Domain here") soup = BeautifulSoup(page.content, "html.parser") # Create all_h1_tags as empty list all_h1_tags = [] # Set all_h1_tags to all h1 tags of the soup for element in soup.select("h1"): ...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Delete_Linked_List.py
Delete_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_End(self, new_data): new_node = Node(new_data) if self.head is None: self.head = new_node return ...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Polyline.py
Polyline.py
# Polyline drawing in codeskulptor import simplegui polyline = [] def click(pos): global polyline polyline.append(pos) def clear(): global polyline polyline = [] def draw(canvas): if len(polyline) == 1: canvas.draw_point(polyline[0], "White") for i in range(1, len(polyline)): ...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/dice.py
dice.py
# Script Name : dice.py # Author : Craig Richards # Created : 05th February 2017 # Last Modified : # Version : 1.0 # Modifications : # Description : This will randomly select two numbers, # like throwing dice, you can change the sides of the dice if you wish import random class Die(object): # A dice has a f...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/TaskManager.py
TaskManager.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/whatsapp-schedule.py
whatsapp-schedule.py
""" Author- Richmond Nyamekye download https://github.com/mozilla/geckodriver/releases install requirements: python -m pip install selenium """ import pywhatkit def send_msg(phone: str, msg: str, hour: int, minute: int) -> None: pywhatkit.sendwhatmsg(phone, msg, hour, minute) def send_whatmsg_to_group(group...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/pythagoreanTriplets.py
pythagoreanTriplets.py
limit = int(input("Enter upper limit:")) c = 0 m = 2 while c < limit: for n in range(1, m + 1): a = m * m - n * n b = 2 * m * n c = m * m + n * n if c > limit: break if a == 0 or b == 0 or c == 0: break print(a, b, c) m = m + 1
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/cricket_news.py
cricket_news.py
from bs4 import BeautifulSoup import requests import pyttsx3 engine = pyttsx3.init() voices = engine.getProperty("voices") engine.setProperty("voice", voices[0].id) def speak(audio): engine.say(audio) engine.runAndWait() url = "https://www.cricbuzz.com/cricket-news/latest-news" ans = requests.get(url) so...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/live_sketch.py
live_sketch.py
import cv2 def sketch(image): img_gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) img_gray_blur = cv2.GaussianBlur(img_gray, (5, 5), 0) canny_edges = cv2.Canny(img_gray_blur, 10, 70) ret, mask = cv2.threshold(canny_edges, 70, 255, cv2.THRESH_BINARY_INV) return mask cap = cv2.VideoCapture(0) whil...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/compass_code.py
compass_code.py
def degree_to_direction(deg): directions = ["N", "NE", "E", "SE", "S", "SW", "W", "NW"] deg = deg % 360 deg = int(deg // 45) print(directions[deg]) degree_to_direction(45)
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Collatz-Conjecture.py
Collatz-Conjecture.py
#!/usr/bin/env python3 # Recommended: Python 3.6+ """ Collatz Conjecture - Python The Collatz conjecture, also known as the 3x + 1 problem, is a mathematical conjecture concerning a certain sequence. This sequence operates on any input number in such a way that the output will always reach 1. The Collatz conjecture...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/sha1.py
sha1.py
import argparse import hashlib # hashlib is only used inside the Test class import struct import unittest class SHA1Hash: """ Class to contain the entire pipeline for SHA1 Hashing Algorithm """ def __init__(self, data): """ Inititates the variables data and h. h is a list of 5 8-digi...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/levenshtein_distance.py
levenshtein_distance.py
def levenshtein_dis(wordA, wordB): wordA = wordA.lower() # making the wordA lower case wordB = wordB.lower() # making the wordB lower case # get the length of the words and defining the variables length_A = len(wordA) length_B = len(wordB) max_len = 0 diff = 0 distances = [] dista...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/powerup_checks.py
powerup_checks.py
from __future__ import print_function import os # Load the Library Module import sqlite3 # Load the Library Module import subprocess # Load the Library Module import sys # Load the Library Module from time import strftime # Load just the strftime Module from Time # Script Name : powerup_checks.py # Author : ...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/wiki_random.py
wiki_random.py
"""Author Anurag Kumar(mailto:anuragkumarak95@gmail.com) Module for Fetching Random Wiki Pages and asking user for opening one of them Python: - 3.5 Requirements: - requests - json - webbrowser Usage: - $python3 wiki_random.py enter index of article you would like to see, or 'r' for retry and 'n' for exit...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/scalg.py
scalg.py
""" developed by: markmelnic original repo: https://github.com/markmelnic/Scoring-Algorithm pypi: https://pypi.org/project/scalg/ Analyse data using a range based percentual proximity algorithm and calculate the linear maximum likelihood estimation. The basic principle is that all values supplied will be broke...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/batch_file_rename.py
batch_file_rename.py
# batch_file_rename.py # Created: 6th August 2012 """ This will batch rename a group of files in a given directory, once you pass the current and new extensions """ # just checking __author__ = "Craig Richards" __version__ = "1.0" import argparse import os def batch_rename(work_dir, old_ext, new_ext): """ ...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/finding LCM.py
finding LCM.py
# Python Program to find the L.C.M. of two input number def compute_lcm(x, y): # choose the greater number if x > y: greater = x else: greater = y while True: if (greater % x == 0) and (greater % y == 0): lcm = greater break greater += 1 re...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/vowel remover function.py
vowel remover function.py
def vowel_remover(text): string = "" for l in text: if l.lower() not in "aeiou": string += l return string # this code runes on only this file if __name__=="__main__": print(vowel_remover("hello world!"))
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
# patch-255 decimal_accuracy = 7 def dtbconverter(num): whole = [] fractional = ["."] decimal = round(num % 1, decimal_accuracy) w_num = int(num) i = 0 while decimal != 1 and i < decimal_accuracy: decimal = decimal * 2 fractional.append(int(decimal // 1)) decimal = ro...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/rook.py
rook.py
start = [0, 0] end = [7, 7] taken = [[1, 0], [1, 1], [1, 2], [1, 3]] queue = [] queue.append([start[0], start[1], -1]) visited = [] maze = [] for i in range(8): maze.append([".", ".", ".", ".", ".", ".", ".", "."]) visited.append([0, 0, 0, 0, 0, 0, 0, 0]) maze[start[0]][start[1]] = "S" maze[end[0]][end[1]] = "E...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/advanced_calculator.py
advanced_calculator.py
# This is like making a package.lock file for npm package. # Yes, I should be making it. __author__ = "Nitkarsh Chourasia" __version__ = "0.0.0" # SemVer # Understand more about it __license__ = "MIT" # Understand more about it # Want to make it open source but how to do it? # Program to make a simple calculator # Wi...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/text_to_pig_latin.py
text_to_pig_latin.py
""" This program converts English text to Pig-Latin. In Pig-Latin, we take the first letter of each word, move it to the end, and add 'ay'. If the first letter is a vowel, we simply add 'hay' to the end. The program preserves capitalization and title case. For example: - "Hello" becomes "Ellohay" - "Image" becomes "Im...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/voice.py
voice.py
# modules for use of voice from gtts import gTTS from colorama import Fore import os # Define the text you want to convert to speech text = "Hello! This is a sample text to convert to speech." # Exception Handaled. try: # Create a gTTS object tts = gTTS(text=text, lang="en") # Save the audio file in mp3...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Conversation.py
Conversation.py
# imports modules import sys import time from getpass import getuser # user puts in their name name = getuser() name_check = input("Is your name " + name + "? → ") if name_check.lower().startswith("y"): print("Okay.") time.sleep(1) if name_check.lower().startswith("n"): name = input("Then what is it? → ")...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Kilometerstomile.py
Kilometerstomile.py
# Taking kilometers input from the user kilometers = float(input("Enter value in kilometers: ")) # conversion factor conv_fac = 0.621371 # calculate miles miles = kilometers * conv_fac print(f"{kilometers:.2f} kilometers is equal to {miles:.2f} miles")
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/A solution to project euler problem 3.py
A solution to project euler problem 3.py
""" Problem: The prime factors of 13195 are 5,7,13 and 29. What is the largest prime factor of a given number N? e.g. for 10, largest prime factor = 5. For 17, largest prime factor = 17. """ # def solution(n: int) -> int: def solution(n: int = 600851475143) -> int: """Returns the largest prime factor of a given ...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/check_prime.py
check_prime.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/Turtle_Star.py
Turtle_Star.py
import turtle board = turtle.Turtle() # first triangle for star board.forward(100) # draw base board.left(120) board.forward(100) board.left(120) board.forward(100) board.penup() board.right(150) board.forward(50) # second triangle for star board.pendown() board.right(90) board.forward(100) board.right(120) boa...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/random_file_move.py
random_file_move.py
# Script Name : random_file_move.py # Author(s) : Akash Jain # Created : 1 September 2020 # Last Modified : 1 September 2020 # Version : 1.0 # Description : This will move specified number of files(given in ratio) from the src directory to dest directory. import os import random import argparse ...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/string_rotation.py
string_rotation.py
# This program rotates a given string letters by letters # for example: # input: "Tie" # Output: ["ieT", "eTi"] def rotate(n): a = list(n) if len(a) == 0: return print([]) l = [] for i in range(1, len(a) + 1): a = [a[(i + 1) % (len(a))] for i in range(0, len(a))] l += ["".join(...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/nmap_scan.py
nmap_scan.py
from __future__ import print_function import optparse # Import the module import nmap # Import the module # Script Name : nmap_scan.py # Author : Craig Richards # Created : 24th May 2013 # Last Modified : # Version : 1.0 # Modifications : # Description : This scans my scripts directory and gives a c...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/CountMillionCharacter.py
CountMillionCharacter.py
""" Simple million word count program. main idea is Python pairs words with the number of times that number appears in the triple quoted string. Credit to William J. Turkel and Adam Crymble for the word frequency code used below. I just merged the two ideas. """ import re pattern = re.compile(r"\W") # re is used to ...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/saving_input_into_list.py
saving_input_into_list.py
ran = int(input("Enter the range of elements you want to store / insert ")) l1 = [] for i in range(ran): l1.append(input("Enter here ")) print(l1) """ program first asks the user how many values they want to enter. Then, using a loop, it lets the user enter that many values one by one. Each entered value is sav...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Anonymous_TextApp.py
Anonymous_TextApp.py
import tkinter as tk from PIL import Image, ImageTk from twilio.rest import Client window = tk.Tk() window.title("Anonymous_Text_App") window.geometry("800x750") # Define global variables body = "" to = "" def message(): global body, to account_sid = "Your_account_sid" # Your account sid auth_token = "...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/dir_test.py
dir_test.py
# Script Name : dir_test.py # Author : Craig Richards # Created : 29th November 2011 # Last Modified : by- Joshua Covington 05 Oct 2020 # Version : 1.0 # Modifications : # Description : Tests to see if the directory testdir exists, if not it will create the directory for you if you want it created. from ...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/news_oversimplifier.py
news_oversimplifier.py
# news_oversimplifier.py # Python command-line tool that fetches recent news articles based on a search query using NewsAPI and summarizes the article content using extractive summarization. You can also save the summaries to a text file. # (requires API key in .env file) import requests import os import sys from dot...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/missing number from list.py
missing number from list.py
# program to find a missing number from a list. def missing_number(num_list): return sum(range(num_list[0], num_list[-1] + 1)) - sum(num_list) print(missing_number([1, 2, 3, 4, 6, 7, 8])) print(missing_number([10, 11, 12, 14, 15, 16, 17]))
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/equations.py
equations.py
### ##### ####### by @JymPatel ##### ### ### ##### edited by ... (editors can put their name and thanks for suggestion) :) ### # what we are going to do print("We can solve the below equations") print("1 Quadratic Equation") # ask what they want to solve sinput = input("What you would like to solve?") # for Qdc E...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/SimpleStopWatch.py
SimpleStopWatch.py
# Author: OMKAR PATHAK # This script helps to build a simple stopwatch application using Python's time module. import time print("Press ENTER to begin, Press Ctrl + C to stop") while True: try: input() # For ENTER. Use raw_input() if you are running python 2.x instead of input() starttime = time....
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/greattwono.py
greattwono.py
# Python Program to find the largest of two numbers using an arithmetic operator a = int(input("Enter the first number: ")) b = int(input("Enter the second number: ")) if a - b > 0: 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/Google_News.py
Google_News.py
import ssl from urllib.request import urlopen from bs4 import BeautifulSoup as soup def news(xml_news_url, counter): """Print select details from a html response containing xml @param xml_news_url: url to parse """ context = ssl._create_unverified_context() Client = urlopen(xml_news_url, context...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/wikipedia.py
wikipedia.py
import wikipedia from tkinter import * from tkinter.messagebox import showinfo win = Tk() # objek win.title("WIKIPEDIA") win.geometry("200x70") # function # function def search_wiki(): search = entry.get() Hasil = wikipedia.summary(search) showinfo("Hasil Pencarian", Hasil) label = Label(win, text="Wikipe...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Classification_human_or_horse.py
Classification_human_or_horse.py
import pickle import tensorflow as tf model = tf.keras.models.Sequential( [ tf.keras.layers.Conv2D( 16, (3, 3), activation="relu", input_shape=(200, 200, 3) ), tf.keras.layers.MaxPooling2D(2, 2), tf.keras.layers.Conv2D(16, (3, 3), activation="relu"), tf.keras.la...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/qrcode.py
qrcode.py
import qrcode import cv2 qr = qrcode.QRCode(version=1, box_size=10, border=5) data = input() qr.add_data(data) qr.make(fit=True) img = qr.make_image(fill_color="blue", back_color="white") path = data + ".png" img.save(path) cv2.imshow("QRCode", img) cv2.waitKey(0) cv2.destroyAllWindows()
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/backup_automater_services.py
backup_automater_services.py
# Script Name : backup_automater_services.py # Author : Craig Richards # Created : 24th October 2012 # Last Modified : 13th February 2016 # Version : 1.0.1 # Modifications : 1.0.1 - Tidy up the comments and syntax # Description : This will go through and backup all my automator services workflows import datet...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/EncryptionTool.py
EncryptionTool.py
# GGearing # Simple encryption script for text # This was one my first versions of this script # 09/07/2017 from __future__ import print_function import math try: input = raw_input except NameError: pass key = int(math.pi * 1e14) text = input("Enter text: ") values = reverse = [] def encryptChar(target): ...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/get_info_remoute_srv.py
get_info_remoute_srv.py
# Script Name : get_info_remoute_srv.py # Author : Pavel Sirotkin # Created : 3th April 2016 # Last Modified : - # Version : 1.0.0 # Modifications : # Description : this will get info about remoute server on linux through ssh connection. Connect these servers must be through keys import subpro...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/palindrome.py
palindrome.py
def is_palindrome(text): text = text.lower() cleaned = "" for char in text: if char.isalnum(): cleaned += char reversed_text = cleaned[::-1] return cleaned == reversed_text user_input = input("Enter a word or a sentence:") if is_palindrome(user_input): print("It's a palin...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/String_Palindrome.py
String_Palindrome.py
# Program to check if a string is palindrome or not my_str = input().strip() # make it suitable for caseless comparison my_str = my_str.casefold() # reverse the string rev_str = my_str[::-1] # check if the string is equal to its reverse if my_str == rev_str: print("The string is a palindrome.") else: print(...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/Number reverse.py
Number reverse.py
n = int(input("Enter number: ")) rev = 0 while n > 0: dig = n % 10 rev = rev * 10 + dig n = n // 10 print("Reverse of the number:", rev)
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false
geekcomputers/Python
https://github.com/geekcomputers/Python/blob/21cbdf223aadd1c28293570d1106fe47af6e9434/tweeter.py
tweeter.py
from __future__ import print_function import os import tweepy # TODO: Further improvements can be made to the program # TODO: Further feature improvements and Refactoring can be done to the program # TODO: Add a README.md file showcasing how adding it to the PATH variable can make the posting much easier def get_sta...
python
MIT
21cbdf223aadd1c28293570d1106fe47af6e9434
2026-01-04T14:42:18.827821Z
false