Skip to content

Commit 19dcb48

Browse files
Merge pull request #1 from codeflash-ai/misrasaurabh1-patch-1
Update README.md
2 parents 4903e47 + 1343a68 commit 19dcb48

File tree

1 file changed

+47
-37
lines changed

1 file changed

+47
-37
lines changed

README.md

Lines changed: 47 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,81 @@
11
# CodeFlash Optimize-Me
22

3-
## Table of Contents
4-
- [Introduction](#introduction)
5-
- [What is CodeFlash?](#what-is-codeflash)
6-
- [Installation](#installation)
7-
- [CodeFlash](#codeflash)
8-
- [This Repository](#this-repository)
9-
- [Using CodeFlash](#using-codeflash)
10-
- [Expected Workflow](#expected-workflow)
11-
- [Contributing](#contributing)
3+
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.
124

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.
146

15-
Welcome to the CodeFlash Optimize-Me Repository!
7+
## What is Codeflash?
168

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.
1810

19-
## What is CodeFlash?
11+
## Getting Started
2012

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.
2214

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.
2617

2718
```bash
28-
pip install codeflash
19+
git clone https://github.com/<your_github_account>/optimize-me.git
20+
cd optimize-me
21+
```
22+
- Create a new Python virtual environment, and activate it.
23+
24+
With `venv` you can do
25+
```bash
26+
python -m venv .venv
27+
source .venv/bin/activate
2928
```
3029

31-
### This Repository
30+
To use `conda` you can do
31+
```bash
32+
conda create -n optimize-me
33+
conda activate optimize-me
34+
```
3235

36+
- Install Package dependencies
3337
```bash
34-
git clone https://github.com/codeflash-ai/optimize-me.git
35-
cd optimize-me
3638
pip install -r requirements.txt
3739
```
3840

41+
## Set up Codeflash
42+
43+
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+
3949
## Using CodeFlash
4050

41-
Run CodeFlash on your Python scripts with a simple command:
51+
- Optimize all the Python code in this repo by running
4252

4353
```bash
4454
codeflash --all
4555
```
56+
Codeflash will keep creating Pull Requests with optimizations for you as it keeps finding them.
4657

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
4859

49-
## Expected Workflow
60+
```bash
61+
codeflash --file path/to/file
62+
```
5063

51-
1. **Identify**: Use CodeFlash to spot optimization opportunities
52-
2. **Optimize**: Apply the suggested improvements
64+
- Optimize a single function
5365

54-
## Contributing
55-
56-
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on contributing optimization examples and modules.
66+
```bash
67+
codeflash --file path/to/file --function function_name
68+
```
5769

58-
## Installation
70+
🪄 And just like that you've started on the journey of never shipping slow code again!
5971

60-
Install dependencies with:
72+
## Need Help?
6173

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)
6575

66-
These packages help you perform numerical and data operations efficiently.
76+
## Contributing
6777

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.
6979

7080
Want to contribute? Here's how:
7181

@@ -74,4 +84,4 @@ Want to contribute? Here's how:
7484
3. Add code that demonstrates CodeFlash's optimization capabilities
7585
4. Submit a pull request with a clear description of your changes
7686

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

Comments
 (0)