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: 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") |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
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
| File Number | |
| 0001 | |
| 0002 | |
| 0003 |
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
| # | |
| # 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 |
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: 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(): |
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: 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", |
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: 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 |
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
| 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 |