-
Notifications
You must be signed in to change notification settings - Fork 291
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Multiple OpenAI Keys Support (#12)
* Update README * Multiple OpenAI Keys Support * update pytest
- Loading branch information
Showing
8 changed files
with
95 additions
and
45 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
__version__ = "0.1.3" | ||
__version__ = "0.1.4" | ||
|
||
from dotenv import load_dotenv | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from sparrow import ls | ||
import os | ||
import shutil | ||
|
||
def rm(*file_pattern: str, rel=False): | ||
"""Remove files or directories. | ||
Example: | ||
-------- | ||
>>> rm("*.jpg", "*.png") | ||
>>> rm("*.jpg", "*.png", rel=True) | ||
""" | ||
path_list = ls(".", *file_pattern, relp=rel, concat="extend") | ||
for file in path_list: | ||
if os.path.isfile(file): | ||
print("remove ", file) | ||
os.remove(file) | ||
# os.system("rm -f " + file) | ||
elif os.path.isdir(file): | ||
shutil.rmtree(file, ignore_errors=True) | ||
print("rm tree ", file) |