Skip to content

Instantly share code, notes, and snippets.

View BrazyDevelopment's full-sized avatar
🎇
Seeking Wisdom.

Brazy BrazyDevelopment

🎇
Seeking Wisdom.
View GitHub Profile
@BrazyDevelopment
BrazyDevelopment / sitemap-gen.py
Created April 26, 2024 03:39
Sitemap.xml Generator
# Usage: python sitemap-gen.py
# This script generates a sitemap.xml file based on a given directory path.
# In this case it is ignoring the 'assets' folder, you can change this to whatever you need to. Or add more removes.
import os
import datetime # for getting current date and time
def generate_sitemap(directory, base_url, output_file="sitemap.xml"):
with open(output_file, "w") as f:
f.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")
@BrazyDevelopment
BrazyDevelopment / file_numbers.csv
Last active April 26, 2024 03:20
Nanswap-NFT-Mass-Rarity-Checker
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
File Number
0001
0002
0003
@BrazyDevelopment
BrazyDevelopment / mosaic.py
Created April 26, 2024 03:10
NFT-Mosaic-Creator
#
# example usage:
# python3 mosaic.py <source-path> <x-size> <y-size> <images-per-row> <spacing>
# python3 mosaic.py ./images/ 512 512 8 0
#
import os
import sys
import random # Import the random module
@BrazyDevelopment
BrazyDevelopment / find-traits.py
Created April 26, 2024 03:09
Nanswap-NFT-Find-Matching-Traits
# Usage: python trait-finder.py <trait1> <trait2> ... <traitN>
# This script finds matching traits from your `all-objects.json`
# Change the file name/directory if required.
# If there is a space in your trait name you must enclose it 'Like This'.
# e.g. python trait-finder.py Suit 'Top Hat' Golden
import json
import sys
def load_data():
@BrazyDevelopment
BrazyDevelopment / nft-odds-checker.py
Created April 26, 2024 03:03
Nanswap-NaNFT-Odds-Checker
# Usage: python nft-odds-checker.py
# Make sure your odds add up to 100000
# Make sure you've inputted your "items":[] object into the data={} array.
# This script is designed to work with https://github.com/WriteNaN/Nanswap-NFT-Generator
data = {
"items": [
{
"trait": "3D Glasses",
@BrazyDevelopment
BrazyDevelopment / format.py
Last active April 26, 2024 03:04
Nanswap-Format-JSON-Data
# Usage: python format.py
# Ensure to input your path in the directory variable.
import os
import json
# Define the directory containing the JSON files
directory = r'INPUT_PATH_HERE'
# Iterate over each file in the directory
local ESX = nil -- replace with your ESX instance
-- Load the FiveM SDK
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if NetworkIsSessionStarted() then
-- Do initialization tasks here
break
end