# fetch details of any ip address
# Example ip: 192.1.2.1
# Example ip: 192.1.2.1
import urllib.request
import json
ip = input("Please enter IP address: ")
url = f"http://ip-api.com/json/{ip}"
req = urllib.request.urlopen(url)
res_body = req.read()
res = json.loads(res_body.decode("utf-8"))
print(f"""
Status : {res["status"]}
Country : {res['country']}
Countrycode : {res["countryCode"]}
Region : {res["region"]}
City : {res['city']}
Zip Code : {res["zip"]}
latitude : {res['lat']}
longitude : {res['lon']}
timezone : {res["timezone"]}
ISP : {res["isp"]} """)
❤3👍1
string = "I am a python developer"
X=string.split()
se = (X[::-1])
print(" ".join(se))
# Reverse string in python
❤2
import random
import pyautogui
import time
x = ["hi", "hello", "spam", "python", "how are u?", "I love you"]
while True:
pyautogui.typewrite(random.choice(x))
time.sleep(1)
pyautogui.press("enter")
# Random spam using python
# note work only in pc.
❤2
Ab aap log apna khud ka Compiler bot bana sakte hain easily 🥳🥳🔥
Apne manpasand name aur username se
Create your own
By using @CloneCompiler_bot
See full details: Click Here
Apne manpasand name aur username se
Create your own
By using @CloneCompiler_bot
See full details: Click Here
Extract App details using python !
#python
#python
import requests
from bs4 import BeautifulSoup
i=input("enter app name")
page = requests.get(f"https://play.google.com/store/search?q={i}&c=apps")
soup = BeautifulSoup(page.content, "html.parser")
Details = soup.find("div", "omXQ6c").text.strip()
Ratings = soup.find("div", "TT9eCd").text.strip()
Reviews = soup.find("div", "g1rdde").text.strip()
print(f"Details: {Details}\nRatings: {Ratings}\nReviews: {Reviews}")
Img = soup.find("div", "Jeh37")
images = Img.find_all("img", {"itemprop": "image"})
print(images[0]['src'])
❤1
sᴇᴀʀᴄʜ ɢɪᴛʜᴜʙ ʀᴇᴘᴏsɪᴛᴏʀʏ ᴜsɪɴɢ ᴘʏᴛʜᴏɴ.
----------------------------------------
--------------------------
----------------------------------------
from github import Github
token="Enter Github Token Here"
g = Github(token)
X=g.search_repositories(input("Enter Repo Name to Search from Github "))
y=X[0]
print(f"""Full Name : {y.full_name}
Size :{round(y.size/1024,2)} mb
Created at {y.created_at}
Visibility: {y.visibility}
Language: {y.language}
Description : {y.description}
Topics: {" ".join(y.topics)}
Total forks :{y.forks}
Total Stars :{y.stargazers_count}
Source Link: {y.html_url}
Last Update: {y.updated_at}
By @Mr_Sukkun """)
--------------------------
❤1
# 1 to 100 numbers
print(list(range(1, 101)))
#Table using python of any number
# Join : @python_codes_pro
num = int(input("Enter any number: "))
for i in range(1, 11):
print(f"{num} * {i} = {num * i}")# Join : @python_codes_pro
👍1
# Events example in Python
# Share: Telegram.me/addlist/2UhsQW_cGzkxMzg1
class EventEmitter:# Now use of this EventEmitter class
def __init__(self):
self.funcs = []
def on(self, mesType, callback):
self.funcs.append({'mesType': mesType, 'callback': callback})
def emit(self, mesType, obj):
for funobj in self.funcs:
if funobj['mesType'] == mesType:
funobj['callback'](obj)
e = EventEmitter()# Emitting Events
def func(ob):
print("Event message 1st listener: " + ob)
def func1(ob):
print("Event message 2nd listener: " + ob)
def abcc(ob):
print("Event abc listener: " + ob)
e.on('message', func)
e.on('message', func1)
e.on('abc', abcc)
mes = input('Enter anything for message Event: ')
e.emit('message', mes) # emitting message Event
abc = input('\nEnter anything for abc Event: ')
e.emit('abc', abc) # emitting abc Event# Share: Telegram.me/addlist/2UhsQW_cGzkxMzg1
....Chatgpt on WhatsApp
Yatter in..
Link :- https://wa.me/919811046549?text=Hi%20Yatter
Join Coding: http://Telegram.me/addlist/2UhsQW_cGzkxMzg1
Yatter in..
Link :- https://wa.me/919811046549?text=Hi%20Yatter
Join Coding: http://Telegram.me/addlist/2UhsQW_cGzkxMzg1
❤2
YouTube on Telegram 😎:
http://t.me/YouTube_gbot/ytb
http://t.me/YouTube_gbot/ytb
n = int(input("Enter num: "))
for i in range(1,n+1):
print(i, end=" ")"""
Learn coding:
https://t.me/addlist/2UhsQW_cGzkxMzg1
1 2 3 4 5 6 7"""
👍1
# basic pattern in reverse
n = int(input("Enter num: "))
for i in range(n, 0, -1):
print(i, end=" ")# pattern
# 6 5 4 3 2 1