Skip to content

Commit 463f7b9

Browse files
style: format code with Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, isort, PHP CS Fixer, Prettier, RuboCop, Rustfmt, Scalafmt, StandardJS, StandardRB and Yapf
This commit fixes the style issues introduced in 0571f3f according to the output from Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, isort, PHP CS Fixer, Prettier, RuboCop, Rustfmt, Scalafmt, StandardJS, StandardRB and Yapf. Details: None
1 parent 0571f3f commit 463f7b9

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Crypto friendly, professional, innovative
3535

3636
Check our [Presentation](https://youtu.be/aX_DIQi7F48)
3737

38-
# Contributor Guide
38+
# Contributor Guide
3939

4040
**Revolutination Project Contributor Guide**
4141

@@ -46,8 +46,8 @@ Welcome to the Revolutination community! We appreciate your interest in contribu
4646
1. [Getting Started](#getting-started)
4747
2. [Code of Conduct](#code-of-conduct)
4848
3. [How to Contribute](#how-to-contribute)
49-
- [Reporting Issues](#reporting-issues)
50-
- [Submitting Pull Requests](#submitting-pull-requests)
49+
- [Reporting Issues](#reporting-issues)
50+
- [Submitting Pull Requests](#submitting-pull-requests)
5151
4. [Development Setup](#development-setup)
5252
5. [Coding Standards](#coding-standards)
5353
6. [Documentation](#documentation)
@@ -159,9 +159,9 @@ Revolutination is a smart, simple, yet powerful product that can unlock the bene
159159

160160
Join us at [Discord](https://discord.gg/4ndeMBx3)
161161

162-
# Revolutination AI Agent
162+
# Revolutination AI Agent
163163

164-
## Tutorials:
164+
## Tutorials:
165165

166166
# Recommendation
167167

@@ -190,22 +190,22 @@ user_similarity = cosine_similarity(user_service_matrix)
190190
def generate_recommendations(user_id, top_n=5):
191191
# Get index of the user
192192
user_index = user_service_matrix.index.get_loc(user_id)
193-
193+
194194
# Calculate similarity scores with other users
195195
similarity_scores = user_similarity[user_index]
196-
196+
197197
# Get top similar users
198198
top_similar_users = similarity_scores.argsort()[:-top_n-1:-1]
199-
199+
200200
# Get services rated by similar users
201201
services_rated_by_similar_users = user_service_matrix.iloc[top_similar_users].dropna(axis=1)
202-
202+
203203
# Calculate average rating for each service
204204
service_avg_ratings = services_rated_by_similar_users.mean()
205-
205+
206206
# Sort services based on average ratings
207207
recommended_services = service_avg_ratings.sort_values(ascending=False)[:top_n]
208-
208+
209209
return recommended_services
210210

211211
# Generate recommendations for a user
@@ -264,15 +264,15 @@ for pattern in patterns:
264264
def chatbot(text):
265265
doc = nlp(text)
266266
matches = matcher(doc)
267-
267+
268268
for match_id, start, end in matches:
269269
if nlp.vocab.strings[match_id] == "GREETING":
270270
return responses["greeting"]
271271
elif nlp.vocab.strings[match_id] == "RECOMMENDATION":
272272
return responses["recommendation"]
273273
elif nlp.vocab.strings[match_id] == "GOODBYE":
274274
return responses["goodbye"]
275-
275+
276276
return "I'm sorry, I didn't understand. Can you please rephrase your query?"
277277

278278
# Sample conversation
@@ -293,6 +293,7 @@ print("Chatbot: ", chatbot_response)
293293
```
294294

295295
Output:
296+
296297
```
297298
User: Hello
298299
Chatbot: Hello! How can I assist you today?
@@ -321,10 +322,10 @@ model.fit(data)
321322
def detect_anomaly(user_data):
322323
# Predict anomaly score
323324
anomaly_score = model.decision_function(user_data)
324-
325+
325326
# Set anomaly threshold
326327
threshold = -0.5
327-
328+
328329
# Check if anomaly score exceeds threshold
329330
if anomaly_score < threshold:
330331
# Send alert message

0 commit comments

Comments
 (0)