GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove \r from strings (#1622) · jusing-es/Python@b9bff8f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • machine_learning
    • sequential_minimum_optimization.py
  • requirements.txt
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎machine_learning/sequential_minimum_optimization.py‎

Copy file name to clipboardExpand all lines: machine_learning/sequential_minimum_optimization.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def fit(self):
8585
i1, i2 = self.choose_alpha.send(state)
8686
state = None
8787
except StopIteration:
88-
print("Optimization done!\r\nEvery sample satisfy the KKT condition!")
88+
print("Optimization done!\nEvery sample satisfy the KKT condition!")
8989
break
9090

9191
# 2: calculate new alpha2 and new alpha1
@@ -453,7 +453,7 @@ def call_func(*args, **kwargs):
453453

454454
@count_time
455455
def test_cancel_data():
456-
print("Hello!\r\nStart test svm by smo algorithm!")
456+
print("Hello!\nStart test svm by smo algorithm!")
457457
# 0: download dataset and load into pandas' dataframe
458458
if not os.path.exists(r"cancel_data.csv"):
459459
request = urllib.request.Request(
@@ -499,13 +499,13 @@ def test_cancel_data():
499499
for i in range(test_tags.shape[0]):
500500
if test_tags[i] == predict[i]:
501501
score += 1
502-
print(f"\r\nall: {test_num}\r\nright: {score}\r\nfalse: {test_num - score}")
502+
print(f"\nall: {test_num}\nright: {score}\nfalse: {test_num - score}")
503503
print(f"Rough Accuracy: {score / test_tags.shape[0]}")
504504

505505

506506
def test_demonstration():
507507
# change stdout
508-
print("\r\nStart plot,please wait!!!")
508+
print("\nStart plot,please wait!!!")
509509
sys.stdout = open(os.devnull, "w")
510510

511511
ax1 = plt.subplot2grid((2, 2), (0, 0))
Collapse file

‎requirements.txt‎

Copy file name to clipboardExpand all lines: requirements.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ fake_useragent
44
flake8
55
matplotlib
66
mypy
7-
numpy
7+
numpy>=1.17.4
88
opencv-python
99
pandas
1010
pillow

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.