Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import log, floor | |
def dec_to_bin(N): | |
if N == 0 or N == 1: | |
return N | |
String = '' | |
Powers = [] | |
while N > 0: | |
x = log(N, 2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" Script for Tkinter GUI chat client. """ | |
import tkinter | |
from socket import AF_INET, socket, SOCK_STREAM, gethostbyname, gethostname | |
from threading import Thread | |
import math | |
import subprocess as sp | |
def receive(): | |
""" Handles receiving of messages. """ | |
while True: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mechanize | |
from bs4 import BeautifulSoup | |
name = input("Enter the name you wanna search for: ").replace(" ", "+") | |
br = mechanize.Browser() | |
br.addheaders = [("User-agent","Mozilla/5.0")] | |
resp = br.open("https://viewdns.info/reversewhois/?q={}".format(name)) | |
soup = BeautifulSoup(resp.read(), "lxml") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from bs4 import BeautifulSoup | |
from fake_useragent import UserAgent | |
ua = UserAgent().random | |
def bing_search(string): | |
urls = [] | |
payload = { | |
'q': string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket, threading | |
def connect(ip, port_number, delay, output): | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) | |
sock.settimeout(delay) | |
try: | |
sock.connect((ip, port_number)) | |
output[port_number] = True | |
except: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import requests This is a required module if you want to use your android's webcam. | |
import cv2 | |
import numpy as np | |
import pyautogui | |
import mouse | |
from math import sqrt | |
prev_cord = None | |
sX, sY = pyautogui.size() | |
sX, sY = sX//2, sY//2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
def gen_data(data): | |
new_data = [] | |
for i in data: | |
new_data.append(format(ord(i), '08b')) | |
return new_data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
file=$(ls -1 | python3 -c "import os; import random; files=os.listdir(os.getenv('HOME')+'/Pictures/Wallpapers'); print(random.choice(files));") | |
XDG_RUNTIME_DIR=/run/user/$(id -u) gsettings set org.gnome.desktop.background picture-uri file:///$HOME/Pictures/Wallpapers/$file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess as sp | |
import socket | |
def clrscr(): | |
sp.call("clear", shell=True) | |
def get_ip(): | |
output = sp.check_output(["ip route | grep default"], shell=True) # Gets the gateway. | |
output = output.decode("utf8") |