This file contains hidden or 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 io import BytesIO | |
import requests | |
from PIL import Image | |
from PIL.ExifTags import TAGS, GPSTAGS | |
def get_long_lati(img_url:str): | |
response = requests.get(img_url) | |
img = Image.open(BytesIO(response.content)) | |
exif = img.getexif() | |
img.close() |
This file contains hidden or 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
anydeskInstall () { | |
wget -qO - https://keys.anydesk.com/repos/DEB-GPG-KEY | apt-key add - | |
echo "deb http://deb.anydesk.com/ all main" > /etc/apt/sources.list.d/anydesk-stable.list | |
apt update | |
apt install -y anydesk | |
} |
This file contains hidden or 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
# custom | |
/.idea/ | |
*.pyc | |
/.temp/* | |
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
*$py.class | |
# C extensions |
This file contains hidden or 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 json | |
dict="{"employee":{"name":"fahad", "age":0, "city":"No"}}" | |
json_data = json.dumps(dict) | |
parsed = json.loads(json_data) | |
print(json.dumps(parsed, indent=4, sort_keys=True)) |
This file contains hidden or 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
sudo apt install -y python2 # | |
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py # | |
python2 get-pip.py # |
This file contains hidden or 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 | |
# [+] - USAGE | |
# RUN chmod +x {filename}.sh | |
# RUN as ROOT | |
welcome () { | |
echo '[+] --- PREPARING TO INSTALL...' | |
} |
This file contains hidden or 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
# Dependency : `Curl` must be preinstalled | |
tgm () { | |
TOKEN="XXXX" | |
ID="-000000" | |
URL="https://api.telegram.org/bot$TOKEN/sendMessage" | |
MSG="$@" | |
process_msg=${MSG// /_} | |
curl -s -X POST $URL -d chat_id=$ID -d text="MSG : $process_msg" |
This file contains hidden or 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
# --------- USAGE ----------- | |
# USE THIS FILE IF YOU WANT TO MAINTAIN DIRECTORY STRUCTURE WHILE DECOMPILING ".PYC" TO ".PY" RECURSIVELY | |
# Install Python | |
# Run -> pip install uncompyle6 | |
# Run -> python decompile_pyc_recursively.py -p [PATH-OF-PYC-DIR] | |
# ---------------------------- | |
import argparse | |
import os |
This file contains hidden or 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
/* [+] SHOW RUNNING QUERIES (PRE 9.2) */ | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' | |
AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start DESC; |
This file contains hidden or 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 sshtunnel import SSHTunnelForwarder | |
from sqlalchemy.orm import sessionmaker | |
from sqlalchemy import create_engine | |
from sqlalchemy import inspect | |
import pandas as pd | |
class Postgresql_connect(object): | |
def __init__(self, pgres_host, pgres_port, db, ssh, ssh_user, ssh_host, ssh_pkey): | |
# SSH Tunnel Variables | |
self.pgres_host = pgres_host |