You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains code that can be optimized with Codeflash. The idea is that you can easily get started with Codeflash by optimizing this repository.
12
4
13
-
## Introduction
5
+
Fork this repo, clone it on your machine, then run Codeflash to see how it analyzes your code, suggests improvements, and integrates with your workflow through pull requests.
14
6
15
-
Welcome to the CodeFlash Optimize-Me Repository!
7
+
## What is Codeflash?
16
8
17
-
This repository contains code ready for optimization. Clone or fork it, then run CodeFlash to see how it analyzes your code, suggests improvements, and integrates with your workflow through pull requests.
9
+
Codeflash is an automated AI based code performance optimizer that creates verified optimizations for your code. It improves performance, reduces resource usage, and enhances code efficiency. You can use it to optimize algorithms, speed up mathematical computations, optimize Pytorch, and make data handling more efficient with NumPy and Pandas.
18
10
19
-
## What is CodeFlash?
11
+
## Getting Started
20
12
21
-
CodeFlash helps you find ways to optimize your code. It improves performance, reduces resource usage, and enhances code efficiency. You can use it to optimize algorithms, speed up mathematical computations, and make data handling more efficient with NumPy and Pandas.
13
+
The below is expected to take about 5 minutes.
22
14
23
-
## Installation
24
-
25
-
### CodeFlash
15
+
- Fork this repo on your GitHub account. You can do it by clicking "Fork" on the top of this repo. This is required so that Codeflash can open Pull Requests with the optimizations it found on your fork.
16
+
- Clone the repo to your machine. Any machine works - laptops, PCs, virtual machines.
You can now follow the quick guided setup by running -
44
+
```bash
45
+
codeflash init
46
+
```
47
+
Since this project already has the codeflash settings pre-configured in pyproject.toml, it will only ask you to get a `CODEFLASH_API_KEY` by [signing up to Codeflash](https://app.codeflash.ai/login) and installing a GitHub App through [this link](https://github.com/apps/codeflash-ai/installations/select_target)
48
+
39
49
## Using CodeFlash
40
50
41
-
Run CodeFlash on your Python scripts with a simple command:
51
+
- Optimize all the Python code in this repo by running
42
52
43
53
```bash
44
54
codeflash --all
45
55
```
56
+
Codeflash will keep creating Pull Requests with optimizations for you as it keeps finding them.
46
57
47
-
CodeFlash will find potential optimization opportunities. You can then improve your code and check the results by running CodeFlash again.
58
+
- Optimize a single file
48
59
49
-
## Expected Workflow
60
+
```bash
61
+
codeflash --file path/to/file
62
+
```
50
63
51
-
1.**Identify**: Use CodeFlash to spot optimization opportunities
52
-
2.**Optimize**: Apply the suggested improvements
64
+
- Optimize a single function
53
65
54
-
## Contributing
55
-
56
-
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on contributing optimization examples and modules.
🪄 And just like that you've started on the journey of never shipping slow code again!
59
71
60
-
Install dependencies with:
72
+
## Need Help?
61
73
62
-
```bash
63
-
pip install -r requirements.txt
64
-
```
74
+
The best way to ask for help is to join our [Discord community](https://www.codeflash.ai/discord)
65
75
66
-
These packages help you perform numerical and data operations efficiently.
76
+
## Contributing
67
77
68
-
## Contributing Guidelines
78
+
Please don't open Pull Requests on this repo with the optimizations you found. We want to keep this project unoptimized, so that people can optimize it in the future as well.
69
79
70
80
Want to contribute? Here's how:
71
81
@@ -74,4 +84,4 @@ Want to contribute? Here's how:
74
84
3. Add code that demonstrates CodeFlash's optimization capabilities
75
85
4. Submit a pull request with a clear description of your changes
76
86
77
-
We welcome bug reports and feature requests through Github's issues system.
87
+
We welcome bug reports and feature requests through Github's issues system.
0 commit comments