Skip to content

Instantly share code, notes, and snippets.

View shadowdevnotreal's full-sized avatar
🐱
Repositories are being tested, they will be public again soon............

CatHat shadowdevnotreal

🐱
Repositories are being tested, they will be public again soon............
View GitHub Profile
@shadowdevnotreal
shadowdevnotreal / gist:7b0b18b6376361b09cc9bba9065b48b9
Created October 12, 2024 15:33
bit-reversal permutation prompt
Here's how we can design a clear prompt and provide the corresponding code while ensuring that we strictly follow the rules laid out earlier. This prompt will guide the LLM step by step through the process of inverting the tree and verifying the correctness by using the truth table testing method.
Final Prompt: Bit-Reversal Tree Inversion
Objective: Implement an invert function that performs a bit-reversal permutation on a perfect binary tree. Follow the rules and verify the solution using a truth table-like test to ensure that the original tree is restored after double inversion.
Constraints:
1. Only use the invert function: You are not allowed to define or use any additional functions other than invert.
@shadowdevnotreal
shadowdevnotreal / gist:94ed8ea0684d0f6cdabb46d87f483c99
Created October 12, 2024 15:29
Random Binary Inversion logic
To perform prediction modeling or apply algorithms to analyze this random binary tree, we can take several approaches depending on the context. Since this is a binary tree with random integer values, we can’t apply traditional machine learning algorithms directly as the data lacks labeled features or specific targets. However, we can still apply tree manipulation and analysis methods such as inversion, and we can also test the double inversion process.
Plan:
1. Tree Inversion: We will apply the tree inversion function to this tree.
2. Double Inversion: After the first inversion, we will invert it again to check if the tree is restored to its original form.
#!/usr/bin/python3
from Crypto.Cipher import AES
from Crypto.Random import get_random_bytes
import urllib.request
import os
import argparse
from time import sleep
import sys
import zipfile
import hashlib
import os
import tkinter as tk
def encrypt_and_destroy():
# Compress the folder using Zip file format
root = tk.Tk()
input_folder = tk.filedialog.askdirectory(parent=root, initialdir="/", title="Select a folder to encrypt")
root.destroy()
#!/bin/bash
# Check if apt-get is installed
if command -v apt-get &>/dev/null; then
echo "Using apt-get"
sudo apt-get install zip python-hashlib python3-tk python3-os
else
# Check if dnf is installed
if command -v dnf &>/dev/null; then
echo "Using dnf"
@shadowdevnotreal
shadowdevnotreal / onehit.sh
Last active December 2, 2023 01:31
one hit script
#!/bin/bash
# Install tools
echo "[*] Installing tools..."
# Install Subfinder
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
# Install Assetfinder
go install -v github.com/projectdiscovery/assetfinder/cmd/assetfinder@latest
@shadowdevnotreal
shadowdevnotreal / resume.js
Last active March 5, 2023 17:36
js testing
let resumeText = '';
let jobDescriptionText = '';
function displaySelectedFiles() {
const resumeInput = document.getElementById("resumeInput");
const jobDescriptionInput = document.getElementById("jobDescriptionInput");
resumeText = '';
jobDescriptionText = '';
@shadowdevnotreal
shadowdevnotreal / resume.html
Last active March 5, 2023 17:48
testing html code
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Resume Matcher</title>
</head>
<body>
<h1>Resume Matcher</h1>
@shadowdevnotreal
shadowdevnotreal / ceasar derypt
Created June 26, 2020 02:24
Simple Caesar Shifting Decryption Script
#Caesar Shift Decryption Code
def encrypt(string, shift):
cipher = ''
for char in string:
if char == ' ':
cipher = cipher + char
elif char.isupper():
cipher = cipher + chr((ord(char) - shift - 65) % 26 + 65)
else:
@shadowdevnotreal
shadowdevnotreal / ceasar encrypt
Created June 26, 2020 02:08
Simple Caesar Shifting Encryption Code
#Caesar Shift Encryption Code
def encrypt(string, shift):
cipher = ''
for char in string:
if char == ' ':
cipher = cipher + char
elif char.isupper():
cipher = cipher + chr((ord(char) + shift - 65) % 26 + 65)
else: