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,700
https://:@github.com/oneup40/chunkfile.git
3df3f2f196f7ec150a8dd86a9b10ec2773a2d4d0
@@ -171,7 +171,7 @@ class ChunkFile(object): def _do_write(self, offset, data): n = offset / CHUNKDATASIZE - while n > len(self.chunks): + while n >= len(self.chunks): self._add_new_chunk() nextchunkofs = (n+1) * CHUNKDATASIZE
chunkfile/ChunkFile.py
ReplaceText(target='>=' @(174,16)->(174,17))
class ChunkFile(object): def _do_write(self, offset, data): n = offset / CHUNKDATASIZE while n > len(self.chunks): self._add_new_chunk() nextchunkofs = (n+1) * CHUNKDATASIZE
class ChunkFile(object): def _do_write(self, offset, data): n = offset / CHUNKDATASIZE while n >= len(self.chunks): self._add_new_chunk() nextchunkofs = (n+1) * CHUNKDATASIZE
1,701
https://:@github.com/Omega-Cube/graphite-query.git
8143c1364413d50b9c8805a14e69efbcbc546d25
@@ -1250,7 +1250,7 @@ def removeBelowValue(requestContext, seriesList, n): for s in seriesList: s.name = 'removeBelowValue(%s, %d)' % (s.name, n) for (index, val) in enumerate(s): - if val > n: + if val < n: s[index] = None return seriesList
webapp/graphite/render/functions.py
ReplaceText(target='<' @(1253,13)->(1253,14))
def removeBelowValue(requestContext, seriesList, n): for s in seriesList: s.name = 'removeBelowValue(%s, %d)' % (s.name, n) for (index, val) in enumerate(s): if val > n: s[index] = None return seriesList
def removeBelowValue(requestContext, seriesList, n): for s in seriesList: s.name = 'removeBelowValue(%s, %d)' % (s.name, n) for (index, val) in enumerate(s): if val < n: s[index] = None return seriesList
1,702
https://:@github.com/rhedak/hhpy.git
71e1853e3a51dc0991d5eedeaa3fb270b60bb8eb
@@ -502,7 +502,7 @@ def distplot(x, data=None, hue=None, hue_order=None, palette=None, hue_labels=No _ax.plot(__x, _y, linestyle=_f_distfit_line, color=_f_distfit_color, alpha=alpha, linewidth=2, label=_label_2, **kwargs) if not show_hist and _f_fill: - _ax.fill_between(_f_bins, _y, color=_f_facecolor, alpha=alpha) + _ax.fill_between(__x, _y, color=_f_facecolor, alpha=alpha) _f_ax2.get_yaxis().set_visible(False)
hpy/plotting.py
ReplaceText(target='__x' @(505,37)->(505,44))
def distplot(x, data=None, hue=None, hue_order=None, palette=None, hue_labels=No _ax.plot(__x, _y, linestyle=_f_distfit_line, color=_f_distfit_color, alpha=alpha, linewidth=2, label=_label_2, **kwargs) if not show_hist and _f_fill: _ax.fill_between(_f_bins, _y, color=_f_facecolor, alpha=alpha) _f_ax2.get_yaxis().set_visible(False)
def distplot(x, data=None, hue=None, hue_order=None, palette=None, hue_labels=No _ax.plot(__x, _y, linestyle=_f_distfit_line, color=_f_distfit_color, alpha=alpha, linewidth=2, label=_label_2, **kwargs) if not show_hist and _f_fill: _ax.fill_between(__x, _y, color=_f_facecolor, alpha=alpha) _f_ax2.get_yaxis().set_visible(False)
1,703
https://:@github.com/rhedak/hhpy.git
89f3003a5580e2d96cc11e26aa63ab9dc3f493a6
@@ -2136,7 +2136,7 @@ def k_split(df: pd.DataFrame, k: int = 5, groupby: Union[Sequence, str] = None, _df = df.copy() del df - _index_name = df.index.name + _index_name = _df.index.name _df['_index'] = _df.index _k_split = int(np.ceil(_df.shape[0] / k))
hpy/ds.py
ReplaceText(target='_df' @(2139,18)->(2139,20))
def k_split(df: pd.DataFrame, k: int = 5, groupby: Union[Sequence, str] = None, _df = df.copy() del df _index_name = df.index.name _df['_index'] = _df.index _k_split = int(np.ceil(_df.shape[0] / k))
def k_split(df: pd.DataFrame, k: int = 5, groupby: Union[Sequence, str] = None, _df = df.copy() del df _index_name = _df.index.name _df['_index'] = _df.index _k_split = int(np.ceil(_df.shape[0] / k))
1,704
https://:@github.com/EmoteCollector/ec_client.git
4bcb64e0b7f1ba125c405ccd10d205bb32e841ca
@@ -25,7 +25,7 @@ class Client: return self._new_emote(await self._http.create(name, url)) async def edit(self, name_, *, name=None, description=utils.sentinel): - return self._new_emote(await self._http.edit(name, name=name, description=description)) + return self._new_emote(await self._http.edit(name_, name=name, description=description)) async def delete(self, name): return self._new_emote(await self._http.delete(name))
aioec/client.py
ReplaceText(target='name_' @(28,47)->(28,51))
class Client: return self._new_emote(await self._http.create(name, url)) async def edit(self, name_, *, name=None, description=utils.sentinel): return self._new_emote(await self._http.edit(name, name=name, description=description)) async def delete(self, name): return self._new_emote(await self._http.delete(name))
class Client: return self._new_emote(await self._http.create(name, url)) async def edit(self, name_, *, name=None, description=utils.sentinel): return self._new_emote(await self._http.edit(name_, name=name, description=description)) async def delete(self, name): return self._new_emote(await self._http.delete(name))
1,705
https://:@github.com/giganticode/langmodels.git
862615609159bf1247bcb6294f34dec9e27a1805
@@ -30,7 +30,7 @@ def get_entropy_for_each_line(trained_model: TrainedModel, 'entropies': entropies, 'line_entropy': line_entropy }) - if not verbose: + if verbose: for line in prep_lines_and_entropies: print(line['text']) print(line['line_entropy'])
langmodels/inference/entropies.py
ReplaceText(target='' @(33,11)->(33,15))
def get_entropy_for_each_line(trained_model: TrainedModel, 'entropies': entropies, 'line_entropy': line_entropy }) if not verbose: for line in prep_lines_and_entropies: print(line['text']) print(line['line_entropy'])
def get_entropy_for_each_line(trained_model: TrainedModel, 'entropies': entropies, 'line_entropy': line_entropy }) if verbose: for line in prep_lines_and_entropies: print(line['text']) print(line['line_entropy'])
1,706
https://:@github.com/kerryeon/test-macro.git
ba50132db1d907a684d759772f586a8911864d9c
@@ -111,7 +111,7 @@ class TestMacro: # TODO more pretty with tqdm(total=len(self)) as pbar: - on_error = True + on_error = False while True: case = self._dump() pbar.set_description(''.join(
test_macro/macro.py
ReplaceText(target='False' @(114,23)->(114,27))
class TestMacro: # TODO more pretty with tqdm(total=len(self)) as pbar: on_error = True while True: case = self._dump() pbar.set_description(''.join(
class TestMacro: # TODO more pretty with tqdm(total=len(self)) as pbar: on_error = False while True: case = self._dump() pbar.set_description(''.join(
1,707
https://:@github.com/InsaneMonster/USienaRL.git
95e212aed41ba20d3535558cb3104f39405f3c52
@@ -460,7 +460,7 @@ class Experiment: self._display_test_cycle_metrics(logger, test_cycle_average_total_reward, test_cycle_average_scaled_reward, - test_cycles_rewards) + test_cycle_rewards) # Save the rewards test_average_total_rewards[test] = test_cycle_average_total_reward test_average_scaled_rewards[test] = test_cycle_average_scaled_reward
usienarl/experiment.py
ReplaceText(target='test_cycle_rewards' @(463,49)->(463,68))
class Experiment: self._display_test_cycle_metrics(logger, test_cycle_average_total_reward, test_cycle_average_scaled_reward, test_cycles_rewards) # Save the rewards test_average_total_rewards[test] = test_cycle_average_total_reward test_average_scaled_rewards[test] = test_cycle_average_scaled_reward
class Experiment: self._display_test_cycle_metrics(logger, test_cycle_average_total_reward, test_cycle_average_scaled_reward, test_cycle_rewards) # Save the rewards test_average_total_rewards[test] = test_cycle_average_total_reward test_average_scaled_rewards[test] = test_cycle_average_scaled_reward
1,708
https://:@github.com/311devs/peewee.git
95743d856ac5ea0908a5bab62ec99fda799ae241
@@ -330,7 +330,7 @@ class BaseQuery(object): query.append(parsed) query_data.extend(data) elif isinstance(child, Node): - parsed, data = self.parse_node(node, model, alias) + parsed, data = self.parse_node(child, model, alias) query.append('(%s)' % parsed) query_data.extend(data) query.extend(nodes)
peewee.py
ReplaceText(target='child' @(333,47)->(333,51))
class BaseQuery(object): query.append(parsed) query_data.extend(data) elif isinstance(child, Node): parsed, data = self.parse_node(node, model, alias) query.append('(%s)' % parsed) query_data.extend(data) query.extend(nodes)
class BaseQuery(object): query.append(parsed) query_data.extend(data) elif isinstance(child, Node): parsed, data = self.parse_node(child, model, alias) query.append('(%s)' % parsed) query_data.extend(data) query.extend(nodes)
1,709
https://:@github.com/311devs/peewee.git
33b06ced6d60abac3e0342f86a1cb16fc981ab0a
@@ -1281,7 +1281,7 @@ class FieldTypeTests(BasePeeweeTestCase): user_indexes = self.get_sorted_indexes(User) if BACKEND == 'mysql': - entry_indexes.pop(0) + user_indexes.pop(0) self.assertEqual(user_indexes, [ ('users_active', False),
tests.py
ReplaceText(target='user_indexes' @(1284,12)->(1284,25))
class FieldTypeTests(BasePeeweeTestCase): user_indexes = self.get_sorted_indexes(User) if BACKEND == 'mysql': entry_indexes.pop(0) self.assertEqual(user_indexes, [ ('users_active', False),
class FieldTypeTests(BasePeeweeTestCase): user_indexes = self.get_sorted_indexes(User) if BACKEND == 'mysql': user_indexes.pop(0) self.assertEqual(user_indexes, [ ('users_active', False),
1,710
https://:@github.com/311devs/peewee.git
de772f33bfffd60aa8b5e28d0b0ba743b0c54c6d
@@ -311,7 +311,7 @@ class CommentCategory(TestModel): sort_order = IntegerField(default=0) class Meta: - primary_key = CompositeKey('category', 'comment') + primary_key = CompositeKey('comment', 'category') class BlogData(TestModel): blog = ForeignKeyField(Blog)
playhouse/tests/models.py
ArgSwap(idxs=0<->1 @(314,22)->(314,34))
class CommentCategory(TestModel): sort_order = IntegerField(default=0) class Meta: primary_key = CompositeKey('category', 'comment') class BlogData(TestModel): blog = ForeignKeyField(Blog)
class CommentCategory(TestModel): sort_order = IntegerField(default=0) class Meta: primary_key = CompositeKey('comment', 'category') class BlogData(TestModel): blog = ForeignKeyField(Blog)
1,711
https://:@github.com/311devs/peewee.git
9bc7df7cc4be146a8ad8baf7427c2902537e93da
@@ -57,7 +57,7 @@ def print_models(introspector, tables=None): # In the event the destination table has already been pushed # for printing, then we have a reference cycle. if dest in accum and table not in accum: - print_('# Possible reference cycle: %s' % foreign_key) + print_('# Possible reference cycle: %s' % dest) # If this is not a self-referential foreign key, and we have # not already processed the destination table, do so now.
pwiz.py
ReplaceText(target='dest' @(60,58)->(60,69))
def print_models(introspector, tables=None): # In the event the destination table has already been pushed # for printing, then we have a reference cycle. if dest in accum and table not in accum: print_('# Possible reference cycle: %s' % foreign_key) # If this is not a self-referential foreign key, and we have # not already processed the destination table, do so now.
def print_models(introspector, tables=None): # In the event the destination table has already been pushed # for printing, then we have a reference cycle. if dest in accum and table not in accum: print_('# Possible reference cycle: %s' % dest) # If this is not a self-referential foreign key, and we have # not already processed the destination table, do so now.
1,712
https://:@github.com/311devs/peewee.git
61188a5f69b35323d19f1bac301beb288e549b4b
@@ -2076,7 +2076,7 @@ class ModelQueryResultWrapper(QueryResultWrapper): can_populate_joined_pk = ( mpk and (metadata.attr in inst._data) and - (getattr(joined_inst, metadata.primary_key) is not None)) + (getattr(joined_inst, metadata.primary_key) is None)) if can_populate_joined_pk: setattr( joined_inst,
peewee.py
ReplaceText(target=' is ' @(2079,59)->(2079,67))
class ModelQueryResultWrapper(QueryResultWrapper): can_populate_joined_pk = ( mpk and (metadata.attr in inst._data) and (getattr(joined_inst, metadata.primary_key) is not None)) if can_populate_joined_pk: setattr( joined_inst,
class ModelQueryResultWrapper(QueryResultWrapper): can_populate_joined_pk = ( mpk and (metadata.attr in inst._data) and (getattr(joined_inst, metadata.primary_key) is None)) if can_populate_joined_pk: setattr( joined_inst,
1,713
https://:@github.com/MGlauer/python-gavel.git
d0c456ce4d51bf64cfbae7f9969fb80dbab94ff3
@@ -13,7 +13,7 @@ def get_engine(): cred = DB_CONNECTION.get("user", "") if cred: if "password" in DB_CONNECTION: - cred += "{user}:{password}".format(**DB_CONNECTION) + cred = "{user}:{password}".format(**DB_CONNECTION) cred += "@" location = DB_CONNECTION.get("host", "")
src/gavel/dialects/db/connection.py
ReplaceText(target='=' @(16,21)->(16,23))
def get_engine(): cred = DB_CONNECTION.get("user", "") if cred: if "password" in DB_CONNECTION: cred += "{user}:{password}".format(**DB_CONNECTION) cred += "@" location = DB_CONNECTION.get("host", "")
def get_engine(): cred = DB_CONNECTION.get("user", "") if cred: if "password" in DB_CONNECTION: cred = "{user}:{password}".format(**DB_CONNECTION) cred += "@" location = DB_CONNECTION.get("host", "")
1,714
https://:@github.com/skakri/django-wiki-base.git
7b40385d27cbf7a336f41d2e24b19e42fdce1667
@@ -79,7 +79,7 @@ class WikiPath(markdown.inlinepatterns.Pattern): urlpath = None path = path_from_link try: - urlpath = models.URLPath.get_by_path(path_from_link) + urlpath = models.URLPath.get_by_path(article_title) path = urlpath.get_absolute_url() except models.URLPath.DoesNotExist: pass
wiki/plugins/highlighter/mdx/djangowikilinks.py
ReplaceText(target='article_title' @(82,53)->(82,67))
class WikiPath(markdown.inlinepatterns.Pattern): urlpath = None path = path_from_link try: urlpath = models.URLPath.get_by_path(path_from_link) path = urlpath.get_absolute_url() except models.URLPath.DoesNotExist: pass
class WikiPath(markdown.inlinepatterns.Pattern): urlpath = None path = path_from_link try: urlpath = models.URLPath.get_by_path(article_title) path = urlpath.get_absolute_url() except models.URLPath.DoesNotExist: pass
1,715
https://:@github.com/dhilowitz/launchpad_rtmidi.py.git
82ff68631e2e9d415d35c2d54fb3c0d8837ce22a
@@ -494,7 +494,7 @@ class Launchpad( LaunchpadBase ): #------------------------------------------------------------------------------------- def LedCtrlXY( self, x, y, red, green ): - if x < 0 or y > 8 or y < 0 or y > 8: + if x < 0 or x > 8 or y < 0 or y > 8: return if y == 0:
launchpad.py
ReplaceText(target='x' @(497,14)->(497,15))
class Launchpad( LaunchpadBase ): #------------------------------------------------------------------------------------- def LedCtrlXY( self, x, y, red, green ): if x < 0 or y > 8 or y < 0 or y > 8: return if y == 0:
class Launchpad( LaunchpadBase ): #------------------------------------------------------------------------------------- def LedCtrlXY( self, x, y, red, green ): if x < 0 or x > 8 or y < 0 or y > 8: return if y == 0:
1,716
https://:@github.com/archman/phantasy.git
a6485f5f71a295581d7ed558e6ff6e4fb6f3f2aa
@@ -327,7 +327,7 @@ class FlameLatticeFactory(BaseLatticeFactory): _LOGGER.info("Alignment error: dx of {} is {} m.".format(ename, dx)) align_error_conf.append(('dx', float(dx))) dy = self._get_config(ename, CONFIG_ALIGNMENT_DY, None) - if dx is not None: + if dy is not None: _LOGGER.info("Alignment error: dx of {} is {} m.".format(ename, dx)) align_error_conf.append(('dy', float(dy))) return align_error_conf
phantasy/library/lattice/flame.py
ReplaceText(target='dy' @(330,11)->(330,13))
class FlameLatticeFactory(BaseLatticeFactory): _LOGGER.info("Alignment error: dx of {} is {} m.".format(ename, dx)) align_error_conf.append(('dx', float(dx))) dy = self._get_config(ename, CONFIG_ALIGNMENT_DY, None) if dx is not None: _LOGGER.info("Alignment error: dx of {} is {} m.".format(ename, dx)) align_error_conf.append(('dy', float(dy))) return align_error_conf
class FlameLatticeFactory(BaseLatticeFactory): _LOGGER.info("Alignment error: dx of {} is {} m.".format(ename, dx)) align_error_conf.append(('dx', float(dx))) dy = self._get_config(ename, CONFIG_ALIGNMENT_DY, None) if dy is not None: _LOGGER.info("Alignment error: dx of {} is {} m.".format(ename, dx)) align_error_conf.append(('dy', float(dy))) return align_error_conf
1,717
https://:@github.com/mardiros/pyramid_asyncio.git
f675334092897ddadb75c313c2ab511e8e0c65df
@@ -259,7 +259,7 @@ class Router(RouterBase): yield from includeme(self.config) except Exception: - log.exception('{} raise an exception'.format(includeme)) + log.exception('{} raise an exception'.format(callable)) @asyncio.coroutine def close(self):
pyramid_asyncio/router.py
ReplaceText(target='callable' @(262,61)->(262,70))
class Router(RouterBase): yield from includeme(self.config) except Exception: log.exception('{} raise an exception'.format(includeme)) @asyncio.coroutine def close(self):
class Router(RouterBase): yield from includeme(self.config) except Exception: log.exception('{} raise an exception'.format(callable)) @asyncio.coroutine def close(self):
1,718
https://:@github.com/CI-WATER/TethysCluster.git
d21d18ef5e52db0bb7695137520f03469d55afea
@@ -49,5 +49,5 @@ class CmdGet(ClusterCompleter): for rpath in rpaths: if not glob.has_magic(rpath) and not node.ssh.path_exists(rpath): raise exception.BaseException( - "Remote file or directory does not exist: %s" % lpath) + "Remote file or directory does not exist: %s" % rpath) node.ssh.get(rpaths, lpath)
starcluster/commands/get.py
ReplaceText(target='rpath' @(52,68)->(52,73))
class CmdGet(ClusterCompleter): for rpath in rpaths: if not glob.has_magic(rpath) and not node.ssh.path_exists(rpath): raise exception.BaseException( "Remote file or directory does not exist: %s" % lpath) node.ssh.get(rpaths, lpath)
class CmdGet(ClusterCompleter): for rpath in rpaths: if not glob.has_magic(rpath) and not node.ssh.path_exists(rpath): raise exception.BaseException( "Remote file or directory does not exist: %s" % rpath) node.ssh.get(rpaths, lpath)
1,719
https://:@github.com/Afoucaul/pyx.git
de3367e912c06c7485102b40844d4593eca7d928
@@ -28,7 +28,7 @@ def retrieve_task(name): def execute_task(task_name, args): task = retrieve_task(task_name) - subprocess.run(["python3", task_name] + args) + subprocess.run(["python3", task] + args) def print_command_list():
pyx/__main__.py
ReplaceText(target='task' @(31,31)->(31,40))
def retrieve_task(name): def execute_task(task_name, args): task = retrieve_task(task_name) subprocess.run(["python3", task_name] + args) def print_command_list():
def retrieve_task(name): def execute_task(task_name, args): task = retrieve_task(task_name) subprocess.run(["python3", task] + args) def print_command_list():
1,720
https://:@github.com/ziplokk1/python-amazon-mws-tools.git
0d45b6519c3c1f25c473f03ea49f1b8968a43a54
@@ -15,7 +15,7 @@ class GetCompetitivePricingForAsinRequester(object): @raise_for_error def _request(self, asins, marketplaceid): - response = self.api.get_competitive_pricing_for_asin(asins, marketplaceid) + response = self.api.get_competitive_pricing_for_asin(marketplaceid, asins) write_response(response, 'GetCompetitivePricingForAsinResponse.xml') response.raise_for_status() return response.content
mwstools/requesters/products.py
ArgSwap(idxs=0<->1 @(18,19)->(18,60))
class GetCompetitivePricingForAsinRequester(object): @raise_for_error def _request(self, asins, marketplaceid): response = self.api.get_competitive_pricing_for_asin(asins, marketplaceid) write_response(response, 'GetCompetitivePricingForAsinResponse.xml') response.raise_for_status() return response.content
class GetCompetitivePricingForAsinRequester(object): @raise_for_error def _request(self, asins, marketplaceid): response = self.api.get_competitive_pricing_for_asin(marketplaceid, asins) write_response(response, 'GetCompetitivePricingForAsinResponse.xml') response.raise_for_status() return response.content
1,721
https://:@github.com/techhat/grabbr.git
8cacc0a60f1a66c60966e389b0d5b494b7540a4e
@@ -94,7 +94,7 @@ def run(run_opts=None): # pylint: disable=too-many-return-statements out.info(pprint.pformat(opts)) return - if context.get('show_context'): + if opts.get('show_context'): out.info(pprint.pformat(context)) return
flayer/scripts.py
ReplaceText(target='opts' @(97,7)->(97,14))
def run(run_opts=None): # pylint: disable=too-many-return-statements out.info(pprint.pformat(opts)) return if context.get('show_context'): out.info(pprint.pformat(context)) return
def run(run_opts=None): # pylint: disable=too-many-return-statements out.info(pprint.pformat(opts)) return if opts.get('show_context'): out.info(pprint.pformat(context)) return
1,722
https://:@github.com/seetaresearch/Dragon.git
e90a8f1a6e53b6403c9dc81c45be4665574937bc
@@ -39,7 +39,7 @@ class BlobFetcher(multiprocessing.Process): super(BlobFetcher, self).__init__() self._batch_size = kwargs.get('batch_size', 128) self._partition = kwargs.get('partition', False) - if self._partition: self._batch_size /= kwargs['group_size'] + if self._partition: self._batch_size //= kwargs['group_size'] self.Q_in = self.Q_out = None self.daemon = True
Dragon/python/dragon/utils/vision/blob_fetcher.py
ReplaceText(target='//=' @(42,45)->(42,47))
class BlobFetcher(multiprocessing.Process): super(BlobFetcher, self).__init__() self._batch_size = kwargs.get('batch_size', 128) self._partition = kwargs.get('partition', False) if self._partition: self._batch_size /= kwargs['group_size'] self.Q_in = self.Q_out = None self.daemon = True
class BlobFetcher(multiprocessing.Process): super(BlobFetcher, self).__init__() self._batch_size = kwargs.get('batch_size', 128) self._partition = kwargs.get('partition', False) if self._partition: self._batch_size //= kwargs['group_size'] self.Q_in = self.Q_out = None self.daemon = True
1,723
https://:@github.com/powersj/ubuntu-release-info.git
09808f92dce3afcdee9f2f478587f4ad67ee906b
@@ -79,7 +79,7 @@ class Release: def __ne__(self, other): """Return not equal boolean.""" - if not isinstance(other, Release): + if isinstance(other, Release): return False return not self.__eq__(other)
ubuntu_release_info/release.py
ReplaceText(target='' @(82,11)->(82,15))
class Release: def __ne__(self, other): """Return not equal boolean.""" if not isinstance(other, Release): return False return not self.__eq__(other)
class Release: def __ne__(self, other): """Return not equal boolean.""" if isinstance(other, Release): return False return not self.__eq__(other)
1,724
https://:@github.com/aimagelab/speaksee.git
895b3fd57b934b75ad683bfba2a77f76a54a9570
@@ -16,7 +16,7 @@ class Meteor: jar_path = os.path.join(base_path, METEOR_JAR) gz_path = os.path.join(base_path, os.path.basename(METEOR_GZ_URL)) if not os.path.isfile(jar_path): - if not os.path.isfile(jar_path): + if not os.path.isfile(gz_path): download_from_url(METEOR_GZ_URL, gz_path) tar = tarfile.open(gz_path, "r") tar.extractall(path=os.path.dirname(os.path.abspath(__file__)))
speaksee/evaluation/meteor/meteor.py
ReplaceText(target='gz_path' @(19,34)->(19,42))
class Meteor: jar_path = os.path.join(base_path, METEOR_JAR) gz_path = os.path.join(base_path, os.path.basename(METEOR_GZ_URL)) if not os.path.isfile(jar_path): if not os.path.isfile(jar_path): download_from_url(METEOR_GZ_URL, gz_path) tar = tarfile.open(gz_path, "r") tar.extractall(path=os.path.dirname(os.path.abspath(__file__)))
class Meteor: jar_path = os.path.join(base_path, METEOR_JAR) gz_path = os.path.join(base_path, os.path.basename(METEOR_GZ_URL)) if not os.path.isfile(jar_path): if not os.path.isfile(gz_path): download_from_url(METEOR_GZ_URL, gz_path) tar = tarfile.open(gz_path, "r") tar.extractall(path=os.path.dirname(os.path.abspath(__file__)))
1,725
https://:@github.com/nitely/regexy.git
6b260a4464763dc483058bff9450ca7306031abe
@@ -315,7 +315,7 @@ def search(nfa: NFA, text: Iterator[str]) -> Union[MatchedType, None]: captured=captured, chars=(char, next_char))) - curr_states_set.extend(curr_states( + next_states_set.extend(curr_states( state=nfa.state, captured=None, chars=(char, next_char)))
regexy/process/match.py
ReplaceText(target='next_states_set' @(318,8)->(318,23))
def search(nfa: NFA, text: Iterator[str]) -> Union[MatchedType, None]: captured=captured, chars=(char, next_char))) curr_states_set.extend(curr_states( state=nfa.state, captured=None, chars=(char, next_char)))
def search(nfa: NFA, text: Iterator[str]) -> Union[MatchedType, None]: captured=captured, chars=(char, next_char))) next_states_set.extend(curr_states( state=nfa.state, captured=None, chars=(char, next_char)))
1,726
https://:@github.com/vertcoin/electrum-vtc.git
3835751fac314a7c8f7e11edede64bc409877e88
@@ -553,7 +553,7 @@ class InstallWizard(QDialog): if Wallet.is_seed(text3): wallet.add_cosigner_seed(text3, "x3/", password) elif Wallet.is_xpub(text3): - wallet.add_master_public_key("x3/", text2) + wallet.add_master_public_key("x3/", text3) wallet.create_main_account(password)
gui/qt/installwizard.py
ReplaceText(target='text3' @(556,56)->(556,61))
class InstallWizard(QDialog): if Wallet.is_seed(text3): wallet.add_cosigner_seed(text3, "x3/", password) elif Wallet.is_xpub(text3): wallet.add_master_public_key("x3/", text2) wallet.create_main_account(password)
class InstallWizard(QDialog): if Wallet.is_seed(text3): wallet.add_cosigner_seed(text3, "x3/", password) elif Wallet.is_xpub(text3): wallet.add_master_public_key("x3/", text3) wallet.create_main_account(password)
1,727
https://:@github.com/vertcoin/electrum-vtc.git
0947eb7960496eeb959a4af3fd3c9097a3e27e56
@@ -243,7 +243,7 @@ class Network(threading.Thread): self.config.set_key("proxy", proxy_str, True) self.config.set_key("server", server_str, True) # abort if changes were not allowed by config - if self.config.get('server') != server_str or self.config.get('proxy') != proxy: + if self.config.get('server') != server_str or self.config.get('proxy') != proxy_str: return if self.proxy != proxy or self.protocol != protocol:
lib/network.py
ReplaceText(target='proxy_str' @(246,82)->(246,87))
class Network(threading.Thread): self.config.set_key("proxy", proxy_str, True) self.config.set_key("server", server_str, True) # abort if changes were not allowed by config if self.config.get('server') != server_str or self.config.get('proxy') != proxy: return if self.proxy != proxy or self.protocol != protocol:
class Network(threading.Thread): self.config.set_key("proxy", proxy_str, True) self.config.set_key("server", server_str, True) # abort if changes were not allowed by config if self.config.get('server') != server_str or self.config.get('proxy') != proxy_str: return if self.proxy != proxy or self.protocol != protocol:
1,728
https://:@github.com/vertcoin/electrum-vtc.git
c35485c1c21d11b3dc067d5e8afaedd3827c0ce0
@@ -115,7 +115,7 @@ class Plugin(BasePlugin): def transaction_dialog(self, d): self.send_button = b = QPushButton(_("Send to cosigner")) b.clicked.connect(lambda: self.do_send(d.tx)) - d.buttons.insert(2, b) + d.buttons.insert(0, b) self.transaction_dialog_update(d) @hook
plugins/cosigner_pool.py
ReplaceText(target='0' @(118,25)->(118,26))
class Plugin(BasePlugin): def transaction_dialog(self, d): self.send_button = b = QPushButton(_("Send to cosigner")) b.clicked.connect(lambda: self.do_send(d.tx)) d.buttons.insert(2, b) self.transaction_dialog_update(d) @hook
class Plugin(BasePlugin): def transaction_dialog(self, d): self.send_button = b = QPushButton(_("Send to cosigner")) b.clicked.connect(lambda: self.do_send(d.tx)) d.buttons.insert(0, b) self.transaction_dialog_update(d) @hook
1,729
https://:@github.com/vertcoin/electrum-vtc.git
bce42cb496e2516420623a455a6080848a2d3a7c
@@ -188,7 +188,7 @@ class TxDialog(QDialog, MessageBoxMixin): height, conf, timestamp = self.wallet.get_tx_height(tx_hash) if height > 0: if conf: - status = _("%d confirmations") % height + status = _("%d confirmations") % conf time_str = datetime.datetime.fromtimestamp(timestamp).isoformat(' ')[:-3] else: status = _('Not verified')
gui/qt/transaction_dialog.py
ReplaceText(target='conf' @(191,57)->(191,63))
class TxDialog(QDialog, MessageBoxMixin): height, conf, timestamp = self.wallet.get_tx_height(tx_hash) if height > 0: if conf: status = _("%d confirmations") % height time_str = datetime.datetime.fromtimestamp(timestamp).isoformat(' ')[:-3] else: status = _('Not verified')
class TxDialog(QDialog, MessageBoxMixin): height, conf, timestamp = self.wallet.get_tx_height(tx_hash) if height > 0: if conf: status = _("%d confirmations") % conf time_str = datetime.datetime.fromtimestamp(timestamp).isoformat(' ')[:-3] else: status = _('Not verified')
1,730
https://:@github.com/vertcoin/electrum-vtc.git
688dd07381c28090dd0bbb6bb2b9c96fd7dc9ad0
@@ -32,7 +32,7 @@ class Plugin(DigitalBitboxPlugin, QtPluginBase): if len(addrs) == 1: def show_address(): - keystore.thread.add(partial(self.show_address, wallet, keystore, addrs[0])) + keystore.thread.add(partial(self.show_address, wallet, addrs[0], keystore)) menu.addAction(_("Show on {}").format(self.device), show_address)
plugins/digitalbitbox/qt.py
ArgSwap(idxs=2<->3 @(35,36)->(35,43))
class Plugin(DigitalBitboxPlugin, QtPluginBase): if len(addrs) == 1: def show_address(): keystore.thread.add(partial(self.show_address, wallet, keystore, addrs[0])) menu.addAction(_("Show on {}").format(self.device), show_address)
class Plugin(DigitalBitboxPlugin, QtPluginBase): if len(addrs) == 1: def show_address(): keystore.thread.add(partial(self.show_address, wallet, addrs[0], keystore)) menu.addAction(_("Show on {}").format(self.device), show_address)
1,731
https://:@github.com/mpevnev/epp.git
7fc959840f17ceaa50764853b802721b1039a29e
@@ -189,7 +189,7 @@ def parse(seed, state_or_string, parser, verbose=False): after = parser(state) if after.effect is not None: return after, after.effect(seed, after) - return state, seed + return after, seed except ParsingFailure as failure: if verbose: return failure
src/epp/core.py
ReplaceText(target='after' @(192,15)->(192,20))
def parse(seed, state_or_string, parser, verbose=False): after = parser(state) if after.effect is not None: return after, after.effect(seed, after) return state, seed except ParsingFailure as failure: if verbose: return failure
def parse(seed, state_or_string, parser, verbose=False): after = parser(state) if after.effect is not None: return after, after.effect(seed, after) return after, seed except ParsingFailure as failure: if verbose: return failure
1,732
https://:@github.com/MarineDataTools/pycnv.git
c2a0387257ef4b96cd8e2af2690be14e9c74c208
@@ -251,7 +251,7 @@ def parse_iow_header(header,pycnv_object=None): lat_str_min = latitude.split()[1][:-1] # The old Reise has ',' as decimal seperator, replace it with '.' lon_str_min = lon_str_min.replace(',','.') - lat_str_min = lon_str_min.replace(',','.') + lat_str_min = lat_str_min.replace(',','.') # Convert to floats lon = SIGN_WEST * float(longitude.split()[0]) + float(lon_str_min)/60. lat = SIGN_NORTH * float(latitude.split()[0]) + float(lat_str_min)/60.
pycnv/pycnv.py
ReplaceText(target='lat_str_min' @(254,30)->(254,41))
def parse_iow_header(header,pycnv_object=None): lat_str_min = latitude.split()[1][:-1] # The old Reise has ',' as decimal seperator, replace it with '.' lon_str_min = lon_str_min.replace(',','.') lat_str_min = lon_str_min.replace(',','.') # Convert to floats lon = SIGN_WEST * float(longitude.split()[0]) + float(lon_str_min)/60. lat = SIGN_NORTH * float(latitude.split()[0]) + float(lat_str_min)/60.
def parse_iow_header(header,pycnv_object=None): lat_str_min = latitude.split()[1][:-1] # The old Reise has ',' as decimal seperator, replace it with '.' lon_str_min = lon_str_min.replace(',','.') lat_str_min = lat_str_min.replace(',','.') # Convert to floats lon = SIGN_WEST * float(longitude.split()[0]) + float(lon_str_min)/60. lat = SIGN_NORTH * float(latitude.split()[0]) + float(lat_str_min)/60.
1,733
https://:@github.com/nelimeee/qasm2image.git
d782f7b9d9dcdcfa76ae22c6211a03b656d99980
@@ -296,7 +296,7 @@ def _draw_classically_conditioned_part(drawing: Drawing, operation=operation) x_coord = _helpers.get_x_from_index(index_to_draw) yq_coord = _helpers.get_y_from_quantum_register(qubits[0], bit_mapping) - yc_coord = _helpers.get_y_from_classical_register(total_clbits_number-1, total_qubits_number, + yc_coord = _helpers.get_y_from_classical_register(number_of_clbits-1, total_qubits_number, bit_mapping) # Then draw the double line representing the classical control. _draw_classical_double_line(drawing, x_coord, yq_coord, x_coord, yc_coord)
qasm2image/svg/_drawing.py
ReplaceText(target='number_of_clbits' @(299,54)->(299,73))
def _draw_classically_conditioned_part(drawing: Drawing, operation=operation) x_coord = _helpers.get_x_from_index(index_to_draw) yq_coord = _helpers.get_y_from_quantum_register(qubits[0], bit_mapping) yc_coord = _helpers.get_y_from_classical_register(total_clbits_number-1, total_qubits_number, bit_mapping) # Then draw the double line representing the classical control. _draw_classical_double_line(drawing, x_coord, yq_coord, x_coord, yc_coord)
def _draw_classically_conditioned_part(drawing: Drawing, operation=operation) x_coord = _helpers.get_x_from_index(index_to_draw) yq_coord = _helpers.get_y_from_quantum_register(qubits[0], bit_mapping) yc_coord = _helpers.get_y_from_classical_register(number_of_clbits-1, total_qubits_number, bit_mapping) # Then draw the double line representing the classical control. _draw_classical_double_line(drawing, x_coord, yq_coord, x_coord, yc_coord)
1,734
https://:@github.com/iportillo/ITU-Rpy.git
3ee41f116cf7400097837aca514f36b2a62d0f3f
@@ -103,7 +103,7 @@ class _ITU835_5(): P = np.zeros((n + 1)) P[0] = P_0 for i in range(n): - h_p = H[ret_i] if i == (n - 1) else H[i + 1] + h_p = h[ret_i] if i == (n - 1) else H[i + 1] if L[i] != 0: P[i + 1] = P[i] * \ (T[i] / (T[i] + L[i] * (h_p - H[i])))**(34.163 / L[i])
itur/models/itu835.py
ReplaceText(target='h' @(106,22)->(106,23))
class _ITU835_5(): P = np.zeros((n + 1)) P[0] = P_0 for i in range(n): h_p = H[ret_i] if i == (n - 1) else H[i + 1] if L[i] != 0: P[i + 1] = P[i] * \ (T[i] / (T[i] + L[i] * (h_p - H[i])))**(34.163 / L[i])
class _ITU835_5(): P = np.zeros((n + 1)) P[0] = P_0 for i in range(n): h_p = h[ret_i] if i == (n - 1) else H[i + 1] if L[i] != 0: P[i + 1] = P[i] * \ (T[i] / (T[i] + L[i] * (h_p - H[i])))**(34.163 / L[i])
1,735
https://:@github.com/uw-loci/mp-python-modules.git
bf29e09937e4b119cac002762b170438fe00e13a
@@ -164,7 +164,7 @@ def process_orientation_alignment(ret_image_path, orient_image_path, retardance, orientation = calculate_retardance_over_area( ret_roi, orient_roi) - alignment = calculate_alignment(orient_tile) + alignment = calculate_alignment(orient_roi) sample = blk.get_core_file_name(output_path) mouse, slide = sample.split('-')
mp_img_manip/polarimetry.py
ReplaceText(target='orient_roi' @(167,56)->(167,67))
def process_orientation_alignment(ret_image_path, orient_image_path, retardance, orientation = calculate_retardance_over_area( ret_roi, orient_roi) alignment = calculate_alignment(orient_tile) sample = blk.get_core_file_name(output_path) mouse, slide = sample.split('-')
def process_orientation_alignment(ret_image_path, orient_image_path, retardance, orientation = calculate_retardance_over_area( ret_roi, orient_roi) alignment = calculate_alignment(orient_roi) sample = blk.get_core_file_name(output_path) mouse, slide = sample.split('-')
1,736
https://:@github.com/uw-loci/mp-python-modules.git
0d7c717669ebb28a61909ce9b8cefb05ccb80dd5
@@ -48,7 +48,7 @@ def create_dictionary( "mhr_large_orient": os.path.join(base_dir, prep_dir, 'MHR_Large_Orient'), "mlr_large": os.path.join(base_dir, prep_dir, 'MLR_Large'), "mlr_large_orient": os.path.join(base_dir, prep_dir, 'MLR_Large_Orient'), - "he_small": os.path.join(base_dir, prep_dir, 'HE_Small'), + "he_small": os.path.join(base_dir, resize_dir, 'HE_Small'), "he_large": os.path.join(base_dir, prep_dir, 'HE_Large'), "shg_small": os.path.join(base_dir, resize_dir, 'SHG_Small'),
mp_img_manip/dir_dictionary.py
ReplaceText(target='resize_dir' @(51,43)->(51,51))
def create_dictionary( "mhr_large_orient": os.path.join(base_dir, prep_dir, 'MHR_Large_Orient'), "mlr_large": os.path.join(base_dir, prep_dir, 'MLR_Large'), "mlr_large_orient": os.path.join(base_dir, prep_dir, 'MLR_Large_Orient'), "he_small": os.path.join(base_dir, prep_dir, 'HE_Small'), "he_large": os.path.join(base_dir, prep_dir, 'HE_Large'), "shg_small": os.path.join(base_dir, resize_dir, 'SHG_Small'),
def create_dictionary( "mhr_large_orient": os.path.join(base_dir, prep_dir, 'MHR_Large_Orient'), "mlr_large": os.path.join(base_dir, prep_dir, 'MLR_Large'), "mlr_large_orient": os.path.join(base_dir, prep_dir, 'MLR_Large_Orient'), "he_small": os.path.join(base_dir, resize_dir, 'HE_Small'), "he_large": os.path.join(base_dir, prep_dir, 'HE_Large'), "shg_small": os.path.join(base_dir, resize_dir, 'SHG_Small'),
1,737
https://:@github.com/uw-loci/mp-python-modules.git
1b703cd8f176c289d52c195094a7f2035ebf0a15
@@ -78,7 +78,7 @@ def plot_overlay(fixed_image: sitk.Image, moving_image: sitk.Image, transform: s if downsample: fixed_shrunk = trans.resize_image(fixed_image, fixed_image.GetSpacing()[0], downsample_target) - rotated_shrunk = trans.resize_image(rotated_image, moving_image.GetSpacing()[0], downsample_target) + rotated_shrunk = trans.resize_image(rotated_image, fixed_image.GetSpacing()[0], downsample_target) spacing = fixed_shrunk.GetSpacing() overlay_array = overlay_images(fixed_shrunk, rotated_shrunk)
multiscale/itk/itk_plotting.py
ReplaceText(target='fixed_image' @(81,67)->(81,79))
def plot_overlay(fixed_image: sitk.Image, moving_image: sitk.Image, transform: s if downsample: fixed_shrunk = trans.resize_image(fixed_image, fixed_image.GetSpacing()[0], downsample_target) rotated_shrunk = trans.resize_image(rotated_image, moving_image.GetSpacing()[0], downsample_target) spacing = fixed_shrunk.GetSpacing() overlay_array = overlay_images(fixed_shrunk, rotated_shrunk)
def plot_overlay(fixed_image: sitk.Image, moving_image: sitk.Image, transform: s if downsample: fixed_shrunk = trans.resize_image(fixed_image, fixed_image.GetSpacing()[0], downsample_target) rotated_shrunk = trans.resize_image(rotated_image, fixed_image.GetSpacing()[0], downsample_target) spacing = fixed_shrunk.GetSpacing() overlay_array = overlay_images(fixed_shrunk, rotated_shrunk)
1,738
https://:@github.com/uw-loci/mp-python-modules.git
66a12265d2e2289686d445c9a9785581773bc31b
@@ -106,7 +106,7 @@ def process_orientation_alignment(ret_image_path, orient_image_path, if roi_size is None: with open(output_path, 'w', newline='') as csvfile: print('\nWriting average retardance file for {} at tile size {}'.format( - output_path.name, tile_size[0])) + ret_image_path.name, tile_size[0])) writer = csv.writer(csvfile) writer.writerow(['Mouse', 'Slide', 'Modality', 'Tile', 'Retardance', 'Orientation', 'Alignment'])
multiscale/polarimetry/polarimetry.py
ReplaceText(target='ret_image_path' @(109,32)->(109,43))
def process_orientation_alignment(ret_image_path, orient_image_path, if roi_size is None: with open(output_path, 'w', newline='') as csvfile: print('\nWriting average retardance file for {} at tile size {}'.format( output_path.name, tile_size[0])) writer = csv.writer(csvfile) writer.writerow(['Mouse', 'Slide', 'Modality', 'Tile', 'Retardance', 'Orientation', 'Alignment'])
def process_orientation_alignment(ret_image_path, orient_image_path, if roi_size is None: with open(output_path, 'w', newline='') as csvfile: print('\nWriting average retardance file for {} at tile size {}'.format( ret_image_path.name, tile_size[0])) writer = csv.writer(csvfile) writer.writerow(['Mouse', 'Slide', 'Modality', 'Tile', 'Retardance', 'Orientation', 'Alignment'])
1,739
https://:@github.com/doubleo8/e2openplugin-OpenWebif.git
41ae09e6d9003cc234f37c228e14227365b2cf84
@@ -251,7 +251,7 @@ def getInfo(): elif iecsize > 1000: iecsize = "%d GB" % ((iecsize + 500) // 1000) else: - iecsize = "%d MB" % size + iecsize = "%d MB" % iecsize info['hdd'].append({ "model": hdd.model(),
plugin/controllers/models/info.py
ReplaceText(target='iecsize' @(254,23)->(254,27))
def getInfo(): elif iecsize > 1000: iecsize = "%d GB" % ((iecsize + 500) // 1000) else: iecsize = "%d MB" % size info['hdd'].append({ "model": hdd.model(),
def getInfo(): elif iecsize > 1000: iecsize = "%d GB" % ((iecsize + 500) // 1000) else: iecsize = "%d MB" % iecsize info['hdd'].append({ "model": hdd.model(),
1,740
https://:@github.com/doubleo8/e2openplugin-OpenWebif.git
3450c566c64c05386771b243135583d611b0b68d
@@ -303,7 +303,7 @@ class EventsController(object): if minutes is None: minutes = QUERY_MINUTES_ANY - if querytype != QUERYTYPE_LOOKUP__ID: + if querytype == QUERYTYPE_LOOKUP__ID: arglist = (service_reference, querytype, begin) else: arglist = (service_reference, querytype, begin, minutes)
plugin/controllers/events.py
ReplaceText(target='==' @(306,21)->(306,23))
class EventsController(object): if minutes is None: minutes = QUERY_MINUTES_ANY if querytype != QUERYTYPE_LOOKUP__ID: arglist = (service_reference, querytype, begin) else: arglist = (service_reference, querytype, begin, minutes)
class EventsController(object): if minutes is None: minutes = QUERY_MINUTES_ANY if querytype == QUERYTYPE_LOOKUP__ID: arglist = (service_reference, querytype, begin) else: arglist = (service_reference, querytype, begin, minutes)
1,741
https://:@github.com/alexbahnisch/mosi.py.git
3e2f73c5e3b5e87ca6f2b4a7f391e01ee2e9a89e
@@ -5,7 +5,7 @@ class BaseObject: @classmethod def isinstance(cls, instance): - if not isinstance(instance, cls): + if isinstance(instance, cls): return instance else: raise TypeError("'%s' is not an instance of '%s'" % (instance, cls.__name__))
src/main/mosi/common/base.py
ReplaceText(target='' @(8,11)->(8,15))
class BaseObject: @classmethod def isinstance(cls, instance): if not isinstance(instance, cls): return instance else: raise TypeError("'%s' is not an instance of '%s'" % (instance, cls.__name__))
class BaseObject: @classmethod def isinstance(cls, instance): if isinstance(instance, cls): return instance else: raise TypeError("'%s' is not an instance of '%s'" % (instance, cls.__name__))
1,742
https://:@github.com/hudora/huSoftM.git
24a5bc8359d376e681ad04e46b43c3d177f6b1e1
@@ -168,7 +168,7 @@ def get_kunde_by_iln(iln): if rows: rows2 = husoftm.connection.get_connection().query(['XXA00'], condition="XASANR='%s'" % (int(rows[0]['satznr']), )) - if rows: + if rows2: kunde = Kunde().fill_from_softm(rows2[0]) kunde.kundennr = kunde.kundennr + ('/%03d' % int(rows[0]['versandadresssnr'])) return kunde
husoftm/kunden.py
ReplaceText(target='rows2' @(171,15)->(171,19))
def get_kunde_by_iln(iln): if rows: rows2 = husoftm.connection.get_connection().query(['XXA00'], condition="XASANR='%s'" % (int(rows[0]['satznr']), )) if rows: kunde = Kunde().fill_from_softm(rows2[0]) kunde.kundennr = kunde.kundennr + ('/%03d' % int(rows[0]['versandadresssnr'])) return kunde
def get_kunde_by_iln(iln): if rows: rows2 = husoftm.connection.get_connection().query(['XXA00'], condition="XASANR='%s'" % (int(rows[0]['satznr']), )) if rows2: kunde = Kunde().fill_from_softm(rows2[0]) kunde.kundennr = kunde.kundennr + ('/%03d' % int(rows[0]['versandadresssnr'])) return kunde
1,743
https://:@github.com/tcalmant/ipopo.git
e20719b0abd219171d2475f0173273fbcb010c2a
@@ -218,7 +218,7 @@ class ComponentFactoryC(TestComponentFactory): self.states.append(IPopoEvent.UNBOUND) # Assert that the service has been removed - assert svc not in self.services + assert svc in self.services # ------------------------------------------------------------------------------
tests/ipopo_bundle.py
ReplaceText(target=' in ' @(221,18)->(221,26))
class ComponentFactoryC(TestComponentFactory): self.states.append(IPopoEvent.UNBOUND) # Assert that the service has been removed assert svc not in self.services # ------------------------------------------------------------------------------
class ComponentFactoryC(TestComponentFactory): self.states.append(IPopoEvent.UNBOUND) # Assert that the service has been removed assert svc in self.services # ------------------------------------------------------------------------------
1,744
https://:@github.com/tcalmant/ipopo.git
c01df06c7514898146d56fed710fbde194233526
@@ -133,7 +133,7 @@ class ConfigAdminCommands(object): new_properties.update(kwargs) # Update configuration - config.update(kwargs) + config.update(new_properties) def delete(self, io_handler, pid, **kwargs):
pelix/shell/configadmin.py
ReplaceText(target='new_properties' @(136,22)->(136,28))
class ConfigAdminCommands(object): new_properties.update(kwargs) # Update configuration config.update(kwargs) def delete(self, io_handler, pid, **kwargs):
class ConfigAdminCommands(object): new_properties.update(kwargs) # Update configuration config.update(new_properties) def delete(self, io_handler, pid, **kwargs):
1,745
https://:@github.com/buxx/AntStar.git
5d7cfd673453d5c97843707dd719e638d5a7acfe
@@ -23,7 +23,7 @@ class BuxxAntBrain(AntBrain): def _add_memory_since_blocked(self, position): memory_since_blocked = self.get_memory_since_blocked() memory_since_blocked.append(position) - self._set_memory_since_blocked(position) + self._set_memory_since_blocked(memory_since_blocked) def is_by_passing(self): return self._by_passing
antstar/BuxxAntBrain.py
ReplaceText(target='memory_since_blocked' @(26,39)->(26,47))
class BuxxAntBrain(AntBrain): def _add_memory_since_blocked(self, position): memory_since_blocked = self.get_memory_since_blocked() memory_since_blocked.append(position) self._set_memory_since_blocked(position) def is_by_passing(self): return self._by_passing
class BuxxAntBrain(AntBrain): def _add_memory_since_blocked(self, position): memory_since_blocked = self.get_memory_since_blocked() memory_since_blocked.append(position) self._set_memory_since_blocked(memory_since_blocked) def is_by_passing(self): return self._by_passing
1,746
https://:@github.com/keystonetowersystems/siquant.git
586dd72d0e7e6de3d244ad10288cbc6b9586464c
@@ -30,7 +30,7 @@ class Quantity: return self.__class__(self.get_as(units), units) def normalized(self): - return self.__class__(self._quantity / self._units._scale, self._units.base_units()) + return self.__class__(self._quantity * self._units._scale, self._units.base_units()) def __add__(self, other): if isinstance(other, self.__class__):
siquant/quantities.py
ReplaceText(target='*' @(33,45)->(33,46))
class Quantity: return self.__class__(self.get_as(units), units) def normalized(self): return self.__class__(self._quantity / self._units._scale, self._units.base_units()) def __add__(self, other): if isinstance(other, self.__class__):
class Quantity: return self.__class__(self.get_as(units), units) def normalized(self): return self.__class__(self._quantity * self._units._scale, self._units.base_units()) def __add__(self, other): if isinstance(other, self.__class__):
1,747
https://:@github.com/maykinmedia/django-rijkshuisstijl.git
08ce24312018313c1908ea0c9430118ce5182df8
@@ -64,7 +64,7 @@ def form(context, form=None, label="", **kwargs): config["status"] = config.get("status") config["intro_status"] = config.get("intro_status") config["tag"] = config.get("tag", "form") - config["actions"] = parse_kwarg(kwargs, "actions", []) # TODO: Default action + config["actions"] = parse_kwarg(config, "actions", []) # TODO: Default action config["actions_align"] = config.get("actions_align", "left") config["actions_position"] = config.get("actions_position", "auto") config["help_text_position"] = config.get("help_text_position", settings.RH_HELP_TEXT_POSITION)
rijkshuisstijl/templatetags/rijkshuisstijl_form.py
ReplaceText(target='config' @(67,36)->(67,42))
def form(context, form=None, label="", **kwargs): config["status"] = config.get("status") config["intro_status"] = config.get("intro_status") config["tag"] = config.get("tag", "form") config["actions"] = parse_kwarg(kwargs, "actions", []) # TODO: Default action config["actions_align"] = config.get("actions_align", "left") config["actions_position"] = config.get("actions_position", "auto") config["help_text_position"] = config.get("help_text_position", settings.RH_HELP_TEXT_POSITION)
def form(context, form=None, label="", **kwargs): config["status"] = config.get("status") config["intro_status"] = config.get("intro_status") config["tag"] = config.get("tag", "form") config["actions"] = parse_kwarg(config, "actions", []) # TODO: Default action config["actions_align"] = config.get("actions_align", "left") config["actions_position"] = config.get("actions_position", "auto") config["help_text_position"] = config.get("help_text_position", settings.RH_HELP_TEXT_POSITION)
1,748
https://:@github.com/seandavidmcgee/remodel.git
022acfaad861270c9467a80708c169c5336564e9
@@ -34,7 +34,7 @@ class FieldHandlerBase(type): dct[field] = BelongsToDescriptor(other, lkey, rkey) dct['related'].add(field) dct['restricted'].add(lkey) - index_registry.register(other, lkey) + index_registry.register(model, lkey) for rel in dct.pop('has_many'): if isinstance(rel, tuple): other, field, lkey, rkey = rel
remodel/field_handler.py
ReplaceText(target='model' @(37,36)->(37,41))
class FieldHandlerBase(type): dct[field] = BelongsToDescriptor(other, lkey, rkey) dct['related'].add(field) dct['restricted'].add(lkey) index_registry.register(other, lkey) for rel in dct.pop('has_many'): if isinstance(rel, tuple): other, field, lkey, rkey = rel
class FieldHandlerBase(type): dct[field] = BelongsToDescriptor(other, lkey, rkey) dct['related'].add(field) dct['restricted'].add(lkey) index_registry.register(model, lkey) for rel in dct.pop('has_many'): if isinstance(rel, tuple): other, field, lkey, rkey = rel
1,749
https://:@github.com/eddieantonio/fst-lookup.git
f8bf12528168bf1f27585d28aec32afb8097f559
@@ -253,7 +253,7 @@ if True: # state num, in/out, target, final state src, in_label, dest, is_final = arc_def if is_final == 1: - assert in_label == -1 or dest == -1 + assert in_label == -1 and dest == -1 arc_simple = src, in_label, in_label, dest, is_final elif num_items == 5: arc_simple = arc_def # type: ignore
fst_lookup/parse.py
ReplaceText(target='and' @(256,38)->(256,40))
if True: # state num, in/out, target, final state src, in_label, dest, is_final = arc_def if is_final == 1: assert in_label == -1 or dest == -1 arc_simple = src, in_label, in_label, dest, is_final elif num_items == 5: arc_simple = arc_def # type: ignore
if True: # state num, in/out, target, final state src, in_label, dest, is_final = arc_def if is_final == 1: assert in_label == -1 and dest == -1 arc_simple = src, in_label, in_label, dest, is_final elif num_items == 5: arc_simple = arc_def # type: ignore
1,750
https://:@github.com/datasnakes/OrthoEvolution.git
5cb58ce3c3bca9f468a942e6d090f0aa54e01982
@@ -239,7 +239,7 @@ class CompGenAnalysis(PM): # Gene analysis self.mygene_df = self.my_gene_info() - self.mygene_df.to_csv(self.mygene_df, self.mygene_path) + self.mygene_df.to_csv(self.mygene_path, self.mygene_df) # Accession file analysis if self.__post_blast: self.missing_dict = self.get_miss_acc()
Orthologs/CompGenetics/comp_gen.py
ArgSwap(idxs=0<->1 @(242,8)->(242,29))
class CompGenAnalysis(PM): # Gene analysis self.mygene_df = self.my_gene_info() self.mygene_df.to_csv(self.mygene_df, self.mygene_path) # Accession file analysis if self.__post_blast: self.missing_dict = self.get_miss_acc()
class CompGenAnalysis(PM): # Gene analysis self.mygene_df = self.my_gene_info() self.mygene_df.to_csv(self.mygene_path, self.mygene_df) # Accession file analysis if self.__post_blast: self.missing_dict = self.get_miss_acc()
1,751
https://:@github.com/datasnakes/OrthoEvolution.git
2e64342b400356667a594477fc6c3792a0ab5bf6
@@ -432,7 +432,7 @@ class Qsub(BaseQsub): """ if not rerun: # Format or copy the python script. - if python_attributes is None: + if python_attributes is not None: self.format_python_script(py_template_string=py_template_string, py_template_file=py_template_file, python_attributes=python_attributes) elif not self.python_script.exists():
OrthoEvol/Tools/pbs/qsub.py
ReplaceText(target=' is not ' @(435,32)->(435,36))
class Qsub(BaseQsub): """ if not rerun: # Format or copy the python script. if python_attributes is None: self.format_python_script(py_template_string=py_template_string, py_template_file=py_template_file, python_attributes=python_attributes) elif not self.python_script.exists():
class Qsub(BaseQsub): """ if not rerun: # Format or copy the python script. if python_attributes is not None: self.format_python_script(py_template_string=py_template_string, py_template_file=py_template_file, python_attributes=python_attributes) elif not self.python_script.exists():
1,752
https://:@github.com/etianen/cms.git
ba145043590e03f70de0455a969bc6eb220db137
@@ -140,7 +140,7 @@ class PageBase(PublishedModel): "title": self.browser_title or self.title, "header": self.title} page_context.update(context or {}) - return render_to_response(template, context, RequestContext(request), **kwargs) + return render_to_response(template, page_context, RequestContext(request), **kwargs) # Base model methods.
src/cms/apps/pages/models/base.py
ReplaceText(target='page_context' @(143,44)->(143,51))
class PageBase(PublishedModel): "title": self.browser_title or self.title, "header": self.title} page_context.update(context or {}) return render_to_response(template, context, RequestContext(request), **kwargs) # Base model methods.
class PageBase(PublishedModel): "title": self.browser_title or self.title, "header": self.title} page_context.update(context or {}) return render_to_response(template, page_context, RequestContext(request), **kwargs) # Base model methods.
1,753
https://:@github.com/etianen/cms.git
b521ab26117288742645598a82ed547fc446580e
@@ -48,7 +48,7 @@ def index(request): connection = mail.SMTPConnection() connection.send_messages(messages) # Redirect the user. - return redirect(content.reverse("message_sent")) + return redirect(page.reverse("message_sent")) else: contact_form = ContactForm() context = {"contact_form": contact_form}
src/cms/apps/contact/views.py
ReplaceText(target='page' @(51,28)->(51,35))
def index(request): connection = mail.SMTPConnection() connection.send_messages(messages) # Redirect the user. return redirect(content.reverse("message_sent")) else: contact_form = ContactForm() context = {"contact_form": contact_form}
def index(request): connection = mail.SMTPConnection() connection.send_messages(messages) # Redirect the user. return redirect(page.reverse("message_sent")) else: contact_form = ContactForm() context = {"contact_form": contact_form}
1,754
https://:@github.com/AmmsA/Githeat.git
ce58c7cba9d405c0f828032d312670adb870435a
@@ -145,7 +145,7 @@ def _cmdline(argv=None): 'INFO', 'DEBUG', 'NOTSET'], help="logger level") - args = parser.parse_args(remaining_argv) + args = parser.parse_args(argv) if args.days: args.days = _is_valid_days_list(args.days)
lib/githeat/__main__.py
ReplaceText(target='argv' @(148,29)->(148,43))
def _cmdline(argv=None): 'INFO', 'DEBUG', 'NOTSET'], help="logger level") args = parser.parse_args(remaining_argv) if args.days: args.days = _is_valid_days_list(args.days)
def _cmdline(argv=None): 'INFO', 'DEBUG', 'NOTSET'], help="logger level") args = parser.parse_args(argv) if args.days: args.days = _is_valid_days_list(args.days)
1,755
https://:@github.com/bbalasub1/glmnet_python.git
c9b08ed3713f2448017bc041e78324add75196b7
@@ -117,7 +117,7 @@ def plotCoef(beta, norm, lambdau, df, dev, label, xvar, xlab, ylab, **options): ax2.xaxis.tick_top() xlim1 = ax1.get_xlim() - ylim1 = ax2.get_ylim() + ylim1 = ax1.get_ylim() atdf = ax1.get_xticks() indat = scipy.ones(atdf.shape, dtype = scipy.integer)
lib/glmnetPlot.py
ReplaceText(target='ax1' @(120,12)->(120,15))
def plotCoef(beta, norm, lambdau, df, dev, label, xvar, xlab, ylab, **options): ax2.xaxis.tick_top() xlim1 = ax1.get_xlim() ylim1 = ax2.get_ylim() atdf = ax1.get_xticks() indat = scipy.ones(atdf.shape, dtype = scipy.integer)
def plotCoef(beta, norm, lambdau, df, dev, label, xvar, xlab, ylab, **options): ax2.xaxis.tick_top() xlim1 = ax1.get_xlim() ylim1 = ax1.get_ylim() atdf = ax1.get_xticks() indat = scipy.ones(atdf.shape, dtype = scipy.integer)
1,756
https://:@gitlab.com/Philbrick/rilcontour.git
761f40842912f0d74901ef325837140c57054381
@@ -1250,7 +1250,7 @@ class ProjectDatasetDefinition : try : if self._project_lock_file is not None : try : - if not os.path.exists (self._project_lock_file) : + if os.path.exists (self._project_lock_file) : file = open (self._project_lock_file, "rt") data = file.readlines () file.close ()
rilcontour/rilcontourlib/dataset/rcc_DatasetInterface.py
ReplaceText(target='' @(1253,23)->(1253,27))
class ProjectDatasetDefinition : try : if self._project_lock_file is not None : try : if not os.path.exists (self._project_lock_file) : file = open (self._project_lock_file, "rt") data = file.readlines () file.close ()
class ProjectDatasetDefinition : try : if self._project_lock_file is not None : try : if os.path.exists (self._project_lock_file) : file = open (self._project_lock_file, "rt") data = file.readlines () file.close ()
1,757
https://:@gitlab.com/Philbrick/rilcontour.git
c6454ef1d68bd169bc66b59b3a00ecf61d7c04ff
@@ -152,7 +152,7 @@ class VerticalSliceSelectionWidget (QtWidgets.QWidget): qp.setBrush (color) qp.setPen (color) xE = int (i + xC) - qp.drawLine (xC, yP, xE, yP) + qp.drawLine (xE, yP, xE, yP) else: rightP = int (xC) scaleFactor = float (xSize) / float (numberofColors)
rilcontour/rilcontourlib/ui/qt_widgets/verticalsliceselectionwidget.py
ReplaceText(target='xE' @(155,33)->(155,35))
class VerticalSliceSelectionWidget (QtWidgets.QWidget): qp.setBrush (color) qp.setPen (color) xE = int (i + xC) qp.drawLine (xC, yP, xE, yP) else: rightP = int (xC) scaleFactor = float (xSize) / float (numberofColors)
class VerticalSliceSelectionWidget (QtWidgets.QWidget): qp.setBrush (color) qp.setPen (color) xE = int (i + xC) qp.drawLine (xE, yP, xE, yP) else: rightP = int (xC) scaleFactor = float (xSize) / float (numberofColors)
1,758
https://:@gitlab.com/Philbrick/rilcontour.git
9202d914149d100e0f47b9ca06c1cd8530276a93
@@ -1172,7 +1172,7 @@ def _FileSystemMaskExportProcess (tpl) : if len (writepathdir) > 200 : writepathdir, _ = os.path.split (writepath) FileUtil.createPath (writepathdir, False) - CreateWriteDirPathFromShortFilePath = not os.path.isdir (writepath) + CreateWriteDirPathFromShortFilePath = not os.path.isdir (writepathdir) if CreateWriteDirPathFromShortFilePath : writepathdir, _ = os.path.split (writepath) FileUtil.createPath (writepathdir, False)
rilcontour/rilcontourlib/ui/rcc_datasetui.py
ReplaceText(target='writepathdir' @(1175,74)->(1175,83))
def _FileSystemMaskExportProcess (tpl) : if len (writepathdir) > 200 : writepathdir, _ = os.path.split (writepath) FileUtil.createPath (writepathdir, False) CreateWriteDirPathFromShortFilePath = not os.path.isdir (writepath) if CreateWriteDirPathFromShortFilePath : writepathdir, _ = os.path.split (writepath) FileUtil.createPath (writepathdir, False)
def _FileSystemMaskExportProcess (tpl) : if len (writepathdir) > 200 : writepathdir, _ = os.path.split (writepath) FileUtil.createPath (writepathdir, False) CreateWriteDirPathFromShortFilePath = not os.path.isdir (writepathdir) if CreateWriteDirPathFromShortFilePath : writepathdir, _ = os.path.split (writepath) FileUtil.createPath (writepathdir, False)
1,759
https://:@gitlab.com/Philbrick/rilcontour.git
0489a4e534eea576731cbf896e9c6f7f6be92dd8
@@ -2020,7 +2020,7 @@ class AbstractTreeWidgetNode (QObject): lst = self.getChildernLst () if len (lst) > 0 : for child in lst : - if (not child.getROIDatasetIndicator ()) : + if (child.getROIDatasetIndicator ()) : found = True break if found != currentValue or val is not None:
rilcontour/rilcontourlib/dataset/rcc_DatasetInterface.py
ReplaceText(target='' @(2023,35)->(2023,39))
class AbstractTreeWidgetNode (QObject): lst = self.getChildernLst () if len (lst) > 0 : for child in lst : if (not child.getROIDatasetIndicator ()) : found = True break if found != currentValue or val is not None:
class AbstractTreeWidgetNode (QObject): lst = self.getChildernLst () if len (lst) > 0 : for child in lst : if (child.getROIDatasetIndicator ()) : found = True break if found != currentValue or val is not None:
1,760
https://:@gitlab.com/Philbrick/rilcontour.git
35450ed144e97370690dab365510431eb03a0636
@@ -2411,7 +2411,7 @@ class DatasetTagManager : def removeAllInternalTags (self, SafeNameSet = None ) : if SafeNameSet is not None : - if isinstance (SafeNameSet, set) : + if not isinstance (SafeNameSet, set) : SafeNameSet = set (SafeNameSet) else: SafeNameSet = set ()
rilcontour/rilcontourlib/util/rcc_util.py
ReplaceText(target='not ' @(2414,15)->(2414,15))
class DatasetTagManager : def removeAllInternalTags (self, SafeNameSet = None ) : if SafeNameSet is not None : if isinstance (SafeNameSet, set) : SafeNameSet = set (SafeNameSet) else: SafeNameSet = set ()
class DatasetTagManager : def removeAllInternalTags (self, SafeNameSet = None ) : if SafeNameSet is not None : if not isinstance (SafeNameSet, set) : SafeNameSet = set (SafeNameSet) else: SafeNameSet = set ()
1,761
https://:@gitlab.com/Philbrick/rilcontour.git
2f78da773b9ba8018bd4cf1e41ec4bc99162ffdb
@@ -3895,7 +3895,7 @@ class RCC_ContourWindow (QMainWindow): else: color = roiDefs.getROIColor (name) item.setForeground (color) - if ROIDictionary is not None and ROIDictionary.isROIDefined (txt) : + if ROIDictionary is not None and ROIDictionary.isROIDefined (name) : item.setBackground (QtGui.QColor (255,211,82)) else : item.setBackground (QtGui.QColor (255,255,255))
rilcontour/rilcontourlib/ui/rcc_contourwindow.py
ReplaceText(target='name' @(3898,81)->(3898,84))
class RCC_ContourWindow (QMainWindow): else: color = roiDefs.getROIColor (name) item.setForeground (color) if ROIDictionary is not None and ROIDictionary.isROIDefined (txt) : item.setBackground (QtGui.QColor (255,211,82)) else : item.setBackground (QtGui.QColor (255,255,255))
class RCC_ContourWindow (QMainWindow): else: color = roiDefs.getROIColor (name) item.setForeground (color) if ROIDictionary is not None and ROIDictionary.isROIDefined (name) : item.setBackground (QtGui.QColor (255,211,82)) else : item.setBackground (QtGui.QColor (255,255,255))
1,762
https://:@gitlab.com/Philbrick/rilcontour.git
835dd8f6a4be5bdd30a2a929b3eddaf90817beb9
@@ -321,7 +321,7 @@ class ML_KerasModelLoaderInterface: if ("CustomModelLoader" in Custom_Objects) : try : try : - kModel = Custom_Objects["CustomModelLoader"](model_path, LoadLinearModel = True) + kModel = Custom_Objects["CustomModelLoader"](origionalModelPath, LoadLinearModel = True) except: kModel = Custom_Objects["CustomModelLoader"](model_path) except:
rilcontour/rilcontourlib/machinelearning/ml_DatasetInterface.py
ReplaceText(target='origionalModelPath' @(324,85)->(324,95))
class ML_KerasModelLoaderInterface: if ("CustomModelLoader" in Custom_Objects) : try : try : kModel = Custom_Objects["CustomModelLoader"](model_path, LoadLinearModel = True) except: kModel = Custom_Objects["CustomModelLoader"](model_path) except:
class ML_KerasModelLoaderInterface: if ("CustomModelLoader" in Custom_Objects) : try : try : kModel = Custom_Objects["CustomModelLoader"](origionalModelPath, LoadLinearModel = True) except: kModel = Custom_Objects["CustomModelLoader"](model_path) except:
1,763
https://:@github.com/ei-grad/nginx2es.git
9fef326d801ab4315382c713a3af11f4b9420b51
@@ -94,7 +94,7 @@ class Stat(threading.Thread): current_time = time() with self.lock: for ts, delayed_to in list(self.delays.items()): - if delayed_to > current_time: + if delayed_to < current_time: del self.delays[ts] ready[ts] = self.buffers.pop(ts) return ready
nginx2es/stat.py
ReplaceText(target='<' @(97,30)->(97,31))
class Stat(threading.Thread): current_time = time() with self.lock: for ts, delayed_to in list(self.delays.items()): if delayed_to > current_time: del self.delays[ts] ready[ts] = self.buffers.pop(ts) return ready
class Stat(threading.Thread): current_time = time() with self.lock: for ts, delayed_to in list(self.delays.items()): if delayed_to < current_time: del self.delays[ts] ready[ts] = self.buffers.pop(ts) return ready
1,764
https://:@github.com/lycantropos/dendroid.git
d0b6b8369193357fd6af6df446794114b4b6a123
@@ -13,7 +13,7 @@ def test_properties(tree: Tree) -> None: result = tree.pop() assert result not in tree - assert is_left_subtree_less_than_right_subtree(result) + assert is_left_subtree_less_than_right_subtree(tree) @given(strategies.empty_trees)
tests/tree_tests/test_pop.py
ReplaceText(target='tree' @(16,51)->(16,57))
def test_properties(tree: Tree) -> None: result = tree.pop() assert result not in tree assert is_left_subtree_less_than_right_subtree(result) @given(strategies.empty_trees)
def test_properties(tree: Tree) -> None: result = tree.pop() assert result not in tree assert is_left_subtree_less_than_right_subtree(tree) @given(strategies.empty_trees)
1,765
https://:@github.com/lycantropos/dendroid.git
38f152fa4ea1050801df0852c74d061749039438
@@ -26,7 +26,7 @@ def test_properties(tree_with_value: Tuple[Tree, Domain]) -> None: tree.add(value) assert len(tree) > 0 - assert to_height(tree) > 0 + assert to_height(tree) >= 0 assert is_left_subtree_less_than_right_subtree(tree)
tests/tree_tests/test_add.py
ReplaceText(target='>=' @(29,27)->(29,28))
def test_properties(tree_with_value: Tuple[Tree, Domain]) -> None: tree.add(value) assert len(tree) > 0 assert to_height(tree) > 0 assert is_left_subtree_less_than_right_subtree(tree)
def test_properties(tree_with_value: Tuple[Tree, Domain]) -> None: tree.add(value) assert len(tree) > 0 assert to_height(tree) >= 0 assert is_left_subtree_less_than_right_subtree(tree)
1,766
https://:@github.com/iclementine/text.git
6c0a9c4c902fff15b3039254e38c33ba87b0630f
@@ -126,7 +126,7 @@ class Vocab(object): self.itos = ['<unk>'] + specials counter.subtract({tok: counter[tok] for tok in ['<unk>'] + specials}) - max_size = None if max_size is None else max_size - len(self.itos) + max_size = None if max_size is None else max_size + len(self.itos) # sort by frequency, then alphabetically words = sorted(counter.items(), key=lambda tup: tup[0])
torchtext/vocab.py
ReplaceText(target='+' @(129,58)->(129,59))
class Vocab(object): self.itos = ['<unk>'] + specials counter.subtract({tok: counter[tok] for tok in ['<unk>'] + specials}) max_size = None if max_size is None else max_size - len(self.itos) # sort by frequency, then alphabetically words = sorted(counter.items(), key=lambda tup: tup[0])
class Vocab(object): self.itos = ['<unk>'] + specials counter.subtract({tok: counter[tok] for tok in ['<unk>'] + specials}) max_size = None if max_size is None else max_size + len(self.itos) # sort by frequency, then alphabetically words = sorted(counter.items(), key=lambda tup: tup[0])
1,767
https://:@github.com/iclementine/text.git
50694cdb17eaae035b83c884cef611be33f05c5f
@@ -138,7 +138,7 @@ class Vocab(object): self.vectors = torch.Tensor(len(self), dim) for i, token in enumerate(self.itos): wv_index = stoi.get(token, None) - if wv_index is None: + if wv_index is not None: self.vectors[i] = vectors[wv_index] else: self.vectors[i] = unk_init(self.vectors[i])
torchtext/vocab.py
ReplaceText(target=' is not ' @(141,23)->(141,27))
class Vocab(object): self.vectors = torch.Tensor(len(self), dim) for i, token in enumerate(self.itos): wv_index = stoi.get(token, None) if wv_index is None: self.vectors[i] = vectors[wv_index] else: self.vectors[i] = unk_init(self.vectors[i])
class Vocab(object): self.vectors = torch.Tensor(len(self), dim) for i, token in enumerate(self.itos): wv_index = stoi.get(token, None) if wv_index is not None: self.vectors[i] = vectors[wv_index] else: self.vectors[i] = unk_init(self.vectors[i])
1,768
https://:@github.com/thaiphamquoc/kafka-python.git
d27d49fd6b1c02dc764035cb06c3b47bf2a4b7a5
@@ -228,7 +228,7 @@ class KafkaConsumer(object): if isinstance(arg, (six.string_types, six.binary_type)): topic = kafka_bytestring(arg) - for partition in self._client.get_partition_ids_for_topic(arg): + for partition in self._client.get_partition_ids_for_topic(topic): self._consume_topic_partition(topic, partition) # (topic, partition [, offset]) tuple
kafka/consumer/kafka.py
ReplaceText(target='topic' @(231,74)->(231,77))
class KafkaConsumer(object): if isinstance(arg, (six.string_types, six.binary_type)): topic = kafka_bytestring(arg) for partition in self._client.get_partition_ids_for_topic(arg): self._consume_topic_partition(topic, partition) # (topic, partition [, offset]) tuple
class KafkaConsumer(object): if isinstance(arg, (six.string_types, six.binary_type)): topic = kafka_bytestring(arg) for partition in self._client.get_partition_ids_for_topic(topic): self._consume_topic_partition(topic, partition) # (topic, partition [, offset]) tuple
1,769
https://:@github.com/thaiphamquoc/kafka-python.git
416f50b6f78328878e950d7bd8dd902c52d35b13
@@ -64,7 +64,7 @@ class Sensor(object): now = time.time() * 1000 if time_ms is None: time_ms = now - self._last_record_time = now + self._last_record_time = time_ms with self._lock: # XXX high volume, might be performance issue # increment all the stats for stat in self._stats:
kafka/metrics/stats/sensor.py
ReplaceText(target='time_ms' @(67,33)->(67,36))
class Sensor(object): now = time.time() * 1000 if time_ms is None: time_ms = now self._last_record_time = now with self._lock: # XXX high volume, might be performance issue # increment all the stats for stat in self._stats:
class Sensor(object): now = time.time() * 1000 if time_ms is None: time_ms = now self._last_record_time = time_ms with self._lock: # XXX high volume, might be performance issue # increment all the stats for stat in self._stats:
1,770
https://:@github.com/thaiphamquoc/kafka-python.git
003bb0a8308e749cf0f63cd60bc2c020b2c96083
@@ -438,7 +438,7 @@ class Fetcher(six.Iterator): # Compressed messagesets may include earlier messages # It is also possible that the user called seek() - elif msg.offset != self._subscriptions.assignment[tp].position: + elif msg.offset < self._subscriptions.assignment[tp].position: log.debug("Skipping message offset: %s (expecting %s)", msg.offset, self._subscriptions.assignment[tp].position)
kafka/consumer/fetcher.py
ReplaceText(target='<' @(441,36)->(441,38))
class Fetcher(six.Iterator): # Compressed messagesets may include earlier messages # It is also possible that the user called seek() elif msg.offset != self._subscriptions.assignment[tp].position: log.debug("Skipping message offset: %s (expecting %s)", msg.offset, self._subscriptions.assignment[tp].position)
class Fetcher(six.Iterator): # Compressed messagesets may include earlier messages # It is also possible that the user called seek() elif msg.offset < self._subscriptions.assignment[tp].position: log.debug("Skipping message offset: %s (expecting %s)", msg.offset, self._subscriptions.assignment[tp].position)
1,771
https://:@github.com/thaiphamquoc/kafka-python.git
efc03d083d323e35a2d32bcbdbccc053f737836e
@@ -701,7 +701,7 @@ class Fetcher(six.Iterator): if error_type is Errors.NoError: if response.API_VERSION == 0: offsets = partition_info[2] - assert len(offsets) > 1, 'Expected OffsetResponse with one offset' + assert len(offsets) <= 1, 'Expected OffsetResponse with one offset' if offsets: offset = offsets[0] log.debug("Handling v0 ListOffsetResponse response for %s. "
kafka/consumer/fetcher.py
ReplaceText(target='<=' @(704,44)->(704,45))
class Fetcher(six.Iterator): if error_type is Errors.NoError: if response.API_VERSION == 0: offsets = partition_info[2] assert len(offsets) > 1, 'Expected OffsetResponse with one offset' if offsets: offset = offsets[0] log.debug("Handling v0 ListOffsetResponse response for %s. "
class Fetcher(six.Iterator): if error_type is Errors.NoError: if response.API_VERSION == 0: offsets = partition_info[2] assert len(offsets) <= 1, 'Expected OffsetResponse with one offset' if offsets: offset = offsets[0] log.debug("Handling v0 ListOffsetResponse response for %s. "
1,772
https://:@github.com/lefterisjp/pystun.git
69f0b3f33fa4a8359a7dab2f080d7f79c266fee4
@@ -231,7 +231,7 @@ def get_nat_type(s, source_ip, source_port, stun_host=None, stun_port=3478): changePortRequest = ''.join([ChangeRequest, '0004', "00000002"]) log.debug("Do Test3") - ret = stun_test(s, changedIP, port, source_ip, source_port, + ret = stun_test(s, changedIP, changedPort, source_ip, source_port, changePortRequest) log.debug("Result: %s", ret) if ret['Resp']:
stun/__init__.py
ReplaceText(target='changedPort' @(234,50)->(234,54))
def get_nat_type(s, source_ip, source_port, stun_host=None, stun_port=3478): changePortRequest = ''.join([ChangeRequest, '0004', "00000002"]) log.debug("Do Test3") ret = stun_test(s, changedIP, port, source_ip, source_port, changePortRequest) log.debug("Result: %s", ret) if ret['Resp']:
def get_nat_type(s, source_ip, source_port, stun_host=None, stun_port=3478): changePortRequest = ''.join([ChangeRequest, '0004', "00000002"]) log.debug("Do Test3") ret = stun_test(s, changedIP, changedPort, source_ip, source_port, changePortRequest) log.debug("Result: %s", ret) if ret['Resp']:
1,773
https://:@github.com/draustin/pyqtgraph_extensions.git
1f3a1bc47998fb9076482dfa2ab8991733536c7b
@@ -207,7 +207,7 @@ def test_all(): pgx.close_all() if __name__=="__main__": - if QtCore.QCoreApplication.instance() is not None: + if QtCore.QCoreApplication.instance() is None: app = QtGui.QApplication([]) test_all() #f=test_AnchoredPlotItem()
pyqtgraph_extensions/test/test_all.py
ReplaceText(target=' is ' @(210,41)->(210,49))
def test_all(): pgx.close_all() if __name__=="__main__": if QtCore.QCoreApplication.instance() is not None: app = QtGui.QApplication([]) test_all() #f=test_AnchoredPlotItem()
def test_all(): pgx.close_all() if __name__=="__main__": if QtCore.QCoreApplication.instance() is None: app = QtGui.QApplication([]) test_all() #f=test_AnchoredPlotItem()
1,774
https://:@github.com/draustin/pyqtgraph_extensions.git
383e04612a893ddd033573fe69867d2d24f1a945
@@ -244,7 +244,7 @@ class ColorBarItem(pg.GraphicsWidget): # range has not been set yet return image_range=self.image_max-self.image_min - if image_range!=0: + if image_range==0: bar_levels=0,0 else: bar_levels=(image_levels[0]-self.image_min)/image_range,(image_levels[1]-self.image_min)/image_range
pyqtgraph_extensions/misc.py
ReplaceText(target='==' @(247,22)->(247,24))
class ColorBarItem(pg.GraphicsWidget): # range has not been set yet return image_range=self.image_max-self.image_min if image_range!=0: bar_levels=0,0 else: bar_levels=(image_levels[0]-self.image_min)/image_range,(image_levels[1]-self.image_min)/image_range
class ColorBarItem(pg.GraphicsWidget): # range has not been set yet return image_range=self.image_max-self.image_min if image_range==0: bar_levels=0,0 else: bar_levels=(image_levels[0]-self.image_min)/image_range,(image_levels[1]-self.image_min)/image_range
1,775
https://:@github.com/beukueb/leopard.git
69fb86620b97ca0ecb22bb4c29d6ddb8cf44a9f0
@@ -49,7 +49,7 @@ class Frame(Environment): if subtitle: self.append( pl.NoEscape(r'\framesubtitle{')+ - pl.escape_latex(title)+ + pl.escape_latex(subtitle)+ pl.NoEscape('}') ) if ncols:
leopard/extensions/latex.py
ReplaceText(target='subtitle' @(52,32)->(52,37))
class Frame(Environment): if subtitle: self.append( pl.NoEscape(r'\framesubtitle{')+ pl.escape_latex(title)+ pl.NoEscape('}') ) if ncols:
class Frame(Environment): if subtitle: self.append( pl.NoEscape(r'\framesubtitle{')+ pl.escape_latex(subtitle)+ pl.NoEscape('}') ) if ncols:
1,776
https://:@github.com/alexanderkell/elecsim.git
ef0c6b8c9c27cdbf1d98dcf390520f6a3c2be410
@@ -100,7 +100,7 @@ class World(Model): def get_running_plants(self, plants): for plant in plants: - if plant.construction_year<=1990 and plant.name == "invested_plant": + if plant.construction_year<=1990 and plant.name != "invested_plant": # Reset old plants that have been modernised with new construction year plant.construction_year = randint(self.year_number-15, self.year_number) yield plant
src/model/world.py
ReplaceText(target='!=' @(103,60)->(103,62))
class World(Model): def get_running_plants(self, plants): for plant in plants: if plant.construction_year<=1990 and plant.name == "invested_plant": # Reset old plants that have been modernised with new construction year plant.construction_year = randint(self.year_number-15, self.year_number) yield plant
class World(Model): def get_running_plants(self, plants): for plant in plants: if plant.construction_year<=1990 and plant.name != "invested_plant": # Reset old plants that have been modernised with new construction year plant.construction_year = randint(self.year_number-15, self.year_number) yield plant
1,777
https://:@github.com/alexanderkell/elecsim.git
854be7933590eccc6793d1568d2e17a0ebfa4acd
@@ -147,7 +147,7 @@ class GenCo(Agent): total_upfront_cost = 0 counter =0 total_capacity = 0 - while self.money > lowest_upfront_cost and total_capacity < 1500: + while self.money > lowest_upfront_cost or total_capacity < 1500: counter += 1 # if counter>3: # break
src/agents/generation_company/gen_co.py
ReplaceText(target='or' @(150,47)->(150,50))
class GenCo(Agent): total_upfront_cost = 0 counter =0 total_capacity = 0 while self.money > lowest_upfront_cost and total_capacity < 1500: counter += 1 # if counter>3: # break
class GenCo(Agent): total_upfront_cost = 0 counter =0 total_capacity = 0 while self.money > lowest_upfront_cost or total_capacity < 1500: counter += 1 # if counter>3: # break
1,778
https://:@github.com/nats-io/nkeys.py.git
8a5b00f83a77559d8ed73e863d9d31e0d3cd01a8
@@ -131,7 +131,7 @@ class KeyPair(object): kp = self._keys.get_verifying_key() try: - kp.verify(input, sig) + kp.verify(sig, input) return True except ed25519.BadSignatureError: raise ErrInvalidSignature()
nkeys/nkeys.py
ArgSwap(idxs=0<->1 @(134,12)->(134,21))
class KeyPair(object): kp = self._keys.get_verifying_key() try: kp.verify(input, sig) return True except ed25519.BadSignatureError: raise ErrInvalidSignature()
class KeyPair(object): kp = self._keys.get_verifying_key() try: kp.verify(sig, input) return True except ed25519.BadSignatureError: raise ErrInvalidSignature()
1,779
https://:@github.com/nats-io/nkeys.py.git
697dd3f60206600e05aed90edea302e7985940b9
@@ -77,7 +77,7 @@ def run(): signed_data = base64.b64decode(encoded_data) user = nkeys.from_seed(seed) - if user.verify(signed_data, data): + if user.verify(data, signed_data): print("Verified OK") sys.exit(0)
examples/nk/__main__.py
ArgSwap(idxs=0<->1 @(80,11)->(80,22))
def run(): signed_data = base64.b64decode(encoded_data) user = nkeys.from_seed(seed) if user.verify(signed_data, data): print("Verified OK") sys.exit(0)
def run(): signed_data = base64.b64decode(encoded_data) user = nkeys.from_seed(seed) if user.verify(data, signed_data): print("Verified OK") sys.exit(0)
1,780
https://:@github.com/drcloud/magiclog.git
bffad2101ea9055025ebffc5be9af47492dfef03
@@ -70,7 +70,7 @@ class Configuration(namedtuple('Configuration', 'syslog stderr extended')): log.info('Defaulting to STDERR logging.') syslog, stderr = None, (level or logging.INFO) if extended is None: - extended = (level or 0) <= logging.DEBUG + extended = (stderr or 0) <= logging.DEBUG else: log.info('Defaulting to logging with Syslog.') syslog, stderr = (level or logging.WARNING), None
magiclog.py
ReplaceText(target='stderr' @(73,32)->(73,37))
class Configuration(namedtuple('Configuration', 'syslog stderr extended')): log.info('Defaulting to STDERR logging.') syslog, stderr = None, (level or logging.INFO) if extended is None: extended = (level or 0) <= logging.DEBUG else: log.info('Defaulting to logging with Syslog.') syslog, stderr = (level or logging.WARNING), None
class Configuration(namedtuple('Configuration', 'syslog stderr extended')): log.info('Defaulting to STDERR logging.') syslog, stderr = None, (level or logging.INFO) if extended is None: extended = (stderr or 0) <= logging.DEBUG else: log.info('Defaulting to logging with Syslog.') syslog, stderr = (level or logging.WARNING), None
1,781
https://:@github.com/Querdos/nginx-conf-parser.git
1dce2f4ab806f999b61f9131cc59ccc110ecfd0b
@@ -4,7 +4,7 @@ from _io import TextIOWrapper def extract_context(conffile, context_name): - if not isinstance(conffile, TextIOWrapper) or not isinstance(conffile, str): + if not isinstance(conffile, TextIOWrapper) and not isinstance(conffile, str): raise TypeError('Invalid configuration file given, must be a file stream or a string') if isinstance(conffile, TextIOWrapper):
lib/core/utils.py
ReplaceText(target='and' @(7,47)->(7,49))
from _io import TextIOWrapper def extract_context(conffile, context_name): if not isinstance(conffile, TextIOWrapper) or not isinstance(conffile, str): raise TypeError('Invalid configuration file given, must be a file stream or a string') if isinstance(conffile, TextIOWrapper):
from _io import TextIOWrapper def extract_context(conffile, context_name): if not isinstance(conffile, TextIOWrapper) and not isinstance(conffile, str): raise TypeError('Invalid configuration file given, must be a file stream or a string') if isinstance(conffile, TextIOWrapper):
1,782
https://:@github.com/PrincetonUniversity/lightsheet_py3.git
89482fa99b82354a416fbdafb02b719b6e6e032f
@@ -158,7 +158,7 @@ def save_output(output, dset, output_fld, output_tag, jobid, chkpt_num, **params full_fname = os.path.join(output_fld, basename) - tifffile.imsave(output_data[0,:,:,:], full_fname, compress = 1) + tifffile.imsave(full_fname, output_data[0,:,:,:], compress = 1) return full_fname
run_chnk_fwd.py
ArgSwap(idxs=0<->1 @(161,8)->(161,23))
def save_output(output, dset, output_fld, output_tag, jobid, chkpt_num, **params full_fname = os.path.join(output_fld, basename) tifffile.imsave(output_data[0,:,:,:], full_fname, compress = 1) return full_fname
def save_output(output, dset, output_fld, output_tag, jobid, chkpt_num, **params full_fname = os.path.join(output_fld, basename) tifffile.imsave(full_fname, output_data[0,:,:,:], compress = 1) return full_fname
1,783
https://:@github.com/NSLS-II/suitcase.git
6ac4a42ce3699009318c55a18145eb8edfaaad48
@@ -512,7 +512,7 @@ def specscan_to_document_stream(scan, validate=False, check_in_broker=False): metadatastore. You will need to call find_* yourself to determine if it does exist """ - if mdsc is None and validate: + if mdsc is None and check_in_broker: raise NotImplementedError( "It is not possible to use the `check_in_broker=True` unless you " "have metadatastore installed. Please re-run this function with "
suitcase/spec.py
ReplaceText(target='check_in_broker' @(515,24)->(515,32))
def specscan_to_document_stream(scan, validate=False, check_in_broker=False): metadatastore. You will need to call find_* yourself to determine if it does exist """ if mdsc is None and validate: raise NotImplementedError( "It is not possible to use the `check_in_broker=True` unless you " "have metadatastore installed. Please re-run this function with "
def specscan_to_document_stream(scan, validate=False, check_in_broker=False): metadatastore. You will need to call find_* yourself to determine if it does exist """ if mdsc is None and check_in_broker: raise NotImplementedError( "It is not possible to use the `check_in_broker=True` unless you " "have metadatastore installed. Please re-run this function with "
1,784
https://:@github.com/mattian7741/zulu.git
13ce6ef335f20303dfa0fac363deebeff08641b6
@@ -20,7 +20,7 @@ class VerifyVersionCommand(install): def run(self): tag = os.getenv('CIRCLE_TAG') - if tag != VERSION: + if tag == VERSION: info = "Git tag: {0} does not match the version of this app: {1}".format( tag, VERSION )
setup.py
ReplaceText(target='==' @(23,15)->(23,17))
class VerifyVersionCommand(install): def run(self): tag = os.getenv('CIRCLE_TAG') if tag != VERSION: info = "Git tag: {0} does not match the version of this app: {1}".format( tag, VERSION )
class VerifyVersionCommand(install): def run(self): tag = os.getenv('CIRCLE_TAG') if tag == VERSION: info = "Git tag: {0} does not match the version of this app: {1}".format( tag, VERSION )
1,785
https://:@github.com/collective/p4a.plonecalendar.git
416b652e14d524a6e3b31758dd13eb28e49b412d
@@ -37,8 +37,8 @@ def setup_site(site): sm = site.getSiteManager() if not sm.queryUtility(interfaces.ICalendarSupport): - sm.registerUtility(interfaces.ICalendarSupport, - content.CalendarSupport('calendar_support')) + sm.registerUtility(content.CalendarSupport('calendar_support'), + interfaces.ICalendarSupport) def _cleanup_utilities(site): raise NotImplementedError('Current ISiteManager support does not '
p4a/plonecalendar/sitesetup.py
ArgSwap(idxs=0<->1 @(40,8)->(40,26))
def setup_site(site): sm = site.getSiteManager() if not sm.queryUtility(interfaces.ICalendarSupport): sm.registerUtility(interfaces.ICalendarSupport, content.CalendarSupport('calendar_support')) def _cleanup_utilities(site): raise NotImplementedError('Current ISiteManager support does not '
def setup_site(site): sm = site.getSiteManager() if not sm.queryUtility(interfaces.ICalendarSupport): sm.registerUtility(content.CalendarSupport('calendar_support'), interfaces.ICalendarSupport) def _cleanup_utilities(site): raise NotImplementedError('Current ISiteManager support does not '
1,786
https://:@github.com/collective/p4a.plonecalendar.git
c89a0c772798bbd3f831d159fc728da6b6af0eb0
@@ -286,7 +286,7 @@ class RecurringBrainEvent(BrainEvent): for each in recurrence.getOccurrenceDays(): if start is not None and each < startdate: continue - if stop is not None and each > stopdate: + if stop is not None and each >= stopdate: break dt = datetime.date.fromordinal(each) res.append(BrainEvent(self.context, dt))
p4a/plonecalendar/eventprovider.py
ReplaceText(target='>=' @(289,41)->(289,42))
class RecurringBrainEvent(BrainEvent): for each in recurrence.getOccurrenceDays(): if start is not None and each < startdate: continue if stop is not None and each > stopdate: break dt = datetime.date.fromordinal(each) res.append(BrainEvent(self.context, dt))
class RecurringBrainEvent(BrainEvent): for each in recurrence.getOccurrenceDays(): if start is not None and each < startdate: continue if stop is not None and each >= stopdate: break dt = datetime.date.fromordinal(each) res.append(BrainEvent(self.context, dt))
1,787
https://:@github.com/AlexandrKhabarov/SUPER_PYCALCCCCC.git
e884f876336f85e5a8ac6ceb66577286e5dc669d
@@ -13,7 +13,7 @@ available_operations = { "<=": (0, lambda x, y: x <= y), ">=": (0, lambda x, y: x >= y), "==": (0, lambda x, y: x >= y), - "!=": (0, lambda x, y: x >= y), + "!=": (0, lambda x, y: x != y), "/": (2, lambda x, y: x / y), }
core/operatios.py
ReplaceText(target='!=' @(16,29)->(16,31))
available_operations = { "<=": (0, lambda x, y: x <= y), ">=": (0, lambda x, y: x >= y), "==": (0, lambda x, y: x >= y), "!=": (0, lambda x, y: x >= y), "/": (2, lambda x, y: x / y), }
available_operations = { "<=": (0, lambda x, y: x <= y), ">=": (0, lambda x, y: x >= y), "==": (0, lambda x, y: x >= y), "!=": (0, lambda x, y: x != y), "/": (2, lambda x, y: x / y), }
1,788
https://:@github.com/AlexandrKhabarov/SUPER_PYCALCCCCC.git
fb47de33e776a1b92b900508f421bcc3bb7ee619
@@ -124,7 +124,7 @@ class Interpreter: return float(left) - float(right) elif expr.operator.type_ == TokenTypes.SLASH: self.check_number_operands(expr.operator, left, right) - return float(left) - float(right) + return float(left) / float(right) elif expr.operator.type_ == TokenTypes.STAR: self.check_number_operands(expr.operator, left, right) return float(left) * float(right)
pycalc/core/expressions.py
ReplaceText(target='/' @(127,31)->(127,32))
class Interpreter: return float(left) - float(right) elif expr.operator.type_ == TokenTypes.SLASH: self.check_number_operands(expr.operator, left, right) return float(left) - float(right) elif expr.operator.type_ == TokenTypes.STAR: self.check_number_operands(expr.operator, left, right) return float(left) * float(right)
class Interpreter: return float(left) - float(right) elif expr.operator.type_ == TokenTypes.SLASH: self.check_number_operands(expr.operator, left, right) return float(left) / float(right) elif expr.operator.type_ == TokenTypes.STAR: self.check_number_operands(expr.operator, left, right) return float(left) * float(right)
1,789
https://:@github.com/winster/xmppgcm.git
e4517df5b4b714d899bb9e932e674d3b6e9992b7
@@ -103,7 +103,7 @@ class GCM(ClientXMPP): self.connecton_draining = True elif data.message_type == GCMMessageType.RECEIPT: - logging.debug('Received Receipts for message_id: %s' % msg.message_id) + logging.debug('Received Receipts for message_id: %s' % data.message_id) self.event(XMPPEvent.RECEIPT, data) else:
xmppgcm/gcm.py
ReplaceText(target='data' @(106,67)->(106,70))
class GCM(ClientXMPP): self.connecton_draining = True elif data.message_type == GCMMessageType.RECEIPT: logging.debug('Received Receipts for message_id: %s' % msg.message_id) self.event(XMPPEvent.RECEIPT, data) else:
class GCM(ClientXMPP): self.connecton_draining = True elif data.message_type == GCMMessageType.RECEIPT: logging.debug('Received Receipts for message_id: %s' % data.message_id) self.event(XMPPEvent.RECEIPT, data) else:
1,790
https://:@github.com/geertj/bluepass.git
5c3bb3833033d329fa6e4447f51c73cb02de26fe
@@ -647,7 +647,7 @@ class VaultView(QWidget): current_order.removeat(curpos) items.removeItem(item) item.hide(); item.destroy() - self.groupRemoved.emit(uuid, group) + self.groupRemoved.emit(uuid, curgroup) # We can now update the version cache for version in versions: current_versions[version['id']] = version
bluepass/frontends/qt/passwordview.py
ReplaceText(target='curgroup' @(650,49)->(650,54))
class VaultView(QWidget): current_order.removeat(curpos) items.removeItem(item) item.hide(); item.destroy() self.groupRemoved.emit(uuid, group) # We can now update the version cache for version in versions: current_versions[version['id']] = version
class VaultView(QWidget): current_order.removeat(curpos) items.removeItem(item) item.hide(); item.destroy() self.groupRemoved.emit(uuid, curgroup) # We can now update the version cache for version in versions: current_versions[version['id']] = version
1,791
https://:@github.com/ajbouh/tfi.git
029bc838140ad2d9f9a24d8900a918a9ffc1eacd
@@ -21,7 +21,7 @@ class SavedModelTest(unittest.TestCase): self.assertEqual(3.0, m.add(x=1.0, y=2.0).sum) self.assertEqual(2.0, m.mult(x=1.0, y=2.0).prod) - tfi.saved_model.export("math.saved_model", Math) + tfi.saved_model.export("math.saved_model", m) # Prove that we can save it. # Prove that we can restore it to a new class.
tests/saved_model_test.py
ReplaceText(target='m' @(24,51)->(24,55))
class SavedModelTest(unittest.TestCase): self.assertEqual(3.0, m.add(x=1.0, y=2.0).sum) self.assertEqual(2.0, m.mult(x=1.0, y=2.0).prod) tfi.saved_model.export("math.saved_model", Math) # Prove that we can save it. # Prove that we can restore it to a new class.
class SavedModelTest(unittest.TestCase): self.assertEqual(3.0, m.add(x=1.0, y=2.0).sum) self.assertEqual(2.0, m.mult(x=1.0, y=2.0).prod) tfi.saved_model.export("math.saved_model", m) # Prove that we can save it. # Prove that we can restore it to a new class.
1,792
https://:@github.com/lelit/nssjson.git
ff9cb965faa144b3f221fad0e7f6f09cc91ac30d
@@ -53,7 +53,7 @@ class TestRecursion(TestCase): x = {} y = {"a": x, "b": x} # ensure that the marker is cleared - json.dumps(x) + json.dumps(y) def test_defaultrecursion(self): enc = RecursiveJSONEncoder()
simplejson/tests/test_recursion.py
ReplaceText(target='y' @(56,19)->(56,20))
class TestRecursion(TestCase): x = {} y = {"a": x, "b": x} # ensure that the marker is cleared json.dumps(x) def test_defaultrecursion(self): enc = RecursiveJSONEncoder()
class TestRecursion(TestCase): x = {} y = {"a": x, "b": x} # ensure that the marker is cleared json.dumps(y) def test_defaultrecursion(self): enc = RecursiveJSONEncoder()
1,793
https://:@github.com/combatopera/lagoon.git
993c4be530b1768731517a7275b0a8978f8255f5
@@ -54,7 +54,7 @@ class Stuff: while j < len(atoms): i = j chunksize = 0 - while j < len(atoms) and chunksize + len(atoms[j]) < self.buffersize: + while j < len(atoms) and chunksize + len(atoms[j]) <= self.buffersize: chunksize += len(atoms[j]) j += 1 self._juststuff(b''.join(atoms[i:j]))
screen.py
ReplaceText(target='<=' @(57,63)->(57,64))
class Stuff: while j < len(atoms): i = j chunksize = 0 while j < len(atoms) and chunksize + len(atoms[j]) < self.buffersize: chunksize += len(atoms[j]) j += 1 self._juststuff(b''.join(atoms[i:j]))
class Stuff: while j < len(atoms): i = j chunksize = 0 while j < len(atoms) and chunksize + len(atoms[j]) <= self.buffersize: chunksize += len(atoms[j]) j += 1 self._juststuff(b''.join(atoms[i:j]))
1,794
https://:@github.com/OnroerendErfgoed/crabpy_pyramid.git
a918c37502fc569c052ff16952b3f3bc1b6c5a90
@@ -359,4 +359,4 @@ class HttpCachingFunctionalTests(FunctionalTests): self.assertEqual('200 OK', res.status) etag = res.headers['Etag'] res2 = self.testapp.get('/crab/gewesten', headers={'If-None-Match': etag}) - self.assertEqual('304 Not Modified', res.status) + self.assertEqual('304 Not Modified', res2.status)
crabpy_pyramid/tests/test_functional.py
ReplaceText(target='res2' @(362,45)->(362,48))
class HttpCachingFunctionalTests(FunctionalTests): self.assertEqual('200 OK', res.status) etag = res.headers['Etag'] res2 = self.testapp.get('/crab/gewesten', headers={'If-None-Match': etag}) self.assertEqual('304 Not Modified', res.status)
class HttpCachingFunctionalTests(FunctionalTests): self.assertEqual('200 OK', res.status) etag = res.headers['Etag'] res2 = self.testapp.get('/crab/gewesten', headers={'If-None-Match': etag}) self.assertEqual('304 Not Modified', res2.status)
1,795
https://:@github.com/certae/django-softmachine.git
12a9f0f5f016395f34bf03afa50889aa8ac36e3c
@@ -109,7 +109,7 @@ def protoList(request): # Prepara las cols del Query - pList = Q2Dict(protoFields , pRows ) + pList = Q2Dict(protoMeta , pRows ) context = json.dumps({ 'success': True,
src/protoLib/protoActionList.py
ReplaceText(target='protoMeta' @(112,19)->(112,30))
def protoList(request): # Prepara las cols del Query pList = Q2Dict(protoFields , pRows ) context = json.dumps({ 'success': True,
def protoList(request): # Prepara las cols del Query pList = Q2Dict(protoMeta , pRows ) context = json.dumps({ 'success': True,
1,796
https://:@github.com/certae/django-softmachine.git
331b58a38d644e8ee611f4f5603a56529419810f
@@ -94,7 +94,7 @@ def getQbeStmt( fieldName , sQBE, sType ): bAndConector = True sCondicion = sCondicion[1:] - Qtmp = getQbeStmt(fieldName, sType, sCondicion) + Qtmp = getQbeStmt(fieldName, sCondicion, sType) if bAndConector: QResult = QResult & Qtmp else:
src/protoLib/protoQbe.py
ArgSwap(idxs=1<->2 @(97,19)->(97,29))
def getQbeStmt( fieldName , sQBE, sType ): bAndConector = True sCondicion = sCondicion[1:] Qtmp = getQbeStmt(fieldName, sType, sCondicion) if bAndConector: QResult = QResult & Qtmp else:
def getQbeStmt( fieldName , sQBE, sType ): bAndConector = True sCondicion = sCondicion[1:] Qtmp = getQbeStmt(fieldName, sCondicion, sType) if bAndConector: QResult = QResult & Qtmp else:
1,797
https://:@github.com/inveniosoftware/invenio-app-ils.git
bdeb4bcb9bdd8d75e8231b032134b3bf008e0c4d
@@ -155,7 +155,7 @@ class LoanMailResource(IlsCirculationResource): """Loan email post method.""" days_ago = circulation_overdue_loan_days(record) is_overdue = days_ago > 0 - if is_overdue: + if not is_overdue: raise OverdueLoansMailError(description="This loan is not overdue") send_loan_overdue_reminder_mail(record, days_ago) return self.make_response(
invenio_app_ils/circulation/views.py
ReplaceText(target='not ' @(158,11)->(158,11))
class LoanMailResource(IlsCirculationResource): """Loan email post method.""" days_ago = circulation_overdue_loan_days(record) is_overdue = days_ago > 0 if is_overdue: raise OverdueLoansMailError(description="This loan is not overdue") send_loan_overdue_reminder_mail(record, days_ago) return self.make_response(
class LoanMailResource(IlsCirculationResource): """Loan email post method.""" days_ago = circulation_overdue_loan_days(record) is_overdue = days_ago > 0 if not is_overdue: raise OverdueLoansMailError(description="This loan is not overdue") send_loan_overdue_reminder_mail(record, days_ago) return self.make_response(
1,798
https://:@github.com/hugosenari/Kupfer-Plugins.git
500371bfea20e856242186f0f6d6c1d1446b19c5
@@ -72,7 +72,7 @@ class LastStatus(Action): info = get_tracking_info(content.decode('iso-8859-1')) if info: txt = '-'.join(reversed(info[0])) - return TextLeaf(txt, leaf.object) + return TextLeaf(leaf.object, txt) def item_types(self): yield TextLeaf
curreios/curreios.py
ArgSwap(idxs=0<->1 @(75,23)->(75,31))
class LastStatus(Action): info = get_tracking_info(content.decode('iso-8859-1')) if info: txt = '-'.join(reversed(info[0])) return TextLeaf(txt, leaf.object) def item_types(self): yield TextLeaf
class LastStatus(Action): info = get_tracking_info(content.decode('iso-8859-1')) if info: txt = '-'.join(reversed(info[0])) return TextLeaf(leaf.object, txt) def item_types(self): yield TextLeaf
1,799
https://:@github.com/janhybs/ci-hpc.git
bf6e060a313c57667a4b75b41dbbb5114d9fb927
@@ -50,7 +50,7 @@ def process_step_collect(step, format_args=None): with logger: for file, timers in timers_info: logger.debug('%20s: %5d timers found', file, timers) - logger.info('artifacts: found %d timer(s) in %d file(s)', len(files), timers_total) + logger.info('artifacts: found %d timer(s) in %d file(s)', timers_total, len(files)) # insert artifacts into db if step.collect.save_to_db:
ci-hpc/proc/step/step_collect.py
ArgSwap(idxs=1<->2 @(53,12)->(53,23))
def process_step_collect(step, format_args=None): with logger: for file, timers in timers_info: logger.debug('%20s: %5d timers found', file, timers) logger.info('artifacts: found %d timer(s) in %d file(s)', len(files), timers_total) # insert artifacts into db if step.collect.save_to_db:
def process_step_collect(step, format_args=None): with logger: for file, timers in timers_info: logger.debug('%20s: %5d timers found', file, timers) logger.info('artifacts: found %d timer(s) in %d file(s)', timers_total, len(files)) # insert artifacts into db if step.collect.save_to_db: