Unnamed: 0
int64
0
2.44k
repo
stringlengths
32
81
hash
stringlengths
40
40
diff
stringlengths
113
1.17k
old_path
stringlengths
5
84
rewrite
stringlengths
34
79
initial_state
stringlengths
75
980
final_state
stringlengths
76
980
1,200
https://:@github.com/mworion/MountWizzard4.git
f242a72c11cd1a6e904daf11afdfdee81c2aeb20
@@ -109,7 +109,7 @@ class SiteStatus(object): if self.ui.checkRefracNone.isChecked(): return False if self.ui.checkRefracNoTrack.isChecked(): - if self.app.mount.obsSite.status != 0: + if self.app.mount.obsSite.status == 0: return False temp, press = self.app.environment.getFilteredRefracParams() if temp is None or press is None:
mw4/gui/mainWmixin/tabSiteStatus.py
ReplaceText(target='==' @(112,45)->(112,47))
class SiteStatus(object): if self.ui.checkRefracNone.isChecked(): return False if self.ui.checkRefracNoTrack.isChecked(): if self.app.mount.obsSite.status != 0: return False temp, press = self.app.environment.getFilteredRefracParams() if temp is None or press is None:
class SiteStatus(object): if self.ui.checkRefracNone.isChecked(): return False if self.ui.checkRefracNoTrack.isChecked(): if self.app.mount.obsSite.status == 0: return False temp, press = self.app.environment.getFilteredRefracParams() if temp is None or press is None:
1,201
https://:@github.com/mworion/MountWizzard4.git
a1d62cbed9ed70e9caebb9f3b66c9367ce584216
@@ -128,7 +128,7 @@ class Weather(indiClass.IndiClass): else: key = element - self.data[element] = value + self.data[key] = value if 'WEATHER_DEWPOINT' in self.data: return True
mw4/environment/weather.py
ReplaceText(target='key' @(131,22)->(131,29))
class Weather(indiClass.IndiClass): else: key = element self.data[element] = value if 'WEATHER_DEWPOINT' in self.data: return True
class Weather(indiClass.IndiClass): else: key = element self.data[key] = value if 'WEATHER_DEWPOINT' in self.data: return True
1,202
https://:@github.com/mworion/MountWizzard4.git
cf891426dffe2a018621bf2c836ff19bfb086835
@@ -460,7 +460,7 @@ class SettMisc(object): :return: True for test purpose """ - if platform.machine() not in Config.excludedPlatforms: + if platform.machine() in Config.excludedPlatforms: return False self.audioSignalsSet['Beep'] = ':/sound/beep.wav'
mw4/gui/mainWmixin/tabSettMisc.py
ReplaceText(target=' in ' @(463,29)->(463,37))
class SettMisc(object): :return: True for test purpose """ if platform.machine() not in Config.excludedPlatforms: return False self.audioSignalsSet['Beep'] = ':/sound/beep.wav'
class SettMisc(object): :return: True for test purpose """ if platform.machine() in Config.excludedPlatforms: return False self.audioSignalsSet['Beep'] = ':/sound/beep.wav'
1,203
https://:@github.com/mworion/MountWizzard4.git
03adbd9668d10e81e3a9342c6dc5053442394559
@@ -376,7 +376,7 @@ class DataPoint(object): track = self.app.mount.setting.meridianLimitTrack if slew is None or track is None: - return True + return False value = max(slew, track)
mw4/logic/modeldata/buildpoints.py
ReplaceText(target='False' @(379,19)->(379,23))
class DataPoint(object): track = self.app.mount.setting.meridianLimitTrack if slew is None or track is None: return True value = max(slew, track)
class DataPoint(object): track = self.app.mount.setting.meridianLimitTrack if slew is None or track is None: return False value = max(slew, track)
1,204
https://:@github.com/beincy/utils-mini.git
989c19fa9755236023d28748724a64e8a379de07
@@ -98,7 +98,7 @@ def isNoneOrEmpty(obj): 判断列表或者字符串是否为空 ''' if obj is None: - return False + return True if isinstance(obj, list): return len(obj) <= 0 if isinstance(obj, str):
utilsMini/uitiy.py
ReplaceText(target='True' @(101,15)->(101,20))
def isNoneOrEmpty(obj): 判断列表或者字符串是否为空 ''' if obj is None: return False if isinstance(obj, list): return len(obj) <= 0 if isinstance(obj, str):
def isNoneOrEmpty(obj): 判断列表或者字符串是否为空 ''' if obj is None: return True if isinstance(obj, list): return len(obj) <= 0 if isinstance(obj, str):
1,205
https://:@github.com/philipdexter/pear.git
41a38e1c951ce4939b28654c0b3269bc7a3afa38
@@ -47,7 +47,7 @@ def upgrade(ctx): print('failed to find {} on server'.format(n)) continue elif lv != rv: - print('found new version {} (old: {}) for {}, do you want to upgrade? [Y/n] '.format(lv, rv, n), end='') + print('found new version {} (old: {}) for {}, do you want to upgrade? [Y/n] '.format(rv, lv, n), end='') sys.stdout.flush() answer = sys.stdin.readline().strip() if answer in ('', ' ', 'Y', 'y'):
pear/__init__.py
ArgSwap(idxs=0<->1 @(50,18)->(50,96))
def upgrade(ctx): print('failed to find {} on server'.format(n)) continue elif lv != rv: print('found new version {} (old: {}) for {}, do you want to upgrade? [Y/n] '.format(lv, rv, n), end='') sys.stdout.flush() answer = sys.stdin.readline().strip() if answer in ('', ' ', 'Y', 'y'):
def upgrade(ctx): print('failed to find {} on server'.format(n)) continue elif lv != rv: print('found new version {} (old: {}) for {}, do you want to upgrade? [Y/n] '.format(rv, lv, n), end='') sys.stdout.flush() answer = sys.stdin.readline().strip() if answer in ('', ' ', 'Y', 'y'):
1,206
https://:@github.com/wesselb/matrix.git
e0cc62b07fcfe89d4adf592e4ab16d1a4865c71d
@@ -93,7 +93,7 @@ def matmul(a, b, tr_a=False, tr_b=False): b = _tr(b, tr_b) middle = B.matmul(a.right, b.left, tr_a=True) rows, cols = B.shape(middle) - if rows < cols: + if rows > cols: return LowRank(B.matmul(a.left, middle), b.right) else: return LowRank(a.left, B.matmul(b.right, middle, tr_b=True))
matrix/ops/matmul.py
ReplaceText(target='>' @(96,12)->(96,13))
def matmul(a, b, tr_a=False, tr_b=False): b = _tr(b, tr_b) middle = B.matmul(a.right, b.left, tr_a=True) rows, cols = B.shape(middle) if rows < cols: return LowRank(B.matmul(a.left, middle), b.right) else: return LowRank(a.left, B.matmul(b.right, middle, tr_b=True))
def matmul(a, b, tr_a=False, tr_b=False): b = _tr(b, tr_b) middle = B.matmul(a.right, b.left, tr_a=True) rows, cols = B.shape(middle) if rows > cols: return LowRank(B.matmul(a.left, middle), b.right) else: return LowRank(a.left, B.matmul(b.right, middle, tr_b=True))
1,207
https://:@github.com/cuenca-mx/ivoy-python.git
4bc75f0341179efdbf63ddba96e9de8e651adae4
@@ -33,7 +33,7 @@ class Waybill(Resource): resp = cls._client.post(cls._endpoint, json=json_data) return cls( id_package_list=id_package_list, - guide_list=ivoy_guide_list, + guide_list=guide_list, ivoy_guide_list=ivoy_guide_list, byte_content=resp.content, )
ivoy/resources/waybill.py
ReplaceText(target='guide_list' @(36,23)->(36,38))
class Waybill(Resource): resp = cls._client.post(cls._endpoint, json=json_data) return cls( id_package_list=id_package_list, guide_list=ivoy_guide_list, ivoy_guide_list=ivoy_guide_list, byte_content=resp.content, )
class Waybill(Resource): resp = cls._client.post(cls._endpoint, json=json_data) return cls( id_package_list=id_package_list, guide_list=guide_list, ivoy_guide_list=ivoy_guide_list, byte_content=resp.content, )
1,208
https://:@github.com/twmacro/pyyeti.git
0b1aa385a36ed58d82895e91cbb23bb59823f7ba
@@ -733,7 +733,7 @@ def _get_Tlv2sc(sccoord): T = np.zeros((6, 6)) T[:3, :3] = sccoord T[3:, 3:] = sccoord - return sccoord + return T # get transform from l/v basic to s/c: uset = n2p.addgrid(None, 1, 'b', sccoord, [0, 0, 0], sccoord)
pyyeti/cb.py
ReplaceText(target='T' @(736,15)->(736,22))
def _get_Tlv2sc(sccoord): T = np.zeros((6, 6)) T[:3, :3] = sccoord T[3:, 3:] = sccoord return sccoord # get transform from l/v basic to s/c: uset = n2p.addgrid(None, 1, 'b', sccoord, [0, 0, 0], sccoord)
def _get_Tlv2sc(sccoord): T = np.zeros((6, 6)) T[:3, :3] = sccoord T[3:, 3:] = sccoord return T # get transform from l/v basic to s/c: uset = n2p.addgrid(None, 1, 'b', sccoord, [0, 0, 0], sccoord)
1,209
https://:@github.com/civodlu/trw.git
a2e824a5ae886c95af4e2cecd29331401aa61f76
@@ -158,7 +158,7 @@ class CallbackExplainDecision(callback.Callback): self.dataset_name = next(iter(datasets)) if datasets[self.dataset_name].get(self.split_name) is None: - logger.error('can\'t find split={} for dataset={}'.format(self.dataset_name, self.split_name)) + logger.error('can\'t find split={} for dataset={}'.format(self.split_name, self.dataset_name)) self.dataset_name = None return
src/trw/train/callback_explain_decision.py
ArgSwap(idxs=0<->1 @(161,25)->(161,69))
class CallbackExplainDecision(callback.Callback): self.dataset_name = next(iter(datasets)) if datasets[self.dataset_name].get(self.split_name) is None: logger.error('can\'t find split={} for dataset={}'.format(self.dataset_name, self.split_name)) self.dataset_name = None return
class CallbackExplainDecision(callback.Callback): self.dataset_name = next(iter(datasets)) if datasets[self.dataset_name].get(self.split_name) is None: logger.error('can\'t find split={} for dataset={}'.format(self.split_name, self.dataset_name)) self.dataset_name = None return
1,210
https://:@github.com/lycantropos/gon.git
ff1fe6cc1054b70682a5c3ecf41ba9c0b4e14137
@@ -88,7 +88,7 @@ class Interval: and _in_interval(other.end, self)) def orientation_with(self, point: Point) -> int: - return Angle(self.start, self.end, point).orientation + return Angle(self.end, self.start, point).orientation class Segment(Interval):
gon/linear.py
ArgSwap(idxs=0<->1 @(91,15)->(91,20))
class Interval: and _in_interval(other.end, self)) def orientation_with(self, point: Point) -> int: return Angle(self.start, self.end, point).orientation class Segment(Interval):
class Interval: and _in_interval(other.end, self)) def orientation_with(self, point: Point) -> int: return Angle(self.end, self.start, point).orientation class Segment(Interval):
1,211
https://:@github.com/lycantropos/gon.git
ff1fe6cc1054b70682a5c3ecf41ba9c0b4e14137
@@ -9,7 +9,7 @@ from . import strategies def test_basic(vertex: Point, first_ray_point: Point, second_ray_point: Point) -> None: - angle = Angle(vertex, first_ray_point, second_ray_point) + angle = Angle(first_ray_point, vertex, second_ray_point) assert angle.vertex == vertex assert angle.first_ray_point == first_ray_point
tests/angular_tests/angle_tests/test_creation.py
ArgSwap(idxs=0<->1 @(12,12)->(12,17))
from . import strategies def test_basic(vertex: Point, first_ray_point: Point, second_ray_point: Point) -> None: angle = Angle(vertex, first_ray_point, second_ray_point) assert angle.vertex == vertex assert angle.first_ray_point == first_ray_point
from . import strategies def test_basic(vertex: Point, first_ray_point: Point, second_ray_point: Point) -> None: angle = Angle(first_ray_point, vertex, second_ray_point) assert angle.vertex == vertex assert angle.first_ray_point == first_ray_point
1,212
https://:@github.com/lycantropos/gon.git
31bfd6196e50ef10a020b3adee21e87705ba5abf
@@ -68,7 +68,7 @@ class Vector: >>> not zero_vector True """ - return bool(self._x and self._y) + return bool(self._x or self._y) @property def x(self) -> Scalar:
gon/base.py
ReplaceText(target='or' @(71,28)->(71,31))
class Vector: >>> not zero_vector True """ return bool(self._x and self._y) @property def x(self) -> Scalar:
class Vector: >>> not zero_vector True """ return bool(self._x or self._y) @property def x(self) -> Scalar:
1,213
https://:@github.com/lycantropos/gon.git
948c5adbfc855d0fcd1fd92d5442fc24ac3986ca
@@ -105,7 +105,7 @@ def replace_segment(segments: Set[Segment], def is_non_origin_point(point: Point) -> bool: - return bool(point.x and point.y) + return bool(point.x or point.y) def reflect_point(point: Point) -> Point:
tests/utils.py
ReplaceText(target='or' @(108,24)->(108,27))
def replace_segment(segments: Set[Segment], def is_non_origin_point(point: Point) -> bool: return bool(point.x and point.y) def reflect_point(point: Point) -> Point:
def replace_segment(segments: Set[Segment], def is_non_origin_point(point: Point) -> bool: return bool(point.x or point.y) def reflect_point(point: Point) -> Point:
1,214
https://:@github.com/lycantropos/gon.git
e8e6c3d4505c540b8dfb5ca1f5fb29fefad25ee6
@@ -49,8 +49,8 @@ class Angle: @property def kind(self) -> AngleKind: return AngleKind(to_sign( - projection.signed_length(self._vertex, - self._first_ray_point, + projection.signed_length(self._first_ray_point, + self._vertex, self._second_ray_point))) @property
gon/angular.py
ArgSwap(idxs=0<->1 @(52,16)->(52,40))
class Angle: @property def kind(self) -> AngleKind: return AngleKind(to_sign( projection.signed_length(self._vertex, self._first_ray_point, self._second_ray_point))) @property
class Angle: @property def kind(self) -> AngleKind: return AngleKind(to_sign( projection.signed_length(self._first_ray_point, self._vertex, self._second_ray_point))) @property
1,215
https://:@github.com/lycantropos/gon.git
36f206f6debde8166907e917b5a96e08a1dbe256
@@ -185,7 +185,7 @@ class Polygon(Geometry): >>> polygon > polygon.convex_hull False """ - return self != other and self <= other + return self != other and self >= other def __hash__(self) -> int: """
gon/shaped.py
ReplaceText(target='>=' @(188,38)->(188,40))
class Polygon(Geometry): >>> polygon > polygon.convex_hull False """ return self != other and self <= other def __hash__(self) -> int: """
class Polygon(Geometry): >>> polygon > polygon.convex_hull False """ return self != other and self >= other def __hash__(self) -> int: """
1,216
https://:@github.com/energy-analytics-project/energy-dashboard-lib.git
7f6979e46e7d4c015302ac3e826ee317325bf216
@@ -161,7 +161,7 @@ def insert_file(logger, resource_name, dbmgr, sql_dir, db_dir, sql_file_name, id "dbmgr" : str(dbmgr), "message" : "completed", }) - return sql_file + return sql_file_name except Exception as e: log.error(chlogger, { "name" : __name__,
edl/resources/db.py
ReplaceText(target='sql_file_name' @(164,15)->(164,23))
def insert_file(logger, resource_name, dbmgr, sql_dir, db_dir, sql_file_name, id "dbmgr" : str(dbmgr), "message" : "completed", }) return sql_file except Exception as e: log.error(chlogger, { "name" : __name__,
def insert_file(logger, resource_name, dbmgr, sql_dir, db_dir, sql_file_name, id "dbmgr" : str(dbmgr), "message" : "completed", }) return sql_file_name except Exception as e: log.error(chlogger, { "name" : __name__,
1,217
https://:@github.com/quipucords/camayoc.git
5d52f47ce5f7085773edfba8ac3cb0a7016b9500
@@ -39,7 +39,7 @@ def browser(request): debug_mode = (os.environ.get('SELENIUM_DEBUG', 'false').lower() == 'true') if driver_type == 'chrome': chrome_options = webdriver.ChromeOptions() - if debug_mode: + if not debug_mode: chrome_options.add_argument('--headless') chrome_options.add_argument('--disable-gpu') chrome_options.add_argument('--no-sandbox')
camayoc/tests/qpc/ui/conftest.py
ReplaceText(target='not ' @(42,11)->(42,11))
def browser(request): debug_mode = (os.environ.get('SELENIUM_DEBUG', 'false').lower() == 'true') if driver_type == 'chrome': chrome_options = webdriver.ChromeOptions() if debug_mode: chrome_options.add_argument('--headless') chrome_options.add_argument('--disable-gpu') chrome_options.add_argument('--no-sandbox')
def browser(request): debug_mode = (os.environ.get('SELENIUM_DEBUG', 'false').lower() == 'true') if driver_type == 'chrome': chrome_options = webdriver.ChromeOptions() if not debug_mode: chrome_options.add_argument('--headless') chrome_options.add_argument('--disable-gpu') chrome_options.add_argument('--no-sandbox')
1,218
https://:@github.com/AnemoneLabs/unmessage.git
cdbdf31e6db0a03b7521240aab8ef7e78f259027
@@ -33,7 +33,7 @@ def test_build_regular_packet(iv, len(iv_hash) == packets.HASH_LEN and len(payload_hash) == packets.HASH_LEN and not len(handshake_key) and - len(payload_hash)): + len(payload)): assert isinstance(packets.build_regular_packet(data), packets.RegularPacket) else:
tests/test_packets.py
ReplaceText(target='payload' @(36,16)->(36,28))
def test_build_regular_packet(iv, len(iv_hash) == packets.HASH_LEN and len(payload_hash) == packets.HASH_LEN and not len(handshake_key) and len(payload_hash)): assert isinstance(packets.build_regular_packet(data), packets.RegularPacket) else:
def test_build_regular_packet(iv, len(iv_hash) == packets.HASH_LEN and len(payload_hash) == packets.HASH_LEN and not len(handshake_key) and len(payload)): assert isinstance(packets.build_regular_packet(data), packets.RegularPacket) else:
1,219
https://:@github.com/datacamp/shellwhat_ext.git
a8cf5633b36c6f11da7cb32b604b2cb1dbf246ad
@@ -83,7 +83,7 @@ def test_output_does_not_contain(state, text, fixed=True, msg='Submission output else: pat = re.compile(text) - if text.search(state.student_result): + if pat.search(state.student_result): state.do_test(msg.format(text)) return state
shellwhat_ext/__init__.py
ReplaceText(target='pat' @(86,11)->(86,15))
def test_output_does_not_contain(state, text, fixed=True, msg='Submission output else: pat = re.compile(text) if text.search(state.student_result): state.do_test(msg.format(text)) return state
def test_output_does_not_contain(state, text, fixed=True, msg='Submission output else: pat = re.compile(text) if pat.search(state.student_result): state.do_test(msg.format(text)) return state
1,220
https://:@github.com/fdcl-nrf/fym.git
ac48fb4c314929f215ce7a7fa86c245cd9c84261
@@ -223,7 +223,7 @@ class Delay: return self.clock.get() >= self.T def set_states(self, time): - if time > self.memory_dump.x[-1] - self.T: + if time > self.memory_dump.x[-1] + self.T: fit = self.memory[0] else: fit = self.memory_dump
fym/core.py
ReplaceText(target='+' @(226,41)->(226,42))
class Delay: return self.clock.get() >= self.T def set_states(self, time): if time > self.memory_dump.x[-1] - self.T: fit = self.memory[0] else: fit = self.memory_dump
class Delay: return self.clock.get() >= self.T def set_states(self, time): if time > self.memory_dump.x[-1] + self.T: fit = self.memory[0] else: fit = self.memory_dump
1,221
https://:@github.com/tjbanks/bmtools.git
6c3bec26dc0e7338760233359c320ebfd94c4c8d
@@ -339,7 +339,7 @@ def connection_divergence_average(config=None,nodes=None,edges=None,sources=[],t vc = vc[target_id_type].dropna().sort_index() count = vc.ix[target_id]#t_list[t_list[target_id_type]==target_id] else: - vc = t_list.apply(pd.Series.value_counts) + vc = s_list.apply(pd.Series.value_counts) vc = vc[source_id_type].dropna().sort_index() count = vc.ix[source_id]#count = s_list[s_list[source_id_type]==source_id]
bmtools/util.py
ReplaceText(target='s_list' @(342,17)->(342,23))
def connection_divergence_average(config=None,nodes=None,edges=None,sources=[],t vc = vc[target_id_type].dropna().sort_index() count = vc.ix[target_id]#t_list[t_list[target_id_type]==target_id] else: vc = t_list.apply(pd.Series.value_counts) vc = vc[source_id_type].dropna().sort_index() count = vc.ix[source_id]#count = s_list[s_list[source_id_type]==source_id]
def connection_divergence_average(config=None,nodes=None,edges=None,sources=[],t vc = vc[target_id_type].dropna().sort_index() count = vc.ix[target_id]#t_list[t_list[target_id_type]==target_id] else: vc = s_list.apply(pd.Series.value_counts) vc = vc[source_id_type].dropna().sort_index() count = vc.ix[source_id]#count = s_list[s_list[source_id_type]==source_id]
1,222
https://:@github.com/tjbanks/bmtools.git
d8cb66f7299499176a5391effe12f55213115f15
@@ -1379,7 +1379,7 @@ https://github.com/tjbanks/bmtool ctg.add_widget(window_index,column_index,widget) segpassivewidget = SegregationPassiveWidget(fir_widget,ctg.root_sec.cell(), other_cells,section_selected,ctg.mechanism_dict,gleak_var=gleak,eleak_var=eleak) - ctg.add_widget(window_index,column_index,widget) + ctg.add_widget(window_index,column_index,segpassivewidget) widget = SegregationFIRFitWidget(fir_widget) ctg.add_widget(window_index,column_index,widget)
bmtools/cli/plugins/util/commands.py
ReplaceText(target='segpassivewidget' @(1382,45)->(1382,51))
https://github.com/tjbanks/bmtool ctg.add_widget(window_index,column_index,widget) segpassivewidget = SegregationPassiveWidget(fir_widget,ctg.root_sec.cell(), other_cells,section_selected,ctg.mechanism_dict,gleak_var=gleak,eleak_var=eleak) ctg.add_widget(window_index,column_index,widget) widget = SegregationFIRFitWidget(fir_widget) ctg.add_widget(window_index,column_index,widget)
https://github.com/tjbanks/bmtool ctg.add_widget(window_index,column_index,widget) segpassivewidget = SegregationPassiveWidget(fir_widget,ctg.root_sec.cell(), other_cells,section_selected,ctg.mechanism_dict,gleak_var=gleak,eleak_var=eleak) ctg.add_widget(window_index,column_index,segpassivewidget) widget = SegregationFIRFitWidget(fir_widget) ctg.add_widget(window_index,column_index,widget)
1,223
https://:@github.com/tslight/ppick.git
d610a851b37e3b280fe22c704e5845194420fc86
@@ -65,7 +65,7 @@ def process(parent, action, curline): curline += 1 elif action == 'get_size_all': for c, d in parent.traverse(): - child.sized[os.path.abspath(child.name)] = None + child.sized[os.path.abspath(c.name)] = None action = None # reset action line += 1 # keep scrolling! return curline, line
treepick/pick.py
ReplaceText(target='c' @(68,48)->(68,53))
def process(parent, action, curline): curline += 1 elif action == 'get_size_all': for c, d in parent.traverse(): child.sized[os.path.abspath(child.name)] = None action = None # reset action line += 1 # keep scrolling! return curline, line
def process(parent, action, curline): curline += 1 elif action == 'get_size_all': for c, d in parent.traverse(): child.sized[os.path.abspath(c.name)] = None action = None # reset action line += 1 # keep scrolling! return curline, line
1,224
https://:@github.com/tslight/ppick.git
df4927a8e15cd6ebce72e989da9b12999158d951
@@ -58,7 +58,7 @@ def process(parent, action, curline): child.picked.add(child.name) curline += 1 elif action == 'next_parent': - curline += child.nextparent(parent, curline, depth) + curline = child.nextparent(parent, curline, depth) elif action == 'prev_parent': curline = child.prevparent(parent, curline, depth)[0] elif action == 'get_size':
treepick/pick.py
ReplaceText(target='=' @(61,24)->(61,26))
def process(parent, action, curline): child.picked.add(child.name) curline += 1 elif action == 'next_parent': curline += child.nextparent(parent, curline, depth) elif action == 'prev_parent': curline = child.prevparent(parent, curline, depth)[0] elif action == 'get_size':
def process(parent, action, curline): child.picked.add(child.name) curline += 1 elif action == 'next_parent': curline = child.nextparent(parent, curline, depth) elif action == 'prev_parent': curline = child.prevparent(parent, curline, depth)[0] elif action == 'get_size':
1,225
https://:@github.com/tslight/ppick.git
0e6b3b8077f15ae49045d1aef5e4b597ec1f7ada
@@ -76,7 +76,7 @@ def pick(stdscr, root, hidden=True, relative=False, picked=[]): if action == 'reset': parent, action, curline = reset(stdscr, root, hidden, picked=[]) elif action == 'toggle_hidden': - curline = scr.toggle_hidden(curline, scr) + curline = parent.toggle_hidden(curline, scr) elif action == 'find': string = scr.txtbox("Find: ").strip() if string:
treepick/pick.py
ReplaceText(target='parent' @(79,22)->(79,25))
def pick(stdscr, root, hidden=True, relative=False, picked=[]): if action == 'reset': parent, action, curline = reset(stdscr, root, hidden, picked=[]) elif action == 'toggle_hidden': curline = scr.toggle_hidden(curline, scr) elif action == 'find': string = scr.txtbox("Find: ").strip() if string:
def pick(stdscr, root, hidden=True, relative=False, picked=[]): if action == 'reset': parent, action, curline = reset(stdscr, root, hidden, picked=[]) elif action == 'toggle_hidden': curline = parent.toggle_hidden(curline, scr) elif action == 'find': string = scr.txtbox("Find: ").strip() if string:
1,226
https://:@github.com/cloudve/djcloudbridge.git
3a4862c261a0e3457358cd71842d7e0d7b62b11a
@@ -194,7 +194,7 @@ class GCECredentials(Credentials): gce_creds = json.loads(self.credentials) # Overwrite with super values in case gce_creds also has an id property gce_creds.update(d) - return d + return gce_creds class AzureCredentials(Credentials):
djcloudbridge/models.py
ReplaceText(target='gce_creds' @(197,15)->(197,16))
class GCECredentials(Credentials): gce_creds = json.loads(self.credentials) # Overwrite with super values in case gce_creds also has an id property gce_creds.update(d) return d class AzureCredentials(Credentials):
class GCECredentials(Credentials): gce_creds = json.loads(self.credentials) # Overwrite with super values in case gce_creds also has an id property gce_creds.update(d) return gce_creds class AzureCredentials(Credentials):
1,227
https://:@github.com/suizokukan/katal.git
08b3edeb2142136a0f857a185d483ccc75ae2591
@@ -1053,7 +1053,7 @@ def fill_select(_debug_datatime=None): ": incompatibility with the sieves".format(prefix, fullname), _important_msg=False) else: - tobeadded, partialhashid, hashid = thefilehastobeadded__db(filename, size, time) + tobeadded, partialhashid, hashid = thefilehastobeadded__db(fullname, size, time) if tobeadded: # ok, let's add <filename> to SELECT...
katal/katal.py
ReplaceText(target='fullname' @(1056,75)->(1056,83))
def fill_select(_debug_datatime=None): ": incompatibility with the sieves".format(prefix, fullname), _important_msg=False) else: tobeadded, partialhashid, hashid = thefilehastobeadded__db(filename, size, time) if tobeadded: # ok, let's add <filename> to SELECT...
def fill_select(_debug_datatime=None): ": incompatibility with the sieves".format(prefix, fullname), _important_msg=False) else: tobeadded, partialhashid, hashid = thefilehastobeadded__db(fullname, size, time) if tobeadded: # ok, let's add <filename> to SELECT...
1,228
https://:@github.com/jrabbit/pyborg-1up.git
0552700be4229d7b06c3264bb2e9d1c59c20ecfa
@@ -125,7 +125,7 @@ class PyborgDiscord(discord.Client): try: if self.settings["discord"]["plaintext_ping"]: exp = re.compile(message.guild.me.display_name, re.IGNORECASE) - line = exp.sub(line, "#nick") + line = exp.sub("#nick", line) except KeyError: pass
pyborg/pyborg/mod/mod_discord.py
ArgSwap(idxs=0<->1 @(128,23)->(128,30))
class PyborgDiscord(discord.Client): try: if self.settings["discord"]["plaintext_ping"]: exp = re.compile(message.guild.me.display_name, re.IGNORECASE) line = exp.sub(line, "#nick") except KeyError: pass
class PyborgDiscord(discord.Client): try: if self.settings["discord"]["plaintext_ping"]: exp = re.compile(message.guild.me.display_name, re.IGNORECASE) line = exp.sub("#nick", line) except KeyError: pass
1,229
https://:@github.com/gallantlab/tikreg.git
4241a935801cdef4b85a79e361eb365e65385f04
@@ -1103,7 +1103,7 @@ def estimate_stem_wmvnp(features_train, feature_priors=feature_priors, feature_hyparams=spatial_opt, weights=weights, - performance=weights, + performance=performance, predictions=predictions, ridge_scale=ridge_opt, verbosity=verbosity,
tikypy/models.py
ReplaceText(target='performance' @(1106,67)->(1106,74))
def estimate_stem_wmvnp(features_train, feature_priors=feature_priors, feature_hyparams=spatial_opt, weights=weights, performance=weights, predictions=predictions, ridge_scale=ridge_opt, verbosity=verbosity,
def estimate_stem_wmvnp(features_train, feature_priors=feature_priors, feature_hyparams=spatial_opt, weights=weights, performance=performance, predictions=predictions, ridge_scale=ridge_opt, verbosity=verbosity,
1,230
https://:@github.com/SpotlightKid/picoredis.git
f7996b19a47b6372bd3d29c081320d38ce2f566c
@@ -53,7 +53,7 @@ class Redis: self.connect(host, port) def connect(self, host=None, port=None): - if port is not None: + if host is not None: self._host = host if port is not None:
picoredis/picoredis.py
ReplaceText(target='host' @(56,11)->(56,15))
class Redis: self.connect(host, port) def connect(self, host=None, port=None): if port is not None: self._host = host if port is not None:
class Redis: self.connect(host, port) def connect(self, host=None, port=None): if host is not None: self._host = host if port is not None:
1,231
https://:@github.com/igordejanovic/pyFlies.git
915aaec319a22c7e312a45ecded6d2d2a2372321
@@ -127,7 +127,7 @@ class ExpTableRow(ModelElement, ScopeProvider): for comp_time in cond_comp.comp_times: comp_time_inst = comp_time.eval(context, last_comp) comp_insts.append(comp_time_inst) - last_comp = comp_time_inst + last_comp = comp_time setattr(self, f'ph_{phase}', comp_insts) break
src/textx-lang-pyflies/pyflies/table.py
ReplaceText(target='comp_time' @(130,36)->(130,50))
class ExpTableRow(ModelElement, ScopeProvider): for comp_time in cond_comp.comp_times: comp_time_inst = comp_time.eval(context, last_comp) comp_insts.append(comp_time_inst) last_comp = comp_time_inst setattr(self, f'ph_{phase}', comp_insts) break
class ExpTableRow(ModelElement, ScopeProvider): for comp_time in cond_comp.comp_times: comp_time_inst = comp_time.eval(context, last_comp) comp_insts.append(comp_time_inst) last_comp = comp_time setattr(self, f'ph_{phase}', comp_insts) break
1,232
https://:@github.com/igordejanovic/pyFlies.git
c1437ff636c345265b020ddbfae245a266372833
@@ -151,7 +151,7 @@ class ConditionsTable(ModelElement): else: cond_template.append(iter(var_exp_resolved)) else: - if has_sequences: + if should_repeat: cond_template.append(repeat(var_exp)) else: cond_template.append(iter([var_exp]))
src/textx-lang-pyflies/pyflies/lang/pyflies.py
ReplaceText(target='should_repeat' @(154,27)->(154,40))
class ConditionsTable(ModelElement): else: cond_template.append(iter(var_exp_resolved)) else: if has_sequences: cond_template.append(repeat(var_exp)) else: cond_template.append(iter([var_exp]))
class ConditionsTable(ModelElement): else: cond_template.append(iter(var_exp_resolved)) else: if should_repeat: cond_template.append(repeat(var_exp)) else: cond_template.append(iter([var_exp]))
1,233
https://:@github.com/Deeplodocus/deeplodocus.git
2c3e93e9faa91aa4b0c992409d3423300402e039
@@ -138,7 +138,7 @@ class GenericEvaluator(GenericInferer): if DEEP_ENTRY_ADDITIONAL_DATA in metric_args: temp_metric_result = metric_method(inputs, outputs, labels, additional_data) else: - temp_metric_result = metric_method(outputs, labels) + temp_metric_result = metric_method(inputs, labels) else: if DEEP_ENTRY_ADDITIONAL_DATA in metric_args: temp_metric_result = metric_method(inputs, outputs, additional_data)
deeplodocus/core/inference/generic_evaluator.py
ReplaceText(target='inputs' @(141,59)->(141,66))
class GenericEvaluator(GenericInferer): if DEEP_ENTRY_ADDITIONAL_DATA in metric_args: temp_metric_result = metric_method(inputs, outputs, labels, additional_data) else: temp_metric_result = metric_method(outputs, labels) else: if DEEP_ENTRY_ADDITIONAL_DATA in metric_args: temp_metric_result = metric_method(inputs, outputs, additional_data)
class GenericEvaluator(GenericInferer): if DEEP_ENTRY_ADDITIONAL_DATA in metric_args: temp_metric_result = metric_method(inputs, outputs, labels, additional_data) else: temp_metric_result = metric_method(inputs, labels) else: if DEEP_ENTRY_ADDITIONAL_DATA in metric_args: temp_metric_result = metric_method(inputs, outputs, additional_data)
1,234
https://:@github.com/mimba/scikit-optimize.git
f760e9c43423753fa1912c9ad7db0b4d74c36a7d
@@ -215,7 +215,7 @@ class Real(Dimension): return (self.low, self.high) def __contains__(self, point): - return self.low <= point <= self.high + return self.low <= point < self.high @property def transformed_bounds(self):
skopt/space/space.py
ReplaceText(target='<' @(218,33)->(218,35))
class Real(Dimension): return (self.low, self.high) def __contains__(self, point): return self.low <= point <= self.high @property def transformed_bounds(self):
class Real(Dimension): return (self.low, self.high) def __contains__(self, point): return self.low <= point < self.high @property def transformed_bounds(self):
1,235
https://:@github.com/mimba/scikit-optimize.git
198ddde419c281d5ed698eee0a8f5874cd30e444
@@ -227,7 +227,7 @@ class Sobol(InitialPointGenerator): for j in range(n_samples): r[j, 0:n_dim], seed = self._sobol(n_dim, seed) if self.randomize: - r = space.inverse_transform(_random_shift(r, random_state)) + r = space.inverse_transform(_random_shift(r, rng)) r = space.inverse_transform(r) space.set_transformer(transformer) return r
skopt/samples/sobol.py
ReplaceText(target='rng' @(230,57)->(230,69))
class Sobol(InitialPointGenerator): for j in range(n_samples): r[j, 0:n_dim], seed = self._sobol(n_dim, seed) if self.randomize: r = space.inverse_transform(_random_shift(r, random_state)) r = space.inverse_transform(r) space.set_transformer(transformer) return r
class Sobol(InitialPointGenerator): for j in range(n_samples): r[j, 0:n_dim], seed = self._sobol(n_dim, seed) if self.randomize: r = space.inverse_transform(_random_shift(r, rng)) r = space.inverse_transform(r) space.set_transformer(transformer) return r
1,236
https://:@github.com/biosustain/sanger-sequencing.git
5c730c6b687e3436bb2a0f3dad5d54d326de4021
@@ -110,5 +110,5 @@ def drop_missing_records( if (~sample_mask).any(): LOGGER.error( "The following sample(s) have no corresponding sequence record: " - "%s.", ", ".join(template.loc[plasmid_mask, "sample"])) + "%s.", ", ".join(template.loc[sample_mask, "sample"])) return template.loc[plasmid_mask & sample_mask, :]
src/sanger_sequencing/validation/template.py
ReplaceText(target='sample_mask' @(113,42)->(113,54))
def drop_missing_records( if (~sample_mask).any(): LOGGER.error( "The following sample(s) have no corresponding sequence record: " "%s.", ", ".join(template.loc[plasmid_mask, "sample"])) return template.loc[plasmid_mask & sample_mask, :]
def drop_missing_records( if (~sample_mask).any(): LOGGER.error( "The following sample(s) have no corresponding sequence record: " "%s.", ", ".join(template.loc[sample_mask, "sample"])) return template.loc[plasmid_mask & sample_mask, :]
1,237
https://:@github.com/KrishnaswamyLab/MAGIC.git
a9ff9b948fdb3f9754cd9b12c271b56a0deb1476
@@ -464,7 +464,7 @@ class MAGIC(BaseEstimator): if not np.all(np.isin(genes, X.columns)): warnings.warn("genes {} missing from input data".format( genes[~np.isin(genes, X.columns)])) - genes = np.argwhere(np.isin(genes, X.columns)).reshape(-1) + genes = np.argwhere(np.isin(X.columns, genes)).reshape(-1) if store_result and self.X_magic is not None: X_magic = self.X_magic
python/magic/magic.py
ArgSwap(idxs=0<->1 @(467,36)->(467,43))
class MAGIC(BaseEstimator): if not np.all(np.isin(genes, X.columns)): warnings.warn("genes {} missing from input data".format( genes[~np.isin(genes, X.columns)])) genes = np.argwhere(np.isin(genes, X.columns)).reshape(-1) if store_result and self.X_magic is not None: X_magic = self.X_magic
class MAGIC(BaseEstimator): if not np.all(np.isin(genes, X.columns)): warnings.warn("genes {} missing from input data".format( genes[~np.isin(genes, X.columns)])) genes = np.argwhere(np.isin(X.columns, genes)).reshape(-1) if store_result and self.X_magic is not None: X_magic = self.X_magic
1,238
https://:@github.com/ihgazni2/edict.git
86474307d077d0a0b19ed9e26850bddb7a8fcc14
@@ -1198,7 +1198,7 @@ def _get_rvmat(d): def map_func(ele,indexc,indexr): return(_getitem_via_pathlist(d,ele)) rvmat = elel.matrix_map(km,map_func) - rvmat = elel.prepend([],rvmat) + rvmat = elel.prepend(rvmat,[]) return(rvmat)
edict/edict.py
ArgSwap(idxs=0<->1 @(1201,12)->(1201,24))
def _get_rvmat(d): def map_func(ele,indexc,indexr): return(_getitem_via_pathlist(d,ele)) rvmat = elel.matrix_map(km,map_func) rvmat = elel.prepend([],rvmat) return(rvmat)
def _get_rvmat(d): def map_func(ele,indexc,indexr): return(_getitem_via_pathlist(d,ele)) rvmat = elel.matrix_map(km,map_func) rvmat = elel.prepend(rvmat,[]) return(rvmat)
1,239
https://:@github.com/ihgazni2/edict.git
c33c711d302b920b2534d253018e2afa38481e57
@@ -1405,7 +1405,7 @@ def _descmat_non_leaf_handler(desc,pdesc): pdesc['non_leaf_descendant_paths'] = cpnldpl pdesc['non_leaf_descendant_paths'].append(cpkpl) else: - pdesc['non_leaf_descendant_paths'].extend(cpldpl) + pdesc['non_leaf_descendant_paths'].extend(cpnldpl) pdesc['non_leaf_descendant_paths'].append(cpkpl) def _acc_sons_count(desc):
edict/edict.py
ReplaceText(target='cpnldpl' @(1408,50)->(1408,56))
def _descmat_non_leaf_handler(desc,pdesc): pdesc['non_leaf_descendant_paths'] = cpnldpl pdesc['non_leaf_descendant_paths'].append(cpkpl) else: pdesc['non_leaf_descendant_paths'].extend(cpldpl) pdesc['non_leaf_descendant_paths'].append(cpkpl) def _acc_sons_count(desc):
def _descmat_non_leaf_handler(desc,pdesc): pdesc['non_leaf_descendant_paths'] = cpnldpl pdesc['non_leaf_descendant_paths'].append(cpkpl) else: pdesc['non_leaf_descendant_paths'].extend(cpnldpl) pdesc['non_leaf_descendant_paths'].append(cpkpl) def _acc_sons_count(desc):
1,240
https://:@github.com/ihgazni2/edict.git
b27369ea4e770818dbc19f04b744b4f5db0e5185
@@ -1799,7 +1799,7 @@ def get_vndmat_attr(d,keypath,attr,**kwargs): nlocs = elel.array_map(rslt,ltree.path2loc) def cond_func(ele,kdmat): return(kdmat[ele[0]][ele[1]]['path']) - rslt = elel.array_map(rslt,cond_func,kdmat) + rslt = elel.array_map(nlocs,cond_func,kdmat) else: pass else:
edict/edict.py
ReplaceText(target='nlocs' @(1802,34)->(1802,38))
def get_vndmat_attr(d,keypath,attr,**kwargs): nlocs = elel.array_map(rslt,ltree.path2loc) def cond_func(ele,kdmat): return(kdmat[ele[0]][ele[1]]['path']) rslt = elel.array_map(rslt,cond_func,kdmat) else: pass else:
def get_vndmat_attr(d,keypath,attr,**kwargs): nlocs = elel.array_map(rslt,ltree.path2loc) def cond_func(ele,kdmat): return(kdmat[ele[0]][ele[1]]['path']) rslt = elel.array_map(nlocs,cond_func,kdmat) else: pass else:
1,241
https://:@github.com/ihgazni2/edict.git
f392badd01323d2cef4124158581b1e51eaac168
@@ -97,7 +97,7 @@ def _cond_sort(d,**kwargs): else: return(1) ntl = sorted(tl,key=functools.cmp_to_key(cmp_func),reverse=reverse) - nd = tlist2dict(tl) + nd = tlist2dict(ntl) return(nd) def _reorder_via_klist(d,nkl,**kwargs):
edict/edict.py
ReplaceText(target='ntl' @(100,20)->(100,22))
def _cond_sort(d,**kwargs): else: return(1) ntl = sorted(tl,key=functools.cmp_to_key(cmp_func),reverse=reverse) nd = tlist2dict(tl) return(nd) def _reorder_via_klist(d,nkl,**kwargs):
def _cond_sort(d,**kwargs): else: return(1) ntl = sorted(tl,key=functools.cmp_to_key(cmp_func),reverse=reverse) nd = tlist2dict(ntl) return(nd) def _reorder_via_klist(d,nkl,**kwargs):
1,242
https://:@github.com/ihgazni2/edict.git
92c0b13f1cd0db9ec146f26dbb96276d2335e2b5
@@ -2771,7 +2771,7 @@ def sub_not_algo(d,kl,**kwargs): full_kl = list(d.keys()) nnd = {} for k in full_kl: - if(not(k in nd)): + if(not(k in kl)): nnd[k] = nd[k] else: pass
edict/edict.py
ReplaceText(target='kl' @(2774,20)->(2774,22))
def sub_not_algo(d,kl,**kwargs): full_kl = list(d.keys()) nnd = {} for k in full_kl: if(not(k in nd)): nnd[k] = nd[k] else: pass
def sub_not_algo(d,kl,**kwargs): full_kl = list(d.keys()) nnd = {} for k in full_kl: if(not(k in kl)): nnd[k] = nd[k] else: pass
1,243
https://:@github.com/playpauseandstop/setman.git
daf7a569ca07add82f3fabc4575b73349532eff7
@@ -332,7 +332,7 @@ class TestUI(TestCase): ) self.assertNotContains(response, '<dt>Value:</dt>') - if not getattr(django_settings, name): + if getattr(django_settings, name): self.assertNotContains( response, '%s' % getattr(django_settings, name) )
testproject-django/testapp/tests/test_ui.py
ReplaceText(target='' @(335,15)->(335,19))
class TestUI(TestCase): ) self.assertNotContains(response, '<dt>Value:</dt>') if not getattr(django_settings, name): self.assertNotContains( response, '%s' % getattr(django_settings, name) )
class TestUI(TestCase): ) self.assertNotContains(response, '<dt>Value:</dt>') if getattr(django_settings, name): self.assertNotContains( response, '%s' % getattr(django_settings, name) )
1,244
https://:@github.com/hvidy/halophot.git
c6ad80221bded8b417be0c52a62229ebf7b9fea9
@@ -440,7 +440,7 @@ def do_lc(tpf,ts,splits,sub,order,maxiter=101,split_times=None,w_init=None,rando else: cad1.append(ts['cadence'][low]) if high is None: - cad1.append(ts['cadence'][-1]) + cad2.append(ts['cadence'][-1]) else: cad2.append(ts['cadence'][high]) sat.append(pmap["sat_pixels"])
src/halo_tools.py
ReplaceText(target='cad2' @(443,16)->(443,20))
def do_lc(tpf,ts,splits,sub,order,maxiter=101,split_times=None,w_init=None,rando else: cad1.append(ts['cadence'][low]) if high is None: cad1.append(ts['cadence'][-1]) else: cad2.append(ts['cadence'][high]) sat.append(pmap["sat_pixels"])
def do_lc(tpf,ts,splits,sub,order,maxiter=101,split_times=None,w_init=None,rando else: cad1.append(ts['cadence'][low]) if high is None: cad2.append(ts['cadence'][-1]) else: cad2.append(ts['cadence'][high]) sat.append(pmap["sat_pixels"])
1,245
https://:@gitlab.com/nicolas.hainaux/mathmakerlib.git
1995fab6610ba450545cc21879259415710e0255
@@ -102,7 +102,7 @@ class LineSegment(Drawable, HasThickness, PointsPair): else: self.label_position = 'above' elif label_position == 'clockwise': - if self.deltax > 0: + if self.deltax >= 0: self.label_position = 'above' else: self.label_position = 'below'
mathmakerlib/geometry/linesegment.py
ReplaceText(target='>=' @(105,27)->(105,28))
class LineSegment(Drawable, HasThickness, PointsPair): else: self.label_position = 'above' elif label_position == 'clockwise': if self.deltax > 0: self.label_position = 'above' else: self.label_position = 'below'
class LineSegment(Drawable, HasThickness, PointsPair): else: self.label_position = 'above' elif label_position == 'clockwise': if self.deltax >= 0: self.label_position = 'above' else: self.label_position = 'below'
1,246
https://:@github.com/ecohydro/CropMask_RCNN.git
8a09a75073fd96df996f62bef98f8af9380e2aea
@@ -694,7 +694,7 @@ def compute_matches(gt_boxes, gt_class_ids, gt_masks, # 3. Find the match for j in sorted_ixs: # If ground truth box is already matched, go to next one - if gt_match[j] > 0: + if gt_match[j] > -1: continue # If we reach IoU smaller than the threshold, end the loop iou = overlaps[i, j]
mrcnn/utils.py
ReplaceText(target='-1' @(697,29)->(697,30))
def compute_matches(gt_boxes, gt_class_ids, gt_masks, # 3. Find the match for j in sorted_ixs: # If ground truth box is already matched, go to next one if gt_match[j] > 0: continue # If we reach IoU smaller than the threshold, end the loop iou = overlaps[i, j]
def compute_matches(gt_boxes, gt_class_ids, gt_masks, # 3. Find the match for j in sorted_ixs: # If ground truth box is already matched, go to next one if gt_match[j] > -1: continue # If we reach IoU smaller than the threshold, end the loop iou = overlaps[i, j]
1,247
https://:@github.com/matteomattei/PySquashfsImage.git
7ca480b91e2f1056d14ddc59e5d30d9f94ef4a80
@@ -923,7 +923,7 @@ class SquashFsImage(_Squashfs_commons): index_bytes = SQUASHFS_XATTR_BLOCK_BYTES(ids) indexes = SQUASHFS_XATTR_BLOCKS(ids) index = [] - for r in range(0,ids): + for r in range(0,indexes): index.append( self.makeInteger(myfile,SQUASHFS_XATTR_BLOCK_BYTES(1)) ) bytes = SQUASHFS_XATTR_BYTES(ids) xattr_ids = {}
PySquashfsImage/PySquashfsImage.py
ReplaceText(target='indexes' @(926,19)->(926,22))
class SquashFsImage(_Squashfs_commons): index_bytes = SQUASHFS_XATTR_BLOCK_BYTES(ids) indexes = SQUASHFS_XATTR_BLOCKS(ids) index = [] for r in range(0,ids): index.append( self.makeInteger(myfile,SQUASHFS_XATTR_BLOCK_BYTES(1)) ) bytes = SQUASHFS_XATTR_BYTES(ids) xattr_ids = {}
class SquashFsImage(_Squashfs_commons): index_bytes = SQUASHFS_XATTR_BLOCK_BYTES(ids) indexes = SQUASHFS_XATTR_BLOCKS(ids) index = [] for r in range(0,indexes): index.append( self.makeInteger(myfile,SQUASHFS_XATTR_BLOCK_BYTES(1)) ) bytes = SQUASHFS_XATTR_BYTES(ids) xattr_ids = {}
1,248
https://:@github.com/CFPB/django-nudge.git
4c69de668bd9a2ba96c639c252f555bea9ec2d34
@@ -55,7 +55,7 @@ def process_batch(key, batch_info, iv): success = True for item in items: item.save() - if isinstance(Version, item.object): + if isinstance(item.object, Version): version = item.object if version.type == VERSION_DELETE: if version.object:
src/nudge/server.py
ArgSwap(idxs=0<->1 @(58,15)->(58,25))
def process_batch(key, batch_info, iv): success = True for item in items: item.save() if isinstance(Version, item.object): version = item.object if version.type == VERSION_DELETE: if version.object:
def process_batch(key, batch_info, iv): success = True for item in items: item.save() if isinstance(item.object, Version): version = item.object if version.type == VERSION_DELETE: if version.object:
1,249
https://:@github.com/terminusdb/terminus-client-python.git
4e688ba70754dbe47b72232c720cf1100e6abea6
@@ -422,7 +422,7 @@ class WOQLCore: def _clean_class(self, user_class, string_only=None): if type(user_class) != str: return "" - if ":" in user_class: + if ":" not in user_class: if self._vocab and (user_class in self._vocab): user_class = self._vocab[user_class] else:
terminusdb_client/woqlquery/woql_core.py
ReplaceText(target=' not in ' @(425,14)->(425,18))
class WOQLCore: def _clean_class(self, user_class, string_only=None): if type(user_class) != str: return "" if ":" in user_class: if self._vocab and (user_class in self._vocab): user_class = self._vocab[user_class] else:
class WOQLCore: def _clean_class(self, user_class, string_only=None): if type(user_class) != str: return "" if ":" not in user_class: if self._vocab and (user_class in self._vocab): user_class = self._vocab[user_class] else:
1,250
https://:@github.com/terminusdb/terminus-client-python.git
a8cb21f0481e248f02f895a7d0c16917f82fcd5d
@@ -688,7 +688,7 @@ class WOQLClient: request_file_dict[name] = (name, open(path, "rb"), "application/binary") payload = None else: - file_dict = None + request_file_dict = None payload = query_obj return self.dispatch(
terminusdb_client/woqlclient/woqlClient.py
ReplaceText(target='request_file_dict' @(691,12)->(691,21))
class WOQLClient: request_file_dict[name] = (name, open(path, "rb"), "application/binary") payload = None else: file_dict = None payload = query_obj return self.dispatch(
class WOQLClient: request_file_dict[name] = (name, open(path, "rb"), "application/binary") payload = None else: request_file_dict = None payload = query_obj return self.dispatch(
1,251
https://:@github.com/dnarvaez/osbuild.git
bd6517e635b15c77fa5c158e199cdb99139bf41e
@@ -70,7 +70,7 @@ def system_check_touch(): def full_build_is_required(): full_build = _load_state(_FULL_BUILD) if not full_build: - return True + return False return not (full_build["last"] == config.get_full_build())
osbuild/state.py
ReplaceText(target='False' @(73,15)->(73,19))
def system_check_touch(): def full_build_is_required(): full_build = _load_state(_FULL_BUILD) if not full_build: return True return not (full_build["last"] == config.get_full_build())
def system_check_touch(): def full_build_is_required(): full_build = _load_state(_FULL_BUILD) if not full_build: return False return not (full_build["last"] == config.get_full_build())
1,252
https://:@github.com/mwouts/easyplotly.git
687645cc6bb61a16c63259a696fe535059f91665
@@ -35,7 +35,7 @@ def sunburst_or_treemap(values, root_label=None, branchvalues='total', **kwargs) for item in org_tree: if isinstance(item, tuple): - value = values[item] + value = org_tree[item] if value < 0: raise ValueError('Negative value {} for {}'.format(value, item))
easyplotly/internals.py
ReplaceText(target='org_tree' @(38,20)->(38,26))
def sunburst_or_treemap(values, root_label=None, branchvalues='total', **kwargs) for item in org_tree: if isinstance(item, tuple): value = values[item] if value < 0: raise ValueError('Negative value {} for {}'.format(value, item))
def sunburst_or_treemap(values, root_label=None, branchvalues='total', **kwargs) for item in org_tree: if isinstance(item, tuple): value = org_tree[item] if value < 0: raise ValueError('Negative value {} for {}'.format(value, item))
1,253
https://:@github.com/affinitic/collective.registration.git
9f740984c7d0206ea21321a37b1ba233003b7423
@@ -31,6 +31,6 @@ class SubscriberView(BrowserView): def available_places_validator(self, context, request, value): registration = context.getParentNode().getParentNode() period = registration.get(request.form.get('period')) - if int(value) < period.available_places: + if int(value) <= period.available_places: return False return _('Not enough places left in the selected period')
src/collective/registration/browser/subscriber.py
ReplaceText(target='<=' @(34,22)->(34,23))
class SubscriberView(BrowserView): def available_places_validator(self, context, request, value): registration = context.getParentNode().getParentNode() period = registration.get(request.form.get('period')) if int(value) < period.available_places: return False return _('Not enough places left in the selected period')
class SubscriberView(BrowserView): def available_places_validator(self, context, request, value): registration = context.getParentNode().getParentNode() period = registration.get(request.form.get('period')) if int(value) <= period.available_places: return False return _('Not enough places left in the selected period')
1,254
https://:@github.com/alisaifee/pyutrack.git
620d59b82e8a5c98fd4568217c74b485f802ac94
@@ -17,4 +17,4 @@ class AuthenticationTests(IntegrationTest): credentials=Credentials(username='root', password='rooted'), base_url='http://localhost:9876' ) - self.assertRaises(connection.login, LoginError) + self.assertRaises(LoginError, connection.login)
tests/integration/test_authentication.py
ArgSwap(idxs=0<->1 @(20,8)->(20,25))
class AuthenticationTests(IntegrationTest): credentials=Credentials(username='root', password='rooted'), base_url='http://localhost:9876' ) self.assertRaises(connection.login, LoginError)
class AuthenticationTests(IntegrationTest): credentials=Credentials(username='root', password='rooted'), base_url='http://localhost:9876' ) self.assertRaises(LoginError, connection.login)
1,255
https://:@github.com/angelolovatto/gym-cartpole-swingup.git
d31a62df97b07609f86358d3e25e70e623797995
@@ -33,7 +33,7 @@ class TorchCartPoleSwingUpEnv(CartPoleSwingUpEnv): def terminal(self, state): """Return a batched tensor indicating which states are terminal.""" - return (state[..., 0] < -self.params.x_threshold) & ( + return (state[..., 0] < -self.params.x_threshold) | ( state[..., 0] > self.params.x_threshold )
gym_cartpole_swingup/envs/torch_cartpole_swingup.py
ReplaceText(target='|' @(36,58)->(36,59))
class TorchCartPoleSwingUpEnv(CartPoleSwingUpEnv): def terminal(self, state): """Return a batched tensor indicating which states are terminal.""" return (state[..., 0] < -self.params.x_threshold) & ( state[..., 0] > self.params.x_threshold )
class TorchCartPoleSwingUpEnv(CartPoleSwingUpEnv): def terminal(self, state): """Return a batched tensor indicating which states are terminal.""" return (state[..., 0] < -self.params.x_threshold) | ( state[..., 0] > self.params.x_threshold )
1,256
https://:@github.com/shubhamjain0594/opalalgorithms.git
42258ea2348e9a624ab5deac7a334bab7656f565
@@ -29,7 +29,7 @@ class PrivacyAlgorithmRunner(object): Return: dict: Privacy ensured dictionary """ - result = self.algorithm(result, self.params, self.salt) + result = self.algorithm(self.params, result, self.salt) if self._validate_result(result): return result return {}
opalalgorithms/utils/privacyrunner.py
ArgSwap(idxs=0<->1 @(32,17)->(32,31))
class PrivacyAlgorithmRunner(object): Return: dict: Privacy ensured dictionary """ result = self.algorithm(result, self.params, self.salt) if self._validate_result(result): return result return {}
class PrivacyAlgorithmRunner(object): Return: dict: Privacy ensured dictionary """ result = self.algorithm(self.params, result, self.salt) if self._validate_result(result): return result return {}
1,257
https://:@github.com/rcook/ibt.git
f32b4fadfb4b9a1416864d7cc05ec867128a32d4
@@ -54,7 +54,7 @@ class UpCommand(Command): subprocess.check_call(["/bin/sh", temp_path]) if args.destroy: - docker_image_remove(ctx.image_id) + docker_image_remove(project.image_id) with temp_dir() as dir: if docker_image is None:
ibtimpl/up_command.py
ReplaceText(target='project' @(57,32)->(57,35))
class UpCommand(Command): subprocess.check_call(["/bin/sh", temp_path]) if args.destroy: docker_image_remove(ctx.image_id) with temp_dir() as dir: if docker_image is None:
class UpCommand(Command): subprocess.check_call(["/bin/sh", temp_path]) if args.destroy: docker_image_remove(project.image_id) with temp_dir() as dir: if docker_image is None:
1,258
https://:@github.com/MasterOdin/nullsmtp.git
f945b842e6f849834a020af87ad8293de7124451
@@ -38,7 +38,7 @@ class NullSMTP(smtpd.SMTPServer): smtpd.SMTPServer.__init__(self, localaddr, None) self.logger = get_logger() - if mail_dir is None or isinstance(mail_dir, str): + if mail_dir is None or not isinstance(mail_dir, str): msg = "Invalid mail_dir variable: {}".format(mail_dir) self.logger.error(msg) raise SystemExit(msg)
nullsmtp/nullsmtp.py
ReplaceText(target='not ' @(41,31)->(41,31))
class NullSMTP(smtpd.SMTPServer): smtpd.SMTPServer.__init__(self, localaddr, None) self.logger = get_logger() if mail_dir is None or isinstance(mail_dir, str): msg = "Invalid mail_dir variable: {}".format(mail_dir) self.logger.error(msg) raise SystemExit(msg)
class NullSMTP(smtpd.SMTPServer): smtpd.SMTPServer.__init__(self, localaddr, None) self.logger = get_logger() if mail_dir is None or not isinstance(mail_dir, str): msg = "Invalid mail_dir variable: {}".format(mail_dir) self.logger.error(msg) raise SystemExit(msg)
1,259
https://:@github.com/ddbeck/oraide.git
2139a3d8eb3de615d3eea3435f9e715b15b82e93
@@ -27,7 +27,7 @@ def assert_after_timeout(fn, timeout_duration=2.0): try: return fn() except AssertionError: - if time.time() < timeout: + if time.time() > timeout: raise return wrapper
oraide/tests.py
ReplaceText(target='>' @(30,31)->(30,32))
def assert_after_timeout(fn, timeout_duration=2.0): try: return fn() except AssertionError: if time.time() < timeout: raise return wrapper
def assert_after_timeout(fn, timeout_duration=2.0): try: return fn() except AssertionError: if time.time() > timeout: raise return wrapper
1,260
https://:@github.com/thespacedoctor/marshallEngine.git
c2aa68840d770ad66caaa775d4497bc72dd6b3c5
@@ -101,7 +101,7 @@ class data(object): print('HTTP Request failed') sys.exit(0) - if status_code != 502: + if status_code == 502: print('HTTP Request failed - status %(status_code)s' % locals()) print(url) self.csvDicts = []
marshallEngine/feeders/data.py
ReplaceText(target='==' @(104,23)->(104,25))
class data(object): print('HTTP Request failed') sys.exit(0) if status_code != 502: print('HTTP Request failed - status %(status_code)s' % locals()) print(url) self.csvDicts = []
class data(object): print('HTTP Request failed') sys.exit(0) if status_code == 502: print('HTTP Request failed - status %(status_code)s' % locals()) print(url) self.csvDicts = []
1,261
https://:@github.com/JoshLee0915/youtrack-rest-python-library.git
0695b2e31750184cf7fa301821f3d4d050a90820
@@ -154,7 +154,7 @@ class Issue(YouTrackObject): if getattr(self, 'links', None) is None: return self.youtrack.getLinks(self.id, outwardOnly) else: - return [l for l in self.links if l.source != self.id or not outwardOnly] + return [l for l in self.links if l.source == self.id or not outwardOnly] class Comment(YouTrackObject):
python/youtrack/__init__.py
ReplaceText(target='==' @(157,54)->(157,56))
class Issue(YouTrackObject): if getattr(self, 'links', None) is None: return self.youtrack.getLinks(self.id, outwardOnly) else: return [l for l in self.links if l.source != self.id or not outwardOnly] class Comment(YouTrackObject):
class Issue(YouTrackObject): if getattr(self, 'links', None) is None: return self.youtrack.getLinks(self.id, outwardOnly) else: return [l for l in self.links if l.source == self.id or not outwardOnly] class Comment(YouTrackObject):
1,262
https://:@github.com/JoshLee0915/youtrack-rest-python-library.git
7e5d1b3d6ad8e12ae2ef0791e4afcff9b3865fd3
@@ -77,7 +77,7 @@ class YouTrackImporter(object): [self._to_yt_issue(issue, project_id) for issue in issues]) for issue in issues: issue_id = self._get_issue_id(issue) - issue_attachments = self._get_attachments(issue_id) + issue_attachments = self._get_attachments(issue) yt_issue_id = u'%s-%s' % (project_id, issue_id) self._import_attachments(yt_issue_id, issue_attachments)
python/youtrackImporter.py
ReplaceText(target='issue' @(80,58)->(80,66))
class YouTrackImporter(object): [self._to_yt_issue(issue, project_id) for issue in issues]) for issue in issues: issue_id = self._get_issue_id(issue) issue_attachments = self._get_attachments(issue_id) yt_issue_id = u'%s-%s' % (project_id, issue_id) self._import_attachments(yt_issue_id, issue_attachments)
class YouTrackImporter(object): [self._to_yt_issue(issue, project_id) for issue in issues]) for issue in issues: issue_id = self._get_issue_id(issue) issue_attachments = self._get_attachments(issue) yt_issue_id = u'%s-%s' % (project_id, issue_id) self._import_attachments(yt_issue_id, issue_attachments)
1,263
https://:@github.com/bird-house/malleefowl.git
279479a4cba930e14803ea4a748faa57d884399f
@@ -52,5 +52,5 @@ class ThreddsDownload(Process): with open('out.json', 'w') as fp: json.dump(obj=files, fp=fp, indent=4, sort_keys=True) - request.outputs['outputs'].file = fp.name + response.outputs['outputs'].file = fp.name return response
malleefowl/processes/wps_thredds.py
ReplaceText(target='response' @(55,12)->(55,19))
class ThreddsDownload(Process): with open('out.json', 'w') as fp: json.dump(obj=files, fp=fp, indent=4, sort_keys=True) request.outputs['outputs'].file = fp.name return response
class ThreddsDownload(Process): with open('out.json', 'w') as fp: json.dump(obj=files, fp=fp, indent=4, sort_keys=True) response.outputs['outputs'].file = fp.name return response
1,264
https://:@github.com/jeremiedecock/mrif.git
51ea19f5d8cec9f4759eb8079dc4c01295719577
@@ -228,7 +228,7 @@ class AbstractCleaningAlgorithm(object): image_dict["img_cleaned_max_pe"] = float(np.nanmax(cleaned_img)) image_dict["img_cleaned_num_pix"] = int( (cleaned_img[np.isfinite(cleaned_img)] > 0).sum() ) - cleaned_img1d = geometry_converter.image_2d_to_1d(reference_img, fits_metadata_dict['cam_id']) + cleaned_img1d = geometry_converter.image_2d_to_1d(cleaned_img, fits_metadata_dict['cam_id']) hillas_params_2_cleaned_img = get_hillas_parameters(geom1d, cleaned_img1d, HILLAS_IMPLEMENTATION) # GEOM image_dict["img_cleaned_hillas_2_size"] = float(hillas_params_2_cleaned_img.size)
datapipe/denoising/abstract_cleaning_algorithm.py
ReplaceText(target='cleaned_img' @(231,74)->(231,87))
class AbstractCleaningAlgorithm(object): image_dict["img_cleaned_max_pe"] = float(np.nanmax(cleaned_img)) image_dict["img_cleaned_num_pix"] = int( (cleaned_img[np.isfinite(cleaned_img)] > 0).sum() ) cleaned_img1d = geometry_converter.image_2d_to_1d(reference_img, fits_metadata_dict['cam_id']) hillas_params_2_cleaned_img = get_hillas_parameters(geom1d, cleaned_img1d, HILLAS_IMPLEMENTATION) # GEOM image_dict["img_cleaned_hillas_2_size"] = float(hillas_params_2_cleaned_img.size)
class AbstractCleaningAlgorithm(object): image_dict["img_cleaned_max_pe"] = float(np.nanmax(cleaned_img)) image_dict["img_cleaned_num_pix"] = int( (cleaned_img[np.isfinite(cleaned_img)] > 0).sum() ) cleaned_img1d = geometry_converter.image_2d_to_1d(cleaned_img, fits_metadata_dict['cam_id']) hillas_params_2_cleaned_img = get_hillas_parameters(geom1d, cleaned_img1d, HILLAS_IMPLEMENTATION) # GEOM image_dict["img_cleaned_hillas_2_size"] = float(hillas_params_2_cleaned_img.size)
1,265
https://:@github.com/dsbowen/hemlock.git
4fb5980272b7827170bf66d1a405354e50b5deab
@@ -35,7 +35,7 @@ def Start(): Choice(q, '2', value=2) p = Page(b) - q = Question(b, 'Where do you shop?', qtype='free', var='shop') + q = Question(p, 'Where do you shop?', qtype='free', var='shop') p = Page(b, terminal=True) q = Question(p, "<p>Thank you for participating!</p>")
survey.py
ReplaceText(target='p' @(38,17)->(38,18))
def Start(): Choice(q, '2', value=2) p = Page(b) q = Question(b, 'Where do you shop?', qtype='free', var='shop') p = Page(b, terminal=True) q = Question(p, "<p>Thank you for participating!</p>")
def Start(): Choice(q, '2', value=2) p = Page(b) q = Question(p, 'Where do you shop?', qtype='free', var='shop') p = Page(b, terminal=True) q = Question(p, "<p>Thank you for participating!</p>")
1,266
https://:@github.com/dsbowen/hemlock.git
314a07abb5445aaf7433ef26bfd0cbe7e576018d
@@ -128,7 +128,7 @@ def _verify_data(check, last_instr_page, curr_attempt, attempts): attempts : int or None Maximum number of attempts. """ - if all(q.data for q in check.questions) or curr_attempt == attempts: + if all(q.data for q in check.questions) or curr_attempt >= attempts: if check != check.branch.pages[-1]: # this check does not have to be repeated last_instr_page.forward_to = check.branch.pages[check.index+1]
hemlock/tools/comprehension.py
ReplaceText(target='>=' @(131,60)->(131,62))
def _verify_data(check, last_instr_page, curr_attempt, attempts): attempts : int or None Maximum number of attempts. """ if all(q.data for q in check.questions) or curr_attempt == attempts: if check != check.branch.pages[-1]: # this check does not have to be repeated last_instr_page.forward_to = check.branch.pages[check.index+1]
def _verify_data(check, last_instr_page, curr_attempt, attempts): attempts : int or None Maximum number of attempts. """ if all(q.data for q in check.questions) or curr_attempt >= attempts: if check != check.branch.pages[-1]: # this check does not have to be repeated last_instr_page.forward_to = check.branch.pages[check.index+1]
1,267
https://:@github.com/cartlogic/manhattan.git
4be7aa9c741a051e82e2c11a16af9ddc8758554f
@@ -49,5 +49,5 @@ def truncate_recent(max_records): offset(max_records) delete_before = q.scalar() if delete_before: - q = t.delete().where(t.c.last_timestamp >= delete_before) + q = t.delete().where(t.c.last_timestamp < delete_before) meta.Session.execute(q)
manhattan/backends/sql/model/recent.py
ReplaceText(target='<' @(52,48)->(52,50))
def truncate_recent(max_records): offset(max_records) delete_before = q.scalar() if delete_before: q = t.delete().where(t.c.last_timestamp >= delete_before) meta.Session.execute(q)
def truncate_recent(max_records): offset(max_records) delete_before = q.scalar() if delete_before: q = t.delete().where(t.c.last_timestamp < delete_before) meta.Session.execute(q)
1,268
https://:@github.com/patryk4815/PySteamWeb.git
77176388a1673364d9a2b11018b6508db603d445
@@ -52,7 +52,7 @@ class SteamTrade(SteamWebBase): def get_parse_trade_url(cls, trade_url): regex = re.compile(r'^https?://steamcommunity\.com/tradeoffer/new/\?partner=(\d+)&token=([a-zA-Z0-9_-]+)$') match = regex.match(trade_url) - if match: + if not match: return None return {
pysteamweb/plugins/trade.py
ReplaceText(target='not ' @(55,11)->(55,11))
class SteamTrade(SteamWebBase): def get_parse_trade_url(cls, trade_url): regex = re.compile(r'^https?://steamcommunity\.com/tradeoffer/new/\?partner=(\d+)&token=([a-zA-Z0-9_-]+)$') match = regex.match(trade_url) if match: return None return {
class SteamTrade(SteamWebBase): def get_parse_trade_url(cls, trade_url): regex = re.compile(r'^https?://steamcommunity\.com/tradeoffer/new/\?partner=(\d+)&token=([a-zA-Z0-9_-]+)$') match = regex.match(trade_url) if not match: return None return {
1,269
https://:@github.com/reidmcy/uchicago-pyanno.git
f23229e9f63648d04ba10b6fea310742f0fc52b3
@@ -11,5 +11,5 @@ def is_display_small(): size = wx.GetDisplaySize() if size is not None: w, h = size - return w < 1300 and h < 850 + return w < 1300 or h < 850 return False
pyanno/ui/appbase/wx_utils.py
ReplaceText(target='or' @(14,24)->(14,27))
def is_display_small(): size = wx.GetDisplaySize() if size is not None: w, h = size return w < 1300 and h < 850 return False
def is_display_small(): size = wx.GetDisplaySize() if size is not None: w, h = size return w < 1300 or h < 850 return False
1,270
https://:@github.com/hbradleyiii/nwid.git
86c3d7b9c0b6f35f3310250c0ddc690d3280e023
@@ -55,7 +55,7 @@ class TerminalString(object): self.escape_markers = [] for index, char in enumerate(self.string): # Mark the stop of an escape sequence - if sequence_start is None and char in string.letters: + if sequence_start is not None and char in string.letters: self.escape_markers.append(EscapeMarker(sequence_start, index)) sequence_start = None # Reset start sequence
nwid/terminal/terminal_string.py
ReplaceText(target=' is not ' @(58,29)->(58,33))
class TerminalString(object): self.escape_markers = [] for index, char in enumerate(self.string): # Mark the stop of an escape sequence if sequence_start is None and char in string.letters: self.escape_markers.append(EscapeMarker(sequence_start, index)) sequence_start = None # Reset start sequence
class TerminalString(object): self.escape_markers = [] for index, char in enumerate(self.string): # Mark the stop of an escape sequence if sequence_start is not None and char in string.letters: self.escape_markers.append(EscapeMarker(sequence_start, index)) sequence_start = None # Reset start sequence
1,271
https://:@gitlab.com/metapensiero/metapensiero.sqlalchemy.asyncpg.git
107f9fec1716ab99d5deee8deec1e6c92f9ed40c
@@ -34,7 +34,7 @@ def compile(stmt, pos_args=None, named_args=None, _d=PGDialect_asyncpg()): """ if isinstance(stmt, str): - return stmt, tuple(pos_args) if pos_args is None else () + return stmt, tuple(pos_args) if pos_args is not None else () else: compiled = stmt.compile(dialect=_d) params = compiled.construct_params(named_args)
src/arstecnica/ytefas/asyncpg/__init__.py
ReplaceText(target=' is not ' @(37,48)->(37,52))
def compile(stmt, pos_args=None, named_args=None, _d=PGDialect_asyncpg()): """ if isinstance(stmt, str): return stmt, tuple(pos_args) if pos_args is None else () else: compiled = stmt.compile(dialect=_d) params = compiled.construct_params(named_args)
def compile(stmt, pos_args=None, named_args=None, _d=PGDialect_asyncpg()): """ if isinstance(stmt, str): return stmt, tuple(pos_args) if pos_args is not None else () else: compiled = stmt.compile(dialect=_d) params = compiled.construct_params(named_args)
1,272
https://:@github.com/CMU-ARM/alloy.git
04200226608ac01de2e5fa0778da0b6ec2a34f79
@@ -52,7 +52,7 @@ class PrioritySearchQueue(SearchQueue): def update(self, obj, **kwargs): for h in self._pheap: if h[1] == obj: - self._pheap.remove(obj) + self._pheap.remove(h) break heapq.heappush(self._pheap, (kwargs['cost'], obj))
alloy/algo/graph_search.py
ReplaceText(target='h' @(55,35)->(55,38))
class PrioritySearchQueue(SearchQueue): def update(self, obj, **kwargs): for h in self._pheap: if h[1] == obj: self._pheap.remove(obj) break heapq.heappush(self._pheap, (kwargs['cost'], obj))
class PrioritySearchQueue(SearchQueue): def update(self, obj, **kwargs): for h in self._pheap: if h[1] == obj: self._pheap.remove(h) break heapq.heappush(self._pheap, (kwargs['cost'], obj))
1,273
https://:@github.com/pombredanne/schematics.git
8fad1ee655244b3e6cf24a4b4236d414075498ca
@@ -47,7 +47,7 @@ def apply_shape(cls, model_or_dict, field_converter, model_converter, model_dict[serialized_name] = model_converter(field_value) ### Convert field as list of models - elif isinstance(field_name, list) and len(field_value) > 0: + elif isinstance(field_value, list) and len(field_value) > 0: if isinstance(field_value[0], Model): model_dict[serialized_name] = [model_converter(vi) for vi in field_value]
schematics/serialize.py
ReplaceText(target='field_value' @(50,24)->(50,34))
def apply_shape(cls, model_or_dict, field_converter, model_converter, model_dict[serialized_name] = model_converter(field_value) ### Convert field as list of models elif isinstance(field_name, list) and len(field_value) > 0: if isinstance(field_value[0], Model): model_dict[serialized_name] = [model_converter(vi) for vi in field_value]
def apply_shape(cls, model_or_dict, field_converter, model_converter, model_dict[serialized_name] = model_converter(field_value) ### Convert field as list of models elif isinstance(field_value, list) and len(field_value) > 0: if isinstance(field_value[0], Model): model_dict[serialized_name] = [model_converter(vi) for vi in field_value]
1,274
https://:@github.com/Hedgehogues/python-clients.git
e4e905beb5cc095f6c2a3d0d0ffec5dda5c6fd68
@@ -68,7 +68,7 @@ class Client: else: r = requests.get(url=url, params=method.params, headers=method.headers, proxies=self.proxies, auth=auth_) elif m_type == 'FILE': - assert method.files is None, 'For FILE attribute file must not be empty' + assert method.files is not None, 'For FILE attribute file must not be empty' if self.proxies is not None: r = requests.post(url=url, params=method.params, data=method.body, headers=method.headers, auth=auth_, files=method.files)
clients/http.py
ReplaceText(target=' is not ' @(71,31)->(71,35))
class Client: else: r = requests.get(url=url, params=method.params, headers=method.headers, proxies=self.proxies, auth=auth_) elif m_type == 'FILE': assert method.files is None, 'For FILE attribute file must not be empty' if self.proxies is not None: r = requests.post(url=url, params=method.params, data=method.body, headers=method.headers, auth=auth_, files=method.files)
class Client: else: r = requests.get(url=url, params=method.params, headers=method.headers, proxies=self.proxies, auth=auth_) elif m_type == 'FILE': assert method.files is not None, 'For FILE attribute file must not be empty' if self.proxies is not None: r = requests.post(url=url, params=method.params, data=method.body, headers=method.headers, auth=auth_, files=method.files)
1,275
https://:@github.com/pbrisk/businessdate.git
c5359efe862021fe445ef048ac52a30b527cce83
@@ -116,7 +116,7 @@ class BusinessPeriod(object): def _parse_ymd(cls, period): # can even parse strings like '-1B-2Y-4Q+5M' but also '0B', '-1Y2M3D' as well. def _parse(p, letter): - if p.find(letter) > 0: + if p.find(letter) >= 0: s, p = p.split(letter, 1) s = s[1:] if s.startswith('+') else s sgn, s = (-1, s[1:]) if s.startswith('-') else (1, s)
businessdate/businessperiod.py
ReplaceText(target='>=' @(119,30)->(119,31))
class BusinessPeriod(object): def _parse_ymd(cls, period): # can even parse strings like '-1B-2Y-4Q+5M' but also '0B', '-1Y2M3D' as well. def _parse(p, letter): if p.find(letter) > 0: s, p = p.split(letter, 1) s = s[1:] if s.startswith('+') else s sgn, s = (-1, s[1:]) if s.startswith('-') else (1, s)
class BusinessPeriod(object): def _parse_ymd(cls, period): # can even parse strings like '-1B-2Y-4Q+5M' but also '0B', '-1Y2M3D' as well. def _parse(p, letter): if p.find(letter) >= 0: s, p = p.split(letter, 1) s = s[1:] if s.startswith('+') else s sgn, s = (-1, s[1:]) if s.startswith('-') else (1, s)
1,276
https://:@github.com/GenesisCoast/conditions-py.git
c6326f3fc1805eddc80f4556e786523bf6725ffd
@@ -306,7 +306,7 @@ class StringValidator(Validator): """ Checks whether the given value does not match the supplied `pattern`. An exception is thrown otherwise. """ - if not RegexHelper.is_match(pattern, self.value): + if RegexHelper.is_match(pattern, self.value): raise ArgumentPatternError( f'The argument `{self.argument_name}` should match the pattern `{pattern}`', self.value,
src/validators/string_validator.py
ReplaceText(target='' @(309,11)->(309,15))
class StringValidator(Validator): """ Checks whether the given value does not match the supplied `pattern`. An exception is thrown otherwise. """ if not RegexHelper.is_match(pattern, self.value): raise ArgumentPatternError( f'The argument `{self.argument_name}` should match the pattern `{pattern}`', self.value,
class StringValidator(Validator): """ Checks whether the given value does not match the supplied `pattern`. An exception is thrown otherwise. """ if RegexHelper.is_match(pattern, self.value): raise ArgumentPatternError( f'The argument `{self.argument_name}` should match the pattern `{pattern}`', self.value,
1,277
https://:@github.com/aperezdc/omni.git
5755dd751e818fcb78235a0c1a17a4d654d0cb6e
@@ -304,7 +304,7 @@ def authenticate(get_realm, realm_param="realm"): if request.authorization: password = b64decode(request.authorization[1]) username, password = password.decode("utf-8").split(":", 1) - if username is None or realm.authenticate(username, password): + if username is None or not realm.authenticate(username, password): raise HTTPUnauthorized(headers=[ ("WWW-Authenticate", "Basic realm=\"{}\"".format(realm.description)),
omni/web/routing.py
ReplaceText(target='not ' @(307,35)->(307,35))
def authenticate(get_realm, realm_param="realm"): if request.authorization: password = b64decode(request.authorization[1]) username, password = password.decode("utf-8").split(":", 1) if username is None or realm.authenticate(username, password): raise HTTPUnauthorized(headers=[ ("WWW-Authenticate", "Basic realm=\"{}\"".format(realm.description)),
def authenticate(get_realm, realm_param="realm"): if request.authorization: password = b64decode(request.authorization[1]) username, password = password.decode("utf-8").split(":", 1) if username is None or not realm.authenticate(username, password): raise HTTPUnauthorized(headers=[ ("WWW-Authenticate", "Basic realm=\"{}\"".format(realm.description)),
1,278
https://:@github.com/nectar-cs/k8-kat.git
5dceaae2ba32d6053cbf8c416b684241f8ed9d96
@@ -66,7 +66,7 @@ def get_deployment_pods(deployment): restarts = None age = None - if returned_pod.status.container_statuses is not None and len(returned_pod.status.container_statuses) < 0: + if returned_pod.status.container_statuses is not None and len(returned_pod.status.container_statuses) > 0: first_container = returned_pod.status.container_statuses[0] restarts = first_container.restart_count age = first_container.restart_count
kube_pod.py
ReplaceText(target='>' @(69,110)->(69,111))
def get_deployment_pods(deployment): restarts = None age = None if returned_pod.status.container_statuses is not None and len(returned_pod.status.container_statuses) < 0: first_container = returned_pod.status.container_statuses[0] restarts = first_container.restart_count age = first_container.restart_count
def get_deployment_pods(deployment): restarts = None age = None if returned_pod.status.container_statuses is not None and len(returned_pod.status.container_statuses) > 0: first_container = returned_pod.status.container_statuses[0] restarts = first_container.restart_count age = first_container.restart_count
1,279
https://:@github.com/nectar-cs/k8-kat.git
b27ef1a95763299653425c8968aa08d2f59b254e
@@ -40,7 +40,7 @@ class StuntPod: return self._image def find(self): - return PodHelper.find(self.pod_name, self.namespace) + return PodHelper.find(self.namespace, self.pod_name) def labels(self): return {"nectar-type": "stunt-pod"}
stunt_pods/stunt_pod.py
ArgSwap(idxs=0<->1 @(43,11)->(43,25))
class StuntPod: return self._image def find(self): return PodHelper.find(self.pod_name, self.namespace) def labels(self): return {"nectar-type": "stunt-pod"}
class StuntPod: return self._image def find(self): return PodHelper.find(self.namespace, self.pod_name) def labels(self): return {"nectar-type": "stunt-pod"}
1,280
https://:@github.com/nectar-cs/k8-kat.git
8a2f45982919c69bc709aa14a16c7a402dcafd4b
@@ -26,6 +26,6 @@ class KatServiceAccount(KatRes): def secrets(self) -> List[any]: from k8_kat.res.secret.kat_secret import KatSecret - make = lambda sd: KatSecret.find(sd.namespace or self.ns, sd.name) + make = lambda sd: KatSecret.find(sd.name, sd.namespace or self.ns) secret_descriptors = self.body().secrets or [] return [make(secret_desc) for secret_desc in secret_descriptors]
k8_kat/res/sa/kat_service_account.py
ArgSwap(idxs=0<->1 @(29,22)->(29,36))
class KatServiceAccount(KatRes): def secrets(self) -> List[any]: from k8_kat.res.secret.kat_secret import KatSecret make = lambda sd: KatSecret.find(sd.namespace or self.ns, sd.name) secret_descriptors = self.body().secrets or [] return [make(secret_desc) for secret_desc in secret_descriptors]
class KatServiceAccount(KatRes): def secrets(self) -> List[any]: from k8_kat.res.secret.kat_secret import KatSecret make = lambda sd: KatSecret.find(sd.name, sd.namespace or self.ns) secret_descriptors = self.body().secrets or [] return [make(secret_desc) for secret_desc in secret_descriptors]
1,281
https://:@github.com/nectar-cs/k8-kat.git
8a2f45982919c69bc709aa14a16c7a402dcafd4b
@@ -12,7 +12,7 @@ class TestKatSvc(ClusterTest): test_helper.create_svc(cls.n1, 's1') def setUp(self) -> None: - self.subject: KatSvc = KatSvc.find(self.n1, 's1') + self.subject: KatSvc = KatSvc.find('s1', self.n1) def test_internal_ip(self): self.assertIsNotNone(self.subject.internal_ip)
k8_kat/tests/res/svc/test_kat_svc.py
ArgSwap(idxs=0<->1 @(15,27)->(15,38))
class TestKatSvc(ClusterTest): test_helper.create_svc(cls.n1, 's1') def setUp(self) -> None: self.subject: KatSvc = KatSvc.find(self.n1, 's1') def test_internal_ip(self): self.assertIsNotNone(self.subject.internal_ip)
class TestKatSvc(ClusterTest): test_helper.create_svc(cls.n1, 's1') def setUp(self) -> None: self.subject: KatSvc = KatSvc.find('s1', self.n1) def test_internal_ip(self): self.assertIsNotNone(self.subject.internal_ip)
1,282
https://:@github.com/hlmtre/pybot.git
d893f64e69b2d7a8393eacb3620e927f5c7ce10d
@@ -155,7 +155,7 @@ class Event: self.verb = v break # channel is unset if it does not begin with # - if self.verb == "PRIVMSG" and len(self.channel): + if self.verb == "PRIVMSG" and not len(self.channel): self.is_pm = True for s in self.subscribers: try:
event.py
ReplaceText(target='not ' @(158,34)->(158,34))
class Event: self.verb = v break # channel is unset if it does not begin with # if self.verb == "PRIVMSG" and len(self.channel): self.is_pm = True for s in self.subscribers: try:
class Event: self.verb = v break # channel is unset if it does not begin with # if self.verb == "PRIVMSG" and not len(self.channel): self.is_pm = True for s in self.subscribers: try:
1,283
https://:@github.com/tboudreaux/vectorpy.git
55394cff47bf052127af1a64f0eb9043365864ae
@@ -64,7 +64,7 @@ class vector: # Data type name return not self.__eq__(other) def cross(self, other): # Corss product - return vector(self.y*other.z - self.z*other.y, self.z*other.x - self.x*other.z, self.x*other.y - self.y-other.x) + return vector(self.y*other.z - self.z*other.y, self.z*other.x - self.x*other.z, self.x*other.y - self.y*other.x) def dot(self, other): # dot product return self.x*other.x + self.y*other.y + self.z*other.z
vectorpy/vector.py
ReplaceText(target='*' @(67,111)->(67,112))
class vector: # Data type name return not self.__eq__(other) def cross(self, other): # Corss product return vector(self.y*other.z - self.z*other.y, self.z*other.x - self.x*other.z, self.x*other.y - self.y-other.x) def dot(self, other): # dot product return self.x*other.x + self.y*other.y + self.z*other.z
class vector: # Data type name return not self.__eq__(other) def cross(self, other): # Corss product return vector(self.y*other.z - self.z*other.y, self.z*other.x - self.x*other.z, self.x*other.y - self.y*other.x) def dot(self, other): # dot product return self.x*other.x + self.y*other.y + self.z*other.z
1,284
https://:@github.com/detectlabs/aioble.git
90e1e234ade4c5fa78df42bc856f3e3a8f571077
@@ -116,7 +116,7 @@ async def connect_two(): cm_all = CentralManager() await cm_all.start_scan(scan_callback_all) - while d_10_device is None and d_5_device is None: + while d_10_device is None or d_5_device is None: await asyncio.sleep(.1) await cm_all.stop_scan()
examples/connect.py
ReplaceText(target='or' @(119,34)->(119,37))
async def connect_two(): cm_all = CentralManager() await cm_all.start_scan(scan_callback_all) while d_10_device is None and d_5_device is None: await asyncio.sleep(.1) await cm_all.stop_scan()
async def connect_two(): cm_all = CentralManager() await cm_all.start_scan(scan_callback_all) while d_10_device is None or d_5_device is None: await asyncio.sleep(.1) await cm_all.stop_scan()
1,285
https://:@github.com/speezepearson/prpg.git
aa36906fdc61e1f57250372d6b7c596c676bc203
@@ -27,4 +27,4 @@ def dump_salts(f, salts): f.write(payload) else: with open(f, 'w') as true_f: - f.write(payload) + true_f.write(payload)
__init__.py
ReplaceText(target='true_f' @(30,6)->(30,7))
def dump_salts(f, salts): f.write(payload) else: with open(f, 'w') as true_f: f.write(payload)
def dump_salts(f, salts): f.write(payload) else: with open(f, 'w') as true_f: true_f.write(payload)
1,286
https://:@github.com/wehriam/awspider.git
cecf24d302f5a2d0f454fecfbb5915f7a4f19ed0
@@ -178,4 +178,4 @@ class InterfaceServer(BaseServer): def _createReservationErrback(self, error, function_name, uuid): LOGGER.error("Unable to create reservation for %s:%s, %s.\n" % (function_name, uuid, error)) - return uuid \ No newline at end of file + return error \ No newline at end of file
awspider/servers2/interface.py
ReplaceText(target='error' @(181,15)->(181,19))
class InterfaceServer(BaseServer): def _createReservationErrback(self, error, function_name, uuid): LOGGER.error("Unable to create reservation for %s:%s, %s.\n" % (function_name, uuid, error)) return uuid \ No newline at end of file \ No newline at end of file
class InterfaceServer(BaseServer): def _createReservationErrback(self, error, function_name, uuid): LOGGER.error("Unable to create reservation for %s:%s, %s.\n" % (function_name, uuid, error)) \ No newline at end of file return error \ No newline at end of file
1,287
https://:@github.com/combatopera/diapyr.git
2deb919498af4943aa18a7281037468809bda2d0
@@ -22,7 +22,7 @@ class BinMix(Node): self.blockbuf.copybuf(self.tone(self.block)) if not noiseflag: self.blockbuf.orbuf(self.noise(self.block)) - elif noiseflag: + elif not noiseflag: self.blockbuf.copybuf(self.noise(self.block)) else: self.blockbuf.fill(0)
pym2149/mix.py
ReplaceText(target='not ' @(25,9)->(25,9))
class BinMix(Node): self.blockbuf.copybuf(self.tone(self.block)) if not noiseflag: self.blockbuf.orbuf(self.noise(self.block)) elif noiseflag: self.blockbuf.copybuf(self.noise(self.block)) else: self.blockbuf.fill(0)
class BinMix(Node): self.blockbuf.copybuf(self.tone(self.block)) if not noiseflag: self.blockbuf.orbuf(self.noise(self.block)) elif not noiseflag: self.blockbuf.copybuf(self.noise(self.block)) else: self.blockbuf.fill(0)
1,288
https://:@github.com/InfluxGraph/graphite-api.git
2847d5788bc8adbd8d864a234d7e4cb39210fc29
@@ -787,7 +787,7 @@ def file_fetch(fh, fromTime, untilTime, now = None): if untilTime > now: untilTime = now - diff = untilTime - fromTime + diff = now - fromTime for archive in header['archives']: if archive['retention'] >= diff: break
graphite_api/_vendor/whisper.py
ReplaceText(target='now' @(790,9)->(790,18))
def file_fetch(fh, fromTime, untilTime, now = None): if untilTime > now: untilTime = now diff = untilTime - fromTime for archive in header['archives']: if archive['retention'] >= diff: break
def file_fetch(fh, fromTime, untilTime, now = None): if untilTime > now: untilTime = now diff = now - fromTime for archive in header['archives']: if archive['retention'] >= diff: break
1,289
https://:@github.com/JulianKimmig/json_websocket.git
188740f4381fea77078950cd5540842f2e3dc75e
@@ -11,7 +11,7 @@ def merge(new_values, default_values): for key, value in default_values.items(): nv = new_values.get(key, None) if isinstance(value, dict) and isinstance(nv, dict): - nd[key] = merge(value, nv) + nd[key] = merge(nv, value) else: if nv is None: nd[key] = value
json_websocket/basic/abstract_json_socket.py
ArgSwap(idxs=0<->1 @(14,22)->(14,27))
def merge(new_values, default_values): for key, value in default_values.items(): nv = new_values.get(key, None) if isinstance(value, dict) and isinstance(nv, dict): nd[key] = merge(value, nv) else: if nv is None: nd[key] = value
def merge(new_values, default_values): for key, value in default_values.items(): nv = new_values.get(key, None) if isinstance(value, dict) and isinstance(nv, dict): nd[key] = merge(nv, value) else: if nv is None: nd[key] = value
1,290
https://:@github.com/accurrently/evnrg.git
b045f854eb398a314608cdd195b114b3a8fa8231
@@ -476,7 +476,7 @@ def charge_connected(input_batt, output_batt, fleet, home_bank, away_bank, min_p if may_charge: pot = (min_per_interval / 60.0) * power max_nrg = max_batt * max_soc - output_batt[i] = min(current_batt[i] + pot, max_nrg) + output_batt[i] = min(input_batt[i] + pot, max_nrg) @nb.njit(cache=True)
evnrg/simulation_nb.py
ReplaceText(target='input_batt' @(479,33)->(479,45))
def charge_connected(input_batt, output_batt, fleet, home_bank, away_bank, min_p if may_charge: pot = (min_per_interval / 60.0) * power max_nrg = max_batt * max_soc output_batt[i] = min(current_batt[i] + pot, max_nrg) @nb.njit(cache=True)
def charge_connected(input_batt, output_batt, fleet, home_bank, away_bank, min_p if may_charge: pot = (min_per_interval / 60.0) * power max_nrg = max_batt * max_soc output_batt[i] = min(input_batt[i] + pot, max_nrg) @nb.njit(cache=True)
1,291
https://:@github.com/Dominick1993/pyhelm.git
f91f0e9216f1436c3671d7eae8920900a398a01d
@@ -106,7 +106,7 @@ def from_repo(repo_url, chart, version=None, headers=None): _get_from_repo( repo_scheme, repo_url, - url, + fname, stream=True, headers=headers, )
pyhelm/repo.py
ReplaceText(target='fname' @(109,24)->(109,27))
def from_repo(repo_url, chart, version=None, headers=None): _get_from_repo( repo_scheme, repo_url, url, stream=True, headers=headers, )
def from_repo(repo_url, chart, version=None, headers=None): _get_from_repo( repo_scheme, repo_url, fname, stream=True, headers=headers, )
1,292
https://:@github.com/Dominick1993/pyhelm.git
7ce03b8f5b2d35015bf34f6df059d61ee4c57054
@@ -106,7 +106,7 @@ def from_repo(repo_url, chart, version=None, headers=None): _get_from_repo( repo_scheme, repo_url, - fname, + url, stream=True, headers=headers, )
pyhelm/repo.py
ReplaceText(target='url' @(109,24)->(109,29))
def from_repo(repo_url, chart, version=None, headers=None): _get_from_repo( repo_scheme, repo_url, fname, stream=True, headers=headers, )
def from_repo(repo_url, chart, version=None, headers=None): _get_from_repo( repo_scheme, repo_url, url, stream=True, headers=headers, )
1,293
https://:@github.com/tazle/bufrpy.git
eccb7469feec461e1ede41f8352c3700c7f7a885
@@ -66,7 +66,7 @@ def read_tables(b_line_stream, d_line_stream=None): constituent_codes = [] for line in lines: l_parts = slices(line, [1,6,1,2,1,6]) - constituent_codes.append(fxy2int(parts[5])) + constituent_codes.append(fxy2int(l_parts[5])) descriptors[d_descriptor_code] = LazySequenceDescriptor(d_descriptor_code, constituent_codes, '', table) return table
bufrpy/table/libbufr.py
ReplaceText(target='l_parts' @(69,49)->(69,54))
def read_tables(b_line_stream, d_line_stream=None): constituent_codes = [] for line in lines: l_parts = slices(line, [1,6,1,2,1,6]) constituent_codes.append(fxy2int(parts[5])) descriptors[d_descriptor_code] = LazySequenceDescriptor(d_descriptor_code, constituent_codes, '', table) return table
def read_tables(b_line_stream, d_line_stream=None): constituent_codes = [] for line in lines: l_parts = slices(line, [1,6,1,2,1,6]) constituent_codes.append(fxy2int(l_parts[5])) descriptors[d_descriptor_code] = LazySequenceDescriptor(d_descriptor_code, constituent_codes, '', table) return table
1,294
https://:@bitbucket.org/mjr129/cluster_searcher.git
7af9e61f76366c820fe7bd23b935c2f59fe05c33
@@ -250,7 +250,7 @@ def load_taxa( file_name: MOptional[Filename[EXT.TXT]] = None ) -> None: raise ValueError( "load_taxa: Refused because the LECA must be loaded first." ) num_clusters, num_taxa = state.leca_file.load_taxa( file_name ) - MCMD.print( "{} taxa loaded into {} clusters.".format( num_clusters, num_taxa ) ) + MCMD.print( "{} taxa loaded into {} clusters.".format( num_taxa, num_clusters ) ) state.settings.last_taxa = file_name
cluster_searcher/commands.py
ArgSwap(idxs=0<->1 @(253,16)->(253,57))
def load_taxa( file_name: MOptional[Filename[EXT.TXT]] = None ) -> None: raise ValueError( "load_taxa: Refused because the LECA must be loaded first." ) num_clusters, num_taxa = state.leca_file.load_taxa( file_name ) MCMD.print( "{} taxa loaded into {} clusters.".format( num_clusters, num_taxa ) ) state.settings.last_taxa = file_name
def load_taxa( file_name: MOptional[Filename[EXT.TXT]] = None ) -> None: raise ValueError( "load_taxa: Refused because the LECA must be loaded first." ) num_clusters, num_taxa = state.leca_file.load_taxa( file_name ) MCMD.print( "{} taxa loaded into {} clusters.".format( num_taxa, num_clusters ) ) state.settings.last_taxa = file_name
1,295
https://:@github.com/thadhaines/PSLTDSim.git
5dc7e46a081628010935853d830aa82b98e2df69
@@ -76,7 +76,7 @@ class tgov1Agent(): _, y3, self.x3 = sig.lsim(self.sys3, U=uVector, T=self.t, X0=[self.r_x1[self.mirror.c_dp-1],self.Gen.r_Pm[self.mirror.c_dp-1]]) # Addition of damping - Pmech = y3 - dwVec*self.Dt # effectively removing the second block... + Pmech = y2 - dwVec*self.Dt # effectively removing the second block... # Set Generator Mechanical Power self.Gen.Pm = float(Pmech[1])
psltdsim/dynamicAgents/tgov1Agent.py
ReplaceText(target='y2' @(79,16)->(79,18))
class tgov1Agent(): _, y3, self.x3 = sig.lsim(self.sys3, U=uVector, T=self.t, X0=[self.r_x1[self.mirror.c_dp-1],self.Gen.r_Pm[self.mirror.c_dp-1]]) # Addition of damping Pmech = y3 - dwVec*self.Dt # effectively removing the second block... # Set Generator Mechanical Power self.Gen.Pm = float(Pmech[1])
class tgov1Agent(): _, y3, self.x3 = sig.lsim(self.sys3, U=uVector, T=self.t, X0=[self.r_x1[self.mirror.c_dp-1],self.Gen.r_Pm[self.mirror.c_dp-1]]) # Addition of damping Pmech = y2 - dwVec*self.Dt # effectively removing the second block... # Set Generator Mechanical Power self.Gen.Pm = float(Pmech[1])
1,296
https://:@github.com/rbn42/freetile.git
86701ce263f0551e005e9fe5ed11ff03ceb0ce68
@@ -45,7 +45,7 @@ class WindowList: if name in EXCLUDE_APPLICATIONS: continue - wmclass, minimized = get_wm_class_and_state(winid) + wmclass, minimized = get_wm_class_and_state(win) dock = disp.intern_atom('_NET_WM_WINDOW_TYPE_DOCK') if dock in ewmh.getWmWindowType(win): continue
windowlist.py
ReplaceText(target='win' @(48,56)->(48,61))
class WindowList: if name in EXCLUDE_APPLICATIONS: continue wmclass, minimized = get_wm_class_and_state(winid) dock = disp.intern_atom('_NET_WM_WINDOW_TYPE_DOCK') if dock in ewmh.getWmWindowType(win): continue
class WindowList: if name in EXCLUDE_APPLICATIONS: continue wmclass, minimized = get_wm_class_and_state(win) dock = disp.intern_atom('_NET_WM_WINDOW_TYPE_DOCK') if dock in ewmh.getWmWindowType(win): continue
1,297
https://:@github.com/dpays/dpaygo.git
5f156fdf5a75367c32d85efb02e456abfa2719f6
@@ -714,6 +714,6 @@ class RecentByPath(list): comments = [] for reply in replies: post = state["content"][reply] - if category is None or (category is not None and post["category"] != category): + if category is None or (category is not None and post["category"] == category): comments.append(Comment(post, lazy=True, steem_instance=self.steem)) super(RecentByPath, self).__init__(comments)
beem/comment.py
ReplaceText(target='==' @(717,78)->(717,80))
class RecentByPath(list): comments = [] for reply in replies: post = state["content"][reply] if category is None or (category is not None and post["category"] != category): comments.append(Comment(post, lazy=True, steem_instance=self.steem)) super(RecentByPath, self).__init__(comments)
class RecentByPath(list): comments = [] for reply in replies: post = state["content"][reply] if category is None or (category is not None and post["category"] == category): comments.append(Comment(post, lazy=True, steem_instance=self.steem)) super(RecentByPath, self).__init__(comments)
1,298
https://:@github.com/ashinabraham/starlette-bugsnag.git
5772b5ab92c63c9f7e397ce976141a92095d2118
@@ -11,7 +11,7 @@ class BugsnagMiddleware: async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: if not self._debug: - await self.bugsnag_app(scope, send, receive) + await self.bugsnag_app(scope, receive, send) return await self.app(scope, receive, send)
starlette_bugsnag/middleware.py
ArgSwap(idxs=1<->2 @(14,18)->(14,34))
class BugsnagMiddleware: async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: if not self._debug: await self.bugsnag_app(scope, send, receive) return await self.app(scope, receive, send)
class BugsnagMiddleware: async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: if not self._debug: await self.bugsnag_app(scope, receive, send) return await self.app(scope, receive, send)
1,299
https://:@github.com/LowieHuyghe/edmunds.git
a0a1669ebbe85c885f4bf1180c82d3c2c475ab61
@@ -162,7 +162,7 @@ class EasierSetup(object): if value_path.lower().endswith('.md'): try: import pypandoc - value = pypandoc.convert_text(value_path, 'rst', format='md') + value = pypandoc.convert_text(value, 'rst', format='md') value = value.replace("\r", "") except ImportError: print("Pandoc not found. Markdown to reStructuredText conversion failed.")
easiersetup.py
ReplaceText(target='value' @(165,54)->(165,64))
class EasierSetup(object): if value_path.lower().endswith('.md'): try: import pypandoc value = pypandoc.convert_text(value_path, 'rst', format='md') value = value.replace("\r", "") except ImportError: print("Pandoc not found. Markdown to reStructuredText conversion failed.")
class EasierSetup(object): if value_path.lower().endswith('.md'): try: import pypandoc value = pypandoc.convert_text(value, 'rst', format='md') value = value.replace("\r", "") except ImportError: print("Pandoc not found. Markdown to reStructuredText conversion failed.")