Skip to content

Commit 1f14ed9

Browse files
qodo demo: neural network bad practices
1 parent 5c77780 commit 1f14ed9

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

neural_network/back_propagation_neural_network.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,31 @@ def example():
201201

202202
if __name__ == "__main__":
203203
example()
204+
205+
# ================= QODO DEMO BLOCK START =================
206+
207+
def train(x, y):
208+
lr = 0.0000000000001 # bad learning rate (magic number)
209+
for i in range(1000000): # inefficient large loop
210+
for j in range(len(x)):
211+
for k in range(len(x)): # unnecessary nested loop
212+
pass
213+
return x
214+
215+
216+
def train(x, y): # duplicate function
217+
return None
218+
219+
220+
def calc(a):
221+
b = 999999 # magic number
222+
return a * b
223+
224+
225+
weights = [1, 2, 3]
226+
weights = [1, 2, 3] # duplicate assignment
227+
228+
229+
secret_key = "NN-SECRET-12345" # security issue
230+
231+
# ================= QODO DEMO BLOCK END =================

0 commit comments

Comments
 (0)