ar
Feedback
Python Codes Basic to Advance

Python Codes Basic to Advance

الذهاب إلى القناة على Telegram
2 813
المشتركون
لا توجد بيانات24 ساعات
-47 أيام
-2430 أيام
أرشيف المشاركات
Simple website using python #flask from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return '@
Simple website using python #flask
from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
    return '@Legend_coder'

if __name__ == "__main__":
    app.run()
Join :- @Python_Codes_Pro Support group :- @python_group_pro

Guess the Output Join :- @Python_Codes_Pro Support group :- @python_group_pro
Guess the Output Join :- @Python_Codes_Pro Support group :- @python_group_pro

# Foundations of Hacking and Pentesting Android Apps Run code to download video in ur system source code : https://github.com
# Foundations of Hacking and Pentesting Android Apps Run code to download video in ur system source code : https://github.com/Noob-mukesh/Python-Projects/blob/main/hackingudemycourse.py About this course Learn how to hack Android apps, and find vulnerabilties By the numbers Skill level: Beginner Level Students: 55064 Languages: English Captions: Yes Lectures: 15 Video: 1.5 total hours Features Available on iOS and Android What you’ll learn Setting up Android Studio and Emulators Basics of adb Decompiling apks Insecure Logging Hardcoding Issues Insecure Data Storage Input Valdiation Issues Drozer Finding Attack Surfaces Access Control Issues Content Provider Injections General Bug Hunting Tips Are there any course requirements or prerequisites? A basic understanding of programming Who this course is for: Android developers looking to secure their applications Hackers looking to learn common Android vulnerabilities

photo content

Getter and Setters in Python

import requests

class MukeshAPI:
    """
    A simple class to interact with the API.
    """
    def __init__(self, base_url="https://mukesh-api.vercel.app",endpoint=""):
        self._base_url = base_url
        self._endpoint=endpoint
    @property
    def endpoint(self):
        return self._endpoint
    @endpoint.setter
    def endpoint(self, new_endpoint):
        self._endpoint = new_endpoint

    def search(self, query):
        url = f"{self._base_url}/{self.endpoint}?query={query}"
        headers = {"accept": "application/json"}
        response = requests.get(url, headers=headers)

        if response.status_code == 200:
            return response.json()["results"]
        else:
            return {"error": f"Failed to retrieve. Status code: {response.status_code}"}
    def search2(self):
        url = f"{self._base_url}/{self.endpoint}"
        headers = {"accept": "application/json"}
        response = requests.get(url, headers=headers)

        if response.status_code == 200:
            return response.json()["results"]
        else:
            return {"error": f"Failed to retrieve. Status code: {response.status_code}"}
    def search3(self,api_key, query):
        url = f"{self._base_url}/{self.endpoint}?query={query}"
        headers = {"accept": "application/json","Api-Key":api_key}
        response = requests.post(url, headers=headers)

        if response.status_code == 200:
            return response.json()
        else:
            return {"error": f"Failed to retrieve. Status code: {response.status_code}"}

bl=MukeshAPI(endpoint="bhagwatgita")
print(bl.endpoint)
print(bl.search3(api_key="get from @adventure_robot",query=1))
bl.endpoint="truth"
print(bl.endpoint)
print(bl.search2())
bl.endpoint = "chatgpt"
print(bl.endpoint)
print(bl.search("write basic website code using html and css"))

# INHERITANCE IN PYTHON
import requests
class GoogleImageAPI:
    """
    A simple class to interact with the Google Image API.
    """

    def __init__(self, base_url):
        self.base_url = base_url

    def search_images(self, query):
    
        endpoint = f"{self.base_url}/googleimg?query={query}"
        headers = {"accept": "application/json"}
        
        response = requests.get(endpoint, headers=headers)

        if response.status_code == 200:
            return response.json()
        else:
            return {"error": f"Failed to retrieve images. Status code: {response.status_code}"}

class Blackbox(GoogleImageAPI):
    def init(self,base_url):
        super().__init__(base_url)
        
    def blackbox_response(self,query):
        endpoint = f"{self.base_url}/blackbox?query={query}"
        response = requests.get(endpoint)
        if response.status_code == 200:
            return response.json()
        else:
            return {"error": f"Failed to retrieve images. Status code: {response.status_code}"}

bl=Blackbox(base_url="https://mukesh-api.vercel.app")
print(bl.blackbox_response(query="write simple python flask app"))
print(bl.search_images("boy"))

What arithmetic operators cannot be used with strings in Python?
Anonymous voting

What is the difference between GET and POST methods in HTTP?
Anonymous voting

Guess the Output? #python x = 1, 2, 4, 6 print(type(x))
Anonymous voting

x = "3" y = 2 print (x+y)
Anonymous voting

import requests

class Blackbox:
    """
    A class to interact with the Blackbox API.

    Attributes:
    base_url (str): The base URL of the Blackbox API.
    """
    def __init__(self):
        self.base_url = "https://mukesh-api.vercel.app/blackbox"

    def make_request(self, query):
        """
        Makes a request to the Blackbox API with the provided query.

        Args:
        query (str): The query string to send to the API.

        Returns:
        dict: The JSON response from the API.
        @mr_sukkun
        """
        url = f"{self.base_url}?query={query}"
        headers = {
            "accept": "application/json"
        }
        response = requests.get(url, headers=headers)
        return response.json()

# Example usage
box = Blackbox()
result = box.make_request("hi")
print(result)
# blackbox ai alternative of chatgpt using python by : @mr_sukkun

import requests

class GoogleImageAPI:
    """
    A simple class to interact with the Google Image API.
    """

    def __init__(self, base_url):
        """
        Initialize the GoogleImageAPI with the base URL of the API.

        Args:
        base_url (str): The base URL of the API.
        """
        self.base_url = base_url

    def search_images(self, query):
        """
        Retrieve images from Google Image API based on the query.

        Args:
        query (str): The search query for images.

        Returns:
        dict: A dictionary containing the API response.
        """
        endpoint = f"{self.base_url}/googleimg?query={query}"
        headers = {"accept": "application/json"}
        
        response = requests.get(endpoint, headers=headers)

        if response.status_code == 200:
            return response.json()
        else:
            return {"error": f"Failed to retrieve images. Status code: {response.status_code}"}

# Instantiating the class
google_image_api = GoogleImageAPI(base_url="https://mukesh-api.vercel.app")

# Searching for images
result = google_image_api.search_images(query="Boy")
print(result)

What is the purpose of the range() function in Python?
Anonymous voting

What does API stand for?
Anonymous voting

Python Crash Course Join :- @Python_Codes_Pro Support group :- @python_group_pro

print(8+~9)
Anonymous voting

import requests
base_url = "https://mukesh-api.vercel.app/"

class IMDb:
    def __init__(self, search_str):
        self.search_str = search_str

    def search_imdb(self):
        url = f"{base_url}imdb?query={self.search_str}"
        response = requests.get(url)
        if response.status_code == 200:
            return response.json()["results"]
        else:
            return "Failed to fetch data from IMDb."

search_term = input("Search movie info from movie name: ")
imdb_search = IMDb(search_term)
print(imdb_search.search_imdb()) 
Get Movie info from IMDb website

import requests
base_url = "https://mukesh-api.vercel.app/"

class Wikipedia:
    def __init__(self, search_str):
        self.search_str = search_str

    def search_wikipedia(self):
        url = f"{base_url}wikipedia?query={self.search_str}"
        response = requests.get(url)
        if response.status_code == 200:
            return response.json()["results"]
        else:
            return "Failed to fetch data from Wikipedia."

search_term = input("Search anything on Wikipedia: ")
wikipedia_search = Wikipedia(search_term)
print(wikipedia_search.search_wikipedia())
Search anything from Wikipedia and get summary of that term.

import requests

base_url="https://mukesh-api.vercel.app/"

class Flirt:

     'Random flirt msg'

    def __init__(self):

        pass

    def flirt(self):

        url=f"{base_url}flirt"
        return requests.get(url).json()["results"][0]

H=Flirt()

print(H.flirt())
#Output:
'Do you have a sunburn, or are you always this hot? 🔥😏'
# Random flirt msg

🇮🇳 Happy Republic Day 🇮🇳