marimo-team /
marimo
A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Loading repository data…
MarcosCosmos / repository
A script for bundling small C++ projects into a single file, to upload to CodinGame, by resolving includes, include guards, and accompanying .cpp files
This is a script for bundling small C++ projects into a single file, to upload to CodinGame, by resolving includes, include guards, and accompanying .cpp files
Assuming you've got python3 installed correctly, you can just run the script (located at src/bundler.py in this repo), supplying a path to the source file containing your main method, a path to the file you want the bundled code to be saved into, and prefix for identifying include-guards as command line arguments.
I.e.:
python3 bundler.py -i/--input <main_file> -o/--output <output_file> -g/--guard-prefix <include_guard_prefix>
E.g.:
python3 bundler.py -i main.cpp -o bundled_code.cpp -g __INCLUDE_GUARD_
If you omit the output argument, it will print the bundled code to standard output.
If you omit the input, it will attempt to look for a main.cpp file in the current directory, and, if found, will use that as the input file.
If you omit the include guard, it defaults to __INCLUDE_GUARD.
If you use #pragma once, you needn't worry about the guard prefix, and can use -ng/--no-guard to disable include-guard processing.
There are many more additional options available: for more detailed usage information, run the program with the -h/--help flag:
python3 bundler.py -h
This script is NOT a full C++ macro preprocessor. As such, there are some caveats:
#define, #undefine, #ifdef, and #ifndef macros that start with __INCLUDE_GUARD_ (or another prefix you may specify as an argument) (e.g. #indef __INCLUDE_GUARD_MY_FILE) will be omitted from the bundled code (after being processed)#pragma once macros are also removed (but will have been processed)#define MY_FILE, or #if defined MY_FILE would not be noticedAs a rough summary, it:
#includes (the ones using quotes, not angle-brackets)#pragma once__INCLUDE_GUARD_, or a user-supplied guard-prefix)#ifdef and #ifndef for include guards#if)Additionally, I've included a collection of small C++ files I used to test the script into the repo to give a concrete example of how the script behaves.
They can be found in the tests directory. (and the output can be found at tests/out/bundled_code.cpp)
They were the result of running python3 src/bundler.py -i tests/in/main.cpp -o tests/out/bundled_code.cpp from the repository root.
This is a tentative to-do list of additional features I've considered, but have not yet implemented.
It is not intended to be a complete list. For a more concrete idea of future plans, see the issues section.
#pragma optimisation macros at the top of the bundled codeI'll implement these on an as-needed basis for my own use, or possibly if there are community requests for them.
Feel free to request additional features or report problems via the issues section of the repo. (or even implement changes yourself - pull-requests are welcome!)
Selected from shared topics, language and repository description—not editorial ratings.
marimo-team /
A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
infinition /
Bjorn is a powerful network scanning and offensive security tool for the Raspberry Pi with a 2.13-inch e-Paper HAT. It discovers network targets, identifies open ports, exposed services, and potential vulnerabilities. Bjorn can perform brute force attacks, file stealing, host zombification, and supports custom attack scripts.
pythonnet /
Python for .NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and provides a powerful application scripting tool for .NET developers.
charles2gan /
the fastest and most powerful android decompiler(native tool working without Java VM) for the APK, DEX, ODEX, OAT, JAR, AAR, and CLASS file. which supports malicious behavior detection, privacy leaking detection, vulnerability detection, path solving, packer identification, variable tracking, deobfuscation, python&java scripts, device memory extraction, data decryption, and encryption, etc.
Shpota /
A script that helps generate a rich GitHub Contribution Graph for your account 🤖
therealaleph /
Rust port of @masterking32's MasterHttpRelayVPN — all credit to @masterking32 for the original idea and Python implementation. Free DPI bypass via a Google Apps Script relay with TLS SNI concealment. CLI + cross-platform desktop UI, HTTP + SOCKS5 proxy, no runtime deps.