Spaces:
Sleeping
Sleeping
Synced repo using 'sync_with_huggingface' Github Action
Browse files- Dockerfile +1 -1
- extract_patterns.py +38 -0
- get_pattern.py +2 -0
- patterns.csv +128 -0
- requirements.txt +107 -107
Dockerfile
CHANGED
@@ -9,7 +9,7 @@ RUN useradd -m -u 1000 user
|
|
9 |
WORKDIR /app
|
10 |
|
11 |
COPY --chown=user ./requirements.txt requirements.txt
|
12 |
-
RUN pip install --no-cache-dir
|
13 |
|
14 |
EXPOSE 7860
|
15 |
|
|
|
9 |
WORKDIR /app
|
10 |
|
11 |
COPY --chown=user ./requirements.txt requirements.txt
|
12 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
14 |
EXPOSE 7860
|
15 |
|
extract_patterns.py
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os, csv
|
2 |
+
|
3 |
+
|
4 |
+
def get_directory_names(root_path):
|
5 |
+
directory_names = []
|
6 |
+
|
7 |
+
# Check if the provided path exists
|
8 |
+
if not os.path.exists(root_path):
|
9 |
+
print(f"The path {root_path} does not exist.")
|
10 |
+
return directory_names
|
11 |
+
|
12 |
+
# Iterate through the items in the root path
|
13 |
+
for item in os.listdir(root_path):
|
14 |
+
item_path = os.path.join(root_path, item)
|
15 |
+
# Check if the item is a directory
|
16 |
+
if os.path.isdir(item_path):
|
17 |
+
directory_names.append(item)
|
18 |
+
|
19 |
+
return directory_names
|
20 |
+
|
21 |
+
def save_to_csv(directory_names, filename):
|
22 |
+
with open(filename, 'w', newline='') as csvfile:
|
23 |
+
writer = csv.writer(csvfile)
|
24 |
+
# writer.writerow(['Pattern Names']) # Header
|
25 |
+
for name in directory_names:
|
26 |
+
writer.writerow([name])
|
27 |
+
print(f"Pattern names have been saved to {filename}")
|
28 |
+
|
29 |
+
# Example usage
|
30 |
+
root_directory = "patterns"
|
31 |
+
output_file = "patterns.csv"
|
32 |
+
|
33 |
+
directories = get_directory_names(root_directory)
|
34 |
+
save_to_csv(directories, output_file)
|
35 |
+
|
36 |
+
print("List of directories:")
|
37 |
+
for directory in directories:
|
38 |
+
print(directory)
|
get_pattern.py
CHANGED
@@ -7,6 +7,8 @@ from langchain.callbacks import AsyncIteratorCallbackHandler
|
|
7 |
from langchain_core.output_parsers import StrOutputParser
|
8 |
import asyncio
|
9 |
import datetime
|
|
|
|
|
10 |
|
11 |
|
12 |
load_dotenv()
|
|
|
7 |
from langchain_core.output_parsers import StrOutputParser
|
8 |
import asyncio
|
9 |
import datetime
|
10 |
+
import csv
|
11 |
+
|
12 |
|
13 |
|
14 |
load_dotenv()
|
patterns.csv
ADDED
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
agility_story
|
2 |
+
ai
|
3 |
+
analyze_answers
|
4 |
+
analyze_claims
|
5 |
+
analyze_debate
|
6 |
+
analyze_incident
|
7 |
+
analyze_logs
|
8 |
+
analyze_malware
|
9 |
+
analyze_paper
|
10 |
+
analyze_patent
|
11 |
+
analyze_personality
|
12 |
+
analyze_presentation
|
13 |
+
analyze_prose
|
14 |
+
analyze_prose_json
|
15 |
+
analyze_prose_pinker
|
16 |
+
analyze_spiritual_text
|
17 |
+
analyze_tech_impact
|
18 |
+
analyze_threat_report
|
19 |
+
analyze_threat_report_trends
|
20 |
+
answer_interview_question
|
21 |
+
ask_secure_by_design_questions
|
22 |
+
capture_thinkers_work
|
23 |
+
check_agreement
|
24 |
+
clean_text
|
25 |
+
coding_master
|
26 |
+
compare_and_contrast
|
27 |
+
create_5_sentence_summary
|
28 |
+
create_academic_paper
|
29 |
+
create_ai_jobs_analysis
|
30 |
+
create_aphorisms
|
31 |
+
create_art_prompt
|
32 |
+
create_better_frame
|
33 |
+
create_coding_project
|
34 |
+
create_command
|
35 |
+
create_cyber_summary
|
36 |
+
create_git_diff_commit
|
37 |
+
create_graph_from_input
|
38 |
+
create_hormozi_offer
|
39 |
+
create_idea_compass
|
40 |
+
create_investigation_visualization
|
41 |
+
create_keynote
|
42 |
+
create_logo
|
43 |
+
create_markmap_visualization
|
44 |
+
create_mermaid_visualization
|
45 |
+
create_micro_summary
|
46 |
+
create_network_threat_landscape
|
47 |
+
create_npc
|
48 |
+
create_pattern
|
49 |
+
create_quiz
|
50 |
+
create_reading_plan
|
51 |
+
create_report_finding
|
52 |
+
create_security_update
|
53 |
+
create_show_intro
|
54 |
+
create_sigma_rules
|
55 |
+
create_stride_threat_model
|
56 |
+
create_summary
|
57 |
+
create_tags
|
58 |
+
create_threat_scenarios
|
59 |
+
create_upgrade_pack
|
60 |
+
create_video_chapters
|
61 |
+
create_visualization
|
62 |
+
explain_code
|
63 |
+
explain_docs
|
64 |
+
explain_project
|
65 |
+
explain_terms
|
66 |
+
export_data_as_csv
|
67 |
+
extract_algorithm_update_recommendations
|
68 |
+
extract_article_wisdom
|
69 |
+
extract_book_ideas
|
70 |
+
extract_book_recommendations
|
71 |
+
extract_business_ideas
|
72 |
+
extract_controversial_ideas
|
73 |
+
extract_extraordinary_claims
|
74 |
+
extract_ideas
|
75 |
+
extract_insights
|
76 |
+
extract_main_idea
|
77 |
+
extract_patterns
|
78 |
+
extract_poc
|
79 |
+
extract_predictions
|
80 |
+
extract_questions
|
81 |
+
extract_recommendations
|
82 |
+
extract_references
|
83 |
+
extract_song_meaning
|
84 |
+
extract_sponsors
|
85 |
+
extract_videoid
|
86 |
+
extract_wisdom
|
87 |
+
extract_wisdom_agents
|
88 |
+
extract_wisdom_dm
|
89 |
+
extract_wisdom_nometa
|
90 |
+
find_hidden_message
|
91 |
+
find_logical_fallacies
|
92 |
+
get_wow_per_minute
|
93 |
+
get_youtube_rss
|
94 |
+
improve_academic_writing
|
95 |
+
improve_prompt
|
96 |
+
improve_report_finding
|
97 |
+
improve_writing
|
98 |
+
label_and_rate
|
99 |
+
official_pattern_template
|
100 |
+
provide_guidance
|
101 |
+
rate_ai_response
|
102 |
+
rate_ai_result
|
103 |
+
rate_content
|
104 |
+
rate_value
|
105 |
+
raw_query
|
106 |
+
recommend_artists
|
107 |
+
show_fabric_options_markmap
|
108 |
+
suggest_pattern
|
109 |
+
summarize
|
110 |
+
summarize_debate
|
111 |
+
summarize_git_changes
|
112 |
+
summarize_git_diff
|
113 |
+
summarize_lecture
|
114 |
+
summarize_legislation
|
115 |
+
summarize_micro
|
116 |
+
summarize_newsletter
|
117 |
+
summarize_paper
|
118 |
+
summarize_prompt
|
119 |
+
summarize_pull-requests
|
120 |
+
summarize_rpg_session
|
121 |
+
to_flashcards
|
122 |
+
tweet
|
123 |
+
write_essay
|
124 |
+
write_hackerone_report
|
125 |
+
write_micro_essay
|
126 |
+
write_nuclei_template_rule
|
127 |
+
write_pull-request
|
128 |
+
write_semgrep_rule
|
requirements.txt
CHANGED
@@ -1,45 +1,45 @@
|
|
1 |
-
aiohttp #==3.9.5
|
2 |
-
aiosignal #==1.3.1
|
3 |
-
annotated-types #==0.6.0
|
4 |
-
anyio #==4.3.0
|
5 |
-
asgiref #==3.8.1
|
6 |
-
attrs #==23.2.0
|
7 |
-
backoff #==2.2.1
|
8 |
-
bcrypt #==4.1.2
|
9 |
-
beautifulsoup4 #==4.12.3
|
10 |
-
bs4 #==0.0.2
|
11 |
-
build #==1.2.1
|
12 |
-
cachetools #==5.3.3
|
13 |
-
certifi #==2024.2.2
|
14 |
-
charset-normalizer #==3.3.2
|
15 |
-
chroma-hnswlib #==0.7.3
|
16 |
-
chromadb #==0.4.24
|
17 |
-
click #==8.1.7
|
18 |
-
coloredlogs #==15.0.1
|
19 |
-
dataclasses-json #==0.6.4
|
20 |
-
Deprecated #==1.2.14
|
21 |
-
distro #==1.9.0
|
22 |
-
fastapi #==0.110.2
|
23 |
-
filelock #==3.14.0
|
24 |
-
flatbuffers #==24.3.25
|
25 |
-
frozenlist #==1.4.1
|
26 |
-
fsspec #==2024.3.1
|
27 |
-
google-auth #==2.29.0
|
28 |
-
googleapis-common-protos #==1.63.0
|
29 |
-
grpcio #==1.62.2
|
30 |
-
h11 #==0.14.0
|
31 |
-
httpcore #==1.0.5
|
32 |
-
httptools #==0.6.1
|
33 |
-
httpx #==0.27.0
|
34 |
-
huggingface-hub #==0.22.2
|
35 |
-
humanfriendly #==10.0
|
36 |
-
idna #==3.7
|
37 |
-
importlib-metadata #==7.0.0
|
38 |
-
importlib_resources #==6.4.0
|
39 |
-
jsonpatch #==1.33
|
40 |
-
jsonpointer #==2.4
|
41 |
-
kubernetes #==29.0.0
|
42 |
-
langchain
|
43 |
langchain-chroma #==0.1.0
|
44 |
langchain-community #==0.0.34
|
45 |
langchain-core # #==0.1.46
|
@@ -47,75 +47,75 @@ langchain-openai #==0.1.4
|
|
47 |
langchain-text-splitters #==0.0.1
|
48 |
langchainhub #==0.1.15
|
49 |
langsmith #==0.1.51
|
50 |
-
markdown-it-py #==3.0.0
|
51 |
-
marshmallow #==3.21.1
|
52 |
-
mdurl #==0.1.2
|
53 |
-
mmh3 #==4.1.0
|
54 |
-
monotonic #==1.6
|
55 |
-
mpmath #==1.3.0
|
56 |
-
multidict #==6.0.5
|
57 |
-
mypy-extensions #==1.0.0
|
58 |
-
numpy # #==1.26.4
|
59 |
-
oauthlib #==3.2.2
|
60 |
-
onnxruntime #==1.17.3
|
61 |
openai # #==1.23.6
|
62 |
-
opentelemetry-api #==1.24.0
|
63 |
-
opentelemetry-exporter-otlp-proto-common #==1.24.0
|
64 |
-
opentelemetry-exporter-otlp-proto-grpc #==1.24.0
|
65 |
-
opentelemetry-instrumentation #==0.45b0
|
66 |
-
opentelemetry-instrumentation-asgi #==0.45b0
|
67 |
-
opentelemetry-instrumentation-fastapi #==0.45b0
|
68 |
-
opentelemetry-proto #==1.24.0
|
69 |
-
opentelemetry-sdk #==1.24.0
|
70 |
-
opentelemetry-semantic-conventions #==0.45b0
|
71 |
-
opentelemetry-util-http #==0.45b0
|
72 |
-
orjson #==3.10.1
|
73 |
-
overrides #==7.7.0
|
74 |
-
packaging #==23.2
|
75 |
-
posthog #==3.5.0
|
76 |
-
protobuf #==4.25.3
|
77 |
-
pulsar-client #==3.5.0
|
78 |
-
pyasn1 #==0.6.0
|
79 |
-
pyasn1_modules #==0.4.0
|
80 |
pydantic #==2.7.1
|
81 |
-
pydantic-settings #==2.2.1
|
82 |
pydantic_core #==2.18.2
|
83 |
-
Pygments #==2.17.2
|
84 |
-
PyPika #==0.48.9
|
85 |
-
pyproject_hooks #==1.1.0
|
86 |
-
python-dateutil #==2.9.0.post0
|
87 |
-
python-dotenv #==1.0.1
|
88 |
-
PyYAML #==6.0.1
|
89 |
-
regex # #==2024.4.28
|
90 |
-
requests #==2.31.0
|
91 |
-
requests-oauthlib #==2.0.0
|
92 |
-
rich #==13.7.1
|
93 |
-
rsa #==4.9
|
94 |
-
setuptools #==69.5.1
|
95 |
-
shellingham #==1.5.4
|
96 |
-
six #==1.16.0
|
97 |
-
sniffio #==1.3.1
|
98 |
-
soupsieve #==2.5
|
99 |
SQLAlchemy #==2.0.29
|
100 |
starlette #==0.37.2
|
101 |
-
sympy #==1.12
|
102 |
-
tenacity #==8.2.3
|
103 |
-
tiktoken #==0.6.0
|
104 |
-
tokenizers
|
105 |
-
tqdm #==4.66.2
|
106 |
-
typer #==0.12.3
|
107 |
-
types-requests #==2.31.0.20240406
|
108 |
-
typing-inspect #==0.9.0
|
109 |
-
typing_extensions
|
110 |
-
urllib3 #==2.2.1
|
111 |
-
uvicorn
|
112 |
-
uvloop #==0.19.0
|
113 |
-
watchfiles #==0.21.0
|
114 |
-
websocket-client #==1.8.0
|
115 |
-
websockets #==12.0
|
116 |
-
wrapt #==1.16.0
|
117 |
-
yarl #==1.9.4
|
118 |
-
zipp #==3.18.1
|
119 |
python-multipart
|
120 |
pypdf
|
121 |
unstructured
|
@@ -124,7 +124,7 @@ python-pptx
|
|
124 |
SpeechRecognition
|
125 |
moviepy
|
126 |
youtube-transcript-api
|
127 |
-
pytube
|
128 |
openpyxl
|
129 |
pysqlite3-binary
|
130 |
langchain_nomic
|
|
|
1 |
+
# aiohttp #==3.9.5
|
2 |
+
# aiosignal #==1.3.1
|
3 |
+
# annotated-types #==0.6.0
|
4 |
+
# anyio #==4.3.0
|
5 |
+
# asgiref #==3.8.1
|
6 |
+
# attrs #==23.2.0
|
7 |
+
# backoff #==2.2.1
|
8 |
+
# bcrypt #==4.1.2
|
9 |
+
# beautifulsoup4 #==4.12.3
|
10 |
+
# bs4 #==0.0.2
|
11 |
+
# build #==1.2.1
|
12 |
+
# cachetools #==5.3.3
|
13 |
+
# certifi #==2024.2.2
|
14 |
+
# charset-normalizer #==3.3.2
|
15 |
+
# chroma-hnswlib #==0.7.3
|
16 |
+
# chromadb #==0.4.24
|
17 |
+
# # click #==8.1.7
|
18 |
+
# coloredlogs #==15.0.1
|
19 |
+
# dataclasses-json #==0.6.4
|
20 |
+
# Deprecated #==1.2.14
|
21 |
+
# distro #==1.9.0
|
22 |
+
# fastapi #==0.110.2
|
23 |
+
# filelock #==3.14.0
|
24 |
+
# flatbuffers #==24.3.25
|
25 |
+
# # frozenlist #==1.4.1
|
26 |
+
# # fsspec #==2024.3.1
|
27 |
+
# google-auth #==2.29.0
|
28 |
+
# googleapis-common-protos #==1.63.0
|
29 |
+
# # grpcio #==1.62.2
|
30 |
+
# # h11 #==0.14.0
|
31 |
+
# httpcore #==1.0.5
|
32 |
+
# httptools #==0.6.1
|
33 |
+
# httpx #==0.27.0
|
34 |
+
# huggingface-hub #==0.22.2
|
35 |
+
# humanfriendly #==10.0
|
36 |
+
# idna #==3.7
|
37 |
+
# importlib-metadata #==7.0.0
|
38 |
+
# importlib_resources #==6.4.0
|
39 |
+
# jsonpatch #==1.33
|
40 |
+
# jsonpointer #==2.4
|
41 |
+
# kubernetes #==29.0.0
|
42 |
+
langchain==0.1.16 #==0.2.10
|
43 |
langchain-chroma #==0.1.0
|
44 |
langchain-community #==0.0.34
|
45 |
langchain-core # #==0.1.46
|
|
|
47 |
langchain-text-splitters #==0.0.1
|
48 |
langchainhub #==0.1.15
|
49 |
langsmith #==0.1.51
|
50 |
+
# markdown-it-py #==3.0.0
|
51 |
+
# marshmallow #==3.21.1
|
52 |
+
# mdurl #==0.1.2
|
53 |
+
# mmh3 #==4.1.0
|
54 |
+
# monotonic #==1.6
|
55 |
+
# mpmath #==1.3.0
|
56 |
+
# multidict #==6.0.5
|
57 |
+
# mypy-extensions #==1.0.0
|
58 |
+
# numpy # #==1.26.4
|
59 |
+
# oauthlib #==3.2.2
|
60 |
+
# onnxruntime #==1.17.3
|
61 |
openai # #==1.23.6
|
62 |
+
# opentelemetry-api #==1.24.0
|
63 |
+
# opentelemetry-exporter-otlp-proto-common #==1.24.0
|
64 |
+
# opentelemetry-exporter-otlp-proto-grpc #==1.24.0
|
65 |
+
# opentelemetry-instrumentation #==0.45b0
|
66 |
+
# opentelemetry-instrumentation-asgi #==0.45b0
|
67 |
+
# opentelemetry-instrumentation-fastapi #==0.45b0
|
68 |
+
# opentelemetry-proto #==1.24.0
|
69 |
+
# opentelemetry-sdk #==1.24.0
|
70 |
+
# opentelemetry-semantic-conventions #==0.45b0
|
71 |
+
# opentelemetry-util-http #==0.45b0
|
72 |
+
# orjson #==3.10.1
|
73 |
+
# overrides #==7.7.0
|
74 |
+
# packaging #==23.2
|
75 |
+
# posthog #==3.5.0
|
76 |
+
# protobuf #==4.25.3
|
77 |
+
# pulsar-client #==3.5.0
|
78 |
+
# pyasn1 #==0.6.0
|
79 |
+
# pyasn1_modules #==0.4.0
|
80 |
pydantic #==2.7.1
|
81 |
+
# pydantic-settings #==2.2.1
|
82 |
pydantic_core #==2.18.2
|
83 |
+
# Pygments #==2.17.2
|
84 |
+
# PyPika #==0.48.9
|
85 |
+
# pyproject_hooks #==1.1.0
|
86 |
+
# python-dateutil #==2.9.0.post0
|
87 |
+
# python-dotenv #==1.0.1
|
88 |
+
# PyYAML #==6.0.1
|
89 |
+
# regex # #==2024.4.28
|
90 |
+
# requests #==2.31.0
|
91 |
+
# requests-oauthlib #==2.0.0
|
92 |
+
# rich #==13.7.1
|
93 |
+
# rsa #==4.9
|
94 |
+
# setuptools #==69.5.1
|
95 |
+
# shellingham #==1.5.4
|
96 |
+
# six #==1.16.0
|
97 |
+
# sniffio #==1.3.1
|
98 |
+
# soupsieve #==2.5
|
99 |
SQLAlchemy #==2.0.29
|
100 |
starlette #==0.37.2
|
101 |
+
# sympy #==1.12
|
102 |
+
# tenacity #==8.2.3
|
103 |
+
# tiktoken #==0.6.0
|
104 |
+
# tokenizers
|
105 |
+
# tqdm #==4.66.2
|
106 |
+
# typer #==0.12.3
|
107 |
+
# types-requests #==2.31.0.20240406
|
108 |
+
# typing-inspect #==0.9.0
|
109 |
+
# typing_extensions
|
110 |
+
# urllib3 #==2.2.1
|
111 |
+
uvicorn==0.29.0
|
112 |
+
# uvloop #==0.19.0
|
113 |
+
# watchfiles #==0.21.0
|
114 |
+
# websocket-client #==1.8.0
|
115 |
+
# websockets #==12.0
|
116 |
+
# wrapt #==1.16.0
|
117 |
+
# yarl #==1.9.4
|
118 |
+
# zipp #==3.18.1
|
119 |
python-multipart
|
120 |
pypdf
|
121 |
unstructured
|
|
|
124 |
SpeechRecognition
|
125 |
moviepy
|
126 |
youtube-transcript-api
|
127 |
+
# pytube
|
128 |
openpyxl
|
129 |
pysqlite3-binary
|
130 |
langchain_nomic
|