Compare commits

..

No commits in common. "84f36247a87cccb48571e1caf4e9cdfb559febad" and "cecde4478d67b4268c1801c2e25b367a4b011e4b" have entirely different histories.

2 changed files with 0 additions and 76 deletions

View File

@ -1,57 +0,0 @@
# Coding Tools
Tools that I wrote to help me code faster and more efficiently.
All of these require `python>=3.6`.
## [Ucompile](ucompile)
Pronounced "you compile", stands for "University Compiler". It is a simple script that compiles and runs programs in one line. It also automatically takes all `.in` files in the directory and feeds them to the program. It is useful for competitive programming and for testing programs with multiple test cases.
Currently supports:
- C (`.c`)
- Python (`.py`) (with Python 3 and PyPy3)
- Java (`.java`)
- Haskell (`.hs`)
Optional arguments:
- `-o` checks the output of the program against the `.out` files in the directory
- `-v, --verbose` prints the output of the program
- `-a` uses an alternative compiler (e.g. `mvn` instead of `javac`)
- `-t, --tests` specifies a test case folder (default is `.`, the current directory)
- `-T, --time` prints the time taken to run the program
The program is integrated with [temmies](https://github.com/Code-For-Groningen/temmies) for automatic [Themis](https://themis.housing.rug.nl/) submission.
## [unifytex](unifytex)
is a script designed to automate the process of generating separate LaTeX include files for `.tex` files in a directory, making it easier to manage large LaTeX projects. It recursively scans a specified directory and creates consolidated `.tex` files that include all the LaTeX files within each subdirectory.
(EXAMPLE) If the directory structure is:
```
/project
├── section1
│ ├── intro.tex
│ ├── methods.tex
├── section2
│ ├── results.tex
│ ├── discussion.tex
```
Running:
```bash
python3 unifytex.py /project
```
Will create:
```
/project/consolidated
├── section1.tex (contains \input{section1/intro.tex} and \input{section1/methods.tex})
├── section2.tex (contains \input{section2/results.tex} and \input{section2/discussion.tex})
```
This allows you to include an entire section in your main LaTeX document with:
```latex
\input{consolidated/section1.tex}
```
## [flatcher](flatcher)
Flask + Catcher = Flatcher. A simple script that runs a Flask server and catches all requests to a specified port, detailing the request method, path, and headers. Useful for debugging and testing webhooks.
> [!IMPORTANT]
> This script requires Flask to be installed. You can install it with `pip install Flask`.

View File

@ -1,19 +0,0 @@
#!/usr/bin/python
from flask import Flask, request
app = Flask(__name__)
@app.route('/', defaults={'path': ''}, methods=['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'])
@app.route('/<path:path>', methods=['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'])
def capture_request(path):
"""
This route captures all requests, regardless of method or path.
"""
print(f"Request Path: {request.path}")
print(f"Request Method: {request.method}")
print(f"Request Headers: {dict(request.headers)}")
print(f"Request Body: {request.get_data(as_text=True)}")
return "Request captured and printed to the console!", 200
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0', port=5000)