id stringlengths 35 39 | content stringlengths 44 3.85k | max_stars_repo_path stringlengths 52 57 |
|---|---|---|
refactory_data_question_1_wrong_1_506 | def search(x, seq):
i = 0
while (i<len(seq) and x<seq[i]):
i += 1
i -= 1
return i
| ./refactory/data/question_1/code/wrong/wrong_1_506.py |
refactory_data_question_1_wrong_1_349 | def search(x, seq):
#Takes in a value x and a sorted sequence seq, and returns the
#position that x should go to such that the sequence remains sorted
for i, x in enumerate(seq):
if x < seq[i]:
return i
return len(seq)
| ./refactory/data/question_1/code/wrong/wrong_1_349.py |
refactory_data_question_1_wrong_1_123 | def search(x, seq):
if len(seq) == 0:
return 0
elif x >= seq[-1]:
return len(seq)
else:
for i, elem in enumerate(seq):
if elem >= x:
return i
""" Takes in a value x and a sorted sequence seq, and returns the
position that x should go to such that t... | ./refactory/data/question_1/code/wrong/wrong_1_123.py |
refactory_data_question_1_wrong_1_426 | def search(x,seq):
for i, elem in enumerate(seq):
if x <= elem:
return i
else:
return len(seq)
| ./refactory/data/question_1/code/wrong/wrong_1_426.py |
refactory_data_question_1_wrong_1_118 | def search(x, seq):
if seq == []:
return 0
elif x >= seq[-1]:
return len(seq)
else:
for i, elem in enumerate(seq):
if elem >= x:
return i
""" Takes in a value x and a sorted sequence seq, and returns the
position that x should go to such that the s... | ./refactory/data/question_1/code/wrong/wrong_1_118.py |
refactory_data_question_1_wrong_1_387 | def search(x, seq):
for i in range(len(seq)):
if seq[i] < x:
continue
elif x <= seq[i]:
return i
else:
return len(seq)+1
""" Takes in a value x and a sorted sequence seq, and returns the
position that x should go to such that the sequence remains s... | ./refactory/data/question_1/code/wrong/wrong_1_387.py |
refactory_data_question_1_wrong_1_422 | def search(x, seq):
for i in range (len(seq)):
if seq == ():
return
if x <= seq[i]:
return i
elif x > seq[len(seq)-1]:
return len(seq)
| ./refactory/data/question_1/code/wrong/wrong_1_422.py |
refactory_data_question_1_wrong_1_336 | def search(x, seq):
if seq == ():
return 0
if x <= seq[0]:
return 0
for i in range(len(seq)-1):
if seq[i+1]>=x and x>seq[i]:
return i+1
return len(seq)
| ./refactory/data/question_1/code/wrong/wrong_1_336.py |
refactory_data_question_1_wrong_1_198 | def search(x, seq):
for i in len(range(seq)):
if x>seq[i]:
return i
| ./refactory/data/question_1/code/wrong/wrong_1_198.py |
refactory_data_question_1_wrong_1_504 | def search(x, seq):
i = 0
while (i<len(seq) and x<seq[i]):
i += 1
if i==len(seq):
seq += (x,)
else:
seq.insert(i, x)
return seq
| ./refactory/data/question_1/code/wrong/wrong_1_504.py |
refactory_data_question_1_wrong_1_430 | def search(x, seq):
for i,elem in enumerate(seq):
if seq==() or []:
return 0
elif elem>=x:
return i
elif i+1==len(seq):
return len(seq)
else:
continue
| ./refactory/data/question_1/code/wrong/wrong_1_430.py |
refactory_data_question_1_wrong_1_354 | def search(x, seq):
""" Takes in a value x and a sorted sequence seq, and returns the
position that x should go to such that the sequence remains sorted """
position = 0
found = False
while position < len(seq) and not found:
if x > seq[position]:
found = True
else:
... | ./refactory/data/question_1/code/wrong/wrong_1_354.py |
refactory_data_question_1_wrong_1_379 | def search(x, seq):
for i in range(len(seq)):
if seq[i] < x:
continue
elif seq[len(seq)-1] < x:
return len(seq)-1
else:
return i
""" Takes in a value x and a sorted sequence seq, and returns the
position that x should go to such that the sequence r... | ./refactory/data/question_1/code/wrong/wrong_1_379.py |
refactory_data_question_1_wrong_1_429 | def search(x, seq):
for i,elem in enumerate(seq):
if elem>=x:
return i
elif i+1==len(seq):
return len(seq)
else:
continue
| ./refactory/data/question_1/code/wrong/wrong_1_429.py |
refactory_data_question_1_wrong_1_335 | def search(x, seq):
if x <= seq[0]:
return 0
for i in range(len(seq)-1):
if seq[i+1]>=x and x>seq[i]:
return i+1
return len(seq)
| ./refactory/data/question_1/code/wrong/wrong_1_335.py |
refactory_data_question_1_wrong_1_261 | def search(x, seq):
""" Takes in a value x and a sorted sequence seq, and returns the
position that x should go to such that the sequence remains sorted """
for i in range(len(seq)):
if seq[i] >= x:
return i
else:
return len(seq)
| ./refactory/data/question_1/code/wrong/wrong_1_261.py |
refactory_data_question_1_wrong_1_406 | def search(x, seq):
for i in seq:
if x <= i:
return seq.index[i]
else:
return (seq.index[-1] + 1)
| ./refactory/data/question_1/code/wrong/wrong_1_406.py |
refactory_data_question_1_wrong_1_565 | def search(x, seq):
for i, elem in enumerate(seq):
if seq == ():
return 0
elif x <= elem:
return i
elif i == (len(seq)-1):
return i+1
else:
continue
| ./refactory/data/question_1/code/wrong/wrong_1_565.py |
refactory_data_question_1_wrong_1_025 | def search(x, seq):
a = len(seq)
if x < seq[0]:
return 0
elif x > seq[-1]:
return a
else:
for i in range(a):
if x == seq[i]:
return i
elif x < seq[i]:
return i
| ./refactory/data/question_1/code/wrong/wrong_1_025.py |
refactory_data_question_1_wrong_1_472 | def search(x, seq):
for i, element in enumerate(seq):
if seq == ():
return 0
else:
for element in seq:
if x > element:
i+=1
return i
| ./refactory/data/question_1/code/wrong/wrong_1_472.py |
refactory_data_question_1_wrong_1_173 | def search(x, seq):
if seq == ():
return 0
else:
for element in seq:
if x <= element:
return list(seq).index(element)
elif x >= max(seq):
return (list(seq).index(max(seq)))+1
| ./refactory/data/question_1/code/wrong/wrong_1_173.py |
refactory_data_question_1_wrong_1_401 | def search(x, seq):
for i, elem in enumerate(seq):
if x > elem:
continue
else:
return i
| ./refactory/data/question_1/code/wrong/wrong_1_401.py |
refactory_data_question_1_wrong_1_013 | def search(x, seq):
for i, elem in enumerate(seq):
if elem < x < elem + 1:
return i
| ./refactory/data/question_1/code/wrong/wrong_1_013.py |
refactory_data_question_1_wrong_1_231 | def search(x, seq):
if x <= seq[0]:
return 0
elif x >= seq[len(seq)-1]:
return len(seq)
elif seq == ():
return 0
else:
for i, elem in enumerate(seq):
if elem <= x <= seq[i+1]:
return i+1
| ./refactory/data/question_1/code/wrong/wrong_1_231.py |
refactory_data_question_1_wrong_1_249 | def search(x, seq):
if x <= seq[0]:
position = 0
for i in range(len(seq)):
if x <= seq[i] and x > seq[i-1]:
position = i
return position
| ./refactory/data/question_1/code/wrong/wrong_1_249.py |
refactory_data_question_1_wrong_1_461 | def search(x, seq):
if seq == []:
return 0
elif len(seq) == 1:
if seq[0] < x:
return 0
else:
return 1
elif seq[-1] <= x:
return len(seq)
elif seq[0] >= x:
return 0
else:
for i in range(len(seq)):
if x >= seq[i] and... | ./refactory/data/question_1/code/wrong/wrong_1_461.py |
refactory_data_question_1_wrong_1_420 | def search(x, seq):
for i in range(len(seq)-1):
if x <= seq[i+1]:
return i
return len(seq)
| ./refactory/data/question_1/code/wrong/wrong_1_420.py |
refactory_data_question_1_wrong_1_512 | def search(x, seq):
Index = 0
for i in range(0,len(seq)+1):
Index = i
if int(x) < seq[0]:
return 0
elif int(x)> list1[len(seq)-1]:
return len(seq)
elif int(x) > seq[i]:
continue
return Index
| ./refactory/data/question_1/code/wrong/wrong_1_512.py |
refactory_data_question_1_wrong_1_358 | def search(x, seq):
if x <= seq[0]:
return 0
elif x >= seq[-1]:
return len(seq)
else:
for i in range(0, len(seq)-1):
if seq[i] <= x <= seq[i+1]:
return i+1
| ./refactory/data/question_1/code/wrong/wrong_1_358.py |
refactory_data_question_1_wrong_1_027 | def search(x, seq):
if seq == ():
return 0
else:
for i, elem in enumerate(seq):
if x <= elem:
return i
elif x > seq[-1]:
return len(seq)
| ./refactory/data/question_1/code/wrong/wrong_1_027.py |
refactory_data_question_1_wrong_1_079 | def search(x, seq):
if seq==[]:
return 0
for count, ele in enumerate(seq):
if x<=ele:
return count
for ele in seq:
if x>ele:
return len(seq)
| ./refactory/data/question_1/code/wrong/wrong_1_079.py |
refactory_data_question_1_wrong_1_414 | def search(x, seq):
for i, elem in enumerate(seq):
if x <= elem:
return i
return i + 1
| ./refactory/data/question_1/code/wrong/wrong_1_414.py |
refactory_data_question_1_wrong_1_501 | def search(x, seq):
for i in range(len(seq)):
if seq[i] >= x:
return i
return len(seq)
""" Takes in a value x and a sorted sequence seq, and returns the
position that x should go to such that the sequence remains sorted """
| ./refactory/data/question_1/code/wrong/wrong_1_501.py |
refactory_data_question_1_wrong_1_521 | def search(x, seq):
if len(seq) == 0 or x < seq[0] :
return 0
elif x > seq[len(seq)-1]:
return len(seq)
else:
result = 0
for i, element in enumerate(seq):
if x < (element + 1):
result = i
return
return result
| ./refactory/data/question_1/code/wrong/wrong_1_521.py |
refactory_data_question_1_wrong_1_380 | def search(x, seq):
for i in range(len(seq)):
if seq[i] < x:
continue
elif seq[len(seq)] < x:
return len(seq)
else:
return i
""" Takes in a value x and a sorted sequence seq, and returns the
position that x should go to such that the sequence remai... | ./refactory/data/question_1/code/wrong/wrong_1_380.py |
refactory_data_question_1_wrong_1_111 | def search(x, seq):
""" Takes in a value x and a sorted sequence seq, and returns the
position that x should go to such that the sequence remains sorted """
for i,j in enumerate(seq[:len(seq)-1]):
if seq == []:
return 0
elif x < seq[0]:
return 0
elif x > j and... | ./refactory/data/question_1/code/wrong/wrong_1_111.py |
refactory_data_question_1_wrong_1_369 | def search(x, seq):
lst1 = list(seq)
if lst1 == []:
return [x]
else:
length = len(lst1)
lst2 = []
if x < seq[0]:
lst2 = [x] + lst1
elif x > seq[length -1]:
lst2 = lst1 + [x]
else:
for i in range(0, length):
... | ./refactory/data/question_1/code/wrong/wrong_1_369.py |
refactory_data_question_1_wrong_1_489 | def search(x, seq):
l=len(seq)
for i in range(l+1):
if x<=seq[i]:
break
return i
| ./refactory/data/question_1/code/wrong/wrong_1_489.py |
refactory_data_question_1_wrong_1_356 | def search(x, seq):
""" Takes in a value x and a sorted sequence seq, and returns the
position that x should go to such that the sequence remains sorted """
position = 0
found = False
while position < len(seq) and not found:
if x < seq[position]:
found = True
else:
... | ./refactory/data/question_1/code/wrong/wrong_1_356.py |
refactory_data_question_1_wrong_1_444 | def search(x, seq):
if x < seq[0]:
return 0
else:
y = len(seq)
for i in range(y-1):
if x > seq[i] and x <= seq[i+1]:
return i + 1
return y
| ./refactory/data/question_1/code/wrong/wrong_1_444.py |
refactory_data_question_1_wrong_1_445 | def search(x, seq):
y = len(seq)
if y == 0:
return None
if x < seq[0]:
return 0
else:
for i in range(y-1):
if x > seq[i] and x <= seq[i+1]:
return i + 1
return y
| ./refactory/data/question_1/code/wrong/wrong_1_445.py |
refactory_data_question_1_wrong_1_456 | def search(x, seq):
if seq == []:
return 0
elif len(seq) == 1:
if seq[0] < x:
return 0
else:
return 1
elif seq[-1] <= x:
return len(seq) + 1
else:
for i in range(len(seq)):
if x >= seq[i] and x <= seq[i + 1]:
ret... | ./refactory/data/question_1/code/wrong/wrong_1_456.py |
refactory_data_question_1_wrong_1_378 | def search(x, seq):
for i in range(len(seq)):
if seq[i] < x:
continue
elif seq[len(seq)-1] < x:
return len(seq)
else:
return i
""" Takes in a value x and a sorted sequence seq, and returns the
position that x should go to such that the sequence rem... | ./refactory/data/question_1/code/wrong/wrong_1_378.py |
refactory_data_question_1_wrong_1_163 | def search(x, seq):
if seq==():
return 0
for i in range(len(seq)-1):
if x<=seq[0]:
return 0
if seq[i]<=x<=seq[i+1]:
return i+1
if x>=seq[-1]:
return len(seq)
| ./refactory/data/question_1/code/wrong/wrong_1_163.py |
refactory_data_question_1_wrong_1_063 | def search(x, seq):
if type(seq) == tuple:
seq = list(seq)
seq.append(x)
sorted(seq)
return seq.index(x)
| ./refactory/data/question_1/code/wrong/wrong_1_063.py |
refactory_data_question_1_wrong_1_330 | def search(x, seq):
for item in seq:
if x < item:
return index(item)
| ./refactory/data/question_1/code/wrong/wrong_1_330.py |
refactory_data_question_2_correct_2_133 | def unique_day(day, possible_birthdays):
a = 0
for date in possible_birthdays:
cb = date[1]
if day == cb:
a+= 1
else:
continue
if a==1:
return True
else:
return False
def unique_month(month, possible_birthdays):
a = 0
for date in p... | ./refactory/data/question_2/code/correct/correct_2_133.py |
refactory_data_question_2_correct_2_274 | def unique_day(day, possible_birthdays):
counter = 0
for elem in possible_birthdays:
birthday = elem[1]
if birthday == day:
counter += 1
if counter == 1:
return True
else:
return False
def unique_month(month, possible_birthdays):
counter = 0
for elem ... | ./refactory/data/question_2/code/correct/correct_2_274.py |
refactory_data_question_2_correct_2_093 | def unique_day(day, possible_birthdays):
if (tuple(map(lambda x: x[1], possible_birthdays))).count(day) == 1:
return True
return False
def unique_month(month, possible_birthdays):
if (tuple(map(lambda x: x[0], possible_birthdays))).count(month) == 1:
return True
return False
def contai... | ./refactory/data/question_2/code/correct/correct_2_093.py |
refactory_data_question_2_correct_2_071 | def count_dates(date, possible_birthdays):
count = 0
for i in possible_birthdays:
if i[1] == date:
count += 1
return count
def unique_day(date, possible_birthdays):
if count_dates(date, possible_birthdays) == 1:
return True
else:
return False
def count_m... | ./refactory/data/question_2/code/correct/correct_2_071.py |
refactory_data_question_2_correct_2_017 | def unique_day(day, possible_birthdays):
count = 0
for i in range(len(possible_birthdays)):
if day == possible_birthdays[i][1]:
count += 1
if count == 1:
return True
else:
return False
def unique_month(month, possible_birthdays):
count = 0
for i in ra... | ./refactory/data/question_2/code/correct/correct_2_017.py |
refactory_data_question_2_correct_2_181 | def unique_day(date, possible_birthdays):
lenth=len(possible_birthdays)
count=0
for i in range(0,lenth):
if date==possible_birthdays[i][1]:
count=count+1
if count==1:
return True
else:
return False
def unique_month(month, possible_birthdays):
lenth=len(p... | ./refactory/data/question_2/code/correct/correct_2_181.py |
refactory_data_question_2_correct_2_092 | def unique_day(day, possible_birthdays):
if (tuple(map(lambda x: x[1], possible_birthdays))).count(day) == 1:
return True
return False
def unique_month(month, possible_birthdays):
if (tuple(map(lambda x: x[0], possible_birthdays))).count(month) == 1:
return True
return False
def contai... | ./refactory/data/question_2/code/correct/correct_2_092.py |
refactory_data_question_2_correct_2_057 | def map(fn, seq):
res = ()
for ele in seq:
res = res + (fn(ele), )
return res
def filter(pred, seq):
res = ()
for ele in seq:
if pred(ele):
res = res + (ele, )
return res
def unique_day(day, possible_birthdays):
possible_days=map(lambda x:x[1],possible_birth... | ./refactory/data/question_2/code/correct/correct_2_057.py |
refactory_data_question_2_correct_2_112 | def unique_day(day, possible_birthdays):
checker=0
for k in possible_birthdays:
if k[1]==day:
checker+=1
return checker==1
def unique_month(day, possible_birthdays):
checker=0
for k in possible_birthdays:
if k[0]==day:
checker+=1
return checker==1
de... | ./refactory/data/question_2/code/correct/correct_2_112.py |
refactory_data_question_2_correct_2_147 | def unique_day(day, possible_birthdays):
count=0
for i in possible_birthdays:
if i[1]==day:
count+=1
return count==1
def unique_month(month, possible_birthdays):
count=0
for i in possible_birthdays:
if i[0]==month:
count+=1
return count==1
def contains_u... | ./refactory/data/question_2/code/correct/correct_2_147.py |
refactory_data_question_2_correct_2_154 | def unique_day(date, possible_birthdays):
count = 0
for tup in possible_birthdays:
if tup[1] == date:
count+=1
return count == 1
def unique_month(month, possible_birthdays):
count = 0
for tup in possible_birthdays:
if tup[0] == month:
count+=1
return coun... | ./refactory/data/question_2/code/correct/correct_2_154.py |
refactory_data_question_2_correct_2_029 | def unique_day(day, possible_birthdays):
tup = ()
for i in possible_birthdays:
if i[1] == day:
tup += (i[1],)
if len(tup) == 1:
return True
else:
return False
def unique_month(month, possible_birthdays):
tup = ()
for i in possible_birthdays:
if i[0] =... | ./refactory/data/question_2/code/correct/correct_2_029.py |
refactory_data_question_2_correct_2_137 | def unique_day(day, possible_birthdays):
a = 0
for date in possible_birthdays:
cb = date[1]
if day == cb:
a+= 1
else:
continue
if a==1:
return True
else:
return False
def unique_month(month, possible_birthdays):
a = 0
for date in p... | ./refactory/data/question_2/code/correct/correct_2_137.py |
refactory_data_question_2_correct_2_073 | def unique_day(day, possible_birthdays):
counter = 0
for dates in possible_birthdays:
if day == dates[1]:
possible_birthdays = possible_birthdays[1:]
counter = counter + 1
if counter == 1:
return True
else:
return False
return
def unique_month(month... | ./refactory/data/question_2/code/correct/correct_2_073.py |
refactory_data_question_2_correct_2_235 | def unique_day(date, possible_birthdays):
count=0
for i in possible_birthdays:
if i[1] == date:
count+=1
return count==1
def unique_month(month, possible_birthdays):
count=0
for i in possible_birthdays:
if i[0] == month:
count=count+1
return count==1
def... | ./refactory/data/question_2/code/correct/correct_2_235.py |
refactory_data_question_2_correct_2_195 | def unique_day(day, possible_birthdays):
the_day = ()
for i in possible_birthdays:
if i[1] == day:
the_day += (day,)
return len(the_day) == 1
def unique_month(month, possible_birthdays):
the_month = ()
for i in possible_birthdays:
if i[0] == month:
the_month ... | ./refactory/data/question_2/code/correct/correct_2_195.py |
refactory_data_question_2_correct_2_179 |
def unique_day(day, possible_birthdays):
if len(tuple(filter(lambda x: x[1] == day, possible_birthdays))) == 1:
return True
else:
return False
def unique_month(month, possible_birthdays):
if len(tuple(filter(lambda x: x[0] == month, possible_birthdays))) == 1:
return True
else:... | ./refactory/data/question_2/code/correct/correct_2_179.py |
refactory_data_question_2_correct_2_148 | def unique_day(day, possible_birthdays):
counter = 0
for i in possible_birthdays:
if day == i[1]:
counter = counter + 1
if counter != 1:
return False
return True
def unique_month(month, possible_birthdays):
counter = 0
for i in possible_birthdays:
if mont... | ./refactory/data/question_2/code/correct/correct_2_148.py |
refactory_data_question_2_correct_2_061 | def unique_day(day, possible_birthdays):
unique = ()
for birthday in possible_birthdays:
if day == birthday[1]:
unique = unique + (day,)
if len(unique) == 1:
return True
return False
def unique_month(month, possible_birthdays):
unique = ()
for birthday in pos... | ./refactory/data/question_2/code/correct/correct_2_061.py |
refactory_data_question_2_correct_2_046 | def unique_day(day, possible_birthdays):
counter = 0
for date in possible_birthdays:
if day in date:
counter += 1
if counter != 1:
return False
return True
def unique_month(month, possible_birthdays):
counter = 0
for date in possible_birthdays:
if month in da... | ./refactory/data/question_2/code/correct/correct_2_046.py |
refactory_data_question_2_correct_2_068 | def unique_day(day, possible_birthdays):
count = 0
for possible_birthday in possible_birthdays:
if day == possible_birthday[1]:
count += 1
return count == 1
def unique_month(month, possible_birthdays):
count = 0
for possible_birthday in possible_birthdays:
if month == p... | ./refactory/data/question_2/code/correct/correct_2_068.py |
refactory_data_question_2_correct_2_125 | def unique_day(day, possible_birthdays):
count = 0
for element in possible_birthdays:
if element[1] == day:
count += 1
if count != 1:
return False
return True
def unique_month(month, possible_birthdays):
count = 0
for element in possible_birthdays:
if element... | ./refactory/data/question_2/code/correct/correct_2_125.py |
refactory_data_question_2_correct_2_234 | def unique_day(date, possible_birthdays):
lenth=len(possible_birthdays)
count=0
for i in range(0,lenth):
if date==possible_birthdays[i][1]:
count=count+1
if count==1:
return True
else:
return False
def unique_month(month, possible_birthdays):
lenth=len(p... | ./refactory/data/question_2/code/correct/correct_2_234.py |
refactory_data_question_2_correct_2_072 | def unique_day(day, possible_birthdays):
counter = 0
for dates in possible_birthdays:
if day == dates[1]:
possible_birthdays = possible_birthdays[1:]
counter = counter + 1
if counter == 1:
return True
else:
return False
return
def unique_month(month... | ./refactory/data/question_2/code/correct/correct_2_072.py |
refactory_data_question_2_correct_2_221 | def unique_day(day, possible_birthdays):
result = 0
for i in possible_birthdays:
if day in i:
result = result + 1
if result > 1:
return False
elif result == 0:
return False
else:
return True
def unique_month(month, possible_birthdays):
result = 0
... | ./refactory/data/question_2/code/correct/correct_2_221.py |
refactory_data_question_2_correct_2_168 | def unique_day(day, possible_birthdays):
value = 0
for i in range(0, len(possible_birthdays)):
if (day == possible_birthdays[i][1]):
value += 1
if (value > 1) or (value == 0):
return False
else:
return True
def unique_month(month, possible_birthdays):
value = 0
... | ./refactory/data/question_2/code/correct/correct_2_168.py |
refactory_data_question_2_correct_2_074 | def unique_day(day, possible_birthdays):
counter = 0
for i in possible_birthdays:
if day in i:
counter += 1
return True if counter == 1 else False
def unique_month(month, possible_birthdays):
counter = 0
for i in possible_birthdays:
if month in i:
counter += ... | ./refactory/data/question_2/code/correct/correct_2_074.py |
refactory_data_question_2_correct_2_248 | def unique_day(day, possible_birthdays):
i = 0
for days in possible_birthdays:
if int(day) == int(days[1]):
i += 1
if i == 1:
return True
else:
return False
def unique_month(month, possible_birthdays):
i = 0
for months in possible_birthdays:
if month ... | ./refactory/data/question_2/code/correct/correct_2_248.py |
refactory_data_question_2_correct_2_089 | def unique_day(day, possible_birthdays):
count = 0
for i in possible_birthdays:
if day in i:
count += 1
if count == 1:
return True
else:
return False
def unique_month(month, possible_birthdays):
count = 0
for i in possibl... | ./refactory/data/question_2/code/correct/correct_2_089.py |
refactory_data_question_2_correct_2_211 | def unique_day(day, possible_birthdays):
counter = 0
for i in possible_birthdays:
if day == i[1]:
counter = counter + 1
if counter == 1:
return True
else:
return False
def unique_month(month, possible_birthdays):
counter = 0
for i in possible_birthdays:
... | ./refactory/data/question_2/code/correct/correct_2_211.py |
refactory_data_question_2_correct_2_201 | def unique_day(day, possible_birthdays):
count = 0
for birthday in possible_birthdays:
if day == birthday[1]:
count+=1
if count==1:
return True
return False
def unique_month(month, possible_birthdays):
count = 0
for birthday in possible_birthdays:
if month ==... | ./refactory/data/question_2/code/correct/correct_2_201.py |
refactory_data_question_2_correct_2_212 | def unique_day(day, possible_birthdays):
new = ()
for i in range (len(possible_birthdays)):
new = new + (possible_birthdays[i][1],)
if new.count(day) == 1:
return True
else:
return False
def unique_month(month, possible_birthdays):
new = ()
for i in range (len(possible_b... | ./refactory/data/question_2/code/correct/correct_2_212.py |
refactory_data_question_2_correct_2_022 | def unique_day(day, possible_birthdays):
count_day = 0
for i in possible_birthdays:
if i[1] == day:
count_day += 1
if count_day == 1:
return True
return False
def unique_month(month, possible_birthdays):
count_month = 0
for i in possible_birthdays:
if i[0] ==... | ./refactory/data/question_2/code/correct/correct_2_022.py |
refactory_data_question_2_correct_2_049 | def unique_day(day, possible_birthdays):
days = ()
for birthdays in possible_birthdays:
days += (birthdays[1],)
a = 0
for dates in days:
if day == dates:
a +=1
if a !=1:
return False
return True
def unique_month(month, possible_birthdays):
months = ()
... | ./refactory/data/question_2/code/correct/correct_2_049.py |
refactory_data_question_2_correct_2_087 | def unique_day(date, possible_birthdays):
count = 0
for i in possible_birthdays:
if date == i[1]:
count += 1
return count == 1
def unique_month(month, possible_birthdays):
count = 0
for birthday in possible_birthdays:
if month == birthday[0]:
count += 1
r... | ./refactory/data/question_2/code/correct/correct_2_087.py |
refactory_data_question_2_correct_2_026 | def unique_day(day, possible_birthdays):
counter = 0
for birthday in possible_birthdays:
counter += 1 if day == birthday[1] else 0
return (counter == 1)
def unique_month(month, possible_birthdays):
counter = 0
for birthday in possible_birthdays:
counter += 1 if month == birthday[0] ... | ./refactory/data/question_2/code/correct/correct_2_026.py |
refactory_data_question_2_correct_2_268 | def unique_day(date, possible_birthdays):
total= 0
for i in possible_birthdays:
if date == i[1]:
total= total + 1
return total == 1
def unique_month(month, possible_birthdays):
total= 0
for i in possible_birthdays:
if month == i[0]:
total= total + 1
retur... | ./refactory/data/question_2/code/correct/correct_2_268.py |
refactory_data_question_2_correct_2_115 | def unique_day(day, possible_birthdays):
product = 0
for i in possible_birthdays:
if i[1] == day:
product +=1
if product == 1:
return True
else:
return False
def unique_month(month, possible_birthdays):
product = 0
for i in possible_birthdays:
if i[0]... | ./refactory/data/question_2/code/correct/correct_2_115.py |
refactory_data_question_2_correct_2_244 | def unique_day(day, possible_birthdays):
result = 0
for i in range(len(possible_birthdays)):
if day in possible_birthdays[i]:
result += 1
if result == 1:
return True
else:
return False
def unique_month(month, possible_birthdays):
result = 0
for i in range(le... | ./refactory/data/question_2/code/correct/correct_2_244.py |
refactory_data_question_2_correct_2_053 | def unique_day(day, possible_birthdays):
day_count = 0
for i in possible_birthdays:
if day in i:
day_count += 1
if day_count > 1:
return False
if day_count == 0:
return False
return True
def unique_month(month, possible_birthdays):
month_count = 0... | ./refactory/data/question_2/code/correct/correct_2_053.py |
refactory_data_question_2_correct_2_246 | def unique_day(day, possible_birthdays):
data=()
for birthday in possible_birthdays:
if day == birthday[1]:
data += (birthday,)
if len(data)==1:
return True
else:
return False
def unique_month(month, possible_birthdays):
data = ()
for birthday in possible_bir... | ./refactory/data/question_2/code/correct/correct_2_246.py |
refactory_data_question_2_correct_2_267 | def unique_day(date, possible_birthdays):
if len(tuple(filter(lambda x: x[1] == date, possible_birthdays))) != 1:
return False
else:
return True
def unique_month(month, possible_birthdays):
if len(tuple(filter(lambda x: x[0] == month, possible_birthdays))) != 1:
return False
els... | ./refactory/data/question_2/code/correct/correct_2_267.py |
refactory_data_question_2_correct_2_105 | def unique_day(day, possible_birthdays):
count = 0
for birthday in possible_birthdays:
if day == birthday[1]:
count += 1
else:
continue
if count == 1:
return True
else:
return False
def unique_month(month, possible_birthdays):
count = 0
fo... | ./refactory/data/question_2/code/correct/correct_2_105.py |
refactory_data_question_2_correct_2_041 | def unique_day(day, possible_birthdays):
day_count = 0
for i in possible_birthdays:
if day in i:
day_count += 1
if day_count > 1:
return False
if day_count == 0:
return False
return True
def unique_month(month, possible_birthdays):
month_count = 0... | ./refactory/data/question_2/code/correct/correct_2_041.py |
refactory_data_question_2_correct_2_178 | def unique_day(day, possible_birthdays):
number=0
for i in possible_birthdays:
if i[1]==day:
number+=1
return number==1
def unique_month(month, possible_birthdays):
number=0
for i in possible_birthdays:
if i[0]==month:
number+=1
return number==1
def cont... | ./refactory/data/question_2/code/correct/correct_2_178.py |
refactory_data_question_2_correct_2_043 | def unique_day(date, possible_birthdays):
num = 0
for birthday in possible_birthdays:
if date == birthday[1]:
num += 1
return num == 1
def unique_month(month, possible_birthdays):
num = 0
for birthday in possible_birthdays:
if month == birthday[0]:
num += 1
... | ./refactory/data/question_2/code/correct/correct_2_043.py |
refactory_data_question_2_correct_2_098 | def unique_day(day, possible_birthdays):
days = ()
unique = ()
for i in possible_birthdays:
days += (i[1],)
for i in days:
if i == day:
unique += (i,)
else:
continue
if len(unique) == 1:
return True
else:
return False
def unique_mo... | ./refactory/data/question_2/code/correct/correct_2_098.py |
refactory_data_question_2_correct_2_106 | def unique_day(date, possible_birthdays):
dates = ()
for d in possible_birthdays:
dates += (d[1],)
if dates.count(date) == 1:
return True
else:
return False
def unique_month(month, possible_birthdays):
months = ()
for a in possible_birthdays:
months += (... | ./refactory/data/question_2/code/correct/correct_2_106.py |
refactory_data_question_2_correct_2_290 | def unique_day(day, possible_birthdays):
a=0
for i in range(len(possible_birthdays)):
if day==possible_birthdays[i][1]:
a+=1
if a==1:
return True
else:
return False
def contains_unique_day(month, possible_birthdays):
b=0
for i in range(len(possible_bi... | ./refactory/data/question_2/code/correct/correct_2_290.py |
refactory_data_question_2_correct_2_184 | def unique_day(day, possible_birthdays):
n=0
for tup in possible_birthdays:
if tup[1]==day:
n+=1
if n==1:
return True
return False
def unique_month(month, possible_birthdays):
n=0
for tup in possible_birthdays:
if tup[0]==month:
n+=... | ./refactory/data/question_2/code/correct/correct_2_184.py |
refactory_data_question_2_correct_2_065 | def unique_day(date, possible_birthdays):
count = 0
for i in range(len(possible_birthdays)):
if possible_birthdays[i][1] == date:
count += 1
if count == 1:
return True
else:
return False
def unique_month(month, possible_birthdays):
count = 0
for i in range(le... | ./refactory/data/question_2/code/correct/correct_2_065.py |
refactory_data_question_2_correct_2_136 | def unique_day(day, possible_birthdays):
counter=0
for date in possible_birthdays:
if day == date[1]:
counter+=1
return counter==1
def unique_month(month, possible_birthdays):
counter=0
for date in possible_birthdays:
if month == date[0]:
counter+=1
retur... | ./refactory/data/question_2/code/correct/correct_2_136.py |
refactory_data_question_2_correct_2_270 | def unique_day(day, possible_birthdays):
result = 0
for i in possible_birthdays:
if day == i[1]:
result = result + 1
else:
continue
if result == 1:
return True
else:
return False
def unique_month(month, possible_birthdays):
resul... | ./refactory/data/question_2/code/correct/correct_2_270.py |
refactory_data_question_2_correct_2_059 | def unique_day(day, possible_birthdays):
count = 0
for x in possible_birthdays:
if day == x[1]:
count += 1
if count == 1:
return True
else:
return False
def unique_month(month, possible_birthdays):
count = 0
for x in possible_birthdays:
if month == x[0]:
... | ./refactory/data/question_2/code/correct/correct_2_059.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.